assistantv2

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Overview

Package assistantv2 : Operations and models for the AssistantV2 service

Index

Constants

View Source
const (
	DialogLogMessageLevelErrorConst = "error"
	DialogLogMessageLevelInfoConst  = "info"
	DialogLogMessageLevelWarnConst  = "warn"
)

Constants associated with the DialogLogMessage.Level property. The severity of the log message.

View Source
const (
	DialogNodeActionTypeClientConst        = "client"
	DialogNodeActionTypeCloudFunctionConst = "cloud-function"
	DialogNodeActionTypeServerConst        = "server"
	DialogNodeActionTypeWebActionConst     = "web-action"
)

Constants associated with the DialogNodeAction.Type property. The type of action to invoke.

View Source
const (
	MessageContextGlobalSystemLocaleArArConst = "ar-ar"
	MessageContextGlobalSystemLocaleCsCzConst = "cs-cz"
	MessageContextGlobalSystemLocaleDeDeConst = "de-de"
	MessageContextGlobalSystemLocaleEnCaConst = "en-ca"
	MessageContextGlobalSystemLocaleEnGbConst = "en-gb"
	MessageContextGlobalSystemLocaleEnUsConst = "en-us"
	MessageContextGlobalSystemLocaleEsEsConst = "es-es"
	MessageContextGlobalSystemLocaleFrFrConst = "fr-fr"
	MessageContextGlobalSystemLocaleItItConst = "it-it"
	MessageContextGlobalSystemLocaleJaJpConst = "ja-jp"
	MessageContextGlobalSystemLocaleKoKrConst = "ko-kr"
	MessageContextGlobalSystemLocaleNlNlConst = "nl-nl"
	MessageContextGlobalSystemLocalePtBrConst = "pt-br"
	MessageContextGlobalSystemLocaleZhCnConst = "zh-cn"
	MessageContextGlobalSystemLocaleZhTwConst = "zh-tw"
)

Constants associated with the MessageContextGlobalSystem.Locale property. The language code for localization in the user input. The specified locale overrides the default for the assistant, and is used for interpreting entity values in user input such as date values. For example, `04/03/2018` might be interpreted either as April 3 or March 4, depending on the locale.

This property is included only if the new system entities are enabled for the skill.
View Source
const (
	MessageInputMessageTypeSearchConst = "search"
	MessageInputMessageTypeTextConst   = "text"
)

Constants associated with the MessageInput.MessageType property. The type of the message:

- `text`: The user input is processed normally by the assistant. - `search`: Only search results are returned. (Any dialog or actions skill is bypassed.)

**Note:** A `search` message results in an error if no search skill is configured for the assistant.

View Source
const (
	MessageInputStatelessMessageTypeSearchConst = "search"
	MessageInputStatelessMessageTypeTextConst   = "text"
)

Constants associated with the MessageInputStateless.MessageType property. The type of the message:

- `text`: The user input is processed normally by the assistant. - `search`: Only search results are returned. (Any dialog or actions skill is bypassed.)

**Note:** A `search` message results in an error if no search skill is configured for the assistant.

View Source
const (
	MessageOutputDebugBranchExitedReasonCompletedConst = "completed"
	MessageOutputDebugBranchExitedReasonFallbackConst  = "fallback"
)

Constants associated with the MessageOutputDebug.BranchExitedReason property. When `branch_exited` is set to `true` by the assistant, the `branch_exited_reason` specifies whether the dialog completed by itself or got interrupted.

View Source
const (
	RuntimeEntityInterpretationGranularityDayConst       = "day"
	RuntimeEntityInterpretationGranularityFortnightConst = "fortnight"
	RuntimeEntityInterpretationGranularityHourConst      = "hour"
	RuntimeEntityInterpretationGranularityInstantConst   = "instant"
	RuntimeEntityInterpretationGranularityMinuteConst    = "minute"
	RuntimeEntityInterpretationGranularityMonthConst     = "month"
	RuntimeEntityInterpretationGranularityQuarterConst   = "quarter"
	RuntimeEntityInterpretationGranularitySecondConst    = "second"
	RuntimeEntityInterpretationGranularityWeekConst      = "week"
	RuntimeEntityInterpretationGranularityWeekendConst   = "weekend"
	RuntimeEntityInterpretationGranularityYearConst      = "year"
)

Constants associated with the RuntimeEntityInterpretation.Granularity property. The precision or duration of a time range specified by a recognized `@sys-time` or `@sys-date` entity.

View Source
const (
	RuntimeEntityRoleTypeDateFromConst   = "date_from"
	RuntimeEntityRoleTypeDateToConst     = "date_to"
	RuntimeEntityRoleTypeNumberFromConst = "number_from"
	RuntimeEntityRoleTypeNumberToConst   = "number_to"
	RuntimeEntityRoleTypeTimeFromConst   = "time_from"
	RuntimeEntityRoleTypeTimeToConst     = "time_to"
)

Constants associated with the RuntimeEntityRole.Type property. The relationship of the entity to the range.

View Source
const (
	RuntimeResponseGenericPreferenceButtonConst   = "button"
	RuntimeResponseGenericPreferenceDropdownConst = "dropdown"
)

Constants associated with the RuntimeResponseGeneric.Preference property. The preferred type of control to display.

View Source
const (
	RuntimeResponseGenericRuntimeResponseTypeOptionPreferenceButtonConst   = "button"
	RuntimeResponseGenericRuntimeResponseTypeOptionPreferenceDropdownConst = "dropdown"
)

Constants associated with the RuntimeResponseGenericRuntimeResponseTypeOption.Preference property. The preferred type of control to display.

View Source
const DefaultServiceName = "conversation"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://api.us-south.assistant.watson.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

Variables

This section is empty.

Functions

func GetServiceURLForRegion

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalAgentAvailabilityMessage

func UnmarshalAgentAvailabilityMessage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAgentAvailabilityMessage unmarshals an instance of AgentAvailabilityMessage from the specified map of raw messages.

func UnmarshalBulkClassifyOutput

