blob: 45c661bc44900060baa9ab5aa52b1ea48b7fa675 [file] [log] [blame]
// Copyright 2019 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package dialogflow provides access to the Dialogflow API.
//
// This package is DEPRECATED. Use package cloud.google.com/go/dialogflow/apiv2 instead.
//
// See https://cloud.google.com/dialogflow-enterprise/
//
// Usage example:
//
// import "google.golang.org/api/dialogflow/v2beta1"
// ...
// dialogflowService, err := dialogflow.New(oauthHttpClient)
package dialogflow // import "google.golang.org/api/dialogflow/v2beta1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
const apiId = "dialogflow:v2beta1"
const apiName = "dialogflow"
const apiVersion = "v2beta1"
const basePath = "https://dialogflow.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
// View, manage and query your Dialogflow agents
DialogflowScope = "https://www.googleapis.com/auth/dialogflow"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Agent = NewProjectsAgentService(s)
rs.KnowledgeBases = NewProjectsKnowledgeBasesService(s)
rs.Operations = NewProjectsOperationsService(s)
return rs
}
type ProjectsService struct {
s *Service
Agent *ProjectsAgentService
KnowledgeBases *ProjectsKnowledgeBasesService
Operations *ProjectsOperationsService
}
func NewProjectsAgentService(s *Service) *ProjectsAgentService {
rs := &ProjectsAgentService{s: s}
rs.EntityTypes = NewProjectsAgentEntityTypesService(s)
rs.Environments = NewProjectsAgentEnvironmentsService(s)
rs.Intents = NewProjectsAgentIntentsService(s)
rs.KnowledgeBases = NewProjectsAgentKnowledgeBasesService(s)
rs.Sessions = NewProjectsAgentSessionsService(s)
return rs
}
type ProjectsAgentService struct {
s *Service
EntityTypes *ProjectsAgentEntityTypesService
Environments *ProjectsAgentEnvironmentsService
Intents *ProjectsAgentIntentsService
KnowledgeBases *ProjectsAgentKnowledgeBasesService
Sessions *ProjectsAgentSessionsService
}
func NewProjectsAgentEntityTypesService(s *Service) *ProjectsAgentEntityTypesService {
rs := &ProjectsAgentEntityTypesService{s: s}
rs.Entities = NewProjectsAgentEntityTypesEntitiesService(s)
return rs
}
type ProjectsAgentEntityTypesService struct {
s *Service
Entities *ProjectsAgentEntityTypesEntitiesService
}
func NewProjectsAgentEntityTypesEntitiesService(s *Service) *ProjectsAgentEntityTypesEntitiesService {
rs := &ProjectsAgentEntityTypesEntitiesService{s: s}
return rs
}
type ProjectsAgentEntityTypesEntitiesService struct {
s *Service
}
func NewProjectsAgentEnvironmentsService(s *Service) *ProjectsAgentEnvironmentsService {
rs := &ProjectsAgentEnvironmentsService{s: s}
rs.Users = NewProjectsAgentEnvironmentsUsersService(s)
return rs
}
type ProjectsAgentEnvironmentsService struct {
s *Service
Users *ProjectsAgentEnvironmentsUsersService
}
func NewProjectsAgentEnvironmentsUsersService(s *Service) *ProjectsAgentEnvironmentsUsersService {
rs := &ProjectsAgentEnvironmentsUsersService{s: s}
rs.Sessions = NewProjectsAgentEnvironmentsUsersSessionsService(s)
return rs
}
type ProjectsAgentEnvironmentsUsersService struct {
s *Service
Sessions *ProjectsAgentEnvironmentsUsersSessionsService
}
func NewProjectsAgentEnvironmentsUsersSessionsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsService {
rs := &ProjectsAgentEnvironmentsUsersSessionsService{s: s}
rs.Contexts = NewProjectsAgentEnvironmentsUsersSessionsContextsService(s)
rs.EntityTypes = NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s)
return rs
}
type ProjectsAgentEnvironmentsUsersSessionsService struct {
s *Service
Contexts *ProjectsAgentEnvironmentsUsersSessionsContextsService
EntityTypes *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService
}
func NewProjectsAgentEnvironmentsUsersSessionsContextsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsContextsService {
rs := &ProjectsAgentEnvironmentsUsersSessionsContextsService{s: s}
return rs
}
type ProjectsAgentEnvironmentsUsersSessionsContextsService struct {
s *Service
}
func NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService {
rs := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesService{s: s}
return rs
}
type ProjectsAgentEnvironmentsUsersSessionsEntityTypesService struct {
s *Service
}
func NewProjectsAgentIntentsService(s *Service) *ProjectsAgentIntentsService {
rs := &ProjectsAgentIntentsService{s: s}
return rs
}
type ProjectsAgentIntentsService struct {
s *Service
}
func NewProjectsAgentKnowledgeBasesService(s *Service) *ProjectsAgentKnowledgeBasesService {
rs := &ProjectsAgentKnowledgeBasesService{s: s}
rs.Documents = NewProjectsAgentKnowledgeBasesDocumentsService(s)
return rs
}
type ProjectsAgentKnowledgeBasesService struct {
s *Service
Documents *ProjectsAgentKnowledgeBasesDocumentsService
}
func NewProjectsAgentKnowledgeBasesDocumentsService(s *Service) *ProjectsAgentKnowledgeBasesDocumentsService {
rs := &ProjectsAgentKnowledgeBasesDocumentsService{s: s}
return rs
}
type ProjectsAgentKnowledgeBasesDocumentsService struct {
s *Service
}
func NewProjectsAgentSessionsService(s *Service) *ProjectsAgentSessionsService {
rs := &ProjectsAgentSessionsService{s: s}
rs.Contexts = NewProjectsAgentSessionsContextsService(s)
rs.EntityTypes = NewProjectsAgentSessionsEntityTypesService(s)
return rs
}
type ProjectsAgentSessionsService struct {
s *Service
Contexts *ProjectsAgentSessionsContextsService
EntityTypes *ProjectsAgentSessionsEntityTypesService
}
func NewProjectsAgentSessionsContextsService(s *Service) *ProjectsAgentSessionsContextsService {
rs := &ProjectsAgentSessionsContextsService{s: s}
return rs
}
type ProjectsAgentSessionsContextsService struct {
s *Service
}
func NewProjectsAgentSessionsEntityTypesService(s *Service) *ProjectsAgentSessionsEntityTypesService {
rs := &ProjectsAgentSessionsEntityTypesService{s: s}
return rs
}
type ProjectsAgentSessionsEntityTypesService struct {
s *Service
}
func NewProjectsKnowledgeBasesService(s *Service) *ProjectsKnowledgeBasesService {
rs := &ProjectsKnowledgeBasesService{s: s}
rs.Documents = NewProjectsKnowledgeBasesDocumentsService(s)
return rs
}
type ProjectsKnowledgeBasesService struct {
s *Service
Documents *ProjectsKnowledgeBasesDocumentsService
}
func NewProjectsKnowledgeBasesDocumentsService(s *Service) *ProjectsKnowledgeBasesDocumentsService {
rs := &ProjectsKnowledgeBasesDocumentsService{s: s}
return rs
}
type ProjectsKnowledgeBasesDocumentsService struct {
s *Service
}
func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
rs := &ProjectsOperationsService{s: s}
return rs
}
type ProjectsOperationsService struct {
s *Service
}
// GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse: The response
// message for EntityTypes.BatchUpdateEntityTypes.
type GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse struct {
// EntityTypes: The collection of updated or created entity types.
EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"`
// ForceSendFields is a list of field names (e.g. "EntityTypes") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EntityTypes") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2BatchUpdateIntentsResponse: The response
// message for Intents.BatchUpdateIntents.
type GoogleCloudDialogflowV2BatchUpdateIntentsResponse struct {
// Intents: The collection of updated or created intents.
Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"`
// ForceSendFields is a list of field names (e.g. "Intents") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Intents") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2Context: Represents a context.
type GoogleCloudDialogflowV2Context struct {
// LifespanCount: Optional. The number of conversational query requests
// after which the
// context expires. If set to `0` (the default) the context
// expires
// immediately. Contexts expire automatically after 20 minutes even if
// there
// are no matching queries.
LifespanCount int64 `json:"lifespanCount,omitempty"`
// Name: Required. The unique identifier of the context.
// Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context
// ID>`.
//
// The `Context ID` is always converted to lowercase, may only
// contain
// characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
Name string `json:"name,omitempty"`
// Parameters: Optional. The collection of parameters associated with
// this context.
// Refer to [this
// doc](https://dialogflow.com/docs/actions-and-parameters) for
// syntax.
Parameters googleapi.RawMessage `json:"parameters,omitempty"`
// ForceSendFields is a list of field names (e.g. "LifespanCount") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "LifespanCount") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2Context) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2Context
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2EntityType: Represents an entity type.
// Entity types serve as a tool for extracting parameter values from
// natural
// language queries.
type GoogleCloudDialogflowV2EntityType struct {
// AutoExpansionMode: Optional. Indicates whether the entity type can be
// automatically
// expanded.
//
// Possible values:
// "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the
// entity.
// "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values
// that have not been explicitly
// listed in the entity.
AutoExpansionMode string `json:"autoExpansionMode,omitempty"`
// DisplayName: Required. The name of the entity type.
DisplayName string `json:"displayName,omitempty"`
// Entities: Optional. The collection of entities associated with the
// entity type.
Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"`
// Kind: Required. Indicates the kind of entity type.
//
// Possible values:
// "KIND_UNSPECIFIED" - Not specified. This value should be never
// used.
// "KIND_MAP" - Map entity types allow mapping of a group of synonyms
// to a canonical
// value.
// "KIND_LIST" - List entity types contain a set of entries that do
// not map to canonical
// values. However, list entity types can contain references to other
// entity
// types (with or without aliases).
Kind string `json:"kind,omitempty"`
// Name: The unique identifier of the entity type.
// Required for EntityTypes.UpdateEntityType
// and
// EntityTypes.BatchUpdateEntityTypes methods.
// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "AutoExpansionMode")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AutoExpansionMode") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2EntityType) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2EntityType
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2EntityTypeEntity: Optional. Represents an
// entity.
type GoogleCloudDialogflowV2EntityTypeEntity struct {
// Synonyms: Required. A collection of synonyms. For `KIND_LIST` entity
// types this
// must contain exactly one synonym equal to `value`.
Synonyms []string `json:"synonyms,omitempty"`
// Value: Required.
// For `KIND_MAP` entity types:
// A canonical name to be used in place of synonyms.
// For `KIND_LIST` entity types:
// A string that can contain references to other entity types (with
// or
// without aliases).
Value string `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "Synonyms") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Synonyms") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2EntityTypeEntity) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2EntityTypeEntity
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2EventInput: Events allow for matching intents
// by event name instead of the natural
// language input. For instance, input `<event: { name:
// “welcome_event”,
// parameters: { name: “Sam” } }>` can trigger a personalized
// welcome response.
// The parameter `name` may be used by the agent in the
// response:
// `“Hello #welcome_event.name! What can I do for you today?”`.
type GoogleCloudDialogflowV2EventInput struct {
// LanguageCode: Required. The language of this query. See
// [Language
// Support](https://dialogflow.com/docs/languages) for a list of
// the
// currently supported language codes. Note that queries in the same
// session
// do not necessarily need to specify the same language.
LanguageCode string `json:"languageCode,omitempty"`
// Name: Required. The unique identifier of the event.
Name string `json:"name,omitempty"`
// Parameters: Optional. The collection of parameters associated with
// the event.
Parameters googleapi.RawMessage `json:"parameters,omitempty"`
// ForceSendFields is a list of field names (e.g. "LanguageCode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "LanguageCode") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2EventInput) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2EventInput
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2ExportAgentResponse: The response message for
// Agents.ExportAgent.
type GoogleCloudDialogflowV2ExportAgentResponse struct {
// AgentContent: The exported agent.
//
// Example for how to export an agent to a zip file via a command
// line:
// <pre>curl \
//
// 'https://dialogflow.googleapis.com/v2/projects/&lt;project_name&gt;/ag
// ent:export'\
// -X POST \
// -H 'Authorization: Bearer '$(gcloud auth application-default
// print-access-token) \
// -H 'Accept: application/json' \
// -H 'Content-Type: application/json' \
// --compressed \
// --data-binary '{}' \
// | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/'
// \
// | base64 --decode > &lt;agent zip file&gt;</pre>
AgentContent string `json:"agentContent,omitempty"`
// AgentUri: The URI to a file containing the exported agent. This field
// is populated
// only if `agent_uri` is specified in `ExportAgentRequest`.
AgentUri string `json:"agentUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "AgentContent") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AgentContent") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2ExportAgentResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2ExportAgentResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2Intent: Represents an intent.
// Intents convert a number of user expressions or patterns into an
// action. An
// action is an extraction of a user command or sentence semantics.
type GoogleCloudDialogflowV2Intent struct {
// Action: Optional. The name of the action associated with the
// intent.
// Note: The action name must not contain whitespaces.
Action string `json:"action,omitempty"`
// DefaultResponsePlatforms: Optional. The list of platforms for which
// the first response will be
// taken from among the messages assigned to the DEFAULT_PLATFORM.
//
// Possible values:
// "PLATFORM_UNSPECIFIED" - Not specified.
// "FACEBOOK" - Facebook.
// "SLACK" - Slack.
// "TELEGRAM" - Telegram.
// "KIK" - Kik.
// "SKYPE" - Skype.
// "LINE" - Line.
// "VIBER" - Viber.
// "ACTIONS_ON_GOOGLE" - Actions on Google.
// When using Actions on Google, you can choose one of the
// specific
// Intent.Message types that mention support for Actions on Google,
// or you can use the advanced Intent.Message.payload field.
// The payload field provides access to AoG features not available in
// the
// specific message types.
// If using the Intent.Message.payload field, it should have a
// structure
// similar to the JSON message shown here. For more information,
// see
// [Actions on Google
// Webhook
// Format](https://developers.google.com/actions/dialogflow/webho
// ok)
// <pre>{
// "expectUserResponse": true,
// "isSsml": false,
// "noInputPrompts": [],
// "richResponse": {
// "items": [
// {
// "simpleResponse": {
// "displayText": "hi",
// "textToSpeech": "hello"
// }
// }
// ],
// "suggestions": [
// {
// "title": "Say this"
// },
// {
// "title": "or this"
// }
// ]
// },
// "systemIntent": {
// "data": {
// "@type":
// "type.googleapis.com/google.actions.v2.OptionValueSpec",
// "listSelect": {
// "items": [
// {
// "optionInfo": {
// "key": "key1",
// "synonyms": [
// "key one"
// ]
// },
// "title": "must not be empty, but unique"
// },
// {
// "optionInfo": {
// "key": "key2",
// "synonyms": [
// "key two"
// ]
// },
// "title": "must not be empty, but unique"
// }
// ]
// }
// },
// "intent": "actions.intent.OPTION"
// }
// }</pre>
DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"`
// DisplayName: Required. The name of this intent.
DisplayName string `json:"displayName,omitempty"`
// Events: Optional. The collection of event names that trigger the
// intent.
// If the collection of input contexts is not empty, all of the contexts
// must
// be present in the active user session for an event to trigger this
// intent.
Events []string `json:"events,omitempty"`
// FollowupIntentInfo: Read-only. Information about all followup intents
// that have this intent as
// a direct or indirect parent. We populate this field only in the
// output.
FollowupIntentInfo []*GoogleCloudDialogflowV2IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"`
// InputContextNames: Optional. The list of context names required for
// this intent to be
// triggered.
// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
// ID>`.
InputContextNames []string `json:"inputContextNames,omitempty"`
// IsFallback: Optional. Indicates whether this is a fallback intent.
IsFallback bool `json:"isFallback,omitempty"`
// Messages: Optional. The collection of rich messages corresponding to
// the
// `Response` field in the Dialogflow console.
Messages []*GoogleCloudDialogflowV2IntentMessage `json:"messages,omitempty"`
// MlDisabled: Optional. Indicates whether Machine Learning is disabled
// for the intent.
// Note: If `ml_diabled` setting is set to true, then this intent is
// not
// taken into account during inference in `ML ONLY` match mode.
// Also,
// auto-markup in the UI is turned off.
MlDisabled bool `json:"mlDisabled,omitempty"`
// Name: The unique identifier of this intent.
// Required for Intents.UpdateIntent and
// Intents.BatchUpdateIntents
// methods.
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
Name string `json:"name,omitempty"`
// OutputContexts: Optional. The collection of contexts that are
// activated when the intent
// is matched. Context messages in this collection should not set
// the
// parameters field. Setting the `lifespan_count` to 0 will reset the
// context
// when the intent is matched.
// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
// ID>`.
OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
// Parameters: Optional. The collection of parameters associated with
// the intent.
Parameters []*GoogleCloudDialogflowV2IntentParameter `json:"parameters,omitempty"`
// ParentFollowupIntentName: Read-only after creation. The unique
// identifier of the parent intent in the
// chain of followup intents. You can set this field when creating an
// intent,
// for example with CreateIntent or BatchUpdateIntents, in order to
// make this intent a followup intent.
//
// It identifies the parent followup intent.
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
// Priority: Optional. The priority of this intent. Higher numbers
// represent higher
// priorities. If this is zero or unspecified, we use the
// default
// priority 500000.
//
// Negative numbers mean that the intent is disabled.
Priority int64 `json:"priority,omitempty"`
// ResetContexts: Optional. Indicates whether to delete all contexts in
// the current
// session when this intent is matched.
ResetContexts bool `json:"resetContexts,omitempty"`
// RootFollowupIntentName: Read-only. The unique identifier of the root
// intent in the chain of
// followup intents. It identifies the correct followup intents chain
// for
// this intent. We populate this field only in the output.
//
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"`
// TrainingPhrases: Optional. The collection of examples that the agent
// is
// trained on.
TrainingPhrases []*GoogleCloudDialogflowV2IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
// WebhookState: Optional. Indicates whether webhooks are enabled for
// the intent.
//
// Possible values:
// "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and
// in the intent.
// "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in
// the intent.
// "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in
// the agent and in the intent. Also, each slot
// filling prompt is forwarded to the webhook.
WebhookState string `json:"webhookState,omitempty"`
// ForceSendFields is a list of field names (e.g. "Action") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Action") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2Intent) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2Intent
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentFollowupIntentInfo: Represents a single
// followup intent in the chain.
type GoogleCloudDialogflowV2IntentFollowupIntentInfo struct {
// FollowupIntentName: The unique identifier of the followup
// intent.
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
FollowupIntentName string `json:"followupIntentName,omitempty"`
// ParentFollowupIntentName: The unique identifier of the followup
// intent's parent.
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
// ForceSendFields is a list of field names (e.g. "FollowupIntentName")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FollowupIntentName") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentFollowupIntentInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessage: Corresponds to the `Response`
// field in the Dialogflow console.
type GoogleCloudDialogflowV2IntentMessage struct {
// BasicCard: The basic card response for Actions on Google.
BasicCard *GoogleCloudDialogflowV2IntentMessageBasicCard `json:"basicCard,omitempty"`
// Card: The card response.
Card *GoogleCloudDialogflowV2IntentMessageCard `json:"card,omitempty"`
// CarouselSelect: The carousel card response for Actions on Google.
CarouselSelect *GoogleCloudDialogflowV2IntentMessageCarouselSelect `json:"carouselSelect,omitempty"`
// Image: The image response.
Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
// LinkOutSuggestion: The link out suggestion chip for Actions on
// Google.
LinkOutSuggestion *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"`
// ListSelect: The list card response for Actions on Google.
ListSelect *GoogleCloudDialogflowV2IntentMessageListSelect `json:"listSelect,omitempty"`
// Payload: Returns a response containing a custom, platform-specific
// payload.
// See the Intent.Message.Platform type for a description of
// the
// structure that may be required for your platform.
Payload googleapi.RawMessage `json:"payload,omitempty"`
// Platform: Optional. The platform that this message is intended for.
//
// Possible values:
// "PLATFORM_UNSPECIFIED" - Not specified.
// "FACEBOOK" - Facebook.
// "SLACK" - Slack.
// "TELEGRAM" - Telegram.
// "KIK" - Kik.
// "SKYPE" - Skype.
// "LINE" - Line.
// "VIBER" - Viber.
// "ACTIONS_ON_GOOGLE" - Actions on Google.
// When using Actions on Google, you can choose one of the
// specific
// Intent.Message types that mention support for Actions on Google,
// or you can use the advanced Intent.Message.payload field.
// The payload field provides access to AoG features not available in
// the
// specific message types.
// If using the Intent.Message.payload field, it should have a
// structure
// similar to the JSON message shown here. For more information,
// see
// [Actions on Google
// Webhook
// Format](https://developers.google.com/actions/dialogflow/webho
// ok)
// <pre>{
// "expectUserResponse": true,
// "isSsml": false,
// "noInputPrompts": [],
// "richResponse": {
// "items": [
// {
// "simpleResponse": {
// "displayText": "hi",
// "textToSpeech": "hello"
// }
// }
// ],
// "suggestions": [
// {
// "title": "Say this"
// },
// {
// "title": "or this"
// }
// ]
// },
// "systemIntent": {
// "data": {
// "@type":
// "type.googleapis.com/google.actions.v2.OptionValueSpec",
// "listSelect": {
// "items": [
// {
// "optionInfo": {
// "key": "key1",
// "synonyms": [
// "key one"
// ]
// },
// "title": "must not be empty, but unique"
// },
// {
// "optionInfo": {
// "key": "key2",
// "synonyms": [
// "key two"
// ]
// },
// "title": "must not be empty, but unique"
// }
// ]
// }
// },
// "intent": "actions.intent.OPTION"
// }
// }</pre>
Platform string `json:"platform,omitempty"`
// QuickReplies: The quick replies response.
QuickReplies *GoogleCloudDialogflowV2IntentMessageQuickReplies `json:"quickReplies,omitempty"`
// SimpleResponses: The voice and text-only responses for Actions on
// Google.
SimpleResponses *GoogleCloudDialogflowV2IntentMessageSimpleResponses `json:"simpleResponses,omitempty"`
// Suggestions: The suggestion chips for Actions on Google.
Suggestions *GoogleCloudDialogflowV2IntentMessageSuggestions `json:"suggestions,omitempty"`
// Text: The text response.
Text *GoogleCloudDialogflowV2IntentMessageText `json:"text,omitempty"`
// ForceSendFields is a list of field names (e.g. "BasicCard") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BasicCard") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessage) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessage
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageBasicCard: The basic card
// message. Useful for displaying information.
type GoogleCloudDialogflowV2IntentMessageBasicCard struct {
// Buttons: Optional. The collection of card buttons.
Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"`
// FormattedText: Required, unless image is present. The body text of
// the card.
FormattedText string `json:"formattedText,omitempty"`
// Image: Optional. The image for the card.
Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
// Subtitle: Optional. The subtitle of the card.
Subtitle string `json:"subtitle,omitempty"`
// Title: Optional. The title of the card.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "Buttons") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Buttons") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageBasicCard) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCard
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageBasicCardButton: The button
// object that appears at the bottom of a card.
type GoogleCloudDialogflowV2IntentMessageBasicCardButton struct {
// OpenUriAction: Required. Action to take when a user taps on the
// button.
OpenUriAction *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"`
// Title: Required. The title of the button.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "OpenUriAction") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "OpenUriAction") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButton
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction:
// Opens the given URI.
type GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction struct {
// Uri: Required. The HTTP or HTTPS scheme URI.
Uri string `json:"uri,omitempty"`
// ForceSendFields is a list of field names (e.g. "Uri") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Uri") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageCard: The card response message.
type GoogleCloudDialogflowV2IntentMessageCard struct {
// Buttons: Optional. The collection of card buttons.
Buttons []*GoogleCloudDialogflowV2IntentMessageCardButton `json:"buttons,omitempty"`
// ImageUri: Optional. The public URI to an image file for the card.
ImageUri string `json:"imageUri,omitempty"`
// Subtitle: Optional. The subtitle of the card.
Subtitle string `json:"subtitle,omitempty"`
// Title: Optional. The title of the card.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "Buttons") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Buttons") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageCard) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageCard
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageCardButton: Optional. Contains
// information about a button.
type GoogleCloudDialogflowV2IntentMessageCardButton struct {
// Postback: Optional. The text to send back to the Dialogflow API or a
// URI to
// open.
Postback string `json:"postback,omitempty"`
// Text: Optional. The text to show on the button.
Text string `json:"text,omitempty"`
// ForceSendFields is a list of field names (e.g. "Postback") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Postback") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageCardButton) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageCardButton
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageCarouselSelect: The card for
// presenting a carousel of options to select from.
type GoogleCloudDialogflowV2IntentMessageCarouselSelect struct {
// Items: Required. Carousel items.
Items []*GoogleCloudDialogflowV2IntentMessageCarouselSelectItem `json:"items,omitempty"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelect
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageCarouselSelectItem: An item in
// the carousel.
type GoogleCloudDialogflowV2IntentMessageCarouselSelectItem struct {
// Description: Optional. The body text of the card.
Description string `json:"description,omitempty"`
// Image: Optional. The image to display.
Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
// Info: Required. Additional info about the option item.
Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"`
// Title: Required. Title of the carousel item.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Description") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageImage: The image response
// message.
type GoogleCloudDialogflowV2IntentMessageImage struct {
// AccessibilityText: Optional. A text description of the image to be
// used for accessibility,
// e.g., screen readers.
AccessibilityText string `json:"accessibilityText,omitempty"`
// ImageUri: Optional. The public URI to an image file.
ImageUri string `json:"imageUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "AccessibilityText")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AccessibilityText") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageImage) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageImage
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion: The suggestion
// chip message that allows the user to jump out to the app
// or website associated with this agent.
type GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion struct {
// DestinationName: Required. The name of the app or site this chip is
// linking to.
DestinationName string `json:"destinationName,omitempty"`
// Uri: Required. The URI of the app or site to open when the user taps
// the
// suggestion chip.
Uri string `json:"uri,omitempty"`
// ForceSendFields is a list of field names (e.g. "DestinationName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DestinationName") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageListSelect: The card for
// presenting a list of options to select from.
type GoogleCloudDialogflowV2IntentMessageListSelect struct {
// Items: Required. List items.
Items []*GoogleCloudDialogflowV2IntentMessageListSelectItem `json:"items,omitempty"`
// Title: Optional. The overall title of the list.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageListSelect) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageListSelect
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageListSelectItem: An item in the
// list.
type GoogleCloudDialogflowV2IntentMessageListSelectItem struct {
// Description: Optional. The main text describing the item.
Description string `json:"description,omitempty"`
// Image: Optional. The image to display.
Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
// Info: Required. Additional information about this option.
Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"`
// Title: Required. The title of the list item.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Description") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageListSelectItem) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageListSelectItem
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageQuickReplies: The quick replies
// response message.
type GoogleCloudDialogflowV2IntentMessageQuickReplies struct {
// QuickReplies: Optional. The collection of quick replies.
QuickReplies []string `json:"quickReplies,omitempty"`
// Title: Optional. The title of the collection of quick replies.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "QuickReplies") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "QuickReplies") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageQuickReplies) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageQuickReplies
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageSelectItemInfo: Additional info
// about the select item for when it is triggered in a
// dialog.
type GoogleCloudDialogflowV2IntentMessageSelectItemInfo struct {
// Key: Required. A unique key that will be sent back to the agent if
// this
// response is given.
Key string `json:"key,omitempty"`
// Synonyms: Optional. A list of synonyms that can also be used to
// trigger this
// item in dialog.
Synonyms []string `json:"synonyms,omitempty"`
// ForceSendFields is a list of field names (e.g. "Key") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Key") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageSelectItemInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageSimpleResponse: The simple
// response message containing speech or text.
type GoogleCloudDialogflowV2IntentMessageSimpleResponse struct {
// DisplayText: Optional. The text to display.
DisplayText string `json:"displayText,omitempty"`
// Ssml: One of text_to_speech or ssml must be provided. Structured
// spoken
// response to the user in the SSML format. Mutually exclusive
// with
// text_to_speech.
Ssml string `json:"ssml,omitempty"`
// TextToSpeech: One of text_to_speech or ssml must be provided. The
// plain text of the
// speech output. Mutually exclusive with ssml.
TextToSpeech string `json:"textToSpeech,omitempty"`
// ForceSendFields is a list of field names (e.g. "DisplayText") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DisplayText") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageSimpleResponses: The collection
// of simple response candidates.
// This message in `QueryResult.fulfillment_messages`
// and
// `WebhookResponse.fulfillment_messages` should contain only
// one
// `SimpleResponse`.
type GoogleCloudDialogflowV2IntentMessageSimpleResponses struct {
// SimpleResponses: Required. The list of simple responses.
SimpleResponses []*GoogleCloudDialogflowV2IntentMessageSimpleResponse `json:"simpleResponses,omitempty"`
// ForceSendFields is a list of field names (e.g. "SimpleResponses") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "SimpleResponses") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponses
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageSuggestion: The suggestion chip
// message that the user can tap to quickly post a reply
// to the conversation.
type GoogleCloudDialogflowV2IntentMessageSuggestion struct {
// Title: Required. The text shown the in the suggestion chip.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "Title") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Title") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageSuggestion) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestion
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageSuggestions: The collection of
// suggestions.
type GoogleCloudDialogflowV2IntentMessageSuggestions struct {
// Suggestions: Required. The list of suggested replies.
Suggestions []*GoogleCloudDialogflowV2IntentMessageSuggestion `json:"suggestions,omitempty"`
// ForceSendFields is a list of field names (e.g. "Suggestions") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Suggestions") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageSuggestions) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentMessageText: The text response message.
type GoogleCloudDialogflowV2IntentMessageText struct {
// Text: Optional. The collection of the agent's responses.
Text []string `json:"text,omitempty"`
// ForceSendFields is a list of field names (e.g. "Text") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Text") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentMessageText) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentMessageText
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentParameter: Represents intent parameters.
type GoogleCloudDialogflowV2IntentParameter struct {
// DefaultValue: Optional. The default value to use when the `value`
// yields an empty
// result.
// Default values can be extracted from contexts by using the
// following
// syntax: `#context_name.parameter_name`.
DefaultValue string `json:"defaultValue,omitempty"`
// DisplayName: Required. The name of the parameter.
DisplayName string `json:"displayName,omitempty"`
// EntityTypeDisplayName: Optional. The name of the entity type,
// prefixed with `@`, that
// describes values of the parameter. If the parameter is
// required, this must be provided.
EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"`
// IsList: Optional. Indicates whether the parameter represents a list
// of values.
IsList bool `json:"isList,omitempty"`
// Mandatory: Optional. Indicates whether the parameter is required.
// That is,
// whether the intent cannot be completed without collecting the
// parameter
// value.
Mandatory bool `json:"mandatory,omitempty"`
// Name: The unique identifier of this parameter.
Name string `json:"name,omitempty"`
// Prompts: Optional. The collection of prompts that the agent can
// present to the
// user in order to collect value for the parameter.
Prompts []string `json:"prompts,omitempty"`
// Value: Optional. The definition of the parameter value. It can be:
// - a constant string,
// - a parameter value defined as `$parameter_name`,
// - an original parameter value defined as
// `$parameter_name.original`,
// - a parameter value from some context defined as
// `#context_name.parameter_name`.
Value string `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "DefaultValue") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DefaultValue") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentParameter) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentParameter
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentTrainingPhrase: Represents an example
// that the agent is trained on.
type GoogleCloudDialogflowV2IntentTrainingPhrase struct {
// Name: Output only. The unique identifier of this training phrase.
Name string `json:"name,omitempty"`
// Parts: Required. The collection of training phrase parts (can be
// annotated).
// Fields: `entity_type`, `alias` and `user_defined` should be
// populated
// only for the annotated parts of the training phrase.
Parts []*GoogleCloudDialogflowV2IntentTrainingPhrasePart `json:"parts,omitempty"`
// TimesAddedCount: Optional. Indicates how many times this example was
// added to
// the intent. Each time a developer adds an existing sample by editing
// an
// intent or training, this counter is increased.
TimesAddedCount int64 `json:"timesAddedCount,omitempty"`
// Type: Required. The type of the training phrase.
//
// Possible values:
// "TYPE_UNSPECIFIED" - Not specified. This value should never be
// used.
// "EXAMPLE" - Examples do not contain @-prefixed entity type names,
// but example parts
// can be annotated with entity types.
// "TEMPLATE" - Templates are not annotated with entity types, but
// they can contain
// @-prefixed entity type names as substrings.
// Template mode has been deprecated. Example mode is the only
// supported
// way to create new training phrases. If you have existing
// training
// phrases that you've created in template mode, those will continue
// to
// work.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrase
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2IntentTrainingPhrasePart: Represents a part of
// a training phrase.
type GoogleCloudDialogflowV2IntentTrainingPhrasePart struct {
// Alias: Optional. The parameter name for the value extracted from
// the
// annotated part of the example.
Alias string `json:"alias,omitempty"`
// EntityType: Optional. The entity type name prefixed with `@`. This
// field is
// required for the annotated part of the text and applies only
// to
// examples.
EntityType string `json:"entityType,omitempty"`
// Text: Required. The text corresponding to the example,
// if there are no annotations. For
// annotated examples, it is the text for one of the example's parts.
Text string `json:"text,omitempty"`
// UserDefined: Optional. Indicates whether the text was manually
// annotated by the
// developer.
UserDefined bool `json:"userDefined,omitempty"`
// ForceSendFields is a list of field names (e.g. "Alias") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Alias") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrasePart
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2OriginalDetectIntentRequest: Represents the
// contents of the original request that was passed to
// the `[Streaming]DetectIntent` call.
type GoogleCloudDialogflowV2OriginalDetectIntentRequest struct {
// Payload: Optional. This field is set to the value of the
// `QueryParameters.payload`
// field passed in the request. Some integrations that query a
// Dialogflow
// agent may provide additional information in the payload.
//
// In particular for the Telephony Gateway this field has the
// form:
// <pre>{
// "telephony": {
// "caller_id": "+18558363987"
// }
// }</pre>
// Note: The caller ID field (`caller_id`) will be redacted for
// Standard
// Edition agents and populated with the caller ID in
// [E.164
// format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition
// agents.
Payload googleapi.RawMessage `json:"payload,omitempty"`
// Source: The source of this request, e.g., `google`, `facebook`,
// `slack`. It is set
// by Dialogflow-owned servers.
Source string `json:"source,omitempty"`
// Version: Optional. The version of the protocol used for this
// request.
// This field is AoG-specific.
Version string `json:"version,omitempty"`
// ForceSendFields is a list of field names (e.g. "Payload") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Payload") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2OriginalDetectIntentRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2QueryResult: Represents the result of
// conversational query or event processing.
type GoogleCloudDialogflowV2QueryResult struct {
// Action: The action name from the matched intent.
Action string `json:"action,omitempty"`
// AllRequiredParamsPresent: This field is set to:
// - `false` if the matched intent has required parameters and not all
// of
// the required parameter values have been collected.
// - `true` if all required parameter values have been collected, or if
// the
// matched intent doesn't contain any required parameters.
AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"`
// DiagnosticInfo: The free-form diagnostic info. For example, this
// field could contain
// webhook call latency. The string keys of the Struct's fields map can
// change
// without notice.
DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
// FulfillmentMessages: The collection of rich messages to present to
// the user.
FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"`
// FulfillmentText: The text to be pronounced to the user or shown on
// the screen.
FulfillmentText string `json:"fulfillmentText,omitempty"`
// Intent: The intent that matched the conversational query. Some,
// not
// all fields are filled in this message, including but not limited
// to:
// `name`, `display_name` and `webhook_state`.
Intent *GoogleCloudDialogflowV2Intent `json:"intent,omitempty"`
// IntentDetectionConfidence: The intent detection confidence. Values
// range from 0.0
// (completely uncertain) to 1.0 (completely certain).
// If there are `multiple knowledge_answers` messages, this value is set
// to
// the greatest `knowledgeAnswers.match_confidence` value in the list.
IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"`
// LanguageCode: The language that was triggered during intent
// detection.
// See [Language
// Support](https://dialogflow.com/docs/reference/language)
// for a list of the currently supported language codes.
LanguageCode string `json:"languageCode,omitempty"`
// OutputContexts: The collection of output contexts. If
// applicable,
// `output_contexts.parameters` contains entries with name
// `<parameter name>.original` containing the original parameter
// values
// before the query.
OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
// Parameters: The collection of extracted parameters.
Parameters googleapi.RawMessage `json:"parameters,omitempty"`
// QueryText: The original conversational query text:
// - If natural language text was provided as input, `query_text`
// contains
// a copy of the input.
// - If natural language speech audio was provided as input,
// `query_text`
// contains the speech recognition result. If speech recognizer
// produced
// multiple alternatives, a particular one is picked.
// - If an event was provided as input, `query_text` is not set.
QueryText string `json:"queryText,omitempty"`
// SpeechRecognitionConfidence: The Speech recognition confidence
// between 0.0 and 1.0. A higher number
// indicates an estimated greater likelihood that the recognized words
// are
// correct. The default of 0.0 is a sentinel value indicating that
// confidence
// was not set.
//
// This field is not guaranteed to be accurate or set. In particular
// this
// field isn't set for StreamingDetectIntent since the streaming
// endpoint has
// separate confidence estimates per portion of the audio
// in
// StreamingRecognitionResult.
SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"`
// WebhookPayload: If the query was fulfilled by a webhook call, this
// field is set to the
// value of the `payload` field returned in the webhook response.
WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"`
// WebhookSource: If the query was fulfilled by a webhook call, this
// field is set to the
// value of the `source` field returned in the webhook response.
WebhookSource string `json:"webhookSource,omitempty"`
// ForceSendFields is a list of field names (e.g. "Action") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Action") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2QueryResult) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2QueryResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDialogflowV2QueryResult) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDialogflowV2QueryResult
var s1 struct {
IntentDetectionConfidence gensupport.JSONFloat64 `json:"intentDetectionConfidence"`
SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence)
s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence)
return nil
}
// GoogleCloudDialogflowV2WebhookRequest: The request message for a
// webhook call.
type GoogleCloudDialogflowV2WebhookRequest struct {
// OriginalDetectIntentRequest: Optional. The contents of the original
// request that was passed to
// `[Streaming]DetectIntent` call.
OriginalDetectIntentRequest *GoogleCloudDialogflowV2OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"`
// QueryResult: The result of the conversational query or event
// processing. Contains the
// same value as `[Streaming]DetectIntentResponse.query_result`.
QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"`
// ResponseId: The unique identifier of the response. Contains the same
// value as
// `[Streaming]DetectIntentResponse.response_id`.
ResponseId string `json:"responseId,omitempty"`
// Session: The unique identifier of detectIntent request session.
// Can be used to identify end-user inside webhook
// implementation.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`,
// or
// `projects/<Project ID>/agent/environments/<Environment
// ID>/users/<User
// ID>/sessions/<Session ID>`.
Session string `json:"session,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "OriginalDetectIntentRequest") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "OriginalDetectIntentRequest") to include in API requests with the
// JSON null value. By default, fields with empty values are omitted
// from API requests. However, any field with an empty value appearing
// in NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2WebhookRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2WebhookRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2WebhookResponse: The response message for a
// webhook call.
type GoogleCloudDialogflowV2WebhookResponse struct {
// FollowupEventInput: Optional. Makes the platform immediately invoke
// another `DetectIntent` call
// internally with the specified event as input.
FollowupEventInput *GoogleCloudDialogflowV2EventInput `json:"followupEventInput,omitempty"`
// FulfillmentMessages: Optional. The collection of rich messages to
// present to the user. This
// value is passed directly to `QueryResult.fulfillment_messages`.
FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"`
// FulfillmentText: Optional. The text to be shown on the screen. This
// value is passed directly
// to `QueryResult.fulfillment_text`.
FulfillmentText string `json:"fulfillmentText,omitempty"`
// OutputContexts: Optional. The collection of output contexts. This
// value is passed directly
// to `QueryResult.output_contexts`.
OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
// Payload: Optional. This value is passed directly to
// `QueryResult.webhook_payload`.
// See the related `fulfillment_messages[i].payload field`, which may be
// used
// as an alternative to this field.
//
// This field can be used for Actions on Google responses.
// It should have a structure similar to the JSON message shown here.
// For more
// information, see
// [Actions on Google
// Webhook
// Format](https://developers.google.com/actions/dialogflow/webho
// ok)
// <pre>{
// "google": {
// "expectUserResponse": true,
// "richResponse": {
// "items": [
// {
// "simpleResponse": {
// "textToSpeech": "this is a simple response"
// }
// }
// ]
// }
// }
// }</pre>
Payload googleapi.RawMessage `json:"payload,omitempty"`
// Source: Optional. This value is passed directly to
// `QueryResult.webhook_source`.
Source string `json:"source,omitempty"`
// ForceSendFields is a list of field names (e.g. "FollowupEventInput")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FollowupEventInput") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2WebhookResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2WebhookResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1Agent: Represents a conversational agent.
type GoogleCloudDialogflowV2beta1Agent struct {
// AvatarUri: Optional. The URI of the agent's avatar.
// Avatars are used throughout the Dialogflow console and in the
// self-hosted
// [Web Demo](https://dialogflow.com/docs/integrations/web-demo)
// integration.
AvatarUri string `json:"avatarUri,omitempty"`
// ClassificationThreshold: Optional. To filter out false positive
// results and still get variety in
// matched natural language inputs for your agent, you can tune the
// machine
// learning classification threshold. If the returned score value is
// less than
// the threshold value, then a fallback intent is be triggered or, if
// there
// are no fallback intents defined, no intent will be triggered. The
// score
// values range from 0.0 (completely uncertain) to 1.0 (completely
// certain).
// If set to 0.0, the default of 0.3 is used.
ClassificationThreshold float64 `json:"classificationThreshold,omitempty"`
// DefaultLanguageCode: Required. The default language of the agent as a
// language tag. See
// [Language Support](https://dialogflow.com/docs/reference/language)
// for a
// list of the currently supported language codes.
// This field cannot be set by the `Update` method.
DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"`
// Description: Optional. The description of this agent.
// The maximum length is 500 characters. If exceeded, the request is
// rejected.
Description string `json:"description,omitempty"`
// DisplayName: Required. The name of this agent.
DisplayName string `json:"displayName,omitempty"`
// EnableLogging: Optional. Determines whether this agent should log
// conversation queries.
EnableLogging bool `json:"enableLogging,omitempty"`
// MatchMode: Optional. Determines how intents are detected from user
// queries.
//
// Possible values:
// "MATCH_MODE_UNSPECIFIED" - Not specified.
// "MATCH_MODE_HYBRID" - Best for agents with a small number of
// examples in intents and/or wide
// use of templates syntax and composite entities.
// "MATCH_MODE_ML_ONLY" - Can be used for agents with a large number
// of examples in intents,
// especially the ones using @sys.any or very large developer entities.
MatchMode string `json:"matchMode,omitempty"`
// Parent: Required. The project of this agent.
// Format: `projects/<Project ID>`.
Parent string `json:"parent,omitempty"`
// SupportedLanguageCodes: Optional. The list of all languages supported
// by this agent (except for the
// `default_language_code`).
SupportedLanguageCodes []string `json:"supportedLanguageCodes,omitempty"`
// TimeZone: Required. The time zone of this agent from the
// [time zone database](https://www.iana.org/time-zones),
// e.g.,
// America/New_York, Europe/Paris.
TimeZone string `json:"timeZone,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AvatarUri") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AvatarUri") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1Agent) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1Agent
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDialogflowV2beta1Agent) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDialogflowV2beta1Agent
var s1 struct {
ClassificationThreshold gensupport.JSONFloat64 `json:"classificationThreshold"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.ClassificationThreshold = float64(s1.ClassificationThreshold)
return nil
}
// GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest: The request
// message for EntityTypes.BatchCreateEntities.
type GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest struct {
// Entities: Required. The entities to create.
Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
// LanguageCode: Optional. The language of entity synonyms defined in
// `entities`. If not
// specified, the agent's default language is used.
// [More than a
// dozen
// languages](https://dialogflow.com/docs/reference/language) are
// supported.
// Note: languages must be enabled in the agent, before they can be
// used.
LanguageCode string `json:"languageCode,omitempty"`
// ForceSendFields is a list of field names (e.g. "Entities") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Entities") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest: The request
// message for EntityTypes.BatchDeleteEntities.
type GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest struct {
// EntityValues: Required. The canonical `values` of the entities to
// delete. Note that
// these are not fully-qualified names, i.e. they don't start
// with
// `projects/<Project ID>`.
EntityValues []string `json:"entityValues,omitempty"`
// LanguageCode: Optional. The language of entity synonyms defined in
// `entities`. If not
// specified, the agent's default language is used.
// [More than a
// dozen
// languages](https://dialogflow.com/docs/reference/language) are
// supported.
// Note: languages must be enabled in the agent, before they can be
// used.
LanguageCode string `json:"languageCode,omitempty"`
// ForceSendFields is a list of field names (e.g. "EntityValues") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EntityValues") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest: The
// request message for EntityTypes.BatchDeleteEntityTypes.
type GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest struct {
// EntityTypeNames: Required. The names entity types to delete. All
// names must point to the
// same agent as `parent`.
EntityTypeNames []string `json:"entityTypeNames,omitempty"`
// ForceSendFields is a list of field names (e.g. "EntityTypeNames") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EntityTypeNames") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest: The request
// message for Intents.BatchDeleteIntents.
type GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest struct {
// Intents: Required. The collection of intents to delete. Only intent
// `name` must be
// filled in.
Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
// ForceSendFields is a list of field names (e.g. "Intents") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Intents") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest: The request
// message for EntityTypes.BatchUpdateEntities.
type GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest struct {
// Entities: Required. The entities to update or create.
Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
// LanguageCode: Optional. The language of entity synonyms defined in
// `entities`. If not
// specified, the agent's default language is used.
// [More than a
// dozen
// languages](https://dialogflow.com/docs/reference/language) are
// supported.
// Note: languages must be enabled in the agent, before they can be
// used.
LanguageCode string `json:"languageCode,omitempty"`
// UpdateMask: Optional. The mask to control which fields get updated.
UpdateMask string `json:"updateMask,omitempty"`
// ForceSendFields is a list of field names (e.g. "Entities") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Entities") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest: The
// request message for EntityTypes.BatchUpdateEntityTypes.
type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest struct {
// EntityTypeBatchInline: The collection of entity types to update or
// create.
EntityTypeBatchInline *GoogleCloudDialogflowV2beta1EntityTypeBatch `json:"entityTypeBatchInline,omitempty"`
// EntityTypeBatchUri: The URI to a Google Cloud Storage file containing
// entity types to update
// or create. The file format can either be a serialized proto
// (of
// EntityBatch type) or a JSON object. Note: The URI must start
// with
// "gs://".
EntityTypeBatchUri string `json:"entityTypeBatchUri,omitempty"`
// LanguageCode: Optional. The language of entity synonyms defined in
// `entity_types`. If not
// specified, the agent's default language is used.
// [More than a
// dozen
// languages](https://dialogflow.com/docs/reference/language) are
// supported.
// Note: languages must be enabled in the agent, before they can be
// used.
LanguageCode string `json:"languageCode,omitempty"`
// UpdateMask: Optional. The mask to control which fields get updated.
UpdateMask string `json:"updateMask,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "EntityTypeBatchInline") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EntityTypeBatchInline") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse: The
// response message for EntityTypes.BatchUpdateEntityTypes.
type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse struct {
// EntityTypes: The collection of updated or created entity types.
EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
// ForceSendFields is a list of field names (e.g. "EntityTypes") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EntityTypes") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest: The request
// message for Intents.BatchUpdateIntents.
type GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest struct {
// IntentBatchInline: The collection of intents to update or create.
IntentBatchInline *GoogleCloudDialogflowV2beta1IntentBatch `json:"intentBatchInline,omitempty"`
// IntentBatchUri: The URI to a Google Cloud Storage file containing
// intents to update or
// create. The file format can either be a serialized proto (of
// IntentBatch
// type) or JSON object. Note: The URI must start with "gs://".
IntentBatchUri string `json:"intentBatchUri,omitempty"`
// IntentView: Optional. The resource view to apply to the returned
// intent.
//
// Possible values:
// "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
// in the response.
// "INTENT_VIEW_FULL" - All fields are populated.
IntentView string `json:"intentView,omitempty"`
// LanguageCode: Optional. The language of training phrases, parameters
// and rich messages
// defined in `intents`. If not specified, the agent's default language
// is
// used. [More than a
// dozen
// languages](https://dialogflow.com/docs/reference/language) are
// supported.
// Note: languages must be enabled in the agent, before they can be
// used.
LanguageCode string `json:"languageCode,omitempty"`
// UpdateMask: Optional. The mask to control which fields get updated.
UpdateMask string `json:"updateMask,omitempty"`
// ForceSendFields is a list of field names (e.g. "IntentBatchInline")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "IntentBatchInline") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse: The response
// message for Intents.BatchUpdateIntents.
type GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse struct {
// Intents: The collection of updated or created intents.
Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
// ForceSendFields is a list of field names (e.g. "Intents") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Intents") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1Context: Represents a context.
type GoogleCloudDialogflowV2beta1Context struct {
// LifespanCount: Optional. The number of conversational query requests
// after which the
// context expires. If set to `0` (the default) the context
// expires
// immediately. Contexts expire automatically after 10 minutes even if
// there
// are no matching queries.
LifespanCount int64 `json:"lifespanCount,omitempty"`
// Name: Required. The unique identifier of the context.
// Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context
// ID>`,
// or `projects/<Project ID>/agent/environments/<Environment
// ID>/users/<User
// ID>/sessions/<Session ID>/contexts/<Context ID>`.
//
// The `Context ID` is always converted to lowercase, may only
// contain
// characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
//
// If `Environment ID` is not specified, we assume default
// 'draft'
// environment. If `User ID` is not specified, we assume default '-'
// user.
Name string `json:"name,omitempty"`
// Parameters: Optional. The collection of parameters associated with
// this context.
// Refer to [this
// doc](https://dialogflow.com/docs/actions-and-parameters) for
// syntax.
Parameters googleapi.RawMessage `json:"parameters,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "LifespanCount") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "LifespanCount") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1Context) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1Context
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1DetectIntentRequest: The request to
// detect user's intent.
type GoogleCloudDialogflowV2beta1DetectIntentRequest struct {
// InputAudio: Optional. The natural language speech audio to be
// processed. This field
// should be populated iff `query_input` is set to an input audio
// config.
// A single request can contain up to 1 minute of speech audio data.
InputAudio string `json:"inputAudio,omitempty"`
// OutputAudioConfig: Optional. Instructs the speech synthesizer how to
// generate the output
// audio. If this field is not set and agent-level speech synthesizer is
// not
// configured, no output audio is generated.
OutputAudioConfig *GoogleCloudDialogflowV2beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"`
// QueryInput: Required. The input specification. It can be set to:
//
// 1. an audio config
// which instructs the speech recognizer how to process the speech
// audio,
//
// 2. a conversational query in the form of text, or
//
// 3. an event that specifies which intent to trigger.
QueryInput *GoogleCloudDialogflowV2beta1QueryInput `json:"queryInput,omitempty"`
// QueryParams: Optional. The parameters of this query.
QueryParams *GoogleCloudDialogflowV2beta1QueryParameters `json:"queryParams,omitempty"`
// ForceSendFields is a list of field names (e.g. "InputAudio") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InputAudio") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1DetectIntentRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1DetectIntentRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1DetectIntentResponse: The message
// returned from the DetectIntent method.
type GoogleCloudDialogflowV2beta1DetectIntentResponse struct {
// AlternativeQueryResults: If Knowledge Connectors are enabled, there
// could be more than one result
// returned for a given query or event, and this field will contain
// all
// results except for the top one, which is captured in query_result.
// The
// alternative results are ordered by
// decreasing
// `QueryResult.intent_detection_confidence`. If Knowledge Connectors
// are
// disabled, this field will be empty until multiple responses for
// regular
// intents are supported, at which point those additional results will
// be
// surfaced here.
AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"`
// OutputAudio: The audio data bytes encoded as specified in the
// request.
OutputAudio string `json:"outputAudio,omitempty"`
// OutputAudioConfig: Instructs the speech synthesizer how to generate
// the output audio. This
// field is populated from the agent-level speech synthesizer
// configuration,
// if enabled.
OutputAudioConfig *GoogleCloudDialogflowV2beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"`
// QueryResult: The selected results of the conversational query or
// event processing.
// See `alternative_query_results` for additional potential results.
QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"`
// ResponseId: The unique identifier of the response. It can be used
// to
// locate a response in the training example set or for reporting
// issues.
ResponseId string `json:"responseId,omitempty"`
// WebhookStatus: Specifies the status of the webhook request.
WebhookStatus *GoogleRpcStatus `json:"webhookStatus,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g.
// "AlternativeQueryResults") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AlternativeQueryResults")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1DetectIntentResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1DetectIntentResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1Document: A document resource.
//
// Note: resource `projects.agent.knowledgeBases.documents` is
// deprecated,
// please use `projects.knowledgeBases.documents` instead.
type GoogleCloudDialogflowV2beta1Document struct {
// Content: The raw content of the document. This field is only
// permitted for
// EXTRACTIVE_QA and FAQ knowledge types.
// Note: This field is in the process of being deprecated, please
// use
// raw_content instead.
Content string `json:"content,omitempty"`
// ContentUri: The URI where the file content is located.
//
// For documents stored in Google Cloud Storage, these URIs must
// have
// the form `gs://<bucket-name>/<object-name>`.
//
// NOTE: External URLs must correspond to public webpages, i.e., they
// must
// be indexed by Google Search. In particular, URLs for showing
// documents in
// Google Cloud Storage (i.e. the URL in your browser) are not
// supported.
// Instead use the `gs://` format URI described above.
ContentUri string `json:"contentUri,omitempty"`
// DisplayName: Required. The display name of the document. The name
// must be 1024 bytes or
// less; otherwise, the creation request fails.
DisplayName string `json:"displayName,omitempty"`
// KnowledgeTypes: Required. The knowledge type of document content.
//
// Possible values:
// "KNOWLEDGE_TYPE_UNSPECIFIED" - The type is unspecified or
// arbitrary.
// "FAQ" - The document content contains question and answer pairs as
// either HTML or
// CSV. Typical FAQ HTML formats are parsed accurately, but unusual
// formats
// may fail to be parsed.
//
// CSV must have questions in the first column and answers in the
// second,
// with no header. Because of this explicit format, they are always
// parsed
// accurately.
// "EXTRACTIVE_QA" - Documents for which unstructured text is
// extracted and used for
// question answering.
KnowledgeTypes []string `json:"knowledgeTypes,omitempty"`
// MimeType: Required. The MIME type of this document.
MimeType string `json:"mimeType,omitempty"`
// Name: The document resource name.
// The name must be empty when creating a document.
// Format: `projects/<Project ID>/knowledgeBases/<Knowledge
// Base
// ID>/documents/<Document ID>`.
Name string `json:"name,omitempty"`
// RawContent: The raw content of the document. This field is only
// permitted for
// EXTRACTIVE_QA and FAQ knowledge types.
RawContent string `json:"rawContent,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Content") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Content") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1Document) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1Document
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1EntityType: Represents an entity
// type.
// Entity types serve as a tool for extracting parameter values from
// natural
// language queries.
type GoogleCloudDialogflowV2beta1EntityType struct {
// AutoExpansionMode: Optional. Indicates whether the entity type can be
// automatically
// expanded.
//
// Possible values:
// "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the
// entity.
// "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values
// that have not been explicitly
// listed in the entity.
AutoExpansionMode string `json:"autoExpansionMode,omitempty"`
// DisplayName: Required. The name of the entity type.
DisplayName string `json:"displayName,omitempty"`
// Entities: Optional. The collection of entities associated with the
// entity type.
Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
// Kind: Required. Indicates the kind of entity type.
//
// Possible values:
// "KIND_UNSPECIFIED" - Not specified. This value should be never
// used.
// "KIND_MAP" - Map entity types allow mapping of a group of synonyms
// to a canonical
// value.
// "KIND_LIST" - List entity types contain a set of entries that do
// not map to canonical
// values. However, list entity types can contain references to other
// entity
// types (with or without aliases).
Kind string `json:"kind,omitempty"`
// Name: The unique identifier of the entity type.
// Required for EntityTypes.UpdateEntityType
// and
// EntityTypes.BatchUpdateEntityTypes methods.
// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
Name string `json:"name,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AutoExpansionMode")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AutoExpansionMode") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1EntityType) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1EntityType
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1EntityTypeBatch: This message is a
// wrapper around a collection of entity types.
type GoogleCloudDialogflowV2beta1EntityTypeBatch struct {
// EntityTypes: A collection of entity types.
EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
// ForceSendFields is a list of field names (e.g. "EntityTypes") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EntityTypes") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1EntityTypeBatch) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1EntityTypeBatch
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1EntityTypeEntity: Optional. Represents an
// entity.
type GoogleCloudDialogflowV2beta1EntityTypeEntity struct {
// Synonyms: Required. A collection of synonyms. For `KIND_LIST` entity
// types this
// must contain exactly one synonym equal to `value`.
Synonyms []string `json:"synonyms,omitempty"`
// Value: Required.
// For `KIND_MAP` entity types:
// A canonical name to be used in place of synonyms.
// For `KIND_LIST` entity types:
// A string that can contain references to other entity types (with
// or
// without aliases).
Value string `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "Synonyms") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Synonyms") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1EntityTypeEntity) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1EntityTypeEntity
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1EventInput: Events allow for matching
// intents by event name instead of the natural
// language input. For instance, input `<event: { name:
// “welcome_event”,
// parameters: { name: “Sam” } }>` can trigger a personalized
// welcome response.
// The parameter `name` may be used by the agent in the
// response:
// `“Hello #welcome_event.name! What can I do for you today?”`.
type GoogleCloudDialogflowV2beta1EventInput struct {
// LanguageCode: Required. The language of this query. See
// [Language
// Support](https://dialogflow.com/docs/languages) for a list of
// the
// currently supported language codes. Note that queries in the same
// session
// do not necessarily need to specify the same language.
LanguageCode string `json:"languageCode,omitempty"`
// Name: Required. The unique identifier of the event.
Name string `json:"name,omitempty"`
// Parameters: Optional. The collection of parameters associated with
// the event.
Parameters googleapi.RawMessage `json:"parameters,omitempty"`
// ForceSendFields is a list of field names (e.g. "LanguageCode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "LanguageCode") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1EventInput) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1EventInput
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1ExportAgentRequest: The request message
// for Agents.ExportAgent.
type GoogleCloudDialogflowV2beta1ExportAgentRequest struct {
// AgentUri: Optional. The
// [Google Cloud Storage](https://cloud.google.com/storage/docs/)
// URI to export the agent to.
// The format of this URI must be `gs://<bucket-name>/<object-name>`.
// If left unspecified, the serialized agent is returned inline.
AgentUri string `json:"agentUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "AgentUri") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AgentUri") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1ExportAgentRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1ExportAgentRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1ExportAgentResponse: The response message
// for Agents.ExportAgent.
type GoogleCloudDialogflowV2beta1ExportAgentResponse struct {
// AgentContent: The exported agent.
//
// Example for how to export an agent to a zip file via a command
// line:
// <pre>curl \
//
// 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&g
// t;/agent:export'\
// -X POST \
// -H 'Authorization: Bearer '$(gcloud auth application-default
// print-access-token) \
// -H 'Accept: application/json' \
// -H 'Content-Type: application/json' \
// --compressed \
// --data-binary '{}' \
// | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/'
// \
// | base64 --decode > &lt;agent zip file&gt;</pre>
AgentContent string `json:"agentContent,omitempty"`
// AgentUri: The URI to a file containing the exported agent. This field
// is populated
// only if `agent_uri` is specified in `ExportAgentRequest`.
AgentUri string `json:"agentUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "AgentContent") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AgentContent") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1ExportAgentResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1ExportAgentResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1ImportAgentRequest: The request message
// for Agents.ImportAgent.
type GoogleCloudDialogflowV2beta1ImportAgentRequest struct {
// AgentContent: The agent to import.
//
// Example for how to import an agent via the command line:
// <pre>curl \
//
// 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&g
// t;/agent:import\
// -X POST \
// -H 'Authorization: Bearer '$(gcloud auth application-default
// print-access-token) \
// -H 'Accept: application/json' \
// -H 'Content-Type: application/json' \
// --compressed \
// --data-binary "{
// 'agentContent': '$(cat &lt;agent zip file&gt; | base64 -w 0)'
// }"</pre>
AgentContent string `json:"agentContent,omitempty"`
// AgentUri: The URI to a Google Cloud Storage file containing the agent
// to import.
// Note: The URI must start with "gs://".
AgentUri string `json:"agentUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "AgentContent") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AgentContent") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1ImportAgentRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1ImportAgentRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1InputAudioConfig: Instructs the speech
// recognizer how to process the audio content.
type GoogleCloudDialogflowV2beta1InputAudioConfig struct {
// AudioEncoding: Required. Audio encoding of the audio content to
// process.
//
// Possible values:
// "AUDIO_ENCODING_UNSPECIFIED" - Not specified.
// "AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
// little-endian samples (Linear PCM).
// "AUDIO_ENCODING_FLAC" -
// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless
// Audio
// Codec) is the recommended encoding because it is lossless
// (therefore
// recognition is not compromised) and requires only about half
// the
// bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit
// and
// 24-bit samples, however, not all fields in `STREAMINFO` are
// supported.
// "AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit audio
// samples using G.711 PCMU/mu-law.
// "AUDIO_ENCODING_AMR" - Adaptive Multi-Rate Narrowband codec.
// `sample_rate_hertz` must be 8000.
// "AUDIO_ENCODING_AMR_WB" - Adaptive Multi-Rate Wideband codec.
// `sample_rate_hertz` must be 16000.
// "AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio frames in Ogg
// container
// ([OggOpus](https://wiki.xiph.org/OggOpus)).
// `sample_rate_her
// tz` must be 16000.
// "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE" - Although the use of lossy
// encodings is not recommended, if a very low
// bitrate encoding is required, `OGG_OPUS` is highly preferred
// over
// Speex encoding. The [Speex](https://speex.org/) encoding supported
// by
// Dialogflow API has a header byte in each block, as in MIME
// type
// `audio/x-speex-with-header-byte`.
// It is a variant of the RTP Speex encoding defined in
// [RFC 5574](https://tools.ietf.org/html/rfc5574).
// The stream is a sequence of blocks, one block per RTP packet. Each
// block
// starts with a byte containing the length of the block, in bytes,
// followed
// by one or more frames of Speex data, padded to an integral number
// of
// bytes (octets) as specified in RFC 5574. In other words, each RTP
// header
// is replaced with a single byte containing the block length. Only
// Speex
// wideband is supported. `sample_rate_hertz` must be 16000.
AudioEncoding string `json:"audioEncoding,omitempty"`
// LanguageCode: Required. The language of the supplied audio.
// Dialogflow does not do
// translations. See
// [Language
// Support](https://dialogflow.com/docs/languages) for a list of
// the
// currently supported language codes. Note that queries in the same
// session
// do not necessarily need to specify the same language.
LanguageCode string `json:"languageCode,omitempty"`
// Model: Optional. Which Speech model to select for the given request.
// Select the
// model best suited to your domain to get best results. If a model is
// not
// explicitly specified, then we auto-select a model based on the
// parameters
// in the InputAudioConfig.
// If enhanced speech model is enabled for the agent and an
// enhanced
// version of the specified model for the language does not exist, then
// the
// speech is recognized using the standard version of the specified
// model.
// Refer to
// [Cloud Speech
// API
// documentation](https://cloud.google.com/speech-to-text/docs/basics
// #select-model)
// for more details.
Model string `json:"model,omitempty"`
// PhraseHints: Optional. The collection of phrase hints which are used
// to boost accuracy
// of speech recognition.
// Refer to
// [Cloud Speech
// API
// documentation](https://cloud.google.com/speech-to-text/docs/basics
// #phrase-hints)
// for more details.
PhraseHints []string `json:"phraseHints,omitempty"`
// SampleRateHertz: Required. Sample rate (in Hertz) of the audio
// content sent in the query.
// Refer to
// [Cloud Speech
// API
// documentation](https://cloud.google.com/speech-to-text/docs/basics
// ) for
// more details.
SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AudioEncoding") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDialogflowV2beta1InputAudioConfig) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDialogflowV2beta1InputAudioConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDialogflowV2beta1Intent: Represents an intent.
// Intents convert a number of user expressions or patterns into an
// action. An
// action is an extraction of a user command or sentence semantics.
type GoogleCloudDialogflowV2beta1Intent struct {
// Action: Optional. The name of the action associated with the
// intent.
// Note: The action name must not contain whitespaces.
Action string `json:"action,omitempty"`
// DefaultResponsePlatforms: Optional. The list of platforms for which
// the first response will be
// taken from among the messages assigned to the DEFAULT_PLATFORM.
//
// Possible values:
// "PLATFORM_UNSPECIFIED" - Not specified.
// "FACEBOOK" - Facebook.
// "SLACK" - Slack.
// "TELEGRAM" - Telegram.
// "KIK" - Kik.
// "SKYPE" - Skype.
// "LINE" - Line.
// "VIBER" - Viber.
// "ACTIONS_ON_GOOGLE" - Actions on Google.
// When using Actions on Google, you can choose one of the
// specific
// Intent.Message types that mention support for Actions on Google,
// or you can use the advanced Intent.Message.payload field.
// The payload field provides access to AoG features not available in
// the
// specific message types.
// If using the Intent.Message.payload field, it should have a
// structure
// similar to the JSON message shown here. For more information,
// see
// [Actions on Google
// Webhook
// Format](https://developers.google.com/actions/dialogflow/webho
// ok)
// <pre>{
// "expectUserResponse": true,
// "isSsml": false,
// "noInputPrompts": [],
// "richResponse": {
// "items": [
// {
// "simpleResponse": {
// "displayText": "hi",
// "textToSpeech": "hello"
// }
// }
// ],
// "suggestions": [
// {
// "title": "Say this"
// },
// {
// "title": "or this"
// }
// ]
// },
// "systemIntent": {
// "data": {
// "@type":
// "type.googleapis.com/google.actions.v2.OptionValueSpec",
// "listSelect": {
// "items": [
// {
// "optionInfo": {
// "key": "key1",
// "synonyms": [
// "key one"
// ]
// },
// "title": "must not be empty, but unique"
// },
// {
// "optionInfo": {
// "key": "key2",
// "synonyms": [
// "key two"
// ]
// },
// "title": "must not be empty, but unique"
// }
// ]
// }
// },
// "intent": "actions.intent.OPTION"
// }
// }</pre>
// "TELEPHONY" - Telephony Gateway.
DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"`
// DisplayName: Required. The name of this intent.
DisplayName string `json:"displayName,omitempty"`
// EndInteraction: Optional. Indicates that this intent ends an
// interaction. Some integrations
// (e.g., Actions on Google or Dialogflow phone gateway) use this
// information
// to close interaction with an end user. Default is false.
EndInteraction bool `json:"endInteraction,omitempty"`
// Events: Optional. The collection of event names that trigger the
// intent.
// If the collection of input contexts is not empty, all of the contexts
// must
// be present in the active user session for an event to trigger this
// intent.
Events []string `json:"events,omitempty"`
// FollowupIntentInfo: Read-only. Information about all followup intents
// that have this intent as
// a direct or indirect parent. We populate this field only in the
// output.
FollowupIntentInfo []*GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"`
// InputContextNames: Optional. The list of context names required for
// this intent to be
// triggered.
// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
// ID>`.
InputContextNames []string `json:"inputContextNames,omitempty"`
// IsFallback: Optional. Indicates whether this is a fallback intent.
IsFallback bool `json:"isFallback,omitempty"`
// Messages: Optional. The collection of rich messages corresponding to
// the
// `Response` field in the Dialogflow console.
Messages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"messages,omitempty"`
// MlDisabled: Optional. Indicates whether Machine Learning is disabled
// for the intent.
// Note: If `ml_disabled` setting is set to true, then this intent is
// not
// taken into account during inference in `ML ONLY` match mode.
// Also,
// auto-markup in the UI is turned off.
MlDisabled bool `json:"mlDisabled,omitempty"`
// MlEnabled: Optional. Indicates whether Machine Learning is enabled
// for the intent.
// Note: If `ml_enabled` setting is set to false, then this intent is
// not
// taken into account during inference in `ML ONLY` match mode.
// Also,
// auto-markup in the UI is turned off.
// DEPRECATED! Please use `ml_disabled` field instead.
// NOTE: If both `ml_enabled` and `ml_disabled` are either not set or
// false,
// then the default value is determined as follows:
// - Before April 15th, 2018 the default is:
// ml_enabled = false / ml_disabled = true.
// - After April 15th, 2018 the default is:
// ml_enabled = true / ml_disabled = false.
MlEnabled bool `json:"mlEnabled,omitempty"`
// Name: The unique identifier of this intent.
// Required for Intents.UpdateIntent and
// Intents.BatchUpdateIntents
// methods.
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
Name string `json:"name,omitempty"`
// OutputContexts: Optional. The collection of contexts that are
// activated when the intent
// is matched. Context messages in this collection should not set
// the
// parameters field. Setting the `lifespan_count` to 0 will reset the
// context
// when the intent is matched.
// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
// ID>`.
OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
// Parameters: Optional. The collection of parameters associated with
// the intent.
Parameters []*GoogleCloudDialogflowV2beta1IntentParameter `json:"parameters,omitempty"`
// ParentFollowupIntentName: Read-only after creation. The unique
// identifier of the parent intent in the
// chain of followup intents. You can set this field when creating an
// intent,
// for example with CreateIntent or BatchUpdateIntents, in order to
// make this intent a followup intent.
//
// It identifies the parent followup intent.
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
// Priority: Optional. The priority of this intent. Higher numbers
// represent higher
// priorities. If this is zero or unspecified, we use the
// default
// priority 500000.
//
// Negative numbers mean that the intent is disabled.
Priority int64 `json:"priority,omitempty"`
// ResetContexts: Optional. Indicates whether to delete all contexts in
// the current
// session when this intent is matched.
ResetContexts bool `json:"resetContexts,omitempty"`
// RootFollowupIntentName: Read-only. The unique identifier of the root