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); } }
/** * @see ResourceLimit#getMax() */ public T max(int max) { this.max = max; return self(); }
/** * @see ResourceLimit#getAccount() */ public T account(String account) { this.account = account; return self(); }
/** * @see ResourceLimit#getMax() */ public T max(int max) { this.max = max; return self(); }
/** * @see ResourceLimit#getDomainId() */ public T domainId(String domainId) { this.domainId = domainId; return self(); }
/** * @see ResourceLimit#getAccount() */ public T account(String account) { this.account = account; return self(); }
/** * @see ResourceLimit#getResourceType() */ public T resourceType(ResourceType resourceType) { this.resourceType = resourceType; return self(); }
/** * @see ResourceLimit#getDomainId() */ public T domainId(String domainId) { this.domainId = domainId; return self(); }
/** * @see ResourceLimit#getDomain() */ public T domain(String domain) { this.domain = domain; return self(); }
public T fromResourceLimit(ResourceLimit in) { return this .account(in.getAccount()) .domain(in.getDomain()) .domainId(in.getDomainId()) .max(in.getMax()) .resourceType(in.getResourceType()); } }
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); } }
/** * @see ResourceLimit#getDomain() */ public T domain(String domain) { this.domain = domain; return self(); }
/** * @see ResourceLimit#getResourceType() */ public T resourceType(ResourceType resourceType) { this.resourceType = resourceType; return self(); }
/** * @see ResourceLimit#getDomain() */ public T domain(String domain) { this.domain = domain; return self(); }
/** * @see ResourceLimit#getResourceType() */ public T resourceType(ResourceType resourceType) { this.resourceType = resourceType; return self(); }
/** * @see ResourceLimit#getAccount() */ public T account(String account) { this.account = account; return self(); }
public T fromResourceLimit(ResourceLimit in) { return this .account(in.getAccount()) .domain(in.getDomain()) .domainId(in.getDomainId()) .max(in.getMax()) .resourceType(in.getResourceType()); } }
/** * @see ResourceLimit#getDomainId() */ public T domainId(String domainId) { this.domainId = domainId; return self(); }
public T fromResourceLimit(ResourceLimit in) { return this .account(in.getAccount()) .domain(in.getDomain()) .domainId(in.getDomainId()) .max(in.getMax()) .resourceType(in.getResourceType()); } }
/** * @see ResourceLimit#getMax() */ public T max(int max) { this.max = max; return self(); }