Required role: | Moderator |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@ValidateRequest(Validator="HasRole(`Moderator`)")
public static class UpdateSignup implements IPatchDb<Signup>
{
public Integer id = null;
public SignupType type = null;
@Validate(Validator="Email")
public String email = null;
public String name = null;
public Date cancelledDate = null;
public Integer getId() { return id; }
public UpdateSignup setId(Integer value) { this.id = value; return this; }
public SignupType getType() { return type; }
public UpdateSignup setType(SignupType value) { this.type = value; return this; }
public String getEmail() { return email; }
public UpdateSignup setEmail(String value) { this.email = value; return this; }
public String getName() { return name; }
public UpdateSignup setName(String value) { this.name = value; return this; }
public Date getCancelledDate() { return cancelledDate; }
public UpdateSignup setCancelledDate(Date value) { this.cancelledDate = value; return this; }
}
public static enum SignupType
{
Updates,
Beta;
}
public static class Signup extends StatBase
{
public Integer id = null;
public SignupType type = null;
public String email = null;
public String name = null;
public Date cancelledDate = null;
public Integer getId() { return id; }
public Signup setId(Integer value) { this.id = value; return this; }
public SignupType getType() { return type; }
public Signup setType(SignupType value) { this.type = value; return this; }
public String getEmail() { return email; }
public Signup setEmail(String value) { this.email = value; return this; }
public String getName() { return name; }
public Signup setName(String value) { this.name = value; return this; }
public Date getCancelledDate() { return cancelledDate; }
public Signup setCancelledDate(Date value) { this.cancelledDate = value; return this; }
}
public static class StatBase
{
public String refId = null;
public Integer appUserId = null;
public String rawUrl = null;
public String remoteIp = null;
public Date createdDate = null;
public String getRefId() { return refId; }
public StatBase setRefId(String value) { this.refId = value; return this; }
public Integer getAppUserId() { return appUserId; }
public StatBase setAppUserId(Integer value) { this.appUserId = value; return this; }
public String getRawUrl() { return rawUrl; }
public StatBase setRawUrl(String value) { this.rawUrl = value; return this; }
public String getRemoteIp() { return remoteIp; }
public StatBase setRemoteIp(String value) { this.remoteIp = value; return this; }
public Date getCreatedDate() { return createdDate; }
public StatBase setCreatedDate(Date value) { this.createdDate = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /xml/reply/UpdateSignup HTTP/1.1
Host: blazordiffusion.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UpdateSignup xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BlazorDiffusion.ServiceModel">
<CancelledDate>0001-01-01T00:00:00</CancelledDate>
<Email>String</Email>
<Id>0</Id>
<Name>String</Name>
<Type>Updates</Type>
</UpdateSignup>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <Signup xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BlazorDiffusion.ServiceModel"> <AppUserId>0</AppUserId> <CreatedDate>0001-01-01T00:00:00</CreatedDate> <RawUrl>String</RawUrl> <RefId>String</RefId> <RemoteIp>String</RemoteIp> <CancelledDate>0001-01-01T00:00:00</CancelledDate> <Email>String</Email> <Id>0</Id> <Name>String</Name> <Type>Updates</Type> </Signup>