mirror of
https://github.com/wahyd4/push.git
synced 2026-08-09 05:06:54 +10:00
82 lines
2.6 KiB
Go
82 lines
2.6 KiB
Go
package messages
|
|
|
|
import "time"
|
|
|
|
type ActionMessage struct {
|
|
ResponseID string `json:"responseId"`
|
|
QueryResult *QueryResult `json:"queryResult"`
|
|
OriginalDetectIntentRequest *OriginalDetectIntentRequest `json:"originalDetectIntentRequest"`
|
|
Session string `json:"session"`
|
|
}
|
|
|
|
type QueryResult struct {
|
|
QueryText string `json:"queryText"`
|
|
Parameters struct {
|
|
Location string `json:"location"`
|
|
Userid string `json:"userid"`
|
|
} `json:"parameters"`
|
|
FulfillmentText string `json:"fulfillmentText"`
|
|
FulfillmentMessages []struct {
|
|
Text struct {
|
|
Text []string `json:"text"`
|
|
} `json:"text"`
|
|
} `json:"fulfillmentMessages"`
|
|
OutputContexts []struct {
|
|
Name string `json:"name"`
|
|
LifespanCount int `json:"lifespanCount"`
|
|
Parameters struct {
|
|
Location string `json:"location"`
|
|
LocationOriginal string `json:"location.original"`
|
|
Userid string `json:"userid"`
|
|
UseridOriginal string `json:"userid.original"`
|
|
} `json:"parameters"`
|
|
} `json:"outputContexts"`
|
|
Intent struct {
|
|
Name string `json:"name"`
|
|
DisplayName string `json:"displayName"`
|
|
} `json:"intent"`
|
|
IntentDetectionConfidence float64 `json:"intentDetectionConfidence"`
|
|
LanguageCode string `json:"languageCode"`
|
|
}
|
|
|
|
type OriginalDetectIntentRequest struct {
|
|
Source string `json:"source"`
|
|
Version string `json:"version"`
|
|
Payload struct {
|
|
User struct {
|
|
Locale string `json:"locale"`
|
|
LastSeen time.Time `json:"lastSeen"`
|
|
UserVerificationStatus string `json:"userVerificationStatus"`
|
|
} `json:"user"`
|
|
Conversation struct {
|
|
ConversationID string `json:"conversationId"`
|
|
Type string `json:"type"`
|
|
ConversationToken string `json:"conversationToken"`
|
|
} `json:"conversation"`
|
|
Inputs []struct {
|
|
Intent string `json:"intent"`
|
|
RawInputs []struct {
|
|
InputType string `json:"inputType"`
|
|
Query string `json:"query"`
|
|
} `json:"rawInputs"`
|
|
Arguments []struct {
|
|
Name string `json:"name"`
|
|
RawText string `json:"rawText"`
|
|
TextValue string `json:"textValue"`
|
|
} `json:"arguments"`
|
|
} `json:"inputs"`
|
|
Surface struct {
|
|
Capabilities []struct {
|
|
Name string `json:"name"`
|
|
} `json:"capabilities"`
|
|
} `json:"surface"`
|
|
IsInSandbox bool `json:"isInSandbox"`
|
|
AvailableSurfaces []struct {
|
|
Capabilities []struct {
|
|
Name string `json:"name"`
|
|
} `json:"capabilities"`
|
|
} `json:"availableSurfaces"`
|
|
RequestType string `json:"requestType"`
|
|
} `json:"payload"`
|
|
}
|