1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package dialogflow provides access to the Dialogflow API. 8// 9// This package is DEPRECATED. Use package cloud.google.com/go/dialogflow/apiv2 instead. 10// 11// For product documentation, see: https://cloud.google.com/dialogflow/ 12// 13// Creating a client 14// 15// Usage example: 16// 17// import "google.golang.org/api/dialogflow/v3beta1" 18// ... 19// ctx := context.Background() 20// dialogflowService, err := dialogflow.NewService(ctx) 21// 22// In this example, Google Application Default Credentials are used for authentication. 23// 24// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 25// 26// Other authentication options 27// 28// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: 29// 30// dialogflowService, err := dialogflow.NewService(ctx, option.WithScopes(dialogflow.DialogflowScope)) 31// 32// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 33// 34// dialogflowService, err := dialogflow.NewService(ctx, option.WithAPIKey("AIza...")) 35// 36// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 37// 38// config := &oauth2.Config{...} 39// // ... 40// token, err := config.Exchange(ctx, ...) 41// dialogflowService, err := dialogflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 42// 43// See https://godoc.org/google.golang.org/api/option/ for details on options. 44package dialogflow // import "google.golang.org/api/dialogflow/v3beta1" 45 46import ( 47 "bytes" 48 "context" 49 "encoding/json" 50 "errors" 51 "fmt" 52 "io" 53 "net/http" 54 "net/url" 55 "strconv" 56 "strings" 57 58 googleapi "google.golang.org/api/googleapi" 59 gensupport "google.golang.org/api/internal/gensupport" 60 option "google.golang.org/api/option" 61 internaloption "google.golang.org/api/option/internaloption" 62 htransport "google.golang.org/api/transport/http" 63) 64 65// Always reference these packages, just in case the auto-generated code 66// below doesn't. 67var _ = bytes.NewBuffer 68var _ = strconv.Itoa 69var _ = fmt.Sprintf 70var _ = json.NewDecoder 71var _ = io.Copy 72var _ = url.Parse 73var _ = gensupport.MarshalJSON 74var _ = googleapi.Version 75var _ = errors.New 76var _ = strings.Replace 77var _ = context.Canceled 78var _ = internaloption.WithDefaultEndpoint 79 80const apiId = "dialogflow:v3beta1" 81const apiName = "dialogflow" 82const apiVersion = "v3beta1" 83const basePath = "https://dialogflow.googleapis.com/" 84const mtlsBasePath = "https://dialogflow.mtls.googleapis.com/" 85 86// OAuth2 scopes used by this API. 87const ( 88 // View and manage your data across Google Cloud Platform services 89 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 90 91 // View, manage and query your Dialogflow agents 92 DialogflowScope = "https://www.googleapis.com/auth/dialogflow" 93) 94 95// NewService creates a new Service. 96func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 97 scopesOption := option.WithScopes( 98 "https://www.googleapis.com/auth/cloud-platform", 99 "https://www.googleapis.com/auth/dialogflow", 100 ) 101 // NOTE: prepend, so we don't override user-specified scopes. 102 opts = append([]option.ClientOption{scopesOption}, opts...) 103 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 104 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 105 client, endpoint, err := htransport.NewClient(ctx, opts...) 106 if err != nil { 107 return nil, err 108 } 109 s, err := New(client) 110 if err != nil { 111 return nil, err 112 } 113 if endpoint != "" { 114 s.BasePath = endpoint 115 } 116 return s, nil 117} 118 119// New creates a new Service. It uses the provided http.Client for requests. 120// 121// Deprecated: please use NewService instead. 122// To provide a custom HTTP client, use option.WithHTTPClient. 123// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 124func New(client *http.Client) (*Service, error) { 125 if client == nil { 126 return nil, errors.New("client is nil") 127 } 128 s := &Service{client: client, BasePath: basePath} 129 s.Projects = NewProjectsService(s) 130 return s, nil 131} 132 133type Service struct { 134 client *http.Client 135 BasePath string // API endpoint base URL 136 UserAgent string // optional additional User-Agent fragment 137 138 Projects *ProjectsService 139} 140 141func (s *Service) userAgent() string { 142 if s.UserAgent == "" { 143 return googleapi.UserAgent 144 } 145 return googleapi.UserAgent + " " + s.UserAgent 146} 147 148func NewProjectsService(s *Service) *ProjectsService { 149 rs := &ProjectsService{s: s} 150 rs.Locations = NewProjectsLocationsService(s) 151 rs.Operations = NewProjectsOperationsService(s) 152 return rs 153} 154 155type ProjectsService struct { 156 s *Service 157 158 Locations *ProjectsLocationsService 159 160 Operations *ProjectsOperationsService 161} 162 163func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 164 rs := &ProjectsLocationsService{s: s} 165 rs.Agents = NewProjectsLocationsAgentsService(s) 166 rs.Operations = NewProjectsLocationsOperationsService(s) 167 return rs 168} 169 170type ProjectsLocationsService struct { 171 s *Service 172 173 Agents *ProjectsLocationsAgentsService 174 175 Operations *ProjectsLocationsOperationsService 176} 177 178func NewProjectsLocationsAgentsService(s *Service) *ProjectsLocationsAgentsService { 179 rs := &ProjectsLocationsAgentsService{s: s} 180 rs.EntityTypes = NewProjectsLocationsAgentsEntityTypesService(s) 181 rs.Environments = NewProjectsLocationsAgentsEnvironmentsService(s) 182 rs.Flows = NewProjectsLocationsAgentsFlowsService(s) 183 rs.Intents = NewProjectsLocationsAgentsIntentsService(s) 184 rs.Sessions = NewProjectsLocationsAgentsSessionsService(s) 185 rs.Webhooks = NewProjectsLocationsAgentsWebhooksService(s) 186 return rs 187} 188 189type ProjectsLocationsAgentsService struct { 190 s *Service 191 192 EntityTypes *ProjectsLocationsAgentsEntityTypesService 193 194 Environments *ProjectsLocationsAgentsEnvironmentsService 195 196 Flows *ProjectsLocationsAgentsFlowsService 197 198 Intents *ProjectsLocationsAgentsIntentsService 199 200 Sessions *ProjectsLocationsAgentsSessionsService 201 202 Webhooks *ProjectsLocationsAgentsWebhooksService 203} 204 205func NewProjectsLocationsAgentsEntityTypesService(s *Service) *ProjectsLocationsAgentsEntityTypesService { 206 rs := &ProjectsLocationsAgentsEntityTypesService{s: s} 207 return rs 208} 209 210type ProjectsLocationsAgentsEntityTypesService struct { 211 s *Service 212} 213 214func NewProjectsLocationsAgentsEnvironmentsService(s *Service) *ProjectsLocationsAgentsEnvironmentsService { 215 rs := &ProjectsLocationsAgentsEnvironmentsService{s: s} 216 rs.Sessions = NewProjectsLocationsAgentsEnvironmentsSessionsService(s) 217 return rs 218} 219 220type ProjectsLocationsAgentsEnvironmentsService struct { 221 s *Service 222 223 Sessions *ProjectsLocationsAgentsEnvironmentsSessionsService 224} 225 226func NewProjectsLocationsAgentsEnvironmentsSessionsService(s *Service) *ProjectsLocationsAgentsEnvironmentsSessionsService { 227 rs := &ProjectsLocationsAgentsEnvironmentsSessionsService{s: s} 228 rs.EntityTypes = NewProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService(s) 229 return rs 230} 231 232type ProjectsLocationsAgentsEnvironmentsSessionsService struct { 233 s *Service 234 235 EntityTypes *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService 236} 237 238func NewProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService(s *Service) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService { 239 rs := &ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService{s: s} 240 return rs 241} 242 243type ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService struct { 244 s *Service 245} 246 247func NewProjectsLocationsAgentsFlowsService(s *Service) *ProjectsLocationsAgentsFlowsService { 248 rs := &ProjectsLocationsAgentsFlowsService{s: s} 249 rs.Pages = NewProjectsLocationsAgentsFlowsPagesService(s) 250 rs.TransitionRouteGroups = NewProjectsLocationsAgentsFlowsTransitionRouteGroupsService(s) 251 rs.Versions = NewProjectsLocationsAgentsFlowsVersionsService(s) 252 return rs 253} 254 255type ProjectsLocationsAgentsFlowsService struct { 256 s *Service 257 258 Pages *ProjectsLocationsAgentsFlowsPagesService 259 260 TransitionRouteGroups *ProjectsLocationsAgentsFlowsTransitionRouteGroupsService 261 262 Versions *ProjectsLocationsAgentsFlowsVersionsService 263} 264 265func NewProjectsLocationsAgentsFlowsPagesService(s *Service) *ProjectsLocationsAgentsFlowsPagesService { 266 rs := &ProjectsLocationsAgentsFlowsPagesService{s: s} 267 return rs 268} 269 270type ProjectsLocationsAgentsFlowsPagesService struct { 271 s *Service 272} 273 274func NewProjectsLocationsAgentsFlowsTransitionRouteGroupsService(s *Service) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsService { 275 rs := &ProjectsLocationsAgentsFlowsTransitionRouteGroupsService{s: s} 276 return rs 277} 278 279type ProjectsLocationsAgentsFlowsTransitionRouteGroupsService struct { 280 s *Service 281} 282 283func NewProjectsLocationsAgentsFlowsVersionsService(s *Service) *ProjectsLocationsAgentsFlowsVersionsService { 284 rs := &ProjectsLocationsAgentsFlowsVersionsService{s: s} 285 return rs 286} 287 288type ProjectsLocationsAgentsFlowsVersionsService struct { 289 s *Service 290} 291 292func NewProjectsLocationsAgentsIntentsService(s *Service) *ProjectsLocationsAgentsIntentsService { 293 rs := &ProjectsLocationsAgentsIntentsService{s: s} 294 return rs 295} 296 297type ProjectsLocationsAgentsIntentsService struct { 298 s *Service 299} 300 301func NewProjectsLocationsAgentsSessionsService(s *Service) *ProjectsLocationsAgentsSessionsService { 302 rs := &ProjectsLocationsAgentsSessionsService{s: s} 303 rs.EntityTypes = NewProjectsLocationsAgentsSessionsEntityTypesService(s) 304 return rs 305} 306 307type ProjectsLocationsAgentsSessionsService struct { 308 s *Service 309 310 EntityTypes *ProjectsLocationsAgentsSessionsEntityTypesService 311} 312 313func NewProjectsLocationsAgentsSessionsEntityTypesService(s *Service) *ProjectsLocationsAgentsSessionsEntityTypesService { 314 rs := &ProjectsLocationsAgentsSessionsEntityTypesService{s: s} 315 return rs 316} 317 318type ProjectsLocationsAgentsSessionsEntityTypesService struct { 319 s *Service 320} 321 322func NewProjectsLocationsAgentsWebhooksService(s *Service) *ProjectsLocationsAgentsWebhooksService { 323 rs := &ProjectsLocationsAgentsWebhooksService{s: s} 324 return rs 325} 326 327type ProjectsLocationsAgentsWebhooksService struct { 328 s *Service 329} 330 331func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 332 rs := &ProjectsLocationsOperationsService{s: s} 333 return rs 334} 335 336type ProjectsLocationsOperationsService struct { 337 s *Service 338} 339 340func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { 341 rs := &ProjectsOperationsService{s: s} 342 return rs 343} 344 345type ProjectsOperationsService struct { 346 s *Service 347} 348 349// GoogleCloudDialogflowCxV3beta1Agent: Agents are best described as 350// Natural Language Understanding (NLU) modules that transform user 351// requests into actionable data. You can include agents in your app, 352// product, or service to determine user intent and respond to the user 353// in a natural way. After you create an agent, you can add Intents, 354// Entity Types, Flows, Fulfillments, Webhooks, and so on to manage the 355// conversation flows.. 356type GoogleCloudDialogflowCxV3beta1Agent struct { 357 // AvatarUri: The URI of the agent's avatar. Avatars are used throughout 358 // the Dialogflow console and in the self-hosted [Web 359 // Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) 360 // integration. 361 AvatarUri string `json:"avatarUri,omitempty"` 362 363 // DefaultLanguageCode: Immutable. The default language of the agent as 364 // a language tag. See [Language 365 // Support](https://cloud.google.com/dialogflow/docs/reference/language) 366 // for a list of the currently supported language codes. This field 367 // cannot be set by the Agents.UpdateAgent method. 368 DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` 369 370 // Description: The description of the agent. The maximum length is 500 371 // characters. If exceeded, the request is rejected. 372 Description string `json:"description,omitempty"` 373 374 // DisplayName: Required. The human-readable name of the agent, unique 375 // within the location. 376 DisplayName string `json:"displayName,omitempty"` 377 378 // EnableSpellCorrection: Indicates if automatic spell correction is 379 // enabled in detect intent requests. 380 EnableSpellCorrection bool `json:"enableSpellCorrection,omitempty"` 381 382 // EnableStackdriverLogging: Indicates if stackdriver logging is enabled 383 // for the agent. 384 EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` 385 386 // Name: The unique identifier of the agent. Required for the 387 // Agents.UpdateAgent method. Agents.CreateAgent populates the name 388 // automatically. Format: `projects//locations//agents/`. 389 Name string `json:"name,omitempty"` 390 391 // SpeechToTextSettings: Speech recognition related settings. 392 SpeechToTextSettings *GoogleCloudDialogflowCxV3beta1SpeechToTextSettings `json:"speechToTextSettings,omitempty"` 393 394 // StartFlow: Immutable. Name of the start flow in this agent. A start 395 // flow will be automatically created when the agent is created, and can 396 // only be deleted by deleting the agent. Format: 397 // `projects//locations//agents//flows/`. 398 StartFlow string `json:"startFlow,omitempty"` 399 400 // TimeZone: Required. The time zone of the agent from the [time zone 401 // database](https://www.iana.org/time-zones), e.g., America/New_York, 402 // Europe/Paris. 403 TimeZone string `json:"timeZone,omitempty"` 404 405 // ServerResponse contains the HTTP response code and headers from the 406 // server. 407 googleapi.ServerResponse `json:"-"` 408 409 // ForceSendFields is a list of field names (e.g. "AvatarUri") to 410 // unconditionally include in API requests. By default, fields with 411 // empty values are omitted from API requests. However, any non-pointer, 412 // non-interface field appearing in ForceSendFields will be sent to the 413 // server regardless of whether the field is empty or not. This may be 414 // used to include empty fields in Patch requests. 415 ForceSendFields []string `json:"-"` 416 417 // NullFields is a list of field names (e.g. "AvatarUri") to include in 418 // API requests with the JSON null value. By default, fields with empty 419 // values are omitted from API requests. However, any field with an 420 // empty value appearing in NullFields will be sent to the server as 421 // null. It is an error if a field in this list has a non-empty value. 422 // This may be used to include null fields in Patch requests. 423 NullFields []string `json:"-"` 424} 425 426func (s *GoogleCloudDialogflowCxV3beta1Agent) MarshalJSON() ([]byte, error) { 427 type NoMethod GoogleCloudDialogflowCxV3beta1Agent 428 raw := NoMethod(*s) 429 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 430} 431 432// GoogleCloudDialogflowCxV3beta1AudioInput: Represents the natural 433// speech audio to be processed. 434type GoogleCloudDialogflowCxV3beta1AudioInput struct { 435 // Audio: The natural language speech audio to be processed. A single 436 // request can contain up to 1 minute of speech audio data. The 437 // transcribed text cannot contain more than 256 bytes. For 438 // non-streaming audio detect intent, both `config` and `audio` must be 439 // provided. For streaming audio detect intent, `config` must be 440 // provided in the first request and `audio` must be provided in all 441 // following requests. 442 Audio string `json:"audio,omitempty"` 443 444 // Config: Required. Instructs the speech recognizer how to process the 445 // speech audio. 446 Config *GoogleCloudDialogflowCxV3beta1InputAudioConfig `json:"config,omitempty"` 447 448 // ForceSendFields is a list of field names (e.g. "Audio") to 449 // unconditionally include in API requests. By default, fields with 450 // empty values are omitted from API requests. However, any non-pointer, 451 // non-interface field appearing in ForceSendFields will be sent to the 452 // server regardless of whether the field is empty or not. This may be 453 // used to include empty fields in Patch requests. 454 ForceSendFields []string `json:"-"` 455 456 // NullFields is a list of field names (e.g. "Audio") to include in API 457 // requests with the JSON null value. By default, fields with empty 458 // values are omitted from API requests. However, any field with an 459 // empty value appearing in NullFields will be sent to the server as 460 // null. It is an error if a field in this list has a non-empty value. 461 // This may be used to include null fields in Patch requests. 462 NullFields []string `json:"-"` 463} 464 465func (s *GoogleCloudDialogflowCxV3beta1AudioInput) MarshalJSON() ([]byte, error) { 466 type NoMethod GoogleCloudDialogflowCxV3beta1AudioInput 467 raw := NoMethod(*s) 468 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 469} 470 471// GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata: 472// Metadata associated with the long running operation for 473// Versions.CreateVersion. 474type GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata struct { 475 // Version: Name of the created version. Format: 476 // `projects//locations//agents//flows//versions/`. 477 Version string `json:"version,omitempty"` 478 479 // ForceSendFields is a list of field names (e.g. "Version") to 480 // unconditionally include in API requests. By default, fields with 481 // empty values are omitted from API requests. However, any non-pointer, 482 // non-interface field appearing in ForceSendFields will be sent to the 483 // server regardless of whether the field is empty or not. This may be 484 // used to include empty fields in Patch requests. 485 ForceSendFields []string `json:"-"` 486 487 // NullFields is a list of field names (e.g. "Version") to include in 488 // API requests with the JSON null value. By default, fields with empty 489 // values are omitted from API requests. However, any field with an 490 // empty value appearing in NullFields will be sent to the server as 491 // null. It is an error if a field in this list has a non-empty value. 492 // This may be used to include null fields in Patch requests. 493 NullFields []string `json:"-"` 494} 495 496func (s *GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata) MarshalJSON() ([]byte, error) { 497 type NoMethod GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata 498 raw := NoMethod(*s) 499 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 500} 501 502// GoogleCloudDialogflowCxV3beta1DetectIntentRequest: The request to 503// detect user's intent. 504type GoogleCloudDialogflowCxV3beta1DetectIntentRequest struct { 505 // OutputAudioConfig: Instructs the speech synthesizer how to generate 506 // the output audio. 507 OutputAudioConfig *GoogleCloudDialogflowCxV3beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"` 508 509 // QueryInput: Required. The input specification. 510 QueryInput *GoogleCloudDialogflowCxV3beta1QueryInput `json:"queryInput,omitempty"` 511 512 // QueryParams: The parameters of this query. 513 QueryParams *GoogleCloudDialogflowCxV3beta1QueryParameters `json:"queryParams,omitempty"` 514 515 // ForceSendFields is a list of field names (e.g. "OutputAudioConfig") 516 // to unconditionally include in API requests. By default, fields with 517 // empty values are omitted from API requests. However, any non-pointer, 518 // non-interface field appearing in ForceSendFields will be sent to the 519 // server regardless of whether the field is empty or not. This may be 520 // used to include empty fields in Patch requests. 521 ForceSendFields []string `json:"-"` 522 523 // NullFields is a list of field names (e.g. "OutputAudioConfig") to 524 // include in API requests with the JSON null value. By default, fields 525 // with empty values are omitted from API requests. However, any field 526 // with an empty value appearing in NullFields will be sent to the 527 // server as null. It is an error if a field in this list has a 528 // non-empty value. This may be used to include null fields in Patch 529 // requests. 530 NullFields []string `json:"-"` 531} 532 533func (s *GoogleCloudDialogflowCxV3beta1DetectIntentRequest) MarshalJSON() ([]byte, error) { 534 type NoMethod GoogleCloudDialogflowCxV3beta1DetectIntentRequest 535 raw := NoMethod(*s) 536 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 537} 538 539// GoogleCloudDialogflowCxV3beta1DetectIntentResponse: The message 540// returned from the DetectIntent method. 541type GoogleCloudDialogflowCxV3beta1DetectIntentResponse struct { 542 // OutputAudio: The audio data bytes encoded as specified in the 543 // request. Note: The output audio is generated based on the values of 544 // default platform text responses found in the 545 // `query_result.response_messages` field. If multiple default text 546 // responses exist, they will be concatenated when generating audio. If 547 // no default platform text responses exist, the generated audio content 548 // will be empty. In some scenarios, multiple output audio fields may be 549 // present in the response structure. In these cases, only the 550 // top-most-level audio output has content. 551 OutputAudio string `json:"outputAudio,omitempty"` 552 553 // OutputAudioConfig: The config used by the speech synthesizer to 554 // generate the output audio. 555 OutputAudioConfig *GoogleCloudDialogflowCxV3beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"` 556 557 // QueryResult: The result of the conversational query. 558 QueryResult *GoogleCloudDialogflowCxV3beta1QueryResult `json:"queryResult,omitempty"` 559 560 // ResponseId: Output only. The unique identifier of the response. It 561 // can be used to locate a response in the training example set or for 562 // reporting issues. 563 ResponseId string `json:"responseId,omitempty"` 564 565 // ServerResponse contains the HTTP response code and headers from the 566 // server. 567 googleapi.ServerResponse `json:"-"` 568 569 // ForceSendFields is a list of field names (e.g. "OutputAudio") to 570 // unconditionally include in API requests. By default, fields with 571 // empty values are omitted from API requests. However, any non-pointer, 572 // non-interface field appearing in ForceSendFields will be sent to the 573 // server regardless of whether the field is empty or not. This may be 574 // used to include empty fields in Patch requests. 575 ForceSendFields []string `json:"-"` 576 577 // NullFields is a list of field names (e.g. "OutputAudio") to include 578 // in API requests with the JSON null value. By default, fields with 579 // empty values are omitted from API requests. However, any field with 580 // an empty value appearing in NullFields will be sent to the server as 581 // null. It is an error if a field in this list has a non-empty value. 582 // This may be used to include null fields in Patch requests. 583 NullFields []string `json:"-"` 584} 585 586func (s *GoogleCloudDialogflowCxV3beta1DetectIntentResponse) MarshalJSON() ([]byte, error) { 587 type NoMethod GoogleCloudDialogflowCxV3beta1DetectIntentResponse 588 raw := NoMethod(*s) 589 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 590} 591 592// GoogleCloudDialogflowCxV3beta1EntityType: Entities are extracted from 593// user input and represent parameters that are meaningful to your 594// application. For example, a date range, a proper name such as a 595// geographic location or landmark, and so on. Entities represent 596// actionable data for your application. When you define an entity, you 597// can also include synonyms that all map to that entity. For example, 598// "soft drink", "soda", "pop", and so on. There are three types of 599// entities: * **System** - entities that are defined by the Dialogflow 600// API for common data types such as date, time, currency, and so on. A 601// system entity is represented by the `EntityType` type. * **Custom** - 602// entities that are defined by you that represent actionable data that 603// is meaningful to your application. For example, you could define a 604// `pizza.sauce` entity for red or white pizza sauce, a `pizza.cheese` 605// entity for the different types of cheese on a pizza, a 606// `pizza.topping` entity for different toppings, and so on. A custom 607// entity is represented by the `EntityType` type. * **User** - entities 608// that are built for an individual user such as favorites, preferences, 609// playlists, and so on. A user entity is represented by the 610// SessionEntityType type. For more information about entity types, see 611// the [Dialogflow 612// documentation](https://cloud.google.com/dialogflow/docs/entities-overv 613// iew). 614type GoogleCloudDialogflowCxV3beta1EntityType struct { 615 // AutoExpansionMode: Indicates whether the entity type can be 616 // automatically expanded. 617 // 618 // Possible values: 619 // "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the 620 // entity. 621 // "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values 622 // that have not been explicitly listed in the entity. 623 AutoExpansionMode string `json:"autoExpansionMode,omitempty"` 624 625 // DisplayName: Required. The human-readable name of the entity type, 626 // unique within the agent. 627 DisplayName string `json:"displayName,omitempty"` 628 629 // EnableFuzzyExtraction: Enables fuzzy entity extraction during 630 // classification. 631 EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"` 632 633 // Entities: The collection of entity entries associated with the entity 634 // type. 635 Entities []*GoogleCloudDialogflowCxV3beta1EntityTypeEntity `json:"entities,omitempty"` 636 637 // ExcludedPhrases: Collection of exceptional words and phrases that 638 // shouldn't be matched. For example, if you have a size entity type 639 // with entry `giant`(an adjective), you might consider adding 640 // `giants`(a noun) as an exclusion. If the kind of entity type is 641 // `KIND_MAP`, then the phrases specified by entities and excluded 642 // phrases should be mutually exclusive. 643 ExcludedPhrases []*GoogleCloudDialogflowCxV3beta1EntityTypeExcludedPhrase `json:"excludedPhrases,omitempty"` 644 645 // Kind: Required. Indicates the kind of entity type. 646 // 647 // Possible values: 648 // "KIND_UNSPECIFIED" - Not specified. This value should be never 649 // used. 650 // "KIND_MAP" - Map entity types allow mapping of a group of synonyms 651 // to a canonical value. 652 // "KIND_LIST" - List entity types contain a set of entries that do 653 // not map to canonical values. However, list entity types can contain 654 // references to other entity types (with or without aliases). 655 // "KIND_REGEXP" - Regexp entity types allow to specify regular 656 // expressions in entries values. 657 Kind string `json:"kind,omitempty"` 658 659 // Name: The unique identifier of the entity type. Required for 660 // EntityTypes.UpdateEntityType. Format: 661 // `projects//locations//agents//entityTypes/`. 662 Name string `json:"name,omitempty"` 663 664 // ServerResponse contains the HTTP response code and headers from the 665 // server. 666 googleapi.ServerResponse `json:"-"` 667 668 // ForceSendFields is a list of field names (e.g. "AutoExpansionMode") 669 // to unconditionally include in API requests. By default, fields with 670 // empty values are omitted from API requests. However, any non-pointer, 671 // non-interface field appearing in ForceSendFields will be sent to the 672 // server regardless of whether the field is empty or not. This may be 673 // used to include empty fields in Patch requests. 674 ForceSendFields []string `json:"-"` 675 676 // NullFields is a list of field names (e.g. "AutoExpansionMode") to 677 // include in API requests with the JSON null value. By default, fields 678 // with empty values are omitted from API requests. However, any field 679 // with an empty value appearing in NullFields will be sent to the 680 // server as null. It is an error if a field in this list has a 681 // non-empty value. This may be used to include null fields in Patch 682 // requests. 683 NullFields []string `json:"-"` 684} 685 686func (s *GoogleCloudDialogflowCxV3beta1EntityType) MarshalJSON() ([]byte, error) { 687 type NoMethod GoogleCloudDialogflowCxV3beta1EntityType 688 raw := NoMethod(*s) 689 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 690} 691 692// GoogleCloudDialogflowCxV3beta1EntityTypeEntity: An **entity entry** 693// for an associated entity type. Next Id = 8 694type GoogleCloudDialogflowCxV3beta1EntityTypeEntity struct { 695 // Synonyms: Required. A collection of value synonyms. For example, if 696 // the entity type is *vegetable*, and `value` is *scallions*, a synonym 697 // could be *green onions*. For `KIND_LIST` entity types: * This 698 // collection must contain exactly one synonym equal to `value`. 699 Synonyms []string `json:"synonyms,omitempty"` 700 701 // Value: Required. The primary value associated with this entity entry. 702 // For example, if the entity type is *vegetable*, the value could be 703 // *scallions*. For `KIND_MAP` entity types: * A canonical value to be 704 // used in place of synonyms. For `KIND_LIST` entity types: * A string 705 // that can contain references to other entity types (with or without 706 // aliases). 707 Value string `json:"value,omitempty"` 708 709 // ForceSendFields is a list of field names (e.g. "Synonyms") to 710 // unconditionally include in API requests. By default, fields with 711 // empty values are omitted from API requests. However, any non-pointer, 712 // non-interface field appearing in ForceSendFields will be sent to the 713 // server regardless of whether the field is empty or not. This may be 714 // used to include empty fields in Patch requests. 715 ForceSendFields []string `json:"-"` 716 717 // NullFields is a list of field names (e.g. "Synonyms") to include in 718 // API requests with the JSON null value. By default, fields with empty 719 // values are omitted from API requests. However, any field with an 720 // empty value appearing in NullFields will be sent to the server as 721 // null. It is an error if a field in this list has a non-empty value. 722 // This may be used to include null fields in Patch requests. 723 NullFields []string `json:"-"` 724} 725 726func (s *GoogleCloudDialogflowCxV3beta1EntityTypeEntity) MarshalJSON() ([]byte, error) { 727 type NoMethod GoogleCloudDialogflowCxV3beta1EntityTypeEntity 728 raw := NoMethod(*s) 729 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 730} 731 732// GoogleCloudDialogflowCxV3beta1EntityTypeExcludedPhrase: An excluded 733// entity phrase that should not be matched. 734type GoogleCloudDialogflowCxV3beta1EntityTypeExcludedPhrase struct { 735 // Value: Required. The word or phrase to be excluded. 736 Value string `json:"value,omitempty"` 737 738 // ForceSendFields is a list of field names (e.g. "Value") to 739 // unconditionally include in API requests. By default, fields with 740 // empty values are omitted from API requests. However, any non-pointer, 741 // non-interface field appearing in ForceSendFields will be sent to the 742 // server regardless of whether the field is empty or not. This may be 743 // used to include empty fields in Patch requests. 744 ForceSendFields []string `json:"-"` 745 746 // NullFields is a list of field names (e.g. "Value") to include in API 747 // requests with the JSON null value. By default, fields with empty 748 // values are omitted from API requests. However, any field with an 749 // empty value appearing in NullFields will be sent to the server as 750 // null. It is an error if a field in this list has a non-empty value. 751 // This may be used to include null fields in Patch requests. 752 NullFields []string `json:"-"` 753} 754 755func (s *GoogleCloudDialogflowCxV3beta1EntityTypeExcludedPhrase) MarshalJSON() ([]byte, error) { 756 type NoMethod GoogleCloudDialogflowCxV3beta1EntityTypeExcludedPhrase 757 raw := NoMethod(*s) 758 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 759} 760 761// GoogleCloudDialogflowCxV3beta1Environment: Represents an environment 762// for an agent. You can create multiple versions of your agent and 763// publish them to separate environments. When you edit an agent, you 764// are editing the draft agent. At any point, you can save the draft 765// agent as an agent version, which is an immutable snapshot of your 766// agent. When you save the draft agent, it is published to the default 767// environment. When you create agent versions, you can publish them to 768// custom environments. You can create a variety of custom environments 769// for testing, development, production, etc. 770type GoogleCloudDialogflowCxV3beta1Environment struct { 771 // Description: The human-readable description of the environment. The 772 // maximum length is 500 characters. If exceeded, the request is 773 // rejected. 774 Description string `json:"description,omitempty"` 775 776 // DisplayName: Required. The human-readable name of the environment 777 // (unique in an agent). Limit of 64 characters. 778 DisplayName string `json:"displayName,omitempty"` 779 780 // Name: The name of the environment. Format: 781 // `projects//locations//agents//environments/`. 782 Name string `json:"name,omitempty"` 783 784 // UpdateTime: Output only. Update time of this environment. 785 UpdateTime string `json:"updateTime,omitempty"` 786 787 // VersionConfigs: Required. A list of configurations for flow versions. 788 // You should include version configs for all flows that are reachable 789 // from `Start Flow` in the agent. Otherwise, an error will be returned. 790 VersionConfigs []*GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig `json:"versionConfigs,omitempty"` 791 792 // ServerResponse contains the HTTP response code and headers from the 793 // server. 794 googleapi.ServerResponse `json:"-"` 795 796 // ForceSendFields is a list of field names (e.g. "Description") to 797 // unconditionally include in API requests. By default, fields with 798 // empty values are omitted from API requests. However, any non-pointer, 799 // non-interface field appearing in ForceSendFields will be sent to the 800 // server regardless of whether the field is empty or not. This may be 801 // used to include empty fields in Patch requests. 802 ForceSendFields []string `json:"-"` 803 804 // NullFields is a list of field names (e.g. "Description") to include 805 // in API requests with the JSON null value. By default, fields with 806 // empty values are omitted from API requests. However, any field with 807 // an empty value appearing in NullFields will be sent to the server as 808 // null. It is an error if a field in this list has a non-empty value. 809 // This may be used to include null fields in Patch requests. 810 NullFields []string `json:"-"` 811} 812 813func (s *GoogleCloudDialogflowCxV3beta1Environment) MarshalJSON() ([]byte, error) { 814 type NoMethod GoogleCloudDialogflowCxV3beta1Environment 815 raw := NoMethod(*s) 816 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 817} 818 819// GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig: Configuration 820// for the version. 821type GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig struct { 822 // Version: Required. Format: 823 // projects//locations//agents//flows//versions/. 824 Version string `json:"version,omitempty"` 825 826 // ForceSendFields is a list of field names (e.g. "Version") to 827 // unconditionally include in API requests. By default, fields with 828 // empty values are omitted from API requests. However, any non-pointer, 829 // non-interface field appearing in ForceSendFields will be sent to the 830 // server regardless of whether the field is empty or not. This may be 831 // used to include empty fields in Patch requests. 832 ForceSendFields []string `json:"-"` 833 834 // NullFields is a list of field names (e.g. "Version") to include in 835 // API requests with the JSON null value. By default, fields with empty 836 // values are omitted from API requests. However, any field with an 837 // empty value appearing in NullFields will be sent to the server as 838 // null. It is an error if a field in this list has a non-empty value. 839 // This may be used to include null fields in Patch requests. 840 NullFields []string `json:"-"` 841} 842 843func (s *GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig) MarshalJSON() ([]byte, error) { 844 type NoMethod GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig 845 raw := NoMethod(*s) 846 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 847} 848 849// GoogleCloudDialogflowCxV3beta1EventHandler: An event handler 850// specifies an event that can be handled during a session. When the 851// specified event happens, the following actions are taken in order: * 852// If there is a `trigger_fulfillment` associated with the event, it 853// will be called. * If there is a `target_page` associated with the 854// event, the session will transition into the specified page. * If 855// there is a `target_flow` associated with the event, the session will 856// transition into the specified flow. 857type GoogleCloudDialogflowCxV3beta1EventHandler struct { 858 // Event: Required. The name of the event to handle. 859 Event string `json:"event,omitempty"` 860 861 // Name: Output only. The unique identifier of this event handler. 862 Name string `json:"name,omitempty"` 863 864 // TargetFlow: The target flow to transition to. Format: 865 // `projects//locations//agents//flows/`. 866 TargetFlow string `json:"targetFlow,omitempty"` 867 868 // TargetPage: The target page to transition to. Format: 869 // `projects//locations//agents//flows//pages/`. 870 TargetPage string `json:"targetPage,omitempty"` 871 872 // TriggerFulfillment: The fulfillment to call when the event occurs. 873 // Handling webhook errors with a fulfillment enabled with webhook could 874 // cause infinite loop. It is invalid to specify such fulfillment for a 875 // handler handling webhooks. 876 TriggerFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"triggerFulfillment,omitempty"` 877 878 // ForceSendFields is a list of field names (e.g. "Event") to 879 // unconditionally include in API requests. By default, fields with 880 // empty values are omitted from API requests. However, any non-pointer, 881 // non-interface field appearing in ForceSendFields will be sent to the 882 // server regardless of whether the field is empty or not. This may be 883 // used to include empty fields in Patch requests. 884 ForceSendFields []string `json:"-"` 885 886 // NullFields is a list of field names (e.g. "Event") to include in API 887 // requests with the JSON null value. By default, fields with empty 888 // values are omitted from API requests. However, any field with an 889 // empty value appearing in NullFields will be sent to the server as 890 // null. It is an error if a field in this list has a non-empty value. 891 // This may be used to include null fields in Patch requests. 892 NullFields []string `json:"-"` 893} 894 895func (s *GoogleCloudDialogflowCxV3beta1EventHandler) MarshalJSON() ([]byte, error) { 896 type NoMethod GoogleCloudDialogflowCxV3beta1EventHandler 897 raw := NoMethod(*s) 898 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 899} 900 901// GoogleCloudDialogflowCxV3beta1EventInput: Represents the event to 902// trigger. 903type GoogleCloudDialogflowCxV3beta1EventInput struct { 904 // Event: Name of the event. 905 Event string `json:"event,omitempty"` 906 907 // ForceSendFields is a list of field names (e.g. "Event") to 908 // unconditionally include in API requests. By default, fields with 909 // empty values are omitted from API requests. However, any non-pointer, 910 // non-interface field appearing in ForceSendFields will be sent to the 911 // server regardless of whether the field is empty or not. This may be 912 // used to include empty fields in Patch requests. 913 ForceSendFields []string `json:"-"` 914 915 // NullFields is a list of field names (e.g. "Event") to include in API 916 // requests with the JSON null value. By default, fields with empty 917 // values are omitted from API requests. However, any field with an 918 // empty value appearing in NullFields will be sent to the server as 919 // null. It is an error if a field in this list has a non-empty value. 920 // This may be used to include null fields in Patch requests. 921 NullFields []string `json:"-"` 922} 923 924func (s *GoogleCloudDialogflowCxV3beta1EventInput) MarshalJSON() ([]byte, error) { 925 type NoMethod GoogleCloudDialogflowCxV3beta1EventInput 926 raw := NoMethod(*s) 927 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 928} 929 930// GoogleCloudDialogflowCxV3beta1ExportAgentRequest: The request message 931// for Agents.ExportAgent. 932type GoogleCloudDialogflowCxV3beta1ExportAgentRequest struct { 933 // AgentUri: Optional. The [Google Cloud 934 // Storage](https://cloud.google.com/storage/docs/) URI to export the 935 // agent to. The format of this URI must be `gs:///`. If left 936 // unspecified, the serialized agent is returned inline. 937 AgentUri string `json:"agentUri,omitempty"` 938 939 // ForceSendFields is a list of field names (e.g. "AgentUri") to 940 // unconditionally include in API requests. By default, fields with 941 // empty values are omitted from API requests. However, any non-pointer, 942 // non-interface field appearing in ForceSendFields will be sent to the 943 // server regardless of whether the field is empty or not. This may be 944 // used to include empty fields in Patch requests. 945 ForceSendFields []string `json:"-"` 946 947 // NullFields is a list of field names (e.g. "AgentUri") to include in 948 // API requests with the JSON null value. By default, fields with empty 949 // values are omitted from API requests. However, any field with an 950 // empty value appearing in NullFields will be sent to the server as 951 // null. It is an error if a field in this list has a non-empty value. 952 // This may be used to include null fields in Patch requests. 953 NullFields []string `json:"-"` 954} 955 956func (s *GoogleCloudDialogflowCxV3beta1ExportAgentRequest) MarshalJSON() ([]byte, error) { 957 type NoMethod GoogleCloudDialogflowCxV3beta1ExportAgentRequest 958 raw := NoMethod(*s) 959 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 960} 961 962// GoogleCloudDialogflowCxV3beta1ExportAgentResponse: The response 963// message for Agents.ExportAgent. 964type GoogleCloudDialogflowCxV3beta1ExportAgentResponse struct { 965 // AgentContent: Uncompressed raw byte content for agent. 966 AgentContent string `json:"agentContent,omitempty"` 967 968 // AgentUri: The URI to a file containing the exported agent. This field 969 // is populated only if `agent_uri` is specified in ExportAgentRequest. 970 AgentUri string `json:"agentUri,omitempty"` 971 972 // ForceSendFields is a list of field names (e.g. "AgentContent") to 973 // unconditionally include in API requests. By default, fields with 974 // empty values are omitted from API requests. However, any non-pointer, 975 // non-interface field appearing in ForceSendFields will be sent to the 976 // server regardless of whether the field is empty or not. This may be 977 // used to include empty fields in Patch requests. 978 ForceSendFields []string `json:"-"` 979 980 // NullFields is a list of field names (e.g. "AgentContent") to include 981 // in API requests with the JSON null value. By default, fields with 982 // empty values are omitted from API requests. However, any field with 983 // an empty value appearing in NullFields will be sent to the server as 984 // null. It is an error if a field in this list has a non-empty value. 985 // This may be used to include null fields in Patch requests. 986 NullFields []string `json:"-"` 987} 988 989func (s *GoogleCloudDialogflowCxV3beta1ExportAgentResponse) MarshalJSON() ([]byte, error) { 990 type NoMethod GoogleCloudDialogflowCxV3beta1ExportAgentResponse 991 raw := NoMethod(*s) 992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 993} 994 995// GoogleCloudDialogflowCxV3beta1Flow: Flows represents the conversation 996// flows when you build your chatbot agent. A flow consists of many 997// pages connected by the transition routes. Conversations always start 998// with the built-in Start Flow (with an all-0 ID). Transition routes 999// can direct the conversation session from the current flow (parent 1000// flow) to another flow (sub flow). When the sub flow is finished, 1001// Dialogflow will bring the session back to the parent flow, where the 1002// sub flow is started. Usually, when a transition route is followed by 1003// a matched intent, the intent will be "consumed". This means the 1004// intent won't activate more transition routes. However, when the 1005// followed transition route moves the conversation session into a 1006// different flow, the matched intent can be carried over and to be 1007// consumed in the target flow. 1008type GoogleCloudDialogflowCxV3beta1Flow struct { 1009 // Description: The description of the flow. The maximum length is 500 1010 // characters. If exceeded, the request is rejected. 1011 Description string `json:"description,omitempty"` 1012 1013 // DisplayName: Required. The human-readable name of the flow. 1014 DisplayName string `json:"displayName,omitempty"` 1015 1016 // EventHandlers: A flow's event handlers serve two purposes: * They are 1017 // responsible for handling events (e.g. no match, webhook errors) in 1018 // the flow. * They are inherited by every page's event handlers, which 1019 // can be used to handle common events regardless of the current page. 1020 // Event handlers defined in the page have higher priority than those 1021 // defined in the flow. Unlike transition_routes, these handlers are 1022 // evaluated on a first-match basis. The first one that matches the 1023 // event get executed, with the rest being ignored. 1024 EventHandlers []*GoogleCloudDialogflowCxV3beta1EventHandler `json:"eventHandlers,omitempty"` 1025 1026 // Name: The unique identifier of the flow. Format: 1027 // `projects//locations//agents//flows/`. 1028 Name string `json:"name,omitempty"` 1029 1030 // NluSettings: NLU related settings of the flow. 1031 NluSettings *GoogleCloudDialogflowCxV3beta1NluSettings `json:"nluSettings,omitempty"` 1032 1033 // TransitionRoutes: A flow's transition routes serve two purposes: * 1034 // They are responsible for matching the user's first utterances in the 1035 // flow. * They are inherited by every page's transition routes and can 1036 // support use cases such as the user saying "help" or "can I talk to a 1037 // human?", which can be handled in a common way regardless of the 1038 // current page. Transition routes defined in the page have higher 1039 // priority than those defined in the flow. TransitionRoutes are 1040 // evalauted in the following order: * TransitionRoutes with intent 1041 // specified.. * TransitionRoutes with only condition specified. 1042 // TransitionRoutes with intent specified are inherited by pages in the 1043 // flow. 1044 TransitionRoutes []*GoogleCloudDialogflowCxV3beta1TransitionRoute `json:"transitionRoutes,omitempty"` 1045 1046 // ServerResponse contains the HTTP response code and headers from the 1047 // server. 1048 googleapi.ServerResponse `json:"-"` 1049 1050 // ForceSendFields is a list of field names (e.g. "Description") to 1051 // unconditionally include in API requests. By default, fields with 1052 // empty values are omitted from API requests. However, any non-pointer, 1053 // non-interface field appearing in ForceSendFields will be sent to the 1054 // server regardless of whether the field is empty or not. This may be 1055 // used to include empty fields in Patch requests. 1056 ForceSendFields []string `json:"-"` 1057 1058 // NullFields is a list of field names (e.g. "Description") to include 1059 // in API requests with the JSON null value. By default, fields with 1060 // empty values are omitted from API requests. However, any field with 1061 // an empty value appearing in NullFields will be sent to the server as 1062 // null. It is an error if a field in this list has a non-empty value. 1063 // This may be used to include null fields in Patch requests. 1064 NullFields []string `json:"-"` 1065} 1066 1067func (s *GoogleCloudDialogflowCxV3beta1Flow) MarshalJSON() ([]byte, error) { 1068 type NoMethod GoogleCloudDialogflowCxV3beta1Flow 1069 raw := NoMethod(*s) 1070 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1071} 1072 1073// GoogleCloudDialogflowCxV3beta1Form: A form is a data model that 1074// groups related parameters that can be collected from the user. The 1075// process in which the agent prompts the user and collects parameter 1076// values from the user is called form filling. A form can be added to a 1077// page. When form filling is done, the filled parameters will be 1078// written to the session. 1079type GoogleCloudDialogflowCxV3beta1Form struct { 1080 // Parameters: Parameters to collect from the user. 1081 Parameters []*GoogleCloudDialogflowCxV3beta1FormParameter `json:"parameters,omitempty"` 1082 1083 // ForceSendFields is a list of field names (e.g. "Parameters") to 1084 // unconditionally include in API requests. By default, fields with 1085 // empty values are omitted from API requests. However, any non-pointer, 1086 // non-interface field appearing in ForceSendFields will be sent to the 1087 // server regardless of whether the field is empty or not. This may be 1088 // used to include empty fields in Patch requests. 1089 ForceSendFields []string `json:"-"` 1090 1091 // NullFields is a list of field names (e.g. "Parameters") to include in 1092 // API requests with the JSON null value. By default, fields with empty 1093 // values are omitted from API requests. However, any field with an 1094 // empty value appearing in NullFields will be sent to the server as 1095 // null. It is an error if a field in this list has a non-empty value. 1096 // This may be used to include null fields in Patch requests. 1097 NullFields []string `json:"-"` 1098} 1099 1100func (s *GoogleCloudDialogflowCxV3beta1Form) MarshalJSON() ([]byte, error) { 1101 type NoMethod GoogleCloudDialogflowCxV3beta1Form 1102 raw := NoMethod(*s) 1103 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1104} 1105 1106// GoogleCloudDialogflowCxV3beta1FormParameter: Represents a form 1107// parameter. 1108type GoogleCloudDialogflowCxV3beta1FormParameter struct { 1109 // DefaultValue: The default value of an optional parameter. If the 1110 // parameter is required, the default value will be ignored. 1111 DefaultValue interface{} `json:"defaultValue,omitempty"` 1112 1113 // DisplayName: Required. The human-readable name of the parameter, 1114 // unique within the form. 1115 DisplayName string `json:"displayName,omitempty"` 1116 1117 // EntityType: Required. The entity type of the parameter. Format: 1118 // `projects/-/locations/-/agents/-/entityTypes/` for system entity 1119 // types (for example, 1120 // `projects/-/locations/-/agents/-/entityTypes/sys.date`), or 1121 // `projects//locations//agents//entityTypes/` for developer entity 1122 // types. 1123 EntityType string `json:"entityType,omitempty"` 1124 1125 // FillBehavior: Required. Defines fill behavior for the parameter. 1126 FillBehavior *GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior `json:"fillBehavior,omitempty"` 1127 1128 // IsList: Indicates whether the parameter represents a list of values. 1129 IsList bool `json:"isList,omitempty"` 1130 1131 // Redact: Indicates whether the parameter content is logged in text and 1132 // audio. If it is set to true, the parameter content will be replaced 1133 // to parameter name in both request and response. The default value is 1134 // false. 1135 Redact bool `json:"redact,omitempty"` 1136 1137 // Required: Indicates whether the parameter is required. Optional 1138 // parameters will not trigger prompts; however, they are filled if the 1139 // user specifies them. Required parameters must be filled before form 1140 // filling concludes. 1141 Required bool `json:"required,omitempty"` 1142 1143 // ForceSendFields is a list of field names (e.g. "DefaultValue") to 1144 // unconditionally include in API requests. By default, fields with 1145 // empty values are omitted from API requests. However, any non-pointer, 1146 // non-interface field appearing in ForceSendFields will be sent to the 1147 // server regardless of whether the field is empty or not. This may be 1148 // used to include empty fields in Patch requests. 1149 ForceSendFields []string `json:"-"` 1150 1151 // NullFields is a list of field names (e.g. "DefaultValue") to include 1152 // in API requests with the JSON null value. By default, fields with 1153 // empty values are omitted from API requests. However, any field with 1154 // an empty value appearing in NullFields will be sent to the server as 1155 // null. It is an error if a field in this list has a non-empty value. 1156 // This may be used to include null fields in Patch requests. 1157 NullFields []string `json:"-"` 1158} 1159 1160func (s *GoogleCloudDialogflowCxV3beta1FormParameter) MarshalJSON() ([]byte, error) { 1161 type NoMethod GoogleCloudDialogflowCxV3beta1FormParameter 1162 raw := NoMethod(*s) 1163 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1164} 1165 1166// GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior: 1167// Configuration for how the filling of a parameter should be handled. 1168type GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior struct { 1169 // InitialPromptFulfillment: Required. The fulfillment to provide the 1170 // initial prompt that the agent can present to the user in order to 1171 // fill the parameter. 1172 InitialPromptFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"initialPromptFulfillment,omitempty"` 1173 1174 // RepromptEventHandlers: The handlers for parameter-level events, used 1175 // to provide reprompt for the parameter or transition to a different 1176 // page/flow. The supported events are: * `sys.no-match-`, where N can 1177 // be from 1 to 6 * `sys.no-match-default` * `sys.no-input-`, where N 1178 // can be from 1 to 6 * `sys.no-input-default` * `sys.invalid-parameter` 1179 // `initial_prompt_fulfillment` provides the first prompt for the 1180 // parameter. If the user's response does not fill the parameter, a 1181 // no-match/no-input event will be triggered, and the fulfillment 1182 // associated with the `sys.no-match-1`/`sys.no-input-1` handler (if 1183 // defined) will be called to provide a prompt. The 1184 // `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond 1185 // to the next no-match/no-input event, and so on. A 1186 // `sys.no-match-default` or `sys.no-input-default` handler will be used 1187 // to handle all following no-match/no-input events after all numbered 1188 // no-match/no-input handlers for the parameter are consumed. A 1189 // `sys.invalid-parameter` handler can be defined to handle the case 1190 // where the parameter values have been `invalidated` by webhook. For 1191 // example, if the user's response fill the parameter, however the 1192 // parameter was invalidated by webhook, the fulfillment associated with 1193 // the `sys.invalid-parameter` handler (if defined) will be called to 1194 // provide a prompt. If the event handler for the corresponding event 1195 // can't be found on the parameter, `initial_prompt_fulfillment` will be 1196 // re-prompted. 1197 RepromptEventHandlers []*GoogleCloudDialogflowCxV3beta1EventHandler `json:"repromptEventHandlers,omitempty"` 1198 1199 // ForceSendFields is a list of field names (e.g. 1200 // "InitialPromptFulfillment") to unconditionally include in API 1201 // requests. By default, fields with empty values are omitted from API 1202 // requests. However, any non-pointer, non-interface field appearing in 1203 // ForceSendFields will be sent to the server regardless of whether the 1204 // field is empty or not. This may be used to include empty fields in 1205 // Patch requests. 1206 ForceSendFields []string `json:"-"` 1207 1208 // NullFields is a list of field names (e.g. "InitialPromptFulfillment") 1209 // to include in API requests with the JSON null value. By default, 1210 // fields with empty values are omitted from API requests. However, any 1211 // field with an empty value appearing in NullFields will be sent to the 1212 // server as null. It is an error if a field in this list has a 1213 // non-empty value. This may be used to include null fields in Patch 1214 // requests. 1215 NullFields []string `json:"-"` 1216} 1217 1218func (s *GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior) MarshalJSON() ([]byte, error) { 1219 type NoMethod GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior 1220 raw := NoMethod(*s) 1221 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1222} 1223 1224// GoogleCloudDialogflowCxV3beta1FulfillIntentRequest: Request of 1225// FulfillIntent 1226type GoogleCloudDialogflowCxV3beta1FulfillIntentRequest struct { 1227 // Match: The matched intent/event to fulfill. 1228 Match *GoogleCloudDialogflowCxV3beta1Match `json:"match,omitempty"` 1229 1230 // MatchIntentRequest: Must be same as the corresponding MatchIntent 1231 // request, otherwise the behavior is undefined. 1232 MatchIntentRequest *GoogleCloudDialogflowCxV3beta1MatchIntentRequest `json:"matchIntentRequest,omitempty"` 1233 1234 // OutputAudioConfig: Instructs the speech synthesizer how to generate 1235 // output audio. 1236 OutputAudioConfig *GoogleCloudDialogflowCxV3beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"` 1237 1238 // ForceSendFields is a list of field names (e.g. "Match") to 1239 // unconditionally include in API requests. By default, fields with 1240 // empty values are omitted from API requests. However, any non-pointer, 1241 // non-interface field appearing in ForceSendFields will be sent to the 1242 // server regardless of whether the field is empty or not. This may be 1243 // used to include empty fields in Patch requests. 1244 ForceSendFields []string `json:"-"` 1245 1246 // NullFields is a list of field names (e.g. "Match") to include in API 1247 // requests with the JSON null value. By default, fields with empty 1248 // values are omitted from API requests. However, any field with an 1249 // empty value appearing in NullFields will be sent to the server as 1250 // null. It is an error if a field in this list has a non-empty value. 1251 // This may be used to include null fields in Patch requests. 1252 NullFields []string `json:"-"` 1253} 1254 1255func (s *GoogleCloudDialogflowCxV3beta1FulfillIntentRequest) MarshalJSON() ([]byte, error) { 1256 type NoMethod GoogleCloudDialogflowCxV3beta1FulfillIntentRequest 1257 raw := NoMethod(*s) 1258 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1259} 1260 1261// GoogleCloudDialogflowCxV3beta1FulfillIntentResponse: Response of 1262// FulfillIntent 1263type GoogleCloudDialogflowCxV3beta1FulfillIntentResponse struct { 1264 // OutputAudio: The audio data bytes encoded as specified in the 1265 // request. Note: The output audio is generated based on the values of 1266 // default platform text responses found in the 1267 // `query_result.response_messages` field. If multiple default text 1268 // responses exist, they will be concatenated when generating audio. If 1269 // no default platform text responses exist, the generated audio content 1270 // will be empty. In some scenarios, multiple output audio fields may be 1271 // present in the response structure. In these cases, only the 1272 // top-most-level audio output has content. 1273 OutputAudio string `json:"outputAudio,omitempty"` 1274 1275 // OutputAudioConfig: The config used by the speech synthesizer to 1276 // generate the output audio. 1277 OutputAudioConfig *GoogleCloudDialogflowCxV3beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"` 1278 1279 // QueryResult: The result of the conversational query. 1280 QueryResult *GoogleCloudDialogflowCxV3beta1QueryResult `json:"queryResult,omitempty"` 1281 1282 // ResponseId: Output only. The unique identifier of the response. It 1283 // can be used to locate a response in the training example set or for 1284 // reporting issues. 1285 ResponseId string `json:"responseId,omitempty"` 1286 1287 // ServerResponse contains the HTTP response code and headers from the 1288 // server. 1289 googleapi.ServerResponse `json:"-"` 1290 1291 // ForceSendFields is a list of field names (e.g. "OutputAudio") to 1292 // unconditionally include in API requests. By default, fields with 1293 // empty values are omitted from API requests. However, any non-pointer, 1294 // non-interface field appearing in ForceSendFields will be sent to the 1295 // server regardless of whether the field is empty or not. This may be 1296 // used to include empty fields in Patch requests. 1297 ForceSendFields []string `json:"-"` 1298 1299 // NullFields is a list of field names (e.g. "OutputAudio") to include 1300 // in API requests with the JSON null value. By default, fields with 1301 // empty values are omitted from API requests. However, any field with 1302 // an empty value appearing in NullFields will be sent to the server as 1303 // null. It is an error if a field in this list has a non-empty value. 1304 // This may be used to include null fields in Patch requests. 1305 NullFields []string `json:"-"` 1306} 1307 1308func (s *GoogleCloudDialogflowCxV3beta1FulfillIntentResponse) MarshalJSON() ([]byte, error) { 1309 type NoMethod GoogleCloudDialogflowCxV3beta1FulfillIntentResponse 1310 raw := NoMethod(*s) 1311 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1312} 1313 1314// GoogleCloudDialogflowCxV3beta1Fulfillment: A fulfillment can do one 1315// or more of the following actions at the same time: * Generate rich 1316// message responses. * Set parameter values. * Call the webhook. 1317// Fulfillments can be called at various stages in the Page or Form 1318// lifecycle. For example, when a DetectIntentRequest drives a session 1319// to enter a new page, the page's entry fulfillment can add a static 1320// response to the QueryResult in the returning DetectIntentResponse, 1321// call the webhook (for example, to load user data from a database), or 1322// both. 1323type GoogleCloudDialogflowCxV3beta1Fulfillment struct { 1324 // ConditionalCases: Conditional cases for this fulfillment. 1325 ConditionalCases []*GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases `json:"conditionalCases,omitempty"` 1326 1327 // Messages: The list of rich message responses to present to the user. 1328 Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"` 1329 1330 // SetParameterActions: Set parameter values before executing the 1331 // webhook. 1332 SetParameterActions []*GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction `json:"setParameterActions,omitempty"` 1333 1334 // Tag: The tag used by the webhook to identify which fulfillment is 1335 // being called. This field is required if `webhook` is specified. 1336 Tag string `json:"tag,omitempty"` 1337 1338 // Webhook: The webhook to call. Format: 1339 // `projects//locations//agents//webhooks/`. 1340 Webhook string `json:"webhook,omitempty"` 1341 1342 // ForceSendFields is a list of field names (e.g. "ConditionalCases") to 1343 // unconditionally include in API requests. By default, fields with 1344 // empty values are omitted from API requests. However, any non-pointer, 1345 // non-interface field appearing in ForceSendFields will be sent to the 1346 // server regardless of whether the field is empty or not. This may be 1347 // used to include empty fields in Patch requests. 1348 ForceSendFields []string `json:"-"` 1349 1350 // NullFields is a list of field names (e.g. "ConditionalCases") to 1351 // include in API requests with the JSON null value. By default, fields 1352 // with empty values are omitted from API requests. However, any field 1353 // with an empty value appearing in NullFields will be sent to the 1354 // server as null. It is an error if a field in this list has a 1355 // non-empty value. This may be used to include null fields in Patch 1356 // requests. 1357 NullFields []string `json:"-"` 1358} 1359 1360func (s *GoogleCloudDialogflowCxV3beta1Fulfillment) MarshalJSON() ([]byte, error) { 1361 type NoMethod GoogleCloudDialogflowCxV3beta1Fulfillment 1362 raw := NoMethod(*s) 1363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1364} 1365 1366// GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases: A list of 1367// cascading if-else conditions. Cases are mutually exclusive. The first 1368// one with a matching condition is selected, all the rest ignored. 1369type GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases struct { 1370 // Cases: A list of cascading if-else conditions. 1371 Cases []*GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase `json:"cases,omitempty"` 1372 1373 // ForceSendFields is a list of field names (e.g. "Cases") to 1374 // unconditionally include in API requests. By default, fields with 1375 // empty values are omitted from API requests. However, any non-pointer, 1376 // non-interface field appearing in ForceSendFields will be sent to the 1377 // server regardless of whether the field is empty or not. This may be 1378 // used to include empty fields in Patch requests. 1379 ForceSendFields []string `json:"-"` 1380 1381 // NullFields is a list of field names (e.g. "Cases") to include in API 1382 // requests with the JSON null value. By default, fields with empty 1383 // values are omitted from API requests. However, any field with an 1384 // empty value appearing in NullFields will be sent to the server as 1385 // null. It is an error if a field in this list has a non-empty value. 1386 // This may be used to include null fields in Patch requests. 1387 NullFields []string `json:"-"` 1388} 1389 1390func (s *GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases) MarshalJSON() ([]byte, error) { 1391 type NoMethod GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases 1392 raw := NoMethod(*s) 1393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1394} 1395 1396// GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase: Each 1397// case has a Boolean condition. When it is evaluated to be True, the 1398// corresponding messages will be selected and evaluated recursively. 1399type GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase struct { 1400 // CaseContent: A list of case content. 1401 CaseContent []*GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent `json:"caseContent,omitempty"` 1402 1403 // Condition: The condition to activate and select this case. Empty 1404 // means the condition is always true. The condition is evaluated 1405 // against form parameters or session parameters. See the [conditions 1406 // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condi 1407 // tion). 1408 Condition string `json:"condition,omitempty"` 1409 1410 // ForceSendFields is a list of field names (e.g. "CaseContent") to 1411 // unconditionally include in API requests. By default, fields with 1412 // empty values are omitted from API requests. However, any non-pointer, 1413 // non-interface field appearing in ForceSendFields will be sent to the 1414 // server regardless of whether the field is empty or not. This may be 1415 // used to include empty fields in Patch requests. 1416 ForceSendFields []string `json:"-"` 1417 1418 // NullFields is a list of field names (e.g. "CaseContent") to include 1419 // in API requests with the JSON null value. By default, fields with 1420 // empty values are omitted from API requests. However, any field with 1421 // an empty value appearing in NullFields will be sent to the server as 1422 // null. It is an error if a field in this list has a non-empty value. 1423 // This may be used to include null fields in Patch requests. 1424 NullFields []string `json:"-"` 1425} 1426 1427func (s *GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase) MarshalJSON() ([]byte, error) { 1428 type NoMethod GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase 1429 raw := NoMethod(*s) 1430 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1431} 1432 1433// GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseConte 1434// nt: The list of messages or conditional cases to activate for this 1435// case. 1436type GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent struct { 1437 // AdditionalCases: Additional cases to be evaluated. 1438 AdditionalCases *GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases `json:"additionalCases,omitempty"` 1439 1440 // Message: Returned message. 1441 Message *GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"message,omitempty"` 1442 1443 // ForceSendFields is a list of field names (e.g. "AdditionalCases") to 1444 // unconditionally include in API requests. By default, fields with 1445 // empty values are omitted from API requests. However, any non-pointer, 1446 // non-interface field appearing in ForceSendFields will be sent to the 1447 // server regardless of whether the field is empty or not. This may be 1448 // used to include empty fields in Patch requests. 1449 ForceSendFields []string `json:"-"` 1450 1451 // NullFields is a list of field names (e.g. "AdditionalCases") to 1452 // include in API requests with the JSON null value. By default, fields 1453 // with empty values are omitted from API requests. However, any field 1454 // with an empty value appearing in NullFields will be sent to the 1455 // server as null. It is an error if a field in this list has a 1456 // non-empty value. This may be used to include null fields in Patch 1457 // requests. 1458 NullFields []string `json:"-"` 1459} 1460 1461func (s *GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent) MarshalJSON() ([]byte, error) { 1462 type NoMethod GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent 1463 raw := NoMethod(*s) 1464 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1465} 1466 1467// GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction: Setting 1468// a parameter value. 1469type GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction struct { 1470 // Parameter: Display name of the parameter. 1471 Parameter string `json:"parameter,omitempty"` 1472 1473 // Value: The new value of the parameter. A null value clears the 1474 // parameter. 1475 Value interface{} `json:"value,omitempty"` 1476 1477 // ForceSendFields is a list of field names (e.g. "Parameter") to 1478 // unconditionally include in API requests. By default, fields with 1479 // empty values are omitted from API requests. However, any non-pointer, 1480 // non-interface field appearing in ForceSendFields will be sent to the 1481 // server regardless of whether the field is empty or not. This may be 1482 // used to include empty fields in Patch requests. 1483 ForceSendFields []string `json:"-"` 1484 1485 // NullFields is a list of field names (e.g. "Parameter") to include in 1486 // API requests with the JSON null value. By default, fields with empty 1487 // values are omitted from API requests. However, any field with an 1488 // empty value appearing in NullFields will be sent to the server as 1489 // null. It is an error if a field in this list has a non-empty value. 1490 // This may be used to include null fields in Patch requests. 1491 NullFields []string `json:"-"` 1492} 1493 1494func (s *GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction) MarshalJSON() ([]byte, error) { 1495 type NoMethod GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction 1496 raw := NoMethod(*s) 1497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1498} 1499 1500// GoogleCloudDialogflowCxV3beta1ImportAgentResponse: The response 1501// message for Agents.ImportAgent. 1502type GoogleCloudDialogflowCxV3beta1ImportAgentResponse struct { 1503 // Agent: The unique identifier of the new agent. Format: 1504 // `projects//locations//agents/`. 1505 Agent string `json:"agent,omitempty"` 1506 1507 // ForceSendFields is a list of field names (e.g. "Agent") to 1508 // unconditionally include in API requests. By default, fields with 1509 // empty values are omitted from API requests. However, any non-pointer, 1510 // non-interface field appearing in ForceSendFields will be sent to the 1511 // server regardless of whether the field is empty or not. This may be 1512 // used to include empty fields in Patch requests. 1513 ForceSendFields []string `json:"-"` 1514 1515 // NullFields is a list of field names (e.g. "Agent") to include in API 1516 // requests with the JSON null value. By default, fields with empty 1517 // values are omitted from API requests. However, any field with an 1518 // empty value appearing in NullFields will be sent to the server as 1519 // null. It is an error if a field in this list has a non-empty value. 1520 // This may be used to include null fields in Patch requests. 1521 NullFields []string `json:"-"` 1522} 1523 1524func (s *GoogleCloudDialogflowCxV3beta1ImportAgentResponse) MarshalJSON() ([]byte, error) { 1525 type NoMethod GoogleCloudDialogflowCxV3beta1ImportAgentResponse 1526 raw := NoMethod(*s) 1527 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1528} 1529 1530// GoogleCloudDialogflowCxV3beta1InputAudioConfig: Instructs the speech 1531// recognizer on how to process the audio content. 1532type GoogleCloudDialogflowCxV3beta1InputAudioConfig struct { 1533 // AudioEncoding: Required. Audio encoding of the audio content to 1534 // process. 1535 // 1536 // Possible values: 1537 // "AUDIO_ENCODING_UNSPECIFIED" - Not specified. 1538 // "AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed 1539 // little-endian samples (Linear PCM). 1540 // "AUDIO_ENCODING_FLAC" - 1541 // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless 1542 // Audio Codec) is the recommended encoding because it is lossless 1543 // (therefore recognition is not compromised) and requires only about 1544 // half the bandwidth of `LINEAR16`. `FLAC` stream encoding supports 1545 // 16-bit and 24-bit samples, however, not all fields in `STREAMINFO` 1546 // are supported. 1547 // "AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit audio 1548 // samples using G.711 PCMU/mu-law. 1549 // "AUDIO_ENCODING_AMR" - Adaptive Multi-Rate Narrowband codec. 1550 // `sample_rate_hertz` must be 8000. 1551 // "AUDIO_ENCODING_AMR_WB" - Adaptive Multi-Rate Wideband codec. 1552 // `sample_rate_hertz` must be 16000. 1553 // "AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio frames in Ogg 1554 // container ([OggOpus](https://wiki.xiph.org/OggOpus)). 1555 // `sample_rate_hertz` must be 16000. 1556 // "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE" - Although the use of lossy 1557 // encodings is not recommended, if a very low bitrate encoding is 1558 // required, `OGG_OPUS` is highly preferred over Speex encoding. The 1559 // [Speex](https://speex.org/) encoding supported by Dialogflow API has 1560 // a header byte in each block, as in MIME type 1561 // `audio/x-speex-with-header-byte`. It is a variant of the RTP Speex 1562 // encoding defined in [RFC 5574](https://tools.ietf.org/html/rfc5574). 1563 // The stream is a sequence of blocks, one block per RTP packet. Each 1564 // block starts with a byte containing the length of the block, in 1565 // bytes, followed by one or more frames of Speex data, padded to an 1566 // integral number of bytes (octets) as specified in RFC 5574. In other 1567 // words, each RTP header is replaced with a single byte containing the 1568 // block length. Only Speex wideband is supported. `sample_rate_hertz` 1569 // must be 16000. 1570 AudioEncoding string `json:"audioEncoding,omitempty"` 1571 1572 // EnableWordInfo: Optional. If `true`, Dialogflow returns 1573 // SpeechWordInfo in StreamingRecognitionResult with information about 1574 // the recognized speech words, e.g. start and end time offsets. If 1575 // false or unspecified, Speech doesn't return any word-level 1576 // information. 1577 EnableWordInfo bool `json:"enableWordInfo,omitempty"` 1578 1579 // Model: Optional. Which Speech model to select for the given request. 1580 // Select the model best suited to your domain to get best results. If a 1581 // model is not explicitly specified, then we auto-select a model based 1582 // on the parameters in the InputAudioConfig. If enhanced speech model 1583 // is enabled for the agent and an enhanced version of the specified 1584 // model for the language does not exist, then the speech is recognized 1585 // using the standard version of the specified model. Refer to [Cloud 1586 // Speech API 1587 // documentation](https://cloud.google.com/speech-to-text/docs/basics#sel 1588 // ect-model) for more details. 1589 Model string `json:"model,omitempty"` 1590 1591 // ModelVariant: Optional. Which variant of the Speech model to use. 1592 // 1593 // Possible values: 1594 // "SPEECH_MODEL_VARIANT_UNSPECIFIED" - No model variant specified. In 1595 // this case Dialogflow defaults to USE_BEST_AVAILABLE. 1596 // "USE_BEST_AVAILABLE" - Use the best available variant of the Speech 1597 // model that the caller is eligible for. Please see the [Dialogflow 1598 // docs](https://cloud.google.com/dialogflow/docs/data-logging) for how 1599 // to make your project eligible for enhanced models. 1600 // "USE_STANDARD" - Use standard model variant even if an enhanced 1601 // model is available. See the [Cloud Speech 1602 // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m 1603 // odels) for details about enhanced models. 1604 // "USE_ENHANCED" - Use an enhanced model variant: * If an enhanced 1605 // variant does not exist for the given model and request language, 1606 // Dialogflow falls back to the standard variant. The [Cloud Speech 1607 // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m 1608 // odels) describes which models have enhanced variants. * If the API 1609 // caller isn't eligible for enhanced models, Dialogflow returns an 1610 // error. Please see the [Dialogflow 1611 // docs](https://cloud.google.com/dialogflow/docs/data-logging) for how 1612 // to make your project eligible. 1613 ModelVariant string `json:"modelVariant,omitempty"` 1614 1615 // PhraseHints: Optional. A list of strings containing words and phrases 1616 // that the speech recognizer should recognize with higher likelihood. 1617 // See [the Cloud Speech 1618 // documentation](https://cloud.google.com/speech-to-text/docs/basics#phr 1619 // ase-hints) for more details. 1620 PhraseHints []string `json:"phraseHints,omitempty"` 1621 1622 // SampleRateHertz: Sample rate (in Hertz) of the audio content sent in 1623 // the query. Refer to [Cloud Speech API 1624 // documentation](https://cloud.google.com/speech-to-text/docs/basics) 1625 // for more details. 1626 SampleRateHertz int64 `json:"sampleRateHertz,omitempty"` 1627 1628 // SingleUtterance: Optional. If `false` (default), recognition does not 1629 // cease until the client closes the stream. If `true`, the recognizer 1630 // will detect a single spoken utterance in input audio. Recognition 1631 // ceases when it detects the audio's voice has stopped or paused. In 1632 // this case, once a detected intent is received, the client should 1633 // close the stream and start a new request with a new stream as needed. 1634 // Note: This setting is relevant only for streaming methods. 1635 SingleUtterance bool `json:"singleUtterance,omitempty"` 1636 1637 // ForceSendFields is a list of field names (e.g. "AudioEncoding") to 1638 // unconditionally include in API requests. By default, fields with 1639 // empty values are omitted from API requests. However, any non-pointer, 1640 // non-interface field appearing in ForceSendFields will be sent to the 1641 // server regardless of whether the field is empty or not. This may be 1642 // used to include empty fields in Patch requests. 1643 ForceSendFields []string `json:"-"` 1644 1645 // NullFields is a list of field names (e.g. "AudioEncoding") to include 1646 // in API requests with the JSON null value. By default, fields with 1647 // empty values are omitted from API requests. However, any field with 1648 // an empty value appearing in NullFields will be sent to the server as 1649 // null. It is an error if a field in this list has a non-empty value. 1650 // This may be used to include null fields in Patch requests. 1651 NullFields []string `json:"-"` 1652} 1653 1654func (s *GoogleCloudDialogflowCxV3beta1InputAudioConfig) MarshalJSON() ([]byte, error) { 1655 type NoMethod GoogleCloudDialogflowCxV3beta1InputAudioConfig 1656 raw := NoMethod(*s) 1657 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1658} 1659 1660// GoogleCloudDialogflowCxV3beta1Intent: An intent represents a user's 1661// intent to interact with a conversational agent. You can provide 1662// information for the Dialogflow API to use to match user input to an 1663// intent by adding training phrases (i.e., examples of user input) to 1664// your intent. 1665type GoogleCloudDialogflowCxV3beta1Intent struct { 1666 // DisplayName: Required. The human-readable name of the intent, unique 1667 // within the agent. 1668 DisplayName string `json:"displayName,omitempty"` 1669 1670 // IsFallback: Indicates whether this is a fallback intent. Currently 1671 // only default fallback intent is allowed in the agent, which is added 1672 // upon agent creation. Adding training phrases to fallback intent is 1673 // useful in the case of requests that are mistakenly matched, since 1674 // training phrases assigned to fallback intents act as negative 1675 // examples that triggers no-match event. 1676 IsFallback bool `json:"isFallback,omitempty"` 1677 1678 // Name: The unique identifier of the intent. Required for the 1679 // Intents.UpdateIntent method. Intents.CreateIntent populates the name 1680 // automatically. Format: `projects//locations//agents//intents/`. 1681 Name string `json:"name,omitempty"` 1682 1683 // Parameters: The collection of parameters associated with the intent. 1684 Parameters []*GoogleCloudDialogflowCxV3beta1IntentParameter `json:"parameters,omitempty"` 1685 1686 // Priority: The priority of this intent. Higher numbers represent 1687 // higher priorities. - If the supplied value is unspecified or 0, the 1688 // service translates the value to 500,000, which corresponds to the 1689 // `Normal` priority in the console. - If the supplied value is 1690 // negative, the intent is ignored in runtime detect intent requests. 1691 Priority int64 `json:"priority,omitempty"` 1692 1693 // TrainingPhrases: The collection of training phrases the agent is 1694 // trained on to identify the intent. 1695 TrainingPhrases []*GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase `json:"trainingPhrases,omitempty"` 1696 1697 // ServerResponse contains the HTTP response code and headers from the 1698 // server. 1699 googleapi.ServerResponse `json:"-"` 1700 1701 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1702 // unconditionally include in API requests. By default, fields with 1703 // empty values are omitted from API requests. However, any non-pointer, 1704 // non-interface field appearing in ForceSendFields will be sent to the 1705 // server regardless of whether the field is empty or not. This may be 1706 // used to include empty fields in Patch requests. 1707 ForceSendFields []string `json:"-"` 1708 1709 // NullFields is a list of field names (e.g. "DisplayName") to include 1710 // in API requests with the JSON null value. By default, fields with 1711 // empty values are omitted from API requests. However, any field with 1712 // an empty value appearing in NullFields will be sent to the server as 1713 // null. It is an error if a field in this list has a non-empty value. 1714 // This may be used to include null fields in Patch requests. 1715 NullFields []string `json:"-"` 1716} 1717 1718func (s *GoogleCloudDialogflowCxV3beta1Intent) MarshalJSON() ([]byte, error) { 1719 type NoMethod GoogleCloudDialogflowCxV3beta1Intent 1720 raw := NoMethod(*s) 1721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1722} 1723 1724// GoogleCloudDialogflowCxV3beta1IntentInput: Represents the intent to 1725// trigger programmatically rather than as a result of natural language 1726// processing. 1727type GoogleCloudDialogflowCxV3beta1IntentInput struct { 1728 // Intent: Required. The unique identifier of the intent. Format: 1729 // `projects//locations//agents//intents/`. 1730 Intent string `json:"intent,omitempty"` 1731 1732 // ForceSendFields is a list of field names (e.g. "Intent") to 1733 // unconditionally include in API requests. By default, fields with 1734 // empty values are omitted from API requests. However, any non-pointer, 1735 // non-interface field appearing in ForceSendFields will be sent to the 1736 // server regardless of whether the field is empty or not. This may be 1737 // used to include empty fields in Patch requests. 1738 ForceSendFields []string `json:"-"` 1739 1740 // NullFields is a list of field names (e.g. "Intent") to include in API 1741 // requests with the JSON null value. By default, fields with empty 1742 // values are omitted from API requests. However, any field with an 1743 // empty value appearing in NullFields will be sent to the server as 1744 // null. It is an error if a field in this list has a non-empty value. 1745 // This may be used to include null fields in Patch requests. 1746 NullFields []string `json:"-"` 1747} 1748 1749func (s *GoogleCloudDialogflowCxV3beta1IntentInput) MarshalJSON() ([]byte, error) { 1750 type NoMethod GoogleCloudDialogflowCxV3beta1IntentInput 1751 raw := NoMethod(*s) 1752 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1753} 1754 1755// GoogleCloudDialogflowCxV3beta1IntentParameter: Represents an intent 1756// parameter. 1757type GoogleCloudDialogflowCxV3beta1IntentParameter struct { 1758 // EntityType: Required. The entity type of the parameter. Format: 1759 // `projects/-/locations/-/agents/-/entityTypes/` for system entity 1760 // types (for example, 1761 // `projects/-/locations/-/agents/-/entityTypes/sys.date`), or 1762 // `projects//locations//agents//entityTypes/` for developer entity 1763 // types. 1764 EntityType string `json:"entityType,omitempty"` 1765 1766 // Id: Required. The unique identifier of the parameter. This field is 1767 // used by training phrases to annotate their parts. 1768 Id string `json:"id,omitempty"` 1769 1770 // IsList: Indicates whether the parameter represents a list of values. 1771 IsList bool `json:"isList,omitempty"` 1772 1773 // Redact: Indicates whether the parameter content is logged in text and 1774 // audio. If it is set to true, the parameter content will be replaced 1775 // to parameter id in both request and response. The default value is 1776 // false. 1777 Redact bool `json:"redact,omitempty"` 1778 1779 // ForceSendFields is a list of field names (e.g. "EntityType") to 1780 // unconditionally include in API requests. By default, fields with 1781 // empty values are omitted from API requests. However, any non-pointer, 1782 // non-interface field appearing in ForceSendFields will be sent to the 1783 // server regardless of whether the field is empty or not. This may be 1784 // used to include empty fields in Patch requests. 1785 ForceSendFields []string `json:"-"` 1786 1787 // NullFields is a list of field names (e.g. "EntityType") to include in 1788 // API requests with the JSON null value. By default, fields with empty 1789 // values are omitted from API requests. However, any field with an 1790 // empty value appearing in NullFields will be sent to the server as 1791 // null. It is an error if a field in this list has a non-empty value. 1792 // This may be used to include null fields in Patch requests. 1793 NullFields []string `json:"-"` 1794} 1795 1796func (s *GoogleCloudDialogflowCxV3beta1IntentParameter) MarshalJSON() ([]byte, error) { 1797 type NoMethod GoogleCloudDialogflowCxV3beta1IntentParameter 1798 raw := NoMethod(*s) 1799 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1800} 1801 1802// GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase: Represents an 1803// example that the agent is trained on to identify the intent. 1804type GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase struct { 1805 // Id: Output only. The unique identifier of the training phrase. 1806 Id string `json:"id,omitempty"` 1807 1808 // Parts: Required. The ordered list of training phrase parts. The parts 1809 // are concatenated in order to form the training phrase. Note: The API 1810 // does not automatically annotate training phrases like the Dialogflow 1811 // Console does. Note: Do not forget to include whitespace at part 1812 // boundaries, so the training phrase is well formatted when the parts 1813 // are concatenated. If the training phrase does not need to be 1814 // annotated with parameters, you just need a single part with only the 1815 // Part.text field set. If you want to annotate the training phrase, you 1816 // must create multiple parts, where the fields of each part are 1817 // populated in one of two ways: - `Part.text` is set to a part of the 1818 // phrase that has no parameters. - `Part.text` is set to a part of the 1819 // phrase that you want to annotate, and the `parameter_id` field is 1820 // set. 1821 Parts []*GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart `json:"parts,omitempty"` 1822 1823 // RepeatCount: Indicates how many times this example was added to the 1824 // intent. 1825 RepeatCount int64 `json:"repeatCount,omitempty"` 1826 1827 // ForceSendFields is a list of field names (e.g. "Id") to 1828 // unconditionally include in API requests. By default, fields with 1829 // empty values are omitted from API requests. However, any non-pointer, 1830 // non-interface field appearing in ForceSendFields will be sent to the 1831 // server regardless of whether the field is empty or not. This may be 1832 // used to include empty fields in Patch requests. 1833 ForceSendFields []string `json:"-"` 1834 1835 // NullFields is a list of field names (e.g. "Id") to include in API 1836 // requests with the JSON null value. By default, fields with empty 1837 // values are omitted from API requests. However, any field with an 1838 // empty value appearing in NullFields will be sent to the server as 1839 // null. It is an error if a field in this list has a non-empty value. 1840 // This may be used to include null fields in Patch requests. 1841 NullFields []string `json:"-"` 1842} 1843 1844func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase) MarshalJSON() ([]byte, error) { 1845 type NoMethod GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase 1846 raw := NoMethod(*s) 1847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1848} 1849 1850// GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart: Represents a 1851// part of a training phrase. 1852type GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart struct { 1853 // ParameterId: The parameter used to annotate this part of the training 1854 // phrase. This field is required for annotated parts of the training 1855 // phrase. 1856 ParameterId string `json:"parameterId,omitempty"` 1857 1858 // Text: Required. The text for this part. 1859 Text string `json:"text,omitempty"` 1860 1861 // ForceSendFields is a list of field names (e.g. "ParameterId") to 1862 // unconditionally include in API requests. By default, fields with 1863 // empty values are omitted from API requests. However, any non-pointer, 1864 // non-interface field appearing in ForceSendFields will be sent to the 1865 // server regardless of whether the field is empty or not. This may be 1866 // used to include empty fields in Patch requests. 1867 ForceSendFields []string `json:"-"` 1868 1869 // NullFields is a list of field names (e.g. "ParameterId") to include 1870 // in API requests with the JSON null value. By default, fields with 1871 // empty values are omitted from API requests. However, any field with 1872 // an empty value appearing in NullFields will be sent to the server as 1873 // null. It is an error if a field in this list has a non-empty value. 1874 // This may be used to include null fields in Patch requests. 1875 NullFields []string `json:"-"` 1876} 1877 1878func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) { 1879 type NoMethod GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart 1880 raw := NoMethod(*s) 1881 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1882} 1883 1884// GoogleCloudDialogflowCxV3beta1ListAgentsResponse: The response 1885// message for Agents.ListAgents. 1886type GoogleCloudDialogflowCxV3beta1ListAgentsResponse struct { 1887 // Agents: The list of agents. There will be a maximum number of items 1888 // returned based on the page_size field in the request. 1889 Agents []*GoogleCloudDialogflowCxV3beta1Agent `json:"agents,omitempty"` 1890 1891 // NextPageToken: Token to retrieve the next page of results, or empty 1892 // if there are no more results in the list. 1893 NextPageToken string `json:"nextPageToken,omitempty"` 1894 1895 // ServerResponse contains the HTTP response code and headers from the 1896 // server. 1897 googleapi.ServerResponse `json:"-"` 1898 1899 // ForceSendFields is a list of field names (e.g. "Agents") to 1900 // unconditionally include in API requests. By default, fields with 1901 // empty values are omitted from API requests. However, any non-pointer, 1902 // non-interface field appearing in ForceSendFields will be sent to the 1903 // server regardless of whether the field is empty or not. This may be 1904 // used to include empty fields in Patch requests. 1905 ForceSendFields []string `json:"-"` 1906 1907 // NullFields is a list of field names (e.g. "Agents") to include in API 1908 // requests with the JSON null value. By default, fields with empty 1909 // values are omitted from API requests. However, any field with an 1910 // empty value appearing in NullFields will be sent to the server as 1911 // null. It is an error if a field in this list has a non-empty value. 1912 // This may be used to include null fields in Patch requests. 1913 NullFields []string `json:"-"` 1914} 1915 1916func (s *GoogleCloudDialogflowCxV3beta1ListAgentsResponse) MarshalJSON() ([]byte, error) { 1917 type NoMethod GoogleCloudDialogflowCxV3beta1ListAgentsResponse 1918 raw := NoMethod(*s) 1919 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1920} 1921 1922// GoogleCloudDialogflowCxV3beta1ListEntityTypesResponse: The response 1923// message for EntityTypes.ListEntityTypes. 1924type GoogleCloudDialogflowCxV3beta1ListEntityTypesResponse struct { 1925 // EntityTypes: The list of entity types. There will be a maximum number 1926 // of items returned based on the page_size field in the request. 1927 EntityTypes []*GoogleCloudDialogflowCxV3beta1EntityType `json:"entityTypes,omitempty"` 1928 1929 // NextPageToken: Token to retrieve the next page of results, or empty 1930 // if there are no more results in the list. 1931 NextPageToken string `json:"nextPageToken,omitempty"` 1932 1933 // ServerResponse contains the HTTP response code and headers from the 1934 // server. 1935 googleapi.ServerResponse `json:"-"` 1936 1937 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 1938 // unconditionally include in API requests. By default, fields with 1939 // empty values are omitted from API requests. However, any non-pointer, 1940 // non-interface field appearing in ForceSendFields will be sent to the 1941 // server regardless of whether the field is empty or not. This may be 1942 // used to include empty fields in Patch requests. 1943 ForceSendFields []string `json:"-"` 1944 1945 // NullFields is a list of field names (e.g. "EntityTypes") to include 1946 // in API requests with the JSON null value. By default, fields with 1947 // empty values are omitted from API requests. However, any field with 1948 // an empty value appearing in NullFields will be sent to the server as 1949 // null. It is an error if a field in this list has a non-empty value. 1950 // This may be used to include null fields in Patch requests. 1951 NullFields []string `json:"-"` 1952} 1953 1954func (s *GoogleCloudDialogflowCxV3beta1ListEntityTypesResponse) MarshalJSON() ([]byte, error) { 1955 type NoMethod GoogleCloudDialogflowCxV3beta1ListEntityTypesResponse 1956 raw := NoMethod(*s) 1957 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1958} 1959 1960// GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse: The response 1961// message for Environments.ListEnvironments. 1962type GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse struct { 1963 // Environments: The list of environments. There will be a maximum 1964 // number of items returned based on the page_size field in the request. 1965 // The list may in some cases be empty or contain fewer entries than 1966 // page_size even if this isn't the last page. 1967 Environments []*GoogleCloudDialogflowCxV3beta1Environment `json:"environments,omitempty"` 1968 1969 // NextPageToken: Token to retrieve the next page of results, or empty 1970 // if there are no more results in the list. 1971 NextPageToken string `json:"nextPageToken,omitempty"` 1972 1973 // ServerResponse contains the HTTP response code and headers from the 1974 // server. 1975 googleapi.ServerResponse `json:"-"` 1976 1977 // ForceSendFields is a list of field names (e.g. "Environments") to 1978 // unconditionally include in API requests. By default, fields with 1979 // empty values are omitted from API requests. However, any non-pointer, 1980 // non-interface field appearing in ForceSendFields will be sent to the 1981 // server regardless of whether the field is empty or not. This may be 1982 // used to include empty fields in Patch requests. 1983 ForceSendFields []string `json:"-"` 1984 1985 // NullFields is a list of field names (e.g. "Environments") to include 1986 // in API requests with the JSON null value. By default, fields with 1987 // empty values are omitted from API requests. However, any field with 1988 // an empty value appearing in NullFields will be sent to the server as 1989 // null. It is an error if a field in this list has a non-empty value. 1990 // This may be used to include null fields in Patch requests. 1991 NullFields []string `json:"-"` 1992} 1993 1994func (s *GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse) MarshalJSON() ([]byte, error) { 1995 type NoMethod GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse 1996 raw := NoMethod(*s) 1997 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1998} 1999 2000// GoogleCloudDialogflowCxV3beta1ListFlowsResponse: The response message 2001// for Flows.ListFlows. 2002type GoogleCloudDialogflowCxV3beta1ListFlowsResponse struct { 2003 // Flows: The list of flows. There will be a maximum number of items 2004 // returned based on the page_size field in the request. 2005 Flows []*GoogleCloudDialogflowCxV3beta1Flow `json:"flows,omitempty"` 2006 2007 // NextPageToken: Token to retrieve the next page of results, or empty 2008 // if there are no more results in the list. 2009 NextPageToken string `json:"nextPageToken,omitempty"` 2010 2011 // ServerResponse contains the HTTP response code and headers from the 2012 // server. 2013 googleapi.ServerResponse `json:"-"` 2014 2015 // ForceSendFields is a list of field names (e.g. "Flows") to 2016 // unconditionally include in API requests. By default, fields with 2017 // empty values are omitted from API requests. However, any non-pointer, 2018 // non-interface field appearing in ForceSendFields will be sent to the 2019 // server regardless of whether the field is empty or not. This may be 2020 // used to include empty fields in Patch requests. 2021 ForceSendFields []string `json:"-"` 2022 2023 // NullFields is a list of field names (e.g. "Flows") to include in API 2024 // requests with the JSON null value. By default, fields with empty 2025 // values are omitted from API requests. However, any field with an 2026 // empty value appearing in NullFields will be sent to the server as 2027 // null. It is an error if a field in this list has a non-empty value. 2028 // This may be used to include null fields in Patch requests. 2029 NullFields []string `json:"-"` 2030} 2031 2032func (s *GoogleCloudDialogflowCxV3beta1ListFlowsResponse) MarshalJSON() ([]byte, error) { 2033 type NoMethod GoogleCloudDialogflowCxV3beta1ListFlowsResponse 2034 raw := NoMethod(*s) 2035 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2036} 2037 2038// GoogleCloudDialogflowCxV3beta1ListIntentsResponse: The response 2039// message for Intents.ListIntents. 2040type GoogleCloudDialogflowCxV3beta1ListIntentsResponse struct { 2041 // Intents: The list of intents. There will be a maximum number of items 2042 // returned based on the page_size field in the request. 2043 Intents []*GoogleCloudDialogflowCxV3beta1Intent `json:"intents,omitempty"` 2044 2045 // NextPageToken: Token to retrieve the next page of results, or empty 2046 // if there are no more results in the list. 2047 NextPageToken string `json:"nextPageToken,omitempty"` 2048 2049 // ServerResponse contains the HTTP response code and headers from the 2050 // server. 2051 googleapi.ServerResponse `json:"-"` 2052 2053 // ForceSendFields is a list of field names (e.g. "Intents") to 2054 // unconditionally include in API requests. By default, fields with 2055 // empty values are omitted from API requests. However, any non-pointer, 2056 // non-interface field appearing in ForceSendFields will be sent to the 2057 // server regardless of whether the field is empty or not. This may be 2058 // used to include empty fields in Patch requests. 2059 ForceSendFields []string `json:"-"` 2060 2061 // NullFields is a list of field names (e.g. "Intents") to include in 2062 // API requests with the JSON null value. By default, fields with empty 2063 // values are omitted from API requests. However, any field with an 2064 // empty value appearing in NullFields will be sent to the server as 2065 // null. It is an error if a field in this list has a non-empty value. 2066 // This may be used to include null fields in Patch requests. 2067 NullFields []string `json:"-"` 2068} 2069 2070func (s *GoogleCloudDialogflowCxV3beta1ListIntentsResponse) MarshalJSON() ([]byte, error) { 2071 type NoMethod GoogleCloudDialogflowCxV3beta1ListIntentsResponse 2072 raw := NoMethod(*s) 2073 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2074} 2075 2076// GoogleCloudDialogflowCxV3beta1ListPagesResponse: The response message 2077// for Pages.ListPages. 2078type GoogleCloudDialogflowCxV3beta1ListPagesResponse struct { 2079 // NextPageToken: Token to retrieve the next page of results, or empty 2080 // if there are no more results in the list. 2081 NextPageToken string `json:"nextPageToken,omitempty"` 2082 2083 // Pages: The list of pages. There will be a maximum number of items 2084 // returned based on the page_size field in the request. 2085 Pages []*GoogleCloudDialogflowCxV3beta1Page `json:"pages,omitempty"` 2086 2087 // ServerResponse contains the HTTP response code and headers from the 2088 // server. 2089 googleapi.ServerResponse `json:"-"` 2090 2091 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2092 // unconditionally include in API requests. By default, fields with 2093 // empty values are omitted from API requests. However, any non-pointer, 2094 // non-interface field appearing in ForceSendFields will be sent to the 2095 // server regardless of whether the field is empty or not. This may be 2096 // used to include empty fields in Patch requests. 2097 ForceSendFields []string `json:"-"` 2098 2099 // NullFields is a list of field names (e.g. "NextPageToken") to include 2100 // in API requests with the JSON null value. By default, fields with 2101 // empty values are omitted from API requests. However, any field with 2102 // an empty value appearing in NullFields will be sent to the server as 2103 // null. It is an error if a field in this list has a non-empty value. 2104 // This may be used to include null fields in Patch requests. 2105 NullFields []string `json:"-"` 2106} 2107 2108func (s *GoogleCloudDialogflowCxV3beta1ListPagesResponse) MarshalJSON() ([]byte, error) { 2109 type NoMethod GoogleCloudDialogflowCxV3beta1ListPagesResponse 2110 raw := NoMethod(*s) 2111 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2112} 2113 2114// GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse: The 2115// response message for SessionEntityTypes.ListSessionEntityTypes. 2116type GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse struct { 2117 // NextPageToken: Token to retrieve the next page of results, or empty 2118 // if there are no more results in the list. 2119 NextPageToken string `json:"nextPageToken,omitempty"` 2120 2121 // SessionEntityTypes: The list of session entity types. There will be a 2122 // maximum number of items returned based on the page_size field in the 2123 // request. 2124 SessionEntityTypes []*GoogleCloudDialogflowCxV3beta1SessionEntityType `json:"sessionEntityTypes,omitempty"` 2125 2126 // ServerResponse contains the HTTP response code and headers from the 2127 // server. 2128 googleapi.ServerResponse `json:"-"` 2129 2130 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2131 // unconditionally include in API requests. By default, fields with 2132 // empty values are omitted from API requests. However, any non-pointer, 2133 // non-interface field appearing in ForceSendFields will be sent to the 2134 // server regardless of whether the field is empty or not. This may be 2135 // used to include empty fields in Patch requests. 2136 ForceSendFields []string `json:"-"` 2137 2138 // NullFields is a list of field names (e.g. "NextPageToken") to include 2139 // in API requests with the JSON null value. By default, fields with 2140 // empty values are omitted from API requests. However, any field with 2141 // an empty value appearing in NullFields will be sent to the server as 2142 // null. It is an error if a field in this list has a non-empty value. 2143 // This may be used to include null fields in Patch requests. 2144 NullFields []string `json:"-"` 2145} 2146 2147func (s *GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse) MarshalJSON() ([]byte, error) { 2148 type NoMethod GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse 2149 raw := NoMethod(*s) 2150 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2151} 2152 2153// GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse: The 2154// response message for TransitionRouteGroups.ListTransitionRouteGroups. 2155type GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse struct { 2156 // NextPageToken: Token to retrieve the next page of results, or empty 2157 // if there are no more results in the list. 2158 NextPageToken string `json:"nextPageToken,omitempty"` 2159 2160 // TransitionRouteGroups: The list of transition route groups. There 2161 // will be a maximum number of items returned based on the page_size 2162 // field in the request. The list may in some cases be empty or contain 2163 // fewer entries than page_size even if this isn't the last page. 2164 TransitionRouteGroups []*GoogleCloudDialogflowCxV3beta1TransitionRouteGroup `json:"transitionRouteGroups,omitempty"` 2165 2166 // ServerResponse contains the HTTP response code and headers from the 2167 // server. 2168 googleapi.ServerResponse `json:"-"` 2169 2170 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2171 // unconditionally include in API requests. By default, fields with 2172 // empty values are omitted from API requests. However, any non-pointer, 2173 // non-interface field appearing in ForceSendFields will be sent to the 2174 // server regardless of whether the field is empty or not. This may be 2175 // used to include empty fields in Patch requests. 2176 ForceSendFields []string `json:"-"` 2177 2178 // NullFields is a list of field names (e.g. "NextPageToken") to include 2179 // in API requests with the JSON null value. By default, fields with 2180 // empty values are omitted from API requests. However, any field with 2181 // an empty value appearing in NullFields will be sent to the server as 2182 // null. It is an error if a field in this list has a non-empty value. 2183 // This may be used to include null fields in Patch requests. 2184 NullFields []string `json:"-"` 2185} 2186 2187func (s *GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse) MarshalJSON() ([]byte, error) { 2188 type NoMethod GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse 2189 raw := NoMethod(*s) 2190 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2191} 2192 2193// GoogleCloudDialogflowCxV3beta1ListVersionsResponse: The response 2194// message for Versions.ListVersions. 2195type GoogleCloudDialogflowCxV3beta1ListVersionsResponse struct { 2196 // NextPageToken: Token to retrieve the next page of results, or empty 2197 // if there are no more results in the list. 2198 NextPageToken string `json:"nextPageToken,omitempty"` 2199 2200 // Versions: A list of versions. There will be a maximum number of items 2201 // returned based on the page_size field in the request. The list may in 2202 // some cases be empty or contain fewer entries than page_size even if 2203 // this isn't the last page. 2204 Versions []*GoogleCloudDialogflowCxV3beta1Version `json:"versions,omitempty"` 2205 2206 // ServerResponse contains the HTTP response code and headers from the 2207 // server. 2208 googleapi.ServerResponse `json:"-"` 2209 2210 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2211 // unconditionally include in API requests. By default, fields with 2212 // empty values are omitted from API requests. However, any non-pointer, 2213 // non-interface field appearing in ForceSendFields will be sent to the 2214 // server regardless of whether the field is empty or not. This may be 2215 // used to include empty fields in Patch requests. 2216 ForceSendFields []string `json:"-"` 2217 2218 // NullFields is a list of field names (e.g. "NextPageToken") to include 2219 // in API requests with the JSON null value. By default, fields with 2220 // empty values are omitted from API requests. However, any field with 2221 // an empty value appearing in NullFields will be sent to the server as 2222 // null. It is an error if a field in this list has a non-empty value. 2223 // This may be used to include null fields in Patch requests. 2224 NullFields []string `json:"-"` 2225} 2226 2227func (s *GoogleCloudDialogflowCxV3beta1ListVersionsResponse) MarshalJSON() ([]byte, error) { 2228 type NoMethod GoogleCloudDialogflowCxV3beta1ListVersionsResponse 2229 raw := NoMethod(*s) 2230 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2231} 2232 2233// GoogleCloudDialogflowCxV3beta1ListWebhooksResponse: The response 2234// message for Webhooks.ListWebhooks. 2235type GoogleCloudDialogflowCxV3beta1ListWebhooksResponse struct { 2236 // NextPageToken: Token to retrieve the next page of results, or empty 2237 // if there are no more results in the list. 2238 NextPageToken string `json:"nextPageToken,omitempty"` 2239 2240 // Webhooks: The list of webhooks. There will be a maximum number of 2241 // items returned based on the page_size field in the request. 2242 Webhooks []*GoogleCloudDialogflowCxV3beta1Webhook `json:"webhooks,omitempty"` 2243 2244 // ServerResponse contains the HTTP response code and headers from the 2245 // server. 2246 googleapi.ServerResponse `json:"-"` 2247 2248 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2249 // unconditionally include in API requests. By default, fields with 2250 // empty values are omitted from API requests. However, any non-pointer, 2251 // non-interface field appearing in ForceSendFields will be sent to the 2252 // server regardless of whether the field is empty or not. This may be 2253 // used to include empty fields in Patch requests. 2254 ForceSendFields []string `json:"-"` 2255 2256 // NullFields is a list of field names (e.g. "NextPageToken") to include 2257 // in API requests with the JSON null value. By default, fields with 2258 // empty values are omitted from API requests. However, any field with 2259 // an empty value appearing in NullFields will be sent to the server as 2260 // null. It is an error if a field in this list has a non-empty value. 2261 // This may be used to include null fields in Patch requests. 2262 NullFields []string `json:"-"` 2263} 2264 2265func (s *GoogleCloudDialogflowCxV3beta1ListWebhooksResponse) MarshalJSON() ([]byte, error) { 2266 type NoMethod GoogleCloudDialogflowCxV3beta1ListWebhooksResponse 2267 raw := NoMethod(*s) 2268 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2269} 2270 2271// GoogleCloudDialogflowCxV3beta1LoadVersionRequest: The request message 2272// for Versions.LoadVersion. 2273type GoogleCloudDialogflowCxV3beta1LoadVersionRequest struct { 2274 // AllowOverrideAgentResources: This field is used to prevent accidental 2275 // overwrite of other agent resources in the draft version, which can 2276 // potentially impact other flow's behavior. If 2277 // `allow_override_agent_resources` is false, conflicted agent-level 2278 // resources will not be overridden (i.e. intents, entities, webhooks). 2279 AllowOverrideAgentResources bool `json:"allowOverrideAgentResources,omitempty"` 2280 2281 // ForceSendFields is a list of field names (e.g. 2282 // "AllowOverrideAgentResources") to unconditionally include in API 2283 // requests. By default, fields with empty values are omitted from API 2284 // requests. However, any non-pointer, non-interface field appearing in 2285 // ForceSendFields will be sent to the server regardless of whether the 2286 // field is empty or not. This may be used to include empty fields in 2287 // Patch requests. 2288 ForceSendFields []string `json:"-"` 2289 2290 // NullFields is a list of field names (e.g. 2291 // "AllowOverrideAgentResources") to include in API requests with the 2292 // JSON null value. By default, fields with empty values are omitted 2293 // from API requests. However, any field with an empty value appearing 2294 // in NullFields will be sent to the server as null. It is an error if a 2295 // field in this list has a non-empty value. This may be used to include 2296 // null fields in Patch requests. 2297 NullFields []string `json:"-"` 2298} 2299 2300func (s *GoogleCloudDialogflowCxV3beta1LoadVersionRequest) MarshalJSON() ([]byte, error) { 2301 type NoMethod GoogleCloudDialogflowCxV3beta1LoadVersionRequest 2302 raw := NoMethod(*s) 2303 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2304} 2305 2306// GoogleCloudDialogflowCxV3beta1LookupEnvironmentHistoryResponse: The 2307// response message for Environments.LookupEnvironmentHistory. 2308type GoogleCloudDialogflowCxV3beta1LookupEnvironmentHistoryResponse struct { 2309 // Environments: Represents a list of snapshots for an environment. Time 2310 // of the snapshots is stored in `update_time`. 2311 Environments []*GoogleCloudDialogflowCxV3beta1Environment `json:"environments,omitempty"` 2312 2313 // NextPageToken: Token to retrieve the next page of results, or empty 2314 // if there are no more results in the list. 2315 NextPageToken string `json:"nextPageToken,omitempty"` 2316 2317 // ServerResponse contains the HTTP response code and headers from the 2318 // server. 2319 googleapi.ServerResponse `json:"-"` 2320 2321 // ForceSendFields is a list of field names (e.g. "Environments") to 2322 // unconditionally include in API requests. By default, fields with 2323 // empty values are omitted from API requests. However, any non-pointer, 2324 // non-interface field appearing in ForceSendFields will be sent to the 2325 // server regardless of whether the field is empty or not. This may be 2326 // used to include empty fields in Patch requests. 2327 ForceSendFields []string `json:"-"` 2328 2329 // NullFields is a list of field names (e.g. "Environments") to include 2330 // in API requests with the JSON null value. By default, fields with 2331 // empty values are omitted from API requests. However, any field with 2332 // an empty value appearing in NullFields will be sent to the server as 2333 // null. It is an error if a field in this list has a non-empty value. 2334 // This may be used to include null fields in Patch requests. 2335 NullFields []string `json:"-"` 2336} 2337 2338func (s *GoogleCloudDialogflowCxV3beta1LookupEnvironmentHistoryResponse) MarshalJSON() ([]byte, error) { 2339 type NoMethod GoogleCloudDialogflowCxV3beta1LookupEnvironmentHistoryResponse 2340 raw := NoMethod(*s) 2341 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2342} 2343 2344// GoogleCloudDialogflowCxV3beta1Match: Represents one match result of 2345// MatchIntent. 2346type GoogleCloudDialogflowCxV3beta1Match struct { 2347 // Confidence: The confidence of this match. Values range from 0.0 2348 // (completely uncertain) to 1.0 (completely certain). This value is for 2349 // informational purpose only and is only used to help match the best 2350 // intent within the classification threshold. This value may change for 2351 // the same end-user expression at any time due to a model retraining or 2352 // change in implementation. 2353 Confidence float64 `json:"confidence,omitempty"` 2354 2355 // Intent: The Intent that matched the query. Some, not all fields are 2356 // filled in this message, including but not limited to: `name` and 2357 // `display_name`. Only filled for `INTENT` match type. 2358 Intent *GoogleCloudDialogflowCxV3beta1Intent `json:"intent,omitempty"` 2359 2360 // MatchType: Type of this Match. 2361 // 2362 // Possible values: 2363 // "MATCH_TYPE_UNSPECIFIED" - Not specified. Should never be used. 2364 // "INTENT" - The query was matched to an intent. 2365 // "DIRECT_INTENT" - The query directly triggered an intent. 2366 // "PARAMETER_FILLING" - The query was used for parameter filling. 2367 // "NO_MATCH" - No match was found for the query. 2368 // "NO_INPUT" - Indicates an empty query. 2369 MatchType string `json:"matchType,omitempty"` 2370 2371 // Parameters: The collection of parameters extracted from the query. 2372 // Depending on your protocol or client library language, this is a map, 2373 // associative array, symbol table, dictionary, or JSON object composed 2374 // of a collection of (MapKey, MapValue) pairs: - MapKey type: string - 2375 // MapKey value: parameter name - MapValue type: - If parameter's entity 2376 // type is a composite entity: map - Else: string or number, depending 2377 // on parameter value type - MapValue value: - If parameter's entity 2378 // type is a composite entity: map from composite entity property names 2379 // to property values - Else: parameter value 2380 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 2381 2382 // ResolvedInput: Final text input which was matched during MatchIntent. 2383 // This value can be different from original input sent in request 2384 // because of spelling correction or other processing. 2385 ResolvedInput string `json:"resolvedInput,omitempty"` 2386 2387 // ForceSendFields is a list of field names (e.g. "Confidence") to 2388 // unconditionally include in API requests. By default, fields with 2389 // empty values are omitted from API requests. However, any non-pointer, 2390 // non-interface field appearing in ForceSendFields will be sent to the 2391 // server regardless of whether the field is empty or not. This may be 2392 // used to include empty fields in Patch requests. 2393 ForceSendFields []string `json:"-"` 2394 2395 // NullFields is a list of field names (e.g. "Confidence") to include in 2396 // API requests with the JSON null value. By default, fields with empty 2397 // values are omitted from API requests. However, any field with an 2398 // empty value appearing in NullFields will be sent to the server as 2399 // null. It is an error if a field in this list has a non-empty value. 2400 // This may be used to include null fields in Patch requests. 2401 NullFields []string `json:"-"` 2402} 2403 2404func (s *GoogleCloudDialogflowCxV3beta1Match) MarshalJSON() ([]byte, error) { 2405 type NoMethod GoogleCloudDialogflowCxV3beta1Match 2406 raw := NoMethod(*s) 2407 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2408} 2409 2410func (s *GoogleCloudDialogflowCxV3beta1Match) UnmarshalJSON(data []byte) error { 2411 type NoMethod GoogleCloudDialogflowCxV3beta1Match 2412 var s1 struct { 2413 Confidence gensupport.JSONFloat64 `json:"confidence"` 2414 *NoMethod 2415 } 2416 s1.NoMethod = (*NoMethod)(s) 2417 if err := json.Unmarshal(data, &s1); err != nil { 2418 return err 2419 } 2420 s.Confidence = float64(s1.Confidence) 2421 return nil 2422} 2423 2424// GoogleCloudDialogflowCxV3beta1MatchIntentRequest: Request of 2425// MatchIntent. 2426type GoogleCloudDialogflowCxV3beta1MatchIntentRequest struct { 2427 // QueryInput: Required. The input specification. 2428 QueryInput *GoogleCloudDialogflowCxV3beta1QueryInput `json:"queryInput,omitempty"` 2429 2430 // QueryParams: The parameters of this query. 2431 QueryParams *GoogleCloudDialogflowCxV3beta1QueryParameters `json:"queryParams,omitempty"` 2432 2433 // ForceSendFields is a list of field names (e.g. "QueryInput") to 2434 // unconditionally include in API requests. By default, fields with 2435 // empty values are omitted from API requests. However, any non-pointer, 2436 // non-interface field appearing in ForceSendFields will be sent to the 2437 // server regardless of whether the field is empty or not. This may be 2438 // used to include empty fields in Patch requests. 2439 ForceSendFields []string `json:"-"` 2440 2441 // NullFields is a list of field names (e.g. "QueryInput") to include in 2442 // API requests with the JSON null value. By default, fields with empty 2443 // values are omitted from API requests. However, any field with an 2444 // empty value appearing in NullFields will be sent to the server as 2445 // null. It is an error if a field in this list has a non-empty value. 2446 // This may be used to include null fields in Patch requests. 2447 NullFields []string `json:"-"` 2448} 2449 2450func (s *GoogleCloudDialogflowCxV3beta1MatchIntentRequest) MarshalJSON() ([]byte, error) { 2451 type NoMethod GoogleCloudDialogflowCxV3beta1MatchIntentRequest 2452 raw := NoMethod(*s) 2453 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2454} 2455 2456// GoogleCloudDialogflowCxV3beta1MatchIntentResponse: Response of 2457// MatchIntent. 2458type GoogleCloudDialogflowCxV3beta1MatchIntentResponse struct { 2459 // CurrentPage: The current Page. Some, not all fields are filled in 2460 // this message, including but not limited to `name` and `display_name`. 2461 CurrentPage *GoogleCloudDialogflowCxV3beta1Page `json:"currentPage,omitempty"` 2462 2463 // Matches: Match results, if more than one, ordered descendingly by the 2464 // confidence we have that the particular intent matches the query. 2465 Matches []*GoogleCloudDialogflowCxV3beta1Match `json:"matches,omitempty"` 2466 2467 // Text: If natural language text was provided as input, this field will 2468 // contain a copy of the text. 2469 Text string `json:"text,omitempty"` 2470 2471 // Transcript: If natural language speech audio was provided as input, 2472 // this field will contain the trascript for the audio. 2473 Transcript string `json:"transcript,omitempty"` 2474 2475 // TriggerEvent: If an event was provided as input, this field will 2476 // contain a copy of the event name. 2477 TriggerEvent string `json:"triggerEvent,omitempty"` 2478 2479 // TriggerIntent: If an intent was provided as input, this field will 2480 // contain a copy of the intent identifier. 2481 TriggerIntent string `json:"triggerIntent,omitempty"` 2482 2483 // ServerResponse contains the HTTP response code and headers from the 2484 // server. 2485 googleapi.ServerResponse `json:"-"` 2486 2487 // ForceSendFields is a list of field names (e.g. "CurrentPage") to 2488 // unconditionally include in API requests. By default, fields with 2489 // empty values are omitted from API requests. However, any non-pointer, 2490 // non-interface field appearing in ForceSendFields will be sent to the 2491 // server regardless of whether the field is empty or not. This may be 2492 // used to include empty fields in Patch requests. 2493 ForceSendFields []string `json:"-"` 2494 2495 // NullFields is a list of field names (e.g. "CurrentPage") to include 2496 // in API requests with the JSON null value. By default, fields with 2497 // empty values are omitted from API requests. However, any field with 2498 // an empty value appearing in NullFields will be sent to the server as 2499 // null. It is an error if a field in this list has a non-empty value. 2500 // This may be used to include null fields in Patch requests. 2501 NullFields []string `json:"-"` 2502} 2503 2504func (s *GoogleCloudDialogflowCxV3beta1MatchIntentResponse) MarshalJSON() ([]byte, error) { 2505 type NoMethod GoogleCloudDialogflowCxV3beta1MatchIntentResponse 2506 raw := NoMethod(*s) 2507 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2508} 2509 2510// GoogleCloudDialogflowCxV3beta1NluSettings: Settings related to NLU. 2511type GoogleCloudDialogflowCxV3beta1NluSettings struct { 2512 // ClassificationThreshold: To filter out false positive results and 2513 // still get variety in matched natural language inputs for your agent, 2514 // you can tune the machine learning classification threshold. If the 2515 // returned score value is less than the threshold value, then a 2516 // no-match event will be triggered. The score values range from 0.0 2517 // (completely uncertain) to 1.0 (completely certain). If set to 0.0, 2518 // the default of 0.3 is used. 2519 ClassificationThreshold float64 `json:"classificationThreshold,omitempty"` 2520 2521 // ModelTrainingMode: Indicates NLU model training mode. 2522 // 2523 // Possible values: 2524 // "MODEL_TRAINING_MODE_UNSPECIFIED" - Not specified. 2525 // `MODEL_TRAINING_MODE_AUTOMATIC` will be used. 2526 // "MODEL_TRAINING_MODE_AUTOMATIC" - NLU model training is 2527 // automatically triggered when a flow gets modified. User can also 2528 // manually trigger model training in this mode. 2529 // "MODEL_TRAINING_MODE_MANUAL" - User needs to manually trigger NLU 2530 // model training. Best for large flows whose models take long time to 2531 // train. 2532 ModelTrainingMode string `json:"modelTrainingMode,omitempty"` 2533 2534 // ModelType: Indicates the type of NLU model. 2535 // 2536 // Possible values: 2537 // "MODEL_TYPE_UNSPECIFIED" - Not specified. `MODEL_TYPE_STANDARD` 2538 // will be used. 2539 // "MODEL_TYPE_STANDARD" - Use standard NLU model. 2540 // "MODEL_TYPE_ADVANCED" - Use advanced NLU model. 2541 ModelType string `json:"modelType,omitempty"` 2542 2543 // ForceSendFields is a list of field names (e.g. 2544 // "ClassificationThreshold") to unconditionally include in API 2545 // requests. By default, fields with empty values are omitted from API 2546 // requests. However, any non-pointer, non-interface field appearing in 2547 // ForceSendFields will be sent to the server regardless of whether the 2548 // field is empty or not. This may be used to include empty fields in 2549 // Patch requests. 2550 ForceSendFields []string `json:"-"` 2551 2552 // NullFields is a list of field names (e.g. "ClassificationThreshold") 2553 // to include in API requests with the JSON null value. By default, 2554 // fields with empty values are omitted from API requests. However, any 2555 // field with an empty value appearing in NullFields will be sent to the 2556 // server as null. It is an error if a field in this list has a 2557 // non-empty value. This may be used to include null fields in Patch 2558 // requests. 2559 NullFields []string `json:"-"` 2560} 2561 2562func (s *GoogleCloudDialogflowCxV3beta1NluSettings) MarshalJSON() ([]byte, error) { 2563 type NoMethod GoogleCloudDialogflowCxV3beta1NluSettings 2564 raw := NoMethod(*s) 2565 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2566} 2567 2568func (s *GoogleCloudDialogflowCxV3beta1NluSettings) UnmarshalJSON(data []byte) error { 2569 type NoMethod GoogleCloudDialogflowCxV3beta1NluSettings 2570 var s1 struct { 2571 ClassificationThreshold gensupport.JSONFloat64 `json:"classificationThreshold"` 2572 *NoMethod 2573 } 2574 s1.NoMethod = (*NoMethod)(s) 2575 if err := json.Unmarshal(data, &s1); err != nil { 2576 return err 2577 } 2578 s.ClassificationThreshold = float64(s1.ClassificationThreshold) 2579 return nil 2580} 2581 2582// GoogleCloudDialogflowCxV3beta1OutputAudioConfig: Instructs the speech 2583// synthesizer how to generate the output audio content. 2584type GoogleCloudDialogflowCxV3beta1OutputAudioConfig struct { 2585 // AudioEncoding: Required. Audio encoding of the synthesized audio 2586 // content. 2587 // 2588 // Possible values: 2589 // "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" - Not specified. 2590 // "OUTPUT_AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed 2591 // little-endian samples (Linear PCM). Audio content returned as 2592 // LINEAR16 also contains a WAV header. 2593 // "OUTPUT_AUDIO_ENCODING_MP3" - MP3 audio at 32kbps. 2594 // "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS" - MP3 audio at 64kbps. 2595 // "OUTPUT_AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio wrapped in an 2596 // ogg container. The result will be a file which can be played natively 2597 // on Android, and in browsers (at least Chrome and Firefox). The 2598 // quality of the encoding is considerably higher than MP3 while using 2599 // approximately the same bitrate. 2600 // "OUTPUT_AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit 2601 // audio samples using G.711 PCMU/mu-law. 2602 AudioEncoding string `json:"audioEncoding,omitempty"` 2603 2604 // SampleRateHertz: Optional. The synthesis sample rate (in hertz) for 2605 // this audio. If not provided, then the synthesizer will use the 2606 // default sample rate based on the audio encoding. If this is different 2607 // from the voice's natural sample rate, then the synthesizer will honor 2608 // this request by converting to the desired sample rate (which might 2609 // result in worse audio quality). 2610 SampleRateHertz int64 `json:"sampleRateHertz,omitempty"` 2611 2612 // SynthesizeSpeechConfig: Optional. Configuration of how speech should 2613 // be synthesized. 2614 SynthesizeSpeechConfig *GoogleCloudDialogflowCxV3beta1SynthesizeSpeechConfig `json:"synthesizeSpeechConfig,omitempty"` 2615 2616 // ForceSendFields is a list of field names (e.g. "AudioEncoding") to 2617 // unconditionally include in API requests. By default, fields with 2618 // empty values are omitted from API requests. However, any non-pointer, 2619 // non-interface field appearing in ForceSendFields will be sent to the 2620 // server regardless of whether the field is empty or not. This may be 2621 // used to include empty fields in Patch requests. 2622 ForceSendFields []string `json:"-"` 2623 2624 // NullFields is a list of field names (e.g. "AudioEncoding") to include 2625 // in API requests with the JSON null value. By default, fields with 2626 // empty values are omitted from API requests. However, any field with 2627 // an empty value appearing in NullFields will be sent to the server as 2628 // null. It is an error if a field in this list has a non-empty value. 2629 // This may be used to include null fields in Patch requests. 2630 NullFields []string `json:"-"` 2631} 2632 2633func (s *GoogleCloudDialogflowCxV3beta1OutputAudioConfig) MarshalJSON() ([]byte, error) { 2634 type NoMethod GoogleCloudDialogflowCxV3beta1OutputAudioConfig 2635 raw := NoMethod(*s) 2636 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2637} 2638 2639// GoogleCloudDialogflowCxV3beta1Page: A Dialogflow CX conversation 2640// (session) can be described and visualized as a state machine. The 2641// states of a CX session are represented by pages. For each flow, you 2642// define many pages, where your combined pages can handle a complete 2643// conversation on the topics the flow is designed for. At any given 2644// moment, exactly one page is the current page, the current page is 2645// considered active, and the flow associated with that page is 2646// considered active. Every flow has a special start page. When a flow 2647// initially becomes active, the start page page becomes the current 2648// page. For each conversational turn, the current page will either stay 2649// the same or transition to another page. You configure each page to 2650// collect information from the end-user that is relevant for the 2651// conversational state represented by the page. For more information, 2652// see the [Page 2653// guide](https://cloud.google.com/dialogflow/cx/docs/concept/page). 2654type GoogleCloudDialogflowCxV3beta1Page struct { 2655 // DisplayName: Required. The human-readable name of the page, unique 2656 // within the agent. 2657 DisplayName string `json:"displayName,omitempty"` 2658 2659 // EntryFulfillment: The fulfillment to call when the session is 2660 // entering the page. 2661 EntryFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"entryFulfillment,omitempty"` 2662 2663 // EventHandlers: Handlers associated with the page to handle events 2664 // such as webhook errors, no match or no input. 2665 EventHandlers []*GoogleCloudDialogflowCxV3beta1EventHandler `json:"eventHandlers,omitempty"` 2666 2667 // Form: The form associated with the page, used for collecting 2668 // parameters relevant to the page. 2669 Form *GoogleCloudDialogflowCxV3beta1Form `json:"form,omitempty"` 2670 2671 // Name: The unique identifier of the page. Required for the 2672 // Pages.UpdatePage method. Pages.CreatePage populates the name 2673 // automatically. Format: `projects//locations//agents//flows//pages/`. 2674 Name string `json:"name,omitempty"` 2675 2676 // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` 2677 // associated with the page. Transition route groups must be unique 2678 // within a page. * If multiple transition routes within a page scope 2679 // refer to the same intent, then the precedence order is: page's 2680 // transition route -> page's transition route group -> flow's 2681 // transition routes. * If multiple transition route groups within a 2682 // page contain the same intent, then the first group in the ordered 2683 // list takes precedence. 2684 // Format:`projects//locations//agents//flows//transitionRouteGroups/`. 2685 TransitionRouteGroups []string `json:"transitionRouteGroups,omitempty"` 2686 2687 // TransitionRoutes: A list of transitions for the transition rules of 2688 // this page. They route the conversation to another page in the same 2689 // flow, or another flow. When we are in a certain page, the 2690 // TransitionRoutes are evalauted in the following order: * 2691 // TransitionRoutes defined in the page with intent specified. * 2692 // TransitionRoutes defined in the transition route groups. * 2693 // TransitionRoutes defined in flow with intent specified. * 2694 // TransitionRoutes defined in the page with only condition specified. 2695 TransitionRoutes []*GoogleCloudDialogflowCxV3beta1TransitionRoute `json:"transitionRoutes,omitempty"` 2696 2697 // ServerResponse contains the HTTP response code and headers from the 2698 // server. 2699 googleapi.ServerResponse `json:"-"` 2700 2701 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2702 // unconditionally include in API requests. By default, fields with 2703 // empty values are omitted from API requests. However, any non-pointer, 2704 // non-interface field appearing in ForceSendFields will be sent to the 2705 // server regardless of whether the field is empty or not. This may be 2706 // used to include empty fields in Patch requests. 2707 ForceSendFields []string `json:"-"` 2708 2709 // NullFields is a list of field names (e.g. "DisplayName") to include 2710 // in API requests with the JSON null value. By default, fields with 2711 // empty values are omitted from API requests. However, any field with 2712 // an empty value appearing in NullFields will be sent to the server as 2713 // null. It is an error if a field in this list has a non-empty value. 2714 // This may be used to include null fields in Patch requests. 2715 NullFields []string `json:"-"` 2716} 2717 2718func (s *GoogleCloudDialogflowCxV3beta1Page) MarshalJSON() ([]byte, error) { 2719 type NoMethod GoogleCloudDialogflowCxV3beta1Page 2720 raw := NoMethod(*s) 2721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2722} 2723 2724// GoogleCloudDialogflowCxV3beta1PageInfo: Represents page information 2725// communicated to and from the webhook. 2726type GoogleCloudDialogflowCxV3beta1PageInfo struct { 2727 // CurrentPage: Always present for WebhookRequest. Ignored for 2728 // WebhookResponse. The unique identifier of the current page. Format: 2729 // `projects//locations//agents//flows//pages/`. 2730 CurrentPage string `json:"currentPage,omitempty"` 2731 2732 // FormInfo: Optional for both WebhookRequest and WebhookResponse. 2733 // Information about the form. 2734 FormInfo *GoogleCloudDialogflowCxV3beta1PageInfoFormInfo `json:"formInfo,omitempty"` 2735 2736 // ForceSendFields is a list of field names (e.g. "CurrentPage") to 2737 // unconditionally include in API requests. By default, fields with 2738 // empty values are omitted from API requests. However, any non-pointer, 2739 // non-interface field appearing in ForceSendFields will be sent to the 2740 // server regardless of whether the field is empty or not. This may be 2741 // used to include empty fields in Patch requests. 2742 ForceSendFields []string `json:"-"` 2743 2744 // NullFields is a list of field names (e.g. "CurrentPage") to include 2745 // in API requests with the JSON null value. By default, fields with 2746 // empty values are omitted from API requests. However, any field with 2747 // an empty value appearing in NullFields will be sent to the server as 2748 // null. It is an error if a field in this list has a non-empty value. 2749 // This may be used to include null fields in Patch requests. 2750 NullFields []string `json:"-"` 2751} 2752 2753func (s *GoogleCloudDialogflowCxV3beta1PageInfo) MarshalJSON() ([]byte, error) { 2754 type NoMethod GoogleCloudDialogflowCxV3beta1PageInfo 2755 raw := NoMethod(*s) 2756 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2757} 2758 2759// GoogleCloudDialogflowCxV3beta1PageInfoFormInfo: Represents form 2760// information. 2761type GoogleCloudDialogflowCxV3beta1PageInfoFormInfo struct { 2762 // ParameterInfo: Optional for both WebhookRequest and WebhookResponse. 2763 // The parameters contained in the form. Note that the webhook cannot 2764 // add or remove any form parameter. 2765 ParameterInfo []*GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo `json:"parameterInfo,omitempty"` 2766 2767 // ForceSendFields is a list of field names (e.g. "ParameterInfo") to 2768 // unconditionally include in API requests. By default, fields with 2769 // empty values are omitted from API requests. However, any non-pointer, 2770 // non-interface field appearing in ForceSendFields will be sent to the 2771 // server regardless of whether the field is empty or not. This may be 2772 // used to include empty fields in Patch requests. 2773 ForceSendFields []string `json:"-"` 2774 2775 // NullFields is a list of field names (e.g. "ParameterInfo") to include 2776 // in API requests with the JSON null value. By default, fields with 2777 // empty values are omitted from API requests. However, any field with 2778 // an empty value appearing in NullFields will be sent to the server as 2779 // null. It is an error if a field in this list has a non-empty value. 2780 // This may be used to include null fields in Patch requests. 2781 NullFields []string `json:"-"` 2782} 2783 2784func (s *GoogleCloudDialogflowCxV3beta1PageInfoFormInfo) MarshalJSON() ([]byte, error) { 2785 type NoMethod GoogleCloudDialogflowCxV3beta1PageInfoFormInfo 2786 raw := NoMethod(*s) 2787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2788} 2789 2790// GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo: 2791// Represents parameter information. 2792type GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo struct { 2793 // DisplayName: Always present for WebhookRequest. Required for 2794 // WebhookResponse. The human-readable name of the parameter, unique 2795 // within the form. This field cannot be modified by the webhook. 2796 DisplayName string `json:"displayName,omitempty"` 2797 2798 // JustCollected: Optional for WebhookRequest. Ignored for 2799 // WebhookResponse. Indicates if the parameter value was just collected 2800 // on the last conversation turn. 2801 JustCollected bool `json:"justCollected,omitempty"` 2802 2803 // Required: Optional for both WebhookRequest and WebhookResponse. 2804 // Indicates whether the parameter is required. Optional parameters will 2805 // not trigger prompts; however, they are filled if the user specifies 2806 // them. Required parameters must be filled before form filling 2807 // concludes. 2808 Required bool `json:"required,omitempty"` 2809 2810 // State: Always present for WebhookRequest. Required for 2811 // WebhookResponse. The state of the parameter. This field can be set to 2812 // INVALID by the webhook to invalidate the parameter; other values set 2813 // by the webhook will be ignored. 2814 // 2815 // Possible values: 2816 // "PARAMETER_STATE_UNSPECIFIED" - Not specified. This value should be 2817 // never used. 2818 // "EMPTY" - Indicates that the parameter does not have a value. 2819 // "INVALID" - Indicates that the parameter value is invalid. This 2820 // field can be used by the webhook to invalidate the parameter and ask 2821 // the server to collect it from the user again. 2822 // "FILLED" - Indicates that the parameter has a value. 2823 State string `json:"state,omitempty"` 2824 2825 // Value: Optional for both WebhookRequest and WebhookResponse. The 2826 // value of the parameter. This field can be set by the webhook to 2827 // change the parameter value. 2828 Value interface{} `json:"value,omitempty"` 2829 2830 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2831 // unconditionally include in API requests. By default, fields with 2832 // empty values are omitted from API requests. However, any non-pointer, 2833 // non-interface field appearing in ForceSendFields will be sent to the 2834 // server regardless of whether the field is empty or not. This may be 2835 // used to include empty fields in Patch requests. 2836 ForceSendFields []string `json:"-"` 2837 2838 // NullFields is a list of field names (e.g. "DisplayName") to include 2839 // in API requests with the JSON null value. By default, fields with 2840 // empty values are omitted from API requests. However, any field with 2841 // an empty value appearing in NullFields will be sent to the server as 2842 // null. It is an error if a field in this list has a non-empty value. 2843 // This may be used to include null fields in Patch requests. 2844 NullFields []string `json:"-"` 2845} 2846 2847func (s *GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo) MarshalJSON() ([]byte, error) { 2848 type NoMethod GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo 2849 raw := NoMethod(*s) 2850 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2851} 2852 2853// GoogleCloudDialogflowCxV3beta1QueryInput: Represents the query input. 2854// It can contain one of: 1. A conversational query in the form of text. 2855// 2. An intent query that specifies which intent to trigger. 3. Natural 2856// language speech audio to be processed. 4. An event to be triggered. 2857type GoogleCloudDialogflowCxV3beta1QueryInput struct { 2858 // Audio: The natural language speech audio to be processed. 2859 Audio *GoogleCloudDialogflowCxV3beta1AudioInput `json:"audio,omitempty"` 2860 2861 // Event: The event to be triggered. 2862 Event *GoogleCloudDialogflowCxV3beta1EventInput `json:"event,omitempty"` 2863 2864 // Intent: The intent to be triggered. 2865 Intent *GoogleCloudDialogflowCxV3beta1IntentInput `json:"intent,omitempty"` 2866 2867 // LanguageCode: Required. The language of the input. See [Language 2868 // Support](https://cloud.google.com/dialogflow/docs/reference/language) 2869 // for a list of the currently supported language codes. Note that 2870 // queries in the same session do not necessarily need to specify the 2871 // same language. 2872 LanguageCode string `json:"languageCode,omitempty"` 2873 2874 // Text: The natural language text to be processed. 2875 Text *GoogleCloudDialogflowCxV3beta1TextInput `json:"text,omitempty"` 2876 2877 // ForceSendFields is a list of field names (e.g. "Audio") to 2878 // unconditionally include in API requests. By default, fields with 2879 // empty values are omitted from API requests. However, any non-pointer, 2880 // non-interface field appearing in ForceSendFields will be sent to the 2881 // server regardless of whether the field is empty or not. This may be 2882 // used to include empty fields in Patch requests. 2883 ForceSendFields []string `json:"-"` 2884 2885 // NullFields is a list of field names (e.g. "Audio") to include in API 2886 // requests with the JSON null value. By default, fields with empty 2887 // values are omitted from API requests. However, any field with an 2888 // empty value appearing in NullFields will be sent to the server as 2889 // null. It is an error if a field in this list has a non-empty value. 2890 // This may be used to include null fields in Patch requests. 2891 NullFields []string `json:"-"` 2892} 2893 2894func (s *GoogleCloudDialogflowCxV3beta1QueryInput) MarshalJSON() ([]byte, error) { 2895 type NoMethod GoogleCloudDialogflowCxV3beta1QueryInput 2896 raw := NoMethod(*s) 2897 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2898} 2899 2900// GoogleCloudDialogflowCxV3beta1QueryParameters: Represents the 2901// parameters of a conversational query. 2902type GoogleCloudDialogflowCxV3beta1QueryParameters struct { 2903 // AnalyzeQueryTextSentiment: Configures whether sentiment analysis 2904 // should be performed. If not provided, sentiment analysis is not 2905 // performed. 2906 AnalyzeQueryTextSentiment bool `json:"analyzeQueryTextSentiment,omitempty"` 2907 2908 // GeoLocation: The geo location of this conversational query. 2909 GeoLocation *GoogleTypeLatLng `json:"geoLocation,omitempty"` 2910 2911 // Parameters: Additional parameters to be put into session parameters. 2912 // To remove a parameter from the session, clients should explicitly set 2913 // the parameter value to null. Depending on your protocol or client 2914 // library language, this is a map, associative array, symbol table, 2915 // dictionary, or JSON object composed of a collection of (MapKey, 2916 // MapValue) pairs: - MapKey type: string - MapKey value: parameter name 2917 // - MapValue type: - If parameter's entity type is a composite entity: 2918 // map - Else: string or number, depending on parameter value type - 2919 // MapValue value: - If parameter's entity type is a composite entity: 2920 // map from composite entity property names to property values - Else: 2921 // parameter value 2922 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 2923 2924 // Payload: This field can be used to pass custom data into the webhook 2925 // associated with the agent. Arbitrary JSON objects are supported. 2926 Payload googleapi.RawMessage `json:"payload,omitempty"` 2927 2928 // SessionEntityTypes: Additional session entity types to replace or 2929 // extend developer entity types with. The entity synonyms apply to all 2930 // languages and persist for the session of this query. 2931 SessionEntityTypes []*GoogleCloudDialogflowCxV3beta1SessionEntityType `json:"sessionEntityTypes,omitempty"` 2932 2933 // TimeZone: The time zone of this conversational query from the [time 2934 // zone database](https://www.iana.org/time-zones), e.g., 2935 // America/New_York, Europe/Paris. If not provided, the time zone 2936 // specified in the agent is used. 2937 TimeZone string `json:"timeZone,omitempty"` 2938 2939 // ForceSendFields is a list of field names (e.g. 2940 // "AnalyzeQueryTextSentiment") to unconditionally include in API 2941 // requests. By default, fields with empty values are omitted from API 2942 // requests. However, any non-pointer, non-interface field appearing in 2943 // ForceSendFields will be sent to the server regardless of whether the 2944 // field is empty or not. This may be used to include empty fields in 2945 // Patch requests. 2946 ForceSendFields []string `json:"-"` 2947 2948 // NullFields is a list of field names (e.g. 2949 // "AnalyzeQueryTextSentiment") to include in API requests with the JSON 2950 // null value. By default, fields with empty values are omitted from API 2951 // requests. However, any field with an empty value appearing in 2952 // NullFields will be sent to the server as null. It is an error if a 2953 // field in this list has a non-empty value. This may be used to include 2954 // null fields in Patch requests. 2955 NullFields []string `json:"-"` 2956} 2957 2958func (s *GoogleCloudDialogflowCxV3beta1QueryParameters) MarshalJSON() ([]byte, error) { 2959 type NoMethod GoogleCloudDialogflowCxV3beta1QueryParameters 2960 raw := NoMethod(*s) 2961 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2962} 2963 2964// GoogleCloudDialogflowCxV3beta1QueryResult: Represents the result of a 2965// conversational query. 2966type GoogleCloudDialogflowCxV3beta1QueryResult struct { 2967 // CurrentPage: The current Page. Some, not all fields are filled in 2968 // this message, including but not limited to `name` and `display_name`. 2969 CurrentPage *GoogleCloudDialogflowCxV3beta1Page `json:"currentPage,omitempty"` 2970 2971 // DiagnosticInfo: The free-form diagnostic info. For example, this 2972 // field could contain webhook call latency. The string keys of the 2973 // Struct's fields map can change without notice. 2974 DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"` 2975 2976 // Intent: The Intent that matched the conversational query. Some, not 2977 // all fields are filled in this message, including but not limited to: 2978 // `name` and `display_name`. This field is deprecated, please use 2979 // QueryResult.match instead. 2980 Intent *GoogleCloudDialogflowCxV3beta1Intent `json:"intent,omitempty"` 2981 2982 // IntentDetectionConfidence: The intent detection confidence. Values 2983 // range from 0.0 (completely uncertain) to 1.0 (completely certain). 2984 // This value is for informational purpose only and is only used to help 2985 // match the best intent within the classification threshold. This value 2986 // may change for the same end-user expression at any time due to a 2987 // model retraining or change in implementation. This field is 2988 // deprecated, please use QueryResult.match instead. 2989 IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"` 2990 2991 // LanguageCode: The language that was triggered during intent 2992 // detection. See [Language 2993 // Support](https://cloud.google.com/dialogflow/docs/reference/language) 2994 // for a list of the currently supported language codes. 2995 LanguageCode string `json:"languageCode,omitempty"` 2996 2997 // Match: Intent match result, could be an intent or an event. 2998 Match *GoogleCloudDialogflowCxV3beta1Match `json:"match,omitempty"` 2999 3000 // Parameters: The collected session parameters. Depending on your 3001 // protocol or client library language, this is a map, associative 3002 // array, symbol table, dictionary, or JSON object composed of a 3003 // collection of (MapKey, MapValue) pairs: - MapKey type: string - 3004 // MapKey value: parameter name - MapValue type: - If parameter's entity 3005 // type is a composite entity: map - Else: string or number, depending 3006 // on parameter value type - MapValue value: - If parameter's entity 3007 // type is a composite entity: map from composite entity property names 3008 // to property values - Else: parameter value 3009 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 3010 3011 // ResponseMessages: The list of rich messages returned to the client. 3012 // Responses vary from simple text messages to more sophisticated, 3013 // structured payloads used to drive complex logic. 3014 ResponseMessages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"responseMessages,omitempty"` 3015 3016 // SentimentAnalysisResult: The sentiment analyss result, which depends 3017 // on `analyze_query_text_sentiment`, specified in the request. 3018 SentimentAnalysisResult *GoogleCloudDialogflowCxV3beta1SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"` 3019 3020 // Text: If natural language text was provided as input, this field will 3021 // contain a copy of the text. 3022 Text string `json:"text,omitempty"` 3023 3024 // Transcript: If natural language speech audio was provided as input, 3025 // this field will contain the trascript for the audio. 3026 Transcript string `json:"transcript,omitempty"` 3027 3028 // TriggerEvent: If an event was provided as input, this field will 3029 // contain the name of the event. 3030 TriggerEvent string `json:"triggerEvent,omitempty"` 3031 3032 // TriggerIntent: If an intent was provided as input, this field will 3033 // contain a copy of the intent identifier. 3034 TriggerIntent string `json:"triggerIntent,omitempty"` 3035 3036 // WebhookPayloads: The list of webhook payload in 3037 // WebhookResponse.payload, in the order of call sequence. If some 3038 // webhook call fails or doesn't return any payload, an empty `Struct` 3039 // would be used instead. 3040 WebhookPayloads []googleapi.RawMessage `json:"webhookPayloads,omitempty"` 3041 3042 // WebhookStatuses: The list of webhook call status in the order of call 3043 // sequence. 3044 WebhookStatuses []*GoogleRpcStatus `json:"webhookStatuses,omitempty"` 3045 3046 // ForceSendFields is a list of field names (e.g. "CurrentPage") to 3047 // unconditionally include in API requests. By default, fields with 3048 // empty values are omitted from API requests. However, any non-pointer, 3049 // non-interface field appearing in ForceSendFields will be sent to the 3050 // server regardless of whether the field is empty or not. This may be 3051 // used to include empty fields in Patch requests. 3052 ForceSendFields []string `json:"-"` 3053 3054 // NullFields is a list of field names (e.g. "CurrentPage") to include 3055 // in API requests with the JSON null value. By default, fields with 3056 // empty values are omitted from API requests. However, any field with 3057 // an empty value appearing in NullFields will be sent to the server as 3058 // null. It is an error if a field in this list has a non-empty value. 3059 // This may be used to include null fields in Patch requests. 3060 NullFields []string `json:"-"` 3061} 3062 3063func (s *GoogleCloudDialogflowCxV3beta1QueryResult) MarshalJSON() ([]byte, error) { 3064 type NoMethod GoogleCloudDialogflowCxV3beta1QueryResult 3065 raw := NoMethod(*s) 3066 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3067} 3068 3069func (s *GoogleCloudDialogflowCxV3beta1QueryResult) UnmarshalJSON(data []byte) error { 3070 type NoMethod GoogleCloudDialogflowCxV3beta1QueryResult 3071 var s1 struct { 3072 IntentDetectionConfidence gensupport.JSONFloat64 `json:"intentDetectionConfidence"` 3073 *NoMethod 3074 } 3075 s1.NoMethod = (*NoMethod)(s) 3076 if err := json.Unmarshal(data, &s1); err != nil { 3077 return err 3078 } 3079 s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence) 3080 return nil 3081} 3082 3083// GoogleCloudDialogflowCxV3beta1ResponseMessage: Represents a response 3084// message that can be returned by a conversational agent. Response 3085// messages are also used for output audio synthesis. The approach is as 3086// follows: * If at least one OutputAudioText response is present, then 3087// all OutputAudioText responses are linearly concatenated, and the 3088// result is used for output audio synthesis. * If the OutputAudioText 3089// responses are a mixture of text and SSML, then the concatenated 3090// result is treated as SSML; otherwise, the result is treated as either 3091// text or SSML as appropriate. The agent designer should ideally use 3092// either text or SSML consistently throughout the bot design. * 3093// Otherwise, all Text responses are linearly concatenated, and the 3094// result is used for output audio synthesis. This approach allows for 3095// more sophisticated user experience scenarios, where the text 3096// displayed to the user may differ from what is heard. 3097type GoogleCloudDialogflowCxV3beta1ResponseMessage struct { 3098 // ConversationSuccess: Indicates that the conversation succeeded. 3099 ConversationSuccess *GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess `json:"conversationSuccess,omitempty"` 3100 3101 // EndInteraction: Output only. A signal that indicates the interaction 3102 // with the Dialogflow agent has ended. This message is generated by 3103 // Dialogflow only when the conversation reaches `END_SESSION` or 3104 // `END_PAGE` page. It is not supposed to be defined by the user. It's 3105 // guaranteed that there is at most one such message in each response. 3106 EndInteraction *GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction `json:"endInteraction,omitempty"` 3107 3108 // LiveAgentHandoff: Hands off conversation to a human agent. 3109 LiveAgentHandoff *GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"` 3110 3111 // MixedAudio: Output only. An audio response message composed of both 3112 // the synthesized Dialogflow agent responses and responses defined via 3113 // play_audio. This message is generated by Dialogflow only and not 3114 // supposed to be defined by the user. 3115 MixedAudio *GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio `json:"mixedAudio,omitempty"` 3116 3117 // OutputAudioText: A text or ssml response that is preferentially used 3118 // for TTS output audio synthesis, as described in the comment on the 3119 // ResponseMessage message. 3120 OutputAudioText *GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText `json:"outputAudioText,omitempty"` 3121 3122 // Payload: Returns a response containing a custom, platform-specific 3123 // payload. 3124 Payload googleapi.RawMessage `json:"payload,omitempty"` 3125 3126 // PlayAudio: Signal that the client should play an audio clip hosted at 3127 // a client-specific URI. Dialogflow uses this to construct mixed_audio. 3128 // However, Dialogflow itself does not try to read or process the URI in 3129 // any way. 3130 PlayAudio *GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio `json:"playAudio,omitempty"` 3131 3132 // Text: Returns a text response. 3133 Text *GoogleCloudDialogflowCxV3beta1ResponseMessageText `json:"text,omitempty"` 3134 3135 // ForceSendFields is a list of field names (e.g. "ConversationSuccess") 3136 // to unconditionally include in API requests. By default, fields with 3137 // empty values are omitted from API requests. However, any non-pointer, 3138 // non-interface field appearing in ForceSendFields will be sent to the 3139 // server regardless of whether the field is empty or not. This may be 3140 // used to include empty fields in Patch requests. 3141 ForceSendFields []string `json:"-"` 3142 3143 // NullFields is a list of field names (e.g. "ConversationSuccess") to 3144 // include in API requests with the JSON null value. By default, fields 3145 // with empty values are omitted from API requests. However, any field 3146 // with an empty value appearing in NullFields will be sent to the 3147 // server as null. It is an error if a field in this list has a 3148 // non-empty value. This may be used to include null fields in Patch 3149 // requests. 3150 NullFields []string `json:"-"` 3151} 3152 3153func (s *GoogleCloudDialogflowCxV3beta1ResponseMessage) MarshalJSON() ([]byte, error) { 3154 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessage 3155 raw := NoMethod(*s) 3156 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3157} 3158 3159// GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess: 3160// Indicates that the conversation succeeded, i.e., the bot handled the 3161// issue that the customer talked to it about. Dialogflow only uses this 3162// to determine which conversations should be counted as successful and 3163// doesn't process the metadata in this message in any way. Note that 3164// Dialogflow also considers conversations that get to the conversation 3165// end page as successful even if they don't return ConversationSuccess. 3166// You may set this, for example: * In the entry_fulfillment of a Page 3167// if entering the page indicates that the conversation succeeded. * In 3168// a webhook response when you determine that you handled the customer 3169// issue. 3170type GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess struct { 3171 // Metadata: Custom metadata. Dialogflow doesn't impose any structure on 3172 // this. 3173 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3174 3175 // ForceSendFields is a list of field names (e.g. "Metadata") to 3176 // unconditionally include in API requests. By default, fields with 3177 // empty values are omitted from API requests. However, any non-pointer, 3178 // non-interface field appearing in ForceSendFields will be sent to the 3179 // server regardless of whether the field is empty or not. This may be 3180 // used to include empty fields in Patch requests. 3181 ForceSendFields []string `json:"-"` 3182 3183 // NullFields is a list of field names (e.g. "Metadata") to include in 3184 // API requests with the JSON null value. By default, fields with empty 3185 // values are omitted from API requests. However, any field with an 3186 // empty value appearing in NullFields will be sent to the server as 3187 // null. It is an error if a field in this list has a non-empty value. 3188 // This may be used to include null fields in Patch requests. 3189 NullFields []string `json:"-"` 3190} 3191 3192func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess) MarshalJSON() ([]byte, error) { 3193 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess 3194 raw := NoMethod(*s) 3195 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3196} 3197 3198// GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction: 3199// Indicates that interaction with the Dialogflow agent has ended. This 3200// message is generated by Dialogflow only and not supposed to be 3201// defined by the user. 3202type GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction struct { 3203} 3204 3205// GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff: 3206// Indicates that the conversation should be handed off to a live agent. 3207// Dialogflow only uses this to determine which conversations were 3208// handed off to a human agent for measurement purposes. What else to do 3209// with this signal is up to you and your handoff procedures. You may 3210// set this, for example: * In the entry_fulfillment of a Page if 3211// entering the page indicates something went extremely wrong in the 3212// conversation. * In a webhook response when you determine that the 3213// customer issue can only be handled by a human. 3214type GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff struct { 3215 // Metadata: Custom metadata for your handoff procedure. Dialogflow 3216 // doesn't impose any structure on this. 3217 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3218 3219 // ForceSendFields is a list of field names (e.g. "Metadata") to 3220 // unconditionally include in API requests. By default, fields with 3221 // empty values are omitted from API requests. However, any non-pointer, 3222 // non-interface field appearing in ForceSendFields will be sent to the 3223 // server regardless of whether the field is empty or not. This may be 3224 // used to include empty fields in Patch requests. 3225 ForceSendFields []string `json:"-"` 3226 3227 // NullFields is a list of field names (e.g. "Metadata") to include in 3228 // API requests with the JSON null value. By default, fields with empty 3229 // values are omitted from API requests. However, any field with an 3230 // empty value appearing in NullFields will be sent to the server as 3231 // null. It is an error if a field in this list has a non-empty value. 3232 // This may be used to include null fields in Patch requests. 3233 NullFields []string `json:"-"` 3234} 3235 3236func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff) MarshalJSON() ([]byte, error) { 3237 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff 3238 raw := NoMethod(*s) 3239 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3240} 3241 3242// GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio: Represents 3243// an audio message that is composed of both segments synthesized from 3244// the Dialogflow agent prompts and ones hosted externally at the 3245// specified URIs. The external URIs are specified via play_audio. This 3246// message is generated by Dialogflow only and not supposed to be 3247// defined by the user. 3248type GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio struct { 3249 // Segments: Segments this audio response is composed of. 3250 Segments []*GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment `json:"segments,omitempty"` 3251 3252 // ForceSendFields is a list of field names (e.g. "Segments") to 3253 // unconditionally include in API requests. By default, fields with 3254 // empty values are omitted from API requests. However, any non-pointer, 3255 // non-interface field appearing in ForceSendFields will be sent to the 3256 // server regardless of whether the field is empty or not. This may be 3257 // used to include empty fields in Patch requests. 3258 ForceSendFields []string `json:"-"` 3259 3260 // NullFields is a list of field names (e.g. "Segments") to include in 3261 // API requests with the JSON null value. By default, fields with empty 3262 // values are omitted from API requests. However, any field with an 3263 // empty value appearing in NullFields will be sent to the server as 3264 // null. It is an error if a field in this list has a non-empty value. 3265 // This may be used to include null fields in Patch requests. 3266 NullFields []string `json:"-"` 3267} 3268 3269func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio) MarshalJSON() ([]byte, error) { 3270 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio 3271 raw := NoMethod(*s) 3272 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3273} 3274 3275// GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment: 3276// Represents one segment of audio. 3277type GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment struct { 3278 // AllowPlaybackInterruption: Output only. Whether the playback of this 3279 // segment can be interrupted by the end user's speech and the client 3280 // should then start the next Dialogflow request. 3281 AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` 3282 3283 // Audio: Raw audio synthesized from the Dialogflow agent's response 3284 // using the output config specified in the request. 3285 Audio string `json:"audio,omitempty"` 3286 3287 // Uri: Client-specific URI that points to an audio clip accessible to 3288 // the client. Dialogflow does not impose any validation on it. 3289 Uri string `json:"uri,omitempty"` 3290 3291 // ForceSendFields is a list of field names (e.g. 3292 // "AllowPlaybackInterruption") to unconditionally include in API 3293 // requests. By default, fields with empty values are omitted from API 3294 // requests. However, any non-pointer, non-interface field appearing in 3295 // ForceSendFields will be sent to the server regardless of whether the 3296 // field is empty or not. This may be used to include empty fields in 3297 // Patch requests. 3298 ForceSendFields []string `json:"-"` 3299 3300 // NullFields is a list of field names (e.g. 3301 // "AllowPlaybackInterruption") to include in API requests with the JSON 3302 // null value. By default, fields with empty values are omitted from API 3303 // requests. However, any field with an empty value appearing in 3304 // NullFields will be sent to the server as null. It is an error if a 3305 // field in this list has a non-empty value. This may be used to include 3306 // null fields in Patch requests. 3307 NullFields []string `json:"-"` 3308} 3309 3310func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment) MarshalJSON() ([]byte, error) { 3311 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment 3312 raw := NoMethod(*s) 3313 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3314} 3315 3316// GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText: A text 3317// or ssml response that is preferentially used for TTS output audio 3318// synthesis, as described in the comment on the ResponseMessage 3319// message. 3320type GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText struct { 3321 // AllowPlaybackInterruption: Output only. Whether the playback of this 3322 // message can be interrupted by the end user's speech and the client 3323 // can then starts the next Dialogflow request. 3324 AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` 3325 3326 // Ssml: The SSML text to be synthesized. For more information, see 3327 // [SSML](/speech/text-to-speech/docs/ssml). 3328 Ssml string `json:"ssml,omitempty"` 3329 3330 // Text: The raw text to be synthesized. 3331 Text string `json:"text,omitempty"` 3332 3333 // ForceSendFields is a list of field names (e.g. 3334 // "AllowPlaybackInterruption") to unconditionally include in API 3335 // requests. By default, fields with empty values are omitted from API 3336 // requests. However, any non-pointer, non-interface field appearing in 3337 // ForceSendFields will be sent to the server regardless of whether the 3338 // field is empty or not. This may be used to include empty fields in 3339 // Patch requests. 3340 ForceSendFields []string `json:"-"` 3341 3342 // NullFields is a list of field names (e.g. 3343 // "AllowPlaybackInterruption") to include in API requests with the JSON 3344 // null value. By default, fields with empty values are omitted from API 3345 // requests. However, any field with an empty value appearing in 3346 // NullFields will be sent to the server as null. It is an error if a 3347 // field in this list has a non-empty value. This may be used to include 3348 // null fields in Patch requests. 3349 NullFields []string `json:"-"` 3350} 3351 3352func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText) MarshalJSON() ([]byte, error) { 3353 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText 3354 raw := NoMethod(*s) 3355 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3356} 3357 3358// GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio: Specifies an 3359// audio clip to be played by the client as part of the response. 3360type GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio struct { 3361 // AllowPlaybackInterruption: Output only. Whether the playback of this 3362 // message can be interrupted by the end user's speech and the client 3363 // can then starts the next Dialogflow request. 3364 AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` 3365 3366 // AudioUri: Required. URI of the audio clip. Dialogflow does not impose 3367 // any validation on this value. It is specific to the client that reads 3368 // it. 3369 AudioUri string `json:"audioUri,omitempty"` 3370 3371 // ForceSendFields is a list of field names (e.g. 3372 // "AllowPlaybackInterruption") to unconditionally include in API 3373 // requests. By default, fields with empty values are omitted from API 3374 // requests. However, any non-pointer, non-interface field appearing in 3375 // ForceSendFields will be sent to the server regardless of whether the 3376 // field is empty or not. This may be used to include empty fields in 3377 // Patch requests. 3378 ForceSendFields []string `json:"-"` 3379 3380 // NullFields is a list of field names (e.g. 3381 // "AllowPlaybackInterruption") to include in API requests with the JSON 3382 // null value. By default, fields with empty values are omitted from API 3383 // requests. However, any field with an empty value appearing in 3384 // NullFields will be sent to the server as null. It is an error if a 3385 // field in this list has a non-empty value. This may be used to include 3386 // null fields in Patch requests. 3387 NullFields []string `json:"-"` 3388} 3389 3390func (s *GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio) MarshalJSON() ([]byte, error) { 3391 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio 3392 raw := NoMethod(*s) 3393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3394} 3395 3396// GoogleCloudDialogflowCxV3beta1ResponseMessageText: The text response 3397// message. 3398type GoogleCloudDialogflowCxV3beta1ResponseMessageText struct { 3399 // AllowPlaybackInterruption: Output only. Whether the playback of this 3400 // message can be interrupted by the end user's speech and the client 3401 // can then starts the next Dialogflow request. 3402 AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` 3403 3404 // Text: Required. A collection of text responses. 3405 Text []string `json:"text,omitempty"` 3406 3407 // ForceSendFields is a list of field names (e.g. 3408 // "AllowPlaybackInterruption") to unconditionally include in API 3409 // requests. By default, fields with empty values are omitted from API 3410 // requests. However, any non-pointer, non-interface field appearing in 3411 // ForceSendFields will be sent to the server regardless of whether the 3412 // field is empty or not. This may be used to include empty fields in 3413 // Patch requests. 3414 ForceSendFields []string `json:"-"` 3415 3416 // NullFields is a list of field names (e.g. 3417 // "AllowPlaybackInterruption") to include in API requests with the JSON 3418 // null value. By default, fields with empty values are omitted from API 3419 // requests. However, any field with an empty value appearing in 3420 // NullFields will be sent to the server as null. It is an error if a 3421 // field in this list has a non-empty value. This may be used to include 3422 // null fields in Patch requests. 3423 NullFields []string `json:"-"` 3424} 3425 3426func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageText) MarshalJSON() ([]byte, error) { 3427 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageText 3428 raw := NoMethod(*s) 3429 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3430} 3431 3432// GoogleCloudDialogflowCxV3beta1RestoreAgentRequest: The request 3433// message for Agents.RestoreAgent. 3434type GoogleCloudDialogflowCxV3beta1RestoreAgentRequest struct { 3435 // AgentContent: Uncompressed raw byte content for agent. 3436 AgentContent string `json:"agentContent,omitempty"` 3437 3438 // AgentUri: The [Google Cloud 3439 // Storage](https://cloud.google.com/storage/docs/) URI to restore agent 3440 // from. The format of this URI must be `gs:///`. 3441 AgentUri string `json:"agentUri,omitempty"` 3442 3443 // ForceSendFields is a list of field names (e.g. "AgentContent") to 3444 // unconditionally include in API requests. By default, fields with 3445 // empty values are omitted from API requests. However, any non-pointer, 3446 // non-interface field appearing in ForceSendFields will be sent to the 3447 // server regardless of whether the field is empty or not. This may be 3448 // used to include empty fields in Patch requests. 3449 ForceSendFields []string `json:"-"` 3450 3451 // NullFields is a list of field names (e.g. "AgentContent") to include 3452 // in API requests with the JSON null value. By default, fields with 3453 // empty values are omitted from API requests. However, any field with 3454 // an empty value appearing in NullFields will be sent to the server as 3455 // null. It is an error if a field in this list has a non-empty value. 3456 // This may be used to include null fields in Patch requests. 3457 NullFields []string `json:"-"` 3458} 3459 3460func (s *GoogleCloudDialogflowCxV3beta1RestoreAgentRequest) MarshalJSON() ([]byte, error) { 3461 type NoMethod GoogleCloudDialogflowCxV3beta1RestoreAgentRequest 3462 raw := NoMethod(*s) 3463 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3464} 3465 3466// GoogleCloudDialogflowCxV3beta1SentimentAnalysisResult: The result of 3467// sentiment analysis. Sentiment analysis inspects user input and 3468// identifies the prevailing subjective opinion, especially to determine 3469// a user's attitude as positive, negative, or neutral. 3470type GoogleCloudDialogflowCxV3beta1SentimentAnalysisResult struct { 3471 // Magnitude: A non-negative number in the [0, +inf) range, which 3472 // represents the absolute magnitude of sentiment, regardless of score 3473 // (positive or negative). 3474 Magnitude float64 `json:"magnitude,omitempty"` 3475 3476 // Score: Sentiment score between -1.0 (negative sentiment) and 1.0 3477 // (positive sentiment). 3478 Score float64 `json:"score,omitempty"` 3479 3480 // ForceSendFields is a list of field names (e.g. "Magnitude") to 3481 // unconditionally include in API requests. By default, fields with 3482 // empty values are omitted from API requests. However, any non-pointer, 3483 // non-interface field appearing in ForceSendFields will be sent to the 3484 // server regardless of whether the field is empty or not. This may be 3485 // used to include empty fields in Patch requests. 3486 ForceSendFields []string `json:"-"` 3487 3488 // NullFields is a list of field names (e.g. "Magnitude") to include in 3489 // API requests with the JSON null value. By default, fields with empty 3490 // values are omitted from API requests. However, any field with an 3491 // empty value appearing in NullFields will be sent to the server as 3492 // null. It is an error if a field in this list has a non-empty value. 3493 // This may be used to include null fields in Patch requests. 3494 NullFields []string `json:"-"` 3495} 3496 3497func (s *GoogleCloudDialogflowCxV3beta1SentimentAnalysisResult) MarshalJSON() ([]byte, error) { 3498 type NoMethod GoogleCloudDialogflowCxV3beta1SentimentAnalysisResult 3499 raw := NoMethod(*s) 3500 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3501} 3502 3503func (s *GoogleCloudDialogflowCxV3beta1SentimentAnalysisResult) UnmarshalJSON(data []byte) error { 3504 type NoMethod GoogleCloudDialogflowCxV3beta1SentimentAnalysisResult 3505 var s1 struct { 3506 Magnitude gensupport.JSONFloat64 `json:"magnitude"` 3507 Score gensupport.JSONFloat64 `json:"score"` 3508 *NoMethod 3509 } 3510 s1.NoMethod = (*NoMethod)(s) 3511 if err := json.Unmarshal(data, &s1); err != nil { 3512 return err 3513 } 3514 s.Magnitude = float64(s1.Magnitude) 3515 s.Score = float64(s1.Score) 3516 return nil 3517} 3518 3519// GoogleCloudDialogflowCxV3beta1SessionEntityType: Session entity types 3520// are referred to as **User** entity types and are entities that are 3521// built for an individual user such as favorites, preferences, 3522// playlists, and so on. You can redefine a session entity type at the 3523// session level to extend or replace a custom entity type at the user 3524// session level (we refer to the entity types defined at the agent 3525// level as "custom entity types"). Note: session entity types apply to 3526// all queries, regardless of the language. For more information about 3527// entity types, see the [Dialogflow 3528// documentation](https://cloud.google.com/dialogflow/docs/entities-overv 3529// iew). 3530type GoogleCloudDialogflowCxV3beta1SessionEntityType struct { 3531 // Entities: Required. The collection of entities to override or 3532 // supplement the custom entity type. 3533 Entities []*GoogleCloudDialogflowCxV3beta1EntityTypeEntity `json:"entities,omitempty"` 3534 3535 // EntityOverrideMode: Required. Indicates whether the additional data 3536 // should override or supplement the custom entity type definition. 3537 // 3538 // Possible values: 3539 // "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value 3540 // should be never used. 3541 // "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session 3542 // entities overrides the collection of entities in the corresponding 3543 // custom entity type. 3544 // "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session 3545 // entities extends the collection of entities in the corresponding 3546 // custom entity type. Note: Even in this override mode calls to 3547 // `ListSessionEntityTypes`, `GetSessionEntityType`, 3548 // `CreateSessionEntityType` and `UpdateSessionEntityType` only return 3549 // the additional entities added in this session entity type. If you 3550 // want to get the supplemented list, please call 3551 // EntityTypes.GetEntityType on the custom entity type and merge. 3552 EntityOverrideMode string `json:"entityOverrideMode,omitempty"` 3553 3554 // Name: Required. The unique identifier of the session entity type. 3555 // Format: `projects//locations//agents//sessions//entityTypes/` or 3556 // `projects//locations//agents//environments//sessions//entityTypes/`. 3557 // If `Environment ID` is not specified, we assume default 'draft' 3558 // environment. 3559 Name string `json:"name,omitempty"` 3560 3561 // ServerResponse contains the HTTP response code and headers from the 3562 // server. 3563 googleapi.ServerResponse `json:"-"` 3564 3565 // ForceSendFields is a list of field names (e.g. "Entities") to 3566 // unconditionally include in API requests. By default, fields with 3567 // empty values are omitted from API requests. However, any non-pointer, 3568 // non-interface field appearing in ForceSendFields will be sent to the 3569 // server regardless of whether the field is empty or not. This may be 3570 // used to include empty fields in Patch requests. 3571 ForceSendFields []string `json:"-"` 3572 3573 // NullFields is a list of field names (e.g. "Entities") to include in 3574 // API requests with the JSON null value. By default, fields with empty 3575 // values are omitted from API requests. However, any field with an 3576 // empty value appearing in NullFields will be sent to the server as 3577 // null. It is an error if a field in this list has a non-empty value. 3578 // This may be used to include null fields in Patch requests. 3579 NullFields []string `json:"-"` 3580} 3581 3582func (s *GoogleCloudDialogflowCxV3beta1SessionEntityType) MarshalJSON() ([]byte, error) { 3583 type NoMethod GoogleCloudDialogflowCxV3beta1SessionEntityType 3584 raw := NoMethod(*s) 3585 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3586} 3587 3588// GoogleCloudDialogflowCxV3beta1SessionInfo: Represents session 3589// information communicated to and from the webhook. 3590type GoogleCloudDialogflowCxV3beta1SessionInfo struct { 3591 // Parameters: Optional for WebhookRequest. Optional for 3592 // WebhookResponse. All parameters collected from forms and intents 3593 // during the session. Parameters can be created, updated, or removed by 3594 // the webhook. To remove a parameter from the session, the webhook 3595 // should explicitly set the parameter value to null in WebhookResponse. 3596 // The map is keyed by parameters' display names. 3597 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 3598 3599 // Session: Always present for WebhookRequest. Ignored for 3600 // WebhookResponse. The unique identifier of the session. This field can 3601 // be used by the webhook to identify a user. Format: 3602 // `projects//locations//agents//sessions/`. 3603 Session string `json:"session,omitempty"` 3604 3605 // ForceSendFields is a list of field names (e.g. "Parameters") to 3606 // unconditionally include in API requests. By default, fields with 3607 // empty values are omitted from API requests. However, any non-pointer, 3608 // non-interface field appearing in ForceSendFields will be sent to the 3609 // server regardless of whether the field is empty or not. This may be 3610 // used to include empty fields in Patch requests. 3611 ForceSendFields []string `json:"-"` 3612 3613 // NullFields is a list of field names (e.g. "Parameters") to include in 3614 // API requests with the JSON null value. By default, fields with empty 3615 // values are omitted from API requests. However, any field with an 3616 // empty value appearing in NullFields will be sent to the server as 3617 // null. It is an error if a field in this list has a non-empty value. 3618 // This may be used to include null fields in Patch requests. 3619 NullFields []string `json:"-"` 3620} 3621 3622func (s *GoogleCloudDialogflowCxV3beta1SessionInfo) MarshalJSON() ([]byte, error) { 3623 type NoMethod GoogleCloudDialogflowCxV3beta1SessionInfo 3624 raw := NoMethod(*s) 3625 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3626} 3627 3628// GoogleCloudDialogflowCxV3beta1SpeechToTextSettings: Settings related 3629// to speech recognition. 3630type GoogleCloudDialogflowCxV3beta1SpeechToTextSettings struct { 3631 // EnableSpeechAdaptation: Whether to use speech adaptation for speech 3632 // recognition. 3633 EnableSpeechAdaptation bool `json:"enableSpeechAdaptation,omitempty"` 3634 3635 // ForceSendFields is a list of field names (e.g. 3636 // "EnableSpeechAdaptation") to unconditionally include in API requests. 3637 // By default, fields with empty values are omitted from API requests. 3638 // However, any non-pointer, non-interface field appearing in 3639 // ForceSendFields will be sent to the server regardless of whether the 3640 // field is empty or not. This may be used to include empty fields in 3641 // Patch requests. 3642 ForceSendFields []string `json:"-"` 3643 3644 // NullFields is a list of field names (e.g. "EnableSpeechAdaptation") 3645 // to include in API requests with the JSON null value. By default, 3646 // fields with empty values are omitted from API requests. However, any 3647 // field with an empty value appearing in NullFields will be sent to the 3648 // server as null. It is an error if a field in this list has a 3649 // non-empty value. This may be used to include null fields in Patch 3650 // requests. 3651 NullFields []string `json:"-"` 3652} 3653 3654func (s *GoogleCloudDialogflowCxV3beta1SpeechToTextSettings) MarshalJSON() ([]byte, error) { 3655 type NoMethod GoogleCloudDialogflowCxV3beta1SpeechToTextSettings 3656 raw := NoMethod(*s) 3657 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3658} 3659 3660// GoogleCloudDialogflowCxV3beta1SynthesizeSpeechConfig: Configuration 3661// of how speech should be synthesized. 3662type GoogleCloudDialogflowCxV3beta1SynthesizeSpeechConfig struct { 3663 // EffectsProfileId: Optional. An identifier which selects 'audio 3664 // effects' profiles that are applied on (post synthesized) text to 3665 // speech. Effects are applied on top of each other in the order they 3666 // are given. 3667 EffectsProfileId []string `json:"effectsProfileId,omitempty"` 3668 3669 // Pitch: Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means 3670 // increase 20 semitones from the original pitch. -20 means decrease 20 3671 // semitones from the original pitch. 3672 Pitch float64 `json:"pitch,omitempty"` 3673 3674 // SpeakingRate: Optional. Speaking rate/speed, in the range [0.25, 3675 // 4.0]. 1.0 is the normal native speed supported by the specific voice. 3676 // 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), 3677 // defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 3678 // will return an error. 3679 SpeakingRate float64 `json:"speakingRate,omitempty"` 3680 3681 // Voice: Optional. The desired voice of the synthesized audio. 3682 Voice *GoogleCloudDialogflowCxV3beta1VoiceSelectionParams `json:"voice,omitempty"` 3683 3684 // VolumeGainDb: Optional. Volume gain (in dB) of the normal native 3685 // volume supported by the specific voice, in the range [-96.0, 16.0]. 3686 // If unset, or set to a value of 0.0 (dB), will play at normal native 3687 // signal amplitude. A value of -6.0 (dB) will play at approximately 3688 // half the amplitude of the normal native signal amplitude. A value of 3689 // +6.0 (dB) will play at approximately twice the amplitude of the 3690 // normal native signal amplitude. We strongly recommend not to exceed 3691 // +10 (dB) as there's usually no effective increase in loudness for any 3692 // value greater than that. 3693 VolumeGainDb float64 `json:"volumeGainDb,omitempty"` 3694 3695 // ForceSendFields is a list of field names (e.g. "EffectsProfileId") to 3696 // unconditionally include in API requests. By default, fields with 3697 // empty values are omitted from API requests. However, any non-pointer, 3698 // non-interface field appearing in ForceSendFields will be sent to the 3699 // server regardless of whether the field is empty or not. This may be 3700 // used to include empty fields in Patch requests. 3701 ForceSendFields []string `json:"-"` 3702 3703 // NullFields is a list of field names (e.g. "EffectsProfileId") to 3704 // include in API requests with the JSON null value. By default, fields 3705 // with empty values are omitted from API requests. However, any field 3706 // with an empty value appearing in NullFields will be sent to the 3707 // server as null. It is an error if a field in this list has a 3708 // non-empty value. This may be used to include null fields in Patch 3709 // requests. 3710 NullFields []string `json:"-"` 3711} 3712 3713func (s *GoogleCloudDialogflowCxV3beta1SynthesizeSpeechConfig) MarshalJSON() ([]byte, error) { 3714 type NoMethod GoogleCloudDialogflowCxV3beta1SynthesizeSpeechConfig 3715 raw := NoMethod(*s) 3716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3717} 3718 3719func (s *GoogleCloudDialogflowCxV3beta1SynthesizeSpeechConfig) UnmarshalJSON(data []byte) error { 3720 type NoMethod GoogleCloudDialogflowCxV3beta1SynthesizeSpeechConfig 3721 var s1 struct { 3722 Pitch gensupport.JSONFloat64 `json:"pitch"` 3723 SpeakingRate gensupport.JSONFloat64 `json:"speakingRate"` 3724 VolumeGainDb gensupport.JSONFloat64 `json:"volumeGainDb"` 3725 *NoMethod 3726 } 3727 s1.NoMethod = (*NoMethod)(s) 3728 if err := json.Unmarshal(data, &s1); err != nil { 3729 return err 3730 } 3731 s.Pitch = float64(s1.Pitch) 3732 s.SpeakingRate = float64(s1.SpeakingRate) 3733 s.VolumeGainDb = float64(s1.VolumeGainDb) 3734 return nil 3735} 3736 3737// GoogleCloudDialogflowCxV3beta1TextInput: Represents the natural 3738// language text to be processed. 3739type GoogleCloudDialogflowCxV3beta1TextInput struct { 3740 // Text: Required. The UTF-8 encoded natural language text to be 3741 // processed. Text length must not exceed 256 characters. 3742 Text string `json:"text,omitempty"` 3743 3744 // ForceSendFields is a list of field names (e.g. "Text") to 3745 // unconditionally include in API requests. By default, fields with 3746 // empty values are omitted from API requests. However, any non-pointer, 3747 // non-interface field appearing in ForceSendFields will be sent to the 3748 // server regardless of whether the field is empty or not. This may be 3749 // used to include empty fields in Patch requests. 3750 ForceSendFields []string `json:"-"` 3751 3752 // NullFields is a list of field names (e.g. "Text") to include in API 3753 // requests with the JSON null value. By default, fields with empty 3754 // values are omitted from API requests. However, any field with an 3755 // empty value appearing in NullFields will be sent to the server as 3756 // null. It is an error if a field in this list has a non-empty value. 3757 // This may be used to include null fields in Patch requests. 3758 NullFields []string `json:"-"` 3759} 3760 3761func (s *GoogleCloudDialogflowCxV3beta1TextInput) MarshalJSON() ([]byte, error) { 3762 type NoMethod GoogleCloudDialogflowCxV3beta1TextInput 3763 raw := NoMethod(*s) 3764 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3765} 3766 3767// GoogleCloudDialogflowCxV3beta1TrainFlowRequest: The request message 3768// for Flows.TrainFlow. 3769type GoogleCloudDialogflowCxV3beta1TrainFlowRequest struct { 3770} 3771 3772// GoogleCloudDialogflowCxV3beta1TransitionRoute: A transition route 3773// specifies a intent that can be matched and/or a data condition that 3774// can be evaluated during a session. When a specified transition is 3775// matched, the following actions are taken in order: * If there is a 3776// `trigger_fulfillment` associated with the transition, it will be 3777// called. * If there is a `target_page` associated with the transition, 3778// the session will transition into the specified page. * If there is a 3779// `target_flow` associated with the transition, the session will 3780// transition into the specified flow. 3781type GoogleCloudDialogflowCxV3beta1TransitionRoute struct { 3782 // Condition: The condition to evaluate against form parameters or 3783 // session parameters. See the [conditions 3784 // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condi 3785 // tion). At least one of `intent` or `condition` must be specified. 3786 // When both `intent` and `condition` are specified, the transition can 3787 // only happen when both are fulfilled. 3788 Condition string `json:"condition,omitempty"` 3789 3790 // Intent: The unique identifier of an Intent. Format: 3791 // `projects//locations//agents//intents/`. Indicates that the 3792 // transition can only happen when the given intent is matched. At least 3793 // one of `intent` or `condition` must be specified. When both `intent` 3794 // and `condition` are specified, the transition can only happen when 3795 // both are fulfilled. 3796 Intent string `json:"intent,omitempty"` 3797 3798 // Name: Output only. The unique identifier of this transition route. 3799 Name string `json:"name,omitempty"` 3800 3801 // TargetFlow: The target flow to transition to. Format: 3802 // `projects//locations//agents//flows/`. 3803 TargetFlow string `json:"targetFlow,omitempty"` 3804 3805 // TargetPage: The target page to transition to. Format: 3806 // `projects//locations//agents//flows//pages/`. 3807 TargetPage string `json:"targetPage,omitempty"` 3808 3809 // TriggerFulfillment: The fulfillment to call when the condition is 3810 // satisfied. At least one of `trigger_fulfillment` and `target` must be 3811 // specified. When both are defined, `trigger_fulfillment` is executed 3812 // first. 3813 TriggerFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"triggerFulfillment,omitempty"` 3814 3815 // ForceSendFields is a list of field names (e.g. "Condition") to 3816 // unconditionally include in API requests. By default, fields with 3817 // empty values are omitted from API requests. However, any non-pointer, 3818 // non-interface field appearing in ForceSendFields will be sent to the 3819 // server regardless of whether the field is empty or not. This may be 3820 // used to include empty fields in Patch requests. 3821 ForceSendFields []string `json:"-"` 3822 3823 // NullFields is a list of field names (e.g. "Condition") to include in 3824 // API requests with the JSON null value. By default, fields with empty 3825 // values are omitted from API requests. However, any field with an 3826 // empty value appearing in NullFields will be sent to the server as 3827 // null. It is an error if a field in this list has a non-empty value. 3828 // This may be used to include null fields in Patch requests. 3829 NullFields []string `json:"-"` 3830} 3831 3832func (s *GoogleCloudDialogflowCxV3beta1TransitionRoute) MarshalJSON() ([]byte, error) { 3833 type NoMethod GoogleCloudDialogflowCxV3beta1TransitionRoute 3834 raw := NoMethod(*s) 3835 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3836} 3837 3838// GoogleCloudDialogflowCxV3beta1TransitionRouteGroup: An 3839// TransitionRouteGroup represents a group of `TransitionRoutes` to be 3840// used by a Page. 3841type GoogleCloudDialogflowCxV3beta1TransitionRouteGroup struct { 3842 // DisplayName: Required. The human-readable name of the transition 3843 // route group, unique within the Agent. The display name can be no 3844 // longer than 30 characters. 3845 DisplayName string `json:"displayName,omitempty"` 3846 3847 // Name: The unique identifier of the transition route group. 3848 // TransitionRouteGroups.CreateTransitionRouteGroup populates the name 3849 // automatically. Format: 3850 // `projects//locations//agents//flows//transitionRouteGroups/`. 3851 Name string `json:"name,omitempty"` 3852 3853 // TransitionRoutes: Transition routes associated with the 3854 // TransitionRouteGroup. Duplicate transition routes (i.e. using the 3855 // same `intent`) are not allowed. Note that the `name` field is not 3856 // used in the transition route group scope. 3857 TransitionRoutes []*GoogleCloudDialogflowCxV3beta1TransitionRoute `json:"transitionRoutes,omitempty"` 3858 3859 // ServerResponse contains the HTTP response code and headers from the 3860 // server. 3861 googleapi.ServerResponse `json:"-"` 3862 3863 // ForceSendFields is a list of field names (e.g. "DisplayName") to 3864 // unconditionally include in API requests. By default, fields with 3865 // empty values are omitted from API requests. However, any non-pointer, 3866 // non-interface field appearing in ForceSendFields will be sent to the 3867 // server regardless of whether the field is empty or not. This may be 3868 // used to include empty fields in Patch requests. 3869 ForceSendFields []string `json:"-"` 3870 3871 // NullFields is a list of field names (e.g. "DisplayName") to include 3872 // in API requests with the JSON null value. By default, fields with 3873 // empty values are omitted from API requests. However, any field with 3874 // an empty value appearing in NullFields will be sent to the server as 3875 // null. It is an error if a field in this list has a non-empty value. 3876 // This may be used to include null fields in Patch requests. 3877 NullFields []string `json:"-"` 3878} 3879 3880func (s *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup) MarshalJSON() ([]byte, error) { 3881 type NoMethod GoogleCloudDialogflowCxV3beta1TransitionRouteGroup 3882 raw := NoMethod(*s) 3883 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3884} 3885 3886// GoogleCloudDialogflowCxV3beta1Version: Represents a version of a 3887// flow. 3888type GoogleCloudDialogflowCxV3beta1Version struct { 3889 // CreateTime: Output only. Create time of the version. 3890 CreateTime string `json:"createTime,omitempty"` 3891 3892 // Description: The description of the version. The maximum length is 3893 // 500 characters. If exceeded, the request is rejected. 3894 Description string `json:"description,omitempty"` 3895 3896 // DisplayName: Required. The human-readable name of the version. Limit 3897 // of 64 characters. 3898 DisplayName string `json:"displayName,omitempty"` 3899 3900 // Name: Format: projects//locations//agents//flows//versions/. Version 3901 // ID is a self-increasing number generated by Dialogflow upon version 3902 // creation. 3903 Name string `json:"name,omitempty"` 3904 3905 // NluSettings: Output only. The NLU settings of the flow at version 3906 // creation. 3907 NluSettings *GoogleCloudDialogflowCxV3beta1NluSettings `json:"nluSettings,omitempty"` 3908 3909 // State: Output only. The state of this version. This field is 3910 // read-only and cannot be set by create and update methods. 3911 // 3912 // Possible values: 3913 // "STATE_UNSPECIFIED" - Not specified. This value is not used. 3914 // "RUNNING" - Version is not ready to serve (e.g. training is 3915 // running). 3916 // "SUCCEEDED" - Training has succeeded and this version is ready to 3917 // serve. 3918 // "FAILED" - Version training failed. 3919 State string `json:"state,omitempty"` 3920 3921 // ServerResponse contains the HTTP response code and headers from the 3922 // server. 3923 googleapi.ServerResponse `json:"-"` 3924 3925 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3926 // unconditionally include in API requests. By default, fields with 3927 // empty values are omitted from API requests. However, any non-pointer, 3928 // non-interface field appearing in ForceSendFields will be sent to the 3929 // server regardless of whether the field is empty or not. This may be 3930 // used to include empty fields in Patch requests. 3931 ForceSendFields []string `json:"-"` 3932 3933 // NullFields is a list of field names (e.g. "CreateTime") to include in 3934 // API requests with the JSON null value. By default, fields with empty 3935 // values are omitted from API requests. However, any field with an 3936 // empty value appearing in NullFields will be sent to the server as 3937 // null. It is an error if a field in this list has a non-empty value. 3938 // This may be used to include null fields in Patch requests. 3939 NullFields []string `json:"-"` 3940} 3941 3942func (s *GoogleCloudDialogflowCxV3beta1Version) MarshalJSON() ([]byte, error) { 3943 type NoMethod GoogleCloudDialogflowCxV3beta1Version 3944 raw := NoMethod(*s) 3945 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3946} 3947 3948// GoogleCloudDialogflowCxV3beta1VoiceSelectionParams: Description of 3949// which voice to use for speech synthesis. 3950type GoogleCloudDialogflowCxV3beta1VoiceSelectionParams struct { 3951 // Name: Optional. The name of the voice. If not set, the service will 3952 // choose a voice based on the other parameters such as language_code 3953 // and ssml_gender. 3954 Name string `json:"name,omitempty"` 3955 3956 // SsmlGender: Optional. The preferred gender of the voice. If not set, 3957 // the service will choose a voice based on the other parameters such as 3958 // language_code and name. Note that this is only a preference, not 3959 // requirement. If a voice of the appropriate gender is not available, 3960 // the synthesizer should substitute a voice with a different gender 3961 // rather than failing the request. 3962 // 3963 // Possible values: 3964 // "SSML_VOICE_GENDER_UNSPECIFIED" - An unspecified gender, which 3965 // means that the client doesn't care which gender the selected voice 3966 // will have. 3967 // "SSML_VOICE_GENDER_MALE" - A male voice. 3968 // "SSML_VOICE_GENDER_FEMALE" - A female voice. 3969 // "SSML_VOICE_GENDER_NEUTRAL" - A gender-neutral voice. 3970 SsmlGender string `json:"ssmlGender,omitempty"` 3971 3972 // ForceSendFields is a list of field names (e.g. "Name") to 3973 // unconditionally include in API requests. By default, fields with 3974 // empty values are omitted from API requests. However, any non-pointer, 3975 // non-interface field appearing in ForceSendFields will be sent to the 3976 // server regardless of whether the field is empty or not. This may be 3977 // used to include empty fields in Patch requests. 3978 ForceSendFields []string `json:"-"` 3979 3980 // NullFields is a list of field names (e.g. "Name") to include in API 3981 // requests with the JSON null value. By default, fields with empty 3982 // values are omitted from API requests. However, any field with an 3983 // empty value appearing in NullFields will be sent to the server as 3984 // null. It is an error if a field in this list has a non-empty value. 3985 // This may be used to include null fields in Patch requests. 3986 NullFields []string `json:"-"` 3987} 3988 3989func (s *GoogleCloudDialogflowCxV3beta1VoiceSelectionParams) MarshalJSON() ([]byte, error) { 3990 type NoMethod GoogleCloudDialogflowCxV3beta1VoiceSelectionParams 3991 raw := NoMethod(*s) 3992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3993} 3994 3995// GoogleCloudDialogflowCxV3beta1Webhook: Webhooks host the developer's 3996// business logic. During a session, webhooks allow the developer to use 3997// the data extracted by Dialogflow's natural language processing to 3998// generate dynamic responses, validate collected data, or trigger 3999// actions on the backend. 4000type GoogleCloudDialogflowCxV3beta1Webhook struct { 4001 // Disabled: Indicates whether the webhook is disabled. 4002 Disabled bool `json:"disabled,omitempty"` 4003 4004 // DisplayName: Required. The human-readable name of the webhook, unique 4005 // within the agent. 4006 DisplayName string `json:"displayName,omitempty"` 4007 4008 // GenericWebService: Configuration for a generic web service. 4009 GenericWebService *GoogleCloudDialogflowCxV3beta1WebhookGenericWebService `json:"genericWebService,omitempty"` 4010 4011 // Name: The unique identifier of the webhook. Required for the 4012 // Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the 4013 // name automatically. Format: `projects//locations//agents//webhooks/`. 4014 Name string `json:"name,omitempty"` 4015 4016 // Timeout: Webhook execution timeout. Execution is considered failed if 4017 // Dialogflow doesn't receive a response from webhook at the end of the 4018 // timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 4019 // seconds. 4020 Timeout string `json:"timeout,omitempty"` 4021 4022 // ServerResponse contains the HTTP response code and headers from the 4023 // server. 4024 googleapi.ServerResponse `json:"-"` 4025 4026 // ForceSendFields is a list of field names (e.g. "Disabled") to 4027 // unconditionally include in API requests. By default, fields with 4028 // empty values are omitted from API requests. However, any non-pointer, 4029 // non-interface field appearing in ForceSendFields will be sent to the 4030 // server regardless of whether the field is empty or not. This may be 4031 // used to include empty fields in Patch requests. 4032 ForceSendFields []string `json:"-"` 4033 4034 // NullFields is a list of field names (e.g. "Disabled") to include in 4035 // API requests with the JSON null value. By default, fields with empty 4036 // values are omitted from API requests. However, any field with an 4037 // empty value appearing in NullFields will be sent to the server as 4038 // null. It is an error if a field in this list has a non-empty value. 4039 // This may be used to include null fields in Patch requests. 4040 NullFields []string `json:"-"` 4041} 4042 4043func (s *GoogleCloudDialogflowCxV3beta1Webhook) MarshalJSON() ([]byte, error) { 4044 type NoMethod GoogleCloudDialogflowCxV3beta1Webhook 4045 raw := NoMethod(*s) 4046 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4047} 4048 4049// GoogleCloudDialogflowCxV3beta1WebhookGenericWebService: Represents 4050// configuration for a generic web service. 4051type GoogleCloudDialogflowCxV3beta1WebhookGenericWebService struct { 4052 // Password: The password for HTTP Basic authentication. 4053 Password string `json:"password,omitempty"` 4054 4055 // RequestHeaders: The HTTP request headers to send together with 4056 // webhook requests. 4057 RequestHeaders map[string]string `json:"requestHeaders,omitempty"` 4058 4059 // Uri: Required. The webhook URI for receiving POST requests. It must 4060 // use https protocol. 4061 Uri string `json:"uri,omitempty"` 4062 4063 // Username: The user name for HTTP Basic authentication. 4064 Username string `json:"username,omitempty"` 4065 4066 // ForceSendFields is a list of field names (e.g. "Password") to 4067 // unconditionally include in API requests. By default, fields with 4068 // empty values are omitted from API requests. However, any non-pointer, 4069 // non-interface field appearing in ForceSendFields will be sent to the 4070 // server regardless of whether the field is empty or not. This may be 4071 // used to include empty fields in Patch requests. 4072 ForceSendFields []string `json:"-"` 4073 4074 // NullFields is a list of field names (e.g. "Password") to include in 4075 // API requests with the JSON null value. By default, fields with empty 4076 // values are omitted from API requests. However, any field with an 4077 // empty value appearing in NullFields will be sent to the server as 4078 // null. It is an error if a field in this list has a non-empty value. 4079 // This may be used to include null fields in Patch requests. 4080 NullFields []string `json:"-"` 4081} 4082 4083func (s *GoogleCloudDialogflowCxV3beta1WebhookGenericWebService) MarshalJSON() ([]byte, error) { 4084 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookGenericWebService 4085 raw := NoMethod(*s) 4086 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4087} 4088 4089// GoogleCloudDialogflowCxV3beta1WebhookRequest: The request message for 4090// a webhook call. 4091type GoogleCloudDialogflowCxV3beta1WebhookRequest struct { 4092 // DetectIntentResponseId: Always present. The unique identifier of the 4093 // DetectIntentResponse that will be returned to the API caller. 4094 DetectIntentResponseId string `json:"detectIntentResponseId,omitempty"` 4095 4096 // FulfillmentInfo: Always present. Information about the fulfillment 4097 // that triggered this webhook call. 4098 FulfillmentInfo *GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo `json:"fulfillmentInfo,omitempty"` 4099 4100 // IntentInfo: Information about the last matched intent. 4101 IntentInfo *GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo `json:"intentInfo,omitempty"` 4102 4103 // Messages: The list of rich message responses to present to the user. 4104 // Webhook can choose to append or replace this list in 4105 // WebhookResponse.fulfillment_response; 4106 Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"` 4107 4108 // PageInfo: Information about page status. 4109 PageInfo *GoogleCloudDialogflowCxV3beta1PageInfo `json:"pageInfo,omitempty"` 4110 4111 // Payload: Custom data set in QueryParameters.payload. 4112 Payload googleapi.RawMessage `json:"payload,omitempty"` 4113 4114 // SessionInfo: Information about session status. 4115 SessionInfo *GoogleCloudDialogflowCxV3beta1SessionInfo `json:"sessionInfo,omitempty"` 4116 4117 // ForceSendFields is a list of field names (e.g. 4118 // "DetectIntentResponseId") to unconditionally include in API requests. 4119 // By default, fields with empty values are omitted from API requests. 4120 // However, any non-pointer, non-interface field appearing in 4121 // ForceSendFields will be sent to the server regardless of whether the 4122 // field is empty or not. This may be used to include empty fields in 4123 // Patch requests. 4124 ForceSendFields []string `json:"-"` 4125 4126 // NullFields is a list of field names (e.g. "DetectIntentResponseId") 4127 // to include in API requests with the JSON null value. By default, 4128 // fields with empty values are omitted from API requests. However, any 4129 // field with an empty value appearing in NullFields will be sent to the 4130 // server as null. It is an error if a field in this list has a 4131 // non-empty value. This may be used to include null fields in Patch 4132 // requests. 4133 NullFields []string `json:"-"` 4134} 4135 4136func (s *GoogleCloudDialogflowCxV3beta1WebhookRequest) MarshalJSON() ([]byte, error) { 4137 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequest 4138 raw := NoMethod(*s) 4139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4140} 4141 4142// GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo: 4143// Represents fulfillment information communicated to the webhook. 4144type GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo struct { 4145 // Tag: Always present. The tag used to identify which fulfillment is 4146 // being called. 4147 Tag string `json:"tag,omitempty"` 4148 4149 // ForceSendFields is a list of field names (e.g. "Tag") to 4150 // unconditionally include in API requests. By default, fields with 4151 // empty values are omitted from API requests. However, any non-pointer, 4152 // non-interface field appearing in ForceSendFields will be sent to the 4153 // server regardless of whether the field is empty or not. This may be 4154 // used to include empty fields in Patch requests. 4155 ForceSendFields []string `json:"-"` 4156 4157 // NullFields is a list of field names (e.g. "Tag") to include in API 4158 // requests with the JSON null value. By default, fields with empty 4159 // values are omitted from API requests. However, any field with an 4160 // empty value appearing in NullFields will be sent to the server as 4161 // null. It is an error if a field in this list has a non-empty value. 4162 // This may be used to include null fields in Patch requests. 4163 NullFields []string `json:"-"` 4164} 4165 4166func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo) MarshalJSON() ([]byte, error) { 4167 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo 4168 raw := NoMethod(*s) 4169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4170} 4171 4172// GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo: Represents 4173// intent information communicated to the webhook. 4174type GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo struct { 4175 // LastMatchedIntent: Always present. The unique identifier of the last 4176 // matched intent. Format: `projects//locations//agents//intents/`. 4177 LastMatchedIntent string `json:"lastMatchedIntent,omitempty"` 4178 4179 // Parameters: Parameters identified as a result of intent matching. 4180 // This is a map of the name of the identified parameter to the value of 4181 // the parameter identified from the user's utterance. All parameters 4182 // defined in the matched intent that are identified will be surfaced 4183 // here. 4184 Parameters map[string]GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue `json:"parameters,omitempty"` 4185 4186 // ForceSendFields is a list of field names (e.g. "LastMatchedIntent") 4187 // to unconditionally include in API requests. By default, fields with 4188 // empty values are omitted from API requests. However, any non-pointer, 4189 // non-interface field appearing in ForceSendFields will be sent to the 4190 // server regardless of whether the field is empty or not. This may be 4191 // used to include empty fields in Patch requests. 4192 ForceSendFields []string `json:"-"` 4193 4194 // NullFields is a list of field names (e.g. "LastMatchedIntent") to 4195 // include in API requests with the JSON null value. By default, fields 4196 // with empty values are omitted from API requests. However, any field 4197 // with an empty value appearing in NullFields will be sent to the 4198 // server as null. It is an error if a field in this list has a 4199 // non-empty value. This may be used to include null fields in Patch 4200 // requests. 4201 NullFields []string `json:"-"` 4202} 4203 4204func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo) MarshalJSON() ([]byte, error) { 4205 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo 4206 raw := NoMethod(*s) 4207 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4208} 4209 4210// GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterV 4211// alue: Represents a value for an intent parameter. 4212type GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue struct { 4213 // OriginalValue: Always present. Original text value extracted from 4214 // user utterance. 4215 OriginalValue string `json:"originalValue,omitempty"` 4216 4217 // ResolvedValue: Always present. Structured value for the parameter 4218 // extracted from user utterance. 4219 ResolvedValue interface{} `json:"resolvedValue,omitempty"` 4220 4221 // ForceSendFields is a list of field names (e.g. "OriginalValue") to 4222 // unconditionally include in API requests. By default, fields with 4223 // empty values are omitted from API requests. However, any non-pointer, 4224 // non-interface field appearing in ForceSendFields will be sent to the 4225 // server regardless of whether the field is empty or not. This may be 4226 // used to include empty fields in Patch requests. 4227 ForceSendFields []string `json:"-"` 4228 4229 // NullFields is a list of field names (e.g. "OriginalValue") to include 4230 // in API requests with the JSON null value. By default, fields with 4231 // empty values are omitted from API requests. However, any field with 4232 // an empty value appearing in NullFields will be sent to the server as 4233 // null. It is an error if a field in this list has a non-empty value. 4234 // This may be used to include null fields in Patch requests. 4235 NullFields []string `json:"-"` 4236} 4237 4238func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue) MarshalJSON() ([]byte, error) { 4239 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue 4240 raw := NoMethod(*s) 4241 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4242} 4243 4244// GoogleCloudDialogflowCxV3beta1WebhookResponse: The response message 4245// for a webhook call. 4246type GoogleCloudDialogflowCxV3beta1WebhookResponse struct { 4247 // FulfillmentResponse: The fulfillment response to send to the user. 4248 // This field can be omitted by the webhook if it does not intend to 4249 // send any response to the user. 4250 FulfillmentResponse *GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse `json:"fulfillmentResponse,omitempty"` 4251 4252 // PageInfo: Information about page status. This field can be omitted by 4253 // the webhook if it does not intend to modify page status. 4254 PageInfo *GoogleCloudDialogflowCxV3beta1PageInfo `json:"pageInfo,omitempty"` 4255 4256 // Payload: Value to append directly to QueryResult.webhook_payloads. 4257 Payload googleapi.RawMessage `json:"payload,omitempty"` 4258 4259 // SessionInfo: Information about session status. This field can be 4260 // omitted by the webhook if it does not intend to modify session 4261 // status. 4262 SessionInfo *GoogleCloudDialogflowCxV3beta1SessionInfo `json:"sessionInfo,omitempty"` 4263 4264 // TargetFlow: The target flow to transition to. Format: 4265 // `projects//locations//agents//flows/`. 4266 TargetFlow string `json:"targetFlow,omitempty"` 4267 4268 // TargetPage: The target page to transition to. Format: 4269 // `projects//locations//agents//flows//pages/`. 4270 TargetPage string `json:"targetPage,omitempty"` 4271 4272 // ForceSendFields is a list of field names (e.g. "FulfillmentResponse") 4273 // to unconditionally include in API requests. By default, fields with 4274 // empty values are omitted from API requests. However, any non-pointer, 4275 // non-interface field appearing in ForceSendFields will be sent to the 4276 // server regardless of whether the field is empty or not. This may be 4277 // used to include empty fields in Patch requests. 4278 ForceSendFields []string `json:"-"` 4279 4280 // NullFields is a list of field names (e.g. "FulfillmentResponse") to 4281 // include in API requests with the JSON null value. By default, fields 4282 // with empty values are omitted from API requests. However, any field 4283 // with an empty value appearing in NullFields will be sent to the 4284 // server as null. It is an error if a field in this list has a 4285 // non-empty value. This may be used to include null fields in Patch 4286 // requests. 4287 NullFields []string `json:"-"` 4288} 4289 4290func (s *GoogleCloudDialogflowCxV3beta1WebhookResponse) MarshalJSON() ([]byte, error) { 4291 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookResponse 4292 raw := NoMethod(*s) 4293 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4294} 4295 4296// GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse: 4297// Represents a fulfillment response to the user. 4298type GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse struct { 4299 // MergeBehavior: Merge behavior for `messages`. 4300 // 4301 // Possible values: 4302 // "MERGE_BEHAVIOR_UNSPECIFIED" - Not specified. `APPEND` will be 4303 // used. 4304 // "APPEND" - `messages` will be appended to the list of messages 4305 // waiting to be sent to the user. 4306 // "REPLACE" - `messages` will replace the list of messages waiting to 4307 // be sent to the user. 4308 MergeBehavior string `json:"mergeBehavior,omitempty"` 4309 4310 // Messages: The list of rich message responses to present to the user. 4311 Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"` 4312 4313 // ForceSendFields is a list of field names (e.g. "MergeBehavior") to 4314 // unconditionally include in API requests. By default, fields with 4315 // empty values are omitted from API requests. However, any non-pointer, 4316 // non-interface field appearing in ForceSendFields will be sent to the 4317 // server regardless of whether the field is empty or not. This may be 4318 // used to include empty fields in Patch requests. 4319 ForceSendFields []string `json:"-"` 4320 4321 // NullFields is a list of field names (e.g. "MergeBehavior") to include 4322 // in API requests with the JSON null value. By default, fields with 4323 // empty values are omitted from API requests. However, any field with 4324 // an empty value appearing in NullFields will be sent to the server as 4325 // null. It is an error if a field in this list has a non-empty value. 4326 // This may be used to include null fields in Patch requests. 4327 NullFields []string `json:"-"` 4328} 4329 4330func (s *GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse) MarshalJSON() ([]byte, error) { 4331 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse 4332 raw := NoMethod(*s) 4333 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4334} 4335 4336// GoogleCloudDialogflowV2AnnotatedMessagePart: Represents a part of a 4337// message possibly annotated with an entity. The part can be an entity 4338// or purely a part of the message between two entities or message 4339// start/end. 4340type GoogleCloudDialogflowV2AnnotatedMessagePart struct { 4341 // EntityType: The [Dialogflow system entity 4342 // type](https://cloud.google.com/dialogflow/docs/reference/system-entiti 4343 // es) of this message part. If this is empty, Dialogflow could not 4344 // annotate the phrase part with a system entity. 4345 EntityType string `json:"entityType,omitempty"` 4346 4347 // FormattedValue: The [Dialogflow system entity formatted value 4348 // ](https://cloud.google.com/dialogflow/docs/reference/system-entities) 4349 // of this message part. For example for a system entity of type 4350 // `@sys.unit-currency`, this may contain: { "amount": 5, "currency": 4351 // "USD" } 4352 FormattedValue interface{} `json:"formattedValue,omitempty"` 4353 4354 // Text: A part of a message possibly annotated with an entity. 4355 Text string `json:"text,omitempty"` 4356 4357 // ForceSendFields is a list of field names (e.g. "EntityType") to 4358 // unconditionally include in API requests. By default, fields with 4359 // empty values are omitted from API requests. However, any non-pointer, 4360 // non-interface field appearing in ForceSendFields will be sent to the 4361 // server regardless of whether the field is empty or not. This may be 4362 // used to include empty fields in Patch requests. 4363 ForceSendFields []string `json:"-"` 4364 4365 // NullFields is a list of field names (e.g. "EntityType") to include in 4366 // API requests with the JSON null value. By default, fields with empty 4367 // values are omitted from API requests. However, any field with an 4368 // empty value appearing in NullFields will be sent to the server as 4369 // null. It is an error if a field in this list has a non-empty value. 4370 // This may be used to include null fields in Patch requests. 4371 NullFields []string `json:"-"` 4372} 4373 4374func (s *GoogleCloudDialogflowV2AnnotatedMessagePart) MarshalJSON() ([]byte, error) { 4375 type NoMethod GoogleCloudDialogflowV2AnnotatedMessagePart 4376 raw := NoMethod(*s) 4377 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4378} 4379 4380// GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse: The response 4381// message for EntityTypes.BatchUpdateEntityTypes. 4382type GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse struct { 4383 // EntityTypes: The collection of updated or created entity types. 4384 EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"` 4385 4386 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 4387 // unconditionally include in API requests. By default, fields with 4388 // empty values are omitted from API requests. However, any non-pointer, 4389 // non-interface field appearing in ForceSendFields will be sent to the 4390 // server regardless of whether the field is empty or not. This may be 4391 // used to include empty fields in Patch requests. 4392 ForceSendFields []string `json:"-"` 4393 4394 // NullFields is a list of field names (e.g. "EntityTypes") to include 4395 // in API requests with the JSON null value. By default, fields with 4396 // empty values are omitted from API requests. However, any field with 4397 // an empty value appearing in NullFields will be sent to the server as 4398 // null. It is an error if a field in this list has a non-empty value. 4399 // This may be used to include null fields in Patch requests. 4400 NullFields []string `json:"-"` 4401} 4402 4403func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) { 4404 type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse 4405 raw := NoMethod(*s) 4406 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4407} 4408 4409// GoogleCloudDialogflowV2BatchUpdateIntentsResponse: The response 4410// message for Intents.BatchUpdateIntents. 4411type GoogleCloudDialogflowV2BatchUpdateIntentsResponse struct { 4412 // Intents: The collection of updated or created intents. 4413 Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"` 4414 4415 // ForceSendFields is a list of field names (e.g. "Intents") to 4416 // unconditionally include in API requests. By default, fields with 4417 // empty values are omitted from API requests. However, any non-pointer, 4418 // non-interface field appearing in ForceSendFields will be sent to the 4419 // server regardless of whether the field is empty or not. This may be 4420 // used to include empty fields in Patch requests. 4421 ForceSendFields []string `json:"-"` 4422 4423 // NullFields is a list of field names (e.g. "Intents") to include in 4424 // API requests with the JSON null value. By default, fields with empty 4425 // values are omitted from API requests. However, any field with an 4426 // empty value appearing in NullFields will be sent to the server as 4427 // null. It is an error if a field in this list has a non-empty value. 4428 // This may be used to include null fields in Patch requests. 4429 NullFields []string `json:"-"` 4430} 4431 4432func (s *GoogleCloudDialogflowV2BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) { 4433 type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsResponse 4434 raw := NoMethod(*s) 4435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4436} 4437 4438// GoogleCloudDialogflowV2Context: Dialogflow contexts are similar to 4439// natural language context. If a person says to you "they are orange", 4440// you need context in order to understand what "they" is referring to. 4441// Similarly, for Dialogflow to handle an end-user expression like that, 4442// it needs to be provided with context in order to correctly match an 4443// intent. Using contexts, you can control the flow of a conversation. 4444// You can configure contexts for an intent by setting input and output 4445// contexts, which are identified by string names. When an intent is 4446// matched, any configured output contexts for that intent become 4447// active. While any contexts are active, Dialogflow is more likely to 4448// match intents that are configured with input contexts that correspond 4449// to the currently active contexts. For more information about context, 4450// see the [Contexts 4451// guide](https://cloud.google.com/dialogflow/docs/contexts-overview). 4452type GoogleCloudDialogflowV2Context struct { 4453 // LifespanCount: Optional. The number of conversational query requests 4454 // after which the context expires. The default is `0`. If set to `0`, 4455 // the context expires immediately. Contexts expire automatically after 4456 // 20 minutes if there are no matching queries. 4457 LifespanCount int64 `json:"lifespanCount,omitempty"` 4458 4459 // Name: Required. The unique identifier of the context. Format: 4460 // `projects//agent/sessions//contexts/`, or 4461 // `projects//agent/environments//users//sessions//contexts/`. The 4462 // `Context ID` is always converted to lowercase, may only contain 4463 // characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If 4464 // `Environment ID` is not specified, we assume default 'draft' 4465 // environment. If `User ID` is not specified, we assume default '-' 4466 // user. The following context names are reserved for internal use by 4467 // Dialogflow. You should not use these contexts or create contexts with 4468 // these names: * `__system_counters__` * `*_id_dialog_context` * 4469 // `*_dialog_params_size` 4470 Name string `json:"name,omitempty"` 4471 4472 // Parameters: Optional. The collection of parameters associated with 4473 // this context. Depending on your protocol or client library language, 4474 // this is a map, associative array, symbol table, dictionary, or JSON 4475 // object composed of a collection of (MapKey, MapValue) pairs: - MapKey 4476 // type: string - MapKey value: parameter name - MapValue type: - If 4477 // parameter's entity type is a composite entity: map - Else: string or 4478 // number, depending on parameter value type - MapValue value: - If 4479 // parameter's entity type is a composite entity: map from composite 4480 // entity property names to property values - Else: parameter value 4481 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 4482 4483 // ForceSendFields is a list of field names (e.g. "LifespanCount") to 4484 // unconditionally include in API requests. By default, fields with 4485 // empty values are omitted from API requests. However, any non-pointer, 4486 // non-interface field appearing in ForceSendFields will be sent to the 4487 // server regardless of whether the field is empty or not. This may be 4488 // used to include empty fields in Patch requests. 4489 ForceSendFields []string `json:"-"` 4490 4491 // NullFields is a list of field names (e.g. "LifespanCount") to include 4492 // in API requests with the JSON null value. By default, fields with 4493 // empty values are omitted from API requests. However, any field with 4494 // an empty value appearing in NullFields will be sent to the server as 4495 // null. It is an error if a field in this list has a non-empty value. 4496 // This may be used to include null fields in Patch requests. 4497 NullFields []string `json:"-"` 4498} 4499 4500func (s *GoogleCloudDialogflowV2Context) MarshalJSON() ([]byte, error) { 4501 type NoMethod GoogleCloudDialogflowV2Context 4502 raw := NoMethod(*s) 4503 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4504} 4505 4506// GoogleCloudDialogflowV2ConversationEvent: Represents a notification 4507// sent to Pub/Sub subscribers for conversation lifecycle events. 4508type GoogleCloudDialogflowV2ConversationEvent struct { 4509 // Conversation: The unique identifier of the conversation this 4510 // notification refers to. Format: `projects//conversations/`. 4511 Conversation string `json:"conversation,omitempty"` 4512 4513 // ErrorStatus: More detailed information about an error. Only set for 4514 // type UNRECOVERABLE_ERROR_IN_PHONE_CALL. 4515 ErrorStatus *GoogleRpcStatus `json:"errorStatus,omitempty"` 4516 4517 // NewMessagePayload: Payload of NEW_MESSAGE event. 4518 NewMessagePayload *GoogleCloudDialogflowV2Message `json:"newMessagePayload,omitempty"` 4519 4520 // Type: The type of the event that this notification refers to. 4521 // 4522 // Possible values: 4523 // "TYPE_UNSPECIFIED" - Type not set. 4524 // "CONVERSATION_STARTED" - A new conversation has been opened. This 4525 // is fired when a telephone call is answered, or a conversation is 4526 // created via the API. 4527 // "CONVERSATION_FINISHED" - An existing conversation has closed. This 4528 // is fired when a telephone call is terminated, or a conversation is 4529 // closed via the API. 4530 // "HUMAN_INTERVENTION_NEEDED" - An existing conversation has received 4531 // notification from Dialogflow that human intervention is required. 4532 // "NEW_MESSAGE" - An existing conversation has received a new 4533 // message, either from API or telephony. It is configured in 4534 // ConversationProfile.new_message_event_notification_config 4535 // "UNRECOVERABLE_ERROR" - Unrecoverable error during a telephone 4536 // call. In general non-recoverable errors only occur if something was 4537 // misconfigured in the ConversationProfile corresponding to the call. 4538 // After a non-recoverable error, Dialogflow may stop responding. We 4539 // don't fire this event: * in an API call because we can directly 4540 // return the error, or, * when we can recover from an error. 4541 Type string `json:"type,omitempty"` 4542 4543 // ForceSendFields is a list of field names (e.g. "Conversation") to 4544 // unconditionally include in API requests. By default, fields with 4545 // empty values are omitted from API requests. However, any non-pointer, 4546 // non-interface field appearing in ForceSendFields will be sent to the 4547 // server regardless of whether the field is empty or not. This may be 4548 // used to include empty fields in Patch requests. 4549 ForceSendFields []string `json:"-"` 4550 4551 // NullFields is a list of field names (e.g. "Conversation") to include 4552 // in API requests with the JSON null value. By default, fields with 4553 // empty values are omitted from API requests. However, any field with 4554 // an empty value appearing in NullFields will be sent to the server as 4555 // null. It is an error if a field in this list has a non-empty value. 4556 // This may be used to include null fields in Patch requests. 4557 NullFields []string `json:"-"` 4558} 4559 4560func (s *GoogleCloudDialogflowV2ConversationEvent) MarshalJSON() ([]byte, error) { 4561 type NoMethod GoogleCloudDialogflowV2ConversationEvent 4562 raw := NoMethod(*s) 4563 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4564} 4565 4566// GoogleCloudDialogflowV2EntityType: Each intent parameter has a type, 4567// called the entity type, which dictates exactly how data from an 4568// end-user expression is extracted. Dialogflow provides predefined 4569// system entities that can match many common types of data. For 4570// example, there are system entities for matching dates, times, colors, 4571// email addresses, and so on. You can also create your own custom 4572// entities for matching custom data. For example, you could define a 4573// vegetable entity that can match the types of vegetables available for 4574// purchase with a grocery store agent. For more information, see the 4575// [Entity 4576// guide](https://cloud.google.com/dialogflow/docs/entities-overview). 4577type GoogleCloudDialogflowV2EntityType struct { 4578 // AutoExpansionMode: Optional. Indicates whether the entity type can be 4579 // automatically expanded. 4580 // 4581 // Possible values: 4582 // "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the 4583 // entity. 4584 // "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values 4585 // that have not been explicitly listed in the entity. 4586 AutoExpansionMode string `json:"autoExpansionMode,omitempty"` 4587 4588 // DisplayName: Required. The name of the entity type. 4589 DisplayName string `json:"displayName,omitempty"` 4590 4591 // EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction 4592 // during classification. 4593 EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"` 4594 4595 // Entities: Optional. The collection of entity entries associated with 4596 // the entity type. 4597 Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"` 4598 4599 // Kind: Required. Indicates the kind of entity type. 4600 // 4601 // Possible values: 4602 // "KIND_UNSPECIFIED" - Not specified. This value should be never 4603 // used. 4604 // "KIND_MAP" - Map entity types allow mapping of a group of synonyms 4605 // to a reference value. 4606 // "KIND_LIST" - List entity types contain a set of entries that do 4607 // not map to reference values. However, list entity types can contain 4608 // references to other entity types (with or without aliases). 4609 // "KIND_REGEXP" - Regexp entity types allow to specify regular 4610 // expressions in entries values. 4611 Kind string `json:"kind,omitempty"` 4612 4613 // Name: The unique identifier of the entity type. Required for 4614 // EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes 4615 // methods. Format: `projects//agent/entityTypes/`. 4616 Name string `json:"name,omitempty"` 4617 4618 // ForceSendFields is a list of field names (e.g. "AutoExpansionMode") 4619 // to unconditionally include in API requests. By default, fields with 4620 // empty values are omitted from API requests. However, any non-pointer, 4621 // non-interface field appearing in ForceSendFields will be sent to the 4622 // server regardless of whether the field is empty or not. This may be 4623 // used to include empty fields in Patch requests. 4624 ForceSendFields []string `json:"-"` 4625 4626 // NullFields is a list of field names (e.g. "AutoExpansionMode") to 4627 // include in API requests with the JSON null value. By default, fields 4628 // with empty values are omitted from API requests. However, any field 4629 // with an empty value appearing in NullFields will be sent to the 4630 // server as null. It is an error if a field in this list has a 4631 // non-empty value. This may be used to include null fields in Patch 4632 // requests. 4633 NullFields []string `json:"-"` 4634} 4635 4636func (s *GoogleCloudDialogflowV2EntityType) MarshalJSON() ([]byte, error) { 4637 type NoMethod GoogleCloudDialogflowV2EntityType 4638 raw := NoMethod(*s) 4639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4640} 4641 4642// GoogleCloudDialogflowV2EntityTypeEntity: An **entity entry** for an 4643// associated entity type. 4644type GoogleCloudDialogflowV2EntityTypeEntity struct { 4645 // Synonyms: Required. A collection of value synonyms. For example, if 4646 // the entity type is *vegetable*, and `value` is *scallions*, a synonym 4647 // could be *green onions*. For `KIND_LIST` entity types: * This 4648 // collection must contain exactly one synonym equal to `value`. 4649 Synonyms []string `json:"synonyms,omitempty"` 4650 4651 // Value: Required. The primary value associated with this entity entry. 4652 // For example, if the entity type is *vegetable*, the value could be 4653 // *scallions*. For `KIND_MAP` entity types: * A reference value to be 4654 // used in place of synonyms. For `KIND_LIST` entity types: * A string 4655 // that can contain references to other entity types (with or without 4656 // aliases). 4657 Value string `json:"value,omitempty"` 4658 4659 // ForceSendFields is a list of field names (e.g. "Synonyms") to 4660 // unconditionally include in API requests. By default, fields with 4661 // empty values are omitted from API requests. However, any non-pointer, 4662 // non-interface field appearing in ForceSendFields will be sent to the 4663 // server regardless of whether the field is empty or not. This may be 4664 // used to include empty fields in Patch requests. 4665 ForceSendFields []string `json:"-"` 4666 4667 // NullFields is a list of field names (e.g. "Synonyms") to include in 4668 // API requests with the JSON null value. By default, fields with empty 4669 // values are omitted from API requests. However, any field with an 4670 // empty value appearing in NullFields will be sent to the server as 4671 // null. It is an error if a field in this list has a non-empty value. 4672 // This may be used to include null fields in Patch requests. 4673 NullFields []string `json:"-"` 4674} 4675 4676func (s *GoogleCloudDialogflowV2EntityTypeEntity) MarshalJSON() ([]byte, error) { 4677 type NoMethod GoogleCloudDialogflowV2EntityTypeEntity 4678 raw := NoMethod(*s) 4679 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4680} 4681 4682// GoogleCloudDialogflowV2EventInput: Events allow for matching intents 4683// by event name instead of the natural language input. For instance, 4684// input `` can trigger a personalized welcome response. The parameter 4685// `name` may be used by the agent in the response: "Hello 4686// #welcome_event.name! What can I do for you today?". 4687type GoogleCloudDialogflowV2EventInput struct { 4688 // LanguageCode: Required. The language of this query. See [Language 4689 // Support](https://cloud.google.com/dialogflow/docs/reference/language) 4690 // for a list of the currently supported language codes. Note that 4691 // queries in the same session do not necessarily need to specify the 4692 // same language. 4693 LanguageCode string `json:"languageCode,omitempty"` 4694 4695 // Name: Required. The unique identifier of the event. 4696 Name string `json:"name,omitempty"` 4697 4698 // Parameters: The collection of parameters associated with the event. 4699 // Depending on your protocol or client library language, this is a map, 4700 // associative array, symbol table, dictionary, or JSON object composed 4701 // of a collection of (MapKey, MapValue) pairs: - MapKey type: string - 4702 // MapKey value: parameter name - MapValue type: - If parameter's entity 4703 // type is a composite entity: map - Else: string or number, depending 4704 // on parameter value type - MapValue value: - If parameter's entity 4705 // type is a composite entity: map from composite entity property names 4706 // to property values - Else: parameter value 4707 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 4708 4709 // ForceSendFields is a list of field names (e.g. "LanguageCode") to 4710 // unconditionally include in API requests. By default, fields with 4711 // empty values are omitted from API requests. However, any non-pointer, 4712 // non-interface field appearing in ForceSendFields will be sent to the 4713 // server regardless of whether the field is empty or not. This may be 4714 // used to include empty fields in Patch requests. 4715 ForceSendFields []string `json:"-"` 4716 4717 // NullFields is a list of field names (e.g. "LanguageCode") to include 4718 // in API requests with the JSON null value. By default, fields with 4719 // empty values are omitted from API requests. However, any field with 4720 // an empty value appearing in NullFields will be sent to the server as 4721 // null. It is an error if a field in this list has a non-empty value. 4722 // This may be used to include null fields in Patch requests. 4723 NullFields []string `json:"-"` 4724} 4725 4726func (s *GoogleCloudDialogflowV2EventInput) MarshalJSON() ([]byte, error) { 4727 type NoMethod GoogleCloudDialogflowV2EventInput 4728 raw := NoMethod(*s) 4729 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4730} 4731 4732// GoogleCloudDialogflowV2ExportAgentResponse: The response message for 4733// Agents.ExportAgent. 4734type GoogleCloudDialogflowV2ExportAgentResponse struct { 4735 // AgentContent: Zip compressed raw byte content for agent. 4736 AgentContent string `json:"agentContent,omitempty"` 4737 4738 // AgentUri: The URI to a file containing the exported agent. This field 4739 // is populated only if `agent_uri` is specified in 4740 // `ExportAgentRequest`. 4741 AgentUri string `json:"agentUri,omitempty"` 4742 4743 // ForceSendFields is a list of field names (e.g. "AgentContent") to 4744 // unconditionally include in API requests. By default, fields with 4745 // empty values are omitted from API requests. However, any non-pointer, 4746 // non-interface field appearing in ForceSendFields will be sent to the 4747 // server regardless of whether the field is empty or not. This may be 4748 // used to include empty fields in Patch requests. 4749 ForceSendFields []string `json:"-"` 4750 4751 // NullFields is a list of field names (e.g. "AgentContent") to include 4752 // in API requests with the JSON null value. By default, fields with 4753 // empty values are omitted from API requests. However, any field with 4754 // an empty value appearing in NullFields will be sent to the server as 4755 // null. It is an error if a field in this list has a non-empty value. 4756 // This may be used to include null fields in Patch requests. 4757 NullFields []string `json:"-"` 4758} 4759 4760func (s *GoogleCloudDialogflowV2ExportAgentResponse) MarshalJSON() ([]byte, error) { 4761 type NoMethod GoogleCloudDialogflowV2ExportAgentResponse 4762 raw := NoMethod(*s) 4763 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4764} 4765 4766// GoogleCloudDialogflowV2ImportDocumentsResponse: Response message for 4767// Documents.ImportDocuments. 4768type GoogleCloudDialogflowV2ImportDocumentsResponse struct { 4769 // Warnings: Includes details about skipped documents or any other 4770 // warnings. 4771 Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` 4772 4773 // ForceSendFields is a list of field names (e.g. "Warnings") to 4774 // unconditionally include in API requests. By default, fields with 4775 // empty values are omitted from API requests. However, any non-pointer, 4776 // non-interface field appearing in ForceSendFields will be sent to the 4777 // server regardless of whether the field is empty or not. This may be 4778 // used to include empty fields in Patch requests. 4779 ForceSendFields []string `json:"-"` 4780 4781 // NullFields is a list of field names (e.g. "Warnings") to include in 4782 // API requests with the JSON null value. By default, fields with empty 4783 // values are omitted from API requests. However, any field with an 4784 // empty value appearing in NullFields will be sent to the server as 4785 // null. It is an error if a field in this list has a non-empty value. 4786 // This may be used to include null fields in Patch requests. 4787 NullFields []string `json:"-"` 4788} 4789 4790func (s *GoogleCloudDialogflowV2ImportDocumentsResponse) MarshalJSON() ([]byte, error) { 4791 type NoMethod GoogleCloudDialogflowV2ImportDocumentsResponse 4792 raw := NoMethod(*s) 4793 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4794} 4795 4796// GoogleCloudDialogflowV2Intent: An intent categorizes an end-user's 4797// intention for one conversation turn. For each agent, you define many 4798// intents, where your combined intents can handle a complete 4799// conversation. When an end-user writes or says something, referred to 4800// as an end-user expression or end-user input, Dialogflow matches the 4801// end-user input to the best intent in your agent. Matching an intent 4802// is also known as intent classification. For more information, see the 4803// [intent 4804// guide](https://cloud.google.com/dialogflow/docs/intents-overview). 4805type GoogleCloudDialogflowV2Intent struct { 4806 // Action: Optional. The name of the action associated with the intent. 4807 // Note: The action name must not contain whitespaces. 4808 Action string `json:"action,omitempty"` 4809 4810 // DefaultResponsePlatforms: Optional. The list of platforms for which 4811 // the first responses will be copied from the messages in 4812 // PLATFORM_UNSPECIFIED (i.e. default platform). 4813 // 4814 // Possible values: 4815 // "PLATFORM_UNSPECIFIED" - Default platform. 4816 // "FACEBOOK" - Facebook. 4817 // "SLACK" - Slack. 4818 // "TELEGRAM" - Telegram. 4819 // "KIK" - Kik. 4820 // "SKYPE" - Skype. 4821 // "LINE" - Line. 4822 // "VIBER" - Viber. 4823 // "ACTIONS_ON_GOOGLE" - Google Assistant See [Dialogflow webhook 4824 // format](https://developers.google.com/assistant/actions/build/json/dia 4825 // logflow-webhook-json) 4826 // "GOOGLE_HANGOUTS" - Google Hangouts. 4827 DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"` 4828 4829 // DisplayName: Required. The name of this intent. 4830 DisplayName string `json:"displayName,omitempty"` 4831 4832 // Events: Optional. The collection of event names that trigger the 4833 // intent. If the collection of input contexts is not empty, all of the 4834 // contexts must be present in the active user session for an event to 4835 // trigger this intent. Event names are limited to 150 characters. 4836 Events []string `json:"events,omitempty"` 4837 4838 // FollowupIntentInfo: Read-only. Information about all followup intents 4839 // that have this intent as a direct or indirect parent. We populate 4840 // this field only in the output. 4841 FollowupIntentInfo []*GoogleCloudDialogflowV2IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"` 4842 4843 // InputContextNames: Optional. The list of context names required for 4844 // this intent to be triggered. Format: 4845 // `projects//agent/sessions/-/contexts/`. 4846 InputContextNames []string `json:"inputContextNames,omitempty"` 4847 4848 // IsFallback: Optional. Indicates whether this is a fallback intent. 4849 IsFallback bool `json:"isFallback,omitempty"` 4850 4851 // Messages: Optional. The collection of rich messages corresponding to 4852 // the `Response` field in the Dialogflow console. 4853 Messages []*GoogleCloudDialogflowV2IntentMessage `json:"messages,omitempty"` 4854 4855 // MlDisabled: Optional. Indicates whether Machine Learning is disabled 4856 // for the intent. Note: If `ml_disabled` setting is set to true, then 4857 // this intent is not taken into account during inference in `ML ONLY` 4858 // match mode. Also, auto-markup in the UI is turned off. 4859 MlDisabled bool `json:"mlDisabled,omitempty"` 4860 4861 // Name: Optional. The unique identifier of this intent. Required for 4862 // Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: 4863 // `projects//agent/intents/`. 4864 Name string `json:"name,omitempty"` 4865 4866 // OutputContexts: Optional. The collection of contexts that are 4867 // activated when the intent is matched. Context messages in this 4868 // collection should not set the parameters field. Setting the 4869 // `lifespan_count` to 0 will reset the context when the intent is 4870 // matched. Format: `projects//agent/sessions/-/contexts/`. 4871 OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"` 4872 4873 // Parameters: Optional. The collection of parameters associated with 4874 // the intent. 4875 Parameters []*GoogleCloudDialogflowV2IntentParameter `json:"parameters,omitempty"` 4876 4877 // ParentFollowupIntentName: Read-only after creation. The unique 4878 // identifier of the parent intent in the chain of followup intents. You 4879 // can set this field when creating an intent, for example with 4880 // CreateIntent or BatchUpdateIntents, in order to make this intent a 4881 // followup intent. It identifies the parent followup intent. Format: 4882 // `projects//agent/intents/`. 4883 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 4884 4885 // Priority: Optional. The priority of this intent. Higher numbers 4886 // represent higher priorities. - If the supplied value is unspecified 4887 // or 0, the service translates the value to 500,000, which corresponds 4888 // to the `Normal` priority in the console. - If the supplied value is 4889 // negative, the intent is ignored in runtime detect intent requests. 4890 Priority int64 `json:"priority,omitempty"` 4891 4892 // ResetContexts: Optional. Indicates whether to delete all contexts in 4893 // the current session when this intent is matched. 4894 ResetContexts bool `json:"resetContexts,omitempty"` 4895 4896 // RootFollowupIntentName: Read-only. The unique identifier of the root 4897 // intent in the chain of followup intents. It identifies the correct 4898 // followup intents chain for this intent. We populate this field only 4899 // in the output. Format: `projects//agent/intents/`. 4900 RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"` 4901 4902 // TrainingPhrases: Optional. The collection of examples that the agent 4903 // is trained on. 4904 TrainingPhrases []*GoogleCloudDialogflowV2IntentTrainingPhrase `json:"trainingPhrases,omitempty"` 4905 4906 // WebhookState: Optional. Indicates whether webhooks are enabled for 4907 // the intent. 4908 // 4909 // Possible values: 4910 // "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and 4911 // in the intent. 4912 // "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in 4913 // the intent. 4914 // "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in 4915 // the agent and in the intent. Also, each slot filling prompt is 4916 // forwarded to the webhook. 4917 WebhookState string `json:"webhookState,omitempty"` 4918 4919 // ForceSendFields is a list of field names (e.g. "Action") to 4920 // unconditionally include in API requests. By default, fields with 4921 // empty values are omitted from API requests. However, any non-pointer, 4922 // non-interface field appearing in ForceSendFields will be sent to the 4923 // server regardless of whether the field is empty or not. This may be 4924 // used to include empty fields in Patch requests. 4925 ForceSendFields []string `json:"-"` 4926 4927 // NullFields is a list of field names (e.g. "Action") to include in API 4928 // requests with the JSON null value. By default, fields with empty 4929 // values are omitted from API requests. However, any field with an 4930 // empty value appearing in NullFields will be sent to the server as 4931 // null. It is an error if a field in this list has a non-empty value. 4932 // This may be used to include null fields in Patch requests. 4933 NullFields []string `json:"-"` 4934} 4935 4936func (s *GoogleCloudDialogflowV2Intent) MarshalJSON() ([]byte, error) { 4937 type NoMethod GoogleCloudDialogflowV2Intent 4938 raw := NoMethod(*s) 4939 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4940} 4941 4942// GoogleCloudDialogflowV2IntentFollowupIntentInfo: Represents a single 4943// followup intent in the chain. 4944type GoogleCloudDialogflowV2IntentFollowupIntentInfo struct { 4945 // FollowupIntentName: The unique identifier of the followup intent. 4946 // Format: `projects//agent/intents/`. 4947 FollowupIntentName string `json:"followupIntentName,omitempty"` 4948 4949 // ParentFollowupIntentName: The unique identifier of the followup 4950 // intent's parent. Format: `projects//agent/intents/`. 4951 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 4952 4953 // ForceSendFields is a list of field names (e.g. "FollowupIntentName") 4954 // to unconditionally include in API requests. By default, fields with 4955 // empty values are omitted from API requests. However, any non-pointer, 4956 // non-interface field appearing in ForceSendFields will be sent to the 4957 // server regardless of whether the field is empty or not. This may be 4958 // used to include empty fields in Patch requests. 4959 ForceSendFields []string `json:"-"` 4960 4961 // NullFields is a list of field names (e.g. "FollowupIntentName") to 4962 // include in API requests with the JSON null value. By default, fields 4963 // with empty values are omitted from API requests. However, any field 4964 // with an empty value appearing in NullFields will be sent to the 4965 // server as null. It is an error if a field in this list has a 4966 // non-empty value. This may be used to include null fields in Patch 4967 // requests. 4968 NullFields []string `json:"-"` 4969} 4970 4971func (s *GoogleCloudDialogflowV2IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) { 4972 type NoMethod GoogleCloudDialogflowV2IntentFollowupIntentInfo 4973 raw := NoMethod(*s) 4974 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4975} 4976 4977// GoogleCloudDialogflowV2IntentMessage: A rich response message. 4978// Corresponds to the intent `Response` field in the Dialogflow console. 4979// For more information, see [Rich response 4980// messages](https://cloud.google.com/dialogflow/docs/intents-rich-messag 4981// es). 4982type GoogleCloudDialogflowV2IntentMessage struct { 4983 // BasicCard: The basic card response for Actions on Google. 4984 BasicCard *GoogleCloudDialogflowV2IntentMessageBasicCard `json:"basicCard,omitempty"` 4985 4986 // BrowseCarouselCard: Browse carousel card for Actions on Google. 4987 BrowseCarouselCard *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"` 4988 4989 // Card: The card response. 4990 Card *GoogleCloudDialogflowV2IntentMessageCard `json:"card,omitempty"` 4991 4992 // CarouselSelect: The carousel card response for Actions on Google. 4993 CarouselSelect *GoogleCloudDialogflowV2IntentMessageCarouselSelect `json:"carouselSelect,omitempty"` 4994 4995 // Image: The image response. 4996 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 4997 4998 // LinkOutSuggestion: The link out suggestion chip for Actions on 4999 // Google. 5000 LinkOutSuggestion *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"` 5001 5002 // ListSelect: The list card response for Actions on Google. 5003 ListSelect *GoogleCloudDialogflowV2IntentMessageListSelect `json:"listSelect,omitempty"` 5004 5005 // MediaContent: The media content card for Actions on Google. 5006 MediaContent *GoogleCloudDialogflowV2IntentMessageMediaContent `json:"mediaContent,omitempty"` 5007 5008 // Payload: A custom platform-specific response. 5009 Payload googleapi.RawMessage `json:"payload,omitempty"` 5010 5011 // Platform: Optional. The platform that this message is intended for. 5012 // 5013 // Possible values: 5014 // "PLATFORM_UNSPECIFIED" - Default platform. 5015 // "FACEBOOK" - Facebook. 5016 // "SLACK" - Slack. 5017 // "TELEGRAM" - Telegram. 5018 // "KIK" - Kik. 5019 // "SKYPE" - Skype. 5020 // "LINE" - Line. 5021 // "VIBER" - Viber. 5022 // "ACTIONS_ON_GOOGLE" - Google Assistant See [Dialogflow webhook 5023 // format](https://developers.google.com/assistant/actions/build/json/dia 5024 // logflow-webhook-json) 5025 // "GOOGLE_HANGOUTS" - Google Hangouts. 5026 Platform string `json:"platform,omitempty"` 5027 5028 // QuickReplies: The quick replies response. 5029 QuickReplies *GoogleCloudDialogflowV2IntentMessageQuickReplies `json:"quickReplies,omitempty"` 5030 5031 // SimpleResponses: The voice and text-only responses for Actions on 5032 // Google. 5033 SimpleResponses *GoogleCloudDialogflowV2IntentMessageSimpleResponses `json:"simpleResponses,omitempty"` 5034 5035 // Suggestions: The suggestion chips for Actions on Google. 5036 Suggestions *GoogleCloudDialogflowV2IntentMessageSuggestions `json:"suggestions,omitempty"` 5037 5038 // TableCard: Table card for Actions on Google. 5039 TableCard *GoogleCloudDialogflowV2IntentMessageTableCard `json:"tableCard,omitempty"` 5040 5041 // Text: The text response. 5042 Text *GoogleCloudDialogflowV2IntentMessageText `json:"text,omitempty"` 5043 5044 // ForceSendFields is a list of field names (e.g. "BasicCard") to 5045 // unconditionally include in API requests. By default, fields with 5046 // empty values are omitted from API requests. However, any non-pointer, 5047 // non-interface field appearing in ForceSendFields will be sent to the 5048 // server regardless of whether the field is empty or not. This may be 5049 // used to include empty fields in Patch requests. 5050 ForceSendFields []string `json:"-"` 5051 5052 // NullFields is a list of field names (e.g. "BasicCard") to include in 5053 // API requests with the JSON null value. By default, fields with empty 5054 // values are omitted from API requests. However, any field with an 5055 // empty value appearing in NullFields will be sent to the server as 5056 // null. It is an error if a field in this list has a non-empty value. 5057 // This may be used to include null fields in Patch requests. 5058 NullFields []string `json:"-"` 5059} 5060 5061func (s *GoogleCloudDialogflowV2IntentMessage) MarshalJSON() ([]byte, error) { 5062 type NoMethod GoogleCloudDialogflowV2IntentMessage 5063 raw := NoMethod(*s) 5064 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5065} 5066 5067// GoogleCloudDialogflowV2IntentMessageBasicCard: The basic card 5068// message. Useful for displaying information. 5069type GoogleCloudDialogflowV2IntentMessageBasicCard struct { 5070 // Buttons: Optional. The collection of card buttons. 5071 Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"` 5072 5073 // FormattedText: Required, unless image is present. The body text of 5074 // the card. 5075 FormattedText string `json:"formattedText,omitempty"` 5076 5077 // Image: Optional. The image for the card. 5078 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 5079 5080 // Subtitle: Optional. The subtitle of the card. 5081 Subtitle string `json:"subtitle,omitempty"` 5082 5083 // Title: Optional. The title of the card. 5084 Title string `json:"title,omitempty"` 5085 5086 // ForceSendFields is a list of field names (e.g. "Buttons") to 5087 // unconditionally include in API requests. By default, fields with 5088 // empty values are omitted from API requests. However, any non-pointer, 5089 // non-interface field appearing in ForceSendFields will be sent to the 5090 // server regardless of whether the field is empty or not. This may be 5091 // used to include empty fields in Patch requests. 5092 ForceSendFields []string `json:"-"` 5093 5094 // NullFields is a list of field names (e.g. "Buttons") to include in 5095 // API requests with the JSON null value. By default, fields with empty 5096 // values are omitted from API requests. However, any field with an 5097 // empty value appearing in NullFields will be sent to the server as 5098 // null. It is an error if a field in this list has a non-empty value. 5099 // This may be used to include null fields in Patch requests. 5100 NullFields []string `json:"-"` 5101} 5102 5103func (s *GoogleCloudDialogflowV2IntentMessageBasicCard) MarshalJSON() ([]byte, error) { 5104 type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCard 5105 raw := NoMethod(*s) 5106 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5107} 5108 5109// GoogleCloudDialogflowV2IntentMessageBasicCardButton: The button 5110// object that appears at the bottom of a card. 5111type GoogleCloudDialogflowV2IntentMessageBasicCardButton struct { 5112 // OpenUriAction: Required. Action to take when a user taps on the 5113 // button. 5114 OpenUriAction *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"` 5115 5116 // Title: Required. The title of the button. 5117 Title string `json:"title,omitempty"` 5118 5119 // ForceSendFields is a list of field names (e.g. "OpenUriAction") to 5120 // unconditionally include in API requests. By default, fields with 5121 // empty values are omitted from API requests. However, any non-pointer, 5122 // non-interface field appearing in ForceSendFields will be sent to the 5123 // server regardless of whether the field is empty or not. This may be 5124 // used to include empty fields in Patch requests. 5125 ForceSendFields []string `json:"-"` 5126 5127 // NullFields is a list of field names (e.g. "OpenUriAction") to include 5128 // in API requests with the JSON null value. By default, fields with 5129 // empty values are omitted from API requests. However, any field with 5130 // an empty value appearing in NullFields will be sent to the server as 5131 // null. It is an error if a field in this list has a non-empty value. 5132 // This may be used to include null fields in Patch requests. 5133 NullFields []string `json:"-"` 5134} 5135 5136func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) { 5137 type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButton 5138 raw := NoMethod(*s) 5139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5140} 5141 5142// GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction: 5143// Opens the given URI. 5144type GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction struct { 5145 // Uri: Required. The HTTP or HTTPS scheme URI. 5146 Uri string `json:"uri,omitempty"` 5147 5148 // ForceSendFields is a list of field names (e.g. "Uri") to 5149 // unconditionally include in API requests. By default, fields with 5150 // empty values are omitted from API requests. However, any non-pointer, 5151 // non-interface field appearing in ForceSendFields will be sent to the 5152 // server regardless of whether the field is empty or not. This may be 5153 // used to include empty fields in Patch requests. 5154 ForceSendFields []string `json:"-"` 5155 5156 // NullFields is a list of field names (e.g. "Uri") to include in API 5157 // requests with the JSON null value. By default, fields with empty 5158 // values are omitted from API requests. However, any field with an 5159 // empty value appearing in NullFields will be sent to the server as 5160 // null. It is an error if a field in this list has a non-empty value. 5161 // This may be used to include null fields in Patch requests. 5162 NullFields []string `json:"-"` 5163} 5164 5165func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) { 5166 type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction 5167 raw := NoMethod(*s) 5168 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5169} 5170 5171// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard: Browse 5172// Carousel Card for Actions on Google. 5173// https://developers.google.com/actions/assistant/responses#browsing_carousel 5174type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard struct { 5175 // ImageDisplayOptions: Optional. Settings for displaying the image. 5176 // Applies to every image in items. 5177 // 5178 // Possible values: 5179 // "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the 5180 // image and the image container with gray bars. 5181 // "GRAY" - Fill the gaps between the image and the image container 5182 // with gray bars. 5183 // "WHITE" - Fill the gaps between the image and the image container 5184 // with white bars. 5185 // "CROPPED" - Image is scaled such that the image width and height 5186 // match or exceed the container dimensions. This may crop the top and 5187 // bottom of the image if the scaled image height is greater than the 5188 // container height, or crop the left and right of the image if the 5189 // scaled image width is greater than the container width. This is 5190 // similar to "Zoom Mode" on a widescreen TV when playing a 4:3 video. 5191 // "BLURRED_BACKGROUND" - Pad the gaps between image and image frame 5192 // with a blurred copy of the same image. 5193 ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"` 5194 5195 // Items: Required. List of items in the Browse Carousel Card. Minimum 5196 // of two items, maximum of ten. 5197 Items []*GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"` 5198 5199 // ForceSendFields is a list of field names (e.g. "ImageDisplayOptions") 5200 // to unconditionally include in API requests. By default, fields with 5201 // empty values are omitted from API requests. However, any non-pointer, 5202 // non-interface field appearing in ForceSendFields will be sent to the 5203 // server regardless of whether the field is empty or not. This may be 5204 // used to include empty fields in Patch requests. 5205 ForceSendFields []string `json:"-"` 5206 5207 // NullFields is a list of field names (e.g. "ImageDisplayOptions") to 5208 // include in API requests with the JSON null value. By default, fields 5209 // with empty values are omitted from API requests. However, any field 5210 // with an empty value appearing in NullFields will be sent to the 5211 // server as null. It is an error if a field in this list has a 5212 // non-empty value. This may be used to include null fields in Patch 5213 // requests. 5214 NullFields []string `json:"-"` 5215} 5216 5217func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) { 5218 type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard 5219 raw := NoMethod(*s) 5220 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5221} 5222 5223// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa 5224// rdItem: Browsing carousel tile 5225type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct { 5226 // Description: Optional. Description of the carousel item. Maximum of 5227 // four lines of text. 5228 Description string `json:"description,omitempty"` 5229 5230 // Footer: Optional. Text that appears at the bottom of the Browse 5231 // Carousel Card. Maximum of one line of text. 5232 Footer string `json:"footer,omitempty"` 5233 5234 // Image: Optional. Hero image for the carousel item. 5235 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 5236 5237 // OpenUriAction: Required. Action to present to the user. 5238 OpenUriAction *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"` 5239 5240 // Title: Required. Title of the carousel item. Maximum of two lines of 5241 // text. 5242 Title string `json:"title,omitempty"` 5243 5244 // ForceSendFields is a list of field names (e.g. "Description") to 5245 // unconditionally include in API requests. By default, fields with 5246 // empty values are omitted from API requests. However, any non-pointer, 5247 // non-interface field appearing in ForceSendFields will be sent to the 5248 // server regardless of whether the field is empty or not. This may be 5249 // used to include empty fields in Patch requests. 5250 ForceSendFields []string `json:"-"` 5251 5252 // NullFields is a list of field names (e.g. "Description") to include 5253 // in API requests with the JSON null value. By default, fields with 5254 // empty values are omitted from API requests. However, any field with 5255 // an empty value appearing in NullFields will be sent to the server as 5256 // null. It is an error if a field in this list has a non-empty value. 5257 // This may be used to include null fields in Patch requests. 5258 NullFields []string `json:"-"` 5259} 5260 5261func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) { 5262 type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem 5263 raw := NoMethod(*s) 5264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5265} 5266 5267// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa 5268// rdItemOpenUrlAction: Actions on Google action to open a given url. 5269type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct { 5270 // Url: Required. URL 5271 Url string `json:"url,omitempty"` 5272 5273 // UrlTypeHint: Optional. Specifies the type of viewer that is used when 5274 // opening the URL. Defaults to opening via web browser. 5275 // 5276 // Possible values: 5277 // "URL_TYPE_HINT_UNSPECIFIED" - Unspecified 5278 // "AMP_ACTION" - Url would be an amp action 5279 // "AMP_CONTENT" - URL that points directly to AMP content, or to a 5280 // canonical URL which refers to AMP content via . 5281 UrlTypeHint string `json:"urlTypeHint,omitempty"` 5282 5283 // ForceSendFields is a list of field names (e.g. "Url") to 5284 // unconditionally include in API requests. By default, fields with 5285 // empty values are omitted from API requests. However, any non-pointer, 5286 // non-interface field appearing in ForceSendFields will be sent to the 5287 // server regardless of whether the field is empty or not. This may be 5288 // used to include empty fields in Patch requests. 5289 ForceSendFields []string `json:"-"` 5290 5291 // NullFields is a list of field names (e.g. "Url") to include in API 5292 // requests with the JSON null value. By default, fields with empty 5293 // values are omitted from API requests. However, any field with an 5294 // empty value appearing in NullFields will be sent to the server as 5295 // null. It is an error if a field in this list has a non-empty value. 5296 // This may be used to include null fields in Patch requests. 5297 NullFields []string `json:"-"` 5298} 5299 5300func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) { 5301 type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction 5302 raw := NoMethod(*s) 5303 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5304} 5305 5306// GoogleCloudDialogflowV2IntentMessageCard: The card response message. 5307type GoogleCloudDialogflowV2IntentMessageCard struct { 5308 // Buttons: Optional. The collection of card buttons. 5309 Buttons []*GoogleCloudDialogflowV2IntentMessageCardButton `json:"buttons,omitempty"` 5310 5311 // ImageUri: Optional. The public URI to an image file for the card. 5312 ImageUri string `json:"imageUri,omitempty"` 5313 5314 // Subtitle: Optional. The subtitle of the card. 5315 Subtitle string `json:"subtitle,omitempty"` 5316 5317 // Title: Optional. The title of the card. 5318 Title string `json:"title,omitempty"` 5319 5320 // ForceSendFields is a list of field names (e.g. "Buttons") to 5321 // unconditionally include in API requests. By default, fields with 5322 // empty values are omitted from API requests. However, any non-pointer, 5323 // non-interface field appearing in ForceSendFields will be sent to the 5324 // server regardless of whether the field is empty or not. This may be 5325 // used to include empty fields in Patch requests. 5326 ForceSendFields []string `json:"-"` 5327 5328 // NullFields is a list of field names (e.g. "Buttons") to include in 5329 // API requests with the JSON null value. By default, fields with empty 5330 // values are omitted from API requests. However, any field with an 5331 // empty value appearing in NullFields will be sent to the server as 5332 // null. It is an error if a field in this list has a non-empty value. 5333 // This may be used to include null fields in Patch requests. 5334 NullFields []string `json:"-"` 5335} 5336 5337func (s *GoogleCloudDialogflowV2IntentMessageCard) MarshalJSON() ([]byte, error) { 5338 type NoMethod GoogleCloudDialogflowV2IntentMessageCard 5339 raw := NoMethod(*s) 5340 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5341} 5342 5343// GoogleCloudDialogflowV2IntentMessageCardButton: Contains information 5344// about a button. 5345type GoogleCloudDialogflowV2IntentMessageCardButton struct { 5346 // Postback: Optional. The text to send back to the Dialogflow API or a 5347 // URI to open. 5348 Postback string `json:"postback,omitempty"` 5349 5350 // Text: Optional. The text to show on the button. 5351 Text string `json:"text,omitempty"` 5352 5353 // ForceSendFields is a list of field names (e.g. "Postback") to 5354 // unconditionally include in API requests. By default, fields with 5355 // empty values are omitted from API requests. However, any non-pointer, 5356 // non-interface field appearing in ForceSendFields will be sent to the 5357 // server regardless of whether the field is empty or not. This may be 5358 // used to include empty fields in Patch requests. 5359 ForceSendFields []string `json:"-"` 5360 5361 // NullFields is a list of field names (e.g. "Postback") to include in 5362 // API requests with the JSON null value. By default, fields with empty 5363 // values are omitted from API requests. However, any field with an 5364 // empty value appearing in NullFields will be sent to the server as 5365 // null. It is an error if a field in this list has a non-empty value. 5366 // This may be used to include null fields in Patch requests. 5367 NullFields []string `json:"-"` 5368} 5369 5370func (s *GoogleCloudDialogflowV2IntentMessageCardButton) MarshalJSON() ([]byte, error) { 5371 type NoMethod GoogleCloudDialogflowV2IntentMessageCardButton 5372 raw := NoMethod(*s) 5373 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5374} 5375 5376// GoogleCloudDialogflowV2IntentMessageCarouselSelect: The card for 5377// presenting a carousel of options to select from. 5378type GoogleCloudDialogflowV2IntentMessageCarouselSelect struct { 5379 // Items: Required. Carousel items. 5380 Items []*GoogleCloudDialogflowV2IntentMessageCarouselSelectItem `json:"items,omitempty"` 5381 5382 // ForceSendFields is a list of field names (e.g. "Items") to 5383 // unconditionally include in API requests. By default, fields with 5384 // empty values are omitted from API requests. However, any non-pointer, 5385 // non-interface field appearing in ForceSendFields will be sent to the 5386 // server regardless of whether the field is empty or not. This may be 5387 // used to include empty fields in Patch requests. 5388 ForceSendFields []string `json:"-"` 5389 5390 // NullFields is a list of field names (e.g. "Items") to include in API 5391 // requests with the JSON null value. By default, fields with empty 5392 // values are omitted from API requests. However, any field with an 5393 // empty value appearing in NullFields will be sent to the server as 5394 // null. It is an error if a field in this list has a non-empty value. 5395 // This may be used to include null fields in Patch requests. 5396 NullFields []string `json:"-"` 5397} 5398 5399func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) { 5400 type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelect 5401 raw := NoMethod(*s) 5402 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5403} 5404 5405// GoogleCloudDialogflowV2IntentMessageCarouselSelectItem: An item in 5406// the carousel. 5407type GoogleCloudDialogflowV2IntentMessageCarouselSelectItem struct { 5408 // Description: Optional. The body text of the card. 5409 Description string `json:"description,omitempty"` 5410 5411 // Image: Optional. The image to display. 5412 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 5413 5414 // Info: Required. Additional info about the option item. 5415 Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"` 5416 5417 // Title: Required. Title of the carousel item. 5418 Title string `json:"title,omitempty"` 5419 5420 // ForceSendFields is a list of field names (e.g. "Description") to 5421 // unconditionally include in API requests. By default, fields with 5422 // empty values are omitted from API requests. However, any non-pointer, 5423 // non-interface field appearing in ForceSendFields will be sent to the 5424 // server regardless of whether the field is empty or not. This may be 5425 // used to include empty fields in Patch requests. 5426 ForceSendFields []string `json:"-"` 5427 5428 // NullFields is a list of field names (e.g. "Description") to include 5429 // in API requests with the JSON null value. By default, fields with 5430 // empty values are omitted from API requests. However, any field with 5431 // an empty value appearing in NullFields will be sent to the server as 5432 // null. It is an error if a field in this list has a non-empty value. 5433 // This may be used to include null fields in Patch requests. 5434 NullFields []string `json:"-"` 5435} 5436 5437func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) { 5438 type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelectItem 5439 raw := NoMethod(*s) 5440 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5441} 5442 5443// GoogleCloudDialogflowV2IntentMessageColumnProperties: Column 5444// properties for TableCard. 5445type GoogleCloudDialogflowV2IntentMessageColumnProperties struct { 5446 // Header: Required. Column heading. 5447 Header string `json:"header,omitempty"` 5448 5449 // HorizontalAlignment: Optional. Defines text alignment for all cells 5450 // in this column. 5451 // 5452 // Possible values: 5453 // "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading 5454 // edge of the column. 5455 // "LEADING" - Text is aligned to the leading edge of the column. 5456 // "CENTER" - Text is centered in the column. 5457 // "TRAILING" - Text is aligned to the trailing edge of the column. 5458 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 5459 5460 // ForceSendFields is a list of field names (e.g. "Header") to 5461 // unconditionally include in API requests. By default, fields with 5462 // empty values are omitted from API requests. However, any non-pointer, 5463 // non-interface field appearing in ForceSendFields will be sent to the 5464 // server regardless of whether the field is empty or not. This may be 5465 // used to include empty fields in Patch requests. 5466 ForceSendFields []string `json:"-"` 5467 5468 // NullFields is a list of field names (e.g. "Header") to include in API 5469 // requests with the JSON null value. By default, fields with empty 5470 // values are omitted from API requests. However, any field with an 5471 // empty value appearing in NullFields will be sent to the server as 5472 // null. It is an error if a field in this list has a non-empty value. 5473 // This may be used to include null fields in Patch requests. 5474 NullFields []string `json:"-"` 5475} 5476 5477func (s *GoogleCloudDialogflowV2IntentMessageColumnProperties) MarshalJSON() ([]byte, error) { 5478 type NoMethod GoogleCloudDialogflowV2IntentMessageColumnProperties 5479 raw := NoMethod(*s) 5480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5481} 5482 5483// GoogleCloudDialogflowV2IntentMessageImage: The image response 5484// message. 5485type GoogleCloudDialogflowV2IntentMessageImage struct { 5486 // AccessibilityText: Optional. A text description of the image to be 5487 // used for accessibility, e.g., screen readers. 5488 AccessibilityText string `json:"accessibilityText,omitempty"` 5489 5490 // ImageUri: Optional. The public URI to an image file. 5491 ImageUri string `json:"imageUri,omitempty"` 5492 5493 // ForceSendFields is a list of field names (e.g. "AccessibilityText") 5494 // to unconditionally include in API requests. By default, fields with 5495 // empty values are omitted from API requests. However, any non-pointer, 5496 // non-interface field appearing in ForceSendFields will be sent to the 5497 // server regardless of whether the field is empty or not. This may be 5498 // used to include empty fields in Patch requests. 5499 ForceSendFields []string `json:"-"` 5500 5501 // NullFields is a list of field names (e.g. "AccessibilityText") to 5502 // include in API requests with the JSON null value. By default, fields 5503 // with empty values are omitted from API requests. However, any field 5504 // with an empty value appearing in NullFields will be sent to the 5505 // server as null. It is an error if a field in this list has a 5506 // non-empty value. This may be used to include null fields in Patch 5507 // requests. 5508 NullFields []string `json:"-"` 5509} 5510 5511func (s *GoogleCloudDialogflowV2IntentMessageImage) MarshalJSON() ([]byte, error) { 5512 type NoMethod GoogleCloudDialogflowV2IntentMessageImage 5513 raw := NoMethod(*s) 5514 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5515} 5516 5517// GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion: The suggestion 5518// chip message that allows the user to jump out to the app or website 5519// associated with this agent. 5520type GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion struct { 5521 // DestinationName: Required. The name of the app or site this chip is 5522 // linking to. 5523 DestinationName string `json:"destinationName,omitempty"` 5524 5525 // Uri: Required. The URI of the app or site to open when the user taps 5526 // the suggestion chip. 5527 Uri string `json:"uri,omitempty"` 5528 5529 // ForceSendFields is a list of field names (e.g. "DestinationName") to 5530 // unconditionally include in API requests. By default, fields with 5531 // empty values are omitted from API requests. However, any non-pointer, 5532 // non-interface field appearing in ForceSendFields will be sent to the 5533 // server regardless of whether the field is empty or not. This may be 5534 // used to include empty fields in Patch requests. 5535 ForceSendFields []string `json:"-"` 5536 5537 // NullFields is a list of field names (e.g. "DestinationName") to 5538 // include in API requests with the JSON null value. By default, fields 5539 // with empty values are omitted from API requests. However, any field 5540 // with an empty value appearing in NullFields will be sent to the 5541 // server as null. It is an error if a field in this list has a 5542 // non-empty value. This may be used to include null fields in Patch 5543 // requests. 5544 NullFields []string `json:"-"` 5545} 5546 5547func (s *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) { 5548 type NoMethod GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion 5549 raw := NoMethod(*s) 5550 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5551} 5552 5553// GoogleCloudDialogflowV2IntentMessageListSelect: The card for 5554// presenting a list of options to select from. 5555type GoogleCloudDialogflowV2IntentMessageListSelect struct { 5556 // Items: Required. List items. 5557 Items []*GoogleCloudDialogflowV2IntentMessageListSelectItem `json:"items,omitempty"` 5558 5559 // Subtitle: Optional. Subtitle of the list. 5560 Subtitle string `json:"subtitle,omitempty"` 5561 5562 // Title: Optional. The overall title of the list. 5563 Title string `json:"title,omitempty"` 5564 5565 // ForceSendFields is a list of field names (e.g. "Items") to 5566 // unconditionally include in API requests. By default, fields with 5567 // empty values are omitted from API requests. However, any non-pointer, 5568 // non-interface field appearing in ForceSendFields will be sent to the 5569 // server regardless of whether the field is empty or not. This may be 5570 // used to include empty fields in Patch requests. 5571 ForceSendFields []string `json:"-"` 5572 5573 // NullFields is a list of field names (e.g. "Items") to include in API 5574 // requests with the JSON null value. By default, fields with empty 5575 // values are omitted from API requests. However, any field with an 5576 // empty value appearing in NullFields will be sent to the server as 5577 // null. It is an error if a field in this list has a non-empty value. 5578 // This may be used to include null fields in Patch requests. 5579 NullFields []string `json:"-"` 5580} 5581 5582func (s *GoogleCloudDialogflowV2IntentMessageListSelect) MarshalJSON() ([]byte, error) { 5583 type NoMethod GoogleCloudDialogflowV2IntentMessageListSelect 5584 raw := NoMethod(*s) 5585 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5586} 5587 5588// GoogleCloudDialogflowV2IntentMessageListSelectItem: An item in the 5589// list. 5590type GoogleCloudDialogflowV2IntentMessageListSelectItem struct { 5591 // Description: Optional. The main text describing the item. 5592 Description string `json:"description,omitempty"` 5593 5594 // Image: Optional. The image to display. 5595 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 5596 5597 // Info: Required. Additional information about this option. 5598 Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"` 5599 5600 // Title: Required. The title of the list item. 5601 Title string `json:"title,omitempty"` 5602 5603 // ForceSendFields is a list of field names (e.g. "Description") to 5604 // unconditionally include in API requests. By default, fields with 5605 // empty values are omitted from API requests. However, any non-pointer, 5606 // non-interface field appearing in ForceSendFields will be sent to the 5607 // server regardless of whether the field is empty or not. This may be 5608 // used to include empty fields in Patch requests. 5609 ForceSendFields []string `json:"-"` 5610 5611 // NullFields is a list of field names (e.g. "Description") to include 5612 // in API requests with the JSON null value. By default, fields with 5613 // empty values are omitted from API requests. However, any field with 5614 // an empty value appearing in NullFields will be sent to the server as 5615 // null. It is an error if a field in this list has a non-empty value. 5616 // This may be used to include null fields in Patch requests. 5617 NullFields []string `json:"-"` 5618} 5619 5620func (s *GoogleCloudDialogflowV2IntentMessageListSelectItem) MarshalJSON() ([]byte, error) { 5621 type NoMethod GoogleCloudDialogflowV2IntentMessageListSelectItem 5622 raw := NoMethod(*s) 5623 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5624} 5625 5626// GoogleCloudDialogflowV2IntentMessageMediaContent: The media content 5627// card for Actions on Google. 5628type GoogleCloudDialogflowV2IntentMessageMediaContent struct { 5629 // MediaObjects: Required. List of media objects. 5630 MediaObjects []*GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"` 5631 5632 // MediaType: Optional. What type of media is the content (ie "audio"). 5633 // 5634 // Possible values: 5635 // "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified. 5636 // "AUDIO" - Response media type is audio. 5637 MediaType string `json:"mediaType,omitempty"` 5638 5639 // ForceSendFields is a list of field names (e.g. "MediaObjects") to 5640 // unconditionally include in API requests. By default, fields with 5641 // empty values are omitted from API requests. However, any non-pointer, 5642 // non-interface field appearing in ForceSendFields will be sent to the 5643 // server regardless of whether the field is empty or not. This may be 5644 // used to include empty fields in Patch requests. 5645 ForceSendFields []string `json:"-"` 5646 5647 // NullFields is a list of field names (e.g. "MediaObjects") to include 5648 // in API requests with the JSON null value. By default, fields with 5649 // empty values are omitted from API requests. However, any field with 5650 // an empty value appearing in NullFields will be sent to the server as 5651 // null. It is an error if a field in this list has a non-empty value. 5652 // This may be used to include null fields in Patch requests. 5653 NullFields []string `json:"-"` 5654} 5655 5656func (s *GoogleCloudDialogflowV2IntentMessageMediaContent) MarshalJSON() ([]byte, error) { 5657 type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContent 5658 raw := NoMethod(*s) 5659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5660} 5661 5662// GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject: 5663// Response media object for media content card. 5664type GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject struct { 5665 // ContentUrl: Required. Url where the media is stored. 5666 ContentUrl string `json:"contentUrl,omitempty"` 5667 5668 // Description: Optional. Description of media card. 5669 Description string `json:"description,omitempty"` 5670 5671 // Icon: Optional. Icon to display above media content. 5672 Icon *GoogleCloudDialogflowV2IntentMessageImage `json:"icon,omitempty"` 5673 5674 // LargeImage: Optional. Image to display above media content. 5675 LargeImage *GoogleCloudDialogflowV2IntentMessageImage `json:"largeImage,omitempty"` 5676 5677 // Name: Required. Name of media card. 5678 Name string `json:"name,omitempty"` 5679 5680 // ForceSendFields is a list of field names (e.g. "ContentUrl") to 5681 // unconditionally include in API requests. By default, fields with 5682 // empty values are omitted from API requests. However, any non-pointer, 5683 // non-interface field appearing in ForceSendFields will be sent to the 5684 // server regardless of whether the field is empty or not. This may be 5685 // used to include empty fields in Patch requests. 5686 ForceSendFields []string `json:"-"` 5687 5688 // NullFields is a list of field names (e.g. "ContentUrl") to include in 5689 // API requests with the JSON null value. By default, fields with empty 5690 // values are omitted from API requests. However, any field with an 5691 // empty value appearing in NullFields will be sent to the server as 5692 // null. It is an error if a field in this list has a non-empty value. 5693 // This may be used to include null fields in Patch requests. 5694 NullFields []string `json:"-"` 5695} 5696 5697func (s *GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) { 5698 type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject 5699 raw := NoMethod(*s) 5700 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5701} 5702 5703// GoogleCloudDialogflowV2IntentMessageQuickReplies: The quick replies 5704// response message. 5705type GoogleCloudDialogflowV2IntentMessageQuickReplies struct { 5706 // QuickReplies: Optional. The collection of quick replies. 5707 QuickReplies []string `json:"quickReplies,omitempty"` 5708 5709 // Title: Optional. The title of the collection of quick replies. 5710 Title string `json:"title,omitempty"` 5711 5712 // ForceSendFields is a list of field names (e.g. "QuickReplies") to 5713 // unconditionally include in API requests. By default, fields with 5714 // empty values are omitted from API requests. However, any non-pointer, 5715 // non-interface field appearing in ForceSendFields will be sent to the 5716 // server regardless of whether the field is empty or not. This may be 5717 // used to include empty fields in Patch requests. 5718 ForceSendFields []string `json:"-"` 5719 5720 // NullFields is a list of field names (e.g. "QuickReplies") to include 5721 // in API requests with the JSON null value. By default, fields with 5722 // empty values are omitted from API requests. However, any field with 5723 // an empty value appearing in NullFields will be sent to the server as 5724 // null. It is an error if a field in this list has a non-empty value. 5725 // This may be used to include null fields in Patch requests. 5726 NullFields []string `json:"-"` 5727} 5728 5729func (s *GoogleCloudDialogflowV2IntentMessageQuickReplies) MarshalJSON() ([]byte, error) { 5730 type NoMethod GoogleCloudDialogflowV2IntentMessageQuickReplies 5731 raw := NoMethod(*s) 5732 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5733} 5734 5735// GoogleCloudDialogflowV2IntentMessageSelectItemInfo: Additional info 5736// about the select item for when it is triggered in a dialog. 5737type GoogleCloudDialogflowV2IntentMessageSelectItemInfo struct { 5738 // Key: Required. A unique key that will be sent back to the agent if 5739 // this response is given. 5740 Key string `json:"key,omitempty"` 5741 5742 // Synonyms: Optional. A list of synonyms that can also be used to 5743 // trigger this item in dialog. 5744 Synonyms []string `json:"synonyms,omitempty"` 5745 5746 // ForceSendFields is a list of field names (e.g. "Key") to 5747 // unconditionally include in API requests. By default, fields with 5748 // empty values are omitted from API requests. However, any non-pointer, 5749 // non-interface field appearing in ForceSendFields will be sent to the 5750 // server regardless of whether the field is empty or not. This may be 5751 // used to include empty fields in Patch requests. 5752 ForceSendFields []string `json:"-"` 5753 5754 // NullFields is a list of field names (e.g. "Key") to include in API 5755 // requests with the JSON null value. By default, fields with empty 5756 // values are omitted from API requests. However, any field with an 5757 // empty value appearing in NullFields will be sent to the server as 5758 // null. It is an error if a field in this list has a non-empty value. 5759 // This may be used to include null fields in Patch requests. 5760 NullFields []string `json:"-"` 5761} 5762 5763func (s *GoogleCloudDialogflowV2IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) { 5764 type NoMethod GoogleCloudDialogflowV2IntentMessageSelectItemInfo 5765 raw := NoMethod(*s) 5766 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5767} 5768 5769// GoogleCloudDialogflowV2IntentMessageSimpleResponse: The simple 5770// response message containing speech or text. 5771type GoogleCloudDialogflowV2IntentMessageSimpleResponse struct { 5772 // DisplayText: Optional. The text to display. 5773 DisplayText string `json:"displayText,omitempty"` 5774 5775 // Ssml: One of text_to_speech or ssml must be provided. Structured 5776 // spoken response to the user in the SSML format. Mutually exclusive 5777 // with text_to_speech. 5778 Ssml string `json:"ssml,omitempty"` 5779 5780 // TextToSpeech: One of text_to_speech or ssml must be provided. The 5781 // plain text of the speech output. Mutually exclusive with ssml. 5782 TextToSpeech string `json:"textToSpeech,omitempty"` 5783 5784 // ForceSendFields is a list of field names (e.g. "DisplayText") to 5785 // unconditionally include in API requests. By default, fields with 5786 // empty values are omitted from API requests. However, any non-pointer, 5787 // non-interface field appearing in ForceSendFields will be sent to the 5788 // server regardless of whether the field is empty or not. This may be 5789 // used to include empty fields in Patch requests. 5790 ForceSendFields []string `json:"-"` 5791 5792 // NullFields is a list of field names (e.g. "DisplayText") to include 5793 // in API requests with the JSON null value. By default, fields with 5794 // empty values are omitted from API requests. However, any field with 5795 // an empty value appearing in NullFields will be sent to the server as 5796 // null. It is an error if a field in this list has a non-empty value. 5797 // This may be used to include null fields in Patch requests. 5798 NullFields []string `json:"-"` 5799} 5800 5801func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) { 5802 type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponse 5803 raw := NoMethod(*s) 5804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5805} 5806 5807// GoogleCloudDialogflowV2IntentMessageSimpleResponses: The collection 5808// of simple response candidates. This message in 5809// `QueryResult.fulfillment_messages` and 5810// `WebhookResponse.fulfillment_messages` should contain only one 5811// `SimpleResponse`. 5812type GoogleCloudDialogflowV2IntentMessageSimpleResponses struct { 5813 // SimpleResponses: Required. The list of simple responses. 5814 SimpleResponses []*GoogleCloudDialogflowV2IntentMessageSimpleResponse `json:"simpleResponses,omitempty"` 5815 5816 // ForceSendFields is a list of field names (e.g. "SimpleResponses") to 5817 // unconditionally include in API requests. By default, fields with 5818 // empty values are omitted from API requests. However, any non-pointer, 5819 // non-interface field appearing in ForceSendFields will be sent to the 5820 // server regardless of whether the field is empty or not. This may be 5821 // used to include empty fields in Patch requests. 5822 ForceSendFields []string `json:"-"` 5823 5824 // NullFields is a list of field names (e.g. "SimpleResponses") to 5825 // include in API requests with the JSON null value. By default, fields 5826 // with empty values are omitted from API requests. However, any field 5827 // with an empty value appearing in NullFields will be sent to the 5828 // server as null. It is an error if a field in this list has a 5829 // non-empty value. This may be used to include null fields in Patch 5830 // requests. 5831 NullFields []string `json:"-"` 5832} 5833 5834func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) { 5835 type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponses 5836 raw := NoMethod(*s) 5837 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5838} 5839 5840// GoogleCloudDialogflowV2IntentMessageSuggestion: The suggestion chip 5841// message that the user can tap to quickly post a reply to the 5842// conversation. 5843type GoogleCloudDialogflowV2IntentMessageSuggestion struct { 5844 // Title: Required. The text shown the in the suggestion chip. 5845 Title string `json:"title,omitempty"` 5846 5847 // ForceSendFields is a list of field names (e.g. "Title") to 5848 // unconditionally include in API requests. By default, fields with 5849 // empty values are omitted from API requests. However, any non-pointer, 5850 // non-interface field appearing in ForceSendFields will be sent to the 5851 // server regardless of whether the field is empty or not. This may be 5852 // used to include empty fields in Patch requests. 5853 ForceSendFields []string `json:"-"` 5854 5855 // NullFields is a list of field names (e.g. "Title") to include in API 5856 // requests with the JSON null value. By default, fields with empty 5857 // values are omitted from API requests. However, any field with an 5858 // empty value appearing in NullFields will be sent to the server as 5859 // null. It is an error if a field in this list has a non-empty value. 5860 // This may be used to include null fields in Patch requests. 5861 NullFields []string `json:"-"` 5862} 5863 5864func (s *GoogleCloudDialogflowV2IntentMessageSuggestion) MarshalJSON() ([]byte, error) { 5865 type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestion 5866 raw := NoMethod(*s) 5867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5868} 5869 5870// GoogleCloudDialogflowV2IntentMessageSuggestions: The collection of 5871// suggestions. 5872type GoogleCloudDialogflowV2IntentMessageSuggestions struct { 5873 // Suggestions: Required. The list of suggested replies. 5874 Suggestions []*GoogleCloudDialogflowV2IntentMessageSuggestion `json:"suggestions,omitempty"` 5875 5876 // ForceSendFields is a list of field names (e.g. "Suggestions") to 5877 // unconditionally include in API requests. By default, fields with 5878 // empty values are omitted from API requests. However, any non-pointer, 5879 // non-interface field appearing in ForceSendFields will be sent to the 5880 // server regardless of whether the field is empty or not. This may be 5881 // used to include empty fields in Patch requests. 5882 ForceSendFields []string `json:"-"` 5883 5884 // NullFields is a list of field names (e.g. "Suggestions") to include 5885 // in API requests with the JSON null value. By default, fields with 5886 // empty values are omitted from API requests. However, any field with 5887 // an empty value appearing in NullFields will be sent to the server as 5888 // null. It is an error if a field in this list has a non-empty value. 5889 // This may be used to include null fields in Patch requests. 5890 NullFields []string `json:"-"` 5891} 5892 5893func (s *GoogleCloudDialogflowV2IntentMessageSuggestions) MarshalJSON() ([]byte, error) { 5894 type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestions 5895 raw := NoMethod(*s) 5896 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5897} 5898 5899// GoogleCloudDialogflowV2IntentMessageTableCard: Table card for Actions 5900// on Google. 5901type GoogleCloudDialogflowV2IntentMessageTableCard struct { 5902 // Buttons: Optional. List of buttons for the card. 5903 Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"` 5904 5905 // ColumnProperties: Optional. Display properties for the columns in 5906 // this table. 5907 ColumnProperties []*GoogleCloudDialogflowV2IntentMessageColumnProperties `json:"columnProperties,omitempty"` 5908 5909 // Image: Optional. Image which should be displayed on the card. 5910 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 5911 5912 // Rows: Optional. Rows in this table of data. 5913 Rows []*GoogleCloudDialogflowV2IntentMessageTableCardRow `json:"rows,omitempty"` 5914 5915 // Subtitle: Optional. Subtitle to the title. 5916 Subtitle string `json:"subtitle,omitempty"` 5917 5918 // Title: Required. Title of the card. 5919 Title string `json:"title,omitempty"` 5920 5921 // ForceSendFields is a list of field names (e.g. "Buttons") to 5922 // unconditionally include in API requests. By default, fields with 5923 // empty values are omitted from API requests. However, any non-pointer, 5924 // non-interface field appearing in ForceSendFields will be sent to the 5925 // server regardless of whether the field is empty or not. This may be 5926 // used to include empty fields in Patch requests. 5927 ForceSendFields []string `json:"-"` 5928 5929 // NullFields is a list of field names (e.g. "Buttons") to include in 5930 // API requests with the JSON null value. By default, fields with empty 5931 // values are omitted from API requests. However, any field with an 5932 // empty value appearing in NullFields will be sent to the server as 5933 // null. It is an error if a field in this list has a non-empty value. 5934 // This may be used to include null fields in Patch requests. 5935 NullFields []string `json:"-"` 5936} 5937 5938func (s *GoogleCloudDialogflowV2IntentMessageTableCard) MarshalJSON() ([]byte, error) { 5939 type NoMethod GoogleCloudDialogflowV2IntentMessageTableCard 5940 raw := NoMethod(*s) 5941 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5942} 5943 5944// GoogleCloudDialogflowV2IntentMessageTableCardCell: Cell of 5945// TableCardRow. 5946type GoogleCloudDialogflowV2IntentMessageTableCardCell struct { 5947 // Text: Required. Text in this cell. 5948 Text string `json:"text,omitempty"` 5949 5950 // ForceSendFields is a list of field names (e.g. "Text") to 5951 // unconditionally include in API requests. By default, fields with 5952 // empty values are omitted from API requests. However, any non-pointer, 5953 // non-interface field appearing in ForceSendFields will be sent to the 5954 // server regardless of whether the field is empty or not. This may be 5955 // used to include empty fields in Patch requests. 5956 ForceSendFields []string `json:"-"` 5957 5958 // NullFields is a list of field names (e.g. "Text") to include in API 5959 // requests with the JSON null value. By default, fields with empty 5960 // values are omitted from API requests. However, any field with an 5961 // empty value appearing in NullFields will be sent to the server as 5962 // null. It is an error if a field in this list has a non-empty value. 5963 // This may be used to include null fields in Patch requests. 5964 NullFields []string `json:"-"` 5965} 5966 5967func (s *GoogleCloudDialogflowV2IntentMessageTableCardCell) MarshalJSON() ([]byte, error) { 5968 type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardCell 5969 raw := NoMethod(*s) 5970 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5971} 5972 5973// GoogleCloudDialogflowV2IntentMessageTableCardRow: Row of TableCard. 5974type GoogleCloudDialogflowV2IntentMessageTableCardRow struct { 5975 // Cells: Optional. List of cells that make up this row. 5976 Cells []*GoogleCloudDialogflowV2IntentMessageTableCardCell `json:"cells,omitempty"` 5977 5978 // DividerAfter: Optional. Whether to add a visual divider after this 5979 // row. 5980 DividerAfter bool `json:"dividerAfter,omitempty"` 5981 5982 // ForceSendFields is a list of field names (e.g. "Cells") to 5983 // unconditionally include in API requests. By default, fields with 5984 // empty values are omitted from API requests. However, any non-pointer, 5985 // non-interface field appearing in ForceSendFields will be sent to the 5986 // server regardless of whether the field is empty or not. This may be 5987 // used to include empty fields in Patch requests. 5988 ForceSendFields []string `json:"-"` 5989 5990 // NullFields is a list of field names (e.g. "Cells") to include in API 5991 // requests with the JSON null value. By default, fields with empty 5992 // values are omitted from API requests. However, any field with an 5993 // empty value appearing in NullFields will be sent to the server as 5994 // null. It is an error if a field in this list has a non-empty value. 5995 // This may be used to include null fields in Patch requests. 5996 NullFields []string `json:"-"` 5997} 5998 5999func (s *GoogleCloudDialogflowV2IntentMessageTableCardRow) MarshalJSON() ([]byte, error) { 6000 type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardRow 6001 raw := NoMethod(*s) 6002 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6003} 6004 6005// GoogleCloudDialogflowV2IntentMessageText: The text response message. 6006type GoogleCloudDialogflowV2IntentMessageText struct { 6007 // Text: Optional. The collection of the agent's responses. 6008 Text []string `json:"text,omitempty"` 6009 6010 // ForceSendFields is a list of field names (e.g. "Text") to 6011 // unconditionally include in API requests. By default, fields with 6012 // empty values are omitted from API requests. However, any non-pointer, 6013 // non-interface field appearing in ForceSendFields will be sent to the 6014 // server regardless of whether the field is empty or not. This may be 6015 // used to include empty fields in Patch requests. 6016 ForceSendFields []string `json:"-"` 6017 6018 // NullFields is a list of field names (e.g. "Text") to include in API 6019 // requests with the JSON null value. By default, fields with empty 6020 // values are omitted from API requests. However, any field with an 6021 // empty value appearing in NullFields will be sent to the server as 6022 // null. It is an error if a field in this list has a non-empty value. 6023 // This may be used to include null fields in Patch requests. 6024 NullFields []string `json:"-"` 6025} 6026 6027func (s *GoogleCloudDialogflowV2IntentMessageText) MarshalJSON() ([]byte, error) { 6028 type NoMethod GoogleCloudDialogflowV2IntentMessageText 6029 raw := NoMethod(*s) 6030 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6031} 6032 6033// GoogleCloudDialogflowV2IntentParameter: Represents intent parameters. 6034type GoogleCloudDialogflowV2IntentParameter struct { 6035 // DefaultValue: Optional. The default value to use when the `value` 6036 // yields an empty result. Default values can be extracted from contexts 6037 // by using the following syntax: `#context_name.parameter_name`. 6038 DefaultValue string `json:"defaultValue,omitempty"` 6039 6040 // DisplayName: Required. The name of the parameter. 6041 DisplayName string `json:"displayName,omitempty"` 6042 6043 // EntityTypeDisplayName: Optional. The name of the entity type, 6044 // prefixed with `@`, that describes values of the parameter. If the 6045 // parameter is required, this must be provided. 6046 EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"` 6047 6048 // IsList: Optional. Indicates whether the parameter represents a list 6049 // of values. 6050 IsList bool `json:"isList,omitempty"` 6051 6052 // Mandatory: Optional. Indicates whether the parameter is required. 6053 // That is, whether the intent cannot be completed without collecting 6054 // the parameter value. 6055 Mandatory bool `json:"mandatory,omitempty"` 6056 6057 // Name: The unique identifier of this parameter. 6058 Name string `json:"name,omitempty"` 6059 6060 // Prompts: Optional. The collection of prompts that the agent can 6061 // present to the user in order to collect a value for the parameter. 6062 Prompts []string `json:"prompts,omitempty"` 6063 6064 // Value: Optional. The definition of the parameter value. It can be: - 6065 // a constant string, - a parameter value defined as `$parameter_name`, 6066 // - an original parameter value defined as `$parameter_name.original`, 6067 // - a parameter value from some context defined as 6068 // `#context_name.parameter_name`. 6069 Value string `json:"value,omitempty"` 6070 6071 // ForceSendFields is a list of field names (e.g. "DefaultValue") to 6072 // unconditionally include in API requests. By default, fields with 6073 // empty values are omitted from API requests. However, any non-pointer, 6074 // non-interface field appearing in ForceSendFields will be sent to the 6075 // server regardless of whether the field is empty or not. This may be 6076 // used to include empty fields in Patch requests. 6077 ForceSendFields []string `json:"-"` 6078 6079 // NullFields is a list of field names (e.g. "DefaultValue") to include 6080 // in API requests with the JSON null value. By default, fields with 6081 // empty values are omitted from API requests. However, any field with 6082 // an empty value appearing in NullFields will be sent to the server as 6083 // null. It is an error if a field in this list has a non-empty value. 6084 // This may be used to include null fields in Patch requests. 6085 NullFields []string `json:"-"` 6086} 6087 6088func (s *GoogleCloudDialogflowV2IntentParameter) MarshalJSON() ([]byte, error) { 6089 type NoMethod GoogleCloudDialogflowV2IntentParameter 6090 raw := NoMethod(*s) 6091 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6092} 6093 6094// GoogleCloudDialogflowV2IntentTrainingPhrase: Represents an example 6095// that the agent is trained on. 6096type GoogleCloudDialogflowV2IntentTrainingPhrase struct { 6097 // Name: Output only. The unique identifier of this training phrase. 6098 Name string `json:"name,omitempty"` 6099 6100 // Parts: Required. The ordered list of training phrase parts. The parts 6101 // are concatenated in order to form the training phrase. Note: The API 6102 // does not automatically annotate training phrases like the Dialogflow 6103 // Console does. Note: Do not forget to include whitespace at part 6104 // boundaries, so the training phrase is well formatted when the parts 6105 // are concatenated. If the training phrase does not need to be 6106 // annotated with parameters, you just need a single part with only the 6107 // Part.text field set. If you want to annotate the training phrase, you 6108 // must create multiple parts, where the fields of each part are 6109 // populated in one of two ways: - `Part.text` is set to a part of the 6110 // phrase that has no parameters. - `Part.text` is set to a part of the 6111 // phrase that you want to annotate, and the `entity_type`, `alias`, and 6112 // `user_defined` fields are all set. 6113 Parts []*GoogleCloudDialogflowV2IntentTrainingPhrasePart `json:"parts,omitempty"` 6114 6115 // TimesAddedCount: Optional. Indicates how many times this example was 6116 // added to the intent. Each time a developer adds an existing sample by 6117 // editing an intent or training, this counter is increased. 6118 TimesAddedCount int64 `json:"timesAddedCount,omitempty"` 6119 6120 // Type: Required. The type of the training phrase. 6121 // 6122 // Possible values: 6123 // "TYPE_UNSPECIFIED" - Not specified. This value should never be 6124 // used. 6125 // "EXAMPLE" - Examples do not contain @-prefixed entity type names, 6126 // but example parts can be annotated with entity types. 6127 // "TEMPLATE" - Templates are not annotated with entity types, but 6128 // they can contain @-prefixed entity type names as substrings. Template 6129 // mode has been deprecated. Example mode is the only supported way to 6130 // create new training phrases. If you have existing training phrases 6131 // that you've created in template mode, those will continue to work. 6132 Type string `json:"type,omitempty"` 6133 6134 // ForceSendFields is a list of field names (e.g. "Name") to 6135 // unconditionally include in API requests. By default, fields with 6136 // empty values are omitted from API requests. However, any non-pointer, 6137 // non-interface field appearing in ForceSendFields will be sent to the 6138 // server regardless of whether the field is empty or not. This may be 6139 // used to include empty fields in Patch requests. 6140 ForceSendFields []string `json:"-"` 6141 6142 // NullFields is a list of field names (e.g. "Name") to include in API 6143 // requests with the JSON null value. By default, fields with empty 6144 // values are omitted from API requests. However, any field with an 6145 // empty value appearing in NullFields will be sent to the server as 6146 // null. It is an error if a field in this list has a non-empty value. 6147 // This may be used to include null fields in Patch requests. 6148 NullFields []string `json:"-"` 6149} 6150 6151func (s *GoogleCloudDialogflowV2IntentTrainingPhrase) MarshalJSON() ([]byte, error) { 6152 type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrase 6153 raw := NoMethod(*s) 6154 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6155} 6156 6157// GoogleCloudDialogflowV2IntentTrainingPhrasePart: Represents a part of 6158// a training phrase. 6159type GoogleCloudDialogflowV2IntentTrainingPhrasePart struct { 6160 // Alias: Optional. The parameter name for the value extracted from the 6161 // annotated part of the example. This field is required for annotated 6162 // parts of the training phrase. 6163 Alias string `json:"alias,omitempty"` 6164 6165 // EntityType: Optional. The entity type name prefixed with `@`. This 6166 // field is required for annotated parts of the training phrase. 6167 EntityType string `json:"entityType,omitempty"` 6168 6169 // Text: Required. The text for this part. 6170 Text string `json:"text,omitempty"` 6171 6172 // UserDefined: Optional. Indicates whether the text was manually 6173 // annotated. This field is set to true when the Dialogflow Console is 6174 // used to manually annotate the part. When creating an annotated part 6175 // with the API, you must set this to true. 6176 UserDefined bool `json:"userDefined,omitempty"` 6177 6178 // ForceSendFields is a list of field names (e.g. "Alias") to 6179 // unconditionally include in API requests. By default, fields with 6180 // empty values are omitted from API requests. However, any non-pointer, 6181 // non-interface field appearing in ForceSendFields will be sent to the 6182 // server regardless of whether the field is empty or not. This may be 6183 // used to include empty fields in Patch requests. 6184 ForceSendFields []string `json:"-"` 6185 6186 // NullFields is a list of field names (e.g. "Alias") to include in API 6187 // requests with the JSON null value. By default, fields with empty 6188 // values are omitted from API requests. However, any field with an 6189 // empty value appearing in NullFields will be sent to the server as 6190 // null. It is an error if a field in this list has a non-empty value. 6191 // This may be used to include null fields in Patch requests. 6192 NullFields []string `json:"-"` 6193} 6194 6195func (s *GoogleCloudDialogflowV2IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) { 6196 type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrasePart 6197 raw := NoMethod(*s) 6198 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6199} 6200 6201// GoogleCloudDialogflowV2Message: Represents a message posted into a 6202// conversation. 6203type GoogleCloudDialogflowV2Message struct { 6204 // Content: Required. The message content. 6205 Content string `json:"content,omitempty"` 6206 6207 // CreateTime: Output only. The time when the message was created. 6208 CreateTime string `json:"createTime,omitempty"` 6209 6210 // LanguageCode: Optional. The message language. This should be a 6211 // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. 6212 // Example: "en-US". 6213 LanguageCode string `json:"languageCode,omitempty"` 6214 6215 // MessageAnnotation: Output only. The annotation for the message. 6216 MessageAnnotation *GoogleCloudDialogflowV2MessageAnnotation `json:"messageAnnotation,omitempty"` 6217 6218 // Name: The unique identifier of the message. Format: 6219 // `projects//conversations//messages/`. 6220 Name string `json:"name,omitempty"` 6221 6222 // Participant: Output only. The participant that sends this message. 6223 Participant string `json:"participant,omitempty"` 6224 6225 // ParticipantRole: Output only. The role of the participant. 6226 // 6227 // Possible values: 6228 // "ROLE_UNSPECIFIED" - Participant role not set. 6229 // "HUMAN_AGENT" - Participant is a human agent. 6230 // "AUTOMATED_AGENT" - Participant is an automated agent, such as a 6231 // Dialogflow agent. 6232 // "END_USER" - Participant is an end user that has called or chatted 6233 // with Dialogflow services. 6234 ParticipantRole string `json:"participantRole,omitempty"` 6235 6236 // ForceSendFields is a list of field names (e.g. "Content") to 6237 // unconditionally include in API requests. By default, fields with 6238 // empty values are omitted from API requests. However, any non-pointer, 6239 // non-interface field appearing in ForceSendFields will be sent to the 6240 // server regardless of whether the field is empty or not. This may be 6241 // used to include empty fields in Patch requests. 6242 ForceSendFields []string `json:"-"` 6243 6244 // NullFields is a list of field names (e.g. "Content") to include in 6245 // API requests with the JSON null value. By default, fields with empty 6246 // values are omitted from API requests. However, any field with an 6247 // empty value appearing in NullFields will be sent to the server as 6248 // null. It is an error if a field in this list has a non-empty value. 6249 // This may be used to include null fields in Patch requests. 6250 NullFields []string `json:"-"` 6251} 6252 6253func (s *GoogleCloudDialogflowV2Message) MarshalJSON() ([]byte, error) { 6254 type NoMethod GoogleCloudDialogflowV2Message 6255 raw := NoMethod(*s) 6256 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6257} 6258 6259// GoogleCloudDialogflowV2MessageAnnotation: Represents the result of 6260// annotation for the message. 6261type GoogleCloudDialogflowV2MessageAnnotation struct { 6262 // ContainEntities: Indicates whether the text message contains 6263 // entities. 6264 ContainEntities bool `json:"containEntities,omitempty"` 6265 6266 // Parts: The collection of annotated message parts ordered by their 6267 // position in the message. You can recover the annotated message by 6268 // concatenating [AnnotatedMessagePart.text]. 6269 Parts []*GoogleCloudDialogflowV2AnnotatedMessagePart `json:"parts,omitempty"` 6270 6271 // ForceSendFields is a list of field names (e.g. "ContainEntities") to 6272 // unconditionally include in API requests. By default, fields with 6273 // empty values are omitted from API requests. However, any non-pointer, 6274 // non-interface field appearing in ForceSendFields will be sent to the 6275 // server regardless of whether the field is empty or not. This may be 6276 // used to include empty fields in Patch requests. 6277 ForceSendFields []string `json:"-"` 6278 6279 // NullFields is a list of field names (e.g. "ContainEntities") to 6280 // include in API requests with the JSON null value. By default, fields 6281 // with empty values are omitted from API requests. However, any field 6282 // with an empty value appearing in NullFields will be sent to the 6283 // server as null. It is an error if a field in this list has a 6284 // non-empty value. This may be used to include null fields in Patch 6285 // requests. 6286 NullFields []string `json:"-"` 6287} 6288 6289func (s *GoogleCloudDialogflowV2MessageAnnotation) MarshalJSON() ([]byte, error) { 6290 type NoMethod GoogleCloudDialogflowV2MessageAnnotation 6291 raw := NoMethod(*s) 6292 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6293} 6294 6295// GoogleCloudDialogflowV2OriginalDetectIntentRequest: Represents the 6296// contents of the original request that was passed to the 6297// `[Streaming]DetectIntent` call. 6298type GoogleCloudDialogflowV2OriginalDetectIntentRequest struct { 6299 // Payload: Optional. This field is set to the value of the 6300 // `QueryParameters.payload` field passed in the request. Some 6301 // integrations that query a Dialogflow agent may provide additional 6302 // information in the payload. In particular, for the Dialogflow Phone 6303 // Gateway integration, this field has the form: { "telephony": { 6304 // "caller_id": "+18558363987" } } Note: The caller ID field 6305 // (`caller_id`) will be redacted for Trial Edition agents and populated 6306 // with the caller ID in [E.164 6307 // format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition 6308 // agents. 6309 Payload googleapi.RawMessage `json:"payload,omitempty"` 6310 6311 // Source: The source of this request, e.g., `google`, `facebook`, 6312 // `slack`. It is set by Dialogflow-owned servers. 6313 Source string `json:"source,omitempty"` 6314 6315 // Version: Optional. The version of the protocol used for this request. 6316 // This field is AoG-specific. 6317 Version string `json:"version,omitempty"` 6318 6319 // ForceSendFields is a list of field names (e.g. "Payload") to 6320 // unconditionally include in API requests. By default, fields with 6321 // empty values are omitted from API requests. However, any non-pointer, 6322 // non-interface field appearing in ForceSendFields will be sent to the 6323 // server regardless of whether the field is empty or not. This may be 6324 // used to include empty fields in Patch requests. 6325 ForceSendFields []string `json:"-"` 6326 6327 // NullFields is a list of field names (e.g. "Payload") to include in 6328 // API requests with the JSON null value. By default, fields with empty 6329 // values are omitted from API requests. However, any field with an 6330 // empty value appearing in NullFields will be sent to the server as 6331 // null. It is an error if a field in this list has a non-empty value. 6332 // This may be used to include null fields in Patch requests. 6333 NullFields []string `json:"-"` 6334} 6335 6336func (s *GoogleCloudDialogflowV2OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) { 6337 type NoMethod GoogleCloudDialogflowV2OriginalDetectIntentRequest 6338 raw := NoMethod(*s) 6339 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6340} 6341 6342// GoogleCloudDialogflowV2QueryResult: Represents the result of 6343// conversational query or event processing. 6344type GoogleCloudDialogflowV2QueryResult struct { 6345 // Action: The action name from the matched intent. 6346 Action string `json:"action,omitempty"` 6347 6348 // AllRequiredParamsPresent: This field is set to: - `false` if the 6349 // matched intent has required parameters and not all of the required 6350 // parameter values have been collected. - `true` if all required 6351 // parameter values have been collected, or if the matched intent 6352 // doesn't contain any required parameters. 6353 AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"` 6354 6355 // DiagnosticInfo: Free-form diagnostic information for the associated 6356 // detect intent request. The fields of this data can change without 6357 // notice, so you should not write code that depends on its structure. 6358 // The data may contain: - webhook call latency - webhook errors 6359 DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"` 6360 6361 // FulfillmentMessages: The collection of rich messages to present to 6362 // the user. 6363 FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"` 6364 6365 // FulfillmentText: The text to be pronounced to the user or shown on 6366 // the screen. Note: This is a legacy field, `fulfillment_messages` 6367 // should be preferred. 6368 FulfillmentText string `json:"fulfillmentText,omitempty"` 6369 6370 // Intent: The intent that matched the conversational query. Some, not 6371 // all fields are filled in this message, including but not limited to: 6372 // `name`, `display_name`, `end_interaction` and `is_fallback`. 6373 Intent *GoogleCloudDialogflowV2Intent `json:"intent,omitempty"` 6374 6375 // IntentDetectionConfidence: The intent detection confidence. Values 6376 // range from 0.0 (completely uncertain) to 1.0 (completely certain). 6377 // This value is for informational purpose only and is only used to help 6378 // match the best intent within the classification threshold. This value 6379 // may change for the same end-user expression at any time due to a 6380 // model retraining or change in implementation. If there are `multiple 6381 // knowledge_answers` messages, this value is set to the greatest 6382 // `knowledgeAnswers.match_confidence` value in the list. 6383 IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"` 6384 6385 // LanguageCode: The language that was triggered during intent 6386 // detection. See [Language 6387 // Support](https://cloud.google.com/dialogflow/docs/reference/language) 6388 // for a list of the currently supported language codes. 6389 LanguageCode string `json:"languageCode,omitempty"` 6390 6391 // OutputContexts: The collection of output contexts. If applicable, 6392 // `output_contexts.parameters` contains entries with name `.original` 6393 // containing the original parameter values before the query. 6394 OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"` 6395 6396 // Parameters: The collection of extracted parameters. Depending on your 6397 // protocol or client library language, this is a map, associative 6398 // array, symbol table, dictionary, or JSON object composed of a 6399 // collection of (MapKey, MapValue) pairs: - MapKey type: string - 6400 // MapKey value: parameter name - MapValue type: - If parameter's entity 6401 // type is a composite entity: map - Else: string or number, depending 6402 // on parameter value type - MapValue value: - If parameter's entity 6403 // type is a composite entity: map from composite entity property names 6404 // to property values - Else: parameter value 6405 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 6406 6407 // QueryText: The original conversational query text: - If natural 6408 // language text was provided as input, `query_text` contains a copy of 6409 // the input. - If natural language speech audio was provided as input, 6410 // `query_text` contains the speech recognition result. If speech 6411 // recognizer produced multiple alternatives, a particular one is 6412 // picked. - If automatic spell correction is enabled, `query_text` will 6413 // contain the corrected user input. 6414 QueryText string `json:"queryText,omitempty"` 6415 6416 // SentimentAnalysisResult: The sentiment analysis result, which depends 6417 // on the `sentiment_analysis_request_config` specified in the request. 6418 SentimentAnalysisResult *GoogleCloudDialogflowV2SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"` 6419 6420 // SpeechRecognitionConfidence: The Speech recognition confidence 6421 // between 0.0 and 1.0. A higher number indicates an estimated greater 6422 // likelihood that the recognized words are correct. The default of 0.0 6423 // is a sentinel value indicating that confidence was not set. This 6424 // field is not guaranteed to be accurate or set. In particular this 6425 // field isn't set for StreamingDetectIntent since the streaming 6426 // endpoint has separate confidence estimates per portion of the audio 6427 // in StreamingRecognitionResult. 6428 SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"` 6429 6430 // WebhookPayload: If the query was fulfilled by a webhook call, this 6431 // field is set to the value of the `payload` field returned in the 6432 // webhook response. 6433 WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"` 6434 6435 // WebhookSource: If the query was fulfilled by a webhook call, this 6436 // field is set to the value of the `source` field returned in the 6437 // webhook response. 6438 WebhookSource string `json:"webhookSource,omitempty"` 6439 6440 // ForceSendFields is a list of field names (e.g. "Action") to 6441 // unconditionally include in API requests. By default, fields with 6442 // empty values are omitted from API requests. However, any non-pointer, 6443 // non-interface field appearing in ForceSendFields will be sent to the 6444 // server regardless of whether the field is empty or not. This may be 6445 // used to include empty fields in Patch requests. 6446 ForceSendFields []string `json:"-"` 6447 6448 // NullFields is a list of field names (e.g. "Action") to include in API 6449 // requests with the JSON null value. By default, fields with empty 6450 // values are omitted from API requests. However, any field with an 6451 // empty value appearing in NullFields will be sent to the server as 6452 // null. It is an error if a field in this list has a non-empty value. 6453 // This may be used to include null fields in Patch requests. 6454 NullFields []string `json:"-"` 6455} 6456 6457func (s *GoogleCloudDialogflowV2QueryResult) MarshalJSON() ([]byte, error) { 6458 type NoMethod GoogleCloudDialogflowV2QueryResult 6459 raw := NoMethod(*s) 6460 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6461} 6462 6463func (s *GoogleCloudDialogflowV2QueryResult) UnmarshalJSON(data []byte) error { 6464 type NoMethod GoogleCloudDialogflowV2QueryResult 6465 var s1 struct { 6466 IntentDetectionConfidence gensupport.JSONFloat64 `json:"intentDetectionConfidence"` 6467 SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"` 6468 *NoMethod 6469 } 6470 s1.NoMethod = (*NoMethod)(s) 6471 if err := json.Unmarshal(data, &s1); err != nil { 6472 return err 6473 } 6474 s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence) 6475 s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence) 6476 return nil 6477} 6478 6479// GoogleCloudDialogflowV2Sentiment: The sentiment, such as 6480// positive/negative feeling or association, for a unit of analysis, 6481// such as the query text. 6482type GoogleCloudDialogflowV2Sentiment struct { 6483 // Magnitude: A non-negative number in the [0, +inf) range, which 6484 // represents the absolute magnitude of sentiment, regardless of score 6485 // (positive or negative). 6486 Magnitude float64 `json:"magnitude,omitempty"` 6487 6488 // Score: Sentiment score between -1.0 (negative sentiment) and 1.0 6489 // (positive sentiment). 6490 Score float64 `json:"score,omitempty"` 6491 6492 // ForceSendFields is a list of field names (e.g. "Magnitude") to 6493 // unconditionally include in API requests. By default, fields with 6494 // empty values are omitted from API requests. However, any non-pointer, 6495 // non-interface field appearing in ForceSendFields will be sent to the 6496 // server regardless of whether the field is empty or not. This may be 6497 // used to include empty fields in Patch requests. 6498 ForceSendFields []string `json:"-"` 6499 6500 // NullFields is a list of field names (e.g. "Magnitude") to include in 6501 // API requests with the JSON null value. By default, fields with empty 6502 // values are omitted from API requests. However, any field with an 6503 // empty value appearing in NullFields will be sent to the server as 6504 // null. It is an error if a field in this list has a non-empty value. 6505 // This may be used to include null fields in Patch requests. 6506 NullFields []string `json:"-"` 6507} 6508 6509func (s *GoogleCloudDialogflowV2Sentiment) MarshalJSON() ([]byte, error) { 6510 type NoMethod GoogleCloudDialogflowV2Sentiment 6511 raw := NoMethod(*s) 6512 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6513} 6514 6515func (s *GoogleCloudDialogflowV2Sentiment) UnmarshalJSON(data []byte) error { 6516 type NoMethod GoogleCloudDialogflowV2Sentiment 6517 var s1 struct { 6518 Magnitude gensupport.JSONFloat64 `json:"magnitude"` 6519 Score gensupport.JSONFloat64 `json:"score"` 6520 *NoMethod 6521 } 6522 s1.NoMethod = (*NoMethod)(s) 6523 if err := json.Unmarshal(data, &s1); err != nil { 6524 return err 6525 } 6526 s.Magnitude = float64(s1.Magnitude) 6527 s.Score = float64(s1.Score) 6528 return nil 6529} 6530 6531// GoogleCloudDialogflowV2SentimentAnalysisResult: The result of 6532// sentiment analysis. Sentiment analysis inspects user input and 6533// identifies the prevailing subjective opinion, especially to determine 6534// a user's attitude as positive, negative, or neutral. For 6535// Participants.DetectIntent, it needs to be configured in 6536// DetectIntentRequest.query_params. For 6537// Participants.StreamingDetectIntent, it needs to be configured in 6538// StreamingDetectIntentRequest.query_params. And for 6539// Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, 6540// it needs to be configured in 6541// ConversationProfile.human_agent_assistant_config 6542type GoogleCloudDialogflowV2SentimentAnalysisResult struct { 6543 // QueryTextSentiment: The sentiment analysis result for `query_text`. 6544 QueryTextSentiment *GoogleCloudDialogflowV2Sentiment `json:"queryTextSentiment,omitempty"` 6545 6546 // ForceSendFields is a list of field names (e.g. "QueryTextSentiment") 6547 // to unconditionally include in API requests. By default, fields with 6548 // empty values are omitted from API requests. However, any non-pointer, 6549 // non-interface field appearing in ForceSendFields will be sent to the 6550 // server regardless of whether the field is empty or not. This may be 6551 // used to include empty fields in Patch requests. 6552 ForceSendFields []string `json:"-"` 6553 6554 // NullFields is a list of field names (e.g. "QueryTextSentiment") to 6555 // include in API requests with the JSON null value. By default, fields 6556 // with empty values are omitted from API requests. However, any field 6557 // with an empty value appearing in NullFields will be sent to the 6558 // server as null. It is an error if a field in this list has a 6559 // non-empty value. This may be used to include null fields in Patch 6560 // requests. 6561 NullFields []string `json:"-"` 6562} 6563 6564func (s *GoogleCloudDialogflowV2SentimentAnalysisResult) MarshalJSON() ([]byte, error) { 6565 type NoMethod GoogleCloudDialogflowV2SentimentAnalysisResult 6566 raw := NoMethod(*s) 6567 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6568} 6569 6570// GoogleCloudDialogflowV2SessionEntityType: A session represents a 6571// conversation between a Dialogflow agent and an end-user. You can 6572// create special entities, called session entities, during a session. 6573// Session entities can extend or replace custom entity types and only 6574// exist during the session that they were created for. All session 6575// data, including session entities, is stored by Dialogflow for 20 6576// minutes. For more information, see the [session entity 6577// guide](https://cloud.google.com/dialogflow/docs/entities-session). 6578type GoogleCloudDialogflowV2SessionEntityType struct { 6579 // Entities: Required. The collection of entities associated with this 6580 // session entity type. 6581 Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"` 6582 6583 // EntityOverrideMode: Required. Indicates whether the additional data 6584 // should override or supplement the custom entity type definition. 6585 // 6586 // Possible values: 6587 // "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value 6588 // should be never used. 6589 // "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session 6590 // entities overrides the collection of entities in the corresponding 6591 // custom entity type. 6592 // "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session 6593 // entities extends the collection of entities in the corresponding 6594 // custom entity type. Note: Even in this override mode calls to 6595 // `ListSessionEntityTypes`, `GetSessionEntityType`, 6596 // `CreateSessionEntityType` and `UpdateSessionEntityType` only return 6597 // the additional entities added in this session entity type. If you 6598 // want to get the supplemented list, please call 6599 // EntityTypes.GetEntityType on the custom entity type and merge. 6600 EntityOverrideMode string `json:"entityOverrideMode,omitempty"` 6601 6602 // Name: Required. The unique identifier of this session entity type. 6603 // Format: `projects//agent/sessions//entityTypes/`, or 6604 // `projects//agent/environments//users//sessions//entityTypes/`. If 6605 // `Environment ID` is not specified, we assume default 'draft' 6606 // environment. If `User ID` is not specified, we assume default '-' 6607 // user. `` must be the display name of an existing entity type in the 6608 // same agent that will be overridden or supplemented. 6609 Name string `json:"name,omitempty"` 6610 6611 // ForceSendFields is a list of field names (e.g. "Entities") to 6612 // unconditionally include in API requests. By default, fields with 6613 // empty values are omitted from API requests. However, any non-pointer, 6614 // non-interface field appearing in ForceSendFields will be sent to the 6615 // server regardless of whether the field is empty or not. This may be 6616 // used to include empty fields in Patch requests. 6617 ForceSendFields []string `json:"-"` 6618 6619 // NullFields is a list of field names (e.g. "Entities") to include in 6620 // API requests with the JSON null value. By default, fields with empty 6621 // values are omitted from API requests. However, any field with an 6622 // empty value appearing in NullFields will be sent to the server as 6623 // null. It is an error if a field in this list has a non-empty value. 6624 // This may be used to include null fields in Patch requests. 6625 NullFields []string `json:"-"` 6626} 6627 6628func (s *GoogleCloudDialogflowV2SessionEntityType) MarshalJSON() ([]byte, error) { 6629 type NoMethod GoogleCloudDialogflowV2SessionEntityType 6630 raw := NoMethod(*s) 6631 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6632} 6633 6634// GoogleCloudDialogflowV2WebhookRequest: The request message for a 6635// webhook call. 6636type GoogleCloudDialogflowV2WebhookRequest struct { 6637 // OriginalDetectIntentRequest: Optional. The contents of the original 6638 // request that was passed to `[Streaming]DetectIntent` call. 6639 OriginalDetectIntentRequest *GoogleCloudDialogflowV2OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"` 6640 6641 // QueryResult: The result of the conversational query or event 6642 // processing. Contains the same value as 6643 // `[Streaming]DetectIntentResponse.query_result`. 6644 QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"` 6645 6646 // ResponseId: The unique identifier of the response. Contains the same 6647 // value as `[Streaming]DetectIntentResponse.response_id`. 6648 ResponseId string `json:"responseId,omitempty"` 6649 6650 // Session: The unique identifier of detectIntent request session. Can 6651 // be used to identify end-user inside webhook implementation. Format: 6652 // `projects//agent/sessions/`, or 6653 // `projects//agent/environments//users//sessions/`. 6654 Session string `json:"session,omitempty"` 6655 6656 // ForceSendFields is a list of field names (e.g. 6657 // "OriginalDetectIntentRequest") to unconditionally include in API 6658 // requests. By default, fields with empty values are omitted from API 6659 // requests. However, any non-pointer, non-interface field appearing in 6660 // ForceSendFields will be sent to the server regardless of whether the 6661 // field is empty or not. This may be used to include empty fields in 6662 // Patch requests. 6663 ForceSendFields []string `json:"-"` 6664 6665 // NullFields is a list of field names (e.g. 6666 // "OriginalDetectIntentRequest") to include in API requests with the 6667 // JSON null value. By default, fields with empty values are omitted 6668 // from API requests. However, any field with an empty value appearing 6669 // in NullFields will be sent to the server as null. It is an error if a 6670 // field in this list has a non-empty value. This may be used to include 6671 // null fields in Patch requests. 6672 NullFields []string `json:"-"` 6673} 6674 6675func (s *GoogleCloudDialogflowV2WebhookRequest) MarshalJSON() ([]byte, error) { 6676 type NoMethod GoogleCloudDialogflowV2WebhookRequest 6677 raw := NoMethod(*s) 6678 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6679} 6680 6681// GoogleCloudDialogflowV2WebhookResponse: The response message for a 6682// webhook call. This response is validated by the Dialogflow server. If 6683// validation fails, an error will be returned in the 6684// QueryResult.diagnostic_info field. Setting JSON fields to an empty 6685// value with the wrong type is a common error. To avoid this error: - 6686// Use "" for empty strings - Use `{}` or `null` for empty objects - 6687// Use `[]` or `null` for empty arrays For more information, see the 6688// [Protocol Buffers Language 6689// Guide](https://developers.google.com/protocol-buffers/docs/proto3#json 6690// ). 6691type GoogleCloudDialogflowV2WebhookResponse struct { 6692 // FollowupEventInput: Optional. Invokes the supplied events. When this 6693 // field is set, Dialogflow ignores the `fulfillment_text`, 6694 // `fulfillment_messages`, and `payload` fields. 6695 FollowupEventInput *GoogleCloudDialogflowV2EventInput `json:"followupEventInput,omitempty"` 6696 6697 // FulfillmentMessages: Optional. The rich response messages intended 6698 // for the end-user. When provided, Dialogflow uses this field to 6699 // populate QueryResult.fulfillment_messages sent to the integration or 6700 // API caller. 6701 FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"` 6702 6703 // FulfillmentText: Optional. The text response message intended for the 6704 // end-user. It is recommended to use 6705 // `fulfillment_messages.text.text[0]` instead. When provided, 6706 // Dialogflow uses this field to populate QueryResult.fulfillment_text 6707 // sent to the integration or API caller. 6708 FulfillmentText string `json:"fulfillmentText,omitempty"` 6709 6710 // OutputContexts: Optional. The collection of output contexts that will 6711 // overwrite currently active contexts for the session and reset their 6712 // lifespans. When provided, Dialogflow uses this field to populate 6713 // QueryResult.output_contexts sent to the integration or API caller. 6714 OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"` 6715 6716 // Payload: Optional. This field can be used to pass custom data from 6717 // your webhook to the integration or API caller. Arbitrary JSON objects 6718 // are supported. When provided, Dialogflow uses this field to populate 6719 // QueryResult.webhook_payload sent to the integration or API caller. 6720 // This field is also used by the [Google Assistant 6721 // integration](https://cloud.google.com/dialogflow/docs/integrations/aog 6722 // ) for rich response messages. See the format definition at [Google 6723 // Assistant Dialogflow webhook 6724 // format](https://developers.google.com/assistant/actions/build/json/dia 6725 // logflow-webhook-json) 6726 Payload googleapi.RawMessage `json:"payload,omitempty"` 6727 6728 // SessionEntityTypes: Optional. Additional session entity types to 6729 // replace or extend developer entity types with. The entity synonyms 6730 // apply to all languages and persist for the session. Setting this data 6731 // from a webhook overwrites the session entity types that have been set 6732 // using `detectIntent`, `streamingDetectIntent` or SessionEntityType 6733 // management methods. 6734 SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"` 6735 6736 // Source: Optional. A custom field used to identify the webhook source. 6737 // Arbitrary strings are supported. When provided, Dialogflow uses this 6738 // field to populate QueryResult.webhook_source sent to the integration 6739 // or API caller. 6740 Source string `json:"source,omitempty"` 6741 6742 // ForceSendFields is a list of field names (e.g. "FollowupEventInput") 6743 // to unconditionally include in API requests. By default, fields with 6744 // empty values are omitted from API requests. However, any non-pointer, 6745 // non-interface field appearing in ForceSendFields will be sent to the 6746 // server regardless of whether the field is empty or not. This may be 6747 // used to include empty fields in Patch requests. 6748 ForceSendFields []string `json:"-"` 6749 6750 // NullFields is a list of field names (e.g. "FollowupEventInput") to 6751 // include in API requests with the JSON null value. By default, fields 6752 // with empty values are omitted from API requests. However, any field 6753 // with an empty value appearing in NullFields will be sent to the 6754 // server as null. It is an error if a field in this list has a 6755 // non-empty value. This may be used to include null fields in Patch 6756 // requests. 6757 NullFields []string `json:"-"` 6758} 6759 6760func (s *GoogleCloudDialogflowV2WebhookResponse) MarshalJSON() ([]byte, error) { 6761 type NoMethod GoogleCloudDialogflowV2WebhookResponse 6762 raw := NoMethod(*s) 6763 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6764} 6765 6766// GoogleCloudDialogflowV2beta1AnnotatedConversationDataset: Represents 6767// an annotated conversation dataset. ConversationDataset can have 6768// multiple AnnotatedConversationDataset, each of them represents one 6769// result from one annotation task. AnnotatedConversationDataset can 6770// only be generated from annotation task, which will be triggered by 6771// LabelConversation. 6772type GoogleCloudDialogflowV2beta1AnnotatedConversationDataset struct { 6773 // CompletedExampleCount: Output only. Number of examples that have 6774 // annotations in the annotated conversation dataset. 6775 CompletedExampleCount int64 `json:"completedExampleCount,omitempty,string"` 6776 6777 // CreateTime: Output only. Creation time of this annotated conversation 6778 // dataset. 6779 CreateTime string `json:"createTime,omitempty"` 6780 6781 // Description: Optional. The description of the annotated conversation 6782 // dataset. Maximum of 10000 bytes. 6783 Description string `json:"description,omitempty"` 6784 6785 // DisplayName: Required. The display name of the annotated conversation 6786 // dataset. It's specified when user starts an annotation task. Maximum 6787 // of 64 bytes. 6788 DisplayName string `json:"displayName,omitempty"` 6789 6790 // ExampleCount: Output only. Number of examples in the annotated 6791 // conversation dataset. 6792 ExampleCount int64 `json:"exampleCount,omitempty,string"` 6793 6794 // Name: Output only. AnnotatedConversationDataset resource name. 6795 // Format: 6796 // `projects//conversationDatasets//annotatedConversationDatasets/` 6797 Name string `json:"name,omitempty"` 6798 6799 // QuestionTypeName: Output only. Question type name that identifies a 6800 // labeling task. A question is a single task that a worker answers. A 6801 // question type is set of related questions. Each question belongs to a 6802 // particular question type. It can be used in CrowdCompute UI to filter 6803 // and manage labeling tasks. 6804 QuestionTypeName string `json:"questionTypeName,omitempty"` 6805 6806 // ForceSendFields is a list of field names (e.g. 6807 // "CompletedExampleCount") to unconditionally include in API requests. 6808 // By default, fields with empty values are omitted from API requests. 6809 // However, any non-pointer, non-interface field appearing in 6810 // ForceSendFields will be sent to the server regardless of whether the 6811 // field is empty or not. This may be used to include empty fields in 6812 // Patch requests. 6813 ForceSendFields []string `json:"-"` 6814 6815 // NullFields is a list of field names (e.g. "CompletedExampleCount") to 6816 // include in API requests with the JSON null value. By default, fields 6817 // with empty values are omitted from API requests. However, any field 6818 // with an empty value appearing in NullFields will be sent to the 6819 // server as null. It is an error if a field in this list has a 6820 // non-empty value. This may be used to include null fields in Patch 6821 // requests. 6822 NullFields []string `json:"-"` 6823} 6824 6825func (s *GoogleCloudDialogflowV2beta1AnnotatedConversationDataset) MarshalJSON() ([]byte, error) { 6826 type NoMethod GoogleCloudDialogflowV2beta1AnnotatedConversationDataset 6827 raw := NoMethod(*s) 6828 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6829} 6830 6831// GoogleCloudDialogflowV2beta1AutoApproveSmartMessagingEntriesResponse: 6832// Response message for [Documents.AutoApproveSmartMessagingEntries]. 6833type GoogleCloudDialogflowV2beta1AutoApproveSmartMessagingEntriesResponse struct { 6834 // DisabledCount: Number of smart messaging entries disabled. 6835 DisabledCount int64 `json:"disabledCount,omitempty"` 6836 6837 // EnabledCount: Number of smart messaging entries enabled. 6838 EnabledCount int64 `json:"enabledCount,omitempty"` 6839 6840 // UnreviewedCount: Number of smart messaging entries unreviewed. 6841 UnreviewedCount int64 `json:"unreviewedCount,omitempty"` 6842 6843 // ForceSendFields is a list of field names (e.g. "DisabledCount") to 6844 // unconditionally include in API requests. By default, fields with 6845 // empty values are omitted from API requests. However, any non-pointer, 6846 // non-interface field appearing in ForceSendFields will be sent to the 6847 // server regardless of whether the field is empty or not. This may be 6848 // used to include empty fields in Patch requests. 6849 ForceSendFields []string `json:"-"` 6850 6851 // NullFields is a list of field names (e.g. "DisabledCount") to include 6852 // in API requests with the JSON null value. By default, fields with 6853 // empty values are omitted from API requests. However, any field with 6854 // an empty value appearing in NullFields will be sent to the server as 6855 // null. It is an error if a field in this list has a non-empty value. 6856 // This may be used to include null fields in Patch requests. 6857 NullFields []string `json:"-"` 6858} 6859 6860func (s *GoogleCloudDialogflowV2beta1AutoApproveSmartMessagingEntriesResponse) MarshalJSON() ([]byte, error) { 6861 type NoMethod GoogleCloudDialogflowV2beta1AutoApproveSmartMessagingEntriesResponse 6862 raw := NoMethod(*s) 6863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6864} 6865 6866// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse: The 6867// response message for EntityTypes.BatchUpdateEntityTypes. 6868type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse struct { 6869 // EntityTypes: The collection of updated or created entity types. 6870 EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"` 6871 6872 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 6873 // unconditionally include in API requests. By default, fields with 6874 // empty values are omitted from API requests. However, any non-pointer, 6875 // non-interface field appearing in ForceSendFields will be sent to the 6876 // server regardless of whether the field is empty or not. This may be 6877 // used to include empty fields in Patch requests. 6878 ForceSendFields []string `json:"-"` 6879 6880 // NullFields is a list of field names (e.g. "EntityTypes") to include 6881 // in API requests with the JSON null value. By default, fields with 6882 // empty values are omitted from API requests. However, any field with 6883 // an empty value appearing in NullFields will be sent to the server as 6884 // null. It is an error if a field in this list has a non-empty value. 6885 // This may be used to include null fields in Patch requests. 6886 NullFields []string `json:"-"` 6887} 6888 6889func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) { 6890 type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse 6891 raw := NoMethod(*s) 6892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6893} 6894 6895// GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse: The response 6896// message for Intents.BatchUpdateIntents. 6897type GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse struct { 6898 // Intents: The collection of updated or created intents. 6899 Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"` 6900 6901 // ForceSendFields is a list of field names (e.g. "Intents") to 6902 // unconditionally include in API requests. By default, fields with 6903 // empty values are omitted from API requests. However, any non-pointer, 6904 // non-interface field appearing in ForceSendFields will be sent to the 6905 // server regardless of whether the field is empty or not. This may be 6906 // used to include empty fields in Patch requests. 6907 ForceSendFields []string `json:"-"` 6908 6909 // NullFields is a list of field names (e.g. "Intents") to include in 6910 // API requests with the JSON null value. By default, fields with empty 6911 // values are omitted from API requests. However, any field with an 6912 // empty value appearing in NullFields will be sent to the server as 6913 // null. It is an error if a field in this list has a non-empty value. 6914 // This may be used to include null fields in Patch requests. 6915 NullFields []string `json:"-"` 6916} 6917 6918func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) { 6919 type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse 6920 raw := NoMethod(*s) 6921 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6922} 6923 6924// GoogleCloudDialogflowV2beta1BatchUpdateSmartMessagingEntriesResponse: 6925// Response message for [Documents.BatchUpdateSmartMessagingEntries] 6926type GoogleCloudDialogflowV2beta1BatchUpdateSmartMessagingEntriesResponse struct { 6927 // SmartMessagingEntries: List of updated smart message entries. 6928 SmartMessagingEntries []*GoogleCloudDialogflowV2beta1SmartMessagingEntry `json:"smartMessagingEntries,omitempty"` 6929 6930 // ForceSendFields is a list of field names (e.g. 6931 // "SmartMessagingEntries") to unconditionally include in API requests. 6932 // By default, fields with empty values are omitted from API requests. 6933 // However, any non-pointer, non-interface field appearing in 6934 // ForceSendFields will be sent to the server regardless of whether the 6935 // field is empty or not. This may be used to include empty fields in 6936 // Patch requests. 6937 ForceSendFields []string `json:"-"` 6938 6939 // NullFields is a list of field names (e.g. "SmartMessagingEntries") to 6940 // include in API requests with the JSON null value. By default, fields 6941 // with empty values are omitted from API requests. However, any field 6942 // with an empty value appearing in NullFields will be sent to the 6943 // server as null. It is an error if a field in this list has a 6944 // non-empty value. This may be used to include null fields in Patch 6945 // requests. 6946 NullFields []string `json:"-"` 6947} 6948 6949func (s *GoogleCloudDialogflowV2beta1BatchUpdateSmartMessagingEntriesResponse) MarshalJSON() ([]byte, error) { 6950 type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateSmartMessagingEntriesResponse 6951 raw := NoMethod(*s) 6952 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6953} 6954 6955// GoogleCloudDialogflowV2beta1Context: Dialogflow contexts are similar 6956// to natural language context. If a person says to you "they are 6957// orange", you need context in order to understand what "they" is 6958// referring to. Similarly, for Dialogflow to handle an end-user 6959// expression like that, it needs to be provided with context in order 6960// to correctly match an intent. Using contexts, you can control the 6961// flow of a conversation. You can configure contexts for an intent by 6962// setting input and output contexts, which are identified by string 6963// names. When an intent is matched, any configured output contexts for 6964// that intent become active. While any contexts are active, Dialogflow 6965// is more likely to match intents that are configured with input 6966// contexts that correspond to the currently active contexts. For more 6967// information about context, see the [Contexts 6968// guide](https://cloud.google.com/dialogflow/docs/contexts-overview). 6969type GoogleCloudDialogflowV2beta1Context struct { 6970 // LifespanCount: Optional. The number of conversational query requests 6971 // after which the context expires. The default is `0`. If set to `0`, 6972 // the context expires immediately. Contexts expire automatically after 6973 // 20 minutes if there are no matching queries. 6974 LifespanCount int64 `json:"lifespanCount,omitempty"` 6975 6976 // Name: Required. The unique identifier of the context. Supported 6977 // formats: - `projects//agent/sessions//contexts/`, - 6978 // `projects//locations//agent/sessions//contexts/`, - 6979 // `projects//agent/environments//users//sessions//contexts/`, - 6980 // `projects//locations//agent/environments//users//sessions//contexts/`, 6981 // The `Context ID` is always converted to lowercase, may only contain 6982 // characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If 6983 // `Environment ID` is not specified, we assume default 'draft' 6984 // environment. If `User ID` is not specified, we assume default '-' 6985 // user. The following context names are reserved for internal use by 6986 // Dialogflow. You should not use these contexts or create contexts with 6987 // these names: * `__system_counters__` * `*_id_dialog_context` * 6988 // `*_dialog_params_size` 6989 Name string `json:"name,omitempty"` 6990 6991 // Parameters: Optional. The collection of parameters associated with 6992 // this context. Depending on your protocol or client library language, 6993 // this is a map, associative array, symbol table, dictionary, or JSON 6994 // object composed of a collection of (MapKey, MapValue) pairs: - MapKey 6995 // type: string - MapKey value: parameter name - MapValue type: - If 6996 // parameter's entity type is a composite entity: map - Else: string or 6997 // number, depending on parameter value type - MapValue value: - If 6998 // parameter's entity type is a composite entity: map from composite 6999 // entity property names to property values - Else: parameter value 7000 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 7001 7002 // ForceSendFields is a list of field names (e.g. "LifespanCount") to 7003 // unconditionally include in API requests. By default, fields with 7004 // empty values are omitted from API requests. However, any non-pointer, 7005 // non-interface field appearing in ForceSendFields will be sent to the 7006 // server regardless of whether the field is empty or not. This may be 7007 // used to include empty fields in Patch requests. 7008 ForceSendFields []string `json:"-"` 7009 7010 // NullFields is a list of field names (e.g. "LifespanCount") to include 7011 // in API requests with the JSON null value. By default, fields with 7012 // empty values are omitted from API requests. However, any field with 7013 // an empty value appearing in NullFields will be sent to the server as 7014 // null. It is an error if a field in this list has a non-empty value. 7015 // This may be used to include null fields in Patch requests. 7016 NullFields []string `json:"-"` 7017} 7018 7019func (s *GoogleCloudDialogflowV2beta1Context) MarshalJSON() ([]byte, error) { 7020 type NoMethod GoogleCloudDialogflowV2beta1Context 7021 raw := NoMethod(*s) 7022 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7023} 7024 7025// GoogleCloudDialogflowV2beta1EntityType: Each intent parameter has a 7026// type, called the entity type, which dictates exactly how data from an 7027// end-user expression is extracted. Dialogflow provides predefined 7028// system entities that can match many common types of data. For 7029// example, there are system entities for matching dates, times, colors, 7030// email addresses, and so on. You can also create your own custom 7031// entities for matching custom data. For example, you could define a 7032// vegetable entity that can match the types of vegetables available for 7033// purchase with a grocery store agent. For more information, see the 7034// [Entity 7035// guide](https://cloud.google.com/dialogflow/docs/entities-overview). 7036type GoogleCloudDialogflowV2beta1EntityType struct { 7037 // AutoExpansionMode: Optional. Indicates whether the entity type can be 7038 // automatically expanded. 7039 // 7040 // Possible values: 7041 // "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the 7042 // entity. 7043 // "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values 7044 // that have not been explicitly listed in the entity. 7045 AutoExpansionMode string `json:"autoExpansionMode,omitempty"` 7046 7047 // DisplayName: Required. The name of the entity type. 7048 DisplayName string `json:"displayName,omitempty"` 7049 7050 // EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction 7051 // during classification. 7052 EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"` 7053 7054 // Entities: Optional. The collection of entity entries associated with 7055 // the entity type. 7056 Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"` 7057 7058 // Kind: Required. Indicates the kind of entity type. 7059 // 7060 // Possible values: 7061 // "KIND_UNSPECIFIED" - Not specified. This value should be never 7062 // used. 7063 // "KIND_MAP" - Map entity types allow mapping of a group of synonyms 7064 // to a reference value. 7065 // "KIND_LIST" - List entity types contain a set of entries that do 7066 // not map to reference values. However, list entity types can contain 7067 // references to other entity types (with or without aliases). 7068 // "KIND_REGEXP" - Regexp entity types allow to specify regular 7069 // expressions in entries values. 7070 Kind string `json:"kind,omitempty"` 7071 7072 // Name: The unique identifier of the entity type. Required for 7073 // EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes 7074 // methods. Supported formats: - `projects//agent/entityTypes/` - 7075 // `projects//locations//agent/entityTypes/` 7076 Name string `json:"name,omitempty"` 7077 7078 // ForceSendFields is a list of field names (e.g. "AutoExpansionMode") 7079 // to unconditionally include in API requests. By default, fields with 7080 // empty values are omitted from API requests. However, any non-pointer, 7081 // non-interface field appearing in ForceSendFields will be sent to the 7082 // server regardless of whether the field is empty or not. This may be 7083 // used to include empty fields in Patch requests. 7084 ForceSendFields []string `json:"-"` 7085 7086 // NullFields is a list of field names (e.g. "AutoExpansionMode") to 7087 // include in API requests with the JSON null value. By default, fields 7088 // with empty values are omitted from API requests. However, any field 7089 // with an empty value appearing in NullFields will be sent to the 7090 // server as null. It is an error if a field in this list has a 7091 // non-empty value. This may be used to include null fields in Patch 7092 // requests. 7093 NullFields []string `json:"-"` 7094} 7095 7096func (s *GoogleCloudDialogflowV2beta1EntityType) MarshalJSON() ([]byte, error) { 7097 type NoMethod GoogleCloudDialogflowV2beta1EntityType 7098 raw := NoMethod(*s) 7099 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7100} 7101 7102// GoogleCloudDialogflowV2beta1EntityTypeEntity: An **entity entry** for 7103// an associated entity type. 7104type GoogleCloudDialogflowV2beta1EntityTypeEntity struct { 7105 // Synonyms: Required. A collection of value synonyms. For example, if 7106 // the entity type is *vegetable*, and `value` is *scallions*, a synonym 7107 // could be *green onions*. For `KIND_LIST` entity types: * This 7108 // collection must contain exactly one synonym equal to `value`. 7109 Synonyms []string `json:"synonyms,omitempty"` 7110 7111 // Value: Required. The primary value associated with this entity entry. 7112 // For example, if the entity type is *vegetable*, the value could be 7113 // *scallions*. For `KIND_MAP` entity types: * A reference value to be 7114 // used in place of synonyms. For `KIND_LIST` entity types: * A string 7115 // that can contain references to other entity types (with or without 7116 // aliases). 7117 Value string `json:"value,omitempty"` 7118 7119 // ForceSendFields is a list of field names (e.g. "Synonyms") to 7120 // unconditionally include in API requests. By default, fields with 7121 // empty values are omitted from API requests. However, any non-pointer, 7122 // non-interface field appearing in ForceSendFields will be sent to the 7123 // server regardless of whether the field is empty or not. This may be 7124 // used to include empty fields in Patch requests. 7125 ForceSendFields []string `json:"-"` 7126 7127 // NullFields is a list of field names (e.g. "Synonyms") to include in 7128 // API requests with the JSON null value. By default, fields with empty 7129 // values are omitted from API requests. However, any field with an 7130 // empty value appearing in NullFields will be sent to the server as 7131 // null. It is an error if a field in this list has a non-empty value. 7132 // This may be used to include null fields in Patch requests. 7133 NullFields []string `json:"-"` 7134} 7135 7136func (s *GoogleCloudDialogflowV2beta1EntityTypeEntity) MarshalJSON() ([]byte, error) { 7137 type NoMethod GoogleCloudDialogflowV2beta1EntityTypeEntity 7138 raw := NoMethod(*s) 7139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7140} 7141 7142// GoogleCloudDialogflowV2beta1EventInput: Events allow for matching 7143// intents by event name instead of the natural language input. For 7144// instance, input `` can trigger a personalized welcome response. The 7145// parameter `name` may be used by the agent in the response: "Hello 7146// #welcome_event.name! What can I do for you today?". 7147type GoogleCloudDialogflowV2beta1EventInput struct { 7148 // LanguageCode: Required. The language of this query. See [Language 7149 // Support](https://cloud.google.com/dialogflow/docs/reference/language) 7150 // for a list of the currently supported language codes. Note that 7151 // queries in the same session do not necessarily need to specify the 7152 // same language. 7153 LanguageCode string `json:"languageCode,omitempty"` 7154 7155 // Name: Required. The unique identifier of the event. 7156 Name string `json:"name,omitempty"` 7157 7158 // Parameters: The collection of parameters associated with the event. 7159 // Depending on your protocol or client library language, this is a map, 7160 // associative array, symbol table, dictionary, or JSON object composed 7161 // of a collection of (MapKey, MapValue) pairs: - MapKey type: string - 7162 // MapKey value: parameter name - MapValue type: - If parameter's entity 7163 // type is a composite entity: map - Else: string or number, depending 7164 // on parameter value type - MapValue value: - If parameter's entity 7165 // type is a composite entity: map from composite entity property names 7166 // to property values - Else: parameter value 7167 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 7168 7169 // ForceSendFields is a list of field names (e.g. "LanguageCode") to 7170 // unconditionally include in API requests. By default, fields with 7171 // empty values are omitted from API requests. However, any non-pointer, 7172 // non-interface field appearing in ForceSendFields will be sent to the 7173 // server regardless of whether the field is empty or not. This may be 7174 // used to include empty fields in Patch requests. 7175 ForceSendFields []string `json:"-"` 7176 7177 // NullFields is a list of field names (e.g. "LanguageCode") to include 7178 // in API requests with the JSON null value. By default, fields with 7179 // empty values are omitted from API requests. However, any field with 7180 // an empty value appearing in NullFields will be sent to the server as 7181 // null. It is an error if a field in this list has a non-empty value. 7182 // This may be used to include null fields in Patch requests. 7183 NullFields []string `json:"-"` 7184} 7185 7186func (s *GoogleCloudDialogflowV2beta1EventInput) MarshalJSON() ([]byte, error) { 7187 type NoMethod GoogleCloudDialogflowV2beta1EventInput 7188 raw := NoMethod(*s) 7189 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7190} 7191 7192// GoogleCloudDialogflowV2beta1ExportAgentResponse: The response message 7193// for Agents.ExportAgent. 7194type GoogleCloudDialogflowV2beta1ExportAgentResponse struct { 7195 // AgentContent: Zip compressed raw byte content for agent. 7196 AgentContent string `json:"agentContent,omitempty"` 7197 7198 // AgentUri: The URI to a file containing the exported agent. This field 7199 // is populated only if `agent_uri` is specified in 7200 // `ExportAgentRequest`. 7201 AgentUri string `json:"agentUri,omitempty"` 7202 7203 // ForceSendFields is a list of field names (e.g. "AgentContent") to 7204 // unconditionally include in API requests. By default, fields with 7205 // empty values are omitted from API requests. However, any non-pointer, 7206 // non-interface field appearing in ForceSendFields will be sent to the 7207 // server regardless of whether the field is empty or not. This may be 7208 // used to include empty fields in Patch requests. 7209 ForceSendFields []string `json:"-"` 7210 7211 // NullFields is a list of field names (e.g. "AgentContent") to include 7212 // in API requests with the JSON null value. By default, fields with 7213 // empty values are omitted from API requests. However, any field with 7214 // an empty value appearing in NullFields will be sent to the server as 7215 // null. It is an error if a field in this list has a non-empty value. 7216 // This may be used to include null fields in Patch requests. 7217 NullFields []string `json:"-"` 7218} 7219 7220func (s *GoogleCloudDialogflowV2beta1ExportAgentResponse) MarshalJSON() ([]byte, error) { 7221 type NoMethod GoogleCloudDialogflowV2beta1ExportAgentResponse 7222 raw := NoMethod(*s) 7223 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7224} 7225 7226// GoogleCloudDialogflowV2beta1ImportDocumentsResponse: Response message 7227// for Documents.ImportDocuments. 7228type GoogleCloudDialogflowV2beta1ImportDocumentsResponse struct { 7229 // Warnings: Includes details about skipped documents or any other 7230 // warnings. 7231 Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` 7232 7233 // ForceSendFields is a list of field names (e.g. "Warnings") to 7234 // unconditionally include in API requests. By default, fields with 7235 // empty values are omitted from API requests. However, any non-pointer, 7236 // non-interface field appearing in ForceSendFields will be sent to the 7237 // server regardless of whether the field is empty or not. This may be 7238 // used to include empty fields in Patch requests. 7239 ForceSendFields []string `json:"-"` 7240 7241 // NullFields is a list of field names (e.g. "Warnings") to include in 7242 // API requests with the JSON null value. By default, fields with empty 7243 // values are omitted from API requests. However, any field with an 7244 // empty value appearing in NullFields will be sent to the server as 7245 // null. It is an error if a field in this list has a non-empty value. 7246 // This may be used to include null fields in Patch requests. 7247 NullFields []string `json:"-"` 7248} 7249 7250func (s *GoogleCloudDialogflowV2beta1ImportDocumentsResponse) MarshalJSON() ([]byte, error) { 7251 type NoMethod GoogleCloudDialogflowV2beta1ImportDocumentsResponse 7252 raw := NoMethod(*s) 7253 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7254} 7255 7256// GoogleCloudDialogflowV2beta1Intent: An intent categorizes an 7257// end-user's intention for one conversation turn. For each agent, you 7258// define many intents, where your combined intents can handle a 7259// complete conversation. When an end-user writes or says something, 7260// referred to as an end-user expression or end-user input, Dialogflow 7261// matches the end-user input to the best intent in your agent. Matching 7262// an intent is also known as intent classification. For more 7263// information, see the [intent 7264// guide](https://cloud.google.com/dialogflow/docs/intents-overview). 7265type GoogleCloudDialogflowV2beta1Intent struct { 7266 // Action: Optional. The name of the action associated with the intent. 7267 // Note: The action name must not contain whitespaces. 7268 Action string `json:"action,omitempty"` 7269 7270 // DefaultResponsePlatforms: Optional. The list of platforms for which 7271 // the first responses will be copied from the messages in 7272 // PLATFORM_UNSPECIFIED (i.e. default platform). 7273 // 7274 // Possible values: 7275 // "PLATFORM_UNSPECIFIED" - Not specified. 7276 // "FACEBOOK" - Facebook. 7277 // "SLACK" - Slack. 7278 // "TELEGRAM" - Telegram. 7279 // "KIK" - Kik. 7280 // "SKYPE" - Skype. 7281 // "LINE" - Line. 7282 // "VIBER" - Viber. 7283 // "ACTIONS_ON_GOOGLE" - Google Assistant See [Dialogflow webhook 7284 // format](https://developers.google.com/assistant/actions/build/json/dia 7285 // logflow-webhook-json) 7286 // "TELEPHONY" - Telephony Gateway. 7287 // "GOOGLE_HANGOUTS" - Google Hangouts. 7288 DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"` 7289 7290 // DisplayName: Required. The name of this intent. 7291 DisplayName string `json:"displayName,omitempty"` 7292 7293 // EndInteraction: Optional. Indicates that this intent ends an 7294 // interaction. Some integrations (e.g., Actions on Google or Dialogflow 7295 // phone gateway) use this information to close interaction with an end 7296 // user. Default is false. 7297 EndInteraction bool `json:"endInteraction,omitempty"` 7298 7299 // Events: Optional. The collection of event names that trigger the 7300 // intent. If the collection of input contexts is not empty, all of the 7301 // contexts must be present in the active user session for an event to 7302 // trigger this intent. Event names are limited to 150 characters. 7303 Events []string `json:"events,omitempty"` 7304 7305 // FollowupIntentInfo: Output only. Information about all followup 7306 // intents that have this intent as a direct or indirect parent. We 7307 // populate this field only in the output. 7308 FollowupIntentInfo []*GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"` 7309 7310 // InputContextNames: Optional. The list of context names required for 7311 // this intent to be triggered. Formats: - 7312 // `projects//agent/sessions/-/contexts/` - 7313 // `projects//locations//agent/sessions/-/contexts/` 7314 InputContextNames []string `json:"inputContextNames,omitempty"` 7315 7316 // IsFallback: Optional. Indicates whether this is a fallback intent. 7317 IsFallback bool `json:"isFallback,omitempty"` 7318 7319 // Messages: Optional. The collection of rich messages corresponding to 7320 // the `Response` field in the Dialogflow console. 7321 Messages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"messages,omitempty"` 7322 7323 // MlDisabled: Optional. Indicates whether Machine Learning is disabled 7324 // for the intent. Note: If `ml_disabled` setting is set to true, then 7325 // this intent is not taken into account during inference in `ML ONLY` 7326 // match mode. Also, auto-markup in the UI is turned off. 7327 MlDisabled bool `json:"mlDisabled,omitempty"` 7328 7329 // MlEnabled: Optional. Indicates whether Machine Learning is enabled 7330 // for the intent. Note: If `ml_enabled` setting is set to false, then 7331 // this intent is not taken into account during inference in `ML ONLY` 7332 // match mode. Also, auto-markup in the UI is turned off. DEPRECATED! 7333 // Please use `ml_disabled` field instead. NOTE: If both `ml_enabled` 7334 // and `ml_disabled` are either not set or false, then the default value 7335 // is determined as follows: - Before April 15th, 2018 the default is: 7336 // ml_enabled = false / ml_disabled = true. - After April 15th, 2018 the 7337 // default is: ml_enabled = true / ml_disabled = false. 7338 MlEnabled bool `json:"mlEnabled,omitempty"` 7339 7340 // Name: Optional. The unique identifier of this intent. Required for 7341 // Intents.UpdateIntent and Intents.BatchUpdateIntents methods. 7342 // Supported formats: - `projects//agent/intents/` - 7343 // `projects//locations//agent/intents/` 7344 Name string `json:"name,omitempty"` 7345 7346 // OutputContexts: Optional. The collection of contexts that are 7347 // activated when the intent is matched. Context messages in this 7348 // collection should not set the parameters field. Setting the 7349 // `lifespan_count` to 0 will reset the context when the intent is 7350 // matched. Format: `projects//agent/sessions/-/contexts/`. 7351 OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"` 7352 7353 // Parameters: Optional. The collection of parameters associated with 7354 // the intent. 7355 Parameters []*GoogleCloudDialogflowV2beta1IntentParameter `json:"parameters,omitempty"` 7356 7357 // ParentFollowupIntentName: Optional. The unique identifier of the 7358 // parent intent in the chain of followup intents. You can set this 7359 // field when creating an intent, for example with CreateIntent or 7360 // BatchUpdateIntents, in order to make this intent a followup intent. 7361 // It identifies the parent followup intent. Format: 7362 // `projects//agent/intents/`. 7363 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 7364 7365 // Priority: Optional. The priority of this intent. Higher numbers 7366 // represent higher priorities. - If the supplied value is unspecified 7367 // or 0, the service translates the value to 500,000, which corresponds 7368 // to the `Normal` priority in the console. - If the supplied value is 7369 // negative, the intent is ignored in runtime detect intent requests. 7370 Priority int64 `json:"priority,omitempty"` 7371 7372 // ResetContexts: Optional. Indicates whether to delete all contexts in 7373 // the current session when this intent is matched. 7374 ResetContexts bool `json:"resetContexts,omitempty"` 7375 7376 // RootFollowupIntentName: Output only. The unique identifier of the 7377 // root intent in the chain of followup intents. It identifies the 7378 // correct followup intents chain for this intent. Format: 7379 // `projects//agent/intents/`. 7380 RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"` 7381 7382 // TrainingPhrases: Optional. The collection of examples that the agent 7383 // is trained on. 7384 TrainingPhrases []*GoogleCloudDialogflowV2beta1IntentTrainingPhrase `json:"trainingPhrases,omitempty"` 7385 7386 // WebhookState: Optional. Indicates whether webhooks are enabled for 7387 // the intent. 7388 // 7389 // Possible values: 7390 // "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and 7391 // in the intent. 7392 // "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in 7393 // the intent. 7394 // "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in 7395 // the agent and in the intent. Also, each slot filling prompt is 7396 // forwarded to the webhook. 7397 WebhookState string `json:"webhookState,omitempty"` 7398 7399 // ForceSendFields is a list of field names (e.g. "Action") to 7400 // unconditionally include in API requests. By default, fields with 7401 // empty values are omitted from API requests. However, any non-pointer, 7402 // non-interface field appearing in ForceSendFields will be sent to the 7403 // server regardless of whether the field is empty or not. This may be 7404 // used to include empty fields in Patch requests. 7405 ForceSendFields []string `json:"-"` 7406 7407 // NullFields is a list of field names (e.g. "Action") to include in API 7408 // requests with the JSON null value. By default, fields with empty 7409 // values are omitted from API requests. However, any field with an 7410 // empty value appearing in NullFields will be sent to the server as 7411 // null. It is an error if a field in this list has a non-empty value. 7412 // This may be used to include null fields in Patch requests. 7413 NullFields []string `json:"-"` 7414} 7415 7416func (s *GoogleCloudDialogflowV2beta1Intent) MarshalJSON() ([]byte, error) { 7417 type NoMethod GoogleCloudDialogflowV2beta1Intent 7418 raw := NoMethod(*s) 7419 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7420} 7421 7422// GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo: Represents a 7423// single followup intent in the chain. 7424type GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo struct { 7425 // FollowupIntentName: The unique identifier of the followup intent. 7426 // Format: `projects//agent/intents/`. 7427 FollowupIntentName string `json:"followupIntentName,omitempty"` 7428 7429 // ParentFollowupIntentName: The unique identifier of the followup 7430 // intent's parent. Format: `projects//agent/intents/`. 7431 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 7432 7433 // ForceSendFields is a list of field names (e.g. "FollowupIntentName") 7434 // to unconditionally include in API requests. By default, fields with 7435 // empty values are omitted from API requests. However, any non-pointer, 7436 // non-interface field appearing in ForceSendFields will be sent to the 7437 // server regardless of whether the field is empty or not. This may be 7438 // used to include empty fields in Patch requests. 7439 ForceSendFields []string `json:"-"` 7440 7441 // NullFields is a list of field names (e.g. "FollowupIntentName") to 7442 // include in API requests with the JSON null value. By default, fields 7443 // with empty values are omitted from API requests. However, any field 7444 // with an empty value appearing in NullFields will be sent to the 7445 // server as null. It is an error if a field in this list has a 7446 // non-empty value. This may be used to include null fields in Patch 7447 // requests. 7448 NullFields []string `json:"-"` 7449} 7450 7451func (s *GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) { 7452 type NoMethod GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo 7453 raw := NoMethod(*s) 7454 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7455} 7456 7457// GoogleCloudDialogflowV2beta1IntentMessage: Corresponds to the 7458// `Response` field in the Dialogflow console. 7459type GoogleCloudDialogflowV2beta1IntentMessage struct { 7460 // BasicCard: Displays a basic card for Actions on Google. 7461 BasicCard *GoogleCloudDialogflowV2beta1IntentMessageBasicCard `json:"basicCard,omitempty"` 7462 7463 // BrowseCarouselCard: Browse carousel card for Actions on Google. 7464 BrowseCarouselCard *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"` 7465 7466 // Card: Displays a card. 7467 Card *GoogleCloudDialogflowV2beta1IntentMessageCard `json:"card,omitempty"` 7468 7469 // CarouselSelect: Displays a carousel card for Actions on Google. 7470 CarouselSelect *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect `json:"carouselSelect,omitempty"` 7471 7472 // Image: Displays an image. 7473 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 7474 7475 // LinkOutSuggestion: Displays a link out suggestion chip for Actions on 7476 // Google. 7477 LinkOutSuggestion *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"` 7478 7479 // ListSelect: Displays a list card for Actions on Google. 7480 ListSelect *GoogleCloudDialogflowV2beta1IntentMessageListSelect `json:"listSelect,omitempty"` 7481 7482 // MediaContent: The media content card for Actions on Google. 7483 MediaContent *GoogleCloudDialogflowV2beta1IntentMessageMediaContent `json:"mediaContent,omitempty"` 7484 7485 // Payload: A custom platform-specific response. 7486 Payload googleapi.RawMessage `json:"payload,omitempty"` 7487 7488 // Platform: Optional. The platform that this message is intended for. 7489 // 7490 // Possible values: 7491 // "PLATFORM_UNSPECIFIED" - Not specified. 7492 // "FACEBOOK" - Facebook. 7493 // "SLACK" - Slack. 7494 // "TELEGRAM" - Telegram. 7495 // "KIK" - Kik. 7496 // "SKYPE" - Skype. 7497 // "LINE" - Line. 7498 // "VIBER" - Viber. 7499 // "ACTIONS_ON_GOOGLE" - Google Assistant See [Dialogflow webhook 7500 // format](https://developers.google.com/assistant/actions/build/json/dia 7501 // logflow-webhook-json) 7502 // "TELEPHONY" - Telephony Gateway. 7503 // "GOOGLE_HANGOUTS" - Google Hangouts. 7504 Platform string `json:"platform,omitempty"` 7505 7506 // QuickReplies: Displays quick replies. 7507 QuickReplies *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies `json:"quickReplies,omitempty"` 7508 7509 // RbmCarouselRichCard: Rich Business Messaging (RBM) carousel rich card 7510 // response. 7511 RbmCarouselRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard `json:"rbmCarouselRichCard,omitempty"` 7512 7513 // RbmStandaloneRichCard: Standalone Rich Business Messaging (RBM) rich 7514 // card response. 7515 RbmStandaloneRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard `json:"rbmStandaloneRichCard,omitempty"` 7516 7517 // RbmText: Rich Business Messaging (RBM) text response. RBM allows 7518 // businesses to send enriched and branded versions of SMS. See 7519 // https://jibe.google.com/business-messaging. 7520 RbmText *GoogleCloudDialogflowV2beta1IntentMessageRbmText `json:"rbmText,omitempty"` 7521 7522 // SimpleResponses: Returns a voice or text-only response for Actions on 7523 // Google. 7524 SimpleResponses *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses `json:"simpleResponses,omitempty"` 7525 7526 // Suggestions: Displays suggestion chips for Actions on Google. 7527 Suggestions *GoogleCloudDialogflowV2beta1IntentMessageSuggestions `json:"suggestions,omitempty"` 7528 7529 // TableCard: Table card for Actions on Google. 7530 TableCard *GoogleCloudDialogflowV2beta1IntentMessageTableCard `json:"tableCard,omitempty"` 7531 7532 // TelephonyPlayAudio: Plays audio from a file in Telephony Gateway. 7533 TelephonyPlayAudio *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio `json:"telephonyPlayAudio,omitempty"` 7534 7535 // TelephonySynthesizeSpeech: Synthesizes speech in Telephony Gateway. 7536 TelephonySynthesizeSpeech *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech `json:"telephonySynthesizeSpeech,omitempty"` 7537 7538 // TelephonyTransferCall: Transfers the call in Telephony Gateway. 7539 TelephonyTransferCall *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall `json:"telephonyTransferCall,omitempty"` 7540 7541 // Text: Returns a text response. 7542 Text *GoogleCloudDialogflowV2beta1IntentMessageText `json:"text,omitempty"` 7543 7544 // ForceSendFields is a list of field names (e.g. "BasicCard") to 7545 // unconditionally include in API requests. By default, fields with 7546 // empty values are omitted from API requests. However, any non-pointer, 7547 // non-interface field appearing in ForceSendFields will be sent to the 7548 // server regardless of whether the field is empty or not. This may be 7549 // used to include empty fields in Patch requests. 7550 ForceSendFields []string `json:"-"` 7551 7552 // NullFields is a list of field names (e.g. "BasicCard") to include in 7553 // API requests with the JSON null value. By default, fields with empty 7554 // values are omitted from API requests. However, any field with an 7555 // empty value appearing in NullFields will be sent to the server as 7556 // null. It is an error if a field in this list has a non-empty value. 7557 // This may be used to include null fields in Patch requests. 7558 NullFields []string `json:"-"` 7559} 7560 7561func (s *GoogleCloudDialogflowV2beta1IntentMessage) MarshalJSON() ([]byte, error) { 7562 type NoMethod GoogleCloudDialogflowV2beta1IntentMessage 7563 raw := NoMethod(*s) 7564 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7565} 7566 7567// GoogleCloudDialogflowV2beta1IntentMessageBasicCard: The basic card 7568// message. Useful for displaying information. 7569type GoogleCloudDialogflowV2beta1IntentMessageBasicCard struct { 7570 // Buttons: Optional. The collection of card buttons. 7571 Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"` 7572 7573 // FormattedText: Required, unless image is present. The body text of 7574 // the card. 7575 FormattedText string `json:"formattedText,omitempty"` 7576 7577 // Image: Optional. The image for the card. 7578 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 7579 7580 // Subtitle: Optional. The subtitle of the card. 7581 Subtitle string `json:"subtitle,omitempty"` 7582 7583 // Title: Optional. The title of the card. 7584 Title string `json:"title,omitempty"` 7585 7586 // ForceSendFields is a list of field names (e.g. "Buttons") to 7587 // unconditionally include in API requests. By default, fields with 7588 // empty values are omitted from API requests. However, any non-pointer, 7589 // non-interface field appearing in ForceSendFields will be sent to the 7590 // server regardless of whether the field is empty or not. This may be 7591 // used to include empty fields in Patch requests. 7592 ForceSendFields []string `json:"-"` 7593 7594 // NullFields is a list of field names (e.g. "Buttons") to include in 7595 // API requests with the JSON null value. By default, fields with empty 7596 // values are omitted from API requests. However, any field with an 7597 // empty value appearing in NullFields will be sent to the server as 7598 // null. It is an error if a field in this list has a non-empty value. 7599 // This may be used to include null fields in Patch requests. 7600 NullFields []string `json:"-"` 7601} 7602 7603func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCard) MarshalJSON() ([]byte, error) { 7604 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCard 7605 raw := NoMethod(*s) 7606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7607} 7608 7609// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton: The button 7610// object that appears at the bottom of a card. 7611type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton struct { 7612 // OpenUriAction: Required. Action to take when a user taps on the 7613 // button. 7614 OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"` 7615 7616 // Title: Required. The title of the button. 7617 Title string `json:"title,omitempty"` 7618 7619 // ForceSendFields is a list of field names (e.g. "OpenUriAction") to 7620 // unconditionally include in API requests. By default, fields with 7621 // empty values are omitted from API requests. However, any non-pointer, 7622 // non-interface field appearing in ForceSendFields will be sent to the 7623 // server regardless of whether the field is empty or not. This may be 7624 // used to include empty fields in Patch requests. 7625 ForceSendFields []string `json:"-"` 7626 7627 // NullFields is a list of field names (e.g. "OpenUriAction") to include 7628 // in API requests with the JSON null value. By default, fields with 7629 // empty values are omitted from API requests. However, any field with 7630 // an empty value appearing in NullFields will be sent to the server as 7631 // null. It is an error if a field in this list has a non-empty value. 7632 // This may be used to include null fields in Patch requests. 7633 NullFields []string `json:"-"` 7634} 7635 7636func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) { 7637 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton 7638 raw := NoMethod(*s) 7639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7640} 7641 7642// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction: 7643// Opens the given URI. 7644type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction struct { 7645 // Uri: Required. The HTTP or HTTPS scheme URI. 7646 Uri string `json:"uri,omitempty"` 7647 7648 // ForceSendFields is a list of field names (e.g. "Uri") to 7649 // unconditionally include in API requests. By default, fields with 7650 // empty values are omitted from API requests. However, any non-pointer, 7651 // non-interface field appearing in ForceSendFields will be sent to the 7652 // server regardless of whether the field is empty or not. This may be 7653 // used to include empty fields in Patch requests. 7654 ForceSendFields []string `json:"-"` 7655 7656 // NullFields is a list of field names (e.g. "Uri") to include in API 7657 // requests with the JSON null value. By default, fields with empty 7658 // values are omitted from API requests. However, any field with an 7659 // empty value appearing in NullFields will be sent to the server as 7660 // null. It is an error if a field in this list has a non-empty value. 7661 // This may be used to include null fields in Patch requests. 7662 NullFields []string `json:"-"` 7663} 7664 7665func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) { 7666 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction 7667 raw := NoMethod(*s) 7668 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7669} 7670 7671// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard: Browse 7672// Carousel Card for Actions on Google. 7673// https://developers.google.com/actions/assistant/responses#browsing_carousel 7674type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard struct { 7675 // ImageDisplayOptions: Optional. Settings for displaying the image. 7676 // Applies to every image in items. 7677 // 7678 // Possible values: 7679 // "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the 7680 // image and the image container with gray bars. 7681 // "GRAY" - Fill the gaps between the image and the image container 7682 // with gray bars. 7683 // "WHITE" - Fill the gaps between the image and the image container 7684 // with white bars. 7685 // "CROPPED" - Image is scaled such that the image width and height 7686 // match or exceed the container dimensions. This may crop the top and 7687 // bottom of the image if the scaled image height is greater than the 7688 // container height, or crop the left and right of the image if the 7689 // scaled image width is greater than the container width. This is 7690 // similar to "Zoom Mode" on a widescreen TV when playing a 4:3 video. 7691 // "BLURRED_BACKGROUND" - Pad the gaps between image and image frame 7692 // with a blurred copy of the same image. 7693 ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"` 7694 7695 // Items: Required. List of items in the Browse Carousel Card. Minimum 7696 // of two items, maximum of ten. 7697 Items []*GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"` 7698 7699 // ForceSendFields is a list of field names (e.g. "ImageDisplayOptions") 7700 // to unconditionally include in API requests. By default, fields with 7701 // empty values are omitted from API requests. However, any non-pointer, 7702 // non-interface field appearing in ForceSendFields will be sent to the 7703 // server regardless of whether the field is empty or not. This may be 7704 // used to include empty fields in Patch requests. 7705 ForceSendFields []string `json:"-"` 7706 7707 // NullFields is a list of field names (e.g. "ImageDisplayOptions") to 7708 // include in API requests with the JSON null value. By default, fields 7709 // with empty values are omitted from API requests. However, any field 7710 // with an empty value appearing in NullFields will be sent to the 7711 // server as null. It is an error if a field in this list has a 7712 // non-empty value. This may be used to include null fields in Patch 7713 // requests. 7714 NullFields []string `json:"-"` 7715} 7716 7717func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) { 7718 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard 7719 raw := NoMethod(*s) 7720 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7721} 7722 7723// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou 7724// selCardItem: Browsing carousel tile 7725type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct { 7726 // Description: Optional. Description of the carousel item. Maximum of 7727 // four lines of text. 7728 Description string `json:"description,omitempty"` 7729 7730 // Footer: Optional. Text that appears at the bottom of the Browse 7731 // Carousel Card. Maximum of one line of text. 7732 Footer string `json:"footer,omitempty"` 7733 7734 // Image: Optional. Hero image for the carousel item. 7735 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 7736 7737 // OpenUriAction: Required. Action to present to the user. 7738 OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"` 7739 7740 // Title: Required. Title of the carousel item. Maximum of two lines of 7741 // text. 7742 Title string `json:"title,omitempty"` 7743 7744 // ForceSendFields is a list of field names (e.g. "Description") to 7745 // unconditionally include in API requests. By default, fields with 7746 // empty values are omitted from API requests. However, any non-pointer, 7747 // non-interface field appearing in ForceSendFields will be sent to the 7748 // server regardless of whether the field is empty or not. This may be 7749 // used to include empty fields in Patch requests. 7750 ForceSendFields []string `json:"-"` 7751 7752 // NullFields is a list of field names (e.g. "Description") to include 7753 // in API requests with the JSON null value. By default, fields with 7754 // empty values are omitted from API requests. However, any field with 7755 // an empty value appearing in NullFields will be sent to the server as 7756 // null. It is an error if a field in this list has a non-empty value. 7757 // This may be used to include null fields in Patch requests. 7758 NullFields []string `json:"-"` 7759} 7760 7761func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) { 7762 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem 7763 raw := NoMethod(*s) 7764 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7765} 7766 7767// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou 7768// selCardItemOpenUrlAction: Actions on Google action to open a given 7769// url. 7770type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct { 7771 // Url: Required. URL 7772 Url string `json:"url,omitempty"` 7773 7774 // UrlTypeHint: Optional. Specifies the type of viewer that is used when 7775 // opening the URL. Defaults to opening via web browser. 7776 // 7777 // Possible values: 7778 // "URL_TYPE_HINT_UNSPECIFIED" - Unspecified 7779 // "AMP_ACTION" - Url would be an amp action 7780 // "AMP_CONTENT" - URL that points directly to AMP content, or to a 7781 // canonical URL which refers to AMP content via . 7782 UrlTypeHint string `json:"urlTypeHint,omitempty"` 7783 7784 // ForceSendFields is a list of field names (e.g. "Url") to 7785 // unconditionally include in API requests. By default, fields with 7786 // empty values are omitted from API requests. However, any non-pointer, 7787 // non-interface field appearing in ForceSendFields will be sent to the 7788 // server regardless of whether the field is empty or not. This may be 7789 // used to include empty fields in Patch requests. 7790 ForceSendFields []string `json:"-"` 7791 7792 // NullFields is a list of field names (e.g. "Url") to include in API 7793 // requests with the JSON null value. By default, fields with empty 7794 // values are omitted from API requests. However, any field with an 7795 // empty value appearing in NullFields will be sent to the server as 7796 // null. It is an error if a field in this list has a non-empty value. 7797 // This may be used to include null fields in Patch requests. 7798 NullFields []string `json:"-"` 7799} 7800 7801func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) { 7802 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction 7803 raw := NoMethod(*s) 7804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7805} 7806 7807// GoogleCloudDialogflowV2beta1IntentMessageCard: The card response 7808// message. 7809type GoogleCloudDialogflowV2beta1IntentMessageCard struct { 7810 // Buttons: Optional. The collection of card buttons. 7811 Buttons []*GoogleCloudDialogflowV2beta1IntentMessageCardButton `json:"buttons,omitempty"` 7812 7813 // ImageUri: Optional. The public URI to an image file for the card. 7814 ImageUri string `json:"imageUri,omitempty"` 7815 7816 // Subtitle: Optional. The subtitle of the card. 7817 Subtitle string `json:"subtitle,omitempty"` 7818 7819 // Title: Optional. The title of the card. 7820 Title string `json:"title,omitempty"` 7821 7822 // ForceSendFields is a list of field names (e.g. "Buttons") to 7823 // unconditionally include in API requests. By default, fields with 7824 // empty values are omitted from API requests. However, any non-pointer, 7825 // non-interface field appearing in ForceSendFields will be sent to the 7826 // server regardless of whether the field is empty or not. This may be 7827 // used to include empty fields in Patch requests. 7828 ForceSendFields []string `json:"-"` 7829 7830 // NullFields is a list of field names (e.g. "Buttons") to include in 7831 // API requests with the JSON null value. By default, fields with empty 7832 // values are omitted from API requests. However, any field with an 7833 // empty value appearing in NullFields will be sent to the server as 7834 // null. It is an error if a field in this list has a non-empty value. 7835 // This may be used to include null fields in Patch requests. 7836 NullFields []string `json:"-"` 7837} 7838 7839func (s *GoogleCloudDialogflowV2beta1IntentMessageCard) MarshalJSON() ([]byte, error) { 7840 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCard 7841 raw := NoMethod(*s) 7842 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7843} 7844 7845// GoogleCloudDialogflowV2beta1IntentMessageCardButton: Optional. 7846// Contains information about a button. 7847type GoogleCloudDialogflowV2beta1IntentMessageCardButton struct { 7848 // Postback: Optional. The text to send back to the Dialogflow API or a 7849 // URI to open. 7850 Postback string `json:"postback,omitempty"` 7851 7852 // Text: Optional. The text to show on the button. 7853 Text string `json:"text,omitempty"` 7854 7855 // ForceSendFields is a list of field names (e.g. "Postback") to 7856 // unconditionally include in API requests. By default, fields with 7857 // empty values are omitted from API requests. However, any non-pointer, 7858 // non-interface field appearing in ForceSendFields will be sent to the 7859 // server regardless of whether the field is empty or not. This may be 7860 // used to include empty fields in Patch requests. 7861 ForceSendFields []string `json:"-"` 7862 7863 // NullFields is a list of field names (e.g. "Postback") to include in 7864 // API requests with the JSON null value. By default, fields with empty 7865 // values are omitted from API requests. However, any field with an 7866 // empty value appearing in NullFields will be sent to the server as 7867 // null. It is an error if a field in this list has a non-empty value. 7868 // This may be used to include null fields in Patch requests. 7869 NullFields []string `json:"-"` 7870} 7871 7872func (s *GoogleCloudDialogflowV2beta1IntentMessageCardButton) MarshalJSON() ([]byte, error) { 7873 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCardButton 7874 raw := NoMethod(*s) 7875 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7876} 7877 7878// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect: The card for 7879// presenting a carousel of options to select from. 7880type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect struct { 7881 // Items: Required. Carousel items. 7882 Items []*GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem `json:"items,omitempty"` 7883 7884 // ForceSendFields is a list of field names (e.g. "Items") to 7885 // unconditionally include in API requests. By default, fields with 7886 // empty values are omitted from API requests. However, any non-pointer, 7887 // non-interface field appearing in ForceSendFields will be sent to the 7888 // server regardless of whether the field is empty or not. This may be 7889 // used to include empty fields in Patch requests. 7890 ForceSendFields []string `json:"-"` 7891 7892 // NullFields is a list of field names (e.g. "Items") to include in API 7893 // requests with the JSON null value. By default, fields with empty 7894 // values are omitted from API requests. However, any field with an 7895 // empty value appearing in NullFields will be sent to the server as 7896 // null. It is an error if a field in this list has a non-empty value. 7897 // This may be used to include null fields in Patch requests. 7898 NullFields []string `json:"-"` 7899} 7900 7901func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) { 7902 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect 7903 raw := NoMethod(*s) 7904 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7905} 7906 7907// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem: An item 7908// in the carousel. 7909type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem struct { 7910 // Description: Optional. The body text of the card. 7911 Description string `json:"description,omitempty"` 7912 7913 // Image: Optional. The image to display. 7914 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 7915 7916 // Info: Required. Additional info about the option item. 7917 Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"` 7918 7919 // Title: Required. Title of the carousel item. 7920 Title string `json:"title,omitempty"` 7921 7922 // ForceSendFields is a list of field names (e.g. "Description") to 7923 // unconditionally include in API requests. By default, fields with 7924 // empty values are omitted from API requests. However, any non-pointer, 7925 // non-interface field appearing in ForceSendFields will be sent to the 7926 // server regardless of whether the field is empty or not. This may be 7927 // used to include empty fields in Patch requests. 7928 ForceSendFields []string `json:"-"` 7929 7930 // NullFields is a list of field names (e.g. "Description") to include 7931 // in API requests with the JSON null value. By default, fields with 7932 // empty values are omitted from API requests. However, any field with 7933 // an empty value appearing in NullFields will be sent to the server as 7934 // null. It is an error if a field in this list has a non-empty value. 7935 // This may be used to include null fields in Patch requests. 7936 NullFields []string `json:"-"` 7937} 7938 7939func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) { 7940 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem 7941 raw := NoMethod(*s) 7942 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7943} 7944 7945// GoogleCloudDialogflowV2beta1IntentMessageColumnProperties: Column 7946// properties for TableCard. 7947type GoogleCloudDialogflowV2beta1IntentMessageColumnProperties struct { 7948 // Header: Required. Column heading. 7949 Header string `json:"header,omitempty"` 7950 7951 // HorizontalAlignment: Optional. Defines text alignment for all cells 7952 // in this column. 7953 // 7954 // Possible values: 7955 // "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading 7956 // edge of the column. 7957 // "LEADING" - Text is aligned to the leading edge of the column. 7958 // "CENTER" - Text is centered in the column. 7959 // "TRAILING" - Text is aligned to the trailing edge of the column. 7960 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 7961 7962 // ForceSendFields is a list of field names (e.g. "Header") to 7963 // unconditionally include in API requests. By default, fields with 7964 // empty values are omitted from API requests. However, any non-pointer, 7965 // non-interface field appearing in ForceSendFields will be sent to the 7966 // server regardless of whether the field is empty or not. This may be 7967 // used to include empty fields in Patch requests. 7968 ForceSendFields []string `json:"-"` 7969 7970 // NullFields is a list of field names (e.g. "Header") to include in API 7971 // requests with the JSON null value. By default, fields with empty 7972 // values are omitted from API requests. However, any field with an 7973 // empty value appearing in NullFields will be sent to the server as 7974 // null. It is an error if a field in this list has a non-empty value. 7975 // This may be used to include null fields in Patch requests. 7976 NullFields []string `json:"-"` 7977} 7978 7979func (s *GoogleCloudDialogflowV2beta1IntentMessageColumnProperties) MarshalJSON() ([]byte, error) { 7980 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageColumnProperties 7981 raw := NoMethod(*s) 7982 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7983} 7984 7985// GoogleCloudDialogflowV2beta1IntentMessageImage: The image response 7986// message. 7987type GoogleCloudDialogflowV2beta1IntentMessageImage struct { 7988 // AccessibilityText: A text description of the image to be used for 7989 // accessibility, e.g., screen readers. Required if image_uri is set for 7990 // CarouselSelect. 7991 AccessibilityText string `json:"accessibilityText,omitempty"` 7992 7993 // ImageUri: Optional. The public URI to an image file. 7994 ImageUri string `json:"imageUri,omitempty"` 7995 7996 // ForceSendFields is a list of field names (e.g. "AccessibilityText") 7997 // to unconditionally include in API requests. By default, fields with 7998 // empty values are omitted from API requests. However, any non-pointer, 7999 // non-interface field appearing in ForceSendFields will be sent to the 8000 // server regardless of whether the field is empty or not. This may be 8001 // used to include empty fields in Patch requests. 8002 ForceSendFields []string `json:"-"` 8003 8004 // NullFields is a list of field names (e.g. "AccessibilityText") to 8005 // include in API requests with the JSON null value. By default, fields 8006 // with empty values are omitted from API requests. However, any field 8007 // with an empty value appearing in NullFields will be sent to the 8008 // server as null. It is an error if a field in this list has a 8009 // non-empty value. This may be used to include null fields in Patch 8010 // requests. 8011 NullFields []string `json:"-"` 8012} 8013 8014func (s *GoogleCloudDialogflowV2beta1IntentMessageImage) MarshalJSON() ([]byte, error) { 8015 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageImage 8016 raw := NoMethod(*s) 8017 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8018} 8019 8020// GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion: The 8021// suggestion chip message that allows the user to jump out to the app 8022// or website associated with this agent. 8023type GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion struct { 8024 // DestinationName: Required. The name of the app or site this chip is 8025 // linking to. 8026 DestinationName string `json:"destinationName,omitempty"` 8027 8028 // Uri: Required. The URI of the app or site to open when the user taps 8029 // the suggestion chip. 8030 Uri string `json:"uri,omitempty"` 8031 8032 // ForceSendFields is a list of field names (e.g. "DestinationName") to 8033 // unconditionally include in API requests. By default, fields with 8034 // empty values are omitted from API requests. However, any non-pointer, 8035 // non-interface field appearing in ForceSendFields will be sent to the 8036 // server regardless of whether the field is empty or not. This may be 8037 // used to include empty fields in Patch requests. 8038 ForceSendFields []string `json:"-"` 8039 8040 // NullFields is a list of field names (e.g. "DestinationName") to 8041 // include in API requests with the JSON null value. By default, fields 8042 // with empty values are omitted from API requests. However, any field 8043 // with an empty value appearing in NullFields will be sent to the 8044 // server as null. It is an error if a field in this list has a 8045 // non-empty value. This may be used to include null fields in Patch 8046 // requests. 8047 NullFields []string `json:"-"` 8048} 8049 8050func (s *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) { 8051 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion 8052 raw := NoMethod(*s) 8053 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8054} 8055 8056// GoogleCloudDialogflowV2beta1IntentMessageListSelect: The card for 8057// presenting a list of options to select from. 8058type GoogleCloudDialogflowV2beta1IntentMessageListSelect struct { 8059 // Items: Required. List items. 8060 Items []*GoogleCloudDialogflowV2beta1IntentMessageListSelectItem `json:"items,omitempty"` 8061 8062 // Subtitle: Optional. Subtitle of the list. 8063 Subtitle string `json:"subtitle,omitempty"` 8064 8065 // Title: Optional. The overall title of the list. 8066 Title string `json:"title,omitempty"` 8067 8068 // ForceSendFields is a list of field names (e.g. "Items") to 8069 // unconditionally include in API requests. By default, fields with 8070 // empty values are omitted from API requests. However, any non-pointer, 8071 // non-interface field appearing in ForceSendFields will be sent to the 8072 // server regardless of whether the field is empty or not. This may be 8073 // used to include empty fields in Patch requests. 8074 ForceSendFields []string `json:"-"` 8075 8076 // NullFields is a list of field names (e.g. "Items") to include in API 8077 // requests with the JSON null value. By default, fields with empty 8078 // values are omitted from API requests. However, any field with an 8079 // empty value appearing in NullFields will be sent to the server as 8080 // null. It is an error if a field in this list has a non-empty value. 8081 // This may be used to include null fields in Patch requests. 8082 NullFields []string `json:"-"` 8083} 8084 8085func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelect) MarshalJSON() ([]byte, error) { 8086 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelect 8087 raw := NoMethod(*s) 8088 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8089} 8090 8091// GoogleCloudDialogflowV2beta1IntentMessageListSelectItem: An item in 8092// the list. 8093type GoogleCloudDialogflowV2beta1IntentMessageListSelectItem struct { 8094 // Description: Optional. The main text describing the item. 8095 Description string `json:"description,omitempty"` 8096 8097 // Image: Optional. The image to display. 8098 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 8099 8100 // Info: Required. Additional information about this option. 8101 Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"` 8102 8103 // Title: Required. The title of the list item. 8104 Title string `json:"title,omitempty"` 8105 8106 // ForceSendFields is a list of field names (e.g. "Description") to 8107 // unconditionally include in API requests. By default, fields with 8108 // empty values are omitted from API requests. However, any non-pointer, 8109 // non-interface field appearing in ForceSendFields will be sent to the 8110 // server regardless of whether the field is empty or not. This may be 8111 // used to include empty fields in Patch requests. 8112 ForceSendFields []string `json:"-"` 8113 8114 // NullFields is a list of field names (e.g. "Description") to include 8115 // in API requests with the JSON null value. By default, fields with 8116 // empty values are omitted from API requests. However, any field with 8117 // an empty value appearing in NullFields will be sent to the server as 8118 // null. It is an error if a field in this list has a non-empty value. 8119 // This may be used to include null fields in Patch requests. 8120 NullFields []string `json:"-"` 8121} 8122 8123func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelectItem) MarshalJSON() ([]byte, error) { 8124 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelectItem 8125 raw := NoMethod(*s) 8126 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8127} 8128 8129// GoogleCloudDialogflowV2beta1IntentMessageMediaContent: The media 8130// content card for Actions on Google. 8131type GoogleCloudDialogflowV2beta1IntentMessageMediaContent struct { 8132 // MediaObjects: Required. List of media objects. 8133 MediaObjects []*GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"` 8134 8135 // MediaType: Optional. What type of media is the content (ie "audio"). 8136 // 8137 // Possible values: 8138 // "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified. 8139 // "AUDIO" - Response media type is audio. 8140 MediaType string `json:"mediaType,omitempty"` 8141 8142 // ForceSendFields is a list of field names (e.g. "MediaObjects") to 8143 // unconditionally include in API requests. By default, fields with 8144 // empty values are omitted from API requests. However, any non-pointer, 8145 // non-interface field appearing in ForceSendFields will be sent to the 8146 // server regardless of whether the field is empty or not. This may be 8147 // used to include empty fields in Patch requests. 8148 ForceSendFields []string `json:"-"` 8149 8150 // NullFields is a list of field names (e.g. "MediaObjects") to include 8151 // in API requests with the JSON null value. By default, fields with 8152 // empty values are omitted from API requests. However, any field with 8153 // an empty value appearing in NullFields will be sent to the server as 8154 // null. It is an error if a field in this list has a non-empty value. 8155 // This may be used to include null fields in Patch requests. 8156 NullFields []string `json:"-"` 8157} 8158 8159func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContent) MarshalJSON() ([]byte, error) { 8160 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContent 8161 raw := NoMethod(*s) 8162 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8163} 8164 8165// GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObje 8166// ct: Response media object for media content card. 8167type GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject struct { 8168 // ContentUrl: Required. Url where the media is stored. 8169 ContentUrl string `json:"contentUrl,omitempty"` 8170 8171 // Description: Optional. Description of media card. 8172 Description string `json:"description,omitempty"` 8173 8174 // Icon: Optional. Icon to display above media content. 8175 Icon *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"icon,omitempty"` 8176 8177 // LargeImage: Optional. Image to display above media content. 8178 LargeImage *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"largeImage,omitempty"` 8179 8180 // Name: Required. Name of media card. 8181 Name string `json:"name,omitempty"` 8182 8183 // ForceSendFields is a list of field names (e.g. "ContentUrl") to 8184 // unconditionally include in API requests. By default, fields with 8185 // empty values are omitted from API requests. However, any non-pointer, 8186 // non-interface field appearing in ForceSendFields will be sent to the 8187 // server regardless of whether the field is empty or not. This may be 8188 // used to include empty fields in Patch requests. 8189 ForceSendFields []string `json:"-"` 8190 8191 // NullFields is a list of field names (e.g. "ContentUrl") to include in 8192 // API requests with the JSON null value. By default, fields with empty 8193 // values are omitted from API requests. However, any field with an 8194 // empty value appearing in NullFields will be sent to the server as 8195 // null. It is an error if a field in this list has a non-empty value. 8196 // This may be used to include null fields in Patch requests. 8197 NullFields []string `json:"-"` 8198} 8199 8200func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) { 8201 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject 8202 raw := NoMethod(*s) 8203 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8204} 8205 8206// GoogleCloudDialogflowV2beta1IntentMessageQuickReplies: The quick 8207// replies response message. 8208type GoogleCloudDialogflowV2beta1IntentMessageQuickReplies struct { 8209 // QuickReplies: Optional. The collection of quick replies. 8210 QuickReplies []string `json:"quickReplies,omitempty"` 8211 8212 // Title: Optional. The title of the collection of quick replies. 8213 Title string `json:"title,omitempty"` 8214 8215 // ForceSendFields is a list of field names (e.g. "QuickReplies") to 8216 // unconditionally include in API requests. By default, fields with 8217 // empty values are omitted from API requests. However, any non-pointer, 8218 // non-interface field appearing in ForceSendFields will be sent to the 8219 // server regardless of whether the field is empty or not. This may be 8220 // used to include empty fields in Patch requests. 8221 ForceSendFields []string `json:"-"` 8222 8223 // NullFields is a list of field names (e.g. "QuickReplies") to include 8224 // in API requests with the JSON null value. By default, fields with 8225 // empty values are omitted from API requests. However, any field with 8226 // an empty value appearing in NullFields will be sent to the server as 8227 // null. It is an error if a field in this list has a non-empty value. 8228 // This may be used to include null fields in Patch requests. 8229 NullFields []string `json:"-"` 8230} 8231 8232func (s *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies) MarshalJSON() ([]byte, error) { 8233 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageQuickReplies 8234 raw := NoMethod(*s) 8235 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8236} 8237 8238// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent: Rich 8239// Business Messaging (RBM) Card content 8240type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent struct { 8241 // Description: Optional. Description of the card (at most 2000 bytes). 8242 // At least one of the title, description or media must be set. 8243 Description string `json:"description,omitempty"` 8244 8245 // Media: Optional. However at least one of the title, description or 8246 // media must be set. Media (image, GIF or a video) to include in the 8247 // card. 8248 Media *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia `json:"media,omitempty"` 8249 8250 // Suggestions: Optional. List of suggestions to include in the card. 8251 Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"suggestions,omitempty"` 8252 8253 // Title: Optional. Title of the card (at most 200 bytes). At least one 8254 // of the title, description or media must be set. 8255 Title string `json:"title,omitempty"` 8256 8257 // ForceSendFields is a list of field names (e.g. "Description") to 8258 // unconditionally include in API requests. By default, fields with 8259 // empty values are omitted from API requests. However, any non-pointer, 8260 // non-interface field appearing in ForceSendFields will be sent to the 8261 // server regardless of whether the field is empty or not. This may be 8262 // used to include empty fields in Patch requests. 8263 ForceSendFields []string `json:"-"` 8264 8265 // NullFields is a list of field names (e.g. "Description") to include 8266 // in API requests with the JSON null value. By default, fields with 8267 // empty values are omitted from API requests. However, any field with 8268 // an empty value appearing in NullFields will be sent to the server as 8269 // null. It is an error if a field in this list has a non-empty value. 8270 // This may be used to include null fields in Patch requests. 8271 NullFields []string `json:"-"` 8272} 8273 8274func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent) MarshalJSON() ([]byte, error) { 8275 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent 8276 raw := NoMethod(*s) 8277 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8278} 8279 8280// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia: Rich 8281// Business Messaging (RBM) Media displayed in Cards The following 8282// media-types are currently supported: Image Types * image/jpeg * 8283// image/jpg' * image/gif * image/png Video Types * video/h263 * 8284// video/m4v * video/mp4 * video/mpeg * video/mpeg4 * video/webm 8285type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia struct { 8286 // FileUri: Required. Publicly reachable URI of the file. The RBM 8287 // platform determines the MIME type of the file from the content-type 8288 // field in the HTTP headers when the platform fetches the file. The 8289 // content-type field must be present and accurate in the HTTP response 8290 // from the URL. 8291 FileUri string `json:"fileUri,omitempty"` 8292 8293 // Height: Required for cards with vertical orientation. The height of 8294 // the media within a rich card with a vertical layout. For a standalone 8295 // card with horizontal layout, height is not customizable, and this 8296 // field is ignored. 8297 // 8298 // Possible values: 8299 // "HEIGHT_UNSPECIFIED" - Not specified. 8300 // "SHORT" - 112 DP. 8301 // "MEDIUM" - 168 DP. 8302 // "TALL" - 264 DP. Not available for rich card carousels when the 8303 // card width is set to small. 8304 Height string `json:"height,omitempty"` 8305 8306 // ThumbnailUri: Optional. Publicly reachable URI of the thumbnail.If 8307 // you don't provide a thumbnail URI, the RBM platform displays a blank 8308 // placeholder thumbnail until the user's device downloads the file. 8309 // Depending on the user's setting, the file may not download 8310 // automatically and may require the user to tap a download button. 8311 ThumbnailUri string `json:"thumbnailUri,omitempty"` 8312 8313 // ForceSendFields is a list of field names (e.g. "FileUri") to 8314 // unconditionally include in API requests. By default, fields with 8315 // empty values are omitted from API requests. However, any non-pointer, 8316 // non-interface field appearing in ForceSendFields will be sent to the 8317 // server regardless of whether the field is empty or not. This may be 8318 // used to include empty fields in Patch requests. 8319 ForceSendFields []string `json:"-"` 8320 8321 // NullFields is a list of field names (e.g. "FileUri") to include in 8322 // API requests with the JSON null value. By default, fields with empty 8323 // values are omitted from API requests. However, any field with an 8324 // empty value appearing in NullFields will be sent to the server as 8325 // null. It is an error if a field in this list has a non-empty value. 8326 // This may be used to include null fields in Patch requests. 8327 NullFields []string `json:"-"` 8328} 8329 8330func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia) MarshalJSON() ([]byte, error) { 8331 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia 8332 raw := NoMethod(*s) 8333 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8334} 8335 8336// GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard: Carousel 8337// Rich Business Messaging (RBM) rich card. Rich cards allow you to 8338// respond to users with more vivid content, e.g. with media and 8339// suggestions. If you want to show a single card with more control over 8340// the layout, please use RbmStandaloneCard instead. 8341type GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard struct { 8342 // CardContents: Required. The cards in the carousel. A carousel must 8343 // have at least 2 cards and at most 10. 8344 CardContents []*GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContents,omitempty"` 8345 8346 // CardWidth: Required. The width of the cards in the carousel. 8347 // 8348 // Possible values: 8349 // "CARD_WIDTH_UNSPECIFIED" - Not specified. 8350 // "SMALL" - 120 DP. Note that tall media cannot be used. 8351 // "MEDIUM" - 232 DP. 8352 CardWidth string `json:"cardWidth,omitempty"` 8353 8354 // ForceSendFields is a list of field names (e.g. "CardContents") to 8355 // unconditionally include in API requests. By default, fields with 8356 // empty values are omitted from API requests. However, any non-pointer, 8357 // non-interface field appearing in ForceSendFields will be sent to the 8358 // server regardless of whether the field is empty or not. This may be 8359 // used to include empty fields in Patch requests. 8360 ForceSendFields []string `json:"-"` 8361 8362 // NullFields is a list of field names (e.g. "CardContents") to include 8363 // in API requests with the JSON null value. By default, fields with 8364 // empty values are omitted from API requests. However, any field with 8365 // an empty value appearing in NullFields will be sent to the server as 8366 // null. It is an error if a field in this list has a non-empty value. 8367 // This may be used to include null fields in Patch requests. 8368 NullFields []string `json:"-"` 8369} 8370 8371func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard) MarshalJSON() ([]byte, error) { 8372 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard 8373 raw := NoMethod(*s) 8374 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8375} 8376 8377// GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard: 8378// Standalone Rich Business Messaging (RBM) rich card. Rich cards allow 8379// you to respond to users with more vivid content, e.g. with media and 8380// suggestions. You can group multiple rich cards into one using 8381// RbmCarouselCard but carousel cards will give you less control over 8382// the card layout. 8383type GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard struct { 8384 // CardContent: Required. Card content. 8385 CardContent *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContent,omitempty"` 8386 8387 // CardOrientation: Required. Orientation of the card. 8388 // 8389 // Possible values: 8390 // "CARD_ORIENTATION_UNSPECIFIED" - Not specified. 8391 // "HORIZONTAL" - Horizontal layout. 8392 // "VERTICAL" - Vertical layout. 8393 CardOrientation string `json:"cardOrientation,omitempty"` 8394 8395 // ThumbnailImageAlignment: Required if orientation is horizontal. Image 8396 // preview alignment for standalone cards with horizontal layout. 8397 // 8398 // Possible values: 8399 // "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED" - Not specified. 8400 // "LEFT" - Thumbnail preview is left-aligned. 8401 // "RIGHT" - Thumbnail preview is right-aligned. 8402 ThumbnailImageAlignment string `json:"thumbnailImageAlignment,omitempty"` 8403 8404 // ForceSendFields is a list of field names (e.g. "CardContent") to 8405 // unconditionally include in API requests. By default, fields with 8406 // empty values are omitted from API requests. However, any non-pointer, 8407 // non-interface field appearing in ForceSendFields will be sent to the 8408 // server regardless of whether the field is empty or not. This may be 8409 // used to include empty fields in Patch requests. 8410 ForceSendFields []string `json:"-"` 8411 8412 // NullFields is a list of field names (e.g. "CardContent") to include 8413 // in API requests with the JSON null value. By default, fields with 8414 // empty values are omitted from API requests. However, any field with 8415 // an empty value appearing in NullFields will be sent to the server as 8416 // null. It is an error if a field in this list has a non-empty value. 8417 // This may be used to include null fields in Patch requests. 8418 NullFields []string `json:"-"` 8419} 8420 8421func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard) MarshalJSON() ([]byte, error) { 8422 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard 8423 raw := NoMethod(*s) 8424 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8425} 8426 8427// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction: Rich 8428// Business Messaging (RBM) suggested client-side action that the user 8429// can choose from the card. 8430type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction struct { 8431 // Dial: Suggested client side action: Dial a phone number 8432 Dial *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial `json:"dial,omitempty"` 8433 8434 // OpenUrl: Suggested client side action: Open a URI on device 8435 OpenUrl *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri `json:"openUrl,omitempty"` 8436 8437 // PostbackData: Opaque payload that the Dialogflow receives in a user 8438 // event when the user taps the suggested action. This data will be also 8439 // forwarded to webhook to allow performing custom business logic. 8440 PostbackData string `json:"postbackData,omitempty"` 8441 8442 // ShareLocation: Suggested client side action: Share user location 8443 ShareLocation *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation `json:"shareLocation,omitempty"` 8444 8445 // Text: Text to display alongside the action. 8446 Text string `json:"text,omitempty"` 8447 8448 // ForceSendFields is a list of field names (e.g. "Dial") to 8449 // unconditionally include in API requests. By default, fields with 8450 // empty values are omitted from API requests. However, any non-pointer, 8451 // non-interface field appearing in ForceSendFields will be sent to the 8452 // server regardless of whether the field is empty or not. This may be 8453 // used to include empty fields in Patch requests. 8454 ForceSendFields []string `json:"-"` 8455 8456 // NullFields is a list of field names (e.g. "Dial") to include in API 8457 // requests with the JSON null value. By default, fields with empty 8458 // values are omitted from API requests. However, any field with an 8459 // empty value appearing in NullFields will be sent to the server as 8460 // null. It is an error if a field in this list has a non-empty value. 8461 // This may be used to include null fields in Patch requests. 8462 NullFields []string `json:"-"` 8463} 8464 8465func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction) MarshalJSON() ([]byte, error) { 8466 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction 8467 raw := NoMethod(*s) 8468 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8469} 8470 8471// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste 8472// dActionDial: Opens the user's default dialer app with the specified 8473// phone number but does not dial automatically. 8474type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial struct { 8475 // PhoneNumber: Required. The phone number to fill in the default dialer 8476 // app. This field should be in 8477 // [E.164](https://en.wikipedia.org/wiki/E.164) format. An example of a 8478 // correctly formatted phone number: +15556767888. 8479 PhoneNumber string `json:"phoneNumber,omitempty"` 8480 8481 // ForceSendFields is a list of field names (e.g. "PhoneNumber") to 8482 // unconditionally include in API requests. By default, fields with 8483 // empty values are omitted from API requests. However, any non-pointer, 8484 // non-interface field appearing in ForceSendFields will be sent to the 8485 // server regardless of whether the field is empty or not. This may be 8486 // used to include empty fields in Patch requests. 8487 ForceSendFields []string `json:"-"` 8488 8489 // NullFields is a list of field names (e.g. "PhoneNumber") to include 8490 // in API requests with the JSON null value. By default, fields with 8491 // empty values are omitted from API requests. However, any field with 8492 // an empty value appearing in NullFields will be sent to the server as 8493 // null. It is an error if a field in this list has a non-empty value. 8494 // This may be used to include null fields in Patch requests. 8495 NullFields []string `json:"-"` 8496} 8497 8498func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial) MarshalJSON() ([]byte, error) { 8499 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial 8500 raw := NoMethod(*s) 8501 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8502} 8503 8504// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste 8505// dActionOpenUri: Opens the user's default web browser app to the 8506// specified uri If the user has an app installed that is registered as 8507// the default handler for the URL, then this app will be opened 8508// instead, and its icon will be used in the suggested action UI. 8509type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri struct { 8510 // Uri: Required. The uri to open on the user device 8511 Uri string `json:"uri,omitempty"` 8512 8513 // ForceSendFields is a list of field names (e.g. "Uri") to 8514 // unconditionally include in API requests. By default, fields with 8515 // empty values are omitted from API requests. However, any non-pointer, 8516 // non-interface field appearing in ForceSendFields will be sent to the 8517 // server regardless of whether the field is empty or not. This may be 8518 // used to include empty fields in Patch requests. 8519 ForceSendFields []string `json:"-"` 8520 8521 // NullFields is a list of field names (e.g. "Uri") to include in API 8522 // requests with the JSON null value. By default, fields with empty 8523 // values are omitted from API requests. However, any field with an 8524 // empty value appearing in NullFields will be sent to the server as 8525 // null. It is an error if a field in this list has a non-empty value. 8526 // This may be used to include null fields in Patch requests. 8527 NullFields []string `json:"-"` 8528} 8529 8530func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri) MarshalJSON() ([]byte, error) { 8531 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri 8532 raw := NoMethod(*s) 8533 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8534} 8535 8536// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste 8537// dActionShareLocation: Opens the device's location chooser so the user 8538// can pick a location to send back to the agent. 8539type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation struct { 8540} 8541 8542// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply: Rich 8543// Business Messaging (RBM) suggested reply that the user can click 8544// instead of typing in their own response. 8545type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply struct { 8546 // PostbackData: Opaque payload that the Dialogflow receives in a user 8547 // event when the user taps the suggested reply. This data will be also 8548 // forwarded to webhook to allow performing custom business logic. 8549 PostbackData string `json:"postbackData,omitempty"` 8550 8551 // Text: Suggested reply text. 8552 Text string `json:"text,omitempty"` 8553 8554 // ForceSendFields is a list of field names (e.g. "PostbackData") to 8555 // unconditionally include in API requests. By default, fields with 8556 // empty values are omitted from API requests. However, any non-pointer, 8557 // non-interface field appearing in ForceSendFields will be sent to the 8558 // server regardless of whether the field is empty or not. This may be 8559 // used to include empty fields in Patch requests. 8560 ForceSendFields []string `json:"-"` 8561 8562 // NullFields is a list of field names (e.g. "PostbackData") to include 8563 // in API requests with the JSON null value. By default, fields with 8564 // empty values are omitted from API requests. However, any field with 8565 // an empty value appearing in NullFields will be sent to the server as 8566 // null. It is an error if a field in this list has a non-empty value. 8567 // This may be used to include null fields in Patch requests. 8568 NullFields []string `json:"-"` 8569} 8570 8571func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply) MarshalJSON() ([]byte, error) { 8572 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply 8573 raw := NoMethod(*s) 8574 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8575} 8576 8577// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion: Rich Business 8578// Messaging (RBM) suggestion. Suggestions allow user to easily 8579// select/click a predefined response or perform an action (like opening 8580// a web uri). 8581type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion struct { 8582 // Action: Predefined client side actions that user can choose 8583 Action *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction `json:"action,omitempty"` 8584 8585 // Reply: Predefined replies for user to select instead of typing 8586 Reply *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply `json:"reply,omitempty"` 8587 8588 // ForceSendFields is a list of field names (e.g. "Action") to 8589 // unconditionally include in API requests. By default, fields with 8590 // empty values are omitted from API requests. However, any non-pointer, 8591 // non-interface field appearing in ForceSendFields will be sent to the 8592 // server regardless of whether the field is empty or not. This may be 8593 // used to include empty fields in Patch requests. 8594 ForceSendFields []string `json:"-"` 8595 8596 // NullFields is a list of field names (e.g. "Action") to include in API 8597 // requests with the JSON null value. By default, fields with empty 8598 // values are omitted from API requests. However, any field with an 8599 // empty value appearing in NullFields will be sent to the server as 8600 // null. It is an error if a field in this list has a non-empty value. 8601 // This may be used to include null fields in Patch requests. 8602 NullFields []string `json:"-"` 8603} 8604 8605func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion) MarshalJSON() ([]byte, error) { 8606 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion 8607 raw := NoMethod(*s) 8608 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8609} 8610 8611// GoogleCloudDialogflowV2beta1IntentMessageRbmText: Rich Business 8612// Messaging (RBM) text response with suggestions. 8613type GoogleCloudDialogflowV2beta1IntentMessageRbmText struct { 8614 // RbmSuggestion: Optional. One or more suggestions to show to the user. 8615 RbmSuggestion []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"rbmSuggestion,omitempty"` 8616 8617 // Text: Required. Text sent and displayed to the user. 8618 Text string `json:"text,omitempty"` 8619 8620 // ForceSendFields is a list of field names (e.g. "RbmSuggestion") to 8621 // unconditionally include in API requests. By default, fields with 8622 // empty values are omitted from API requests. However, any non-pointer, 8623 // non-interface field appearing in ForceSendFields will be sent to the 8624 // server regardless of whether the field is empty or not. This may be 8625 // used to include empty fields in Patch requests. 8626 ForceSendFields []string `json:"-"` 8627 8628 // NullFields is a list of field names (e.g. "RbmSuggestion") to include 8629 // in API requests with the JSON null value. By default, fields with 8630 // empty values are omitted from API requests. However, any field with 8631 // an empty value appearing in NullFields will be sent to the server as 8632 // null. It is an error if a field in this list has a non-empty value. 8633 // This may be used to include null fields in Patch requests. 8634 NullFields []string `json:"-"` 8635} 8636 8637func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmText) MarshalJSON() ([]byte, error) { 8638 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmText 8639 raw := NoMethod(*s) 8640 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8641} 8642 8643// GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo: Additional 8644// info about the select item for when it is triggered in a dialog. 8645type GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo struct { 8646 // Key: Required. A unique key that will be sent back to the agent if 8647 // this response is given. 8648 Key string `json:"key,omitempty"` 8649 8650 // Synonyms: Optional. A list of synonyms that can also be used to 8651 // trigger this item in dialog. 8652 Synonyms []string `json:"synonyms,omitempty"` 8653 8654 // ForceSendFields is a list of field names (e.g. "Key") to 8655 // unconditionally include in API requests. By default, fields with 8656 // empty values are omitted from API requests. However, any non-pointer, 8657 // non-interface field appearing in ForceSendFields will be sent to the 8658 // server regardless of whether the field is empty or not. This may be 8659 // used to include empty fields in Patch requests. 8660 ForceSendFields []string `json:"-"` 8661 8662 // NullFields is a list of field names (e.g. "Key") to include in API 8663 // requests with the JSON null value. By default, fields with empty 8664 // values are omitted from API requests. However, any field with an 8665 // empty value appearing in NullFields will be sent to the server as 8666 // null. It is an error if a field in this list has a non-empty value. 8667 // This may be used to include null fields in Patch requests. 8668 NullFields []string `json:"-"` 8669} 8670 8671func (s *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) { 8672 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo 8673 raw := NoMethod(*s) 8674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8675} 8676 8677// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse: The simple 8678// response message containing speech or text. 8679type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse struct { 8680 // DisplayText: Optional. The text to display. 8681 DisplayText string `json:"displayText,omitempty"` 8682 8683 // Ssml: One of text_to_speech or ssml must be provided. Structured 8684 // spoken response to the user in the SSML format. Mutually exclusive 8685 // with text_to_speech. 8686 Ssml string `json:"ssml,omitempty"` 8687 8688 // TextToSpeech: One of text_to_speech or ssml must be provided. The 8689 // plain text of the speech output. Mutually exclusive with ssml. 8690 TextToSpeech string `json:"textToSpeech,omitempty"` 8691 8692 // ForceSendFields is a list of field names (e.g. "DisplayText") to 8693 // unconditionally include in API requests. By default, fields with 8694 // empty values are omitted from API requests. However, any non-pointer, 8695 // non-interface field appearing in ForceSendFields will be sent to the 8696 // server regardless of whether the field is empty or not. This may be 8697 // used to include empty fields in Patch requests. 8698 ForceSendFields []string `json:"-"` 8699 8700 // NullFields is a list of field names (e.g. "DisplayText") to include 8701 // in API requests with the JSON null value. By default, fields with 8702 // empty values are omitted from API requests. However, any field with 8703 // an empty value appearing in NullFields will be sent to the server as 8704 // null. It is an error if a field in this list has a non-empty value. 8705 // This may be used to include null fields in Patch requests. 8706 NullFields []string `json:"-"` 8707} 8708 8709func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) { 8710 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse 8711 raw := NoMethod(*s) 8712 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8713} 8714 8715// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses: The 8716// collection of simple response candidates. This message in 8717// `QueryResult.fulfillment_messages` and 8718// `WebhookResponse.fulfillment_messages` should contain only one 8719// `SimpleResponse`. 8720type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses struct { 8721 // SimpleResponses: Required. The list of simple responses. 8722 SimpleResponses []*GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse `json:"simpleResponses,omitempty"` 8723 8724 // ForceSendFields is a list of field names (e.g. "SimpleResponses") to 8725 // unconditionally include in API requests. By default, fields with 8726 // empty values are omitted from API requests. However, any non-pointer, 8727 // non-interface field appearing in ForceSendFields will be sent to the 8728 // server regardless of whether the field is empty or not. This may be 8729 // used to include empty fields in Patch requests. 8730 ForceSendFields []string `json:"-"` 8731 8732 // NullFields is a list of field names (e.g. "SimpleResponses") to 8733 // include in API requests with the JSON null value. By default, fields 8734 // with empty values are omitted from API requests. However, any field 8735 // with an empty value appearing in NullFields will be sent to the 8736 // server as null. It is an error if a field in this list has a 8737 // non-empty value. This may be used to include null fields in Patch 8738 // requests. 8739 NullFields []string `json:"-"` 8740} 8741 8742func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) { 8743 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses 8744 raw := NoMethod(*s) 8745 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8746} 8747 8748// GoogleCloudDialogflowV2beta1IntentMessageSuggestion: The suggestion 8749// chip message that the user can tap to quickly post a reply to the 8750// conversation. 8751type GoogleCloudDialogflowV2beta1IntentMessageSuggestion struct { 8752 // Title: Required. The text shown the in the suggestion chip. 8753 Title string `json:"title,omitempty"` 8754 8755 // ForceSendFields is a list of field names (e.g. "Title") to 8756 // unconditionally include in API requests. By default, fields with 8757 // empty values are omitted from API requests. However, any non-pointer, 8758 // non-interface field appearing in ForceSendFields will be sent to the 8759 // server regardless of whether the field is empty or not. This may be 8760 // used to include empty fields in Patch requests. 8761 ForceSendFields []string `json:"-"` 8762 8763 // NullFields is a list of field names (e.g. "Title") to include in API 8764 // requests with the JSON null value. By default, fields with empty 8765 // values are omitted from API requests. However, any field with an 8766 // empty value appearing in NullFields will be sent to the server as 8767 // null. It is an error if a field in this list has a non-empty value. 8768 // This may be used to include null fields in Patch requests. 8769 NullFields []string `json:"-"` 8770} 8771 8772func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestion) MarshalJSON() ([]byte, error) { 8773 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestion 8774 raw := NoMethod(*s) 8775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8776} 8777 8778// GoogleCloudDialogflowV2beta1IntentMessageSuggestions: The collection 8779// of suggestions. 8780type GoogleCloudDialogflowV2beta1IntentMessageSuggestions struct { 8781 // Suggestions: Required. The list of suggested replies. 8782 Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageSuggestion `json:"suggestions,omitempty"` 8783 8784 // ForceSendFields is a list of field names (e.g. "Suggestions") to 8785 // unconditionally include in API requests. By default, fields with 8786 // empty values are omitted from API requests. However, any non-pointer, 8787 // non-interface field appearing in ForceSendFields will be sent to the 8788 // server regardless of whether the field is empty or not. This may be 8789 // used to include empty fields in Patch requests. 8790 ForceSendFields []string `json:"-"` 8791 8792 // NullFields is a list of field names (e.g. "Suggestions") to include 8793 // in API requests with the JSON null value. By default, fields with 8794 // empty values are omitted from API requests. However, any field with 8795 // an empty value appearing in NullFields will be sent to the server as 8796 // null. It is an error if a field in this list has a non-empty value. 8797 // This may be used to include null fields in Patch requests. 8798 NullFields []string `json:"-"` 8799} 8800 8801func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestions) MarshalJSON() ([]byte, error) { 8802 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestions 8803 raw := NoMethod(*s) 8804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8805} 8806 8807// GoogleCloudDialogflowV2beta1IntentMessageTableCard: Table card for 8808// Actions on Google. 8809type GoogleCloudDialogflowV2beta1IntentMessageTableCard struct { 8810 // Buttons: Optional. List of buttons for the card. 8811 Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"` 8812 8813 // ColumnProperties: Optional. Display properties for the columns in 8814 // this table. 8815 ColumnProperties []*GoogleCloudDialogflowV2beta1IntentMessageColumnProperties `json:"columnProperties,omitempty"` 8816 8817 // Image: Optional. Image which should be displayed on the card. 8818 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 8819 8820 // Rows: Optional. Rows in this table of data. 8821 Rows []*GoogleCloudDialogflowV2beta1IntentMessageTableCardRow `json:"rows,omitempty"` 8822 8823 // Subtitle: Optional. Subtitle to the title. 8824 Subtitle string `json:"subtitle,omitempty"` 8825 8826 // Title: Required. Title of the card. 8827 Title string `json:"title,omitempty"` 8828 8829 // ForceSendFields is a list of field names (e.g. "Buttons") to 8830 // unconditionally include in API requests. By default, fields with 8831 // empty values are omitted from API requests. However, any non-pointer, 8832 // non-interface field appearing in ForceSendFields will be sent to the 8833 // server regardless of whether the field is empty or not. This may be 8834 // used to include empty fields in Patch requests. 8835 ForceSendFields []string `json:"-"` 8836 8837 // NullFields is a list of field names (e.g. "Buttons") to include in 8838 // API requests with the JSON null value. By default, fields with empty 8839 // values are omitted from API requests. However, any field with an 8840 // empty value appearing in NullFields will be sent to the server as 8841 // null. It is an error if a field in this list has a non-empty value. 8842 // This may be used to include null fields in Patch requests. 8843 NullFields []string `json:"-"` 8844} 8845 8846func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCard) MarshalJSON() ([]byte, error) { 8847 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCard 8848 raw := NoMethod(*s) 8849 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8850} 8851 8852// GoogleCloudDialogflowV2beta1IntentMessageTableCardCell: Cell of 8853// TableCardRow. 8854type GoogleCloudDialogflowV2beta1IntentMessageTableCardCell struct { 8855 // Text: Required. Text in this cell. 8856 Text string `json:"text,omitempty"` 8857 8858 // ForceSendFields is a list of field names (e.g. "Text") to 8859 // unconditionally include in API requests. By default, fields with 8860 // empty values are omitted from API requests. However, any non-pointer, 8861 // non-interface field appearing in ForceSendFields will be sent to the 8862 // server regardless of whether the field is empty or not. This may be 8863 // used to include empty fields in Patch requests. 8864 ForceSendFields []string `json:"-"` 8865 8866 // NullFields is a list of field names (e.g. "Text") to include in API 8867 // requests with the JSON null value. By default, fields with empty 8868 // values are omitted from API requests. However, any field with an 8869 // empty value appearing in NullFields will be sent to the server as 8870 // null. It is an error if a field in this list has a non-empty value. 8871 // This may be used to include null fields in Patch requests. 8872 NullFields []string `json:"-"` 8873} 8874 8875func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardCell) MarshalJSON() ([]byte, error) { 8876 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardCell 8877 raw := NoMethod(*s) 8878 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8879} 8880 8881// GoogleCloudDialogflowV2beta1IntentMessageTableCardRow: Row of 8882// TableCard. 8883type GoogleCloudDialogflowV2beta1IntentMessageTableCardRow struct { 8884 // Cells: Optional. List of cells that make up this row. 8885 Cells []*GoogleCloudDialogflowV2beta1IntentMessageTableCardCell `json:"cells,omitempty"` 8886 8887 // DividerAfter: Optional. Whether to add a visual divider after this 8888 // row. 8889 DividerAfter bool `json:"dividerAfter,omitempty"` 8890 8891 // ForceSendFields is a list of field names (e.g. "Cells") to 8892 // unconditionally include in API requests. By default, fields with 8893 // empty values are omitted from API requests. However, any non-pointer, 8894 // non-interface field appearing in ForceSendFields will be sent to the 8895 // server regardless of whether the field is empty or not. This may be 8896 // used to include empty fields in Patch requests. 8897 ForceSendFields []string `json:"-"` 8898 8899 // NullFields is a list of field names (e.g. "Cells") to include in API 8900 // requests with the JSON null value. By default, fields with empty 8901 // values are omitted from API requests. However, any field with an 8902 // empty value appearing in NullFields will be sent to the server as 8903 // null. It is an error if a field in this list has a non-empty value. 8904 // This may be used to include null fields in Patch requests. 8905 NullFields []string `json:"-"` 8906} 8907 8908func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardRow) MarshalJSON() ([]byte, error) { 8909 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardRow 8910 raw := NoMethod(*s) 8911 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8912} 8913 8914// GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio: Plays 8915// audio from a file in Telephony Gateway. 8916type GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio struct { 8917 // AudioUri: Required. URI to a Google Cloud Storage object containing 8918 // the audio to play, e.g., "gs://bucket/object". The object must 8919 // contain a single channel (mono) of linear PCM audio (2 bytes / 8920 // sample) at 8kHz. This object must be readable by the 8921 // `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` service account 8922 // where is the number of the Telephony Gateway project (usually the 8923 // same as the Dialogflow agent project). If the Google Cloud Storage 8924 // bucket is in the Telephony Gateway project, this permission is added 8925 // by default when enabling the Dialogflow V2 API. For audio from other 8926 // sources, consider using the `TelephonySynthesizeSpeech` message with 8927 // SSML. 8928 AudioUri string `json:"audioUri,omitempty"` 8929 8930 // ForceSendFields is a list of field names (e.g. "AudioUri") to 8931 // unconditionally include in API requests. By default, fields with 8932 // empty values are omitted from API requests. However, any non-pointer, 8933 // non-interface field appearing in ForceSendFields will be sent to the 8934 // server regardless of whether the field is empty or not. This may be 8935 // used to include empty fields in Patch requests. 8936 ForceSendFields []string `json:"-"` 8937 8938 // NullFields is a list of field names (e.g. "AudioUri") to include in 8939 // API requests with the JSON null value. By default, fields with empty 8940 // values are omitted from API requests. However, any field with an 8941 // empty value appearing in NullFields will be sent to the server as 8942 // null. It is an error if a field in this list has a non-empty value. 8943 // This may be used to include null fields in Patch requests. 8944 NullFields []string `json:"-"` 8945} 8946 8947func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio) MarshalJSON() ([]byte, error) { 8948 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio 8949 raw := NoMethod(*s) 8950 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8951} 8952 8953// GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech: 8954// Synthesizes speech and plays back the synthesized audio to the caller 8955// in Telephony Gateway. Telephony Gateway takes the synthesizer 8956// settings from `DetectIntentResponse.output_audio_config` which can 8957// either be set at request-level or can come from the agent-level 8958// synthesizer config. 8959type GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech struct { 8960 // Ssml: The SSML to be synthesized. For more information, see 8961 // [SSML](https://developers.google.com/actions/reference/ssml). 8962 Ssml string `json:"ssml,omitempty"` 8963 8964 // Text: The raw text to be synthesized. 8965 Text string `json:"text,omitempty"` 8966 8967 // ForceSendFields is a list of field names (e.g. "Ssml") to 8968 // unconditionally include in API requests. By default, fields with 8969 // empty values are omitted from API requests. However, any non-pointer, 8970 // non-interface field appearing in ForceSendFields will be sent to the 8971 // server regardless of whether the field is empty or not. This may be 8972 // used to include empty fields in Patch requests. 8973 ForceSendFields []string `json:"-"` 8974 8975 // NullFields is a list of field names (e.g. "Ssml") to include in API 8976 // requests with the JSON null value. By default, fields with empty 8977 // values are omitted from API requests. However, any field with an 8978 // empty value appearing in NullFields will be sent to the server as 8979 // null. It is an error if a field in this list has a non-empty value. 8980 // This may be used to include null fields in Patch requests. 8981 NullFields []string `json:"-"` 8982} 8983 8984func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech) MarshalJSON() ([]byte, error) { 8985 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech 8986 raw := NoMethod(*s) 8987 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8988} 8989 8990// GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall: 8991// Transfers the call in Telephony Gateway. 8992type GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall struct { 8993 // PhoneNumber: Required. The phone number to transfer the call to in 8994 // [E.164 format](https://en.wikipedia.org/wiki/E.164). We currently 8995 // only allow transferring to US numbers (+1xxxyyyzzzz). 8996 PhoneNumber string `json:"phoneNumber,omitempty"` 8997 8998 // ForceSendFields is a list of field names (e.g. "PhoneNumber") to 8999 // unconditionally include in API requests. By default, fields with 9000 // empty values are omitted from API requests. However, any non-pointer, 9001 // non-interface field appearing in ForceSendFields will be sent to the 9002 // server regardless of whether the field is empty or not. This may be 9003 // used to include empty fields in Patch requests. 9004 ForceSendFields []string `json:"-"` 9005 9006 // NullFields is a list of field names (e.g. "PhoneNumber") to include 9007 // in API requests with the JSON null value. By default, fields with 9008 // empty values are omitted from API requests. However, any field with 9009 // an empty value appearing in NullFields will be sent to the server as 9010 // null. It is an error if a field in this list has a non-empty value. 9011 // This may be used to include null fields in Patch requests. 9012 NullFields []string `json:"-"` 9013} 9014 9015func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall) MarshalJSON() ([]byte, error) { 9016 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall 9017 raw := NoMethod(*s) 9018 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9019} 9020 9021// GoogleCloudDialogflowV2beta1IntentMessageText: The text response 9022// message. 9023type GoogleCloudDialogflowV2beta1IntentMessageText struct { 9024 // Text: Optional. The collection of the agent's responses. 9025 Text []string `json:"text,omitempty"` 9026 9027 // ForceSendFields is a list of field names (e.g. "Text") to 9028 // unconditionally include in API requests. By default, fields with 9029 // empty values are omitted from API requests. However, any non-pointer, 9030 // non-interface field appearing in ForceSendFields will be sent to the 9031 // server regardless of whether the field is empty or not. This may be 9032 // used to include empty fields in Patch requests. 9033 ForceSendFields []string `json:"-"` 9034 9035 // NullFields is a list of field names (e.g. "Text") to include in API 9036 // requests with the JSON null value. By default, fields with empty 9037 // values are omitted from API requests. However, any field with an 9038 // empty value appearing in NullFields will be sent to the server as 9039 // null. It is an error if a field in this list has a non-empty value. 9040 // This may be used to include null fields in Patch requests. 9041 NullFields []string `json:"-"` 9042} 9043 9044func (s *GoogleCloudDialogflowV2beta1IntentMessageText) MarshalJSON() ([]byte, error) { 9045 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageText 9046 raw := NoMethod(*s) 9047 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9048} 9049 9050// GoogleCloudDialogflowV2beta1IntentParameter: Represents intent 9051// parameters. 9052type GoogleCloudDialogflowV2beta1IntentParameter struct { 9053 // DefaultValue: Optional. The default value to use when the `value` 9054 // yields an empty result. Default values can be extracted from contexts 9055 // by using the following syntax: `#context_name.parameter_name`. 9056 DefaultValue string `json:"defaultValue,omitempty"` 9057 9058 // DisplayName: Required. The name of the parameter. 9059 DisplayName string `json:"displayName,omitempty"` 9060 9061 // EntityTypeDisplayName: Optional. The name of the entity type, 9062 // prefixed with `@`, that describes values of the parameter. If the 9063 // parameter is required, this must be provided. 9064 EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"` 9065 9066 // IsList: Optional. Indicates whether the parameter represents a list 9067 // of values. 9068 IsList bool `json:"isList,omitempty"` 9069 9070 // Mandatory: Optional. Indicates whether the parameter is required. 9071 // That is, whether the intent cannot be completed without collecting 9072 // the parameter value. 9073 Mandatory bool `json:"mandatory,omitempty"` 9074 9075 // Name: The unique identifier of this parameter. 9076 Name string `json:"name,omitempty"` 9077 9078 // Prompts: Optional. The collection of prompts that the agent can 9079 // present to the user in order to collect a value for the parameter. 9080 Prompts []string `json:"prompts,omitempty"` 9081 9082 // Value: Optional. The definition of the parameter value. It can be: - 9083 // a constant string, - a parameter value defined as `$parameter_name`, 9084 // - an original parameter value defined as `$parameter_name.original`, 9085 // - a parameter value from some context defined as 9086 // `#context_name.parameter_name`. 9087 Value string `json:"value,omitempty"` 9088 9089 // ForceSendFields is a list of field names (e.g. "DefaultValue") to 9090 // unconditionally include in API requests. By default, fields with 9091 // empty values are omitted from API requests. However, any non-pointer, 9092 // non-interface field appearing in ForceSendFields will be sent to the 9093 // server regardless of whether the field is empty or not. This may be 9094 // used to include empty fields in Patch requests. 9095 ForceSendFields []string `json:"-"` 9096 9097 // NullFields is a list of field names (e.g. "DefaultValue") to include 9098 // in API requests with the JSON null value. By default, fields with 9099 // empty values are omitted from API requests. However, any field with 9100 // an empty value appearing in NullFields will be sent to the server as 9101 // null. It is an error if a field in this list has a non-empty value. 9102 // This may be used to include null fields in Patch requests. 9103 NullFields []string `json:"-"` 9104} 9105 9106func (s *GoogleCloudDialogflowV2beta1IntentParameter) MarshalJSON() ([]byte, error) { 9107 type NoMethod GoogleCloudDialogflowV2beta1IntentParameter 9108 raw := NoMethod(*s) 9109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9110} 9111 9112// GoogleCloudDialogflowV2beta1IntentTrainingPhrase: Represents an 9113// example that the agent is trained on. 9114type GoogleCloudDialogflowV2beta1IntentTrainingPhrase struct { 9115 // Name: Output only. The unique identifier of this training phrase. 9116 Name string `json:"name,omitempty"` 9117 9118 // Parts: Required. The ordered list of training phrase parts. The parts 9119 // are concatenated in order to form the training phrase. Note: The API 9120 // does not automatically annotate training phrases like the Dialogflow 9121 // Console does. Note: Do not forget to include whitespace at part 9122 // boundaries, so the training phrase is well formatted when the parts 9123 // are concatenated. If the training phrase does not need to be 9124 // annotated with parameters, you just need a single part with only the 9125 // Part.text field set. If you want to annotate the training phrase, you 9126 // must create multiple parts, where the fields of each part are 9127 // populated in one of two ways: - `Part.text` is set to a part of the 9128 // phrase that has no parameters. - `Part.text` is set to a part of the 9129 // phrase that you want to annotate, and the `entity_type`, `alias`, and 9130 // `user_defined` fields are all set. 9131 Parts []*GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart `json:"parts,omitempty"` 9132 9133 // TimesAddedCount: Optional. Indicates how many times this example was 9134 // added to the intent. Each time a developer adds an existing sample by 9135 // editing an intent or training, this counter is increased. 9136 TimesAddedCount int64 `json:"timesAddedCount,omitempty"` 9137 9138 // Type: Required. The type of the training phrase. 9139 // 9140 // Possible values: 9141 // "TYPE_UNSPECIFIED" - Not specified. This value should never be 9142 // used. 9143 // "EXAMPLE" - Examples do not contain @-prefixed entity type names, 9144 // but example parts can be annotated with entity types. 9145 // "TEMPLATE" - Templates are not annotated with entity types, but 9146 // they can contain @-prefixed entity type names as substrings. Template 9147 // mode has been deprecated. Example mode is the only supported way to 9148 // create new training phrases. If you have existing training phrases 9149 // that you've created in template mode, those will continue to work. 9150 Type string `json:"type,omitempty"` 9151 9152 // ForceSendFields is a list of field names (e.g. "Name") to 9153 // unconditionally include in API requests. By default, fields with 9154 // empty values are omitted from API requests. However, any non-pointer, 9155 // non-interface field appearing in ForceSendFields will be sent to the 9156 // server regardless of whether the field is empty or not. This may be 9157 // used to include empty fields in Patch requests. 9158 ForceSendFields []string `json:"-"` 9159 9160 // NullFields is a list of field names (e.g. "Name") to include in API 9161 // requests with the JSON null value. By default, fields with empty 9162 // values are omitted from API requests. However, any field with an 9163 // empty value appearing in NullFields will be sent to the server as 9164 // null. It is an error if a field in this list has a non-empty value. 9165 // This may be used to include null fields in Patch requests. 9166 NullFields []string `json:"-"` 9167} 9168 9169func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrase) MarshalJSON() ([]byte, error) { 9170 type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrase 9171 raw := NoMethod(*s) 9172 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9173} 9174 9175// GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart: Represents a 9176// part of a training phrase. 9177type GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart struct { 9178 // Alias: Optional. The parameter name for the value extracted from the 9179 // annotated part of the example. This field is required for annotated 9180 // parts of the training phrase. 9181 Alias string `json:"alias,omitempty"` 9182 9183 // EntityType: Optional. The entity type name prefixed with `@`. This 9184 // field is required for annotated parts of the training phrase. 9185 EntityType string `json:"entityType,omitempty"` 9186 9187 // Text: Required. The text for this part. 9188 Text string `json:"text,omitempty"` 9189 9190 // UserDefined: Optional. Indicates whether the text was manually 9191 // annotated. This field is set to true when the Dialogflow Console is 9192 // used to manually annotate the part. When creating an annotated part 9193 // with the API, you must set this to true. 9194 UserDefined bool `json:"userDefined,omitempty"` 9195 9196 // ForceSendFields is a list of field names (e.g. "Alias") to 9197 // unconditionally include in API requests. By default, fields with 9198 // empty values are omitted from API requests. However, any non-pointer, 9199 // non-interface field appearing in ForceSendFields will be sent to the 9200 // server regardless of whether the field is empty or not. This may be 9201 // used to include empty fields in Patch requests. 9202 ForceSendFields []string `json:"-"` 9203 9204 // NullFields is a list of field names (e.g. "Alias") to include in API 9205 // requests with the JSON null value. By default, fields with empty 9206 // values are omitted from API requests. However, any field with an 9207 // empty value appearing in NullFields will be sent to the server as 9208 // null. It is an error if a field in this list has a non-empty value. 9209 // This may be used to include null fields in Patch requests. 9210 NullFields []string `json:"-"` 9211} 9212 9213func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) { 9214 type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart 9215 raw := NoMethod(*s) 9216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9217} 9218 9219// GoogleCloudDialogflowV2beta1KnowledgeAnswers: Represents the result 9220// of querying a Knowledge base. 9221type GoogleCloudDialogflowV2beta1KnowledgeAnswers struct { 9222 // Answers: A list of answers from Knowledge Connector. 9223 Answers []*GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer `json:"answers,omitempty"` 9224 9225 // ForceSendFields is a list of field names (e.g. "Answers") to 9226 // unconditionally include in API requests. By default, fields with 9227 // empty values are omitted from API requests. However, any non-pointer, 9228 // non-interface field appearing in ForceSendFields will be sent to the 9229 // server regardless of whether the field is empty or not. This may be 9230 // used to include empty fields in Patch requests. 9231 ForceSendFields []string `json:"-"` 9232 9233 // NullFields is a list of field names (e.g. "Answers") to include in 9234 // API requests with the JSON null value. By default, fields with empty 9235 // values are omitted from API requests. However, any field with an 9236 // empty value appearing in NullFields will be sent to the server as 9237 // null. It is an error if a field in this list has a non-empty value. 9238 // This may be used to include null fields in Patch requests. 9239 NullFields []string `json:"-"` 9240} 9241 9242func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswers) MarshalJSON() ([]byte, error) { 9243 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswers 9244 raw := NoMethod(*s) 9245 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9246} 9247 9248// GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer: An answer from 9249// Knowledge Connector. 9250type GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer struct { 9251 // Answer: The piece of text from the `source` knowledge base document 9252 // that answers this conversational query. 9253 Answer string `json:"answer,omitempty"` 9254 9255 // FaqQuestion: The corresponding FAQ question if the answer was 9256 // extracted from a FAQ Document, empty otherwise. 9257 FaqQuestion string `json:"faqQuestion,omitempty"` 9258 9259 // MatchConfidence: The system's confidence score that this Knowledge 9260 // answer is a good match for this conversational query. The range is 9261 // from 0.0 (completely uncertain) to 1.0 (completely certain). Note: 9262 // The confidence score is likely to vary somewhat (possibly even for 9263 // identical requests), as the underlying model is under constant 9264 // improvement. It may be deprecated in the future. We recommend using 9265 // `match_confidence_level` which should be generally more stable. 9266 MatchConfidence float64 `json:"matchConfidence,omitempty"` 9267 9268 // MatchConfidenceLevel: The system's confidence level that this 9269 // knowledge answer is a good match for this conversational query. NOTE: 9270 // The confidence level for a given `` pair may change without notice, 9271 // as it depends on models that are constantly being improved. However, 9272 // it will change less frequently than the confidence score below, and 9273 // should be preferred for referencing the quality of an answer. 9274 // 9275 // Possible values: 9276 // "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED" - Not specified. 9277 // "LOW" - Indicates that the confidence is low. 9278 // "MEDIUM" - Indicates our confidence is medium. 9279 // "HIGH" - Indicates our confidence is high. 9280 MatchConfidenceLevel string `json:"matchConfidenceLevel,omitempty"` 9281 9282 // Source: Indicates which Knowledge Document this answer was extracted 9283 // from. Format: `projects//knowledgeBases//documents/`. 9284 Source string `json:"source,omitempty"` 9285 9286 // ForceSendFields is a list of field names (e.g. "Answer") to 9287 // unconditionally include in API requests. By default, fields with 9288 // empty values are omitted from API requests. However, any non-pointer, 9289 // non-interface field appearing in ForceSendFields will be sent to the 9290 // server regardless of whether the field is empty or not. This may be 9291 // used to include empty fields in Patch requests. 9292 ForceSendFields []string `json:"-"` 9293 9294 // NullFields is a list of field names (e.g. "Answer") to include in API 9295 // requests with the JSON null value. By default, fields with empty 9296 // values are omitted from API requests. However, any field with an 9297 // empty value appearing in NullFields will be sent to the server as 9298 // null. It is an error if a field in this list has a non-empty value. 9299 // This may be used to include null fields in Patch requests. 9300 NullFields []string `json:"-"` 9301} 9302 9303func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) MarshalJSON() ([]byte, error) { 9304 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer 9305 raw := NoMethod(*s) 9306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9307} 9308 9309func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) UnmarshalJSON(data []byte) error { 9310 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer 9311 var s1 struct { 9312 MatchConfidence gensupport.JSONFloat64 `json:"matchConfidence"` 9313 *NoMethod 9314 } 9315 s1.NoMethod = (*NoMethod)(s) 9316 if err := json.Unmarshal(data, &s1); err != nil { 9317 return err 9318 } 9319 s.MatchConfidence = float64(s1.MatchConfidence) 9320 return nil 9321} 9322 9323// GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata: Metadata in 9324// google::longrunning::Operation for Knowledge operations. 9325type GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata struct { 9326 // State: Required. Output only. The current state of this operation. 9327 // 9328 // Possible values: 9329 // "STATE_UNSPECIFIED" - State unspecified. 9330 // "PENDING" - The operation has been created. 9331 // "RUNNING" - The operation is currently running. 9332 // "DONE" - The operation is done, either cancelled or completed. 9333 State string `json:"state,omitempty"` 9334 9335 // ForceSendFields is a list of field names (e.g. "State") to 9336 // unconditionally include in API requests. By default, fields with 9337 // empty values are omitted from API requests. However, any non-pointer, 9338 // non-interface field appearing in ForceSendFields will be sent to the 9339 // server regardless of whether the field is empty or not. This may be 9340 // used to include empty fields in Patch requests. 9341 ForceSendFields []string `json:"-"` 9342 9343 // NullFields is a list of field names (e.g. "State") to include in API 9344 // requests with the JSON null value. By default, fields with empty 9345 // values are omitted from API requests. However, any field with an 9346 // empty value appearing in NullFields will be sent to the server as 9347 // null. It is an error if a field in this list has a non-empty value. 9348 // This may be used to include null fields in Patch requests. 9349 NullFields []string `json:"-"` 9350} 9351 9352func (s *GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { 9353 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata 9354 raw := NoMethod(*s) 9355 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9356} 9357 9358// GoogleCloudDialogflowV2beta1LabelConversationResponse: The response 9359// for ConversationDatasets.LabelConversation. 9360type GoogleCloudDialogflowV2beta1LabelConversationResponse struct { 9361 // AnnotatedConversationDataset: New annotated conversation dataset 9362 // created by the labeling task. 9363 AnnotatedConversationDataset *GoogleCloudDialogflowV2beta1AnnotatedConversationDataset `json:"annotatedConversationDataset,omitempty"` 9364 9365 // ForceSendFields is a list of field names (e.g. 9366 // "AnnotatedConversationDataset") to unconditionally include in API 9367 // requests. By default, fields with empty values are omitted from API 9368 // requests. However, any non-pointer, non-interface field appearing in 9369 // ForceSendFields will be sent to the server regardless of whether the 9370 // field is empty or not. This may be used to include empty fields in 9371 // Patch requests. 9372 ForceSendFields []string `json:"-"` 9373 9374 // NullFields is a list of field names (e.g. 9375 // "AnnotatedConversationDataset") to include in API requests with the 9376 // JSON null value. By default, fields with empty values are omitted 9377 // from API requests. However, any field with an empty value appearing 9378 // in NullFields will be sent to the server as null. It is an error if a 9379 // field in this list has a non-empty value. This may be used to include 9380 // null fields in Patch requests. 9381 NullFields []string `json:"-"` 9382} 9383 9384func (s *GoogleCloudDialogflowV2beta1LabelConversationResponse) MarshalJSON() ([]byte, error) { 9385 type NoMethod GoogleCloudDialogflowV2beta1LabelConversationResponse 9386 raw := NoMethod(*s) 9387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9388} 9389 9390// GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest: Represents 9391// the contents of the original request that was passed to the 9392// `[Streaming]DetectIntent` call. 9393type GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest struct { 9394 // Payload: Optional. This field is set to the value of the 9395 // `QueryParameters.payload` field passed in the request. Some 9396 // integrations that query a Dialogflow agent may provide additional 9397 // information in the payload. In particular, for the Dialogflow Phone 9398 // Gateway integration, this field has the form: { "telephony": { 9399 // "caller_id": "+18558363987" } } Note: The caller ID field 9400 // (`caller_id`) will be redacted for Trial Edition agents and populated 9401 // with the caller ID in [E.164 9402 // format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition 9403 // agents. 9404 Payload googleapi.RawMessage `json:"payload,omitempty"` 9405 9406 // Source: The source of this request, e.g., `google`, `facebook`, 9407 // `slack`. It is set by Dialogflow-owned servers. 9408 Source string `json:"source,omitempty"` 9409 9410 // Version: Optional. The version of the protocol used for this request. 9411 // This field is AoG-specific. 9412 Version string `json:"version,omitempty"` 9413 9414 // ForceSendFields is a list of field names (e.g. "Payload") to 9415 // unconditionally include in API requests. By default, fields with 9416 // empty values are omitted from API requests. However, any non-pointer, 9417 // non-interface field appearing in ForceSendFields will be sent to the 9418 // server regardless of whether the field is empty or not. This may be 9419 // used to include empty fields in Patch requests. 9420 ForceSendFields []string `json:"-"` 9421 9422 // NullFields is a list of field names (e.g. "Payload") to include in 9423 // API requests with the JSON null value. By default, fields with empty 9424 // values are omitted from API requests. However, any field with an 9425 // empty value appearing in NullFields will be sent to the server as 9426 // null. It is an error if a field in this list has a non-empty value. 9427 // This may be used to include null fields in Patch requests. 9428 NullFields []string `json:"-"` 9429} 9430 9431func (s *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) { 9432 type NoMethod GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest 9433 raw := NoMethod(*s) 9434 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9435} 9436 9437// GoogleCloudDialogflowV2beta1QueryResult: Represents the result of 9438// conversational query or event processing. 9439type GoogleCloudDialogflowV2beta1QueryResult struct { 9440 // Action: The action name from the matched intent. 9441 Action string `json:"action,omitempty"` 9442 9443 // AllRequiredParamsPresent: This field is set to: - `false` if the 9444 // matched intent has required parameters and not all of the required 9445 // parameter values have been collected. - `true` if all required 9446 // parameter values have been collected, or if the matched intent 9447 // doesn't contain any required parameters. 9448 AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"` 9449 9450 // DiagnosticInfo: Free-form diagnostic information for the associated 9451 // detect intent request. The fields of this data can change without 9452 // notice, so you should not write code that depends on its structure. 9453 // The data may contain: - webhook call latency - webhook errors 9454 DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"` 9455 9456 // FulfillmentMessages: The collection of rich messages to present to 9457 // the user. 9458 FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"` 9459 9460 // FulfillmentText: The text to be pronounced to the user or shown on 9461 // the screen. Note: This is a legacy field, `fulfillment_messages` 9462 // should be preferred. 9463 FulfillmentText string `json:"fulfillmentText,omitempty"` 9464 9465 // Intent: The intent that matched the conversational query. Some, not 9466 // all fields are filled in this message, including but not limited to: 9467 // `name`, `display_name`, `end_interaction` and `is_fallback`. 9468 Intent *GoogleCloudDialogflowV2beta1Intent `json:"intent,omitempty"` 9469 9470 // IntentDetectionConfidence: The intent detection confidence. Values 9471 // range from 0.0 (completely uncertain) to 1.0 (completely certain). 9472 // This value is for informational purpose only and is only used to help 9473 // match the best intent within the classification threshold. This value 9474 // may change for the same end-user expression at any time due to a 9475 // model retraining or change in implementation. If there are `multiple 9476 // knowledge_answers` messages, this value is set to the greatest 9477 // `knowledgeAnswers.match_confidence` value in the list. 9478 IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"` 9479 9480 // KnowledgeAnswers: The result from Knowledge Connector (if any), 9481 // ordered by decreasing `KnowledgeAnswers.match_confidence`. 9482 KnowledgeAnswers *GoogleCloudDialogflowV2beta1KnowledgeAnswers `json:"knowledgeAnswers,omitempty"` 9483 9484 // LanguageCode: The language that was triggered during intent 9485 // detection. See [Language 9486 // Support](https://cloud.google.com/dialogflow/docs/reference/language) 9487 // for a list of the currently supported language codes. 9488 LanguageCode string `json:"languageCode,omitempty"` 9489 9490 // OutputContexts: The collection of output contexts. If applicable, 9491 // `output_contexts.parameters` contains entries with name `.original` 9492 // containing the original parameter values before the query. 9493 OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"` 9494 9495 // Parameters: The collection of extracted parameters. Depending on your 9496 // protocol or client library language, this is a map, associative 9497 // array, symbol table, dictionary, or JSON object composed of a 9498 // collection of (MapKey, MapValue) pairs: - MapKey type: string - 9499 // MapKey value: parameter name - MapValue type: - If parameter's entity 9500 // type is a composite entity: map - Else: string or number, depending 9501 // on parameter value type - MapValue value: - If parameter's entity 9502 // type is a composite entity: map from composite entity property names 9503 // to property values - Else: parameter value 9504 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 9505 9506 // QueryText: The original conversational query text: - If natural 9507 // language text was provided as input, `query_text` contains a copy of 9508 // the input. - If natural language speech audio was provided as input, 9509 // `query_text` contains the speech recognition result. If speech 9510 // recognizer produced multiple alternatives, a particular one is 9511 // picked. - If automatic spell correction is enabled, `query_text` will 9512 // contain the corrected user input. 9513 QueryText string `json:"queryText,omitempty"` 9514 9515 // SentimentAnalysisResult: The sentiment analysis result, which depends 9516 // on the `sentiment_analysis_request_config` specified in the request. 9517 SentimentAnalysisResult *GoogleCloudDialogflowV2beta1SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"` 9518 9519 // SpeechRecognitionConfidence: The Speech recognition confidence 9520 // between 0.0 and 1.0. A higher number indicates an estimated greater 9521 // likelihood that the recognized words are correct. The default of 0.0 9522 // is a sentinel value indicating that confidence was not set. This 9523 // field is not guaranteed to be accurate or set. In particular this 9524 // field isn't set for StreamingDetectIntent since the streaming 9525 // endpoint has separate confidence estimates per portion of the audio 9526 // in StreamingRecognitionResult. 9527 SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"` 9528 9529 // WebhookPayload: If the query was fulfilled by a webhook call, this 9530 // field is set to the value of the `payload` field returned in the 9531 // webhook response. 9532 WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"` 9533 9534 // WebhookSource: If the query was fulfilled by a webhook call, this 9535 // field is set to the value of the `source` field returned in the 9536 // webhook response. 9537 WebhookSource string `json:"webhookSource,omitempty"` 9538 9539 // ForceSendFields is a list of field names (e.g. "Action") to 9540 // unconditionally include in API requests. By default, fields with 9541 // empty values are omitted from API requests. However, any non-pointer, 9542 // non-interface field appearing in ForceSendFields will be sent to the 9543 // server regardless of whether the field is empty or not. This may be 9544 // used to include empty fields in Patch requests. 9545 ForceSendFields []string `json:"-"` 9546 9547 // NullFields is a list of field names (e.g. "Action") to include in API 9548 // requests with the JSON null value. By default, fields with empty 9549 // values are omitted from API requests. However, any field with an 9550 // empty value appearing in NullFields will be sent to the server as 9551 // null. It is an error if a field in this list has a non-empty value. 9552 // This may be used to include null fields in Patch requests. 9553 NullFields []string `json:"-"` 9554} 9555 9556func (s *GoogleCloudDialogflowV2beta1QueryResult) MarshalJSON() ([]byte, error) { 9557 type NoMethod GoogleCloudDialogflowV2beta1QueryResult 9558 raw := NoMethod(*s) 9559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9560} 9561 9562func (s *GoogleCloudDialogflowV2beta1QueryResult) UnmarshalJSON(data []byte) error { 9563 type NoMethod GoogleCloudDialogflowV2beta1QueryResult 9564 var s1 struct { 9565 IntentDetectionConfidence gensupport.JSONFloat64 `json:"intentDetectionConfidence"` 9566 SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"` 9567 *NoMethod 9568 } 9569 s1.NoMethod = (*NoMethod)(s) 9570 if err := json.Unmarshal(data, &s1); err != nil { 9571 return err 9572 } 9573 s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence) 9574 s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence) 9575 return nil 9576} 9577 9578// GoogleCloudDialogflowV2beta1Sentiment: The sentiment, such as 9579// positive/negative feeling or association, for a unit of analysis, 9580// such as the query text. 9581type GoogleCloudDialogflowV2beta1Sentiment struct { 9582 // Magnitude: A non-negative number in the [0, +inf) range, which 9583 // represents the absolute magnitude of sentiment, regardless of score 9584 // (positive or negative). 9585 Magnitude float64 `json:"magnitude,omitempty"` 9586 9587 // Score: Sentiment score between -1.0 (negative sentiment) and 1.0 9588 // (positive sentiment). 9589 Score float64 `json:"score,omitempty"` 9590 9591 // ForceSendFields is a list of field names (e.g. "Magnitude") to 9592 // unconditionally include in API requests. By default, fields with 9593 // empty values are omitted from API requests. However, any non-pointer, 9594 // non-interface field appearing in ForceSendFields will be sent to the 9595 // server regardless of whether the field is empty or not. This may be 9596 // used to include empty fields in Patch requests. 9597 ForceSendFields []string `json:"-"` 9598 9599 // NullFields is a list of field names (e.g. "Magnitude") to include in 9600 // API requests with the JSON null value. By default, fields with empty 9601 // values are omitted from API requests. However, any field with an 9602 // empty value appearing in NullFields will be sent to the server as 9603 // null. It is an error if a field in this list has a non-empty value. 9604 // This may be used to include null fields in Patch requests. 9605 NullFields []string `json:"-"` 9606} 9607 9608func (s *GoogleCloudDialogflowV2beta1Sentiment) MarshalJSON() ([]byte, error) { 9609 type NoMethod GoogleCloudDialogflowV2beta1Sentiment 9610 raw := NoMethod(*s) 9611 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9612} 9613 9614func (s *GoogleCloudDialogflowV2beta1Sentiment) UnmarshalJSON(data []byte) error { 9615 type NoMethod GoogleCloudDialogflowV2beta1Sentiment 9616 var s1 struct { 9617 Magnitude gensupport.JSONFloat64 `json:"magnitude"` 9618 Score gensupport.JSONFloat64 `json:"score"` 9619 *NoMethod 9620 } 9621 s1.NoMethod = (*NoMethod)(s) 9622 if err := json.Unmarshal(data, &s1); err != nil { 9623 return err 9624 } 9625 s.Magnitude = float64(s1.Magnitude) 9626 s.Score = float64(s1.Score) 9627 return nil 9628} 9629 9630// GoogleCloudDialogflowV2beta1SentimentAnalysisResult: The result of 9631// sentiment analysis. Sentiment analysis inspects user input and 9632// identifies the prevailing subjective opinion, especially to determine 9633// a user's attitude as positive, negative, or neutral. For 9634// Participants.DetectIntent, it needs to be configured in 9635// DetectIntentRequest.query_params. For 9636// Participants.StreamingDetectIntent, it needs to be configured in 9637// StreamingDetectIntentRequest.query_params. And for 9638// Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, 9639// it needs to be configured in 9640// ConversationProfile.human_agent_assistant_config 9641type GoogleCloudDialogflowV2beta1SentimentAnalysisResult struct { 9642 // QueryTextSentiment: The sentiment analysis result for `query_text`. 9643 QueryTextSentiment *GoogleCloudDialogflowV2beta1Sentiment `json:"queryTextSentiment,omitempty"` 9644 9645 // ForceSendFields is a list of field names (e.g. "QueryTextSentiment") 9646 // to unconditionally include in API requests. By default, fields with 9647 // empty values are omitted from API requests. However, any non-pointer, 9648 // non-interface field appearing in ForceSendFields will be sent to the 9649 // server regardless of whether the field is empty or not. This may be 9650 // used to include empty fields in Patch requests. 9651 ForceSendFields []string `json:"-"` 9652 9653 // NullFields is a list of field names (e.g. "QueryTextSentiment") to 9654 // include in API requests with the JSON null value. By default, fields 9655 // with empty values are omitted from API requests. However, any field 9656 // with an empty value appearing in NullFields will be sent to the 9657 // server as null. It is an error if a field in this list has a 9658 // non-empty value. This may be used to include null fields in Patch 9659 // requests. 9660 NullFields []string `json:"-"` 9661} 9662 9663func (s *GoogleCloudDialogflowV2beta1SentimentAnalysisResult) MarshalJSON() ([]byte, error) { 9664 type NoMethod GoogleCloudDialogflowV2beta1SentimentAnalysisResult 9665 raw := NoMethod(*s) 9666 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9667} 9668 9669// GoogleCloudDialogflowV2beta1SessionEntityType: A session represents a 9670// conversation between a Dialogflow agent and an end-user. You can 9671// create special entities, called session entities, during a session. 9672// Session entities can extend or replace custom entity types and only 9673// exist during the session that they were created for. All session 9674// data, including session entities, is stored by Dialogflow for 20 9675// minutes. For more information, see the [session entity 9676// guide](https://cloud.google.com/dialogflow/docs/entities-session). 9677type GoogleCloudDialogflowV2beta1SessionEntityType struct { 9678 // Entities: Required. The collection of entities associated with this 9679 // session entity type. 9680 Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"` 9681 9682 // EntityOverrideMode: Required. Indicates whether the additional data 9683 // should override or supplement the custom entity type definition. 9684 // 9685 // Possible values: 9686 // "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value 9687 // should be never used. 9688 // "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session 9689 // entities overrides the collection of entities in the corresponding 9690 // custom entity type. 9691 // "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session 9692 // entities extends the collection of entities in the corresponding 9693 // custom entity type. Note: Even in this override mode calls to 9694 // `ListSessionEntityTypes`, `GetSessionEntityType`, 9695 // `CreateSessionEntityType` and `UpdateSessionEntityType` only return 9696 // the additional entities added in this session entity type. If you 9697 // want to get the supplemented list, please call 9698 // EntityTypes.GetEntityType on the custom entity type and merge. 9699 EntityOverrideMode string `json:"entityOverrideMode,omitempty"` 9700 9701 // Name: Required. The unique identifier of this session entity type. 9702 // Supported formats: - `projects//agent/sessions//entityTypes/` - 9703 // `projects//locations//agent/sessions//entityTypes/` - 9704 // `projects//agent/environments//users//sessions//entityTypes/` - 9705 // `projects//locations//agent/environments/ 9706 // /users//sessions//entityTypes/` If `Location ID` is not specified we 9707 // assume default 'us' location. If `Environment ID` is not specified, 9708 // we assume default 'draft' environment. If `User ID` is not specified, 9709 // we assume default '-' user. `` must be the display name of an 9710 // existing entity type in the same agent that will be overridden or 9711 // supplemented. 9712 Name string `json:"name,omitempty"` 9713 9714 // ForceSendFields is a list of field names (e.g. "Entities") to 9715 // unconditionally include in API requests. By default, fields with 9716 // empty values are omitted from API requests. However, any non-pointer, 9717 // non-interface field appearing in ForceSendFields will be sent to the 9718 // server regardless of whether the field is empty or not. This may be 9719 // used to include empty fields in Patch requests. 9720 ForceSendFields []string `json:"-"` 9721 9722 // NullFields is a list of field names (e.g. "Entities") to include in 9723 // API requests with the JSON null value. By default, fields with empty 9724 // values are omitted from API requests. However, any field with an 9725 // empty value appearing in NullFields will be sent to the server as 9726 // null. It is an error if a field in this list has a non-empty value. 9727 // This may be used to include null fields in Patch requests. 9728 NullFields []string `json:"-"` 9729} 9730 9731func (s *GoogleCloudDialogflowV2beta1SessionEntityType) MarshalJSON() ([]byte, error) { 9732 type NoMethod GoogleCloudDialogflowV2beta1SessionEntityType 9733 raw := NoMethod(*s) 9734 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9735} 9736 9737// GoogleCloudDialogflowV2beta1SmartMessagingEntry: Smart Messaging 9738// Entry resource. 9739type GoogleCloudDialogflowV2beta1SmartMessagingEntry struct { 9740 // MessageInfo: Output only. Metadata of the message entry 9741 MessageInfo *GoogleCloudDialogflowV2beta1SmartMessagingEntryInfo `json:"messageInfo,omitempty"` 9742 9743 // Name: The unique identifier of this message entry. Required for 9744 // [Documents.GetSmartMessagingEntry], 9745 // [Documents.CreateSmartMessagingEntry], 9746 // [Documents.UpdateSmartMessagingEntry], and 9747 // [Documents.DeleteSmartMessagingEntry]. Format: 9748 // `projects//knowledgeBases//documents//smartMessagingEntries/` 9749 Name string `json:"name,omitempty"` 9750 9751 // RawText: Required. The raw text of the message. 9752 RawText string `json:"rawText,omitempty"` 9753 9754 // State: Required. Smart Messaging Entry's enabled/disabled state. 9755 // 9756 // Possible values: 9757 // "SMART_MESSAGING_ENTRY_STATE_UNSPECIFIED" - State unspecified. 9758 // "ENABLED" - This smart reply message is enabled and used when 9759 // generating suggestions. 9760 // "DISABLED" - This smart reply message is disabled and is not used 9761 // when generating suggestions. 9762 State string `json:"state,omitempty"` 9763 9764 // ForceSendFields is a list of field names (e.g. "MessageInfo") to 9765 // unconditionally include in API requests. By default, fields with 9766 // empty values are omitted from API requests. However, any non-pointer, 9767 // non-interface field appearing in ForceSendFields will be sent to the 9768 // server regardless of whether the field is empty or not. This may be 9769 // used to include empty fields in Patch requests. 9770 ForceSendFields []string `json:"-"` 9771 9772 // NullFields is a list of field names (e.g. "MessageInfo") to include 9773 // in API requests with the JSON null value. By default, fields with 9774 // empty values are omitted from API requests. However, any field with 9775 // an empty value appearing in NullFields will be sent to the server as 9776 // null. It is an error if a field in this list has a non-empty value. 9777 // This may be used to include null fields in Patch requests. 9778 NullFields []string `json:"-"` 9779} 9780 9781func (s *GoogleCloudDialogflowV2beta1SmartMessagingEntry) MarshalJSON() ([]byte, error) { 9782 type NoMethod GoogleCloudDialogflowV2beta1SmartMessagingEntry 9783 raw := NoMethod(*s) 9784 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9785} 9786 9787// GoogleCloudDialogflowV2beta1SmartMessagingEntryInfo: Smart messaging 9788// entry info. 9789type GoogleCloudDialogflowV2beta1SmartMessagingEntryInfo struct { 9790 // CreationMethod: Output only. Method of how the smart messaging entry 9791 // was created. When the smart messaging entry was generated from 9792 // GenerateDocument, the value is AUTOMATIC; when the entry was manually 9793 // added through CreateSmartMessagingEntry, the value is MANUAL. 9794 // 9795 // Possible values: 9796 // "CREATION_METHOD_UNSPECIFIED" - The creation method of the smart 9797 // messaging entry is unspecified. The value is unused. 9798 // "AUTOMATIC" - The smart messaging entry was generated automatically 9799 // from backend pipeline. 9800 // "MANUAL" - The smart messaging entry was added manually. 9801 CreationMethod string `json:"creationMethod,omitempty"` 9802 9803 // OccurrenceCount: The number of times an entry's message text has been 9804 // uttered 9805 OccurrenceCount int64 `json:"occurrenceCount,omitempty"` 9806 9807 // ForceSendFields is a list of field names (e.g. "CreationMethod") to 9808 // unconditionally include in API requests. By default, fields with 9809 // empty values are omitted from API requests. However, any non-pointer, 9810 // non-interface field appearing in ForceSendFields will be sent to the 9811 // server regardless of whether the field is empty or not. This may be 9812 // used to include empty fields in Patch requests. 9813 ForceSendFields []string `json:"-"` 9814 9815 // NullFields is a list of field names (e.g. "CreationMethod") to 9816 // include in API requests with the JSON null value. By default, fields 9817 // with empty values are omitted from API requests. However, any field 9818 // with an empty value appearing in NullFields will be sent to the 9819 // server as null. It is an error if a field in this list has a 9820 // non-empty value. This may be used to include null fields in Patch 9821 // requests. 9822 NullFields []string `json:"-"` 9823} 9824 9825func (s *GoogleCloudDialogflowV2beta1SmartMessagingEntryInfo) MarshalJSON() ([]byte, error) { 9826 type NoMethod GoogleCloudDialogflowV2beta1SmartMessagingEntryInfo 9827 raw := NoMethod(*s) 9828 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9829} 9830 9831// GoogleCloudDialogflowV2beta1WebhookRequest: The request message for a 9832// webhook call. 9833type GoogleCloudDialogflowV2beta1WebhookRequest struct { 9834 // AlternativeQueryResults: Alternative query results from 9835 // KnowledgeService. 9836 AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"` 9837 9838 // OriginalDetectIntentRequest: Optional. The contents of the original 9839 // request that was passed to `[Streaming]DetectIntent` call. 9840 OriginalDetectIntentRequest *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"` 9841 9842 // QueryResult: The result of the conversational query or event 9843 // processing. Contains the same value as 9844 // `[Streaming]DetectIntentResponse.query_result`. 9845 QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"` 9846 9847 // ResponseId: The unique identifier of the response. Contains the same 9848 // value as `[Streaming]DetectIntentResponse.response_id`. 9849 ResponseId string `json:"responseId,omitempty"` 9850 9851 // Session: The unique identifier of detectIntent request session. Can 9852 // be used to identify end-user inside webhook implementation. Supported 9853 // formats: - `projects//agent/sessions/, - 9854 // `projects//locations//agent/sessions/`, - 9855 // `projects//agent/environments//users//sessions/`, - 9856 // `projects//locations//agent/environments//users//sessions/`, 9857 Session string `json:"session,omitempty"` 9858 9859 // ForceSendFields is a list of field names (e.g. 9860 // "AlternativeQueryResults") to unconditionally include in API 9861 // requests. By default, fields with empty values are omitted from API 9862 // requests. However, any non-pointer, non-interface field appearing in 9863 // ForceSendFields will be sent to the server regardless of whether the 9864 // field is empty or not. This may be used to include empty fields in 9865 // Patch requests. 9866 ForceSendFields []string `json:"-"` 9867 9868 // NullFields is a list of field names (e.g. "AlternativeQueryResults") 9869 // to include in API requests with the JSON null value. By default, 9870 // fields with empty values are omitted from API requests. However, any 9871 // field with an empty value appearing in NullFields will be sent to the 9872 // server as null. It is an error if a field in this list has a 9873 // non-empty value. This may be used to include null fields in Patch 9874 // requests. 9875 NullFields []string `json:"-"` 9876} 9877 9878func (s *GoogleCloudDialogflowV2beta1WebhookRequest) MarshalJSON() ([]byte, error) { 9879 type NoMethod GoogleCloudDialogflowV2beta1WebhookRequest 9880 raw := NoMethod(*s) 9881 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9882} 9883 9884// GoogleCloudDialogflowV2beta1WebhookResponse: The response message for 9885// a webhook call. This response is validated by the Dialogflow server. 9886// If validation fails, an error will be returned in the 9887// QueryResult.diagnostic_info field. Setting JSON fields to an empty 9888// value with the wrong type is a common error. To avoid this error: - 9889// Use "" for empty strings - Use `{}` or `null` for empty objects - 9890// Use `[]` or `null` for empty arrays For more information, see the 9891// [Protocol Buffers Language 9892// Guide](https://developers.google.com/protocol-buffers/docs/proto3#json 9893// ). 9894type GoogleCloudDialogflowV2beta1WebhookResponse struct { 9895 // EndInteraction: Optional. Indicates that this intent ends an 9896 // interaction. Some integrations (e.g., Actions on Google or Dialogflow 9897 // phone gateway) use this information to close interaction with an end 9898 // user. Default is false. 9899 EndInteraction bool `json:"endInteraction,omitempty"` 9900 9901 // FollowupEventInput: Optional. Invokes the supplied events. When this 9902 // field is set, Dialogflow ignores the `fulfillment_text`, 9903 // `fulfillment_messages`, and `payload` fields. 9904 FollowupEventInput *GoogleCloudDialogflowV2beta1EventInput `json:"followupEventInput,omitempty"` 9905 9906 // FulfillmentMessages: Optional. The rich response messages intended 9907 // for the end-user. When provided, Dialogflow uses this field to 9908 // populate QueryResult.fulfillment_messages sent to the integration or 9909 // API caller. 9910 FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"` 9911 9912 // FulfillmentText: Optional. The text response message intended for the 9913 // end-user. It is recommended to use 9914 // `fulfillment_messages.text.text[0]` instead. When provided, 9915 // Dialogflow uses this field to populate QueryResult.fulfillment_text 9916 // sent to the integration or API caller. 9917 FulfillmentText string `json:"fulfillmentText,omitempty"` 9918 9919 // OutputContexts: Optional. The collection of output contexts that will 9920 // overwrite currently active contexts for the session and reset their 9921 // lifespans. When provided, Dialogflow uses this field to populate 9922 // QueryResult.output_contexts sent to the integration or API caller. 9923 OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"` 9924 9925 // Payload: Optional. This field can be used to pass custom data from 9926 // your webhook to the integration or API caller. Arbitrary JSON objects 9927 // are supported. When provided, Dialogflow uses this field to populate 9928 // QueryResult.webhook_payload sent to the integration or API caller. 9929 // This field is also used by the [Google Assistant 9930 // integration](https://cloud.google.com/dialogflow/docs/integrations/aog 9931 // ) for rich response messages. See the format definition at [Google 9932 // Assistant Dialogflow webhook 9933 // format](https://developers.google.com/assistant/actions/build/json/dia 9934 // logflow-webhook-json) 9935 Payload googleapi.RawMessage `json:"payload,omitempty"` 9936 9937 // SessionEntityTypes: Optional. Additional session entity types to 9938 // replace or extend developer entity types with. The entity synonyms 9939 // apply to all languages and persist for the session. Setting this data 9940 // from a webhook overwrites the session entity types that have been set 9941 // using `detectIntent`, `streamingDetectIntent` or SessionEntityType 9942 // management methods. 9943 SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"` 9944 9945 // Source: Optional. A custom field used to identify the webhook source. 9946 // Arbitrary strings are supported. When provided, Dialogflow uses this 9947 // field to populate QueryResult.webhook_source sent to the integration 9948 // or API caller. 9949 Source string `json:"source,omitempty"` 9950 9951 // ForceSendFields is a list of field names (e.g. "EndInteraction") to 9952 // unconditionally include in API requests. By default, fields with 9953 // empty values are omitted from API requests. However, any non-pointer, 9954 // non-interface field appearing in ForceSendFields will be sent to the 9955 // server regardless of whether the field is empty or not. This may be 9956 // used to include empty fields in Patch requests. 9957 ForceSendFields []string `json:"-"` 9958 9959 // NullFields is a list of field names (e.g. "EndInteraction") to 9960 // include in API requests with the JSON null value. By default, fields 9961 // with empty values are omitted from API requests. However, any field 9962 // with an empty value appearing in NullFields will be sent to the 9963 // server as null. It is an error if a field in this list has a 9964 // non-empty value. This may be used to include null fields in Patch 9965 // requests. 9966 NullFields []string `json:"-"` 9967} 9968 9969func (s *GoogleCloudDialogflowV2beta1WebhookResponse) MarshalJSON() ([]byte, error) { 9970 type NoMethod GoogleCloudDialogflowV2beta1WebhookResponse 9971 raw := NoMethod(*s) 9972 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9973} 9974 9975// GoogleCloudDialogflowV3alpha1ExportAgentResponse: The response 9976// message for Agents.ExportAgent. 9977type GoogleCloudDialogflowV3alpha1ExportAgentResponse struct { 9978 // AgentContent: Uncompressed raw byte content for agent. 9979 AgentContent string `json:"agentContent,omitempty"` 9980 9981 // AgentUri: The URI to a file containing the exported agent. This field 9982 // is populated only if `agent_uri` is specified in ExportAgentRequest. 9983 AgentUri string `json:"agentUri,omitempty"` 9984 9985 // ForceSendFields is a list of field names (e.g. "AgentContent") to 9986 // unconditionally include in API requests. By default, fields with 9987 // empty values are omitted from API requests. However, any non-pointer, 9988 // non-interface field appearing in ForceSendFields will be sent to the 9989 // server regardless of whether the field is empty or not. This may be 9990 // used to include empty fields in Patch requests. 9991 ForceSendFields []string `json:"-"` 9992 9993 // NullFields is a list of field names (e.g. "AgentContent") to include 9994 // in API requests with the JSON null value. By default, fields with 9995 // empty values are omitted from API requests. However, any field with 9996 // an empty value appearing in NullFields will be sent to the server as 9997 // null. It is an error if a field in this list has a non-empty value. 9998 // This may be used to include null fields in Patch requests. 9999 NullFields []string `json:"-"` 10000} 10001 10002func (s *GoogleCloudDialogflowV3alpha1ExportAgentResponse) MarshalJSON() ([]byte, error) { 10003 type NoMethod GoogleCloudDialogflowV3alpha1ExportAgentResponse 10004 raw := NoMethod(*s) 10005 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10006} 10007 10008// GoogleCloudDialogflowV3alpha1ExportTestCasesMetadata: Metadata 10009// returned for the TestCases.ExportTestCases long running operation. 10010type GoogleCloudDialogflowV3alpha1ExportTestCasesMetadata struct { 10011} 10012 10013// GoogleCloudDialogflowV3alpha1ExportTestCasesResponse: The response 10014// message for TestCases.ExportTestCases. 10015type GoogleCloudDialogflowV3alpha1ExportTestCasesResponse struct { 10016 // Content: Uncompressed raw byte content for test cases. 10017 Content string `json:"content,omitempty"` 10018 10019 // GcsUri: The URI to a file containing the exported test cases. This 10020 // field is populated only if `gcs_uri` is specified in 10021 // ExportTestCasesRequest. 10022 GcsUri string `json:"gcsUri,omitempty"` 10023 10024 // ForceSendFields is a list of field names (e.g. "Content") to 10025 // unconditionally include in API requests. By default, fields with 10026 // empty values are omitted from API requests. However, any non-pointer, 10027 // non-interface field appearing in ForceSendFields will be sent to the 10028 // server regardless of whether the field is empty or not. This may be 10029 // used to include empty fields in Patch requests. 10030 ForceSendFields []string `json:"-"` 10031 10032 // NullFields is a list of field names (e.g. "Content") to include in 10033 // API requests with the JSON null value. By default, fields with empty 10034 // values are omitted from API requests. However, any field with an 10035 // empty value appearing in NullFields will be sent to the server as 10036 // null. It is an error if a field in this list has a non-empty value. 10037 // This may be used to include null fields in Patch requests. 10038 NullFields []string `json:"-"` 10039} 10040 10041func (s *GoogleCloudDialogflowV3alpha1ExportTestCasesResponse) MarshalJSON() ([]byte, error) { 10042 type NoMethod GoogleCloudDialogflowV3alpha1ExportTestCasesResponse 10043 raw := NoMethod(*s) 10044 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10045} 10046 10047// GoogleCloudDialogflowV3alpha1ImportAgentResponse: The response 10048// message for Agents.ImportAgent. 10049type GoogleCloudDialogflowV3alpha1ImportAgentResponse struct { 10050 // Agent: The unique identifier of the new agent. Format: 10051 // `projects//locations//agents/`. 10052 Agent string `json:"agent,omitempty"` 10053 10054 // ForceSendFields is a list of field names (e.g. "Agent") to 10055 // unconditionally include in API requests. By default, fields with 10056 // empty values are omitted from API requests. However, any non-pointer, 10057 // non-interface field appearing in ForceSendFields will be sent to the 10058 // server regardless of whether the field is empty or not. This may be 10059 // used to include empty fields in Patch requests. 10060 ForceSendFields []string `json:"-"` 10061 10062 // NullFields is a list of field names (e.g. "Agent") to include in API 10063 // requests with the JSON null value. By default, fields with empty 10064 // values are omitted from API requests. However, any field with an 10065 // empty value appearing in NullFields will be sent to the server as 10066 // null. It is an error if a field in this list has a non-empty value. 10067 // This may be used to include null fields in Patch requests. 10068 NullFields []string `json:"-"` 10069} 10070 10071func (s *GoogleCloudDialogflowV3alpha1ImportAgentResponse) MarshalJSON() ([]byte, error) { 10072 type NoMethod GoogleCloudDialogflowV3alpha1ImportAgentResponse 10073 raw := NoMethod(*s) 10074 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10075} 10076 10077// GoogleCloudDialogflowV3alpha1ImportTestCasesMetadata: Metadata 10078// returned for the TestCases.ImportTestCases long running operation. 10079type GoogleCloudDialogflowV3alpha1ImportTestCasesMetadata struct { 10080} 10081 10082// GoogleCloudDialogflowV3alpha1ImportTestCasesResponse: The response 10083// message for TestCases.ImportTestCases. 10084type GoogleCloudDialogflowV3alpha1ImportTestCasesResponse struct { 10085 // Names: The unique identifiers of the new test cases. Format: 10086 // `projects//locations//agents//testCases/`. 10087 Names []string `json:"names,omitempty"` 10088 10089 // ForceSendFields is a list of field names (e.g. "Names") to 10090 // unconditionally include in API requests. By default, fields with 10091 // empty values are omitted from API requests. However, any non-pointer, 10092 // non-interface field appearing in ForceSendFields will be sent to the 10093 // server regardless of whether the field is empty or not. This may be 10094 // used to include empty fields in Patch requests. 10095 ForceSendFields []string `json:"-"` 10096 10097 // NullFields is a list of field names (e.g. "Names") to include in API 10098 // requests with the JSON null value. By default, fields with empty 10099 // values are omitted from API requests. However, any field with an 10100 // empty value appearing in NullFields will be sent to the server as 10101 // null. It is an error if a field in this list has a non-empty value. 10102 // This may be used to include null fields in Patch requests. 10103 NullFields []string `json:"-"` 10104} 10105 10106func (s *GoogleCloudDialogflowV3alpha1ImportTestCasesResponse) MarshalJSON() ([]byte, error) { 10107 type NoMethod GoogleCloudDialogflowV3alpha1ImportTestCasesResponse 10108 raw := NoMethod(*s) 10109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10110} 10111 10112// GoogleLongrunningListOperationsResponse: The response message for 10113// Operations.ListOperations. 10114type GoogleLongrunningListOperationsResponse struct { 10115 // NextPageToken: The standard List next-page token. 10116 NextPageToken string `json:"nextPageToken,omitempty"` 10117 10118 // Operations: A list of operations that matches the specified filter in 10119 // the request. 10120 Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` 10121 10122 // ServerResponse contains the HTTP response code and headers from the 10123 // server. 10124 googleapi.ServerResponse `json:"-"` 10125 10126 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 10127 // unconditionally include in API requests. By default, fields with 10128 // empty values are omitted from API requests. However, any non-pointer, 10129 // non-interface field appearing in ForceSendFields will be sent to the 10130 // server regardless of whether the field is empty or not. This may be 10131 // used to include empty fields in Patch requests. 10132 ForceSendFields []string `json:"-"` 10133 10134 // NullFields is a list of field names (e.g. "NextPageToken") to include 10135 // in API requests with the JSON null value. By default, fields with 10136 // empty values are omitted from API requests. However, any field with 10137 // an empty value appearing in NullFields will be sent to the server as 10138 // null. It is an error if a field in this list has a non-empty value. 10139 // This may be used to include null fields in Patch requests. 10140 NullFields []string `json:"-"` 10141} 10142 10143func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { 10144 type NoMethod GoogleLongrunningListOperationsResponse 10145 raw := NoMethod(*s) 10146 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10147} 10148 10149// GoogleLongrunningOperation: This resource represents a long-running 10150// operation that is the result of a network API call. 10151type GoogleLongrunningOperation struct { 10152 // Done: If the value is `false`, it means the operation is still in 10153 // progress. If `true`, the operation is completed, and either `error` 10154 // or `response` is available. 10155 Done bool `json:"done,omitempty"` 10156 10157 // Error: The error result of the operation in case of failure or 10158 // cancellation. 10159 Error *GoogleRpcStatus `json:"error,omitempty"` 10160 10161 // Metadata: Service-specific metadata associated with the operation. It 10162 // typically contains progress information and common metadata such as 10163 // create time. Some services might not provide such metadata. Any 10164 // method that returns a long-running operation should document the 10165 // metadata type, if any. 10166 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 10167 10168 // Name: The server-assigned name, which is only unique within the same 10169 // service that originally returns it. If you use the default HTTP 10170 // mapping, the `name` should be a resource name ending with 10171 // `operations/{unique_id}`. 10172 Name string `json:"name,omitempty"` 10173 10174 // Response: The normal response of the operation in case of success. If 10175 // the original method returns no data on success, such as `Delete`, the 10176 // response is `google.protobuf.Empty`. If the original method is 10177 // standard `Get`/`Create`/`Update`, the response should be the 10178 // resource. For other methods, the response should have the type 10179 // `XxxResponse`, where `Xxx` is the original method name. For example, 10180 // if the original method name is `TakeSnapshot()`, the inferred 10181 // response type is `TakeSnapshotResponse`. 10182 Response googleapi.RawMessage `json:"response,omitempty"` 10183 10184 // ServerResponse contains the HTTP response code and headers from the 10185 // server. 10186 googleapi.ServerResponse `json:"-"` 10187 10188 // ForceSendFields is a list of field names (e.g. "Done") to 10189 // unconditionally include in API requests. By default, fields with 10190 // empty values are omitted from API requests. However, any non-pointer, 10191 // non-interface field appearing in ForceSendFields will be sent to the 10192 // server regardless of whether the field is empty or not. This may be 10193 // used to include empty fields in Patch requests. 10194 ForceSendFields []string `json:"-"` 10195 10196 // NullFields is a list of field names (e.g. "Done") to include in API 10197 // requests with the JSON null value. By default, fields with empty 10198 // values are omitted from API requests. However, any field with an 10199 // empty value appearing in NullFields will be sent to the server as 10200 // null. It is an error if a field in this list has a non-empty value. 10201 // This may be used to include null fields in Patch requests. 10202 NullFields []string `json:"-"` 10203} 10204 10205func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { 10206 type NoMethod GoogleLongrunningOperation 10207 raw := NoMethod(*s) 10208 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10209} 10210 10211// GoogleProtobufEmpty: A generic empty message that you can re-use to 10212// avoid defining duplicated empty messages in your APIs. A typical 10213// example is to use it as the request or the response type of an API 10214// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) 10215// returns (google.protobuf.Empty); } The JSON representation for 10216// `Empty` is empty JSON object `{}`. 10217type GoogleProtobufEmpty struct { 10218 // ServerResponse contains the HTTP response code and headers from the 10219 // server. 10220 googleapi.ServerResponse `json:"-"` 10221} 10222 10223// GoogleRpcStatus: The `Status` type defines a logical error model that 10224// is suitable for different programming environments, including REST 10225// APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). 10226// Each `Status` message contains three pieces of data: error code, 10227// error message, and error details. You can find out more about this 10228// error model and how to work with it in the [API Design 10229// Guide](https://cloud.google.com/apis/design/errors). 10230type GoogleRpcStatus struct { 10231 // Code: The status code, which should be an enum value of 10232 // google.rpc.Code. 10233 Code int64 `json:"code,omitempty"` 10234 10235 // Details: A list of messages that carry the error details. There is a 10236 // common set of message types for APIs to use. 10237 Details []googleapi.RawMessage `json:"details,omitempty"` 10238 10239 // Message: A developer-facing error message, which should be in 10240 // English. Any user-facing error message should be localized and sent 10241 // in the google.rpc.Status.details field, or localized by the client. 10242 Message string `json:"message,omitempty"` 10243 10244 // ForceSendFields is a list of field names (e.g. "Code") to 10245 // unconditionally include in API requests. By default, fields with 10246 // empty values are omitted from API requests. However, any non-pointer, 10247 // non-interface field appearing in ForceSendFields will be sent to the 10248 // server regardless of whether the field is empty or not. This may be 10249 // used to include empty fields in Patch requests. 10250 ForceSendFields []string `json:"-"` 10251 10252 // NullFields is a list of field names (e.g. "Code") to include in API 10253 // requests with the JSON null value. By default, fields with empty 10254 // values are omitted from API requests. However, any field with an 10255 // empty value appearing in NullFields will be sent to the server as 10256 // null. It is an error if a field in this list has a non-empty value. 10257 // This may be used to include null fields in Patch requests. 10258 NullFields []string `json:"-"` 10259} 10260 10261func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 10262 type NoMethod GoogleRpcStatus 10263 raw := NoMethod(*s) 10264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10265} 10266 10267// GoogleTypeLatLng: An object representing a latitude/longitude pair. 10268// This is expressed as a pair of doubles representing degrees latitude 10269// and degrees longitude. Unless specified otherwise, this must conform 10270// to the WGS84 standard. Values must be within normalized ranges. 10271type GoogleTypeLatLng struct { 10272 // Latitude: The latitude in degrees. It must be in the range [-90.0, 10273 // +90.0]. 10274 Latitude float64 `json:"latitude,omitempty"` 10275 10276 // Longitude: The longitude in degrees. It must be in the range [-180.0, 10277 // +180.0]. 10278 Longitude float64 `json:"longitude,omitempty"` 10279 10280 // ForceSendFields is a list of field names (e.g. "Latitude") to 10281 // unconditionally include in API requests. By default, fields with 10282 // empty values are omitted from API requests. However, any non-pointer, 10283 // non-interface field appearing in ForceSendFields will be sent to the 10284 // server regardless of whether the field is empty or not. This may be 10285 // used to include empty fields in Patch requests. 10286 ForceSendFields []string `json:"-"` 10287 10288 // NullFields is a list of field names (e.g. "Latitude") to include in 10289 // API requests with the JSON null value. By default, fields with empty 10290 // values are omitted from API requests. However, any field with an 10291 // empty value appearing in NullFields will be sent to the server as 10292 // null. It is an error if a field in this list has a non-empty value. 10293 // This may be used to include null fields in Patch requests. 10294 NullFields []string `json:"-"` 10295} 10296 10297func (s *GoogleTypeLatLng) MarshalJSON() ([]byte, error) { 10298 type NoMethod GoogleTypeLatLng 10299 raw := NoMethod(*s) 10300 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10301} 10302 10303func (s *GoogleTypeLatLng) UnmarshalJSON(data []byte) error { 10304 type NoMethod GoogleTypeLatLng 10305 var s1 struct { 10306 Latitude gensupport.JSONFloat64 `json:"latitude"` 10307 Longitude gensupport.JSONFloat64 `json:"longitude"` 10308 *NoMethod 10309 } 10310 s1.NoMethod = (*NoMethod)(s) 10311 if err := json.Unmarshal(data, &s1); err != nil { 10312 return err 10313 } 10314 s.Latitude = float64(s1.Latitude) 10315 s.Longitude = float64(s1.Longitude) 10316 return nil 10317} 10318 10319// method id "dialogflow.projects.locations.agents.create": 10320 10321type ProjectsLocationsAgentsCreateCall struct { 10322 s *Service 10323 parent string 10324 googleclouddialogflowcxv3beta1agent *GoogleCloudDialogflowCxV3beta1Agent 10325 urlParams_ gensupport.URLParams 10326 ctx_ context.Context 10327 header_ http.Header 10328} 10329 10330// Create: Creates an agent in the specified location. 10331func (r *ProjectsLocationsAgentsService) Create(parent string, googleclouddialogflowcxv3beta1agent *GoogleCloudDialogflowCxV3beta1Agent) *ProjectsLocationsAgentsCreateCall { 10332 c := &ProjectsLocationsAgentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10333 c.parent = parent 10334 c.googleclouddialogflowcxv3beta1agent = googleclouddialogflowcxv3beta1agent 10335 return c 10336} 10337 10338// Fields allows partial responses to be retrieved. See 10339// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10340// for more information. 10341func (c *ProjectsLocationsAgentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsCreateCall { 10342 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10343 return c 10344} 10345 10346// Context sets the context to be used in this call's Do method. Any 10347// pending HTTP request will be aborted if the provided context is 10348// canceled. 10349func (c *ProjectsLocationsAgentsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsCreateCall { 10350 c.ctx_ = ctx 10351 return c 10352} 10353 10354// Header returns an http.Header that can be modified by the caller to 10355// add HTTP headers to the request. 10356func (c *ProjectsLocationsAgentsCreateCall) Header() http.Header { 10357 if c.header_ == nil { 10358 c.header_ = make(http.Header) 10359 } 10360 return c.header_ 10361} 10362 10363func (c *ProjectsLocationsAgentsCreateCall) doRequest(alt string) (*http.Response, error) { 10364 reqHeaders := make(http.Header) 10365 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10366 for k, v := range c.header_ { 10367 reqHeaders[k] = v 10368 } 10369 reqHeaders.Set("User-Agent", c.s.userAgent()) 10370 var body io.Reader = nil 10371 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1agent) 10372 if err != nil { 10373 return nil, err 10374 } 10375 reqHeaders.Set("Content-Type", "application/json") 10376 c.urlParams_.Set("alt", alt) 10377 c.urlParams_.Set("prettyPrint", "false") 10378 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/agents") 10379 urls += "?" + c.urlParams_.Encode() 10380 req, err := http.NewRequest("POST", urls, body) 10381 if err != nil { 10382 return nil, err 10383 } 10384 req.Header = reqHeaders 10385 googleapi.Expand(req.URL, map[string]string{ 10386 "parent": c.parent, 10387 }) 10388 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10389} 10390 10391// Do executes the "dialogflow.projects.locations.agents.create" call. 10392// Exactly one of *GoogleCloudDialogflowCxV3beta1Agent or error will be 10393// non-nil. Any non-2xx status code is an error. Response headers are in 10394// either *GoogleCloudDialogflowCxV3beta1Agent.ServerResponse.Header or 10395// (if a response was returned at all) in 10396// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10397// whether the returned error was because http.StatusNotModified was 10398// returned. 10399func (c *ProjectsLocationsAgentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Agent, error) { 10400 gensupport.SetOptions(c.urlParams_, opts...) 10401 res, err := c.doRequest("json") 10402 if res != nil && res.StatusCode == http.StatusNotModified { 10403 if res.Body != nil { 10404 res.Body.Close() 10405 } 10406 return nil, &googleapi.Error{ 10407 Code: res.StatusCode, 10408 Header: res.Header, 10409 } 10410 } 10411 if err != nil { 10412 return nil, err 10413 } 10414 defer googleapi.CloseBody(res) 10415 if err := googleapi.CheckResponse(res); err != nil { 10416 return nil, err 10417 } 10418 ret := &GoogleCloudDialogflowCxV3beta1Agent{ 10419 ServerResponse: googleapi.ServerResponse{ 10420 Header: res.Header, 10421 HTTPStatusCode: res.StatusCode, 10422 }, 10423 } 10424 target := &ret 10425 if err := gensupport.DecodeResponse(target, res); err != nil { 10426 return nil, err 10427 } 10428 return ret, nil 10429 // { 10430 // "description": "Creates an agent in the specified location.", 10431 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents", 10432 // "httpMethod": "POST", 10433 // "id": "dialogflow.projects.locations.agents.create", 10434 // "parameterOrder": [ 10435 // "parent" 10436 // ], 10437 // "parameters": { 10438 // "parent": { 10439 // "description": "Required. The location to create a agent for. Format: `projects//locations/`.", 10440 // "location": "path", 10441 // "pattern": "^projects/[^/]+/locations/[^/]+$", 10442 // "required": true, 10443 // "type": "string" 10444 // } 10445 // }, 10446 // "path": "v3beta1/{+parent}/agents", 10447 // "request": { 10448 // "$ref": "GoogleCloudDialogflowCxV3beta1Agent" 10449 // }, 10450 // "response": { 10451 // "$ref": "GoogleCloudDialogflowCxV3beta1Agent" 10452 // }, 10453 // "scopes": [ 10454 // "https://www.googleapis.com/auth/cloud-platform", 10455 // "https://www.googleapis.com/auth/dialogflow" 10456 // ] 10457 // } 10458 10459} 10460 10461// method id "dialogflow.projects.locations.agents.delete": 10462 10463type ProjectsLocationsAgentsDeleteCall struct { 10464 s *Service 10465 name string 10466 urlParams_ gensupport.URLParams 10467 ctx_ context.Context 10468 header_ http.Header 10469} 10470 10471// Delete: Deletes the specified agent. 10472func (r *ProjectsLocationsAgentsService) Delete(name string) *ProjectsLocationsAgentsDeleteCall { 10473 c := &ProjectsLocationsAgentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10474 c.name = name 10475 return c 10476} 10477 10478// Fields allows partial responses to be retrieved. See 10479// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10480// for more information. 10481func (c *ProjectsLocationsAgentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsDeleteCall { 10482 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10483 return c 10484} 10485 10486// Context sets the context to be used in this call's Do method. Any 10487// pending HTTP request will be aborted if the provided context is 10488// canceled. 10489func (c *ProjectsLocationsAgentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsDeleteCall { 10490 c.ctx_ = ctx 10491 return c 10492} 10493 10494// Header returns an http.Header that can be modified by the caller to 10495// add HTTP headers to the request. 10496func (c *ProjectsLocationsAgentsDeleteCall) Header() http.Header { 10497 if c.header_ == nil { 10498 c.header_ = make(http.Header) 10499 } 10500 return c.header_ 10501} 10502 10503func (c *ProjectsLocationsAgentsDeleteCall) doRequest(alt string) (*http.Response, error) { 10504 reqHeaders := make(http.Header) 10505 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10506 for k, v := range c.header_ { 10507 reqHeaders[k] = v 10508 } 10509 reqHeaders.Set("User-Agent", c.s.userAgent()) 10510 var body io.Reader = nil 10511 c.urlParams_.Set("alt", alt) 10512 c.urlParams_.Set("prettyPrint", "false") 10513 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 10514 urls += "?" + c.urlParams_.Encode() 10515 req, err := http.NewRequest("DELETE", urls, body) 10516 if err != nil { 10517 return nil, err 10518 } 10519 req.Header = reqHeaders 10520 googleapi.Expand(req.URL, map[string]string{ 10521 "name": c.name, 10522 }) 10523 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10524} 10525 10526// Do executes the "dialogflow.projects.locations.agents.delete" call. 10527// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 10528// non-2xx status code is an error. Response headers are in either 10529// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 10530// returned at all) in error.(*googleapi.Error).Header. Use 10531// googleapi.IsNotModified to check whether the returned error was 10532// because http.StatusNotModified was returned. 10533func (c *ProjectsLocationsAgentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 10534 gensupport.SetOptions(c.urlParams_, opts...) 10535 res, err := c.doRequest("json") 10536 if res != nil && res.StatusCode == http.StatusNotModified { 10537 if res.Body != nil { 10538 res.Body.Close() 10539 } 10540 return nil, &googleapi.Error{ 10541 Code: res.StatusCode, 10542 Header: res.Header, 10543 } 10544 } 10545 if err != nil { 10546 return nil, err 10547 } 10548 defer googleapi.CloseBody(res) 10549 if err := googleapi.CheckResponse(res); err != nil { 10550 return nil, err 10551 } 10552 ret := &GoogleProtobufEmpty{ 10553 ServerResponse: googleapi.ServerResponse{ 10554 Header: res.Header, 10555 HTTPStatusCode: res.StatusCode, 10556 }, 10557 } 10558 target := &ret 10559 if err := gensupport.DecodeResponse(target, res); err != nil { 10560 return nil, err 10561 } 10562 return ret, nil 10563 // { 10564 // "description": "Deletes the specified agent.", 10565 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}", 10566 // "httpMethod": "DELETE", 10567 // "id": "dialogflow.projects.locations.agents.delete", 10568 // "parameterOrder": [ 10569 // "name" 10570 // ], 10571 // "parameters": { 10572 // "name": { 10573 // "description": "Required. The name of the agent to delete. Format: `projects//locations//agents/`.", 10574 // "location": "path", 10575 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 10576 // "required": true, 10577 // "type": "string" 10578 // } 10579 // }, 10580 // "path": "v3beta1/{+name}", 10581 // "response": { 10582 // "$ref": "GoogleProtobufEmpty" 10583 // }, 10584 // "scopes": [ 10585 // "https://www.googleapis.com/auth/cloud-platform", 10586 // "https://www.googleapis.com/auth/dialogflow" 10587 // ] 10588 // } 10589 10590} 10591 10592// method id "dialogflow.projects.locations.agents.export": 10593 10594type ProjectsLocationsAgentsExportCall struct { 10595 s *Service 10596 name string 10597 googleclouddialogflowcxv3beta1exportagentrequest *GoogleCloudDialogflowCxV3beta1ExportAgentRequest 10598 urlParams_ gensupport.URLParams 10599 ctx_ context.Context 10600 header_ http.Header 10601} 10602 10603// Export: Exports the specified agent to a binary file. 10604func (r *ProjectsLocationsAgentsService) Export(name string, googleclouddialogflowcxv3beta1exportagentrequest *GoogleCloudDialogflowCxV3beta1ExportAgentRequest) *ProjectsLocationsAgentsExportCall { 10605 c := &ProjectsLocationsAgentsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10606 c.name = name 10607 c.googleclouddialogflowcxv3beta1exportagentrequest = googleclouddialogflowcxv3beta1exportagentrequest 10608 return c 10609} 10610 10611// Fields allows partial responses to be retrieved. See 10612// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10613// for more information. 10614func (c *ProjectsLocationsAgentsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsExportCall { 10615 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10616 return c 10617} 10618 10619// Context sets the context to be used in this call's Do method. Any 10620// pending HTTP request will be aborted if the provided context is 10621// canceled. 10622func (c *ProjectsLocationsAgentsExportCall) Context(ctx context.Context) *ProjectsLocationsAgentsExportCall { 10623 c.ctx_ = ctx 10624 return c 10625} 10626 10627// Header returns an http.Header that can be modified by the caller to 10628// add HTTP headers to the request. 10629func (c *ProjectsLocationsAgentsExportCall) Header() http.Header { 10630 if c.header_ == nil { 10631 c.header_ = make(http.Header) 10632 } 10633 return c.header_ 10634} 10635 10636func (c *ProjectsLocationsAgentsExportCall) doRequest(alt string) (*http.Response, error) { 10637 reqHeaders := make(http.Header) 10638 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10639 for k, v := range c.header_ { 10640 reqHeaders[k] = v 10641 } 10642 reqHeaders.Set("User-Agent", c.s.userAgent()) 10643 var body io.Reader = nil 10644 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1exportagentrequest) 10645 if err != nil { 10646 return nil, err 10647 } 10648 reqHeaders.Set("Content-Type", "application/json") 10649 c.urlParams_.Set("alt", alt) 10650 c.urlParams_.Set("prettyPrint", "false") 10651 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}:export") 10652 urls += "?" + c.urlParams_.Encode() 10653 req, err := http.NewRequest("POST", urls, body) 10654 if err != nil { 10655 return nil, err 10656 } 10657 req.Header = reqHeaders 10658 googleapi.Expand(req.URL, map[string]string{ 10659 "name": c.name, 10660 }) 10661 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10662} 10663 10664// Do executes the "dialogflow.projects.locations.agents.export" call. 10665// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 10666// Any non-2xx status code is an error. Response headers are in either 10667// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 10668// was returned at all) in error.(*googleapi.Error).Header. Use 10669// googleapi.IsNotModified to check whether the returned error was 10670// because http.StatusNotModified was returned. 10671func (c *ProjectsLocationsAgentsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 10672 gensupport.SetOptions(c.urlParams_, opts...) 10673 res, err := c.doRequest("json") 10674 if res != nil && res.StatusCode == http.StatusNotModified { 10675 if res.Body != nil { 10676 res.Body.Close() 10677 } 10678 return nil, &googleapi.Error{ 10679 Code: res.StatusCode, 10680 Header: res.Header, 10681 } 10682 } 10683 if err != nil { 10684 return nil, err 10685 } 10686 defer googleapi.CloseBody(res) 10687 if err := googleapi.CheckResponse(res); err != nil { 10688 return nil, err 10689 } 10690 ret := &GoogleLongrunningOperation{ 10691 ServerResponse: googleapi.ServerResponse{ 10692 Header: res.Header, 10693 HTTPStatusCode: res.StatusCode, 10694 }, 10695 } 10696 target := &ret 10697 if err := gensupport.DecodeResponse(target, res); err != nil { 10698 return nil, err 10699 } 10700 return ret, nil 10701 // { 10702 // "description": "Exports the specified agent to a binary file.", 10703 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}:export", 10704 // "httpMethod": "POST", 10705 // "id": "dialogflow.projects.locations.agents.export", 10706 // "parameterOrder": [ 10707 // "name" 10708 // ], 10709 // "parameters": { 10710 // "name": { 10711 // "description": "Required. The name of the agent to export. Format: `projects//locations//agents/`.", 10712 // "location": "path", 10713 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 10714 // "required": true, 10715 // "type": "string" 10716 // } 10717 // }, 10718 // "path": "v3beta1/{+name}:export", 10719 // "request": { 10720 // "$ref": "GoogleCloudDialogflowCxV3beta1ExportAgentRequest" 10721 // }, 10722 // "response": { 10723 // "$ref": "GoogleLongrunningOperation" 10724 // }, 10725 // "scopes": [ 10726 // "https://www.googleapis.com/auth/cloud-platform", 10727 // "https://www.googleapis.com/auth/dialogflow" 10728 // ] 10729 // } 10730 10731} 10732 10733// method id "dialogflow.projects.locations.agents.get": 10734 10735type ProjectsLocationsAgentsGetCall struct { 10736 s *Service 10737 name string 10738 urlParams_ gensupport.URLParams 10739 ifNoneMatch_ string 10740 ctx_ context.Context 10741 header_ http.Header 10742} 10743 10744// Get: Retrieves the specified agent. 10745func (r *ProjectsLocationsAgentsService) Get(name string) *ProjectsLocationsAgentsGetCall { 10746 c := &ProjectsLocationsAgentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10747 c.name = name 10748 return c 10749} 10750 10751// Fields allows partial responses to be retrieved. See 10752// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10753// for more information. 10754func (c *ProjectsLocationsAgentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsGetCall { 10755 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10756 return c 10757} 10758 10759// IfNoneMatch sets the optional parameter which makes the operation 10760// fail if the object's ETag matches the given value. This is useful for 10761// getting updates only after the object has changed since the last 10762// request. Use googleapi.IsNotModified to check whether the response 10763// error from Do is the result of In-None-Match. 10764func (c *ProjectsLocationsAgentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsGetCall { 10765 c.ifNoneMatch_ = entityTag 10766 return c 10767} 10768 10769// Context sets the context to be used in this call's Do method. Any 10770// pending HTTP request will be aborted if the provided context is 10771// canceled. 10772func (c *ProjectsLocationsAgentsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsGetCall { 10773 c.ctx_ = ctx 10774 return c 10775} 10776 10777// Header returns an http.Header that can be modified by the caller to 10778// add HTTP headers to the request. 10779func (c *ProjectsLocationsAgentsGetCall) Header() http.Header { 10780 if c.header_ == nil { 10781 c.header_ = make(http.Header) 10782 } 10783 return c.header_ 10784} 10785 10786func (c *ProjectsLocationsAgentsGetCall) doRequest(alt string) (*http.Response, error) { 10787 reqHeaders := make(http.Header) 10788 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10789 for k, v := range c.header_ { 10790 reqHeaders[k] = v 10791 } 10792 reqHeaders.Set("User-Agent", c.s.userAgent()) 10793 if c.ifNoneMatch_ != "" { 10794 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10795 } 10796 var body io.Reader = nil 10797 c.urlParams_.Set("alt", alt) 10798 c.urlParams_.Set("prettyPrint", "false") 10799 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 10800 urls += "?" + c.urlParams_.Encode() 10801 req, err := http.NewRequest("GET", urls, body) 10802 if err != nil { 10803 return nil, err 10804 } 10805 req.Header = reqHeaders 10806 googleapi.Expand(req.URL, map[string]string{ 10807 "name": c.name, 10808 }) 10809 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10810} 10811 10812// Do executes the "dialogflow.projects.locations.agents.get" call. 10813// Exactly one of *GoogleCloudDialogflowCxV3beta1Agent or error will be 10814// non-nil. Any non-2xx status code is an error. Response headers are in 10815// either *GoogleCloudDialogflowCxV3beta1Agent.ServerResponse.Header or 10816// (if a response was returned at all) in 10817// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10818// whether the returned error was because http.StatusNotModified was 10819// returned. 10820func (c *ProjectsLocationsAgentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Agent, error) { 10821 gensupport.SetOptions(c.urlParams_, opts...) 10822 res, err := c.doRequest("json") 10823 if res != nil && res.StatusCode == http.StatusNotModified { 10824 if res.Body != nil { 10825 res.Body.Close() 10826 } 10827 return nil, &googleapi.Error{ 10828 Code: res.StatusCode, 10829 Header: res.Header, 10830 } 10831 } 10832 if err != nil { 10833 return nil, err 10834 } 10835 defer googleapi.CloseBody(res) 10836 if err := googleapi.CheckResponse(res); err != nil { 10837 return nil, err 10838 } 10839 ret := &GoogleCloudDialogflowCxV3beta1Agent{ 10840 ServerResponse: googleapi.ServerResponse{ 10841 Header: res.Header, 10842 HTTPStatusCode: res.StatusCode, 10843 }, 10844 } 10845 target := &ret 10846 if err := gensupport.DecodeResponse(target, res); err != nil { 10847 return nil, err 10848 } 10849 return ret, nil 10850 // { 10851 // "description": "Retrieves the specified agent.", 10852 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}", 10853 // "httpMethod": "GET", 10854 // "id": "dialogflow.projects.locations.agents.get", 10855 // "parameterOrder": [ 10856 // "name" 10857 // ], 10858 // "parameters": { 10859 // "name": { 10860 // "description": "Required. The name of the agent. Format: `projects//locations//agents/`.", 10861 // "location": "path", 10862 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 10863 // "required": true, 10864 // "type": "string" 10865 // } 10866 // }, 10867 // "path": "v3beta1/{+name}", 10868 // "response": { 10869 // "$ref": "GoogleCloudDialogflowCxV3beta1Agent" 10870 // }, 10871 // "scopes": [ 10872 // "https://www.googleapis.com/auth/cloud-platform", 10873 // "https://www.googleapis.com/auth/dialogflow" 10874 // ] 10875 // } 10876 10877} 10878 10879// method id "dialogflow.projects.locations.agents.list": 10880 10881type ProjectsLocationsAgentsListCall struct { 10882 s *Service 10883 parent string 10884 urlParams_ gensupport.URLParams 10885 ifNoneMatch_ string 10886 ctx_ context.Context 10887 header_ http.Header 10888} 10889 10890// List: Returns the list of all agents in the specified location. 10891func (r *ProjectsLocationsAgentsService) List(parent string) *ProjectsLocationsAgentsListCall { 10892 c := &ProjectsLocationsAgentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10893 c.parent = parent 10894 return c 10895} 10896 10897// PageSize sets the optional parameter "pageSize": The maximum number 10898// of items to return in a single page. By default 100 and at most 1000. 10899func (c *ProjectsLocationsAgentsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsListCall { 10900 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10901 return c 10902} 10903 10904// PageToken sets the optional parameter "pageToken": The 10905// next_page_token value returned from a previous list request. 10906func (c *ProjectsLocationsAgentsListCall) PageToken(pageToken string) *ProjectsLocationsAgentsListCall { 10907 c.urlParams_.Set("pageToken", pageToken) 10908 return c 10909} 10910 10911// Fields allows partial responses to be retrieved. See 10912// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10913// for more information. 10914func (c *ProjectsLocationsAgentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsListCall { 10915 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10916 return c 10917} 10918 10919// IfNoneMatch sets the optional parameter which makes the operation 10920// fail if the object's ETag matches the given value. This is useful for 10921// getting updates only after the object has changed since the last 10922// request. Use googleapi.IsNotModified to check whether the response 10923// error from Do is the result of In-None-Match. 10924func (c *ProjectsLocationsAgentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsListCall { 10925 c.ifNoneMatch_ = entityTag 10926 return c 10927} 10928 10929// Context sets the context to be used in this call's Do method. Any 10930// pending HTTP request will be aborted if the provided context is 10931// canceled. 10932func (c *ProjectsLocationsAgentsListCall) Context(ctx context.Context) *ProjectsLocationsAgentsListCall { 10933 c.ctx_ = ctx 10934 return c 10935} 10936 10937// Header returns an http.Header that can be modified by the caller to 10938// add HTTP headers to the request. 10939func (c *ProjectsLocationsAgentsListCall) Header() http.Header { 10940 if c.header_ == nil { 10941 c.header_ = make(http.Header) 10942 } 10943 return c.header_ 10944} 10945 10946func (c *ProjectsLocationsAgentsListCall) doRequest(alt string) (*http.Response, error) { 10947 reqHeaders := make(http.Header) 10948 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10949 for k, v := range c.header_ { 10950 reqHeaders[k] = v 10951 } 10952 reqHeaders.Set("User-Agent", c.s.userAgent()) 10953 if c.ifNoneMatch_ != "" { 10954 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10955 } 10956 var body io.Reader = nil 10957 c.urlParams_.Set("alt", alt) 10958 c.urlParams_.Set("prettyPrint", "false") 10959 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/agents") 10960 urls += "?" + c.urlParams_.Encode() 10961 req, err := http.NewRequest("GET", urls, body) 10962 if err != nil { 10963 return nil, err 10964 } 10965 req.Header = reqHeaders 10966 googleapi.Expand(req.URL, map[string]string{ 10967 "parent": c.parent, 10968 }) 10969 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10970} 10971 10972// Do executes the "dialogflow.projects.locations.agents.list" call. 10973// Exactly one of *GoogleCloudDialogflowCxV3beta1ListAgentsResponse or 10974// error will be non-nil. Any non-2xx status code is an error. Response 10975// headers are in either 10976// *GoogleCloudDialogflowCxV3beta1ListAgentsResponse.ServerResponse.Heade 10977// r or (if a response was returned at all) in 10978// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10979// whether the returned error was because http.StatusNotModified was 10980// returned. 10981func (c *ProjectsLocationsAgentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListAgentsResponse, error) { 10982 gensupport.SetOptions(c.urlParams_, opts...) 10983 res, err := c.doRequest("json") 10984 if res != nil && res.StatusCode == http.StatusNotModified { 10985 if res.Body != nil { 10986 res.Body.Close() 10987 } 10988 return nil, &googleapi.Error{ 10989 Code: res.StatusCode, 10990 Header: res.Header, 10991 } 10992 } 10993 if err != nil { 10994 return nil, err 10995 } 10996 defer googleapi.CloseBody(res) 10997 if err := googleapi.CheckResponse(res); err != nil { 10998 return nil, err 10999 } 11000 ret := &GoogleCloudDialogflowCxV3beta1ListAgentsResponse{ 11001 ServerResponse: googleapi.ServerResponse{ 11002 Header: res.Header, 11003 HTTPStatusCode: res.StatusCode, 11004 }, 11005 } 11006 target := &ret 11007 if err := gensupport.DecodeResponse(target, res); err != nil { 11008 return nil, err 11009 } 11010 return ret, nil 11011 // { 11012 // "description": "Returns the list of all agents in the specified location.", 11013 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents", 11014 // "httpMethod": "GET", 11015 // "id": "dialogflow.projects.locations.agents.list", 11016 // "parameterOrder": [ 11017 // "parent" 11018 // ], 11019 // "parameters": { 11020 // "pageSize": { 11021 // "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", 11022 // "format": "int32", 11023 // "location": "query", 11024 // "type": "integer" 11025 // }, 11026 // "pageToken": { 11027 // "description": "The next_page_token value returned from a previous list request.", 11028 // "location": "query", 11029 // "type": "string" 11030 // }, 11031 // "parent": { 11032 // "description": "Required. The location to list all agents for. Format: `projects//locations/`.", 11033 // "location": "path", 11034 // "pattern": "^projects/[^/]+/locations/[^/]+$", 11035 // "required": true, 11036 // "type": "string" 11037 // } 11038 // }, 11039 // "path": "v3beta1/{+parent}/agents", 11040 // "response": { 11041 // "$ref": "GoogleCloudDialogflowCxV3beta1ListAgentsResponse" 11042 // }, 11043 // "scopes": [ 11044 // "https://www.googleapis.com/auth/cloud-platform", 11045 // "https://www.googleapis.com/auth/dialogflow" 11046 // ] 11047 // } 11048 11049} 11050 11051// Pages invokes f for each page of results. 11052// A non-nil error returned from f will halt the iteration. 11053// The provided context supersedes any context provided to the Context method. 11054func (c *ProjectsLocationsAgentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListAgentsResponse) error) error { 11055 c.ctx_ = ctx 11056 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11057 for { 11058 x, err := c.Do() 11059 if err != nil { 11060 return err 11061 } 11062 if err := f(x); err != nil { 11063 return err 11064 } 11065 if x.NextPageToken == "" { 11066 return nil 11067 } 11068 c.PageToken(x.NextPageToken) 11069 } 11070} 11071 11072// method id "dialogflow.projects.locations.agents.patch": 11073 11074type ProjectsLocationsAgentsPatchCall struct { 11075 s *Service 11076 nameid string 11077 googleclouddialogflowcxv3beta1agent *GoogleCloudDialogflowCxV3beta1Agent 11078 urlParams_ gensupport.URLParams 11079 ctx_ context.Context 11080 header_ http.Header 11081} 11082 11083// Patch: Updates the specified agent. 11084func (r *ProjectsLocationsAgentsService) Patch(nameid string, googleclouddialogflowcxv3beta1agent *GoogleCloudDialogflowCxV3beta1Agent) *ProjectsLocationsAgentsPatchCall { 11085 c := &ProjectsLocationsAgentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11086 c.nameid = nameid 11087 c.googleclouddialogflowcxv3beta1agent = googleclouddialogflowcxv3beta1agent 11088 return c 11089} 11090 11091// UpdateMask sets the optional parameter "updateMask": The mask to 11092// control which fields get updated. If the mask is not present, all 11093// fields will be updated. 11094func (c *ProjectsLocationsAgentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsPatchCall { 11095 c.urlParams_.Set("updateMask", updateMask) 11096 return c 11097} 11098 11099// Fields allows partial responses to be retrieved. See 11100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11101// for more information. 11102func (c *ProjectsLocationsAgentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsPatchCall { 11103 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11104 return c 11105} 11106 11107// Context sets the context to be used in this call's Do method. Any 11108// pending HTTP request will be aborted if the provided context is 11109// canceled. 11110func (c *ProjectsLocationsAgentsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsPatchCall { 11111 c.ctx_ = ctx 11112 return c 11113} 11114 11115// Header returns an http.Header that can be modified by the caller to 11116// add HTTP headers to the request. 11117func (c *ProjectsLocationsAgentsPatchCall) Header() http.Header { 11118 if c.header_ == nil { 11119 c.header_ = make(http.Header) 11120 } 11121 return c.header_ 11122} 11123 11124func (c *ProjectsLocationsAgentsPatchCall) doRequest(alt string) (*http.Response, error) { 11125 reqHeaders := make(http.Header) 11126 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11127 for k, v := range c.header_ { 11128 reqHeaders[k] = v 11129 } 11130 reqHeaders.Set("User-Agent", c.s.userAgent()) 11131 var body io.Reader = nil 11132 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1agent) 11133 if err != nil { 11134 return nil, err 11135 } 11136 reqHeaders.Set("Content-Type", "application/json") 11137 c.urlParams_.Set("alt", alt) 11138 c.urlParams_.Set("prettyPrint", "false") 11139 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 11140 urls += "?" + c.urlParams_.Encode() 11141 req, err := http.NewRequest("PATCH", urls, body) 11142 if err != nil { 11143 return nil, err 11144 } 11145 req.Header = reqHeaders 11146 googleapi.Expand(req.URL, map[string]string{ 11147 "name": c.nameid, 11148 }) 11149 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11150} 11151 11152// Do executes the "dialogflow.projects.locations.agents.patch" call. 11153// Exactly one of *GoogleCloudDialogflowCxV3beta1Agent or error will be 11154// non-nil. Any non-2xx status code is an error. Response headers are in 11155// either *GoogleCloudDialogflowCxV3beta1Agent.ServerResponse.Header or 11156// (if a response was returned at all) in 11157// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11158// whether the returned error was because http.StatusNotModified was 11159// returned. 11160func (c *ProjectsLocationsAgentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Agent, error) { 11161 gensupport.SetOptions(c.urlParams_, opts...) 11162 res, err := c.doRequest("json") 11163 if res != nil && res.StatusCode == http.StatusNotModified { 11164 if res.Body != nil { 11165 res.Body.Close() 11166 } 11167 return nil, &googleapi.Error{ 11168 Code: res.StatusCode, 11169 Header: res.Header, 11170 } 11171 } 11172 if err != nil { 11173 return nil, err 11174 } 11175 defer googleapi.CloseBody(res) 11176 if err := googleapi.CheckResponse(res); err != nil { 11177 return nil, err 11178 } 11179 ret := &GoogleCloudDialogflowCxV3beta1Agent{ 11180 ServerResponse: googleapi.ServerResponse{ 11181 Header: res.Header, 11182 HTTPStatusCode: res.StatusCode, 11183 }, 11184 } 11185 target := &ret 11186 if err := gensupport.DecodeResponse(target, res); err != nil { 11187 return nil, err 11188 } 11189 return ret, nil 11190 // { 11191 // "description": "Updates the specified agent.", 11192 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}", 11193 // "httpMethod": "PATCH", 11194 // "id": "dialogflow.projects.locations.agents.patch", 11195 // "parameterOrder": [ 11196 // "name" 11197 // ], 11198 // "parameters": { 11199 // "name": { 11200 // "description": "The unique identifier of the agent. Required for the Agents.UpdateAgent method. Agents.CreateAgent populates the name automatically. Format: `projects//locations//agents/`.", 11201 // "location": "path", 11202 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 11203 // "required": true, 11204 // "type": "string" 11205 // }, 11206 // "updateMask": { 11207 // "description": "The mask to control which fields get updated. If the mask is not present, all fields will be updated.", 11208 // "format": "google-fieldmask", 11209 // "location": "query", 11210 // "type": "string" 11211 // } 11212 // }, 11213 // "path": "v3beta1/{+name}", 11214 // "request": { 11215 // "$ref": "GoogleCloudDialogflowCxV3beta1Agent" 11216 // }, 11217 // "response": { 11218 // "$ref": "GoogleCloudDialogflowCxV3beta1Agent" 11219 // }, 11220 // "scopes": [ 11221 // "https://www.googleapis.com/auth/cloud-platform", 11222 // "https://www.googleapis.com/auth/dialogflow" 11223 // ] 11224 // } 11225 11226} 11227 11228// method id "dialogflow.projects.locations.agents.restore": 11229 11230type ProjectsLocationsAgentsRestoreCall struct { 11231 s *Service 11232 name string 11233 googleclouddialogflowcxv3beta1restoreagentrequest *GoogleCloudDialogflowCxV3beta1RestoreAgentRequest 11234 urlParams_ gensupport.URLParams 11235 ctx_ context.Context 11236 header_ http.Header 11237} 11238 11239// Restore: Restores the specified agent from a bianry file. Replaces 11240// the current agent with a new one. Note that all existing resources in 11241// agent (e.g. intents, entity types, flows) will be removed. 11242func (r *ProjectsLocationsAgentsService) Restore(name string, googleclouddialogflowcxv3beta1restoreagentrequest *GoogleCloudDialogflowCxV3beta1RestoreAgentRequest) *ProjectsLocationsAgentsRestoreCall { 11243 c := &ProjectsLocationsAgentsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11244 c.name = name 11245 c.googleclouddialogflowcxv3beta1restoreagentrequest = googleclouddialogflowcxv3beta1restoreagentrequest 11246 return c 11247} 11248 11249// Fields allows partial responses to be retrieved. See 11250// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11251// for more information. 11252func (c *ProjectsLocationsAgentsRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsRestoreCall { 11253 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11254 return c 11255} 11256 11257// Context sets the context to be used in this call's Do method. Any 11258// pending HTTP request will be aborted if the provided context is 11259// canceled. 11260func (c *ProjectsLocationsAgentsRestoreCall) Context(ctx context.Context) *ProjectsLocationsAgentsRestoreCall { 11261 c.ctx_ = ctx 11262 return c 11263} 11264 11265// Header returns an http.Header that can be modified by the caller to 11266// add HTTP headers to the request. 11267func (c *ProjectsLocationsAgentsRestoreCall) Header() http.Header { 11268 if c.header_ == nil { 11269 c.header_ = make(http.Header) 11270 } 11271 return c.header_ 11272} 11273 11274func (c *ProjectsLocationsAgentsRestoreCall) doRequest(alt string) (*http.Response, error) { 11275 reqHeaders := make(http.Header) 11276 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11277 for k, v := range c.header_ { 11278 reqHeaders[k] = v 11279 } 11280 reqHeaders.Set("User-Agent", c.s.userAgent()) 11281 var body io.Reader = nil 11282 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1restoreagentrequest) 11283 if err != nil { 11284 return nil, err 11285 } 11286 reqHeaders.Set("Content-Type", "application/json") 11287 c.urlParams_.Set("alt", alt) 11288 c.urlParams_.Set("prettyPrint", "false") 11289 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}:restore") 11290 urls += "?" + c.urlParams_.Encode() 11291 req, err := http.NewRequest("POST", urls, body) 11292 if err != nil { 11293 return nil, err 11294 } 11295 req.Header = reqHeaders 11296 googleapi.Expand(req.URL, map[string]string{ 11297 "name": c.name, 11298 }) 11299 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11300} 11301 11302// Do executes the "dialogflow.projects.locations.agents.restore" call. 11303// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 11304// Any non-2xx status code is an error. Response headers are in either 11305// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 11306// was returned at all) in error.(*googleapi.Error).Header. Use 11307// googleapi.IsNotModified to check whether the returned error was 11308// because http.StatusNotModified was returned. 11309func (c *ProjectsLocationsAgentsRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11310 gensupport.SetOptions(c.urlParams_, opts...) 11311 res, err := c.doRequest("json") 11312 if res != nil && res.StatusCode == http.StatusNotModified { 11313 if res.Body != nil { 11314 res.Body.Close() 11315 } 11316 return nil, &googleapi.Error{ 11317 Code: res.StatusCode, 11318 Header: res.Header, 11319 } 11320 } 11321 if err != nil { 11322 return nil, err 11323 } 11324 defer googleapi.CloseBody(res) 11325 if err := googleapi.CheckResponse(res); err != nil { 11326 return nil, err 11327 } 11328 ret := &GoogleLongrunningOperation{ 11329 ServerResponse: googleapi.ServerResponse{ 11330 Header: res.Header, 11331 HTTPStatusCode: res.StatusCode, 11332 }, 11333 } 11334 target := &ret 11335 if err := gensupport.DecodeResponse(target, res); err != nil { 11336 return nil, err 11337 } 11338 return ret, nil 11339 // { 11340 // "description": "Restores the specified agent from a bianry file. Replaces the current agent with a new one. Note that all existing resources in agent (e.g. intents, entity types, flows) will be removed.", 11341 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}:restore", 11342 // "httpMethod": "POST", 11343 // "id": "dialogflow.projects.locations.agents.restore", 11344 // "parameterOrder": [ 11345 // "name" 11346 // ], 11347 // "parameters": { 11348 // "name": { 11349 // "description": "Required. The name of the agent to restore into. Format: `projects//locations//agents/`.", 11350 // "location": "path", 11351 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 11352 // "required": true, 11353 // "type": "string" 11354 // } 11355 // }, 11356 // "path": "v3beta1/{+name}:restore", 11357 // "request": { 11358 // "$ref": "GoogleCloudDialogflowCxV3beta1RestoreAgentRequest" 11359 // }, 11360 // "response": { 11361 // "$ref": "GoogleLongrunningOperation" 11362 // }, 11363 // "scopes": [ 11364 // "https://www.googleapis.com/auth/cloud-platform", 11365 // "https://www.googleapis.com/auth/dialogflow" 11366 // ] 11367 // } 11368 11369} 11370 11371// method id "dialogflow.projects.locations.agents.entityTypes.create": 11372 11373type ProjectsLocationsAgentsEntityTypesCreateCall struct { 11374 s *Service 11375 parent string 11376 googleclouddialogflowcxv3beta1entitytype *GoogleCloudDialogflowCxV3beta1EntityType 11377 urlParams_ gensupport.URLParams 11378 ctx_ context.Context 11379 header_ http.Header 11380} 11381 11382// Create: Creates an entity type in the specified agent. 11383func (r *ProjectsLocationsAgentsEntityTypesService) Create(parent string, googleclouddialogflowcxv3beta1entitytype *GoogleCloudDialogflowCxV3beta1EntityType) *ProjectsLocationsAgentsEntityTypesCreateCall { 11384 c := &ProjectsLocationsAgentsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11385 c.parent = parent 11386 c.googleclouddialogflowcxv3beta1entitytype = googleclouddialogflowcxv3beta1entitytype 11387 return c 11388} 11389 11390// LanguageCode sets the optional parameter "languageCode": The language 11391// of the following fields in `entity_type`: * 11392// `EntityType.entities.value` * `EntityType.entities.synonyms` * 11393// `EntityType.excluded_phrases.value` If not specified, the agent's 11394// default language is used. [Many 11395// languages](https://cloud.google.com/dialogflow/docs/reference/language 11396// ) are supported. Note: languages must be enabled in the agent before 11397// they can be used. 11398func (c *ProjectsLocationsAgentsEntityTypesCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsEntityTypesCreateCall { 11399 c.urlParams_.Set("languageCode", languageCode) 11400 return c 11401} 11402 11403// Fields allows partial responses to be retrieved. See 11404// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11405// for more information. 11406func (c *ProjectsLocationsAgentsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEntityTypesCreateCall { 11407 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11408 return c 11409} 11410 11411// Context sets the context to be used in this call's Do method. Any 11412// pending HTTP request will be aborted if the provided context is 11413// canceled. 11414func (c *ProjectsLocationsAgentsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsEntityTypesCreateCall { 11415 c.ctx_ = ctx 11416 return c 11417} 11418 11419// Header returns an http.Header that can be modified by the caller to 11420// add HTTP headers to the request. 11421func (c *ProjectsLocationsAgentsEntityTypesCreateCall) Header() http.Header { 11422 if c.header_ == nil { 11423 c.header_ = make(http.Header) 11424 } 11425 return c.header_ 11426} 11427 11428func (c *ProjectsLocationsAgentsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { 11429 reqHeaders := make(http.Header) 11430 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11431 for k, v := range c.header_ { 11432 reqHeaders[k] = v 11433 } 11434 reqHeaders.Set("User-Agent", c.s.userAgent()) 11435 var body io.Reader = nil 11436 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1entitytype) 11437 if err != nil { 11438 return nil, err 11439 } 11440 reqHeaders.Set("Content-Type", "application/json") 11441 c.urlParams_.Set("alt", alt) 11442 c.urlParams_.Set("prettyPrint", "false") 11443 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/entityTypes") 11444 urls += "?" + c.urlParams_.Encode() 11445 req, err := http.NewRequest("POST", urls, body) 11446 if err != nil { 11447 return nil, err 11448 } 11449 req.Header = reqHeaders 11450 googleapi.Expand(req.URL, map[string]string{ 11451 "parent": c.parent, 11452 }) 11453 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11454} 11455 11456// Do executes the "dialogflow.projects.locations.agents.entityTypes.create" call. 11457// Exactly one of *GoogleCloudDialogflowCxV3beta1EntityType or error 11458// will be non-nil. Any non-2xx status code is an error. Response 11459// headers are in either 11460// *GoogleCloudDialogflowCxV3beta1EntityType.ServerResponse.Header or 11461// (if a response was returned at all) in 11462// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11463// whether the returned error was because http.StatusNotModified was 11464// returned. 11465func (c *ProjectsLocationsAgentsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1EntityType, error) { 11466 gensupport.SetOptions(c.urlParams_, opts...) 11467 res, err := c.doRequest("json") 11468 if res != nil && res.StatusCode == http.StatusNotModified { 11469 if res.Body != nil { 11470 res.Body.Close() 11471 } 11472 return nil, &googleapi.Error{ 11473 Code: res.StatusCode, 11474 Header: res.Header, 11475 } 11476 } 11477 if err != nil { 11478 return nil, err 11479 } 11480 defer googleapi.CloseBody(res) 11481 if err := googleapi.CheckResponse(res); err != nil { 11482 return nil, err 11483 } 11484 ret := &GoogleCloudDialogflowCxV3beta1EntityType{ 11485 ServerResponse: googleapi.ServerResponse{ 11486 Header: res.Header, 11487 HTTPStatusCode: res.StatusCode, 11488 }, 11489 } 11490 target := &ret 11491 if err := gensupport.DecodeResponse(target, res); err != nil { 11492 return nil, err 11493 } 11494 return ret, nil 11495 // { 11496 // "description": "Creates an entity type in the specified agent.", 11497 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/entityTypes", 11498 // "httpMethod": "POST", 11499 // "id": "dialogflow.projects.locations.agents.entityTypes.create", 11500 // "parameterOrder": [ 11501 // "parent" 11502 // ], 11503 // "parameters": { 11504 // "languageCode": { 11505 // "description": "The language of the following fields in `entity_type`: * `EntityType.entities.value` * `EntityType.entities.synonyms` * `EntityType.excluded_phrases.value` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 11506 // "location": "query", 11507 // "type": "string" 11508 // }, 11509 // "parent": { 11510 // "description": "Required. The agent to create a entity type for. Format: `projects//locations//agents/`.", 11511 // "location": "path", 11512 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 11513 // "required": true, 11514 // "type": "string" 11515 // } 11516 // }, 11517 // "path": "v3beta1/{+parent}/entityTypes", 11518 // "request": { 11519 // "$ref": "GoogleCloudDialogflowCxV3beta1EntityType" 11520 // }, 11521 // "response": { 11522 // "$ref": "GoogleCloudDialogflowCxV3beta1EntityType" 11523 // }, 11524 // "scopes": [ 11525 // "https://www.googleapis.com/auth/cloud-platform", 11526 // "https://www.googleapis.com/auth/dialogflow" 11527 // ] 11528 // } 11529 11530} 11531 11532// method id "dialogflow.projects.locations.agents.entityTypes.delete": 11533 11534type ProjectsLocationsAgentsEntityTypesDeleteCall struct { 11535 s *Service 11536 name string 11537 urlParams_ gensupport.URLParams 11538 ctx_ context.Context 11539 header_ http.Header 11540} 11541 11542// Delete: Deletes the specified entity type. 11543func (r *ProjectsLocationsAgentsEntityTypesService) Delete(name string) *ProjectsLocationsAgentsEntityTypesDeleteCall { 11544 c := &ProjectsLocationsAgentsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11545 c.name = name 11546 return c 11547} 11548 11549// Force sets the optional parameter "force": This field has no effect 11550// for entity type not being used. For entity types that are used by 11551// intents or pages: * If `force` is set to false, an error will be 11552// returned with message indicating the referencing resources. * If 11553// `force` is set to true, Dialogflow will remove the entity type, as 11554// well as any references to the entity type (i.e. Page parameter of the 11555// entity type will be changed to '@sys.any' and intent parameter of the 11556// entity type will be removed). 11557func (c *ProjectsLocationsAgentsEntityTypesDeleteCall) Force(force bool) *ProjectsLocationsAgentsEntityTypesDeleteCall { 11558 c.urlParams_.Set("force", fmt.Sprint(force)) 11559 return c 11560} 11561 11562// Fields allows partial responses to be retrieved. See 11563// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11564// for more information. 11565func (c *ProjectsLocationsAgentsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEntityTypesDeleteCall { 11566 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11567 return c 11568} 11569 11570// Context sets the context to be used in this call's Do method. Any 11571// pending HTTP request will be aborted if the provided context is 11572// canceled. 11573func (c *ProjectsLocationsAgentsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsEntityTypesDeleteCall { 11574 c.ctx_ = ctx 11575 return c 11576} 11577 11578// Header returns an http.Header that can be modified by the caller to 11579// add HTTP headers to the request. 11580func (c *ProjectsLocationsAgentsEntityTypesDeleteCall) Header() http.Header { 11581 if c.header_ == nil { 11582 c.header_ = make(http.Header) 11583 } 11584 return c.header_ 11585} 11586 11587func (c *ProjectsLocationsAgentsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 11588 reqHeaders := make(http.Header) 11589 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11590 for k, v := range c.header_ { 11591 reqHeaders[k] = v 11592 } 11593 reqHeaders.Set("User-Agent", c.s.userAgent()) 11594 var body io.Reader = nil 11595 c.urlParams_.Set("alt", alt) 11596 c.urlParams_.Set("prettyPrint", "false") 11597 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 11598 urls += "?" + c.urlParams_.Encode() 11599 req, err := http.NewRequest("DELETE", urls, body) 11600 if err != nil { 11601 return nil, err 11602 } 11603 req.Header = reqHeaders 11604 googleapi.Expand(req.URL, map[string]string{ 11605 "name": c.name, 11606 }) 11607 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11608} 11609 11610// Do executes the "dialogflow.projects.locations.agents.entityTypes.delete" call. 11611// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 11612// non-2xx status code is an error. Response headers are in either 11613// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 11614// returned at all) in error.(*googleapi.Error).Header. Use 11615// googleapi.IsNotModified to check whether the returned error was 11616// because http.StatusNotModified was returned. 11617func (c *ProjectsLocationsAgentsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 11618 gensupport.SetOptions(c.urlParams_, opts...) 11619 res, err := c.doRequest("json") 11620 if res != nil && res.StatusCode == http.StatusNotModified { 11621 if res.Body != nil { 11622 res.Body.Close() 11623 } 11624 return nil, &googleapi.Error{ 11625 Code: res.StatusCode, 11626 Header: res.Header, 11627 } 11628 } 11629 if err != nil { 11630 return nil, err 11631 } 11632 defer googleapi.CloseBody(res) 11633 if err := googleapi.CheckResponse(res); err != nil { 11634 return nil, err 11635 } 11636 ret := &GoogleProtobufEmpty{ 11637 ServerResponse: googleapi.ServerResponse{ 11638 Header: res.Header, 11639 HTTPStatusCode: res.StatusCode, 11640 }, 11641 } 11642 target := &ret 11643 if err := gensupport.DecodeResponse(target, res); err != nil { 11644 return nil, err 11645 } 11646 return ret, nil 11647 // { 11648 // "description": "Deletes the specified entity type.", 11649 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/entityTypes/{entityTypesId}", 11650 // "httpMethod": "DELETE", 11651 // "id": "dialogflow.projects.locations.agents.entityTypes.delete", 11652 // "parameterOrder": [ 11653 // "name" 11654 // ], 11655 // "parameters": { 11656 // "force": { 11657 // "description": "This field has no effect for entity type not being used. For entity types that are used by intents or pages: * If `force` is set to false, an error will be returned with message indicating the referencing resources. * If `force` is set to true, Dialogflow will remove the entity type, as well as any references to the entity type (i.e. Page parameter of the entity type will be changed to '@sys.any' and intent parameter of the entity type will be removed).", 11658 // "location": "query", 11659 // "type": "boolean" 11660 // }, 11661 // "name": { 11662 // "description": "Required. The name of the entity type to delete. Format: `projects//locations//agents//entityTypes/`.", 11663 // "location": "path", 11664 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/entityTypes/[^/]+$", 11665 // "required": true, 11666 // "type": "string" 11667 // } 11668 // }, 11669 // "path": "v3beta1/{+name}", 11670 // "response": { 11671 // "$ref": "GoogleProtobufEmpty" 11672 // }, 11673 // "scopes": [ 11674 // "https://www.googleapis.com/auth/cloud-platform", 11675 // "https://www.googleapis.com/auth/dialogflow" 11676 // ] 11677 // } 11678 11679} 11680 11681// method id "dialogflow.projects.locations.agents.entityTypes.get": 11682 11683type ProjectsLocationsAgentsEntityTypesGetCall struct { 11684 s *Service 11685 name string 11686 urlParams_ gensupport.URLParams 11687 ifNoneMatch_ string 11688 ctx_ context.Context 11689 header_ http.Header 11690} 11691 11692// Get: Retrieves the specified entity type. 11693func (r *ProjectsLocationsAgentsEntityTypesService) Get(name string) *ProjectsLocationsAgentsEntityTypesGetCall { 11694 c := &ProjectsLocationsAgentsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11695 c.name = name 11696 return c 11697} 11698 11699// LanguageCode sets the optional parameter "languageCode": The language 11700// to retrieve the entity type for. The following fields are language 11701// dependent: * `EntityType.entities.value` * 11702// `EntityType.entities.synonyms` * `EntityType.excluded_phrases.value` 11703// If not specified, the agent's default language is used. [Many 11704// languages](https://cloud.google.com/dialogflow/docs/reference/language 11705// ) are supported. Note: languages must be enabled in the agent before 11706// they can be used. 11707func (c *ProjectsLocationsAgentsEntityTypesGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsEntityTypesGetCall { 11708 c.urlParams_.Set("languageCode", languageCode) 11709 return c 11710} 11711 11712// Fields allows partial responses to be retrieved. See 11713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11714// for more information. 11715func (c *ProjectsLocationsAgentsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEntityTypesGetCall { 11716 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11717 return c 11718} 11719 11720// IfNoneMatch sets the optional parameter which makes the operation 11721// fail if the object's ETag matches the given value. This is useful for 11722// getting updates only after the object has changed since the last 11723// request. Use googleapi.IsNotModified to check whether the response 11724// error from Do is the result of In-None-Match. 11725func (c *ProjectsLocationsAgentsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsEntityTypesGetCall { 11726 c.ifNoneMatch_ = entityTag 11727 return c 11728} 11729 11730// Context sets the context to be used in this call's Do method. Any 11731// pending HTTP request will be aborted if the provided context is 11732// canceled. 11733func (c *ProjectsLocationsAgentsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsEntityTypesGetCall { 11734 c.ctx_ = ctx 11735 return c 11736} 11737 11738// Header returns an http.Header that can be modified by the caller to 11739// add HTTP headers to the request. 11740func (c *ProjectsLocationsAgentsEntityTypesGetCall) Header() http.Header { 11741 if c.header_ == nil { 11742 c.header_ = make(http.Header) 11743 } 11744 return c.header_ 11745} 11746 11747func (c *ProjectsLocationsAgentsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { 11748 reqHeaders := make(http.Header) 11749 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11750 for k, v := range c.header_ { 11751 reqHeaders[k] = v 11752 } 11753 reqHeaders.Set("User-Agent", c.s.userAgent()) 11754 if c.ifNoneMatch_ != "" { 11755 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11756 } 11757 var body io.Reader = nil 11758 c.urlParams_.Set("alt", alt) 11759 c.urlParams_.Set("prettyPrint", "false") 11760 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 11761 urls += "?" + c.urlParams_.Encode() 11762 req, err := http.NewRequest("GET", urls, body) 11763 if err != nil { 11764 return nil, err 11765 } 11766 req.Header = reqHeaders 11767 googleapi.Expand(req.URL, map[string]string{ 11768 "name": c.name, 11769 }) 11770 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11771} 11772 11773// Do executes the "dialogflow.projects.locations.agents.entityTypes.get" call. 11774// Exactly one of *GoogleCloudDialogflowCxV3beta1EntityType or error 11775// will be non-nil. Any non-2xx status code is an error. Response 11776// headers are in either 11777// *GoogleCloudDialogflowCxV3beta1EntityType.ServerResponse.Header or 11778// (if a response was returned at all) in 11779// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11780// whether the returned error was because http.StatusNotModified was 11781// returned. 11782func (c *ProjectsLocationsAgentsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1EntityType, error) { 11783 gensupport.SetOptions(c.urlParams_, opts...) 11784 res, err := c.doRequest("json") 11785 if res != nil && res.StatusCode == http.StatusNotModified { 11786 if res.Body != nil { 11787 res.Body.Close() 11788 } 11789 return nil, &googleapi.Error{ 11790 Code: res.StatusCode, 11791 Header: res.Header, 11792 } 11793 } 11794 if err != nil { 11795 return nil, err 11796 } 11797 defer googleapi.CloseBody(res) 11798 if err := googleapi.CheckResponse(res); err != nil { 11799 return nil, err 11800 } 11801 ret := &GoogleCloudDialogflowCxV3beta1EntityType{ 11802 ServerResponse: googleapi.ServerResponse{ 11803 Header: res.Header, 11804 HTTPStatusCode: res.StatusCode, 11805 }, 11806 } 11807 target := &ret 11808 if err := gensupport.DecodeResponse(target, res); err != nil { 11809 return nil, err 11810 } 11811 return ret, nil 11812 // { 11813 // "description": "Retrieves the specified entity type.", 11814 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/entityTypes/{entityTypesId}", 11815 // "httpMethod": "GET", 11816 // "id": "dialogflow.projects.locations.agents.entityTypes.get", 11817 // "parameterOrder": [ 11818 // "name" 11819 // ], 11820 // "parameters": { 11821 // "languageCode": { 11822 // "description": "The language to retrieve the entity type for. The following fields are language dependent: * `EntityType.entities.value` * `EntityType.entities.synonyms` * `EntityType.excluded_phrases.value` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 11823 // "location": "query", 11824 // "type": "string" 11825 // }, 11826 // "name": { 11827 // "description": "Required. The name of the entity type. Format: `projects//locations//agents//entityTypes/`.", 11828 // "location": "path", 11829 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/entityTypes/[^/]+$", 11830 // "required": true, 11831 // "type": "string" 11832 // } 11833 // }, 11834 // "path": "v3beta1/{+name}", 11835 // "response": { 11836 // "$ref": "GoogleCloudDialogflowCxV3beta1EntityType" 11837 // }, 11838 // "scopes": [ 11839 // "https://www.googleapis.com/auth/cloud-platform", 11840 // "https://www.googleapis.com/auth/dialogflow" 11841 // ] 11842 // } 11843 11844} 11845 11846// method id "dialogflow.projects.locations.agents.entityTypes.list": 11847 11848type ProjectsLocationsAgentsEntityTypesListCall struct { 11849 s *Service 11850 parent string 11851 urlParams_ gensupport.URLParams 11852 ifNoneMatch_ string 11853 ctx_ context.Context 11854 header_ http.Header 11855} 11856 11857// List: Returns the list of all entity types in the specified agent. 11858func (r *ProjectsLocationsAgentsEntityTypesService) List(parent string) *ProjectsLocationsAgentsEntityTypesListCall { 11859 c := &ProjectsLocationsAgentsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11860 c.parent = parent 11861 return c 11862} 11863 11864// LanguageCode sets the optional parameter "languageCode": The language 11865// to list entity types for. The following fields are language 11866// dependent: * `EntityType.entities.value` * 11867// `EntityType.entities.synonyms` * `EntityType.excluded_phrases.value` 11868// If not specified, the agent's default language is used. [Many 11869// languages](https://cloud.google.com/dialogflow/docs/reference/language 11870// ) are supported. Note: languages must be enabled in the agent before 11871// they can be used. 11872func (c *ProjectsLocationsAgentsEntityTypesListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsEntityTypesListCall { 11873 c.urlParams_.Set("languageCode", languageCode) 11874 return c 11875} 11876 11877// PageSize sets the optional parameter "pageSize": The maximum number 11878// of items to return in a single page. By default 100 and at most 1000. 11879func (c *ProjectsLocationsAgentsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsEntityTypesListCall { 11880 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11881 return c 11882} 11883 11884// PageToken sets the optional parameter "pageToken": The 11885// next_page_token value returned from a previous list request. 11886func (c *ProjectsLocationsAgentsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentsEntityTypesListCall { 11887 c.urlParams_.Set("pageToken", pageToken) 11888 return c 11889} 11890 11891// Fields allows partial responses to be retrieved. See 11892// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11893// for more information. 11894func (c *ProjectsLocationsAgentsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEntityTypesListCall { 11895 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11896 return c 11897} 11898 11899// IfNoneMatch sets the optional parameter which makes the operation 11900// fail if the object's ETag matches the given value. This is useful for 11901// getting updates only after the object has changed since the last 11902// request. Use googleapi.IsNotModified to check whether the response 11903// error from Do is the result of In-None-Match. 11904func (c *ProjectsLocationsAgentsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsEntityTypesListCall { 11905 c.ifNoneMatch_ = entityTag 11906 return c 11907} 11908 11909// Context sets the context to be used in this call's Do method. Any 11910// pending HTTP request will be aborted if the provided context is 11911// canceled. 11912func (c *ProjectsLocationsAgentsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentsEntityTypesListCall { 11913 c.ctx_ = ctx 11914 return c 11915} 11916 11917// Header returns an http.Header that can be modified by the caller to 11918// add HTTP headers to the request. 11919func (c *ProjectsLocationsAgentsEntityTypesListCall) Header() http.Header { 11920 if c.header_ == nil { 11921 c.header_ = make(http.Header) 11922 } 11923 return c.header_ 11924} 11925 11926func (c *ProjectsLocationsAgentsEntityTypesListCall) doRequest(alt string) (*http.Response, error) { 11927 reqHeaders := make(http.Header) 11928 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11929 for k, v := range c.header_ { 11930 reqHeaders[k] = v 11931 } 11932 reqHeaders.Set("User-Agent", c.s.userAgent()) 11933 if c.ifNoneMatch_ != "" { 11934 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11935 } 11936 var body io.Reader = nil 11937 c.urlParams_.Set("alt", alt) 11938 c.urlParams_.Set("prettyPrint", "false") 11939 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/entityTypes") 11940 urls += "?" + c.urlParams_.Encode() 11941 req, err := http.NewRequest("GET", urls, body) 11942 if err != nil { 11943 return nil, err 11944 } 11945 req.Header = reqHeaders 11946 googleapi.Expand(req.URL, map[string]string{ 11947 "parent": c.parent, 11948 }) 11949 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11950} 11951 11952// Do executes the "dialogflow.projects.locations.agents.entityTypes.list" call. 11953// Exactly one of *GoogleCloudDialogflowCxV3beta1ListEntityTypesResponse 11954// or error will be non-nil. Any non-2xx status code is an error. 11955// Response headers are in either 11956// *GoogleCloudDialogflowCxV3beta1ListEntityTypesResponse.ServerResponse. 11957// Header or (if a response was returned at all) in 11958// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11959// whether the returned error was because http.StatusNotModified was 11960// returned. 11961func (c *ProjectsLocationsAgentsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListEntityTypesResponse, error) { 11962 gensupport.SetOptions(c.urlParams_, opts...) 11963 res, err := c.doRequest("json") 11964 if res != nil && res.StatusCode == http.StatusNotModified { 11965 if res.Body != nil { 11966 res.Body.Close() 11967 } 11968 return nil, &googleapi.Error{ 11969 Code: res.StatusCode, 11970 Header: res.Header, 11971 } 11972 } 11973 if err != nil { 11974 return nil, err 11975 } 11976 defer googleapi.CloseBody(res) 11977 if err := googleapi.CheckResponse(res); err != nil { 11978 return nil, err 11979 } 11980 ret := &GoogleCloudDialogflowCxV3beta1ListEntityTypesResponse{ 11981 ServerResponse: googleapi.ServerResponse{ 11982 Header: res.Header, 11983 HTTPStatusCode: res.StatusCode, 11984 }, 11985 } 11986 target := &ret 11987 if err := gensupport.DecodeResponse(target, res); err != nil { 11988 return nil, err 11989 } 11990 return ret, nil 11991 // { 11992 // "description": "Returns the list of all entity types in the specified agent.", 11993 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/entityTypes", 11994 // "httpMethod": "GET", 11995 // "id": "dialogflow.projects.locations.agents.entityTypes.list", 11996 // "parameterOrder": [ 11997 // "parent" 11998 // ], 11999 // "parameters": { 12000 // "languageCode": { 12001 // "description": "The language to list entity types for. The following fields are language dependent: * `EntityType.entities.value` * `EntityType.entities.synonyms` * `EntityType.excluded_phrases.value` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 12002 // "location": "query", 12003 // "type": "string" 12004 // }, 12005 // "pageSize": { 12006 // "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", 12007 // "format": "int32", 12008 // "location": "query", 12009 // "type": "integer" 12010 // }, 12011 // "pageToken": { 12012 // "description": "The next_page_token value returned from a previous list request.", 12013 // "location": "query", 12014 // "type": "string" 12015 // }, 12016 // "parent": { 12017 // "description": "Required. The agent to list all entity types for. Format: `projects//locations//agents/`.", 12018 // "location": "path", 12019 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 12020 // "required": true, 12021 // "type": "string" 12022 // } 12023 // }, 12024 // "path": "v3beta1/{+parent}/entityTypes", 12025 // "response": { 12026 // "$ref": "GoogleCloudDialogflowCxV3beta1ListEntityTypesResponse" 12027 // }, 12028 // "scopes": [ 12029 // "https://www.googleapis.com/auth/cloud-platform", 12030 // "https://www.googleapis.com/auth/dialogflow" 12031 // ] 12032 // } 12033 12034} 12035 12036// Pages invokes f for each page of results. 12037// A non-nil error returned from f will halt the iteration. 12038// The provided context supersedes any context provided to the Context method. 12039func (c *ProjectsLocationsAgentsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListEntityTypesResponse) error) error { 12040 c.ctx_ = ctx 12041 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12042 for { 12043 x, err := c.Do() 12044 if err != nil { 12045 return err 12046 } 12047 if err := f(x); err != nil { 12048 return err 12049 } 12050 if x.NextPageToken == "" { 12051 return nil 12052 } 12053 c.PageToken(x.NextPageToken) 12054 } 12055} 12056 12057// method id "dialogflow.projects.locations.agents.entityTypes.patch": 12058 12059type ProjectsLocationsAgentsEntityTypesPatchCall struct { 12060 s *Service 12061 nameid string 12062 googleclouddialogflowcxv3beta1entitytype *GoogleCloudDialogflowCxV3beta1EntityType 12063 urlParams_ gensupport.URLParams 12064 ctx_ context.Context 12065 header_ http.Header 12066} 12067 12068// Patch: Updates the specified entity type. 12069func (r *ProjectsLocationsAgentsEntityTypesService) Patch(nameid string, googleclouddialogflowcxv3beta1entitytype *GoogleCloudDialogflowCxV3beta1EntityType) *ProjectsLocationsAgentsEntityTypesPatchCall { 12070 c := &ProjectsLocationsAgentsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12071 c.nameid = nameid 12072 c.googleclouddialogflowcxv3beta1entitytype = googleclouddialogflowcxv3beta1entitytype 12073 return c 12074} 12075 12076// LanguageCode sets the optional parameter "languageCode": The language 12077// of the following fields in `entity_type`: * 12078// `EntityType.entities.value` * `EntityType.entities.synonyms` * 12079// `EntityType.excluded_phrases.value` If not specified, the agent's 12080// default language is used. [Many 12081// languages](https://cloud.google.com/dialogflow/docs/reference/language 12082// ) are supported. Note: languages must be enabled in the agent before 12083// they can be used. 12084func (c *ProjectsLocationsAgentsEntityTypesPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsEntityTypesPatchCall { 12085 c.urlParams_.Set("languageCode", languageCode) 12086 return c 12087} 12088 12089// UpdateMask sets the optional parameter "updateMask": The mask to 12090// control which fields get updated. 12091func (c *ProjectsLocationsAgentsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsEntityTypesPatchCall { 12092 c.urlParams_.Set("updateMask", updateMask) 12093 return c 12094} 12095 12096// Fields allows partial responses to be retrieved. See 12097// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12098// for more information. 12099func (c *ProjectsLocationsAgentsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEntityTypesPatchCall { 12100 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12101 return c 12102} 12103 12104// Context sets the context to be used in this call's Do method. Any 12105// pending HTTP request will be aborted if the provided context is 12106// canceled. 12107func (c *ProjectsLocationsAgentsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsEntityTypesPatchCall { 12108 c.ctx_ = ctx 12109 return c 12110} 12111 12112// Header returns an http.Header that can be modified by the caller to 12113// add HTTP headers to the request. 12114func (c *ProjectsLocationsAgentsEntityTypesPatchCall) Header() http.Header { 12115 if c.header_ == nil { 12116 c.header_ = make(http.Header) 12117 } 12118 return c.header_ 12119} 12120 12121func (c *ProjectsLocationsAgentsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { 12122 reqHeaders := make(http.Header) 12123 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12124 for k, v := range c.header_ { 12125 reqHeaders[k] = v 12126 } 12127 reqHeaders.Set("User-Agent", c.s.userAgent()) 12128 var body io.Reader = nil 12129 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1entitytype) 12130 if err != nil { 12131 return nil, err 12132 } 12133 reqHeaders.Set("Content-Type", "application/json") 12134 c.urlParams_.Set("alt", alt) 12135 c.urlParams_.Set("prettyPrint", "false") 12136 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 12137 urls += "?" + c.urlParams_.Encode() 12138 req, err := http.NewRequest("PATCH", urls, body) 12139 if err != nil { 12140 return nil, err 12141 } 12142 req.Header = reqHeaders 12143 googleapi.Expand(req.URL, map[string]string{ 12144 "name": c.nameid, 12145 }) 12146 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12147} 12148 12149// Do executes the "dialogflow.projects.locations.agents.entityTypes.patch" call. 12150// Exactly one of *GoogleCloudDialogflowCxV3beta1EntityType or error 12151// will be non-nil. Any non-2xx status code is an error. Response 12152// headers are in either 12153// *GoogleCloudDialogflowCxV3beta1EntityType.ServerResponse.Header or 12154// (if a response was returned at all) in 12155// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12156// whether the returned error was because http.StatusNotModified was 12157// returned. 12158func (c *ProjectsLocationsAgentsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1EntityType, error) { 12159 gensupport.SetOptions(c.urlParams_, opts...) 12160 res, err := c.doRequest("json") 12161 if res != nil && res.StatusCode == http.StatusNotModified { 12162 if res.Body != nil { 12163 res.Body.Close() 12164 } 12165 return nil, &googleapi.Error{ 12166 Code: res.StatusCode, 12167 Header: res.Header, 12168 } 12169 } 12170 if err != nil { 12171 return nil, err 12172 } 12173 defer googleapi.CloseBody(res) 12174 if err := googleapi.CheckResponse(res); err != nil { 12175 return nil, err 12176 } 12177 ret := &GoogleCloudDialogflowCxV3beta1EntityType{ 12178 ServerResponse: googleapi.ServerResponse{ 12179 Header: res.Header, 12180 HTTPStatusCode: res.StatusCode, 12181 }, 12182 } 12183 target := &ret 12184 if err := gensupport.DecodeResponse(target, res); err != nil { 12185 return nil, err 12186 } 12187 return ret, nil 12188 // { 12189 // "description": "Updates the specified entity type.", 12190 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/entityTypes/{entityTypesId}", 12191 // "httpMethod": "PATCH", 12192 // "id": "dialogflow.projects.locations.agents.entityTypes.patch", 12193 // "parameterOrder": [ 12194 // "name" 12195 // ], 12196 // "parameters": { 12197 // "languageCode": { 12198 // "description": "The language of the following fields in `entity_type`: * `EntityType.entities.value` * `EntityType.entities.synonyms` * `EntityType.excluded_phrases.value` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 12199 // "location": "query", 12200 // "type": "string" 12201 // }, 12202 // "name": { 12203 // "description": "The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType. Format: `projects//locations//agents//entityTypes/`.", 12204 // "location": "path", 12205 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/entityTypes/[^/]+$", 12206 // "required": true, 12207 // "type": "string" 12208 // }, 12209 // "updateMask": { 12210 // "description": "The mask to control which fields get updated.", 12211 // "format": "google-fieldmask", 12212 // "location": "query", 12213 // "type": "string" 12214 // } 12215 // }, 12216 // "path": "v3beta1/{+name}", 12217 // "request": { 12218 // "$ref": "GoogleCloudDialogflowCxV3beta1EntityType" 12219 // }, 12220 // "response": { 12221 // "$ref": "GoogleCloudDialogflowCxV3beta1EntityType" 12222 // }, 12223 // "scopes": [ 12224 // "https://www.googleapis.com/auth/cloud-platform", 12225 // "https://www.googleapis.com/auth/dialogflow" 12226 // ] 12227 // } 12228 12229} 12230 12231// method id "dialogflow.projects.locations.agents.environments.create": 12232 12233type ProjectsLocationsAgentsEnvironmentsCreateCall struct { 12234 s *Service 12235 parent string 12236 googleclouddialogflowcxv3beta1environment *GoogleCloudDialogflowCxV3beta1Environment 12237 urlParams_ gensupport.URLParams 12238 ctx_ context.Context 12239 header_ http.Header 12240} 12241 12242// Create: Creates an Environment in the specified Agent. 12243func (r *ProjectsLocationsAgentsEnvironmentsService) Create(parent string, googleclouddialogflowcxv3beta1environment *GoogleCloudDialogflowCxV3beta1Environment) *ProjectsLocationsAgentsEnvironmentsCreateCall { 12244 c := &ProjectsLocationsAgentsEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12245 c.parent = parent 12246 c.googleclouddialogflowcxv3beta1environment = googleclouddialogflowcxv3beta1environment 12247 return c 12248} 12249 12250// Fields allows partial responses to be retrieved. See 12251// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12252// for more information. 12253func (c *ProjectsLocationsAgentsEnvironmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsCreateCall { 12254 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12255 return c 12256} 12257 12258// Context sets the context to be used in this call's Do method. Any 12259// pending HTTP request will be aborted if the provided context is 12260// canceled. 12261func (c *ProjectsLocationsAgentsEnvironmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsCreateCall { 12262 c.ctx_ = ctx 12263 return c 12264} 12265 12266// Header returns an http.Header that can be modified by the caller to 12267// add HTTP headers to the request. 12268func (c *ProjectsLocationsAgentsEnvironmentsCreateCall) Header() http.Header { 12269 if c.header_ == nil { 12270 c.header_ = make(http.Header) 12271 } 12272 return c.header_ 12273} 12274 12275func (c *ProjectsLocationsAgentsEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) { 12276 reqHeaders := make(http.Header) 12277 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12278 for k, v := range c.header_ { 12279 reqHeaders[k] = v 12280 } 12281 reqHeaders.Set("User-Agent", c.s.userAgent()) 12282 var body io.Reader = nil 12283 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1environment) 12284 if err != nil { 12285 return nil, err 12286 } 12287 reqHeaders.Set("Content-Type", "application/json") 12288 c.urlParams_.Set("alt", alt) 12289 c.urlParams_.Set("prettyPrint", "false") 12290 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/environments") 12291 urls += "?" + c.urlParams_.Encode() 12292 req, err := http.NewRequest("POST", urls, body) 12293 if err != nil { 12294 return nil, err 12295 } 12296 req.Header = reqHeaders 12297 googleapi.Expand(req.URL, map[string]string{ 12298 "parent": c.parent, 12299 }) 12300 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12301} 12302 12303// Do executes the "dialogflow.projects.locations.agents.environments.create" call. 12304// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 12305// Any non-2xx status code is an error. Response headers are in either 12306// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 12307// was returned at all) in error.(*googleapi.Error).Header. Use 12308// googleapi.IsNotModified to check whether the returned error was 12309// because http.StatusNotModified was returned. 12310func (c *ProjectsLocationsAgentsEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12311 gensupport.SetOptions(c.urlParams_, opts...) 12312 res, err := c.doRequest("json") 12313 if res != nil && res.StatusCode == http.StatusNotModified { 12314 if res.Body != nil { 12315 res.Body.Close() 12316 } 12317 return nil, &googleapi.Error{ 12318 Code: res.StatusCode, 12319 Header: res.Header, 12320 } 12321 } 12322 if err != nil { 12323 return nil, err 12324 } 12325 defer googleapi.CloseBody(res) 12326 if err := googleapi.CheckResponse(res); err != nil { 12327 return nil, err 12328 } 12329 ret := &GoogleLongrunningOperation{ 12330 ServerResponse: googleapi.ServerResponse{ 12331 Header: res.Header, 12332 HTTPStatusCode: res.StatusCode, 12333 }, 12334 } 12335 target := &ret 12336 if err := gensupport.DecodeResponse(target, res); err != nil { 12337 return nil, err 12338 } 12339 return ret, nil 12340 // { 12341 // "description": "Creates an Environment in the specified Agent.", 12342 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments", 12343 // "httpMethod": "POST", 12344 // "id": "dialogflow.projects.locations.agents.environments.create", 12345 // "parameterOrder": [ 12346 // "parent" 12347 // ], 12348 // "parameters": { 12349 // "parent": { 12350 // "description": "Required. The Agent to create an Environment for. Format: `projects//locations//agents/`.", 12351 // "location": "path", 12352 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 12353 // "required": true, 12354 // "type": "string" 12355 // } 12356 // }, 12357 // "path": "v3beta1/{+parent}/environments", 12358 // "request": { 12359 // "$ref": "GoogleCloudDialogflowCxV3beta1Environment" 12360 // }, 12361 // "response": { 12362 // "$ref": "GoogleLongrunningOperation" 12363 // }, 12364 // "scopes": [ 12365 // "https://www.googleapis.com/auth/cloud-platform", 12366 // "https://www.googleapis.com/auth/dialogflow" 12367 // ] 12368 // } 12369 12370} 12371 12372// method id "dialogflow.projects.locations.agents.environments.delete": 12373 12374type ProjectsLocationsAgentsEnvironmentsDeleteCall struct { 12375 s *Service 12376 name string 12377 urlParams_ gensupport.URLParams 12378 ctx_ context.Context 12379 header_ http.Header 12380} 12381 12382// Delete: Deletes the specified Environment. 12383func (r *ProjectsLocationsAgentsEnvironmentsService) Delete(name string) *ProjectsLocationsAgentsEnvironmentsDeleteCall { 12384 c := &ProjectsLocationsAgentsEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12385 c.name = name 12386 return c 12387} 12388 12389// Fields allows partial responses to be retrieved. See 12390// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12391// for more information. 12392func (c *ProjectsLocationsAgentsEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsDeleteCall { 12393 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12394 return c 12395} 12396 12397// Context sets the context to be used in this call's Do method. Any 12398// pending HTTP request will be aborted if the provided context is 12399// canceled. 12400func (c *ProjectsLocationsAgentsEnvironmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsDeleteCall { 12401 c.ctx_ = ctx 12402 return c 12403} 12404 12405// Header returns an http.Header that can be modified by the caller to 12406// add HTTP headers to the request. 12407func (c *ProjectsLocationsAgentsEnvironmentsDeleteCall) Header() http.Header { 12408 if c.header_ == nil { 12409 c.header_ = make(http.Header) 12410 } 12411 return c.header_ 12412} 12413 12414func (c *ProjectsLocationsAgentsEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) { 12415 reqHeaders := make(http.Header) 12416 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12417 for k, v := range c.header_ { 12418 reqHeaders[k] = v 12419 } 12420 reqHeaders.Set("User-Agent", c.s.userAgent()) 12421 var body io.Reader = nil 12422 c.urlParams_.Set("alt", alt) 12423 c.urlParams_.Set("prettyPrint", "false") 12424 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 12425 urls += "?" + c.urlParams_.Encode() 12426 req, err := http.NewRequest("DELETE", urls, body) 12427 if err != nil { 12428 return nil, err 12429 } 12430 req.Header = reqHeaders 12431 googleapi.Expand(req.URL, map[string]string{ 12432 "name": c.name, 12433 }) 12434 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12435} 12436 12437// Do executes the "dialogflow.projects.locations.agents.environments.delete" call. 12438// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 12439// non-2xx status code is an error. Response headers are in either 12440// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 12441// returned at all) in error.(*googleapi.Error).Header. Use 12442// googleapi.IsNotModified to check whether the returned error was 12443// because http.StatusNotModified was returned. 12444func (c *ProjectsLocationsAgentsEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 12445 gensupport.SetOptions(c.urlParams_, opts...) 12446 res, err := c.doRequest("json") 12447 if res != nil && res.StatusCode == http.StatusNotModified { 12448 if res.Body != nil { 12449 res.Body.Close() 12450 } 12451 return nil, &googleapi.Error{ 12452 Code: res.StatusCode, 12453 Header: res.Header, 12454 } 12455 } 12456 if err != nil { 12457 return nil, err 12458 } 12459 defer googleapi.CloseBody(res) 12460 if err := googleapi.CheckResponse(res); err != nil { 12461 return nil, err 12462 } 12463 ret := &GoogleProtobufEmpty{ 12464 ServerResponse: googleapi.ServerResponse{ 12465 Header: res.Header, 12466 HTTPStatusCode: res.StatusCode, 12467 }, 12468 } 12469 target := &ret 12470 if err := gensupport.DecodeResponse(target, res); err != nil { 12471 return nil, err 12472 } 12473 return ret, nil 12474 // { 12475 // "description": "Deletes the specified Environment.", 12476 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}", 12477 // "httpMethod": "DELETE", 12478 // "id": "dialogflow.projects.locations.agents.environments.delete", 12479 // "parameterOrder": [ 12480 // "name" 12481 // ], 12482 // "parameters": { 12483 // "name": { 12484 // "description": "Required. The name of the Environment to delete. Format: `projects//locations//agents//environments/`.", 12485 // "location": "path", 12486 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+$", 12487 // "required": true, 12488 // "type": "string" 12489 // } 12490 // }, 12491 // "path": "v3beta1/{+name}", 12492 // "response": { 12493 // "$ref": "GoogleProtobufEmpty" 12494 // }, 12495 // "scopes": [ 12496 // "https://www.googleapis.com/auth/cloud-platform", 12497 // "https://www.googleapis.com/auth/dialogflow" 12498 // ] 12499 // } 12500 12501} 12502 12503// method id "dialogflow.projects.locations.agents.environments.get": 12504 12505type ProjectsLocationsAgentsEnvironmentsGetCall struct { 12506 s *Service 12507 name string 12508 urlParams_ gensupport.URLParams 12509 ifNoneMatch_ string 12510 ctx_ context.Context 12511 header_ http.Header 12512} 12513 12514// Get: Retrieves the specified Environment. 12515func (r *ProjectsLocationsAgentsEnvironmentsService) Get(name string) *ProjectsLocationsAgentsEnvironmentsGetCall { 12516 c := &ProjectsLocationsAgentsEnvironmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12517 c.name = name 12518 return c 12519} 12520 12521// Fields allows partial responses to be retrieved. See 12522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12523// for more information. 12524func (c *ProjectsLocationsAgentsEnvironmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsGetCall { 12525 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12526 return c 12527} 12528 12529// IfNoneMatch sets the optional parameter which makes the operation 12530// fail if the object's ETag matches the given value. This is useful for 12531// getting updates only after the object has changed since the last 12532// request. Use googleapi.IsNotModified to check whether the response 12533// error from Do is the result of In-None-Match. 12534func (c *ProjectsLocationsAgentsEnvironmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsEnvironmentsGetCall { 12535 c.ifNoneMatch_ = entityTag 12536 return c 12537} 12538 12539// Context sets the context to be used in this call's Do method. Any 12540// pending HTTP request will be aborted if the provided context is 12541// canceled. 12542func (c *ProjectsLocationsAgentsEnvironmentsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsGetCall { 12543 c.ctx_ = ctx 12544 return c 12545} 12546 12547// Header returns an http.Header that can be modified by the caller to 12548// add HTTP headers to the request. 12549func (c *ProjectsLocationsAgentsEnvironmentsGetCall) Header() http.Header { 12550 if c.header_ == nil { 12551 c.header_ = make(http.Header) 12552 } 12553 return c.header_ 12554} 12555 12556func (c *ProjectsLocationsAgentsEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) { 12557 reqHeaders := make(http.Header) 12558 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12559 for k, v := range c.header_ { 12560 reqHeaders[k] = v 12561 } 12562 reqHeaders.Set("User-Agent", c.s.userAgent()) 12563 if c.ifNoneMatch_ != "" { 12564 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12565 } 12566 var body io.Reader = nil 12567 c.urlParams_.Set("alt", alt) 12568 c.urlParams_.Set("prettyPrint", "false") 12569 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 12570 urls += "?" + c.urlParams_.Encode() 12571 req, err := http.NewRequest("GET", urls, body) 12572 if err != nil { 12573 return nil, err 12574 } 12575 req.Header = reqHeaders 12576 googleapi.Expand(req.URL, map[string]string{ 12577 "name": c.name, 12578 }) 12579 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12580} 12581 12582// Do executes the "dialogflow.projects.locations.agents.environments.get" call. 12583// Exactly one of *GoogleCloudDialogflowCxV3beta1Environment or error 12584// will be non-nil. Any non-2xx status code is an error. Response 12585// headers are in either 12586// *GoogleCloudDialogflowCxV3beta1Environment.ServerResponse.Header or 12587// (if a response was returned at all) in 12588// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12589// whether the returned error was because http.StatusNotModified was 12590// returned. 12591func (c *ProjectsLocationsAgentsEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Environment, error) { 12592 gensupport.SetOptions(c.urlParams_, opts...) 12593 res, err := c.doRequest("json") 12594 if res != nil && res.StatusCode == http.StatusNotModified { 12595 if res.Body != nil { 12596 res.Body.Close() 12597 } 12598 return nil, &googleapi.Error{ 12599 Code: res.StatusCode, 12600 Header: res.Header, 12601 } 12602 } 12603 if err != nil { 12604 return nil, err 12605 } 12606 defer googleapi.CloseBody(res) 12607 if err := googleapi.CheckResponse(res); err != nil { 12608 return nil, err 12609 } 12610 ret := &GoogleCloudDialogflowCxV3beta1Environment{ 12611 ServerResponse: googleapi.ServerResponse{ 12612 Header: res.Header, 12613 HTTPStatusCode: res.StatusCode, 12614 }, 12615 } 12616 target := &ret 12617 if err := gensupport.DecodeResponse(target, res); err != nil { 12618 return nil, err 12619 } 12620 return ret, nil 12621 // { 12622 // "description": "Retrieves the specified Environment.", 12623 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}", 12624 // "httpMethod": "GET", 12625 // "id": "dialogflow.projects.locations.agents.environments.get", 12626 // "parameterOrder": [ 12627 // "name" 12628 // ], 12629 // "parameters": { 12630 // "name": { 12631 // "description": "Required. The name of the Environment. Format: `projects//locations//agents//environments/`.", 12632 // "location": "path", 12633 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+$", 12634 // "required": true, 12635 // "type": "string" 12636 // } 12637 // }, 12638 // "path": "v3beta1/{+name}", 12639 // "response": { 12640 // "$ref": "GoogleCloudDialogflowCxV3beta1Environment" 12641 // }, 12642 // "scopes": [ 12643 // "https://www.googleapis.com/auth/cloud-platform", 12644 // "https://www.googleapis.com/auth/dialogflow" 12645 // ] 12646 // } 12647 12648} 12649 12650// method id "dialogflow.projects.locations.agents.environments.list": 12651 12652type ProjectsLocationsAgentsEnvironmentsListCall struct { 12653 s *Service 12654 parent string 12655 urlParams_ gensupport.URLParams 12656 ifNoneMatch_ string 12657 ctx_ context.Context 12658 header_ http.Header 12659} 12660 12661// List: Returns the list of all environments in the specified Agent. 12662func (r *ProjectsLocationsAgentsEnvironmentsService) List(parent string) *ProjectsLocationsAgentsEnvironmentsListCall { 12663 c := &ProjectsLocationsAgentsEnvironmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12664 c.parent = parent 12665 return c 12666} 12667 12668// PageSize sets the optional parameter "pageSize": The maximum number 12669// of items to return in a single page. By default 20 and at most 100. 12670func (c *ProjectsLocationsAgentsEnvironmentsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsEnvironmentsListCall { 12671 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12672 return c 12673} 12674 12675// PageToken sets the optional parameter "pageToken": The 12676// next_page_token value returned from a previous list request. 12677func (c *ProjectsLocationsAgentsEnvironmentsListCall) PageToken(pageToken string) *ProjectsLocationsAgentsEnvironmentsListCall { 12678 c.urlParams_.Set("pageToken", pageToken) 12679 return c 12680} 12681 12682// Fields allows partial responses to be retrieved. See 12683// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12684// for more information. 12685func (c *ProjectsLocationsAgentsEnvironmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsListCall { 12686 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12687 return c 12688} 12689 12690// IfNoneMatch sets the optional parameter which makes the operation 12691// fail if the object's ETag matches the given value. This is useful for 12692// getting updates only after the object has changed since the last 12693// request. Use googleapi.IsNotModified to check whether the response 12694// error from Do is the result of In-None-Match. 12695func (c *ProjectsLocationsAgentsEnvironmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsEnvironmentsListCall { 12696 c.ifNoneMatch_ = entityTag 12697 return c 12698} 12699 12700// Context sets the context to be used in this call's Do method. Any 12701// pending HTTP request will be aborted if the provided context is 12702// canceled. 12703func (c *ProjectsLocationsAgentsEnvironmentsListCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsListCall { 12704 c.ctx_ = ctx 12705 return c 12706} 12707 12708// Header returns an http.Header that can be modified by the caller to 12709// add HTTP headers to the request. 12710func (c *ProjectsLocationsAgentsEnvironmentsListCall) Header() http.Header { 12711 if c.header_ == nil { 12712 c.header_ = make(http.Header) 12713 } 12714 return c.header_ 12715} 12716 12717func (c *ProjectsLocationsAgentsEnvironmentsListCall) doRequest(alt string) (*http.Response, error) { 12718 reqHeaders := make(http.Header) 12719 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12720 for k, v := range c.header_ { 12721 reqHeaders[k] = v 12722 } 12723 reqHeaders.Set("User-Agent", c.s.userAgent()) 12724 if c.ifNoneMatch_ != "" { 12725 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12726 } 12727 var body io.Reader = nil 12728 c.urlParams_.Set("alt", alt) 12729 c.urlParams_.Set("prettyPrint", "false") 12730 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/environments") 12731 urls += "?" + c.urlParams_.Encode() 12732 req, err := http.NewRequest("GET", urls, body) 12733 if err != nil { 12734 return nil, err 12735 } 12736 req.Header = reqHeaders 12737 googleapi.Expand(req.URL, map[string]string{ 12738 "parent": c.parent, 12739 }) 12740 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12741} 12742 12743// Do executes the "dialogflow.projects.locations.agents.environments.list" call. 12744// Exactly one of 12745// *GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse or error will 12746// be non-nil. Any non-2xx status code is an error. Response headers are 12747// in either 12748// *GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse.ServerResponse 12749// .Header or (if a response was returned at all) in 12750// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12751// whether the returned error was because http.StatusNotModified was 12752// returned. 12753func (c *ProjectsLocationsAgentsEnvironmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse, error) { 12754 gensupport.SetOptions(c.urlParams_, opts...) 12755 res, err := c.doRequest("json") 12756 if res != nil && res.StatusCode == http.StatusNotModified { 12757 if res.Body != nil { 12758 res.Body.Close() 12759 } 12760 return nil, &googleapi.Error{ 12761 Code: res.StatusCode, 12762 Header: res.Header, 12763 } 12764 } 12765 if err != nil { 12766 return nil, err 12767 } 12768 defer googleapi.CloseBody(res) 12769 if err := googleapi.CheckResponse(res); err != nil { 12770 return nil, err 12771 } 12772 ret := &GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse{ 12773 ServerResponse: googleapi.ServerResponse{ 12774 Header: res.Header, 12775 HTTPStatusCode: res.StatusCode, 12776 }, 12777 } 12778 target := &ret 12779 if err := gensupport.DecodeResponse(target, res); err != nil { 12780 return nil, err 12781 } 12782 return ret, nil 12783 // { 12784 // "description": "Returns the list of all environments in the specified Agent.", 12785 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments", 12786 // "httpMethod": "GET", 12787 // "id": "dialogflow.projects.locations.agents.environments.list", 12788 // "parameterOrder": [ 12789 // "parent" 12790 // ], 12791 // "parameters": { 12792 // "pageSize": { 12793 // "description": "The maximum number of items to return in a single page. By default 20 and at most 100.", 12794 // "format": "int32", 12795 // "location": "query", 12796 // "type": "integer" 12797 // }, 12798 // "pageToken": { 12799 // "description": "The next_page_token value returned from a previous list request.", 12800 // "location": "query", 12801 // "type": "string" 12802 // }, 12803 // "parent": { 12804 // "description": "Required. The Agent to list all environments for. Format: `projects//locations//agents/`.", 12805 // "location": "path", 12806 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 12807 // "required": true, 12808 // "type": "string" 12809 // } 12810 // }, 12811 // "path": "v3beta1/{+parent}/environments", 12812 // "response": { 12813 // "$ref": "GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse" 12814 // }, 12815 // "scopes": [ 12816 // "https://www.googleapis.com/auth/cloud-platform", 12817 // "https://www.googleapis.com/auth/dialogflow" 12818 // ] 12819 // } 12820 12821} 12822 12823// Pages invokes f for each page of results. 12824// A non-nil error returned from f will halt the iteration. 12825// The provided context supersedes any context provided to the Context method. 12826func (c *ProjectsLocationsAgentsEnvironmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListEnvironmentsResponse) error) error { 12827 c.ctx_ = ctx 12828 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12829 for { 12830 x, err := c.Do() 12831 if err != nil { 12832 return err 12833 } 12834 if err := f(x); err != nil { 12835 return err 12836 } 12837 if x.NextPageToken == "" { 12838 return nil 12839 } 12840 c.PageToken(x.NextPageToken) 12841 } 12842} 12843 12844// method id "dialogflow.projects.locations.agents.environments.lookupEnvironmentHistory": 12845 12846type ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall struct { 12847 s *Service 12848 name string 12849 urlParams_ gensupport.URLParams 12850 ifNoneMatch_ string 12851 ctx_ context.Context 12852 header_ http.Header 12853} 12854 12855// LookupEnvironmentHistory: Looks up the history of the specified 12856// Environment. 12857func (r *ProjectsLocationsAgentsEnvironmentsService) LookupEnvironmentHistory(name string) *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall { 12858 c := &ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12859 c.name = name 12860 return c 12861} 12862 12863// PageSize sets the optional parameter "pageSize": The maximum number 12864// of items to return in a single page. By default 100 and at most 1000. 12865func (c *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall) PageSize(pageSize int64) *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall { 12866 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12867 return c 12868} 12869 12870// PageToken sets the optional parameter "pageToken": The 12871// next_page_token value returned from a previous list request. 12872func (c *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall) PageToken(pageToken string) *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall { 12873 c.urlParams_.Set("pageToken", pageToken) 12874 return c 12875} 12876 12877// Fields allows partial responses to be retrieved. See 12878// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12879// for more information. 12880func (c *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall { 12881 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12882 return c 12883} 12884 12885// IfNoneMatch sets the optional parameter which makes the operation 12886// fail if the object's ETag matches the given value. This is useful for 12887// getting updates only after the object has changed since the last 12888// request. Use googleapi.IsNotModified to check whether the response 12889// error from Do is the result of In-None-Match. 12890func (c *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall { 12891 c.ifNoneMatch_ = entityTag 12892 return c 12893} 12894 12895// Context sets the context to be used in this call's Do method. Any 12896// pending HTTP request will be aborted if the provided context is 12897// canceled. 12898func (c *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall { 12899 c.ctx_ = ctx 12900 return c 12901} 12902 12903// Header returns an http.Header that can be modified by the caller to 12904// add HTTP headers to the request. 12905func (c *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall) Header() http.Header { 12906 if c.header_ == nil { 12907 c.header_ = make(http.Header) 12908 } 12909 return c.header_ 12910} 12911 12912func (c *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall) doRequest(alt string) (*http.Response, error) { 12913 reqHeaders := make(http.Header) 12914 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12915 for k, v := range c.header_ { 12916 reqHeaders[k] = v 12917 } 12918 reqHeaders.Set("User-Agent", c.s.userAgent()) 12919 if c.ifNoneMatch_ != "" { 12920 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12921 } 12922 var body io.Reader = nil 12923 c.urlParams_.Set("alt", alt) 12924 c.urlParams_.Set("prettyPrint", "false") 12925 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}:lookupEnvironmentHistory") 12926 urls += "?" + c.urlParams_.Encode() 12927 req, err := http.NewRequest("GET", urls, body) 12928 if err != nil { 12929 return nil, err 12930 } 12931 req.Header = reqHeaders 12932 googleapi.Expand(req.URL, map[string]string{ 12933 "name": c.name, 12934 }) 12935 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12936} 12937 12938// Do executes the "dialogflow.projects.locations.agents.environments.lookupEnvironmentHistory" call. 12939// Exactly one of 12940// *GoogleCloudDialogflowCxV3beta1LookupEnvironmentHistoryResponse or 12941// error will be non-nil. Any non-2xx status code is an error. Response 12942// headers are in either 12943// *GoogleCloudDialogflowCxV3beta1LookupEnvironmentHistoryResponse.Server 12944// Response.Header or (if a response was returned at all) in 12945// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12946// whether the returned error was because http.StatusNotModified was 12947// returned. 12948func (c *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1LookupEnvironmentHistoryResponse, error) { 12949 gensupport.SetOptions(c.urlParams_, opts...) 12950 res, err := c.doRequest("json") 12951 if res != nil && res.StatusCode == http.StatusNotModified { 12952 if res.Body != nil { 12953 res.Body.Close() 12954 } 12955 return nil, &googleapi.Error{ 12956 Code: res.StatusCode, 12957 Header: res.Header, 12958 } 12959 } 12960 if err != nil { 12961 return nil, err 12962 } 12963 defer googleapi.CloseBody(res) 12964 if err := googleapi.CheckResponse(res); err != nil { 12965 return nil, err 12966 } 12967 ret := &GoogleCloudDialogflowCxV3beta1LookupEnvironmentHistoryResponse{ 12968 ServerResponse: googleapi.ServerResponse{ 12969 Header: res.Header, 12970 HTTPStatusCode: res.StatusCode, 12971 }, 12972 } 12973 target := &ret 12974 if err := gensupport.DecodeResponse(target, res); err != nil { 12975 return nil, err 12976 } 12977 return ret, nil 12978 // { 12979 // "description": "Looks up the history of the specified Environment.", 12980 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}:lookupEnvironmentHistory", 12981 // "httpMethod": "GET", 12982 // "id": "dialogflow.projects.locations.agents.environments.lookupEnvironmentHistory", 12983 // "parameterOrder": [ 12984 // "name" 12985 // ], 12986 // "parameters": { 12987 // "name": { 12988 // "description": "Required. Resource name of the environment to look up the history for. Format: `projects//locations//agents//environments/`.", 12989 // "location": "path", 12990 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+$", 12991 // "required": true, 12992 // "type": "string" 12993 // }, 12994 // "pageSize": { 12995 // "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", 12996 // "format": "int32", 12997 // "location": "query", 12998 // "type": "integer" 12999 // }, 13000 // "pageToken": { 13001 // "description": "The next_page_token value returned from a previous list request.", 13002 // "location": "query", 13003 // "type": "string" 13004 // } 13005 // }, 13006 // "path": "v3beta1/{+name}:lookupEnvironmentHistory", 13007 // "response": { 13008 // "$ref": "GoogleCloudDialogflowCxV3beta1LookupEnvironmentHistoryResponse" 13009 // }, 13010 // "scopes": [ 13011 // "https://www.googleapis.com/auth/cloud-platform", 13012 // "https://www.googleapis.com/auth/dialogflow" 13013 // ] 13014 // } 13015 13016} 13017 13018// Pages invokes f for each page of results. 13019// A non-nil error returned from f will halt the iteration. 13020// The provided context supersedes any context provided to the Context method. 13021func (c *ProjectsLocationsAgentsEnvironmentsLookupEnvironmentHistoryCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1LookupEnvironmentHistoryResponse) error) error { 13022 c.ctx_ = ctx 13023 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13024 for { 13025 x, err := c.Do() 13026 if err != nil { 13027 return err 13028 } 13029 if err := f(x); err != nil { 13030 return err 13031 } 13032 if x.NextPageToken == "" { 13033 return nil 13034 } 13035 c.PageToken(x.NextPageToken) 13036 } 13037} 13038 13039// method id "dialogflow.projects.locations.agents.environments.patch": 13040 13041type ProjectsLocationsAgentsEnvironmentsPatchCall struct { 13042 s *Service 13043 name string 13044 googleclouddialogflowcxv3beta1environment *GoogleCloudDialogflowCxV3beta1Environment 13045 urlParams_ gensupport.URLParams 13046 ctx_ context.Context 13047 header_ http.Header 13048} 13049 13050// Patch: Updates the specified Environment. 13051func (r *ProjectsLocationsAgentsEnvironmentsService) Patch(name string, googleclouddialogflowcxv3beta1environment *GoogleCloudDialogflowCxV3beta1Environment) *ProjectsLocationsAgentsEnvironmentsPatchCall { 13052 c := &ProjectsLocationsAgentsEnvironmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13053 c.name = name 13054 c.googleclouddialogflowcxv3beta1environment = googleclouddialogflowcxv3beta1environment 13055 return c 13056} 13057 13058// UpdateMask sets the optional parameter "updateMask": Required. The 13059// mask to control which fields get updated. 13060func (c *ProjectsLocationsAgentsEnvironmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsEnvironmentsPatchCall { 13061 c.urlParams_.Set("updateMask", updateMask) 13062 return c 13063} 13064 13065// Fields allows partial responses to be retrieved. See 13066// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13067// for more information. 13068func (c *ProjectsLocationsAgentsEnvironmentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsPatchCall { 13069 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13070 return c 13071} 13072 13073// Context sets the context to be used in this call's Do method. Any 13074// pending HTTP request will be aborted if the provided context is 13075// canceled. 13076func (c *ProjectsLocationsAgentsEnvironmentsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsPatchCall { 13077 c.ctx_ = ctx 13078 return c 13079} 13080 13081// Header returns an http.Header that can be modified by the caller to 13082// add HTTP headers to the request. 13083func (c *ProjectsLocationsAgentsEnvironmentsPatchCall) Header() http.Header { 13084 if c.header_ == nil { 13085 c.header_ = make(http.Header) 13086 } 13087 return c.header_ 13088} 13089 13090func (c *ProjectsLocationsAgentsEnvironmentsPatchCall) doRequest(alt string) (*http.Response, error) { 13091 reqHeaders := make(http.Header) 13092 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13093 for k, v := range c.header_ { 13094 reqHeaders[k] = v 13095 } 13096 reqHeaders.Set("User-Agent", c.s.userAgent()) 13097 var body io.Reader = nil 13098 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1environment) 13099 if err != nil { 13100 return nil, err 13101 } 13102 reqHeaders.Set("Content-Type", "application/json") 13103 c.urlParams_.Set("alt", alt) 13104 c.urlParams_.Set("prettyPrint", "false") 13105 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 13106 urls += "?" + c.urlParams_.Encode() 13107 req, err := http.NewRequest("PATCH", urls, body) 13108 if err != nil { 13109 return nil, err 13110 } 13111 req.Header = reqHeaders 13112 googleapi.Expand(req.URL, map[string]string{ 13113 "name": c.name, 13114 }) 13115 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13116} 13117 13118// Do executes the "dialogflow.projects.locations.agents.environments.patch" call. 13119// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 13120// Any non-2xx status code is an error. Response headers are in either 13121// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 13122// was returned at all) in error.(*googleapi.Error).Header. Use 13123// googleapi.IsNotModified to check whether the returned error was 13124// because http.StatusNotModified was returned. 13125func (c *ProjectsLocationsAgentsEnvironmentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 13126 gensupport.SetOptions(c.urlParams_, opts...) 13127 res, err := c.doRequest("json") 13128 if res != nil && res.StatusCode == http.StatusNotModified { 13129 if res.Body != nil { 13130 res.Body.Close() 13131 } 13132 return nil, &googleapi.Error{ 13133 Code: res.StatusCode, 13134 Header: res.Header, 13135 } 13136 } 13137 if err != nil { 13138 return nil, err 13139 } 13140 defer googleapi.CloseBody(res) 13141 if err := googleapi.CheckResponse(res); err != nil { 13142 return nil, err 13143 } 13144 ret := &GoogleLongrunningOperation{ 13145 ServerResponse: googleapi.ServerResponse{ 13146 Header: res.Header, 13147 HTTPStatusCode: res.StatusCode, 13148 }, 13149 } 13150 target := &ret 13151 if err := gensupport.DecodeResponse(target, res); err != nil { 13152 return nil, err 13153 } 13154 return ret, nil 13155 // { 13156 // "description": "Updates the specified Environment.", 13157 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}", 13158 // "httpMethod": "PATCH", 13159 // "id": "dialogflow.projects.locations.agents.environments.patch", 13160 // "parameterOrder": [ 13161 // "name" 13162 // ], 13163 // "parameters": { 13164 // "name": { 13165 // "description": "The name of the environment. Format: `projects//locations//agents//environments/`.", 13166 // "location": "path", 13167 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+$", 13168 // "required": true, 13169 // "type": "string" 13170 // }, 13171 // "updateMask": { 13172 // "description": "Required. The mask to control which fields get updated.", 13173 // "format": "google-fieldmask", 13174 // "location": "query", 13175 // "type": "string" 13176 // } 13177 // }, 13178 // "path": "v3beta1/{+name}", 13179 // "request": { 13180 // "$ref": "GoogleCloudDialogflowCxV3beta1Environment" 13181 // }, 13182 // "response": { 13183 // "$ref": "GoogleLongrunningOperation" 13184 // }, 13185 // "scopes": [ 13186 // "https://www.googleapis.com/auth/cloud-platform", 13187 // "https://www.googleapis.com/auth/dialogflow" 13188 // ] 13189 // } 13190 13191} 13192 13193// method id "dialogflow.projects.locations.agents.environments.sessions.detectIntent": 13194 13195type ProjectsLocationsAgentsEnvironmentsSessionsDetectIntentCall struct { 13196 s *Service 13197 sessionid string 13198 googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest 13199 urlParams_ gensupport.URLParams 13200 ctx_ context.Context 13201 header_ http.Header 13202} 13203 13204// DetectIntent: Processes a natural language query and returns 13205// structured, actionable data as a result. This method is not 13206// idempotent, because it may cause session entity types to be updated, 13207// which in turn might affect results of future queries. 13208func (r *ProjectsLocationsAgentsEnvironmentsSessionsService) DetectIntent(sessionid string, googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest) *ProjectsLocationsAgentsEnvironmentsSessionsDetectIntentCall { 13209 c := &ProjectsLocationsAgentsEnvironmentsSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13210 c.sessionid = sessionid 13211 c.googleclouddialogflowcxv3beta1detectintentrequest = googleclouddialogflowcxv3beta1detectintentrequest 13212 return c 13213} 13214 13215// Fields allows partial responses to be retrieved. See 13216// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13217// for more information. 13218func (c *ProjectsLocationsAgentsEnvironmentsSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsSessionsDetectIntentCall { 13219 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13220 return c 13221} 13222 13223// Context sets the context to be used in this call's Do method. Any 13224// pending HTTP request will be aborted if the provided context is 13225// canceled. 13226func (c *ProjectsLocationsAgentsEnvironmentsSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsSessionsDetectIntentCall { 13227 c.ctx_ = ctx 13228 return c 13229} 13230 13231// Header returns an http.Header that can be modified by the caller to 13232// add HTTP headers to the request. 13233func (c *ProjectsLocationsAgentsEnvironmentsSessionsDetectIntentCall) Header() http.Header { 13234 if c.header_ == nil { 13235 c.header_ = make(http.Header) 13236 } 13237 return c.header_ 13238} 13239 13240func (c *ProjectsLocationsAgentsEnvironmentsSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) { 13241 reqHeaders := make(http.Header) 13242 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13243 for k, v := range c.header_ { 13244 reqHeaders[k] = v 13245 } 13246 reqHeaders.Set("User-Agent", c.s.userAgent()) 13247 var body io.Reader = nil 13248 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1detectintentrequest) 13249 if err != nil { 13250 return nil, err 13251 } 13252 reqHeaders.Set("Content-Type", "application/json") 13253 c.urlParams_.Set("alt", alt) 13254 c.urlParams_.Set("prettyPrint", "false") 13255 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:detectIntent") 13256 urls += "?" + c.urlParams_.Encode() 13257 req, err := http.NewRequest("POST", urls, body) 13258 if err != nil { 13259 return nil, err 13260 } 13261 req.Header = reqHeaders 13262 googleapi.Expand(req.URL, map[string]string{ 13263 "session": c.sessionid, 13264 }) 13265 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13266} 13267 13268// Do executes the "dialogflow.projects.locations.agents.environments.sessions.detectIntent" call. 13269// Exactly one of *GoogleCloudDialogflowCxV3beta1DetectIntentResponse or 13270// error will be non-nil. Any non-2xx status code is an error. Response 13271// headers are in either 13272// *GoogleCloudDialogflowCxV3beta1DetectIntentResponse.ServerResponse.Hea 13273// der or (if a response was returned at all) in 13274// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13275// whether the returned error was because http.StatusNotModified was 13276// returned. 13277func (c *ProjectsLocationsAgentsEnvironmentsSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1DetectIntentResponse, error) { 13278 gensupport.SetOptions(c.urlParams_, opts...) 13279 res, err := c.doRequest("json") 13280 if res != nil && res.StatusCode == http.StatusNotModified { 13281 if res.Body != nil { 13282 res.Body.Close() 13283 } 13284 return nil, &googleapi.Error{ 13285 Code: res.StatusCode, 13286 Header: res.Header, 13287 } 13288 } 13289 if err != nil { 13290 return nil, err 13291 } 13292 defer googleapi.CloseBody(res) 13293 if err := googleapi.CheckResponse(res); err != nil { 13294 return nil, err 13295 } 13296 ret := &GoogleCloudDialogflowCxV3beta1DetectIntentResponse{ 13297 ServerResponse: googleapi.ServerResponse{ 13298 Header: res.Header, 13299 HTTPStatusCode: res.StatusCode, 13300 }, 13301 } 13302 target := &ret 13303 if err := gensupport.DecodeResponse(target, res); err != nil { 13304 return nil, err 13305 } 13306 return ret, nil 13307 // { 13308 // "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries.", 13309 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}/sessions/{sessionsId}:detectIntent", 13310 // "httpMethod": "POST", 13311 // "id": "dialogflow.projects.locations.agents.environments.sessions.detectIntent", 13312 // "parameterOrder": [ 13313 // "session" 13314 // ], 13315 // "parameters": { 13316 // "session": { 13317 // "description": "Required. The name of the session this query is sent to. Format: `projects//locations//agents//sessions/` or `projects//locations//agents//environments//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length of the `Session ID` must not exceed 36 characters. For more information, see the [sessions guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).", 13318 // "location": "path", 13319 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+/sessions/[^/]+$", 13320 // "required": true, 13321 // "type": "string" 13322 // } 13323 // }, 13324 // "path": "v3beta1/{+session}:detectIntent", 13325 // "request": { 13326 // "$ref": "GoogleCloudDialogflowCxV3beta1DetectIntentRequest" 13327 // }, 13328 // "response": { 13329 // "$ref": "GoogleCloudDialogflowCxV3beta1DetectIntentResponse" 13330 // }, 13331 // "scopes": [ 13332 // "https://www.googleapis.com/auth/cloud-platform", 13333 // "https://www.googleapis.com/auth/dialogflow" 13334 // ] 13335 // } 13336 13337} 13338 13339// method id "dialogflow.projects.locations.agents.environments.sessions.fulfillIntent": 13340 13341type ProjectsLocationsAgentsEnvironmentsSessionsFulfillIntentCall struct { 13342 s *Service 13343 sessionid string 13344 googleclouddialogflowcxv3beta1fulfillintentrequest *GoogleCloudDialogflowCxV3beta1FulfillIntentRequest 13345 urlParams_ gensupport.URLParams 13346 ctx_ context.Context 13347 header_ http.Header 13348} 13349 13350// FulfillIntent: Fulfills a matched intent returned by MatchIntent. 13351// Must be called after MatchIntent, with input from 13352// MatchIntentResponse. Otherwise, the behavior is undefined. 13353func (r *ProjectsLocationsAgentsEnvironmentsSessionsService) FulfillIntent(sessionid string, googleclouddialogflowcxv3beta1fulfillintentrequest *GoogleCloudDialogflowCxV3beta1FulfillIntentRequest) *ProjectsLocationsAgentsEnvironmentsSessionsFulfillIntentCall { 13354 c := &ProjectsLocationsAgentsEnvironmentsSessionsFulfillIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13355 c.sessionid = sessionid 13356 c.googleclouddialogflowcxv3beta1fulfillintentrequest = googleclouddialogflowcxv3beta1fulfillintentrequest 13357 return c 13358} 13359 13360// Fields allows partial responses to be retrieved. See 13361// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13362// for more information. 13363func (c *ProjectsLocationsAgentsEnvironmentsSessionsFulfillIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsSessionsFulfillIntentCall { 13364 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13365 return c 13366} 13367 13368// Context sets the context to be used in this call's Do method. Any 13369// pending HTTP request will be aborted if the provided context is 13370// canceled. 13371func (c *ProjectsLocationsAgentsEnvironmentsSessionsFulfillIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsSessionsFulfillIntentCall { 13372 c.ctx_ = ctx 13373 return c 13374} 13375 13376// Header returns an http.Header that can be modified by the caller to 13377// add HTTP headers to the request. 13378func (c *ProjectsLocationsAgentsEnvironmentsSessionsFulfillIntentCall) Header() http.Header { 13379 if c.header_ == nil { 13380 c.header_ = make(http.Header) 13381 } 13382 return c.header_ 13383} 13384 13385func (c *ProjectsLocationsAgentsEnvironmentsSessionsFulfillIntentCall) doRequest(alt string) (*http.Response, error) { 13386 reqHeaders := make(http.Header) 13387 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13388 for k, v := range c.header_ { 13389 reqHeaders[k] = v 13390 } 13391 reqHeaders.Set("User-Agent", c.s.userAgent()) 13392 var body io.Reader = nil 13393 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1fulfillintentrequest) 13394 if err != nil { 13395 return nil, err 13396 } 13397 reqHeaders.Set("Content-Type", "application/json") 13398 c.urlParams_.Set("alt", alt) 13399 c.urlParams_.Set("prettyPrint", "false") 13400 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:fulfillIntent") 13401 urls += "?" + c.urlParams_.Encode() 13402 req, err := http.NewRequest("POST", urls, body) 13403 if err != nil { 13404 return nil, err 13405 } 13406 req.Header = reqHeaders 13407 googleapi.Expand(req.URL, map[string]string{ 13408 "session": c.sessionid, 13409 }) 13410 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13411} 13412 13413// Do executes the "dialogflow.projects.locations.agents.environments.sessions.fulfillIntent" call. 13414// Exactly one of *GoogleCloudDialogflowCxV3beta1FulfillIntentResponse 13415// or error will be non-nil. Any non-2xx status code is an error. 13416// Response headers are in either 13417// *GoogleCloudDialogflowCxV3beta1FulfillIntentResponse.ServerResponse.He 13418// ader or (if a response was returned at all) in 13419// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13420// whether the returned error was because http.StatusNotModified was 13421// returned. 13422func (c *ProjectsLocationsAgentsEnvironmentsSessionsFulfillIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1FulfillIntentResponse, error) { 13423 gensupport.SetOptions(c.urlParams_, opts...) 13424 res, err := c.doRequest("json") 13425 if res != nil && res.StatusCode == http.StatusNotModified { 13426 if res.Body != nil { 13427 res.Body.Close() 13428 } 13429 return nil, &googleapi.Error{ 13430 Code: res.StatusCode, 13431 Header: res.Header, 13432 } 13433 } 13434 if err != nil { 13435 return nil, err 13436 } 13437 defer googleapi.CloseBody(res) 13438 if err := googleapi.CheckResponse(res); err != nil { 13439 return nil, err 13440 } 13441 ret := &GoogleCloudDialogflowCxV3beta1FulfillIntentResponse{ 13442 ServerResponse: googleapi.ServerResponse{ 13443 Header: res.Header, 13444 HTTPStatusCode: res.StatusCode, 13445 }, 13446 } 13447 target := &ret 13448 if err := gensupport.DecodeResponse(target, res); err != nil { 13449 return nil, err 13450 } 13451 return ret, nil 13452 // { 13453 // "description": "Fulfills a matched intent returned by MatchIntent. Must be called after MatchIntent, with input from MatchIntentResponse. Otherwise, the behavior is undefined.", 13454 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}/sessions/{sessionsId}:fulfillIntent", 13455 // "httpMethod": "POST", 13456 // "id": "dialogflow.projects.locations.agents.environments.sessions.fulfillIntent", 13457 // "parameterOrder": [ 13458 // "session" 13459 // ], 13460 // "parameters": { 13461 // "session": { 13462 // "description": "Required. The name of the session this query is sent to. Format: `projects//locations//agents//sessions/` or `projects//locations//agents//environments//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length of the `Session ID` must not exceed 36 characters. For more information, see the [sessions guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).", 13463 // "location": "path", 13464 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+/sessions/[^/]+$", 13465 // "required": true, 13466 // "type": "string" 13467 // } 13468 // }, 13469 // "path": "v3beta1/{+session}:fulfillIntent", 13470 // "request": { 13471 // "$ref": "GoogleCloudDialogflowCxV3beta1FulfillIntentRequest" 13472 // }, 13473 // "response": { 13474 // "$ref": "GoogleCloudDialogflowCxV3beta1FulfillIntentResponse" 13475 // }, 13476 // "scopes": [ 13477 // "https://www.googleapis.com/auth/cloud-platform", 13478 // "https://www.googleapis.com/auth/dialogflow" 13479 // ] 13480 // } 13481 13482} 13483 13484// method id "dialogflow.projects.locations.agents.environments.sessions.matchIntent": 13485 13486type ProjectsLocationsAgentsEnvironmentsSessionsMatchIntentCall struct { 13487 s *Service 13488 sessionid string 13489 googleclouddialogflowcxv3beta1matchintentrequest *GoogleCloudDialogflowCxV3beta1MatchIntentRequest 13490 urlParams_ gensupport.URLParams 13491 ctx_ context.Context 13492 header_ http.Header 13493} 13494 13495// MatchIntent: Returns preliminary intent match results, doesn't change 13496// the session status. 13497func (r *ProjectsLocationsAgentsEnvironmentsSessionsService) MatchIntent(sessionid string, googleclouddialogflowcxv3beta1matchintentrequest *GoogleCloudDialogflowCxV3beta1MatchIntentRequest) *ProjectsLocationsAgentsEnvironmentsSessionsMatchIntentCall { 13498 c := &ProjectsLocationsAgentsEnvironmentsSessionsMatchIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13499 c.sessionid = sessionid 13500 c.googleclouddialogflowcxv3beta1matchintentrequest = googleclouddialogflowcxv3beta1matchintentrequest 13501 return c 13502} 13503 13504// Fields allows partial responses to be retrieved. See 13505// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13506// for more information. 13507func (c *ProjectsLocationsAgentsEnvironmentsSessionsMatchIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsSessionsMatchIntentCall { 13508 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13509 return c 13510} 13511 13512// Context sets the context to be used in this call's Do method. Any 13513// pending HTTP request will be aborted if the provided context is 13514// canceled. 13515func (c *ProjectsLocationsAgentsEnvironmentsSessionsMatchIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsSessionsMatchIntentCall { 13516 c.ctx_ = ctx 13517 return c 13518} 13519 13520// Header returns an http.Header that can be modified by the caller to 13521// add HTTP headers to the request. 13522func (c *ProjectsLocationsAgentsEnvironmentsSessionsMatchIntentCall) Header() http.Header { 13523 if c.header_ == nil { 13524 c.header_ = make(http.Header) 13525 } 13526 return c.header_ 13527} 13528 13529func (c *ProjectsLocationsAgentsEnvironmentsSessionsMatchIntentCall) doRequest(alt string) (*http.Response, error) { 13530 reqHeaders := make(http.Header) 13531 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13532 for k, v := range c.header_ { 13533 reqHeaders[k] = v 13534 } 13535 reqHeaders.Set("User-Agent", c.s.userAgent()) 13536 var body io.Reader = nil 13537 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1matchintentrequest) 13538 if err != nil { 13539 return nil, err 13540 } 13541 reqHeaders.Set("Content-Type", "application/json") 13542 c.urlParams_.Set("alt", alt) 13543 c.urlParams_.Set("prettyPrint", "false") 13544 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:matchIntent") 13545 urls += "?" + c.urlParams_.Encode() 13546 req, err := http.NewRequest("POST", urls, body) 13547 if err != nil { 13548 return nil, err 13549 } 13550 req.Header = reqHeaders 13551 googleapi.Expand(req.URL, map[string]string{ 13552 "session": c.sessionid, 13553 }) 13554 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13555} 13556 13557// Do executes the "dialogflow.projects.locations.agents.environments.sessions.matchIntent" call. 13558// Exactly one of *GoogleCloudDialogflowCxV3beta1MatchIntentResponse or 13559// error will be non-nil. Any non-2xx status code is an error. Response 13560// headers are in either 13561// *GoogleCloudDialogflowCxV3beta1MatchIntentResponse.ServerResponse.Head 13562// er or (if a response was returned at all) in 13563// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13564// whether the returned error was because http.StatusNotModified was 13565// returned. 13566func (c *ProjectsLocationsAgentsEnvironmentsSessionsMatchIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1MatchIntentResponse, error) { 13567 gensupport.SetOptions(c.urlParams_, opts...) 13568 res, err := c.doRequest("json") 13569 if res != nil && res.StatusCode == http.StatusNotModified { 13570 if res.Body != nil { 13571 res.Body.Close() 13572 } 13573 return nil, &googleapi.Error{ 13574 Code: res.StatusCode, 13575 Header: res.Header, 13576 } 13577 } 13578 if err != nil { 13579 return nil, err 13580 } 13581 defer googleapi.CloseBody(res) 13582 if err := googleapi.CheckResponse(res); err != nil { 13583 return nil, err 13584 } 13585 ret := &GoogleCloudDialogflowCxV3beta1MatchIntentResponse{ 13586 ServerResponse: googleapi.ServerResponse{ 13587 Header: res.Header, 13588 HTTPStatusCode: res.StatusCode, 13589 }, 13590 } 13591 target := &ret 13592 if err := gensupport.DecodeResponse(target, res); err != nil { 13593 return nil, err 13594 } 13595 return ret, nil 13596 // { 13597 // "description": "Returns preliminary intent match results, doesn't change the session status.", 13598 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}/sessions/{sessionsId}:matchIntent", 13599 // "httpMethod": "POST", 13600 // "id": "dialogflow.projects.locations.agents.environments.sessions.matchIntent", 13601 // "parameterOrder": [ 13602 // "session" 13603 // ], 13604 // "parameters": { 13605 // "session": { 13606 // "description": "Required. The name of the session this query is sent to. Format: `projects//locations//agents//sessions/` or `projects//locations//agents//environments//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length of the `Session ID` must not exceed 36 characters. For more information, see the [sessions guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).", 13607 // "location": "path", 13608 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+/sessions/[^/]+$", 13609 // "required": true, 13610 // "type": "string" 13611 // } 13612 // }, 13613 // "path": "v3beta1/{+session}:matchIntent", 13614 // "request": { 13615 // "$ref": "GoogleCloudDialogflowCxV3beta1MatchIntentRequest" 13616 // }, 13617 // "response": { 13618 // "$ref": "GoogleCloudDialogflowCxV3beta1MatchIntentResponse" 13619 // }, 13620 // "scopes": [ 13621 // "https://www.googleapis.com/auth/cloud-platform", 13622 // "https://www.googleapis.com/auth/dialogflow" 13623 // ] 13624 // } 13625 13626} 13627 13628// method id "dialogflow.projects.locations.agents.environments.sessions.entityTypes.create": 13629 13630type ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesCreateCall struct { 13631 s *Service 13632 parent string 13633 googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType 13634 urlParams_ gensupport.URLParams 13635 ctx_ context.Context 13636 header_ http.Header 13637} 13638 13639// Create: Creates a session entity type. If the specified session 13640// entity type already exists, overrides the session entity type. 13641func (r *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService) Create(parent string, googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesCreateCall { 13642 c := &ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13643 c.parent = parent 13644 c.googleclouddialogflowcxv3beta1sessionentitytype = googleclouddialogflowcxv3beta1sessionentitytype 13645 return c 13646} 13647 13648// Fields allows partial responses to be retrieved. See 13649// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13650// for more information. 13651func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesCreateCall { 13652 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13653 return c 13654} 13655 13656// Context sets the context to be used in this call's Do method. Any 13657// pending HTTP request will be aborted if the provided context is 13658// canceled. 13659func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesCreateCall { 13660 c.ctx_ = ctx 13661 return c 13662} 13663 13664// Header returns an http.Header that can be modified by the caller to 13665// add HTTP headers to the request. 13666func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesCreateCall) Header() http.Header { 13667 if c.header_ == nil { 13668 c.header_ = make(http.Header) 13669 } 13670 return c.header_ 13671} 13672 13673func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { 13674 reqHeaders := make(http.Header) 13675 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13676 for k, v := range c.header_ { 13677 reqHeaders[k] = v 13678 } 13679 reqHeaders.Set("User-Agent", c.s.userAgent()) 13680 var body io.Reader = nil 13681 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1sessionentitytype) 13682 if err != nil { 13683 return nil, err 13684 } 13685 reqHeaders.Set("Content-Type", "application/json") 13686 c.urlParams_.Set("alt", alt) 13687 c.urlParams_.Set("prettyPrint", "false") 13688 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/entityTypes") 13689 urls += "?" + c.urlParams_.Encode() 13690 req, err := http.NewRequest("POST", urls, body) 13691 if err != nil { 13692 return nil, err 13693 } 13694 req.Header = reqHeaders 13695 googleapi.Expand(req.URL, map[string]string{ 13696 "parent": c.parent, 13697 }) 13698 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13699} 13700 13701// Do executes the "dialogflow.projects.locations.agents.environments.sessions.entityTypes.create" call. 13702// Exactly one of *GoogleCloudDialogflowCxV3beta1SessionEntityType or 13703// error will be non-nil. Any non-2xx status code is an error. Response 13704// headers are in either 13705// *GoogleCloudDialogflowCxV3beta1SessionEntityType.ServerResponse.Header 13706// or (if a response was returned at all) in 13707// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13708// whether the returned error was because http.StatusNotModified was 13709// returned. 13710func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, error) { 13711 gensupport.SetOptions(c.urlParams_, opts...) 13712 res, err := c.doRequest("json") 13713 if res != nil && res.StatusCode == http.StatusNotModified { 13714 if res.Body != nil { 13715 res.Body.Close() 13716 } 13717 return nil, &googleapi.Error{ 13718 Code: res.StatusCode, 13719 Header: res.Header, 13720 } 13721 } 13722 if err != nil { 13723 return nil, err 13724 } 13725 defer googleapi.CloseBody(res) 13726 if err := googleapi.CheckResponse(res); err != nil { 13727 return nil, err 13728 } 13729 ret := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ 13730 ServerResponse: googleapi.ServerResponse{ 13731 Header: res.Header, 13732 HTTPStatusCode: res.StatusCode, 13733 }, 13734 } 13735 target := &ret 13736 if err := gensupport.DecodeResponse(target, res); err != nil { 13737 return nil, err 13738 } 13739 return ret, nil 13740 // { 13741 // "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type.", 13742 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}/sessions/{sessionsId}/entityTypes", 13743 // "httpMethod": "POST", 13744 // "id": "dialogflow.projects.locations.agents.environments.sessions.entityTypes.create", 13745 // "parameterOrder": [ 13746 // "parent" 13747 // ], 13748 // "parameters": { 13749 // "parent": { 13750 // "description": "Required. The session to create a session entity type for. Format: `projects//locations//agents//sessions/` or `projects//locations//agents//environments//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment.", 13751 // "location": "path", 13752 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+/sessions/[^/]+$", 13753 // "required": true, 13754 // "type": "string" 13755 // } 13756 // }, 13757 // "path": "v3beta1/{+parent}/entityTypes", 13758 // "request": { 13759 // "$ref": "GoogleCloudDialogflowCxV3beta1SessionEntityType" 13760 // }, 13761 // "response": { 13762 // "$ref": "GoogleCloudDialogflowCxV3beta1SessionEntityType" 13763 // }, 13764 // "scopes": [ 13765 // "https://www.googleapis.com/auth/cloud-platform", 13766 // "https://www.googleapis.com/auth/dialogflow" 13767 // ] 13768 // } 13769 13770} 13771 13772// method id "dialogflow.projects.locations.agents.environments.sessions.entityTypes.delete": 13773 13774type ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesDeleteCall struct { 13775 s *Service 13776 name string 13777 urlParams_ gensupport.URLParams 13778 ctx_ context.Context 13779 header_ http.Header 13780} 13781 13782// Delete: Deletes the specified session entity type. 13783func (r *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService) Delete(name string) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesDeleteCall { 13784 c := &ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13785 c.name = name 13786 return c 13787} 13788 13789// Fields allows partial responses to be retrieved. See 13790// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13791// for more information. 13792func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesDeleteCall { 13793 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13794 return c 13795} 13796 13797// Context sets the context to be used in this call's Do method. Any 13798// pending HTTP request will be aborted if the provided context is 13799// canceled. 13800func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesDeleteCall { 13801 c.ctx_ = ctx 13802 return c 13803} 13804 13805// Header returns an http.Header that can be modified by the caller to 13806// add HTTP headers to the request. 13807func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesDeleteCall) Header() http.Header { 13808 if c.header_ == nil { 13809 c.header_ = make(http.Header) 13810 } 13811 return c.header_ 13812} 13813 13814func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 13815 reqHeaders := make(http.Header) 13816 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13817 for k, v := range c.header_ { 13818 reqHeaders[k] = v 13819 } 13820 reqHeaders.Set("User-Agent", c.s.userAgent()) 13821 var body io.Reader = nil 13822 c.urlParams_.Set("alt", alt) 13823 c.urlParams_.Set("prettyPrint", "false") 13824 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 13825 urls += "?" + c.urlParams_.Encode() 13826 req, err := http.NewRequest("DELETE", urls, body) 13827 if err != nil { 13828 return nil, err 13829 } 13830 req.Header = reqHeaders 13831 googleapi.Expand(req.URL, map[string]string{ 13832 "name": c.name, 13833 }) 13834 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13835} 13836 13837// Do executes the "dialogflow.projects.locations.agents.environments.sessions.entityTypes.delete" call. 13838// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13839// non-2xx status code is an error. Response headers are in either 13840// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13841// returned at all) in error.(*googleapi.Error).Header. Use 13842// googleapi.IsNotModified to check whether the returned error was 13843// because http.StatusNotModified was returned. 13844func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13845 gensupport.SetOptions(c.urlParams_, opts...) 13846 res, err := c.doRequest("json") 13847 if res != nil && res.StatusCode == http.StatusNotModified { 13848 if res.Body != nil { 13849 res.Body.Close() 13850 } 13851 return nil, &googleapi.Error{ 13852 Code: res.StatusCode, 13853 Header: res.Header, 13854 } 13855 } 13856 if err != nil { 13857 return nil, err 13858 } 13859 defer googleapi.CloseBody(res) 13860 if err := googleapi.CheckResponse(res); err != nil { 13861 return nil, err 13862 } 13863 ret := &GoogleProtobufEmpty{ 13864 ServerResponse: googleapi.ServerResponse{ 13865 Header: res.Header, 13866 HTTPStatusCode: res.StatusCode, 13867 }, 13868 } 13869 target := &ret 13870 if err := gensupport.DecodeResponse(target, res); err != nil { 13871 return nil, err 13872 } 13873 return ret, nil 13874 // { 13875 // "description": "Deletes the specified session entity type.", 13876 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", 13877 // "httpMethod": "DELETE", 13878 // "id": "dialogflow.projects.locations.agents.environments.sessions.entityTypes.delete", 13879 // "parameterOrder": [ 13880 // "name" 13881 // ], 13882 // "parameters": { 13883 // "name": { 13884 // "description": "Required. The name of the session entity type to delete. Format: `projects//locations//agents//sessions//entityTypes/` or `projects//locations//agents//environments//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment.", 13885 // "location": "path", 13886 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", 13887 // "required": true, 13888 // "type": "string" 13889 // } 13890 // }, 13891 // "path": "v3beta1/{+name}", 13892 // "response": { 13893 // "$ref": "GoogleProtobufEmpty" 13894 // }, 13895 // "scopes": [ 13896 // "https://www.googleapis.com/auth/cloud-platform", 13897 // "https://www.googleapis.com/auth/dialogflow" 13898 // ] 13899 // } 13900 13901} 13902 13903// method id "dialogflow.projects.locations.agents.environments.sessions.entityTypes.get": 13904 13905type ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall struct { 13906 s *Service 13907 name string 13908 urlParams_ gensupport.URLParams 13909 ifNoneMatch_ string 13910 ctx_ context.Context 13911 header_ http.Header 13912} 13913 13914// Get: Retrieves the specified session entity type. 13915func (r *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService) Get(name string) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall { 13916 c := &ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13917 c.name = name 13918 return c 13919} 13920 13921// Fields allows partial responses to be retrieved. See 13922// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13923// for more information. 13924func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall { 13925 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13926 return c 13927} 13928 13929// IfNoneMatch sets the optional parameter which makes the operation 13930// fail if the object's ETag matches the given value. This is useful for 13931// getting updates only after the object has changed since the last 13932// request. Use googleapi.IsNotModified to check whether the response 13933// error from Do is the result of In-None-Match. 13934func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall { 13935 c.ifNoneMatch_ = entityTag 13936 return c 13937} 13938 13939// Context sets the context to be used in this call's Do method. Any 13940// pending HTTP request will be aborted if the provided context is 13941// canceled. 13942func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall { 13943 c.ctx_ = ctx 13944 return c 13945} 13946 13947// Header returns an http.Header that can be modified by the caller to 13948// add HTTP headers to the request. 13949func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall) Header() http.Header { 13950 if c.header_ == nil { 13951 c.header_ = make(http.Header) 13952 } 13953 return c.header_ 13954} 13955 13956func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { 13957 reqHeaders := make(http.Header) 13958 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13959 for k, v := range c.header_ { 13960 reqHeaders[k] = v 13961 } 13962 reqHeaders.Set("User-Agent", c.s.userAgent()) 13963 if c.ifNoneMatch_ != "" { 13964 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13965 } 13966 var body io.Reader = nil 13967 c.urlParams_.Set("alt", alt) 13968 c.urlParams_.Set("prettyPrint", "false") 13969 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 13970 urls += "?" + c.urlParams_.Encode() 13971 req, err := http.NewRequest("GET", urls, body) 13972 if err != nil { 13973 return nil, err 13974 } 13975 req.Header = reqHeaders 13976 googleapi.Expand(req.URL, map[string]string{ 13977 "name": c.name, 13978 }) 13979 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13980} 13981 13982// Do executes the "dialogflow.projects.locations.agents.environments.sessions.entityTypes.get" call. 13983// Exactly one of *GoogleCloudDialogflowCxV3beta1SessionEntityType or 13984// error will be non-nil. Any non-2xx status code is an error. Response 13985// headers are in either 13986// *GoogleCloudDialogflowCxV3beta1SessionEntityType.ServerResponse.Header 13987// or (if a response was returned at all) in 13988// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13989// whether the returned error was because http.StatusNotModified was 13990// returned. 13991func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, error) { 13992 gensupport.SetOptions(c.urlParams_, opts...) 13993 res, err := c.doRequest("json") 13994 if res != nil && res.StatusCode == http.StatusNotModified { 13995 if res.Body != nil { 13996 res.Body.Close() 13997 } 13998 return nil, &googleapi.Error{ 13999 Code: res.StatusCode, 14000 Header: res.Header, 14001 } 14002 } 14003 if err != nil { 14004 return nil, err 14005 } 14006 defer googleapi.CloseBody(res) 14007 if err := googleapi.CheckResponse(res); err != nil { 14008 return nil, err 14009 } 14010 ret := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ 14011 ServerResponse: googleapi.ServerResponse{ 14012 Header: res.Header, 14013 HTTPStatusCode: res.StatusCode, 14014 }, 14015 } 14016 target := &ret 14017 if err := gensupport.DecodeResponse(target, res); err != nil { 14018 return nil, err 14019 } 14020 return ret, nil 14021 // { 14022 // "description": "Retrieves the specified session entity type.", 14023 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", 14024 // "httpMethod": "GET", 14025 // "id": "dialogflow.projects.locations.agents.environments.sessions.entityTypes.get", 14026 // "parameterOrder": [ 14027 // "name" 14028 // ], 14029 // "parameters": { 14030 // "name": { 14031 // "description": "Required. The name of the session entity type. Format: `projects//locations//agents//sessions//entityTypes/` or `projects//locations//agents//environments//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment.", 14032 // "location": "path", 14033 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", 14034 // "required": true, 14035 // "type": "string" 14036 // } 14037 // }, 14038 // "path": "v3beta1/{+name}", 14039 // "response": { 14040 // "$ref": "GoogleCloudDialogflowCxV3beta1SessionEntityType" 14041 // }, 14042 // "scopes": [ 14043 // "https://www.googleapis.com/auth/cloud-platform", 14044 // "https://www.googleapis.com/auth/dialogflow" 14045 // ] 14046 // } 14047 14048} 14049 14050// method id "dialogflow.projects.locations.agents.environments.sessions.entityTypes.list": 14051 14052type ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall struct { 14053 s *Service 14054 parent string 14055 urlParams_ gensupport.URLParams 14056 ifNoneMatch_ string 14057 ctx_ context.Context 14058 header_ http.Header 14059} 14060 14061// List: Returns the list of all session entity types in the specified 14062// session. 14063func (r *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService) List(parent string) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall { 14064 c := &ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14065 c.parent = parent 14066 return c 14067} 14068 14069// PageSize sets the optional parameter "pageSize": The maximum number 14070// of items to return in a single page. By default 100 and at most 1000. 14071func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall { 14072 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14073 return c 14074} 14075 14076// PageToken sets the optional parameter "pageToken": The 14077// next_page_token value returned from a previous list request. 14078func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall { 14079 c.urlParams_.Set("pageToken", pageToken) 14080 return c 14081} 14082 14083// Fields allows partial responses to be retrieved. See 14084// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14085// for more information. 14086func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall { 14087 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14088 return c 14089} 14090 14091// IfNoneMatch sets the optional parameter which makes the operation 14092// fail if the object's ETag matches the given value. This is useful for 14093// getting updates only after the object has changed since the last 14094// request. Use googleapi.IsNotModified to check whether the response 14095// error from Do is the result of In-None-Match. 14096func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall { 14097 c.ifNoneMatch_ = entityTag 14098 return c 14099} 14100 14101// Context sets the context to be used in this call's Do method. Any 14102// pending HTTP request will be aborted if the provided context is 14103// canceled. 14104func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall { 14105 c.ctx_ = ctx 14106 return c 14107} 14108 14109// Header returns an http.Header that can be modified by the caller to 14110// add HTTP headers to the request. 14111func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall) Header() http.Header { 14112 if c.header_ == nil { 14113 c.header_ = make(http.Header) 14114 } 14115 return c.header_ 14116} 14117 14118func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) { 14119 reqHeaders := make(http.Header) 14120 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14121 for k, v := range c.header_ { 14122 reqHeaders[k] = v 14123 } 14124 reqHeaders.Set("User-Agent", c.s.userAgent()) 14125 if c.ifNoneMatch_ != "" { 14126 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14127 } 14128 var body io.Reader = nil 14129 c.urlParams_.Set("alt", alt) 14130 c.urlParams_.Set("prettyPrint", "false") 14131 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/entityTypes") 14132 urls += "?" + c.urlParams_.Encode() 14133 req, err := http.NewRequest("GET", urls, body) 14134 if err != nil { 14135 return nil, err 14136 } 14137 req.Header = reqHeaders 14138 googleapi.Expand(req.URL, map[string]string{ 14139 "parent": c.parent, 14140 }) 14141 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14142} 14143 14144// Do executes the "dialogflow.projects.locations.agents.environments.sessions.entityTypes.list" call. 14145// Exactly one of 14146// *GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse or 14147// error will be non-nil. Any non-2xx status code is an error. Response 14148// headers are in either 14149// *GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse.ServerRe 14150// sponse.Header or (if a response was returned at all) in 14151// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14152// whether the returned error was because http.StatusNotModified was 14153// returned. 14154func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse, error) { 14155 gensupport.SetOptions(c.urlParams_, opts...) 14156 res, err := c.doRequest("json") 14157 if res != nil && res.StatusCode == http.StatusNotModified { 14158 if res.Body != nil { 14159 res.Body.Close() 14160 } 14161 return nil, &googleapi.Error{ 14162 Code: res.StatusCode, 14163 Header: res.Header, 14164 } 14165 } 14166 if err != nil { 14167 return nil, err 14168 } 14169 defer googleapi.CloseBody(res) 14170 if err := googleapi.CheckResponse(res); err != nil { 14171 return nil, err 14172 } 14173 ret := &GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse{ 14174 ServerResponse: googleapi.ServerResponse{ 14175 Header: res.Header, 14176 HTTPStatusCode: res.StatusCode, 14177 }, 14178 } 14179 target := &ret 14180 if err := gensupport.DecodeResponse(target, res); err != nil { 14181 return nil, err 14182 } 14183 return ret, nil 14184 // { 14185 // "description": "Returns the list of all session entity types in the specified session.", 14186 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}/sessions/{sessionsId}/entityTypes", 14187 // "httpMethod": "GET", 14188 // "id": "dialogflow.projects.locations.agents.environments.sessions.entityTypes.list", 14189 // "parameterOrder": [ 14190 // "parent" 14191 // ], 14192 // "parameters": { 14193 // "pageSize": { 14194 // "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", 14195 // "format": "int32", 14196 // "location": "query", 14197 // "type": "integer" 14198 // }, 14199 // "pageToken": { 14200 // "description": "The next_page_token value returned from a previous list request.", 14201 // "location": "query", 14202 // "type": "string" 14203 // }, 14204 // "parent": { 14205 // "description": "Required. The session to list all session entity types from. Format: `projects//locations//agents//sessions/` or `projects//locations//agents//environments//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment.", 14206 // "location": "path", 14207 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+/sessions/[^/]+$", 14208 // "required": true, 14209 // "type": "string" 14210 // } 14211 // }, 14212 // "path": "v3beta1/{+parent}/entityTypes", 14213 // "response": { 14214 // "$ref": "GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse" 14215 // }, 14216 // "scopes": [ 14217 // "https://www.googleapis.com/auth/cloud-platform", 14218 // "https://www.googleapis.com/auth/dialogflow" 14219 // ] 14220 // } 14221 14222} 14223 14224// Pages invokes f for each page of results. 14225// A non-nil error returned from f will halt the iteration. 14226// The provided context supersedes any context provided to the Context method. 14227func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse) error) error { 14228 c.ctx_ = ctx 14229 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14230 for { 14231 x, err := c.Do() 14232 if err != nil { 14233 return err 14234 } 14235 if err := f(x); err != nil { 14236 return err 14237 } 14238 if x.NextPageToken == "" { 14239 return nil 14240 } 14241 c.PageToken(x.NextPageToken) 14242 } 14243} 14244 14245// method id "dialogflow.projects.locations.agents.environments.sessions.entityTypes.patch": 14246 14247type ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall struct { 14248 s *Service 14249 nameid string 14250 googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType 14251 urlParams_ gensupport.URLParams 14252 ctx_ context.Context 14253 header_ http.Header 14254} 14255 14256// Patch: Updates the specified session entity type. 14257func (r *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall { 14258 c := &ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14259 c.nameid = nameid 14260 c.googleclouddialogflowcxv3beta1sessionentitytype = googleclouddialogflowcxv3beta1sessionentitytype 14261 return c 14262} 14263 14264// UpdateMask sets the optional parameter "updateMask": The mask to 14265// control which fields get updated. 14266func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall { 14267 c.urlParams_.Set("updateMask", updateMask) 14268 return c 14269} 14270 14271// Fields allows partial responses to be retrieved. See 14272// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14273// for more information. 14274func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall { 14275 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14276 return c 14277} 14278 14279// Context sets the context to be used in this call's Do method. Any 14280// pending HTTP request will be aborted if the provided context is 14281// canceled. 14282func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall { 14283 c.ctx_ = ctx 14284 return c 14285} 14286 14287// Header returns an http.Header that can be modified by the caller to 14288// add HTTP headers to the request. 14289func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall) Header() http.Header { 14290 if c.header_ == nil { 14291 c.header_ = make(http.Header) 14292 } 14293 return c.header_ 14294} 14295 14296func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { 14297 reqHeaders := make(http.Header) 14298 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14299 for k, v := range c.header_ { 14300 reqHeaders[k] = v 14301 } 14302 reqHeaders.Set("User-Agent", c.s.userAgent()) 14303 var body io.Reader = nil 14304 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1sessionentitytype) 14305 if err != nil { 14306 return nil, err 14307 } 14308 reqHeaders.Set("Content-Type", "application/json") 14309 c.urlParams_.Set("alt", alt) 14310 c.urlParams_.Set("prettyPrint", "false") 14311 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 14312 urls += "?" + c.urlParams_.Encode() 14313 req, err := http.NewRequest("PATCH", urls, body) 14314 if err != nil { 14315 return nil, err 14316 } 14317 req.Header = reqHeaders 14318 googleapi.Expand(req.URL, map[string]string{ 14319 "name": c.nameid, 14320 }) 14321 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14322} 14323 14324// Do executes the "dialogflow.projects.locations.agents.environments.sessions.entityTypes.patch" call. 14325// Exactly one of *GoogleCloudDialogflowCxV3beta1SessionEntityType or 14326// error will be non-nil. Any non-2xx status code is an error. Response 14327// headers are in either 14328// *GoogleCloudDialogflowCxV3beta1SessionEntityType.ServerResponse.Header 14329// or (if a response was returned at all) in 14330// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14331// whether the returned error was because http.StatusNotModified was 14332// returned. 14333func (c *ProjectsLocationsAgentsEnvironmentsSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, error) { 14334 gensupport.SetOptions(c.urlParams_, opts...) 14335 res, err := c.doRequest("json") 14336 if res != nil && res.StatusCode == http.StatusNotModified { 14337 if res.Body != nil { 14338 res.Body.Close() 14339 } 14340 return nil, &googleapi.Error{ 14341 Code: res.StatusCode, 14342 Header: res.Header, 14343 } 14344 } 14345 if err != nil { 14346 return nil, err 14347 } 14348 defer googleapi.CloseBody(res) 14349 if err := googleapi.CheckResponse(res); err != nil { 14350 return nil, err 14351 } 14352 ret := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ 14353 ServerResponse: googleapi.ServerResponse{ 14354 Header: res.Header, 14355 HTTPStatusCode: res.StatusCode, 14356 }, 14357 } 14358 target := &ret 14359 if err := gensupport.DecodeResponse(target, res); err != nil { 14360 return nil, err 14361 } 14362 return ret, nil 14363 // { 14364 // "description": "Updates the specified session entity type.", 14365 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", 14366 // "httpMethod": "PATCH", 14367 // "id": "dialogflow.projects.locations.agents.environments.sessions.entityTypes.patch", 14368 // "parameterOrder": [ 14369 // "name" 14370 // ], 14371 // "parameters": { 14372 // "name": { 14373 // "description": "Required. The unique identifier of the session entity type. Format: `projects//locations//agents//sessions//entityTypes/` or `projects//locations//agents//environments//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment.", 14374 // "location": "path", 14375 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", 14376 // "required": true, 14377 // "type": "string" 14378 // }, 14379 // "updateMask": { 14380 // "description": "The mask to control which fields get updated.", 14381 // "format": "google-fieldmask", 14382 // "location": "query", 14383 // "type": "string" 14384 // } 14385 // }, 14386 // "path": "v3beta1/{+name}", 14387 // "request": { 14388 // "$ref": "GoogleCloudDialogflowCxV3beta1SessionEntityType" 14389 // }, 14390 // "response": { 14391 // "$ref": "GoogleCloudDialogflowCxV3beta1SessionEntityType" 14392 // }, 14393 // "scopes": [ 14394 // "https://www.googleapis.com/auth/cloud-platform", 14395 // "https://www.googleapis.com/auth/dialogflow" 14396 // ] 14397 // } 14398 14399} 14400 14401// method id "dialogflow.projects.locations.agents.flows.create": 14402 14403type ProjectsLocationsAgentsFlowsCreateCall struct { 14404 s *Service 14405 parent string 14406 googleclouddialogflowcxv3beta1flow *GoogleCloudDialogflowCxV3beta1Flow 14407 urlParams_ gensupport.URLParams 14408 ctx_ context.Context 14409 header_ http.Header 14410} 14411 14412// Create: Creates a flow in the specified agent. 14413func (r *ProjectsLocationsAgentsFlowsService) Create(parent string, googleclouddialogflowcxv3beta1flow *GoogleCloudDialogflowCxV3beta1Flow) *ProjectsLocationsAgentsFlowsCreateCall { 14414 c := &ProjectsLocationsAgentsFlowsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14415 c.parent = parent 14416 c.googleclouddialogflowcxv3beta1flow = googleclouddialogflowcxv3beta1flow 14417 return c 14418} 14419 14420// LanguageCode sets the optional parameter "languageCode": The language 14421// of the following fields in `flow`: * 14422// `Flow.event_handlers.trigger_fulfillment.messages` * 14423// `Flow.transition_routes.trigger_fulfillment.messages` If not 14424// specified, the agent's default language is used. [Many 14425// languages](https://cloud.google.com/dialogflow/docs/reference/language 14426// ) are supported. Note: languages must be enabled in the agent before 14427// they can be used. 14428func (c *ProjectsLocationsAgentsFlowsCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsCreateCall { 14429 c.urlParams_.Set("languageCode", languageCode) 14430 return c 14431} 14432 14433// Fields allows partial responses to be retrieved. See 14434// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14435// for more information. 14436func (c *ProjectsLocationsAgentsFlowsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsCreateCall { 14437 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14438 return c 14439} 14440 14441// Context sets the context to be used in this call's Do method. Any 14442// pending HTTP request will be aborted if the provided context is 14443// canceled. 14444func (c *ProjectsLocationsAgentsFlowsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsCreateCall { 14445 c.ctx_ = ctx 14446 return c 14447} 14448 14449// Header returns an http.Header that can be modified by the caller to 14450// add HTTP headers to the request. 14451func (c *ProjectsLocationsAgentsFlowsCreateCall) Header() http.Header { 14452 if c.header_ == nil { 14453 c.header_ = make(http.Header) 14454 } 14455 return c.header_ 14456} 14457 14458func (c *ProjectsLocationsAgentsFlowsCreateCall) doRequest(alt string) (*http.Response, error) { 14459 reqHeaders := make(http.Header) 14460 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14461 for k, v := range c.header_ { 14462 reqHeaders[k] = v 14463 } 14464 reqHeaders.Set("User-Agent", c.s.userAgent()) 14465 var body io.Reader = nil 14466 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1flow) 14467 if err != nil { 14468 return nil, err 14469 } 14470 reqHeaders.Set("Content-Type", "application/json") 14471 c.urlParams_.Set("alt", alt) 14472 c.urlParams_.Set("prettyPrint", "false") 14473 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/flows") 14474 urls += "?" + c.urlParams_.Encode() 14475 req, err := http.NewRequest("POST", urls, body) 14476 if err != nil { 14477 return nil, err 14478 } 14479 req.Header = reqHeaders 14480 googleapi.Expand(req.URL, map[string]string{ 14481 "parent": c.parent, 14482 }) 14483 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14484} 14485 14486// Do executes the "dialogflow.projects.locations.agents.flows.create" call. 14487// Exactly one of *GoogleCloudDialogflowCxV3beta1Flow or error will be 14488// non-nil. Any non-2xx status code is an error. Response headers are in 14489// either *GoogleCloudDialogflowCxV3beta1Flow.ServerResponse.Header or 14490// (if a response was returned at all) in 14491// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14492// whether the returned error was because http.StatusNotModified was 14493// returned. 14494func (c *ProjectsLocationsAgentsFlowsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Flow, error) { 14495 gensupport.SetOptions(c.urlParams_, opts...) 14496 res, err := c.doRequest("json") 14497 if res != nil && res.StatusCode == http.StatusNotModified { 14498 if res.Body != nil { 14499 res.Body.Close() 14500 } 14501 return nil, &googleapi.Error{ 14502 Code: res.StatusCode, 14503 Header: res.Header, 14504 } 14505 } 14506 if err != nil { 14507 return nil, err 14508 } 14509 defer googleapi.CloseBody(res) 14510 if err := googleapi.CheckResponse(res); err != nil { 14511 return nil, err 14512 } 14513 ret := &GoogleCloudDialogflowCxV3beta1Flow{ 14514 ServerResponse: googleapi.ServerResponse{ 14515 Header: res.Header, 14516 HTTPStatusCode: res.StatusCode, 14517 }, 14518 } 14519 target := &ret 14520 if err := gensupport.DecodeResponse(target, res); err != nil { 14521 return nil, err 14522 } 14523 return ret, nil 14524 // { 14525 // "description": "Creates a flow in the specified agent.", 14526 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows", 14527 // "httpMethod": "POST", 14528 // "id": "dialogflow.projects.locations.agents.flows.create", 14529 // "parameterOrder": [ 14530 // "parent" 14531 // ], 14532 // "parameters": { 14533 // "languageCode": { 14534 // "description": "The language of the following fields in `flow`: * `Flow.event_handlers.trigger_fulfillment.messages` * `Flow.transition_routes.trigger_fulfillment.messages` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 14535 // "location": "query", 14536 // "type": "string" 14537 // }, 14538 // "parent": { 14539 // "description": "Required. The agent to create a flow for. Format: `projects//locations//agents/`.", 14540 // "location": "path", 14541 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 14542 // "required": true, 14543 // "type": "string" 14544 // } 14545 // }, 14546 // "path": "v3beta1/{+parent}/flows", 14547 // "request": { 14548 // "$ref": "GoogleCloudDialogflowCxV3beta1Flow" 14549 // }, 14550 // "response": { 14551 // "$ref": "GoogleCloudDialogflowCxV3beta1Flow" 14552 // }, 14553 // "scopes": [ 14554 // "https://www.googleapis.com/auth/cloud-platform", 14555 // "https://www.googleapis.com/auth/dialogflow" 14556 // ] 14557 // } 14558 14559} 14560 14561// method id "dialogflow.projects.locations.agents.flows.delete": 14562 14563type ProjectsLocationsAgentsFlowsDeleteCall struct { 14564 s *Service 14565 name string 14566 urlParams_ gensupport.URLParams 14567 ctx_ context.Context 14568 header_ http.Header 14569} 14570 14571// Delete: Deletes a specified flow. 14572func (r *ProjectsLocationsAgentsFlowsService) Delete(name string) *ProjectsLocationsAgentsFlowsDeleteCall { 14573 c := &ProjectsLocationsAgentsFlowsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14574 c.name = name 14575 return c 14576} 14577 14578// Force sets the optional parameter "force": This field has no effect 14579// for flows with no incoming transitions. For flows with incoming 14580// transitions: * If `force` is set to false, an error will be returned 14581// with message indicating the incoming transitions. * If `force` is set 14582// to true, Dialogflow will remove the flow, as well as any transitions 14583// to the flow (i.e. Target flow in event handlers or Target flow in 14584// transition routes that point to this flow will be cleared). 14585func (c *ProjectsLocationsAgentsFlowsDeleteCall) Force(force bool) *ProjectsLocationsAgentsFlowsDeleteCall { 14586 c.urlParams_.Set("force", fmt.Sprint(force)) 14587 return c 14588} 14589 14590// Fields allows partial responses to be retrieved. See 14591// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14592// for more information. 14593func (c *ProjectsLocationsAgentsFlowsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsDeleteCall { 14594 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14595 return c 14596} 14597 14598// Context sets the context to be used in this call's Do method. Any 14599// pending HTTP request will be aborted if the provided context is 14600// canceled. 14601func (c *ProjectsLocationsAgentsFlowsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsDeleteCall { 14602 c.ctx_ = ctx 14603 return c 14604} 14605 14606// Header returns an http.Header that can be modified by the caller to 14607// add HTTP headers to the request. 14608func (c *ProjectsLocationsAgentsFlowsDeleteCall) Header() http.Header { 14609 if c.header_ == nil { 14610 c.header_ = make(http.Header) 14611 } 14612 return c.header_ 14613} 14614 14615func (c *ProjectsLocationsAgentsFlowsDeleteCall) doRequest(alt string) (*http.Response, error) { 14616 reqHeaders := make(http.Header) 14617 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14618 for k, v := range c.header_ { 14619 reqHeaders[k] = v 14620 } 14621 reqHeaders.Set("User-Agent", c.s.userAgent()) 14622 var body io.Reader = nil 14623 c.urlParams_.Set("alt", alt) 14624 c.urlParams_.Set("prettyPrint", "false") 14625 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 14626 urls += "?" + c.urlParams_.Encode() 14627 req, err := http.NewRequest("DELETE", urls, body) 14628 if err != nil { 14629 return nil, err 14630 } 14631 req.Header = reqHeaders 14632 googleapi.Expand(req.URL, map[string]string{ 14633 "name": c.name, 14634 }) 14635 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14636} 14637 14638// Do executes the "dialogflow.projects.locations.agents.flows.delete" call. 14639// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14640// non-2xx status code is an error. Response headers are in either 14641// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14642// returned at all) in error.(*googleapi.Error).Header. Use 14643// googleapi.IsNotModified to check whether the returned error was 14644// because http.StatusNotModified was returned. 14645func (c *ProjectsLocationsAgentsFlowsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14646 gensupport.SetOptions(c.urlParams_, opts...) 14647 res, err := c.doRequest("json") 14648 if res != nil && res.StatusCode == http.StatusNotModified { 14649 if res.Body != nil { 14650 res.Body.Close() 14651 } 14652 return nil, &googleapi.Error{ 14653 Code: res.StatusCode, 14654 Header: res.Header, 14655 } 14656 } 14657 if err != nil { 14658 return nil, err 14659 } 14660 defer googleapi.CloseBody(res) 14661 if err := googleapi.CheckResponse(res); err != nil { 14662 return nil, err 14663 } 14664 ret := &GoogleProtobufEmpty{ 14665 ServerResponse: googleapi.ServerResponse{ 14666 Header: res.Header, 14667 HTTPStatusCode: res.StatusCode, 14668 }, 14669 } 14670 target := &ret 14671 if err := gensupport.DecodeResponse(target, res); err != nil { 14672 return nil, err 14673 } 14674 return ret, nil 14675 // { 14676 // "description": "Deletes a specified flow.", 14677 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}", 14678 // "httpMethod": "DELETE", 14679 // "id": "dialogflow.projects.locations.agents.flows.delete", 14680 // "parameterOrder": [ 14681 // "name" 14682 // ], 14683 // "parameters": { 14684 // "force": { 14685 // "description": "This field has no effect for flows with no incoming transitions. For flows with incoming transitions: * If `force` is set to false, an error will be returned with message indicating the incoming transitions. * If `force` is set to true, Dialogflow will remove the flow, as well as any transitions to the flow (i.e. Target flow in event handlers or Target flow in transition routes that point to this flow will be cleared).", 14686 // "location": "query", 14687 // "type": "boolean" 14688 // }, 14689 // "name": { 14690 // "description": "Required. The name of the flow to delete. Format: `projects//locations//agents//flows/`.", 14691 // "location": "path", 14692 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+$", 14693 // "required": true, 14694 // "type": "string" 14695 // } 14696 // }, 14697 // "path": "v3beta1/{+name}", 14698 // "response": { 14699 // "$ref": "GoogleProtobufEmpty" 14700 // }, 14701 // "scopes": [ 14702 // "https://www.googleapis.com/auth/cloud-platform", 14703 // "https://www.googleapis.com/auth/dialogflow" 14704 // ] 14705 // } 14706 14707} 14708 14709// method id "dialogflow.projects.locations.agents.flows.get": 14710 14711type ProjectsLocationsAgentsFlowsGetCall struct { 14712 s *Service 14713 name string 14714 urlParams_ gensupport.URLParams 14715 ifNoneMatch_ string 14716 ctx_ context.Context 14717 header_ http.Header 14718} 14719 14720// Get: Retrieves the specified flow. 14721func (r *ProjectsLocationsAgentsFlowsService) Get(name string) *ProjectsLocationsAgentsFlowsGetCall { 14722 c := &ProjectsLocationsAgentsFlowsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14723 c.name = name 14724 return c 14725} 14726 14727// LanguageCode sets the optional parameter "languageCode": The language 14728// to retrieve the flow for. The following fields are language 14729// dependent: * `Flow.event_handlers.trigger_fulfillment.messages` * 14730// `Flow.transition_routes.trigger_fulfillment.messages` If not 14731// specified, the agent's default language is used. [Many 14732// languages](https://cloud.google.com/dialogflow/docs/reference/language 14733// ) are supported. Note: languages must be enabled in the agent before 14734// they can be used. 14735func (c *ProjectsLocationsAgentsFlowsGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsGetCall { 14736 c.urlParams_.Set("languageCode", languageCode) 14737 return c 14738} 14739 14740// Fields allows partial responses to be retrieved. See 14741// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14742// for more information. 14743func (c *ProjectsLocationsAgentsFlowsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsGetCall { 14744 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14745 return c 14746} 14747 14748// IfNoneMatch sets the optional parameter which makes the operation 14749// fail if the object's ETag matches the given value. This is useful for 14750// getting updates only after the object has changed since the last 14751// request. Use googleapi.IsNotModified to check whether the response 14752// error from Do is the result of In-None-Match. 14753func (c *ProjectsLocationsAgentsFlowsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsFlowsGetCall { 14754 c.ifNoneMatch_ = entityTag 14755 return c 14756} 14757 14758// Context sets the context to be used in this call's Do method. Any 14759// pending HTTP request will be aborted if the provided context is 14760// canceled. 14761func (c *ProjectsLocationsAgentsFlowsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsGetCall { 14762 c.ctx_ = ctx 14763 return c 14764} 14765 14766// Header returns an http.Header that can be modified by the caller to 14767// add HTTP headers to the request. 14768func (c *ProjectsLocationsAgentsFlowsGetCall) Header() http.Header { 14769 if c.header_ == nil { 14770 c.header_ = make(http.Header) 14771 } 14772 return c.header_ 14773} 14774 14775func (c *ProjectsLocationsAgentsFlowsGetCall) doRequest(alt string) (*http.Response, error) { 14776 reqHeaders := make(http.Header) 14777 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14778 for k, v := range c.header_ { 14779 reqHeaders[k] = v 14780 } 14781 reqHeaders.Set("User-Agent", c.s.userAgent()) 14782 if c.ifNoneMatch_ != "" { 14783 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14784 } 14785 var body io.Reader = nil 14786 c.urlParams_.Set("alt", alt) 14787 c.urlParams_.Set("prettyPrint", "false") 14788 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 14789 urls += "?" + c.urlParams_.Encode() 14790 req, err := http.NewRequest("GET", urls, body) 14791 if err != nil { 14792 return nil, err 14793 } 14794 req.Header = reqHeaders 14795 googleapi.Expand(req.URL, map[string]string{ 14796 "name": c.name, 14797 }) 14798 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14799} 14800 14801// Do executes the "dialogflow.projects.locations.agents.flows.get" call. 14802// Exactly one of *GoogleCloudDialogflowCxV3beta1Flow or error will be 14803// non-nil. Any non-2xx status code is an error. Response headers are in 14804// either *GoogleCloudDialogflowCxV3beta1Flow.ServerResponse.Header or 14805// (if a response was returned at all) in 14806// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14807// whether the returned error was because http.StatusNotModified was 14808// returned. 14809func (c *ProjectsLocationsAgentsFlowsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Flow, error) { 14810 gensupport.SetOptions(c.urlParams_, opts...) 14811 res, err := c.doRequest("json") 14812 if res != nil && res.StatusCode == http.StatusNotModified { 14813 if res.Body != nil { 14814 res.Body.Close() 14815 } 14816 return nil, &googleapi.Error{ 14817 Code: res.StatusCode, 14818 Header: res.Header, 14819 } 14820 } 14821 if err != nil { 14822 return nil, err 14823 } 14824 defer googleapi.CloseBody(res) 14825 if err := googleapi.CheckResponse(res); err != nil { 14826 return nil, err 14827 } 14828 ret := &GoogleCloudDialogflowCxV3beta1Flow{ 14829 ServerResponse: googleapi.ServerResponse{ 14830 Header: res.Header, 14831 HTTPStatusCode: res.StatusCode, 14832 }, 14833 } 14834 target := &ret 14835 if err := gensupport.DecodeResponse(target, res); err != nil { 14836 return nil, err 14837 } 14838 return ret, nil 14839 // { 14840 // "description": "Retrieves the specified flow.", 14841 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}", 14842 // "httpMethod": "GET", 14843 // "id": "dialogflow.projects.locations.agents.flows.get", 14844 // "parameterOrder": [ 14845 // "name" 14846 // ], 14847 // "parameters": { 14848 // "languageCode": { 14849 // "description": "The language to retrieve the flow for. The following fields are language dependent: * `Flow.event_handlers.trigger_fulfillment.messages` * `Flow.transition_routes.trigger_fulfillment.messages` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 14850 // "location": "query", 14851 // "type": "string" 14852 // }, 14853 // "name": { 14854 // "description": "Required. The name of the flow to get. Format: `projects//locations//agents//flows/`.", 14855 // "location": "path", 14856 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+$", 14857 // "required": true, 14858 // "type": "string" 14859 // } 14860 // }, 14861 // "path": "v3beta1/{+name}", 14862 // "response": { 14863 // "$ref": "GoogleCloudDialogflowCxV3beta1Flow" 14864 // }, 14865 // "scopes": [ 14866 // "https://www.googleapis.com/auth/cloud-platform", 14867 // "https://www.googleapis.com/auth/dialogflow" 14868 // ] 14869 // } 14870 14871} 14872 14873// method id "dialogflow.projects.locations.agents.flows.list": 14874 14875type ProjectsLocationsAgentsFlowsListCall struct { 14876 s *Service 14877 parent string 14878 urlParams_ gensupport.URLParams 14879 ifNoneMatch_ string 14880 ctx_ context.Context 14881 header_ http.Header 14882} 14883 14884// List: Returns the list of all flows in the specified agent. 14885func (r *ProjectsLocationsAgentsFlowsService) List(parent string) *ProjectsLocationsAgentsFlowsListCall { 14886 c := &ProjectsLocationsAgentsFlowsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14887 c.parent = parent 14888 return c 14889} 14890 14891// LanguageCode sets the optional parameter "languageCode": The language 14892// to list flows for. The following fields are language dependent: * 14893// `Flow.event_handlers.trigger_fulfillment.messages` * 14894// `Flow.transition_routes.trigger_fulfillment.messages` If not 14895// specified, the agent's default language is used. [Many 14896// languages](https://cloud.google.com/dialogflow/docs/reference/language 14897// ) are supported. Note: languages must be enabled in the agent before 14898// they can be used. 14899func (c *ProjectsLocationsAgentsFlowsListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsListCall { 14900 c.urlParams_.Set("languageCode", languageCode) 14901 return c 14902} 14903 14904// PageSize sets the optional parameter "pageSize": The maximum number 14905// of items to return in a single page. By default 100 and at most 1000. 14906func (c *ProjectsLocationsAgentsFlowsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsFlowsListCall { 14907 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14908 return c 14909} 14910 14911// PageToken sets the optional parameter "pageToken": The 14912// next_page_token value returned from a previous list request. 14913func (c *ProjectsLocationsAgentsFlowsListCall) PageToken(pageToken string) *ProjectsLocationsAgentsFlowsListCall { 14914 c.urlParams_.Set("pageToken", pageToken) 14915 return c 14916} 14917 14918// Fields allows partial responses to be retrieved. See 14919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14920// for more information. 14921func (c *ProjectsLocationsAgentsFlowsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsListCall { 14922 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14923 return c 14924} 14925 14926// IfNoneMatch sets the optional parameter which makes the operation 14927// fail if the object's ETag matches the given value. This is useful for 14928// getting updates only after the object has changed since the last 14929// request. Use googleapi.IsNotModified to check whether the response 14930// error from Do is the result of In-None-Match. 14931func (c *ProjectsLocationsAgentsFlowsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsFlowsListCall { 14932 c.ifNoneMatch_ = entityTag 14933 return c 14934} 14935 14936// Context sets the context to be used in this call's Do method. Any 14937// pending HTTP request will be aborted if the provided context is 14938// canceled. 14939func (c *ProjectsLocationsAgentsFlowsListCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsListCall { 14940 c.ctx_ = ctx 14941 return c 14942} 14943 14944// Header returns an http.Header that can be modified by the caller to 14945// add HTTP headers to the request. 14946func (c *ProjectsLocationsAgentsFlowsListCall) Header() http.Header { 14947 if c.header_ == nil { 14948 c.header_ = make(http.Header) 14949 } 14950 return c.header_ 14951} 14952 14953func (c *ProjectsLocationsAgentsFlowsListCall) doRequest(alt string) (*http.Response, error) { 14954 reqHeaders := make(http.Header) 14955 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14956 for k, v := range c.header_ { 14957 reqHeaders[k] = v 14958 } 14959 reqHeaders.Set("User-Agent", c.s.userAgent()) 14960 if c.ifNoneMatch_ != "" { 14961 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14962 } 14963 var body io.Reader = nil 14964 c.urlParams_.Set("alt", alt) 14965 c.urlParams_.Set("prettyPrint", "false") 14966 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/flows") 14967 urls += "?" + c.urlParams_.Encode() 14968 req, err := http.NewRequest("GET", urls, body) 14969 if err != nil { 14970 return nil, err 14971 } 14972 req.Header = reqHeaders 14973 googleapi.Expand(req.URL, map[string]string{ 14974 "parent": c.parent, 14975 }) 14976 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14977} 14978 14979// Do executes the "dialogflow.projects.locations.agents.flows.list" call. 14980// Exactly one of *GoogleCloudDialogflowCxV3beta1ListFlowsResponse or 14981// error will be non-nil. Any non-2xx status code is an error. Response 14982// headers are in either 14983// *GoogleCloudDialogflowCxV3beta1ListFlowsResponse.ServerResponse.Header 14984// or (if a response was returned at all) in 14985// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14986// whether the returned error was because http.StatusNotModified was 14987// returned. 14988func (c *ProjectsLocationsAgentsFlowsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListFlowsResponse, error) { 14989 gensupport.SetOptions(c.urlParams_, opts...) 14990 res, err := c.doRequest("json") 14991 if res != nil && res.StatusCode == http.StatusNotModified { 14992 if res.Body != nil { 14993 res.Body.Close() 14994 } 14995 return nil, &googleapi.Error{ 14996 Code: res.StatusCode, 14997 Header: res.Header, 14998 } 14999 } 15000 if err != nil { 15001 return nil, err 15002 } 15003 defer googleapi.CloseBody(res) 15004 if err := googleapi.CheckResponse(res); err != nil { 15005 return nil, err 15006 } 15007 ret := &GoogleCloudDialogflowCxV3beta1ListFlowsResponse{ 15008 ServerResponse: googleapi.ServerResponse{ 15009 Header: res.Header, 15010 HTTPStatusCode: res.StatusCode, 15011 }, 15012 } 15013 target := &ret 15014 if err := gensupport.DecodeResponse(target, res); err != nil { 15015 return nil, err 15016 } 15017 return ret, nil 15018 // { 15019 // "description": "Returns the list of all flows in the specified agent.", 15020 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows", 15021 // "httpMethod": "GET", 15022 // "id": "dialogflow.projects.locations.agents.flows.list", 15023 // "parameterOrder": [ 15024 // "parent" 15025 // ], 15026 // "parameters": { 15027 // "languageCode": { 15028 // "description": "The language to list flows for. The following fields are language dependent: * `Flow.event_handlers.trigger_fulfillment.messages` * `Flow.transition_routes.trigger_fulfillment.messages` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 15029 // "location": "query", 15030 // "type": "string" 15031 // }, 15032 // "pageSize": { 15033 // "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", 15034 // "format": "int32", 15035 // "location": "query", 15036 // "type": "integer" 15037 // }, 15038 // "pageToken": { 15039 // "description": "The next_page_token value returned from a previous list request.", 15040 // "location": "query", 15041 // "type": "string" 15042 // }, 15043 // "parent": { 15044 // "description": "Required. The agent containing the flows. Format: `projects//locations//agents/`.", 15045 // "location": "path", 15046 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 15047 // "required": true, 15048 // "type": "string" 15049 // } 15050 // }, 15051 // "path": "v3beta1/{+parent}/flows", 15052 // "response": { 15053 // "$ref": "GoogleCloudDialogflowCxV3beta1ListFlowsResponse" 15054 // }, 15055 // "scopes": [ 15056 // "https://www.googleapis.com/auth/cloud-platform", 15057 // "https://www.googleapis.com/auth/dialogflow" 15058 // ] 15059 // } 15060 15061} 15062 15063// Pages invokes f for each page of results. 15064// A non-nil error returned from f will halt the iteration. 15065// The provided context supersedes any context provided to the Context method. 15066func (c *ProjectsLocationsAgentsFlowsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListFlowsResponse) error) error { 15067 c.ctx_ = ctx 15068 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15069 for { 15070 x, err := c.Do() 15071 if err != nil { 15072 return err 15073 } 15074 if err := f(x); err != nil { 15075 return err 15076 } 15077 if x.NextPageToken == "" { 15078 return nil 15079 } 15080 c.PageToken(x.NextPageToken) 15081 } 15082} 15083 15084// method id "dialogflow.projects.locations.agents.flows.patch": 15085 15086type ProjectsLocationsAgentsFlowsPatchCall struct { 15087 s *Service 15088 nameid string 15089 googleclouddialogflowcxv3beta1flow *GoogleCloudDialogflowCxV3beta1Flow 15090 urlParams_ gensupport.URLParams 15091 ctx_ context.Context 15092 header_ http.Header 15093} 15094 15095// Patch: Updates the specified flow. 15096func (r *ProjectsLocationsAgentsFlowsService) Patch(nameid string, googleclouddialogflowcxv3beta1flow *GoogleCloudDialogflowCxV3beta1Flow) *ProjectsLocationsAgentsFlowsPatchCall { 15097 c := &ProjectsLocationsAgentsFlowsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15098 c.nameid = nameid 15099 c.googleclouddialogflowcxv3beta1flow = googleclouddialogflowcxv3beta1flow 15100 return c 15101} 15102 15103// LanguageCode sets the optional parameter "languageCode": The language 15104// of the following fields in `flow`: * 15105// `Flow.event_handlers.trigger_fulfillment.messages` * 15106// `Flow.transition_routes.trigger_fulfillment.messages` If not 15107// specified, the agent's default language is used. [Many 15108// languages](https://cloud.google.com/dialogflow/docs/reference/language 15109// ) are supported. Note: languages must be enabled in the agent before 15110// they can be used. 15111func (c *ProjectsLocationsAgentsFlowsPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsPatchCall { 15112 c.urlParams_.Set("languageCode", languageCode) 15113 return c 15114} 15115 15116// UpdateMask sets the optional parameter "updateMask": Required. The 15117// mask to control which fields get updated. If `update_mask` is not 15118// specified, an error will be returned. 15119func (c *ProjectsLocationsAgentsFlowsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsFlowsPatchCall { 15120 c.urlParams_.Set("updateMask", updateMask) 15121 return c 15122} 15123 15124// Fields allows partial responses to be retrieved. See 15125// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15126// for more information. 15127func (c *ProjectsLocationsAgentsFlowsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsPatchCall { 15128 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15129 return c 15130} 15131 15132// Context sets the context to be used in this call's Do method. Any 15133// pending HTTP request will be aborted if the provided context is 15134// canceled. 15135func (c *ProjectsLocationsAgentsFlowsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsPatchCall { 15136 c.ctx_ = ctx 15137 return c 15138} 15139 15140// Header returns an http.Header that can be modified by the caller to 15141// add HTTP headers to the request. 15142func (c *ProjectsLocationsAgentsFlowsPatchCall) Header() http.Header { 15143 if c.header_ == nil { 15144 c.header_ = make(http.Header) 15145 } 15146 return c.header_ 15147} 15148 15149func (c *ProjectsLocationsAgentsFlowsPatchCall) doRequest(alt string) (*http.Response, error) { 15150 reqHeaders := make(http.Header) 15151 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15152 for k, v := range c.header_ { 15153 reqHeaders[k] = v 15154 } 15155 reqHeaders.Set("User-Agent", c.s.userAgent()) 15156 var body io.Reader = nil 15157 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1flow) 15158 if err != nil { 15159 return nil, err 15160 } 15161 reqHeaders.Set("Content-Type", "application/json") 15162 c.urlParams_.Set("alt", alt) 15163 c.urlParams_.Set("prettyPrint", "false") 15164 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 15165 urls += "?" + c.urlParams_.Encode() 15166 req, err := http.NewRequest("PATCH", urls, body) 15167 if err != nil { 15168 return nil, err 15169 } 15170 req.Header = reqHeaders 15171 googleapi.Expand(req.URL, map[string]string{ 15172 "name": c.nameid, 15173 }) 15174 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15175} 15176 15177// Do executes the "dialogflow.projects.locations.agents.flows.patch" call. 15178// Exactly one of *GoogleCloudDialogflowCxV3beta1Flow or error will be 15179// non-nil. Any non-2xx status code is an error. Response headers are in 15180// either *GoogleCloudDialogflowCxV3beta1Flow.ServerResponse.Header or 15181// (if a response was returned at all) in 15182// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15183// whether the returned error was because http.StatusNotModified was 15184// returned. 15185func (c *ProjectsLocationsAgentsFlowsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Flow, error) { 15186 gensupport.SetOptions(c.urlParams_, opts...) 15187 res, err := c.doRequest("json") 15188 if res != nil && res.StatusCode == http.StatusNotModified { 15189 if res.Body != nil { 15190 res.Body.Close() 15191 } 15192 return nil, &googleapi.Error{ 15193 Code: res.StatusCode, 15194 Header: res.Header, 15195 } 15196 } 15197 if err != nil { 15198 return nil, err 15199 } 15200 defer googleapi.CloseBody(res) 15201 if err := googleapi.CheckResponse(res); err != nil { 15202 return nil, err 15203 } 15204 ret := &GoogleCloudDialogflowCxV3beta1Flow{ 15205 ServerResponse: googleapi.ServerResponse{ 15206 Header: res.Header, 15207 HTTPStatusCode: res.StatusCode, 15208 }, 15209 } 15210 target := &ret 15211 if err := gensupport.DecodeResponse(target, res); err != nil { 15212 return nil, err 15213 } 15214 return ret, nil 15215 // { 15216 // "description": "Updates the specified flow.", 15217 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}", 15218 // "httpMethod": "PATCH", 15219 // "id": "dialogflow.projects.locations.agents.flows.patch", 15220 // "parameterOrder": [ 15221 // "name" 15222 // ], 15223 // "parameters": { 15224 // "languageCode": { 15225 // "description": "The language of the following fields in `flow`: * `Flow.event_handlers.trigger_fulfillment.messages` * `Flow.transition_routes.trigger_fulfillment.messages` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 15226 // "location": "query", 15227 // "type": "string" 15228 // }, 15229 // "name": { 15230 // "description": "The unique identifier of the flow. Format: `projects//locations//agents//flows/`.", 15231 // "location": "path", 15232 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+$", 15233 // "required": true, 15234 // "type": "string" 15235 // }, 15236 // "updateMask": { 15237 // "description": "Required. The mask to control which fields get updated. If `update_mask` is not specified, an error will be returned.", 15238 // "format": "google-fieldmask", 15239 // "location": "query", 15240 // "type": "string" 15241 // } 15242 // }, 15243 // "path": "v3beta1/{+name}", 15244 // "request": { 15245 // "$ref": "GoogleCloudDialogflowCxV3beta1Flow" 15246 // }, 15247 // "response": { 15248 // "$ref": "GoogleCloudDialogflowCxV3beta1Flow" 15249 // }, 15250 // "scopes": [ 15251 // "https://www.googleapis.com/auth/cloud-platform", 15252 // "https://www.googleapis.com/auth/dialogflow" 15253 // ] 15254 // } 15255 15256} 15257 15258// method id "dialogflow.projects.locations.agents.flows.train": 15259 15260type ProjectsLocationsAgentsFlowsTrainCall struct { 15261 s *Service 15262 name string 15263 googleclouddialogflowcxv3beta1trainflowrequest *GoogleCloudDialogflowCxV3beta1TrainFlowRequest 15264 urlParams_ gensupport.URLParams 15265 ctx_ context.Context 15266 header_ http.Header 15267} 15268 15269// Train: Trains the specified flow. Note that only the flow in 'draft' 15270// environment is trained. 15271func (r *ProjectsLocationsAgentsFlowsService) Train(name string, googleclouddialogflowcxv3beta1trainflowrequest *GoogleCloudDialogflowCxV3beta1TrainFlowRequest) *ProjectsLocationsAgentsFlowsTrainCall { 15272 c := &ProjectsLocationsAgentsFlowsTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15273 c.name = name 15274 c.googleclouddialogflowcxv3beta1trainflowrequest = googleclouddialogflowcxv3beta1trainflowrequest 15275 return c 15276} 15277 15278// Fields allows partial responses to be retrieved. See 15279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15280// for more information. 15281func (c *ProjectsLocationsAgentsFlowsTrainCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsTrainCall { 15282 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15283 return c 15284} 15285 15286// Context sets the context to be used in this call's Do method. Any 15287// pending HTTP request will be aborted if the provided context is 15288// canceled. 15289func (c *ProjectsLocationsAgentsFlowsTrainCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsTrainCall { 15290 c.ctx_ = ctx 15291 return c 15292} 15293 15294// Header returns an http.Header that can be modified by the caller to 15295// add HTTP headers to the request. 15296func (c *ProjectsLocationsAgentsFlowsTrainCall) Header() http.Header { 15297 if c.header_ == nil { 15298 c.header_ = make(http.Header) 15299 } 15300 return c.header_ 15301} 15302 15303func (c *ProjectsLocationsAgentsFlowsTrainCall) doRequest(alt string) (*http.Response, error) { 15304 reqHeaders := make(http.Header) 15305 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15306 for k, v := range c.header_ { 15307 reqHeaders[k] = v 15308 } 15309 reqHeaders.Set("User-Agent", c.s.userAgent()) 15310 var body io.Reader = nil 15311 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1trainflowrequest) 15312 if err != nil { 15313 return nil, err 15314 } 15315 reqHeaders.Set("Content-Type", "application/json") 15316 c.urlParams_.Set("alt", alt) 15317 c.urlParams_.Set("prettyPrint", "false") 15318 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}:train") 15319 urls += "?" + c.urlParams_.Encode() 15320 req, err := http.NewRequest("POST", urls, body) 15321 if err != nil { 15322 return nil, err 15323 } 15324 req.Header = reqHeaders 15325 googleapi.Expand(req.URL, map[string]string{ 15326 "name": c.name, 15327 }) 15328 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15329} 15330 15331// Do executes the "dialogflow.projects.locations.agents.flows.train" call. 15332// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 15333// Any non-2xx status code is an error. Response headers are in either 15334// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 15335// was returned at all) in error.(*googleapi.Error).Header. Use 15336// googleapi.IsNotModified to check whether the returned error was 15337// because http.StatusNotModified was returned. 15338func (c *ProjectsLocationsAgentsFlowsTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 15339 gensupport.SetOptions(c.urlParams_, opts...) 15340 res, err := c.doRequest("json") 15341 if res != nil && res.StatusCode == http.StatusNotModified { 15342 if res.Body != nil { 15343 res.Body.Close() 15344 } 15345 return nil, &googleapi.Error{ 15346 Code: res.StatusCode, 15347 Header: res.Header, 15348 } 15349 } 15350 if err != nil { 15351 return nil, err 15352 } 15353 defer googleapi.CloseBody(res) 15354 if err := googleapi.CheckResponse(res); err != nil { 15355 return nil, err 15356 } 15357 ret := &GoogleLongrunningOperation{ 15358 ServerResponse: googleapi.ServerResponse{ 15359 Header: res.Header, 15360 HTTPStatusCode: res.StatusCode, 15361 }, 15362 } 15363 target := &ret 15364 if err := gensupport.DecodeResponse(target, res); err != nil { 15365 return nil, err 15366 } 15367 return ret, nil 15368 // { 15369 // "description": "Trains the specified flow. Note that only the flow in 'draft' environment is trained.", 15370 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}:train", 15371 // "httpMethod": "POST", 15372 // "id": "dialogflow.projects.locations.agents.flows.train", 15373 // "parameterOrder": [ 15374 // "name" 15375 // ], 15376 // "parameters": { 15377 // "name": { 15378 // "description": "Required. The flow to train. Format: `projects//locations//agents//flows/`.", 15379 // "location": "path", 15380 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+$", 15381 // "required": true, 15382 // "type": "string" 15383 // } 15384 // }, 15385 // "path": "v3beta1/{+name}:train", 15386 // "request": { 15387 // "$ref": "GoogleCloudDialogflowCxV3beta1TrainFlowRequest" 15388 // }, 15389 // "response": { 15390 // "$ref": "GoogleLongrunningOperation" 15391 // }, 15392 // "scopes": [ 15393 // "https://www.googleapis.com/auth/cloud-platform", 15394 // "https://www.googleapis.com/auth/dialogflow" 15395 // ] 15396 // } 15397 15398} 15399 15400// method id "dialogflow.projects.locations.agents.flows.pages.create": 15401 15402type ProjectsLocationsAgentsFlowsPagesCreateCall struct { 15403 s *Service 15404 parent string 15405 googleclouddialogflowcxv3beta1page *GoogleCloudDialogflowCxV3beta1Page 15406 urlParams_ gensupport.URLParams 15407 ctx_ context.Context 15408 header_ http.Header 15409} 15410 15411// Create: Creates a page in the specified flow. 15412func (r *ProjectsLocationsAgentsFlowsPagesService) Create(parent string, googleclouddialogflowcxv3beta1page *GoogleCloudDialogflowCxV3beta1Page) *ProjectsLocationsAgentsFlowsPagesCreateCall { 15413 c := &ProjectsLocationsAgentsFlowsPagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15414 c.parent = parent 15415 c.googleclouddialogflowcxv3beta1page = googleclouddialogflowcxv3beta1page 15416 return c 15417} 15418 15419// LanguageCode sets the optional parameter "languageCode": The language 15420// of the following fields in `page`: * 15421// `Page.entry_fulfillment.messages` * 15422// `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.message 15423// s` * 15424// `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` 15425// * `Page.transition_routes.trigger_fulfillment.messages` * 15426// `Page.transition_route_groups.transition_routes.trigger_fulfillment.me 15427// ssages` If not specified, the agent's default language is used. [Many 15428// languages](https://cloud.google.com/dialogflow/docs/reference/language 15429// ) are supported. Note: languages must be enabled in the agent before 15430// they can be used. 15431func (c *ProjectsLocationsAgentsFlowsPagesCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsPagesCreateCall { 15432 c.urlParams_.Set("languageCode", languageCode) 15433 return c 15434} 15435 15436// Fields allows partial responses to be retrieved. See 15437// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15438// for more information. 15439func (c *ProjectsLocationsAgentsFlowsPagesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsPagesCreateCall { 15440 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15441 return c 15442} 15443 15444// Context sets the context to be used in this call's Do method. Any 15445// pending HTTP request will be aborted if the provided context is 15446// canceled. 15447func (c *ProjectsLocationsAgentsFlowsPagesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsPagesCreateCall { 15448 c.ctx_ = ctx 15449 return c 15450} 15451 15452// Header returns an http.Header that can be modified by the caller to 15453// add HTTP headers to the request. 15454func (c *ProjectsLocationsAgentsFlowsPagesCreateCall) Header() http.Header { 15455 if c.header_ == nil { 15456 c.header_ = make(http.Header) 15457 } 15458 return c.header_ 15459} 15460 15461func (c *ProjectsLocationsAgentsFlowsPagesCreateCall) doRequest(alt string) (*http.Response, error) { 15462 reqHeaders := make(http.Header) 15463 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15464 for k, v := range c.header_ { 15465 reqHeaders[k] = v 15466 } 15467 reqHeaders.Set("User-Agent", c.s.userAgent()) 15468 var body io.Reader = nil 15469 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1page) 15470 if err != nil { 15471 return nil, err 15472 } 15473 reqHeaders.Set("Content-Type", "application/json") 15474 c.urlParams_.Set("alt", alt) 15475 c.urlParams_.Set("prettyPrint", "false") 15476 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/pages") 15477 urls += "?" + c.urlParams_.Encode() 15478 req, err := http.NewRequest("POST", urls, body) 15479 if err != nil { 15480 return nil, err 15481 } 15482 req.Header = reqHeaders 15483 googleapi.Expand(req.URL, map[string]string{ 15484 "parent": c.parent, 15485 }) 15486 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15487} 15488 15489// Do executes the "dialogflow.projects.locations.agents.flows.pages.create" call. 15490// Exactly one of *GoogleCloudDialogflowCxV3beta1Page or error will be 15491// non-nil. Any non-2xx status code is an error. Response headers are in 15492// either *GoogleCloudDialogflowCxV3beta1Page.ServerResponse.Header or 15493// (if a response was returned at all) in 15494// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15495// whether the returned error was because http.StatusNotModified was 15496// returned. 15497func (c *ProjectsLocationsAgentsFlowsPagesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Page, error) { 15498 gensupport.SetOptions(c.urlParams_, opts...) 15499 res, err := c.doRequest("json") 15500 if res != nil && res.StatusCode == http.StatusNotModified { 15501 if res.Body != nil { 15502 res.Body.Close() 15503 } 15504 return nil, &googleapi.Error{ 15505 Code: res.StatusCode, 15506 Header: res.Header, 15507 } 15508 } 15509 if err != nil { 15510 return nil, err 15511 } 15512 defer googleapi.CloseBody(res) 15513 if err := googleapi.CheckResponse(res); err != nil { 15514 return nil, err 15515 } 15516 ret := &GoogleCloudDialogflowCxV3beta1Page{ 15517 ServerResponse: googleapi.ServerResponse{ 15518 Header: res.Header, 15519 HTTPStatusCode: res.StatusCode, 15520 }, 15521 } 15522 target := &ret 15523 if err := gensupport.DecodeResponse(target, res); err != nil { 15524 return nil, err 15525 } 15526 return ret, nil 15527 // { 15528 // "description": "Creates a page in the specified flow.", 15529 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/pages", 15530 // "httpMethod": "POST", 15531 // "id": "dialogflow.projects.locations.agents.flows.pages.create", 15532 // "parameterOrder": [ 15533 // "parent" 15534 // ], 15535 // "parameters": { 15536 // "languageCode": { 15537 // "description": "The language of the following fields in `page`: * `Page.entry_fulfillment.messages` * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` * `Page.transition_routes.trigger_fulfillment.messages` * `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 15538 // "location": "query", 15539 // "type": "string" 15540 // }, 15541 // "parent": { 15542 // "description": "Required. The flow to create a page for. Format: `projects//locations//agents//flows/`.", 15543 // "location": "path", 15544 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+$", 15545 // "required": true, 15546 // "type": "string" 15547 // } 15548 // }, 15549 // "path": "v3beta1/{+parent}/pages", 15550 // "request": { 15551 // "$ref": "GoogleCloudDialogflowCxV3beta1Page" 15552 // }, 15553 // "response": { 15554 // "$ref": "GoogleCloudDialogflowCxV3beta1Page" 15555 // }, 15556 // "scopes": [ 15557 // "https://www.googleapis.com/auth/cloud-platform", 15558 // "https://www.googleapis.com/auth/dialogflow" 15559 // ] 15560 // } 15561 15562} 15563 15564// method id "dialogflow.projects.locations.agents.flows.pages.delete": 15565 15566type ProjectsLocationsAgentsFlowsPagesDeleteCall struct { 15567 s *Service 15568 name string 15569 urlParams_ gensupport.URLParams 15570 ctx_ context.Context 15571 header_ http.Header 15572} 15573 15574// Delete: Deletes the specified page. 15575func (r *ProjectsLocationsAgentsFlowsPagesService) Delete(name string) *ProjectsLocationsAgentsFlowsPagesDeleteCall { 15576 c := &ProjectsLocationsAgentsFlowsPagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15577 c.name = name 15578 return c 15579} 15580 15581// Force sets the optional parameter "force": This field has no effect 15582// for pages with no incoming transitions. For pages with incoming 15583// transitions: * If `force` is set to false, an error will be returned 15584// with message indicating the incoming transitions. * If `force` is set 15585// to true, Dialogflow will remove the page, as well as any transitions 15586// to the page (i.e. Target page in event handlers or Target page in 15587// transition routes that point to this page will be cleared). 15588func (c *ProjectsLocationsAgentsFlowsPagesDeleteCall) Force(force bool) *ProjectsLocationsAgentsFlowsPagesDeleteCall { 15589 c.urlParams_.Set("force", fmt.Sprint(force)) 15590 return c 15591} 15592 15593// Fields allows partial responses to be retrieved. See 15594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15595// for more information. 15596func (c *ProjectsLocationsAgentsFlowsPagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsPagesDeleteCall { 15597 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15598 return c 15599} 15600 15601// Context sets the context to be used in this call's Do method. Any 15602// pending HTTP request will be aborted if the provided context is 15603// canceled. 15604func (c *ProjectsLocationsAgentsFlowsPagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsPagesDeleteCall { 15605 c.ctx_ = ctx 15606 return c 15607} 15608 15609// Header returns an http.Header that can be modified by the caller to 15610// add HTTP headers to the request. 15611func (c *ProjectsLocationsAgentsFlowsPagesDeleteCall) Header() http.Header { 15612 if c.header_ == nil { 15613 c.header_ = make(http.Header) 15614 } 15615 return c.header_ 15616} 15617 15618func (c *ProjectsLocationsAgentsFlowsPagesDeleteCall) doRequest(alt string) (*http.Response, error) { 15619 reqHeaders := make(http.Header) 15620 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15621 for k, v := range c.header_ { 15622 reqHeaders[k] = v 15623 } 15624 reqHeaders.Set("User-Agent", c.s.userAgent()) 15625 var body io.Reader = nil 15626 c.urlParams_.Set("alt", alt) 15627 c.urlParams_.Set("prettyPrint", "false") 15628 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 15629 urls += "?" + c.urlParams_.Encode() 15630 req, err := http.NewRequest("DELETE", urls, body) 15631 if err != nil { 15632 return nil, err 15633 } 15634 req.Header = reqHeaders 15635 googleapi.Expand(req.URL, map[string]string{ 15636 "name": c.name, 15637 }) 15638 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15639} 15640 15641// Do executes the "dialogflow.projects.locations.agents.flows.pages.delete" call. 15642// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 15643// non-2xx status code is an error. Response headers are in either 15644// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 15645// returned at all) in error.(*googleapi.Error).Header. Use 15646// googleapi.IsNotModified to check whether the returned error was 15647// because http.StatusNotModified was returned. 15648func (c *ProjectsLocationsAgentsFlowsPagesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 15649 gensupport.SetOptions(c.urlParams_, opts...) 15650 res, err := c.doRequest("json") 15651 if res != nil && res.StatusCode == http.StatusNotModified { 15652 if res.Body != nil { 15653 res.Body.Close() 15654 } 15655 return nil, &googleapi.Error{ 15656 Code: res.StatusCode, 15657 Header: res.Header, 15658 } 15659 } 15660 if err != nil { 15661 return nil, err 15662 } 15663 defer googleapi.CloseBody(res) 15664 if err := googleapi.CheckResponse(res); err != nil { 15665 return nil, err 15666 } 15667 ret := &GoogleProtobufEmpty{ 15668 ServerResponse: googleapi.ServerResponse{ 15669 Header: res.Header, 15670 HTTPStatusCode: res.StatusCode, 15671 }, 15672 } 15673 target := &ret 15674 if err := gensupport.DecodeResponse(target, res); err != nil { 15675 return nil, err 15676 } 15677 return ret, nil 15678 // { 15679 // "description": "Deletes the specified page.", 15680 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/pages/{pagesId}", 15681 // "httpMethod": "DELETE", 15682 // "id": "dialogflow.projects.locations.agents.flows.pages.delete", 15683 // "parameterOrder": [ 15684 // "name" 15685 // ], 15686 // "parameters": { 15687 // "force": { 15688 // "description": "This field has no effect for pages with no incoming transitions. For pages with incoming transitions: * If `force` is set to false, an error will be returned with message indicating the incoming transitions. * If `force` is set to true, Dialogflow will remove the page, as well as any transitions to the page (i.e. Target page in event handlers or Target page in transition routes that point to this page will be cleared).", 15689 // "location": "query", 15690 // "type": "boolean" 15691 // }, 15692 // "name": { 15693 // "description": "Required. The name of the page to delete. Format: `projects//locations//agents//Flows//pages/`.", 15694 // "location": "path", 15695 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/pages/[^/]+$", 15696 // "required": true, 15697 // "type": "string" 15698 // } 15699 // }, 15700 // "path": "v3beta1/{+name}", 15701 // "response": { 15702 // "$ref": "GoogleProtobufEmpty" 15703 // }, 15704 // "scopes": [ 15705 // "https://www.googleapis.com/auth/cloud-platform", 15706 // "https://www.googleapis.com/auth/dialogflow" 15707 // ] 15708 // } 15709 15710} 15711 15712// method id "dialogflow.projects.locations.agents.flows.pages.get": 15713 15714type ProjectsLocationsAgentsFlowsPagesGetCall struct { 15715 s *Service 15716 name string 15717 urlParams_ gensupport.URLParams 15718 ifNoneMatch_ string 15719 ctx_ context.Context 15720 header_ http.Header 15721} 15722 15723// Get: Retrieves the specified page. 15724func (r *ProjectsLocationsAgentsFlowsPagesService) Get(name string) *ProjectsLocationsAgentsFlowsPagesGetCall { 15725 c := &ProjectsLocationsAgentsFlowsPagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15726 c.name = name 15727 return c 15728} 15729 15730// LanguageCode sets the optional parameter "languageCode": The language 15731// to retrieve the page for. The following fields are language 15732// dependent: * `Page.entry_fulfillment.messages` * 15733// `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.message 15734// s` * 15735// `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` 15736// * `Page.transition_routes.trigger_fulfillment.messages` * 15737// `Page.transition_route_groups.transition_routes.trigger_fulfillment.me 15738// ssages` If not specified, the agent's default language is used. [Many 15739// languages](https://cloud.google.com/dialogflow/docs/reference/language 15740// ) are supported. Note: languages must be enabled in the agent before 15741// they can be used. 15742func (c *ProjectsLocationsAgentsFlowsPagesGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsPagesGetCall { 15743 c.urlParams_.Set("languageCode", languageCode) 15744 return c 15745} 15746 15747// Fields allows partial responses to be retrieved. See 15748// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15749// for more information. 15750func (c *ProjectsLocationsAgentsFlowsPagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsPagesGetCall { 15751 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15752 return c 15753} 15754 15755// IfNoneMatch sets the optional parameter which makes the operation 15756// fail if the object's ETag matches the given value. This is useful for 15757// getting updates only after the object has changed since the last 15758// request. Use googleapi.IsNotModified to check whether the response 15759// error from Do is the result of In-None-Match. 15760func (c *ProjectsLocationsAgentsFlowsPagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsFlowsPagesGetCall { 15761 c.ifNoneMatch_ = entityTag 15762 return c 15763} 15764 15765// Context sets the context to be used in this call's Do method. Any 15766// pending HTTP request will be aborted if the provided context is 15767// canceled. 15768func (c *ProjectsLocationsAgentsFlowsPagesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsPagesGetCall { 15769 c.ctx_ = ctx 15770 return c 15771} 15772 15773// Header returns an http.Header that can be modified by the caller to 15774// add HTTP headers to the request. 15775func (c *ProjectsLocationsAgentsFlowsPagesGetCall) Header() http.Header { 15776 if c.header_ == nil { 15777 c.header_ = make(http.Header) 15778 } 15779 return c.header_ 15780} 15781 15782func (c *ProjectsLocationsAgentsFlowsPagesGetCall) doRequest(alt string) (*http.Response, error) { 15783 reqHeaders := make(http.Header) 15784 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15785 for k, v := range c.header_ { 15786 reqHeaders[k] = v 15787 } 15788 reqHeaders.Set("User-Agent", c.s.userAgent()) 15789 if c.ifNoneMatch_ != "" { 15790 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15791 } 15792 var body io.Reader = nil 15793 c.urlParams_.Set("alt", alt) 15794 c.urlParams_.Set("prettyPrint", "false") 15795 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 15796 urls += "?" + c.urlParams_.Encode() 15797 req, err := http.NewRequest("GET", urls, body) 15798 if err != nil { 15799 return nil, err 15800 } 15801 req.Header = reqHeaders 15802 googleapi.Expand(req.URL, map[string]string{ 15803 "name": c.name, 15804 }) 15805 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15806} 15807 15808// Do executes the "dialogflow.projects.locations.agents.flows.pages.get" call. 15809// Exactly one of *GoogleCloudDialogflowCxV3beta1Page or error will be 15810// non-nil. Any non-2xx status code is an error. Response headers are in 15811// either *GoogleCloudDialogflowCxV3beta1Page.ServerResponse.Header or 15812// (if a response was returned at all) in 15813// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15814// whether the returned error was because http.StatusNotModified was 15815// returned. 15816func (c *ProjectsLocationsAgentsFlowsPagesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Page, error) { 15817 gensupport.SetOptions(c.urlParams_, opts...) 15818 res, err := c.doRequest("json") 15819 if res != nil && res.StatusCode == http.StatusNotModified { 15820 if res.Body != nil { 15821 res.Body.Close() 15822 } 15823 return nil, &googleapi.Error{ 15824 Code: res.StatusCode, 15825 Header: res.Header, 15826 } 15827 } 15828 if err != nil { 15829 return nil, err 15830 } 15831 defer googleapi.CloseBody(res) 15832 if err := googleapi.CheckResponse(res); err != nil { 15833 return nil, err 15834 } 15835 ret := &GoogleCloudDialogflowCxV3beta1Page{ 15836 ServerResponse: googleapi.ServerResponse{ 15837 Header: res.Header, 15838 HTTPStatusCode: res.StatusCode, 15839 }, 15840 } 15841 target := &ret 15842 if err := gensupport.DecodeResponse(target, res); err != nil { 15843 return nil, err 15844 } 15845 return ret, nil 15846 // { 15847 // "description": "Retrieves the specified page.", 15848 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/pages/{pagesId}", 15849 // "httpMethod": "GET", 15850 // "id": "dialogflow.projects.locations.agents.flows.pages.get", 15851 // "parameterOrder": [ 15852 // "name" 15853 // ], 15854 // "parameters": { 15855 // "languageCode": { 15856 // "description": "The language to retrieve the page for. The following fields are language dependent: * `Page.entry_fulfillment.messages` * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` * `Page.transition_routes.trigger_fulfillment.messages` * `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 15857 // "location": "query", 15858 // "type": "string" 15859 // }, 15860 // "name": { 15861 // "description": "Required. The name of the page. Format: `projects//locations//agents//flows//pages/`.", 15862 // "location": "path", 15863 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/pages/[^/]+$", 15864 // "required": true, 15865 // "type": "string" 15866 // } 15867 // }, 15868 // "path": "v3beta1/{+name}", 15869 // "response": { 15870 // "$ref": "GoogleCloudDialogflowCxV3beta1Page" 15871 // }, 15872 // "scopes": [ 15873 // "https://www.googleapis.com/auth/cloud-platform", 15874 // "https://www.googleapis.com/auth/dialogflow" 15875 // ] 15876 // } 15877 15878} 15879 15880// method id "dialogflow.projects.locations.agents.flows.pages.list": 15881 15882type ProjectsLocationsAgentsFlowsPagesListCall struct { 15883 s *Service 15884 parent string 15885 urlParams_ gensupport.URLParams 15886 ifNoneMatch_ string 15887 ctx_ context.Context 15888 header_ http.Header 15889} 15890 15891// List: Returns the list of all pages in the specified flow. 15892func (r *ProjectsLocationsAgentsFlowsPagesService) List(parent string) *ProjectsLocationsAgentsFlowsPagesListCall { 15893 c := &ProjectsLocationsAgentsFlowsPagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15894 c.parent = parent 15895 return c 15896} 15897 15898// LanguageCode sets the optional parameter "languageCode": The language 15899// to list pages for. The following fields are language dependent: * 15900// `Page.entry_fulfillment.messages` * 15901// `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.message 15902// s` * 15903// `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` 15904// * `Page.transition_routes.trigger_fulfillment.messages` * 15905// `Page.transition_route_groups.transition_routes.trigger_fulfillment.me 15906// ssages` If not specified, the agent's default language is used. [Many 15907// languages](https://cloud.google.com/dialogflow/docs/reference/language 15908// ) are supported. Note: languages must be enabled in the agent before 15909// they can be used. 15910func (c *ProjectsLocationsAgentsFlowsPagesListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsPagesListCall { 15911 c.urlParams_.Set("languageCode", languageCode) 15912 return c 15913} 15914 15915// PageSize sets the optional parameter "pageSize": The maximum number 15916// of items to return in a single page. By default 100 and at most 1000. 15917func (c *ProjectsLocationsAgentsFlowsPagesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsFlowsPagesListCall { 15918 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15919 return c 15920} 15921 15922// PageToken sets the optional parameter "pageToken": The 15923// next_page_token value returned from a previous list request. 15924func (c *ProjectsLocationsAgentsFlowsPagesListCall) PageToken(pageToken string) *ProjectsLocationsAgentsFlowsPagesListCall { 15925 c.urlParams_.Set("pageToken", pageToken) 15926 return c 15927} 15928 15929// Fields allows partial responses to be retrieved. See 15930// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15931// for more information. 15932func (c *ProjectsLocationsAgentsFlowsPagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsPagesListCall { 15933 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15934 return c 15935} 15936 15937// IfNoneMatch sets the optional parameter which makes the operation 15938// fail if the object's ETag matches the given value. This is useful for 15939// getting updates only after the object has changed since the last 15940// request. Use googleapi.IsNotModified to check whether the response 15941// error from Do is the result of In-None-Match. 15942func (c *ProjectsLocationsAgentsFlowsPagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsFlowsPagesListCall { 15943 c.ifNoneMatch_ = entityTag 15944 return c 15945} 15946 15947// Context sets the context to be used in this call's Do method. Any 15948// pending HTTP request will be aborted if the provided context is 15949// canceled. 15950func (c *ProjectsLocationsAgentsFlowsPagesListCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsPagesListCall { 15951 c.ctx_ = ctx 15952 return c 15953} 15954 15955// Header returns an http.Header that can be modified by the caller to 15956// add HTTP headers to the request. 15957func (c *ProjectsLocationsAgentsFlowsPagesListCall) Header() http.Header { 15958 if c.header_ == nil { 15959 c.header_ = make(http.Header) 15960 } 15961 return c.header_ 15962} 15963 15964func (c *ProjectsLocationsAgentsFlowsPagesListCall) doRequest(alt string) (*http.Response, error) { 15965 reqHeaders := make(http.Header) 15966 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15967 for k, v := range c.header_ { 15968 reqHeaders[k] = v 15969 } 15970 reqHeaders.Set("User-Agent", c.s.userAgent()) 15971 if c.ifNoneMatch_ != "" { 15972 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15973 } 15974 var body io.Reader = nil 15975 c.urlParams_.Set("alt", alt) 15976 c.urlParams_.Set("prettyPrint", "false") 15977 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/pages") 15978 urls += "?" + c.urlParams_.Encode() 15979 req, err := http.NewRequest("GET", urls, body) 15980 if err != nil { 15981 return nil, err 15982 } 15983 req.Header = reqHeaders 15984 googleapi.Expand(req.URL, map[string]string{ 15985 "parent": c.parent, 15986 }) 15987 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15988} 15989 15990// Do executes the "dialogflow.projects.locations.agents.flows.pages.list" call. 15991// Exactly one of *GoogleCloudDialogflowCxV3beta1ListPagesResponse or 15992// error will be non-nil. Any non-2xx status code is an error. Response 15993// headers are in either 15994// *GoogleCloudDialogflowCxV3beta1ListPagesResponse.ServerResponse.Header 15995// or (if a response was returned at all) in 15996// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15997// whether the returned error was because http.StatusNotModified was 15998// returned. 15999func (c *ProjectsLocationsAgentsFlowsPagesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListPagesResponse, error) { 16000 gensupport.SetOptions(c.urlParams_, opts...) 16001 res, err := c.doRequest("json") 16002 if res != nil && res.StatusCode == http.StatusNotModified { 16003 if res.Body != nil { 16004 res.Body.Close() 16005 } 16006 return nil, &googleapi.Error{ 16007 Code: res.StatusCode, 16008 Header: res.Header, 16009 } 16010 } 16011 if err != nil { 16012 return nil, err 16013 } 16014 defer googleapi.CloseBody(res) 16015 if err := googleapi.CheckResponse(res); err != nil { 16016 return nil, err 16017 } 16018 ret := &GoogleCloudDialogflowCxV3beta1ListPagesResponse{ 16019 ServerResponse: googleapi.ServerResponse{ 16020 Header: res.Header, 16021 HTTPStatusCode: res.StatusCode, 16022 }, 16023 } 16024 target := &ret 16025 if err := gensupport.DecodeResponse(target, res); err != nil { 16026 return nil, err 16027 } 16028 return ret, nil 16029 // { 16030 // "description": "Returns the list of all pages in the specified flow.", 16031 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/pages", 16032 // "httpMethod": "GET", 16033 // "id": "dialogflow.projects.locations.agents.flows.pages.list", 16034 // "parameterOrder": [ 16035 // "parent" 16036 // ], 16037 // "parameters": { 16038 // "languageCode": { 16039 // "description": "The language to list pages for. The following fields are language dependent: * `Page.entry_fulfillment.messages` * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` * `Page.transition_routes.trigger_fulfillment.messages` * `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 16040 // "location": "query", 16041 // "type": "string" 16042 // }, 16043 // "pageSize": { 16044 // "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", 16045 // "format": "int32", 16046 // "location": "query", 16047 // "type": "integer" 16048 // }, 16049 // "pageToken": { 16050 // "description": "The next_page_token value returned from a previous list request.", 16051 // "location": "query", 16052 // "type": "string" 16053 // }, 16054 // "parent": { 16055 // "description": "Required. The flow to list all pages for. Format: `projects//locations//agents//flows/`.", 16056 // "location": "path", 16057 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+$", 16058 // "required": true, 16059 // "type": "string" 16060 // } 16061 // }, 16062 // "path": "v3beta1/{+parent}/pages", 16063 // "response": { 16064 // "$ref": "GoogleCloudDialogflowCxV3beta1ListPagesResponse" 16065 // }, 16066 // "scopes": [ 16067 // "https://www.googleapis.com/auth/cloud-platform", 16068 // "https://www.googleapis.com/auth/dialogflow" 16069 // ] 16070 // } 16071 16072} 16073 16074// Pages invokes f for each page of results. 16075// A non-nil error returned from f will halt the iteration. 16076// The provided context supersedes any context provided to the Context method. 16077func (c *ProjectsLocationsAgentsFlowsPagesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListPagesResponse) error) error { 16078 c.ctx_ = ctx 16079 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16080 for { 16081 x, err := c.Do() 16082 if err != nil { 16083 return err 16084 } 16085 if err := f(x); err != nil { 16086 return err 16087 } 16088 if x.NextPageToken == "" { 16089 return nil 16090 } 16091 c.PageToken(x.NextPageToken) 16092 } 16093} 16094 16095// method id "dialogflow.projects.locations.agents.flows.pages.patch": 16096 16097type ProjectsLocationsAgentsFlowsPagesPatchCall struct { 16098 s *Service 16099 nameid string 16100 googleclouddialogflowcxv3beta1page *GoogleCloudDialogflowCxV3beta1Page 16101 urlParams_ gensupport.URLParams 16102 ctx_ context.Context 16103 header_ http.Header 16104} 16105 16106// Patch: Updates the specified page. 16107func (r *ProjectsLocationsAgentsFlowsPagesService) Patch(nameid string, googleclouddialogflowcxv3beta1page *GoogleCloudDialogflowCxV3beta1Page) *ProjectsLocationsAgentsFlowsPagesPatchCall { 16108 c := &ProjectsLocationsAgentsFlowsPagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16109 c.nameid = nameid 16110 c.googleclouddialogflowcxv3beta1page = googleclouddialogflowcxv3beta1page 16111 return c 16112} 16113 16114// LanguageCode sets the optional parameter "languageCode": The language 16115// of the following fields in `page`: * 16116// `Page.entry_fulfillment.messages` * 16117// `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.message 16118// s` * 16119// `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` 16120// * `Page.transition_routes.trigger_fulfillment.messages` * 16121// `Page.transition_route_groups.transition_routes.trigger_fulfillment.me 16122// ssages` If not specified, the agent's default language is used. [Many 16123// languages](https://cloud.google.com/dialogflow/docs/reference/language 16124// ) are supported. Note: languages must be enabled in the agent before 16125// they can be used. 16126func (c *ProjectsLocationsAgentsFlowsPagesPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsPagesPatchCall { 16127 c.urlParams_.Set("languageCode", languageCode) 16128 return c 16129} 16130 16131// UpdateMask sets the optional parameter "updateMask": The mask to 16132// control which fields get updated. If the mask is not present, all 16133// fields will be updated. 16134func (c *ProjectsLocationsAgentsFlowsPagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsFlowsPagesPatchCall { 16135 c.urlParams_.Set("updateMask", updateMask) 16136 return c 16137} 16138 16139// Fields allows partial responses to be retrieved. See 16140// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16141// for more information. 16142func (c *ProjectsLocationsAgentsFlowsPagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsPagesPatchCall { 16143 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16144 return c 16145} 16146 16147// Context sets the context to be used in this call's Do method. Any 16148// pending HTTP request will be aborted if the provided context is 16149// canceled. 16150func (c *ProjectsLocationsAgentsFlowsPagesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsPagesPatchCall { 16151 c.ctx_ = ctx 16152 return c 16153} 16154 16155// Header returns an http.Header that can be modified by the caller to 16156// add HTTP headers to the request. 16157func (c *ProjectsLocationsAgentsFlowsPagesPatchCall) Header() http.Header { 16158 if c.header_ == nil { 16159 c.header_ = make(http.Header) 16160 } 16161 return c.header_ 16162} 16163 16164func (c *ProjectsLocationsAgentsFlowsPagesPatchCall) doRequest(alt string) (*http.Response, error) { 16165 reqHeaders := make(http.Header) 16166 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16167 for k, v := range c.header_ { 16168 reqHeaders[k] = v 16169 } 16170 reqHeaders.Set("User-Agent", c.s.userAgent()) 16171 var body io.Reader = nil 16172 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1page) 16173 if err != nil { 16174 return nil, err 16175 } 16176 reqHeaders.Set("Content-Type", "application/json") 16177 c.urlParams_.Set("alt", alt) 16178 c.urlParams_.Set("prettyPrint", "false") 16179 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 16180 urls += "?" + c.urlParams_.Encode() 16181 req, err := http.NewRequest("PATCH", urls, body) 16182 if err != nil { 16183 return nil, err 16184 } 16185 req.Header = reqHeaders 16186 googleapi.Expand(req.URL, map[string]string{ 16187 "name": c.nameid, 16188 }) 16189 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16190} 16191 16192// Do executes the "dialogflow.projects.locations.agents.flows.pages.patch" call. 16193// Exactly one of *GoogleCloudDialogflowCxV3beta1Page or error will be 16194// non-nil. Any non-2xx status code is an error. Response headers are in 16195// either *GoogleCloudDialogflowCxV3beta1Page.ServerResponse.Header or 16196// (if a response was returned at all) in 16197// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16198// whether the returned error was because http.StatusNotModified was 16199// returned. 16200func (c *ProjectsLocationsAgentsFlowsPagesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Page, error) { 16201 gensupport.SetOptions(c.urlParams_, opts...) 16202 res, err := c.doRequest("json") 16203 if res != nil && res.StatusCode == http.StatusNotModified { 16204 if res.Body != nil { 16205 res.Body.Close() 16206 } 16207 return nil, &googleapi.Error{ 16208 Code: res.StatusCode, 16209 Header: res.Header, 16210 } 16211 } 16212 if err != nil { 16213 return nil, err 16214 } 16215 defer googleapi.CloseBody(res) 16216 if err := googleapi.CheckResponse(res); err != nil { 16217 return nil, err 16218 } 16219 ret := &GoogleCloudDialogflowCxV3beta1Page{ 16220 ServerResponse: googleapi.ServerResponse{ 16221 Header: res.Header, 16222 HTTPStatusCode: res.StatusCode, 16223 }, 16224 } 16225 target := &ret 16226 if err := gensupport.DecodeResponse(target, res); err != nil { 16227 return nil, err 16228 } 16229 return ret, nil 16230 // { 16231 // "description": "Updates the specified page.", 16232 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/pages/{pagesId}", 16233 // "httpMethod": "PATCH", 16234 // "id": "dialogflow.projects.locations.agents.flows.pages.patch", 16235 // "parameterOrder": [ 16236 // "name" 16237 // ], 16238 // "parameters": { 16239 // "languageCode": { 16240 // "description": "The language of the following fields in `page`: * `Page.entry_fulfillment.messages` * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` * `Page.transition_routes.trigger_fulfillment.messages` * `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 16241 // "location": "query", 16242 // "type": "string" 16243 // }, 16244 // "name": { 16245 // "description": "The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.", 16246 // "location": "path", 16247 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/pages/[^/]+$", 16248 // "required": true, 16249 // "type": "string" 16250 // }, 16251 // "updateMask": { 16252 // "description": "The mask to control which fields get updated. If the mask is not present, all fields will be updated.", 16253 // "format": "google-fieldmask", 16254 // "location": "query", 16255 // "type": "string" 16256 // } 16257 // }, 16258 // "path": "v3beta1/{+name}", 16259 // "request": { 16260 // "$ref": "GoogleCloudDialogflowCxV3beta1Page" 16261 // }, 16262 // "response": { 16263 // "$ref": "GoogleCloudDialogflowCxV3beta1Page" 16264 // }, 16265 // "scopes": [ 16266 // "https://www.googleapis.com/auth/cloud-platform", 16267 // "https://www.googleapis.com/auth/dialogflow" 16268 // ] 16269 // } 16270 16271} 16272 16273// method id "dialogflow.projects.locations.agents.flows.transitionRouteGroups.create": 16274 16275type ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall struct { 16276 s *Service 16277 parent string 16278 googleclouddialogflowcxv3beta1transitionroutegroup *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup 16279 urlParams_ gensupport.URLParams 16280 ctx_ context.Context 16281 header_ http.Header 16282} 16283 16284// Create: Creates an TransitionRouteGroup in the specified flow. 16285func (r *ProjectsLocationsAgentsFlowsTransitionRouteGroupsService) Create(parent string, googleclouddialogflowcxv3beta1transitionroutegroup *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall { 16286 c := &ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16287 c.parent = parent 16288 c.googleclouddialogflowcxv3beta1transitionroutegroup = googleclouddialogflowcxv3beta1transitionroutegroup 16289 return c 16290} 16291 16292// LanguageCode sets the optional parameter "languageCode": The language 16293// to list transition route groups for. The field `messages` in 16294// TransitionRoute is language dependent. If not specified, the agent's 16295// default language is used. [Many 16296// languages](https://cloud.google.com/dialogflow/docs/reference/language 16297// ) are supported. Note: languages must be enabled in the agent before 16298// they can be used. 16299func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall { 16300 c.urlParams_.Set("languageCode", languageCode) 16301 return c 16302} 16303 16304// Fields allows partial responses to be retrieved. See 16305// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16306// for more information. 16307func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall { 16308 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16309 return c 16310} 16311 16312// Context sets the context to be used in this call's Do method. Any 16313// pending HTTP request will be aborted if the provided context is 16314// canceled. 16315func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall { 16316 c.ctx_ = ctx 16317 return c 16318} 16319 16320// Header returns an http.Header that can be modified by the caller to 16321// add HTTP headers to the request. 16322func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall) Header() http.Header { 16323 if c.header_ == nil { 16324 c.header_ = make(http.Header) 16325 } 16326 return c.header_ 16327} 16328 16329func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall) doRequest(alt string) (*http.Response, error) { 16330 reqHeaders := make(http.Header) 16331 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16332 for k, v := range c.header_ { 16333 reqHeaders[k] = v 16334 } 16335 reqHeaders.Set("User-Agent", c.s.userAgent()) 16336 var body io.Reader = nil 16337 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1transitionroutegroup) 16338 if err != nil { 16339 return nil, err 16340 } 16341 reqHeaders.Set("Content-Type", "application/json") 16342 c.urlParams_.Set("alt", alt) 16343 c.urlParams_.Set("prettyPrint", "false") 16344 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/transitionRouteGroups") 16345 urls += "?" + c.urlParams_.Encode() 16346 req, err := http.NewRequest("POST", urls, body) 16347 if err != nil { 16348 return nil, err 16349 } 16350 req.Header = reqHeaders 16351 googleapi.Expand(req.URL, map[string]string{ 16352 "parent": c.parent, 16353 }) 16354 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16355} 16356 16357// Do executes the "dialogflow.projects.locations.agents.flows.transitionRouteGroups.create" call. 16358// Exactly one of *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup or 16359// error will be non-nil. Any non-2xx status code is an error. Response 16360// headers are in either 16361// *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup.ServerResponse.Hea 16362// der or (if a response was returned at all) in 16363// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16364// whether the returned error was because http.StatusNotModified was 16365// returned. 16366func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TransitionRouteGroup, error) { 16367 gensupport.SetOptions(c.urlParams_, opts...) 16368 res, err := c.doRequest("json") 16369 if res != nil && res.StatusCode == http.StatusNotModified { 16370 if res.Body != nil { 16371 res.Body.Close() 16372 } 16373 return nil, &googleapi.Error{ 16374 Code: res.StatusCode, 16375 Header: res.Header, 16376 } 16377 } 16378 if err != nil { 16379 return nil, err 16380 } 16381 defer googleapi.CloseBody(res) 16382 if err := googleapi.CheckResponse(res); err != nil { 16383 return nil, err 16384 } 16385 ret := &GoogleCloudDialogflowCxV3beta1TransitionRouteGroup{ 16386 ServerResponse: googleapi.ServerResponse{ 16387 Header: res.Header, 16388 HTTPStatusCode: res.StatusCode, 16389 }, 16390 } 16391 target := &ret 16392 if err := gensupport.DecodeResponse(target, res); err != nil { 16393 return nil, err 16394 } 16395 return ret, nil 16396 // { 16397 // "description": "Creates an TransitionRouteGroup in the specified flow.", 16398 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/transitionRouteGroups", 16399 // "httpMethod": "POST", 16400 // "id": "dialogflow.projects.locations.agents.flows.transitionRouteGroups.create", 16401 // "parameterOrder": [ 16402 // "parent" 16403 // ], 16404 // "parameters": { 16405 // "languageCode": { 16406 // "description": "The language to list transition route groups for. The field `messages` in TransitionRoute is language dependent. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 16407 // "location": "query", 16408 // "type": "string" 16409 // }, 16410 // "parent": { 16411 // "description": "Required. The flow to create an TransitionRouteGroup for. Format: `projects//locations//agents//flows/`.", 16412 // "location": "path", 16413 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+$", 16414 // "required": true, 16415 // "type": "string" 16416 // } 16417 // }, 16418 // "path": "v3beta1/{+parent}/transitionRouteGroups", 16419 // "request": { 16420 // "$ref": "GoogleCloudDialogflowCxV3beta1TransitionRouteGroup" 16421 // }, 16422 // "response": { 16423 // "$ref": "GoogleCloudDialogflowCxV3beta1TransitionRouteGroup" 16424 // }, 16425 // "scopes": [ 16426 // "https://www.googleapis.com/auth/cloud-platform", 16427 // "https://www.googleapis.com/auth/dialogflow" 16428 // ] 16429 // } 16430 16431} 16432 16433// method id "dialogflow.projects.locations.agents.flows.transitionRouteGroups.delete": 16434 16435type ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall struct { 16436 s *Service 16437 name string 16438 urlParams_ gensupport.URLParams 16439 ctx_ context.Context 16440 header_ http.Header 16441} 16442 16443// Delete: Deletes the specified TransitionRouteGroup. 16444func (r *ProjectsLocationsAgentsFlowsTransitionRouteGroupsService) Delete(name string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall { 16445 c := &ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16446 c.name = name 16447 return c 16448} 16449 16450// Force sets the optional parameter "force": This field has no effect 16451// for transition route group that no page is using. If the transition 16452// route group is referenced by any page: * If `force` is set to false, 16453// an error will be returned with message indicating pages that 16454// reference the transition route group. * If `force` is set to true, 16455// Dialogflow will remove the transition route group, as well as any 16456// reference to it. 16457func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall) Force(force bool) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall { 16458 c.urlParams_.Set("force", fmt.Sprint(force)) 16459 return c 16460} 16461 16462// Fields allows partial responses to be retrieved. See 16463// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16464// for more information. 16465func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall { 16466 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16467 return c 16468} 16469 16470// Context sets the context to be used in this call's Do method. Any 16471// pending HTTP request will be aborted if the provided context is 16472// canceled. 16473func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall { 16474 c.ctx_ = ctx 16475 return c 16476} 16477 16478// Header returns an http.Header that can be modified by the caller to 16479// add HTTP headers to the request. 16480func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall) Header() http.Header { 16481 if c.header_ == nil { 16482 c.header_ = make(http.Header) 16483 } 16484 return c.header_ 16485} 16486 16487func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { 16488 reqHeaders := make(http.Header) 16489 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16490 for k, v := range c.header_ { 16491 reqHeaders[k] = v 16492 } 16493 reqHeaders.Set("User-Agent", c.s.userAgent()) 16494 var body io.Reader = nil 16495 c.urlParams_.Set("alt", alt) 16496 c.urlParams_.Set("prettyPrint", "false") 16497 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 16498 urls += "?" + c.urlParams_.Encode() 16499 req, err := http.NewRequest("DELETE", urls, body) 16500 if err != nil { 16501 return nil, err 16502 } 16503 req.Header = reqHeaders 16504 googleapi.Expand(req.URL, map[string]string{ 16505 "name": c.name, 16506 }) 16507 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16508} 16509 16510// Do executes the "dialogflow.projects.locations.agents.flows.transitionRouteGroups.delete" call. 16511// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 16512// non-2xx status code is an error. Response headers are in either 16513// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 16514// returned at all) in error.(*googleapi.Error).Header. Use 16515// googleapi.IsNotModified to check whether the returned error was 16516// because http.StatusNotModified was returned. 16517func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 16518 gensupport.SetOptions(c.urlParams_, opts...) 16519 res, err := c.doRequest("json") 16520 if res != nil && res.StatusCode == http.StatusNotModified { 16521 if res.Body != nil { 16522 res.Body.Close() 16523 } 16524 return nil, &googleapi.Error{ 16525 Code: res.StatusCode, 16526 Header: res.Header, 16527 } 16528 } 16529 if err != nil { 16530 return nil, err 16531 } 16532 defer googleapi.CloseBody(res) 16533 if err := googleapi.CheckResponse(res); err != nil { 16534 return nil, err 16535 } 16536 ret := &GoogleProtobufEmpty{ 16537 ServerResponse: googleapi.ServerResponse{ 16538 Header: res.Header, 16539 HTTPStatusCode: res.StatusCode, 16540 }, 16541 } 16542 target := &ret 16543 if err := gensupport.DecodeResponse(target, res); err != nil { 16544 return nil, err 16545 } 16546 return ret, nil 16547 // { 16548 // "description": "Deletes the specified TransitionRouteGroup.", 16549 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/transitionRouteGroups/{transitionRouteGroupsId}", 16550 // "httpMethod": "DELETE", 16551 // "id": "dialogflow.projects.locations.agents.flows.transitionRouteGroups.delete", 16552 // "parameterOrder": [ 16553 // "name" 16554 // ], 16555 // "parameters": { 16556 // "force": { 16557 // "description": "This field has no effect for transition route group that no page is using. If the transition route group is referenced by any page: * If `force` is set to false, an error will be returned with message indicating pages that reference the transition route group. * If `force` is set to true, Dialogflow will remove the transition route group, as well as any reference to it.", 16558 // "location": "query", 16559 // "type": "boolean" 16560 // }, 16561 // "name": { 16562 // "description": "Required. The name of the TransitionRouteGroup to delete. Format: `projects//locations//agents//flows//transitionRouteGroups/`.", 16563 // "location": "path", 16564 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/transitionRouteGroups/[^/]+$", 16565 // "required": true, 16566 // "type": "string" 16567 // } 16568 // }, 16569 // "path": "v3beta1/{+name}", 16570 // "response": { 16571 // "$ref": "GoogleProtobufEmpty" 16572 // }, 16573 // "scopes": [ 16574 // "https://www.googleapis.com/auth/cloud-platform", 16575 // "https://www.googleapis.com/auth/dialogflow" 16576 // ] 16577 // } 16578 16579} 16580 16581// method id "dialogflow.projects.locations.agents.flows.transitionRouteGroups.get": 16582 16583type ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall struct { 16584 s *Service 16585 name string 16586 urlParams_ gensupport.URLParams 16587 ifNoneMatch_ string 16588 ctx_ context.Context 16589 header_ http.Header 16590} 16591 16592// Get: Retrieves the specified TransitionRouteGroup. 16593func (r *ProjectsLocationsAgentsFlowsTransitionRouteGroupsService) Get(name string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall { 16594 c := &ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16595 c.name = name 16596 return c 16597} 16598 16599// LanguageCode sets the optional parameter "languageCode": The language 16600// to list transition route groups for. The field `messages` in 16601// TransitionRoute is language dependent. If not specified, the agent's 16602// default language is used. [Many 16603// languages](https://cloud.google.com/dialogflow/docs/reference/language 16604// ) are supported. Note: languages must be enabled in the agent before 16605// they can be used. 16606func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall { 16607 c.urlParams_.Set("languageCode", languageCode) 16608 return c 16609} 16610 16611// Fields allows partial responses to be retrieved. See 16612// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16613// for more information. 16614func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall { 16615 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16616 return c 16617} 16618 16619// IfNoneMatch sets the optional parameter which makes the operation 16620// fail if the object's ETag matches the given value. This is useful for 16621// getting updates only after the object has changed since the last 16622// request. Use googleapi.IsNotModified to check whether the response 16623// error from Do is the result of In-None-Match. 16624func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall { 16625 c.ifNoneMatch_ = entityTag 16626 return c 16627} 16628 16629// Context sets the context to be used in this call's Do method. Any 16630// pending HTTP request will be aborted if the provided context is 16631// canceled. 16632func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall { 16633 c.ctx_ = ctx 16634 return c 16635} 16636 16637// Header returns an http.Header that can be modified by the caller to 16638// add HTTP headers to the request. 16639func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall) Header() http.Header { 16640 if c.header_ == nil { 16641 c.header_ = make(http.Header) 16642 } 16643 return c.header_ 16644} 16645 16646func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall) doRequest(alt string) (*http.Response, error) { 16647 reqHeaders := make(http.Header) 16648 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16649 for k, v := range c.header_ { 16650 reqHeaders[k] = v 16651 } 16652 reqHeaders.Set("User-Agent", c.s.userAgent()) 16653 if c.ifNoneMatch_ != "" { 16654 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16655 } 16656 var body io.Reader = nil 16657 c.urlParams_.Set("alt", alt) 16658 c.urlParams_.Set("prettyPrint", "false") 16659 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 16660 urls += "?" + c.urlParams_.Encode() 16661 req, err := http.NewRequest("GET", urls, body) 16662 if err != nil { 16663 return nil, err 16664 } 16665 req.Header = reqHeaders 16666 googleapi.Expand(req.URL, map[string]string{ 16667 "name": c.name, 16668 }) 16669 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16670} 16671 16672// Do executes the "dialogflow.projects.locations.agents.flows.transitionRouteGroups.get" call. 16673// Exactly one of *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup or 16674// error will be non-nil. Any non-2xx status code is an error. Response 16675// headers are in either 16676// *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup.ServerResponse.Hea 16677// der or (if a response was returned at all) in 16678// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16679// whether the returned error was because http.StatusNotModified was 16680// returned. 16681func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TransitionRouteGroup, error) { 16682 gensupport.SetOptions(c.urlParams_, opts...) 16683 res, err := c.doRequest("json") 16684 if res != nil && res.StatusCode == http.StatusNotModified { 16685 if res.Body != nil { 16686 res.Body.Close() 16687 } 16688 return nil, &googleapi.Error{ 16689 Code: res.StatusCode, 16690 Header: res.Header, 16691 } 16692 } 16693 if err != nil { 16694 return nil, err 16695 } 16696 defer googleapi.CloseBody(res) 16697 if err := googleapi.CheckResponse(res); err != nil { 16698 return nil, err 16699 } 16700 ret := &GoogleCloudDialogflowCxV3beta1TransitionRouteGroup{ 16701 ServerResponse: googleapi.ServerResponse{ 16702 Header: res.Header, 16703 HTTPStatusCode: res.StatusCode, 16704 }, 16705 } 16706 target := &ret 16707 if err := gensupport.DecodeResponse(target, res); err != nil { 16708 return nil, err 16709 } 16710 return ret, nil 16711 // { 16712 // "description": "Retrieves the specified TransitionRouteGroup.", 16713 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/transitionRouteGroups/{transitionRouteGroupsId}", 16714 // "httpMethod": "GET", 16715 // "id": "dialogflow.projects.locations.agents.flows.transitionRouteGroups.get", 16716 // "parameterOrder": [ 16717 // "name" 16718 // ], 16719 // "parameters": { 16720 // "languageCode": { 16721 // "description": "The language to list transition route groups for. The field `messages` in TransitionRoute is language dependent. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 16722 // "location": "query", 16723 // "type": "string" 16724 // }, 16725 // "name": { 16726 // "description": "Required. The name of the TransitionRouteGroup. Format: `projects//locations//agents//flows//transitionRouteGroups/`.", 16727 // "location": "path", 16728 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/transitionRouteGroups/[^/]+$", 16729 // "required": true, 16730 // "type": "string" 16731 // } 16732 // }, 16733 // "path": "v3beta1/{+name}", 16734 // "response": { 16735 // "$ref": "GoogleCloudDialogflowCxV3beta1TransitionRouteGroup" 16736 // }, 16737 // "scopes": [ 16738 // "https://www.googleapis.com/auth/cloud-platform", 16739 // "https://www.googleapis.com/auth/dialogflow" 16740 // ] 16741 // } 16742 16743} 16744 16745// method id "dialogflow.projects.locations.agents.flows.transitionRouteGroups.list": 16746 16747type ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall struct { 16748 s *Service 16749 parent string 16750 urlParams_ gensupport.URLParams 16751 ifNoneMatch_ string 16752 ctx_ context.Context 16753 header_ http.Header 16754} 16755 16756// List: Returns the list of all transition route groups in the 16757// specified flow. 16758func (r *ProjectsLocationsAgentsFlowsTransitionRouteGroupsService) List(parent string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall { 16759 c := &ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16760 c.parent = parent 16761 return c 16762} 16763 16764// LanguageCode sets the optional parameter "languageCode": The language 16765// to list transition route groups for. The field `messages` in 16766// TransitionRoute is language dependent. If not specified, the agent's 16767// default language is used. [Many 16768// languages](https://cloud.google.com/dialogflow/docs/reference/language 16769// ) are supported. Note: languages must be enabled in the agent before 16770// they can be used. 16771func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall { 16772 c.urlParams_.Set("languageCode", languageCode) 16773 return c 16774} 16775 16776// PageSize sets the optional parameter "pageSize": The maximum number 16777// of items to return in a single page. By default 100 and at most 1000. 16778func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall { 16779 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16780 return c 16781} 16782 16783// PageToken sets the optional parameter "pageToken": The 16784// next_page_token value returned from a previous list request. 16785func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall) PageToken(pageToken string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall { 16786 c.urlParams_.Set("pageToken", pageToken) 16787 return c 16788} 16789 16790// Fields allows partial responses to be retrieved. See 16791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16792// for more information. 16793func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall { 16794 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16795 return c 16796} 16797 16798// IfNoneMatch sets the optional parameter which makes the operation 16799// fail if the object's ETag matches the given value. This is useful for 16800// getting updates only after the object has changed since the last 16801// request. Use googleapi.IsNotModified to check whether the response 16802// error from Do is the result of In-None-Match. 16803func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall { 16804 c.ifNoneMatch_ = entityTag 16805 return c 16806} 16807 16808// Context sets the context to be used in this call's Do method. Any 16809// pending HTTP request will be aborted if the provided context is 16810// canceled. 16811func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall { 16812 c.ctx_ = ctx 16813 return c 16814} 16815 16816// Header returns an http.Header that can be modified by the caller to 16817// add HTTP headers to the request. 16818func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall) Header() http.Header { 16819 if c.header_ == nil { 16820 c.header_ = make(http.Header) 16821 } 16822 return c.header_ 16823} 16824 16825func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall) doRequest(alt string) (*http.Response, error) { 16826 reqHeaders := make(http.Header) 16827 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16828 for k, v := range c.header_ { 16829 reqHeaders[k] = v 16830 } 16831 reqHeaders.Set("User-Agent", c.s.userAgent()) 16832 if c.ifNoneMatch_ != "" { 16833 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16834 } 16835 var body io.Reader = nil 16836 c.urlParams_.Set("alt", alt) 16837 c.urlParams_.Set("prettyPrint", "false") 16838 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/transitionRouteGroups") 16839 urls += "?" + c.urlParams_.Encode() 16840 req, err := http.NewRequest("GET", urls, body) 16841 if err != nil { 16842 return nil, err 16843 } 16844 req.Header = reqHeaders 16845 googleapi.Expand(req.URL, map[string]string{ 16846 "parent": c.parent, 16847 }) 16848 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16849} 16850 16851// Do executes the "dialogflow.projects.locations.agents.flows.transitionRouteGroups.list" call. 16852// Exactly one of 16853// *GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse or 16854// error will be non-nil. Any non-2xx status code is an error. Response 16855// headers are in either 16856// *GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse.Serve 16857// rResponse.Header or (if a response was returned at all) in 16858// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16859// whether the returned error was because http.StatusNotModified was 16860// returned. 16861func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse, error) { 16862 gensupport.SetOptions(c.urlParams_, opts...) 16863 res, err := c.doRequest("json") 16864 if res != nil && res.StatusCode == http.StatusNotModified { 16865 if res.Body != nil { 16866 res.Body.Close() 16867 } 16868 return nil, &googleapi.Error{ 16869 Code: res.StatusCode, 16870 Header: res.Header, 16871 } 16872 } 16873 if err != nil { 16874 return nil, err 16875 } 16876 defer googleapi.CloseBody(res) 16877 if err := googleapi.CheckResponse(res); err != nil { 16878 return nil, err 16879 } 16880 ret := &GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse{ 16881 ServerResponse: googleapi.ServerResponse{ 16882 Header: res.Header, 16883 HTTPStatusCode: res.StatusCode, 16884 }, 16885 } 16886 target := &ret 16887 if err := gensupport.DecodeResponse(target, res); err != nil { 16888 return nil, err 16889 } 16890 return ret, nil 16891 // { 16892 // "description": "Returns the list of all transition route groups in the specified flow.", 16893 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/transitionRouteGroups", 16894 // "httpMethod": "GET", 16895 // "id": "dialogflow.projects.locations.agents.flows.transitionRouteGroups.list", 16896 // "parameterOrder": [ 16897 // "parent" 16898 // ], 16899 // "parameters": { 16900 // "languageCode": { 16901 // "description": "The language to list transition route groups for. The field `messages` in TransitionRoute is language dependent. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 16902 // "location": "query", 16903 // "type": "string" 16904 // }, 16905 // "pageSize": { 16906 // "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", 16907 // "format": "int32", 16908 // "location": "query", 16909 // "type": "integer" 16910 // }, 16911 // "pageToken": { 16912 // "description": "The next_page_token value returned from a previous list request.", 16913 // "location": "query", 16914 // "type": "string" 16915 // }, 16916 // "parent": { 16917 // "description": "Required. The flow to list all transition route groups for. Format: `projects//locations//agents//flows/`.", 16918 // "location": "path", 16919 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+$", 16920 // "required": true, 16921 // "type": "string" 16922 // } 16923 // }, 16924 // "path": "v3beta1/{+parent}/transitionRouteGroups", 16925 // "response": { 16926 // "$ref": "GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse" 16927 // }, 16928 // "scopes": [ 16929 // "https://www.googleapis.com/auth/cloud-platform", 16930 // "https://www.googleapis.com/auth/dialogflow" 16931 // ] 16932 // } 16933 16934} 16935 16936// Pages invokes f for each page of results. 16937// A non-nil error returned from f will halt the iteration. 16938// The provided context supersedes any context provided to the Context method. 16939func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListTransitionRouteGroupsResponse) error) error { 16940 c.ctx_ = ctx 16941 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16942 for { 16943 x, err := c.Do() 16944 if err != nil { 16945 return err 16946 } 16947 if err := f(x); err != nil { 16948 return err 16949 } 16950 if x.NextPageToken == "" { 16951 return nil 16952 } 16953 c.PageToken(x.NextPageToken) 16954 } 16955} 16956 16957// method id "dialogflow.projects.locations.agents.flows.transitionRouteGroups.patch": 16958 16959type ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall struct { 16960 s *Service 16961 nameid string 16962 googleclouddialogflowcxv3beta1transitionroutegroup *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup 16963 urlParams_ gensupport.URLParams 16964 ctx_ context.Context 16965 header_ http.Header 16966} 16967 16968// Patch: Updates the specified TransitionRouteGroup. 16969func (r *ProjectsLocationsAgentsFlowsTransitionRouteGroupsService) Patch(nameid string, googleclouddialogflowcxv3beta1transitionroutegroup *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall { 16970 c := &ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16971 c.nameid = nameid 16972 c.googleclouddialogflowcxv3beta1transitionroutegroup = googleclouddialogflowcxv3beta1transitionroutegroup 16973 return c 16974} 16975 16976// LanguageCode sets the optional parameter "languageCode": The language 16977// to list transition route groups for. The field `messages` in 16978// TransitionRoute is language dependent. If not specified, the agent's 16979// default language is used. [Many 16980// languages](https://cloud.google.com/dialogflow/docs/reference/language 16981// ) are supported. Note: languages must be enabled in the agent before 16982// they can be used. 16983func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall { 16984 c.urlParams_.Set("languageCode", languageCode) 16985 return c 16986} 16987 16988// UpdateMask sets the optional parameter "updateMask": The mask to 16989// control which fields get updated. 16990func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall { 16991 c.urlParams_.Set("updateMask", updateMask) 16992 return c 16993} 16994 16995// Fields allows partial responses to be retrieved. See 16996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16997// for more information. 16998func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall { 16999 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17000 return c 17001} 17002 17003// Context sets the context to be used in this call's Do method. Any 17004// pending HTTP request will be aborted if the provided context is 17005// canceled. 17006func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall { 17007 c.ctx_ = ctx 17008 return c 17009} 17010 17011// Header returns an http.Header that can be modified by the caller to 17012// add HTTP headers to the request. 17013func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall) Header() http.Header { 17014 if c.header_ == nil { 17015 c.header_ = make(http.Header) 17016 } 17017 return c.header_ 17018} 17019 17020func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall) doRequest(alt string) (*http.Response, error) { 17021 reqHeaders := make(http.Header) 17022 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17023 for k, v := range c.header_ { 17024 reqHeaders[k] = v 17025 } 17026 reqHeaders.Set("User-Agent", c.s.userAgent()) 17027 var body io.Reader = nil 17028 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1transitionroutegroup) 17029 if err != nil { 17030 return nil, err 17031 } 17032 reqHeaders.Set("Content-Type", "application/json") 17033 c.urlParams_.Set("alt", alt) 17034 c.urlParams_.Set("prettyPrint", "false") 17035 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 17036 urls += "?" + c.urlParams_.Encode() 17037 req, err := http.NewRequest("PATCH", urls, body) 17038 if err != nil { 17039 return nil, err 17040 } 17041 req.Header = reqHeaders 17042 googleapi.Expand(req.URL, map[string]string{ 17043 "name": c.nameid, 17044 }) 17045 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17046} 17047 17048// Do executes the "dialogflow.projects.locations.agents.flows.transitionRouteGroups.patch" call. 17049// Exactly one of *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup or 17050// error will be non-nil. Any non-2xx status code is an error. Response 17051// headers are in either 17052// *GoogleCloudDialogflowCxV3beta1TransitionRouteGroup.ServerResponse.Hea 17053// der or (if a response was returned at all) in 17054// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17055// whether the returned error was because http.StatusNotModified was 17056// returned. 17057func (c *ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1TransitionRouteGroup, error) { 17058 gensupport.SetOptions(c.urlParams_, opts...) 17059 res, err := c.doRequest("json") 17060 if res != nil && res.StatusCode == http.StatusNotModified { 17061 if res.Body != nil { 17062 res.Body.Close() 17063 } 17064 return nil, &googleapi.Error{ 17065 Code: res.StatusCode, 17066 Header: res.Header, 17067 } 17068 } 17069 if err != nil { 17070 return nil, err 17071 } 17072 defer googleapi.CloseBody(res) 17073 if err := googleapi.CheckResponse(res); err != nil { 17074 return nil, err 17075 } 17076 ret := &GoogleCloudDialogflowCxV3beta1TransitionRouteGroup{ 17077 ServerResponse: googleapi.ServerResponse{ 17078 Header: res.Header, 17079 HTTPStatusCode: res.StatusCode, 17080 }, 17081 } 17082 target := &ret 17083 if err := gensupport.DecodeResponse(target, res); err != nil { 17084 return nil, err 17085 } 17086 return ret, nil 17087 // { 17088 // "description": "Updates the specified TransitionRouteGroup.", 17089 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/transitionRouteGroups/{transitionRouteGroupsId}", 17090 // "httpMethod": "PATCH", 17091 // "id": "dialogflow.projects.locations.agents.flows.transitionRouteGroups.patch", 17092 // "parameterOrder": [ 17093 // "name" 17094 // ], 17095 // "parameters": { 17096 // "languageCode": { 17097 // "description": "The language to list transition route groups for. The field `messages` in TransitionRoute is language dependent. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 17098 // "location": "query", 17099 // "type": "string" 17100 // }, 17101 // "name": { 17102 // "description": "The unique identifier of the transition route group. TransitionRouteGroups.CreateTransitionRouteGroup populates the name automatically. Format: `projects//locations//agents//flows//transitionRouteGroups/`.", 17103 // "location": "path", 17104 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/transitionRouteGroups/[^/]+$", 17105 // "required": true, 17106 // "type": "string" 17107 // }, 17108 // "updateMask": { 17109 // "description": "The mask to control which fields get updated.", 17110 // "format": "google-fieldmask", 17111 // "location": "query", 17112 // "type": "string" 17113 // } 17114 // }, 17115 // "path": "v3beta1/{+name}", 17116 // "request": { 17117 // "$ref": "GoogleCloudDialogflowCxV3beta1TransitionRouteGroup" 17118 // }, 17119 // "response": { 17120 // "$ref": "GoogleCloudDialogflowCxV3beta1TransitionRouteGroup" 17121 // }, 17122 // "scopes": [ 17123 // "https://www.googleapis.com/auth/cloud-platform", 17124 // "https://www.googleapis.com/auth/dialogflow" 17125 // ] 17126 // } 17127 17128} 17129 17130// method id "dialogflow.projects.locations.agents.flows.versions.create": 17131 17132type ProjectsLocationsAgentsFlowsVersionsCreateCall struct { 17133 s *Service 17134 parent string 17135 googleclouddialogflowcxv3beta1version *GoogleCloudDialogflowCxV3beta1Version 17136 urlParams_ gensupport.URLParams 17137 ctx_ context.Context 17138 header_ http.Header 17139} 17140 17141// Create: Creates a Version in the specified Flow. 17142func (r *ProjectsLocationsAgentsFlowsVersionsService) Create(parent string, googleclouddialogflowcxv3beta1version *GoogleCloudDialogflowCxV3beta1Version) *ProjectsLocationsAgentsFlowsVersionsCreateCall { 17143 c := &ProjectsLocationsAgentsFlowsVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17144 c.parent = parent 17145 c.googleclouddialogflowcxv3beta1version = googleclouddialogflowcxv3beta1version 17146 return c 17147} 17148 17149// Fields allows partial responses to be retrieved. See 17150// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17151// for more information. 17152func (c *ProjectsLocationsAgentsFlowsVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsVersionsCreateCall { 17153 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17154 return c 17155} 17156 17157// Context sets the context to be used in this call's Do method. Any 17158// pending HTTP request will be aborted if the provided context is 17159// canceled. 17160func (c *ProjectsLocationsAgentsFlowsVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsVersionsCreateCall { 17161 c.ctx_ = ctx 17162 return c 17163} 17164 17165// Header returns an http.Header that can be modified by the caller to 17166// add HTTP headers to the request. 17167func (c *ProjectsLocationsAgentsFlowsVersionsCreateCall) Header() http.Header { 17168 if c.header_ == nil { 17169 c.header_ = make(http.Header) 17170 } 17171 return c.header_ 17172} 17173 17174func (c *ProjectsLocationsAgentsFlowsVersionsCreateCall) doRequest(alt string) (*http.Response, error) { 17175 reqHeaders := make(http.Header) 17176 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17177 for k, v := range c.header_ { 17178 reqHeaders[k] = v 17179 } 17180 reqHeaders.Set("User-Agent", c.s.userAgent()) 17181 var body io.Reader = nil 17182 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1version) 17183 if err != nil { 17184 return nil, err 17185 } 17186 reqHeaders.Set("Content-Type", "application/json") 17187 c.urlParams_.Set("alt", alt) 17188 c.urlParams_.Set("prettyPrint", "false") 17189 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/versions") 17190 urls += "?" + c.urlParams_.Encode() 17191 req, err := http.NewRequest("POST", urls, body) 17192 if err != nil { 17193 return nil, err 17194 } 17195 req.Header = reqHeaders 17196 googleapi.Expand(req.URL, map[string]string{ 17197 "parent": c.parent, 17198 }) 17199 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17200} 17201 17202// Do executes the "dialogflow.projects.locations.agents.flows.versions.create" call. 17203// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 17204// Any non-2xx status code is an error. Response headers are in either 17205// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 17206// was returned at all) in error.(*googleapi.Error).Header. Use 17207// googleapi.IsNotModified to check whether the returned error was 17208// because http.StatusNotModified was returned. 17209func (c *ProjectsLocationsAgentsFlowsVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 17210 gensupport.SetOptions(c.urlParams_, opts...) 17211 res, err := c.doRequest("json") 17212 if res != nil && res.StatusCode == http.StatusNotModified { 17213 if res.Body != nil { 17214 res.Body.Close() 17215 } 17216 return nil, &googleapi.Error{ 17217 Code: res.StatusCode, 17218 Header: res.Header, 17219 } 17220 } 17221 if err != nil { 17222 return nil, err 17223 } 17224 defer googleapi.CloseBody(res) 17225 if err := googleapi.CheckResponse(res); err != nil { 17226 return nil, err 17227 } 17228 ret := &GoogleLongrunningOperation{ 17229 ServerResponse: googleapi.ServerResponse{ 17230 Header: res.Header, 17231 HTTPStatusCode: res.StatusCode, 17232 }, 17233 } 17234 target := &ret 17235 if err := gensupport.DecodeResponse(target, res); err != nil { 17236 return nil, err 17237 } 17238 return ret, nil 17239 // { 17240 // "description": "Creates a Version in the specified Flow.", 17241 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/versions", 17242 // "httpMethod": "POST", 17243 // "id": "dialogflow.projects.locations.agents.flows.versions.create", 17244 // "parameterOrder": [ 17245 // "parent" 17246 // ], 17247 // "parameters": { 17248 // "parent": { 17249 // "description": "Required. The Flow to create an Version for. Format: `projects//locations//agents//flows/`.", 17250 // "location": "path", 17251 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+$", 17252 // "required": true, 17253 // "type": "string" 17254 // } 17255 // }, 17256 // "path": "v3beta1/{+parent}/versions", 17257 // "request": { 17258 // "$ref": "GoogleCloudDialogflowCxV3beta1Version" 17259 // }, 17260 // "response": { 17261 // "$ref": "GoogleLongrunningOperation" 17262 // }, 17263 // "scopes": [ 17264 // "https://www.googleapis.com/auth/cloud-platform", 17265 // "https://www.googleapis.com/auth/dialogflow" 17266 // ] 17267 // } 17268 17269} 17270 17271// method id "dialogflow.projects.locations.agents.flows.versions.delete": 17272 17273type ProjectsLocationsAgentsFlowsVersionsDeleteCall struct { 17274 s *Service 17275 name string 17276 urlParams_ gensupport.URLParams 17277 ctx_ context.Context 17278 header_ http.Header 17279} 17280 17281// Delete: Deletes the specified Version. 17282func (r *ProjectsLocationsAgentsFlowsVersionsService) Delete(name string) *ProjectsLocationsAgentsFlowsVersionsDeleteCall { 17283 c := &ProjectsLocationsAgentsFlowsVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17284 c.name = name 17285 return c 17286} 17287 17288// Fields allows partial responses to be retrieved. See 17289// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17290// for more information. 17291func (c *ProjectsLocationsAgentsFlowsVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsVersionsDeleteCall { 17292 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17293 return c 17294} 17295 17296// Context sets the context to be used in this call's Do method. Any 17297// pending HTTP request will be aborted if the provided context is 17298// canceled. 17299func (c *ProjectsLocationsAgentsFlowsVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsVersionsDeleteCall { 17300 c.ctx_ = ctx 17301 return c 17302} 17303 17304// Header returns an http.Header that can be modified by the caller to 17305// add HTTP headers to the request. 17306func (c *ProjectsLocationsAgentsFlowsVersionsDeleteCall) Header() http.Header { 17307 if c.header_ == nil { 17308 c.header_ = make(http.Header) 17309 } 17310 return c.header_ 17311} 17312 17313func (c *ProjectsLocationsAgentsFlowsVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { 17314 reqHeaders := make(http.Header) 17315 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17316 for k, v := range c.header_ { 17317 reqHeaders[k] = v 17318 } 17319 reqHeaders.Set("User-Agent", c.s.userAgent()) 17320 var body io.Reader = nil 17321 c.urlParams_.Set("alt", alt) 17322 c.urlParams_.Set("prettyPrint", "false") 17323 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 17324 urls += "?" + c.urlParams_.Encode() 17325 req, err := http.NewRequest("DELETE", urls, body) 17326 if err != nil { 17327 return nil, err 17328 } 17329 req.Header = reqHeaders 17330 googleapi.Expand(req.URL, map[string]string{ 17331 "name": c.name, 17332 }) 17333 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17334} 17335 17336// Do executes the "dialogflow.projects.locations.agents.flows.versions.delete" call. 17337// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 17338// non-2xx status code is an error. Response headers are in either 17339// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 17340// returned at all) in error.(*googleapi.Error).Header. Use 17341// googleapi.IsNotModified to check whether the returned error was 17342// because http.StatusNotModified was returned. 17343func (c *ProjectsLocationsAgentsFlowsVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 17344 gensupport.SetOptions(c.urlParams_, opts...) 17345 res, err := c.doRequest("json") 17346 if res != nil && res.StatusCode == http.StatusNotModified { 17347 if res.Body != nil { 17348 res.Body.Close() 17349 } 17350 return nil, &googleapi.Error{ 17351 Code: res.StatusCode, 17352 Header: res.Header, 17353 } 17354 } 17355 if err != nil { 17356 return nil, err 17357 } 17358 defer googleapi.CloseBody(res) 17359 if err := googleapi.CheckResponse(res); err != nil { 17360 return nil, err 17361 } 17362 ret := &GoogleProtobufEmpty{ 17363 ServerResponse: googleapi.ServerResponse{ 17364 Header: res.Header, 17365 HTTPStatusCode: res.StatusCode, 17366 }, 17367 } 17368 target := &ret 17369 if err := gensupport.DecodeResponse(target, res); err != nil { 17370 return nil, err 17371 } 17372 return ret, nil 17373 // { 17374 // "description": "Deletes the specified Version.", 17375 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/versions/{versionsId}", 17376 // "httpMethod": "DELETE", 17377 // "id": "dialogflow.projects.locations.agents.flows.versions.delete", 17378 // "parameterOrder": [ 17379 // "name" 17380 // ], 17381 // "parameters": { 17382 // "name": { 17383 // "description": "Required. The name of the Version to delete. Format: `projects//locations//agents//flows//versions/`.", 17384 // "location": "path", 17385 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/versions/[^/]+$", 17386 // "required": true, 17387 // "type": "string" 17388 // } 17389 // }, 17390 // "path": "v3beta1/{+name}", 17391 // "response": { 17392 // "$ref": "GoogleProtobufEmpty" 17393 // }, 17394 // "scopes": [ 17395 // "https://www.googleapis.com/auth/cloud-platform", 17396 // "https://www.googleapis.com/auth/dialogflow" 17397 // ] 17398 // } 17399 17400} 17401 17402// method id "dialogflow.projects.locations.agents.flows.versions.get": 17403 17404type ProjectsLocationsAgentsFlowsVersionsGetCall struct { 17405 s *Service 17406 name string 17407 urlParams_ gensupport.URLParams 17408 ifNoneMatch_ string 17409 ctx_ context.Context 17410 header_ http.Header 17411} 17412 17413// Get: Retrieves the specified Version. 17414func (r *ProjectsLocationsAgentsFlowsVersionsService) Get(name string) *ProjectsLocationsAgentsFlowsVersionsGetCall { 17415 c := &ProjectsLocationsAgentsFlowsVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17416 c.name = name 17417 return c 17418} 17419 17420// Fields allows partial responses to be retrieved. See 17421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17422// for more information. 17423func (c *ProjectsLocationsAgentsFlowsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsVersionsGetCall { 17424 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17425 return c 17426} 17427 17428// IfNoneMatch sets the optional parameter which makes the operation 17429// fail if the object's ETag matches the given value. This is useful for 17430// getting updates only after the object has changed since the last 17431// request. Use googleapi.IsNotModified to check whether the response 17432// error from Do is the result of In-None-Match. 17433func (c *ProjectsLocationsAgentsFlowsVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsFlowsVersionsGetCall { 17434 c.ifNoneMatch_ = entityTag 17435 return c 17436} 17437 17438// Context sets the context to be used in this call's Do method. Any 17439// pending HTTP request will be aborted if the provided context is 17440// canceled. 17441func (c *ProjectsLocationsAgentsFlowsVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsVersionsGetCall { 17442 c.ctx_ = ctx 17443 return c 17444} 17445 17446// Header returns an http.Header that can be modified by the caller to 17447// add HTTP headers to the request. 17448func (c *ProjectsLocationsAgentsFlowsVersionsGetCall) Header() http.Header { 17449 if c.header_ == nil { 17450 c.header_ = make(http.Header) 17451 } 17452 return c.header_ 17453} 17454 17455func (c *ProjectsLocationsAgentsFlowsVersionsGetCall) doRequest(alt string) (*http.Response, error) { 17456 reqHeaders := make(http.Header) 17457 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17458 for k, v := range c.header_ { 17459 reqHeaders[k] = v 17460 } 17461 reqHeaders.Set("User-Agent", c.s.userAgent()) 17462 if c.ifNoneMatch_ != "" { 17463 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17464 } 17465 var body io.Reader = nil 17466 c.urlParams_.Set("alt", alt) 17467 c.urlParams_.Set("prettyPrint", "false") 17468 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 17469 urls += "?" + c.urlParams_.Encode() 17470 req, err := http.NewRequest("GET", urls, body) 17471 if err != nil { 17472 return nil, err 17473 } 17474 req.Header = reqHeaders 17475 googleapi.Expand(req.URL, map[string]string{ 17476 "name": c.name, 17477 }) 17478 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17479} 17480 17481// Do executes the "dialogflow.projects.locations.agents.flows.versions.get" call. 17482// Exactly one of *GoogleCloudDialogflowCxV3beta1Version or error will 17483// be non-nil. Any non-2xx status code is an error. Response headers are 17484// in either 17485// *GoogleCloudDialogflowCxV3beta1Version.ServerResponse.Header or (if a 17486// response was returned at all) in error.(*googleapi.Error).Header. Use 17487// googleapi.IsNotModified to check whether the returned error was 17488// because http.StatusNotModified was returned. 17489func (c *ProjectsLocationsAgentsFlowsVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Version, error) { 17490 gensupport.SetOptions(c.urlParams_, opts...) 17491 res, err := c.doRequest("json") 17492 if res != nil && res.StatusCode == http.StatusNotModified { 17493 if res.Body != nil { 17494 res.Body.Close() 17495 } 17496 return nil, &googleapi.Error{ 17497 Code: res.StatusCode, 17498 Header: res.Header, 17499 } 17500 } 17501 if err != nil { 17502 return nil, err 17503 } 17504 defer googleapi.CloseBody(res) 17505 if err := googleapi.CheckResponse(res); err != nil { 17506 return nil, err 17507 } 17508 ret := &GoogleCloudDialogflowCxV3beta1Version{ 17509 ServerResponse: googleapi.ServerResponse{ 17510 Header: res.Header, 17511 HTTPStatusCode: res.StatusCode, 17512 }, 17513 } 17514 target := &ret 17515 if err := gensupport.DecodeResponse(target, res); err != nil { 17516 return nil, err 17517 } 17518 return ret, nil 17519 // { 17520 // "description": "Retrieves the specified Version.", 17521 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/versions/{versionsId}", 17522 // "httpMethod": "GET", 17523 // "id": "dialogflow.projects.locations.agents.flows.versions.get", 17524 // "parameterOrder": [ 17525 // "name" 17526 // ], 17527 // "parameters": { 17528 // "name": { 17529 // "description": "Required. The name of the Version. Format: `projects//locations//agents//flows//versions/`.", 17530 // "location": "path", 17531 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/versions/[^/]+$", 17532 // "required": true, 17533 // "type": "string" 17534 // } 17535 // }, 17536 // "path": "v3beta1/{+name}", 17537 // "response": { 17538 // "$ref": "GoogleCloudDialogflowCxV3beta1Version" 17539 // }, 17540 // "scopes": [ 17541 // "https://www.googleapis.com/auth/cloud-platform", 17542 // "https://www.googleapis.com/auth/dialogflow" 17543 // ] 17544 // } 17545 17546} 17547 17548// method id "dialogflow.projects.locations.agents.flows.versions.list": 17549 17550type ProjectsLocationsAgentsFlowsVersionsListCall struct { 17551 s *Service 17552 parent string 17553 urlParams_ gensupport.URLParams 17554 ifNoneMatch_ string 17555 ctx_ context.Context 17556 header_ http.Header 17557} 17558 17559// List: Returns the list of all versions in the specified Flow. 17560func (r *ProjectsLocationsAgentsFlowsVersionsService) List(parent string) *ProjectsLocationsAgentsFlowsVersionsListCall { 17561 c := &ProjectsLocationsAgentsFlowsVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17562 c.parent = parent 17563 return c 17564} 17565 17566// PageSize sets the optional parameter "pageSize": The maximum number 17567// of items to return in a single page. By default 20 and at most 100. 17568func (c *ProjectsLocationsAgentsFlowsVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsFlowsVersionsListCall { 17569 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 17570 return c 17571} 17572 17573// PageToken sets the optional parameter "pageToken": The 17574// next_page_token value returned from a previous list request. 17575func (c *ProjectsLocationsAgentsFlowsVersionsListCall) PageToken(pageToken string) *ProjectsLocationsAgentsFlowsVersionsListCall { 17576 c.urlParams_.Set("pageToken", pageToken) 17577 return c 17578} 17579 17580// Fields allows partial responses to be retrieved. See 17581// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17582// for more information. 17583func (c *ProjectsLocationsAgentsFlowsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsVersionsListCall { 17584 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17585 return c 17586} 17587 17588// IfNoneMatch sets the optional parameter which makes the operation 17589// fail if the object's ETag matches the given value. This is useful for 17590// getting updates only after the object has changed since the last 17591// request. Use googleapi.IsNotModified to check whether the response 17592// error from Do is the result of In-None-Match. 17593func (c *ProjectsLocationsAgentsFlowsVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsFlowsVersionsListCall { 17594 c.ifNoneMatch_ = entityTag 17595 return c 17596} 17597 17598// Context sets the context to be used in this call's Do method. Any 17599// pending HTTP request will be aborted if the provided context is 17600// canceled. 17601func (c *ProjectsLocationsAgentsFlowsVersionsListCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsVersionsListCall { 17602 c.ctx_ = ctx 17603 return c 17604} 17605 17606// Header returns an http.Header that can be modified by the caller to 17607// add HTTP headers to the request. 17608func (c *ProjectsLocationsAgentsFlowsVersionsListCall) Header() http.Header { 17609 if c.header_ == nil { 17610 c.header_ = make(http.Header) 17611 } 17612 return c.header_ 17613} 17614 17615func (c *ProjectsLocationsAgentsFlowsVersionsListCall) doRequest(alt string) (*http.Response, error) { 17616 reqHeaders := make(http.Header) 17617 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17618 for k, v := range c.header_ { 17619 reqHeaders[k] = v 17620 } 17621 reqHeaders.Set("User-Agent", c.s.userAgent()) 17622 if c.ifNoneMatch_ != "" { 17623 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17624 } 17625 var body io.Reader = nil 17626 c.urlParams_.Set("alt", alt) 17627 c.urlParams_.Set("prettyPrint", "false") 17628 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/versions") 17629 urls += "?" + c.urlParams_.Encode() 17630 req, err := http.NewRequest("GET", urls, body) 17631 if err != nil { 17632 return nil, err 17633 } 17634 req.Header = reqHeaders 17635 googleapi.Expand(req.URL, map[string]string{ 17636 "parent": c.parent, 17637 }) 17638 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17639} 17640 17641// Do executes the "dialogflow.projects.locations.agents.flows.versions.list" call. 17642// Exactly one of *GoogleCloudDialogflowCxV3beta1ListVersionsResponse or 17643// error will be non-nil. Any non-2xx status code is an error. Response 17644// headers are in either 17645// *GoogleCloudDialogflowCxV3beta1ListVersionsResponse.ServerResponse.Hea 17646// der or (if a response was returned at all) in 17647// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17648// whether the returned error was because http.StatusNotModified was 17649// returned. 17650func (c *ProjectsLocationsAgentsFlowsVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListVersionsResponse, error) { 17651 gensupport.SetOptions(c.urlParams_, opts...) 17652 res, err := c.doRequest("json") 17653 if res != nil && res.StatusCode == http.StatusNotModified { 17654 if res.Body != nil { 17655 res.Body.Close() 17656 } 17657 return nil, &googleapi.Error{ 17658 Code: res.StatusCode, 17659 Header: res.Header, 17660 } 17661 } 17662 if err != nil { 17663 return nil, err 17664 } 17665 defer googleapi.CloseBody(res) 17666 if err := googleapi.CheckResponse(res); err != nil { 17667 return nil, err 17668 } 17669 ret := &GoogleCloudDialogflowCxV3beta1ListVersionsResponse{ 17670 ServerResponse: googleapi.ServerResponse{ 17671 Header: res.Header, 17672 HTTPStatusCode: res.StatusCode, 17673 }, 17674 } 17675 target := &ret 17676 if err := gensupport.DecodeResponse(target, res); err != nil { 17677 return nil, err 17678 } 17679 return ret, nil 17680 // { 17681 // "description": "Returns the list of all versions in the specified Flow.", 17682 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/versions", 17683 // "httpMethod": "GET", 17684 // "id": "dialogflow.projects.locations.agents.flows.versions.list", 17685 // "parameterOrder": [ 17686 // "parent" 17687 // ], 17688 // "parameters": { 17689 // "pageSize": { 17690 // "description": "The maximum number of items to return in a single page. By default 20 and at most 100.", 17691 // "format": "int32", 17692 // "location": "query", 17693 // "type": "integer" 17694 // }, 17695 // "pageToken": { 17696 // "description": "The next_page_token value returned from a previous list request.", 17697 // "location": "query", 17698 // "type": "string" 17699 // }, 17700 // "parent": { 17701 // "description": "Required. The Flow to list all versions for. Format: `projects//locations//agents//flows/`.", 17702 // "location": "path", 17703 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+$", 17704 // "required": true, 17705 // "type": "string" 17706 // } 17707 // }, 17708 // "path": "v3beta1/{+parent}/versions", 17709 // "response": { 17710 // "$ref": "GoogleCloudDialogflowCxV3beta1ListVersionsResponse" 17711 // }, 17712 // "scopes": [ 17713 // "https://www.googleapis.com/auth/cloud-platform", 17714 // "https://www.googleapis.com/auth/dialogflow" 17715 // ] 17716 // } 17717 17718} 17719 17720// Pages invokes f for each page of results. 17721// A non-nil error returned from f will halt the iteration. 17722// The provided context supersedes any context provided to the Context method. 17723func (c *ProjectsLocationsAgentsFlowsVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListVersionsResponse) error) error { 17724 c.ctx_ = ctx 17725 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17726 for { 17727 x, err := c.Do() 17728 if err != nil { 17729 return err 17730 } 17731 if err := f(x); err != nil { 17732 return err 17733 } 17734 if x.NextPageToken == "" { 17735 return nil 17736 } 17737 c.PageToken(x.NextPageToken) 17738 } 17739} 17740 17741// method id "dialogflow.projects.locations.agents.flows.versions.load": 17742 17743type ProjectsLocationsAgentsFlowsVersionsLoadCall struct { 17744 s *Service 17745 name string 17746 googleclouddialogflowcxv3beta1loadversionrequest *GoogleCloudDialogflowCxV3beta1LoadVersionRequest 17747 urlParams_ gensupport.URLParams 17748 ctx_ context.Context 17749 header_ http.Header 17750} 17751 17752// Load: Loads a specified version to draft version. 17753func (r *ProjectsLocationsAgentsFlowsVersionsService) Load(name string, googleclouddialogflowcxv3beta1loadversionrequest *GoogleCloudDialogflowCxV3beta1LoadVersionRequest) *ProjectsLocationsAgentsFlowsVersionsLoadCall { 17754 c := &ProjectsLocationsAgentsFlowsVersionsLoadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17755 c.name = name 17756 c.googleclouddialogflowcxv3beta1loadversionrequest = googleclouddialogflowcxv3beta1loadversionrequest 17757 return c 17758} 17759 17760// Fields allows partial responses to be retrieved. See 17761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17762// for more information. 17763func (c *ProjectsLocationsAgentsFlowsVersionsLoadCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsVersionsLoadCall { 17764 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17765 return c 17766} 17767 17768// Context sets the context to be used in this call's Do method. Any 17769// pending HTTP request will be aborted if the provided context is 17770// canceled. 17771func (c *ProjectsLocationsAgentsFlowsVersionsLoadCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsVersionsLoadCall { 17772 c.ctx_ = ctx 17773 return c 17774} 17775 17776// Header returns an http.Header that can be modified by the caller to 17777// add HTTP headers to the request. 17778func (c *ProjectsLocationsAgentsFlowsVersionsLoadCall) Header() http.Header { 17779 if c.header_ == nil { 17780 c.header_ = make(http.Header) 17781 } 17782 return c.header_ 17783} 17784 17785func (c *ProjectsLocationsAgentsFlowsVersionsLoadCall) doRequest(alt string) (*http.Response, error) { 17786 reqHeaders := make(http.Header) 17787 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17788 for k, v := range c.header_ { 17789 reqHeaders[k] = v 17790 } 17791 reqHeaders.Set("User-Agent", c.s.userAgent()) 17792 var body io.Reader = nil 17793 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1loadversionrequest) 17794 if err != nil { 17795 return nil, err 17796 } 17797 reqHeaders.Set("Content-Type", "application/json") 17798 c.urlParams_.Set("alt", alt) 17799 c.urlParams_.Set("prettyPrint", "false") 17800 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}:load") 17801 urls += "?" + c.urlParams_.Encode() 17802 req, err := http.NewRequest("POST", urls, body) 17803 if err != nil { 17804 return nil, err 17805 } 17806 req.Header = reqHeaders 17807 googleapi.Expand(req.URL, map[string]string{ 17808 "name": c.name, 17809 }) 17810 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17811} 17812 17813// Do executes the "dialogflow.projects.locations.agents.flows.versions.load" call. 17814// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 17815// Any non-2xx status code is an error. Response headers are in either 17816// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 17817// was returned at all) in error.(*googleapi.Error).Header. Use 17818// googleapi.IsNotModified to check whether the returned error was 17819// because http.StatusNotModified was returned. 17820func (c *ProjectsLocationsAgentsFlowsVersionsLoadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 17821 gensupport.SetOptions(c.urlParams_, opts...) 17822 res, err := c.doRequest("json") 17823 if res != nil && res.StatusCode == http.StatusNotModified { 17824 if res.Body != nil { 17825 res.Body.Close() 17826 } 17827 return nil, &googleapi.Error{ 17828 Code: res.StatusCode, 17829 Header: res.Header, 17830 } 17831 } 17832 if err != nil { 17833 return nil, err 17834 } 17835 defer googleapi.CloseBody(res) 17836 if err := googleapi.CheckResponse(res); err != nil { 17837 return nil, err 17838 } 17839 ret := &GoogleLongrunningOperation{ 17840 ServerResponse: googleapi.ServerResponse{ 17841 Header: res.Header, 17842 HTTPStatusCode: res.StatusCode, 17843 }, 17844 } 17845 target := &ret 17846 if err := gensupport.DecodeResponse(target, res); err != nil { 17847 return nil, err 17848 } 17849 return ret, nil 17850 // { 17851 // "description": "Loads a specified version to draft version.", 17852 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/versions/{versionsId}:load", 17853 // "httpMethod": "POST", 17854 // "id": "dialogflow.projects.locations.agents.flows.versions.load", 17855 // "parameterOrder": [ 17856 // "name" 17857 // ], 17858 // "parameters": { 17859 // "name": { 17860 // "description": "Required. The Version to be loaded to draft version. Format: `projects//locations//agents//flows//versions/`.", 17861 // "location": "path", 17862 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/versions/[^/]+$", 17863 // "required": true, 17864 // "type": "string" 17865 // } 17866 // }, 17867 // "path": "v3beta1/{+name}:load", 17868 // "request": { 17869 // "$ref": "GoogleCloudDialogflowCxV3beta1LoadVersionRequest" 17870 // }, 17871 // "response": { 17872 // "$ref": "GoogleLongrunningOperation" 17873 // }, 17874 // "scopes": [ 17875 // "https://www.googleapis.com/auth/cloud-platform", 17876 // "https://www.googleapis.com/auth/dialogflow" 17877 // ] 17878 // } 17879 17880} 17881 17882// method id "dialogflow.projects.locations.agents.flows.versions.patch": 17883 17884type ProjectsLocationsAgentsFlowsVersionsPatchCall struct { 17885 s *Service 17886 name string 17887 googleclouddialogflowcxv3beta1version *GoogleCloudDialogflowCxV3beta1Version 17888 urlParams_ gensupport.URLParams 17889 ctx_ context.Context 17890 header_ http.Header 17891} 17892 17893// Patch: Updates the specified Version. 17894func (r *ProjectsLocationsAgentsFlowsVersionsService) Patch(name string, googleclouddialogflowcxv3beta1version *GoogleCloudDialogflowCxV3beta1Version) *ProjectsLocationsAgentsFlowsVersionsPatchCall { 17895 c := &ProjectsLocationsAgentsFlowsVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17896 c.name = name 17897 c.googleclouddialogflowcxv3beta1version = googleclouddialogflowcxv3beta1version 17898 return c 17899} 17900 17901// UpdateMask sets the optional parameter "updateMask": Required. The 17902// mask to control which fields get updated. Currently only 17903// `description` and `display_name` can be updated. 17904func (c *ProjectsLocationsAgentsFlowsVersionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsFlowsVersionsPatchCall { 17905 c.urlParams_.Set("updateMask", updateMask) 17906 return c 17907} 17908 17909// Fields allows partial responses to be retrieved. See 17910// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17911// for more information. 17912func (c *ProjectsLocationsAgentsFlowsVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsFlowsVersionsPatchCall { 17913 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17914 return c 17915} 17916 17917// Context sets the context to be used in this call's Do method. Any 17918// pending HTTP request will be aborted if the provided context is 17919// canceled. 17920func (c *ProjectsLocationsAgentsFlowsVersionsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsFlowsVersionsPatchCall { 17921 c.ctx_ = ctx 17922 return c 17923} 17924 17925// Header returns an http.Header that can be modified by the caller to 17926// add HTTP headers to the request. 17927func (c *ProjectsLocationsAgentsFlowsVersionsPatchCall) Header() http.Header { 17928 if c.header_ == nil { 17929 c.header_ = make(http.Header) 17930 } 17931 return c.header_ 17932} 17933 17934func (c *ProjectsLocationsAgentsFlowsVersionsPatchCall) doRequest(alt string) (*http.Response, error) { 17935 reqHeaders := make(http.Header) 17936 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17937 for k, v := range c.header_ { 17938 reqHeaders[k] = v 17939 } 17940 reqHeaders.Set("User-Agent", c.s.userAgent()) 17941 var body io.Reader = nil 17942 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1version) 17943 if err != nil { 17944 return nil, err 17945 } 17946 reqHeaders.Set("Content-Type", "application/json") 17947 c.urlParams_.Set("alt", alt) 17948 c.urlParams_.Set("prettyPrint", "false") 17949 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 17950 urls += "?" + c.urlParams_.Encode() 17951 req, err := http.NewRequest("PATCH", urls, body) 17952 if err != nil { 17953 return nil, err 17954 } 17955 req.Header = reqHeaders 17956 googleapi.Expand(req.URL, map[string]string{ 17957 "name": c.name, 17958 }) 17959 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17960} 17961 17962// Do executes the "dialogflow.projects.locations.agents.flows.versions.patch" call. 17963// Exactly one of *GoogleCloudDialogflowCxV3beta1Version or error will 17964// be non-nil. Any non-2xx status code is an error. Response headers are 17965// in either 17966// *GoogleCloudDialogflowCxV3beta1Version.ServerResponse.Header or (if a 17967// response was returned at all) in error.(*googleapi.Error).Header. Use 17968// googleapi.IsNotModified to check whether the returned error was 17969// because http.StatusNotModified was returned. 17970func (c *ProjectsLocationsAgentsFlowsVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Version, error) { 17971 gensupport.SetOptions(c.urlParams_, opts...) 17972 res, err := c.doRequest("json") 17973 if res != nil && res.StatusCode == http.StatusNotModified { 17974 if res.Body != nil { 17975 res.Body.Close() 17976 } 17977 return nil, &googleapi.Error{ 17978 Code: res.StatusCode, 17979 Header: res.Header, 17980 } 17981 } 17982 if err != nil { 17983 return nil, err 17984 } 17985 defer googleapi.CloseBody(res) 17986 if err := googleapi.CheckResponse(res); err != nil { 17987 return nil, err 17988 } 17989 ret := &GoogleCloudDialogflowCxV3beta1Version{ 17990 ServerResponse: googleapi.ServerResponse{ 17991 Header: res.Header, 17992 HTTPStatusCode: res.StatusCode, 17993 }, 17994 } 17995 target := &ret 17996 if err := gensupport.DecodeResponse(target, res); err != nil { 17997 return nil, err 17998 } 17999 return ret, nil 18000 // { 18001 // "description": "Updates the specified Version.", 18002 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/flows/{flowsId}/versions/{versionsId}", 18003 // "httpMethod": "PATCH", 18004 // "id": "dialogflow.projects.locations.agents.flows.versions.patch", 18005 // "parameterOrder": [ 18006 // "name" 18007 // ], 18008 // "parameters": { 18009 // "name": { 18010 // "description": "Format: projects//locations//agents//flows//versions/. Version ID is a self-increasing number generated by Dialogflow upon version creation.", 18011 // "location": "path", 18012 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/versions/[^/]+$", 18013 // "required": true, 18014 // "type": "string" 18015 // }, 18016 // "updateMask": { 18017 // "description": "Required. The mask to control which fields get updated. Currently only `description` and `display_name` can be updated.", 18018 // "format": "google-fieldmask", 18019 // "location": "query", 18020 // "type": "string" 18021 // } 18022 // }, 18023 // "path": "v3beta1/{+name}", 18024 // "request": { 18025 // "$ref": "GoogleCloudDialogflowCxV3beta1Version" 18026 // }, 18027 // "response": { 18028 // "$ref": "GoogleCloudDialogflowCxV3beta1Version" 18029 // }, 18030 // "scopes": [ 18031 // "https://www.googleapis.com/auth/cloud-platform", 18032 // "https://www.googleapis.com/auth/dialogflow" 18033 // ] 18034 // } 18035 18036} 18037 18038// method id "dialogflow.projects.locations.agents.intents.create": 18039 18040type ProjectsLocationsAgentsIntentsCreateCall struct { 18041 s *Service 18042 parent string 18043 googleclouddialogflowcxv3beta1intent *GoogleCloudDialogflowCxV3beta1Intent 18044 urlParams_ gensupport.URLParams 18045 ctx_ context.Context 18046 header_ http.Header 18047} 18048 18049// Create: Creates an intent in the specified agent. 18050func (r *ProjectsLocationsAgentsIntentsService) Create(parent string, googleclouddialogflowcxv3beta1intent *GoogleCloudDialogflowCxV3beta1Intent) *ProjectsLocationsAgentsIntentsCreateCall { 18051 c := &ProjectsLocationsAgentsIntentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18052 c.parent = parent 18053 c.googleclouddialogflowcxv3beta1intent = googleclouddialogflowcxv3beta1intent 18054 return c 18055} 18056 18057// LanguageCode sets the optional parameter "languageCode": The language 18058// of the following fields in `intent`: * 18059// `Intent.training_phrases.parts.text` If not specified, the agent's 18060// default language is used. [Many 18061// languages](https://cloud.google.com/dialogflow/docs/reference/language 18062// ) are supported. Note: languages must be enabled in the agent before 18063// they can be used. 18064func (c *ProjectsLocationsAgentsIntentsCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsIntentsCreateCall { 18065 c.urlParams_.Set("languageCode", languageCode) 18066 return c 18067} 18068 18069// Fields allows partial responses to be retrieved. See 18070// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18071// for more information. 18072func (c *ProjectsLocationsAgentsIntentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsIntentsCreateCall { 18073 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18074 return c 18075} 18076 18077// Context sets the context to be used in this call's Do method. Any 18078// pending HTTP request will be aborted if the provided context is 18079// canceled. 18080func (c *ProjectsLocationsAgentsIntentsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsIntentsCreateCall { 18081 c.ctx_ = ctx 18082 return c 18083} 18084 18085// Header returns an http.Header that can be modified by the caller to 18086// add HTTP headers to the request. 18087func (c *ProjectsLocationsAgentsIntentsCreateCall) Header() http.Header { 18088 if c.header_ == nil { 18089 c.header_ = make(http.Header) 18090 } 18091 return c.header_ 18092} 18093 18094func (c *ProjectsLocationsAgentsIntentsCreateCall) doRequest(alt string) (*http.Response, error) { 18095 reqHeaders := make(http.Header) 18096 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18097 for k, v := range c.header_ { 18098 reqHeaders[k] = v 18099 } 18100 reqHeaders.Set("User-Agent", c.s.userAgent()) 18101 var body io.Reader = nil 18102 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1intent) 18103 if err != nil { 18104 return nil, err 18105 } 18106 reqHeaders.Set("Content-Type", "application/json") 18107 c.urlParams_.Set("alt", alt) 18108 c.urlParams_.Set("prettyPrint", "false") 18109 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/intents") 18110 urls += "?" + c.urlParams_.Encode() 18111 req, err := http.NewRequest("POST", urls, body) 18112 if err != nil { 18113 return nil, err 18114 } 18115 req.Header = reqHeaders 18116 googleapi.Expand(req.URL, map[string]string{ 18117 "parent": c.parent, 18118 }) 18119 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18120} 18121 18122// Do executes the "dialogflow.projects.locations.agents.intents.create" call. 18123// Exactly one of *GoogleCloudDialogflowCxV3beta1Intent or error will be 18124// non-nil. Any non-2xx status code is an error. Response headers are in 18125// either *GoogleCloudDialogflowCxV3beta1Intent.ServerResponse.Header or 18126// (if a response was returned at all) in 18127// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18128// whether the returned error was because http.StatusNotModified was 18129// returned. 18130func (c *ProjectsLocationsAgentsIntentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Intent, error) { 18131 gensupport.SetOptions(c.urlParams_, opts...) 18132 res, err := c.doRequest("json") 18133 if res != nil && res.StatusCode == http.StatusNotModified { 18134 if res.Body != nil { 18135 res.Body.Close() 18136 } 18137 return nil, &googleapi.Error{ 18138 Code: res.StatusCode, 18139 Header: res.Header, 18140 } 18141 } 18142 if err != nil { 18143 return nil, err 18144 } 18145 defer googleapi.CloseBody(res) 18146 if err := googleapi.CheckResponse(res); err != nil { 18147 return nil, err 18148 } 18149 ret := &GoogleCloudDialogflowCxV3beta1Intent{ 18150 ServerResponse: googleapi.ServerResponse{ 18151 Header: res.Header, 18152 HTTPStatusCode: res.StatusCode, 18153 }, 18154 } 18155 target := &ret 18156 if err := gensupport.DecodeResponse(target, res); err != nil { 18157 return nil, err 18158 } 18159 return ret, nil 18160 // { 18161 // "description": "Creates an intent in the specified agent.", 18162 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/intents", 18163 // "httpMethod": "POST", 18164 // "id": "dialogflow.projects.locations.agents.intents.create", 18165 // "parameterOrder": [ 18166 // "parent" 18167 // ], 18168 // "parameters": { 18169 // "languageCode": { 18170 // "description": "The language of the following fields in `intent`: * `Intent.training_phrases.parts.text` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 18171 // "location": "query", 18172 // "type": "string" 18173 // }, 18174 // "parent": { 18175 // "description": "Required. The agent to create an intent for. Format: `projects//locations//agents/`.", 18176 // "location": "path", 18177 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 18178 // "required": true, 18179 // "type": "string" 18180 // } 18181 // }, 18182 // "path": "v3beta1/{+parent}/intents", 18183 // "request": { 18184 // "$ref": "GoogleCloudDialogflowCxV3beta1Intent" 18185 // }, 18186 // "response": { 18187 // "$ref": "GoogleCloudDialogflowCxV3beta1Intent" 18188 // }, 18189 // "scopes": [ 18190 // "https://www.googleapis.com/auth/cloud-platform", 18191 // "https://www.googleapis.com/auth/dialogflow" 18192 // ] 18193 // } 18194 18195} 18196 18197// method id "dialogflow.projects.locations.agents.intents.delete": 18198 18199type ProjectsLocationsAgentsIntentsDeleteCall struct { 18200 s *Service 18201 name string 18202 urlParams_ gensupport.URLParams 18203 ctx_ context.Context 18204 header_ http.Header 18205} 18206 18207// Delete: Deletes the specified intent. 18208func (r *ProjectsLocationsAgentsIntentsService) Delete(name string) *ProjectsLocationsAgentsIntentsDeleteCall { 18209 c := &ProjectsLocationsAgentsIntentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18210 c.name = name 18211 return c 18212} 18213 18214// Fields allows partial responses to be retrieved. See 18215// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18216// for more information. 18217func (c *ProjectsLocationsAgentsIntentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsIntentsDeleteCall { 18218 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18219 return c 18220} 18221 18222// Context sets the context to be used in this call's Do method. Any 18223// pending HTTP request will be aborted if the provided context is 18224// canceled. 18225func (c *ProjectsLocationsAgentsIntentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsIntentsDeleteCall { 18226 c.ctx_ = ctx 18227 return c 18228} 18229 18230// Header returns an http.Header that can be modified by the caller to 18231// add HTTP headers to the request. 18232func (c *ProjectsLocationsAgentsIntentsDeleteCall) Header() http.Header { 18233 if c.header_ == nil { 18234 c.header_ = make(http.Header) 18235 } 18236 return c.header_ 18237} 18238 18239func (c *ProjectsLocationsAgentsIntentsDeleteCall) doRequest(alt string) (*http.Response, error) { 18240 reqHeaders := make(http.Header) 18241 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18242 for k, v := range c.header_ { 18243 reqHeaders[k] = v 18244 } 18245 reqHeaders.Set("User-Agent", c.s.userAgent()) 18246 var body io.Reader = nil 18247 c.urlParams_.Set("alt", alt) 18248 c.urlParams_.Set("prettyPrint", "false") 18249 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 18250 urls += "?" + c.urlParams_.Encode() 18251 req, err := http.NewRequest("DELETE", urls, body) 18252 if err != nil { 18253 return nil, err 18254 } 18255 req.Header = reqHeaders 18256 googleapi.Expand(req.URL, map[string]string{ 18257 "name": c.name, 18258 }) 18259 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18260} 18261 18262// Do executes the "dialogflow.projects.locations.agents.intents.delete" call. 18263// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 18264// non-2xx status code is an error. Response headers are in either 18265// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 18266// returned at all) in error.(*googleapi.Error).Header. Use 18267// googleapi.IsNotModified to check whether the returned error was 18268// because http.StatusNotModified was returned. 18269func (c *ProjectsLocationsAgentsIntentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 18270 gensupport.SetOptions(c.urlParams_, opts...) 18271 res, err := c.doRequest("json") 18272 if res != nil && res.StatusCode == http.StatusNotModified { 18273 if res.Body != nil { 18274 res.Body.Close() 18275 } 18276 return nil, &googleapi.Error{ 18277 Code: res.StatusCode, 18278 Header: res.Header, 18279 } 18280 } 18281 if err != nil { 18282 return nil, err 18283 } 18284 defer googleapi.CloseBody(res) 18285 if err := googleapi.CheckResponse(res); err != nil { 18286 return nil, err 18287 } 18288 ret := &GoogleProtobufEmpty{ 18289 ServerResponse: googleapi.ServerResponse{ 18290 Header: res.Header, 18291 HTTPStatusCode: res.StatusCode, 18292 }, 18293 } 18294 target := &ret 18295 if err := gensupport.DecodeResponse(target, res); err != nil { 18296 return nil, err 18297 } 18298 return ret, nil 18299 // { 18300 // "description": "Deletes the specified intent.", 18301 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/intents/{intentsId}", 18302 // "httpMethod": "DELETE", 18303 // "id": "dialogflow.projects.locations.agents.intents.delete", 18304 // "parameterOrder": [ 18305 // "name" 18306 // ], 18307 // "parameters": { 18308 // "name": { 18309 // "description": "Required. The name of the intent to delete. Format: `projects//locations//agents//intents/`.", 18310 // "location": "path", 18311 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/intents/[^/]+$", 18312 // "required": true, 18313 // "type": "string" 18314 // } 18315 // }, 18316 // "path": "v3beta1/{+name}", 18317 // "response": { 18318 // "$ref": "GoogleProtobufEmpty" 18319 // }, 18320 // "scopes": [ 18321 // "https://www.googleapis.com/auth/cloud-platform", 18322 // "https://www.googleapis.com/auth/dialogflow" 18323 // ] 18324 // } 18325 18326} 18327 18328// method id "dialogflow.projects.locations.agents.intents.get": 18329 18330type ProjectsLocationsAgentsIntentsGetCall struct { 18331 s *Service 18332 name string 18333 urlParams_ gensupport.URLParams 18334 ifNoneMatch_ string 18335 ctx_ context.Context 18336 header_ http.Header 18337} 18338 18339// Get: Retrieves the specified intent. 18340func (r *ProjectsLocationsAgentsIntentsService) Get(name string) *ProjectsLocationsAgentsIntentsGetCall { 18341 c := &ProjectsLocationsAgentsIntentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18342 c.name = name 18343 return c 18344} 18345 18346// LanguageCode sets the optional parameter "languageCode": The language 18347// to retrieve the intent for. The following fields are language 18348// dependent: * `Intent.training_phrases.parts.text` If not specified, 18349// the agent's default language is used. [Many 18350// languages](https://cloud.google.com/dialogflow/docs/reference/language 18351// ) are supported. Note: languages must be enabled in the agent before 18352// they can be used. 18353func (c *ProjectsLocationsAgentsIntentsGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsIntentsGetCall { 18354 c.urlParams_.Set("languageCode", languageCode) 18355 return c 18356} 18357 18358// Fields allows partial responses to be retrieved. See 18359// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18360// for more information. 18361func (c *ProjectsLocationsAgentsIntentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsIntentsGetCall { 18362 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18363 return c 18364} 18365 18366// IfNoneMatch sets the optional parameter which makes the operation 18367// fail if the object's ETag matches the given value. This is useful for 18368// getting updates only after the object has changed since the last 18369// request. Use googleapi.IsNotModified to check whether the response 18370// error from Do is the result of In-None-Match. 18371func (c *ProjectsLocationsAgentsIntentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsIntentsGetCall { 18372 c.ifNoneMatch_ = entityTag 18373 return c 18374} 18375 18376// Context sets the context to be used in this call's Do method. Any 18377// pending HTTP request will be aborted if the provided context is 18378// canceled. 18379func (c *ProjectsLocationsAgentsIntentsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsIntentsGetCall { 18380 c.ctx_ = ctx 18381 return c 18382} 18383 18384// Header returns an http.Header that can be modified by the caller to 18385// add HTTP headers to the request. 18386func (c *ProjectsLocationsAgentsIntentsGetCall) Header() http.Header { 18387 if c.header_ == nil { 18388 c.header_ = make(http.Header) 18389 } 18390 return c.header_ 18391} 18392 18393func (c *ProjectsLocationsAgentsIntentsGetCall) doRequest(alt string) (*http.Response, error) { 18394 reqHeaders := make(http.Header) 18395 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18396 for k, v := range c.header_ { 18397 reqHeaders[k] = v 18398 } 18399 reqHeaders.Set("User-Agent", c.s.userAgent()) 18400 if c.ifNoneMatch_ != "" { 18401 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18402 } 18403 var body io.Reader = nil 18404 c.urlParams_.Set("alt", alt) 18405 c.urlParams_.Set("prettyPrint", "false") 18406 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 18407 urls += "?" + c.urlParams_.Encode() 18408 req, err := http.NewRequest("GET", urls, body) 18409 if err != nil { 18410 return nil, err 18411 } 18412 req.Header = reqHeaders 18413 googleapi.Expand(req.URL, map[string]string{ 18414 "name": c.name, 18415 }) 18416 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18417} 18418 18419// Do executes the "dialogflow.projects.locations.agents.intents.get" call. 18420// Exactly one of *GoogleCloudDialogflowCxV3beta1Intent or error will be 18421// non-nil. Any non-2xx status code is an error. Response headers are in 18422// either *GoogleCloudDialogflowCxV3beta1Intent.ServerResponse.Header or 18423// (if a response was returned at all) in 18424// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18425// whether the returned error was because http.StatusNotModified was 18426// returned. 18427func (c *ProjectsLocationsAgentsIntentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Intent, error) { 18428 gensupport.SetOptions(c.urlParams_, opts...) 18429 res, err := c.doRequest("json") 18430 if res != nil && res.StatusCode == http.StatusNotModified { 18431 if res.Body != nil { 18432 res.Body.Close() 18433 } 18434 return nil, &googleapi.Error{ 18435 Code: res.StatusCode, 18436 Header: res.Header, 18437 } 18438 } 18439 if err != nil { 18440 return nil, err 18441 } 18442 defer googleapi.CloseBody(res) 18443 if err := googleapi.CheckResponse(res); err != nil { 18444 return nil, err 18445 } 18446 ret := &GoogleCloudDialogflowCxV3beta1Intent{ 18447 ServerResponse: googleapi.ServerResponse{ 18448 Header: res.Header, 18449 HTTPStatusCode: res.StatusCode, 18450 }, 18451 } 18452 target := &ret 18453 if err := gensupport.DecodeResponse(target, res); err != nil { 18454 return nil, err 18455 } 18456 return ret, nil 18457 // { 18458 // "description": "Retrieves the specified intent.", 18459 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/intents/{intentsId}", 18460 // "httpMethod": "GET", 18461 // "id": "dialogflow.projects.locations.agents.intents.get", 18462 // "parameterOrder": [ 18463 // "name" 18464 // ], 18465 // "parameters": { 18466 // "languageCode": { 18467 // "description": "The language to retrieve the intent for. The following fields are language dependent: * `Intent.training_phrases.parts.text` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 18468 // "location": "query", 18469 // "type": "string" 18470 // }, 18471 // "name": { 18472 // "description": "Required. The name of the intent. Format: `projects//locations//agents//intents/`.", 18473 // "location": "path", 18474 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/intents/[^/]+$", 18475 // "required": true, 18476 // "type": "string" 18477 // } 18478 // }, 18479 // "path": "v3beta1/{+name}", 18480 // "response": { 18481 // "$ref": "GoogleCloudDialogflowCxV3beta1Intent" 18482 // }, 18483 // "scopes": [ 18484 // "https://www.googleapis.com/auth/cloud-platform", 18485 // "https://www.googleapis.com/auth/dialogflow" 18486 // ] 18487 // } 18488 18489} 18490 18491// method id "dialogflow.projects.locations.agents.intents.list": 18492 18493type ProjectsLocationsAgentsIntentsListCall struct { 18494 s *Service 18495 parent string 18496 urlParams_ gensupport.URLParams 18497 ifNoneMatch_ string 18498 ctx_ context.Context 18499 header_ http.Header 18500} 18501 18502// List: Returns the list of all intents in the specified agent. 18503func (r *ProjectsLocationsAgentsIntentsService) List(parent string) *ProjectsLocationsAgentsIntentsListCall { 18504 c := &ProjectsLocationsAgentsIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18505 c.parent = parent 18506 return c 18507} 18508 18509// IntentView sets the optional parameter "intentView": The resource 18510// view to apply to the returned intent. 18511// 18512// Possible values: 18513// "INTENT_VIEW_UNSPECIFIED" - Not specified. Treated as 18514// INTENT_VIEW_FULL. 18515// "INTENT_VIEW_PARTIAL" - Training phrases field is not populated in 18516// the response. 18517// "INTENT_VIEW_FULL" - All fields are populated. 18518func (c *ProjectsLocationsAgentsIntentsListCall) IntentView(intentView string) *ProjectsLocationsAgentsIntentsListCall { 18519 c.urlParams_.Set("intentView", intentView) 18520 return c 18521} 18522 18523// LanguageCode sets the optional parameter "languageCode": The language 18524// to list intents for. The following fields are language dependent: * 18525// `Intent.training_phrases.parts.text` If not specified, the agent's 18526// default language is used. [Many 18527// languages](https://cloud.google.com/dialogflow/docs/reference/language 18528// ) are supported. Note: languages must be enabled in the agent before 18529// they can be used. 18530func (c *ProjectsLocationsAgentsIntentsListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsIntentsListCall { 18531 c.urlParams_.Set("languageCode", languageCode) 18532 return c 18533} 18534 18535// PageSize sets the optional parameter "pageSize": The maximum number 18536// of items to return in a single page. By default 100 and at most 1000. 18537func (c *ProjectsLocationsAgentsIntentsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsIntentsListCall { 18538 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18539 return c 18540} 18541 18542// PageToken sets the optional parameter "pageToken": The 18543// next_page_token value returned from a previous list request. 18544func (c *ProjectsLocationsAgentsIntentsListCall) PageToken(pageToken string) *ProjectsLocationsAgentsIntentsListCall { 18545 c.urlParams_.Set("pageToken", pageToken) 18546 return c 18547} 18548 18549// Fields allows partial responses to be retrieved. See 18550// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18551// for more information. 18552func (c *ProjectsLocationsAgentsIntentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsIntentsListCall { 18553 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18554 return c 18555} 18556 18557// IfNoneMatch sets the optional parameter which makes the operation 18558// fail if the object's ETag matches the given value. This is useful for 18559// getting updates only after the object has changed since the last 18560// request. Use googleapi.IsNotModified to check whether the response 18561// error from Do is the result of In-None-Match. 18562func (c *ProjectsLocationsAgentsIntentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsIntentsListCall { 18563 c.ifNoneMatch_ = entityTag 18564 return c 18565} 18566 18567// Context sets the context to be used in this call's Do method. Any 18568// pending HTTP request will be aborted if the provided context is 18569// canceled. 18570func (c *ProjectsLocationsAgentsIntentsListCall) Context(ctx context.Context) *ProjectsLocationsAgentsIntentsListCall { 18571 c.ctx_ = ctx 18572 return c 18573} 18574 18575// Header returns an http.Header that can be modified by the caller to 18576// add HTTP headers to the request. 18577func (c *ProjectsLocationsAgentsIntentsListCall) Header() http.Header { 18578 if c.header_ == nil { 18579 c.header_ = make(http.Header) 18580 } 18581 return c.header_ 18582} 18583 18584func (c *ProjectsLocationsAgentsIntentsListCall) doRequest(alt string) (*http.Response, error) { 18585 reqHeaders := make(http.Header) 18586 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18587 for k, v := range c.header_ { 18588 reqHeaders[k] = v 18589 } 18590 reqHeaders.Set("User-Agent", c.s.userAgent()) 18591 if c.ifNoneMatch_ != "" { 18592 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18593 } 18594 var body io.Reader = nil 18595 c.urlParams_.Set("alt", alt) 18596 c.urlParams_.Set("prettyPrint", "false") 18597 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/intents") 18598 urls += "?" + c.urlParams_.Encode() 18599 req, err := http.NewRequest("GET", urls, body) 18600 if err != nil { 18601 return nil, err 18602 } 18603 req.Header = reqHeaders 18604 googleapi.Expand(req.URL, map[string]string{ 18605 "parent": c.parent, 18606 }) 18607 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18608} 18609 18610// Do executes the "dialogflow.projects.locations.agents.intents.list" call. 18611// Exactly one of *GoogleCloudDialogflowCxV3beta1ListIntentsResponse or 18612// error will be non-nil. Any non-2xx status code is an error. Response 18613// headers are in either 18614// *GoogleCloudDialogflowCxV3beta1ListIntentsResponse.ServerResponse.Head 18615// er or (if a response was returned at all) in 18616// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18617// whether the returned error was because http.StatusNotModified was 18618// returned. 18619func (c *ProjectsLocationsAgentsIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListIntentsResponse, error) { 18620 gensupport.SetOptions(c.urlParams_, opts...) 18621 res, err := c.doRequest("json") 18622 if res != nil && res.StatusCode == http.StatusNotModified { 18623 if res.Body != nil { 18624 res.Body.Close() 18625 } 18626 return nil, &googleapi.Error{ 18627 Code: res.StatusCode, 18628 Header: res.Header, 18629 } 18630 } 18631 if err != nil { 18632 return nil, err 18633 } 18634 defer googleapi.CloseBody(res) 18635 if err := googleapi.CheckResponse(res); err != nil { 18636 return nil, err 18637 } 18638 ret := &GoogleCloudDialogflowCxV3beta1ListIntentsResponse{ 18639 ServerResponse: googleapi.ServerResponse{ 18640 Header: res.Header, 18641 HTTPStatusCode: res.StatusCode, 18642 }, 18643 } 18644 target := &ret 18645 if err := gensupport.DecodeResponse(target, res); err != nil { 18646 return nil, err 18647 } 18648 return ret, nil 18649 // { 18650 // "description": "Returns the list of all intents in the specified agent.", 18651 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/intents", 18652 // "httpMethod": "GET", 18653 // "id": "dialogflow.projects.locations.agents.intents.list", 18654 // "parameterOrder": [ 18655 // "parent" 18656 // ], 18657 // "parameters": { 18658 // "intentView": { 18659 // "description": "The resource view to apply to the returned intent.", 18660 // "enum": [ 18661 // "INTENT_VIEW_UNSPECIFIED", 18662 // "INTENT_VIEW_PARTIAL", 18663 // "INTENT_VIEW_FULL" 18664 // ], 18665 // "enumDescriptions": [ 18666 // "Not specified. Treated as INTENT_VIEW_FULL.", 18667 // "Training phrases field is not populated in the response.", 18668 // "All fields are populated." 18669 // ], 18670 // "location": "query", 18671 // "type": "string" 18672 // }, 18673 // "languageCode": { 18674 // "description": "The language to list intents for. The following fields are language dependent: * `Intent.training_phrases.parts.text` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 18675 // "location": "query", 18676 // "type": "string" 18677 // }, 18678 // "pageSize": { 18679 // "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", 18680 // "format": "int32", 18681 // "location": "query", 18682 // "type": "integer" 18683 // }, 18684 // "pageToken": { 18685 // "description": "The next_page_token value returned from a previous list request.", 18686 // "location": "query", 18687 // "type": "string" 18688 // }, 18689 // "parent": { 18690 // "description": "Required. The agent to list all intents for. Format: `projects//locations//agents/`.", 18691 // "location": "path", 18692 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 18693 // "required": true, 18694 // "type": "string" 18695 // } 18696 // }, 18697 // "path": "v3beta1/{+parent}/intents", 18698 // "response": { 18699 // "$ref": "GoogleCloudDialogflowCxV3beta1ListIntentsResponse" 18700 // }, 18701 // "scopes": [ 18702 // "https://www.googleapis.com/auth/cloud-platform", 18703 // "https://www.googleapis.com/auth/dialogflow" 18704 // ] 18705 // } 18706 18707} 18708 18709// Pages invokes f for each page of results. 18710// A non-nil error returned from f will halt the iteration. 18711// The provided context supersedes any context provided to the Context method. 18712func (c *ProjectsLocationsAgentsIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListIntentsResponse) error) error { 18713 c.ctx_ = ctx 18714 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18715 for { 18716 x, err := c.Do() 18717 if err != nil { 18718 return err 18719 } 18720 if err := f(x); err != nil { 18721 return err 18722 } 18723 if x.NextPageToken == "" { 18724 return nil 18725 } 18726 c.PageToken(x.NextPageToken) 18727 } 18728} 18729 18730// method id "dialogflow.projects.locations.agents.intents.patch": 18731 18732type ProjectsLocationsAgentsIntentsPatchCall struct { 18733 s *Service 18734 nameid string 18735 googleclouddialogflowcxv3beta1intent *GoogleCloudDialogflowCxV3beta1Intent 18736 urlParams_ gensupport.URLParams 18737 ctx_ context.Context 18738 header_ http.Header 18739} 18740 18741// Patch: Updates the specified intent. 18742func (r *ProjectsLocationsAgentsIntentsService) Patch(nameid string, googleclouddialogflowcxv3beta1intent *GoogleCloudDialogflowCxV3beta1Intent) *ProjectsLocationsAgentsIntentsPatchCall { 18743 c := &ProjectsLocationsAgentsIntentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18744 c.nameid = nameid 18745 c.googleclouddialogflowcxv3beta1intent = googleclouddialogflowcxv3beta1intent 18746 return c 18747} 18748 18749// LanguageCode sets the optional parameter "languageCode": The language 18750// of the following fields in `intent`: * 18751// `Intent.training_phrases.parts.text` If not specified, the agent's 18752// default language is used. [Many 18753// languages](https://cloud.google.com/dialogflow/docs/reference/language 18754// ) are supported. Note: languages must be enabled in the agent before 18755// they can be used. 18756func (c *ProjectsLocationsAgentsIntentsPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsIntentsPatchCall { 18757 c.urlParams_.Set("languageCode", languageCode) 18758 return c 18759} 18760 18761// UpdateMask sets the optional parameter "updateMask": The mask to 18762// control which fields get updated. If the mask is not present, all 18763// fields will be updated. 18764func (c *ProjectsLocationsAgentsIntentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsIntentsPatchCall { 18765 c.urlParams_.Set("updateMask", updateMask) 18766 return c 18767} 18768 18769// Fields allows partial responses to be retrieved. See 18770// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18771// for more information. 18772func (c *ProjectsLocationsAgentsIntentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsIntentsPatchCall { 18773 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18774 return c 18775} 18776 18777// Context sets the context to be used in this call's Do method. Any 18778// pending HTTP request will be aborted if the provided context is 18779// canceled. 18780func (c *ProjectsLocationsAgentsIntentsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsIntentsPatchCall { 18781 c.ctx_ = ctx 18782 return c 18783} 18784 18785// Header returns an http.Header that can be modified by the caller to 18786// add HTTP headers to the request. 18787func (c *ProjectsLocationsAgentsIntentsPatchCall) Header() http.Header { 18788 if c.header_ == nil { 18789 c.header_ = make(http.Header) 18790 } 18791 return c.header_ 18792} 18793 18794func (c *ProjectsLocationsAgentsIntentsPatchCall) doRequest(alt string) (*http.Response, error) { 18795 reqHeaders := make(http.Header) 18796 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18797 for k, v := range c.header_ { 18798 reqHeaders[k] = v 18799 } 18800 reqHeaders.Set("User-Agent", c.s.userAgent()) 18801 var body io.Reader = nil 18802 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1intent) 18803 if err != nil { 18804 return nil, err 18805 } 18806 reqHeaders.Set("Content-Type", "application/json") 18807 c.urlParams_.Set("alt", alt) 18808 c.urlParams_.Set("prettyPrint", "false") 18809 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 18810 urls += "?" + c.urlParams_.Encode() 18811 req, err := http.NewRequest("PATCH", urls, body) 18812 if err != nil { 18813 return nil, err 18814 } 18815 req.Header = reqHeaders 18816 googleapi.Expand(req.URL, map[string]string{ 18817 "name": c.nameid, 18818 }) 18819 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18820} 18821 18822// Do executes the "dialogflow.projects.locations.agents.intents.patch" call. 18823// Exactly one of *GoogleCloudDialogflowCxV3beta1Intent or error will be 18824// non-nil. Any non-2xx status code is an error. Response headers are in 18825// either *GoogleCloudDialogflowCxV3beta1Intent.ServerResponse.Header or 18826// (if a response was returned at all) in 18827// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18828// whether the returned error was because http.StatusNotModified was 18829// returned. 18830func (c *ProjectsLocationsAgentsIntentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Intent, error) { 18831 gensupport.SetOptions(c.urlParams_, opts...) 18832 res, err := c.doRequest("json") 18833 if res != nil && res.StatusCode == http.StatusNotModified { 18834 if res.Body != nil { 18835 res.Body.Close() 18836 } 18837 return nil, &googleapi.Error{ 18838 Code: res.StatusCode, 18839 Header: res.Header, 18840 } 18841 } 18842 if err != nil { 18843 return nil, err 18844 } 18845 defer googleapi.CloseBody(res) 18846 if err := googleapi.CheckResponse(res); err != nil { 18847 return nil, err 18848 } 18849 ret := &GoogleCloudDialogflowCxV3beta1Intent{ 18850 ServerResponse: googleapi.ServerResponse{ 18851 Header: res.Header, 18852 HTTPStatusCode: res.StatusCode, 18853 }, 18854 } 18855 target := &ret 18856 if err := gensupport.DecodeResponse(target, res); err != nil { 18857 return nil, err 18858 } 18859 return ret, nil 18860 // { 18861 // "description": "Updates the specified intent.", 18862 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/intents/{intentsId}", 18863 // "httpMethod": "PATCH", 18864 // "id": "dialogflow.projects.locations.agents.intents.patch", 18865 // "parameterOrder": [ 18866 // "name" 18867 // ], 18868 // "parameters": { 18869 // "languageCode": { 18870 // "description": "The language of the following fields in `intent`: * `Intent.training_phrases.parts.text` If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", 18871 // "location": "query", 18872 // "type": "string" 18873 // }, 18874 // "name": { 18875 // "description": "The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.", 18876 // "location": "path", 18877 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/intents/[^/]+$", 18878 // "required": true, 18879 // "type": "string" 18880 // }, 18881 // "updateMask": { 18882 // "description": "The mask to control which fields get updated. If the mask is not present, all fields will be updated.", 18883 // "format": "google-fieldmask", 18884 // "location": "query", 18885 // "type": "string" 18886 // } 18887 // }, 18888 // "path": "v3beta1/{+name}", 18889 // "request": { 18890 // "$ref": "GoogleCloudDialogflowCxV3beta1Intent" 18891 // }, 18892 // "response": { 18893 // "$ref": "GoogleCloudDialogflowCxV3beta1Intent" 18894 // }, 18895 // "scopes": [ 18896 // "https://www.googleapis.com/auth/cloud-platform", 18897 // "https://www.googleapis.com/auth/dialogflow" 18898 // ] 18899 // } 18900 18901} 18902 18903// method id "dialogflow.projects.locations.agents.sessions.detectIntent": 18904 18905type ProjectsLocationsAgentsSessionsDetectIntentCall struct { 18906 s *Service 18907 sessionid string 18908 googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest 18909 urlParams_ gensupport.URLParams 18910 ctx_ context.Context 18911 header_ http.Header 18912} 18913 18914// DetectIntent: Processes a natural language query and returns 18915// structured, actionable data as a result. This method is not 18916// idempotent, because it may cause session entity types to be updated, 18917// which in turn might affect results of future queries. 18918func (r *ProjectsLocationsAgentsSessionsService) DetectIntent(sessionid string, googleclouddialogflowcxv3beta1detectintentrequest *GoogleCloudDialogflowCxV3beta1DetectIntentRequest) *ProjectsLocationsAgentsSessionsDetectIntentCall { 18919 c := &ProjectsLocationsAgentsSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18920 c.sessionid = sessionid 18921 c.googleclouddialogflowcxv3beta1detectintentrequest = googleclouddialogflowcxv3beta1detectintentrequest 18922 return c 18923} 18924 18925// Fields allows partial responses to be retrieved. See 18926// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18927// for more information. 18928func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsDetectIntentCall { 18929 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18930 return c 18931} 18932 18933// Context sets the context to be used in this call's Do method. Any 18934// pending HTTP request will be aborted if the provided context is 18935// canceled. 18936func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsDetectIntentCall { 18937 c.ctx_ = ctx 18938 return c 18939} 18940 18941// Header returns an http.Header that can be modified by the caller to 18942// add HTTP headers to the request. 18943func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) Header() http.Header { 18944 if c.header_ == nil { 18945 c.header_ = make(http.Header) 18946 } 18947 return c.header_ 18948} 18949 18950func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) { 18951 reqHeaders := make(http.Header) 18952 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18953 for k, v := range c.header_ { 18954 reqHeaders[k] = v 18955 } 18956 reqHeaders.Set("User-Agent", c.s.userAgent()) 18957 var body io.Reader = nil 18958 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1detectintentrequest) 18959 if err != nil { 18960 return nil, err 18961 } 18962 reqHeaders.Set("Content-Type", "application/json") 18963 c.urlParams_.Set("alt", alt) 18964 c.urlParams_.Set("prettyPrint", "false") 18965 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:detectIntent") 18966 urls += "?" + c.urlParams_.Encode() 18967 req, err := http.NewRequest("POST", urls, body) 18968 if err != nil { 18969 return nil, err 18970 } 18971 req.Header = reqHeaders 18972 googleapi.Expand(req.URL, map[string]string{ 18973 "session": c.sessionid, 18974 }) 18975 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18976} 18977 18978// Do executes the "dialogflow.projects.locations.agents.sessions.detectIntent" call. 18979// Exactly one of *GoogleCloudDialogflowCxV3beta1DetectIntentResponse or 18980// error will be non-nil. Any non-2xx status code is an error. Response 18981// headers are in either 18982// *GoogleCloudDialogflowCxV3beta1DetectIntentResponse.ServerResponse.Hea 18983// der or (if a response was returned at all) in 18984// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18985// whether the returned error was because http.StatusNotModified was 18986// returned. 18987func (c *ProjectsLocationsAgentsSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1DetectIntentResponse, error) { 18988 gensupport.SetOptions(c.urlParams_, opts...) 18989 res, err := c.doRequest("json") 18990 if res != nil && res.StatusCode == http.StatusNotModified { 18991 if res.Body != nil { 18992 res.Body.Close() 18993 } 18994 return nil, &googleapi.Error{ 18995 Code: res.StatusCode, 18996 Header: res.Header, 18997 } 18998 } 18999 if err != nil { 19000 return nil, err 19001 } 19002 defer googleapi.CloseBody(res) 19003 if err := googleapi.CheckResponse(res); err != nil { 19004 return nil, err 19005 } 19006 ret := &GoogleCloudDialogflowCxV3beta1DetectIntentResponse{ 19007 ServerResponse: googleapi.ServerResponse{ 19008 Header: res.Header, 19009 HTTPStatusCode: res.StatusCode, 19010 }, 19011 } 19012 target := &ret 19013 if err := gensupport.DecodeResponse(target, res); err != nil { 19014 return nil, err 19015 } 19016 return ret, nil 19017 // { 19018 // "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries.", 19019 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/sessions/{sessionsId}:detectIntent", 19020 // "httpMethod": "POST", 19021 // "id": "dialogflow.projects.locations.agents.sessions.detectIntent", 19022 // "parameterOrder": [ 19023 // "session" 19024 // ], 19025 // "parameters": { 19026 // "session": { 19027 // "description": "Required. The name of the session this query is sent to. Format: `projects//locations//agents//sessions/` or `projects//locations//agents//environments//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length of the `Session ID` must not exceed 36 characters. For more information, see the [sessions guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).", 19028 // "location": "path", 19029 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/sessions/[^/]+$", 19030 // "required": true, 19031 // "type": "string" 19032 // } 19033 // }, 19034 // "path": "v3beta1/{+session}:detectIntent", 19035 // "request": { 19036 // "$ref": "GoogleCloudDialogflowCxV3beta1DetectIntentRequest" 19037 // }, 19038 // "response": { 19039 // "$ref": "GoogleCloudDialogflowCxV3beta1DetectIntentResponse" 19040 // }, 19041 // "scopes": [ 19042 // "https://www.googleapis.com/auth/cloud-platform", 19043 // "https://www.googleapis.com/auth/dialogflow" 19044 // ] 19045 // } 19046 19047} 19048 19049// method id "dialogflow.projects.locations.agents.sessions.fulfillIntent": 19050 19051type ProjectsLocationsAgentsSessionsFulfillIntentCall struct { 19052 s *Service 19053 sessionid string 19054 googleclouddialogflowcxv3beta1fulfillintentrequest *GoogleCloudDialogflowCxV3beta1FulfillIntentRequest 19055 urlParams_ gensupport.URLParams 19056 ctx_ context.Context 19057 header_ http.Header 19058} 19059 19060// FulfillIntent: Fulfills a matched intent returned by MatchIntent. 19061// Must be called after MatchIntent, with input from 19062// MatchIntentResponse. Otherwise, the behavior is undefined. 19063func (r *ProjectsLocationsAgentsSessionsService) FulfillIntent(sessionid string, googleclouddialogflowcxv3beta1fulfillintentrequest *GoogleCloudDialogflowCxV3beta1FulfillIntentRequest) *ProjectsLocationsAgentsSessionsFulfillIntentCall { 19064 c := &ProjectsLocationsAgentsSessionsFulfillIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19065 c.sessionid = sessionid 19066 c.googleclouddialogflowcxv3beta1fulfillintentrequest = googleclouddialogflowcxv3beta1fulfillintentrequest 19067 return c 19068} 19069 19070// Fields allows partial responses to be retrieved. See 19071// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19072// for more information. 19073func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsFulfillIntentCall { 19074 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19075 return c 19076} 19077 19078// Context sets the context to be used in this call's Do method. Any 19079// pending HTTP request will be aborted if the provided context is 19080// canceled. 19081func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsFulfillIntentCall { 19082 c.ctx_ = ctx 19083 return c 19084} 19085 19086// Header returns an http.Header that can be modified by the caller to 19087// add HTTP headers to the request. 19088func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) Header() http.Header { 19089 if c.header_ == nil { 19090 c.header_ = make(http.Header) 19091 } 19092 return c.header_ 19093} 19094 19095func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) doRequest(alt string) (*http.Response, error) { 19096 reqHeaders := make(http.Header) 19097 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19098 for k, v := range c.header_ { 19099 reqHeaders[k] = v 19100 } 19101 reqHeaders.Set("User-Agent", c.s.userAgent()) 19102 var body io.Reader = nil 19103 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1fulfillintentrequest) 19104 if err != nil { 19105 return nil, err 19106 } 19107 reqHeaders.Set("Content-Type", "application/json") 19108 c.urlParams_.Set("alt", alt) 19109 c.urlParams_.Set("prettyPrint", "false") 19110 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:fulfillIntent") 19111 urls += "?" + c.urlParams_.Encode() 19112 req, err := http.NewRequest("POST", urls, body) 19113 if err != nil { 19114 return nil, err 19115 } 19116 req.Header = reqHeaders 19117 googleapi.Expand(req.URL, map[string]string{ 19118 "session": c.sessionid, 19119 }) 19120 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19121} 19122 19123// Do executes the "dialogflow.projects.locations.agents.sessions.fulfillIntent" call. 19124// Exactly one of *GoogleCloudDialogflowCxV3beta1FulfillIntentResponse 19125// or error will be non-nil. Any non-2xx status code is an error. 19126// Response headers are in either 19127// *GoogleCloudDialogflowCxV3beta1FulfillIntentResponse.ServerResponse.He 19128// ader or (if a response was returned at all) in 19129// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19130// whether the returned error was because http.StatusNotModified was 19131// returned. 19132func (c *ProjectsLocationsAgentsSessionsFulfillIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1FulfillIntentResponse, error) { 19133 gensupport.SetOptions(c.urlParams_, opts...) 19134 res, err := c.doRequest("json") 19135 if res != nil && res.StatusCode == http.StatusNotModified { 19136 if res.Body != nil { 19137 res.Body.Close() 19138 } 19139 return nil, &googleapi.Error{ 19140 Code: res.StatusCode, 19141 Header: res.Header, 19142 } 19143 } 19144 if err != nil { 19145 return nil, err 19146 } 19147 defer googleapi.CloseBody(res) 19148 if err := googleapi.CheckResponse(res); err != nil { 19149 return nil, err 19150 } 19151 ret := &GoogleCloudDialogflowCxV3beta1FulfillIntentResponse{ 19152 ServerResponse: googleapi.ServerResponse{ 19153 Header: res.Header, 19154 HTTPStatusCode: res.StatusCode, 19155 }, 19156 } 19157 target := &ret 19158 if err := gensupport.DecodeResponse(target, res); err != nil { 19159 return nil, err 19160 } 19161 return ret, nil 19162 // { 19163 // "description": "Fulfills a matched intent returned by MatchIntent. Must be called after MatchIntent, with input from MatchIntentResponse. Otherwise, the behavior is undefined.", 19164 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/sessions/{sessionsId}:fulfillIntent", 19165 // "httpMethod": "POST", 19166 // "id": "dialogflow.projects.locations.agents.sessions.fulfillIntent", 19167 // "parameterOrder": [ 19168 // "session" 19169 // ], 19170 // "parameters": { 19171 // "session": { 19172 // "description": "Required. The name of the session this query is sent to. Format: `projects//locations//agents//sessions/` or `projects//locations//agents//environments//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length of the `Session ID` must not exceed 36 characters. For more information, see the [sessions guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).", 19173 // "location": "path", 19174 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/sessions/[^/]+$", 19175 // "required": true, 19176 // "type": "string" 19177 // } 19178 // }, 19179 // "path": "v3beta1/{+session}:fulfillIntent", 19180 // "request": { 19181 // "$ref": "GoogleCloudDialogflowCxV3beta1FulfillIntentRequest" 19182 // }, 19183 // "response": { 19184 // "$ref": "GoogleCloudDialogflowCxV3beta1FulfillIntentResponse" 19185 // }, 19186 // "scopes": [ 19187 // "https://www.googleapis.com/auth/cloud-platform", 19188 // "https://www.googleapis.com/auth/dialogflow" 19189 // ] 19190 // } 19191 19192} 19193 19194// method id "dialogflow.projects.locations.agents.sessions.matchIntent": 19195 19196type ProjectsLocationsAgentsSessionsMatchIntentCall struct { 19197 s *Service 19198 sessionid string 19199 googleclouddialogflowcxv3beta1matchintentrequest *GoogleCloudDialogflowCxV3beta1MatchIntentRequest 19200 urlParams_ gensupport.URLParams 19201 ctx_ context.Context 19202 header_ http.Header 19203} 19204 19205// MatchIntent: Returns preliminary intent match results, doesn't change 19206// the session status. 19207func (r *ProjectsLocationsAgentsSessionsService) MatchIntent(sessionid string, googleclouddialogflowcxv3beta1matchintentrequest *GoogleCloudDialogflowCxV3beta1MatchIntentRequest) *ProjectsLocationsAgentsSessionsMatchIntentCall { 19208 c := &ProjectsLocationsAgentsSessionsMatchIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19209 c.sessionid = sessionid 19210 c.googleclouddialogflowcxv3beta1matchintentrequest = googleclouddialogflowcxv3beta1matchintentrequest 19211 return c 19212} 19213 19214// Fields allows partial responses to be retrieved. See 19215// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19216// for more information. 19217func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsMatchIntentCall { 19218 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19219 return c 19220} 19221 19222// Context sets the context to be used in this call's Do method. Any 19223// pending HTTP request will be aborted if the provided context is 19224// canceled. 19225func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsMatchIntentCall { 19226 c.ctx_ = ctx 19227 return c 19228} 19229 19230// Header returns an http.Header that can be modified by the caller to 19231// add HTTP headers to the request. 19232func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) Header() http.Header { 19233 if c.header_ == nil { 19234 c.header_ = make(http.Header) 19235 } 19236 return c.header_ 19237} 19238 19239func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) doRequest(alt string) (*http.Response, error) { 19240 reqHeaders := make(http.Header) 19241 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19242 for k, v := range c.header_ { 19243 reqHeaders[k] = v 19244 } 19245 reqHeaders.Set("User-Agent", c.s.userAgent()) 19246 var body io.Reader = nil 19247 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1matchintentrequest) 19248 if err != nil { 19249 return nil, err 19250 } 19251 reqHeaders.Set("Content-Type", "application/json") 19252 c.urlParams_.Set("alt", alt) 19253 c.urlParams_.Set("prettyPrint", "false") 19254 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+session}:matchIntent") 19255 urls += "?" + c.urlParams_.Encode() 19256 req, err := http.NewRequest("POST", urls, body) 19257 if err != nil { 19258 return nil, err 19259 } 19260 req.Header = reqHeaders 19261 googleapi.Expand(req.URL, map[string]string{ 19262 "session": c.sessionid, 19263 }) 19264 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19265} 19266 19267// Do executes the "dialogflow.projects.locations.agents.sessions.matchIntent" call. 19268// Exactly one of *GoogleCloudDialogflowCxV3beta1MatchIntentResponse or 19269// error will be non-nil. Any non-2xx status code is an error. Response 19270// headers are in either 19271// *GoogleCloudDialogflowCxV3beta1MatchIntentResponse.ServerResponse.Head 19272// er or (if a response was returned at all) in 19273// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19274// whether the returned error was because http.StatusNotModified was 19275// returned. 19276func (c *ProjectsLocationsAgentsSessionsMatchIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1MatchIntentResponse, error) { 19277 gensupport.SetOptions(c.urlParams_, opts...) 19278 res, err := c.doRequest("json") 19279 if res != nil && res.StatusCode == http.StatusNotModified { 19280 if res.Body != nil { 19281 res.Body.Close() 19282 } 19283 return nil, &googleapi.Error{ 19284 Code: res.StatusCode, 19285 Header: res.Header, 19286 } 19287 } 19288 if err != nil { 19289 return nil, err 19290 } 19291 defer googleapi.CloseBody(res) 19292 if err := googleapi.CheckResponse(res); err != nil { 19293 return nil, err 19294 } 19295 ret := &GoogleCloudDialogflowCxV3beta1MatchIntentResponse{ 19296 ServerResponse: googleapi.ServerResponse{ 19297 Header: res.Header, 19298 HTTPStatusCode: res.StatusCode, 19299 }, 19300 } 19301 target := &ret 19302 if err := gensupport.DecodeResponse(target, res); err != nil { 19303 return nil, err 19304 } 19305 return ret, nil 19306 // { 19307 // "description": "Returns preliminary intent match results, doesn't change the session status.", 19308 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/sessions/{sessionsId}:matchIntent", 19309 // "httpMethod": "POST", 19310 // "id": "dialogflow.projects.locations.agents.sessions.matchIntent", 19311 // "parameterOrder": [ 19312 // "session" 19313 // ], 19314 // "parameters": { 19315 // "session": { 19316 // "description": "Required. The name of the session this query is sent to. Format: `projects//locations//agents//sessions/` or `projects//locations//agents//environments//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length of the `Session ID` must not exceed 36 characters. For more information, see the [sessions guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).", 19317 // "location": "path", 19318 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/sessions/[^/]+$", 19319 // "required": true, 19320 // "type": "string" 19321 // } 19322 // }, 19323 // "path": "v3beta1/{+session}:matchIntent", 19324 // "request": { 19325 // "$ref": "GoogleCloudDialogflowCxV3beta1MatchIntentRequest" 19326 // }, 19327 // "response": { 19328 // "$ref": "GoogleCloudDialogflowCxV3beta1MatchIntentResponse" 19329 // }, 19330 // "scopes": [ 19331 // "https://www.googleapis.com/auth/cloud-platform", 19332 // "https://www.googleapis.com/auth/dialogflow" 19333 // ] 19334 // } 19335 19336} 19337 19338// method id "dialogflow.projects.locations.agents.sessions.entityTypes.create": 19339 19340type ProjectsLocationsAgentsSessionsEntityTypesCreateCall struct { 19341 s *Service 19342 parent string 19343 googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType 19344 urlParams_ gensupport.URLParams 19345 ctx_ context.Context 19346 header_ http.Header 19347} 19348 19349// Create: Creates a session entity type. If the specified session 19350// entity type already exists, overrides the session entity type. 19351func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Create(parent string, googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType) *ProjectsLocationsAgentsSessionsEntityTypesCreateCall { 19352 c := &ProjectsLocationsAgentsSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19353 c.parent = parent 19354 c.googleclouddialogflowcxv3beta1sessionentitytype = googleclouddialogflowcxv3beta1sessionentitytype 19355 return c 19356} 19357 19358// Fields allows partial responses to be retrieved. See 19359// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19360// for more information. 19361func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesCreateCall { 19362 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19363 return c 19364} 19365 19366// Context sets the context to be used in this call's Do method. Any 19367// pending HTTP request will be aborted if the provided context is 19368// canceled. 19369func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesCreateCall { 19370 c.ctx_ = ctx 19371 return c 19372} 19373 19374// Header returns an http.Header that can be modified by the caller to 19375// add HTTP headers to the request. 19376func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Header() http.Header { 19377 if c.header_ == nil { 19378 c.header_ = make(http.Header) 19379 } 19380 return c.header_ 19381} 19382 19383func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { 19384 reqHeaders := make(http.Header) 19385 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19386 for k, v := range c.header_ { 19387 reqHeaders[k] = v 19388 } 19389 reqHeaders.Set("User-Agent", c.s.userAgent()) 19390 var body io.Reader = nil 19391 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1sessionentitytype) 19392 if err != nil { 19393 return nil, err 19394 } 19395 reqHeaders.Set("Content-Type", "application/json") 19396 c.urlParams_.Set("alt", alt) 19397 c.urlParams_.Set("prettyPrint", "false") 19398 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/entityTypes") 19399 urls += "?" + c.urlParams_.Encode() 19400 req, err := http.NewRequest("POST", urls, body) 19401 if err != nil { 19402 return nil, err 19403 } 19404 req.Header = reqHeaders 19405 googleapi.Expand(req.URL, map[string]string{ 19406 "parent": c.parent, 19407 }) 19408 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19409} 19410 19411// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.create" call. 19412// Exactly one of *GoogleCloudDialogflowCxV3beta1SessionEntityType or 19413// error will be non-nil. Any non-2xx status code is an error. Response 19414// headers are in either 19415// *GoogleCloudDialogflowCxV3beta1SessionEntityType.ServerResponse.Header 19416// or (if a response was returned at all) in 19417// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19418// whether the returned error was because http.StatusNotModified was 19419// returned. 19420func (c *ProjectsLocationsAgentsSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, error) { 19421 gensupport.SetOptions(c.urlParams_, opts...) 19422 res, err := c.doRequest("json") 19423 if res != nil && res.StatusCode == http.StatusNotModified { 19424 if res.Body != nil { 19425 res.Body.Close() 19426 } 19427 return nil, &googleapi.Error{ 19428 Code: res.StatusCode, 19429 Header: res.Header, 19430 } 19431 } 19432 if err != nil { 19433 return nil, err 19434 } 19435 defer googleapi.CloseBody(res) 19436 if err := googleapi.CheckResponse(res); err != nil { 19437 return nil, err 19438 } 19439 ret := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ 19440 ServerResponse: googleapi.ServerResponse{ 19441 Header: res.Header, 19442 HTTPStatusCode: res.StatusCode, 19443 }, 19444 } 19445 target := &ret 19446 if err := gensupport.DecodeResponse(target, res); err != nil { 19447 return nil, err 19448 } 19449 return ret, nil 19450 // { 19451 // "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type.", 19452 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/sessions/{sessionsId}/entityTypes", 19453 // "httpMethod": "POST", 19454 // "id": "dialogflow.projects.locations.agents.sessions.entityTypes.create", 19455 // "parameterOrder": [ 19456 // "parent" 19457 // ], 19458 // "parameters": { 19459 // "parent": { 19460 // "description": "Required. The session to create a session entity type for. Format: `projects//locations//agents//sessions/` or `projects//locations//agents//environments//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment.", 19461 // "location": "path", 19462 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/sessions/[^/]+$", 19463 // "required": true, 19464 // "type": "string" 19465 // } 19466 // }, 19467 // "path": "v3beta1/{+parent}/entityTypes", 19468 // "request": { 19469 // "$ref": "GoogleCloudDialogflowCxV3beta1SessionEntityType" 19470 // }, 19471 // "response": { 19472 // "$ref": "GoogleCloudDialogflowCxV3beta1SessionEntityType" 19473 // }, 19474 // "scopes": [ 19475 // "https://www.googleapis.com/auth/cloud-platform", 19476 // "https://www.googleapis.com/auth/dialogflow" 19477 // ] 19478 // } 19479 19480} 19481 19482// method id "dialogflow.projects.locations.agents.sessions.entityTypes.delete": 19483 19484type ProjectsLocationsAgentsSessionsEntityTypesDeleteCall struct { 19485 s *Service 19486 name string 19487 urlParams_ gensupport.URLParams 19488 ctx_ context.Context 19489 header_ http.Header 19490} 19491 19492// Delete: Deletes the specified session entity type. 19493func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Delete(name string) *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall { 19494 c := &ProjectsLocationsAgentsSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19495 c.name = name 19496 return c 19497} 19498 19499// Fields allows partial responses to be retrieved. See 19500// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19501// for more information. 19502func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall { 19503 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19504 return c 19505} 19506 19507// Context sets the context to be used in this call's Do method. Any 19508// pending HTTP request will be aborted if the provided context is 19509// canceled. 19510func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall { 19511 c.ctx_ = ctx 19512 return c 19513} 19514 19515// Header returns an http.Header that can be modified by the caller to 19516// add HTTP headers to the request. 19517func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Header() http.Header { 19518 if c.header_ == nil { 19519 c.header_ = make(http.Header) 19520 } 19521 return c.header_ 19522} 19523 19524func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 19525 reqHeaders := make(http.Header) 19526 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19527 for k, v := range c.header_ { 19528 reqHeaders[k] = v 19529 } 19530 reqHeaders.Set("User-Agent", c.s.userAgent()) 19531 var body io.Reader = nil 19532 c.urlParams_.Set("alt", alt) 19533 c.urlParams_.Set("prettyPrint", "false") 19534 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 19535 urls += "?" + c.urlParams_.Encode() 19536 req, err := http.NewRequest("DELETE", urls, body) 19537 if err != nil { 19538 return nil, err 19539 } 19540 req.Header = reqHeaders 19541 googleapi.Expand(req.URL, map[string]string{ 19542 "name": c.name, 19543 }) 19544 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19545} 19546 19547// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.delete" call. 19548// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 19549// non-2xx status code is an error. Response headers are in either 19550// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 19551// returned at all) in error.(*googleapi.Error).Header. Use 19552// googleapi.IsNotModified to check whether the returned error was 19553// because http.StatusNotModified was returned. 19554func (c *ProjectsLocationsAgentsSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 19555 gensupport.SetOptions(c.urlParams_, opts...) 19556 res, err := c.doRequest("json") 19557 if res != nil && res.StatusCode == http.StatusNotModified { 19558 if res.Body != nil { 19559 res.Body.Close() 19560 } 19561 return nil, &googleapi.Error{ 19562 Code: res.StatusCode, 19563 Header: res.Header, 19564 } 19565 } 19566 if err != nil { 19567 return nil, err 19568 } 19569 defer googleapi.CloseBody(res) 19570 if err := googleapi.CheckResponse(res); err != nil { 19571 return nil, err 19572 } 19573 ret := &GoogleProtobufEmpty{ 19574 ServerResponse: googleapi.ServerResponse{ 19575 Header: res.Header, 19576 HTTPStatusCode: res.StatusCode, 19577 }, 19578 } 19579 target := &ret 19580 if err := gensupport.DecodeResponse(target, res); err != nil { 19581 return nil, err 19582 } 19583 return ret, nil 19584 // { 19585 // "description": "Deletes the specified session entity type.", 19586 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", 19587 // "httpMethod": "DELETE", 19588 // "id": "dialogflow.projects.locations.agents.sessions.entityTypes.delete", 19589 // "parameterOrder": [ 19590 // "name" 19591 // ], 19592 // "parameters": { 19593 // "name": { 19594 // "description": "Required. The name of the session entity type to delete. Format: `projects//locations//agents//sessions//entityTypes/` or `projects//locations//agents//environments//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment.", 19595 // "location": "path", 19596 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", 19597 // "required": true, 19598 // "type": "string" 19599 // } 19600 // }, 19601 // "path": "v3beta1/{+name}", 19602 // "response": { 19603 // "$ref": "GoogleProtobufEmpty" 19604 // }, 19605 // "scopes": [ 19606 // "https://www.googleapis.com/auth/cloud-platform", 19607 // "https://www.googleapis.com/auth/dialogflow" 19608 // ] 19609 // } 19610 19611} 19612 19613// method id "dialogflow.projects.locations.agents.sessions.entityTypes.get": 19614 19615type ProjectsLocationsAgentsSessionsEntityTypesGetCall struct { 19616 s *Service 19617 name string 19618 urlParams_ gensupport.URLParams 19619 ifNoneMatch_ string 19620 ctx_ context.Context 19621 header_ http.Header 19622} 19623 19624// Get: Retrieves the specified session entity type. 19625func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Get(name string) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { 19626 c := &ProjectsLocationsAgentsSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19627 c.name = name 19628 return c 19629} 19630 19631// Fields allows partial responses to be retrieved. See 19632// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19633// for more information. 19634func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { 19635 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19636 return c 19637} 19638 19639// IfNoneMatch sets the optional parameter which makes the operation 19640// fail if the object's ETag matches the given value. This is useful for 19641// getting updates only after the object has changed since the last 19642// request. Use googleapi.IsNotModified to check whether the response 19643// error from Do is the result of In-None-Match. 19644func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { 19645 c.ifNoneMatch_ = entityTag 19646 return c 19647} 19648 19649// Context sets the context to be used in this call's Do method. Any 19650// pending HTTP request will be aborted if the provided context is 19651// canceled. 19652func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesGetCall { 19653 c.ctx_ = ctx 19654 return c 19655} 19656 19657// Header returns an http.Header that can be modified by the caller to 19658// add HTTP headers to the request. 19659func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Header() http.Header { 19660 if c.header_ == nil { 19661 c.header_ = make(http.Header) 19662 } 19663 return c.header_ 19664} 19665 19666func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { 19667 reqHeaders := make(http.Header) 19668 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19669 for k, v := range c.header_ { 19670 reqHeaders[k] = v 19671 } 19672 reqHeaders.Set("User-Agent", c.s.userAgent()) 19673 if c.ifNoneMatch_ != "" { 19674 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19675 } 19676 var body io.Reader = nil 19677 c.urlParams_.Set("alt", alt) 19678 c.urlParams_.Set("prettyPrint", "false") 19679 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 19680 urls += "?" + c.urlParams_.Encode() 19681 req, err := http.NewRequest("GET", urls, body) 19682 if err != nil { 19683 return nil, err 19684 } 19685 req.Header = reqHeaders 19686 googleapi.Expand(req.URL, map[string]string{ 19687 "name": c.name, 19688 }) 19689 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19690} 19691 19692// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.get" call. 19693// Exactly one of *GoogleCloudDialogflowCxV3beta1SessionEntityType or 19694// error will be non-nil. Any non-2xx status code is an error. Response 19695// headers are in either 19696// *GoogleCloudDialogflowCxV3beta1SessionEntityType.ServerResponse.Header 19697// or (if a response was returned at all) in 19698// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19699// whether the returned error was because http.StatusNotModified was 19700// returned. 19701func (c *ProjectsLocationsAgentsSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, error) { 19702 gensupport.SetOptions(c.urlParams_, opts...) 19703 res, err := c.doRequest("json") 19704 if res != nil && res.StatusCode == http.StatusNotModified { 19705 if res.Body != nil { 19706 res.Body.Close() 19707 } 19708 return nil, &googleapi.Error{ 19709 Code: res.StatusCode, 19710 Header: res.Header, 19711 } 19712 } 19713 if err != nil { 19714 return nil, err 19715 } 19716 defer googleapi.CloseBody(res) 19717 if err := googleapi.CheckResponse(res); err != nil { 19718 return nil, err 19719 } 19720 ret := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ 19721 ServerResponse: googleapi.ServerResponse{ 19722 Header: res.Header, 19723 HTTPStatusCode: res.StatusCode, 19724 }, 19725 } 19726 target := &ret 19727 if err := gensupport.DecodeResponse(target, res); err != nil { 19728 return nil, err 19729 } 19730 return ret, nil 19731 // { 19732 // "description": "Retrieves the specified session entity type.", 19733 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", 19734 // "httpMethod": "GET", 19735 // "id": "dialogflow.projects.locations.agents.sessions.entityTypes.get", 19736 // "parameterOrder": [ 19737 // "name" 19738 // ], 19739 // "parameters": { 19740 // "name": { 19741 // "description": "Required. The name of the session entity type. Format: `projects//locations//agents//sessions//entityTypes/` or `projects//locations//agents//environments//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment.", 19742 // "location": "path", 19743 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", 19744 // "required": true, 19745 // "type": "string" 19746 // } 19747 // }, 19748 // "path": "v3beta1/{+name}", 19749 // "response": { 19750 // "$ref": "GoogleCloudDialogflowCxV3beta1SessionEntityType" 19751 // }, 19752 // "scopes": [ 19753 // "https://www.googleapis.com/auth/cloud-platform", 19754 // "https://www.googleapis.com/auth/dialogflow" 19755 // ] 19756 // } 19757 19758} 19759 19760// method id "dialogflow.projects.locations.agents.sessions.entityTypes.list": 19761 19762type ProjectsLocationsAgentsSessionsEntityTypesListCall struct { 19763 s *Service 19764 parent string 19765 urlParams_ gensupport.URLParams 19766 ifNoneMatch_ string 19767 ctx_ context.Context 19768 header_ http.Header 19769} 19770 19771// List: Returns the list of all session entity types in the specified 19772// session. 19773func (r *ProjectsLocationsAgentsSessionsEntityTypesService) List(parent string) *ProjectsLocationsAgentsSessionsEntityTypesListCall { 19774 c := &ProjectsLocationsAgentsSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19775 c.parent = parent 19776 return c 19777} 19778 19779// PageSize sets the optional parameter "pageSize": The maximum number 19780// of items to return in a single page. By default 100 and at most 1000. 19781func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsSessionsEntityTypesListCall { 19782 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 19783 return c 19784} 19785 19786// PageToken sets the optional parameter "pageToken": The 19787// next_page_token value returned from a previous list request. 19788func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentsSessionsEntityTypesListCall { 19789 c.urlParams_.Set("pageToken", pageToken) 19790 return c 19791} 19792 19793// Fields allows partial responses to be retrieved. See 19794// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19795// for more information. 19796func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesListCall { 19797 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19798 return c 19799} 19800 19801// IfNoneMatch sets the optional parameter which makes the operation 19802// fail if the object's ETag matches the given value. This is useful for 19803// getting updates only after the object has changed since the last 19804// request. Use googleapi.IsNotModified to check whether the response 19805// error from Do is the result of In-None-Match. 19806func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsSessionsEntityTypesListCall { 19807 c.ifNoneMatch_ = entityTag 19808 return c 19809} 19810 19811// Context sets the context to be used in this call's Do method. Any 19812// pending HTTP request will be aborted if the provided context is 19813// canceled. 19814func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesListCall { 19815 c.ctx_ = ctx 19816 return c 19817} 19818 19819// Header returns an http.Header that can be modified by the caller to 19820// add HTTP headers to the request. 19821func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Header() http.Header { 19822 if c.header_ == nil { 19823 c.header_ = make(http.Header) 19824 } 19825 return c.header_ 19826} 19827 19828func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) { 19829 reqHeaders := make(http.Header) 19830 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19831 for k, v := range c.header_ { 19832 reqHeaders[k] = v 19833 } 19834 reqHeaders.Set("User-Agent", c.s.userAgent()) 19835 if c.ifNoneMatch_ != "" { 19836 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19837 } 19838 var body io.Reader = nil 19839 c.urlParams_.Set("alt", alt) 19840 c.urlParams_.Set("prettyPrint", "false") 19841 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/entityTypes") 19842 urls += "?" + c.urlParams_.Encode() 19843 req, err := http.NewRequest("GET", urls, body) 19844 if err != nil { 19845 return nil, err 19846 } 19847 req.Header = reqHeaders 19848 googleapi.Expand(req.URL, map[string]string{ 19849 "parent": c.parent, 19850 }) 19851 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19852} 19853 19854// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.list" call. 19855// Exactly one of 19856// *GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse or 19857// error will be non-nil. Any non-2xx status code is an error. Response 19858// headers are in either 19859// *GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse.ServerRe 19860// sponse.Header or (if a response was returned at all) in 19861// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19862// whether the returned error was because http.StatusNotModified was 19863// returned. 19864func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse, error) { 19865 gensupport.SetOptions(c.urlParams_, opts...) 19866 res, err := c.doRequest("json") 19867 if res != nil && res.StatusCode == http.StatusNotModified { 19868 if res.Body != nil { 19869 res.Body.Close() 19870 } 19871 return nil, &googleapi.Error{ 19872 Code: res.StatusCode, 19873 Header: res.Header, 19874 } 19875 } 19876 if err != nil { 19877 return nil, err 19878 } 19879 defer googleapi.CloseBody(res) 19880 if err := googleapi.CheckResponse(res); err != nil { 19881 return nil, err 19882 } 19883 ret := &GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse{ 19884 ServerResponse: googleapi.ServerResponse{ 19885 Header: res.Header, 19886 HTTPStatusCode: res.StatusCode, 19887 }, 19888 } 19889 target := &ret 19890 if err := gensupport.DecodeResponse(target, res); err != nil { 19891 return nil, err 19892 } 19893 return ret, nil 19894 // { 19895 // "description": "Returns the list of all session entity types in the specified session.", 19896 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/sessions/{sessionsId}/entityTypes", 19897 // "httpMethod": "GET", 19898 // "id": "dialogflow.projects.locations.agents.sessions.entityTypes.list", 19899 // "parameterOrder": [ 19900 // "parent" 19901 // ], 19902 // "parameters": { 19903 // "pageSize": { 19904 // "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", 19905 // "format": "int32", 19906 // "location": "query", 19907 // "type": "integer" 19908 // }, 19909 // "pageToken": { 19910 // "description": "The next_page_token value returned from a previous list request.", 19911 // "location": "query", 19912 // "type": "string" 19913 // }, 19914 // "parent": { 19915 // "description": "Required. The session to list all session entity types from. Format: `projects//locations//agents//sessions/` or `projects//locations//agents//environments//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment.", 19916 // "location": "path", 19917 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/sessions/[^/]+$", 19918 // "required": true, 19919 // "type": "string" 19920 // } 19921 // }, 19922 // "path": "v3beta1/{+parent}/entityTypes", 19923 // "response": { 19924 // "$ref": "GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse" 19925 // }, 19926 // "scopes": [ 19927 // "https://www.googleapis.com/auth/cloud-platform", 19928 // "https://www.googleapis.com/auth/dialogflow" 19929 // ] 19930 // } 19931 19932} 19933 19934// Pages invokes f for each page of results. 19935// A non-nil error returned from f will halt the iteration. 19936// The provided context supersedes any context provided to the Context method. 19937func (c *ProjectsLocationsAgentsSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListSessionEntityTypesResponse) error) error { 19938 c.ctx_ = ctx 19939 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19940 for { 19941 x, err := c.Do() 19942 if err != nil { 19943 return err 19944 } 19945 if err := f(x); err != nil { 19946 return err 19947 } 19948 if x.NextPageToken == "" { 19949 return nil 19950 } 19951 c.PageToken(x.NextPageToken) 19952 } 19953} 19954 19955// method id "dialogflow.projects.locations.agents.sessions.entityTypes.patch": 19956 19957type ProjectsLocationsAgentsSessionsEntityTypesPatchCall struct { 19958 s *Service 19959 nameid string 19960 googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType 19961 urlParams_ gensupport.URLParams 19962 ctx_ context.Context 19963 header_ http.Header 19964} 19965 19966// Patch: Updates the specified session entity type. 19967func (r *ProjectsLocationsAgentsSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowcxv3beta1sessionentitytype *GoogleCloudDialogflowCxV3beta1SessionEntityType) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { 19968 c := &ProjectsLocationsAgentsSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19969 c.nameid = nameid 19970 c.googleclouddialogflowcxv3beta1sessionentitytype = googleclouddialogflowcxv3beta1sessionentitytype 19971 return c 19972} 19973 19974// UpdateMask sets the optional parameter "updateMask": The mask to 19975// control which fields get updated. 19976func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { 19977 c.urlParams_.Set("updateMask", updateMask) 19978 return c 19979} 19980 19981// Fields allows partial responses to be retrieved. See 19982// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19983// for more information. 19984func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { 19985 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19986 return c 19987} 19988 19989// Context sets the context to be used in this call's Do method. Any 19990// pending HTTP request will be aborted if the provided context is 19991// canceled. 19992func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsSessionsEntityTypesPatchCall { 19993 c.ctx_ = ctx 19994 return c 19995} 19996 19997// Header returns an http.Header that can be modified by the caller to 19998// add HTTP headers to the request. 19999func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Header() http.Header { 20000 if c.header_ == nil { 20001 c.header_ = make(http.Header) 20002 } 20003 return c.header_ 20004} 20005 20006func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { 20007 reqHeaders := make(http.Header) 20008 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20009 for k, v := range c.header_ { 20010 reqHeaders[k] = v 20011 } 20012 reqHeaders.Set("User-Agent", c.s.userAgent()) 20013 var body io.Reader = nil 20014 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1sessionentitytype) 20015 if err != nil { 20016 return nil, err 20017 } 20018 reqHeaders.Set("Content-Type", "application/json") 20019 c.urlParams_.Set("alt", alt) 20020 c.urlParams_.Set("prettyPrint", "false") 20021 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 20022 urls += "?" + c.urlParams_.Encode() 20023 req, err := http.NewRequest("PATCH", urls, body) 20024 if err != nil { 20025 return nil, err 20026 } 20027 req.Header = reqHeaders 20028 googleapi.Expand(req.URL, map[string]string{ 20029 "name": c.nameid, 20030 }) 20031 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20032} 20033 20034// Do executes the "dialogflow.projects.locations.agents.sessions.entityTypes.patch" call. 20035// Exactly one of *GoogleCloudDialogflowCxV3beta1SessionEntityType or 20036// error will be non-nil. Any non-2xx status code is an error. Response 20037// headers are in either 20038// *GoogleCloudDialogflowCxV3beta1SessionEntityType.ServerResponse.Header 20039// or (if a response was returned at all) in 20040// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20041// whether the returned error was because http.StatusNotModified was 20042// returned. 20043func (c *ProjectsLocationsAgentsSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1SessionEntityType, error) { 20044 gensupport.SetOptions(c.urlParams_, opts...) 20045 res, err := c.doRequest("json") 20046 if res != nil && res.StatusCode == http.StatusNotModified { 20047 if res.Body != nil { 20048 res.Body.Close() 20049 } 20050 return nil, &googleapi.Error{ 20051 Code: res.StatusCode, 20052 Header: res.Header, 20053 } 20054 } 20055 if err != nil { 20056 return nil, err 20057 } 20058 defer googleapi.CloseBody(res) 20059 if err := googleapi.CheckResponse(res); err != nil { 20060 return nil, err 20061 } 20062 ret := &GoogleCloudDialogflowCxV3beta1SessionEntityType{ 20063 ServerResponse: googleapi.ServerResponse{ 20064 Header: res.Header, 20065 HTTPStatusCode: res.StatusCode, 20066 }, 20067 } 20068 target := &ret 20069 if err := gensupport.DecodeResponse(target, res); err != nil { 20070 return nil, err 20071 } 20072 return ret, nil 20073 // { 20074 // "description": "Updates the specified session entity type.", 20075 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", 20076 // "httpMethod": "PATCH", 20077 // "id": "dialogflow.projects.locations.agents.sessions.entityTypes.patch", 20078 // "parameterOrder": [ 20079 // "name" 20080 // ], 20081 // "parameters": { 20082 // "name": { 20083 // "description": "Required. The unique identifier of the session entity type. Format: `projects//locations//agents//sessions//entityTypes/` or `projects//locations//agents//environments//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment.", 20084 // "location": "path", 20085 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", 20086 // "required": true, 20087 // "type": "string" 20088 // }, 20089 // "updateMask": { 20090 // "description": "The mask to control which fields get updated.", 20091 // "format": "google-fieldmask", 20092 // "location": "query", 20093 // "type": "string" 20094 // } 20095 // }, 20096 // "path": "v3beta1/{+name}", 20097 // "request": { 20098 // "$ref": "GoogleCloudDialogflowCxV3beta1SessionEntityType" 20099 // }, 20100 // "response": { 20101 // "$ref": "GoogleCloudDialogflowCxV3beta1SessionEntityType" 20102 // }, 20103 // "scopes": [ 20104 // "https://www.googleapis.com/auth/cloud-platform", 20105 // "https://www.googleapis.com/auth/dialogflow" 20106 // ] 20107 // } 20108 20109} 20110 20111// method id "dialogflow.projects.locations.agents.webhooks.create": 20112 20113type ProjectsLocationsAgentsWebhooksCreateCall struct { 20114 s *Service 20115 parent string 20116 googleclouddialogflowcxv3beta1webhook *GoogleCloudDialogflowCxV3beta1Webhook 20117 urlParams_ gensupport.URLParams 20118 ctx_ context.Context 20119 header_ http.Header 20120} 20121 20122// Create: Creates a webhook in the specified agent. 20123func (r *ProjectsLocationsAgentsWebhooksService) Create(parent string, googleclouddialogflowcxv3beta1webhook *GoogleCloudDialogflowCxV3beta1Webhook) *ProjectsLocationsAgentsWebhooksCreateCall { 20124 c := &ProjectsLocationsAgentsWebhooksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20125 c.parent = parent 20126 c.googleclouddialogflowcxv3beta1webhook = googleclouddialogflowcxv3beta1webhook 20127 return c 20128} 20129 20130// Fields allows partial responses to be retrieved. See 20131// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20132// for more information. 20133func (c *ProjectsLocationsAgentsWebhooksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsWebhooksCreateCall { 20134 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20135 return c 20136} 20137 20138// Context sets the context to be used in this call's Do method. Any 20139// pending HTTP request will be aborted if the provided context is 20140// canceled. 20141func (c *ProjectsLocationsAgentsWebhooksCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentsWebhooksCreateCall { 20142 c.ctx_ = ctx 20143 return c 20144} 20145 20146// Header returns an http.Header that can be modified by the caller to 20147// add HTTP headers to the request. 20148func (c *ProjectsLocationsAgentsWebhooksCreateCall) Header() http.Header { 20149 if c.header_ == nil { 20150 c.header_ = make(http.Header) 20151 } 20152 return c.header_ 20153} 20154 20155func (c *ProjectsLocationsAgentsWebhooksCreateCall) doRequest(alt string) (*http.Response, error) { 20156 reqHeaders := make(http.Header) 20157 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20158 for k, v := range c.header_ { 20159 reqHeaders[k] = v 20160 } 20161 reqHeaders.Set("User-Agent", c.s.userAgent()) 20162 var body io.Reader = nil 20163 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1webhook) 20164 if err != nil { 20165 return nil, err 20166 } 20167 reqHeaders.Set("Content-Type", "application/json") 20168 c.urlParams_.Set("alt", alt) 20169 c.urlParams_.Set("prettyPrint", "false") 20170 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/webhooks") 20171 urls += "?" + c.urlParams_.Encode() 20172 req, err := http.NewRequest("POST", urls, body) 20173 if err != nil { 20174 return nil, err 20175 } 20176 req.Header = reqHeaders 20177 googleapi.Expand(req.URL, map[string]string{ 20178 "parent": c.parent, 20179 }) 20180 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20181} 20182 20183// Do executes the "dialogflow.projects.locations.agents.webhooks.create" call. 20184// Exactly one of *GoogleCloudDialogflowCxV3beta1Webhook or error will 20185// be non-nil. Any non-2xx status code is an error. Response headers are 20186// in either 20187// *GoogleCloudDialogflowCxV3beta1Webhook.ServerResponse.Header or (if a 20188// response was returned at all) in error.(*googleapi.Error).Header. Use 20189// googleapi.IsNotModified to check whether the returned error was 20190// because http.StatusNotModified was returned. 20191func (c *ProjectsLocationsAgentsWebhooksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Webhook, error) { 20192 gensupport.SetOptions(c.urlParams_, opts...) 20193 res, err := c.doRequest("json") 20194 if res != nil && res.StatusCode == http.StatusNotModified { 20195 if res.Body != nil { 20196 res.Body.Close() 20197 } 20198 return nil, &googleapi.Error{ 20199 Code: res.StatusCode, 20200 Header: res.Header, 20201 } 20202 } 20203 if err != nil { 20204 return nil, err 20205 } 20206 defer googleapi.CloseBody(res) 20207 if err := googleapi.CheckResponse(res); err != nil { 20208 return nil, err 20209 } 20210 ret := &GoogleCloudDialogflowCxV3beta1Webhook{ 20211 ServerResponse: googleapi.ServerResponse{ 20212 Header: res.Header, 20213 HTTPStatusCode: res.StatusCode, 20214 }, 20215 } 20216 target := &ret 20217 if err := gensupport.DecodeResponse(target, res); err != nil { 20218 return nil, err 20219 } 20220 return ret, nil 20221 // { 20222 // "description": "Creates a webhook in the specified agent.", 20223 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/webhooks", 20224 // "httpMethod": "POST", 20225 // "id": "dialogflow.projects.locations.agents.webhooks.create", 20226 // "parameterOrder": [ 20227 // "parent" 20228 // ], 20229 // "parameters": { 20230 // "parent": { 20231 // "description": "Required. The agent to create a webhook for. Format: `projects//locations//agents/`.", 20232 // "location": "path", 20233 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 20234 // "required": true, 20235 // "type": "string" 20236 // } 20237 // }, 20238 // "path": "v3beta1/{+parent}/webhooks", 20239 // "request": { 20240 // "$ref": "GoogleCloudDialogflowCxV3beta1Webhook" 20241 // }, 20242 // "response": { 20243 // "$ref": "GoogleCloudDialogflowCxV3beta1Webhook" 20244 // }, 20245 // "scopes": [ 20246 // "https://www.googleapis.com/auth/cloud-platform", 20247 // "https://www.googleapis.com/auth/dialogflow" 20248 // ] 20249 // } 20250 20251} 20252 20253// method id "dialogflow.projects.locations.agents.webhooks.delete": 20254 20255type ProjectsLocationsAgentsWebhooksDeleteCall struct { 20256 s *Service 20257 name string 20258 urlParams_ gensupport.URLParams 20259 ctx_ context.Context 20260 header_ http.Header 20261} 20262 20263// Delete: Deletes the specified webhook. 20264func (r *ProjectsLocationsAgentsWebhooksService) Delete(name string) *ProjectsLocationsAgentsWebhooksDeleteCall { 20265 c := &ProjectsLocationsAgentsWebhooksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20266 c.name = name 20267 return c 20268} 20269 20270// Force sets the optional parameter "force": This field has no effect 20271// for webhook not being used. For webhooks that are used by 20272// pages/flows/transition route groups: * If `force` is set to false, an 20273// error will be returned with message indicating the referenced 20274// resources. * If `force` is set to true, Dialogflow will remove the 20275// webhook, as well as any references to the webhook (i.e. Webhook and 20276// tagin fulfillments that point to this webhook will be removed). 20277func (c *ProjectsLocationsAgentsWebhooksDeleteCall) Force(force bool) *ProjectsLocationsAgentsWebhooksDeleteCall { 20278 c.urlParams_.Set("force", fmt.Sprint(force)) 20279 return c 20280} 20281 20282// Fields allows partial responses to be retrieved. See 20283// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20284// for more information. 20285func (c *ProjectsLocationsAgentsWebhooksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsWebhooksDeleteCall { 20286 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20287 return c 20288} 20289 20290// Context sets the context to be used in this call's Do method. Any 20291// pending HTTP request will be aborted if the provided context is 20292// canceled. 20293func (c *ProjectsLocationsAgentsWebhooksDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentsWebhooksDeleteCall { 20294 c.ctx_ = ctx 20295 return c 20296} 20297 20298// Header returns an http.Header that can be modified by the caller to 20299// add HTTP headers to the request. 20300func (c *ProjectsLocationsAgentsWebhooksDeleteCall) Header() http.Header { 20301 if c.header_ == nil { 20302 c.header_ = make(http.Header) 20303 } 20304 return c.header_ 20305} 20306 20307func (c *ProjectsLocationsAgentsWebhooksDeleteCall) doRequest(alt string) (*http.Response, error) { 20308 reqHeaders := make(http.Header) 20309 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20310 for k, v := range c.header_ { 20311 reqHeaders[k] = v 20312 } 20313 reqHeaders.Set("User-Agent", c.s.userAgent()) 20314 var body io.Reader = nil 20315 c.urlParams_.Set("alt", alt) 20316 c.urlParams_.Set("prettyPrint", "false") 20317 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 20318 urls += "?" + c.urlParams_.Encode() 20319 req, err := http.NewRequest("DELETE", urls, body) 20320 if err != nil { 20321 return nil, err 20322 } 20323 req.Header = reqHeaders 20324 googleapi.Expand(req.URL, map[string]string{ 20325 "name": c.name, 20326 }) 20327 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20328} 20329 20330// Do executes the "dialogflow.projects.locations.agents.webhooks.delete" call. 20331// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 20332// non-2xx status code is an error. Response headers are in either 20333// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 20334// returned at all) in error.(*googleapi.Error).Header. Use 20335// googleapi.IsNotModified to check whether the returned error was 20336// because http.StatusNotModified was returned. 20337func (c *ProjectsLocationsAgentsWebhooksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 20338 gensupport.SetOptions(c.urlParams_, opts...) 20339 res, err := c.doRequest("json") 20340 if res != nil && res.StatusCode == http.StatusNotModified { 20341 if res.Body != nil { 20342 res.Body.Close() 20343 } 20344 return nil, &googleapi.Error{ 20345 Code: res.StatusCode, 20346 Header: res.Header, 20347 } 20348 } 20349 if err != nil { 20350 return nil, err 20351 } 20352 defer googleapi.CloseBody(res) 20353 if err := googleapi.CheckResponse(res); err != nil { 20354 return nil, err 20355 } 20356 ret := &GoogleProtobufEmpty{ 20357 ServerResponse: googleapi.ServerResponse{ 20358 Header: res.Header, 20359 HTTPStatusCode: res.StatusCode, 20360 }, 20361 } 20362 target := &ret 20363 if err := gensupport.DecodeResponse(target, res); err != nil { 20364 return nil, err 20365 } 20366 return ret, nil 20367 // { 20368 // "description": "Deletes the specified webhook.", 20369 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/webhooks/{webhooksId}", 20370 // "httpMethod": "DELETE", 20371 // "id": "dialogflow.projects.locations.agents.webhooks.delete", 20372 // "parameterOrder": [ 20373 // "name" 20374 // ], 20375 // "parameters": { 20376 // "force": { 20377 // "description": "This field has no effect for webhook not being used. For webhooks that are used by pages/flows/transition route groups: * If `force` is set to false, an error will be returned with message indicating the referenced resources. * If `force` is set to true, Dialogflow will remove the webhook, as well as any references to the webhook (i.e. Webhook and tagin fulfillments that point to this webhook will be removed).", 20378 // "location": "query", 20379 // "type": "boolean" 20380 // }, 20381 // "name": { 20382 // "description": "Required. The name of the webhook to delete. Format: `projects//locations//agents//webhooks/`.", 20383 // "location": "path", 20384 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/webhooks/[^/]+$", 20385 // "required": true, 20386 // "type": "string" 20387 // } 20388 // }, 20389 // "path": "v3beta1/{+name}", 20390 // "response": { 20391 // "$ref": "GoogleProtobufEmpty" 20392 // }, 20393 // "scopes": [ 20394 // "https://www.googleapis.com/auth/cloud-platform", 20395 // "https://www.googleapis.com/auth/dialogflow" 20396 // ] 20397 // } 20398 20399} 20400 20401// method id "dialogflow.projects.locations.agents.webhooks.get": 20402 20403type ProjectsLocationsAgentsWebhooksGetCall struct { 20404 s *Service 20405 name string 20406 urlParams_ gensupport.URLParams 20407 ifNoneMatch_ string 20408 ctx_ context.Context 20409 header_ http.Header 20410} 20411 20412// Get: Retrieves the specified webhook. 20413func (r *ProjectsLocationsAgentsWebhooksService) Get(name string) *ProjectsLocationsAgentsWebhooksGetCall { 20414 c := &ProjectsLocationsAgentsWebhooksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20415 c.name = name 20416 return c 20417} 20418 20419// Fields allows partial responses to be retrieved. See 20420// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20421// for more information. 20422func (c *ProjectsLocationsAgentsWebhooksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsWebhooksGetCall { 20423 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20424 return c 20425} 20426 20427// IfNoneMatch sets the optional parameter which makes the operation 20428// fail if the object's ETag matches the given value. This is useful for 20429// getting updates only after the object has changed since the last 20430// request. Use googleapi.IsNotModified to check whether the response 20431// error from Do is the result of In-None-Match. 20432func (c *ProjectsLocationsAgentsWebhooksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsWebhooksGetCall { 20433 c.ifNoneMatch_ = entityTag 20434 return c 20435} 20436 20437// Context sets the context to be used in this call's Do method. Any 20438// pending HTTP request will be aborted if the provided context is 20439// canceled. 20440func (c *ProjectsLocationsAgentsWebhooksGetCall) Context(ctx context.Context) *ProjectsLocationsAgentsWebhooksGetCall { 20441 c.ctx_ = ctx 20442 return c 20443} 20444 20445// Header returns an http.Header that can be modified by the caller to 20446// add HTTP headers to the request. 20447func (c *ProjectsLocationsAgentsWebhooksGetCall) Header() http.Header { 20448 if c.header_ == nil { 20449 c.header_ = make(http.Header) 20450 } 20451 return c.header_ 20452} 20453 20454func (c *ProjectsLocationsAgentsWebhooksGetCall) doRequest(alt string) (*http.Response, error) { 20455 reqHeaders := make(http.Header) 20456 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20457 for k, v := range c.header_ { 20458 reqHeaders[k] = v 20459 } 20460 reqHeaders.Set("User-Agent", c.s.userAgent()) 20461 if c.ifNoneMatch_ != "" { 20462 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20463 } 20464 var body io.Reader = nil 20465 c.urlParams_.Set("alt", alt) 20466 c.urlParams_.Set("prettyPrint", "false") 20467 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 20468 urls += "?" + c.urlParams_.Encode() 20469 req, err := http.NewRequest("GET", urls, body) 20470 if err != nil { 20471 return nil, err 20472 } 20473 req.Header = reqHeaders 20474 googleapi.Expand(req.URL, map[string]string{ 20475 "name": c.name, 20476 }) 20477 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20478} 20479 20480// Do executes the "dialogflow.projects.locations.agents.webhooks.get" call. 20481// Exactly one of *GoogleCloudDialogflowCxV3beta1Webhook or error will 20482// be non-nil. Any non-2xx status code is an error. Response headers are 20483// in either 20484// *GoogleCloudDialogflowCxV3beta1Webhook.ServerResponse.Header or (if a 20485// response was returned at all) in error.(*googleapi.Error).Header. Use 20486// googleapi.IsNotModified to check whether the returned error was 20487// because http.StatusNotModified was returned. 20488func (c *ProjectsLocationsAgentsWebhooksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Webhook, error) { 20489 gensupport.SetOptions(c.urlParams_, opts...) 20490 res, err := c.doRequest("json") 20491 if res != nil && res.StatusCode == http.StatusNotModified { 20492 if res.Body != nil { 20493 res.Body.Close() 20494 } 20495 return nil, &googleapi.Error{ 20496 Code: res.StatusCode, 20497 Header: res.Header, 20498 } 20499 } 20500 if err != nil { 20501 return nil, err 20502 } 20503 defer googleapi.CloseBody(res) 20504 if err := googleapi.CheckResponse(res); err != nil { 20505 return nil, err 20506 } 20507 ret := &GoogleCloudDialogflowCxV3beta1Webhook{ 20508 ServerResponse: googleapi.ServerResponse{ 20509 Header: res.Header, 20510 HTTPStatusCode: res.StatusCode, 20511 }, 20512 } 20513 target := &ret 20514 if err := gensupport.DecodeResponse(target, res); err != nil { 20515 return nil, err 20516 } 20517 return ret, nil 20518 // { 20519 // "description": "Retrieves the specified webhook.", 20520 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/webhooks/{webhooksId}", 20521 // "httpMethod": "GET", 20522 // "id": "dialogflow.projects.locations.agents.webhooks.get", 20523 // "parameterOrder": [ 20524 // "name" 20525 // ], 20526 // "parameters": { 20527 // "name": { 20528 // "description": "Required. The name of the webhook. Format: `projects//locations//agents//webhooks/`.", 20529 // "location": "path", 20530 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/webhooks/[^/]+$", 20531 // "required": true, 20532 // "type": "string" 20533 // } 20534 // }, 20535 // "path": "v3beta1/{+name}", 20536 // "response": { 20537 // "$ref": "GoogleCloudDialogflowCxV3beta1Webhook" 20538 // }, 20539 // "scopes": [ 20540 // "https://www.googleapis.com/auth/cloud-platform", 20541 // "https://www.googleapis.com/auth/dialogflow" 20542 // ] 20543 // } 20544 20545} 20546 20547// method id "dialogflow.projects.locations.agents.webhooks.list": 20548 20549type ProjectsLocationsAgentsWebhooksListCall struct { 20550 s *Service 20551 parent string 20552 urlParams_ gensupport.URLParams 20553 ifNoneMatch_ string 20554 ctx_ context.Context 20555 header_ http.Header 20556} 20557 20558// List: Returns the list of all webhooks in the specified agent. 20559func (r *ProjectsLocationsAgentsWebhooksService) List(parent string) *ProjectsLocationsAgentsWebhooksListCall { 20560 c := &ProjectsLocationsAgentsWebhooksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20561 c.parent = parent 20562 return c 20563} 20564 20565// PageSize sets the optional parameter "pageSize": The maximum number 20566// of items to return in a single page. By default 100 and at most 1000. 20567func (c *ProjectsLocationsAgentsWebhooksListCall) PageSize(pageSize int64) *ProjectsLocationsAgentsWebhooksListCall { 20568 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 20569 return c 20570} 20571 20572// PageToken sets the optional parameter "pageToken": The 20573// next_page_token value returned from a previous list request. 20574func (c *ProjectsLocationsAgentsWebhooksListCall) PageToken(pageToken string) *ProjectsLocationsAgentsWebhooksListCall { 20575 c.urlParams_.Set("pageToken", pageToken) 20576 return c 20577} 20578 20579// Fields allows partial responses to be retrieved. See 20580// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20581// for more information. 20582func (c *ProjectsLocationsAgentsWebhooksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsWebhooksListCall { 20583 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20584 return c 20585} 20586 20587// IfNoneMatch sets the optional parameter which makes the operation 20588// fail if the object's ETag matches the given value. This is useful for 20589// getting updates only after the object has changed since the last 20590// request. Use googleapi.IsNotModified to check whether the response 20591// error from Do is the result of In-None-Match. 20592func (c *ProjectsLocationsAgentsWebhooksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsWebhooksListCall { 20593 c.ifNoneMatch_ = entityTag 20594 return c 20595} 20596 20597// Context sets the context to be used in this call's Do method. Any 20598// pending HTTP request will be aborted if the provided context is 20599// canceled. 20600func (c *ProjectsLocationsAgentsWebhooksListCall) Context(ctx context.Context) *ProjectsLocationsAgentsWebhooksListCall { 20601 c.ctx_ = ctx 20602 return c 20603} 20604 20605// Header returns an http.Header that can be modified by the caller to 20606// add HTTP headers to the request. 20607func (c *ProjectsLocationsAgentsWebhooksListCall) Header() http.Header { 20608 if c.header_ == nil { 20609 c.header_ = make(http.Header) 20610 } 20611 return c.header_ 20612} 20613 20614func (c *ProjectsLocationsAgentsWebhooksListCall) doRequest(alt string) (*http.Response, error) { 20615 reqHeaders := make(http.Header) 20616 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20617 for k, v := range c.header_ { 20618 reqHeaders[k] = v 20619 } 20620 reqHeaders.Set("User-Agent", c.s.userAgent()) 20621 if c.ifNoneMatch_ != "" { 20622 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20623 } 20624 var body io.Reader = nil 20625 c.urlParams_.Set("alt", alt) 20626 c.urlParams_.Set("prettyPrint", "false") 20627 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+parent}/webhooks") 20628 urls += "?" + c.urlParams_.Encode() 20629 req, err := http.NewRequest("GET", urls, body) 20630 if err != nil { 20631 return nil, err 20632 } 20633 req.Header = reqHeaders 20634 googleapi.Expand(req.URL, map[string]string{ 20635 "parent": c.parent, 20636 }) 20637 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20638} 20639 20640// Do executes the "dialogflow.projects.locations.agents.webhooks.list" call. 20641// Exactly one of *GoogleCloudDialogflowCxV3beta1ListWebhooksResponse or 20642// error will be non-nil. Any non-2xx status code is an error. Response 20643// headers are in either 20644// *GoogleCloudDialogflowCxV3beta1ListWebhooksResponse.ServerResponse.Hea 20645// der or (if a response was returned at all) in 20646// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20647// whether the returned error was because http.StatusNotModified was 20648// returned. 20649func (c *ProjectsLocationsAgentsWebhooksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1ListWebhooksResponse, error) { 20650 gensupport.SetOptions(c.urlParams_, opts...) 20651 res, err := c.doRequest("json") 20652 if res != nil && res.StatusCode == http.StatusNotModified { 20653 if res.Body != nil { 20654 res.Body.Close() 20655 } 20656 return nil, &googleapi.Error{ 20657 Code: res.StatusCode, 20658 Header: res.Header, 20659 } 20660 } 20661 if err != nil { 20662 return nil, err 20663 } 20664 defer googleapi.CloseBody(res) 20665 if err := googleapi.CheckResponse(res); err != nil { 20666 return nil, err 20667 } 20668 ret := &GoogleCloudDialogflowCxV3beta1ListWebhooksResponse{ 20669 ServerResponse: googleapi.ServerResponse{ 20670 Header: res.Header, 20671 HTTPStatusCode: res.StatusCode, 20672 }, 20673 } 20674 target := &ret 20675 if err := gensupport.DecodeResponse(target, res); err != nil { 20676 return nil, err 20677 } 20678 return ret, nil 20679 // { 20680 // "description": "Returns the list of all webhooks in the specified agent.", 20681 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/webhooks", 20682 // "httpMethod": "GET", 20683 // "id": "dialogflow.projects.locations.agents.webhooks.list", 20684 // "parameterOrder": [ 20685 // "parent" 20686 // ], 20687 // "parameters": { 20688 // "pageSize": { 20689 // "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", 20690 // "format": "int32", 20691 // "location": "query", 20692 // "type": "integer" 20693 // }, 20694 // "pageToken": { 20695 // "description": "The next_page_token value returned from a previous list request.", 20696 // "location": "query", 20697 // "type": "string" 20698 // }, 20699 // "parent": { 20700 // "description": "Required. The agent to list all webhooks for. Format: `projects//locations//agents/`.", 20701 // "location": "path", 20702 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", 20703 // "required": true, 20704 // "type": "string" 20705 // } 20706 // }, 20707 // "path": "v3beta1/{+parent}/webhooks", 20708 // "response": { 20709 // "$ref": "GoogleCloudDialogflowCxV3beta1ListWebhooksResponse" 20710 // }, 20711 // "scopes": [ 20712 // "https://www.googleapis.com/auth/cloud-platform", 20713 // "https://www.googleapis.com/auth/dialogflow" 20714 // ] 20715 // } 20716 20717} 20718 20719// Pages invokes f for each page of results. 20720// A non-nil error returned from f will halt the iteration. 20721// The provided context supersedes any context provided to the Context method. 20722func (c *ProjectsLocationsAgentsWebhooksListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowCxV3beta1ListWebhooksResponse) error) error { 20723 c.ctx_ = ctx 20724 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 20725 for { 20726 x, err := c.Do() 20727 if err != nil { 20728 return err 20729 } 20730 if err := f(x); err != nil { 20731 return err 20732 } 20733 if x.NextPageToken == "" { 20734 return nil 20735 } 20736 c.PageToken(x.NextPageToken) 20737 } 20738} 20739 20740// method id "dialogflow.projects.locations.agents.webhooks.patch": 20741 20742type ProjectsLocationsAgentsWebhooksPatchCall struct { 20743 s *Service 20744 nameid string 20745 googleclouddialogflowcxv3beta1webhook *GoogleCloudDialogflowCxV3beta1Webhook 20746 urlParams_ gensupport.URLParams 20747 ctx_ context.Context 20748 header_ http.Header 20749} 20750 20751// Patch: Updates the specified webhook. 20752func (r *ProjectsLocationsAgentsWebhooksService) Patch(nameid string, googleclouddialogflowcxv3beta1webhook *GoogleCloudDialogflowCxV3beta1Webhook) *ProjectsLocationsAgentsWebhooksPatchCall { 20753 c := &ProjectsLocationsAgentsWebhooksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20754 c.nameid = nameid 20755 c.googleclouddialogflowcxv3beta1webhook = googleclouddialogflowcxv3beta1webhook 20756 return c 20757} 20758 20759// UpdateMask sets the optional parameter "updateMask": The mask to 20760// control which fields get updated. If the mask is not present, all 20761// fields will be updated. 20762func (c *ProjectsLocationsAgentsWebhooksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsWebhooksPatchCall { 20763 c.urlParams_.Set("updateMask", updateMask) 20764 return c 20765} 20766 20767// Fields allows partial responses to be retrieved. See 20768// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20769// for more information. 20770func (c *ProjectsLocationsAgentsWebhooksPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsWebhooksPatchCall { 20771 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20772 return c 20773} 20774 20775// Context sets the context to be used in this call's Do method. Any 20776// pending HTTP request will be aborted if the provided context is 20777// canceled. 20778func (c *ProjectsLocationsAgentsWebhooksPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentsWebhooksPatchCall { 20779 c.ctx_ = ctx 20780 return c 20781} 20782 20783// Header returns an http.Header that can be modified by the caller to 20784// add HTTP headers to the request. 20785func (c *ProjectsLocationsAgentsWebhooksPatchCall) Header() http.Header { 20786 if c.header_ == nil { 20787 c.header_ = make(http.Header) 20788 } 20789 return c.header_ 20790} 20791 20792func (c *ProjectsLocationsAgentsWebhooksPatchCall) doRequest(alt string) (*http.Response, error) { 20793 reqHeaders := make(http.Header) 20794 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20795 for k, v := range c.header_ { 20796 reqHeaders[k] = v 20797 } 20798 reqHeaders.Set("User-Agent", c.s.userAgent()) 20799 var body io.Reader = nil 20800 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1webhook) 20801 if err != nil { 20802 return nil, err 20803 } 20804 reqHeaders.Set("Content-Type", "application/json") 20805 c.urlParams_.Set("alt", alt) 20806 c.urlParams_.Set("prettyPrint", "false") 20807 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 20808 urls += "?" + c.urlParams_.Encode() 20809 req, err := http.NewRequest("PATCH", urls, body) 20810 if err != nil { 20811 return nil, err 20812 } 20813 req.Header = reqHeaders 20814 googleapi.Expand(req.URL, map[string]string{ 20815 "name": c.nameid, 20816 }) 20817 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20818} 20819 20820// Do executes the "dialogflow.projects.locations.agents.webhooks.patch" call. 20821// Exactly one of *GoogleCloudDialogflowCxV3beta1Webhook or error will 20822// be non-nil. Any non-2xx status code is an error. Response headers are 20823// in either 20824// *GoogleCloudDialogflowCxV3beta1Webhook.ServerResponse.Header or (if a 20825// response was returned at all) in error.(*googleapi.Error).Header. Use 20826// googleapi.IsNotModified to check whether the returned error was 20827// because http.StatusNotModified was returned. 20828func (c *ProjectsLocationsAgentsWebhooksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1Webhook, error) { 20829 gensupport.SetOptions(c.urlParams_, opts...) 20830 res, err := c.doRequest("json") 20831 if res != nil && res.StatusCode == http.StatusNotModified { 20832 if res.Body != nil { 20833 res.Body.Close() 20834 } 20835 return nil, &googleapi.Error{ 20836 Code: res.StatusCode, 20837 Header: res.Header, 20838 } 20839 } 20840 if err != nil { 20841 return nil, err 20842 } 20843 defer googleapi.CloseBody(res) 20844 if err := googleapi.CheckResponse(res); err != nil { 20845 return nil, err 20846 } 20847 ret := &GoogleCloudDialogflowCxV3beta1Webhook{ 20848 ServerResponse: googleapi.ServerResponse{ 20849 Header: res.Header, 20850 HTTPStatusCode: res.StatusCode, 20851 }, 20852 } 20853 target := &ret 20854 if err := gensupport.DecodeResponse(target, res); err != nil { 20855 return nil, err 20856 } 20857 return ret, nil 20858 // { 20859 // "description": "Updates the specified webhook.", 20860 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/webhooks/{webhooksId}", 20861 // "httpMethod": "PATCH", 20862 // "id": "dialogflow.projects.locations.agents.webhooks.patch", 20863 // "parameterOrder": [ 20864 // "name" 20865 // ], 20866 // "parameters": { 20867 // "name": { 20868 // "description": "The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.", 20869 // "location": "path", 20870 // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/webhooks/[^/]+$", 20871 // "required": true, 20872 // "type": "string" 20873 // }, 20874 // "updateMask": { 20875 // "description": "The mask to control which fields get updated. If the mask is not present, all fields will be updated.", 20876 // "format": "google-fieldmask", 20877 // "location": "query", 20878 // "type": "string" 20879 // } 20880 // }, 20881 // "path": "v3beta1/{+name}", 20882 // "request": { 20883 // "$ref": "GoogleCloudDialogflowCxV3beta1Webhook" 20884 // }, 20885 // "response": { 20886 // "$ref": "GoogleCloudDialogflowCxV3beta1Webhook" 20887 // }, 20888 // "scopes": [ 20889 // "https://www.googleapis.com/auth/cloud-platform", 20890 // "https://www.googleapis.com/auth/dialogflow" 20891 // ] 20892 // } 20893 20894} 20895 20896// method id "dialogflow.projects.locations.operations.cancel": 20897 20898type ProjectsLocationsOperationsCancelCall struct { 20899 s *Service 20900 name string 20901 urlParams_ gensupport.URLParams 20902 ctx_ context.Context 20903 header_ http.Header 20904} 20905 20906// Cancel: Starts asynchronous cancellation on a long-running operation. 20907// The server makes a best effort to cancel the operation, but success 20908// is not guaranteed. If the server doesn't support this method, it 20909// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use 20910// Operations.GetOperation or other methods to check whether the 20911// cancellation succeeded or whether the operation completed despite 20912// cancellation. On successful cancellation, the operation is not 20913// deleted; instead, it becomes an operation with an Operation.error 20914// value with a google.rpc.Status.code of 1, corresponding to 20915// `Code.CANCELLED`. 20916func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { 20917 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20918 c.name = name 20919 return c 20920} 20921 20922// Fields allows partial responses to be retrieved. See 20923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20924// for more information. 20925func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 20926 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20927 return c 20928} 20929 20930// Context sets the context to be used in this call's Do method. Any 20931// pending HTTP request will be aborted if the provided context is 20932// canceled. 20933func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 20934 c.ctx_ = ctx 20935 return c 20936} 20937 20938// Header returns an http.Header that can be modified by the caller to 20939// add HTTP headers to the request. 20940func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 20941 if c.header_ == nil { 20942 c.header_ = make(http.Header) 20943 } 20944 return c.header_ 20945} 20946 20947func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 20948 reqHeaders := make(http.Header) 20949 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20950 for k, v := range c.header_ { 20951 reqHeaders[k] = v 20952 } 20953 reqHeaders.Set("User-Agent", c.s.userAgent()) 20954 var body io.Reader = nil 20955 c.urlParams_.Set("alt", alt) 20956 c.urlParams_.Set("prettyPrint", "false") 20957 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}:cancel") 20958 urls += "?" + c.urlParams_.Encode() 20959 req, err := http.NewRequest("POST", urls, body) 20960 if err != nil { 20961 return nil, err 20962 } 20963 req.Header = reqHeaders 20964 googleapi.Expand(req.URL, map[string]string{ 20965 "name": c.name, 20966 }) 20967 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20968} 20969 20970// Do executes the "dialogflow.projects.locations.operations.cancel" call. 20971// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 20972// non-2xx status code is an error. Response headers are in either 20973// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 20974// returned at all) in error.(*googleapi.Error).Header. Use 20975// googleapi.IsNotModified to check whether the returned error was 20976// because http.StatusNotModified was returned. 20977func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 20978 gensupport.SetOptions(c.urlParams_, opts...) 20979 res, err := c.doRequest("json") 20980 if res != nil && res.StatusCode == http.StatusNotModified { 20981 if res.Body != nil { 20982 res.Body.Close() 20983 } 20984 return nil, &googleapi.Error{ 20985 Code: res.StatusCode, 20986 Header: res.Header, 20987 } 20988 } 20989 if err != nil { 20990 return nil, err 20991 } 20992 defer googleapi.CloseBody(res) 20993 if err := googleapi.CheckResponse(res); err != nil { 20994 return nil, err 20995 } 20996 ret := &GoogleProtobufEmpty{ 20997 ServerResponse: googleapi.ServerResponse{ 20998 Header: res.Header, 20999 HTTPStatusCode: res.StatusCode, 21000 }, 21001 } 21002 target := &ret 21003 if err := gensupport.DecodeResponse(target, res); err != nil { 21004 return nil, err 21005 } 21006 return ret, nil 21007 // { 21008 // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", 21009 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", 21010 // "httpMethod": "POST", 21011 // "id": "dialogflow.projects.locations.operations.cancel", 21012 // "parameterOrder": [ 21013 // "name" 21014 // ], 21015 // "parameters": { 21016 // "name": { 21017 // "description": "The name of the operation resource to be cancelled.", 21018 // "location": "path", 21019 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 21020 // "required": true, 21021 // "type": "string" 21022 // } 21023 // }, 21024 // "path": "v3beta1/{+name}:cancel", 21025 // "response": { 21026 // "$ref": "GoogleProtobufEmpty" 21027 // }, 21028 // "scopes": [ 21029 // "https://www.googleapis.com/auth/cloud-platform", 21030 // "https://www.googleapis.com/auth/dialogflow" 21031 // ] 21032 // } 21033 21034} 21035 21036// method id "dialogflow.projects.locations.operations.get": 21037 21038type ProjectsLocationsOperationsGetCall struct { 21039 s *Service 21040 name string 21041 urlParams_ gensupport.URLParams 21042 ifNoneMatch_ string 21043 ctx_ context.Context 21044 header_ http.Header 21045} 21046 21047// Get: Gets the latest state of a long-running operation. Clients can 21048// use this method to poll the operation result at intervals as 21049// recommended by the API service. 21050func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 21051 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21052 c.name = name 21053 return c 21054} 21055 21056// Fields allows partial responses to be retrieved. See 21057// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21058// for more information. 21059func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 21060 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21061 return c 21062} 21063 21064// IfNoneMatch sets the optional parameter which makes the operation 21065// fail if the object's ETag matches the given value. This is useful for 21066// getting updates only after the object has changed since the last 21067// request. Use googleapi.IsNotModified to check whether the response 21068// error from Do is the result of In-None-Match. 21069func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 21070 c.ifNoneMatch_ = entityTag 21071 return c 21072} 21073 21074// Context sets the context to be used in this call's Do method. Any 21075// pending HTTP request will be aborted if the provided context is 21076// canceled. 21077func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 21078 c.ctx_ = ctx 21079 return c 21080} 21081 21082// Header returns an http.Header that can be modified by the caller to 21083// add HTTP headers to the request. 21084func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 21085 if c.header_ == nil { 21086 c.header_ = make(http.Header) 21087 } 21088 return c.header_ 21089} 21090 21091func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 21092 reqHeaders := make(http.Header) 21093 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21094 for k, v := range c.header_ { 21095 reqHeaders[k] = v 21096 } 21097 reqHeaders.Set("User-Agent", c.s.userAgent()) 21098 if c.ifNoneMatch_ != "" { 21099 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21100 } 21101 var body io.Reader = nil 21102 c.urlParams_.Set("alt", alt) 21103 c.urlParams_.Set("prettyPrint", "false") 21104 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 21105 urls += "?" + c.urlParams_.Encode() 21106 req, err := http.NewRequest("GET", urls, body) 21107 if err != nil { 21108 return nil, err 21109 } 21110 req.Header = reqHeaders 21111 googleapi.Expand(req.URL, map[string]string{ 21112 "name": c.name, 21113 }) 21114 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21115} 21116 21117// Do executes the "dialogflow.projects.locations.operations.get" call. 21118// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 21119// Any non-2xx status code is an error. Response headers are in either 21120// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 21121// was returned at all) in error.(*googleapi.Error).Header. Use 21122// googleapi.IsNotModified to check whether the returned error was 21123// because http.StatusNotModified was returned. 21124func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 21125 gensupport.SetOptions(c.urlParams_, opts...) 21126 res, err := c.doRequest("json") 21127 if res != nil && res.StatusCode == http.StatusNotModified { 21128 if res.Body != nil { 21129 res.Body.Close() 21130 } 21131 return nil, &googleapi.Error{ 21132 Code: res.StatusCode, 21133 Header: res.Header, 21134 } 21135 } 21136 if err != nil { 21137 return nil, err 21138 } 21139 defer googleapi.CloseBody(res) 21140 if err := googleapi.CheckResponse(res); err != nil { 21141 return nil, err 21142 } 21143 ret := &GoogleLongrunningOperation{ 21144 ServerResponse: googleapi.ServerResponse{ 21145 Header: res.Header, 21146 HTTPStatusCode: res.StatusCode, 21147 }, 21148 } 21149 target := &ret 21150 if err := gensupport.DecodeResponse(target, res); err != nil { 21151 return nil, err 21152 } 21153 return ret, nil 21154 // { 21155 // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", 21156 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", 21157 // "httpMethod": "GET", 21158 // "id": "dialogflow.projects.locations.operations.get", 21159 // "parameterOrder": [ 21160 // "name" 21161 // ], 21162 // "parameters": { 21163 // "name": { 21164 // "description": "The name of the operation resource.", 21165 // "location": "path", 21166 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 21167 // "required": true, 21168 // "type": "string" 21169 // } 21170 // }, 21171 // "path": "v3beta1/{+name}", 21172 // "response": { 21173 // "$ref": "GoogleLongrunningOperation" 21174 // }, 21175 // "scopes": [ 21176 // "https://www.googleapis.com/auth/cloud-platform", 21177 // "https://www.googleapis.com/auth/dialogflow" 21178 // ] 21179 // } 21180 21181} 21182 21183// method id "dialogflow.projects.locations.operations.list": 21184 21185type ProjectsLocationsOperationsListCall struct { 21186 s *Service 21187 name string 21188 urlParams_ gensupport.URLParams 21189 ifNoneMatch_ string 21190 ctx_ context.Context 21191 header_ http.Header 21192} 21193 21194// List: Lists operations that match the specified filter in the 21195// request. If the server doesn't support this method, it returns 21196// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to 21197// override the binding to use different resource name schemes, such as 21198// `users/*/operations`. To override the binding, API services can add a 21199// binding such as "/v1/{name=users/*}/operations" to their service 21200// configuration. For backwards compatibility, the default name includes 21201// the operations collection id, however overriding users must ensure 21202// the name binding is the parent resource, without the operations 21203// collection id. 21204func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { 21205 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21206 c.name = name 21207 return c 21208} 21209 21210// Filter sets the optional parameter "filter": The standard list 21211// filter. 21212func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { 21213 c.urlParams_.Set("filter", filter) 21214 return c 21215} 21216 21217// PageSize sets the optional parameter "pageSize": The standard list 21218// page size. 21219func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { 21220 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21221 return c 21222} 21223 21224// PageToken sets the optional parameter "pageToken": The standard list 21225// page token. 21226func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { 21227 c.urlParams_.Set("pageToken", pageToken) 21228 return c 21229} 21230 21231// Fields allows partial responses to be retrieved. See 21232// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21233// for more information. 21234func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 21235 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21236 return c 21237} 21238 21239// IfNoneMatch sets the optional parameter which makes the operation 21240// fail if the object's ETag matches the given value. This is useful for 21241// getting updates only after the object has changed since the last 21242// request. Use googleapi.IsNotModified to check whether the response 21243// error from Do is the result of In-None-Match. 21244func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 21245 c.ifNoneMatch_ = entityTag 21246 return c 21247} 21248 21249// Context sets the context to be used in this call's Do method. Any 21250// pending HTTP request will be aborted if the provided context is 21251// canceled. 21252func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 21253 c.ctx_ = ctx 21254 return c 21255} 21256 21257// Header returns an http.Header that can be modified by the caller to 21258// add HTTP headers to the request. 21259func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 21260 if c.header_ == nil { 21261 c.header_ = make(http.Header) 21262 } 21263 return c.header_ 21264} 21265 21266func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 21267 reqHeaders := make(http.Header) 21268 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21269 for k, v := range c.header_ { 21270 reqHeaders[k] = v 21271 } 21272 reqHeaders.Set("User-Agent", c.s.userAgent()) 21273 if c.ifNoneMatch_ != "" { 21274 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21275 } 21276 var body io.Reader = nil 21277 c.urlParams_.Set("alt", alt) 21278 c.urlParams_.Set("prettyPrint", "false") 21279 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}/operations") 21280 urls += "?" + c.urlParams_.Encode() 21281 req, err := http.NewRequest("GET", urls, body) 21282 if err != nil { 21283 return nil, err 21284 } 21285 req.Header = reqHeaders 21286 googleapi.Expand(req.URL, map[string]string{ 21287 "name": c.name, 21288 }) 21289 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21290} 21291 21292// Do executes the "dialogflow.projects.locations.operations.list" call. 21293// Exactly one of *GoogleLongrunningListOperationsResponse or error will 21294// be non-nil. Any non-2xx status code is an error. Response headers are 21295// in either 21296// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if 21297// a response was returned at all) in error.(*googleapi.Error).Header. 21298// Use googleapi.IsNotModified to check whether the returned error was 21299// because http.StatusNotModified was returned. 21300func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { 21301 gensupport.SetOptions(c.urlParams_, opts...) 21302 res, err := c.doRequest("json") 21303 if res != nil && res.StatusCode == http.StatusNotModified { 21304 if res.Body != nil { 21305 res.Body.Close() 21306 } 21307 return nil, &googleapi.Error{ 21308 Code: res.StatusCode, 21309 Header: res.Header, 21310 } 21311 } 21312 if err != nil { 21313 return nil, err 21314 } 21315 defer googleapi.CloseBody(res) 21316 if err := googleapi.CheckResponse(res); err != nil { 21317 return nil, err 21318 } 21319 ret := &GoogleLongrunningListOperationsResponse{ 21320 ServerResponse: googleapi.ServerResponse{ 21321 Header: res.Header, 21322 HTTPStatusCode: res.StatusCode, 21323 }, 21324 } 21325 target := &ret 21326 if err := gensupport.DecodeResponse(target, res); err != nil { 21327 return nil, err 21328 } 21329 return ret, nil 21330 // { 21331 // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", 21332 // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/operations", 21333 // "httpMethod": "GET", 21334 // "id": "dialogflow.projects.locations.operations.list", 21335 // "parameterOrder": [ 21336 // "name" 21337 // ], 21338 // "parameters": { 21339 // "filter": { 21340 // "description": "The standard list filter.", 21341 // "location": "query", 21342 // "type": "string" 21343 // }, 21344 // "name": { 21345 // "description": "The name of the operation's parent resource.", 21346 // "location": "path", 21347 // "pattern": "^projects/[^/]+/locations/[^/]+$", 21348 // "required": true, 21349 // "type": "string" 21350 // }, 21351 // "pageSize": { 21352 // "description": "The standard list page size.", 21353 // "format": "int32", 21354 // "location": "query", 21355 // "type": "integer" 21356 // }, 21357 // "pageToken": { 21358 // "description": "The standard list page token.", 21359 // "location": "query", 21360 // "type": "string" 21361 // } 21362 // }, 21363 // "path": "v3beta1/{+name}/operations", 21364 // "response": { 21365 // "$ref": "GoogleLongrunningListOperationsResponse" 21366 // }, 21367 // "scopes": [ 21368 // "https://www.googleapis.com/auth/cloud-platform", 21369 // "https://www.googleapis.com/auth/dialogflow" 21370 // ] 21371 // } 21372 21373} 21374 21375// Pages invokes f for each page of results. 21376// A non-nil error returned from f will halt the iteration. 21377// The provided context supersedes any context provided to the Context method. 21378func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { 21379 c.ctx_ = ctx 21380 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21381 for { 21382 x, err := c.Do() 21383 if err != nil { 21384 return err 21385 } 21386 if err := f(x); err != nil { 21387 return err 21388 } 21389 if x.NextPageToken == "" { 21390 return nil 21391 } 21392 c.PageToken(x.NextPageToken) 21393 } 21394} 21395 21396// method id "dialogflow.projects.operations.cancel": 21397 21398type ProjectsOperationsCancelCall struct { 21399 s *Service 21400 name string 21401 urlParams_ gensupport.URLParams 21402 ctx_ context.Context 21403 header_ http.Header 21404} 21405 21406// Cancel: Starts asynchronous cancellation on a long-running operation. 21407// The server makes a best effort to cancel the operation, but success 21408// is not guaranteed. If the server doesn't support this method, it 21409// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use 21410// Operations.GetOperation or other methods to check whether the 21411// cancellation succeeded or whether the operation completed despite 21412// cancellation. On successful cancellation, the operation is not 21413// deleted; instead, it becomes an operation with an Operation.error 21414// value with a google.rpc.Status.code of 1, corresponding to 21415// `Code.CANCELLED`. 21416func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall { 21417 c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21418 c.name = name 21419 return c 21420} 21421 21422// Fields allows partial responses to be retrieved. See 21423// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21424// for more information. 21425func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall { 21426 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21427 return c 21428} 21429 21430// Context sets the context to be used in this call's Do method. Any 21431// pending HTTP request will be aborted if the provided context is 21432// canceled. 21433func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall { 21434 c.ctx_ = ctx 21435 return c 21436} 21437 21438// Header returns an http.Header that can be modified by the caller to 21439// add HTTP headers to the request. 21440func (c *ProjectsOperationsCancelCall) Header() http.Header { 21441 if c.header_ == nil { 21442 c.header_ = make(http.Header) 21443 } 21444 return c.header_ 21445} 21446 21447func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 21448 reqHeaders := make(http.Header) 21449 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21450 for k, v := range c.header_ { 21451 reqHeaders[k] = v 21452 } 21453 reqHeaders.Set("User-Agent", c.s.userAgent()) 21454 var body io.Reader = nil 21455 c.urlParams_.Set("alt", alt) 21456 c.urlParams_.Set("prettyPrint", "false") 21457 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}:cancel") 21458 urls += "?" + c.urlParams_.Encode() 21459 req, err := http.NewRequest("POST", urls, body) 21460 if err != nil { 21461 return nil, err 21462 } 21463 req.Header = reqHeaders 21464 googleapi.Expand(req.URL, map[string]string{ 21465 "name": c.name, 21466 }) 21467 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21468} 21469 21470// Do executes the "dialogflow.projects.operations.cancel" call. 21471// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 21472// non-2xx status code is an error. Response headers are in either 21473// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 21474// returned at all) in error.(*googleapi.Error).Header. Use 21475// googleapi.IsNotModified to check whether the returned error was 21476// because http.StatusNotModified was returned. 21477func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 21478 gensupport.SetOptions(c.urlParams_, opts...) 21479 res, err := c.doRequest("json") 21480 if res != nil && res.StatusCode == http.StatusNotModified { 21481 if res.Body != nil { 21482 res.Body.Close() 21483 } 21484 return nil, &googleapi.Error{ 21485 Code: res.StatusCode, 21486 Header: res.Header, 21487 } 21488 } 21489 if err != nil { 21490 return nil, err 21491 } 21492 defer googleapi.CloseBody(res) 21493 if err := googleapi.CheckResponse(res); err != nil { 21494 return nil, err 21495 } 21496 ret := &GoogleProtobufEmpty{ 21497 ServerResponse: googleapi.ServerResponse{ 21498 Header: res.Header, 21499 HTTPStatusCode: res.StatusCode, 21500 }, 21501 } 21502 target := &ret 21503 if err := gensupport.DecodeResponse(target, res); err != nil { 21504 return nil, err 21505 } 21506 return ret, nil 21507 // { 21508 // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", 21509 // "flatPath": "v3beta1/projects/{projectsId}/operations/{operationsId}:cancel", 21510 // "httpMethod": "POST", 21511 // "id": "dialogflow.projects.operations.cancel", 21512 // "parameterOrder": [ 21513 // "name" 21514 // ], 21515 // "parameters": { 21516 // "name": { 21517 // "description": "The name of the operation resource to be cancelled.", 21518 // "location": "path", 21519 // "pattern": "^projects/[^/]+/operations/[^/]+$", 21520 // "required": true, 21521 // "type": "string" 21522 // } 21523 // }, 21524 // "path": "v3beta1/{+name}:cancel", 21525 // "response": { 21526 // "$ref": "GoogleProtobufEmpty" 21527 // }, 21528 // "scopes": [ 21529 // "https://www.googleapis.com/auth/cloud-platform", 21530 // "https://www.googleapis.com/auth/dialogflow" 21531 // ] 21532 // } 21533 21534} 21535 21536// method id "dialogflow.projects.operations.get": 21537 21538type ProjectsOperationsGetCall struct { 21539 s *Service 21540 name string 21541 urlParams_ gensupport.URLParams 21542 ifNoneMatch_ string 21543 ctx_ context.Context 21544 header_ http.Header 21545} 21546 21547// Get: Gets the latest state of a long-running operation. Clients can 21548// use this method to poll the operation result at intervals as 21549// recommended by the API service. 21550func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { 21551 c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21552 c.name = name 21553 return c 21554} 21555 21556// Fields allows partial responses to be retrieved. See 21557// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21558// for more information. 21559func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { 21560 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21561 return c 21562} 21563 21564// IfNoneMatch sets the optional parameter which makes the operation 21565// fail if the object's ETag matches the given value. This is useful for 21566// getting updates only after the object has changed since the last 21567// request. Use googleapi.IsNotModified to check whether the response 21568// error from Do is the result of In-None-Match. 21569func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { 21570 c.ifNoneMatch_ = entityTag 21571 return c 21572} 21573 21574// Context sets the context to be used in this call's Do method. Any 21575// pending HTTP request will be aborted if the provided context is 21576// canceled. 21577func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { 21578 c.ctx_ = ctx 21579 return c 21580} 21581 21582// Header returns an http.Header that can be modified by the caller to 21583// add HTTP headers to the request. 21584func (c *ProjectsOperationsGetCall) Header() http.Header { 21585 if c.header_ == nil { 21586 c.header_ = make(http.Header) 21587 } 21588 return c.header_ 21589} 21590 21591func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 21592 reqHeaders := make(http.Header) 21593 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21594 for k, v := range c.header_ { 21595 reqHeaders[k] = v 21596 } 21597 reqHeaders.Set("User-Agent", c.s.userAgent()) 21598 if c.ifNoneMatch_ != "" { 21599 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21600 } 21601 var body io.Reader = nil 21602 c.urlParams_.Set("alt", alt) 21603 c.urlParams_.Set("prettyPrint", "false") 21604 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") 21605 urls += "?" + c.urlParams_.Encode() 21606 req, err := http.NewRequest("GET", urls, body) 21607 if err != nil { 21608 return nil, err 21609 } 21610 req.Header = reqHeaders 21611 googleapi.Expand(req.URL, map[string]string{ 21612 "name": c.name, 21613 }) 21614 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21615} 21616 21617// Do executes the "dialogflow.projects.operations.get" call. 21618// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 21619// Any non-2xx status code is an error. Response headers are in either 21620// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 21621// was returned at all) in error.(*googleapi.Error).Header. Use 21622// googleapi.IsNotModified to check whether the returned error was 21623// because http.StatusNotModified was returned. 21624func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 21625 gensupport.SetOptions(c.urlParams_, opts...) 21626 res, err := c.doRequest("json") 21627 if res != nil && res.StatusCode == http.StatusNotModified { 21628 if res.Body != nil { 21629 res.Body.Close() 21630 } 21631 return nil, &googleapi.Error{ 21632 Code: res.StatusCode, 21633 Header: res.Header, 21634 } 21635 } 21636 if err != nil { 21637 return nil, err 21638 } 21639 defer googleapi.CloseBody(res) 21640 if err := googleapi.CheckResponse(res); err != nil { 21641 return nil, err 21642 } 21643 ret := &GoogleLongrunningOperation{ 21644 ServerResponse: googleapi.ServerResponse{ 21645 Header: res.Header, 21646 HTTPStatusCode: res.StatusCode, 21647 }, 21648 } 21649 target := &ret 21650 if err := gensupport.DecodeResponse(target, res); err != nil { 21651 return nil, err 21652 } 21653 return ret, nil 21654 // { 21655 // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", 21656 // "flatPath": "v3beta1/projects/{projectsId}/operations/{operationsId}", 21657 // "httpMethod": "GET", 21658 // "id": "dialogflow.projects.operations.get", 21659 // "parameterOrder": [ 21660 // "name" 21661 // ], 21662 // "parameters": { 21663 // "name": { 21664 // "description": "The name of the operation resource.", 21665 // "location": "path", 21666 // "pattern": "^projects/[^/]+/operations/[^/]+$", 21667 // "required": true, 21668 // "type": "string" 21669 // } 21670 // }, 21671 // "path": "v3beta1/{+name}", 21672 // "response": { 21673 // "$ref": "GoogleLongrunningOperation" 21674 // }, 21675 // "scopes": [ 21676 // "https://www.googleapis.com/auth/cloud-platform", 21677 // "https://www.googleapis.com/auth/dialogflow" 21678 // ] 21679 // } 21680 21681} 21682 21683// method id "dialogflow.projects.operations.list": 21684 21685type ProjectsOperationsListCall struct { 21686 s *Service 21687 name string 21688 urlParams_ gensupport.URLParams 21689 ifNoneMatch_ string 21690 ctx_ context.Context 21691 header_ http.Header 21692} 21693 21694// List: Lists operations that match the specified filter in the 21695// request. If the server doesn't support this method, it returns 21696// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to 21697// override the binding to use different resource name schemes, such as 21698// `users/*/operations`. To override the binding, API services can add a 21699// binding such as "/v1/{name=users/*}/operations" to their service 21700// configuration. For backwards compatibility, the default name includes 21701// the operations collection id, however overriding users must ensure 21702// the name binding is the parent resource, without the operations 21703// collection id. 21704func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall { 21705 c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21706 c.name = name 21707 return c 21708} 21709 21710// Filter sets the optional parameter "filter": The standard list 21711// filter. 21712func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall { 21713 c.urlParams_.Set("filter", filter) 21714 return c 21715} 21716 21717// PageSize sets the optional parameter "pageSize": The standard list 21718// page size. 21719func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall { 21720 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21721 return c 21722} 21723 21724// PageToken sets the optional parameter "pageToken": The standard list 21725// page token. 21726func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall { 21727 c.urlParams_.Set("pageToken", pageToken) 21728 return c 21729} 21730 21731// Fields allows partial responses to be retrieved. See 21732// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21733// for more information. 21734func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall { 21735 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21736 return c 21737} 21738 21739// IfNoneMatch sets the optional parameter which makes the operation 21740// fail if the object's ETag matches the given value. This is useful for 21741// getting updates only after the object has changed since the last 21742// request. Use googleapi.IsNotModified to check whether the response 21743// error from Do is the result of In-None-Match. 21744func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall { 21745 c.ifNoneMatch_ = entityTag 21746 return c 21747} 21748 21749// Context sets the context to be used in this call's Do method. Any 21750// pending HTTP request will be aborted if the provided context is 21751// canceled. 21752func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall { 21753 c.ctx_ = ctx 21754 return c 21755} 21756 21757// Header returns an http.Header that can be modified by the caller to 21758// add HTTP headers to the request. 21759func (c *ProjectsOperationsListCall) Header() http.Header { 21760 if c.header_ == nil { 21761 c.header_ = make(http.Header) 21762 } 21763 return c.header_ 21764} 21765 21766func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) { 21767 reqHeaders := make(http.Header) 21768 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21769 for k, v := range c.header_ { 21770 reqHeaders[k] = v 21771 } 21772 reqHeaders.Set("User-Agent", c.s.userAgent()) 21773 if c.ifNoneMatch_ != "" { 21774 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21775 } 21776 var body io.Reader = nil 21777 c.urlParams_.Set("alt", alt) 21778 c.urlParams_.Set("prettyPrint", "false") 21779 urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}/operations") 21780 urls += "?" + c.urlParams_.Encode() 21781 req, err := http.NewRequest("GET", urls, body) 21782 if err != nil { 21783 return nil, err 21784 } 21785 req.Header = reqHeaders 21786 googleapi.Expand(req.URL, map[string]string{ 21787 "name": c.name, 21788 }) 21789 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21790} 21791 21792// Do executes the "dialogflow.projects.operations.list" call. 21793// Exactly one of *GoogleLongrunningListOperationsResponse or error will 21794// be non-nil. Any non-2xx status code is an error. Response headers are 21795// in either 21796// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if 21797// a response was returned at all) in error.(*googleapi.Error).Header. 21798// Use googleapi.IsNotModified to check whether the returned error was 21799// because http.StatusNotModified was returned. 21800func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { 21801 gensupport.SetOptions(c.urlParams_, opts...) 21802 res, err := c.doRequest("json") 21803 if res != nil && res.StatusCode == http.StatusNotModified { 21804 if res.Body != nil { 21805 res.Body.Close() 21806 } 21807 return nil, &googleapi.Error{ 21808 Code: res.StatusCode, 21809 Header: res.Header, 21810 } 21811 } 21812 if err != nil { 21813 return nil, err 21814 } 21815 defer googleapi.CloseBody(res) 21816 if err := googleapi.CheckResponse(res); err != nil { 21817 return nil, err 21818 } 21819 ret := &GoogleLongrunningListOperationsResponse{ 21820 ServerResponse: googleapi.ServerResponse{ 21821 Header: res.Header, 21822 HTTPStatusCode: res.StatusCode, 21823 }, 21824 } 21825 target := &ret 21826 if err := gensupport.DecodeResponse(target, res); err != nil { 21827 return nil, err 21828 } 21829 return ret, nil 21830 // { 21831 // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", 21832 // "flatPath": "v3beta1/projects/{projectsId}/operations", 21833 // "httpMethod": "GET", 21834 // "id": "dialogflow.projects.operations.list", 21835 // "parameterOrder": [ 21836 // "name" 21837 // ], 21838 // "parameters": { 21839 // "filter": { 21840 // "description": "The standard list filter.", 21841 // "location": "query", 21842 // "type": "string" 21843 // }, 21844 // "name": { 21845 // "description": "The name of the operation's parent resource.", 21846 // "location": "path", 21847 // "pattern": "^projects/[^/]+$", 21848 // "required": true, 21849 // "type": "string" 21850 // }, 21851 // "pageSize": { 21852 // "description": "The standard list page size.", 21853 // "format": "int32", 21854 // "location": "query", 21855 // "type": "integer" 21856 // }, 21857 // "pageToken": { 21858 // "description": "The standard list page token.", 21859 // "location": "query", 21860 // "type": "string" 21861 // } 21862 // }, 21863 // "path": "v3beta1/{+name}/operations", 21864 // "response": { 21865 // "$ref": "GoogleLongrunningListOperationsResponse" 21866 // }, 21867 // "scopes": [ 21868 // "https://www.googleapis.com/auth/cloud-platform", 21869 // "https://www.googleapis.com/auth/dialogflow" 21870 // ] 21871 // } 21872 21873} 21874 21875// Pages invokes f for each page of results. 21876// A non-nil error returned from f will halt the iteration. 21877// The provided context supersedes any context provided to the Context method. 21878func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { 21879 c.ctx_ = ctx 21880 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21881 for { 21882 x, err := c.Do() 21883 if err != nil { 21884 return err 21885 } 21886 if err := f(x); err != nil { 21887 return err 21888 } 21889 if x.NextPageToken == "" { 21890 return nil 21891 } 21892 c.PageToken(x.NextPageToken) 21893 } 21894} 21895