| POST | /files/Ssl |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
@DataContract
public static class SmtpConfigSsl extends SmtpConfig
{
@DataMember(Name="SecurityType")
@SerializedName("SecurityType")
public SecurityType securityType = null;
public SecurityType getSecurityType() { return securityType; }
public SmtpConfigSsl setSecurityType(SecurityType value) { this.securityType = value; return this; }
}
@DataContract
public static class SmtpConfig
{
@DataMember(Name="Host")
@SerializedName("Host")
public String host = null;
@DataMember(Name="Port")
@SerializedName("Port")
public String port = null;
@DataMember(Name="SecurityType")
@SerializedName("SecurityType")
public SecurityType securityType = null;
@DataMember(Name="Username")
@SerializedName("Username")
public String username = null;
@DataMember(Name="Password")
@SerializedName("Password")
public String password = null;
@DataMember(Name="SmtpFromEmail")
@SerializedName("SmtpFromEmail")
public String smtpFromEmail = null;
public String getHost() { return host; }
public SmtpConfig setHost(String value) { this.host = value; return this; }
public String getPort() { return port; }
public SmtpConfig setPort(String value) { this.port = value; return this; }
public SecurityType getSecurityType() { return securityType; }
public SmtpConfig setSecurityType(SecurityType value) { this.securityType = value; return this; }
public String getUsername() { return username; }
public SmtpConfig setUsername(String value) { this.username = value; return this; }
public String getPassword() { return password; }
public SmtpConfig setPassword(String value) { this.password = value; return this; }
public String getSmtpFromEmail() { return smtpFromEmail; }
public SmtpConfig setSmtpFromEmail(String value) { this.smtpFromEmail = value; return this; }
}
public static enum SecurityType
{
Ssl,
Tls,
Certificate;
}
public static class SmtpConfigResponse
{
public ResponseStatus responseStatus = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public SmtpConfigResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /files/Ssl HTTP/1.1
Host: emg-servdesk.eras-online.de
Accept: application/json
Content-Type: application/json
Content-Length: length
{"SecurityType":"Ssl","Host":"String","Port":"String","Username":"String","Password":"String","SmtpFromEmail":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}