func UnmarshalBulkClassifyOutput(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalBulkClassifyOutput unmarshals an instance of BulkClassifyOutput from the specified map of raw messages.

func UnmarshalBulkClassifyResponse

func UnmarshalBulkClassifyResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalBulkClassifyResponse unmarshals an instance of BulkClassifyResponse from the specified map of raw messages.

func UnmarshalBulkClassifyUtterance

func UnmarshalBulkClassifyUtterance(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalBulkClassifyUtterance unmarshals an instance of BulkClassifyUtterance from the specified map of raw messages.

func UnmarshalCaptureGroup

func UnmarshalCaptureGroup(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCaptureGroup unmarshals an instance of CaptureGroup from the specified map of raw messages.

func UnmarshalChannelTransferInfo

func UnmarshalChannelTransferInfo(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannelTransferInfo unmarshals an instance of ChannelTransferInfo from the specified map of raw messages.

func UnmarshalChannelTransferTarget

func UnmarshalChannelTransferTarget(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannelTransferTarget unmarshals an instance of ChannelTransferTarget from the specified map of raw messages.

func UnmarshalChannelTransferTargetChat

func UnmarshalChannelTransferTargetChat(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannelTransferTargetChat unmarshals an instance of ChannelTransferTargetChat from the specified map of raw messages.

func UnmarshalDialogLogMessage

func UnmarshalDialogLogMessage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDialogLogMessage unmarshals an instance of DialogLogMessage from the specified map of raw messages.

func UnmarshalDialogNodeAction

func UnmarshalDialogNodeAction(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDialogNodeAction unmarshals an instance of DialogNodeAction from the specified map of raw messages.

func UnmarshalDialogNodeOutputConnectToAgentTransferInfo

func UnmarshalDialogNodeOutputConnectToAgentTransferInfo(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDialogNodeOutputConnectToAgentTransferInfo unmarshals an instance of DialogNodeOutputConnectToAgentTransferInfo from the specified map of raw messages.

func UnmarshalDialogNodeOutputOptionsElement

func UnmarshalDialogNodeOutputOptionsElement(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDialogNodeOutputOptionsElement unmarshals an instance of DialogNodeOutputOptionsElement from the specified map of raw messages.

func UnmarshalDialogNodeOutputOptionsElementValue

func UnmarshalDialogNodeOutputOptionsElementValue(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDialogNodeOutputOptionsElementValue unmarshals an instance of DialogNodeOutputOptionsElementValue from the specified map of raw messages.

func UnmarshalDialogNodeVisited

func UnmarshalDialogNodeVisited(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDialogNodeVisited unmarshals an instance of DialogNodeVisited from the specified map of raw messages.

func UnmarshalDialogSuggestion

func UnmarshalDialogSuggestion(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDialogSuggestion unmarshals an instance of DialogSuggestion from the specified map of raw messages.

func UnmarshalDialogSuggestionValue

func UnmarshalDialogSuggestionValue(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDialogSuggestionValue unmarshals an instance of DialogSuggestionValue from the specified map of raw messages.

func UnmarshalLog

func UnmarshalLog(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalLog unmarshals an instance of Log from the specified map of raw messages.

func UnmarshalLogCollection

func UnmarshalLogCollection(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalLogCollection unmarshals an instance of LogCollection from the specified map of raw messages.

func UnmarshalLogMessageSource

func UnmarshalLogMessageSource(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalLogMessageSource unmarshals an instance of LogMessageSource from the specified map of raw messages.

func UnmarshalLogMessageSourceAction

func UnmarshalLogMessageSourceAction(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalLogMessageSourceAction unmarshals an instance of LogMessageSourceAction from the specified map of raw messages.

func UnmarshalLogMessageSourceDialogNode

func UnmarshalLogMessageSourceDialogNode(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalLogMessageSourceDialogNode unmarshals an instance of LogMessageSourceDialogNode from the specified map of raw messages.

func UnmarshalLogMessageSourceHandler

func UnmarshalLogMessageSourceHandler(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalLogMessageSourceHandler unmarshals an instance of LogMessageSourceHandler from the specified map of raw messages.

func UnmarshalLogMessageSourceStep

func UnmarshalLogMessageSourceStep(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalLogMessageSourceStep unmarshals an instance of LogMessageSourceStep from the specified map of raw messages.

func UnmarshalLogPagination

func UnmarshalLogPagination(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalLogPagination unmarshals an instance of LogPagination from the specified map of raw messages.

func UnmarshalMessageContext

func UnmarshalMessageContext(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageContext unmarshals an instance of MessageContext from the specified map of raw messages.

func UnmarshalMessageContextGlobal

func UnmarshalMessageContextGlobal(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageContextGlobal unmarshals an instance of MessageContextGlobal from the specified map of raw messages.

func UnmarshalMessageContextGlobalStateless

func UnmarshalMessageContextGlobalStateless(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageContextGlobalStateless unmarshals an instance of MessageContextGlobalStateless from the specified map of raw messages.

func UnmarshalMessageContextGlobalSystem

func UnmarshalMessageContextGlobalSystem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageContextGlobalSystem unmarshals an instance of MessageContextGlobalSystem from the specified map of raw messages.

func UnmarshalMessageContextSkill

func UnmarshalMessageContextSkill(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageContextSkill unmarshals an instance of MessageContextSkill from the specified map of raw messages.

func UnmarshalMessageContextSkillSystem

func UnmarshalMessageContextSkillSystem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageContextSkillSystem unmarshals an instance of MessageContextSkillSystem from the specified map of raw messages.

func UnmarshalMessageContextStateless

func UnmarshalMessageContextStateless(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageContextStateless unmarshals an instance of MessageContextStateless from the specified map of raw messages.

func UnmarshalMessageInput

func UnmarshalMessageInput(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageInput unmarshals an instance of MessageInput from the specified map of raw messages.

func UnmarshalMessageInputAttachment

func UnmarshalMessageInputAttachment(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageInputAttachment unmarshals an instance of MessageInputAttachment from the specified map of raw messages.

func UnmarshalMessageInputOptions

func UnmarshalMessageInputOptions(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageInputOptions unmarshals an instance of MessageInputOptions from the specified map of raw messages.

func UnmarshalMessageInputOptionsSpelling

func UnmarshalMessageInputOptionsSpelling(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageInputOptionsSpelling unmarshals an instance of MessageInputOptionsSpelling from the specified map of raw messages.

func UnmarshalMessageInputOptionsStateless

func UnmarshalMessageInputOptionsStateless(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageInputOptionsStateless unmarshals an instance of MessageInputOptionsStateless from the specified map of raw messages.

func UnmarshalMessageInputStateless

func UnmarshalMessageInputStateless(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageInputStateless unmarshals an instance of MessageInputStateless from the specified map of raw messages.

func UnmarshalMessageOutput

func UnmarshalMessageOutput(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageOutput unmarshals an instance of MessageOutput from the specified map of raw messages.

func UnmarshalMessageOutputDebug

func UnmarshalMessageOutputDebug(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageOutputDebug unmarshals an instance of MessageOutputDebug from the specified map of raw messages.

func UnmarshalMessageOutputSpelling

func UnmarshalMessageOutputSpelling(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageOutputSpelling unmarshals an instance of MessageOutputSpelling from the specified map of raw messages.

func UnmarshalMessageRequest

func UnmarshalMessageRequest(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageRequest unmarshals an instance of MessageRequest from the specified map of raw messages.

func UnmarshalMessageResponse

func UnmarshalMessageResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageResponse unmarshals an instance of MessageResponse from the specified map of raw messages.

func UnmarshalMessageResponseStateless

func UnmarshalMessageResponseStateless(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMessageResponseStateless unmarshals an instance of MessageResponseStateless from the specified map of raw messages.

func UnmarshalResponseGenericChannel

func UnmarshalResponseGenericChannel(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResponseGenericChannel unmarshals an instance of ResponseGenericChannel from the specified map of raw messages.

func UnmarshalRuntimeEntity

func UnmarshalRuntimeEntity(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeEntity unmarshals an instance of RuntimeEntity from the specified map of raw messages.

func UnmarshalRuntimeEntityAlternative

func UnmarshalRuntimeEntityAlternative(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeEntityAlternative unmarshals an instance of RuntimeEntityAlternative from the specified map of raw messages.

func UnmarshalRuntimeEntityInterpretation

func UnmarshalRuntimeEntityInterpretation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeEntityInterpretation unmarshals an instance of RuntimeEntityInterpretation from the specified map of raw messages.

func UnmarshalRuntimeEntityRole

func UnmarshalRuntimeEntityRole(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeEntityRole unmarshals an instance of RuntimeEntityRole from the specified map of raw messages.

func UnmarshalRuntimeIntent

func UnmarshalRuntimeIntent(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeIntent unmarshals an instance of RuntimeIntent from the specified map of raw messages.

func UnmarshalRuntimeResponseGeneric

func UnmarshalRuntimeResponseGeneric(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGeneric unmarshals an instance of RuntimeResponseGeneric from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeAudio

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeAudio(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeAudio unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeAudio from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeChannelTransfer

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeChannelTransfer(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeChannelTransfer unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeChannelTransfer from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeConnectToAgent

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeConnectToAgent(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeConnectToAgent unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeConnectToAgent from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeIframe

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeIframe(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeIframe unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeIframe from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeImage

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeImage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeImage unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeImage from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeOption

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeOption(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeOption unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeOption from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypePause

func UnmarshalRuntimeResponseGenericRuntimeResponseTypePause(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypePause unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypePause from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeSearch

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeSearch(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeSearch unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeSearch from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeSuggestion

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeSuggestion(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeSuggestion unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeSuggestion from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeText

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeText(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeText unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeText from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeUserDefined

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeUserDefined(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeUserDefined unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeUserDefined from the specified map of raw messages.

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeVideo

func UnmarshalRuntimeResponseGenericRuntimeResponseTypeVideo(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuntimeResponseGenericRuntimeResponseTypeVideo unmarshals an instance of RuntimeResponseGenericRuntimeResponseTypeVideo from the specified map of raw messages.

func UnmarshalSearchResult

func UnmarshalSearchResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSearchResult unmarshals an instance of SearchResult from the specified map of raw messages.

func UnmarshalSearchResultAnswer

func UnmarshalSearchResultAnswer(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSearchResultAnswer unmarshals an instance of SearchResultAnswer from the specified map of raw messages.

func UnmarshalSearchResultHighlight

func UnmarshalSearchResultHighlight(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSearchResultHighlight unmarshals an instance of SearchResultHighlight from the specified map of raw messages.

func UnmarshalSearchResultMetadata

func UnmarshalSearchResultMetadata(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSearchResultMetadata unmarshals an instance of SearchResultMetadata from the specified map of raw messages.

func UnmarshalSessionResponse

func UnmarshalSessionResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSessionResponse unmarshals an instance of SessionResponse from the specified map of raw messages.

Types

type AgentAvailabilityMessage

type AgentAvailabilityMessage struct {
	// The text of the message.
	Message *string `json:"message,omitempty"`
}

AgentAvailabilityMessage : AgentAvailabilityMessage struct

type AssistantV2

type AssistantV2 struct {
	Service *core.BaseService

	// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is
	// `2021-11-27`.
	Version *string
}

AssistantV2 : The IBM Watson™ Assistant service combines machine learning, natural language understanding, and an integrated dialog editor to create conversation flows between your apps and your users.

The Assistant v2 API provides runtime methods your client application can use to send user input to an assistant and receive a response.

API Version: 2.0 See: https://cloud.ibm.com/docs/assistant

func NewAssistantV2

func NewAssistantV2(options *AssistantV2Options) (service *AssistantV2, err error)

NewAssistantV2 : constructs an instance of AssistantV2 with passed in options.

func (*AssistantV2) BulkClassify

func (assistant *AssistantV2) BulkClassify(bulkClassifyOptions *BulkClassifyOptions) (result *BulkClassifyResponse, response *core.DetailedResponse, err error)

BulkClassify : Identify intents and entities in multiple user utterances Send multiple user inputs to a dialog skill in a single request and receive information about the intents and entities recognized in each input. This method is useful for testing and comparing the performance of different skills or skill versions.

This method is available only with Enterprise with Data Isolation plans.

func (*AssistantV2) BulkClassifyWithContext

func (assistant *AssistantV2) BulkClassifyWithContext(ctx context.Context, bulkClassifyOptions *BulkClassifyOptions) (result *BulkClassifyResponse, response *core.DetailedResponse, err error)

BulkClassifyWithContext is an alternate form of the BulkClassify method which supports a Context parameter

func (*AssistantV2) Clone

func (assistant *AssistantV2) Clone() *AssistantV2

Clone makes a copy of "assistant" suitable for processing requests.

func (*AssistantV2) CreateSession

func (assistant *AssistantV2) CreateSession(createSessionOptions *CreateSessionOptions) (result *SessionResponse, response *core.DetailedResponse, err error)

CreateSession : Create a session Create a new session. A session is used to send user input to a skill and receive responses. It also maintains the state of the conversation. A session persists until it is deleted, or until it times out because of inactivity. (For more information, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-settings).

func (*AssistantV2) CreateSessionWithContext

func (assistant *AssistantV2) CreateSessionWithContext(ctx context.Context, createSessionOptions *CreateSessionOptions) (result *SessionResponse, response *core.DetailedResponse, err error)

CreateSessionWithContext is an alternate form of the CreateSession method which supports a Context parameter

func (*AssistantV2) DeleteSession

func (assistant *AssistantV2) DeleteSession(deleteSessionOptions *DeleteSessionOptions) (response *core.DetailedResponse, err error)

DeleteSession : Delete session Deletes a session explicitly before it times out. (For more information about the session inactivity timeout, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-settings)).

func (*AssistantV2) DeleteSessionWithContext

func (assistant *AssistantV2) DeleteSessionWithContext(ctx context.Context, deleteSessionOptions *DeleteSessionOptions) (response *core.DetailedResponse, err error)

DeleteSessionWithContext is an alternate form of the DeleteSession method which supports a Context parameter

func (*AssistantV2) DeleteUserData

func (assistant *AssistantV2) DeleteUserData(deleteUserDataOptions *DeleteUserDataOptions) (response *core.DetailedResponse, err error)

DeleteUserData : Delete labeled data Deletes all data associated with a specified customer ID. The method has no effect if no data is associated with the customer ID.

You associate a customer ID with data by passing the `X-Watson-Metadata` header with a request that passes data. For more information about personal data and customer IDs, see [Information security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).

**Note:** This operation is intended only for deleting data associated with a single specific customer, not for deleting data associated with multiple customers or for any other purpose. For more information, see [Labeling and deleting data in Watson Assistant](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security-gdpr-wa).

func (*AssistantV2) DeleteUserDataWithContext

func (assistant *AssistantV2) DeleteUserDataWithContext(ctx context.Context, deleteUserDataOptions *DeleteUserDataOptions) (response *core.DetailedResponse, err error)

DeleteUserDataWithContext is an alternate form of the DeleteUserData method which supports a Context parameter

func (*AssistantV2) DisableRetries

func (assistant *AssistantV2) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*AssistantV2) DisableSSLVerification

func (assistant *AssistantV2) DisableSSLVerification()

DisableSSLVerification bypasses verification of the server's SSL certificate

func (*AssistantV2) EnableRetries

func (assistant *AssistantV2) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*AssistantV2) GetEnableGzipCompression

func (assistant *AssistantV2) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*AssistantV2) GetServiceURL

func (assistant *AssistantV2) GetServiceURL() string

GetServiceURL returns the service URL

func (*AssistantV2) ListLogs

func (assistant *AssistantV2) ListLogs(listLogsOptions *ListLogsOptions) (result *LogCollection, response *core.DetailedResponse, err error)

ListLogs : List log events for an assistant List the events from the log of an assistant.

This method requires Manager access, and is available only with Enterprise plans.

func (*AssistantV2) ListLogsWithContext

func (assistant *AssistantV2) ListLogsWithContext(ctx context.Context, listLogsOptions *ListLogsOptions) (result *LogCollection, response *core.DetailedResponse, err error)

ListLogsWithContext is an alternate form of the ListLogs method which supports a Context parameter

func (*AssistantV2) Message

func (assistant *AssistantV2) Message(messageOptions *MessageOptions) (result *MessageResponse, response *core.DetailedResponse, err error)

Message : Send user input to assistant (stateful) Send user input to an assistant and receive a response, with conversation state (including context data) stored by Watson Assistant for the duration of the session.

func (*AssistantV2) MessageStateless

func (assistant *AssistantV2) MessageStateless(messageStatelessOptions *MessageStatelessOptions) (result *MessageResponseStateless, response *core.DetailedResponse, err error)

MessageStateless : Send user input to assistant (stateless) Send user input to an assistant and receive a response, with conversation state (including context data) managed by your application.

func (*AssistantV2) MessageStatelessWithContext

func (assistant *AssistantV2) MessageStatelessWithContext(ctx context.Context, messageStatelessOptions *MessageStatelessOptions) (result *MessageResponseStateless, response *core.DetailedResponse, err error)

MessageStatelessWithContext is an alternate form of the MessageStateless method which supports a Context parameter

func (*AssistantV2) MessageWithContext

func (assistant *AssistantV2) MessageWithContext(ctx context.Context, messageOptions *MessageOptions) (result *MessageResponse, response *core.DetailedResponse, err error)

MessageWithContext is an alternate form of the Message method which supports a Context parameter

func (*AssistantV2) NewBulkClassifyOptions

func (*AssistantV2) NewBulkClassifyOptions(skillID string) *BulkClassifyOptions

NewBulkClassifyOptions : Instantiate BulkClassifyOptions

func (*AssistantV2) NewBulkClassifyUtterance

func (*AssistantV2) NewBulkClassifyUtterance(text string) (_model *BulkClassifyUtterance, err error)

NewBulkClassifyUtterance : Instantiate BulkClassifyUtterance (Generic Model Constructor)

func (*AssistantV2) NewCaptureGroup

func (*AssistantV2) NewCaptureGroup(group string) (_model *CaptureGroup, err error)

NewCaptureGroup : Instantiate CaptureGroup (Generic Model Constructor)

func (*AssistantV2) NewCreateSessionOptions

func (*AssistantV2) NewCreateSessionOptions(assistantID string) *CreateSessionOptions

NewCreateSessionOptions : Instantiate CreateSessionOptions

func (*AssistantV2) NewDeleteSessionOptions

func (*AssistantV2) NewDeleteSessionOptions(assistantID string, sessionID string) *DeleteSessionOptions

NewDeleteSessionOptions : Instantiate DeleteSessionOptions

func (*AssistantV2) NewDeleteUserDataOptions

func (*AssistantV2) NewDeleteUserDataOptions(customerID string) *DeleteUserDataOptions

NewDeleteUserDataOptions : Instantiate DeleteUserDataOptions

func (*AssistantV2) NewListLogsOptions

func (*AssistantV2) NewListLogsOptions(assistantID string) *ListLogsOptions

NewListLogsOptions : Instantiate ListLogsOptions

func (*AssistantV2) NewMessageInputAttachment

func (*AssistantV2) NewMessageInputAttachment(url string) (_model *MessageInputAttachment, err error)

NewMessageInputAttachment : Instantiate MessageInputAttachment (Generic Model Constructor)

func (*AssistantV2) NewMessageOptions

func (*AssistantV2) NewMessageOptions(assistantID string, sessionID string) *MessageOptions

NewMessageOptions : Instantiate MessageOptions

func (*AssistantV2) NewMessageStatelessOptions

func (*AssistantV2) NewMessageStatelessOptions(assistantID string) *MessageStatelessOptions

NewMessageStatelessOptions : Instantiate MessageStatelessOptions

func (*AssistantV2) NewRuntimeEntity

func (*AssistantV2) NewRuntimeEntity(entity string, value string) (_model *RuntimeEntity, err error)

NewRuntimeEntity : Instantiate RuntimeEntity (Generic Model Constructor)

func (*AssistantV2) NewRuntimeIntent

func (*AssistantV2) NewRuntimeIntent(intent string, confidence float64) (_model *RuntimeIntent, err error)

NewRuntimeIntent : Instantiate RuntimeIntent (Generic Model Constructor)

func (*AssistantV2) SetDefaultHeaders

func (assistant *AssistantV2) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*AssistantV2) SetEnableGzipCompression

func (assistant *AssistantV2) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*AssistantV2) SetServiceURL

func (assistant *AssistantV2) SetServiceURL(url string) error

SetServiceURL sets the service URL

type AssistantV2Options

type AssistantV2Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator

	// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is
	// `2021-11-27`.
	Version *string `validate:"required"`
}

AssistantV2Options : Service options

type BulkClassifyOptions

type BulkClassifyOptions struct {
	// Unique identifier of the skill. To find the skill ID in the Watson Assistant user interface, open the skill settings
	// and click **API Details**.
	SkillID *string `json:"skill_id" validate:"required,ne="`

	// An array of input utterances to classify.
	Input []BulkClassifyUtterance `json:"input,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

BulkClassifyOptions : The BulkClassify options.

func (*BulkClassifyOptions) SetHeaders

func (options *BulkClassifyOptions) SetHeaders(param map[string]string) *BulkClassifyOptions

SetHeaders : Allow user to set Headers

func (*BulkClassifyOptions) SetInput

func (_options *BulkClassifyOptions) SetInput(input []BulkClassifyUtterance) *BulkClassifyOptions

SetInput : Allow user to set Input

func (*BulkClassifyOptions) SetSkillID

func (_options *BulkClassifyOptions) SetSkillID(skillID string) *BulkClassifyOptions

SetSkillID : Allow user to set SkillID

type BulkClassifyOutput

type BulkClassifyOutput struct {
	// The user input utterance to classify.
	Input *BulkClassifyUtterance `json:"input,omitempty"`

	// An array of entities identified in the utterance.
	Entities []RuntimeEntity `json:"entities,omitempty"`

	// An array of intents recognized in the utterance.
	Intents []RuntimeIntent `json:"intents,omitempty"`
}

BulkClassifyOutput : BulkClassifyOutput struct

type BulkClassifyResponse

type BulkClassifyResponse struct {
	// An array of objects that contain classification information for the submitted input utterances.
	Output []BulkClassifyOutput `json:"output,omitempty"`
}

BulkClassifyResponse : BulkClassifyResponse struct

type BulkClassifyUtterance

type BulkClassifyUtterance struct {
	// The text of the input utterance.
	Text *string `json:"text" validate:"required"`
}

BulkClassifyUtterance : The user input utterance to classify.

type CaptureGroup

type CaptureGroup struct {
	// A recognized capture group for the entity.
	Group *string `json:"group" validate:"required"`

	// Zero-based character offsets that indicate where the entity value begins and ends in the input text.
	Location []int64 `json:"location,omitempty"`
}

CaptureGroup : CaptureGroup struct

type ChannelTransferInfo

type ChannelTransferInfo struct {
	// An object specifying target channels available for the transfer. Each property of this object represents an
	// available transfer target. Currently, the only supported property is **chat**, representing the web chat
	// integration.
	Target *ChannelTransferTarget `json:"target" validate:"required"`
}

ChannelTransferInfo : Information used by an integration to transfer the conversation to a different channel.

type ChannelTransferTarget

type ChannelTransferTarget struct {
	// Information for transferring to the web chat integration.
	Chat *ChannelTransferTargetChat `json:"chat,omitempty"`
}

ChannelTransferTarget : An object specifying target channels available for the transfer. Each property of this object represents an available transfer target. Currently, the only supported property is **chat**, representing the web chat integration.

type ChannelTransferTargetChat

type ChannelTransferTargetChat struct {
	// The URL of the target web chat.
	URL *string `json:"url,omitempty"`
}

ChannelTransferTargetChat : Information for transferring to the web chat integration.

type CreateSessionOptions

type CreateSessionOptions struct {
	// Unique identifier of the assistant. To find the assistant ID in the Watson Assistant user interface, open the
	// assistant settings and click **API Details**. For information about creating assistants, see the
	// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task).
	//
	// **Note:** Currently, the v2 API does not support creating assistants.
	AssistantID *string `json:"assistant_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateSessionOptions : The CreateSession options.

func (*CreateSessionOptions) SetAssistantID

func (_options *CreateSessionOptions) SetAssistantID(assistantID string) *CreateSessionOptions

SetAssistantID : Allow user to set AssistantID

func (*CreateSessionOptions) SetHeaders

func (options *CreateSessionOptions) SetHeaders(param map[string]string) *CreateSessionOptions

SetHeaders : Allow user to set Headers

type DeleteSessionOptions

type DeleteSessionOptions struct {
	// Unique identifier of the assistant. To find the assistant ID in the Watson Assistant user interface, open the
	// assistant settings and click **API Details**. For information about creating assistants, see the
	// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task).
	//
	// **Note:** Currently, the v2 API does not support creating assistants.
	AssistantID *string `json:"assistant_id" validate:"required,ne="`

	// Unique identifier of the session.
	SessionID *string `json:"session_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteSessionOptions : The DeleteSession options.

func (*DeleteSessionOptions) SetAssistantID

func (_options *DeleteSessionOptions) SetAssistantID(assistantID string) *DeleteSessionOptions

SetAssistantID : Allow user to set AssistantID

func (*DeleteSessionOptions) SetHeaders

func (options *DeleteSessionOptions) SetHeaders(param map[string]string) *DeleteSessionOptions

SetHeaders : Allow user to set Headers

func (*DeleteSessionOptions) SetSessionID

func (_options *DeleteSessionOptions) SetSessionID(sessionID string) *DeleteSessionOptions

SetSessionID : Allow user to set SessionID

type DeleteUserDataOptions

type DeleteUserDataOptions struct {
	// The customer ID for which all data is to be deleted.
	CustomerID *string `json:"customer_id" validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteUserDataOptions : The DeleteUserData options.

func (*DeleteUserDataOptions) SetCustomerID

func (_options *DeleteUserDataOptions) SetCustomerID(customerID string) *DeleteUserDataOptions

SetCustomerID : Allow user to set CustomerID

func (*DeleteUserDataOptions) SetHeaders

func (options *DeleteUserDataOptions) SetHeaders(param map[string]string) *DeleteUserDataOptions

SetHeaders : Allow user to set Headers

type DialogLogMessage

type DialogLogMessage struct {
	// The severity of the log message.
	Level *string `json:"level" validate:"required"`

	// The text of the log message.
	Message *string `json:"message" validate:"required"`

	// A code that indicates the category to which the error message belongs.
	Code *string `json:"code" validate:"required"`

	// An object that identifies the dialog element that generated the error message.
	Source LogMessageSourceIntf `json:"source,omitempty"`
}

DialogLogMessage : Dialog log message details.

type DialogNodeAction

type DialogNodeAction struct {
	// The name of the action.
	Name *string `json:"name" validate:"required"`

	// The type of action to invoke.
	Type *string `json:"type,omitempty"`

	// A map of key/value pairs to be provided to the action.
	Parameters map[string]interface{} `json:"parameters,omitempty"`

	// The location in the dialog context where the result of the action is stored.
	ResultVariable *string `json:"result_variable" validate:"required"`

	// The name of the context variable that the client application will use to pass in credentials for the action.
	Credentials *string `json:"credentials,omitempty"`
}

DialogNodeAction : DialogNodeAction struct

type DialogNodeOutputConnectToAgentTransferInfo

type DialogNodeOutputConnectToAgentTransferInfo struct {
	Target map[string]map[string]interface{} `json:"target,omitempty"`
}

DialogNodeOutputConnectToAgentTransferInfo : Routing or other contextual information to be used by target service desk systems.

type DialogNodeOutputOptionsElement

type DialogNodeOutputOptionsElement struct {
	// The user-facing label for the option.
	Label *string `json:"label" validate:"required"`

	// An object defining the message input to be sent to the assistant if the user selects the corresponding option.
	Value *DialogNodeOutputOptionsElementValue `json:"value" validate:"required"`
}

DialogNodeOutputOptionsElement : DialogNodeOutputOptionsElement struct

type DialogNodeOutputOptionsElementValue

type DialogNodeOutputOptionsElementValue struct {
	// An input object that includes the input text.
	Input *MessageInput `json:"input,omitempty"`
}

DialogNodeOutputOptionsElementValue : An object defining the message input to be sent to the assistant if the user selects the corresponding option.

type DialogNodeVisited

type DialogNodeVisited struct {
	// A dialog node that was triggered during processing of the input message.
	DialogNode *string `json:"dialog_node,omitempty"`

	// The title of the dialog node.
	Title *string `json:"title,omitempty"`

	// The conditions that trigger the dialog node.
	Conditions *string `json:"conditions,omitempty"`
}

DialogNodeVisited : An objects containing detailed diagnostic information about a dialog node that was triggered during processing of the input message.

type DialogSuggestion

type DialogSuggestion struct {
	// The user-facing label for the suggestion. This label is taken from the **title** or **user_label** property of the
	// corresponding dialog node, depending on the disambiguation options.
	Label *string `json:"label" validate:"required"`

	// An object defining the message input to be sent to the assistant if the user selects the corresponding
	// disambiguation option.
	Value *DialogSuggestionValue `json:"value" validate:"required"`

	// The dialog output that will be returned from the Watson Assistant service if the user selects the corresponding
	// option.
	Output map[string]interface{} `json:"output,omitempty"`
}

DialogSuggestion : DialogSuggestion struct

type DialogSuggestionValue

type DialogSuggestionValue struct {
	// An input object that includes the input text.
	Input *MessageInput `json:"input,omitempty"`
}

DialogSuggestionValue : An object defining the message input to be sent to the assistant if the user selects the corresponding disambiguation option.

type ListLogsOptions

type ListLogsOptions struct {
	// Unique identifier of the assistant. To find the assistant ID in the Watson Assistant user interface, open the
	// assistant settings and click **API Details**. For information about creating assistants, see the
	// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task).
	//
	// **Note:** Currently, the v2 API does not support creating assistants.
	AssistantID *string `json:"assistant_id" validate:"required,ne="`

	// How to sort the returned log events. You can sort by **request_timestamp**. To reverse the sort order, prefix the
	// parameter value with a minus sign (`-`).
	Sort *string `json:"sort,omitempty"`

	// A cacheable parameter that limits the results to those matching the specified filter. For more information, see the
	// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
	Filter *string `json:"filter,omitempty"`

	// The number of records to return in each page of results.
	PageLimit *int64 `json:"page_limit,omitempty"`

	// A token identifying the page of results to retrieve.
	Cursor *string `json:"cursor,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListLogsOptions : The ListLogs options.

func (*ListLogsOptions) SetAssistantID

func (_options *ListLogsOptions) SetAssistantID(assistantID string) *ListLogsOptions

SetAssistantID : Allow user to set AssistantID

func (*ListLogsOptions) SetCursor

func (_options *ListLogsOptions) SetCursor(cursor string) *ListLogsOptions

SetCursor : Allow user to set Cursor

func (*ListLogsOptions) SetFilter

func (_options *ListLogsOptions) SetFilter(filter string) *ListLogsOptions

SetFilter : Allow user to set Filter

func (*ListLogsOptions) SetHeaders

func (options *ListLogsOptions) SetHeaders(param map[string]string) *ListLogsOptions

SetHeaders : Allow user to set Headers

func (*ListLogsOptions) SetPageLimit

func (_options *ListLogsOptions) SetPageLimit(pageLimit int64) *ListLogsOptions

SetPageLimit : Allow user to set PageLimit

func (*ListLogsOptions) SetSort

func (_options *ListLogsOptions) SetSort(sort string) *ListLogsOptions

SetSort : Allow user to set Sort

type Log

type Log struct {
	// A unique identifier for the logged event.
	LogID *string `json:"log_id" validate:"required"`

	// A stateful message request formatted for the Watson Assistant service.
	Request *MessageRequest `json:"request" validate:"required"`

	// A response from the Watson Assistant service.
	Response *MessageResponse `json:"response" validate:"required"`

	// Unique identifier of the assistant.
	AssistantID *string `json:"assistant_id" validate:"required"`

	// The ID of the session the message was part of.
	SessionID *string `json:"session_id" validate:"required"`

	// The unique identifier of the skill that responded to the message.
	SkillID *string `json:"skill_id" validate:"required"`

	// The name of the snapshot (dialog skill version) that responded to the message (for example, `draft`).
	Snapshot *string `json:"snapshot" validate:"required"`

	// The timestamp for receipt of the message.
	RequestTimestamp *string `json:"request_timestamp" validate:"required"`

	// The timestamp for the system response to the message.
	ResponseTimestamp *string `json:"response_timestamp" validate:"required"`

	// The language of the assistant to which the message request was made.
	Language *string `json:"language" validate:"required"`

	// The customer ID specified for the message, if any.
	CustomerID *string `json:"customer_id,omitempty"`
}

Log : Log struct

type LogCollection

type LogCollection struct {
	// An array of objects describing log events.
	Logs []Log `json:"logs" validate:"required"`

	// The pagination data for the returned objects.
	Pagination *LogPagination `json:"pagination" validate:"required"`
}

LogCollection : LogCollection struct

type LogMessageSource

type LogMessageSource struct {
	// A string that indicates the type of dialog element that generated the error message.
	Type *string `json:"type,omitempty"`

	// The unique identifier of the dialog node that generated the error message.
	DialogNode *string `json:"dialog_node,omitempty"`

	// The unique identifier of the action that generated the error message.
	Action *string `json:"action,omitempty"`

	// The unique identifier of the step that generated the error message.
	Step *string `json:"step,omitempty"`

	// The unique identifier of the handler that generated the error message.
	Handler *string `json:"handler,omitempty"`
}

LogMessageSource : An object that identifies the dialog element that generated the error message. Models which "extend" this model: - LogMessageSourceDialogNode - LogMessageSourceAction - LogMessageSourceStep - LogMessageSourceHandler

type LogMessageSourceAction

type LogMessageSourceAction struct {
	// A string that indicates the type of dialog element that generated the error message.
	Type *string `json:"type" validate:"required"`

	// The unique identifier of the action that generated the error message.
	Action *string `json:"action" validate:"required"`
}

LogMessageSourceAction : An object that identifies the dialog element that generated the error message. This model "extends" LogMessageSource

type LogMessageSourceDialogNode

type LogMessageSourceDialogNode struct {
	// A string that indicates the type of dialog element that generated the error message.
	Type *string `json:"type" validate:"required"`

	// The unique identifier of the dialog node that generated the error message.
	DialogNode *string `json:"dialog_node" validate:"required"`
}

LogMessageSourceDialogNode : An object that identifies the dialog element that generated the error message. This model "extends" LogMessageSource

type LogMessageSourceHandler

type LogMessageSourceHandler struct {
	// A string that indicates the type of dialog element that generated the error message.
	Type *string `json:"type" validate:"required"`

	// The unique identifier of the action that generated the error message.
	Action *string `json:"action" validate:"required"`

	// The unique identifier of the step that generated the error message.
	Step *string `json:"step,omitempty"`

	// The unique identifier of the handler that generated the error message.
	Handler *string `json:"handler" validate:"required"`
}

LogMessageSourceHandler : An object that identifies the dialog element that generated the error message. This model "extends" LogMessageSource

type LogMessageSourceIntf

type LogMessageSourceIntf interface {
	// contains filtered or unexported methods
}

type LogMessageSourceStep

type LogMessageSourceStep struct {
	// A string that indicates the type of dialog element that generated the error message.
	Type *string `json:"type" validate:"required"`

	// The unique identifier of the action that generated the error message.
	Action *string `json:"action" validate:"required"`

	// The unique identifier of the step that generated the error message.
	Step *string `json:"step" validate:"required"`
}

LogMessageSourceStep : An object that identifies the dialog element that generated the error message. This model "extends" LogMessageSource

type LogPagination

type LogPagination struct {
	// The URL that will return the next page of results, if any.
	NextURL *string `json:"next_url,omitempty"`

	// Reserved for future use.
	Matched *int64 `json:"matched,omitempty"`

	// A token identifying the next page of results.
	NextCursor *string `json:"next_cursor,omitempty"`
}

LogPagination : The pagination data for the returned objects.

type MessageContext

type MessageContext struct {
	// Session context data that is shared by all skills used by the assistant.
	Global *MessageContextGlobal `json:"global,omitempty"`

	// Information specific to particular skills used by the assistant.
	//
	// **Note:** Currently, only a single child property is supported, containing variables that apply to the dialog skill
	// used by the assistant.
	Skills map[string]MessageContextSkill `json:"skills,omitempty"`

	// An object containing context data that is specific to particular integrations. For more information, see the
	// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrations).
	Integrations interface{} `json:"integrations,omitempty"`
}

MessageContext : MessageContext struct

type MessageContextGlobal

type MessageContextGlobal struct {
	// Built-in system properties that apply to all skills used by the assistant.
	System *MessageContextGlobalSystem `json:"system,omitempty"`

	// The session ID.
	SessionID *string `json:"session_id,omitempty"`
}

MessageContextGlobal : Session context data that is shared by all skills used by the assistant.

type MessageContextGlobalStateless

type MessageContextGlobalStateless struct {
	// Built-in system properties that apply to all skills used by the assistant.
	System *MessageContextGlobalSystem `json:"system,omitempty"`

	// The unique identifier of the session.
	SessionID *string `json:"session_id,omitempty"`
}

MessageContextGlobalStateless : Session context data that is shared by all skills used by the assistant.

type MessageContextGlobalSystem

type MessageContextGlobalSystem struct {
	// The user time zone. The assistant uses the time zone to correctly resolve relative time references.
	Timezone *string `json:"timezone,omitempty"`

	// A string value that identifies the user who is interacting with the assistant. The client must provide a unique
	// identifier for each individual end user who accesses the application. For user-based plans, this user ID is used to
	// identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters.
	// If no value is specified in the input, **user_id** is automatically set to the value of
	// **context.global.session_id**.
	//
	// **Note:** This property is the same as the **user_id** property at the root of the message body. If **user_id** is
	// specified in both locations in a message request, the value specified at the root is used.
	UserID *string `json:"user_id,omitempty"`

	// A counter that is automatically incremented with each turn of the conversation. A value of 1 indicates that this is
	// the the first turn of a new conversation, which can affect the behavior of some skills (for example, triggering the
	// start node of a dialog).
	TurnCount *int64 `json:"turn_count,omitempty"`

	// The language code for localization in the user input. The specified locale overrides the default for the assistant,
	// and is used for interpreting entity values in user input such as date values. For example, `04/03/2018` might be
	// interpreted either as April 3 or March 4, depending on the locale.
	//
	//  This property is included only if the new system entities are enabled for the skill.
	Locale *string `json:"locale,omitempty"`

	// The base time for interpreting any relative time mentions in the user input. The specified time overrides the
	// current server time, and is used to calculate times mentioned in relative terms such as `now` or `tomorrow`. This
	// can be useful for simulating past or future times for testing purposes, or when analyzing documents such as news
	// articles.
	//
	// This value must be a UTC time value formatted according to ISO 8601 (for example, `2021-06-26T12:00:00Z` for noon
	// UTC on 26 June 2021).
	//
	// This property is included only if the new system entities are enabled for the skill.
	ReferenceTime *string `json:"reference_time,omitempty"`

	// The time at which the session started. With the stateful `message` method, the start time is always present, and is
	// set by the service based on the time the session was created. With the stateless `message` method, the start time is
	// set by the service in the response to the first message, and should be returned as part of the context with each
	// subsequent message in the session.
	//
	// This value is a UTC time value formatted according to ISO 8601 (for example, `2021-06-26T12:00:00Z` for noon UTC on
	// 26 June 2021).
	SessionStartTime *string `json:"session_start_time,omitempty"`

	// An encoded string that represents the configuration state of the assistant at the beginning of the conversation. If
	// you are using the stateless `message` method, save this value and then send it in the context of the subsequent
	// message request to avoid disruptions if there are configuration changes during the conversation (such as a change to
	// a skill the assistant uses).
	State *string `json:"state,omitempty"`

	// For internal use only.
	SkipUserInput *bool `json:"skip_user_input,omitempty"`
}

MessageContextGlobalSystem : Built-in system properties that apply to all skills used by the assistant.

type MessageContextSkill

type MessageContextSkill struct {
	// Arbitrary variables that can be read and written by a particular skill.
	UserDefined map[string]interface{} `json:"user_defined,omitempty"`

	// System context data used by the skill.
	System *MessageContextSkillSystem `json:"system,omitempty"`
}

MessageContextSkill : Contains information specific to a particular skill used by the assistant. The property name must be the same as the name of the skill (for example, `main skill`).

type MessageContextSkillSystem

type MessageContextSkillSystem struct {
	// An encoded string that represents the current conversation state. By saving this value and then sending it in the
	// context of a subsequent message request, you can return to an earlier point in the conversation. If you are using
	// stateful sessions, you can also use a stored state value to restore a paused conversation whose session is expired.
	State *string `json:"state,omitempty"`
	// contains filtered or unexported fields
}

MessageContextSkillSystem : System context data used by the skill.

func (*MessageContextSkillSystem) GetProperties

func (o *MessageContextSkillSystem) GetProperties() map[string]interface{}

GetProperties allows the user to retrieve the map of arbitrary properties from an instance of MessageContextSkillSystem

func (*MessageContextSkillSystem) GetProperty

func (o *MessageContextSkillSystem) GetProperty(key string) interface{}

GetProperty allows the user to retrieve an arbitrary property from an instance of MessageContextSkillSystem

func (*MessageContextSkillSystem) MarshalJSON

func (o *MessageContextSkillSystem) MarshalJSON() (buffer []byte, err error)

MarshalJSON performs custom serialization for instances of MessageContextSkillSystem

func (*MessageContextSkillSystem) SetProperties

func (o *MessageContextSkillSystem) SetProperties(m map[string]interface{})

SetProperties allows the user to set a map of arbitrary properties on an instance of MessageContextSkillSystem

func (*MessageContextSkillSystem) SetProperty

func (o *MessageContextSkillSystem) SetProperty(key string, value interface{})

SetProperty allows the user to set an arbitrary property on an instance of MessageContextSkillSystem

type MessageContextStateless

type MessageContextStateless struct {
	// Session context data that is shared by all skills used by the assistant.
	Global *MessageContextGlobalStateless `json:"global,omitempty"`

	// Information specific to particular skills used by the assistant.
	//
	// **Note:** Currently, only a single child property is supported, containing variables that apply to the dialog skill
	// used by the assistant.
	Skills map[string]MessageContextSkill `json:"skills,omitempty"`

	// An object containing context data that is specific to particular integrations. For more information, see the
	// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrations).
	Integrations interface{} `json:"integrations,omitempty"`
}

MessageContextStateless : MessageContextStateless struct

type MessageInput

type MessageInput struct {
	// The type of the message:
	//
	// - `text`: The user input is processed normally by the assistant.
	// - `search`: Only search results are returned. (Any dialog or actions skill is bypassed.)
	//
	// **Note:** A `search` message results in an error if no search skill is configured for the assistant.
	MessageType *string `json:"message_type,omitempty"`

	// The text of the user input. This string cannot contain carriage return, newline, or tab characters.
	Text *string `json:"text,omitempty"`

	// Intents to use when evaluating the user input. Include intents from the previous response to continue using those
	// intents rather than trying to recognize intents in the new input.
	Intents []RuntimeIntent `json:"intents,omitempty"`

	// Entities to use when evaluating the message. Include entities from the previous response to continue using those
	// entities rather than detecting entities in the new input.
	Entities []RuntimeEntity `json:"entities,omitempty"`

	// For internal use only.
	SuggestionID *string `json:"suggestion_id,omitempty"`

	// An array of multimedia attachments to be sent with the message.
	//
	// **Note:** Attachments are not processed by the assistant itself, but can be sent to external services by webhooks.
	Attachments []MessageInputAttachment `json:"attachments,omitempty"`

	// Optional properties that control how the assistant responds.
	Options *MessageInputOptions `json:"options,omitempty"`
}

MessageInput : An input object that includes the input text.

type MessageInputAttachment

type MessageInputAttachment struct {
	// The URL of the media file.
	URL *string `json:"url" validate:"required"`

	// The media content type (such as a MIME type) of the attachment.
	MediaType *string `json:"media_type,omitempty"`
}

MessageInputAttachment : A reference to a media file to be sent as an attachment with the message.

type MessageInputOptions

type MessageInputOptions struct {
	// Whether to restart dialog processing at the root of the dialog, regardless of any previously visited nodes.
	// **Note:** This does not affect `turn_count` or any other context variables.
	Restart *bool `json:"restart,omitempty"`

	// Whether to return more than one intent. Set to `true` to return all matching intents.
	AlternateIntents *bool `json:"alternate_intents,omitempty"`

	// Spelling correction options for the message. Any options specified on an individual message override the settings
	// configured for the skill.
	Spelling *MessageInputOptionsSpelling `json:"spelling,omitempty"`

	// Whether to return additional diagnostic information. Set to `true` to return additional information in the
	// `output.debug` property. If you also specify **return_context**=`true`, the returned skill context includes the
	// `system.state` property.
	Debug *bool `json:"debug,omitempty"`

	// Whether to return session context with the response. If you specify `true`, the response includes the `context`
	// property. If you also specify **debug**=`true`, the returned skill context includes the `system.state` property.
	ReturnContext *bool `json:"return_context,omitempty"`

	// Whether to return session context, including full conversation state. If you specify `true`, the response includes
	// the `context` property, and the skill context includes the `system.state` property.
	//
	// **Note:** If **export**=`true`, the context is returned regardless of the value of **return_context**.
	Export *bool `json:"export,omitempty"`
}

MessageInputOptions : Optional properties that control how the assistant responds.

type MessageInputOptionsSpelling

type MessageInputOptionsSpelling struct {
	// Whether to use spelling correction when processing the input. If spelling correction is used and **auto_correct** is
	// `true`, any spelling corrections are automatically applied to the user input. If **auto_correct** is `false`, any
	// suggested corrections are returned in the **output.spelling** property.
	//
	// This property overrides the value of the **spelling_suggestions** property in the workspace settings for the skill.
	Suggestions *bool `json:"suggestions,omitempty"`

	// Whether to use autocorrection when processing the input. If this property is `true`, any corrections are
	// automatically applied to the user input, and the original text is returned in the **output.spelling** property of
	// the message response. This property overrides the value of the **spelling_auto_correct** property in the workspace
	// settings for the skill.
	AutoCorrect *bool `json:"auto_correct,omitempty"`
}

MessageInputOptionsSpelling : Spelling correction options for the message. Any options specified on an individual message override the settings configured for the skill.

type MessageInputOptionsStateless

type MessageInputOptionsStateless struct {
	// Whether to restart dialog processing at the root of the dialog, regardless of any previously visited nodes.
	// **Note:** This does not affect `turn_count` or any other context variables.
	Restart *bool `json:"restart,omitempty"`

	// Whether to return more than one intent. Set to `true` to return all matching intents.
	AlternateIntents *bool `json:"alternate_intents,omitempty"`

	// Spelling correction options for the message. Any options specified on an individual message override the settings
	// configured for the skill.
	Spelling *MessageInputOptionsSpelling `json:"spelling,omitempty"`

	// Whether to return additional diagnostic information. Set to `true` to return additional information in the
	// `output.debug` property.
	Debug *bool `json:"debug,omitempty"`
}

MessageInputOptionsStateless : Optional properties that control how the assistant responds.

type MessageInputStateless

type MessageInputStateless struct {
	// The type of the message:
	//
	// - `text`: The user input is processed normally by the assistant.
	// - `search`: Only search results are returned. (Any dialog or actions skill is bypassed.)
	//
	// **Note:** A `search` message results in an error if no search skill is configured for the assistant.
	MessageType *string `json:"message_type,omitempty"`

	// The text of the user input. This string cannot contain carriage return, newline, or tab characters.
	Text *string `json:"text,omitempty"`

	// Intents to use when evaluating the user input. Include intents from the previous response to continue using those
	// intents rather than trying to recognize intents in the new input.
	Intents []RuntimeIntent `json:"intents,omitempty"`

	// Entities to use when evaluating the message. Include entities from the previous response to continue using those
	// entities rather than detecting entities in the new input.
	Entities []RuntimeEntity `json:"entities,omitempty"`

	// For internal use only.
	SuggestionID *string `json:"suggestion_id,omitempty"`

	// An array of multimedia attachments to be sent with the message.
	//
	// **Note:** Attachments are not processed by the assistant itself, but can be sent to external services by webhooks.
	Attachments []MessageInputAttachment `json:"attachments,omitempty"`

	// Optional properties that control how the assistant responds.
	Options *MessageInputOptionsStateless `json:"options,omitempty"`
}

MessageInputStateless : An input object that includes the input text.

type MessageOptions

type MessageOptions struct {
	// Unique identifier of the assistant. To find the assistant ID in the Watson Assistant user interface, open the
	// assistant settings and click **API Details**. For information about creating assistants, see the
	// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task).
	//
	// **Note:** Currently, the v2 API does not support creating assistants.
	AssistantID *string `json:"assistant_id" validate:"required,ne="`

	// Unique identifier of the session.
	SessionID *string `json:"session_id" validate:"required,ne="`

	// An input object that includes the input text.
	Input *MessageInput `json:"input,omitempty"`

	// Context data for the conversation. You can use this property to set or modify context variables, which can also be
	// accessed by dialog nodes. The context is stored by the assistant on a per-session basis.
	//
	// **Note:** The total size of the context data stored for a stateful session cannot exceed 100KB.
	Context *MessageContext `json:"context,omitempty"`

	// A string value that identifies the user who is interacting with the assistant. The client must provide a unique
	// identifier for each individual end user who accesses the application. For user-based plans, this user ID is used to
	// identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters.
	// If no value is specified in the input, **user_id** is automatically set to the value of
	// **context.global.session_id**.
	//
	// **Note:** This property is the same as the **user_id** property in the global system context. If **user_id** is
	// specified in both locations, the value specified at the root is used.
	UserID *string `json:"user_id,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

MessageOptions : The Message options.

func (*MessageOptions) SetAssistantID

func (_options *MessageOptions) SetAssistantID(assistantID string) *MessageOptions

SetAssistantID : Allow user to set AssistantID

func (*MessageOptions) SetContext

func (_options *MessageOptions) SetContext(context *MessageContext) *MessageOptions

SetContext : Allow user to set Context

func (*MessageOptions) SetHeaders

func (options *MessageOptions) SetHeaders(param map[string]string) *MessageOptions

SetHeaders : Allow user to set Headers

func (*MessageOptions) SetInput

func (_options *MessageOptions) SetInput(input *MessageInput) *MessageOptions

SetInput : Allow user to set Input

func (*MessageOptions) SetSessionID

func (_options *MessageOptions) SetSessionID(sessionID string) *MessageOptions

SetSessionID : Allow user to set SessionID

func (*MessageOptions) SetUserID

func (_options *MessageOptions) SetUserID(userID string) *MessageOptions

SetUserID : Allow user to set UserID

type MessageOutput

type MessageOutput struct {
	// Output intended for any channel. It is the responsibility of the client application to implement the supported
	// response types.
	Generic []RuntimeResponseGenericIntf `json:"generic,omitempty"`

	// An array of intents recognized in the user input, sorted in descending order of confidence.
	Intents []RuntimeIntent `json:"intents,omitempty"`

	// An array of entities identified in the user input.
	Entities []RuntimeEntity `json:"entities,omitempty"`

	// An array of objects describing any actions requested by the dialog node.
	Actions []DialogNodeAction `json:"actions,omitempty"`

	// Additional detailed information about a message response and how it was generated.
	Debug *MessageOutputDebug `json:"debug,omitempty"`

	// An object containing any custom properties included in the response. This object includes any arbitrary properties
	// defined in the dialog JSON editor as part of the dialog node output.
	UserDefined map[string]interface{} `json:"user_defined,omitempty"`

	// Properties describing any spelling corrections in the user input that was received.
	Spelling *MessageOutputSpelling `json:"spelling,omitempty"`
}

MessageOutput : Assistant output to be rendered or processed by the client.

type MessageOutputDebug

type MessageOutputDebug struct {
	// An array of objects containing detailed diagnostic information about dialog nodes that were triggered during
	// processing of the input message.
	NodesVisited []DialogNodeVisited `json:"nodes_visited,omitempty"`

	// An array of up to 50 messages logged with the request.
	LogMessages []DialogLogMessage `json:"log_messages,omitempty"`

	// Assistant sets this to true when this message response concludes or interrupts a dialog.
	BranchExited *bool `json:"branch_exited,omitempty"`

	// When `branch_exited` is set to `true` by the assistant, the `branch_exited_reason` specifies whether the dialog
	// completed by itself or got interrupted.
	BranchExitedReason *string `json:"branch_exited_reason,omitempty"`
}

MessageOutputDebug : Additional detailed information about a message response and how it was generated.

type MessageOutputSpelling

type MessageOutputSpelling struct {
	// The user input text that was used to generate the response. If spelling autocorrection is enabled, this text
	// reflects any spelling corrections that were applied.
	Text *string `json:"text,omitempty"`

	// The original user input text. This property is returned only if autocorrection is enabled and the user input was
	// corrected.
	OriginalText *string `json:"original_text,omitempty"`

	// Any suggested corrections of the input text. This property is returned only if spelling correction is enabled and
	// autocorrection is disabled.
	SuggestedText *string `json:"suggested_text,omitempty"`
}

MessageOutputSpelling : Properties describing any spelling corrections in the user input that was received.

type MessageRequest

type MessageRequest struct {
	// An input object that includes the input text.
	Input *MessageInput `json:"input,omitempty"`

	// Context data for the conversation. You can use this property to set or modify context variables, which can also be
	// accessed by dialog nodes. The context is stored by the assistant on a per-session basis.
	//
	// **Note:** The total size of the context data stored for a stateful session cannot exceed 100KB.
	Context *MessageContext `json:"context,omitempty"`

	// A string value that identifies the user who is interacting with the assistant. The client must provide a unique
	// identifier for each individual end user who accesses the application. For user-based plans, this user ID is used to
	// identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters.
	// If no value is specified in the input, **user_id** is automatically set to the value of
	// **context.global.session_id**.
	//
	// **Note:** This property is the same as the **user_id** property in the global system context. If **user_id** is
	// specified in both locations, the value specified at the root is used.
	UserID *string `json:"user_id,omitempty"`
}

MessageRequest : A stateful message request formatted for the Watson Assistant service.

type MessageResponse

type MessageResponse struct {
	// Assistant output to be rendered or processed by the client.
	Output *MessageOutput `json:"output" validate:"required"`

	// Context data for the conversation. You can use this property to access context variables. The context is stored by
	// the assistant on a per-session basis.
	//
	// **Note:** The context is included in message responses only if **return_context**=`true` in the message request.
	// Full context is always included in logs.
	Context *MessageContext `json:"context,omitempty"`

	// A string value that identifies the user who is interacting with the assistant. The client must provide a unique
	// identifier for each individual end user who accesses the application. For user-based plans, this user ID is used to
	// identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters.
	// If no value is specified in the input, **user_id** is automatically set to the value of
	// **context.global.session_id**.
	//
	// **Note:** This property is the same as the **user_id** property in the global system context.
	UserID *string `json:"user_id" validate:"required"`
}

MessageResponse : A response from the Watson Assistant service.

type MessageResponseStateless

type MessageResponseStateless struct {
	// Assistant output to be rendered or processed by the client.
	Output *MessageOutput `json:"output" validate:"required"`

	// Context data for the conversation. You can use this property to access context variables. The context is not stored
	// by the assistant; to maintain session state, include the context from the response in the next message.
	Context *MessageContextStateless `json:"context" validate:"required"`

	// A string value that identifies the user who is interacting with the assistant. The client must provide a unique
	// identifier for each individual end user who accesses the application. For user-based plans, this user ID is used to
	// identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters.
	// If no value is specified in the input, **user_id** is automatically set to the value of
	// **context.global.session_id**.
	//
	// **Note:** This property is the same as the **user_id** property in the global system context.
	UserID *string `json:"user_id,omitempty"`
}

MessageResponseStateless : A stateless response from the Watson Assistant service.

type MessageStatelessOptions

type MessageStatelessOptions struct {
	// Unique identifier of the assistant. To find the assistant ID in the Watson Assistant user interface, open the
	// assistant settings and click **API Details**. For information about creating assistants, see the
	// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task).
	//
	// **Note:** Currently, the v2 API does not support creating assistants.
	AssistantID *string `json:"assistant_id" validate:"required,ne="`

	// An input object that includes the input text.
	Input *MessageInputStateless `json:"input,omitempty"`

	// Context data for the conversation. You can use this property to set or modify context variables, which can also be
	// accessed by dialog nodes. The context is not stored by the assistant. To maintain session state, include the context
	// from the previous response.
	//
	// **Note:** The total size of the context data for a stateless session cannot exceed 250KB.
	Context *MessageContextStateless `json:"context,omitempty"`

	// A string value that identifies the user who is interacting with the assistant. The client must provide a unique
	// identifier for each individual end user who accesses the application. For user-based plans, this user ID is used to
	// identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters.
	// If no value is specified in the input, **user_id** is automatically set to the value of
	// **context.global.session_id**.
	//
	// **Note:** This property is the same as the **user_id** property in the global system context. If **user_id** is
	// specified in both locations in a message request, the value specified at the root is used.
	UserID *string `json:"user_id,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

MessageStatelessOptions : The MessageStateless options.

func (*MessageStatelessOptions) SetAssistantID

func (_options *MessageStatelessOptions) SetAssistantID(assistantID string) *MessageStatelessOptions

SetAssistantID : Allow user to set AssistantID

func (*MessageStatelessOptions) SetContext

SetContext : Allow user to set Context

func (*MessageStatelessOptions) SetHeaders

func (options *MessageStatelessOptions) SetHeaders(param map[string]string) *MessageStatelessOptions

SetHeaders : Allow user to set Headers

func (*MessageStatelessOptions) SetInput

SetInput : Allow user to set Input

func (*MessageStatelessOptions) SetUserID

func (_options *MessageStatelessOptions) SetUserID(userID string) *MessageStatelessOptions

SetUserID : Allow user to set UserID

type ResponseGenericChannel

type ResponseGenericChannel struct {
	// A channel for which the response is intended.
	Channel *string `json:"channel,omitempty"`
}

ResponseGenericChannel : ResponseGenericChannel struct

type RuntimeEntity

type RuntimeEntity struct {
	// An entity detected in the input.
	Entity *string `json:"entity" validate:"required"`

	// An array of zero-based character offsets that indicate where the detected entity values begin and end in the input
	// text.
	Location []int64 `json:"location,omitempty"`

	// The term in the input text that was recognized as an entity value.
	Value *string `json:"value" validate:"required"`

	// A decimal percentage that represents Watson's confidence in the recognized entity.
	Confidence *float64 `json:"confidence,omitempty"`

	// The recognized capture groups for the entity, as defined by the entity pattern.
	Groups []CaptureGroup `json:"groups,omitempty"`

	// An object containing detailed information about the entity recognized in the user input. This property is included
	// only if the new system entities are enabled for the skill.
	//
	// For more information about how the new system entities are interpreted, see the
	// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-beta-system-entities).
	Interpretation *RuntimeEntityInterpretation `json:"interpretation,omitempty"`

	// An array of possible alternative values that the user might have intended instead of the value returned in the
	// **value** property. This property is returned only for `@sys-time` and `@sys-date` entities when the user's input is
	// ambiguous.
	//
	// This property is included only if the new system entities are enabled for the skill.
	Alternatives []RuntimeEntityAlternative `json:"alternatives,omitempty"`

	// An object describing the role played by a system entity that is specifies the beginning or end of a range recognized
	// in the user input. This property is included only if the new system entities are enabled for the skill.
	Role *RuntimeEntityRole `json:"role,omitempty"`
}

RuntimeEntity : The entity value that was recognized in the user input.

type RuntimeEntityAlternative

type RuntimeEntityAlternative struct {
	// The entity value that was recognized in the user input.
	Value *string `json:"value,omitempty"`

	// A decimal percentage that represents Watson's confidence in the recognized entity.
	Confidence *float64 `json:"confidence,omitempty"`
}

RuntimeEntityAlternative : An alternative value for the recognized entity.

type RuntimeEntityInterpretation

type RuntimeEntityInterpretation struct {
	// The calendar used to represent a recognized date (for example, `Gregorian`).
	CalendarType *string `json:"calendar_type,omitempty"`

	// A unique identifier used to associate a recognized time and date. If the user input contains a date and time that
	// are mentioned together (for example, `Today at 5`, the same **datetime_link** value is returned for both the
	// `@sys-date` and `@sys-time` entities).
	DatetimeLink *string `json:"datetime_link,omitempty"`

	// A locale-specific holiday name (such as `thanksgiving` or `christmas`). This property is included when a `@sys-date`
	// entity is recognized based on a holiday name in the user input.
	Festival *string `json:"festival,omitempty"`

	// The precision or duration of a time range specified by a recognized `@sys-time` or `@sys-date` entity.
	Granularity *string `json:"granularity,omitempty"`

	// A unique identifier used to associate multiple recognized `@sys-date`, `@sys-time`, or `@sys-number` entities that
	// are recognized as a range of values in the user's input (for example, `from July 4 until July 14` or `from 20 to
	// 25`).
	RangeLink *string `json:"range_link,omitempty"`

	// The word in the user input that indicates that a `sys-date` or `sys-time` entity is part of an implied range where
	// only one date or time is specified (for example, `since` or `until`).
	RangeModifier *string `json:"range_modifier,omitempty"`

	// A recognized mention of a relative day, represented numerically as an offset from the current date (for example,
	// `-1` for `yesterday` or `10` for `in ten days`).
	RelativeDay *float64 `json:"relative_day,omitempty"`

	// A recognized mention of a relative month, represented numerically as an offset from the current month (for example,
	// `1` for `next month` or `-3` for `three months ago`).
	RelativeMonth *float64 `json:"relative_month,omitempty"`

	// A recognized mention of a relative week, represented numerically as an offset from the current week (for example,
	// `2` for `in two weeks` or `-1` for `last week).
	RelativeWeek *float64 `json:"relative_week,omitempty"`

	// A recognized mention of a relative date range for a weekend, represented numerically as an offset from the current
	// weekend (for example, `0` for `this weekend` or `-1` for `last weekend`).
	RelativeWeekend *float64 `json:"relative_weekend,omitempty"`

	// A recognized mention of a relative year, represented numerically as an offset from the current year (for example,
	// `1` for `next year` or `-5` for `five years ago`).
	RelativeYear *float64 `json:"relative_year,omitempty"`

	// A recognized mention of a specific date, represented numerically as the date within the month (for example, `30` for
	// `June 30`.).
	SpecificDay *float64 `json:"specific_day,omitempty"`

	// A recognized mention of a specific day of the week as a lowercase string (for example, `monday`).
	SpecificDayOfWeek *string `json:"specific_day_of_week,omitempty"`

	// A recognized mention of a specific month, represented numerically (for example, `7` for `July`).
	SpecificMonth *float64 `json:"specific_month,omitempty"`

	// A recognized mention of a specific quarter, represented numerically (for example, `3` for `the third quarter`).
	SpecificQuarter *float64 `json:"specific_quarter,omitempty"`

	// A recognized mention of a specific year (for example, `2016`).
	SpecificYear *float64 `json:"specific_year,omitempty"`

	// A recognized numeric value, represented as an integer or double.
	NumericValue *float64 `json:"numeric_value,omitempty"`

	// The type of numeric value recognized in the user input (`integer` or `rational`).
	Subtype *string `json:"subtype,omitempty"`

	// A recognized term for a time that was mentioned as a part of the day in the user's input (for example, `morning` or
	// `afternoon`).
	PartOfDay *string `json:"part_of_day,omitempty"`

	// A recognized mention of a relative hour, represented numerically as an offset from the current hour (for example,
	// `3` for `in three hours` or `-1` for `an hour ago`).
	RelativeHour *float64 `json:"relative_hour,omitempty"`

	// A recognized mention of a relative time, represented numerically as an offset in minutes from the current time (for
	// example, `5` for `in five minutes` or `-15` for `fifteen minutes ago`).
	RelativeMinute *float64 `json:"relative_minute,omitempty"`

	// A recognized mention of a relative time, represented numerically as an offset in seconds from the current time (for
	// example, `10` for `in ten seconds` or `-30` for `thirty seconds ago`).
	RelativeSecond *float64 `json:"relative_second,omitempty"`

	// A recognized specific hour mentioned as part of a time value (for example, `10` for `10:15 AM`.).
	SpecificHour *float64 `json:"specific_hour,omitempty"`

	// A recognized specific minute mentioned as part of a time value (for example, `15` for `10:15 AM`.).
	SpecificMinute *float64 `json:"specific_minute,omitempty"`

	// A recognized specific second mentioned as part of a time value (for example, `30` for `10:15:30 AM`.).
	SpecificSecond *float64 `json:"specific_second,omitempty"`

	// A recognized time zone mentioned as part of a time value (for example, `EST`).
	Timezone *string `json:"timezone,omitempty"`
}

RuntimeEntityInterpretation : RuntimeEntityInterpretation struct

type RuntimeEntityRole

type RuntimeEntityRole struct {
	// The relationship of the entity to the range.
	Type *string `json:"type,omitempty"`
}

RuntimeEntityRole : An object describing the role played by a system entity that is specifies the beginning or end of a range recognized in the user input. This property is included only if the new system entities are enabled for the skill.

type RuntimeIntent

type RuntimeIntent struct {
	// The name of the recognized intent.
	Intent *string `json:"intent" validate:"required"`

	// A decimal percentage that represents Watson's confidence in the intent.
	Confidence *float64 `json:"confidence" validate:"required"`
}

RuntimeIntent : An intent identified in the user input.

type RuntimeResponseGeneric

type RuntimeResponseGeneric struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type,omitempty"`

	// The text of the response.
	Text *string `json:"text,omitempty"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`

	// How long to pause, in milliseconds.
	Time *int64 `json:"time,omitempty"`

	// Whether to send a "user is typing" event during the pause.
	Typing *bool `json:"typing,omitempty"`

	// The `https:` URL of the image.
	Source *string `json:"source,omitempty"`

	// The title to show before the response.
	Title *string `json:"title,omitempty"`

	// The description to show with the the response.
	Description *string `json:"description,omitempty"`

	// Descriptive text that can be used for screen readers or other situations where the image cannot be seen.
	AltText *string `json:"alt_text,omitempty"`

	// The preferred type of control to display.
	Preference *string `json:"preference,omitempty"`

	// An array of objects describing the options from which the user can choose.
	Options []DialogNodeOutputOptionsElement `json:"options,omitempty"`

	// A message to be sent to the human agent who will be taking over the conversation.
	MessageToHumanAgent *string `json:"message_to_human_agent,omitempty"`

	// An optional message to be displayed to the user to indicate that the conversation will be transferred to the next
	// available agent.
	AgentAvailable *AgentAvailabilityMessage `json:"agent_available,omitempty"`

	// An optional message to be displayed to the user to indicate that no online agent is available to take over the
	// conversation.
	AgentUnavailable *AgentAvailabilityMessage `json:"agent_unavailable,omitempty"`

	// Routing or other contextual information to be used by target service desk systems.
	TransferInfo *DialogNodeOutputConnectToAgentTransferInfo `json:"transfer_info,omitempty"`

	// A label identifying the topic of the conversation, derived from the **title** property of the relevant node or the
	// **topic** property of the dialog node response.
	Topic *string `json:"topic,omitempty"`

	// An array of objects describing the possible matching dialog nodes from which the user can choose.
	Suggestions []DialogSuggestion `json:"suggestions,omitempty"`

	// The message to display to the user when initiating a channel transfer.
	MessageToUser *string `json:"message_to_user,omitempty"`

	// The title or introductory text to show before the response. This text is defined in the search skill configuration.
	Header *string `json:"header,omitempty"`

	// An array of objects that contains the search results to be displayed in the initial response to the user.
	PrimaryResults []SearchResult `json:"primary_results,omitempty"`

	// An array of objects that contains additional search results that can be displayed to the user upon request.
	AdditionalResults []SearchResult `json:"additional_results,omitempty"`

	// An object containing any properties for the user-defined response type.
	UserDefined map[string]interface{} `json:"user_defined,omitempty"`

	// For internal use only.
	ChannelOptions interface{} `json:"channel_options,omitempty"`

	// The URL of an image that shows a preview of the embedded content.
	ImageURL *string `json:"image_url,omitempty"`
}

RuntimeResponseGeneric : RuntimeResponseGeneric struct Models which "extend" this model: - RuntimeResponseGenericRuntimeResponseTypeText - RuntimeResponseGenericRuntimeResponseTypePause - RuntimeResponseGenericRuntimeResponseTypeImage - RuntimeResponseGenericRuntimeResponseTypeOption - RuntimeResponseGenericRuntimeResponseTypeConnectToAgent - RuntimeResponseGenericRuntimeResponseTypeSuggestion - RuntimeResponseGenericRuntimeResponseTypeChannelTransfer - RuntimeResponseGenericRuntimeResponseTypeSearch - RuntimeResponseGenericRuntimeResponseTypeUserDefined - RuntimeResponseGenericRuntimeResponseTypeVideo - RuntimeResponseGenericRuntimeResponseTypeAudio - RuntimeResponseGenericRuntimeResponseTypeIframe

type RuntimeResponseGenericIntf

type RuntimeResponseGenericIntf interface {
	// contains filtered or unexported methods
}

type RuntimeResponseGenericRuntimeResponseTypeAudio

type RuntimeResponseGenericRuntimeResponseTypeAudio struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// The `https:` URL of the audio clip.
	Source *string `json:"source" validate:"required"`

	// The title or introductory text to show before the response.
	Title *string `json:"title,omitempty"`

	// The description to show with the the response.
	Description *string `json:"description,omitempty"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`

	// For internal use only.
	ChannelOptions interface{} `json:"channel_options,omitempty"`

	// Descriptive text that can be used for screen readers or other situations where the audio player cannot be seen.
	AltText *string `json:"alt_text,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeAudio : RuntimeResponseGenericRuntimeResponseTypeAudio struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypeChannelTransfer

type RuntimeResponseGenericRuntimeResponseTypeChannelTransfer struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// The message to display to the user when initiating a channel transfer.
	MessageToUser *string `json:"message_to_user" validate:"required"`

	// Information used by an integration to transfer the conversation to a different channel.
	TransferInfo *ChannelTransferInfo `json:"transfer_info" validate:"required"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeChannelTransfer : RuntimeResponseGenericRuntimeResponseTypeChannelTransfer struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypeConnectToAgent

type RuntimeResponseGenericRuntimeResponseTypeConnectToAgent struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// A message to be sent to the human agent who will be taking over the conversation.
	MessageToHumanAgent *string `json:"message_to_human_agent,omitempty"`

	// An optional message to be displayed to the user to indicate that the conversation will be transferred to the next
	// available agent.
	AgentAvailable *AgentAvailabilityMessage `json:"agent_available,omitempty"`

	// An optional message to be displayed to the user to indicate that no online agent is available to take over the
	// conversation.
	AgentUnavailable *AgentAvailabilityMessage `json:"agent_unavailable,omitempty"`

	// Routing or other contextual information to be used by target service desk systems.
	TransferInfo *DialogNodeOutputConnectToAgentTransferInfo `json:"transfer_info,omitempty"`

	// A label identifying the topic of the conversation, derived from the **title** property of the relevant node or the
	// **topic** property of the dialog node response.
	Topic *string `json:"topic,omitempty"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeConnectToAgent : RuntimeResponseGenericRuntimeResponseTypeConnectToAgent struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypeIframe

type RuntimeResponseGenericRuntimeResponseTypeIframe struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// The `https:` URL of the embeddable content.
	Source *string `json:"source" validate:"required"`

	// The title or introductory text to show before the response.
	Title *string `json:"title,omitempty"`

	// The description to show with the the response.
	Description *string `json:"description,omitempty"`

	// The URL of an image that shows a preview of the embedded content.
	ImageURL *string `json:"image_url,omitempty"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeIframe : RuntimeResponseGenericRuntimeResponseTypeIframe struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypeImage

type RuntimeResponseGenericRuntimeResponseTypeImage struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// The `https:` URL of the image.
	Source *string `json:"source" validate:"required"`

	// The title to show before the response.
	Title *string `json:"title,omitempty"`

	// The description to show with the the response.
	Description *string `json:"description,omitempty"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`

	// Descriptive text that can be used for screen readers or other situations where the image cannot be seen.
	AltText *string `json:"alt_text,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeImage : RuntimeResponseGenericRuntimeResponseTypeImage struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypeOption

type RuntimeResponseGenericRuntimeResponseTypeOption struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// The title or introductory text to show before the response.
	Title *string `json:"title" validate:"required"`

	// The description to show with the the response.
	Description *string `json:"description,omitempty"`

	// The preferred type of control to display.
	Preference *string `json:"preference,omitempty"`

	// An array of objects describing the options from which the user can choose.
	Options []DialogNodeOutputOptionsElement `json:"options" validate:"required"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeOption : RuntimeResponseGenericRuntimeResponseTypeOption struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypePause

type RuntimeResponseGenericRuntimeResponseTypePause struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// How long to pause, in milliseconds.
	Time *int64 `json:"time" validate:"required"`

	// Whether to send a "user is typing" event during the pause.
	Typing *bool `json:"typing,omitempty"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypePause : RuntimeResponseGenericRuntimeResponseTypePause struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypeSearch

type RuntimeResponseGenericRuntimeResponseTypeSearch struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// The title or introductory text to show before the response. This text is defined in the search skill configuration.
	Header *string `json:"header" validate:"required"`

	// An array of objects that contains the search results to be displayed in the initial response to the user.
	PrimaryResults []SearchResult `json:"primary_results" validate:"required"`

	// An array of objects that contains additional search results that can be displayed to the user upon request.
	AdditionalResults []SearchResult `json:"additional_results" validate:"required"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeSearch : RuntimeResponseGenericRuntimeResponseTypeSearch struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypeSuggestion

type RuntimeResponseGenericRuntimeResponseTypeSuggestion struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// The title or introductory text to show before the response.
	Title *string `json:"title" validate:"required"`

	// An array of objects describing the possible matching dialog nodes from which the user can choose.
	Suggestions []DialogSuggestion `json:"suggestions" validate:"required"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeSuggestion : RuntimeResponseGenericRuntimeResponseTypeSuggestion struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypeText

type RuntimeResponseGenericRuntimeResponseTypeText struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// The text of the response.
	Text *string `json:"text" validate:"required"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeText : RuntimeResponseGenericRuntimeResponseTypeText struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypeUserDefined

type RuntimeResponseGenericRuntimeResponseTypeUserDefined struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// An object containing any properties for the user-defined response type.
	UserDefined map[string]interface{} `json:"user_defined" validate:"required"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeUserDefined : RuntimeResponseGenericRuntimeResponseTypeUserDefined struct This model "extends" RuntimeResponseGeneric

type RuntimeResponseGenericRuntimeResponseTypeVideo

type RuntimeResponseGenericRuntimeResponseTypeVideo struct {
	// The type of response returned by the dialog node. The specified response type must be supported by the client
	// application or channel.
	ResponseType *string `json:"response_type" validate:"required"`

	// The `https:` URL of the video.
	Source *string `json:"source" validate:"required"`

	// The title or introductory text to show before the response.
	Title *string `json:"title,omitempty"`

	// The description to show with the the response.
	Description *string `json:"description,omitempty"`

	// An array of objects specifying channels for which the response is intended. If **channels** is present, the response
	// is intended for a built-in integration and should not be handled by an API client.
	Channels []ResponseGenericChannel `json:"channels,omitempty"`

	// For internal use only.
	ChannelOptions interface{} `json:"channel_options,omitempty"`

	// Descriptive text that can be used for screen readers or other situations where the video cannot be seen.
	AltText *string `json:"alt_text,omitempty"`
}

RuntimeResponseGenericRuntimeResponseTypeVideo : RuntimeResponseGenericRuntimeResponseTypeVideo struct This model "extends" RuntimeResponseGeneric

type SearchResult

type SearchResult struct {
	// The unique identifier of the document in the Discovery service collection.
	//
	// This property is included in responses from search skills, which are available only to Plus or Enterprise plan
	// users.
	ID *string `json:"id" validate:"required"`

	// An object containing search result metadata from the Discovery service.
	ResultMetadata *SearchResultMetadata `json:"result_metadata" validate:"required"`

	// A description of the search result. This is taken from an abstract, summary, or highlight field in the Discovery
	// service response, as specified in the search skill configuration.
	Body *string `json:"body,omitempty"`

	// The title of the search result. This is taken from a title or name field in the Discovery service response, as
	// specified in the search skill configuration.
	Title *string `json:"title,omitempty"`

	// The URL of the original data object in its native data source.
	URL *string `json:"url,omitempty"`

	// An object containing segments of text from search results with query-matching text highlighted using HTML `<em>`
	// tags.
	Highlight *SearchResultHighlight `json:"highlight,omitempty"`

	// An array specifying segments of text within the result that were identified as direct answers to the search query.
	// Currently, only the single answer with the highest confidence (if any) is returned.
	//
	// **Note:** This property uses the answer finding beta feature, and is available only if the search skill is connected
	// to a Discovery v2 service instance.
	Answers []SearchResultAnswer `json:"answers,omitempty"`
}

SearchResult : SearchResult struct

type SearchResultAnswer

type SearchResultAnswer struct {
	// The text of the answer.
	Text *string `json:"text" validate:"required"`

	// The confidence score for the answer, as returned by the Discovery service.
	Confidence *float64 `json:"confidence" validate:"required"`
}

SearchResultAnswer : An object specifing a segment of text that was identified as a direct answer to the search query.

type SearchResultHighlight

type SearchResultHighlight struct {
	// An array of strings containing segments taken from body text in the search results, with query-matching substrings
	// highlighted.
	Body []string `json:"body,omitempty"`

	// An array of strings containing segments taken from title text in the search results, with query-matching substrings
	// highlighted.
	Title []string `json:"title,omitempty"`

	// An array of strings containing segments taken from URLs in the search results, with query-matching substrings
	// highlighted.
	URL []string `json:"url,omitempty"`
	// contains filtered or unexported fields
}

SearchResultHighlight : An object containing segments of text from search results with query-matching text highlighted using HTML `<em>` tags.

func (*SearchResultHighlight) GetProperties

func (o *SearchResultHighlight) GetProperties() map[string][]string

GetProperties allows the user to retrieve the map of arbitrary properties from an instance of SearchResultHighlight

func (*SearchResultHighlight) GetProperty

func (o *SearchResultHighlight) GetProperty(key string) []string

GetProperty allows the user to retrieve an arbitrary property from an instance of SearchResultHighlight

func (*SearchResultHighlight) MarshalJSON

func (o *SearchResultHighlight) MarshalJSON() (buffer []byte, err error)

MarshalJSON performs custom serialization for instances of SearchResultHighlight

func (*SearchResultHighlight) SetProperties

func (o *SearchResultHighlight) SetProperties(m map[string][]string)

SetProperties allows the user to set a map of arbitrary properties on an instance of SearchResultHighlight

func (*SearchResultHighlight) SetProperty

func (o *SearchResultHighlight) SetProperty(key string, value []string)

SetProperty allows the user to set an arbitrary property on an instance of SearchResultHighlight

type SearchResultMetadata

type SearchResultMetadata struct {
	// The confidence score for the given result, as returned by the Discovery service.
	Confidence *float64 `json:"confidence,omitempty"`

	// An unbounded measure of the relevance of a particular result, dependent on the query and matching document. A higher
	// score indicates a greater match to the query parameters.
	Score *float64 `json:"score,omitempty"`
}

SearchResultMetadata : An object containing search result metadata from the Discovery service.

type SessionResponse

type SessionResponse struct {
	// The session ID.
	SessionID *string `json:"session_id" validate:"required"`
}

SessionResponse : SessionResponse struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL