Trendsic Platform Service

<back to all web services

AwsAuthRequest

The following routes are available for this service:
GET,PUT,POST,OPTIONS/v1/AwsAuth
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class AwsAuthRequest
    {
        public String Username = null;
        public String Password = null;
        
        public String getUsername() { return Username; }
        public AwsAuthRequest setUsername(String value) { this.Username = value; return this; }
        public String getPassword() { return Password; }
        public AwsAuthRequest setPassword(String value) { this.Password = value; return this; }
    }

    public static class AwsAuthResponse
    {
        public ResponseStatus ResponseStatus = null;
        public InitiateAuthResponse InitiateAuthResponse = null;
        public Boolean Success = null;
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public AwsAuthResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public InitiateAuthResponse getInitiateAuthResponse() { return InitiateAuthResponse; }
        public AwsAuthResponse setInitiateAuthResponse(InitiateAuthResponse value) { this.InitiateAuthResponse = value; return this; }
        public Boolean isSuccess() { return Success; }
        public AwsAuthResponse setSuccess(Boolean value) { this.Success = value; return this; }
    }

    public static class InitiateAuthResponse extends AmazonWebServiceResponse
    {
        public AuthenticationResultType AuthenticationResult = null;
        public ChallengeNameType ChallengeName = null;
        public HashMap<String,String> ChallengeParameters = new HashMap<String,String>();
        public String Session = null;
        
        public AuthenticationResultType getAuthenticationResult() { return AuthenticationResult; }
        public InitiateAuthResponse setAuthenticationResult(AuthenticationResultType value) { this.AuthenticationResult = value; return this; }
        public ChallengeNameType getChallengeName() { return ChallengeName; }
        public InitiateAuthResponse setChallengeName(ChallengeNameType value) { this.ChallengeName = value; return this; }
        public HashMap<String,String> getChallengeParameters() { return ChallengeParameters; }
        public InitiateAuthResponse setChallengeParameters(HashMap<String,String> value) { this.ChallengeParameters = value; return this; }
        public String getSession() { return Session; }
        public InitiateAuthResponse setSession(String value) { this.Session = value; return this; }
    }

    public static class AmazonWebServiceResponse
    {
        public ResponseMetadata ResponseMetadata = null;
        public Long ContentLength = null;
        public HttpStatusCode HttpStatusCode = null;
        
        public ResponseMetadata getResponseMetadata() { return ResponseMetadata; }
        public AmazonWebServiceResponse setResponseMetadata(ResponseMetadata value) { this.ResponseMetadata = value; return this; }
        public Long getContentLength() { return ContentLength; }
        public AmazonWebServiceResponse setContentLength(Long value) { this.ContentLength = value; return this; }
        public HttpStatusCode getHttpStatusCode() { return HttpStatusCode; }
        public AmazonWebServiceResponse setHttpStatusCode(HttpStatusCode value) { this.HttpStatusCode = value; return this; }
    }

    public static class ResponseMetadata
    {
        public String RequestId = null;
        public HashMap<String,String> Metadata = null;
        public CoreChecksumAlgorithm ChecksumAlgorithm = null;
        public ChecksumValidationStatus ChecksumValidationStatus = null;
        
        public String getRequestId() { return RequestId; }
        public ResponseMetadata setRequestId(String value) { this.RequestId = value; return this; }
        public HashMap<String,String> getMetadata() { return Metadata; }
        public ResponseMetadata setMetadata(HashMap<String,String> value) { this.Metadata = value; return this; }
        public CoreChecksumAlgorithm getChecksumAlgorithm() { return ChecksumAlgorithm; }
        public ResponseMetadata setChecksumAlgorithm(CoreChecksumAlgorithm value) { this.ChecksumAlgorithm = value; return this; }
        public ChecksumValidationStatus getChecksumValidationStatus() { return ChecksumValidationStatus; }
        public ResponseMetadata setChecksumValidationStatus(ChecksumValidationStatus value) { this.ChecksumValidationStatus = value; return this; }
    }

    public static enum CoreChecksumAlgorithm
    {
        None,
        CrC32C,
        CrC32,
        ShA256,
        ShA1;
    }

    public static enum ChecksumValidationStatus
    {
        NotValidated,
        PendingResponseRead,
        Successful,
        Invalid;
    }

    public static class AuthenticationResultType
    {
        public String AccessToken = null;
        public Integer ExpiresIn = null;
        public String IdToken = null;
        public NewDeviceMetadataType NewDeviceMetadata = null;
        public String RefreshToken = null;
        public String TokenType = null;
        
        public String getAccessToken() { return AccessToken; }
        public AuthenticationResultType setAccessToken(String value) { this.AccessToken = value; return this; }
        public Integer getExpiresIn() { return ExpiresIn; }
        public AuthenticationResultType setExpiresIn(Integer value) { this.ExpiresIn = value; return this; }
        public String getIdToken() { return IdToken; }
        public AuthenticationResultType setIdToken(String value) { this.IdToken = value; return this; }
        public NewDeviceMetadataType getNewDeviceMetadata() { return NewDeviceMetadata; }
        public AuthenticationResultType setNewDeviceMetadata(NewDeviceMetadataType value) { this.NewDeviceMetadata = value; return this; }
        public String getRefreshToken() { return RefreshToken; }
        public AuthenticationResultType setRefreshToken(String value) { this.RefreshToken = value; return this; }
        public String getTokenType() { return TokenType; }
        public AuthenticationResultType setTokenType(String value) { this.TokenType = value; return this; }
    }

    public static class NewDeviceMetadataType
    {
        public String DeviceGroupKey = null;
        public String DeviceKey = null;
        
        public String getDeviceGroupKey() { return DeviceGroupKey; }
        public NewDeviceMetadataType setDeviceGroupKey(String value) { this.DeviceGroupKey = value; return this; }
        public String getDeviceKey() { return DeviceKey; }
        public NewDeviceMetadataType setDeviceKey(String value) { this.DeviceKey = value; return this; }
    }

    public static class ChallengeNameType extends ConstantClass
    {
        
    }

    public static class ConstantClass
    {
        public String Value = null;
        
        public String getValue() { return Value; }
        public ConstantClass setValue(String value) { this.Value = value; return this; }
    }

}

Java AwsAuthRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/AwsAuth HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Username: String,
	Password: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	InitiateAuthResponse: 
	{
		AuthenticationResult: 
		{
			AccessToken: String,
			ExpiresIn: 0,
			IdToken: String,
			NewDeviceMetadata: 
			{
				DeviceGroupKey: String,
				DeviceKey: String
			},
			RefreshToken: String,
			TokenType: String
		},
		ChallengeParameters: 
		{
			String: String
		},
		Session: String,
		ResponseMetadata: 
		{
			RequestId: String,
			Metadata: {},
			ChecksumAlgorithm: NONE,
			ChecksumValidationStatus: NOT_VALIDATED
		},
		ContentLength: 0,
		HttpStatusCode: Continue
	},
	Success: False
}