POST | /RegenerateLicenseKey |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class RegenerateLicenseKey implements IPost
{
@Validate(Validator="NotEmpty")
public String licenseKey = null;
@Validate(Validator="NotEmpty")
public String halg = null;
public String getLicenseKey() { return licenseKey; }
public RegenerateLicenseKey setLicenseKey(String value) { this.licenseKey = value; return this; }
public String getHalg() { return halg; }
public RegenerateLicenseKey setHalg(String value) { this.halg = value; return this; }
}
public static class RegenerateLicenseKeyResponse
{
public LicenseKey licenseKey = null;
public String licenseKeyText = null;
public ResponseStatus responseStatus = null;
public LicenseKey getLicenseKey() { return licenseKey; }
public RegenerateLicenseKeyResponse setLicenseKey(LicenseKey value) { this.licenseKey = value; return this; }
public String getLicenseKeyText() { return licenseKeyText; }
public RegenerateLicenseKeyResponse setLicenseKeyText(String value) { this.licenseKeyText = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public RegenerateLicenseKeyResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
public static class LicenseKey
{
public String ref = null;
public String name = null;
public LicenseType type = null;
public Long meta = null;
public String hash = null;
public String halg = null;
public Date expiry = null;
public String getRef() { return ref; }
public LicenseKey setRef(String value) { this.ref = value; return this; }
public String getName() { return name; }
public LicenseKey setName(String value) { this.name = value; return this; }
public LicenseType getType() { return type; }
public LicenseKey setType(LicenseType value) { this.type = value; return this; }
public Long getMeta() { return meta; }
public LicenseKey setMeta(Long value) { this.meta = value; return this; }
public String getHash() { return hash; }
public LicenseKey setHash(String value) { this.hash = value; return this; }
public String getHalg() { return halg; }
public LicenseKey setHalg(String value) { this.halg = value; return this; }
public Date getExpiry() { return expiry; }
public LicenseKey setExpiry(Date value) { this.expiry = value; return this; }
}
public static enum LicenseType
{
Free,
FreeIndividual,
FreeOpenSource,
Indie,
Business,
Enterprise,
TextIndie,
TextBusiness,
OrmLiteIndie,
OrmLiteBusiness,
RedisIndie,
RedisBusiness,
AwsIndie,
AwsBusiness,
Trial,
Site,
TextSite,
RedisSite,
OrmLiteSite;
}
}
Java RegenerateLicenseKey DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /RegenerateLicenseKey HTTP/1.1
Host: account.servicestack.net
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"licenseKey":"String","halg":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"licenseKey":{"ref":"String","name":"String","type":"Free","meta":0,"hash":"String","halg":"String","expiry":"\/Date(-62135596800000-0000)\/"},"licenseKeyText":"String","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}