Skip to content

Commit

Permalink
Add some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil Skachkov committed Oct 24, 2014
1 parent c044a0a commit b762dcf
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ailib/src/main/java/ai/api/model/AIResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,27 @@

public class AIResponse implements Serializable {

/**
* Unique identifier of the result.
*/
@SerializedName("id")
private String id;

@SerializedName("timestamp")
private Date timestamp;

/**
* Result object
*/
@SerializedName("result")
private Result result;

@SerializedName("status")
private Status status;

/**
* Unique identifier of the result.
*/
public String getId() {
return id;
}
Expand All @@ -56,6 +65,9 @@ public void setTimestamp(final Date timestamp) {
this.timestamp = timestamp;
}

/**
* Result object
*/
public Result getResult() {
return result;
}
Expand Down
37 changes: 37 additions & 0 deletions ailib/src/main/java/ai/api/model/Metadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,39 @@

public class Metadata implements Serializable {

/**
* Name of the intent that produced this result
*/
@SerializedName("intentName")
private String intentName;

/**
* Id of the intent that produced this result
*/
@SerializedName("intentId")
private String intentId;

/**
* Contexts that were matched by the intent
*/
@SerializedName("inputContexts")
private String[] inputContexts;

/**
* Contexts that were added by the intent
*/
@SerializedName("outputContexts")
private String[] outputContexts;

/**
* Currently active contexts
*/
@SerializedName("contexts")
private String[] contexts;

/**
* Name of the intent that produced this result
*/
public String getIntentName() {
return intentName;
}
Expand All @@ -47,6 +68,9 @@ public void setIntentName(final String intentName) {
this.intentName = intentName;
}

/**
* Id of the intent that produced this result
*/
public String getIntentId() {
return intentId;
}
Expand All @@ -55,11 +79,24 @@ public void setIntentId(final String intentId) {
this.intentId = intentId;
}

/**
* Contexts that were matched by the intent
*/
public String[] getInputContexts() {
return inputContexts;
}

/**
* Currently active contexts
*/
public String[] getContexts() {
return contexts;
}

/**
* Contexts that were added by the intent
*/
public String[] getOutputContexts() {
return outputContexts;
}
}
6 changes: 6 additions & 0 deletions ailib/src/main/java/ai/api/model/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ public class Result implements Serializable {
@SerializedName("metadata")
private Metadata metadata;

/**
* The query that was used to produce this result
*/
@SerializedName("resolvedQuery")
private String resolvedQuery;

Expand Down Expand Up @@ -75,6 +78,9 @@ public HashMap<String, JsonElement> getParameters() {
return parameters;
}

/**
* The query that was used to produce this result
*/
public String getResolvedQuery() {
return resolvedQuery;
}
Expand Down
6 changes: 6 additions & 0 deletions ailib/src/main/java/ai/api/model/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

public class Status implements Serializable {

/**
* HTTP Status Code
*/
@SerializedName("code")
private Integer code;

Expand All @@ -39,6 +42,9 @@ public class Status implements Serializable {
@SerializedName("errorID")
private String errorID;

/**
* HTTP Status Code
*/
public Integer getCode() {
return code;
}
Expand Down

0 comments on commit b762dcf

Please sign in to comment.