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/v2" 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/v2" 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:v2" 81const apiName = "dialogflow" 82const apiVersion = "v2" 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.Agent = NewProjectsAgentService(s) 151 rs.Locations = NewProjectsLocationsService(s) 152 rs.Operations = NewProjectsOperationsService(s) 153 return rs 154} 155 156type ProjectsService struct { 157 s *Service 158 159 Agent *ProjectsAgentService 160 161 Locations *ProjectsLocationsService 162 163 Operations *ProjectsOperationsService 164} 165 166func NewProjectsAgentService(s *Service) *ProjectsAgentService { 167 rs := &ProjectsAgentService{s: s} 168 rs.EntityTypes = NewProjectsAgentEntityTypesService(s) 169 rs.Environments = NewProjectsAgentEnvironmentsService(s) 170 rs.Intents = NewProjectsAgentIntentsService(s) 171 rs.Sessions = NewProjectsAgentSessionsService(s) 172 return rs 173} 174 175type ProjectsAgentService struct { 176 s *Service 177 178 EntityTypes *ProjectsAgentEntityTypesService 179 180 Environments *ProjectsAgentEnvironmentsService 181 182 Intents *ProjectsAgentIntentsService 183 184 Sessions *ProjectsAgentSessionsService 185} 186 187func NewProjectsAgentEntityTypesService(s *Service) *ProjectsAgentEntityTypesService { 188 rs := &ProjectsAgentEntityTypesService{s: s} 189 rs.Entities = NewProjectsAgentEntityTypesEntitiesService(s) 190 return rs 191} 192 193type ProjectsAgentEntityTypesService struct { 194 s *Service 195 196 Entities *ProjectsAgentEntityTypesEntitiesService 197} 198 199func NewProjectsAgentEntityTypesEntitiesService(s *Service) *ProjectsAgentEntityTypesEntitiesService { 200 rs := &ProjectsAgentEntityTypesEntitiesService{s: s} 201 return rs 202} 203 204type ProjectsAgentEntityTypesEntitiesService struct { 205 s *Service 206} 207 208func NewProjectsAgentEnvironmentsService(s *Service) *ProjectsAgentEnvironmentsService { 209 rs := &ProjectsAgentEnvironmentsService{s: s} 210 rs.Users = NewProjectsAgentEnvironmentsUsersService(s) 211 return rs 212} 213 214type ProjectsAgentEnvironmentsService struct { 215 s *Service 216 217 Users *ProjectsAgentEnvironmentsUsersService 218} 219 220func NewProjectsAgentEnvironmentsUsersService(s *Service) *ProjectsAgentEnvironmentsUsersService { 221 rs := &ProjectsAgentEnvironmentsUsersService{s: s} 222 rs.Sessions = NewProjectsAgentEnvironmentsUsersSessionsService(s) 223 return rs 224} 225 226type ProjectsAgentEnvironmentsUsersService struct { 227 s *Service 228 229 Sessions *ProjectsAgentEnvironmentsUsersSessionsService 230} 231 232func NewProjectsAgentEnvironmentsUsersSessionsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsService { 233 rs := &ProjectsAgentEnvironmentsUsersSessionsService{s: s} 234 rs.Contexts = NewProjectsAgentEnvironmentsUsersSessionsContextsService(s) 235 rs.EntityTypes = NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s) 236 return rs 237} 238 239type ProjectsAgentEnvironmentsUsersSessionsService struct { 240 s *Service 241 242 Contexts *ProjectsAgentEnvironmentsUsersSessionsContextsService 243 244 EntityTypes *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService 245} 246 247func NewProjectsAgentEnvironmentsUsersSessionsContextsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsContextsService { 248 rs := &ProjectsAgentEnvironmentsUsersSessionsContextsService{s: s} 249 return rs 250} 251 252type ProjectsAgentEnvironmentsUsersSessionsContextsService struct { 253 s *Service 254} 255 256func NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService { 257 rs := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesService{s: s} 258 return rs 259} 260 261type ProjectsAgentEnvironmentsUsersSessionsEntityTypesService struct { 262 s *Service 263} 264 265func NewProjectsAgentIntentsService(s *Service) *ProjectsAgentIntentsService { 266 rs := &ProjectsAgentIntentsService{s: s} 267 return rs 268} 269 270type ProjectsAgentIntentsService struct { 271 s *Service 272} 273 274func NewProjectsAgentSessionsService(s *Service) *ProjectsAgentSessionsService { 275 rs := &ProjectsAgentSessionsService{s: s} 276 rs.Contexts = NewProjectsAgentSessionsContextsService(s) 277 rs.EntityTypes = NewProjectsAgentSessionsEntityTypesService(s) 278 return rs 279} 280 281type ProjectsAgentSessionsService struct { 282 s *Service 283 284 Contexts *ProjectsAgentSessionsContextsService 285 286 EntityTypes *ProjectsAgentSessionsEntityTypesService 287} 288 289func NewProjectsAgentSessionsContextsService(s *Service) *ProjectsAgentSessionsContextsService { 290 rs := &ProjectsAgentSessionsContextsService{s: s} 291 return rs 292} 293 294type ProjectsAgentSessionsContextsService struct { 295 s *Service 296} 297 298func NewProjectsAgentSessionsEntityTypesService(s *Service) *ProjectsAgentSessionsEntityTypesService { 299 rs := &ProjectsAgentSessionsEntityTypesService{s: s} 300 return rs 301} 302 303type ProjectsAgentSessionsEntityTypesService struct { 304 s *Service 305} 306 307func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 308 rs := &ProjectsLocationsService{s: s} 309 rs.Operations = NewProjectsLocationsOperationsService(s) 310 return rs 311} 312 313type ProjectsLocationsService struct { 314 s *Service 315 316 Operations *ProjectsLocationsOperationsService 317} 318 319func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 320 rs := &ProjectsLocationsOperationsService{s: s} 321 return rs 322} 323 324type ProjectsLocationsOperationsService struct { 325 s *Service 326} 327 328func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { 329 rs := &ProjectsOperationsService{s: s} 330 return rs 331} 332 333type ProjectsOperationsService struct { 334 s *Service 335} 336 337// GoogleCloudDialogflowCxV3beta1ExportAgentResponse: The response 338// message for Agents.ExportAgent. 339type GoogleCloudDialogflowCxV3beta1ExportAgentResponse struct { 340 // AgentContent: Uncompressed raw byte content for agent. 341 AgentContent string `json:"agentContent,omitempty"` 342 343 // AgentUri: The URI to a file containing the exported agent. This field 344 // is populated 345 // only if `agent_uri` is specified in ExportAgentRequest. 346 AgentUri string `json:"agentUri,omitempty"` 347 348 // ForceSendFields is a list of field names (e.g. "AgentContent") to 349 // unconditionally include in API requests. By default, fields with 350 // empty values are omitted from API requests. However, any non-pointer, 351 // non-interface field appearing in ForceSendFields will be sent to the 352 // server regardless of whether the field is empty or not. This may be 353 // used to include empty fields in Patch requests. 354 ForceSendFields []string `json:"-"` 355 356 // NullFields is a list of field names (e.g. "AgentContent") to include 357 // in API requests with the JSON null value. By default, fields with 358 // empty values are omitted from API requests. However, any field with 359 // an empty value appearing in NullFields will be sent to the server as 360 // null. It is an error if a field in this list has a non-empty value. 361 // This may be used to include null fields in Patch requests. 362 NullFields []string `json:"-"` 363} 364 365func (s *GoogleCloudDialogflowCxV3beta1ExportAgentResponse) MarshalJSON() ([]byte, error) { 366 type NoMethod GoogleCloudDialogflowCxV3beta1ExportAgentResponse 367 raw := NoMethod(*s) 368 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 369} 370 371// GoogleCloudDialogflowCxV3beta1PageInfo: Represents page information 372// communicated to and from the webhook. 373type GoogleCloudDialogflowCxV3beta1PageInfo struct { 374 // CurrentPage: Always present for WebhookRequest. Ignored for 375 // WebhookResponse. 376 // The unique identifier of the current page. 377 // Format: `projects/<Project ID>/locations/<Location 378 // ID>/agents/<Agent 379 // ID>/flows/<Flow ID>/pages/<Page ID>`. 380 CurrentPage string `json:"currentPage,omitempty"` 381 382 // FormInfo: Optional for both WebhookRequest and 383 // WebhookResponse. 384 // Information about the form. 385 FormInfo *GoogleCloudDialogflowCxV3beta1PageInfoFormInfo `json:"formInfo,omitempty"` 386 387 // ForceSendFields is a list of field names (e.g. "CurrentPage") to 388 // unconditionally include in API requests. By default, fields with 389 // empty values are omitted from API requests. However, any non-pointer, 390 // non-interface field appearing in ForceSendFields will be sent to the 391 // server regardless of whether the field is empty or not. This may be 392 // used to include empty fields in Patch requests. 393 ForceSendFields []string `json:"-"` 394 395 // NullFields is a list of field names (e.g. "CurrentPage") to include 396 // in API requests with the JSON null value. By default, fields with 397 // empty values are omitted from API requests. However, any field with 398 // an empty value appearing in NullFields will be sent to the server as 399 // null. It is an error if a field in this list has a non-empty value. 400 // This may be used to include null fields in Patch requests. 401 NullFields []string `json:"-"` 402} 403 404func (s *GoogleCloudDialogflowCxV3beta1PageInfo) MarshalJSON() ([]byte, error) { 405 type NoMethod GoogleCloudDialogflowCxV3beta1PageInfo 406 raw := NoMethod(*s) 407 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 408} 409 410// GoogleCloudDialogflowCxV3beta1PageInfoFormInfo: Represents form 411// information. 412type GoogleCloudDialogflowCxV3beta1PageInfoFormInfo struct { 413 // ParameterInfo: Optional for both WebhookRequest and 414 // WebhookResponse. 415 // The parameters contained in the form. Note that the webhook cannot 416 // add 417 // or remove any form parameter. 418 ParameterInfo []*GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo `json:"parameterInfo,omitempty"` 419 420 // ForceSendFields is a list of field names (e.g. "ParameterInfo") to 421 // unconditionally include in API requests. By default, fields with 422 // empty values are omitted from API requests. However, any non-pointer, 423 // non-interface field appearing in ForceSendFields will be sent to the 424 // server regardless of whether the field is empty or not. This may be 425 // used to include empty fields in Patch requests. 426 ForceSendFields []string `json:"-"` 427 428 // NullFields is a list of field names (e.g. "ParameterInfo") to include 429 // in API requests with the JSON null value. By default, fields with 430 // empty values are omitted from API requests. However, any field with 431 // an empty value appearing in NullFields will be sent to the server as 432 // null. It is an error if a field in this list has a non-empty value. 433 // This may be used to include null fields in Patch requests. 434 NullFields []string `json:"-"` 435} 436 437func (s *GoogleCloudDialogflowCxV3beta1PageInfoFormInfo) MarshalJSON() ([]byte, error) { 438 type NoMethod GoogleCloudDialogflowCxV3beta1PageInfoFormInfo 439 raw := NoMethod(*s) 440 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 441} 442 443// GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo: 444// Represents parameter information. 445type GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo struct { 446 // DisplayName: Always present for WebhookRequest. Required 447 // for 448 // WebhookResponse. 449 // The human-readable name of the parameter, unique within the form. 450 // This 451 // field cannot be modified by the webhook. 452 DisplayName string `json:"displayName,omitempty"` 453 454 // JustCollected: Optional for WebhookRequest. Ignored for 455 // WebhookResponse. 456 // Indicates if the parameter value was just collected on the 457 // last 458 // conversation turn. 459 JustCollected bool `json:"justCollected,omitempty"` 460 461 // Required: Optional for both WebhookRequest and 462 // WebhookResponse. 463 // Indicates whether the parameter is required. Optional parameters 464 // will 465 // not trigger prompts; however, they are filled if the user 466 // specifies 467 // them. Required parameters must be filled before form filling 468 // concludes. 469 Required bool `json:"required,omitempty"` 470 471 // State: Always present for WebhookRequest. Required 472 // for 473 // WebhookResponse. The state of the parameter. This field can be set 474 // to INVALID by 475 // the webhook to invalidate the parameter; other values set by 476 // the 477 // webhook will be ignored. 478 // 479 // Possible values: 480 // "PARAMETER_STATE_UNSPECIFIED" - Not specified. This value should be 481 // never used. 482 // "EMPTY" - Indicates that the parameter does not have a value. 483 // "INVALID" - Indicates that the parameter value is invalid. This 484 // field can be used 485 // by the webhook to invalidate the parameter and ask the server 486 // to 487 // collect it from the user again. 488 // "FILLED" - Indicates that the parameter has a value. 489 State string `json:"state,omitempty"` 490 491 // Value: Optional for both WebhookRequest and WebhookResponse. 492 // The value of the parameter. This field can be set by the webhook 493 // to 494 // change the parameter value. 495 Value interface{} `json:"value,omitempty"` 496 497 // ForceSendFields is a list of field names (e.g. "DisplayName") to 498 // unconditionally include in API requests. By default, fields with 499 // empty values are omitted from API requests. However, any non-pointer, 500 // non-interface field appearing in ForceSendFields will be sent to the 501 // server regardless of whether the field is empty or not. This may be 502 // used to include empty fields in Patch requests. 503 ForceSendFields []string `json:"-"` 504 505 // NullFields is a list of field names (e.g. "DisplayName") to include 506 // in API requests with the JSON null value. By default, fields with 507 // empty values are omitted from API requests. However, any field with 508 // an empty value appearing in NullFields will be sent to the server as 509 // null. It is an error if a field in this list has a non-empty value. 510 // This may be used to include null fields in Patch requests. 511 NullFields []string `json:"-"` 512} 513 514func (s *GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo) MarshalJSON() ([]byte, error) { 515 type NoMethod GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo 516 raw := NoMethod(*s) 517 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 518} 519 520// GoogleCloudDialogflowCxV3beta1ResponseMessage: Represents a response 521// message that can be returned by a conversational agent. 522// 523// Response messages are also used for output audio synthesis. The 524// approach is 525// as follows: 526// 527// * If at least one OutputAudioText response is present, then all 528// OutputAudioText responses are linearly concatenated, and the result 529// is used 530// for output audio synthesis. 531// * If the OutputAudioText responses are a mixture of text and SSML, 532// then the 533// concatenated result is treated as SSML; otherwise, the result is 534// treated as 535// either text or SSML as appropriate. The agent designer should 536// ideally use 537// either text or SSML consistently throughout the bot design. 538// * Otherwise, all Text responses are linearly concatenated, and the 539// result is 540// used for output audio synthesis. 541// 542// This approach allows for more sophisticated user experience 543// scenarios, where 544// the text displayed to the user may differ from what is heard. 545type GoogleCloudDialogflowCxV3beta1ResponseMessage struct { 546 // ConversationSuccess: Indicates that the conversation succeeded. 547 ConversationSuccess *GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess `json:"conversationSuccess,omitempty"` 548 549 // EndInteraction: Output only. A signal that indicates the interaction 550 // with the Dialogflow agent has 551 // ended. 552 // This message is generated by Dialogflow only when the 553 // conversation 554 // reaches `END_SESSION` or `END_PAGE` page. It is not supposed to 555 // be 556 // defined by the user. 557 // It's guaranteed that there is at most one such message in each 558 // response. 559 EndInteraction *GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction `json:"endInteraction,omitempty"` 560 561 // HumanAgentHandoff: Hands off conversation to a human agent. 562 HumanAgentHandoff *GoogleCloudDialogflowCxV3beta1ResponseMessageHumanAgentHandoff `json:"humanAgentHandoff,omitempty"` 563 564 // LiveAgentHandoff: Hands off conversation to a human agent. 565 LiveAgentHandoff *GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"` 566 567 // MixedAudio: Output only. An audio response message composed of both 568 // the synthesized Dialogflow 569 // agent responses and responses defined via 570 // play_audio. 571 // This message is generated by Dialogflow only and not supposed to 572 // be 573 // defined by the user. 574 MixedAudio *GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio `json:"mixedAudio,omitempty"` 575 576 // OutputAudioText: A text or ssml response that is preferentially used 577 // for TTS output audio 578 // synthesis, as described in the comment on the ResponseMessage 579 // message. 580 OutputAudioText *GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText `json:"outputAudioText,omitempty"` 581 582 // Payload: Returns a response containing a custom, platform-specific 583 // payload. 584 Payload googleapi.RawMessage `json:"payload,omitempty"` 585 586 // PlayAudio: Signal that the client should play an audio clip hosted at 587 // a 588 // client-specific URI. Dialogflow uses this to construct 589 // mixed_audio. However, Dialogflow itself 590 // does not try to read or process the URI in any way. 591 PlayAudio *GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio `json:"playAudio,omitempty"` 592 593 // Text: Returns a text response. 594 Text *GoogleCloudDialogflowCxV3beta1ResponseMessageText `json:"text,omitempty"` 595 596 // ForceSendFields is a list of field names (e.g. "ConversationSuccess") 597 // to unconditionally include in API requests. By default, fields with 598 // empty values are omitted from API requests. However, any non-pointer, 599 // non-interface field appearing in ForceSendFields will be sent to the 600 // server regardless of whether the field is empty or not. This may be 601 // used to include empty fields in Patch requests. 602 ForceSendFields []string `json:"-"` 603 604 // NullFields is a list of field names (e.g. "ConversationSuccess") to 605 // include in API requests with the JSON null value. By default, fields 606 // with empty values are omitted from API requests. However, any field 607 // with an empty value appearing in NullFields will be sent to the 608 // server as null. It is an error if a field in this list has a 609 // non-empty value. This may be used to include null fields in Patch 610 // requests. 611 NullFields []string `json:"-"` 612} 613 614func (s *GoogleCloudDialogflowCxV3beta1ResponseMessage) MarshalJSON() ([]byte, error) { 615 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessage 616 raw := NoMethod(*s) 617 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 618} 619 620// GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess: 621// Indicates that the conversation succeeded, i.e., the bot handled the 622// issue 623// that the customer talked to it about. 624// 625// Dialogflow only uses this to determine which conversations should 626// be 627// counted as successful and doesn't process the metadata in this 628// message in 629// any way. Note that Dialogflow also considers conversations that get 630// to the 631// conversation end page as successful even if they don't 632// return 633// ConversationSuccess. 634// 635// You may set this, for example: 636// * In the entry_fulfillment of a Page if 637// entering the page indicates that the conversation succeeded. 638// * In a webhook response when you determine that you handled the 639// customer 640// issue. 641type GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess struct { 642 // Metadata: Custom metadata. Dialogflow doesn't impose any structure on 643 // this. 644 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 645 646 // ForceSendFields is a list of field names (e.g. "Metadata") to 647 // unconditionally include in API requests. By default, fields with 648 // empty values are omitted from API requests. However, any non-pointer, 649 // non-interface field appearing in ForceSendFields will be sent to the 650 // server regardless of whether the field is empty or not. This may be 651 // used to include empty fields in Patch requests. 652 ForceSendFields []string `json:"-"` 653 654 // NullFields is a list of field names (e.g. "Metadata") to include in 655 // API requests with the JSON null value. By default, fields with empty 656 // values are omitted from API requests. However, any field with an 657 // empty value appearing in NullFields will be sent to the server as 658 // null. It is an error if a field in this list has a non-empty value. 659 // This may be used to include null fields in Patch requests. 660 NullFields []string `json:"-"` 661} 662 663func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess) MarshalJSON() ([]byte, error) { 664 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess 665 raw := NoMethod(*s) 666 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 667} 668 669// GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction: 670// Indicates that interaction with the Dialogflow agent has ended. 671// This message is generated by Dialogflow only and not supposed to 672// be 673// defined by the user. 674type GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction struct { 675} 676 677// GoogleCloudDialogflowCxV3beta1ResponseMessageHumanAgentHandoff: 678// Indicates that the conversation should be handed off to a human 679// agent. 680// 681// Dialogflow only uses this to determine which conversations were 682// handed off 683// to a human agent for measurement purposes. What else to do with this 684// signal 685// is up to you and your handoff procedures. 686// 687// You may set this, for example: 688// * In the entry_fulfillment of a Page if 689// entering the page indicates something went extremely wrong in the 690// conversation. 691// * In a webhook response when you determine that the customer issue 692// can only 693// be handled by a human. 694type GoogleCloudDialogflowCxV3beta1ResponseMessageHumanAgentHandoff struct { 695 // Metadata: Custom metadata for your handoff procedure. Dialogflow 696 // doesn't impose 697 // any structure on this. 698 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 699 700 // ForceSendFields is a list of field names (e.g. "Metadata") to 701 // unconditionally include in API requests. By default, fields with 702 // empty values are omitted from API requests. However, any non-pointer, 703 // non-interface field appearing in ForceSendFields will be sent to the 704 // server regardless of whether the field is empty or not. This may be 705 // used to include empty fields in Patch requests. 706 ForceSendFields []string `json:"-"` 707 708 // NullFields is a list of field names (e.g. "Metadata") to include in 709 // API requests with the JSON null value. By default, fields with empty 710 // values are omitted from API requests. However, any field with an 711 // empty value appearing in NullFields will be sent to the server as 712 // null. It is an error if a field in this list has a non-empty value. 713 // This may be used to include null fields in Patch requests. 714 NullFields []string `json:"-"` 715} 716 717func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageHumanAgentHandoff) MarshalJSON() ([]byte, error) { 718 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageHumanAgentHandoff 719 raw := NoMethod(*s) 720 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 721} 722 723// GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff: 724// Indicates that the conversation should be handed off to a live 725// agent. 726// 727// Dialogflow only uses this to determine which conversations were 728// handed off 729// to a human agent for measurement purposes. What else to do with this 730// signal 731// is up to you and your handoff procedures. 732// 733// You may set this, for example: 734// * In the entry_fulfillment of a Page if 735// entering the page indicates something went extremely wrong in the 736// conversation. 737// * In a webhook response when you determine that the customer issue 738// can only 739// be handled by a human. 740type GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff struct { 741 // Metadata: Custom metadata for your handoff procedure. Dialogflow 742 // doesn't impose 743 // any structure on this. 744 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 745 746 // ForceSendFields is a list of field names (e.g. "Metadata") to 747 // unconditionally include in API requests. By default, fields with 748 // empty values are omitted from API requests. However, any non-pointer, 749 // non-interface field appearing in ForceSendFields will be sent to the 750 // server regardless of whether the field is empty or not. This may be 751 // used to include empty fields in Patch requests. 752 ForceSendFields []string `json:"-"` 753 754 // NullFields is a list of field names (e.g. "Metadata") to include in 755 // API requests with the JSON null value. By default, fields with empty 756 // values are omitted from API requests. However, any field with an 757 // empty value appearing in NullFields will be sent to the server as 758 // null. It is an error if a field in this list has a non-empty value. 759 // This may be used to include null fields in Patch requests. 760 NullFields []string `json:"-"` 761} 762 763func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff) MarshalJSON() ([]byte, error) { 764 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff 765 raw := NoMethod(*s) 766 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 767} 768 769// GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio: Represents 770// an audio message that is composed of both segments 771// synthesized from the Dialogflow agent prompts and ones hosted 772// externally 773// at the specified URIs. 774// The external URIs are specified via 775// play_audio. 776// This message is generated by Dialogflow only and not supposed to 777// be 778// defined by the user. 779type GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio struct { 780 // Segments: Segments this audio response is composed of. 781 Segments []*GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment `json:"segments,omitempty"` 782 783 // ForceSendFields is a list of field names (e.g. "Segments") to 784 // unconditionally include in API requests. By default, fields with 785 // empty values are omitted from API requests. However, any non-pointer, 786 // non-interface field appearing in ForceSendFields will be sent to the 787 // server regardless of whether the field is empty or not. This may be 788 // used to include empty fields in Patch requests. 789 ForceSendFields []string `json:"-"` 790 791 // NullFields is a list of field names (e.g. "Segments") to include in 792 // API requests with the JSON null value. By default, fields with empty 793 // values are omitted from API requests. However, any field with an 794 // empty value appearing in NullFields will be sent to the server as 795 // null. It is an error if a field in this list has a non-empty value. 796 // This may be used to include null fields in Patch requests. 797 NullFields []string `json:"-"` 798} 799 800func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio) MarshalJSON() ([]byte, error) { 801 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio 802 raw := NoMethod(*s) 803 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 804} 805 806// GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment: 807// Represents one segment of audio. 808type GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment struct { 809 // AllowPlaybackInterruption: Whether the playback of this segment can 810 // be interrupted by the end 811 // user's speech and the client should then start the next 812 // Dialogflow 813 // request. 814 AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` 815 816 // Audio: Raw audio synthesized from the Dialogflow agent's response 817 // using 818 // the output config specified in the request. 819 Audio string `json:"audio,omitempty"` 820 821 // Uri: Client-specific URI that points to an audio clip accessible to 822 // the 823 // client. Dialogflow does not impose any validation on it. 824 Uri string `json:"uri,omitempty"` 825 826 // ForceSendFields is a list of field names (e.g. 827 // "AllowPlaybackInterruption") to unconditionally include in API 828 // requests. By default, fields with empty values are omitted from API 829 // requests. However, any non-pointer, non-interface field appearing in 830 // ForceSendFields will be sent to the server regardless of whether the 831 // field is empty or not. This may be used to include empty fields in 832 // Patch requests. 833 ForceSendFields []string `json:"-"` 834 835 // NullFields is a list of field names (e.g. 836 // "AllowPlaybackInterruption") to include in API requests with the JSON 837 // null value. By default, fields with empty values are omitted from API 838 // requests. However, any field with an empty value appearing in 839 // NullFields will be sent to the server as null. It is an error if a 840 // field in this list has a non-empty value. This may be used to include 841 // null fields in Patch requests. 842 NullFields []string `json:"-"` 843} 844 845func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment) MarshalJSON() ([]byte, error) { 846 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment 847 raw := NoMethod(*s) 848 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 849} 850 851// GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText: A text 852// or ssml response that is preferentially used for TTS output 853// audio 854// synthesis, as described in the comment on the ResponseMessage 855// message. 856type GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText struct { 857 // Ssml: The SSML text to be synthesized. For more information, 858 // see 859 // [SSML](/speech/text-to-speech/docs/ssml). 860 Ssml string `json:"ssml,omitempty"` 861 862 // Text: The raw text to be synthesized. 863 Text string `json:"text,omitempty"` 864 865 // ForceSendFields is a list of field names (e.g. "Ssml") to 866 // unconditionally include in API requests. By default, fields with 867 // empty values are omitted from API requests. However, any non-pointer, 868 // non-interface field appearing in ForceSendFields will be sent to the 869 // server regardless of whether the field is empty or not. This may be 870 // used to include empty fields in Patch requests. 871 ForceSendFields []string `json:"-"` 872 873 // NullFields is a list of field names (e.g. "Ssml") to include in API 874 // requests with the JSON null value. By default, fields with empty 875 // values are omitted from API requests. However, any field with an 876 // empty value appearing in NullFields will be sent to the server as 877 // null. It is an error if a field in this list has a non-empty value. 878 // This may be used to include null fields in Patch requests. 879 NullFields []string `json:"-"` 880} 881 882func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText) MarshalJSON() ([]byte, error) { 883 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText 884 raw := NoMethod(*s) 885 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 886} 887 888// GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio: Specifies an 889// audio clip to be played by the client as part of the response. 890type GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio struct { 891 // AllowPlaybackInterruption: Whether the playback of this message can 892 // be interrupted by the end 893 // user's speech and the client can then starts the next 894 // Dialogflow 895 // request. 896 AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` 897 898 // AudioUri: Required. URI of the audio clip. Dialogflow does not impose 899 // any validation on this 900 // value. It is specific to the client that reads it. 901 AudioUri string `json:"audioUri,omitempty"` 902 903 // ForceSendFields is a list of field names (e.g. 904 // "AllowPlaybackInterruption") to unconditionally include in API 905 // requests. By default, fields with empty values are omitted from API 906 // requests. However, any non-pointer, non-interface field appearing in 907 // ForceSendFields will be sent to the server regardless of whether the 908 // field is empty or not. This may be used to include empty fields in 909 // Patch requests. 910 ForceSendFields []string `json:"-"` 911 912 // NullFields is a list of field names (e.g. 913 // "AllowPlaybackInterruption") to include in API requests with the JSON 914 // null value. By default, fields with empty values are omitted from API 915 // requests. However, any field with an empty value appearing in 916 // NullFields will be sent to the server as null. It is an error if a 917 // field in this list has a non-empty value. This may be used to include 918 // null fields in Patch requests. 919 NullFields []string `json:"-"` 920} 921 922func (s *GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio) MarshalJSON() ([]byte, error) { 923 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio 924 raw := NoMethod(*s) 925 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 926} 927 928// GoogleCloudDialogflowCxV3beta1ResponseMessageText: The text response 929// message. 930type GoogleCloudDialogflowCxV3beta1ResponseMessageText struct { 931 // AllowPlaybackInterruption: Whether the playback of this message can 932 // be interrupted by the end 933 // user's speech and the client can then starts the next 934 // Dialogflow 935 // request. 936 AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` 937 938 // Text: Required. A collection of text responses. 939 Text []string `json:"text,omitempty"` 940 941 // ForceSendFields is a list of field names (e.g. 942 // "AllowPlaybackInterruption") to unconditionally include in API 943 // requests. By default, fields with empty values are omitted from API 944 // requests. However, any non-pointer, non-interface field appearing in 945 // ForceSendFields will be sent to the server regardless of whether the 946 // field is empty or not. This may be used to include empty fields in 947 // Patch requests. 948 ForceSendFields []string `json:"-"` 949 950 // NullFields is a list of field names (e.g. 951 // "AllowPlaybackInterruption") to include in API requests with the JSON 952 // null value. By default, fields with empty values are omitted from API 953 // requests. However, any field with an empty value appearing in 954 // NullFields will be sent to the server as null. It is an error if a 955 // field in this list has a non-empty value. This may be used to include 956 // null fields in Patch requests. 957 NullFields []string `json:"-"` 958} 959 960func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageText) MarshalJSON() ([]byte, error) { 961 type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageText 962 raw := NoMethod(*s) 963 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 964} 965 966// GoogleCloudDialogflowCxV3beta1SessionInfo: Represents session 967// information communicated to and from the webhook. 968type GoogleCloudDialogflowCxV3beta1SessionInfo struct { 969 // Parameters: Optional for WebhookRequest. Optional for 970 // WebhookResponse. 971 // All parameters collected from forms and intents during the 972 // session. 973 // Parameters can be created, updated, or removed by the webhook. To 974 // remove a 975 // parameter from the session, the webhook should explicitly set the 976 // parameter 977 // value to null in WebhookResponse. The map is keyed by 978 // parameters' 979 // display names. 980 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 981 982 // Session: Always present for WebhookRequest. Ignored for 983 // WebhookResponse. 984 // The unique identifier of the session. This 985 // field can be used by the webhook to identify a user. 986 // Format: `projects/<Project ID>/locations/<Location 987 // ID>/agents/<Agent 988 // ID>/sessions/<Session ID>`. 989 Session string `json:"session,omitempty"` 990 991 // ForceSendFields is a list of field names (e.g. "Parameters") to 992 // unconditionally include in API requests. By default, fields with 993 // empty values are omitted from API requests. However, any non-pointer, 994 // non-interface field appearing in ForceSendFields will be sent to the 995 // server regardless of whether the field is empty or not. This may be 996 // used to include empty fields in Patch requests. 997 ForceSendFields []string `json:"-"` 998 999 // NullFields is a list of field names (e.g. "Parameters") to include in 1000 // API requests with the JSON null value. By default, fields with empty 1001 // values are omitted from API requests. However, any field with an 1002 // empty value appearing in NullFields will be sent to the server as 1003 // null. It is an error if a field in this list has a non-empty value. 1004 // This may be used to include null fields in Patch requests. 1005 NullFields []string `json:"-"` 1006} 1007 1008func (s *GoogleCloudDialogflowCxV3beta1SessionInfo) MarshalJSON() ([]byte, error) { 1009 type NoMethod GoogleCloudDialogflowCxV3beta1SessionInfo 1010 raw := NoMethod(*s) 1011 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1012} 1013 1014// GoogleCloudDialogflowCxV3beta1WebhookRequest: The request message for 1015// a webhook call. 1016type GoogleCloudDialogflowCxV3beta1WebhookRequest struct { 1017 // DetectIntentResponseId: Always present. The unique identifier of the 1018 // DetectIntentResponse that 1019 // will be returned to the API caller. 1020 DetectIntentResponseId string `json:"detectIntentResponseId,omitempty"` 1021 1022 // FulfillmentInfo: Always present. Information about the fulfillment 1023 // that triggered this 1024 // webhook call. 1025 FulfillmentInfo *GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo `json:"fulfillmentInfo,omitempty"` 1026 1027 // IntentInfo: Information about the last matched intent. 1028 IntentInfo *GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo `json:"intentInfo,omitempty"` 1029 1030 // Messages: The list of rich message responses to present to the user. 1031 // Webhook can 1032 // choose to append or replace this list 1033 // in 1034 // WebhookResponse.fulfillment_response; 1035 Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"` 1036 1037 // PageInfo: Information about page status. 1038 PageInfo *GoogleCloudDialogflowCxV3beta1PageInfo `json:"pageInfo,omitempty"` 1039 1040 // Payload: Custom data set in QueryParameters.payload. 1041 Payload googleapi.RawMessage `json:"payload,omitempty"` 1042 1043 // SessionInfo: Information about session status. 1044 SessionInfo *GoogleCloudDialogflowCxV3beta1SessionInfo `json:"sessionInfo,omitempty"` 1045 1046 // ForceSendFields is a list of field names (e.g. 1047 // "DetectIntentResponseId") to unconditionally include in API requests. 1048 // By default, fields with empty values are omitted from API requests. 1049 // However, any non-pointer, non-interface field appearing in 1050 // ForceSendFields will be sent to the server regardless of whether the 1051 // field is empty or not. This may be used to include empty fields in 1052 // Patch requests. 1053 ForceSendFields []string `json:"-"` 1054 1055 // NullFields is a list of field names (e.g. "DetectIntentResponseId") 1056 // to include in API requests with the JSON null value. By default, 1057 // fields with empty values are omitted from API requests. However, any 1058 // field with an empty value appearing in NullFields will be sent to the 1059 // server as null. It is an error if a field in this list has a 1060 // non-empty value. This may be used to include null fields in Patch 1061 // requests. 1062 NullFields []string `json:"-"` 1063} 1064 1065func (s *GoogleCloudDialogflowCxV3beta1WebhookRequest) MarshalJSON() ([]byte, error) { 1066 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequest 1067 raw := NoMethod(*s) 1068 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1069} 1070 1071// GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo: 1072// Represents fulfillment information communicated to the webhook. 1073type GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo struct { 1074 // Tag: Always present. The tag used to identify which fulfillment is 1075 // being 1076 // called. 1077 Tag string `json:"tag,omitempty"` 1078 1079 // ForceSendFields is a list of field names (e.g. "Tag") to 1080 // unconditionally include in API requests. By default, fields with 1081 // empty values are omitted from API requests. However, any non-pointer, 1082 // non-interface field appearing in ForceSendFields will be sent to the 1083 // server regardless of whether the field is empty or not. This may be 1084 // used to include empty fields in Patch requests. 1085 ForceSendFields []string `json:"-"` 1086 1087 // NullFields is a list of field names (e.g. "Tag") to include in API 1088 // requests with the JSON null value. By default, fields with empty 1089 // values are omitted from API requests. However, any field with an 1090 // empty value appearing in NullFields will be sent to the server as 1091 // null. It is an error if a field in this list has a non-empty value. 1092 // This may be used to include null fields in Patch requests. 1093 NullFields []string `json:"-"` 1094} 1095 1096func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo) MarshalJSON() ([]byte, error) { 1097 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo 1098 raw := NoMethod(*s) 1099 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1100} 1101 1102// GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo: Represents 1103// intent information communicated to the webhook. 1104type GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo struct { 1105 // LastMatchedIntent: Always present. The unique identifier of the last 1106 // matched 1107 // intent. Format: `projects/<Project 1108 // ID>/locations/<Location 1109 // ID>/agents/<Agent ID>/intents/<Intent ID>`. 1110 LastMatchedIntent string `json:"lastMatchedIntent,omitempty"` 1111 1112 // Parameters: Parameters identified as a result of intent matching. 1113 // This is a map of 1114 // the name of the identified parameter to the value of the 1115 // parameter 1116 // identified from the user's utterance. All parameters defined in 1117 // the 1118 // matched intent that are identified will be surfaced here. 1119 Parameters map[string]GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue `json:"parameters,omitempty"` 1120 1121 // ForceSendFields is a list of field names (e.g. "LastMatchedIntent") 1122 // to unconditionally include in API requests. By default, fields with 1123 // empty values are omitted from API requests. However, any non-pointer, 1124 // non-interface field appearing in ForceSendFields will be sent to the 1125 // server regardless of whether the field is empty or not. This may be 1126 // used to include empty fields in Patch requests. 1127 ForceSendFields []string `json:"-"` 1128 1129 // NullFields is a list of field names (e.g. "LastMatchedIntent") to 1130 // include in API requests with the JSON null value. By default, fields 1131 // with empty values are omitted from API requests. However, any field 1132 // with an empty value appearing in NullFields will be sent to the 1133 // server as null. It is an error if a field in this list has a 1134 // non-empty value. This may be used to include null fields in Patch 1135 // requests. 1136 NullFields []string `json:"-"` 1137} 1138 1139func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo) MarshalJSON() ([]byte, error) { 1140 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo 1141 raw := NoMethod(*s) 1142 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1143} 1144 1145// GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterV 1146// alue: Represents a value for an intent parameter. 1147type GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue struct { 1148 // OriginalValue: Always present. Original text value extracted from 1149 // user utterance. 1150 OriginalValue string `json:"originalValue,omitempty"` 1151 1152 // ResolvedValue: Always present. Structured value for the parameter 1153 // extracted from user 1154 // utterance. 1155 ResolvedValue interface{} `json:"resolvedValue,omitempty"` 1156 1157 // ForceSendFields is a list of field names (e.g. "OriginalValue") to 1158 // unconditionally include in API requests. By default, fields with 1159 // empty values are omitted from API requests. However, any non-pointer, 1160 // non-interface field appearing in ForceSendFields will be sent to the 1161 // server regardless of whether the field is empty or not. This may be 1162 // used to include empty fields in Patch requests. 1163 ForceSendFields []string `json:"-"` 1164 1165 // NullFields is a list of field names (e.g. "OriginalValue") to include 1166 // in API requests with the JSON null value. By default, fields with 1167 // empty values are omitted from API requests. However, any field with 1168 // an empty value appearing in NullFields will be sent to the server as 1169 // null. It is an error if a field in this list has a non-empty value. 1170 // This may be used to include null fields in Patch requests. 1171 NullFields []string `json:"-"` 1172} 1173 1174func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue) MarshalJSON() ([]byte, error) { 1175 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue 1176 raw := NoMethod(*s) 1177 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1178} 1179 1180// GoogleCloudDialogflowCxV3beta1WebhookResponse: The response message 1181// for a webhook call. 1182type GoogleCloudDialogflowCxV3beta1WebhookResponse struct { 1183 // FulfillmentResponse: The fulfillment response to send to the user. 1184 // This field can be omitted by 1185 // the webhook if it does not intend to send any response to the user. 1186 FulfillmentResponse *GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse `json:"fulfillmentResponse,omitempty"` 1187 1188 // PageInfo: Information about page status. This field can be omitted by 1189 // the webhook if 1190 // it does not intend to modify page status. 1191 PageInfo *GoogleCloudDialogflowCxV3beta1PageInfo `json:"pageInfo,omitempty"` 1192 1193 // Payload: Value to append directly to QueryResult.webhook_payloads. 1194 Payload googleapi.RawMessage `json:"payload,omitempty"` 1195 1196 // SessionInfo: Information about session status. This field can be 1197 // omitted by the webhook 1198 // if it does not intend to modify session status. 1199 SessionInfo *GoogleCloudDialogflowCxV3beta1SessionInfo `json:"sessionInfo,omitempty"` 1200 1201 // TargetFlow: The target flow to transition to. 1202 // Format: `projects/<Project ID>/locations/<Location 1203 // ID>/agents/<Agent 1204 // ID>/flows/<Flow ID>`. 1205 TargetFlow string `json:"targetFlow,omitempty"` 1206 1207 // TargetPage: The target page to transition to. 1208 // Format: `projects/<Project ID>/locations/<Location 1209 // ID>/agents/<Agent 1210 // ID>/flows/<Flow ID>/pages/<Page ID>`. 1211 TargetPage string `json:"targetPage,omitempty"` 1212 1213 // ForceSendFields is a list of field names (e.g. "FulfillmentResponse") 1214 // to unconditionally include in API requests. By default, fields with 1215 // empty values are omitted from API requests. However, any non-pointer, 1216 // non-interface field appearing in ForceSendFields will be sent to the 1217 // server regardless of whether the field is empty or not. This may be 1218 // used to include empty fields in Patch requests. 1219 ForceSendFields []string `json:"-"` 1220 1221 // NullFields is a list of field names (e.g. "FulfillmentResponse") to 1222 // include in API requests with the JSON null value. By default, fields 1223 // with empty values are omitted from API requests. However, any field 1224 // with an empty value appearing in NullFields will be sent to the 1225 // server as null. It is an error if a field in this list has a 1226 // non-empty value. This may be used to include null fields in Patch 1227 // requests. 1228 NullFields []string `json:"-"` 1229} 1230 1231func (s *GoogleCloudDialogflowCxV3beta1WebhookResponse) MarshalJSON() ([]byte, error) { 1232 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookResponse 1233 raw := NoMethod(*s) 1234 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1235} 1236 1237// GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse: 1238// Represents a fulfillment response to the user. 1239type GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse struct { 1240 // MergeBehavior: Merge behavior for `messages`. 1241 // 1242 // Possible values: 1243 // "MERGE_BEHAVIOR_UNSPECIFIED" - Not specified. `APPEND` will be 1244 // used. 1245 // "APPEND" - `messages` will be appended to the list of messages 1246 // waiting to be sent 1247 // to the user. 1248 // "REPLACE" - `messages` will replace the list of messages waiting to 1249 // be sent to the 1250 // user. 1251 MergeBehavior string `json:"mergeBehavior,omitempty"` 1252 1253 // Messages: The list of rich message responses to present to the user. 1254 Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"` 1255 1256 // ForceSendFields is a list of field names (e.g. "MergeBehavior") to 1257 // unconditionally include in API requests. By default, fields with 1258 // empty values are omitted from API requests. However, any non-pointer, 1259 // non-interface field appearing in ForceSendFields will be sent to the 1260 // server regardless of whether the field is empty or not. This may be 1261 // used to include empty fields in Patch requests. 1262 ForceSendFields []string `json:"-"` 1263 1264 // NullFields is a list of field names (e.g. "MergeBehavior") to include 1265 // in API requests with the JSON null value. By default, fields with 1266 // empty values are omitted from API requests. However, any field with 1267 // an empty value appearing in NullFields will be sent to the server as 1268 // null. It is an error if a field in this list has a non-empty value. 1269 // This may be used to include null fields in Patch requests. 1270 NullFields []string `json:"-"` 1271} 1272 1273func (s *GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse) MarshalJSON() ([]byte, error) { 1274 type NoMethod GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse 1275 raw := NoMethod(*s) 1276 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1277} 1278 1279// GoogleCloudDialogflowV2Agent: A Dialogflow agent is a virtual agent 1280// that handles conversations with your 1281// end-users. It is a natural language understanding module that 1282// understands the 1283// nuances of human language. Dialogflow translates end-user text or 1284// audio 1285// during a conversation to structured data that your apps and services 1286// can 1287// understand. You design and build a Dialogflow agent to handle the 1288// types of 1289// conversations required for your system. 1290// 1291// For more information about agents, see 1292// the 1293// [Agents 1294// documentation](https://cloud.google.com/dialogflow/docs/ag 1295// ents-overview). 1296type GoogleCloudDialogflowV2Agent struct { 1297 // ApiVersion: Optional. API version displayed in Dialogflow console. If 1298 // not specified, 1299 // V2 API is assumed. Clients are free to query different service 1300 // endpoints 1301 // for different API versions. However, bots connectors and webhook 1302 // calls will 1303 // follow the specified API version. 1304 // 1305 // Possible values: 1306 // "API_VERSION_UNSPECIFIED" - Not specified. 1307 // "API_VERSION_V1" - Legacy V1 API. 1308 // "API_VERSION_V2" - V2 API. 1309 // "API_VERSION_V2_BETA_1" - V2beta1 API. 1310 ApiVersion string `json:"apiVersion,omitempty"` 1311 1312 // AvatarUri: Optional. The URI of the agent's avatar. 1313 // Avatars are used throughout the Dialogflow console and in the 1314 // self-hosted 1315 // [Web 1316 // Demo](https://cloud.google.com/dialogflow/docs/integr 1317 // ations/web-demo) 1318 // integration. 1319 AvatarUri string `json:"avatarUri,omitempty"` 1320 1321 // ClassificationThreshold: Optional. To filter out false positive 1322 // results and still get variety in 1323 // matched natural language inputs for your agent, you can tune the 1324 // machine 1325 // learning classification threshold. If the returned score value is 1326 // less than 1327 // the threshold value, then a fallback intent will be triggered or, if 1328 // there 1329 // are no fallback intents defined, no intent will be triggered. The 1330 // score 1331 // values range from 0.0 (completely uncertain) to 1.0 (completely 1332 // certain). 1333 // If set to 0.0, the default of 0.3 is used. 1334 ClassificationThreshold float64 `json:"classificationThreshold,omitempty"` 1335 1336 // DefaultLanguageCode: Required. The default language of the agent as a 1337 // language tag. 1338 // See 1339 // [Language 1340 // Support](https://cloud.google.com/dialogflow/docs/refere 1341 // nce/language) 1342 // for a list of the currently supported language codes. This field 1343 // cannot be 1344 // set by the `Update` method. 1345 DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` 1346 1347 // Description: Optional. The description of this agent. 1348 // The maximum length is 500 characters. If exceeded, the request is 1349 // rejected. 1350 Description string `json:"description,omitempty"` 1351 1352 // DisplayName: Required. The name of this agent. 1353 DisplayName string `json:"displayName,omitempty"` 1354 1355 // EnableLogging: Optional. Determines whether this agent should log 1356 // conversation queries. 1357 EnableLogging bool `json:"enableLogging,omitempty"` 1358 1359 // MatchMode: Optional. Determines how intents are detected from user 1360 // queries. 1361 // 1362 // Possible values: 1363 // "MATCH_MODE_UNSPECIFIED" - Not specified. 1364 // "MATCH_MODE_HYBRID" - Best for agents with a small number of 1365 // examples in intents and/or wide 1366 // use of templates syntax and composite entities. 1367 // "MATCH_MODE_ML_ONLY" - Can be used for agents with a large number 1368 // of examples in intents, 1369 // especially the ones using @sys.any or very large custom entities. 1370 MatchMode string `json:"matchMode,omitempty"` 1371 1372 // Parent: Required. The project of this agent. 1373 // Format: `projects/<Project ID>`. 1374 Parent string `json:"parent,omitempty"` 1375 1376 // SupportedLanguageCodes: Optional. The list of all languages supported 1377 // by this agent (except for the 1378 // `default_language_code`). 1379 SupportedLanguageCodes []string `json:"supportedLanguageCodes,omitempty"` 1380 1381 // Tier: Optional. The agent tier. If not specified, TIER_STANDARD is 1382 // assumed. 1383 // 1384 // Possible values: 1385 // "TIER_UNSPECIFIED" - Not specified. This value should never be 1386 // used. 1387 // "TIER_STANDARD" - Standard tier. 1388 // "TIER_ENTERPRISE" - Enterprise tier (Essentials). 1389 // "TIER_ENTERPRISE_PLUS" - Enterprise tier (Plus). 1390 Tier string `json:"tier,omitempty"` 1391 1392 // TimeZone: Required. The time zone of this agent from the 1393 // [time zone database](https://www.iana.org/time-zones), 1394 // e.g., 1395 // America/New_York, Europe/Paris. 1396 TimeZone string `json:"timeZone,omitempty"` 1397 1398 // ServerResponse contains the HTTP response code and headers from the 1399 // server. 1400 googleapi.ServerResponse `json:"-"` 1401 1402 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1403 // unconditionally include in API requests. By default, fields with 1404 // empty values are omitted from API requests. However, any non-pointer, 1405 // non-interface field appearing in ForceSendFields will be sent to the 1406 // server regardless of whether the field is empty or not. This may be 1407 // used to include empty fields in Patch requests. 1408 ForceSendFields []string `json:"-"` 1409 1410 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1411 // API requests with the JSON null value. By default, fields with empty 1412 // values are omitted from API requests. However, any field with an 1413 // empty value appearing in NullFields will be sent to the server as 1414 // null. It is an error if a field in this list has a non-empty value. 1415 // This may be used to include null fields in Patch requests. 1416 NullFields []string `json:"-"` 1417} 1418 1419func (s *GoogleCloudDialogflowV2Agent) MarshalJSON() ([]byte, error) { 1420 type NoMethod GoogleCloudDialogflowV2Agent 1421 raw := NoMethod(*s) 1422 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1423} 1424 1425func (s *GoogleCloudDialogflowV2Agent) UnmarshalJSON(data []byte) error { 1426 type NoMethod GoogleCloudDialogflowV2Agent 1427 var s1 struct { 1428 ClassificationThreshold gensupport.JSONFloat64 `json:"classificationThreshold"` 1429 *NoMethod 1430 } 1431 s1.NoMethod = (*NoMethod)(s) 1432 if err := json.Unmarshal(data, &s1); err != nil { 1433 return err 1434 } 1435 s.ClassificationThreshold = float64(s1.ClassificationThreshold) 1436 return nil 1437} 1438 1439// GoogleCloudDialogflowV2AnnotatedMessagePart: Represents a part of a 1440// message possibly annotated with an entity. The part 1441// can be an entity or purely a part of the message between two entities 1442// or 1443// message start/end. 1444type GoogleCloudDialogflowV2AnnotatedMessagePart struct { 1445 // EntityType: The [Dialogflow system 1446 // entity 1447 // type](https://cloud.google.com/dialogflow/docs/reference/system 1448 // -entities) 1449 // of this message part. If this is empty, Dialogflow could not annotate 1450 // the 1451 // phrase part with a system entity. 1452 EntityType string `json:"entityType,omitempty"` 1453 1454 // FormattedValue: The [Dialogflow system entity formatted 1455 // value 1456 // ](https://cloud.google.com/dialogflow/docs/reference/system-enti 1457 // ties) of 1458 // this message part. For example for a system entity of 1459 // type 1460 // `@sys.unit-currency`, this may contain: 1461 // <pre> 1462 // { 1463 // "amount": 5, 1464 // "currency": "USD" 1465 // } 1466 // </pre> 1467 FormattedValue interface{} `json:"formattedValue,omitempty"` 1468 1469 // Text: A part of a message possibly annotated with an entity. 1470 Text string `json:"text,omitempty"` 1471 1472 // ForceSendFields is a list of field names (e.g. "EntityType") to 1473 // unconditionally include in API requests. By default, fields with 1474 // empty values are omitted from API requests. However, any non-pointer, 1475 // non-interface field appearing in ForceSendFields will be sent to the 1476 // server regardless of whether the field is empty or not. This may be 1477 // used to include empty fields in Patch requests. 1478 ForceSendFields []string `json:"-"` 1479 1480 // NullFields is a list of field names (e.g. "EntityType") to include in 1481 // API requests with the JSON null value. By default, fields with empty 1482 // values are omitted from API requests. However, any field with an 1483 // empty value appearing in NullFields will be sent to the server as 1484 // null. It is an error if a field in this list has a non-empty value. 1485 // This may be used to include null fields in Patch requests. 1486 NullFields []string `json:"-"` 1487} 1488 1489func (s *GoogleCloudDialogflowV2AnnotatedMessagePart) MarshalJSON() ([]byte, error) { 1490 type NoMethod GoogleCloudDialogflowV2AnnotatedMessagePart 1491 raw := NoMethod(*s) 1492 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1493} 1494 1495// GoogleCloudDialogflowV2BatchCreateEntitiesRequest: The request 1496// message for EntityTypes.BatchCreateEntities. 1497type GoogleCloudDialogflowV2BatchCreateEntitiesRequest struct { 1498 // Entities: Required. The entities to create. 1499 Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"` 1500 1501 // LanguageCode: Optional. The language used to access language-specific 1502 // data. 1503 // If not specified, the agent's default language is used. 1504 // For more information, see 1505 // [Multilingual intent and 1506 // entity 1507 // data](https://cloud.google.com/dialogflow/docs/agents-multiling 1508 // ual#intent-entity). 1509 LanguageCode string `json:"languageCode,omitempty"` 1510 1511 // ForceSendFields is a list of field names (e.g. "Entities") to 1512 // unconditionally include in API requests. By default, fields with 1513 // empty values are omitted from API requests. However, any non-pointer, 1514 // non-interface field appearing in ForceSendFields will be sent to the 1515 // server regardless of whether the field is empty or not. This may be 1516 // used to include empty fields in Patch requests. 1517 ForceSendFields []string `json:"-"` 1518 1519 // NullFields is a list of field names (e.g. "Entities") to include in 1520 // API requests with the JSON null value. By default, fields with empty 1521 // values are omitted from API requests. However, any field with an 1522 // empty value appearing in NullFields will be sent to the server as 1523 // null. It is an error if a field in this list has a non-empty value. 1524 // This may be used to include null fields in Patch requests. 1525 NullFields []string `json:"-"` 1526} 1527 1528func (s *GoogleCloudDialogflowV2BatchCreateEntitiesRequest) MarshalJSON() ([]byte, error) { 1529 type NoMethod GoogleCloudDialogflowV2BatchCreateEntitiesRequest 1530 raw := NoMethod(*s) 1531 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1532} 1533 1534// GoogleCloudDialogflowV2BatchDeleteEntitiesRequest: The request 1535// message for EntityTypes.BatchDeleteEntities. 1536type GoogleCloudDialogflowV2BatchDeleteEntitiesRequest struct { 1537 // EntityValues: Required. The reference `values` of the entities to 1538 // delete. Note that 1539 // these are not fully-qualified names, i.e. they don't start 1540 // with 1541 // `projects/<Project ID>`. 1542 EntityValues []string `json:"entityValues,omitempty"` 1543 1544 // LanguageCode: Optional. The language used to access language-specific 1545 // data. 1546 // If not specified, the agent's default language is used. 1547 // For more information, see 1548 // [Multilingual intent and 1549 // entity 1550 // data](https://cloud.google.com/dialogflow/docs/agents-multiling 1551 // ual#intent-entity). 1552 LanguageCode string `json:"languageCode,omitempty"` 1553 1554 // ForceSendFields is a list of field names (e.g. "EntityValues") to 1555 // unconditionally include in API requests. By default, fields with 1556 // empty values are omitted from API requests. However, any non-pointer, 1557 // non-interface field appearing in ForceSendFields will be sent to the 1558 // server regardless of whether the field is empty or not. This may be 1559 // used to include empty fields in Patch requests. 1560 ForceSendFields []string `json:"-"` 1561 1562 // NullFields is a list of field names (e.g. "EntityValues") to include 1563 // in API requests with the JSON null value. By default, fields with 1564 // empty values are omitted from API requests. However, any field with 1565 // an empty value appearing in NullFields will be sent to the server as 1566 // null. It is an error if a field in this list has a non-empty value. 1567 // This may be used to include null fields in Patch requests. 1568 NullFields []string `json:"-"` 1569} 1570 1571func (s *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest) MarshalJSON() ([]byte, error) { 1572 type NoMethod GoogleCloudDialogflowV2BatchDeleteEntitiesRequest 1573 raw := NoMethod(*s) 1574 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1575} 1576 1577// GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest: The request 1578// message for EntityTypes.BatchDeleteEntityTypes. 1579type GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest struct { 1580 // EntityTypeNames: Required. The names entity types to delete. All 1581 // names must point to the 1582 // same agent as `parent`. 1583 EntityTypeNames []string `json:"entityTypeNames,omitempty"` 1584 1585 // ForceSendFields is a list of field names (e.g. "EntityTypeNames") to 1586 // unconditionally include in API requests. By default, fields with 1587 // empty values are omitted from API requests. However, any non-pointer, 1588 // non-interface field appearing in ForceSendFields will be sent to the 1589 // server regardless of whether the field is empty or not. This may be 1590 // used to include empty fields in Patch requests. 1591 ForceSendFields []string `json:"-"` 1592 1593 // NullFields is a list of field names (e.g. "EntityTypeNames") to 1594 // include in API requests with the JSON null value. By default, fields 1595 // with empty values are omitted from API requests. However, any field 1596 // with an empty value appearing in NullFields will be sent to the 1597 // server as null. It is an error if a field in this list has a 1598 // non-empty value. This may be used to include null fields in Patch 1599 // requests. 1600 NullFields []string `json:"-"` 1601} 1602 1603func (s *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest) MarshalJSON() ([]byte, error) { 1604 type NoMethod GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest 1605 raw := NoMethod(*s) 1606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1607} 1608 1609// GoogleCloudDialogflowV2BatchDeleteIntentsRequest: The request message 1610// for Intents.BatchDeleteIntents. 1611type GoogleCloudDialogflowV2BatchDeleteIntentsRequest struct { 1612 // Intents: Required. The collection of intents to delete. Only intent 1613 // `name` must be 1614 // filled in. 1615 Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"` 1616 1617 // ForceSendFields is a list of field names (e.g. "Intents") to 1618 // unconditionally include in API requests. By default, fields with 1619 // empty values are omitted from API requests. However, any non-pointer, 1620 // non-interface field appearing in ForceSendFields will be sent to the 1621 // server regardless of whether the field is empty or not. This may be 1622 // used to include empty fields in Patch requests. 1623 ForceSendFields []string `json:"-"` 1624 1625 // NullFields is a list of field names (e.g. "Intents") to include in 1626 // API requests with the JSON null value. By default, fields with empty 1627 // values are omitted from API requests. However, any field with an 1628 // empty value appearing in NullFields will be sent to the server as 1629 // null. It is an error if a field in this list has a non-empty value. 1630 // This may be used to include null fields in Patch requests. 1631 NullFields []string `json:"-"` 1632} 1633 1634func (s *GoogleCloudDialogflowV2BatchDeleteIntentsRequest) MarshalJSON() ([]byte, error) { 1635 type NoMethod GoogleCloudDialogflowV2BatchDeleteIntentsRequest 1636 raw := NoMethod(*s) 1637 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1638} 1639 1640// GoogleCloudDialogflowV2BatchUpdateEntitiesRequest: The request 1641// message for EntityTypes.BatchUpdateEntities. 1642type GoogleCloudDialogflowV2BatchUpdateEntitiesRequest struct { 1643 // Entities: Required. The entities to update or create. 1644 Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"` 1645 1646 // LanguageCode: Optional. The language used to access language-specific 1647 // data. 1648 // If not specified, the agent's default language is used. 1649 // For more information, see 1650 // [Multilingual intent and 1651 // entity 1652 // data](https://cloud.google.com/dialogflow/docs/agents-multiling 1653 // ual#intent-entity). 1654 LanguageCode string `json:"languageCode,omitempty"` 1655 1656 // UpdateMask: Optional. The mask to control which fields get updated. 1657 UpdateMask string `json:"updateMask,omitempty"` 1658 1659 // ForceSendFields is a list of field names (e.g. "Entities") to 1660 // unconditionally include in API requests. By default, fields with 1661 // empty values are omitted from API requests. However, any non-pointer, 1662 // non-interface field appearing in ForceSendFields will be sent to the 1663 // server regardless of whether the field is empty or not. This may be 1664 // used to include empty fields in Patch requests. 1665 ForceSendFields []string `json:"-"` 1666 1667 // NullFields is a list of field names (e.g. "Entities") to include in 1668 // API requests with the JSON null value. By default, fields with empty 1669 // values are omitted from API requests. However, any field with an 1670 // empty value appearing in NullFields will be sent to the server as 1671 // null. It is an error if a field in this list has a non-empty value. 1672 // This may be used to include null fields in Patch requests. 1673 NullFields []string `json:"-"` 1674} 1675 1676func (s *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest) MarshalJSON() ([]byte, error) { 1677 type NoMethod GoogleCloudDialogflowV2BatchUpdateEntitiesRequest 1678 raw := NoMethod(*s) 1679 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1680} 1681 1682// GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest: The request 1683// message for EntityTypes.BatchUpdateEntityTypes. 1684type GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest struct { 1685 // EntityTypeBatchInline: The collection of entity types to update or 1686 // create. 1687 EntityTypeBatchInline *GoogleCloudDialogflowV2EntityTypeBatch `json:"entityTypeBatchInline,omitempty"` 1688 1689 // EntityTypeBatchUri: The URI to a Google Cloud Storage file containing 1690 // entity types to update 1691 // or create. The file format can either be a serialized proto 1692 // (of 1693 // EntityBatch type) or a JSON object. Note: The URI must start 1694 // with 1695 // "gs://". 1696 EntityTypeBatchUri string `json:"entityTypeBatchUri,omitempty"` 1697 1698 // LanguageCode: Optional. The language used to access language-specific 1699 // data. 1700 // If not specified, the agent's default language is used. 1701 // For more information, see 1702 // [Multilingual intent and 1703 // entity 1704 // data](https://cloud.google.com/dialogflow/docs/agents-multiling 1705 // ual#intent-entity). 1706 LanguageCode string `json:"languageCode,omitempty"` 1707 1708 // UpdateMask: Optional. The mask to control which fields get updated. 1709 UpdateMask string `json:"updateMask,omitempty"` 1710 1711 // ForceSendFields is a list of field names (e.g. 1712 // "EntityTypeBatchInline") to unconditionally include in API requests. 1713 // By default, fields with empty values are omitted from API requests. 1714 // However, any non-pointer, non-interface field appearing in 1715 // ForceSendFields will be sent to the server regardless of whether the 1716 // field is empty or not. This may be used to include empty fields in 1717 // Patch requests. 1718 ForceSendFields []string `json:"-"` 1719 1720 // NullFields is a list of field names (e.g. "EntityTypeBatchInline") to 1721 // include in API requests with the JSON null value. By default, fields 1722 // with empty values are omitted from API requests. However, any field 1723 // with an empty value appearing in NullFields will be sent to the 1724 // server as null. It is an error if a field in this list has a 1725 // non-empty value. This may be used to include null fields in Patch 1726 // requests. 1727 NullFields []string `json:"-"` 1728} 1729 1730func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest) MarshalJSON() ([]byte, error) { 1731 type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest 1732 raw := NoMethod(*s) 1733 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1734} 1735 1736// GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse: The response 1737// message for EntityTypes.BatchUpdateEntityTypes. 1738type GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse struct { 1739 // EntityTypes: The collection of updated or created entity types. 1740 EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"` 1741 1742 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 1743 // unconditionally include in API requests. By default, fields with 1744 // empty values are omitted from API requests. However, any non-pointer, 1745 // non-interface field appearing in ForceSendFields will be sent to the 1746 // server regardless of whether the field is empty or not. This may be 1747 // used to include empty fields in Patch requests. 1748 ForceSendFields []string `json:"-"` 1749 1750 // NullFields is a list of field names (e.g. "EntityTypes") to include 1751 // in API requests with the JSON null value. By default, fields with 1752 // empty values are omitted from API requests. However, any field with 1753 // an empty value appearing in NullFields will be sent to the server as 1754 // null. It is an error if a field in this list has a non-empty value. 1755 // This may be used to include null fields in Patch requests. 1756 NullFields []string `json:"-"` 1757} 1758 1759func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) { 1760 type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse 1761 raw := NoMethod(*s) 1762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1763} 1764 1765type GoogleCloudDialogflowV2BatchUpdateIntentsRequest struct { 1766 // IntentBatchInline: The collection of intents to update or create. 1767 IntentBatchInline *GoogleCloudDialogflowV2IntentBatch `json:"intentBatchInline,omitempty"` 1768 1769 // IntentBatchUri: The URI to a Google Cloud Storage file containing 1770 // intents to update or 1771 // create. The file format can either be a serialized proto (of 1772 // IntentBatch 1773 // type) or JSON object. Note: The URI must start with "gs://". 1774 IntentBatchUri string `json:"intentBatchUri,omitempty"` 1775 1776 // IntentView: Optional. The resource view to apply to the returned 1777 // intent. 1778 // 1779 // Possible values: 1780 // "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated 1781 // in the response. 1782 // "INTENT_VIEW_FULL" - All fields are populated. 1783 IntentView string `json:"intentView,omitempty"` 1784 1785 // LanguageCode: Optional. The language used to access language-specific 1786 // data. 1787 // If not specified, the agent's default language is used. 1788 // For more information, see 1789 // [Multilingual intent and 1790 // entity 1791 // data](https://cloud.google.com/dialogflow/docs/agents-multiling 1792 // ual#intent-entity). 1793 LanguageCode string `json:"languageCode,omitempty"` 1794 1795 // UpdateMask: Optional. The mask to control which fields get updated. 1796 UpdateMask string `json:"updateMask,omitempty"` 1797 1798 // ForceSendFields is a list of field names (e.g. "IntentBatchInline") 1799 // to unconditionally include in API requests. By default, fields with 1800 // empty values are omitted from API requests. However, any non-pointer, 1801 // non-interface field appearing in ForceSendFields will be sent to the 1802 // server regardless of whether the field is empty or not. This may be 1803 // used to include empty fields in Patch requests. 1804 ForceSendFields []string `json:"-"` 1805 1806 // NullFields is a list of field names (e.g. "IntentBatchInline") to 1807 // include in API requests with the JSON null value. By default, fields 1808 // with empty values are omitted from API requests. However, any field 1809 // with an empty value appearing in NullFields will be sent to the 1810 // server as null. It is an error if a field in this list has a 1811 // non-empty value. This may be used to include null fields in Patch 1812 // requests. 1813 NullFields []string `json:"-"` 1814} 1815 1816func (s *GoogleCloudDialogflowV2BatchUpdateIntentsRequest) MarshalJSON() ([]byte, error) { 1817 type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsRequest 1818 raw := NoMethod(*s) 1819 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1820} 1821 1822// GoogleCloudDialogflowV2BatchUpdateIntentsResponse: The response 1823// message for Intents.BatchUpdateIntents. 1824type GoogleCloudDialogflowV2BatchUpdateIntentsResponse struct { 1825 // Intents: The collection of updated or created intents. 1826 Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"` 1827 1828 // ForceSendFields is a list of field names (e.g. "Intents") to 1829 // unconditionally include in API requests. By default, fields with 1830 // empty values are omitted from API requests. However, any non-pointer, 1831 // non-interface field appearing in ForceSendFields will be sent to the 1832 // server regardless of whether the field is empty or not. This may be 1833 // used to include empty fields in Patch requests. 1834 ForceSendFields []string `json:"-"` 1835 1836 // NullFields is a list of field names (e.g. "Intents") to include in 1837 // API requests with the JSON null value. By default, fields with empty 1838 // values are omitted from API requests. However, any field with an 1839 // empty value appearing in NullFields will be sent to the server as 1840 // null. It is an error if a field in this list has a non-empty value. 1841 // This may be used to include null fields in Patch requests. 1842 NullFields []string `json:"-"` 1843} 1844 1845func (s *GoogleCloudDialogflowV2BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) { 1846 type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsResponse 1847 raw := NoMethod(*s) 1848 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1849} 1850 1851// GoogleCloudDialogflowV2Context: Represents a context. 1852type GoogleCloudDialogflowV2Context struct { 1853 // LifespanCount: Optional. The number of conversational query requests 1854 // after which the 1855 // context expires. The default is `0`. If set to `0`, the context 1856 // expires 1857 // immediately. Contexts expire automatically after 20 minutes if 1858 // there 1859 // are no matching queries. 1860 LifespanCount int64 `json:"lifespanCount,omitempty"` 1861 1862 // Name: Required. The unique identifier of the context. 1863 // Format: 1864 // `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context 1865 // ID>`, 1866 // or `projects/<Project ID>/agent/environments/<Environment 1867 // ID>/users/<User 1868 // ID>/sessions/<Session ID>/contexts/<Context ID>`. 1869 // 1870 // The `Context ID` is always converted to lowercase, may only 1871 // contain 1872 // characters in a-zA-Z0-9_-% and may be at most 250 bytes long. 1873 // 1874 // If `Environment ID` is not specified, we assume default 1875 // 'draft' 1876 // environment. If `User ID` is not specified, we assume default '-' 1877 // user. 1878 // 1879 // The following context names are reserved for internal use by 1880 // Dialogflow. 1881 // You should not use these contexts or create contexts with these 1882 // names: 1883 // 1884 // * `__system_counters__` 1885 // * `*_id_dialog_context` 1886 // * `*_dialog_params_size` 1887 Name string `json:"name,omitempty"` 1888 1889 // Parameters: Optional. The collection of parameters associated with 1890 // this context. 1891 // 1892 // Depending on your protocol or client library language, this is a 1893 // map, associative array, symbol table, dictionary, or JSON 1894 // object 1895 // composed of a collection of (MapKey, MapValue) pairs: 1896 // 1897 // - MapKey type: string 1898 // - MapKey value: parameter name 1899 // - MapValue type: 1900 // - If parameter's entity type is a composite entity: map 1901 // - Else: string or number, depending on parameter value type 1902 // - MapValue value: 1903 // - If parameter's entity type is a composite entity: 1904 // map from composite entity property names to property values 1905 // - Else: parameter value 1906 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 1907 1908 // ServerResponse contains the HTTP response code and headers from the 1909 // server. 1910 googleapi.ServerResponse `json:"-"` 1911 1912 // ForceSendFields is a list of field names (e.g. "LifespanCount") to 1913 // unconditionally include in API requests. By default, fields with 1914 // empty values are omitted from API requests. However, any non-pointer, 1915 // non-interface field appearing in ForceSendFields will be sent to the 1916 // server regardless of whether the field is empty or not. This may be 1917 // used to include empty fields in Patch requests. 1918 ForceSendFields []string `json:"-"` 1919 1920 // NullFields is a list of field names (e.g. "LifespanCount") to include 1921 // in API requests with the JSON null value. By default, fields with 1922 // empty values are omitted from API requests. However, any field with 1923 // an empty value appearing in NullFields will be sent to the server as 1924 // null. It is an error if a field in this list has a non-empty value. 1925 // This may be used to include null fields in Patch requests. 1926 NullFields []string `json:"-"` 1927} 1928 1929func (s *GoogleCloudDialogflowV2Context) MarshalJSON() ([]byte, error) { 1930 type NoMethod GoogleCloudDialogflowV2Context 1931 raw := NoMethod(*s) 1932 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1933} 1934 1935// GoogleCloudDialogflowV2ConversationEvent: Represents a notification 1936// sent to Cloud Pub/Sub subscribers for conversation 1937// lifecycle events. 1938type GoogleCloudDialogflowV2ConversationEvent struct { 1939 // Conversation: The unique identifier of the conversation this 1940 // notification 1941 // refers to. 1942 // Format: `projects/<Project ID>/conversations/<Conversation ID>`. 1943 Conversation string `json:"conversation,omitempty"` 1944 1945 // ErrorStatus: More detailed information about an error. Only set for 1946 // type 1947 // UNRECOVERABLE_ERROR_IN_PHONE_CALL. 1948 ErrorStatus *GoogleRpcStatus `json:"errorStatus,omitempty"` 1949 1950 // NewMessagePayload: Payload of NEW_MESSAGE event. 1951 NewMessagePayload *GoogleCloudDialogflowV2Message `json:"newMessagePayload,omitempty"` 1952 1953 // Type: The type of the event that this notification refers to. 1954 // 1955 // Possible values: 1956 // "TYPE_UNSPECIFIED" - Type not set. 1957 // "CONVERSATION_STARTED" - A new conversation has been opened. This 1958 // is fired when a telephone call 1959 // is answered, or a conversation is created via the API. 1960 // "CONVERSATION_FINISHED" - An existing conversation has closed. This 1961 // is fired when a telephone call 1962 // is terminated, or a conversation is closed via the API. 1963 // "HUMAN_INTERVENTION_NEEDED" - An existing conversation has received 1964 // notification from Dialogflow that 1965 // human intervention is required. 1966 // "NEW_MESSAGE" - An existing conversation has received a new 1967 // message, either from API or 1968 // telephony. It is configured 1969 // in 1970 // ConversationProfile.new_message_event_notification_config 1971 // "UNRECOVERABLE_ERROR" - Unrecoverable error during a telephone 1972 // call. 1973 // 1974 // In general non-recoverable errors only occur if something 1975 // was 1976 // misconfigured in the ConversationProfile corresponding to the call. 1977 // After 1978 // a non-recoverable error, Dialogflow may stop responding. 1979 // 1980 // We don't fire this event: 1981 // * in an API call because we can directly return the error, or, 1982 // * when we can recover from an error. 1983 Type string `json:"type,omitempty"` 1984 1985 // ForceSendFields is a list of field names (e.g. "Conversation") to 1986 // unconditionally include in API requests. By default, fields with 1987 // empty values are omitted from API requests. However, any non-pointer, 1988 // non-interface field appearing in ForceSendFields will be sent to the 1989 // server regardless of whether the field is empty or not. This may be 1990 // used to include empty fields in Patch requests. 1991 ForceSendFields []string `json:"-"` 1992 1993 // NullFields is a list of field names (e.g. "Conversation") to include 1994 // in API requests with the JSON null value. By default, fields with 1995 // empty values are omitted from API requests. However, any field with 1996 // an empty value appearing in NullFields will be sent to the server as 1997 // null. It is an error if a field in this list has a non-empty value. 1998 // This may be used to include null fields in Patch requests. 1999 NullFields []string `json:"-"` 2000} 2001 2002func (s *GoogleCloudDialogflowV2ConversationEvent) MarshalJSON() ([]byte, error) { 2003 type NoMethod GoogleCloudDialogflowV2ConversationEvent 2004 raw := NoMethod(*s) 2005 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2006} 2007 2008// GoogleCloudDialogflowV2DetectIntentRequest: The request to detect 2009// user's intent. 2010type GoogleCloudDialogflowV2DetectIntentRequest struct { 2011 // InputAudio: The natural language speech audio to be processed. This 2012 // field 2013 // should be populated iff `query_input` is set to an input audio 2014 // config. 2015 // A single request can contain up to 1 minute of speech audio data. 2016 InputAudio string `json:"inputAudio,omitempty"` 2017 2018 // OutputAudioConfig: Instructs the speech synthesizer how to generate 2019 // the output 2020 // audio. If this field is not set and agent-level speech synthesizer is 2021 // not 2022 // configured, no output audio is generated. 2023 OutputAudioConfig *GoogleCloudDialogflowV2OutputAudioConfig `json:"outputAudioConfig,omitempty"` 2024 2025 // OutputAudioConfigMask: Mask for output_audio_config indicating which 2026 // settings in this 2027 // request-level config should override speech synthesizer settings 2028 // defined at 2029 // agent-level. 2030 // 2031 // If unspecified or empty, output_audio_config replaces the 2032 // agent-level 2033 // config in its entirety. 2034 OutputAudioConfigMask string `json:"outputAudioConfigMask,omitempty"` 2035 2036 // QueryInput: Required. The input specification. It can be set to: 2037 // 2038 // 1. an audio config 2039 // which instructs the speech recognizer how to process the speech 2040 // audio, 2041 // 2042 // 2. a conversational query in the form of text, or 2043 // 2044 // 3. an event that specifies which intent to trigger. 2045 QueryInput *GoogleCloudDialogflowV2QueryInput `json:"queryInput,omitempty"` 2046 2047 // QueryParams: The parameters of this query. 2048 QueryParams *GoogleCloudDialogflowV2QueryParameters `json:"queryParams,omitempty"` 2049 2050 // ForceSendFields is a list of field names (e.g. "InputAudio") to 2051 // unconditionally include in API requests. By default, fields with 2052 // empty values are omitted from API requests. However, any non-pointer, 2053 // non-interface field appearing in ForceSendFields will be sent to the 2054 // server regardless of whether the field is empty or not. This may be 2055 // used to include empty fields in Patch requests. 2056 ForceSendFields []string `json:"-"` 2057 2058 // NullFields is a list of field names (e.g. "InputAudio") to include in 2059 // API requests with the JSON null value. By default, fields with empty 2060 // values are omitted from API requests. However, any field with an 2061 // empty value appearing in NullFields will be sent to the server as 2062 // null. It is an error if a field in this list has a non-empty value. 2063 // This may be used to include null fields in Patch requests. 2064 NullFields []string `json:"-"` 2065} 2066 2067func (s *GoogleCloudDialogflowV2DetectIntentRequest) MarshalJSON() ([]byte, error) { 2068 type NoMethod GoogleCloudDialogflowV2DetectIntentRequest 2069 raw := NoMethod(*s) 2070 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2071} 2072 2073// GoogleCloudDialogflowV2DetectIntentResponse: The message returned 2074// from the DetectIntent method. 2075type GoogleCloudDialogflowV2DetectIntentResponse struct { 2076 // OutputAudio: The audio data bytes encoded as specified in the 2077 // request. 2078 // Note: The output audio is generated based on the values of default 2079 // platform 2080 // text responses found in the `query_result.fulfillment_messages` 2081 // field. If 2082 // multiple default text responses exist, they will be concatenated 2083 // when 2084 // generating audio. If no default platform text responses exist, 2085 // the 2086 // generated audio content will be empty. 2087 // 2088 // In some scenarios, multiple output audio fields may be present in 2089 // the 2090 // response structure. In these cases, only the top-most-level audio 2091 // output 2092 // has content. 2093 OutputAudio string `json:"outputAudio,omitempty"` 2094 2095 // OutputAudioConfig: The config used by the speech synthesizer to 2096 // generate the output audio. 2097 OutputAudioConfig *GoogleCloudDialogflowV2OutputAudioConfig `json:"outputAudioConfig,omitempty"` 2098 2099 // QueryResult: The selected results of the conversational query or 2100 // event processing. 2101 // See `alternative_query_results` for additional potential results. 2102 QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"` 2103 2104 // ResponseId: The unique identifier of the response. It can be used 2105 // to 2106 // locate a response in the training example set or for reporting 2107 // issues. 2108 ResponseId string `json:"responseId,omitempty"` 2109 2110 // WebhookStatus: Specifies the status of the webhook request. 2111 WebhookStatus *GoogleRpcStatus `json:"webhookStatus,omitempty"` 2112 2113 // ServerResponse contains the HTTP response code and headers from the 2114 // server. 2115 googleapi.ServerResponse `json:"-"` 2116 2117 // ForceSendFields is a list of field names (e.g. "OutputAudio") to 2118 // unconditionally include in API requests. By default, fields with 2119 // empty values are omitted from API requests. However, any non-pointer, 2120 // non-interface field appearing in ForceSendFields will be sent to the 2121 // server regardless of whether the field is empty or not. This may be 2122 // used to include empty fields in Patch requests. 2123 ForceSendFields []string `json:"-"` 2124 2125 // NullFields is a list of field names (e.g. "OutputAudio") to include 2126 // in API requests with the JSON null value. By default, fields with 2127 // empty values are omitted from API requests. However, any field with 2128 // an empty value appearing in NullFields will be sent to the server as 2129 // null. It is an error if a field in this list has a non-empty value. 2130 // This may be used to include null fields in Patch requests. 2131 NullFields []string `json:"-"` 2132} 2133 2134func (s *GoogleCloudDialogflowV2DetectIntentResponse) MarshalJSON() ([]byte, error) { 2135 type NoMethod GoogleCloudDialogflowV2DetectIntentResponse 2136 raw := NoMethod(*s) 2137 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2138} 2139 2140// GoogleCloudDialogflowV2EntityType: Represents an entity type. 2141// Entity types serve as a tool for extracting parameter values from 2142// natural 2143// language queries. 2144type GoogleCloudDialogflowV2EntityType struct { 2145 // AutoExpansionMode: Optional. Indicates whether the entity type can be 2146 // automatically 2147 // expanded. 2148 // 2149 // Possible values: 2150 // "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the 2151 // entity. 2152 // "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values 2153 // that have not been explicitly 2154 // listed in the entity. 2155 AutoExpansionMode string `json:"autoExpansionMode,omitempty"` 2156 2157 // DisplayName: Required. The name of the entity type. 2158 DisplayName string `json:"displayName,omitempty"` 2159 2160 // EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction 2161 // during classification. 2162 EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"` 2163 2164 // Entities: Optional. The collection of entity entries associated with 2165 // the entity type. 2166 Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"` 2167 2168 // Kind: Required. Indicates the kind of entity type. 2169 // 2170 // Possible values: 2171 // "KIND_UNSPECIFIED" - Not specified. This value should be never 2172 // used. 2173 // "KIND_MAP" - Map entity types allow mapping of a group of synonyms 2174 // to a reference 2175 // value. 2176 // "KIND_LIST" - List entity types contain a set of entries that do 2177 // not map to reference 2178 // values. However, list entity types can contain references to other 2179 // entity 2180 // types (with or without aliases). 2181 // "KIND_REGEXP" - Regexp entity types allow to specify regular 2182 // expressions in entries 2183 // values. 2184 Kind string `json:"kind,omitempty"` 2185 2186 // Name: The unique identifier of the entity type. 2187 // Required for EntityTypes.UpdateEntityType 2188 // and 2189 // EntityTypes.BatchUpdateEntityTypes methods. 2190 // Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. 2191 Name string `json:"name,omitempty"` 2192 2193 // ServerResponse contains the HTTP response code and headers from the 2194 // server. 2195 googleapi.ServerResponse `json:"-"` 2196 2197 // ForceSendFields is a list of field names (e.g. "AutoExpansionMode") 2198 // to unconditionally include in API requests. By default, fields with 2199 // empty values are omitted from API requests. However, any non-pointer, 2200 // non-interface field appearing in ForceSendFields will be sent to the 2201 // server regardless of whether the field is empty or not. This may be 2202 // used to include empty fields in Patch requests. 2203 ForceSendFields []string `json:"-"` 2204 2205 // NullFields is a list of field names (e.g. "AutoExpansionMode") to 2206 // include in API requests with the JSON null value. By default, fields 2207 // with empty values are omitted from API requests. However, any field 2208 // with an empty value appearing in NullFields will be sent to the 2209 // server as null. It is an error if a field in this list has a 2210 // non-empty value. This may be used to include null fields in Patch 2211 // requests. 2212 NullFields []string `json:"-"` 2213} 2214 2215func (s *GoogleCloudDialogflowV2EntityType) MarshalJSON() ([]byte, error) { 2216 type NoMethod GoogleCloudDialogflowV2EntityType 2217 raw := NoMethod(*s) 2218 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2219} 2220 2221// GoogleCloudDialogflowV2EntityTypeBatch: This message is a wrapper 2222// around a collection of entity types. 2223type GoogleCloudDialogflowV2EntityTypeBatch struct { 2224 // EntityTypes: A collection of entity types. 2225 EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"` 2226 2227 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 2228 // unconditionally include in API requests. By default, fields with 2229 // empty values are omitted from API requests. However, any non-pointer, 2230 // non-interface field appearing in ForceSendFields will be sent to the 2231 // server regardless of whether the field is empty or not. This may be 2232 // used to include empty fields in Patch requests. 2233 ForceSendFields []string `json:"-"` 2234 2235 // NullFields is a list of field names (e.g. "EntityTypes") to include 2236 // in API requests with the JSON null value. By default, fields with 2237 // empty values are omitted from API requests. However, any field with 2238 // an empty value appearing in NullFields will be sent to the server as 2239 // null. It is an error if a field in this list has a non-empty value. 2240 // This may be used to include null fields in Patch requests. 2241 NullFields []string `json:"-"` 2242} 2243 2244func (s *GoogleCloudDialogflowV2EntityTypeBatch) MarshalJSON() ([]byte, error) { 2245 type NoMethod GoogleCloudDialogflowV2EntityTypeBatch 2246 raw := NoMethod(*s) 2247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2248} 2249 2250// GoogleCloudDialogflowV2EntityTypeEntity: An **entity entry** for an 2251// associated entity type. 2252type GoogleCloudDialogflowV2EntityTypeEntity struct { 2253 // Synonyms: Required. A collection of value synonyms. For example, if 2254 // the entity type 2255 // is *vegetable*, and `value` is *scallions*, a synonym could be 2256 // *green 2257 // onions*. 2258 // 2259 // For `KIND_LIST` entity types: 2260 // 2261 // * This collection must contain exactly one synonym equal to 2262 // `value`. 2263 Synonyms []string `json:"synonyms,omitempty"` 2264 2265 // Value: Required. The primary value associated with this entity 2266 // entry. 2267 // For example, if the entity type is *vegetable*, the value could 2268 // be 2269 // *scallions*. 2270 // 2271 // For `KIND_MAP` entity types: 2272 // 2273 // * A reference value to be used in place of synonyms. 2274 // 2275 // For `KIND_LIST` entity types: 2276 // 2277 // * A string that can contain references to other entity types (with 2278 // or 2279 // without aliases). 2280 Value string `json:"value,omitempty"` 2281 2282 // ForceSendFields is a list of field names (e.g. "Synonyms") to 2283 // unconditionally include in API requests. By default, fields with 2284 // empty values are omitted from API requests. However, any non-pointer, 2285 // non-interface field appearing in ForceSendFields will be sent to the 2286 // server regardless of whether the field is empty or not. This may be 2287 // used to include empty fields in Patch requests. 2288 ForceSendFields []string `json:"-"` 2289 2290 // NullFields is a list of field names (e.g. "Synonyms") to include in 2291 // API requests with the JSON null value. By default, fields with empty 2292 // values are omitted from API requests. However, any field with an 2293 // empty value appearing in NullFields will be sent to the server as 2294 // null. It is an error if a field in this list has a non-empty value. 2295 // This may be used to include null fields in Patch requests. 2296 NullFields []string `json:"-"` 2297} 2298 2299func (s *GoogleCloudDialogflowV2EntityTypeEntity) MarshalJSON() ([]byte, error) { 2300 type NoMethod GoogleCloudDialogflowV2EntityTypeEntity 2301 raw := NoMethod(*s) 2302 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2303} 2304 2305// GoogleCloudDialogflowV2Environment: Represents an agent environment. 2306type GoogleCloudDialogflowV2Environment struct { 2307 // AgentVersion: Optional. The agent version loaded into this 2308 // environment. 2309 // Format: `projects/<Project ID>/agent/versions/<Version ID>`. 2310 AgentVersion string `json:"agentVersion,omitempty"` 2311 2312 // Description: Optional. The developer-provided description for this 2313 // environment. 2314 // The maximum length is 500 characters. If exceeded, the request is 2315 // rejected. 2316 Description string `json:"description,omitempty"` 2317 2318 // Name: Output only. The unique identifier of this agent 2319 // environment. 2320 // Format: `projects/<Project ID>/agent/environments/<Environment 2321 // ID>`. 2322 // For Environment ID, "-" is reserved for 'draft' environment. 2323 Name string `json:"name,omitempty"` 2324 2325 // State: Output only. The state of this environment. This field is 2326 // read-only, i.e., it cannot be 2327 // set by create and update methods. 2328 // 2329 // Possible values: 2330 // "STATE_UNSPECIFIED" - Not specified. This value is not used. 2331 // "STOPPED" - Stopped. 2332 // "LOADING" - Loading. 2333 // "RUNNING" - Running. 2334 State string `json:"state,omitempty"` 2335 2336 // UpdateTime: Output only. The last update time of this environment. 2337 // This field is read-only, i.e., it 2338 // cannot be set by create and update methods. 2339 UpdateTime string `json:"updateTime,omitempty"` 2340 2341 // ForceSendFields is a list of field names (e.g. "AgentVersion") to 2342 // unconditionally include in API requests. By default, fields with 2343 // empty values are omitted from API requests. However, any non-pointer, 2344 // non-interface field appearing in ForceSendFields will be sent to the 2345 // server regardless of whether the field is empty or not. This may be 2346 // used to include empty fields in Patch requests. 2347 ForceSendFields []string `json:"-"` 2348 2349 // NullFields is a list of field names (e.g. "AgentVersion") to include 2350 // in API requests with the JSON null value. By default, fields with 2351 // empty values are omitted from API requests. However, any field with 2352 // an empty value appearing in NullFields will be sent to the server as 2353 // null. It is an error if a field in this list has a non-empty value. 2354 // This may be used to include null fields in Patch requests. 2355 NullFields []string `json:"-"` 2356} 2357 2358func (s *GoogleCloudDialogflowV2Environment) MarshalJSON() ([]byte, error) { 2359 type NoMethod GoogleCloudDialogflowV2Environment 2360 raw := NoMethod(*s) 2361 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2362} 2363 2364// GoogleCloudDialogflowV2EventInput: Events allow for matching intents 2365// by event name instead of the natural 2366// language input. For instance, input `<event: { name: 2367// "welcome_event", 2368// parameters: { name: "Sam" } }>` can trigger a personalized welcome 2369// response. 2370// The parameter `name` may be used by the agent in the 2371// response: 2372// "Hello #welcome_event.name! What can I do for you today?". 2373type GoogleCloudDialogflowV2EventInput struct { 2374 // LanguageCode: Required. The language of this query. See 2375 // [Language 2376 // Support](https://cloud.google.com/dialogflow/docs/reference/ 2377 // language) 2378 // for a list of the currently supported language codes. Note that 2379 // queries in 2380 // the same session do not necessarily need to specify the same 2381 // language. 2382 LanguageCode string `json:"languageCode,omitempty"` 2383 2384 // Name: Required. The unique identifier of the event. 2385 Name string `json:"name,omitempty"` 2386 2387 // Parameters: The collection of parameters associated with the 2388 // event. 2389 // 2390 // Depending on your protocol or client library language, this is a 2391 // map, associative array, symbol table, dictionary, or JSON 2392 // object 2393 // composed of a collection of (MapKey, MapValue) pairs: 2394 // 2395 // - MapKey type: string 2396 // - MapKey value: parameter name 2397 // - MapValue type: 2398 // - If parameter's entity type is a composite entity: map 2399 // - Else: string or number, depending on parameter value type 2400 // - MapValue value: 2401 // - If parameter's entity type is a composite entity: 2402 // map from composite entity property names to property values 2403 // - Else: parameter value 2404 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 2405 2406 // ForceSendFields is a list of field names (e.g. "LanguageCode") to 2407 // unconditionally include in API requests. By default, fields with 2408 // empty values are omitted from API requests. However, any non-pointer, 2409 // non-interface field appearing in ForceSendFields will be sent to the 2410 // server regardless of whether the field is empty or not. This may be 2411 // used to include empty fields in Patch requests. 2412 ForceSendFields []string `json:"-"` 2413 2414 // NullFields is a list of field names (e.g. "LanguageCode") to include 2415 // in API requests with the JSON null value. By default, fields with 2416 // empty values are omitted from API requests. However, any field with 2417 // an empty value appearing in NullFields will be sent to the server as 2418 // null. It is an error if a field in this list has a non-empty value. 2419 // This may be used to include null fields in Patch requests. 2420 NullFields []string `json:"-"` 2421} 2422 2423func (s *GoogleCloudDialogflowV2EventInput) MarshalJSON() ([]byte, error) { 2424 type NoMethod GoogleCloudDialogflowV2EventInput 2425 raw := NoMethod(*s) 2426 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2427} 2428 2429// GoogleCloudDialogflowV2ExportAgentRequest: The request message for 2430// Agents.ExportAgent. 2431type GoogleCloudDialogflowV2ExportAgentRequest struct { 2432 // AgentUri: Required. The [Google Cloud 2433 // Storage](https://cloud.google.com/storage/docs/) 2434 // URI to export the agent to. 2435 // The format of this URI must be `gs://<bucket-name>/<object-name>`. 2436 // If left unspecified, the serialized agent is returned inline. 2437 AgentUri string `json:"agentUri,omitempty"` 2438 2439 // ForceSendFields is a list of field names (e.g. "AgentUri") to 2440 // unconditionally include in API requests. By default, fields with 2441 // empty values are omitted from API requests. However, any non-pointer, 2442 // non-interface field appearing in ForceSendFields will be sent to the 2443 // server regardless of whether the field is empty or not. This may be 2444 // used to include empty fields in Patch requests. 2445 ForceSendFields []string `json:"-"` 2446 2447 // NullFields is a list of field names (e.g. "AgentUri") to include in 2448 // API requests with the JSON null value. By default, fields with empty 2449 // values are omitted from API requests. However, any field with an 2450 // empty value appearing in NullFields will be sent to the server as 2451 // null. It is an error if a field in this list has a non-empty value. 2452 // This may be used to include null fields in Patch requests. 2453 NullFields []string `json:"-"` 2454} 2455 2456func (s *GoogleCloudDialogflowV2ExportAgentRequest) MarshalJSON() ([]byte, error) { 2457 type NoMethod GoogleCloudDialogflowV2ExportAgentRequest 2458 raw := NoMethod(*s) 2459 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2460} 2461 2462// GoogleCloudDialogflowV2ExportAgentResponse: The response message for 2463// Agents.ExportAgent. 2464type GoogleCloudDialogflowV2ExportAgentResponse struct { 2465 // AgentContent: Zip compressed raw byte content for agent. 2466 AgentContent string `json:"agentContent,omitempty"` 2467 2468 // AgentUri: The URI to a file containing the exported agent. This field 2469 // is populated 2470 // only if `agent_uri` is specified in `ExportAgentRequest`. 2471 AgentUri string `json:"agentUri,omitempty"` 2472 2473 // ForceSendFields is a list of field names (e.g. "AgentContent") to 2474 // unconditionally include in API requests. By default, fields with 2475 // empty values are omitted from API requests. However, any non-pointer, 2476 // non-interface field appearing in ForceSendFields will be sent to the 2477 // server regardless of whether the field is empty or not. This may be 2478 // used to include empty fields in Patch requests. 2479 ForceSendFields []string `json:"-"` 2480 2481 // NullFields is a list of field names (e.g. "AgentContent") to include 2482 // in API requests with the JSON null value. By default, fields with 2483 // empty values are omitted from API requests. However, any field with 2484 // an empty value appearing in NullFields will be sent to the server as 2485 // null. It is an error if a field in this list has a non-empty value. 2486 // This may be used to include null fields in Patch requests. 2487 NullFields []string `json:"-"` 2488} 2489 2490func (s *GoogleCloudDialogflowV2ExportAgentResponse) MarshalJSON() ([]byte, error) { 2491 type NoMethod GoogleCloudDialogflowV2ExportAgentResponse 2492 raw := NoMethod(*s) 2493 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2494} 2495 2496// GoogleCloudDialogflowV2Fulfillment: Represents a fulfillment. 2497type GoogleCloudDialogflowV2Fulfillment struct { 2498 // DisplayName: Optional. The human-readable name of the fulfillment, 2499 // unique within the agent. 2500 DisplayName string `json:"displayName,omitempty"` 2501 2502 // Enabled: Optional. Whether fulfillment is enabled. 2503 Enabled bool `json:"enabled,omitempty"` 2504 2505 // Features: Optional. The field defines whether the fulfillment is 2506 // enabled for certain features. 2507 Features []*GoogleCloudDialogflowV2FulfillmentFeature `json:"features,omitempty"` 2508 2509 // GenericWebService: Configuration for a generic web service. 2510 GenericWebService *GoogleCloudDialogflowV2FulfillmentGenericWebService `json:"genericWebService,omitempty"` 2511 2512 // Name: Required. The unique identifier of the fulfillment. 2513 // Format: `projects/<Project ID>/agent/fulfillment`. 2514 Name string `json:"name,omitempty"` 2515 2516 // ServerResponse contains the HTTP response code and headers from the 2517 // server. 2518 googleapi.ServerResponse `json:"-"` 2519 2520 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2521 // unconditionally include in API requests. By default, fields with 2522 // empty values are omitted from API requests. However, any non-pointer, 2523 // non-interface field appearing in ForceSendFields will be sent to the 2524 // server regardless of whether the field is empty or not. This may be 2525 // used to include empty fields in Patch requests. 2526 ForceSendFields []string `json:"-"` 2527 2528 // NullFields is a list of field names (e.g. "DisplayName") to include 2529 // in API requests with the JSON null value. By default, fields with 2530 // empty values are omitted from API requests. However, any field with 2531 // an empty value appearing in NullFields will be sent to the server as 2532 // null. It is an error if a field in this list has a non-empty value. 2533 // This may be used to include null fields in Patch requests. 2534 NullFields []string `json:"-"` 2535} 2536 2537func (s *GoogleCloudDialogflowV2Fulfillment) MarshalJSON() ([]byte, error) { 2538 type NoMethod GoogleCloudDialogflowV2Fulfillment 2539 raw := NoMethod(*s) 2540 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2541} 2542 2543// GoogleCloudDialogflowV2FulfillmentFeature: Whether fulfillment is 2544// enabled for the specific feature. 2545type GoogleCloudDialogflowV2FulfillmentFeature struct { 2546 // Type: The type of the feature that enabled for fulfillment. 2547 // 2548 // Possible values: 2549 // "TYPE_UNSPECIFIED" - Feature type not specified. 2550 // "SMALLTALK" - Fulfillment is enabled for SmallTalk. 2551 Type string `json:"type,omitempty"` 2552 2553 // ForceSendFields is a list of field names (e.g. "Type") to 2554 // unconditionally include in API requests. By default, fields with 2555 // empty values are omitted from API requests. However, any non-pointer, 2556 // non-interface field appearing in ForceSendFields will be sent to the 2557 // server regardless of whether the field is empty or not. This may be 2558 // used to include empty fields in Patch requests. 2559 ForceSendFields []string `json:"-"` 2560 2561 // NullFields is a list of field names (e.g. "Type") to include in API 2562 // requests with the JSON null value. By default, fields with empty 2563 // values are omitted from API requests. However, any field with an 2564 // empty value appearing in NullFields will be sent to the server as 2565 // null. It is an error if a field in this list has a non-empty value. 2566 // This may be used to include null fields in Patch requests. 2567 NullFields []string `json:"-"` 2568} 2569 2570func (s *GoogleCloudDialogflowV2FulfillmentFeature) MarshalJSON() ([]byte, error) { 2571 type NoMethod GoogleCloudDialogflowV2FulfillmentFeature 2572 raw := NoMethod(*s) 2573 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2574} 2575 2576// GoogleCloudDialogflowV2FulfillmentGenericWebService: Represents 2577// configuration for a generic web service. 2578// Dialogflow supports two mechanisms for authentications: 2579// - Basic authentication with username and password. 2580// - Authentication with additional authentication headers. 2581// More information could be found 2582// at: 2583// https://cloud.google.com/dialogflow/docs/fulfillment-configure. 2584type GoogleCloudDialogflowV2FulfillmentGenericWebService struct { 2585 // IsCloudFunction: Optional. Indicates if generic web service is 2586 // created through Cloud Functions 2587 // integration. Defaults to false. 2588 IsCloudFunction bool `json:"isCloudFunction,omitempty"` 2589 2590 // Password: Optional. The password for HTTP Basic authentication. 2591 Password string `json:"password,omitempty"` 2592 2593 // RequestHeaders: Optional. The HTTP request headers to send together 2594 // with fulfillment requests. 2595 RequestHeaders map[string]string `json:"requestHeaders,omitempty"` 2596 2597 // Uri: Required. The fulfillment URI for receiving POST requests. 2598 // It must use https protocol. 2599 Uri string `json:"uri,omitempty"` 2600 2601 // Username: Optional. The user name for HTTP Basic authentication. 2602 Username string `json:"username,omitempty"` 2603 2604 // ForceSendFields is a list of field names (e.g. "IsCloudFunction") to 2605 // unconditionally include in API requests. By default, fields with 2606 // empty values are omitted from API requests. However, any non-pointer, 2607 // non-interface field appearing in ForceSendFields will be sent to the 2608 // server regardless of whether the field is empty or not. This may be 2609 // used to include empty fields in Patch requests. 2610 ForceSendFields []string `json:"-"` 2611 2612 // NullFields is a list of field names (e.g. "IsCloudFunction") to 2613 // include in API requests with the JSON null value. By default, fields 2614 // with empty values are omitted from API requests. However, any field 2615 // with an empty value appearing in NullFields will be sent to the 2616 // server as null. It is an error if a field in this list has a 2617 // non-empty value. This may be used to include null fields in Patch 2618 // requests. 2619 NullFields []string `json:"-"` 2620} 2621 2622func (s *GoogleCloudDialogflowV2FulfillmentGenericWebService) MarshalJSON() ([]byte, error) { 2623 type NoMethod GoogleCloudDialogflowV2FulfillmentGenericWebService 2624 raw := NoMethod(*s) 2625 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2626} 2627 2628// GoogleCloudDialogflowV2ImportAgentRequest: The request message for 2629// Agents.ImportAgent. 2630type GoogleCloudDialogflowV2ImportAgentRequest struct { 2631 // AgentContent: Zip compressed raw byte content for agent. 2632 AgentContent string `json:"agentContent,omitempty"` 2633 2634 // AgentUri: The URI to a Google Cloud Storage file containing the agent 2635 // to import. 2636 // Note: The URI must start with "gs://". 2637 AgentUri string `json:"agentUri,omitempty"` 2638 2639 // ForceSendFields is a list of field names (e.g. "AgentContent") to 2640 // unconditionally include in API requests. By default, fields with 2641 // empty values are omitted from API requests. However, any non-pointer, 2642 // non-interface field appearing in ForceSendFields will be sent to the 2643 // server regardless of whether the field is empty or not. This may be 2644 // used to include empty fields in Patch requests. 2645 ForceSendFields []string `json:"-"` 2646 2647 // NullFields is a list of field names (e.g. "AgentContent") to include 2648 // in API requests with the JSON null value. By default, fields with 2649 // empty values are omitted from API requests. However, any field with 2650 // an empty value appearing in NullFields will be sent to the server as 2651 // null. It is an error if a field in this list has a non-empty value. 2652 // This may be used to include null fields in Patch requests. 2653 NullFields []string `json:"-"` 2654} 2655 2656func (s *GoogleCloudDialogflowV2ImportAgentRequest) MarshalJSON() ([]byte, error) { 2657 type NoMethod GoogleCloudDialogflowV2ImportAgentRequest 2658 raw := NoMethod(*s) 2659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2660} 2661 2662// GoogleCloudDialogflowV2InputAudioConfig: Instructs the speech 2663// recognizer how to process the audio content. 2664type GoogleCloudDialogflowV2InputAudioConfig struct { 2665 // AudioEncoding: Required. Audio encoding of the audio content to 2666 // process. 2667 // 2668 // Possible values: 2669 // "AUDIO_ENCODING_UNSPECIFIED" - Not specified. 2670 // "AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed 2671 // little-endian samples (Linear PCM). 2672 // "AUDIO_ENCODING_FLAC" - 2673 // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless 2674 // Audio 2675 // Codec) is the recommended encoding because it is lossless 2676 // (therefore 2677 // recognition is not compromised) and requires only about half 2678 // the 2679 // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit 2680 // and 2681 // 24-bit samples, however, not all fields in `STREAMINFO` are 2682 // supported. 2683 // "AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit audio 2684 // samples using G.711 PCMU/mu-law. 2685 // "AUDIO_ENCODING_AMR" - Adaptive Multi-Rate Narrowband codec. 2686 // `sample_rate_hertz` must be 8000. 2687 // "AUDIO_ENCODING_AMR_WB" - Adaptive Multi-Rate Wideband codec. 2688 // `sample_rate_hertz` must be 16000. 2689 // "AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio frames in Ogg 2690 // container 2691 // ([OggOpus](https://wiki.xiph.org/OggOpus)). 2692 // `sample_rate_her 2693 // tz` must be 16000. 2694 // "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE" - Although the use of lossy 2695 // encodings is not recommended, if a very low 2696 // bitrate encoding is required, `OGG_OPUS` is highly preferred 2697 // over 2698 // Speex encoding. The [Speex](https://speex.org/) encoding supported 2699 // by 2700 // Dialogflow API has a header byte in each block, as in MIME 2701 // type 2702 // `audio/x-speex-with-header-byte`. 2703 // It is a variant of the RTP Speex encoding defined in 2704 // [RFC 5574](https://tools.ietf.org/html/rfc5574). 2705 // The stream is a sequence of blocks, one block per RTP packet. Each 2706 // block 2707 // starts with a byte containing the length of the block, in bytes, 2708 // followed 2709 // by one or more frames of Speex data, padded to an integral number 2710 // of 2711 // bytes (octets) as specified in RFC 5574. In other words, each RTP 2712 // header 2713 // is replaced with a single byte containing the block length. Only 2714 // Speex 2715 // wideband is supported. `sample_rate_hertz` must be 16000. 2716 AudioEncoding string `json:"audioEncoding,omitempty"` 2717 2718 // EnableWordInfo: If `true`, Dialogflow returns SpeechWordInfo 2719 // in 2720 // StreamingRecognitionResult with information about the recognized 2721 // speech 2722 // words, e.g. start and end time offsets. If false or unspecified, 2723 // Speech 2724 // doesn't return any word-level information. 2725 EnableWordInfo bool `json:"enableWordInfo,omitempty"` 2726 2727 // LanguageCode: Required. The language of the supplied audio. 2728 // Dialogflow does not do 2729 // translations. See 2730 // [Language 2731 // Support](https://cloud.google.com/dialogflow/docs/reference/ 2732 // language) 2733 // for a list of the currently supported language codes. Note that 2734 // queries in 2735 // the same session do not necessarily need to specify the same 2736 // language. 2737 LanguageCode string `json:"languageCode,omitempty"` 2738 2739 // Model: Which Speech model to select for the given request. Select 2740 // the 2741 // model best suited to your domain to get best results. If a model is 2742 // not 2743 // explicitly specified, then we auto-select a model based on the 2744 // parameters 2745 // in the InputAudioConfig. 2746 // If enhanced speech model is enabled for the agent and an 2747 // enhanced 2748 // version of the specified model for the language does not exist, then 2749 // the 2750 // speech is recognized using the standard version of the specified 2751 // model. 2752 // Refer to 2753 // [Cloud Speech 2754 // API 2755 // documentation](https://cloud.google.com/speech-to-text/docs/basics 2756 // #select-model) 2757 // for more details. 2758 Model string `json:"model,omitempty"` 2759 2760 // ModelVariant: Which variant of the Speech model to use. 2761 // 2762 // Possible values: 2763 // "SPEECH_MODEL_VARIANT_UNSPECIFIED" - No model variant specified. In 2764 // this case Dialogflow defaults to 2765 // USE_BEST_AVAILABLE. 2766 // "USE_BEST_AVAILABLE" - Use the best available variant of the 2767 // Speech 2768 // model that the caller is eligible for. 2769 // 2770 // Please see the 2771 // [Dialogflow 2772 // docs](https://cloud.google.com/dialogflow/docs/data-loggin 2773 // g) for 2774 // how to make your project eligible for enhanced models. 2775 // "USE_STANDARD" - Use standard model variant even if an enhanced 2776 // model is available. See the 2777 // [Cloud 2778 // Speech 2779 // documentation](https://cloud.google.com/speech-to-text/docs/enh 2780 // anced-models) 2781 // for details about enhanced models. 2782 // "USE_ENHANCED" - Use an enhanced model variant: 2783 // 2784 // * If an enhanced variant does not exist for the given 2785 // model and request language, Dialogflow falls 2786 // back to the standard variant. 2787 // 2788 // The [Cloud Speech 2789 // 2790 // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m 2791 // odels) 2792 // describes which models have enhanced variants. 2793 // 2794 // * If the API caller isn't eligible for enhanced models, Dialogflow 2795 // returns 2796 // an error. Please see the [Dialogflow 2797 // docs](https://cloud.google.com/dialogflow/docs/data-logging) 2798 // for how to make your project eligible. 2799 ModelVariant string `json:"modelVariant,omitempty"` 2800 2801 // PhraseHints: A list of strings containing words and phrases that the 2802 // speech 2803 // recognizer should recognize with higher likelihood. 2804 // 2805 // See [the Cloud 2806 // Speech 2807 // documentation](https://cloud.google.com/speech-to-text/docs/bas 2808 // ics#phrase-hints) 2809 // for more details. 2810 // 2811 // This field is deprecated. Please use [speech_contexts]() instead. If 2812 // you 2813 // specify both [phrase_hints]() and [speech_contexts](), Dialogflow 2814 // will 2815 // treat the [phrase_hints]() as a single additional [SpeechContext](). 2816 PhraseHints []string `json:"phraseHints,omitempty"` 2817 2818 // SampleRateHertz: Required. Sample rate (in Hertz) of the audio 2819 // content sent in the query. 2820 // Refer to 2821 // [Cloud Speech 2822 // API 2823 // documentation](https://cloud.google.com/speech-to-text/docs/basics 2824 // ) for 2825 // more details. 2826 SampleRateHertz int64 `json:"sampleRateHertz,omitempty"` 2827 2828 // SingleUtterance: If `false` (default), recognition does not cease 2829 // until the 2830 // client closes the stream. 2831 // If `true`, the recognizer will detect a single spoken utterance in 2832 // input 2833 // audio. Recognition ceases when it detects the audio's voice 2834 // has 2835 // stopped or paused. In this case, once a detected intent is received, 2836 // the 2837 // client should close the stream and start a new request with a new 2838 // stream as 2839 // needed. 2840 // Note: This setting is relevant only for streaming methods. 2841 // Note: When specified, InputAudioConfig.single_utterance takes 2842 // precedence 2843 // over StreamingDetectIntentRequest.single_utterance. 2844 SingleUtterance bool `json:"singleUtterance,omitempty"` 2845 2846 // SpeechContexts: Context information to assist speech 2847 // recognition. 2848 // 2849 // See [the Cloud 2850 // Speech 2851 // documentation](https://cloud.google.com/speech-to-text/docs/bas 2852 // ics#phrase-hints) 2853 // for more details. 2854 SpeechContexts []*GoogleCloudDialogflowV2SpeechContext `json:"speechContexts,omitempty"` 2855 2856 // ForceSendFields is a list of field names (e.g. "AudioEncoding") to 2857 // unconditionally include in API requests. By default, fields with 2858 // empty values are omitted from API requests. However, any non-pointer, 2859 // non-interface field appearing in ForceSendFields will be sent to the 2860 // server regardless of whether the field is empty or not. This may be 2861 // used to include empty fields in Patch requests. 2862 ForceSendFields []string `json:"-"` 2863 2864 // NullFields is a list of field names (e.g. "AudioEncoding") to include 2865 // in API requests with the JSON null value. By default, fields with 2866 // empty values are omitted from API requests. However, any field with 2867 // an empty value appearing in NullFields will be sent to the server as 2868 // null. It is an error if a field in this list has a non-empty value. 2869 // This may be used to include null fields in Patch requests. 2870 NullFields []string `json:"-"` 2871} 2872 2873func (s *GoogleCloudDialogflowV2InputAudioConfig) MarshalJSON() ([]byte, error) { 2874 type NoMethod GoogleCloudDialogflowV2InputAudioConfig 2875 raw := NoMethod(*s) 2876 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2877} 2878 2879// GoogleCloudDialogflowV2Intent: Represents an intent. 2880// Intents convert a number of user expressions or patterns into an 2881// action. An 2882// action is an extraction of a user command or sentence semantics. 2883type GoogleCloudDialogflowV2Intent struct { 2884 // Action: Optional. The name of the action associated with the 2885 // intent. 2886 // Note: The action name must not contain whitespaces. 2887 Action string `json:"action,omitempty"` 2888 2889 // DefaultResponsePlatforms: Optional. The list of platforms for which 2890 // the first responses will be 2891 // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default 2892 // platform). 2893 // 2894 // Possible values: 2895 // "PLATFORM_UNSPECIFIED" - Default platform. 2896 // "FACEBOOK" - Facebook. 2897 // "SLACK" - Slack. 2898 // "TELEGRAM" - Telegram. 2899 // "KIK" - Kik. 2900 // "SKYPE" - Skype. 2901 // "LINE" - Line. 2902 // "VIBER" - Viber. 2903 // "ACTIONS_ON_GOOGLE" - Google Assistant 2904 // See [Dialogflow 2905 // webhook 2906 // format](https://developers.google.com/assistant/actions/build/ 2907 // json/dialogflow-webhook-json) 2908 // "GOOGLE_HANGOUTS" - Google Hangouts. 2909 DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"` 2910 2911 // DisplayName: Required. The name of this intent. 2912 DisplayName string `json:"displayName,omitempty"` 2913 2914 // Events: Optional. The collection of event names that trigger the 2915 // intent. 2916 // If the collection of input contexts is not empty, all of the contexts 2917 // must 2918 // be present in the active user session for an event to trigger this 2919 // intent. 2920 // Event names are limited to 150 characters. 2921 Events []string `json:"events,omitempty"` 2922 2923 // FollowupIntentInfo: Read-only. Information about all followup intents 2924 // that have this intent as 2925 // a direct or indirect parent. We populate this field only in the 2926 // output. 2927 FollowupIntentInfo []*GoogleCloudDialogflowV2IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"` 2928 2929 // InputContextNames: Optional. The list of context names required for 2930 // this intent to be 2931 // triggered. 2932 // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context 2933 // ID>`. 2934 InputContextNames []string `json:"inputContextNames,omitempty"` 2935 2936 // IsFallback: Optional. Indicates whether this is a fallback intent. 2937 IsFallback bool `json:"isFallback,omitempty"` 2938 2939 // Messages: Optional. The collection of rich messages corresponding to 2940 // the 2941 // `Response` field in the Dialogflow console. 2942 Messages []*GoogleCloudDialogflowV2IntentMessage `json:"messages,omitempty"` 2943 2944 // MlDisabled: Optional. Indicates whether Machine Learning is disabled 2945 // for the intent. 2946 // Note: If `ml_disabled` setting is set to true, then this intent is 2947 // not 2948 // taken into account during inference in `ML ONLY` match mode. 2949 // Also, 2950 // auto-markup in the UI is turned off. 2951 MlDisabled bool `json:"mlDisabled,omitempty"` 2952 2953 // Name: Optional. The unique identifier of this intent. 2954 // Required for Intents.UpdateIntent and 2955 // Intents.BatchUpdateIntents 2956 // methods. 2957 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 2958 Name string `json:"name,omitempty"` 2959 2960 // OutputContexts: Optional. The collection of contexts that are 2961 // activated when the intent 2962 // is matched. Context messages in this collection should not set 2963 // the 2964 // parameters field. Setting the `lifespan_count` to 0 will reset the 2965 // context 2966 // when the intent is matched. 2967 // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context 2968 // ID>`. 2969 OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"` 2970 2971 // Parameters: Optional. The collection of parameters associated with 2972 // the intent. 2973 Parameters []*GoogleCloudDialogflowV2IntentParameter `json:"parameters,omitempty"` 2974 2975 // ParentFollowupIntentName: Read-only after creation. The unique 2976 // identifier of the parent intent in the 2977 // chain of followup intents. You can set this field when creating an 2978 // intent, 2979 // for example with CreateIntent or 2980 // BatchUpdateIntents, in order to make this 2981 // intent a followup intent. 2982 // 2983 // It identifies the parent followup intent. 2984 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 2985 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 2986 2987 // Priority: Optional. The priority of this intent. Higher numbers 2988 // represent higher 2989 // priorities. 2990 // 2991 // - If the supplied value is unspecified or 0, the service 2992 // translates the value to 500,000, which corresponds to the 2993 // `Normal` priority in the console. 2994 // - If the supplied value is negative, the intent is ignored 2995 // in runtime detect intent requests. 2996 Priority int64 `json:"priority,omitempty"` 2997 2998 // ResetContexts: Optional. Indicates whether to delete all contexts in 2999 // the current 3000 // session when this intent is matched. 3001 ResetContexts bool `json:"resetContexts,omitempty"` 3002 3003 // RootFollowupIntentName: Read-only. The unique identifier of the root 3004 // intent in the chain of 3005 // followup intents. It identifies the correct followup intents chain 3006 // for 3007 // this intent. We populate this field only in the output. 3008 // 3009 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 3010 RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"` 3011 3012 // TrainingPhrases: Optional. The collection of examples that the agent 3013 // is 3014 // trained on. 3015 TrainingPhrases []*GoogleCloudDialogflowV2IntentTrainingPhrase `json:"trainingPhrases,omitempty"` 3016 3017 // WebhookState: Optional. Indicates whether webhooks are enabled for 3018 // the intent. 3019 // 3020 // Possible values: 3021 // "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and 3022 // in the intent. 3023 // "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in 3024 // the intent. 3025 // "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in 3026 // the agent and in the intent. Also, each slot 3027 // filling prompt is forwarded to the webhook. 3028 WebhookState string `json:"webhookState,omitempty"` 3029 3030 // ServerResponse contains the HTTP response code and headers from the 3031 // server. 3032 googleapi.ServerResponse `json:"-"` 3033 3034 // ForceSendFields is a list of field names (e.g. "Action") to 3035 // unconditionally include in API requests. By default, fields with 3036 // empty values are omitted from API requests. However, any non-pointer, 3037 // non-interface field appearing in ForceSendFields will be sent to the 3038 // server regardless of whether the field is empty or not. This may be 3039 // used to include empty fields in Patch requests. 3040 ForceSendFields []string `json:"-"` 3041 3042 // NullFields is a list of field names (e.g. "Action") to include in API 3043 // requests with the JSON null value. By default, fields with empty 3044 // values are omitted from API requests. However, any field with an 3045 // empty value appearing in NullFields will be sent to the server as 3046 // null. It is an error if a field in this list has a non-empty value. 3047 // This may be used to include null fields in Patch requests. 3048 NullFields []string `json:"-"` 3049} 3050 3051func (s *GoogleCloudDialogflowV2Intent) MarshalJSON() ([]byte, error) { 3052 type NoMethod GoogleCloudDialogflowV2Intent 3053 raw := NoMethod(*s) 3054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3055} 3056 3057// GoogleCloudDialogflowV2IntentBatch: This message is a wrapper around 3058// a collection of intents. 3059type GoogleCloudDialogflowV2IntentBatch struct { 3060 // Intents: A collection of intents. 3061 Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"` 3062 3063 // ForceSendFields is a list of field names (e.g. "Intents") to 3064 // unconditionally include in API requests. By default, fields with 3065 // empty values are omitted from API requests. However, any non-pointer, 3066 // non-interface field appearing in ForceSendFields will be sent to the 3067 // server regardless of whether the field is empty or not. This may be 3068 // used to include empty fields in Patch requests. 3069 ForceSendFields []string `json:"-"` 3070 3071 // NullFields is a list of field names (e.g. "Intents") to include in 3072 // API requests with the JSON null value. By default, fields with empty 3073 // values are omitted from API requests. However, any field with an 3074 // empty value appearing in NullFields will be sent to the server as 3075 // null. It is an error if a field in this list has a non-empty value. 3076 // This may be used to include null fields in Patch requests. 3077 NullFields []string `json:"-"` 3078} 3079 3080func (s *GoogleCloudDialogflowV2IntentBatch) MarshalJSON() ([]byte, error) { 3081 type NoMethod GoogleCloudDialogflowV2IntentBatch 3082 raw := NoMethod(*s) 3083 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3084} 3085 3086// GoogleCloudDialogflowV2IntentFollowupIntentInfo: Represents a single 3087// followup intent in the chain. 3088type GoogleCloudDialogflowV2IntentFollowupIntentInfo struct { 3089 // FollowupIntentName: The unique identifier of the followup 3090 // intent. 3091 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 3092 FollowupIntentName string `json:"followupIntentName,omitempty"` 3093 3094 // ParentFollowupIntentName: The unique identifier of the followup 3095 // intent's parent. 3096 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 3097 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 3098 3099 // ForceSendFields is a list of field names (e.g. "FollowupIntentName") 3100 // to unconditionally include in API requests. By default, fields with 3101 // empty values are omitted from API requests. However, any non-pointer, 3102 // non-interface field appearing in ForceSendFields will be sent to the 3103 // server regardless of whether the field is empty or not. This may be 3104 // used to include empty fields in Patch requests. 3105 ForceSendFields []string `json:"-"` 3106 3107 // NullFields is a list of field names (e.g. "FollowupIntentName") to 3108 // include in API requests with the JSON null value. By default, fields 3109 // with empty values are omitted from API requests. However, any field 3110 // with an empty value appearing in NullFields will be sent to the 3111 // server as null. It is an error if a field in this list has a 3112 // non-empty value. This may be used to include null fields in Patch 3113 // requests. 3114 NullFields []string `json:"-"` 3115} 3116 3117func (s *GoogleCloudDialogflowV2IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) { 3118 type NoMethod GoogleCloudDialogflowV2IntentFollowupIntentInfo 3119 raw := NoMethod(*s) 3120 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3121} 3122 3123// GoogleCloudDialogflowV2IntentMessage: A rich response 3124// message. 3125// Corresponds to the intent `Response` field in the Dialogflow 3126// console. 3127// For more information, see 3128// [Rich 3129// response 3130// messages](https://cloud.google.com/dialogflow/docs/intents-ri 3131// ch-messages). 3132type GoogleCloudDialogflowV2IntentMessage struct { 3133 // BasicCard: The basic card response for Actions on Google. 3134 BasicCard *GoogleCloudDialogflowV2IntentMessageBasicCard `json:"basicCard,omitempty"` 3135 3136 // BrowseCarouselCard: Browse carousel card for Actions on Google. 3137 BrowseCarouselCard *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"` 3138 3139 // Card: The card response. 3140 Card *GoogleCloudDialogflowV2IntentMessageCard `json:"card,omitempty"` 3141 3142 // CarouselSelect: The carousel card response for Actions on Google. 3143 CarouselSelect *GoogleCloudDialogflowV2IntentMessageCarouselSelect `json:"carouselSelect,omitempty"` 3144 3145 // Image: The image response. 3146 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 3147 3148 // LinkOutSuggestion: The link out suggestion chip for Actions on 3149 // Google. 3150 LinkOutSuggestion *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"` 3151 3152 // ListSelect: The list card response for Actions on Google. 3153 ListSelect *GoogleCloudDialogflowV2IntentMessageListSelect `json:"listSelect,omitempty"` 3154 3155 // MediaContent: The media content card for Actions on Google. 3156 MediaContent *GoogleCloudDialogflowV2IntentMessageMediaContent `json:"mediaContent,omitempty"` 3157 3158 // Payload: A custom platform-specific response. 3159 Payload googleapi.RawMessage `json:"payload,omitempty"` 3160 3161 // Platform: Optional. The platform that this message is intended for. 3162 // 3163 // Possible values: 3164 // "PLATFORM_UNSPECIFIED" - Default platform. 3165 // "FACEBOOK" - Facebook. 3166 // "SLACK" - Slack. 3167 // "TELEGRAM" - Telegram. 3168 // "KIK" - Kik. 3169 // "SKYPE" - Skype. 3170 // "LINE" - Line. 3171 // "VIBER" - Viber. 3172 // "ACTIONS_ON_GOOGLE" - Google Assistant 3173 // See [Dialogflow 3174 // webhook 3175 // format](https://developers.google.com/assistant/actions/build/ 3176 // json/dialogflow-webhook-json) 3177 // "GOOGLE_HANGOUTS" - Google Hangouts. 3178 Platform string `json:"platform,omitempty"` 3179 3180 // QuickReplies: The quick replies response. 3181 QuickReplies *GoogleCloudDialogflowV2IntentMessageQuickReplies `json:"quickReplies,omitempty"` 3182 3183 // SimpleResponses: The voice and text-only responses for Actions on 3184 // Google. 3185 SimpleResponses *GoogleCloudDialogflowV2IntentMessageSimpleResponses `json:"simpleResponses,omitempty"` 3186 3187 // Suggestions: The suggestion chips for Actions on Google. 3188 Suggestions *GoogleCloudDialogflowV2IntentMessageSuggestions `json:"suggestions,omitempty"` 3189 3190 // TableCard: Table card for Actions on Google. 3191 TableCard *GoogleCloudDialogflowV2IntentMessageTableCard `json:"tableCard,omitempty"` 3192 3193 // Text: The text response. 3194 Text *GoogleCloudDialogflowV2IntentMessageText `json:"text,omitempty"` 3195 3196 // ForceSendFields is a list of field names (e.g. "BasicCard") to 3197 // unconditionally include in API requests. By default, fields with 3198 // empty values are omitted from API requests. However, any non-pointer, 3199 // non-interface field appearing in ForceSendFields will be sent to the 3200 // server regardless of whether the field is empty or not. This may be 3201 // used to include empty fields in Patch requests. 3202 ForceSendFields []string `json:"-"` 3203 3204 // NullFields is a list of field names (e.g. "BasicCard") to include in 3205 // API requests with the JSON null value. By default, fields with empty 3206 // values are omitted from API requests. However, any field with an 3207 // empty value appearing in NullFields will be sent to the server as 3208 // null. It is an error if a field in this list has a non-empty value. 3209 // This may be used to include null fields in Patch requests. 3210 NullFields []string `json:"-"` 3211} 3212 3213func (s *GoogleCloudDialogflowV2IntentMessage) MarshalJSON() ([]byte, error) { 3214 type NoMethod GoogleCloudDialogflowV2IntentMessage 3215 raw := NoMethod(*s) 3216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3217} 3218 3219// GoogleCloudDialogflowV2IntentMessageBasicCard: The basic card 3220// message. Useful for displaying information. 3221type GoogleCloudDialogflowV2IntentMessageBasicCard struct { 3222 // Buttons: Optional. The collection of card buttons. 3223 Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"` 3224 3225 // FormattedText: Required, unless image is present. The body text of 3226 // the card. 3227 FormattedText string `json:"formattedText,omitempty"` 3228 3229 // Image: Optional. The image for the card. 3230 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 3231 3232 // Subtitle: Optional. The subtitle of the card. 3233 Subtitle string `json:"subtitle,omitempty"` 3234 3235 // Title: Optional. The title of the card. 3236 Title string `json:"title,omitempty"` 3237 3238 // ForceSendFields is a list of field names (e.g. "Buttons") to 3239 // unconditionally include in API requests. By default, fields with 3240 // empty values are omitted from API requests. However, any non-pointer, 3241 // non-interface field appearing in ForceSendFields will be sent to the 3242 // server regardless of whether the field is empty or not. This may be 3243 // used to include empty fields in Patch requests. 3244 ForceSendFields []string `json:"-"` 3245 3246 // NullFields is a list of field names (e.g. "Buttons") to include in 3247 // API requests with the JSON null value. By default, fields with empty 3248 // values are omitted from API requests. However, any field with an 3249 // empty value appearing in NullFields will be sent to the server as 3250 // null. It is an error if a field in this list has a non-empty value. 3251 // This may be used to include null fields in Patch requests. 3252 NullFields []string `json:"-"` 3253} 3254 3255func (s *GoogleCloudDialogflowV2IntentMessageBasicCard) MarshalJSON() ([]byte, error) { 3256 type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCard 3257 raw := NoMethod(*s) 3258 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3259} 3260 3261// GoogleCloudDialogflowV2IntentMessageBasicCardButton: The button 3262// object that appears at the bottom of a card. 3263type GoogleCloudDialogflowV2IntentMessageBasicCardButton struct { 3264 // OpenUriAction: Required. Action to take when a user taps on the 3265 // button. 3266 OpenUriAction *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"` 3267 3268 // Title: Required. The title of the button. 3269 Title string `json:"title,omitempty"` 3270 3271 // ForceSendFields is a list of field names (e.g. "OpenUriAction") to 3272 // unconditionally include in API requests. By default, fields with 3273 // empty values are omitted from API requests. However, any non-pointer, 3274 // non-interface field appearing in ForceSendFields will be sent to the 3275 // server regardless of whether the field is empty or not. This may be 3276 // used to include empty fields in Patch requests. 3277 ForceSendFields []string `json:"-"` 3278 3279 // NullFields is a list of field names (e.g. "OpenUriAction") to include 3280 // in API requests with the JSON null value. By default, fields with 3281 // empty values are omitted from API requests. However, any field with 3282 // an empty value appearing in NullFields will be sent to the server as 3283 // null. It is an error if a field in this list has a non-empty value. 3284 // This may be used to include null fields in Patch requests. 3285 NullFields []string `json:"-"` 3286} 3287 3288func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) { 3289 type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButton 3290 raw := NoMethod(*s) 3291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3292} 3293 3294// GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction: 3295// Opens the given URI. 3296type GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction struct { 3297 // Uri: Required. The HTTP or HTTPS scheme URI. 3298 Uri string `json:"uri,omitempty"` 3299 3300 // ForceSendFields is a list of field names (e.g. "Uri") to 3301 // unconditionally include in API requests. By default, fields with 3302 // empty values are omitted from API requests. However, any non-pointer, 3303 // non-interface field appearing in ForceSendFields will be sent to the 3304 // server regardless of whether the field is empty or not. This may be 3305 // used to include empty fields in Patch requests. 3306 ForceSendFields []string `json:"-"` 3307 3308 // NullFields is a list of field names (e.g. "Uri") to include in API 3309 // requests with the JSON null value. By default, fields with empty 3310 // values are omitted from API requests. However, any field with an 3311 // empty value appearing in NullFields will be sent to the server as 3312 // null. It is an error if a field in this list has a non-empty value. 3313 // This may be used to include null fields in Patch requests. 3314 NullFields []string `json:"-"` 3315} 3316 3317func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) { 3318 type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction 3319 raw := NoMethod(*s) 3320 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3321} 3322 3323// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard: Browse 3324// Carousel Card for Actions on 3325// Google. 3326// https://developers.google.com/actions/assistant/responses#brow 3327// sing_carousel 3328type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard struct { 3329 // ImageDisplayOptions: Optional. Settings for displaying the image. 3330 // Applies to every image in 3331 // items. 3332 // 3333 // Possible values: 3334 // "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the 3335 // image and the image container with gray 3336 // bars. 3337 // "GRAY" - Fill the gaps between the image and the image container 3338 // with gray 3339 // bars. 3340 // "WHITE" - Fill the gaps between the image and the image container 3341 // with white 3342 // bars. 3343 // "CROPPED" - Image is scaled such that the image width and height 3344 // match or exceed 3345 // the container dimensions. This may crop the top and bottom of 3346 // the 3347 // image if the scaled image height is greater than the 3348 // container 3349 // height, or crop the left and right of the image if the scaled 3350 // image 3351 // width is greater than the container width. This is similar to 3352 // "Zoom 3353 // Mode" on a widescreen TV when playing a 4:3 video. 3354 // "BLURRED_BACKGROUND" - Pad the gaps between image and image frame 3355 // with a blurred copy of the 3356 // same image. 3357 ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"` 3358 3359 // Items: Required. List of items in the Browse Carousel Card. Minimum 3360 // of two 3361 // items, maximum of ten. 3362 Items []*GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"` 3363 3364 // ForceSendFields is a list of field names (e.g. "ImageDisplayOptions") 3365 // to unconditionally include in API requests. By default, fields with 3366 // empty values are omitted from API requests. However, any non-pointer, 3367 // non-interface field appearing in ForceSendFields will be sent to the 3368 // server regardless of whether the field is empty or not. This may be 3369 // used to include empty fields in Patch requests. 3370 ForceSendFields []string `json:"-"` 3371 3372 // NullFields is a list of field names (e.g. "ImageDisplayOptions") to 3373 // include in API requests with the JSON null value. By default, fields 3374 // with empty values are omitted from API requests. However, any field 3375 // with an empty value appearing in NullFields will be sent to the 3376 // server as null. It is an error if a field in this list has a 3377 // non-empty value. This may be used to include null fields in Patch 3378 // requests. 3379 NullFields []string `json:"-"` 3380} 3381 3382func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) { 3383 type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard 3384 raw := NoMethod(*s) 3385 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3386} 3387 3388// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa 3389// rdItem: Browsing carousel tile 3390type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct { 3391 // Description: Optional. Description of the carousel item. Maximum of 3392 // four lines of 3393 // text. 3394 Description string `json:"description,omitempty"` 3395 3396 // Footer: Optional. Text that appears at the bottom of the Browse 3397 // Carousel 3398 // Card. Maximum of one line of text. 3399 Footer string `json:"footer,omitempty"` 3400 3401 // Image: Optional. Hero image for the carousel item. 3402 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 3403 3404 // OpenUriAction: Required. Action to present to the user. 3405 OpenUriAction *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"` 3406 3407 // Title: Required. Title of the carousel item. Maximum of two lines of 3408 // text. 3409 Title string `json:"title,omitempty"` 3410 3411 // ForceSendFields is a list of field names (e.g. "Description") to 3412 // unconditionally include in API requests. By default, fields with 3413 // empty values are omitted from API requests. However, any non-pointer, 3414 // non-interface field appearing in ForceSendFields will be sent to the 3415 // server regardless of whether the field is empty or not. This may be 3416 // used to include empty fields in Patch requests. 3417 ForceSendFields []string `json:"-"` 3418 3419 // NullFields is a list of field names (e.g. "Description") to include 3420 // in API requests with the JSON null value. By default, fields with 3421 // empty values are omitted from API requests. However, any field with 3422 // an empty value appearing in NullFields will be sent to the server as 3423 // null. It is an error if a field in this list has a non-empty value. 3424 // This may be used to include null fields in Patch requests. 3425 NullFields []string `json:"-"` 3426} 3427 3428func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) { 3429 type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem 3430 raw := NoMethod(*s) 3431 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3432} 3433 3434// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa 3435// rdItemOpenUrlAction: Actions on Google action to open a given url. 3436type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct { 3437 // Url: Required. URL 3438 Url string `json:"url,omitempty"` 3439 3440 // UrlTypeHint: Optional. Specifies the type of viewer that is used when 3441 // opening 3442 // the URL. Defaults to opening via web browser. 3443 // 3444 // Possible values: 3445 // "URL_TYPE_HINT_UNSPECIFIED" - Unspecified 3446 // "AMP_ACTION" - Url would be an amp action 3447 // "AMP_CONTENT" - URL that points directly to AMP content, or to a 3448 // canonical URL 3449 // which refers to AMP content via <link rel="amphtml">. 3450 UrlTypeHint string `json:"urlTypeHint,omitempty"` 3451 3452 // ForceSendFields is a list of field names (e.g. "Url") to 3453 // unconditionally include in API requests. By default, fields with 3454 // empty values are omitted from API requests. However, any non-pointer, 3455 // non-interface field appearing in ForceSendFields will be sent to the 3456 // server regardless of whether the field is empty or not. This may be 3457 // used to include empty fields in Patch requests. 3458 ForceSendFields []string `json:"-"` 3459 3460 // NullFields is a list of field names (e.g. "Url") to include in API 3461 // requests with the JSON null value. By default, fields with empty 3462 // values are omitted from API requests. However, any field with an 3463 // empty value appearing in NullFields will be sent to the server as 3464 // null. It is an error if a field in this list has a non-empty value. 3465 // This may be used to include null fields in Patch requests. 3466 NullFields []string `json:"-"` 3467} 3468 3469func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) { 3470 type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction 3471 raw := NoMethod(*s) 3472 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3473} 3474 3475// GoogleCloudDialogflowV2IntentMessageCard: The card response message. 3476type GoogleCloudDialogflowV2IntentMessageCard struct { 3477 // Buttons: Optional. The collection of card buttons. 3478 Buttons []*GoogleCloudDialogflowV2IntentMessageCardButton `json:"buttons,omitempty"` 3479 3480 // ImageUri: Optional. The public URI to an image file for the card. 3481 ImageUri string `json:"imageUri,omitempty"` 3482 3483 // Subtitle: Optional. The subtitle of the card. 3484 Subtitle string `json:"subtitle,omitempty"` 3485 3486 // Title: Optional. The title of the card. 3487 Title string `json:"title,omitempty"` 3488 3489 // ForceSendFields is a list of field names (e.g. "Buttons") to 3490 // unconditionally include in API requests. By default, fields with 3491 // empty values are omitted from API requests. However, any non-pointer, 3492 // non-interface field appearing in ForceSendFields will be sent to the 3493 // server regardless of whether the field is empty or not. This may be 3494 // used to include empty fields in Patch requests. 3495 ForceSendFields []string `json:"-"` 3496 3497 // NullFields is a list of field names (e.g. "Buttons") to include in 3498 // API requests with the JSON null value. By default, fields with empty 3499 // values are omitted from API requests. However, any field with an 3500 // empty value appearing in NullFields will be sent to the server as 3501 // null. It is an error if a field in this list has a non-empty value. 3502 // This may be used to include null fields in Patch requests. 3503 NullFields []string `json:"-"` 3504} 3505 3506func (s *GoogleCloudDialogflowV2IntentMessageCard) MarshalJSON() ([]byte, error) { 3507 type NoMethod GoogleCloudDialogflowV2IntentMessageCard 3508 raw := NoMethod(*s) 3509 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3510} 3511 3512// GoogleCloudDialogflowV2IntentMessageCardButton: Contains information 3513// about a button. 3514type GoogleCloudDialogflowV2IntentMessageCardButton struct { 3515 // Postback: Optional. The text to send back to the Dialogflow API or a 3516 // URI to 3517 // open. 3518 Postback string `json:"postback,omitempty"` 3519 3520 // Text: Optional. The text to show on the button. 3521 Text string `json:"text,omitempty"` 3522 3523 // ForceSendFields is a list of field names (e.g. "Postback") to 3524 // unconditionally include in API requests. By default, fields with 3525 // empty values are omitted from API requests. However, any non-pointer, 3526 // non-interface field appearing in ForceSendFields will be sent to the 3527 // server regardless of whether the field is empty or not. This may be 3528 // used to include empty fields in Patch requests. 3529 ForceSendFields []string `json:"-"` 3530 3531 // NullFields is a list of field names (e.g. "Postback") to include in 3532 // API requests with the JSON null value. By default, fields with empty 3533 // values are omitted from API requests. However, any field with an 3534 // empty value appearing in NullFields will be sent to the server as 3535 // null. It is an error if a field in this list has a non-empty value. 3536 // This may be used to include null fields in Patch requests. 3537 NullFields []string `json:"-"` 3538} 3539 3540func (s *GoogleCloudDialogflowV2IntentMessageCardButton) MarshalJSON() ([]byte, error) { 3541 type NoMethod GoogleCloudDialogflowV2IntentMessageCardButton 3542 raw := NoMethod(*s) 3543 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3544} 3545 3546// GoogleCloudDialogflowV2IntentMessageCarouselSelect: The card for 3547// presenting a carousel of options to select from. 3548type GoogleCloudDialogflowV2IntentMessageCarouselSelect struct { 3549 // Items: Required. Carousel items. 3550 Items []*GoogleCloudDialogflowV2IntentMessageCarouselSelectItem `json:"items,omitempty"` 3551 3552 // ForceSendFields is a list of field names (e.g. "Items") to 3553 // unconditionally include in API requests. By default, fields with 3554 // empty values are omitted from API requests. However, any non-pointer, 3555 // non-interface field appearing in ForceSendFields will be sent to the 3556 // server regardless of whether the field is empty or not. This may be 3557 // used to include empty fields in Patch requests. 3558 ForceSendFields []string `json:"-"` 3559 3560 // NullFields is a list of field names (e.g. "Items") to include in API 3561 // requests with the JSON null value. By default, fields with empty 3562 // values are omitted from API requests. However, any field with an 3563 // empty value appearing in NullFields will be sent to the server as 3564 // null. It is an error if a field in this list has a non-empty value. 3565 // This may be used to include null fields in Patch requests. 3566 NullFields []string `json:"-"` 3567} 3568 3569func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) { 3570 type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelect 3571 raw := NoMethod(*s) 3572 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3573} 3574 3575// GoogleCloudDialogflowV2IntentMessageCarouselSelectItem: An item in 3576// the carousel. 3577type GoogleCloudDialogflowV2IntentMessageCarouselSelectItem struct { 3578 // Description: Optional. The body text of the card. 3579 Description string `json:"description,omitempty"` 3580 3581 // Image: Optional. The image to display. 3582 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 3583 3584 // Info: Required. Additional info about the option item. 3585 Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"` 3586 3587 // Title: Required. Title of the carousel item. 3588 Title string `json:"title,omitempty"` 3589 3590 // ForceSendFields is a list of field names (e.g. "Description") to 3591 // unconditionally include in API requests. By default, fields with 3592 // empty values are omitted from API requests. However, any non-pointer, 3593 // non-interface field appearing in ForceSendFields will be sent to the 3594 // server regardless of whether the field is empty or not. This may be 3595 // used to include empty fields in Patch requests. 3596 ForceSendFields []string `json:"-"` 3597 3598 // NullFields is a list of field names (e.g. "Description") to include 3599 // in API requests with the JSON null value. By default, fields with 3600 // empty values are omitted from API requests. However, any field with 3601 // an empty value appearing in NullFields will be sent to the server as 3602 // null. It is an error if a field in this list has a non-empty value. 3603 // This may be used to include null fields in Patch requests. 3604 NullFields []string `json:"-"` 3605} 3606 3607func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) { 3608 type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelectItem 3609 raw := NoMethod(*s) 3610 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3611} 3612 3613// GoogleCloudDialogflowV2IntentMessageColumnProperties: Column 3614// properties for TableCard. 3615type GoogleCloudDialogflowV2IntentMessageColumnProperties struct { 3616 // Header: Required. Column heading. 3617 Header string `json:"header,omitempty"` 3618 3619 // HorizontalAlignment: Optional. Defines text alignment for all cells 3620 // in this column. 3621 // 3622 // Possible values: 3623 // "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading 3624 // edge of the column. 3625 // "LEADING" - Text is aligned to the leading edge of the column. 3626 // "CENTER" - Text is centered in the column. 3627 // "TRAILING" - Text is aligned to the trailing edge of the column. 3628 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 3629 3630 // ForceSendFields is a list of field names (e.g. "Header") to 3631 // unconditionally include in API requests. By default, fields with 3632 // empty values are omitted from API requests. However, any non-pointer, 3633 // non-interface field appearing in ForceSendFields will be sent to the 3634 // server regardless of whether the field is empty or not. This may be 3635 // used to include empty fields in Patch requests. 3636 ForceSendFields []string `json:"-"` 3637 3638 // NullFields is a list of field names (e.g. "Header") to include in API 3639 // requests with the JSON null value. By default, fields with empty 3640 // values are omitted from API requests. However, any field with an 3641 // empty value appearing in NullFields will be sent to the server as 3642 // null. It is an error if a field in this list has a non-empty value. 3643 // This may be used to include null fields in Patch requests. 3644 NullFields []string `json:"-"` 3645} 3646 3647func (s *GoogleCloudDialogflowV2IntentMessageColumnProperties) MarshalJSON() ([]byte, error) { 3648 type NoMethod GoogleCloudDialogflowV2IntentMessageColumnProperties 3649 raw := NoMethod(*s) 3650 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3651} 3652 3653// GoogleCloudDialogflowV2IntentMessageImage: The image response 3654// message. 3655type GoogleCloudDialogflowV2IntentMessageImage struct { 3656 // AccessibilityText: Optional. A text description of the image to be 3657 // used for accessibility, 3658 // e.g., screen readers. 3659 AccessibilityText string `json:"accessibilityText,omitempty"` 3660 3661 // ImageUri: Optional. The public URI to an image file. 3662 ImageUri string `json:"imageUri,omitempty"` 3663 3664 // ForceSendFields is a list of field names (e.g. "AccessibilityText") 3665 // to unconditionally include in API requests. By default, fields with 3666 // empty values are omitted from API requests. However, any non-pointer, 3667 // non-interface field appearing in ForceSendFields will be sent to the 3668 // server regardless of whether the field is empty or not. This may be 3669 // used to include empty fields in Patch requests. 3670 ForceSendFields []string `json:"-"` 3671 3672 // NullFields is a list of field names (e.g. "AccessibilityText") to 3673 // include in API requests with the JSON null value. By default, fields 3674 // with empty values are omitted from API requests. However, any field 3675 // with an empty value appearing in NullFields will be sent to the 3676 // server as null. It is an error if a field in this list has a 3677 // non-empty value. This may be used to include null fields in Patch 3678 // requests. 3679 NullFields []string `json:"-"` 3680} 3681 3682func (s *GoogleCloudDialogflowV2IntentMessageImage) MarshalJSON() ([]byte, error) { 3683 type NoMethod GoogleCloudDialogflowV2IntentMessageImage 3684 raw := NoMethod(*s) 3685 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3686} 3687 3688// GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion: The suggestion 3689// chip message that allows the user to jump out to the app 3690// or website associated with this agent. 3691type GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion struct { 3692 // DestinationName: Required. The name of the app or site this chip is 3693 // linking to. 3694 DestinationName string `json:"destinationName,omitempty"` 3695 3696 // Uri: Required. The URI of the app or site to open when the user taps 3697 // the 3698 // suggestion chip. 3699 Uri string `json:"uri,omitempty"` 3700 3701 // ForceSendFields is a list of field names (e.g. "DestinationName") to 3702 // unconditionally include in API requests. By default, fields with 3703 // empty values are omitted from API requests. However, any non-pointer, 3704 // non-interface field appearing in ForceSendFields will be sent to the 3705 // server regardless of whether the field is empty or not. This may be 3706 // used to include empty fields in Patch requests. 3707 ForceSendFields []string `json:"-"` 3708 3709 // NullFields is a list of field names (e.g. "DestinationName") to 3710 // include in API requests with the JSON null value. By default, fields 3711 // with empty values are omitted from API requests. However, any field 3712 // with an empty value appearing in NullFields will be sent to the 3713 // server as null. It is an error if a field in this list has a 3714 // non-empty value. This may be used to include null fields in Patch 3715 // requests. 3716 NullFields []string `json:"-"` 3717} 3718 3719func (s *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) { 3720 type NoMethod GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion 3721 raw := NoMethod(*s) 3722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3723} 3724 3725// GoogleCloudDialogflowV2IntentMessageListSelect: The card for 3726// presenting a list of options to select from. 3727type GoogleCloudDialogflowV2IntentMessageListSelect struct { 3728 // Items: Required. List items. 3729 Items []*GoogleCloudDialogflowV2IntentMessageListSelectItem `json:"items,omitempty"` 3730 3731 // Subtitle: Optional. Subtitle of the list. 3732 Subtitle string `json:"subtitle,omitempty"` 3733 3734 // Title: Optional. The overall title of the list. 3735 Title string `json:"title,omitempty"` 3736 3737 // ForceSendFields is a list of field names (e.g. "Items") to 3738 // unconditionally include in API requests. By default, fields with 3739 // empty values are omitted from API requests. However, any non-pointer, 3740 // non-interface field appearing in ForceSendFields will be sent to the 3741 // server regardless of whether the field is empty or not. This may be 3742 // used to include empty fields in Patch requests. 3743 ForceSendFields []string `json:"-"` 3744 3745 // NullFields is a list of field names (e.g. "Items") to include in API 3746 // requests with the JSON null value. By default, fields with empty 3747 // values are omitted from API requests. However, any field with an 3748 // empty value appearing in NullFields will be sent to the server as 3749 // null. It is an error if a field in this list has a non-empty value. 3750 // This may be used to include null fields in Patch requests. 3751 NullFields []string `json:"-"` 3752} 3753 3754func (s *GoogleCloudDialogflowV2IntentMessageListSelect) MarshalJSON() ([]byte, error) { 3755 type NoMethod GoogleCloudDialogflowV2IntentMessageListSelect 3756 raw := NoMethod(*s) 3757 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3758} 3759 3760// GoogleCloudDialogflowV2IntentMessageListSelectItem: An item in the 3761// list. 3762type GoogleCloudDialogflowV2IntentMessageListSelectItem struct { 3763 // Description: Optional. The main text describing the item. 3764 Description string `json:"description,omitempty"` 3765 3766 // Image: Optional. The image to display. 3767 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 3768 3769 // Info: Required. Additional information about this option. 3770 Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"` 3771 3772 // Title: Required. The title of the list item. 3773 Title string `json:"title,omitempty"` 3774 3775 // ForceSendFields is a list of field names (e.g. "Description") to 3776 // unconditionally include in API requests. By default, fields with 3777 // empty values are omitted from API requests. However, any non-pointer, 3778 // non-interface field appearing in ForceSendFields will be sent to the 3779 // server regardless of whether the field is empty or not. This may be 3780 // used to include empty fields in Patch requests. 3781 ForceSendFields []string `json:"-"` 3782 3783 // NullFields is a list of field names (e.g. "Description") to include 3784 // in API requests with the JSON null value. By default, fields with 3785 // empty values are omitted from API requests. However, any field with 3786 // an empty value appearing in NullFields will be sent to the server as 3787 // null. It is an error if a field in this list has a non-empty value. 3788 // This may be used to include null fields in Patch requests. 3789 NullFields []string `json:"-"` 3790} 3791 3792func (s *GoogleCloudDialogflowV2IntentMessageListSelectItem) MarshalJSON() ([]byte, error) { 3793 type NoMethod GoogleCloudDialogflowV2IntentMessageListSelectItem 3794 raw := NoMethod(*s) 3795 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3796} 3797 3798// GoogleCloudDialogflowV2IntentMessageMediaContent: The media content 3799// card for Actions on Google. 3800type GoogleCloudDialogflowV2IntentMessageMediaContent struct { 3801 // MediaObjects: Required. List of media objects. 3802 MediaObjects []*GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"` 3803 3804 // MediaType: Optional. What type of media is the content (ie "audio"). 3805 // 3806 // Possible values: 3807 // "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified. 3808 // "AUDIO" - Response media type is audio. 3809 MediaType string `json:"mediaType,omitempty"` 3810 3811 // ForceSendFields is a list of field names (e.g. "MediaObjects") to 3812 // unconditionally include in API requests. By default, fields with 3813 // empty values are omitted from API requests. However, any non-pointer, 3814 // non-interface field appearing in ForceSendFields will be sent to the 3815 // server regardless of whether the field is empty or not. This may be 3816 // used to include empty fields in Patch requests. 3817 ForceSendFields []string `json:"-"` 3818 3819 // NullFields is a list of field names (e.g. "MediaObjects") to include 3820 // in API requests with the JSON null value. By default, fields with 3821 // empty values are omitted from API requests. However, any field with 3822 // an empty value appearing in NullFields will be sent to the server as 3823 // null. It is an error if a field in this list has a non-empty value. 3824 // This may be used to include null fields in Patch requests. 3825 NullFields []string `json:"-"` 3826} 3827 3828func (s *GoogleCloudDialogflowV2IntentMessageMediaContent) MarshalJSON() ([]byte, error) { 3829 type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContent 3830 raw := NoMethod(*s) 3831 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3832} 3833 3834// GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject: 3835// Response media object for media content card. 3836type GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject struct { 3837 // ContentUrl: Required. Url where the media is stored. 3838 ContentUrl string `json:"contentUrl,omitempty"` 3839 3840 // Description: Optional. Description of media card. 3841 Description string `json:"description,omitempty"` 3842 3843 // Icon: Optional. Icon to display above media content. 3844 Icon *GoogleCloudDialogflowV2IntentMessageImage `json:"icon,omitempty"` 3845 3846 // LargeImage: Optional. Image to display above media content. 3847 LargeImage *GoogleCloudDialogflowV2IntentMessageImage `json:"largeImage,omitempty"` 3848 3849 // Name: Required. Name of media card. 3850 Name string `json:"name,omitempty"` 3851 3852 // ForceSendFields is a list of field names (e.g. "ContentUrl") to 3853 // unconditionally include in API requests. By default, fields with 3854 // empty values are omitted from API requests. However, any non-pointer, 3855 // non-interface field appearing in ForceSendFields will be sent to the 3856 // server regardless of whether the field is empty or not. This may be 3857 // used to include empty fields in Patch requests. 3858 ForceSendFields []string `json:"-"` 3859 3860 // NullFields is a list of field names (e.g. "ContentUrl") to include in 3861 // API requests with the JSON null value. By default, fields with empty 3862 // values are omitted from API requests. However, any field with an 3863 // empty value appearing in NullFields will be sent to the server as 3864 // null. It is an error if a field in this list has a non-empty value. 3865 // This may be used to include null fields in Patch requests. 3866 NullFields []string `json:"-"` 3867} 3868 3869func (s *GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) { 3870 type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject 3871 raw := NoMethod(*s) 3872 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3873} 3874 3875// GoogleCloudDialogflowV2IntentMessageQuickReplies: The quick replies 3876// response message. 3877type GoogleCloudDialogflowV2IntentMessageQuickReplies struct { 3878 // QuickReplies: Optional. The collection of quick replies. 3879 QuickReplies []string `json:"quickReplies,omitempty"` 3880 3881 // Title: Optional. The title of the collection of quick replies. 3882 Title string `json:"title,omitempty"` 3883 3884 // ForceSendFields is a list of field names (e.g. "QuickReplies") to 3885 // unconditionally include in API requests. By default, fields with 3886 // empty values are omitted from API requests. However, any non-pointer, 3887 // non-interface field appearing in ForceSendFields will be sent to the 3888 // server regardless of whether the field is empty or not. This may be 3889 // used to include empty fields in Patch requests. 3890 ForceSendFields []string `json:"-"` 3891 3892 // NullFields is a list of field names (e.g. "QuickReplies") to include 3893 // in API requests with the JSON null value. By default, fields with 3894 // empty values are omitted from API requests. However, any field with 3895 // an empty value appearing in NullFields will be sent to the server as 3896 // null. It is an error if a field in this list has a non-empty value. 3897 // This may be used to include null fields in Patch requests. 3898 NullFields []string `json:"-"` 3899} 3900 3901func (s *GoogleCloudDialogflowV2IntentMessageQuickReplies) MarshalJSON() ([]byte, error) { 3902 type NoMethod GoogleCloudDialogflowV2IntentMessageQuickReplies 3903 raw := NoMethod(*s) 3904 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3905} 3906 3907// GoogleCloudDialogflowV2IntentMessageSelectItemInfo: Additional info 3908// about the select item for when it is triggered in a 3909// dialog. 3910type GoogleCloudDialogflowV2IntentMessageSelectItemInfo struct { 3911 // Key: Required. A unique key that will be sent back to the agent if 3912 // this 3913 // response is given. 3914 Key string `json:"key,omitempty"` 3915 3916 // Synonyms: Optional. A list of synonyms that can also be used to 3917 // trigger this 3918 // item in dialog. 3919 Synonyms []string `json:"synonyms,omitempty"` 3920 3921 // ForceSendFields is a list of field names (e.g. "Key") to 3922 // unconditionally include in API requests. By default, fields with 3923 // empty values are omitted from API requests. However, any non-pointer, 3924 // non-interface field appearing in ForceSendFields will be sent to the 3925 // server regardless of whether the field is empty or not. This may be 3926 // used to include empty fields in Patch requests. 3927 ForceSendFields []string `json:"-"` 3928 3929 // NullFields is a list of field names (e.g. "Key") to include in API 3930 // requests with the JSON null value. By default, fields with empty 3931 // values are omitted from API requests. However, any field with an 3932 // empty value appearing in NullFields will be sent to the server as 3933 // null. It is an error if a field in this list has a non-empty value. 3934 // This may be used to include null fields in Patch requests. 3935 NullFields []string `json:"-"` 3936} 3937 3938func (s *GoogleCloudDialogflowV2IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) { 3939 type NoMethod GoogleCloudDialogflowV2IntentMessageSelectItemInfo 3940 raw := NoMethod(*s) 3941 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3942} 3943 3944// GoogleCloudDialogflowV2IntentMessageSimpleResponse: The simple 3945// response message containing speech or text. 3946type GoogleCloudDialogflowV2IntentMessageSimpleResponse struct { 3947 // DisplayText: Optional. The text to display. 3948 DisplayText string `json:"displayText,omitempty"` 3949 3950 // Ssml: One of text_to_speech or ssml must be provided. Structured 3951 // spoken 3952 // response to the user in the SSML format. Mutually exclusive 3953 // with 3954 // text_to_speech. 3955 Ssml string `json:"ssml,omitempty"` 3956 3957 // TextToSpeech: One of text_to_speech or ssml must be provided. The 3958 // plain text of the 3959 // speech output. Mutually exclusive with ssml. 3960 TextToSpeech string `json:"textToSpeech,omitempty"` 3961 3962 // ForceSendFields is a list of field names (e.g. "DisplayText") to 3963 // unconditionally include in API requests. By default, fields with 3964 // empty values are omitted from API requests. However, any non-pointer, 3965 // non-interface field appearing in ForceSendFields will be sent to the 3966 // server regardless of whether the field is empty or not. This may be 3967 // used to include empty fields in Patch requests. 3968 ForceSendFields []string `json:"-"` 3969 3970 // NullFields is a list of field names (e.g. "DisplayText") to include 3971 // in API requests with the JSON null value. By default, fields with 3972 // empty values are omitted from API requests. However, any field with 3973 // an empty value appearing in NullFields will be sent to the server as 3974 // null. It is an error if a field in this list has a non-empty value. 3975 // This may be used to include null fields in Patch requests. 3976 NullFields []string `json:"-"` 3977} 3978 3979func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) { 3980 type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponse 3981 raw := NoMethod(*s) 3982 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3983} 3984 3985// GoogleCloudDialogflowV2IntentMessageSimpleResponses: The collection 3986// of simple response candidates. 3987// This message in `QueryResult.fulfillment_messages` 3988// and 3989// `WebhookResponse.fulfillment_messages` should contain only 3990// one 3991// `SimpleResponse`. 3992type GoogleCloudDialogflowV2IntentMessageSimpleResponses struct { 3993 // SimpleResponses: Required. The list of simple responses. 3994 SimpleResponses []*GoogleCloudDialogflowV2IntentMessageSimpleResponse `json:"simpleResponses,omitempty"` 3995 3996 // ForceSendFields is a list of field names (e.g. "SimpleResponses") to 3997 // unconditionally include in API requests. By default, fields with 3998 // empty values are omitted from API requests. However, any non-pointer, 3999 // non-interface field appearing in ForceSendFields will be sent to the 4000 // server regardless of whether the field is empty or not. This may be 4001 // used to include empty fields in Patch requests. 4002 ForceSendFields []string `json:"-"` 4003 4004 // NullFields is a list of field names (e.g. "SimpleResponses") to 4005 // include in API requests with the JSON null value. By default, fields 4006 // with empty values are omitted from API requests. However, any field 4007 // with an empty value appearing in NullFields will be sent to the 4008 // server as null. It is an error if a field in this list has a 4009 // non-empty value. This may be used to include null fields in Patch 4010 // requests. 4011 NullFields []string `json:"-"` 4012} 4013 4014func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) { 4015 type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponses 4016 raw := NoMethod(*s) 4017 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4018} 4019 4020// GoogleCloudDialogflowV2IntentMessageSuggestion: The suggestion chip 4021// message that the user can tap to quickly post a reply 4022// to the conversation. 4023type GoogleCloudDialogflowV2IntentMessageSuggestion struct { 4024 // Title: Required. The text shown the in the suggestion chip. 4025 Title string `json:"title,omitempty"` 4026 4027 // ForceSendFields is a list of field names (e.g. "Title") to 4028 // unconditionally include in API requests. By default, fields with 4029 // empty values are omitted from API requests. However, any non-pointer, 4030 // non-interface field appearing in ForceSendFields will be sent to the 4031 // server regardless of whether the field is empty or not. This may be 4032 // used to include empty fields in Patch requests. 4033 ForceSendFields []string `json:"-"` 4034 4035 // NullFields is a list of field names (e.g. "Title") to include in API 4036 // requests with the JSON null value. By default, fields with empty 4037 // values are omitted from API requests. However, any field with an 4038 // empty value appearing in NullFields will be sent to the server as 4039 // null. It is an error if a field in this list has a non-empty value. 4040 // This may be used to include null fields in Patch requests. 4041 NullFields []string `json:"-"` 4042} 4043 4044func (s *GoogleCloudDialogflowV2IntentMessageSuggestion) MarshalJSON() ([]byte, error) { 4045 type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestion 4046 raw := NoMethod(*s) 4047 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4048} 4049 4050// GoogleCloudDialogflowV2IntentMessageSuggestions: The collection of 4051// suggestions. 4052type GoogleCloudDialogflowV2IntentMessageSuggestions struct { 4053 // Suggestions: Required. The list of suggested replies. 4054 Suggestions []*GoogleCloudDialogflowV2IntentMessageSuggestion `json:"suggestions,omitempty"` 4055 4056 // ForceSendFields is a list of field names (e.g. "Suggestions") to 4057 // unconditionally include in API requests. By default, fields with 4058 // empty values are omitted from API requests. However, any non-pointer, 4059 // non-interface field appearing in ForceSendFields will be sent to the 4060 // server regardless of whether the field is empty or not. This may be 4061 // used to include empty fields in Patch requests. 4062 ForceSendFields []string `json:"-"` 4063 4064 // NullFields is a list of field names (e.g. "Suggestions") to include 4065 // in API requests with the JSON null value. By default, fields with 4066 // empty values are omitted from API requests. However, any field with 4067 // an empty value appearing in NullFields will be sent to the server as 4068 // null. It is an error if a field in this list has a non-empty value. 4069 // This may be used to include null fields in Patch requests. 4070 NullFields []string `json:"-"` 4071} 4072 4073func (s *GoogleCloudDialogflowV2IntentMessageSuggestions) MarshalJSON() ([]byte, error) { 4074 type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestions 4075 raw := NoMethod(*s) 4076 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4077} 4078 4079// GoogleCloudDialogflowV2IntentMessageTableCard: Table card for Actions 4080// on Google. 4081type GoogleCloudDialogflowV2IntentMessageTableCard struct { 4082 // Buttons: Optional. List of buttons for the card. 4083 Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"` 4084 4085 // ColumnProperties: Optional. Display properties for the columns in 4086 // this table. 4087 ColumnProperties []*GoogleCloudDialogflowV2IntentMessageColumnProperties `json:"columnProperties,omitempty"` 4088 4089 // Image: Optional. Image which should be displayed on the card. 4090 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 4091 4092 // Rows: Optional. Rows in this table of data. 4093 Rows []*GoogleCloudDialogflowV2IntentMessageTableCardRow `json:"rows,omitempty"` 4094 4095 // Subtitle: Optional. Subtitle to the title. 4096 Subtitle string `json:"subtitle,omitempty"` 4097 4098 // Title: Required. Title of the card. 4099 Title string `json:"title,omitempty"` 4100 4101 // ForceSendFields is a list of field names (e.g. "Buttons") to 4102 // unconditionally include in API requests. By default, fields with 4103 // empty values are omitted from API requests. However, any non-pointer, 4104 // non-interface field appearing in ForceSendFields will be sent to the 4105 // server regardless of whether the field is empty or not. This may be 4106 // used to include empty fields in Patch requests. 4107 ForceSendFields []string `json:"-"` 4108 4109 // NullFields is a list of field names (e.g. "Buttons") to include in 4110 // API requests with the JSON null value. By default, fields with empty 4111 // values are omitted from API requests. However, any field with an 4112 // empty value appearing in NullFields will be sent to the server as 4113 // null. It is an error if a field in this list has a non-empty value. 4114 // This may be used to include null fields in Patch requests. 4115 NullFields []string `json:"-"` 4116} 4117 4118func (s *GoogleCloudDialogflowV2IntentMessageTableCard) MarshalJSON() ([]byte, error) { 4119 type NoMethod GoogleCloudDialogflowV2IntentMessageTableCard 4120 raw := NoMethod(*s) 4121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4122} 4123 4124// GoogleCloudDialogflowV2IntentMessageTableCardCell: Cell of 4125// TableCardRow. 4126type GoogleCloudDialogflowV2IntentMessageTableCardCell struct { 4127 // Text: Required. Text in this cell. 4128 Text string `json:"text,omitempty"` 4129 4130 // ForceSendFields is a list of field names (e.g. "Text") to 4131 // unconditionally include in API requests. By default, fields with 4132 // empty values are omitted from API requests. However, any non-pointer, 4133 // non-interface field appearing in ForceSendFields will be sent to the 4134 // server regardless of whether the field is empty or not. This may be 4135 // used to include empty fields in Patch requests. 4136 ForceSendFields []string `json:"-"` 4137 4138 // NullFields is a list of field names (e.g. "Text") to include in API 4139 // requests with the JSON null value. By default, fields with empty 4140 // values are omitted from API requests. However, any field with an 4141 // empty value appearing in NullFields will be sent to the server as 4142 // null. It is an error if a field in this list has a non-empty value. 4143 // This may be used to include null fields in Patch requests. 4144 NullFields []string `json:"-"` 4145} 4146 4147func (s *GoogleCloudDialogflowV2IntentMessageTableCardCell) MarshalJSON() ([]byte, error) { 4148 type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardCell 4149 raw := NoMethod(*s) 4150 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4151} 4152 4153// GoogleCloudDialogflowV2IntentMessageTableCardRow: Row of TableCard. 4154type GoogleCloudDialogflowV2IntentMessageTableCardRow struct { 4155 // Cells: Optional. List of cells that make up this row. 4156 Cells []*GoogleCloudDialogflowV2IntentMessageTableCardCell `json:"cells,omitempty"` 4157 4158 // DividerAfter: Optional. Whether to add a visual divider after this 4159 // row. 4160 DividerAfter bool `json:"dividerAfter,omitempty"` 4161 4162 // ForceSendFields is a list of field names (e.g. "Cells") to 4163 // unconditionally include in API requests. By default, fields with 4164 // empty values are omitted from API requests. However, any non-pointer, 4165 // non-interface field appearing in ForceSendFields will be sent to the 4166 // server regardless of whether the field is empty or not. This may be 4167 // used to include empty fields in Patch requests. 4168 ForceSendFields []string `json:"-"` 4169 4170 // NullFields is a list of field names (e.g. "Cells") to include in API 4171 // requests with the JSON null value. By default, fields with empty 4172 // values are omitted from API requests. However, any field with an 4173 // empty value appearing in NullFields will be sent to the server as 4174 // null. It is an error if a field in this list has a non-empty value. 4175 // This may be used to include null fields in Patch requests. 4176 NullFields []string `json:"-"` 4177} 4178 4179func (s *GoogleCloudDialogflowV2IntentMessageTableCardRow) MarshalJSON() ([]byte, error) { 4180 type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardRow 4181 raw := NoMethod(*s) 4182 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4183} 4184 4185// GoogleCloudDialogflowV2IntentMessageText: The text response message. 4186type GoogleCloudDialogflowV2IntentMessageText struct { 4187 // Text: Optional. The collection of the agent's responses. 4188 Text []string `json:"text,omitempty"` 4189 4190 // ForceSendFields is a list of field names (e.g. "Text") to 4191 // unconditionally include in API requests. By default, fields with 4192 // empty values are omitted from API requests. However, any non-pointer, 4193 // non-interface field appearing in ForceSendFields will be sent to the 4194 // server regardless of whether the field is empty or not. This may be 4195 // used to include empty fields in Patch requests. 4196 ForceSendFields []string `json:"-"` 4197 4198 // NullFields is a list of field names (e.g. "Text") to include in API 4199 // requests with the JSON null value. By default, fields with empty 4200 // values are omitted from API requests. However, any field with an 4201 // empty value appearing in NullFields will be sent to the server as 4202 // null. It is an error if a field in this list has a non-empty value. 4203 // This may be used to include null fields in Patch requests. 4204 NullFields []string `json:"-"` 4205} 4206 4207func (s *GoogleCloudDialogflowV2IntentMessageText) MarshalJSON() ([]byte, error) { 4208 type NoMethod GoogleCloudDialogflowV2IntentMessageText 4209 raw := NoMethod(*s) 4210 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4211} 4212 4213// GoogleCloudDialogflowV2IntentParameter: Represents intent parameters. 4214type GoogleCloudDialogflowV2IntentParameter struct { 4215 // DefaultValue: Optional. The default value to use when the `value` 4216 // yields an empty 4217 // result. 4218 // Default values can be extracted from contexts by using the 4219 // following 4220 // syntax: `#context_name.parameter_name`. 4221 DefaultValue string `json:"defaultValue,omitempty"` 4222 4223 // DisplayName: Required. The name of the parameter. 4224 DisplayName string `json:"displayName,omitempty"` 4225 4226 // EntityTypeDisplayName: Optional. The name of the entity type, 4227 // prefixed with `@`, that 4228 // describes values of the parameter. If the parameter is 4229 // required, this must be provided. 4230 EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"` 4231 4232 // IsList: Optional. Indicates whether the parameter represents a list 4233 // of values. 4234 IsList bool `json:"isList,omitempty"` 4235 4236 // Mandatory: Optional. Indicates whether the parameter is required. 4237 // That is, 4238 // whether the intent cannot be completed without collecting the 4239 // parameter 4240 // value. 4241 Mandatory bool `json:"mandatory,omitempty"` 4242 4243 // Name: The unique identifier of this parameter. 4244 Name string `json:"name,omitempty"` 4245 4246 // Prompts: Optional. The collection of prompts that the agent can 4247 // present to the 4248 // user in order to collect a value for the parameter. 4249 Prompts []string `json:"prompts,omitempty"` 4250 4251 // Value: Optional. The definition of the parameter value. It can be: 4252 // 4253 // - a constant string, 4254 // - a parameter value defined as `$parameter_name`, 4255 // - an original parameter value defined as 4256 // `$parameter_name.original`, 4257 // - a parameter value from some context defined as 4258 // `#context_name.parameter_name`. 4259 Value string `json:"value,omitempty"` 4260 4261 // ForceSendFields is a list of field names (e.g. "DefaultValue") to 4262 // unconditionally include in API requests. By default, fields with 4263 // empty values are omitted from API requests. However, any non-pointer, 4264 // non-interface field appearing in ForceSendFields will be sent to the 4265 // server regardless of whether the field is empty or not. This may be 4266 // used to include empty fields in Patch requests. 4267 ForceSendFields []string `json:"-"` 4268 4269 // NullFields is a list of field names (e.g. "DefaultValue") to include 4270 // in API requests with the JSON null value. By default, fields with 4271 // empty values are omitted from API requests. However, any field with 4272 // an empty value appearing in NullFields will be sent to the server as 4273 // null. It is an error if a field in this list has a non-empty value. 4274 // This may be used to include null fields in Patch requests. 4275 NullFields []string `json:"-"` 4276} 4277 4278func (s *GoogleCloudDialogflowV2IntentParameter) MarshalJSON() ([]byte, error) { 4279 type NoMethod GoogleCloudDialogflowV2IntentParameter 4280 raw := NoMethod(*s) 4281 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4282} 4283 4284// GoogleCloudDialogflowV2IntentTrainingPhrase: Represents an example 4285// that the agent is trained on. 4286type GoogleCloudDialogflowV2IntentTrainingPhrase struct { 4287 // Name: Output only. The unique identifier of this training phrase. 4288 Name string `json:"name,omitempty"` 4289 4290 // Parts: Required. The ordered list of training phrase parts. 4291 // The parts are concatenated in order to form the training 4292 // phrase. 4293 // 4294 // Note: The API does not automatically annotate training phrases like 4295 // the 4296 // Dialogflow Console does. 4297 // 4298 // Note: Do not forget to include whitespace at part boundaries, 4299 // so the training phrase is well formatted when the parts are 4300 // concatenated. 4301 // 4302 // If the training phrase does not need to be annotated with 4303 // parameters, 4304 // you just need a single part with only the Part.text field set. 4305 // 4306 // If you want to annotate the training phrase, you must create 4307 // multiple 4308 // parts, where the fields of each part are populated in one of two 4309 // ways: 4310 // 4311 // - `Part.text` is set to a part of the phrase that has no 4312 // parameters. 4313 // - `Part.text` is set to a part of the phrase that you want to 4314 // annotate, 4315 // and the `entity_type`, `alias`, and `user_defined` fields are 4316 // all 4317 // set. 4318 Parts []*GoogleCloudDialogflowV2IntentTrainingPhrasePart `json:"parts,omitempty"` 4319 4320 // TimesAddedCount: Optional. Indicates how many times this example was 4321 // added to 4322 // the intent. Each time a developer adds an existing sample by editing 4323 // an 4324 // intent or training, this counter is increased. 4325 TimesAddedCount int64 `json:"timesAddedCount,omitempty"` 4326 4327 // Type: Required. The type of the training phrase. 4328 // 4329 // Possible values: 4330 // "TYPE_UNSPECIFIED" - Not specified. This value should never be 4331 // used. 4332 // "EXAMPLE" - Examples do not contain @-prefixed entity type names, 4333 // but example parts 4334 // can be annotated with entity types. 4335 // "TEMPLATE" - Templates are not annotated with entity types, but 4336 // they can contain 4337 // @-prefixed entity type names as substrings. 4338 // Template mode has been deprecated. Example mode is the only 4339 // supported 4340 // way to create new training phrases. If you have existing 4341 // training 4342 // phrases that you've created in template mode, those will continue 4343 // to 4344 // work. 4345 Type string `json:"type,omitempty"` 4346 4347 // ForceSendFields is a list of field names (e.g. "Name") to 4348 // unconditionally include in API requests. By default, fields with 4349 // empty values are omitted from API requests. However, any non-pointer, 4350 // non-interface field appearing in ForceSendFields will be sent to the 4351 // server regardless of whether the field is empty or not. This may be 4352 // used to include empty fields in Patch requests. 4353 ForceSendFields []string `json:"-"` 4354 4355 // NullFields is a list of field names (e.g. "Name") to include in API 4356 // requests with the JSON null value. By default, fields with empty 4357 // values are omitted from API requests. However, any field with an 4358 // empty value appearing in NullFields will be sent to the server as 4359 // null. It is an error if a field in this list has a non-empty value. 4360 // This may be used to include null fields in Patch requests. 4361 NullFields []string `json:"-"` 4362} 4363 4364func (s *GoogleCloudDialogflowV2IntentTrainingPhrase) MarshalJSON() ([]byte, error) { 4365 type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrase 4366 raw := NoMethod(*s) 4367 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4368} 4369 4370// GoogleCloudDialogflowV2IntentTrainingPhrasePart: Represents a part of 4371// a training phrase. 4372type GoogleCloudDialogflowV2IntentTrainingPhrasePart struct { 4373 // Alias: Optional. The parameter name for the value extracted from 4374 // the 4375 // annotated part of the example. 4376 // This field is required for annotated parts of the training phrase. 4377 Alias string `json:"alias,omitempty"` 4378 4379 // EntityType: Optional. The entity type name prefixed with `@`. 4380 // This field is required for annotated parts of the training phrase. 4381 EntityType string `json:"entityType,omitempty"` 4382 4383 // Text: Required. The text for this part. 4384 Text string `json:"text,omitempty"` 4385 4386 // UserDefined: Optional. Indicates whether the text was manually 4387 // annotated. 4388 // This field is set to true when the Dialogflow Console is used 4389 // to 4390 // manually annotate the part. When creating an annotated part with 4391 // the 4392 // API, you must set this to true. 4393 UserDefined bool `json:"userDefined,omitempty"` 4394 4395 // ForceSendFields is a list of field names (e.g. "Alias") to 4396 // unconditionally include in API requests. By default, fields with 4397 // empty values are omitted from API requests. However, any non-pointer, 4398 // non-interface field appearing in ForceSendFields will be sent to the 4399 // server regardless of whether the field is empty or not. This may be 4400 // used to include empty fields in Patch requests. 4401 ForceSendFields []string `json:"-"` 4402 4403 // NullFields is a list of field names (e.g. "Alias") to include in API 4404 // requests with the JSON null value. By default, fields with empty 4405 // values are omitted from API requests. However, any field with an 4406 // empty value appearing in NullFields will be sent to the server as 4407 // null. It is an error if a field in this list has a non-empty value. 4408 // This may be used to include null fields in Patch requests. 4409 NullFields []string `json:"-"` 4410} 4411 4412func (s *GoogleCloudDialogflowV2IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) { 4413 type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrasePart 4414 raw := NoMethod(*s) 4415 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4416} 4417 4418// GoogleCloudDialogflowV2ListContextsResponse: The response message for 4419// Contexts.ListContexts. 4420type GoogleCloudDialogflowV2ListContextsResponse struct { 4421 // Contexts: The list of contexts. There will be a maximum number of 4422 // items 4423 // returned based on the page_size field in the request. 4424 Contexts []*GoogleCloudDialogflowV2Context `json:"contexts,omitempty"` 4425 4426 // NextPageToken: Token to retrieve the next page of results, or empty 4427 // if there are no 4428 // more results in the list. 4429 NextPageToken string `json:"nextPageToken,omitempty"` 4430 4431 // ServerResponse contains the HTTP response code and headers from the 4432 // server. 4433 googleapi.ServerResponse `json:"-"` 4434 4435 // ForceSendFields is a list of field names (e.g. "Contexts") to 4436 // unconditionally include in API requests. By default, fields with 4437 // empty values are omitted from API requests. However, any non-pointer, 4438 // non-interface field appearing in ForceSendFields will be sent to the 4439 // server regardless of whether the field is empty or not. This may be 4440 // used to include empty fields in Patch requests. 4441 ForceSendFields []string `json:"-"` 4442 4443 // NullFields is a list of field names (e.g. "Contexts") to include in 4444 // API requests with the JSON null value. By default, fields with empty 4445 // values are omitted from API requests. However, any field with an 4446 // empty value appearing in NullFields will be sent to the server as 4447 // null. It is an error if a field in this list has a non-empty value. 4448 // This may be used to include null fields in Patch requests. 4449 NullFields []string `json:"-"` 4450} 4451 4452func (s *GoogleCloudDialogflowV2ListContextsResponse) MarshalJSON() ([]byte, error) { 4453 type NoMethod GoogleCloudDialogflowV2ListContextsResponse 4454 raw := NoMethod(*s) 4455 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4456} 4457 4458// GoogleCloudDialogflowV2ListEntityTypesResponse: The response message 4459// for EntityTypes.ListEntityTypes. 4460type GoogleCloudDialogflowV2ListEntityTypesResponse struct { 4461 // EntityTypes: The list of agent entity types. There will be a maximum 4462 // number of items 4463 // returned based on the page_size field in the request. 4464 EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"` 4465 4466 // NextPageToken: Token to retrieve the next page of results, or empty 4467 // if there are no 4468 // more results in the list. 4469 NextPageToken string `json:"nextPageToken,omitempty"` 4470 4471 // ServerResponse contains the HTTP response code and headers from the 4472 // server. 4473 googleapi.ServerResponse `json:"-"` 4474 4475 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 4476 // unconditionally include in API requests. By default, fields with 4477 // empty values are omitted from API requests. However, any non-pointer, 4478 // non-interface field appearing in ForceSendFields will be sent to the 4479 // server regardless of whether the field is empty or not. This may be 4480 // used to include empty fields in Patch requests. 4481 ForceSendFields []string `json:"-"` 4482 4483 // NullFields is a list of field names (e.g. "EntityTypes") to include 4484 // in API requests with the JSON null value. By default, fields with 4485 // empty values are omitted from API requests. However, any field with 4486 // an empty value appearing in NullFields will be sent to the server as 4487 // null. It is an error if a field in this list has a non-empty value. 4488 // This may be used to include null fields in Patch requests. 4489 NullFields []string `json:"-"` 4490} 4491 4492func (s *GoogleCloudDialogflowV2ListEntityTypesResponse) MarshalJSON() ([]byte, error) { 4493 type NoMethod GoogleCloudDialogflowV2ListEntityTypesResponse 4494 raw := NoMethod(*s) 4495 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4496} 4497 4498// GoogleCloudDialogflowV2ListEnvironmentsResponse: The response message 4499// for Environments.ListEnvironments. 4500type GoogleCloudDialogflowV2ListEnvironmentsResponse struct { 4501 // Environments: The list of agent environments. There will be a maximum 4502 // number of items 4503 // returned based on the page_size field in the request. 4504 Environments []*GoogleCloudDialogflowV2Environment `json:"environments,omitempty"` 4505 4506 // NextPageToken: Token to retrieve the next page of results, or empty 4507 // if there are no 4508 // more results in the list. 4509 NextPageToken string `json:"nextPageToken,omitempty"` 4510 4511 // ServerResponse contains the HTTP response code and headers from the 4512 // server. 4513 googleapi.ServerResponse `json:"-"` 4514 4515 // ForceSendFields is a list of field names (e.g. "Environments") to 4516 // unconditionally include in API requests. By default, fields with 4517 // empty values are omitted from API requests. However, any non-pointer, 4518 // non-interface field appearing in ForceSendFields will be sent to the 4519 // server regardless of whether the field is empty or not. This may be 4520 // used to include empty fields in Patch requests. 4521 ForceSendFields []string `json:"-"` 4522 4523 // NullFields is a list of field names (e.g. "Environments") to include 4524 // in API requests with the JSON null value. By default, fields with 4525 // empty values are omitted from API requests. However, any field with 4526 // an empty value appearing in NullFields will be sent to the server as 4527 // null. It is an error if a field in this list has a non-empty value. 4528 // This may be used to include null fields in Patch requests. 4529 NullFields []string `json:"-"` 4530} 4531 4532func (s *GoogleCloudDialogflowV2ListEnvironmentsResponse) MarshalJSON() ([]byte, error) { 4533 type NoMethod GoogleCloudDialogflowV2ListEnvironmentsResponse 4534 raw := NoMethod(*s) 4535 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4536} 4537 4538// GoogleCloudDialogflowV2ListIntentsResponse: The response message for 4539// Intents.ListIntents. 4540type GoogleCloudDialogflowV2ListIntentsResponse struct { 4541 // Intents: The list of agent intents. There will be a maximum number of 4542 // items 4543 // returned based on the page_size field in the request. 4544 Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"` 4545 4546 // NextPageToken: Token to retrieve the next page of results, or empty 4547 // if there are no 4548 // more results in the list. 4549 NextPageToken string `json:"nextPageToken,omitempty"` 4550 4551 // ServerResponse contains the HTTP response code and headers from the 4552 // server. 4553 googleapi.ServerResponse `json:"-"` 4554 4555 // ForceSendFields is a list of field names (e.g. "Intents") to 4556 // unconditionally include in API requests. By default, fields with 4557 // empty values are omitted from API requests. However, any non-pointer, 4558 // non-interface field appearing in ForceSendFields will be sent to the 4559 // server regardless of whether the field is empty or not. This may be 4560 // used to include empty fields in Patch requests. 4561 ForceSendFields []string `json:"-"` 4562 4563 // NullFields is a list of field names (e.g. "Intents") to include in 4564 // API requests with the JSON null value. By default, fields with empty 4565 // values are omitted from API requests. However, any field with an 4566 // empty value appearing in NullFields will be sent to the server as 4567 // null. It is an error if a field in this list has a non-empty value. 4568 // This may be used to include null fields in Patch requests. 4569 NullFields []string `json:"-"` 4570} 4571 4572func (s *GoogleCloudDialogflowV2ListIntentsResponse) MarshalJSON() ([]byte, error) { 4573 type NoMethod GoogleCloudDialogflowV2ListIntentsResponse 4574 raw := NoMethod(*s) 4575 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4576} 4577 4578// GoogleCloudDialogflowV2ListSessionEntityTypesResponse: The response 4579// message for SessionEntityTypes.ListSessionEntityTypes. 4580type GoogleCloudDialogflowV2ListSessionEntityTypesResponse struct { 4581 // NextPageToken: Token to retrieve the next page of results, or empty 4582 // if there are no 4583 // more results in the list. 4584 NextPageToken string `json:"nextPageToken,omitempty"` 4585 4586 // SessionEntityTypes: The list of session entity types. There will be a 4587 // maximum number of items 4588 // returned based on the page_size field in the request. 4589 SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"` 4590 4591 // ServerResponse contains the HTTP response code and headers from the 4592 // server. 4593 googleapi.ServerResponse `json:"-"` 4594 4595 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4596 // unconditionally include in API requests. By default, fields with 4597 // empty values are omitted from API requests. However, any non-pointer, 4598 // non-interface field appearing in ForceSendFields will be sent to the 4599 // server regardless of whether the field is empty or not. This may be 4600 // used to include empty fields in Patch requests. 4601 ForceSendFields []string `json:"-"` 4602 4603 // NullFields is a list of field names (e.g. "NextPageToken") to include 4604 // in API requests with the JSON null value. By default, fields with 4605 // empty values are omitted from API requests. However, any field with 4606 // an empty value appearing in NullFields will be sent to the server as 4607 // null. It is an error if a field in this list has a non-empty value. 4608 // This may be used to include null fields in Patch requests. 4609 NullFields []string `json:"-"` 4610} 4611 4612func (s *GoogleCloudDialogflowV2ListSessionEntityTypesResponse) MarshalJSON() ([]byte, error) { 4613 type NoMethod GoogleCloudDialogflowV2ListSessionEntityTypesResponse 4614 raw := NoMethod(*s) 4615 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4616} 4617 4618// GoogleCloudDialogflowV2Message: Represents a message posted into a 4619// conversation. 4620type GoogleCloudDialogflowV2Message struct { 4621 // Content: Required. The message content. 4622 Content string `json:"content,omitempty"` 4623 4624 // CreateTime: Output only. The time when the message was created. 4625 CreateTime string `json:"createTime,omitempty"` 4626 4627 // LanguageCode: Optional. The message language. 4628 // This should be a 4629 // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 4630 // language tag. Example: "en-US". 4631 LanguageCode string `json:"languageCode,omitempty"` 4632 4633 // MessageAnnotation: Output only. The annotation for the message. 4634 MessageAnnotation *GoogleCloudDialogflowV2MessageAnnotation `json:"messageAnnotation,omitempty"` 4635 4636 // Name: The unique identifier of the message. 4637 // Format: `projects/<Project 4638 // ID>/conversations/<Conversation 4639 // ID>/messages/<Message ID>`. 4640 Name string `json:"name,omitempty"` 4641 4642 // Participant: Output only. The participant that sends this message. 4643 Participant string `json:"participant,omitempty"` 4644 4645 // ParticipantRole: Output only. The role of the participant. 4646 // 4647 // Possible values: 4648 // "ROLE_UNSPECIFIED" - Participant role not set. 4649 // "HUMAN_AGENT" - Participant is a human agent. 4650 // "AUTOMATED_AGENT" - Participant is an automated agent, such as a 4651 // Dialogflow agent. 4652 // "END_USER" - Participant is an end user that has called or chatted 4653 // with 4654 // Dialogflow services. 4655 ParticipantRole string `json:"participantRole,omitempty"` 4656 4657 // ForceSendFields is a list of field names (e.g. "Content") to 4658 // unconditionally include in API requests. By default, fields with 4659 // empty values are omitted from API requests. However, any non-pointer, 4660 // non-interface field appearing in ForceSendFields will be sent to the 4661 // server regardless of whether the field is empty or not. This may be 4662 // used to include empty fields in Patch requests. 4663 ForceSendFields []string `json:"-"` 4664 4665 // NullFields is a list of field names (e.g. "Content") to include in 4666 // API requests with the JSON null value. By default, fields with empty 4667 // values are omitted from API requests. However, any field with an 4668 // empty value appearing in NullFields will be sent to the server as 4669 // null. It is an error if a field in this list has a non-empty value. 4670 // This may be used to include null fields in Patch requests. 4671 NullFields []string `json:"-"` 4672} 4673 4674func (s *GoogleCloudDialogflowV2Message) MarshalJSON() ([]byte, error) { 4675 type NoMethod GoogleCloudDialogflowV2Message 4676 raw := NoMethod(*s) 4677 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4678} 4679 4680// GoogleCloudDialogflowV2MessageAnnotation: Represents the result of 4681// annotation for the message. 4682type GoogleCloudDialogflowV2MessageAnnotation struct { 4683 // ContainEntities: Indicates whether the text message contains 4684 // entities. 4685 ContainEntities bool `json:"containEntities,omitempty"` 4686 4687 // Parts: The collection of annotated message parts ordered by 4688 // their 4689 // position in the message. You can recover the annotated message 4690 // by 4691 // concatenating [AnnotatedMessagePart.text]. 4692 Parts []*GoogleCloudDialogflowV2AnnotatedMessagePart `json:"parts,omitempty"` 4693 4694 // ForceSendFields is a list of field names (e.g. "ContainEntities") to 4695 // unconditionally include in API requests. By default, fields with 4696 // empty values are omitted from API requests. However, any non-pointer, 4697 // non-interface field appearing in ForceSendFields will be sent to the 4698 // server regardless of whether the field is empty or not. This may be 4699 // used to include empty fields in Patch requests. 4700 ForceSendFields []string `json:"-"` 4701 4702 // NullFields is a list of field names (e.g. "ContainEntities") to 4703 // include in API requests with the JSON null value. By default, fields 4704 // with empty values are omitted from API requests. However, any field 4705 // with an empty value appearing in NullFields will be sent to the 4706 // server as null. It is an error if a field in this list has a 4707 // non-empty value. This may be used to include null fields in Patch 4708 // requests. 4709 NullFields []string `json:"-"` 4710} 4711 4712func (s *GoogleCloudDialogflowV2MessageAnnotation) MarshalJSON() ([]byte, error) { 4713 type NoMethod GoogleCloudDialogflowV2MessageAnnotation 4714 raw := NoMethod(*s) 4715 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4716} 4717 4718// GoogleCloudDialogflowV2OriginalDetectIntentRequest: Represents the 4719// contents of the original request that was passed to 4720// the `[Streaming]DetectIntent` call. 4721type GoogleCloudDialogflowV2OriginalDetectIntentRequest struct { 4722 // Payload: Optional. This field is set to the value of the 4723 // `QueryParameters.payload` 4724 // field passed in the request. Some integrations that query a 4725 // Dialogflow 4726 // agent may provide additional information in the payload. 4727 // 4728 // In particular, for the Dialogflow Phone Gateway integration, this 4729 // field has 4730 // the form: 4731 // <pre>{ 4732 // "telephony": { 4733 // "caller_id": "+18558363987" 4734 // } 4735 // }</pre> 4736 // Note: The caller ID field (`caller_id`) will be redacted for 4737 // Standard 4738 // Edition agents and populated with the caller ID in 4739 // [E.164 4740 // format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition 4741 // agents. 4742 Payload googleapi.RawMessage `json:"payload,omitempty"` 4743 4744 // Source: The source of this request, e.g., `google`, `facebook`, 4745 // `slack`. It is set 4746 // by Dialogflow-owned servers. 4747 Source string `json:"source,omitempty"` 4748 4749 // Version: Optional. The version of the protocol used for this 4750 // request. 4751 // This field is AoG-specific. 4752 Version string `json:"version,omitempty"` 4753 4754 // ForceSendFields is a list of field names (e.g. "Payload") to 4755 // unconditionally include in API requests. By default, fields with 4756 // empty values are omitted from API requests. However, any non-pointer, 4757 // non-interface field appearing in ForceSendFields will be sent to the 4758 // server regardless of whether the field is empty or not. This may be 4759 // used to include empty fields in Patch requests. 4760 ForceSendFields []string `json:"-"` 4761 4762 // NullFields is a list of field names (e.g. "Payload") to include in 4763 // API requests with the JSON null value. By default, fields with empty 4764 // values are omitted from API requests. However, any field with an 4765 // empty value appearing in NullFields will be sent to the server as 4766 // null. It is an error if a field in this list has a non-empty value. 4767 // This may be used to include null fields in Patch requests. 4768 NullFields []string `json:"-"` 4769} 4770 4771func (s *GoogleCloudDialogflowV2OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) { 4772 type NoMethod GoogleCloudDialogflowV2OriginalDetectIntentRequest 4773 raw := NoMethod(*s) 4774 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4775} 4776 4777// GoogleCloudDialogflowV2OutputAudioConfig: Instructs the speech 4778// synthesizer on how to generate the output audio content. 4779// If this audio config is supplied in a request, it overrides all 4780// existing 4781// text-to-speech settings applied to the agent. 4782type GoogleCloudDialogflowV2OutputAudioConfig struct { 4783 // AudioEncoding: Required. Audio encoding of the synthesized audio 4784 // content. 4785 // 4786 // Possible values: 4787 // "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" - Not specified. 4788 // "OUTPUT_AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed 4789 // little-endian samples (Linear PCM). 4790 // Audio content returned as LINEAR16 also contains a WAV header. 4791 // "OUTPUT_AUDIO_ENCODING_MP3" - MP3 audio at 32kbps. 4792 // "OUTPUT_AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio wrapped in an 4793 // ogg container. The result will be a 4794 // file which can be played natively on Android, and in browsers (at 4795 // least 4796 // Chrome and Firefox). The quality of the encoding is considerably 4797 // higher 4798 // than MP3 while using approximately the same bitrate. 4799 AudioEncoding string `json:"audioEncoding,omitempty"` 4800 4801 // SampleRateHertz: The synthesis sample rate (in hertz) for this audio. 4802 // If not 4803 // provided, then the synthesizer will use the default sample rate based 4804 // on 4805 // the audio encoding. If this is different from the voice's natural 4806 // sample 4807 // rate, then the synthesizer will honor this request by converting to 4808 // the 4809 // desired sample rate (which might result in worse audio quality). 4810 SampleRateHertz int64 `json:"sampleRateHertz,omitempty"` 4811 4812 // SynthesizeSpeechConfig: Configuration of how speech should be 4813 // synthesized. 4814 SynthesizeSpeechConfig *GoogleCloudDialogflowV2SynthesizeSpeechConfig `json:"synthesizeSpeechConfig,omitempty"` 4815 4816 // ForceSendFields is a list of field names (e.g. "AudioEncoding") to 4817 // unconditionally include in API requests. By default, fields with 4818 // empty values are omitted from API requests. However, any non-pointer, 4819 // non-interface field appearing in ForceSendFields will be sent to the 4820 // server regardless of whether the field is empty or not. This may be 4821 // used to include empty fields in Patch requests. 4822 ForceSendFields []string `json:"-"` 4823 4824 // NullFields is a list of field names (e.g. "AudioEncoding") to include 4825 // in API requests with the JSON null value. By default, fields with 4826 // empty values are omitted from API requests. However, any field with 4827 // an empty value appearing in NullFields will be sent to the server as 4828 // null. It is an error if a field in this list has a non-empty value. 4829 // This may be used to include null fields in Patch requests. 4830 NullFields []string `json:"-"` 4831} 4832 4833func (s *GoogleCloudDialogflowV2OutputAudioConfig) MarshalJSON() ([]byte, error) { 4834 type NoMethod GoogleCloudDialogflowV2OutputAudioConfig 4835 raw := NoMethod(*s) 4836 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4837} 4838 4839// GoogleCloudDialogflowV2QueryInput: Represents the query input. It can 4840// contain either: 4841// 4842// 1. An audio config which 4843// instructs the speech recognizer how to process the speech 4844// audio. 4845// 4846// 2. A conversational query in the form of text,. 4847// 4848// 3. An event that specifies which intent to trigger. 4849type GoogleCloudDialogflowV2QueryInput struct { 4850 // AudioConfig: Instructs the speech recognizer how to process the 4851 // speech audio. 4852 AudioConfig *GoogleCloudDialogflowV2InputAudioConfig `json:"audioConfig,omitempty"` 4853 4854 // Event: The event to be processed. 4855 Event *GoogleCloudDialogflowV2EventInput `json:"event,omitempty"` 4856 4857 // Text: The natural language text to be processed. 4858 Text *GoogleCloudDialogflowV2TextInput `json:"text,omitempty"` 4859 4860 // ForceSendFields is a list of field names (e.g. "AudioConfig") to 4861 // unconditionally include in API requests. By default, fields with 4862 // empty values are omitted from API requests. However, any non-pointer, 4863 // non-interface field appearing in ForceSendFields will be sent to the 4864 // server regardless of whether the field is empty or not. This may be 4865 // used to include empty fields in Patch requests. 4866 ForceSendFields []string `json:"-"` 4867 4868 // NullFields is a list of field names (e.g. "AudioConfig") to include 4869 // in API requests with the JSON null value. By default, fields with 4870 // empty values are omitted from API requests. However, any field with 4871 // an empty value appearing in NullFields will be sent to the server as 4872 // null. It is an error if a field in this list has a non-empty value. 4873 // This may be used to include null fields in Patch requests. 4874 NullFields []string `json:"-"` 4875} 4876 4877func (s *GoogleCloudDialogflowV2QueryInput) MarshalJSON() ([]byte, error) { 4878 type NoMethod GoogleCloudDialogflowV2QueryInput 4879 raw := NoMethod(*s) 4880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4881} 4882 4883// GoogleCloudDialogflowV2QueryParameters: Represents the parameters of 4884// the conversational query. 4885type GoogleCloudDialogflowV2QueryParameters struct { 4886 // Contexts: The collection of contexts to be activated before this 4887 // query is 4888 // executed. 4889 Contexts []*GoogleCloudDialogflowV2Context `json:"contexts,omitempty"` 4890 4891 // GeoLocation: The geo location of this conversational query. 4892 GeoLocation *GoogleTypeLatLng `json:"geoLocation,omitempty"` 4893 4894 // Payload: This field can be used to pass custom data to your 4895 // webhook. 4896 // Arbitrary JSON objects are supported. 4897 // If supplied, the value is used to populate 4898 // the 4899 // `WebhookRequest.original_detect_intent_request.payload` 4900 // field sent to your webhook. 4901 Payload googleapi.RawMessage `json:"payload,omitempty"` 4902 4903 // ResetContexts: Specifies whether to delete all contexts in the 4904 // current session 4905 // before the new ones are activated. 4906 ResetContexts bool `json:"resetContexts,omitempty"` 4907 4908 // SentimentAnalysisRequestConfig: Configures the type of sentiment 4909 // analysis to perform. If not 4910 // provided, sentiment analysis is not performed. 4911 SentimentAnalysisRequestConfig *GoogleCloudDialogflowV2SentimentAnalysisRequestConfig `json:"sentimentAnalysisRequestConfig,omitempty"` 4912 4913 // SessionEntityTypes: Additional session entity types to replace or 4914 // extend developer 4915 // entity types with. The entity synonyms apply to all languages and 4916 // persist 4917 // for the session of this query. 4918 SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"` 4919 4920 // TimeZone: The time zone of this conversational query from the 4921 // [time zone database](https://www.iana.org/time-zones), 4922 // e.g., 4923 // America/New_York, Europe/Paris. If not provided, the time zone 4924 // specified in 4925 // agent settings is used. 4926 TimeZone string `json:"timeZone,omitempty"` 4927 4928 // ForceSendFields is a list of field names (e.g. "Contexts") to 4929 // unconditionally include in API requests. By default, fields with 4930 // empty values are omitted from API requests. However, any non-pointer, 4931 // non-interface field appearing in ForceSendFields will be sent to the 4932 // server regardless of whether the field is empty or not. This may be 4933 // used to include empty fields in Patch requests. 4934 ForceSendFields []string `json:"-"` 4935 4936 // NullFields is a list of field names (e.g. "Contexts") to include in 4937 // API requests with the JSON null value. By default, fields with empty 4938 // values are omitted from API requests. However, any field with an 4939 // empty value appearing in NullFields will be sent to the server as 4940 // null. It is an error if a field in this list has a non-empty value. 4941 // This may be used to include null fields in Patch requests. 4942 NullFields []string `json:"-"` 4943} 4944 4945func (s *GoogleCloudDialogflowV2QueryParameters) MarshalJSON() ([]byte, error) { 4946 type NoMethod GoogleCloudDialogflowV2QueryParameters 4947 raw := NoMethod(*s) 4948 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4949} 4950 4951// GoogleCloudDialogflowV2QueryResult: Represents the result of 4952// conversational query or event processing. 4953type GoogleCloudDialogflowV2QueryResult struct { 4954 // Action: The action name from the matched intent. 4955 Action string `json:"action,omitempty"` 4956 4957 // AllRequiredParamsPresent: This field is set to: 4958 // 4959 // - `false` if the matched intent has required parameters and not all 4960 // of 4961 // the required parameter values have been collected. 4962 // - `true` if all required parameter values have been collected, or if 4963 // the 4964 // matched intent doesn't contain any required parameters. 4965 AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"` 4966 4967 // DiagnosticInfo: Free-form diagnostic information for the associated 4968 // detect intent request. 4969 // The fields of this data can change without notice, so you should not 4970 // write 4971 // code that depends on its structure. 4972 // The data may contain: 4973 // 4974 // - webhook call latency 4975 // - webhook errors 4976 DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"` 4977 4978 // FulfillmentMessages: The collection of rich messages to present to 4979 // the user. 4980 FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"` 4981 4982 // FulfillmentText: The text to be pronounced to the user or shown on 4983 // the screen. 4984 // Note: This is a legacy field, `fulfillment_messages` should be 4985 // preferred. 4986 FulfillmentText string `json:"fulfillmentText,omitempty"` 4987 4988 // Intent: The intent that matched the conversational query. Some, 4989 // not 4990 // all fields are filled in this message, including but not limited 4991 // to: 4992 // `name`, `display_name`, `end_interaction` and `is_fallback`. 4993 Intent *GoogleCloudDialogflowV2Intent `json:"intent,omitempty"` 4994 4995 // IntentDetectionConfidence: The intent detection confidence. Values 4996 // range from 0.0 4997 // (completely uncertain) to 1.0 (completely certain). 4998 // This value is for informational purpose only and is only used to 4999 // help match the best intent within the classification threshold. 5000 // This value may change for the same end-user expression at any time 5001 // due to a 5002 // model retraining or change in implementation. 5003 // If there are `multiple knowledge_answers` messages, this value is set 5004 // to 5005 // the greatest `knowledgeAnswers.match_confidence` value in the list. 5006 IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"` 5007 5008 // LanguageCode: The language that was triggered during intent 5009 // detection. 5010 // See 5011 // [Language 5012 // Support](https://cloud.google.com/dialogflow/docs/reference/ 5013 // language) 5014 // for a list of the currently supported language codes. 5015 LanguageCode string `json:"languageCode,omitempty"` 5016 5017 // OutputContexts: The collection of output contexts. If 5018 // applicable, 5019 // `output_contexts.parameters` contains entries with name 5020 // `<parameter name>.original` containing the original parameter 5021 // values 5022 // before the query. 5023 OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"` 5024 5025 // Parameters: The collection of extracted parameters. 5026 // 5027 // Depending on your protocol or client library language, this is a 5028 // map, associative array, symbol table, dictionary, or JSON 5029 // object 5030 // composed of a collection of (MapKey, MapValue) pairs: 5031 // 5032 // - MapKey type: string 5033 // - MapKey value: parameter name 5034 // - MapValue type: 5035 // - If parameter's entity type is a composite entity: map 5036 // - Else: string or number, depending on parameter value type 5037 // - MapValue value: 5038 // - If parameter's entity type is a composite entity: 5039 // map from composite entity property names to property values 5040 // - Else: parameter value 5041 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 5042 5043 // QueryText: The original conversational query text: 5044 // 5045 // - If natural language text was provided as input, `query_text` 5046 // contains 5047 // a copy of the input. 5048 // - If natural language speech audio was provided as input, 5049 // `query_text` 5050 // contains the speech recognition result. If speech recognizer 5051 // produced 5052 // multiple alternatives, a particular one is picked. 5053 // - If automatic spell correction is enabled, `query_text` will contain 5054 // the 5055 // corrected user input. 5056 QueryText string `json:"queryText,omitempty"` 5057 5058 // SentimentAnalysisResult: The sentiment analysis result, which depends 5059 // on the 5060 // `sentiment_analysis_request_config` specified in the request. 5061 SentimentAnalysisResult *GoogleCloudDialogflowV2SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"` 5062 5063 // SpeechRecognitionConfidence: The Speech recognition confidence 5064 // between 0.0 and 1.0. A higher number 5065 // indicates an estimated greater likelihood that the recognized words 5066 // are 5067 // correct. The default of 0.0 is a sentinel value indicating that 5068 // confidence 5069 // was not set. 5070 // 5071 // This field is not guaranteed to be accurate or set. In particular 5072 // this 5073 // field isn't set for StreamingDetectIntent since the streaming 5074 // endpoint has 5075 // separate confidence estimates per portion of the audio 5076 // in 5077 // StreamingRecognitionResult. 5078 SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"` 5079 5080 // WebhookPayload: If the query was fulfilled by a webhook call, this 5081 // field is set to the 5082 // value of the `payload` field returned in the webhook response. 5083 WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"` 5084 5085 // WebhookSource: If the query was fulfilled by a webhook call, this 5086 // field is set to the 5087 // value of the `source` field returned in the webhook response. 5088 WebhookSource string `json:"webhookSource,omitempty"` 5089 5090 // ForceSendFields is a list of field names (e.g. "Action") to 5091 // unconditionally include in API requests. By default, fields with 5092 // empty values are omitted from API requests. However, any non-pointer, 5093 // non-interface field appearing in ForceSendFields will be sent to the 5094 // server regardless of whether the field is empty or not. This may be 5095 // used to include empty fields in Patch requests. 5096 ForceSendFields []string `json:"-"` 5097 5098 // NullFields is a list of field names (e.g. "Action") to include in API 5099 // requests with the JSON null value. By default, fields with empty 5100 // values are omitted from API requests. However, any field with an 5101 // empty value appearing in NullFields will be sent to the server as 5102 // null. It is an error if a field in this list has a non-empty value. 5103 // This may be used to include null fields in Patch requests. 5104 NullFields []string `json:"-"` 5105} 5106 5107func (s *GoogleCloudDialogflowV2QueryResult) MarshalJSON() ([]byte, error) { 5108 type NoMethod GoogleCloudDialogflowV2QueryResult 5109 raw := NoMethod(*s) 5110 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5111} 5112 5113func (s *GoogleCloudDialogflowV2QueryResult) UnmarshalJSON(data []byte) error { 5114 type NoMethod GoogleCloudDialogflowV2QueryResult 5115 var s1 struct { 5116 IntentDetectionConfidence gensupport.JSONFloat64 `json:"intentDetectionConfidence"` 5117 SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"` 5118 *NoMethod 5119 } 5120 s1.NoMethod = (*NoMethod)(s) 5121 if err := json.Unmarshal(data, &s1); err != nil { 5122 return err 5123 } 5124 s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence) 5125 s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence) 5126 return nil 5127} 5128 5129// GoogleCloudDialogflowV2RestoreAgentRequest: The request message for 5130// Agents.RestoreAgent. 5131type GoogleCloudDialogflowV2RestoreAgentRequest struct { 5132 // AgentContent: Zip compressed raw byte content for agent. 5133 AgentContent string `json:"agentContent,omitempty"` 5134 5135 // AgentUri: The URI to a Google Cloud Storage file containing the agent 5136 // to restore. 5137 // Note: The URI must start with "gs://". 5138 AgentUri string `json:"agentUri,omitempty"` 5139 5140 // ForceSendFields is a list of field names (e.g. "AgentContent") to 5141 // unconditionally include in API requests. By default, fields with 5142 // empty values are omitted from API requests. However, any non-pointer, 5143 // non-interface field appearing in ForceSendFields will be sent to the 5144 // server regardless of whether the field is empty or not. This may be 5145 // used to include empty fields in Patch requests. 5146 ForceSendFields []string `json:"-"` 5147 5148 // NullFields is a list of field names (e.g. "AgentContent") to include 5149 // in API requests with the JSON null value. By default, fields with 5150 // empty values are omitted from API requests. However, any field with 5151 // an empty value appearing in NullFields will be sent to the server as 5152 // null. It is an error if a field in this list has a non-empty value. 5153 // This may be used to include null fields in Patch requests. 5154 NullFields []string `json:"-"` 5155} 5156 5157func (s *GoogleCloudDialogflowV2RestoreAgentRequest) MarshalJSON() ([]byte, error) { 5158 type NoMethod GoogleCloudDialogflowV2RestoreAgentRequest 5159 raw := NoMethod(*s) 5160 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5161} 5162 5163// GoogleCloudDialogflowV2SearchAgentsResponse: The response message for 5164// Agents.SearchAgents. 5165type GoogleCloudDialogflowV2SearchAgentsResponse struct { 5166 // Agents: The list of agents. There will be a maximum number of items 5167 // returned based 5168 // on the page_size field in the request. 5169 Agents []*GoogleCloudDialogflowV2Agent `json:"agents,omitempty"` 5170 5171 // NextPageToken: Token to retrieve the next page of results, or empty 5172 // if there are no 5173 // more results in the list. 5174 NextPageToken string `json:"nextPageToken,omitempty"` 5175 5176 // ServerResponse contains the HTTP response code and headers from the 5177 // server. 5178 googleapi.ServerResponse `json:"-"` 5179 5180 // ForceSendFields is a list of field names (e.g. "Agents") to 5181 // unconditionally include in API requests. By default, fields with 5182 // empty values are omitted from API requests. However, any non-pointer, 5183 // non-interface field appearing in ForceSendFields will be sent to the 5184 // server regardless of whether the field is empty or not. This may be 5185 // used to include empty fields in Patch requests. 5186 ForceSendFields []string `json:"-"` 5187 5188 // NullFields is a list of field names (e.g. "Agents") to include in API 5189 // requests with the JSON null value. By default, fields with empty 5190 // values are omitted from API requests. However, any field with an 5191 // empty value appearing in NullFields will be sent to the server as 5192 // null. It is an error if a field in this list has a non-empty value. 5193 // This may be used to include null fields in Patch requests. 5194 NullFields []string `json:"-"` 5195} 5196 5197func (s *GoogleCloudDialogflowV2SearchAgentsResponse) MarshalJSON() ([]byte, error) { 5198 type NoMethod GoogleCloudDialogflowV2SearchAgentsResponse 5199 raw := NoMethod(*s) 5200 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5201} 5202 5203// GoogleCloudDialogflowV2Sentiment: The sentiment, such as 5204// positive/negative feeling or association, for a unit 5205// of analysis, such as the query text. 5206type GoogleCloudDialogflowV2Sentiment struct { 5207 // Magnitude: A non-negative number in the [0, +inf) range, which 5208 // represents the absolute 5209 // magnitude of sentiment, regardless of score (positive or negative). 5210 Magnitude float64 `json:"magnitude,omitempty"` 5211 5212 // Score: Sentiment score between -1.0 (negative sentiment) and 1.0 5213 // (positive 5214 // sentiment). 5215 Score float64 `json:"score,omitempty"` 5216 5217 // ForceSendFields is a list of field names (e.g. "Magnitude") to 5218 // unconditionally include in API requests. By default, fields with 5219 // empty values are omitted from API requests. However, any non-pointer, 5220 // non-interface field appearing in ForceSendFields will be sent to the 5221 // server regardless of whether the field is empty or not. This may be 5222 // used to include empty fields in Patch requests. 5223 ForceSendFields []string `json:"-"` 5224 5225 // NullFields is a list of field names (e.g. "Magnitude") to include in 5226 // API requests with the JSON null value. By default, fields with empty 5227 // values are omitted from API requests. However, any field with an 5228 // empty value appearing in NullFields will be sent to the server as 5229 // null. It is an error if a field in this list has a non-empty value. 5230 // This may be used to include null fields in Patch requests. 5231 NullFields []string `json:"-"` 5232} 5233 5234func (s *GoogleCloudDialogflowV2Sentiment) MarshalJSON() ([]byte, error) { 5235 type NoMethod GoogleCloudDialogflowV2Sentiment 5236 raw := NoMethod(*s) 5237 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5238} 5239 5240func (s *GoogleCloudDialogflowV2Sentiment) UnmarshalJSON(data []byte) error { 5241 type NoMethod GoogleCloudDialogflowV2Sentiment 5242 var s1 struct { 5243 Magnitude gensupport.JSONFloat64 `json:"magnitude"` 5244 Score gensupport.JSONFloat64 `json:"score"` 5245 *NoMethod 5246 } 5247 s1.NoMethod = (*NoMethod)(s) 5248 if err := json.Unmarshal(data, &s1); err != nil { 5249 return err 5250 } 5251 s.Magnitude = float64(s1.Magnitude) 5252 s.Score = float64(s1.Score) 5253 return nil 5254} 5255 5256// GoogleCloudDialogflowV2SentimentAnalysisRequestConfig: Configures the 5257// types of sentiment analysis to perform. 5258type GoogleCloudDialogflowV2SentimentAnalysisRequestConfig struct { 5259 // AnalyzeQueryTextSentiment: Instructs the service to perform sentiment 5260 // analysis on 5261 // `query_text`. If not provided, sentiment analysis is not performed 5262 // on 5263 // `query_text`. 5264 AnalyzeQueryTextSentiment bool `json:"analyzeQueryTextSentiment,omitempty"` 5265 5266 // ForceSendFields is a list of field names (e.g. 5267 // "AnalyzeQueryTextSentiment") to unconditionally include in API 5268 // requests. By default, fields with empty values are omitted from API 5269 // requests. However, any non-pointer, non-interface field appearing in 5270 // ForceSendFields will be sent to the server regardless of whether the 5271 // field is empty or not. This may be used to include empty fields in 5272 // Patch requests. 5273 ForceSendFields []string `json:"-"` 5274 5275 // NullFields is a list of field names (e.g. 5276 // "AnalyzeQueryTextSentiment") to include in API requests with the JSON 5277 // null value. By default, fields with empty values are omitted from API 5278 // requests. However, any field with an empty value appearing in 5279 // NullFields will be sent to the server as null. It is an error if a 5280 // field in this list has a non-empty value. This may be used to include 5281 // null fields in Patch requests. 5282 NullFields []string `json:"-"` 5283} 5284 5285func (s *GoogleCloudDialogflowV2SentimentAnalysisRequestConfig) MarshalJSON() ([]byte, error) { 5286 type NoMethod GoogleCloudDialogflowV2SentimentAnalysisRequestConfig 5287 raw := NoMethod(*s) 5288 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5289} 5290 5291// GoogleCloudDialogflowV2SentimentAnalysisResult: The result of 5292// sentiment analysis. Sentiment analysis inspects user input 5293// and identifies the prevailing subjective opinion, especially to 5294// determine a 5295// user's attitude as positive, negative, or neutral. 5296// For Participants.AnalyzeContent, it needs to be configured 5297// in 5298// DetectIntentRequest.query_params. 5299// For 5300// Participants.StreamingAnalyzeContent, it needs to be configured 5301// in 5302// StreamingDetectIntentRequest.query_params. 5303// And for Participants.AnalyzeContent 5304// and 5305// Participants.StreamingAnalyzeContent, it needs to be configured 5306// in 5307// ConversationProfile.human_agent_assistant_config 5308type GoogleCloudDialogflowV2SentimentAnalysisResult struct { 5309 // QueryTextSentiment: The sentiment analysis result for `query_text`. 5310 QueryTextSentiment *GoogleCloudDialogflowV2Sentiment `json:"queryTextSentiment,omitempty"` 5311 5312 // ForceSendFields is a list of field names (e.g. "QueryTextSentiment") 5313 // to unconditionally include in API requests. By default, fields with 5314 // empty values are omitted from API requests. However, any non-pointer, 5315 // non-interface field appearing in ForceSendFields will be sent to the 5316 // server regardless of whether the field is empty or not. This may be 5317 // used to include empty fields in Patch requests. 5318 ForceSendFields []string `json:"-"` 5319 5320 // NullFields is a list of field names (e.g. "QueryTextSentiment") to 5321 // include in API requests with the JSON null value. By default, fields 5322 // with empty values are omitted from API requests. However, any field 5323 // with an empty value appearing in NullFields will be sent to the 5324 // server as null. It is an error if a field in this list has a 5325 // non-empty value. This may be used to include null fields in Patch 5326 // requests. 5327 NullFields []string `json:"-"` 5328} 5329 5330func (s *GoogleCloudDialogflowV2SentimentAnalysisResult) MarshalJSON() ([]byte, error) { 5331 type NoMethod GoogleCloudDialogflowV2SentimentAnalysisResult 5332 raw := NoMethod(*s) 5333 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5334} 5335 5336// GoogleCloudDialogflowV2SessionEntityType: Represents a session entity 5337// type. 5338// 5339// Extends or replaces a custom entity type at the user session level 5340// (we 5341// refer to the entity types defined at the agent level as "custom 5342// entity 5343// types"). 5344// 5345// Note: session entity types apply to all queries, regardless of the 5346// language. 5347type GoogleCloudDialogflowV2SessionEntityType struct { 5348 // Entities: Required. The collection of entities associated with this 5349 // session entity 5350 // type. 5351 Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"` 5352 5353 // EntityOverrideMode: Required. Indicates whether the additional data 5354 // should override or 5355 // supplement the custom entity type definition. 5356 // 5357 // Possible values: 5358 // "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value 5359 // should be never used. 5360 // "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session 5361 // entities overrides the collection of entities 5362 // in the corresponding custom entity type. 5363 // "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session 5364 // entities extends the collection of entities in 5365 // the corresponding custom entity type. 5366 // 5367 // Note: Even in this override mode calls to 5368 // `ListSessionEntityTypes`, 5369 // `GetSessionEntityType`, `CreateSessionEntityType` 5370 // and 5371 // `UpdateSessionEntityType` only return the additional entities added 5372 // in 5373 // this session entity type. If you want to get the supplemented 5374 // list, 5375 // please call EntityTypes.GetEntityType on the custom entity type 5376 // and merge. 5377 EntityOverrideMode string `json:"entityOverrideMode,omitempty"` 5378 5379 // Name: Required. The unique identifier of this session entity type. 5380 // Format: 5381 // `projects/<Project ID>/agent/sessions/<Session 5382 // ID>/entityTypes/<Entity Type 5383 // Display Name>`, or `projects/<Project 5384 // ID>/agent/environments/<Environment 5385 // ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type 5386 // Display 5387 // Name>`. 5388 // If `Environment ID` is not specified, we assume default 5389 // 'draft' 5390 // environment. If `User ID` is not specified, we assume default '-' 5391 // user. 5392 // 5393 // `<Entity Type Display Name>` must be the display name of an existing 5394 // entity 5395 // type in the same agent that will be overridden or supplemented. 5396 Name string `json:"name,omitempty"` 5397 5398 // ServerResponse contains the HTTP response code and headers from the 5399 // server. 5400 googleapi.ServerResponse `json:"-"` 5401 5402 // ForceSendFields is a list of field names (e.g. "Entities") to 5403 // unconditionally include in API requests. By default, fields with 5404 // empty values are omitted from API requests. However, any non-pointer, 5405 // non-interface field appearing in ForceSendFields will be sent to the 5406 // server regardless of whether the field is empty or not. This may be 5407 // used to include empty fields in Patch requests. 5408 ForceSendFields []string `json:"-"` 5409 5410 // NullFields is a list of field names (e.g. "Entities") to include in 5411 // API requests with the JSON null value. By default, fields with empty 5412 // values are omitted from API requests. However, any field with an 5413 // empty value appearing in NullFields will be sent to the server as 5414 // null. It is an error if a field in this list has a non-empty value. 5415 // This may be used to include null fields in Patch requests. 5416 NullFields []string `json:"-"` 5417} 5418 5419func (s *GoogleCloudDialogflowV2SessionEntityType) MarshalJSON() ([]byte, error) { 5420 type NoMethod GoogleCloudDialogflowV2SessionEntityType 5421 raw := NoMethod(*s) 5422 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5423} 5424 5425// GoogleCloudDialogflowV2SpeechContext: Hints for the speech recognizer 5426// to help with recognition in a specific 5427// conversation state. 5428type GoogleCloudDialogflowV2SpeechContext struct { 5429 // Boost: Optional. Boost for this context compared to other 5430 // contexts: 5431 // 5432 // * If the boost is positive, Dialogflow will increase the probability 5433 // that 5434 // the phrases in this context are recognized over similar sounding 5435 // phrases. 5436 // * If the boost is unspecified or non-positive, Dialogflow will not 5437 // apply 5438 // any boost. 5439 // 5440 // Dialogflow recommends that you use boosts in the range (0, 20] and 5441 // that you 5442 // find a value that fits your use case with binary search. 5443 Boost float64 `json:"boost,omitempty"` 5444 5445 // Phrases: Optional. A list of strings containing words and phrases 5446 // that the speech 5447 // recognizer should recognize with higher likelihood. 5448 // 5449 // This list can be used to: 5450 // * improve accuracy for words and phrases you expect the user to say, 5451 // e.g. typical commands for your Dialogflow agent 5452 // * add additional words to the speech recognizer vocabulary 5453 // * ... 5454 // 5455 // See the [Cloud 5456 // Speech 5457 // documentation](https://cloud.google.com/speech-to-text/quotas) for 5458 // usage 5459 // limits. 5460 Phrases []string `json:"phrases,omitempty"` 5461 5462 // ForceSendFields is a list of field names (e.g. "Boost") to 5463 // unconditionally include in API requests. By default, fields with 5464 // empty values are omitted from API requests. However, any non-pointer, 5465 // non-interface field appearing in ForceSendFields will be sent to the 5466 // server regardless of whether the field is empty or not. This may be 5467 // used to include empty fields in Patch requests. 5468 ForceSendFields []string `json:"-"` 5469 5470 // NullFields is a list of field names (e.g. "Boost") to include in API 5471 // requests with the JSON null value. By default, fields with empty 5472 // values are omitted from API requests. However, any field with an 5473 // empty value appearing in NullFields will be sent to the server as 5474 // null. It is an error if a field in this list has a non-empty value. 5475 // This may be used to include null fields in Patch requests. 5476 NullFields []string `json:"-"` 5477} 5478 5479func (s *GoogleCloudDialogflowV2SpeechContext) MarshalJSON() ([]byte, error) { 5480 type NoMethod GoogleCloudDialogflowV2SpeechContext 5481 raw := NoMethod(*s) 5482 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5483} 5484 5485func (s *GoogleCloudDialogflowV2SpeechContext) UnmarshalJSON(data []byte) error { 5486 type NoMethod GoogleCloudDialogflowV2SpeechContext 5487 var s1 struct { 5488 Boost gensupport.JSONFloat64 `json:"boost"` 5489 *NoMethod 5490 } 5491 s1.NoMethod = (*NoMethod)(s) 5492 if err := json.Unmarshal(data, &s1); err != nil { 5493 return err 5494 } 5495 s.Boost = float64(s1.Boost) 5496 return nil 5497} 5498 5499// GoogleCloudDialogflowV2SynthesizeSpeechConfig: Configuration of how 5500// speech should be synthesized. 5501type GoogleCloudDialogflowV2SynthesizeSpeechConfig struct { 5502 // EffectsProfileId: Optional. An identifier which selects 'audio 5503 // effects' profiles that are 5504 // applied on (post synthesized) text to speech. Effects are applied on 5505 // top of 5506 // each other in the order they are given. 5507 EffectsProfileId []string `json:"effectsProfileId,omitempty"` 5508 5509 // Pitch: Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means 5510 // increase 20 5511 // semitones from the original pitch. -20 means decrease 20 semitones 5512 // from the 5513 // original pitch. 5514 Pitch float64 `json:"pitch,omitempty"` 5515 5516 // SpeakingRate: Optional. Speaking rate/speed, in the range [0.25, 5517 // 4.0]. 1.0 is the normal 5518 // native speed supported by the specific voice. 2.0 is twice as fast, 5519 // and 5520 // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. 5521 // Any 5522 // other values < 0.25 or > 4.0 will return an error. 5523 SpeakingRate float64 `json:"speakingRate,omitempty"` 5524 5525 // Voice: Optional. The desired voice of the synthesized audio. 5526 Voice *GoogleCloudDialogflowV2VoiceSelectionParams `json:"voice,omitempty"` 5527 5528 // VolumeGainDb: Optional. Volume gain (in dB) of the normal native 5529 // volume supported by the 5530 // specific voice, in the range [-96.0, 16.0]. If unset, or set to a 5531 // value of 5532 // 0.0 (dB), will play at normal native signal amplitude. A value of 5533 // -6.0 (dB) 5534 // will play at approximately half the amplitude of the normal native 5535 // signal 5536 // amplitude. A value of +6.0 (dB) will play at approximately twice 5537 // the 5538 // amplitude of the normal native signal amplitude. We strongly 5539 // recommend not 5540 // to exceed +10 (dB) as there's usually no effective increase in 5541 // loudness for 5542 // any value greater than that. 5543 VolumeGainDb float64 `json:"volumeGainDb,omitempty"` 5544 5545 // ForceSendFields is a list of field names (e.g. "EffectsProfileId") to 5546 // unconditionally include in API requests. By default, fields with 5547 // empty values are omitted from API requests. However, any non-pointer, 5548 // non-interface field appearing in ForceSendFields will be sent to the 5549 // server regardless of whether the field is empty or not. This may be 5550 // used to include empty fields in Patch requests. 5551 ForceSendFields []string `json:"-"` 5552 5553 // NullFields is a list of field names (e.g. "EffectsProfileId") to 5554 // include in API requests with the JSON null value. By default, fields 5555 // with empty values are omitted from API requests. However, any field 5556 // with an empty value appearing in NullFields will be sent to the 5557 // server as null. It is an error if a field in this list has a 5558 // non-empty value. This may be used to include null fields in Patch 5559 // requests. 5560 NullFields []string `json:"-"` 5561} 5562 5563func (s *GoogleCloudDialogflowV2SynthesizeSpeechConfig) MarshalJSON() ([]byte, error) { 5564 type NoMethod GoogleCloudDialogflowV2SynthesizeSpeechConfig 5565 raw := NoMethod(*s) 5566 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5567} 5568 5569func (s *GoogleCloudDialogflowV2SynthesizeSpeechConfig) UnmarshalJSON(data []byte) error { 5570 type NoMethod GoogleCloudDialogflowV2SynthesizeSpeechConfig 5571 var s1 struct { 5572 Pitch gensupport.JSONFloat64 `json:"pitch"` 5573 SpeakingRate gensupport.JSONFloat64 `json:"speakingRate"` 5574 VolumeGainDb gensupport.JSONFloat64 `json:"volumeGainDb"` 5575 *NoMethod 5576 } 5577 s1.NoMethod = (*NoMethod)(s) 5578 if err := json.Unmarshal(data, &s1); err != nil { 5579 return err 5580 } 5581 s.Pitch = float64(s1.Pitch) 5582 s.SpeakingRate = float64(s1.SpeakingRate) 5583 s.VolumeGainDb = float64(s1.VolumeGainDb) 5584 return nil 5585} 5586 5587// GoogleCloudDialogflowV2TextInput: Represents the natural language 5588// text to be processed. 5589type GoogleCloudDialogflowV2TextInput struct { 5590 // LanguageCode: Required. The language of this conversational query. 5591 // See 5592 // [Language 5593 // Support](https://cloud.google.com/dialogflow/docs/reference/ 5594 // language) 5595 // for a list of the currently supported language codes. Note that 5596 // queries in 5597 // the same session do not necessarily need to specify the same 5598 // language. 5599 LanguageCode string `json:"languageCode,omitempty"` 5600 5601 // Text: Required. The UTF-8 encoded natural language text to be 5602 // processed. 5603 // Text length must not exceed 256 characters. 5604 Text string `json:"text,omitempty"` 5605 5606 // ForceSendFields is a list of field names (e.g. "LanguageCode") to 5607 // unconditionally include in API requests. By default, fields with 5608 // empty values are omitted from API requests. However, any non-pointer, 5609 // non-interface field appearing in ForceSendFields will be sent to the 5610 // server regardless of whether the field is empty or not. This may be 5611 // used to include empty fields in Patch requests. 5612 ForceSendFields []string `json:"-"` 5613 5614 // NullFields is a list of field names (e.g. "LanguageCode") to include 5615 // in API requests with the JSON null value. By default, fields with 5616 // empty values are omitted from API requests. However, any field with 5617 // an empty value appearing in NullFields will be sent to the server as 5618 // null. It is an error if a field in this list has a non-empty value. 5619 // This may be used to include null fields in Patch requests. 5620 NullFields []string `json:"-"` 5621} 5622 5623func (s *GoogleCloudDialogflowV2TextInput) MarshalJSON() ([]byte, error) { 5624 type NoMethod GoogleCloudDialogflowV2TextInput 5625 raw := NoMethod(*s) 5626 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5627} 5628 5629// GoogleCloudDialogflowV2TrainAgentRequest: The request message for 5630// Agents.TrainAgent. 5631type GoogleCloudDialogflowV2TrainAgentRequest struct { 5632} 5633 5634// GoogleCloudDialogflowV2ValidationError: Represents a single 5635// validation error. 5636type GoogleCloudDialogflowV2ValidationError struct { 5637 // Entries: The names of the entries that the error is associated 5638 // with. 5639 // Format: 5640 // 5641 // - "projects/<Project ID>/agent", if the error is associated with the 5642 // entire 5643 // agent. 5644 // - "projects/<Project ID>/agent/intents/<Intent ID>", if the error 5645 // is 5646 // associated with certain intents. 5647 // - "projects/<Project 5648 // ID>/agent/intents/<Intent Id>/trainingPhrases/<Training Phrase ID>", 5649 // if the 5650 // error is associated with certain intent training phrases. 5651 // - "projects/<Project ID>/agent/intents/<Intent 5652 // Id>/parameters/<Parameter 5653 // ID>", if the error is associated with certain intent parameters. 5654 // - "projects/<Project ID>/agent/entities/<Entity ID>", if the error 5655 // is 5656 // associated with certain entities. 5657 Entries []string `json:"entries,omitempty"` 5658 5659 // ErrorMessage: The detailed error messsage. 5660 ErrorMessage string `json:"errorMessage,omitempty"` 5661 5662 // Severity: The severity of the error. 5663 // 5664 // Possible values: 5665 // "SEVERITY_UNSPECIFIED" - Not specified. This value should never be 5666 // used. 5667 // "INFO" - The agent doesn't follow Dialogflow best practicies. 5668 // "WARNING" - The agent may not behave as expected. 5669 // "ERROR" - The agent may experience partial failures. 5670 // "CRITICAL" - The agent may completely fail. 5671 Severity string `json:"severity,omitempty"` 5672 5673 // ForceSendFields is a list of field names (e.g. "Entries") to 5674 // unconditionally include in API requests. By default, fields with 5675 // empty values are omitted from API requests. However, any non-pointer, 5676 // non-interface field appearing in ForceSendFields will be sent to the 5677 // server regardless of whether the field is empty or not. This may be 5678 // used to include empty fields in Patch requests. 5679 ForceSendFields []string `json:"-"` 5680 5681 // NullFields is a list of field names (e.g. "Entries") to include in 5682 // API requests with the JSON null value. By default, fields with empty 5683 // values are omitted from API requests. However, any field with an 5684 // empty value appearing in NullFields will be sent to the server as 5685 // null. It is an error if a field in this list has a non-empty value. 5686 // This may be used to include null fields in Patch requests. 5687 NullFields []string `json:"-"` 5688} 5689 5690func (s *GoogleCloudDialogflowV2ValidationError) MarshalJSON() ([]byte, error) { 5691 type NoMethod GoogleCloudDialogflowV2ValidationError 5692 raw := NoMethod(*s) 5693 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5694} 5695 5696// GoogleCloudDialogflowV2ValidationResult: Represents the output of 5697// agent validation. 5698type GoogleCloudDialogflowV2ValidationResult struct { 5699 // ValidationErrors: Contains all validation errors. 5700 ValidationErrors []*GoogleCloudDialogflowV2ValidationError `json:"validationErrors,omitempty"` 5701 5702 // ServerResponse contains the HTTP response code and headers from the 5703 // server. 5704 googleapi.ServerResponse `json:"-"` 5705 5706 // ForceSendFields is a list of field names (e.g. "ValidationErrors") to 5707 // unconditionally include in API requests. By default, fields with 5708 // empty values are omitted from API requests. However, any non-pointer, 5709 // non-interface field appearing in ForceSendFields will be sent to the 5710 // server regardless of whether the field is empty or not. This may be 5711 // used to include empty fields in Patch requests. 5712 ForceSendFields []string `json:"-"` 5713 5714 // NullFields is a list of field names (e.g. "ValidationErrors") to 5715 // include in API requests with the JSON null value. By default, fields 5716 // with empty values are omitted from API requests. However, any field 5717 // with an empty value appearing in NullFields will be sent to the 5718 // server as null. It is an error if a field in this list has a 5719 // non-empty value. This may be used to include null fields in Patch 5720 // requests. 5721 NullFields []string `json:"-"` 5722} 5723 5724func (s *GoogleCloudDialogflowV2ValidationResult) MarshalJSON() ([]byte, error) { 5725 type NoMethod GoogleCloudDialogflowV2ValidationResult 5726 raw := NoMethod(*s) 5727 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5728} 5729 5730// GoogleCloudDialogflowV2VoiceSelectionParams: Description of which 5731// voice to use for speech synthesis. 5732type GoogleCloudDialogflowV2VoiceSelectionParams struct { 5733 // Name: Optional. The name of the voice. If not set, the service will 5734 // choose a 5735 // voice based on the other parameters such as language_code 5736 // and 5737 // ssml_gender. 5738 Name string `json:"name,omitempty"` 5739 5740 // SsmlGender: Optional. The preferred gender of the voice. If not set, 5741 // the service will 5742 // choose a voice based on the other parameters such as language_code 5743 // and 5744 // name. Note that this is only a preference, not requirement. If 5745 // a 5746 // voice of the appropriate gender is not available, the synthesizer 5747 // should 5748 // substitute a voice with a different gender rather than failing the 5749 // request. 5750 // 5751 // Possible values: 5752 // "SSML_VOICE_GENDER_UNSPECIFIED" - An unspecified gender, which 5753 // means that the client doesn't care which 5754 // gender the selected voice will have. 5755 // "SSML_VOICE_GENDER_MALE" - A male voice. 5756 // "SSML_VOICE_GENDER_FEMALE" - A female voice. 5757 // "SSML_VOICE_GENDER_NEUTRAL" - A gender-neutral voice. 5758 SsmlGender string `json:"ssmlGender,omitempty"` 5759 5760 // ForceSendFields is a list of field names (e.g. "Name") to 5761 // unconditionally include in API requests. By default, fields with 5762 // empty values are omitted from API requests. However, any non-pointer, 5763 // non-interface field appearing in ForceSendFields will be sent to the 5764 // server regardless of whether the field is empty or not. This may be 5765 // used to include empty fields in Patch requests. 5766 ForceSendFields []string `json:"-"` 5767 5768 // NullFields is a list of field names (e.g. "Name") to include in API 5769 // requests with the JSON null value. By default, fields with empty 5770 // values are omitted from API requests. However, any field with an 5771 // empty value appearing in NullFields will be sent to the server as 5772 // null. It is an error if a field in this list has a non-empty value. 5773 // This may be used to include null fields in Patch requests. 5774 NullFields []string `json:"-"` 5775} 5776 5777func (s *GoogleCloudDialogflowV2VoiceSelectionParams) MarshalJSON() ([]byte, error) { 5778 type NoMethod GoogleCloudDialogflowV2VoiceSelectionParams 5779 raw := NoMethod(*s) 5780 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5781} 5782 5783// GoogleCloudDialogflowV2WebhookRequest: The request message for a 5784// webhook call. 5785type GoogleCloudDialogflowV2WebhookRequest struct { 5786 // OriginalDetectIntentRequest: Optional. The contents of the original 5787 // request that was passed to 5788 // `[Streaming]DetectIntent` call. 5789 OriginalDetectIntentRequest *GoogleCloudDialogflowV2OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"` 5790 5791 // QueryResult: The result of the conversational query or event 5792 // processing. Contains the 5793 // same value as `[Streaming]DetectIntentResponse.query_result`. 5794 QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"` 5795 5796 // ResponseId: The unique identifier of the response. Contains the same 5797 // value as 5798 // `[Streaming]DetectIntentResponse.response_id`. 5799 ResponseId string `json:"responseId,omitempty"` 5800 5801 // Session: The unique identifier of detectIntent request session. 5802 // Can be used to identify end-user inside webhook 5803 // implementation. 5804 // Format: `projects/<Project ID>/agent/sessions/<Session ID>`, 5805 // or 5806 // `projects/<Project ID>/agent/environments/<Environment 5807 // ID>/users/<User 5808 // ID>/sessions/<Session ID>`. 5809 Session string `json:"session,omitempty"` 5810 5811 // ForceSendFields is a list of field names (e.g. 5812 // "OriginalDetectIntentRequest") to unconditionally include in API 5813 // requests. By default, fields with empty values are omitted from API 5814 // requests. However, any non-pointer, non-interface field appearing in 5815 // ForceSendFields will be sent to the server regardless of whether the 5816 // field is empty or not. This may be used to include empty fields in 5817 // Patch requests. 5818 ForceSendFields []string `json:"-"` 5819 5820 // NullFields is a list of field names (e.g. 5821 // "OriginalDetectIntentRequest") to include in API requests with the 5822 // JSON null value. By default, fields with empty values are omitted 5823 // from API requests. However, any field with an empty value appearing 5824 // in NullFields will be sent to the server as null. It is an error if a 5825 // field in this list has a non-empty value. This may be used to include 5826 // null fields in Patch requests. 5827 NullFields []string `json:"-"` 5828} 5829 5830func (s *GoogleCloudDialogflowV2WebhookRequest) MarshalJSON() ([]byte, error) { 5831 type NoMethod GoogleCloudDialogflowV2WebhookRequest 5832 raw := NoMethod(*s) 5833 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5834} 5835 5836// GoogleCloudDialogflowV2WebhookResponse: The response message for a 5837// webhook call. 5838// 5839// This response is validated by the Dialogflow server. If validation 5840// fails, 5841// an error will be returned in the QueryResult.diagnostic_info 5842// field. 5843// Setting JSON fields to an empty value with the wrong type is a common 5844// error. 5845// To avoid this error: 5846// 5847// - Use "" for empty strings 5848// - Use `{}` or `null` for empty objects 5849// - Use `[]` or `null` for empty arrays 5850// 5851// For more information, see the 5852// [Protocol Buffers 5853// Language 5854// Guide](https://developers.google.com/protocol-buffers/docs/pr 5855// oto3#json). 5856type GoogleCloudDialogflowV2WebhookResponse struct { 5857 // FollowupEventInput: Optional. Invokes the supplied events. 5858 // When this field is set, Dialogflow ignores the 5859 // `fulfillment_text`, 5860 // `fulfillment_messages`, and `payload` fields. 5861 FollowupEventInput *GoogleCloudDialogflowV2EventInput `json:"followupEventInput,omitempty"` 5862 5863 // FulfillmentMessages: Optional. The rich response messages intended 5864 // for the end-user. 5865 // When provided, Dialogflow uses this field to 5866 // populate 5867 // QueryResult.fulfillment_messages sent to the integration or API 5868 // caller. 5869 FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"` 5870 5871 // FulfillmentText: Optional. The text response message intended for the 5872 // end-user. 5873 // It is recommended to use `fulfillment_messages.text.text[0]` 5874 // instead. 5875 // When provided, Dialogflow uses this field to 5876 // populate 5877 // QueryResult.fulfillment_text sent to the integration or API caller. 5878 FulfillmentText string `json:"fulfillmentText,omitempty"` 5879 5880 // OutputContexts: Optional. The collection of output contexts that will 5881 // overwrite currently 5882 // active contexts for the session and reset their lifespans. 5883 // When provided, Dialogflow uses this field to 5884 // populate 5885 // QueryResult.output_contexts sent to the integration or API caller. 5886 OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"` 5887 5888 // Payload: Optional. This field can be used to pass custom data from 5889 // your webhook to the 5890 // integration or API caller. Arbitrary JSON objects are supported. 5891 // When provided, Dialogflow uses this field to 5892 // populate 5893 // QueryResult.webhook_payload sent to the integration or API 5894 // caller. 5895 // This field is also used by the 5896 // [Google 5897 // Assistant 5898 // integration](https://cloud.google.com/dialogflow/docs/integr 5899 // ations/aog) 5900 // for rich response messages. 5901 // See the format definition at [Google Assistant Dialogflow 5902 // webhook 5903 // format](https://developers.google.com/assistant/actions/build/ 5904 // json/dialogflow-webhook-json) 5905 Payload googleapi.RawMessage `json:"payload,omitempty"` 5906 5907 // SessionEntityTypes: Optional. Additional session entity types to 5908 // replace or extend developer 5909 // entity types with. The entity synonyms apply to all languages and 5910 // persist 5911 // for the session. Setting this data from a webhook overwrites 5912 // the session entity types that have been set using 5913 // `detectIntent`, 5914 // `streamingDetectIntent` or SessionEntityType management methods. 5915 SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"` 5916 5917 // Source: Optional. A custom field used to identify the webhook 5918 // source. 5919 // Arbitrary strings are supported. 5920 // When provided, Dialogflow uses this field to 5921 // populate 5922 // QueryResult.webhook_source sent to the integration or API caller. 5923 Source string `json:"source,omitempty"` 5924 5925 // ForceSendFields is a list of field names (e.g. "FollowupEventInput") 5926 // to unconditionally include in API requests. By default, fields with 5927 // empty values are omitted from API requests. However, any non-pointer, 5928 // non-interface field appearing in ForceSendFields will be sent to the 5929 // server regardless of whether the field is empty or not. This may be 5930 // used to include empty fields in Patch requests. 5931 ForceSendFields []string `json:"-"` 5932 5933 // NullFields is a list of field names (e.g. "FollowupEventInput") to 5934 // include in API requests with the JSON null value. By default, fields 5935 // with empty values are omitted from API requests. However, any field 5936 // with an empty value appearing in NullFields will be sent to the 5937 // server as null. It is an error if a field in this list has a 5938 // non-empty value. This may be used to include null fields in Patch 5939 // requests. 5940 NullFields []string `json:"-"` 5941} 5942 5943func (s *GoogleCloudDialogflowV2WebhookResponse) MarshalJSON() ([]byte, error) { 5944 type NoMethod GoogleCloudDialogflowV2WebhookResponse 5945 raw := NoMethod(*s) 5946 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5947} 5948 5949// GoogleCloudDialogflowV2beta1AnnotatedConversationDataset: Represents 5950// an annotated conversation dataset. 5951// ConversationDataset can have multiple AnnotatedConversationDataset, 5952// each of 5953// them represents one result from one annotation 5954// task. 5955// AnnotatedConversationDataset can only be generated from annotation 5956// task, 5957// which will be triggered by LabelConversation. 5958type GoogleCloudDialogflowV2beta1AnnotatedConversationDataset struct { 5959 // CompletedExampleCount: Output only. Number of examples that have 5960 // annotations in the annotated 5961 // conversation dataset. 5962 CompletedExampleCount int64 `json:"completedExampleCount,omitempty,string"` 5963 5964 // CreateTime: Output only. Creation time of this annotated conversation 5965 // dataset. 5966 CreateTime string `json:"createTime,omitempty"` 5967 5968 // Description: Optional. The description of the annotated conversation 5969 // dataset. 5970 // Maximum of 10000 bytes. 5971 Description string `json:"description,omitempty"` 5972 5973 // DisplayName: Required. The display name of the annotated conversation 5974 // dataset. 5975 // It's specified when user starts an annotation task. Maximum of 64 5976 // bytes. 5977 DisplayName string `json:"displayName,omitempty"` 5978 5979 // ExampleCount: Output only. Number of examples in the annotated 5980 // conversation dataset. 5981 ExampleCount int64 `json:"exampleCount,omitempty,string"` 5982 5983 // Name: Output only. AnnotatedConversationDataset resource name. 5984 // Format: 5985 // `projects/<Project ID>/conversationDatasets/<Conversation 5986 // Dataset 5987 // ID>/annotatedConversationDatasets/<Annotated Conversation Dataset 5988 // ID>` 5989 Name string `json:"name,omitempty"` 5990 5991 // QuestionTypeName: Output only. Question type name that identifies a 5992 // labeling task. 5993 // A question is a single task that a worker answers. A question type is 5994 // set 5995 // of related questions. Each question belongs to a particular question 5996 // type. 5997 // It can be used in CrowdCompute UI to filter and manage labeling 5998 // tasks. 5999 QuestionTypeName string `json:"questionTypeName,omitempty"` 6000 6001 // ForceSendFields is a list of field names (e.g. 6002 // "CompletedExampleCount") to unconditionally include in API requests. 6003 // By default, fields with empty values are omitted from API requests. 6004 // However, any non-pointer, non-interface field appearing in 6005 // ForceSendFields will be sent to the server regardless of whether the 6006 // field is empty or not. This may be used to include empty fields in 6007 // Patch requests. 6008 ForceSendFields []string `json:"-"` 6009 6010 // NullFields is a list of field names (e.g. "CompletedExampleCount") to 6011 // include in API requests with the JSON null value. By default, fields 6012 // with empty values are omitted from API requests. However, any field 6013 // with an empty value appearing in NullFields will be sent to the 6014 // server as null. It is an error if a field in this list has a 6015 // non-empty value. This may be used to include null fields in Patch 6016 // requests. 6017 NullFields []string `json:"-"` 6018} 6019 6020func (s *GoogleCloudDialogflowV2beta1AnnotatedConversationDataset) MarshalJSON() ([]byte, error) { 6021 type NoMethod GoogleCloudDialogflowV2beta1AnnotatedConversationDataset 6022 raw := NoMethod(*s) 6023 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6024} 6025 6026// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse: The 6027// response message for EntityTypes.BatchUpdateEntityTypes. 6028type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse struct { 6029 // EntityTypes: The collection of updated or created entity types. 6030 EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"` 6031 6032 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 6033 // unconditionally include in API requests. By default, fields with 6034 // empty values are omitted from API requests. However, any non-pointer, 6035 // non-interface field appearing in ForceSendFields will be sent to the 6036 // server regardless of whether the field is empty or not. This may be 6037 // used to include empty fields in Patch requests. 6038 ForceSendFields []string `json:"-"` 6039 6040 // NullFields is a list of field names (e.g. "EntityTypes") to include 6041 // in API requests with the JSON null value. By default, fields with 6042 // empty values are omitted from API requests. However, any field with 6043 // an empty value appearing in NullFields will be sent to the server as 6044 // null. It is an error if a field in this list has a non-empty value. 6045 // This may be used to include null fields in Patch requests. 6046 NullFields []string `json:"-"` 6047} 6048 6049func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) { 6050 type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse 6051 raw := NoMethod(*s) 6052 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6053} 6054 6055// GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse: The response 6056// message for Intents.BatchUpdateIntents. 6057type GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse struct { 6058 // Intents: The collection of updated or created intents. 6059 Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"` 6060 6061 // ForceSendFields is a list of field names (e.g. "Intents") to 6062 // unconditionally include in API requests. By default, fields with 6063 // empty values are omitted from API requests. However, any non-pointer, 6064 // non-interface field appearing in ForceSendFields will be sent to the 6065 // server regardless of whether the field is empty or not. This may be 6066 // used to include empty fields in Patch requests. 6067 ForceSendFields []string `json:"-"` 6068 6069 // NullFields is a list of field names (e.g. "Intents") to include in 6070 // API requests with the JSON null value. By default, fields with empty 6071 // values are omitted from API requests. However, any field with an 6072 // empty value appearing in NullFields will be sent to the server as 6073 // null. It is an error if a field in this list has a non-empty value. 6074 // This may be used to include null fields in Patch requests. 6075 NullFields []string `json:"-"` 6076} 6077 6078func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) { 6079 type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse 6080 raw := NoMethod(*s) 6081 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6082} 6083 6084// GoogleCloudDialogflowV2beta1Context: Represents a context. 6085type GoogleCloudDialogflowV2beta1Context struct { 6086 // LifespanCount: Optional. The number of conversational query requests 6087 // after which the 6088 // context expires. The default is `0`. If set to `0`, the context 6089 // expires 6090 // immediately. Contexts expire automatically after 20 minutes if 6091 // there 6092 // are no matching queries. 6093 LifespanCount int64 `json:"lifespanCount,omitempty"` 6094 6095 // Name: Required. The unique identifier of the context. 6096 // Format: 6097 // `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context 6098 // ID>`, 6099 // or `projects/<Project ID>/agent/environments/<Environment 6100 // ID>/users/<User 6101 // ID>/sessions/<Session ID>/contexts/<Context ID>`. 6102 // 6103 // The `Context ID` is always converted to lowercase, may only 6104 // contain 6105 // characters in a-zA-Z0-9_-% and may be at most 250 bytes long. 6106 // 6107 // If `Environment ID` is not specified, we assume default 6108 // 'draft' 6109 // environment. If `User ID` is not specified, we assume default '-' 6110 // user. 6111 // 6112 // The following context names are reserved for internal use by 6113 // Dialogflow. 6114 // You should not use these contexts or create contexts with these 6115 // names: 6116 // 6117 // * `__system_counters__` 6118 // * `*_id_dialog_context` 6119 // * `*_dialog_params_size` 6120 Name string `json:"name,omitempty"` 6121 6122 // Parameters: Optional. The collection of parameters associated with 6123 // this context. 6124 // 6125 // Depending on your protocol or client library language, this is a 6126 // map, associative array, symbol table, dictionary, or JSON 6127 // object 6128 // composed of a collection of (MapKey, MapValue) pairs: 6129 // 6130 // - MapKey type: string 6131 // - MapKey value: parameter name 6132 // - MapValue type: 6133 // - If parameter's entity type is a composite entity: map 6134 // - Else: string or number, depending on parameter value type 6135 // - MapValue value: 6136 // - If parameter's entity type is a composite entity: 6137 // map from composite entity property names to property values 6138 // - Else: parameter value 6139 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 6140 6141 // ForceSendFields is a list of field names (e.g. "LifespanCount") to 6142 // unconditionally include in API requests. By default, fields with 6143 // empty values are omitted from API requests. However, any non-pointer, 6144 // non-interface field appearing in ForceSendFields will be sent to the 6145 // server regardless of whether the field is empty or not. This may be 6146 // used to include empty fields in Patch requests. 6147 ForceSendFields []string `json:"-"` 6148 6149 // NullFields is a list of field names (e.g. "LifespanCount") to include 6150 // in API requests with the JSON null value. By default, fields with 6151 // empty values are omitted from API requests. However, any field with 6152 // an empty value appearing in NullFields will be sent to the server as 6153 // null. It is an error if a field in this list has a non-empty value. 6154 // This may be used to include null fields in Patch requests. 6155 NullFields []string `json:"-"` 6156} 6157 6158func (s *GoogleCloudDialogflowV2beta1Context) MarshalJSON() ([]byte, error) { 6159 type NoMethod GoogleCloudDialogflowV2beta1Context 6160 raw := NoMethod(*s) 6161 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6162} 6163 6164// GoogleCloudDialogflowV2beta1EntityType: Represents an entity 6165// type. 6166// Entity types serve as a tool for extracting parameter values from 6167// natural 6168// language queries. 6169type GoogleCloudDialogflowV2beta1EntityType struct { 6170 // AutoExpansionMode: Optional. Indicates whether the entity type can be 6171 // automatically 6172 // expanded. 6173 // 6174 // Possible values: 6175 // "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the 6176 // entity. 6177 // "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values 6178 // that have not been explicitly 6179 // listed in the entity. 6180 AutoExpansionMode string `json:"autoExpansionMode,omitempty"` 6181 6182 // DisplayName: Required. The name of the entity type. 6183 DisplayName string `json:"displayName,omitempty"` 6184 6185 // EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction 6186 // during classification. 6187 EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"` 6188 6189 // Entities: Optional. The collection of entity entries associated with 6190 // the entity type. 6191 Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"` 6192 6193 // Kind: Required. Indicates the kind of entity type. 6194 // 6195 // Possible values: 6196 // "KIND_UNSPECIFIED" - Not specified. This value should be never 6197 // used. 6198 // "KIND_MAP" - Map entity types allow mapping of a group of synonyms 6199 // to a reference 6200 // value. 6201 // "KIND_LIST" - List entity types contain a set of entries that do 6202 // not map to reference 6203 // values. However, list entity types can contain references to other 6204 // entity 6205 // types (with or without aliases). 6206 // "KIND_REGEXP" - Regexp entity types allow to specify regular 6207 // expressions in entries 6208 // values. 6209 Kind string `json:"kind,omitempty"` 6210 6211 // Name: The unique identifier of the entity type. 6212 // Required for EntityTypes.UpdateEntityType 6213 // and 6214 // EntityTypes.BatchUpdateEntityTypes methods. 6215 // Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. 6216 Name string `json:"name,omitempty"` 6217 6218 // ForceSendFields is a list of field names (e.g. "AutoExpansionMode") 6219 // to unconditionally include in API requests. By default, fields with 6220 // empty values are omitted from API requests. However, any non-pointer, 6221 // non-interface field appearing in ForceSendFields will be sent to the 6222 // server regardless of whether the field is empty or not. This may be 6223 // used to include empty fields in Patch requests. 6224 ForceSendFields []string `json:"-"` 6225 6226 // NullFields is a list of field names (e.g. "AutoExpansionMode") to 6227 // include in API requests with the JSON null value. By default, fields 6228 // with empty values are omitted from API requests. However, any field 6229 // with an empty value appearing in NullFields will be sent to the 6230 // server as null. It is an error if a field in this list has a 6231 // non-empty value. This may be used to include null fields in Patch 6232 // requests. 6233 NullFields []string `json:"-"` 6234} 6235 6236func (s *GoogleCloudDialogflowV2beta1EntityType) MarshalJSON() ([]byte, error) { 6237 type NoMethod GoogleCloudDialogflowV2beta1EntityType 6238 raw := NoMethod(*s) 6239 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6240} 6241 6242// GoogleCloudDialogflowV2beta1EntityTypeEntity: An **entity entry** for 6243// an associated entity type. 6244type GoogleCloudDialogflowV2beta1EntityTypeEntity struct { 6245 // Synonyms: Required. A collection of value synonyms. For example, if 6246 // the entity type 6247 // is *vegetable*, and `value` is *scallions*, a synonym could be 6248 // *green 6249 // onions*. 6250 // 6251 // For `KIND_LIST` entity types: 6252 // 6253 // * This collection must contain exactly one synonym equal to 6254 // `value`. 6255 Synonyms []string `json:"synonyms,omitempty"` 6256 6257 // Value: Required. The primary value associated with this entity 6258 // entry. 6259 // For example, if the entity type is *vegetable*, the value could 6260 // be 6261 // *scallions*. 6262 // 6263 // For `KIND_MAP` entity types: 6264 // 6265 // * A reference value to be used in place of synonyms. 6266 // 6267 // For `KIND_LIST` entity types: 6268 // 6269 // * A string that can contain references to other entity types (with 6270 // or 6271 // without aliases). 6272 Value string `json:"value,omitempty"` 6273 6274 // ForceSendFields is a list of field names (e.g. "Synonyms") to 6275 // unconditionally include in API requests. By default, fields with 6276 // empty values are omitted from API requests. However, any non-pointer, 6277 // non-interface field appearing in ForceSendFields will be sent to the 6278 // server regardless of whether the field is empty or not. This may be 6279 // used to include empty fields in Patch requests. 6280 ForceSendFields []string `json:"-"` 6281 6282 // NullFields is a list of field names (e.g. "Synonyms") to include in 6283 // API requests with the JSON null value. By default, fields with empty 6284 // values are omitted from API requests. However, any field with an 6285 // empty value appearing in NullFields will be sent to the server as 6286 // null. It is an error if a field in this list has a non-empty value. 6287 // This may be used to include null fields in Patch requests. 6288 NullFields []string `json:"-"` 6289} 6290 6291func (s *GoogleCloudDialogflowV2beta1EntityTypeEntity) MarshalJSON() ([]byte, error) { 6292 type NoMethod GoogleCloudDialogflowV2beta1EntityTypeEntity 6293 raw := NoMethod(*s) 6294 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6295} 6296 6297// GoogleCloudDialogflowV2beta1EventInput: Events allow for matching 6298// intents by event name instead of the natural 6299// language input. For instance, input `<event: { name: 6300// "welcome_event", 6301// parameters: { name: "Sam" } }>` can trigger a personalized welcome 6302// response. 6303// The parameter `name` may be used by the agent in the 6304// response: 6305// "Hello #welcome_event.name! What can I do for you today?". 6306type GoogleCloudDialogflowV2beta1EventInput struct { 6307 // LanguageCode: Required. The language of this query. See 6308 // [Language 6309 // Support](https://cloud.google.com/dialogflow/docs/reference/ 6310 // language) 6311 // for a list of the currently supported language codes. Note that 6312 // queries in 6313 // the same session do not necessarily need to specify the same 6314 // language. 6315 LanguageCode string `json:"languageCode,omitempty"` 6316 6317 // Name: Required. The unique identifier of the event. 6318 Name string `json:"name,omitempty"` 6319 6320 // Parameters: The collection of parameters associated with the 6321 // event. 6322 // 6323 // Depending on your protocol or client library language, this is a 6324 // map, associative array, symbol table, dictionary, or JSON 6325 // object 6326 // composed of a collection of (MapKey, MapValue) pairs: 6327 // 6328 // - MapKey type: string 6329 // - MapKey value: parameter name 6330 // - MapValue type: 6331 // - If parameter's entity type is a composite entity: map 6332 // - Else: string or number, depending on parameter value type 6333 // - MapValue value: 6334 // - If parameter's entity type is a composite entity: 6335 // map from composite entity property names to property values 6336 // - Else: parameter value 6337 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 6338 6339 // ForceSendFields is a list of field names (e.g. "LanguageCode") to 6340 // unconditionally include in API requests. By default, fields with 6341 // empty values are omitted from API requests. However, any non-pointer, 6342 // non-interface field appearing in ForceSendFields will be sent to the 6343 // server regardless of whether the field is empty or not. This may be 6344 // used to include empty fields in Patch requests. 6345 ForceSendFields []string `json:"-"` 6346 6347 // NullFields is a list of field names (e.g. "LanguageCode") to include 6348 // in API requests with the JSON null value. By default, fields with 6349 // empty values are omitted from API requests. However, any field with 6350 // an empty value appearing in NullFields will be sent to the server as 6351 // null. It is an error if a field in this list has a non-empty value. 6352 // This may be used to include null fields in Patch requests. 6353 NullFields []string `json:"-"` 6354} 6355 6356func (s *GoogleCloudDialogflowV2beta1EventInput) MarshalJSON() ([]byte, error) { 6357 type NoMethod GoogleCloudDialogflowV2beta1EventInput 6358 raw := NoMethod(*s) 6359 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6360} 6361 6362// GoogleCloudDialogflowV2beta1ExportAgentResponse: The response message 6363// for Agents.ExportAgent. 6364type GoogleCloudDialogflowV2beta1ExportAgentResponse struct { 6365 // AgentContent: Zip compressed raw byte content for agent. 6366 AgentContent string `json:"agentContent,omitempty"` 6367 6368 // AgentUri: The URI to a file containing the exported agent. This field 6369 // is populated 6370 // only if `agent_uri` is specified in `ExportAgentRequest`. 6371 AgentUri string `json:"agentUri,omitempty"` 6372 6373 // ForceSendFields is a list of field names (e.g. "AgentContent") to 6374 // unconditionally include in API requests. By default, fields with 6375 // empty values are omitted from API requests. However, any non-pointer, 6376 // non-interface field appearing in ForceSendFields will be sent to the 6377 // server regardless of whether the field is empty or not. This may be 6378 // used to include empty fields in Patch requests. 6379 ForceSendFields []string `json:"-"` 6380 6381 // NullFields is a list of field names (e.g. "AgentContent") to include 6382 // in API requests with the JSON null value. By default, fields with 6383 // empty values are omitted from API requests. However, any field with 6384 // an empty value appearing in NullFields will be sent to the server as 6385 // null. It is an error if a field in this list has a non-empty value. 6386 // This may be used to include null fields in Patch requests. 6387 NullFields []string `json:"-"` 6388} 6389 6390func (s *GoogleCloudDialogflowV2beta1ExportAgentResponse) MarshalJSON() ([]byte, error) { 6391 type NoMethod GoogleCloudDialogflowV2beta1ExportAgentResponse 6392 raw := NoMethod(*s) 6393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6394} 6395 6396// GoogleCloudDialogflowV2beta1Intent: Represents an intent. 6397// Intents convert a number of user expressions or patterns into an 6398// action. An 6399// action is an extraction of a user command or sentence semantics. 6400type GoogleCloudDialogflowV2beta1Intent struct { 6401 // Action: Optional. The name of the action associated with the 6402 // intent. 6403 // Note: The action name must not contain whitespaces. 6404 Action string `json:"action,omitempty"` 6405 6406 // DefaultResponsePlatforms: Optional. The list of platforms for which 6407 // the first responses will be 6408 // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default 6409 // platform). 6410 // 6411 // Possible values: 6412 // "PLATFORM_UNSPECIFIED" - Not specified. 6413 // "FACEBOOK" - Facebook. 6414 // "SLACK" - Slack. 6415 // "TELEGRAM" - Telegram. 6416 // "KIK" - Kik. 6417 // "SKYPE" - Skype. 6418 // "LINE" - Line. 6419 // "VIBER" - Viber. 6420 // "ACTIONS_ON_GOOGLE" - Google Assistant 6421 // See [Dialogflow 6422 // webhook 6423 // format](https://developers.google.com/assistant/actions/build/ 6424 // json/dialogflow-webhook-json) 6425 // "TELEPHONY" - Telephony Gateway. 6426 // "GOOGLE_HANGOUTS" - Google Hangouts. 6427 DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"` 6428 6429 // DisplayName: Required. The name of this intent. 6430 DisplayName string `json:"displayName,omitempty"` 6431 6432 // EndInteraction: Optional. Indicates that this intent ends an 6433 // interaction. Some integrations 6434 // (e.g., Actions on Google or Dialogflow phone gateway) use this 6435 // information 6436 // to close interaction with an end user. Default is false. 6437 EndInteraction bool `json:"endInteraction,omitempty"` 6438 6439 // Events: Optional. The collection of event names that trigger the 6440 // intent. 6441 // If the collection of input contexts is not empty, all of the contexts 6442 // must 6443 // be present in the active user session for an event to trigger this 6444 // intent. 6445 // Event names are limited to 150 characters. 6446 Events []string `json:"events,omitempty"` 6447 6448 // FollowupIntentInfo: Output only. Information about all followup 6449 // intents that have this intent as 6450 // a direct or indirect parent. We populate this field only in the 6451 // output. 6452 FollowupIntentInfo []*GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"` 6453 6454 // InputContextNames: Optional. The list of context names required for 6455 // this intent to be 6456 // triggered. 6457 // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context 6458 // ID>`. 6459 InputContextNames []string `json:"inputContextNames,omitempty"` 6460 6461 // IsFallback: Optional. Indicates whether this is a fallback intent. 6462 IsFallback bool `json:"isFallback,omitempty"` 6463 6464 // Messages: Optional. The collection of rich messages corresponding to 6465 // the 6466 // `Response` field in the Dialogflow console. 6467 Messages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"messages,omitempty"` 6468 6469 // MlDisabled: Optional. Indicates whether Machine Learning is disabled 6470 // for the intent. 6471 // Note: If `ml_disabled` setting is set to true, then this intent is 6472 // not 6473 // taken into account during inference in `ML ONLY` match mode. 6474 // Also, 6475 // auto-markup in the UI is turned off. 6476 MlDisabled bool `json:"mlDisabled,omitempty"` 6477 6478 // MlEnabled: Optional. Indicates whether Machine Learning is enabled 6479 // for the intent. 6480 // Note: If `ml_enabled` setting is set to false, then this intent is 6481 // not 6482 // taken into account during inference in `ML ONLY` match mode. 6483 // Also, 6484 // auto-markup in the UI is turned off. 6485 // DEPRECATED! Please use `ml_disabled` field instead. 6486 // NOTE: If both `ml_enabled` and `ml_disabled` are either not set or 6487 // false, 6488 // then the default value is determined as follows: 6489 // - Before April 15th, 2018 the default is: 6490 // ml_enabled = false / ml_disabled = true. 6491 // - After April 15th, 2018 the default is: 6492 // ml_enabled = true / ml_disabled = false. 6493 MlEnabled bool `json:"mlEnabled,omitempty"` 6494 6495 // Name: Optional. The unique identifier of this intent. 6496 // Required for Intents.UpdateIntent and 6497 // Intents.BatchUpdateIntents 6498 // methods. 6499 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 6500 Name string `json:"name,omitempty"` 6501 6502 // OutputContexts: Optional. The collection of contexts that are 6503 // activated when the intent 6504 // is matched. Context messages in this collection should not set 6505 // the 6506 // parameters field. Setting the `lifespan_count` to 0 will reset the 6507 // context 6508 // when the intent is matched. 6509 // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context 6510 // ID>`. 6511 OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"` 6512 6513 // Parameters: Optional. The collection of parameters associated with 6514 // the intent. 6515 Parameters []*GoogleCloudDialogflowV2beta1IntentParameter `json:"parameters,omitempty"` 6516 6517 // ParentFollowupIntentName: Optional. The unique identifier of the 6518 // parent intent in the 6519 // chain of followup intents. You can set this field when creating an 6520 // intent, 6521 // for example with CreateIntent or 6522 // BatchUpdateIntents, in order to make this 6523 // intent a followup intent. 6524 // 6525 // It identifies the parent followup intent. 6526 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 6527 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 6528 6529 // Priority: Optional. The priority of this intent. Higher numbers 6530 // represent higher 6531 // priorities. 6532 // 6533 // - If the supplied value is unspecified or 0, the service 6534 // translates the value to 500,000, which corresponds to the 6535 // `Normal` priority in the console. 6536 // - If the supplied value is negative, the intent is ignored 6537 // in runtime detect intent requests. 6538 Priority int64 `json:"priority,omitempty"` 6539 6540 // ResetContexts: Optional. Indicates whether to delete all contexts in 6541 // the current 6542 // session when this intent is matched. 6543 ResetContexts bool `json:"resetContexts,omitempty"` 6544 6545 // RootFollowupIntentName: Output only. The unique identifier of the 6546 // root intent in the chain of 6547 // followup intents. It identifies the correct followup intents chain 6548 // for 6549 // this intent. 6550 // 6551 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 6552 RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"` 6553 6554 // TrainingPhrases: Optional. The collection of examples that the agent 6555 // is 6556 // trained on. 6557 TrainingPhrases []*GoogleCloudDialogflowV2beta1IntentTrainingPhrase `json:"trainingPhrases,omitempty"` 6558 6559 // WebhookState: Optional. Indicates whether webhooks are enabled for 6560 // the intent. 6561 // 6562 // Possible values: 6563 // "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and 6564 // in the intent. 6565 // "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in 6566 // the intent. 6567 // "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in 6568 // the agent and in the intent. Also, each slot 6569 // filling prompt is forwarded to the webhook. 6570 WebhookState string `json:"webhookState,omitempty"` 6571 6572 // ForceSendFields is a list of field names (e.g. "Action") to 6573 // unconditionally include in API requests. By default, fields with 6574 // empty values are omitted from API requests. However, any non-pointer, 6575 // non-interface field appearing in ForceSendFields will be sent to the 6576 // server regardless of whether the field is empty or not. This may be 6577 // used to include empty fields in Patch requests. 6578 ForceSendFields []string `json:"-"` 6579 6580 // NullFields is a list of field names (e.g. "Action") to include in API 6581 // requests with the JSON null value. By default, fields with empty 6582 // values are omitted from API requests. However, any field with an 6583 // empty value appearing in NullFields will be sent to the server as 6584 // null. It is an error if a field in this list has a non-empty value. 6585 // This may be used to include null fields in Patch requests. 6586 NullFields []string `json:"-"` 6587} 6588 6589func (s *GoogleCloudDialogflowV2beta1Intent) MarshalJSON() ([]byte, error) { 6590 type NoMethod GoogleCloudDialogflowV2beta1Intent 6591 raw := NoMethod(*s) 6592 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6593} 6594 6595// GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo: Represents a 6596// single followup intent in the chain. 6597type GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo struct { 6598 // FollowupIntentName: The unique identifier of the followup 6599 // intent. 6600 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 6601 FollowupIntentName string `json:"followupIntentName,omitempty"` 6602 6603 // ParentFollowupIntentName: The unique identifier of the followup 6604 // intent's parent. 6605 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 6606 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 6607 6608 // ForceSendFields is a list of field names (e.g. "FollowupIntentName") 6609 // to unconditionally include in API requests. By default, fields with 6610 // empty values are omitted from API requests. However, any non-pointer, 6611 // non-interface field appearing in ForceSendFields will be sent to the 6612 // server regardless of whether the field is empty or not. This may be 6613 // used to include empty fields in Patch requests. 6614 ForceSendFields []string `json:"-"` 6615 6616 // NullFields is a list of field names (e.g. "FollowupIntentName") to 6617 // include in API requests with the JSON null value. By default, fields 6618 // with empty values are omitted from API requests. However, any field 6619 // with an empty value appearing in NullFields will be sent to the 6620 // server as null. It is an error if a field in this list has a 6621 // non-empty value. This may be used to include null fields in Patch 6622 // requests. 6623 NullFields []string `json:"-"` 6624} 6625 6626func (s *GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) { 6627 type NoMethod GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo 6628 raw := NoMethod(*s) 6629 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6630} 6631 6632// GoogleCloudDialogflowV2beta1IntentMessage: Corresponds to the 6633// `Response` field in the Dialogflow console. 6634type GoogleCloudDialogflowV2beta1IntentMessage struct { 6635 // BasicCard: Displays a basic card for Actions on Google. 6636 BasicCard *GoogleCloudDialogflowV2beta1IntentMessageBasicCard `json:"basicCard,omitempty"` 6637 6638 // BrowseCarouselCard: Browse carousel card for Actions on Google. 6639 BrowseCarouselCard *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"` 6640 6641 // Card: Displays a card. 6642 Card *GoogleCloudDialogflowV2beta1IntentMessageCard `json:"card,omitempty"` 6643 6644 // CarouselSelect: Displays a carousel card for Actions on Google. 6645 CarouselSelect *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect `json:"carouselSelect,omitempty"` 6646 6647 // Image: Displays an image. 6648 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 6649 6650 // LinkOutSuggestion: Displays a link out suggestion chip for Actions on 6651 // Google. 6652 LinkOutSuggestion *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"` 6653 6654 // ListSelect: Displays a list card for Actions on Google. 6655 ListSelect *GoogleCloudDialogflowV2beta1IntentMessageListSelect `json:"listSelect,omitempty"` 6656 6657 // MediaContent: The media content card for Actions on Google. 6658 MediaContent *GoogleCloudDialogflowV2beta1IntentMessageMediaContent `json:"mediaContent,omitempty"` 6659 6660 // Payload: A custom platform-specific response. 6661 Payload googleapi.RawMessage `json:"payload,omitempty"` 6662 6663 // Platform: Optional. The platform that this message is intended for. 6664 // 6665 // Possible values: 6666 // "PLATFORM_UNSPECIFIED" - Not specified. 6667 // "FACEBOOK" - Facebook. 6668 // "SLACK" - Slack. 6669 // "TELEGRAM" - Telegram. 6670 // "KIK" - Kik. 6671 // "SKYPE" - Skype. 6672 // "LINE" - Line. 6673 // "VIBER" - Viber. 6674 // "ACTIONS_ON_GOOGLE" - Google Assistant 6675 // See [Dialogflow 6676 // webhook 6677 // format](https://developers.google.com/assistant/actions/build/ 6678 // json/dialogflow-webhook-json) 6679 // "TELEPHONY" - Telephony Gateway. 6680 // "GOOGLE_HANGOUTS" - Google Hangouts. 6681 Platform string `json:"platform,omitempty"` 6682 6683 // QuickReplies: Displays quick replies. 6684 QuickReplies *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies `json:"quickReplies,omitempty"` 6685 6686 // RbmCarouselRichCard: Rich Business Messaging (RBM) carousel rich card 6687 // response. 6688 RbmCarouselRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard `json:"rbmCarouselRichCard,omitempty"` 6689 6690 // RbmStandaloneRichCard: Standalone Rich Business Messaging (RBM) rich 6691 // card response. 6692 RbmStandaloneRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard `json:"rbmStandaloneRichCard,omitempty"` 6693 6694 // RbmText: Rich Business Messaging (RBM) text response. 6695 // 6696 // RBM allows businesses to send enriched and branded versions of SMS. 6697 // See 6698 // https://jibe.google.com/business-messaging. 6699 RbmText *GoogleCloudDialogflowV2beta1IntentMessageRbmText `json:"rbmText,omitempty"` 6700 6701 // SimpleResponses: Returns a voice or text-only response for Actions on 6702 // Google. 6703 SimpleResponses *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses `json:"simpleResponses,omitempty"` 6704 6705 // Suggestions: Displays suggestion chips for Actions on Google. 6706 Suggestions *GoogleCloudDialogflowV2beta1IntentMessageSuggestions `json:"suggestions,omitempty"` 6707 6708 // TableCard: Table card for Actions on Google. 6709 TableCard *GoogleCloudDialogflowV2beta1IntentMessageTableCard `json:"tableCard,omitempty"` 6710 6711 // TelephonyPlayAudio: Plays audio from a file in Telephony Gateway. 6712 TelephonyPlayAudio *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio `json:"telephonyPlayAudio,omitempty"` 6713 6714 // TelephonySynthesizeSpeech: Synthesizes speech in Telephony Gateway. 6715 TelephonySynthesizeSpeech *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech `json:"telephonySynthesizeSpeech,omitempty"` 6716 6717 // TelephonyTransferCall: Transfers the call in Telephony Gateway. 6718 TelephonyTransferCall *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall `json:"telephonyTransferCall,omitempty"` 6719 6720 // Text: Returns a text response. 6721 Text *GoogleCloudDialogflowV2beta1IntentMessageText `json:"text,omitempty"` 6722 6723 // ForceSendFields is a list of field names (e.g. "BasicCard") to 6724 // unconditionally include in API requests. By default, fields with 6725 // empty values are omitted from API requests. However, any non-pointer, 6726 // non-interface field appearing in ForceSendFields will be sent to the 6727 // server regardless of whether the field is empty or not. This may be 6728 // used to include empty fields in Patch requests. 6729 ForceSendFields []string `json:"-"` 6730 6731 // NullFields is a list of field names (e.g. "BasicCard") to include in 6732 // API requests with the JSON null value. By default, fields with empty 6733 // values are omitted from API requests. However, any field with an 6734 // empty value appearing in NullFields will be sent to the server as 6735 // null. It is an error if a field in this list has a non-empty value. 6736 // This may be used to include null fields in Patch requests. 6737 NullFields []string `json:"-"` 6738} 6739 6740func (s *GoogleCloudDialogflowV2beta1IntentMessage) MarshalJSON() ([]byte, error) { 6741 type NoMethod GoogleCloudDialogflowV2beta1IntentMessage 6742 raw := NoMethod(*s) 6743 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6744} 6745 6746// GoogleCloudDialogflowV2beta1IntentMessageBasicCard: The basic card 6747// message. Useful for displaying information. 6748type GoogleCloudDialogflowV2beta1IntentMessageBasicCard struct { 6749 // Buttons: Optional. The collection of card buttons. 6750 Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"` 6751 6752 // FormattedText: Required, unless image is present. The body text of 6753 // the card. 6754 FormattedText string `json:"formattedText,omitempty"` 6755 6756 // Image: Optional. The image for the card. 6757 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 6758 6759 // Subtitle: Optional. The subtitle of the card. 6760 Subtitle string `json:"subtitle,omitempty"` 6761 6762 // Title: Optional. The title of the card. 6763 Title string `json:"title,omitempty"` 6764 6765 // ForceSendFields is a list of field names (e.g. "Buttons") to 6766 // unconditionally include in API requests. By default, fields with 6767 // empty values are omitted from API requests. However, any non-pointer, 6768 // non-interface field appearing in ForceSendFields will be sent to the 6769 // server regardless of whether the field is empty or not. This may be 6770 // used to include empty fields in Patch requests. 6771 ForceSendFields []string `json:"-"` 6772 6773 // NullFields is a list of field names (e.g. "Buttons") to include in 6774 // API requests with the JSON null value. By default, fields with empty 6775 // values are omitted from API requests. However, any field with an 6776 // empty value appearing in NullFields will be sent to the server as 6777 // null. It is an error if a field in this list has a non-empty value. 6778 // This may be used to include null fields in Patch requests. 6779 NullFields []string `json:"-"` 6780} 6781 6782func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCard) MarshalJSON() ([]byte, error) { 6783 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCard 6784 raw := NoMethod(*s) 6785 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6786} 6787 6788// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton: The button 6789// object that appears at the bottom of a card. 6790type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton struct { 6791 // OpenUriAction: Required. Action to take when a user taps on the 6792 // button. 6793 OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"` 6794 6795 // Title: Required. The title of the button. 6796 Title string `json:"title,omitempty"` 6797 6798 // ForceSendFields is a list of field names (e.g. "OpenUriAction") to 6799 // unconditionally include in API requests. By default, fields with 6800 // empty values are omitted from API requests. However, any non-pointer, 6801 // non-interface field appearing in ForceSendFields will be sent to the 6802 // server regardless of whether the field is empty or not. This may be 6803 // used to include empty fields in Patch requests. 6804 ForceSendFields []string `json:"-"` 6805 6806 // NullFields is a list of field names (e.g. "OpenUriAction") to include 6807 // in API requests with the JSON null value. By default, fields with 6808 // empty values are omitted from API requests. However, any field with 6809 // an empty value appearing in NullFields will be sent to the server as 6810 // null. It is an error if a field in this list has a non-empty value. 6811 // This may be used to include null fields in Patch requests. 6812 NullFields []string `json:"-"` 6813} 6814 6815func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) { 6816 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton 6817 raw := NoMethod(*s) 6818 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6819} 6820 6821// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction: 6822// Opens the given URI. 6823type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction struct { 6824 // Uri: Required. The HTTP or HTTPS scheme URI. 6825 Uri string `json:"uri,omitempty"` 6826 6827 // ForceSendFields is a list of field names (e.g. "Uri") to 6828 // unconditionally include in API requests. By default, fields with 6829 // empty values are omitted from API requests. However, any non-pointer, 6830 // non-interface field appearing in ForceSendFields will be sent to the 6831 // server regardless of whether the field is empty or not. This may be 6832 // used to include empty fields in Patch requests. 6833 ForceSendFields []string `json:"-"` 6834 6835 // NullFields is a list of field names (e.g. "Uri") to include in API 6836 // requests with the JSON null value. By default, fields with empty 6837 // values are omitted from API requests. However, any field with an 6838 // empty value appearing in NullFields will be sent to the server as 6839 // null. It is an error if a field in this list has a non-empty value. 6840 // This may be used to include null fields in Patch requests. 6841 NullFields []string `json:"-"` 6842} 6843 6844func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) { 6845 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction 6846 raw := NoMethod(*s) 6847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6848} 6849 6850// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard: Browse 6851// Carousel Card for Actions on 6852// Google. 6853// https://developers.google.com/actions/assistant/responses#brow 6854// sing_carousel 6855type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard struct { 6856 // ImageDisplayOptions: Optional. Settings for displaying the image. 6857 // Applies to every image in 6858 // items. 6859 // 6860 // Possible values: 6861 // "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the 6862 // image and the image container with gray 6863 // bars. 6864 // "GRAY" - Fill the gaps between the image and the image container 6865 // with gray 6866 // bars. 6867 // "WHITE" - Fill the gaps between the image and the image container 6868 // with white 6869 // bars. 6870 // "CROPPED" - Image is scaled such that the image width and height 6871 // match or exceed 6872 // the container dimensions. This may crop the top and bottom of 6873 // the 6874 // image if the scaled image height is greater than the 6875 // container 6876 // height, or crop the left and right of the image if the scaled 6877 // image 6878 // width is greater than the container width. This is similar to 6879 // "Zoom 6880 // Mode" on a widescreen TV when playing a 4:3 video. 6881 // "BLURRED_BACKGROUND" - Pad the gaps between image and image frame 6882 // with a blurred copy of the 6883 // same image. 6884 ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"` 6885 6886 // Items: Required. List of items in the Browse Carousel Card. Minimum 6887 // of two 6888 // items, maximum of ten. 6889 Items []*GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"` 6890 6891 // ForceSendFields is a list of field names (e.g. "ImageDisplayOptions") 6892 // to unconditionally include in API requests. By default, fields with 6893 // empty values are omitted from API requests. However, any non-pointer, 6894 // non-interface field appearing in ForceSendFields will be sent to the 6895 // server regardless of whether the field is empty or not. This may be 6896 // used to include empty fields in Patch requests. 6897 ForceSendFields []string `json:"-"` 6898 6899 // NullFields is a list of field names (e.g. "ImageDisplayOptions") to 6900 // include in API requests with the JSON null value. By default, fields 6901 // with empty values are omitted from API requests. However, any field 6902 // with an empty value appearing in NullFields will be sent to the 6903 // server as null. It is an error if a field in this list has a 6904 // non-empty value. This may be used to include null fields in Patch 6905 // requests. 6906 NullFields []string `json:"-"` 6907} 6908 6909func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) { 6910 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard 6911 raw := NoMethod(*s) 6912 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6913} 6914 6915// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou 6916// selCardItem: Browsing carousel tile 6917type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct { 6918 // Description: Optional. Description of the carousel item. Maximum of 6919 // four lines of 6920 // text. 6921 Description string `json:"description,omitempty"` 6922 6923 // Footer: Optional. Text that appears at the bottom of the Browse 6924 // Carousel 6925 // Card. Maximum of one line of text. 6926 Footer string `json:"footer,omitempty"` 6927 6928 // Image: Optional. Hero image for the carousel item. 6929 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 6930 6931 // OpenUriAction: Required. Action to present to the user. 6932 OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"` 6933 6934 // Title: Required. Title of the carousel item. Maximum of two lines of 6935 // text. 6936 Title string `json:"title,omitempty"` 6937 6938 // ForceSendFields is a list of field names (e.g. "Description") to 6939 // unconditionally include in API requests. By default, fields with 6940 // empty values are omitted from API requests. However, any non-pointer, 6941 // non-interface field appearing in ForceSendFields will be sent to the 6942 // server regardless of whether the field is empty or not. This may be 6943 // used to include empty fields in Patch requests. 6944 ForceSendFields []string `json:"-"` 6945 6946 // NullFields is a list of field names (e.g. "Description") to include 6947 // in API requests with the JSON null value. By default, fields with 6948 // empty values are omitted from API requests. However, any field with 6949 // an empty value appearing in NullFields will be sent to the server as 6950 // null. It is an error if a field in this list has a non-empty value. 6951 // This may be used to include null fields in Patch requests. 6952 NullFields []string `json:"-"` 6953} 6954 6955func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) { 6956 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem 6957 raw := NoMethod(*s) 6958 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6959} 6960 6961// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou 6962// selCardItemOpenUrlAction: Actions on Google action to open a given 6963// url. 6964type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct { 6965 // Url: Required. URL 6966 Url string `json:"url,omitempty"` 6967 6968 // UrlTypeHint: Optional. Specifies the type of viewer that is used when 6969 // opening 6970 // the URL. Defaults to opening via web browser. 6971 // 6972 // Possible values: 6973 // "URL_TYPE_HINT_UNSPECIFIED" - Unspecified 6974 // "AMP_ACTION" - Url would be an amp action 6975 // "AMP_CONTENT" - URL that points directly to AMP content, or to a 6976 // canonical URL 6977 // which refers to AMP content via <link rel="amphtml">. 6978 UrlTypeHint string `json:"urlTypeHint,omitempty"` 6979 6980 // ForceSendFields is a list of field names (e.g. "Url") to 6981 // unconditionally include in API requests. By default, fields with 6982 // empty values are omitted from API requests. However, any non-pointer, 6983 // non-interface field appearing in ForceSendFields will be sent to the 6984 // server regardless of whether the field is empty or not. This may be 6985 // used to include empty fields in Patch requests. 6986 ForceSendFields []string `json:"-"` 6987 6988 // NullFields is a list of field names (e.g. "Url") to include in API 6989 // requests with the JSON null value. By default, fields with empty 6990 // values are omitted from API requests. However, any field with an 6991 // empty value appearing in NullFields will be sent to the server as 6992 // null. It is an error if a field in this list has a non-empty value. 6993 // This may be used to include null fields in Patch requests. 6994 NullFields []string `json:"-"` 6995} 6996 6997func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) { 6998 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction 6999 raw := NoMethod(*s) 7000 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7001} 7002 7003// GoogleCloudDialogflowV2beta1IntentMessageCard: The card response 7004// message. 7005type GoogleCloudDialogflowV2beta1IntentMessageCard struct { 7006 // Buttons: Optional. The collection of card buttons. 7007 Buttons []*GoogleCloudDialogflowV2beta1IntentMessageCardButton `json:"buttons,omitempty"` 7008 7009 // ImageUri: Optional. The public URI to an image file for the card. 7010 ImageUri string `json:"imageUri,omitempty"` 7011 7012 // Subtitle: Optional. The subtitle of the card. 7013 Subtitle string `json:"subtitle,omitempty"` 7014 7015 // Title: Optional. The title of the card. 7016 Title string `json:"title,omitempty"` 7017 7018 // ForceSendFields is a list of field names (e.g. "Buttons") to 7019 // unconditionally include in API requests. By default, fields with 7020 // empty values are omitted from API requests. However, any non-pointer, 7021 // non-interface field appearing in ForceSendFields will be sent to the 7022 // server regardless of whether the field is empty or not. This may be 7023 // used to include empty fields in Patch requests. 7024 ForceSendFields []string `json:"-"` 7025 7026 // NullFields is a list of field names (e.g. "Buttons") to include in 7027 // API requests with the JSON null value. By default, fields with empty 7028 // values are omitted from API requests. However, any field with an 7029 // empty value appearing in NullFields will be sent to the server as 7030 // null. It is an error if a field in this list has a non-empty value. 7031 // This may be used to include null fields in Patch requests. 7032 NullFields []string `json:"-"` 7033} 7034 7035func (s *GoogleCloudDialogflowV2beta1IntentMessageCard) MarshalJSON() ([]byte, error) { 7036 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCard 7037 raw := NoMethod(*s) 7038 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7039} 7040 7041// GoogleCloudDialogflowV2beta1IntentMessageCardButton: Optional. 7042// Contains information about a button. 7043type GoogleCloudDialogflowV2beta1IntentMessageCardButton struct { 7044 // Postback: Optional. The text to send back to the Dialogflow API or a 7045 // URI to 7046 // open. 7047 Postback string `json:"postback,omitempty"` 7048 7049 // Text: Optional. The text to show on the button. 7050 Text string `json:"text,omitempty"` 7051 7052 // ForceSendFields is a list of field names (e.g. "Postback") to 7053 // unconditionally include in API requests. By default, fields with 7054 // empty values are omitted from API requests. However, any non-pointer, 7055 // non-interface field appearing in ForceSendFields will be sent to the 7056 // server regardless of whether the field is empty or not. This may be 7057 // used to include empty fields in Patch requests. 7058 ForceSendFields []string `json:"-"` 7059 7060 // NullFields is a list of field names (e.g. "Postback") to include in 7061 // API requests with the JSON null value. By default, fields with empty 7062 // values are omitted from API requests. However, any field with an 7063 // empty value appearing in NullFields will be sent to the server as 7064 // null. It is an error if a field in this list has a non-empty value. 7065 // This may be used to include null fields in Patch requests. 7066 NullFields []string `json:"-"` 7067} 7068 7069func (s *GoogleCloudDialogflowV2beta1IntentMessageCardButton) MarshalJSON() ([]byte, error) { 7070 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCardButton 7071 raw := NoMethod(*s) 7072 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7073} 7074 7075// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect: The card for 7076// presenting a carousel of options to select from. 7077type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect struct { 7078 // Items: Required. Carousel items. 7079 Items []*GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem `json:"items,omitempty"` 7080 7081 // ForceSendFields is a list of field names (e.g. "Items") to 7082 // unconditionally include in API requests. By default, fields with 7083 // empty values are omitted from API requests. However, any non-pointer, 7084 // non-interface field appearing in ForceSendFields will be sent to the 7085 // server regardless of whether the field is empty or not. This may be 7086 // used to include empty fields in Patch requests. 7087 ForceSendFields []string `json:"-"` 7088 7089 // NullFields is a list of field names (e.g. "Items") to include in API 7090 // requests with the JSON null value. By default, fields with empty 7091 // values are omitted from API requests. However, any field with an 7092 // empty value appearing in NullFields will be sent to the server as 7093 // null. It is an error if a field in this list has a non-empty value. 7094 // This may be used to include null fields in Patch requests. 7095 NullFields []string `json:"-"` 7096} 7097 7098func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) { 7099 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect 7100 raw := NoMethod(*s) 7101 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7102} 7103 7104// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem: An item 7105// in the carousel. 7106type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem struct { 7107 // Description: Optional. The body text of the card. 7108 Description string `json:"description,omitempty"` 7109 7110 // Image: Optional. The image to display. 7111 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 7112 7113 // Info: Required. Additional info about the option item. 7114 Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"` 7115 7116 // Title: Required. Title of the carousel item. 7117 Title string `json:"title,omitempty"` 7118 7119 // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") to include 7128 // in API requests with the JSON null value. By default, fields with 7129 // empty values are omitted from API requests. However, any field with 7130 // an 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 *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) { 7137 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem 7138 raw := NoMethod(*s) 7139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7140} 7141 7142// GoogleCloudDialogflowV2beta1IntentMessageColumnProperties: Column 7143// properties for TableCard. 7144type GoogleCloudDialogflowV2beta1IntentMessageColumnProperties struct { 7145 // Header: Required. Column heading. 7146 Header string `json:"header,omitempty"` 7147 7148 // HorizontalAlignment: Optional. Defines text alignment for all cells 7149 // in this column. 7150 // 7151 // Possible values: 7152 // "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading 7153 // edge of the column. 7154 // "LEADING" - Text is aligned to the leading edge of the column. 7155 // "CENTER" - Text is centered in the column. 7156 // "TRAILING" - Text is aligned to the trailing edge of the column. 7157 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 7158 7159 // ForceSendFields is a list of field names (e.g. "Header") to 7160 // unconditionally include in API requests. By default, fields with 7161 // empty values are omitted from API requests. However, any non-pointer, 7162 // non-interface field appearing in ForceSendFields will be sent to the 7163 // server regardless of whether the field is empty or not. This may be 7164 // used to include empty fields in Patch requests. 7165 ForceSendFields []string `json:"-"` 7166 7167 // NullFields is a list of field names (e.g. "Header") to include in API 7168 // requests with the JSON null value. By default, fields with empty 7169 // values are omitted from API requests. However, any field with an 7170 // empty value appearing in NullFields will be sent to the server as 7171 // null. It is an error if a field in this list has a non-empty value. 7172 // This may be used to include null fields in Patch requests. 7173 NullFields []string `json:"-"` 7174} 7175 7176func (s *GoogleCloudDialogflowV2beta1IntentMessageColumnProperties) MarshalJSON() ([]byte, error) { 7177 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageColumnProperties 7178 raw := NoMethod(*s) 7179 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7180} 7181 7182// GoogleCloudDialogflowV2beta1IntentMessageImage: The image response 7183// message. 7184type GoogleCloudDialogflowV2beta1IntentMessageImage struct { 7185 // AccessibilityText: A text description of the image to be used for 7186 // accessibility, 7187 // e.g., screen readers. Required if image_uri is set for 7188 // CarouselSelect. 7189 AccessibilityText string `json:"accessibilityText,omitempty"` 7190 7191 // ImageUri: Optional. The public URI to an image file. 7192 ImageUri string `json:"imageUri,omitempty"` 7193 7194 // ForceSendFields is a list of field names (e.g. "AccessibilityText") 7195 // to unconditionally include in API requests. By default, fields with 7196 // empty values are omitted from API requests. However, any non-pointer, 7197 // non-interface field appearing in ForceSendFields will be sent to the 7198 // server regardless of whether the field is empty or not. This may be 7199 // used to include empty fields in Patch requests. 7200 ForceSendFields []string `json:"-"` 7201 7202 // NullFields is a list of field names (e.g. "AccessibilityText") to 7203 // include in API requests with the JSON null value. By default, fields 7204 // with empty values are omitted from API requests. However, any field 7205 // with an empty value appearing in NullFields will be sent to the 7206 // server as null. It is an error if a field in this list has a 7207 // non-empty value. This may be used to include null fields in Patch 7208 // requests. 7209 NullFields []string `json:"-"` 7210} 7211 7212func (s *GoogleCloudDialogflowV2beta1IntentMessageImage) MarshalJSON() ([]byte, error) { 7213 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageImage 7214 raw := NoMethod(*s) 7215 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7216} 7217 7218// GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion: The 7219// suggestion chip message that allows the user to jump out to the 7220// app 7221// or website associated with this agent. 7222type GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion struct { 7223 // DestinationName: Required. The name of the app or site this chip is 7224 // linking to. 7225 DestinationName string `json:"destinationName,omitempty"` 7226 7227 // Uri: Required. The URI of the app or site to open when the user taps 7228 // the 7229 // suggestion chip. 7230 Uri string `json:"uri,omitempty"` 7231 7232 // ForceSendFields is a list of field names (e.g. "DestinationName") to 7233 // unconditionally include in API requests. By default, fields with 7234 // empty values are omitted from API requests. However, any non-pointer, 7235 // non-interface field appearing in ForceSendFields will be sent to the 7236 // server regardless of whether the field is empty or not. This may be 7237 // used to include empty fields in Patch requests. 7238 ForceSendFields []string `json:"-"` 7239 7240 // NullFields is a list of field names (e.g. "DestinationName") to 7241 // include in API requests with the JSON null value. By default, fields 7242 // with empty values are omitted from API requests. However, any field 7243 // with an empty value appearing in NullFields will be sent to the 7244 // server as null. It is an error if a field in this list has a 7245 // non-empty value. This may be used to include null fields in Patch 7246 // requests. 7247 NullFields []string `json:"-"` 7248} 7249 7250func (s *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) { 7251 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion 7252 raw := NoMethod(*s) 7253 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7254} 7255 7256// GoogleCloudDialogflowV2beta1IntentMessageListSelect: The card for 7257// presenting a list of options to select from. 7258type GoogleCloudDialogflowV2beta1IntentMessageListSelect struct { 7259 // Items: Required. List items. 7260 Items []*GoogleCloudDialogflowV2beta1IntentMessageListSelectItem `json:"items,omitempty"` 7261 7262 // Subtitle: Optional. Subtitle of the list. 7263 Subtitle string `json:"subtitle,omitempty"` 7264 7265 // Title: Optional. The overall title of the list. 7266 Title string `json:"title,omitempty"` 7267 7268 // ForceSendFields is a list of field names (e.g. "Items") to 7269 // unconditionally include in API requests. By default, fields with 7270 // empty values are omitted from API requests. However, any non-pointer, 7271 // non-interface field appearing in ForceSendFields will be sent to the 7272 // server regardless of whether the field is empty or not. This may be 7273 // used to include empty fields in Patch requests. 7274 ForceSendFields []string `json:"-"` 7275 7276 // NullFields is a list of field names (e.g. "Items") to include in API 7277 // requests with the JSON null value. By default, fields with empty 7278 // values are omitted from API requests. However, any field with an 7279 // empty value appearing in NullFields will be sent to the server as 7280 // null. It is an error if a field in this list has a non-empty value. 7281 // This may be used to include null fields in Patch requests. 7282 NullFields []string `json:"-"` 7283} 7284 7285func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelect) MarshalJSON() ([]byte, error) { 7286 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelect 7287 raw := NoMethod(*s) 7288 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7289} 7290 7291// GoogleCloudDialogflowV2beta1IntentMessageListSelectItem: An item in 7292// the list. 7293type GoogleCloudDialogflowV2beta1IntentMessageListSelectItem struct { 7294 // Description: Optional. The main text describing the item. 7295 Description string `json:"description,omitempty"` 7296 7297 // Image: Optional. The image to display. 7298 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 7299 7300 // Info: Required. Additional information about this option. 7301 Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"` 7302 7303 // Title: Required. The title of the list item. 7304 Title string `json:"title,omitempty"` 7305 7306 // ForceSendFields is a list of field names (e.g. "Description") to 7307 // unconditionally include in API requests. By default, fields with 7308 // empty values are omitted from API requests. However, any non-pointer, 7309 // non-interface field appearing in ForceSendFields will be sent to the 7310 // server regardless of whether the field is empty or not. This may be 7311 // used to include empty fields in Patch requests. 7312 ForceSendFields []string `json:"-"` 7313 7314 // NullFields is a list of field names (e.g. "Description") to include 7315 // in API requests with the JSON null value. By default, fields with 7316 // empty values are omitted from API requests. However, any field with 7317 // an empty value appearing in NullFields will be sent to the server as 7318 // null. It is an error if a field in this list has a non-empty value. 7319 // This may be used to include null fields in Patch requests. 7320 NullFields []string `json:"-"` 7321} 7322 7323func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelectItem) MarshalJSON() ([]byte, error) { 7324 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelectItem 7325 raw := NoMethod(*s) 7326 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7327} 7328 7329// GoogleCloudDialogflowV2beta1IntentMessageMediaContent: The media 7330// content card for Actions on Google. 7331type GoogleCloudDialogflowV2beta1IntentMessageMediaContent struct { 7332 // MediaObjects: Required. List of media objects. 7333 MediaObjects []*GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"` 7334 7335 // MediaType: Optional. What type of media is the content (ie "audio"). 7336 // 7337 // Possible values: 7338 // "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified. 7339 // "AUDIO" - Response media type is audio. 7340 MediaType string `json:"mediaType,omitempty"` 7341 7342 // ForceSendFields is a list of field names (e.g. "MediaObjects") to 7343 // unconditionally include in API requests. By default, fields with 7344 // empty values are omitted from API requests. However, any non-pointer, 7345 // non-interface field appearing in ForceSendFields will be sent to the 7346 // server regardless of whether the field is empty or not. This may be 7347 // used to include empty fields in Patch requests. 7348 ForceSendFields []string `json:"-"` 7349 7350 // NullFields is a list of field names (e.g. "MediaObjects") to include 7351 // in API requests with the JSON null value. By default, fields with 7352 // empty values are omitted from API requests. However, any field with 7353 // an empty value appearing in NullFields will be sent to the server as 7354 // null. It is an error if a field in this list has a non-empty value. 7355 // This may be used to include null fields in Patch requests. 7356 NullFields []string `json:"-"` 7357} 7358 7359func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContent) MarshalJSON() ([]byte, error) { 7360 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContent 7361 raw := NoMethod(*s) 7362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7363} 7364 7365// GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObje 7366// ct: Response media object for media content card. 7367type GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject struct { 7368 // ContentUrl: Required. Url where the media is stored. 7369 ContentUrl string `json:"contentUrl,omitempty"` 7370 7371 // Description: Optional. Description of media card. 7372 Description string `json:"description,omitempty"` 7373 7374 // Icon: Optional. Icon to display above media content. 7375 Icon *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"icon,omitempty"` 7376 7377 // LargeImage: Optional. Image to display above media content. 7378 LargeImage *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"largeImage,omitempty"` 7379 7380 // Name: Required. Name of media card. 7381 Name string `json:"name,omitempty"` 7382 7383 // ForceSendFields is a list of field names (e.g. "ContentUrl") to 7384 // unconditionally include in API requests. By default, fields with 7385 // empty values are omitted from API requests. However, any non-pointer, 7386 // non-interface field appearing in ForceSendFields will be sent to the 7387 // server regardless of whether the field is empty or not. This may be 7388 // used to include empty fields in Patch requests. 7389 ForceSendFields []string `json:"-"` 7390 7391 // NullFields is a list of field names (e.g. "ContentUrl") to include in 7392 // API requests with the JSON null value. By default, fields with empty 7393 // values are omitted from API requests. However, any field with an 7394 // empty value appearing in NullFields will be sent to the server as 7395 // null. It is an error if a field in this list has a non-empty value. 7396 // This may be used to include null fields in Patch requests. 7397 NullFields []string `json:"-"` 7398} 7399 7400func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) { 7401 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject 7402 raw := NoMethod(*s) 7403 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7404} 7405 7406// GoogleCloudDialogflowV2beta1IntentMessageQuickReplies: The quick 7407// replies response message. 7408type GoogleCloudDialogflowV2beta1IntentMessageQuickReplies struct { 7409 // QuickReplies: Optional. The collection of quick replies. 7410 QuickReplies []string `json:"quickReplies,omitempty"` 7411 7412 // Title: Optional. The title of the collection of quick replies. 7413 Title string `json:"title,omitempty"` 7414 7415 // ForceSendFields is a list of field names (e.g. "QuickReplies") to 7416 // unconditionally include in API requests. By default, fields with 7417 // empty values are omitted from API requests. However, any non-pointer, 7418 // non-interface field appearing in ForceSendFields will be sent to the 7419 // server regardless of whether the field is empty or not. This may be 7420 // used to include empty fields in Patch requests. 7421 ForceSendFields []string `json:"-"` 7422 7423 // NullFields is a list of field names (e.g. "QuickReplies") to include 7424 // in API requests with the JSON null value. By default, fields with 7425 // empty values are omitted from API requests. However, any field with 7426 // an empty value appearing in NullFields will be sent to the server as 7427 // null. It is an error if a field in this list has a non-empty value. 7428 // This may be used to include null fields in Patch requests. 7429 NullFields []string `json:"-"` 7430} 7431 7432func (s *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies) MarshalJSON() ([]byte, error) { 7433 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageQuickReplies 7434 raw := NoMethod(*s) 7435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7436} 7437 7438// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent: Rich 7439// Business Messaging (RBM) Card content 7440type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent struct { 7441 // Description: Optional. Description of the card (at most 2000 7442 // bytes). 7443 // 7444 // At least one of the title, description or media must be set. 7445 Description string `json:"description,omitempty"` 7446 7447 // Media: Optional. However at least one of the title, description or 7448 // media must 7449 // be set. Media (image, GIF or a video) to include in the card. 7450 Media *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia `json:"media,omitempty"` 7451 7452 // Suggestions: Optional. List of suggestions to include in the card. 7453 Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"suggestions,omitempty"` 7454 7455 // Title: Optional. Title of the card (at most 200 bytes). 7456 // 7457 // At least one of the title, description or media must be set. 7458 Title string `json:"title,omitempty"` 7459 7460 // ForceSendFields is a list of field names (e.g. "Description") to 7461 // unconditionally include in API requests. By default, fields with 7462 // empty values are omitted from API requests. However, any non-pointer, 7463 // non-interface field appearing in ForceSendFields will be sent to the 7464 // server regardless of whether the field is empty or not. This may be 7465 // used to include empty fields in Patch requests. 7466 ForceSendFields []string `json:"-"` 7467 7468 // NullFields is a list of field names (e.g. "Description") to include 7469 // in API requests with the JSON null value. By default, fields with 7470 // empty values are omitted from API requests. However, any field with 7471 // an empty value appearing in NullFields will be sent to the server as 7472 // null. It is an error if a field in this list has a non-empty value. 7473 // This may be used to include null fields in Patch requests. 7474 NullFields []string `json:"-"` 7475} 7476 7477func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent) MarshalJSON() ([]byte, error) { 7478 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent 7479 raw := NoMethod(*s) 7480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7481} 7482 7483// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia: Rich 7484// Business Messaging (RBM) Media displayed in Cards 7485// The following media-types are currently supported: 7486// 7487// Image Types 7488// 7489// * image/jpeg 7490// * image/jpg' 7491// * image/gif 7492// * image/png 7493// 7494// Video Types 7495// 7496// * video/h263 7497// * video/m4v 7498// * video/mp4 7499// * video/mpeg 7500// * video/mpeg4 7501// * video/webm 7502type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia struct { 7503 // FileUri: Required. Publicly reachable URI of the file. The RBM 7504 // platform 7505 // determines the MIME type of the file from the content-type field 7506 // in 7507 // the HTTP headers when the platform fetches the file. The 7508 // content-type 7509 // field must be present and accurate in the HTTP response from the URL. 7510 FileUri string `json:"fileUri,omitempty"` 7511 7512 // Height: Required for cards with vertical orientation. The height of 7513 // the media 7514 // within a rich card with a vertical layout. 7515 // For a standalone card with horizontal layout, height is 7516 // not 7517 // customizable, and this field is ignored. 7518 // 7519 // Possible values: 7520 // "HEIGHT_UNSPECIFIED" - Not specified. 7521 // "SHORT" - 112 DP. 7522 // "MEDIUM" - 168 DP. 7523 // "TALL" - 264 DP. Not available for rich card carousels when the 7524 // card width 7525 // is set to small. 7526 Height string `json:"height,omitempty"` 7527 7528 // ThumbnailUri: Optional. Publicly reachable URI of the thumbnail.If 7529 // you don't 7530 // provide a thumbnail URI, the RBM platform displays a 7531 // blank 7532 // placeholder thumbnail until the user's device downloads the 7533 // file. 7534 // Depending on the user's setting, the file may not 7535 // download 7536 // automatically and may require the user to tap a download button. 7537 ThumbnailUri string `json:"thumbnailUri,omitempty"` 7538 7539 // ForceSendFields is a list of field names (e.g. "FileUri") to 7540 // unconditionally include in API requests. By default, fields with 7541 // empty values are omitted from API requests. However, any non-pointer, 7542 // non-interface field appearing in ForceSendFields will be sent to the 7543 // server regardless of whether the field is empty or not. This may be 7544 // used to include empty fields in Patch requests. 7545 ForceSendFields []string `json:"-"` 7546 7547 // NullFields is a list of field names (e.g. "FileUri") to include in 7548 // API requests with the JSON null value. By default, fields with empty 7549 // values are omitted from API requests. However, any field with an 7550 // empty value appearing in NullFields will be sent to the server as 7551 // null. It is an error if a field in this list has a non-empty value. 7552 // This may be used to include null fields in Patch requests. 7553 NullFields []string `json:"-"` 7554} 7555 7556func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia) MarshalJSON() ([]byte, error) { 7557 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia 7558 raw := NoMethod(*s) 7559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7560} 7561 7562// GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard: Carousel 7563// Rich Business Messaging (RBM) rich card. 7564// 7565// Rich cards allow you to respond to users with more vivid content, 7566// e.g. 7567// with media and suggestions. 7568// 7569// If you want to show a single card with more control over the 7570// layout, 7571// please use RbmStandaloneCard instead. 7572type GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard struct { 7573 // CardContents: Required. The cards in the carousel. A carousel must 7574 // have at least 7575 // 2 cards and at most 10. 7576 CardContents []*GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContents,omitempty"` 7577 7578 // CardWidth: Required. The width of the cards in the carousel. 7579 // 7580 // Possible values: 7581 // "CARD_WIDTH_UNSPECIFIED" - Not specified. 7582 // "SMALL" - 120 DP. Note that tall media cannot be used. 7583 // "MEDIUM" - 232 DP. 7584 CardWidth string `json:"cardWidth,omitempty"` 7585 7586 // ForceSendFields is a list of field names (e.g. "CardContents") 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. "CardContents") to include 7595 // in API requests with the JSON null value. By default, fields with 7596 // empty values are omitted from API requests. However, any field with 7597 // an 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 *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard) MarshalJSON() ([]byte, error) { 7604 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard 7605 raw := NoMethod(*s) 7606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7607} 7608 7609// GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard: 7610// Standalone Rich Business Messaging (RBM) rich card. 7611// 7612// Rich cards allow you to respond to users with more vivid content, 7613// e.g. 7614// with media and suggestions. 7615// 7616// You can group multiple rich cards into one using RbmCarouselCard 7617// but 7618// carousel cards will give you less control over the card layout. 7619type GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard struct { 7620 // CardContent: Required. Card content. 7621 CardContent *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContent,omitempty"` 7622 7623 // CardOrientation: Required. Orientation of the card. 7624 // 7625 // Possible values: 7626 // "CARD_ORIENTATION_UNSPECIFIED" - Not specified. 7627 // "HORIZONTAL" - Horizontal layout. 7628 // "VERTICAL" - Vertical layout. 7629 CardOrientation string `json:"cardOrientation,omitempty"` 7630 7631 // ThumbnailImageAlignment: Required if orientation is horizontal. 7632 // Image preview alignment for standalone cards with horizontal layout. 7633 // 7634 // Possible values: 7635 // "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED" - Not specified. 7636 // "LEFT" - Thumbnail preview is left-aligned. 7637 // "RIGHT" - Thumbnail preview is right-aligned. 7638 ThumbnailImageAlignment string `json:"thumbnailImageAlignment,omitempty"` 7639 7640 // ForceSendFields is a list of field names (e.g. "CardContent") to 7641 // unconditionally include in API requests. By default, fields with 7642 // empty values are omitted from API requests. However, any non-pointer, 7643 // non-interface field appearing in ForceSendFields will be sent to the 7644 // server regardless of whether the field is empty or not. This may be 7645 // used to include empty fields in Patch requests. 7646 ForceSendFields []string `json:"-"` 7647 7648 // NullFields is a list of field names (e.g. "CardContent") to include 7649 // in API requests with the JSON null value. By default, fields with 7650 // empty values are omitted from API requests. However, any field with 7651 // an empty value appearing in NullFields will be sent to the server as 7652 // null. It is an error if a field in this list has a non-empty value. 7653 // This may be used to include null fields in Patch requests. 7654 NullFields []string `json:"-"` 7655} 7656 7657func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard) MarshalJSON() ([]byte, error) { 7658 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard 7659 raw := NoMethod(*s) 7660 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7661} 7662 7663// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction: Rich 7664// Business Messaging (RBM) suggested client-side action that the 7665// user 7666// can choose from the card. 7667type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction struct { 7668 // Dial: Suggested client side action: Dial a phone number 7669 Dial *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial `json:"dial,omitempty"` 7670 7671 // OpenUrl: Suggested client side action: Open a URI on device 7672 OpenUrl *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri `json:"openUrl,omitempty"` 7673 7674 // PostbackData: Opaque payload that the Dialogflow receives in a user 7675 // event 7676 // when the user taps the suggested action. This data will be 7677 // also 7678 // forwarded to webhook to allow performing custom business logic. 7679 PostbackData string `json:"postbackData,omitempty"` 7680 7681 // ShareLocation: Suggested client side action: Share user location 7682 ShareLocation *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation `json:"shareLocation,omitempty"` 7683 7684 // Text: Text to display alongside the action. 7685 Text string `json:"text,omitempty"` 7686 7687 // ForceSendFields is a list of field names (e.g. "Dial") to 7688 // unconditionally include in API requests. By default, fields with 7689 // empty values are omitted from API requests. However, any non-pointer, 7690 // non-interface field appearing in ForceSendFields will be sent to the 7691 // server regardless of whether the field is empty or not. This may be 7692 // used to include empty fields in Patch requests. 7693 ForceSendFields []string `json:"-"` 7694 7695 // NullFields is a list of field names (e.g. "Dial") to include in API 7696 // requests with the JSON null value. By default, fields with empty 7697 // values are omitted from API requests. However, any field with an 7698 // empty value appearing in NullFields will be sent to the server as 7699 // null. It is an error if a field in this list has a non-empty value. 7700 // This may be used to include null fields in Patch requests. 7701 NullFields []string `json:"-"` 7702} 7703 7704func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction) MarshalJSON() ([]byte, error) { 7705 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction 7706 raw := NoMethod(*s) 7707 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7708} 7709 7710// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste 7711// dActionDial: Opens the user's default dialer app with the specified 7712// phone number 7713// but does not dial automatically. 7714type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial struct { 7715 // PhoneNumber: Required. The phone number to fill in the default dialer 7716 // app. 7717 // This field should be in 7718 // [E.164](https://en.wikipedia.org/wiki/E.164) 7719 // format. An example of a correctly formatted phone 7720 // number: 7721 // +15556767888. 7722 PhoneNumber string `json:"phoneNumber,omitempty"` 7723 7724 // ForceSendFields is a list of field names (e.g. "PhoneNumber") to 7725 // unconditionally include in API requests. By default, fields with 7726 // empty values are omitted from API requests. However, any non-pointer, 7727 // non-interface field appearing in ForceSendFields will be sent to the 7728 // server regardless of whether the field is empty or not. This may be 7729 // used to include empty fields in Patch requests. 7730 ForceSendFields []string `json:"-"` 7731 7732 // NullFields is a list of field names (e.g. "PhoneNumber") to include 7733 // in API requests with the JSON null value. By default, fields with 7734 // empty values are omitted from API requests. However, any field with 7735 // an empty value appearing in NullFields will be sent to the server as 7736 // null. It is an error if a field in this list has a non-empty value. 7737 // This may be used to include null fields in Patch requests. 7738 NullFields []string `json:"-"` 7739} 7740 7741func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial) MarshalJSON() ([]byte, error) { 7742 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial 7743 raw := NoMethod(*s) 7744 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7745} 7746 7747// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste 7748// dActionOpenUri: Opens the user's default web browser app to the 7749// specified uri 7750// If the user has an app installed that is 7751// registered as the default handler for the URL, then this app will 7752// be 7753// opened instead, and its icon will be used in the suggested action UI. 7754type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri struct { 7755 // Uri: Required. The uri to open on the user device 7756 Uri string `json:"uri,omitempty"` 7757 7758 // ForceSendFields is a list of field names (e.g. "Uri") to 7759 // unconditionally include in API requests. By default, fields with 7760 // empty values are omitted from API requests. However, any non-pointer, 7761 // non-interface field appearing in ForceSendFields will be sent to the 7762 // server regardless of whether the field is empty or not. This may be 7763 // used to include empty fields in Patch requests. 7764 ForceSendFields []string `json:"-"` 7765 7766 // NullFields is a list of field names (e.g. "Uri") to include in API 7767 // requests with the JSON null value. By default, fields with empty 7768 // values are omitted from API requests. However, any field with an 7769 // empty value appearing in NullFields will be sent to the server as 7770 // null. It is an error if a field in this list has a non-empty value. 7771 // This may be used to include null fields in Patch requests. 7772 NullFields []string `json:"-"` 7773} 7774 7775func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri) MarshalJSON() ([]byte, error) { 7776 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri 7777 raw := NoMethod(*s) 7778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7779} 7780 7781// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste 7782// dActionShareLocation: Opens the device's location chooser so the user 7783// can pick a location 7784// to send back to the agent. 7785type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation struct { 7786} 7787 7788// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply: Rich 7789// Business Messaging (RBM) suggested reply that the user can 7790// click 7791// instead of typing in their own response. 7792type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply struct { 7793 // PostbackData: Opaque payload that the Dialogflow receives in a user 7794 // event 7795 // when the user taps the suggested reply. This data will be 7796 // also 7797 // forwarded to webhook to allow performing custom business logic. 7798 PostbackData string `json:"postbackData,omitempty"` 7799 7800 // Text: Suggested reply text. 7801 Text string `json:"text,omitempty"` 7802 7803 // ForceSendFields is a list of field names (e.g. "PostbackData") to 7804 // unconditionally include in API requests. By default, fields with 7805 // empty values are omitted from API requests. However, any non-pointer, 7806 // non-interface field appearing in ForceSendFields will be sent to the 7807 // server regardless of whether the field is empty or not. This may be 7808 // used to include empty fields in Patch requests. 7809 ForceSendFields []string `json:"-"` 7810 7811 // NullFields is a list of field names (e.g. "PostbackData") to include 7812 // in API requests with the JSON null value. By default, fields with 7813 // empty values are omitted from API requests. However, any field with 7814 // an empty value appearing in NullFields will be sent to the server as 7815 // null. It is an error if a field in this list has a non-empty value. 7816 // This may be used to include null fields in Patch requests. 7817 NullFields []string `json:"-"` 7818} 7819 7820func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply) MarshalJSON() ([]byte, error) { 7821 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply 7822 raw := NoMethod(*s) 7823 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7824} 7825 7826// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion: Rich Business 7827// Messaging (RBM) suggestion. Suggestions allow user to 7828// easily select/click a predefined response or perform an action 7829// (like 7830// opening a web uri). 7831type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion struct { 7832 // Action: Predefined client side actions that user can choose 7833 Action *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction `json:"action,omitempty"` 7834 7835 // Reply: Predefined replies for user to select instead of typing 7836 Reply *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply `json:"reply,omitempty"` 7837 7838 // ForceSendFields is a list of field names (e.g. "Action") to 7839 // unconditionally include in API requests. By default, fields with 7840 // empty values are omitted from API requests. However, any non-pointer, 7841 // non-interface field appearing in ForceSendFields will be sent to the 7842 // server regardless of whether the field is empty or not. This may be 7843 // used to include empty fields in Patch requests. 7844 ForceSendFields []string `json:"-"` 7845 7846 // NullFields is a list of field names (e.g. "Action") to include in API 7847 // requests with the JSON null value. By default, fields with empty 7848 // values are omitted from API requests. However, any field with an 7849 // empty value appearing in NullFields will be sent to the server as 7850 // null. It is an error if a field in this list has a non-empty value. 7851 // This may be used to include null fields in Patch requests. 7852 NullFields []string `json:"-"` 7853} 7854 7855func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion) MarshalJSON() ([]byte, error) { 7856 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion 7857 raw := NoMethod(*s) 7858 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7859} 7860 7861// GoogleCloudDialogflowV2beta1IntentMessageRbmText: Rich Business 7862// Messaging (RBM) text response with suggestions. 7863type GoogleCloudDialogflowV2beta1IntentMessageRbmText struct { 7864 // RbmSuggestion: Optional. One or more suggestions to show to the user. 7865 RbmSuggestion []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"rbmSuggestion,omitempty"` 7866 7867 // Text: Required. Text sent and displayed to the user. 7868 Text string `json:"text,omitempty"` 7869 7870 // ForceSendFields is a list of field names (e.g. "RbmSuggestion") to 7871 // unconditionally include in API requests. By default, fields with 7872 // empty values are omitted from API requests. However, any non-pointer, 7873 // non-interface field appearing in ForceSendFields will be sent to the 7874 // server regardless of whether the field is empty or not. This may be 7875 // used to include empty fields in Patch requests. 7876 ForceSendFields []string `json:"-"` 7877 7878 // NullFields is a list of field names (e.g. "RbmSuggestion") to include 7879 // in API requests with the JSON null value. By default, fields with 7880 // empty values are omitted from API requests. However, any field with 7881 // an empty value appearing in NullFields will be sent to the server as 7882 // null. It is an error if a field in this list has a non-empty value. 7883 // This may be used to include null fields in Patch requests. 7884 NullFields []string `json:"-"` 7885} 7886 7887func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmText) MarshalJSON() ([]byte, error) { 7888 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmText 7889 raw := NoMethod(*s) 7890 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7891} 7892 7893// GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo: Additional 7894// info about the select item for when it is triggered in a 7895// dialog. 7896type GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo struct { 7897 // Key: Required. A unique key that will be sent back to the agent if 7898 // this 7899 // response is given. 7900 Key string `json:"key,omitempty"` 7901 7902 // Synonyms: Optional. A list of synonyms that can also be used to 7903 // trigger this 7904 // item in dialog. 7905 Synonyms []string `json:"synonyms,omitempty"` 7906 7907 // ForceSendFields is a list of field names (e.g. "Key") to 7908 // unconditionally include in API requests. By default, fields with 7909 // empty values are omitted from API requests. However, any non-pointer, 7910 // non-interface field appearing in ForceSendFields will be sent to the 7911 // server regardless of whether the field is empty or not. This may be 7912 // used to include empty fields in Patch requests. 7913 ForceSendFields []string `json:"-"` 7914 7915 // NullFields is a list of field names (e.g. "Key") to include in API 7916 // requests with the JSON null value. By default, fields with empty 7917 // values are omitted from API requests. However, any field with an 7918 // empty value appearing in NullFields will be sent to the server as 7919 // null. It is an error if a field in this list has a non-empty value. 7920 // This may be used to include null fields in Patch requests. 7921 NullFields []string `json:"-"` 7922} 7923 7924func (s *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) { 7925 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo 7926 raw := NoMethod(*s) 7927 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7928} 7929 7930// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse: The simple 7931// response message containing speech or text. 7932type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse struct { 7933 // DisplayText: Optional. The text to display. 7934 DisplayText string `json:"displayText,omitempty"` 7935 7936 // Ssml: One of text_to_speech or ssml must be provided. Structured 7937 // spoken 7938 // response to the user in the SSML format. Mutually exclusive 7939 // with 7940 // text_to_speech. 7941 Ssml string `json:"ssml,omitempty"` 7942 7943 // TextToSpeech: One of text_to_speech or ssml must be provided. The 7944 // plain text of the 7945 // speech output. Mutually exclusive with ssml. 7946 TextToSpeech string `json:"textToSpeech,omitempty"` 7947 7948 // ForceSendFields is a list of field names (e.g. "DisplayText") to 7949 // unconditionally include in API requests. By default, fields with 7950 // empty values are omitted from API requests. However, any non-pointer, 7951 // non-interface field appearing in ForceSendFields will be sent to the 7952 // server regardless of whether the field is empty or not. This may be 7953 // used to include empty fields in Patch requests. 7954 ForceSendFields []string `json:"-"` 7955 7956 // NullFields is a list of field names (e.g. "DisplayText") to include 7957 // in API requests with the JSON null value. By default, fields with 7958 // empty values are omitted from API requests. However, any field with 7959 // an empty value appearing in NullFields will be sent to the server as 7960 // null. It is an error if a field in this list has a non-empty value. 7961 // This may be used to include null fields in Patch requests. 7962 NullFields []string `json:"-"` 7963} 7964 7965func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) { 7966 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse 7967 raw := NoMethod(*s) 7968 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7969} 7970 7971// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses: The 7972// collection of simple response candidates. 7973// This message in `QueryResult.fulfillment_messages` 7974// and 7975// `WebhookResponse.fulfillment_messages` should contain only 7976// one 7977// `SimpleResponse`. 7978type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses struct { 7979 // SimpleResponses: Required. The list of simple responses. 7980 SimpleResponses []*GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse `json:"simpleResponses,omitempty"` 7981 7982 // ForceSendFields is a list of field names (e.g. "SimpleResponses") to 7983 // unconditionally include in API requests. By default, fields with 7984 // empty values are omitted from API requests. However, any non-pointer, 7985 // non-interface field appearing in ForceSendFields will be sent to the 7986 // server regardless of whether the field is empty or not. This may be 7987 // used to include empty fields in Patch requests. 7988 ForceSendFields []string `json:"-"` 7989 7990 // NullFields is a list of field names (e.g. "SimpleResponses") to 7991 // include in API requests with the JSON null value. By default, fields 7992 // with empty values are omitted from API requests. However, any field 7993 // with an empty value appearing in NullFields will be sent to the 7994 // server as null. It is an error if a field in this list has a 7995 // non-empty value. This may be used to include null fields in Patch 7996 // requests. 7997 NullFields []string `json:"-"` 7998} 7999 8000func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) { 8001 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses 8002 raw := NoMethod(*s) 8003 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8004} 8005 8006// GoogleCloudDialogflowV2beta1IntentMessageSuggestion: The suggestion 8007// chip message that the user can tap to quickly post a reply 8008// to the conversation. 8009type GoogleCloudDialogflowV2beta1IntentMessageSuggestion struct { 8010 // Title: Required. The text shown the in the suggestion chip. 8011 Title string `json:"title,omitempty"` 8012 8013 // ForceSendFields is a list of field names (e.g. "Title") to 8014 // unconditionally include in API requests. By default, fields with 8015 // empty values are omitted from API requests. However, any non-pointer, 8016 // non-interface field appearing in ForceSendFields will be sent to the 8017 // server regardless of whether the field is empty or not. This may be 8018 // used to include empty fields in Patch requests. 8019 ForceSendFields []string `json:"-"` 8020 8021 // NullFields is a list of field names (e.g. "Title") to include in API 8022 // requests with the JSON null value. By default, fields with empty 8023 // values are omitted from API requests. However, any field with an 8024 // empty value appearing in NullFields will be sent to the server as 8025 // null. It is an error if a field in this list has a non-empty value. 8026 // This may be used to include null fields in Patch requests. 8027 NullFields []string `json:"-"` 8028} 8029 8030func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestion) MarshalJSON() ([]byte, error) { 8031 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestion 8032 raw := NoMethod(*s) 8033 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8034} 8035 8036// GoogleCloudDialogflowV2beta1IntentMessageSuggestions: The collection 8037// of suggestions. 8038type GoogleCloudDialogflowV2beta1IntentMessageSuggestions struct { 8039 // Suggestions: Required. The list of suggested replies. 8040 Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageSuggestion `json:"suggestions,omitempty"` 8041 8042 // ForceSendFields is a list of field names (e.g. "Suggestions") to 8043 // unconditionally include in API requests. By default, fields with 8044 // empty values are omitted from API requests. However, any non-pointer, 8045 // non-interface field appearing in ForceSendFields will be sent to the 8046 // server regardless of whether the field is empty or not. This may be 8047 // used to include empty fields in Patch requests. 8048 ForceSendFields []string `json:"-"` 8049 8050 // NullFields is a list of field names (e.g. "Suggestions") to include 8051 // in API requests with the JSON null value. By default, fields with 8052 // empty values are omitted from API requests. However, any field with 8053 // an empty value appearing in NullFields will be sent to the server as 8054 // null. It is an error if a field in this list has a non-empty value. 8055 // This may be used to include null fields in Patch requests. 8056 NullFields []string `json:"-"` 8057} 8058 8059func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestions) MarshalJSON() ([]byte, error) { 8060 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestions 8061 raw := NoMethod(*s) 8062 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8063} 8064 8065// GoogleCloudDialogflowV2beta1IntentMessageTableCard: Table card for 8066// Actions on Google. 8067type GoogleCloudDialogflowV2beta1IntentMessageTableCard struct { 8068 // Buttons: Optional. List of buttons for the card. 8069 Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"` 8070 8071 // ColumnProperties: Optional. Display properties for the columns in 8072 // this table. 8073 ColumnProperties []*GoogleCloudDialogflowV2beta1IntentMessageColumnProperties `json:"columnProperties,omitempty"` 8074 8075 // Image: Optional. Image which should be displayed on the card. 8076 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 8077 8078 // Rows: Optional. Rows in this table of data. 8079 Rows []*GoogleCloudDialogflowV2beta1IntentMessageTableCardRow `json:"rows,omitempty"` 8080 8081 // Subtitle: Optional. Subtitle to the title. 8082 Subtitle string `json:"subtitle,omitempty"` 8083 8084 // Title: Required. Title of the card. 8085 Title string `json:"title,omitempty"` 8086 8087 // ForceSendFields is a list of field names (e.g. "Buttons") to 8088 // unconditionally include in API requests. By default, fields with 8089 // empty values are omitted from API requests. However, any non-pointer, 8090 // non-interface field appearing in ForceSendFields will be sent to the 8091 // server regardless of whether the field is empty or not. This may be 8092 // used to include empty fields in Patch requests. 8093 ForceSendFields []string `json:"-"` 8094 8095 // NullFields is a list of field names (e.g. "Buttons") to include in 8096 // API requests with the JSON null value. By default, fields with empty 8097 // values are omitted from API requests. However, any field with an 8098 // empty value appearing in NullFields will be sent to the server as 8099 // null. It is an error if a field in this list has a non-empty value. 8100 // This may be used to include null fields in Patch requests. 8101 NullFields []string `json:"-"` 8102} 8103 8104func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCard) MarshalJSON() ([]byte, error) { 8105 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCard 8106 raw := NoMethod(*s) 8107 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8108} 8109 8110// GoogleCloudDialogflowV2beta1IntentMessageTableCardCell: Cell of 8111// TableCardRow. 8112type GoogleCloudDialogflowV2beta1IntentMessageTableCardCell struct { 8113 // Text: Required. Text in this cell. 8114 Text string `json:"text,omitempty"` 8115 8116 // ForceSendFields is a list of field names (e.g. "Text") to 8117 // unconditionally include in API requests. By default, fields with 8118 // empty values are omitted from API requests. However, any non-pointer, 8119 // non-interface field appearing in ForceSendFields will be sent to the 8120 // server regardless of whether the field is empty or not. This may be 8121 // used to include empty fields in Patch requests. 8122 ForceSendFields []string `json:"-"` 8123 8124 // NullFields is a list of field names (e.g. "Text") to include in API 8125 // requests with the JSON null value. By default, fields with empty 8126 // values are omitted from API requests. However, any field with an 8127 // empty value appearing in NullFields will be sent to the server as 8128 // null. It is an error if a field in this list has a non-empty value. 8129 // This may be used to include null fields in Patch requests. 8130 NullFields []string `json:"-"` 8131} 8132 8133func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardCell) MarshalJSON() ([]byte, error) { 8134 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardCell 8135 raw := NoMethod(*s) 8136 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8137} 8138 8139// GoogleCloudDialogflowV2beta1IntentMessageTableCardRow: Row of 8140// TableCard. 8141type GoogleCloudDialogflowV2beta1IntentMessageTableCardRow struct { 8142 // Cells: Optional. List of cells that make up this row. 8143 Cells []*GoogleCloudDialogflowV2beta1IntentMessageTableCardCell `json:"cells,omitempty"` 8144 8145 // DividerAfter: Optional. Whether to add a visual divider after this 8146 // row. 8147 DividerAfter bool `json:"dividerAfter,omitempty"` 8148 8149 // ForceSendFields is a list of field names (e.g. "Cells") to 8150 // unconditionally include in API requests. By default, fields with 8151 // empty values are omitted from API requests. However, any non-pointer, 8152 // non-interface field appearing in ForceSendFields will be sent to the 8153 // server regardless of whether the field is empty or not. This may be 8154 // used to include empty fields in Patch requests. 8155 ForceSendFields []string `json:"-"` 8156 8157 // NullFields is a list of field names (e.g. "Cells") to include in API 8158 // requests with the JSON null value. By default, fields with empty 8159 // values are omitted from API requests. However, any field with an 8160 // empty value appearing in NullFields will be sent to the server as 8161 // null. It is an error if a field in this list has a non-empty value. 8162 // This may be used to include null fields in Patch requests. 8163 NullFields []string `json:"-"` 8164} 8165 8166func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardRow) MarshalJSON() ([]byte, error) { 8167 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardRow 8168 raw := NoMethod(*s) 8169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8170} 8171 8172// GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio: Plays 8173// audio from a file in Telephony Gateway. 8174type GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio struct { 8175 // AudioUri: Required. URI to a Google Cloud Storage object containing 8176 // the audio to 8177 // play, e.g., "gs://bucket/object". The object must contain a 8178 // single 8179 // channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. 8180 // 8181 // This object must be readable by the 8182 // `service-<Project 8183 // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service 8184 // account 8185 // where <Project Number> is the number of the Telephony Gateway 8186 // project 8187 // (usually the same as the Dialogflow agent project). If the Google 8188 // Cloud 8189 // Storage bucket is in the Telephony Gateway project, this permission 8190 // is 8191 // added by default when enabling the Dialogflow V2 API. 8192 // 8193 // For audio from other sources, consider using 8194 // the 8195 // `TelephonySynthesizeSpeech` message with SSML. 8196 AudioUri string `json:"audioUri,omitempty"` 8197 8198 // ForceSendFields is a list of field names (e.g. "AudioUri") to 8199 // unconditionally include in API requests. By default, fields with 8200 // empty values are omitted from API requests. However, any non-pointer, 8201 // non-interface field appearing in ForceSendFields will be sent to the 8202 // server regardless of whether the field is empty or not. This may be 8203 // used to include empty fields in Patch requests. 8204 ForceSendFields []string `json:"-"` 8205 8206 // NullFields is a list of field names (e.g. "AudioUri") to include in 8207 // API requests with the JSON null value. By default, fields with empty 8208 // values are omitted from API requests. However, any field with an 8209 // empty value appearing in NullFields will be sent to the server as 8210 // null. It is an error if a field in this list has a non-empty value. 8211 // This may be used to include null fields in Patch requests. 8212 NullFields []string `json:"-"` 8213} 8214 8215func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio) MarshalJSON() ([]byte, error) { 8216 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio 8217 raw := NoMethod(*s) 8218 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8219} 8220 8221// GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech: 8222// Synthesizes speech and plays back the synthesized audio to the caller 8223// in 8224// Telephony Gateway. 8225// 8226// Telephony Gateway takes the synthesizer settings 8227// from 8228// `DetectIntentResponse.output_audio_config` which can either be set 8229// at request-level or can come from the agent-level synthesizer config. 8230type GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech struct { 8231 // Ssml: The SSML to be synthesized. For more information, 8232 // see 8233 // [SSML](https://developers.google.com/actions/reference/ssml). 8234 Ssml string `json:"ssml,omitempty"` 8235 8236 // Text: The raw text to be synthesized. 8237 Text string `json:"text,omitempty"` 8238 8239 // ForceSendFields is a list of field names (e.g. "Ssml") to 8240 // unconditionally include in API requests. By default, fields with 8241 // empty values are omitted from API requests. However, any non-pointer, 8242 // non-interface field appearing in ForceSendFields will be sent to the 8243 // server regardless of whether the field is empty or not. This may be 8244 // used to include empty fields in Patch requests. 8245 ForceSendFields []string `json:"-"` 8246 8247 // NullFields is a list of field names (e.g. "Ssml") to include in API 8248 // requests with the JSON null value. By default, fields with empty 8249 // values are omitted from API requests. However, any field with an 8250 // empty value appearing in NullFields will be sent to the server as 8251 // null. It is an error if a field in this list has a non-empty value. 8252 // This may be used to include null fields in Patch requests. 8253 NullFields []string `json:"-"` 8254} 8255 8256func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech) MarshalJSON() ([]byte, error) { 8257 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech 8258 raw := NoMethod(*s) 8259 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8260} 8261 8262// GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall: 8263// Transfers the call in Telephony Gateway. 8264type GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall struct { 8265 // PhoneNumber: Required. The phone number to transfer the call to 8266 // in [E.164 format](https://en.wikipedia.org/wiki/E.164). 8267 // 8268 // We currently only allow transferring to US numbers (+1xxxyyyzzzz). 8269 PhoneNumber string `json:"phoneNumber,omitempty"` 8270 8271 // ForceSendFields is a list of field names (e.g. "PhoneNumber") to 8272 // unconditionally include in API requests. By default, fields with 8273 // empty values are omitted from API requests. However, any non-pointer, 8274 // non-interface field appearing in ForceSendFields will be sent to the 8275 // server regardless of whether the field is empty or not. This may be 8276 // used to include empty fields in Patch requests. 8277 ForceSendFields []string `json:"-"` 8278 8279 // NullFields is a list of field names (e.g. "PhoneNumber") to include 8280 // in API requests with the JSON null value. By default, fields with 8281 // empty values are omitted from API requests. However, any field with 8282 // an empty value appearing in NullFields will be sent to the server as 8283 // null. It is an error if a field in this list has a non-empty value. 8284 // This may be used to include null fields in Patch requests. 8285 NullFields []string `json:"-"` 8286} 8287 8288func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall) MarshalJSON() ([]byte, error) { 8289 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall 8290 raw := NoMethod(*s) 8291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8292} 8293 8294// GoogleCloudDialogflowV2beta1IntentMessageText: The text response 8295// message. 8296type GoogleCloudDialogflowV2beta1IntentMessageText struct { 8297 // Text: Optional. The collection of the agent's responses. 8298 Text []string `json:"text,omitempty"` 8299 8300 // ForceSendFields is a list of field names (e.g. "Text") to 8301 // unconditionally include in API requests. By default, fields with 8302 // empty values are omitted from API requests. However, any non-pointer, 8303 // non-interface field appearing in ForceSendFields will be sent to the 8304 // server regardless of whether the field is empty or not. This may be 8305 // used to include empty fields in Patch requests. 8306 ForceSendFields []string `json:"-"` 8307 8308 // NullFields is a list of field names (e.g. "Text") to include in API 8309 // requests with the JSON null value. By default, fields with empty 8310 // values are omitted from API requests. However, any field with an 8311 // empty value appearing in NullFields will be sent to the server as 8312 // null. It is an error if a field in this list has a non-empty value. 8313 // This may be used to include null fields in Patch requests. 8314 NullFields []string `json:"-"` 8315} 8316 8317func (s *GoogleCloudDialogflowV2beta1IntentMessageText) MarshalJSON() ([]byte, error) { 8318 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageText 8319 raw := NoMethod(*s) 8320 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8321} 8322 8323// GoogleCloudDialogflowV2beta1IntentParameter: Represents intent 8324// parameters. 8325type GoogleCloudDialogflowV2beta1IntentParameter struct { 8326 // DefaultValue: Optional. The default value to use when the `value` 8327 // yields an empty 8328 // result. 8329 // Default values can be extracted from contexts by using the 8330 // following 8331 // syntax: `#context_name.parameter_name`. 8332 DefaultValue string `json:"defaultValue,omitempty"` 8333 8334 // DisplayName: Required. The name of the parameter. 8335 DisplayName string `json:"displayName,omitempty"` 8336 8337 // EntityTypeDisplayName: Optional. The name of the entity type, 8338 // prefixed with `@`, that 8339 // describes values of the parameter. If the parameter is 8340 // required, this must be provided. 8341 EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"` 8342 8343 // IsList: Optional. Indicates whether the parameter represents a list 8344 // of values. 8345 IsList bool `json:"isList,omitempty"` 8346 8347 // Mandatory: Optional. Indicates whether the parameter is required. 8348 // That is, 8349 // whether the intent cannot be completed without collecting the 8350 // parameter 8351 // value. 8352 Mandatory bool `json:"mandatory,omitempty"` 8353 8354 // Name: The unique identifier of this parameter. 8355 Name string `json:"name,omitempty"` 8356 8357 // Prompts: Optional. The collection of prompts that the agent can 8358 // present to the 8359 // user in order to collect a value for the parameter. 8360 Prompts []string `json:"prompts,omitempty"` 8361 8362 // Value: Optional. The definition of the parameter value. It can be: 8363 // 8364 // - a constant string, 8365 // - a parameter value defined as `$parameter_name`, 8366 // - an original parameter value defined as 8367 // `$parameter_name.original`, 8368 // - a parameter value from some context defined as 8369 // `#context_name.parameter_name`. 8370 Value string `json:"value,omitempty"` 8371 8372 // ForceSendFields is a list of field names (e.g. "DefaultValue") to 8373 // unconditionally include in API requests. By default, fields with 8374 // empty values are omitted from API requests. However, any non-pointer, 8375 // non-interface field appearing in ForceSendFields will be sent to the 8376 // server regardless of whether the field is empty or not. This may be 8377 // used to include empty fields in Patch requests. 8378 ForceSendFields []string `json:"-"` 8379 8380 // NullFields is a list of field names (e.g. "DefaultValue") to include 8381 // in API requests with the JSON null value. By default, fields with 8382 // empty values are omitted from API requests. However, any field with 8383 // an empty value appearing in NullFields will be sent to the server as 8384 // null. It is an error if a field in this list has a non-empty value. 8385 // This may be used to include null fields in Patch requests. 8386 NullFields []string `json:"-"` 8387} 8388 8389func (s *GoogleCloudDialogflowV2beta1IntentParameter) MarshalJSON() ([]byte, error) { 8390 type NoMethod GoogleCloudDialogflowV2beta1IntentParameter 8391 raw := NoMethod(*s) 8392 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8393} 8394 8395// GoogleCloudDialogflowV2beta1IntentTrainingPhrase: Represents an 8396// example that the agent is trained on. 8397type GoogleCloudDialogflowV2beta1IntentTrainingPhrase struct { 8398 // Name: Output only. The unique identifier of this training phrase. 8399 Name string `json:"name,omitempty"` 8400 8401 // Parts: Required. The ordered list of training phrase parts. 8402 // The parts are concatenated in order to form the training 8403 // phrase. 8404 // 8405 // Note: The API does not automatically annotate training phrases like 8406 // the 8407 // Dialogflow Console does. 8408 // 8409 // Note: Do not forget to include whitespace at part boundaries, 8410 // so the training phrase is well formatted when the parts are 8411 // concatenated. 8412 // 8413 // If the training phrase does not need to be annotated with 8414 // parameters, 8415 // you just need a single part with only the Part.text field set. 8416 // 8417 // If you want to annotate the training phrase, you must create 8418 // multiple 8419 // parts, where the fields of each part are populated in one of two 8420 // ways: 8421 // 8422 // - `Part.text` is set to a part of the phrase that has no 8423 // parameters. 8424 // - `Part.text` is set to a part of the phrase that you want to 8425 // annotate, 8426 // and the `entity_type`, `alias`, and `user_defined` fields are 8427 // all 8428 // set. 8429 Parts []*GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart `json:"parts,omitempty"` 8430 8431 // TimesAddedCount: Optional. Indicates how many times this example was 8432 // added to 8433 // the intent. Each time a developer adds an existing sample by editing 8434 // an 8435 // intent or training, this counter is increased. 8436 TimesAddedCount int64 `json:"timesAddedCount,omitempty"` 8437 8438 // Type: Required. The type of the training phrase. 8439 // 8440 // Possible values: 8441 // "TYPE_UNSPECIFIED" - Not specified. This value should never be 8442 // used. 8443 // "EXAMPLE" - Examples do not contain @-prefixed entity type names, 8444 // but example parts 8445 // can be annotated with entity types. 8446 // "TEMPLATE" - Templates are not annotated with entity types, but 8447 // they can contain 8448 // @-prefixed entity type names as substrings. 8449 // Template mode has been deprecated. Example mode is the only 8450 // supported 8451 // way to create new training phrases. If you have existing 8452 // training 8453 // phrases that you've created in template mode, those will continue 8454 // to 8455 // work. 8456 Type string `json:"type,omitempty"` 8457 8458 // ForceSendFields is a list of field names (e.g. "Name") to 8459 // unconditionally include in API requests. By default, fields with 8460 // empty values are omitted from API requests. However, any non-pointer, 8461 // non-interface field appearing in ForceSendFields will be sent to the 8462 // server regardless of whether the field is empty or not. This may be 8463 // used to include empty fields in Patch requests. 8464 ForceSendFields []string `json:"-"` 8465 8466 // NullFields is a list of field names (e.g. "Name") to include in API 8467 // requests with the JSON null value. By default, fields with empty 8468 // values are omitted from API requests. However, any field with an 8469 // empty value appearing in NullFields will be sent to the server as 8470 // null. It is an error if a field in this list has a non-empty value. 8471 // This may be used to include null fields in Patch requests. 8472 NullFields []string `json:"-"` 8473} 8474 8475func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrase) MarshalJSON() ([]byte, error) { 8476 type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrase 8477 raw := NoMethod(*s) 8478 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8479} 8480 8481// GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart: Represents a 8482// part of a training phrase. 8483type GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart struct { 8484 // Alias: Optional. The parameter name for the value extracted from 8485 // the 8486 // annotated part of the example. 8487 // This field is required for annotated parts of the training phrase. 8488 Alias string `json:"alias,omitempty"` 8489 8490 // EntityType: Optional. The entity type name prefixed with `@`. 8491 // This field is required for annotated parts of the training phrase. 8492 EntityType string `json:"entityType,omitempty"` 8493 8494 // Text: Required. The text for this part. 8495 Text string `json:"text,omitempty"` 8496 8497 // UserDefined: Optional. Indicates whether the text was manually 8498 // annotated. 8499 // This field is set to true when the Dialogflow Console is used 8500 // to 8501 // manually annotate the part. When creating an annotated part with 8502 // the 8503 // API, you must set this to true. 8504 UserDefined bool `json:"userDefined,omitempty"` 8505 8506 // ForceSendFields is a list of field names (e.g. "Alias") to 8507 // unconditionally include in API requests. By default, fields with 8508 // empty values are omitted from API requests. However, any non-pointer, 8509 // non-interface field appearing in ForceSendFields will be sent to the 8510 // server regardless of whether the field is empty or not. This may be 8511 // used to include empty fields in Patch requests. 8512 ForceSendFields []string `json:"-"` 8513 8514 // NullFields is a list of field names (e.g. "Alias") to include in API 8515 // requests with the JSON null value. By default, fields with empty 8516 // values are omitted from API requests. However, any field with an 8517 // empty value appearing in NullFields will be sent to the server as 8518 // null. It is an error if a field in this list has a non-empty value. 8519 // This may be used to include null fields in Patch requests. 8520 NullFields []string `json:"-"` 8521} 8522 8523func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) { 8524 type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart 8525 raw := NoMethod(*s) 8526 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8527} 8528 8529// GoogleCloudDialogflowV2beta1KnowledgeAnswers: Represents the result 8530// of querying a Knowledge base. 8531type GoogleCloudDialogflowV2beta1KnowledgeAnswers struct { 8532 // Answers: A list of answers from Knowledge Connector. 8533 Answers []*GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer `json:"answers,omitempty"` 8534 8535 // ForceSendFields is a list of field names (e.g. "Answers") to 8536 // unconditionally include in API requests. By default, fields with 8537 // empty values are omitted from API requests. However, any non-pointer, 8538 // non-interface field appearing in ForceSendFields will be sent to the 8539 // server regardless of whether the field is empty or not. This may be 8540 // used to include empty fields in Patch requests. 8541 ForceSendFields []string `json:"-"` 8542 8543 // NullFields is a list of field names (e.g. "Answers") to include in 8544 // API requests with the JSON null value. By default, fields with empty 8545 // values are omitted from API requests. However, any field with an 8546 // empty value appearing in NullFields will be sent to the server as 8547 // null. It is an error if a field in this list has a non-empty value. 8548 // This may be used to include null fields in Patch requests. 8549 NullFields []string `json:"-"` 8550} 8551 8552func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswers) MarshalJSON() ([]byte, error) { 8553 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswers 8554 raw := NoMethod(*s) 8555 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8556} 8557 8558// GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer: An answer from 8559// Knowledge Connector. 8560type GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer struct { 8561 // Answer: The piece of text from the `source` knowledge base document 8562 // that answers 8563 // this conversational query. 8564 Answer string `json:"answer,omitempty"` 8565 8566 // FaqQuestion: The corresponding FAQ question if the answer was 8567 // extracted from a FAQ 8568 // Document, empty otherwise. 8569 FaqQuestion string `json:"faqQuestion,omitempty"` 8570 8571 // MatchConfidence: The system's confidence score that this Knowledge 8572 // answer is a good match 8573 // for this conversational query. 8574 // The range is from 0.0 (completely uncertain) to 1.0 (completely 8575 // certain). 8576 // Note: The confidence score is likely to vary somewhat (possibly even 8577 // for 8578 // identical requests), as the underlying model is under 8579 // constant 8580 // improvement. It may be deprecated in the future. We recommend 8581 // using 8582 // `match_confidence_level` which should be generally more stable. 8583 MatchConfidence float64 `json:"matchConfidence,omitempty"` 8584 8585 // MatchConfidenceLevel: The system's confidence level that this 8586 // knowledge answer is a good match 8587 // for this conversational query. 8588 // NOTE: The confidence level for a given `<query, answer>` pair may 8589 // change 8590 // without notice, as it depends on models that are constantly 8591 // being 8592 // improved. However, it will change less frequently than the 8593 // confidence 8594 // score below, and should be preferred for referencing the quality of 8595 // an 8596 // answer. 8597 // 8598 // Possible values: 8599 // "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED" - Not specified. 8600 // "LOW" - Indicates that the confidence is low. 8601 // "MEDIUM" - Indicates our confidence is medium. 8602 // "HIGH" - Indicates our confidence is high. 8603 MatchConfidenceLevel string `json:"matchConfidenceLevel,omitempty"` 8604 8605 // Source: Indicates which Knowledge Document this answer was extracted 8606 // from. 8607 // Format: `projects/<Project ID>/knowledgeBases/<Knowledge 8608 // Base 8609 // ID>/documents/<Document ID>`. 8610 Source string `json:"source,omitempty"` 8611 8612 // ForceSendFields is a list of field names (e.g. "Answer") to 8613 // unconditionally include in API requests. By default, fields with 8614 // empty values are omitted from API requests. However, any non-pointer, 8615 // non-interface field appearing in ForceSendFields will be sent to the 8616 // server regardless of whether the field is empty or not. This may be 8617 // used to include empty fields in Patch requests. 8618 ForceSendFields []string `json:"-"` 8619 8620 // NullFields is a list of field names (e.g. "Answer") to include in API 8621 // requests with the JSON null value. By default, fields with empty 8622 // values are omitted from API requests. However, any field with an 8623 // empty value appearing in NullFields will be sent to the server as 8624 // null. It is an error if a field in this list has a non-empty value. 8625 // This may be used to include null fields in Patch requests. 8626 NullFields []string `json:"-"` 8627} 8628 8629func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) MarshalJSON() ([]byte, error) { 8630 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer 8631 raw := NoMethod(*s) 8632 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8633} 8634 8635func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) UnmarshalJSON(data []byte) error { 8636 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer 8637 var s1 struct { 8638 MatchConfidence gensupport.JSONFloat64 `json:"matchConfidence"` 8639 *NoMethod 8640 } 8641 s1.NoMethod = (*NoMethod)(s) 8642 if err := json.Unmarshal(data, &s1); err != nil { 8643 return err 8644 } 8645 s.MatchConfidence = float64(s1.MatchConfidence) 8646 return nil 8647} 8648 8649// GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata: Metadata in 8650// google::longrunning::Operation for Knowledge operations. 8651type GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata struct { 8652 // State: Required. Output only. The current state of this operation. 8653 // 8654 // Possible values: 8655 // "STATE_UNSPECIFIED" - State unspecified. 8656 // "PENDING" - The operation has been created. 8657 // "RUNNING" - The operation is currently running. 8658 // "DONE" - The operation is done, either cancelled or completed. 8659 State string `json:"state,omitempty"` 8660 8661 // ForceSendFields is a list of field names (e.g. "State") to 8662 // unconditionally include in API requests. By default, fields with 8663 // empty values are omitted from API requests. However, any non-pointer, 8664 // non-interface field appearing in ForceSendFields will be sent to the 8665 // server regardless of whether the field is empty or not. This may be 8666 // used to include empty fields in Patch requests. 8667 ForceSendFields []string `json:"-"` 8668 8669 // NullFields is a list of field names (e.g. "State") to include in API 8670 // requests with the JSON null value. By default, fields with empty 8671 // values are omitted from API requests. However, any field with an 8672 // empty value appearing in NullFields will be sent to the server as 8673 // null. It is an error if a field in this list has a non-empty value. 8674 // This may be used to include null fields in Patch requests. 8675 NullFields []string `json:"-"` 8676} 8677 8678func (s *GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { 8679 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata 8680 raw := NoMethod(*s) 8681 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8682} 8683 8684// GoogleCloudDialogflowV2beta1LabelConversationResponse: The response 8685// for 8686// ConversationDatasets.LabelConversation. 8687type GoogleCloudDialogflowV2beta1LabelConversationResponse struct { 8688 // AnnotatedConversationDataset: New annotated conversation dataset 8689 // created by the labeling task. 8690 AnnotatedConversationDataset *GoogleCloudDialogflowV2beta1AnnotatedConversationDataset `json:"annotatedConversationDataset,omitempty"` 8691 8692 // ForceSendFields is a list of field names (e.g. 8693 // "AnnotatedConversationDataset") to unconditionally include in API 8694 // requests. By default, fields with empty values are omitted from API 8695 // requests. However, any non-pointer, non-interface field appearing in 8696 // ForceSendFields will be sent to the server regardless of whether the 8697 // field is empty or not. This may be used to include empty fields in 8698 // Patch requests. 8699 ForceSendFields []string `json:"-"` 8700 8701 // NullFields is a list of field names (e.g. 8702 // "AnnotatedConversationDataset") to include in API requests with the 8703 // JSON null value. By default, fields with empty values are omitted 8704 // from API requests. However, any field with an empty value appearing 8705 // in NullFields will be sent to the server as null. It is an error if a 8706 // field in this list has a non-empty value. This may be used to include 8707 // null fields in Patch requests. 8708 NullFields []string `json:"-"` 8709} 8710 8711func (s *GoogleCloudDialogflowV2beta1LabelConversationResponse) MarshalJSON() ([]byte, error) { 8712 type NoMethod GoogleCloudDialogflowV2beta1LabelConversationResponse 8713 raw := NoMethod(*s) 8714 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8715} 8716 8717// GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest: Represents 8718// the contents of the original request that was passed to 8719// the `[Streaming]DetectIntent` call. 8720type GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest struct { 8721 // Payload: Optional. This field is set to the value of the 8722 // `QueryParameters.payload` 8723 // field passed in the request. Some integrations that query a 8724 // Dialogflow 8725 // agent may provide additional information in the payload. 8726 // 8727 // In particular, for the Dialogflow Phone Gateway integration, this 8728 // field has 8729 // the form: 8730 // <pre>{ 8731 // "telephony": { 8732 // "caller_id": "+18558363987" 8733 // } 8734 // }</pre> 8735 // Note: The caller ID field (`caller_id`) will be redacted for 8736 // Standard 8737 // Edition agents and populated with the caller ID in 8738 // [E.164 8739 // format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition 8740 // agents. 8741 Payload googleapi.RawMessage `json:"payload,omitempty"` 8742 8743 // Source: The source of this request, e.g., `google`, `facebook`, 8744 // `slack`. It is set 8745 // by Dialogflow-owned servers. 8746 Source string `json:"source,omitempty"` 8747 8748 // Version: Optional. The version of the protocol used for this 8749 // request. 8750 // This field is AoG-specific. 8751 Version string `json:"version,omitempty"` 8752 8753 // ForceSendFields is a list of field names (e.g. "Payload") to 8754 // unconditionally include in API requests. By default, fields with 8755 // empty values are omitted from API requests. However, any non-pointer, 8756 // non-interface field appearing in ForceSendFields will be sent to the 8757 // server regardless of whether the field is empty or not. This may be 8758 // used to include empty fields in Patch requests. 8759 ForceSendFields []string `json:"-"` 8760 8761 // NullFields is a list of field names (e.g. "Payload") to include in 8762 // API requests with the JSON null value. By default, fields with empty 8763 // values are omitted from API requests. However, any field with an 8764 // empty value appearing in NullFields will be sent to the server as 8765 // null. It is an error if a field in this list has a non-empty value. 8766 // This may be used to include null fields in Patch requests. 8767 NullFields []string `json:"-"` 8768} 8769 8770func (s *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) { 8771 type NoMethod GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest 8772 raw := NoMethod(*s) 8773 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8774} 8775 8776// GoogleCloudDialogflowV2beta1QueryResult: Represents the result of 8777// conversational query or event processing. 8778type GoogleCloudDialogflowV2beta1QueryResult struct { 8779 // Action: The action name from the matched intent. 8780 Action string `json:"action,omitempty"` 8781 8782 // AllRequiredParamsPresent: This field is set to: 8783 // 8784 // - `false` if the matched intent has required parameters and not all 8785 // of 8786 // the required parameter values have been collected. 8787 // - `true` if all required parameter values have been collected, or if 8788 // the 8789 // matched intent doesn't contain any required parameters. 8790 AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"` 8791 8792 // DiagnosticInfo: Free-form diagnostic information for the associated 8793 // detect intent request. 8794 // The fields of this data can change without notice, so you should not 8795 // write 8796 // code that depends on its structure. 8797 // The data may contain: 8798 // 8799 // - webhook call latency 8800 // - webhook errors 8801 DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"` 8802 8803 // FulfillmentMessages: The collection of rich messages to present to 8804 // the user. 8805 FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"` 8806 8807 // FulfillmentText: The text to be pronounced to the user or shown on 8808 // the screen. 8809 // Note: This is a legacy field, `fulfillment_messages` should be 8810 // preferred. 8811 FulfillmentText string `json:"fulfillmentText,omitempty"` 8812 8813 // Intent: The intent that matched the conversational query. Some, 8814 // not 8815 // all fields are filled in this message, including but not limited 8816 // to: 8817 // `name`, `display_name`, `end_interaction` and `is_fallback`. 8818 Intent *GoogleCloudDialogflowV2beta1Intent `json:"intent,omitempty"` 8819 8820 // IntentDetectionConfidence: The intent detection confidence. Values 8821 // range from 0.0 8822 // (completely uncertain) to 1.0 (completely certain). 8823 // This value is for informational purpose only and is only used to 8824 // help match the best intent within the classification threshold. 8825 // This value may change for the same end-user expression at any time 8826 // due to a 8827 // model retraining or change in implementation. 8828 // If there are `multiple knowledge_answers` messages, this value is set 8829 // to 8830 // the greatest `knowledgeAnswers.match_confidence` value in the list. 8831 IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"` 8832 8833 // KnowledgeAnswers: The result from Knowledge Connector (if any), 8834 // ordered by decreasing 8835 // `KnowledgeAnswers.match_confidence`. 8836 KnowledgeAnswers *GoogleCloudDialogflowV2beta1KnowledgeAnswers `json:"knowledgeAnswers,omitempty"` 8837 8838 // LanguageCode: The language that was triggered during intent 8839 // detection. 8840 // See 8841 // [Language 8842 // Support](https://cloud.google.com/dialogflow/docs/reference/ 8843 // language) 8844 // for a list of the currently supported language codes. 8845 LanguageCode string `json:"languageCode,omitempty"` 8846 8847 // OutputContexts: The collection of output contexts. If 8848 // applicable, 8849 // `output_contexts.parameters` contains entries with name 8850 // `<parameter name>.original` containing the original parameter 8851 // values 8852 // before the query. 8853 OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"` 8854 8855 // Parameters: The collection of extracted parameters. 8856 // 8857 // Depending on your protocol or client library language, this is a 8858 // map, associative array, symbol table, dictionary, or JSON 8859 // object 8860 // composed of a collection of (MapKey, MapValue) pairs: 8861 // 8862 // - MapKey type: string 8863 // - MapKey value: parameter name 8864 // - MapValue type: 8865 // - If parameter's entity type is a composite entity: map 8866 // - Else: string or number, depending on parameter value type 8867 // - MapValue value: 8868 // - If parameter's entity type is a composite entity: 8869 // map from composite entity property names to property values 8870 // - Else: parameter value 8871 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 8872 8873 // QueryText: The original conversational query text: 8874 // 8875 // - If natural language text was provided as input, `query_text` 8876 // contains 8877 // a copy of the input. 8878 // - If natural language speech audio was provided as input, 8879 // `query_text` 8880 // contains the speech recognition result. If speech recognizer 8881 // produced 8882 // multiple alternatives, a particular one is picked. 8883 // - If automatic spell correction is enabled, `query_text` will contain 8884 // the 8885 // corrected user input. 8886 QueryText string `json:"queryText,omitempty"` 8887 8888 // SentimentAnalysisResult: The sentiment analysis result, which depends 8889 // on the 8890 // `sentiment_analysis_request_config` specified in the request. 8891 SentimentAnalysisResult *GoogleCloudDialogflowV2beta1SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"` 8892 8893 // SpeechRecognitionConfidence: The Speech recognition confidence 8894 // between 0.0 and 1.0. A higher number 8895 // indicates an estimated greater likelihood that the recognized words 8896 // are 8897 // correct. The default of 0.0 is a sentinel value indicating that 8898 // confidence 8899 // was not set. 8900 // 8901 // This field is not guaranteed to be accurate or set. In particular 8902 // this 8903 // field isn't set for StreamingDetectIntent since the streaming 8904 // endpoint has 8905 // separate confidence estimates per portion of the audio 8906 // in 8907 // StreamingRecognitionResult. 8908 SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"` 8909 8910 // WebhookPayload: If the query was fulfilled by a webhook call, this 8911 // field is set to the 8912 // value of the `payload` field returned in the webhook response. 8913 WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"` 8914 8915 // WebhookSource: If the query was fulfilled by a webhook call, this 8916 // field is set to the 8917 // value of the `source` field returned in the webhook response. 8918 WebhookSource string `json:"webhookSource,omitempty"` 8919 8920 // ForceSendFields is a list of field names (e.g. "Action") to 8921 // unconditionally include in API requests. By default, fields with 8922 // empty values are omitted from API requests. However, any non-pointer, 8923 // non-interface field appearing in ForceSendFields will be sent to the 8924 // server regardless of whether the field is empty or not. This may be 8925 // used to include empty fields in Patch requests. 8926 ForceSendFields []string `json:"-"` 8927 8928 // NullFields is a list of field names (e.g. "Action") to include in API 8929 // requests with the JSON null value. By default, fields with empty 8930 // values are omitted from API requests. However, any field with an 8931 // empty value appearing in NullFields will be sent to the server as 8932 // null. It is an error if a field in this list has a non-empty value. 8933 // This may be used to include null fields in Patch requests. 8934 NullFields []string `json:"-"` 8935} 8936 8937func (s *GoogleCloudDialogflowV2beta1QueryResult) MarshalJSON() ([]byte, error) { 8938 type NoMethod GoogleCloudDialogflowV2beta1QueryResult 8939 raw := NoMethod(*s) 8940 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8941} 8942 8943func (s *GoogleCloudDialogflowV2beta1QueryResult) UnmarshalJSON(data []byte) error { 8944 type NoMethod GoogleCloudDialogflowV2beta1QueryResult 8945 var s1 struct { 8946 IntentDetectionConfidence gensupport.JSONFloat64 `json:"intentDetectionConfidence"` 8947 SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"` 8948 *NoMethod 8949 } 8950 s1.NoMethod = (*NoMethod)(s) 8951 if err := json.Unmarshal(data, &s1); err != nil { 8952 return err 8953 } 8954 s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence) 8955 s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence) 8956 return nil 8957} 8958 8959// GoogleCloudDialogflowV2beta1Sentiment: The sentiment, such as 8960// positive/negative feeling or association, for a unit 8961// of analysis, such as the query text. 8962type GoogleCloudDialogflowV2beta1Sentiment struct { 8963 // Magnitude: A non-negative number in the [0, +inf) range, which 8964 // represents the absolute 8965 // magnitude of sentiment, regardless of score (positive or negative). 8966 Magnitude float64 `json:"magnitude,omitempty"` 8967 8968 // Score: Sentiment score between -1.0 (negative sentiment) and 1.0 8969 // (positive 8970 // sentiment). 8971 Score float64 `json:"score,omitempty"` 8972 8973 // ForceSendFields is a list of field names (e.g. "Magnitude") to 8974 // unconditionally include in API requests. By default, fields with 8975 // empty values are omitted from API requests. However, any non-pointer, 8976 // non-interface field appearing in ForceSendFields will be sent to the 8977 // server regardless of whether the field is empty or not. This may be 8978 // used to include empty fields in Patch requests. 8979 ForceSendFields []string `json:"-"` 8980 8981 // NullFields is a list of field names (e.g. "Magnitude") to include in 8982 // API requests with the JSON null value. By default, fields with empty 8983 // values are omitted from API requests. However, any field with an 8984 // empty value appearing in NullFields will be sent to the server as 8985 // null. It is an error if a field in this list has a non-empty value. 8986 // This may be used to include null fields in Patch requests. 8987 NullFields []string `json:"-"` 8988} 8989 8990func (s *GoogleCloudDialogflowV2beta1Sentiment) MarshalJSON() ([]byte, error) { 8991 type NoMethod GoogleCloudDialogflowV2beta1Sentiment 8992 raw := NoMethod(*s) 8993 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8994} 8995 8996func (s *GoogleCloudDialogflowV2beta1Sentiment) UnmarshalJSON(data []byte) error { 8997 type NoMethod GoogleCloudDialogflowV2beta1Sentiment 8998 var s1 struct { 8999 Magnitude gensupport.JSONFloat64 `json:"magnitude"` 9000 Score gensupport.JSONFloat64 `json:"score"` 9001 *NoMethod 9002 } 9003 s1.NoMethod = (*NoMethod)(s) 9004 if err := json.Unmarshal(data, &s1); err != nil { 9005 return err 9006 } 9007 s.Magnitude = float64(s1.Magnitude) 9008 s.Score = float64(s1.Score) 9009 return nil 9010} 9011 9012// GoogleCloudDialogflowV2beta1SentimentAnalysisResult: The result of 9013// sentiment analysis. Sentiment analysis inspects user input 9014// and identifies the prevailing subjective opinion, especially to 9015// determine a 9016// user's attitude as positive, negative, or neutral. 9017// For Participants.AnalyzeContent, it needs to be configured 9018// in 9019// DetectIntentRequest.query_params. 9020// For 9021// Participants.StreamingAnalyzeContent, it needs to be configured 9022// in 9023// StreamingDetectIntentRequest.query_params. 9024// And for Participants.AnalyzeContent 9025// and 9026// Participants.StreamingAnalyzeContent, it needs to be configured 9027// in 9028// ConversationProfile.human_agent_assistant_config 9029type GoogleCloudDialogflowV2beta1SentimentAnalysisResult struct { 9030 // QueryTextSentiment: The sentiment analysis result for `query_text`. 9031 QueryTextSentiment *GoogleCloudDialogflowV2beta1Sentiment `json:"queryTextSentiment,omitempty"` 9032 9033 // ForceSendFields is a list of field names (e.g. "QueryTextSentiment") 9034 // to unconditionally include in API requests. By default, fields with 9035 // empty values are omitted from API requests. However, any non-pointer, 9036 // non-interface field appearing in ForceSendFields will be sent to the 9037 // server regardless of whether the field is empty or not. This may be 9038 // used to include empty fields in Patch requests. 9039 ForceSendFields []string `json:"-"` 9040 9041 // NullFields is a list of field names (e.g. "QueryTextSentiment") to 9042 // include in API requests with the JSON null value. By default, fields 9043 // with empty values are omitted from API requests. However, any field 9044 // with an empty value appearing in NullFields will be sent to the 9045 // server as null. It is an error if a field in this list has a 9046 // non-empty value. This may be used to include null fields in Patch 9047 // requests. 9048 NullFields []string `json:"-"` 9049} 9050 9051func (s *GoogleCloudDialogflowV2beta1SentimentAnalysisResult) MarshalJSON() ([]byte, error) { 9052 type NoMethod GoogleCloudDialogflowV2beta1SentimentAnalysisResult 9053 raw := NoMethod(*s) 9054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9055} 9056 9057// GoogleCloudDialogflowV2beta1SessionEntityType: Represents a session 9058// entity type. 9059// 9060// Extends or replaces a custom entity type at the user session level 9061// (we 9062// refer to the entity types defined at the agent level as "custom 9063// entity 9064// types"). 9065// 9066// Note: session entity types apply to all queries, regardless of the 9067// language. 9068type GoogleCloudDialogflowV2beta1SessionEntityType struct { 9069 // Entities: Required. The collection of entities associated with this 9070 // session entity 9071 // type. 9072 Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"` 9073 9074 // EntityOverrideMode: Required. Indicates whether the additional data 9075 // should override or 9076 // supplement the custom entity type definition. 9077 // 9078 // Possible values: 9079 // "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value 9080 // should be never used. 9081 // "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session 9082 // entities overrides the collection of entities 9083 // in the corresponding custom entity type. 9084 // "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session 9085 // entities extends the collection of entities in 9086 // the corresponding custom entity type. 9087 // 9088 // Note: Even in this override mode calls to 9089 // `ListSessionEntityTypes`, 9090 // `GetSessionEntityType`, `CreateSessionEntityType` 9091 // and 9092 // `UpdateSessionEntityType` only return the additional entities added 9093 // in 9094 // this session entity type. If you want to get the supplemented 9095 // list, 9096 // please call EntityTypes.GetEntityType on the custom entity type 9097 // and merge. 9098 EntityOverrideMode string `json:"entityOverrideMode,omitempty"` 9099 9100 // Name: Required. The unique identifier of this session entity type. 9101 // Format: 9102 // `projects/<Project ID>/agent/sessions/<Session 9103 // ID>/entityTypes/<Entity Type 9104 // Display Name>`, or 9105 // `projects/<Project ID>/agent/environments/<Environment 9106 // ID>/users/<User 9107 // ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. 9108 // If `Environment ID` is not specified, we assume default 9109 // 'draft' 9110 // environment. If `User ID` is not specified, we assume default '-' 9111 // user. 9112 // 9113 // `<Entity Type Display Name>` must be the display name of an existing 9114 // entity 9115 // type in the same agent that will be overridden or supplemented. 9116 Name string `json:"name,omitempty"` 9117 9118 // ForceSendFields is a list of field names (e.g. "Entities") to 9119 // unconditionally include in API requests. By default, fields with 9120 // empty values are omitted from API requests. However, any non-pointer, 9121 // non-interface field appearing in ForceSendFields will be sent to the 9122 // server regardless of whether the field is empty or not. This may be 9123 // used to include empty fields in Patch requests. 9124 ForceSendFields []string `json:"-"` 9125 9126 // NullFields is a list of field names (e.g. "Entities") to include in 9127 // API requests with the JSON null value. By default, fields with empty 9128 // values are omitted from API requests. However, any field with an 9129 // empty value appearing in NullFields will be sent to the server as 9130 // null. It is an error if a field in this list has a non-empty value. 9131 // This may be used to include null fields in Patch requests. 9132 NullFields []string `json:"-"` 9133} 9134 9135func (s *GoogleCloudDialogflowV2beta1SessionEntityType) MarshalJSON() ([]byte, error) { 9136 type NoMethod GoogleCloudDialogflowV2beta1SessionEntityType 9137 raw := NoMethod(*s) 9138 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9139} 9140 9141// GoogleCloudDialogflowV2beta1WebhookRequest: The request message for a 9142// webhook call. 9143type GoogleCloudDialogflowV2beta1WebhookRequest struct { 9144 // AlternativeQueryResults: Alternative query results from 9145 // KnowledgeService. 9146 AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"` 9147 9148 // OriginalDetectIntentRequest: Optional. The contents of the original 9149 // request that was passed to 9150 // `[Streaming]DetectIntent` call. 9151 OriginalDetectIntentRequest *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"` 9152 9153 // QueryResult: The result of the conversational query or event 9154 // processing. Contains the 9155 // same value as `[Streaming]DetectIntentResponse.query_result`. 9156 QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"` 9157 9158 // ResponseId: The unique identifier of the response. Contains the same 9159 // value as 9160 // `[Streaming]DetectIntentResponse.response_id`. 9161 ResponseId string `json:"responseId,omitempty"` 9162 9163 // Session: The unique identifier of detectIntent request session. 9164 // Can be used to identify end-user inside webhook 9165 // implementation. 9166 // Format: `projects/<Project ID>/agent/sessions/<Session ID>`, 9167 // or 9168 // `projects/<Project ID>/agent/environments/<Environment 9169 // ID>/users/<User 9170 // ID>/sessions/<Session ID>`. 9171 Session string `json:"session,omitempty"` 9172 9173 // ForceSendFields is a list of field names (e.g. 9174 // "AlternativeQueryResults") to unconditionally include in API 9175 // requests. By default, fields with empty values are omitted from API 9176 // requests. However, any non-pointer, non-interface field appearing in 9177 // ForceSendFields will be sent to the server regardless of whether the 9178 // field is empty or not. This may be used to include empty fields in 9179 // Patch requests. 9180 ForceSendFields []string `json:"-"` 9181 9182 // NullFields is a list of field names (e.g. "AlternativeQueryResults") 9183 // to include in API requests with the JSON null value. By default, 9184 // fields with empty values are omitted from API requests. However, any 9185 // field with an empty value appearing in NullFields will be sent to the 9186 // server as null. It is an error if a field in this list has a 9187 // non-empty value. This may be used to include null fields in Patch 9188 // requests. 9189 NullFields []string `json:"-"` 9190} 9191 9192func (s *GoogleCloudDialogflowV2beta1WebhookRequest) MarshalJSON() ([]byte, error) { 9193 type NoMethod GoogleCloudDialogflowV2beta1WebhookRequest 9194 raw := NoMethod(*s) 9195 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9196} 9197 9198// GoogleCloudDialogflowV2beta1WebhookResponse: The response message for 9199// a webhook call. 9200// 9201// This response is validated by the Dialogflow server. If validation 9202// fails, 9203// an error will be returned in the QueryResult.diagnostic_info 9204// field. 9205// Setting JSON fields to an empty value with the wrong type is a common 9206// error. 9207// To avoid this error: 9208// 9209// - Use "" for empty strings 9210// - Use `{}` or `null` for empty objects 9211// - Use `[]` or `null` for empty arrays 9212// 9213// For more information, see the 9214// [Protocol Buffers 9215// Language 9216// Guide](https://developers.google.com/protocol-buffers/docs/pr 9217// oto3#json). 9218type GoogleCloudDialogflowV2beta1WebhookResponse struct { 9219 // EndInteraction: Optional. Indicates that this intent ends an 9220 // interaction. Some integrations 9221 // (e.g., Actions on Google or Dialogflow phone gateway) use this 9222 // information 9223 // to close interaction with an end user. Default is false. 9224 EndInteraction bool `json:"endInteraction,omitempty"` 9225 9226 // FollowupEventInput: Optional. Invokes the supplied events. 9227 // When this field is set, Dialogflow ignores the 9228 // `fulfillment_text`, 9229 // `fulfillment_messages`, and `payload` fields. 9230 FollowupEventInput *GoogleCloudDialogflowV2beta1EventInput `json:"followupEventInput,omitempty"` 9231 9232 // FulfillmentMessages: Optional. The rich response messages intended 9233 // for the end-user. 9234 // When provided, Dialogflow uses this field to 9235 // populate 9236 // QueryResult.fulfillment_messages sent to the integration or API 9237 // caller. 9238 FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"` 9239 9240 // FulfillmentText: Optional. The text response message intended for the 9241 // end-user. 9242 // It is recommended to use `fulfillment_messages.text.text[0]` 9243 // instead. 9244 // When provided, Dialogflow uses this field to 9245 // populate 9246 // QueryResult.fulfillment_text sent to the integration or API caller. 9247 FulfillmentText string `json:"fulfillmentText,omitempty"` 9248 9249 // OutputContexts: Optional. The collection of output contexts that will 9250 // overwrite currently 9251 // active contexts for the session and reset their lifespans. 9252 // When provided, Dialogflow uses this field to 9253 // populate 9254 // QueryResult.output_contexts sent to the integration or API caller. 9255 OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"` 9256 9257 // Payload: Optional. This field can be used to pass custom data from 9258 // your webhook to the 9259 // integration or API caller. Arbitrary JSON objects are supported. 9260 // When provided, Dialogflow uses this field to 9261 // populate 9262 // QueryResult.webhook_payload sent to the integration or API 9263 // caller. 9264 // This field is also used by the 9265 // [Google 9266 // Assistant 9267 // integration](https://cloud.google.com/dialogflow/docs/integr 9268 // ations/aog) 9269 // for rich response messages. 9270 // See the format definition at [Google Assistant Dialogflow 9271 // webhook 9272 // format](https://developers.google.com/assistant/actions/build/ 9273 // json/dialogflow-webhook-json) 9274 Payload googleapi.RawMessage `json:"payload,omitempty"` 9275 9276 // SessionEntityTypes: Optional. Additional session entity types to 9277 // replace or extend developer 9278 // entity types with. The entity synonyms apply to all languages and 9279 // persist 9280 // for the session. Setting this data from a webhook overwrites 9281 // the session entity types that have been set using 9282 // `detectIntent`, 9283 // `streamingDetectIntent` or SessionEntityType management methods. 9284 SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"` 9285 9286 // Source: Optional. A custom field used to identify the webhook 9287 // source. 9288 // Arbitrary strings are supported. 9289 // When provided, Dialogflow uses this field to 9290 // populate 9291 // QueryResult.webhook_source sent to the integration or API caller. 9292 Source string `json:"source,omitempty"` 9293 9294 // ForceSendFields is a list of field names (e.g. "EndInteraction") to 9295 // unconditionally include in API requests. By default, fields with 9296 // empty values are omitted from API requests. However, any non-pointer, 9297 // non-interface field appearing in ForceSendFields will be sent to the 9298 // server regardless of whether the field is empty or not. This may be 9299 // used to include empty fields in Patch requests. 9300 ForceSendFields []string `json:"-"` 9301 9302 // NullFields is a list of field names (e.g. "EndInteraction") to 9303 // include in API requests with the JSON null value. By default, fields 9304 // with empty values are omitted from API requests. However, any field 9305 // with an empty value appearing in NullFields will be sent to the 9306 // server as null. It is an error if a field in this list has a 9307 // non-empty value. This may be used to include null fields in Patch 9308 // requests. 9309 NullFields []string `json:"-"` 9310} 9311 9312func (s *GoogleCloudDialogflowV2beta1WebhookResponse) MarshalJSON() ([]byte, error) { 9313 type NoMethod GoogleCloudDialogflowV2beta1WebhookResponse 9314 raw := NoMethod(*s) 9315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9316} 9317 9318// GoogleCloudDialogflowV3alpha1ExportAgentResponse: The response 9319// message for Agents.ExportAgent. 9320type GoogleCloudDialogflowV3alpha1ExportAgentResponse struct { 9321 // AgentContent: Uncompressed raw byte content for agent. 9322 AgentContent string `json:"agentContent,omitempty"` 9323 9324 // AgentUri: The URI to a file containing the exported agent. This field 9325 // is populated 9326 // only if `agent_uri` is specified in ExportAgentRequest. 9327 AgentUri string `json:"agentUri,omitempty"` 9328 9329 // ForceSendFields is a list of field names (e.g. "AgentContent") to 9330 // unconditionally include in API requests. By default, fields with 9331 // empty values are omitted from API requests. However, any non-pointer, 9332 // non-interface field appearing in ForceSendFields will be sent to the 9333 // server regardless of whether the field is empty or not. This may be 9334 // used to include empty fields in Patch requests. 9335 ForceSendFields []string `json:"-"` 9336 9337 // NullFields is a list of field names (e.g. "AgentContent") to include 9338 // in API requests with the JSON null value. By default, fields with 9339 // empty values are omitted from API requests. However, any field with 9340 // an empty value appearing in NullFields will be sent to the server as 9341 // null. It is an error if a field in this list has a non-empty value. 9342 // This may be used to include null fields in Patch requests. 9343 NullFields []string `json:"-"` 9344} 9345 9346func (s *GoogleCloudDialogflowV3alpha1ExportAgentResponse) MarshalJSON() ([]byte, error) { 9347 type NoMethod GoogleCloudDialogflowV3alpha1ExportAgentResponse 9348 raw := NoMethod(*s) 9349 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9350} 9351 9352// GoogleLongrunningListOperationsResponse: The response message for 9353// Operations.ListOperations. 9354type GoogleLongrunningListOperationsResponse struct { 9355 // NextPageToken: The standard List next-page token. 9356 NextPageToken string `json:"nextPageToken,omitempty"` 9357 9358 // Operations: A list of operations that matches the specified filter in 9359 // the request. 9360 Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` 9361 9362 // ServerResponse contains the HTTP response code and headers from the 9363 // server. 9364 googleapi.ServerResponse `json:"-"` 9365 9366 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 9367 // unconditionally include in API requests. By default, fields with 9368 // empty values are omitted from API requests. However, any non-pointer, 9369 // non-interface field appearing in ForceSendFields will be sent to the 9370 // server regardless of whether the field is empty or not. This may be 9371 // used to include empty fields in Patch requests. 9372 ForceSendFields []string `json:"-"` 9373 9374 // NullFields is a list of field names (e.g. "NextPageToken") to include 9375 // in API requests with the JSON null value. By default, fields with 9376 // empty values are omitted from API requests. However, any field with 9377 // an empty value appearing in NullFields will be sent to the server as 9378 // null. It is an error if a field in this list has a non-empty value. 9379 // This may be used to include null fields in Patch requests. 9380 NullFields []string `json:"-"` 9381} 9382 9383func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { 9384 type NoMethod GoogleLongrunningListOperationsResponse 9385 raw := NoMethod(*s) 9386 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9387} 9388 9389// GoogleLongrunningOperation: This resource represents a long-running 9390// operation that is the result of a 9391// network API call. 9392type GoogleLongrunningOperation struct { 9393 // Done: If the value is `false`, it means the operation is still in 9394 // progress. 9395 // If `true`, the operation is completed, and either `error` or 9396 // `response` is 9397 // available. 9398 Done bool `json:"done,omitempty"` 9399 9400 // Error: The error result of the operation in case of failure or 9401 // cancellation. 9402 Error *GoogleRpcStatus `json:"error,omitempty"` 9403 9404 // Metadata: Service-specific metadata associated with the operation. 9405 // It typically 9406 // contains progress information and common metadata such as create 9407 // time. 9408 // Some services might not provide such metadata. Any method that 9409 // returns a 9410 // long-running operation should document the metadata type, if any. 9411 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 9412 9413 // Name: The server-assigned name, which is only unique within the same 9414 // service that 9415 // originally returns it. If you use the default HTTP mapping, 9416 // the 9417 // `name` should be a resource name ending with 9418 // `operations/{unique_id}`. 9419 Name string `json:"name,omitempty"` 9420 9421 // Response: The normal response of the operation in case of success. 9422 // If the original 9423 // method returns no data on success, such as `Delete`, the response 9424 // is 9425 // `google.protobuf.Empty`. If the original method is 9426 // standard 9427 // `Get`/`Create`/`Update`, the response should be the resource. For 9428 // other 9429 // methods, the response should have the type `XxxResponse`, where 9430 // `Xxx` 9431 // is the original method name. For example, if the original method 9432 // name 9433 // is `TakeSnapshot()`, the inferred response type 9434 // is 9435 // `TakeSnapshotResponse`. 9436 Response googleapi.RawMessage `json:"response,omitempty"` 9437 9438 // ServerResponse contains the HTTP response code and headers from the 9439 // server. 9440 googleapi.ServerResponse `json:"-"` 9441 9442 // ForceSendFields is a list of field names (e.g. "Done") to 9443 // unconditionally include in API requests. By default, fields with 9444 // empty values are omitted from API requests. However, any non-pointer, 9445 // non-interface field appearing in ForceSendFields will be sent to the 9446 // server regardless of whether the field is empty or not. This may be 9447 // used to include empty fields in Patch requests. 9448 ForceSendFields []string `json:"-"` 9449 9450 // NullFields is a list of field names (e.g. "Done") to include in API 9451 // requests with the JSON null value. By default, fields with empty 9452 // values are omitted from API requests. However, any field with an 9453 // empty value appearing in NullFields will be sent to the server as 9454 // null. It is an error if a field in this list has a non-empty value. 9455 // This may be used to include null fields in Patch requests. 9456 NullFields []string `json:"-"` 9457} 9458 9459func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { 9460 type NoMethod GoogleLongrunningOperation 9461 raw := NoMethod(*s) 9462 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9463} 9464 9465// GoogleProtobufEmpty: A generic empty message that you can re-use to 9466// avoid defining duplicated 9467// empty messages in your APIs. A typical example is to use it as the 9468// request 9469// or the response type of an API method. For instance: 9470// 9471// service Foo { 9472// rpc Bar(google.protobuf.Empty) returns 9473// (google.protobuf.Empty); 9474// } 9475// 9476// The JSON representation for `Empty` is empty JSON object `{}`. 9477type GoogleProtobufEmpty struct { 9478 // ServerResponse contains the HTTP response code and headers from the 9479 // server. 9480 googleapi.ServerResponse `json:"-"` 9481} 9482 9483// GoogleRpcStatus: The `Status` type defines a logical error model that 9484// is suitable for 9485// different programming environments, including REST APIs and RPC APIs. 9486// It is 9487// used by [gRPC](https://github.com/grpc). Each `Status` message 9488// contains 9489// three pieces of data: error code, error message, and error 9490// details. 9491// 9492// You can find out more about this error model and how to work with it 9493// in the 9494// [API Design Guide](https://cloud.google.com/apis/design/errors). 9495type GoogleRpcStatus struct { 9496 // Code: The status code, which should be an enum value of 9497 // google.rpc.Code. 9498 Code int64 `json:"code,omitempty"` 9499 9500 // Details: A list of messages that carry the error details. There is a 9501 // common set of 9502 // message types for APIs to use. 9503 Details []googleapi.RawMessage `json:"details,omitempty"` 9504 9505 // Message: A developer-facing error message, which should be in 9506 // English. Any 9507 // user-facing error message should be localized and sent in 9508 // the 9509 // google.rpc.Status.details field, or localized by the client. 9510 Message string `json:"message,omitempty"` 9511 9512 // ForceSendFields is a list of field names (e.g. "Code") to 9513 // unconditionally include in API requests. By default, fields with 9514 // empty values are omitted from API requests. However, any non-pointer, 9515 // non-interface field appearing in ForceSendFields will be sent to the 9516 // server regardless of whether the field is empty or not. This may be 9517 // used to include empty fields in Patch requests. 9518 ForceSendFields []string `json:"-"` 9519 9520 // NullFields is a list of field names (e.g. "Code") to include in API 9521 // requests with the JSON null value. By default, fields with empty 9522 // values are omitted from API requests. However, any field with an 9523 // empty value appearing in NullFields will be sent to the server as 9524 // null. It is an error if a field in this list has a non-empty value. 9525 // This may be used to include null fields in Patch requests. 9526 NullFields []string `json:"-"` 9527} 9528 9529func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 9530 type NoMethod GoogleRpcStatus 9531 raw := NoMethod(*s) 9532 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9533} 9534 9535// GoogleTypeLatLng: An object representing a latitude/longitude pair. 9536// This is expressed as a pair 9537// of doubles representing degrees latitude and degrees longitude. 9538// Unless 9539// specified otherwise, this must conform to the 9540// <a 9541// href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 9542// st 9543// andard</a>. Values must be within normalized ranges. 9544type GoogleTypeLatLng struct { 9545 // Latitude: The latitude in degrees. It must be in the range [-90.0, 9546 // +90.0]. 9547 Latitude float64 `json:"latitude,omitempty"` 9548 9549 // Longitude: The longitude in degrees. It must be in the range [-180.0, 9550 // +180.0]. 9551 Longitude float64 `json:"longitude,omitempty"` 9552 9553 // ForceSendFields is a list of field names (e.g. "Latitude") to 9554 // unconditionally include in API requests. By default, fields with 9555 // empty values are omitted from API requests. However, any non-pointer, 9556 // non-interface field appearing in ForceSendFields will be sent to the 9557 // server regardless of whether the field is empty or not. This may be 9558 // used to include empty fields in Patch requests. 9559 ForceSendFields []string `json:"-"` 9560 9561 // NullFields is a list of field names (e.g. "Latitude") to include in 9562 // API requests with the JSON null value. By default, fields with empty 9563 // values are omitted from API requests. However, any field with an 9564 // empty value appearing in NullFields will be sent to the server as 9565 // null. It is an error if a field in this list has a non-empty value. 9566 // This may be used to include null fields in Patch requests. 9567 NullFields []string `json:"-"` 9568} 9569 9570func (s *GoogleTypeLatLng) MarshalJSON() ([]byte, error) { 9571 type NoMethod GoogleTypeLatLng 9572 raw := NoMethod(*s) 9573 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9574} 9575 9576func (s *GoogleTypeLatLng) UnmarshalJSON(data []byte) error { 9577 type NoMethod GoogleTypeLatLng 9578 var s1 struct { 9579 Latitude gensupport.JSONFloat64 `json:"latitude"` 9580 Longitude gensupport.JSONFloat64 `json:"longitude"` 9581 *NoMethod 9582 } 9583 s1.NoMethod = (*NoMethod)(s) 9584 if err := json.Unmarshal(data, &s1); err != nil { 9585 return err 9586 } 9587 s.Latitude = float64(s1.Latitude) 9588 s.Longitude = float64(s1.Longitude) 9589 return nil 9590} 9591 9592// method id "dialogflow.projects.deleteAgent": 9593 9594type ProjectsDeleteAgentCall struct { 9595 s *Service 9596 parent string 9597 urlParams_ gensupport.URLParams 9598 ctx_ context.Context 9599 header_ http.Header 9600} 9601 9602// DeleteAgent: Deletes the specified agent. 9603func (r *ProjectsService) DeleteAgent(parent string) *ProjectsDeleteAgentCall { 9604 c := &ProjectsDeleteAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9605 c.parent = parent 9606 return c 9607} 9608 9609// Fields allows partial responses to be retrieved. See 9610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9611// for more information. 9612func (c *ProjectsDeleteAgentCall) Fields(s ...googleapi.Field) *ProjectsDeleteAgentCall { 9613 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9614 return c 9615} 9616 9617// Context sets the context to be used in this call's Do method. Any 9618// pending HTTP request will be aborted if the provided context is 9619// canceled. 9620func (c *ProjectsDeleteAgentCall) Context(ctx context.Context) *ProjectsDeleteAgentCall { 9621 c.ctx_ = ctx 9622 return c 9623} 9624 9625// Header returns an http.Header that can be modified by the caller to 9626// add HTTP headers to the request. 9627func (c *ProjectsDeleteAgentCall) Header() http.Header { 9628 if c.header_ == nil { 9629 c.header_ = make(http.Header) 9630 } 9631 return c.header_ 9632} 9633 9634func (c *ProjectsDeleteAgentCall) doRequest(alt string) (*http.Response, error) { 9635 reqHeaders := make(http.Header) 9636 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 9637 for k, v := range c.header_ { 9638 reqHeaders[k] = v 9639 } 9640 reqHeaders.Set("User-Agent", c.s.userAgent()) 9641 var body io.Reader = nil 9642 c.urlParams_.Set("alt", alt) 9643 c.urlParams_.Set("prettyPrint", "false") 9644 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent") 9645 urls += "?" + c.urlParams_.Encode() 9646 req, err := http.NewRequest("DELETE", urls, body) 9647 if err != nil { 9648 return nil, err 9649 } 9650 req.Header = reqHeaders 9651 googleapi.Expand(req.URL, map[string]string{ 9652 "parent": c.parent, 9653 }) 9654 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9655} 9656 9657// Do executes the "dialogflow.projects.deleteAgent" call. 9658// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 9659// non-2xx status code is an error. Response headers are in either 9660// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 9661// returned at all) in error.(*googleapi.Error).Header. Use 9662// googleapi.IsNotModified to check whether the returned error was 9663// because http.StatusNotModified was returned. 9664func (c *ProjectsDeleteAgentCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 9665 gensupport.SetOptions(c.urlParams_, opts...) 9666 res, err := c.doRequest("json") 9667 if res != nil && res.StatusCode == http.StatusNotModified { 9668 if res.Body != nil { 9669 res.Body.Close() 9670 } 9671 return nil, &googleapi.Error{ 9672 Code: res.StatusCode, 9673 Header: res.Header, 9674 } 9675 } 9676 if err != nil { 9677 return nil, err 9678 } 9679 defer googleapi.CloseBody(res) 9680 if err := googleapi.CheckResponse(res); err != nil { 9681 return nil, err 9682 } 9683 ret := &GoogleProtobufEmpty{ 9684 ServerResponse: googleapi.ServerResponse{ 9685 Header: res.Header, 9686 HTTPStatusCode: res.StatusCode, 9687 }, 9688 } 9689 target := &ret 9690 if err := gensupport.DecodeResponse(target, res); err != nil { 9691 return nil, err 9692 } 9693 return ret, nil 9694 // { 9695 // "description": "Deletes the specified agent.", 9696 // "flatPath": "v2/projects/{projectsId}/agent", 9697 // "httpMethod": "DELETE", 9698 // "id": "dialogflow.projects.deleteAgent", 9699 // "parameterOrder": [ 9700 // "parent" 9701 // ], 9702 // "parameters": { 9703 // "parent": { 9704 // "description": "Required. The project that the agent to delete is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 9705 // "location": "path", 9706 // "pattern": "^projects/[^/]+$", 9707 // "required": true, 9708 // "type": "string" 9709 // } 9710 // }, 9711 // "path": "v2/{+parent}/agent", 9712 // "response": { 9713 // "$ref": "GoogleProtobufEmpty" 9714 // }, 9715 // "scopes": [ 9716 // "https://www.googleapis.com/auth/cloud-platform", 9717 // "https://www.googleapis.com/auth/dialogflow" 9718 // ] 9719 // } 9720 9721} 9722 9723// method id "dialogflow.projects.getAgent": 9724 9725type ProjectsGetAgentCall struct { 9726 s *Service 9727 parent string 9728 urlParams_ gensupport.URLParams 9729 ifNoneMatch_ string 9730 ctx_ context.Context 9731 header_ http.Header 9732} 9733 9734// GetAgent: Retrieves the specified agent. 9735func (r *ProjectsService) GetAgent(parent string) *ProjectsGetAgentCall { 9736 c := &ProjectsGetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9737 c.parent = parent 9738 return c 9739} 9740 9741// Fields allows partial responses to be retrieved. See 9742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9743// for more information. 9744func (c *ProjectsGetAgentCall) Fields(s ...googleapi.Field) *ProjectsGetAgentCall { 9745 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9746 return c 9747} 9748 9749// IfNoneMatch sets the optional parameter which makes the operation 9750// fail if the object's ETag matches the given value. This is useful for 9751// getting updates only after the object has changed since the last 9752// request. Use googleapi.IsNotModified to check whether the response 9753// error from Do is the result of In-None-Match. 9754func (c *ProjectsGetAgentCall) IfNoneMatch(entityTag string) *ProjectsGetAgentCall { 9755 c.ifNoneMatch_ = entityTag 9756 return c 9757} 9758 9759// Context sets the context to be used in this call's Do method. Any 9760// pending HTTP request will be aborted if the provided context is 9761// canceled. 9762func (c *ProjectsGetAgentCall) Context(ctx context.Context) *ProjectsGetAgentCall { 9763 c.ctx_ = ctx 9764 return c 9765} 9766 9767// Header returns an http.Header that can be modified by the caller to 9768// add HTTP headers to the request. 9769func (c *ProjectsGetAgentCall) Header() http.Header { 9770 if c.header_ == nil { 9771 c.header_ = make(http.Header) 9772 } 9773 return c.header_ 9774} 9775 9776func (c *ProjectsGetAgentCall) doRequest(alt string) (*http.Response, error) { 9777 reqHeaders := make(http.Header) 9778 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 9779 for k, v := range c.header_ { 9780 reqHeaders[k] = v 9781 } 9782 reqHeaders.Set("User-Agent", c.s.userAgent()) 9783 if c.ifNoneMatch_ != "" { 9784 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9785 } 9786 var body io.Reader = nil 9787 c.urlParams_.Set("alt", alt) 9788 c.urlParams_.Set("prettyPrint", "false") 9789 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent") 9790 urls += "?" + c.urlParams_.Encode() 9791 req, err := http.NewRequest("GET", urls, body) 9792 if err != nil { 9793 return nil, err 9794 } 9795 req.Header = reqHeaders 9796 googleapi.Expand(req.URL, map[string]string{ 9797 "parent": c.parent, 9798 }) 9799 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9800} 9801 9802// Do executes the "dialogflow.projects.getAgent" call. 9803// Exactly one of *GoogleCloudDialogflowV2Agent or error will be 9804// non-nil. Any non-2xx status code is an error. Response headers are in 9805// either *GoogleCloudDialogflowV2Agent.ServerResponse.Header or (if a 9806// response was returned at all) in error.(*googleapi.Error).Header. Use 9807// googleapi.IsNotModified to check whether the returned error was 9808// because http.StatusNotModified was returned. 9809func (c *ProjectsGetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Agent, error) { 9810 gensupport.SetOptions(c.urlParams_, opts...) 9811 res, err := c.doRequest("json") 9812 if res != nil && res.StatusCode == http.StatusNotModified { 9813 if res.Body != nil { 9814 res.Body.Close() 9815 } 9816 return nil, &googleapi.Error{ 9817 Code: res.StatusCode, 9818 Header: res.Header, 9819 } 9820 } 9821 if err != nil { 9822 return nil, err 9823 } 9824 defer googleapi.CloseBody(res) 9825 if err := googleapi.CheckResponse(res); err != nil { 9826 return nil, err 9827 } 9828 ret := &GoogleCloudDialogflowV2Agent{ 9829 ServerResponse: googleapi.ServerResponse{ 9830 Header: res.Header, 9831 HTTPStatusCode: res.StatusCode, 9832 }, 9833 } 9834 target := &ret 9835 if err := gensupport.DecodeResponse(target, res); err != nil { 9836 return nil, err 9837 } 9838 return ret, nil 9839 // { 9840 // "description": "Retrieves the specified agent.", 9841 // "flatPath": "v2/projects/{projectsId}/agent", 9842 // "httpMethod": "GET", 9843 // "id": "dialogflow.projects.getAgent", 9844 // "parameterOrder": [ 9845 // "parent" 9846 // ], 9847 // "parameters": { 9848 // "parent": { 9849 // "description": "Required. The project that the agent to fetch is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 9850 // "location": "path", 9851 // "pattern": "^projects/[^/]+$", 9852 // "required": true, 9853 // "type": "string" 9854 // } 9855 // }, 9856 // "path": "v2/{+parent}/agent", 9857 // "response": { 9858 // "$ref": "GoogleCloudDialogflowV2Agent" 9859 // }, 9860 // "scopes": [ 9861 // "https://www.googleapis.com/auth/cloud-platform", 9862 // "https://www.googleapis.com/auth/dialogflow" 9863 // ] 9864 // } 9865 9866} 9867 9868// method id "dialogflow.projects.setAgent": 9869 9870type ProjectsSetAgentCall struct { 9871 s *Service 9872 parent string 9873 googleclouddialogflowv2agent *GoogleCloudDialogflowV2Agent 9874 urlParams_ gensupport.URLParams 9875 ctx_ context.Context 9876 header_ http.Header 9877} 9878 9879// SetAgent: Creates/updates the specified agent. 9880func (r *ProjectsService) SetAgent(parent string, googleclouddialogflowv2agent *GoogleCloudDialogflowV2Agent) *ProjectsSetAgentCall { 9881 c := &ProjectsSetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9882 c.parent = parent 9883 c.googleclouddialogflowv2agent = googleclouddialogflowv2agent 9884 return c 9885} 9886 9887// UpdateMask sets the optional parameter "updateMask": The mask to 9888// control which fields get updated. 9889func (c *ProjectsSetAgentCall) UpdateMask(updateMask string) *ProjectsSetAgentCall { 9890 c.urlParams_.Set("updateMask", updateMask) 9891 return c 9892} 9893 9894// Fields allows partial responses to be retrieved. See 9895// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9896// for more information. 9897func (c *ProjectsSetAgentCall) Fields(s ...googleapi.Field) *ProjectsSetAgentCall { 9898 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9899 return c 9900} 9901 9902// Context sets the context to be used in this call's Do method. Any 9903// pending HTTP request will be aborted if the provided context is 9904// canceled. 9905func (c *ProjectsSetAgentCall) Context(ctx context.Context) *ProjectsSetAgentCall { 9906 c.ctx_ = ctx 9907 return c 9908} 9909 9910// Header returns an http.Header that can be modified by the caller to 9911// add HTTP headers to the request. 9912func (c *ProjectsSetAgentCall) Header() http.Header { 9913 if c.header_ == nil { 9914 c.header_ = make(http.Header) 9915 } 9916 return c.header_ 9917} 9918 9919func (c *ProjectsSetAgentCall) doRequest(alt string) (*http.Response, error) { 9920 reqHeaders := make(http.Header) 9921 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 9922 for k, v := range c.header_ { 9923 reqHeaders[k] = v 9924 } 9925 reqHeaders.Set("User-Agent", c.s.userAgent()) 9926 var body io.Reader = nil 9927 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2agent) 9928 if err != nil { 9929 return nil, err 9930 } 9931 reqHeaders.Set("Content-Type", "application/json") 9932 c.urlParams_.Set("alt", alt) 9933 c.urlParams_.Set("prettyPrint", "false") 9934 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent") 9935 urls += "?" + c.urlParams_.Encode() 9936 req, err := http.NewRequest("POST", urls, body) 9937 if err != nil { 9938 return nil, err 9939 } 9940 req.Header = reqHeaders 9941 googleapi.Expand(req.URL, map[string]string{ 9942 "parent": c.parent, 9943 }) 9944 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9945} 9946 9947// Do executes the "dialogflow.projects.setAgent" call. 9948// Exactly one of *GoogleCloudDialogflowV2Agent or error will be 9949// non-nil. Any non-2xx status code is an error. Response headers are in 9950// either *GoogleCloudDialogflowV2Agent.ServerResponse.Header or (if a 9951// response was returned at all) in error.(*googleapi.Error).Header. Use 9952// googleapi.IsNotModified to check whether the returned error was 9953// because http.StatusNotModified was returned. 9954func (c *ProjectsSetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Agent, error) { 9955 gensupport.SetOptions(c.urlParams_, opts...) 9956 res, err := c.doRequest("json") 9957 if res != nil && res.StatusCode == http.StatusNotModified { 9958 if res.Body != nil { 9959 res.Body.Close() 9960 } 9961 return nil, &googleapi.Error{ 9962 Code: res.StatusCode, 9963 Header: res.Header, 9964 } 9965 } 9966 if err != nil { 9967 return nil, err 9968 } 9969 defer googleapi.CloseBody(res) 9970 if err := googleapi.CheckResponse(res); err != nil { 9971 return nil, err 9972 } 9973 ret := &GoogleCloudDialogflowV2Agent{ 9974 ServerResponse: googleapi.ServerResponse{ 9975 Header: res.Header, 9976 HTTPStatusCode: res.StatusCode, 9977 }, 9978 } 9979 target := &ret 9980 if err := gensupport.DecodeResponse(target, res); err != nil { 9981 return nil, err 9982 } 9983 return ret, nil 9984 // { 9985 // "description": "Creates/updates the specified agent.", 9986 // "flatPath": "v2/projects/{projectsId}/agent", 9987 // "httpMethod": "POST", 9988 // "id": "dialogflow.projects.setAgent", 9989 // "parameterOrder": [ 9990 // "parent" 9991 // ], 9992 // "parameters": { 9993 // "parent": { 9994 // "description": "Required. The project of this agent.\nFormat: `projects/\u003cProject ID\u003e`.", 9995 // "location": "path", 9996 // "pattern": "^projects/[^/]+$", 9997 // "required": true, 9998 // "type": "string" 9999 // }, 10000 // "updateMask": { 10001 // "description": "Optional. The mask to control which fields get updated.", 10002 // "format": "google-fieldmask", 10003 // "location": "query", 10004 // "type": "string" 10005 // } 10006 // }, 10007 // "path": "v2/{+parent}/agent", 10008 // "request": { 10009 // "$ref": "GoogleCloudDialogflowV2Agent" 10010 // }, 10011 // "response": { 10012 // "$ref": "GoogleCloudDialogflowV2Agent" 10013 // }, 10014 // "scopes": [ 10015 // "https://www.googleapis.com/auth/cloud-platform", 10016 // "https://www.googleapis.com/auth/dialogflow" 10017 // ] 10018 // } 10019 10020} 10021 10022// method id "dialogflow.projects.agent.export": 10023 10024type ProjectsAgentExportCall struct { 10025 s *Service 10026 parent string 10027 googleclouddialogflowv2exportagentrequest *GoogleCloudDialogflowV2ExportAgentRequest 10028 urlParams_ gensupport.URLParams 10029 ctx_ context.Context 10030 header_ http.Header 10031} 10032 10033// Export: Exports the specified agent to a ZIP file. 10034// 10035// Operation <response: ExportAgentResponse> 10036func (r *ProjectsAgentService) Export(parent string, googleclouddialogflowv2exportagentrequest *GoogleCloudDialogflowV2ExportAgentRequest) *ProjectsAgentExportCall { 10037 c := &ProjectsAgentExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10038 c.parent = parent 10039 c.googleclouddialogflowv2exportagentrequest = googleclouddialogflowv2exportagentrequest 10040 return c 10041} 10042 10043// Fields allows partial responses to be retrieved. See 10044// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10045// for more information. 10046func (c *ProjectsAgentExportCall) Fields(s ...googleapi.Field) *ProjectsAgentExportCall { 10047 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10048 return c 10049} 10050 10051// Context sets the context to be used in this call's Do method. Any 10052// pending HTTP request will be aborted if the provided context is 10053// canceled. 10054func (c *ProjectsAgentExportCall) Context(ctx context.Context) *ProjectsAgentExportCall { 10055 c.ctx_ = ctx 10056 return c 10057} 10058 10059// Header returns an http.Header that can be modified by the caller to 10060// add HTTP headers to the request. 10061func (c *ProjectsAgentExportCall) Header() http.Header { 10062 if c.header_ == nil { 10063 c.header_ = make(http.Header) 10064 } 10065 return c.header_ 10066} 10067 10068func (c *ProjectsAgentExportCall) doRequest(alt string) (*http.Response, error) { 10069 reqHeaders := make(http.Header) 10070 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 10071 for k, v := range c.header_ { 10072 reqHeaders[k] = v 10073 } 10074 reqHeaders.Set("User-Agent", c.s.userAgent()) 10075 var body io.Reader = nil 10076 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2exportagentrequest) 10077 if err != nil { 10078 return nil, err 10079 } 10080 reqHeaders.Set("Content-Type", "application/json") 10081 c.urlParams_.Set("alt", alt) 10082 c.urlParams_.Set("prettyPrint", "false") 10083 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:export") 10084 urls += "?" + c.urlParams_.Encode() 10085 req, err := http.NewRequest("POST", urls, body) 10086 if err != nil { 10087 return nil, err 10088 } 10089 req.Header = reqHeaders 10090 googleapi.Expand(req.URL, map[string]string{ 10091 "parent": c.parent, 10092 }) 10093 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10094} 10095 10096// Do executes the "dialogflow.projects.agent.export" call. 10097// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 10098// Any non-2xx status code is an error. Response headers are in either 10099// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 10100// was returned at all) in error.(*googleapi.Error).Header. Use 10101// googleapi.IsNotModified to check whether the returned error was 10102// because http.StatusNotModified was returned. 10103func (c *ProjectsAgentExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 10104 gensupport.SetOptions(c.urlParams_, opts...) 10105 res, err := c.doRequest("json") 10106 if res != nil && res.StatusCode == http.StatusNotModified { 10107 if res.Body != nil { 10108 res.Body.Close() 10109 } 10110 return nil, &googleapi.Error{ 10111 Code: res.StatusCode, 10112 Header: res.Header, 10113 } 10114 } 10115 if err != nil { 10116 return nil, err 10117 } 10118 defer googleapi.CloseBody(res) 10119 if err := googleapi.CheckResponse(res); err != nil { 10120 return nil, err 10121 } 10122 ret := &GoogleLongrunningOperation{ 10123 ServerResponse: googleapi.ServerResponse{ 10124 Header: res.Header, 10125 HTTPStatusCode: res.StatusCode, 10126 }, 10127 } 10128 target := &ret 10129 if err := gensupport.DecodeResponse(target, res); err != nil { 10130 return nil, err 10131 } 10132 return ret, nil 10133 // { 10134 // "description": "Exports the specified agent to a ZIP file.\n\nOperation \u003cresponse: ExportAgentResponse\u003e", 10135 // "flatPath": "v2/projects/{projectsId}/agent:export", 10136 // "httpMethod": "POST", 10137 // "id": "dialogflow.projects.agent.export", 10138 // "parameterOrder": [ 10139 // "parent" 10140 // ], 10141 // "parameters": { 10142 // "parent": { 10143 // "description": "Required. The project that the agent to export is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 10144 // "location": "path", 10145 // "pattern": "^projects/[^/]+$", 10146 // "required": true, 10147 // "type": "string" 10148 // } 10149 // }, 10150 // "path": "v2/{+parent}/agent:export", 10151 // "request": { 10152 // "$ref": "GoogleCloudDialogflowV2ExportAgentRequest" 10153 // }, 10154 // "response": { 10155 // "$ref": "GoogleLongrunningOperation" 10156 // }, 10157 // "scopes": [ 10158 // "https://www.googleapis.com/auth/cloud-platform", 10159 // "https://www.googleapis.com/auth/dialogflow" 10160 // ] 10161 // } 10162 10163} 10164 10165// method id "dialogflow.projects.agent.getFulfillment": 10166 10167type ProjectsAgentGetFulfillmentCall struct { 10168 s *Service 10169 name string 10170 urlParams_ gensupport.URLParams 10171 ifNoneMatch_ string 10172 ctx_ context.Context 10173 header_ http.Header 10174} 10175 10176// GetFulfillment: Retrieves the fulfillment. 10177func (r *ProjectsAgentService) GetFulfillment(name string) *ProjectsAgentGetFulfillmentCall { 10178 c := &ProjectsAgentGetFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10179 c.name = name 10180 return c 10181} 10182 10183// Fields allows partial responses to be retrieved. See 10184// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10185// for more information. 10186func (c *ProjectsAgentGetFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsAgentGetFulfillmentCall { 10187 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10188 return c 10189} 10190 10191// IfNoneMatch sets the optional parameter which makes the operation 10192// fail if the object's ETag matches the given value. This is useful for 10193// getting updates only after the object has changed since the last 10194// request. Use googleapi.IsNotModified to check whether the response 10195// error from Do is the result of In-None-Match. 10196func (c *ProjectsAgentGetFulfillmentCall) IfNoneMatch(entityTag string) *ProjectsAgentGetFulfillmentCall { 10197 c.ifNoneMatch_ = entityTag 10198 return c 10199} 10200 10201// Context sets the context to be used in this call's Do method. Any 10202// pending HTTP request will be aborted if the provided context is 10203// canceled. 10204func (c *ProjectsAgentGetFulfillmentCall) Context(ctx context.Context) *ProjectsAgentGetFulfillmentCall { 10205 c.ctx_ = ctx 10206 return c 10207} 10208 10209// Header returns an http.Header that can be modified by the caller to 10210// add HTTP headers to the request. 10211func (c *ProjectsAgentGetFulfillmentCall) Header() http.Header { 10212 if c.header_ == nil { 10213 c.header_ = make(http.Header) 10214 } 10215 return c.header_ 10216} 10217 10218func (c *ProjectsAgentGetFulfillmentCall) doRequest(alt string) (*http.Response, error) { 10219 reqHeaders := make(http.Header) 10220 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 10221 for k, v := range c.header_ { 10222 reqHeaders[k] = v 10223 } 10224 reqHeaders.Set("User-Agent", c.s.userAgent()) 10225 if c.ifNoneMatch_ != "" { 10226 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10227 } 10228 var body io.Reader = nil 10229 c.urlParams_.Set("alt", alt) 10230 c.urlParams_.Set("prettyPrint", "false") 10231 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10232 urls += "?" + c.urlParams_.Encode() 10233 req, err := http.NewRequest("GET", urls, body) 10234 if err != nil { 10235 return nil, err 10236 } 10237 req.Header = reqHeaders 10238 googleapi.Expand(req.URL, map[string]string{ 10239 "name": c.name, 10240 }) 10241 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10242} 10243 10244// Do executes the "dialogflow.projects.agent.getFulfillment" call. 10245// Exactly one of *GoogleCloudDialogflowV2Fulfillment or error will be 10246// non-nil. Any non-2xx status code is an error. Response headers are in 10247// either *GoogleCloudDialogflowV2Fulfillment.ServerResponse.Header or 10248// (if a response was returned at all) in 10249// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10250// whether the returned error was because http.StatusNotModified was 10251// returned. 10252func (c *ProjectsAgentGetFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Fulfillment, error) { 10253 gensupport.SetOptions(c.urlParams_, opts...) 10254 res, err := c.doRequest("json") 10255 if res != nil && res.StatusCode == http.StatusNotModified { 10256 if res.Body != nil { 10257 res.Body.Close() 10258 } 10259 return nil, &googleapi.Error{ 10260 Code: res.StatusCode, 10261 Header: res.Header, 10262 } 10263 } 10264 if err != nil { 10265 return nil, err 10266 } 10267 defer googleapi.CloseBody(res) 10268 if err := googleapi.CheckResponse(res); err != nil { 10269 return nil, err 10270 } 10271 ret := &GoogleCloudDialogflowV2Fulfillment{ 10272 ServerResponse: googleapi.ServerResponse{ 10273 Header: res.Header, 10274 HTTPStatusCode: res.StatusCode, 10275 }, 10276 } 10277 target := &ret 10278 if err := gensupport.DecodeResponse(target, res); err != nil { 10279 return nil, err 10280 } 10281 return ret, nil 10282 // { 10283 // "description": "Retrieves the fulfillment.", 10284 // "flatPath": "v2/projects/{projectsId}/agent/fulfillment", 10285 // "httpMethod": "GET", 10286 // "id": "dialogflow.projects.agent.getFulfillment", 10287 // "parameterOrder": [ 10288 // "name" 10289 // ], 10290 // "parameters": { 10291 // "name": { 10292 // "description": "Required. The name of the fulfillment.\nFormat: `projects/\u003cProject ID\u003e/agent/fulfillment`.", 10293 // "location": "path", 10294 // "pattern": "^projects/[^/]+/agent/fulfillment$", 10295 // "required": true, 10296 // "type": "string" 10297 // } 10298 // }, 10299 // "path": "v2/{+name}", 10300 // "response": { 10301 // "$ref": "GoogleCloudDialogflowV2Fulfillment" 10302 // }, 10303 // "scopes": [ 10304 // "https://www.googleapis.com/auth/cloud-platform", 10305 // "https://www.googleapis.com/auth/dialogflow" 10306 // ] 10307 // } 10308 10309} 10310 10311// method id "dialogflow.projects.agent.getValidationResult": 10312 10313type ProjectsAgentGetValidationResultCall struct { 10314 s *Service 10315 parent string 10316 urlParams_ gensupport.URLParams 10317 ifNoneMatch_ string 10318 ctx_ context.Context 10319 header_ http.Header 10320} 10321 10322// GetValidationResult: Gets agent validation result. Agent validation 10323// is performed during 10324// training time and is updated automatically when training is 10325// completed. 10326func (r *ProjectsAgentService) GetValidationResult(parent string) *ProjectsAgentGetValidationResultCall { 10327 c := &ProjectsAgentGetValidationResultCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10328 c.parent = parent 10329 return c 10330} 10331 10332// LanguageCode sets the optional parameter "languageCode": The language 10333// for which you want a validation result. If not 10334// specified, the agent's default language is used. 10335// [Many 10336// languages](https://cloud.google.com/dialogflow/docs/reference/la 10337// nguage) 10338// are supported. Note: languages must be enabled in the agent before 10339// they can 10340// be used. 10341func (c *ProjectsAgentGetValidationResultCall) LanguageCode(languageCode string) *ProjectsAgentGetValidationResultCall { 10342 c.urlParams_.Set("languageCode", languageCode) 10343 return c 10344} 10345 10346// Fields allows partial responses to be retrieved. See 10347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10348// for more information. 10349func (c *ProjectsAgentGetValidationResultCall) Fields(s ...googleapi.Field) *ProjectsAgentGetValidationResultCall { 10350 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10351 return c 10352} 10353 10354// IfNoneMatch sets the optional parameter which makes the operation 10355// fail if the object's ETag matches the given value. This is useful for 10356// getting updates only after the object has changed since the last 10357// request. Use googleapi.IsNotModified to check whether the response 10358// error from Do is the result of In-None-Match. 10359func (c *ProjectsAgentGetValidationResultCall) IfNoneMatch(entityTag string) *ProjectsAgentGetValidationResultCall { 10360 c.ifNoneMatch_ = entityTag 10361 return c 10362} 10363 10364// Context sets the context to be used in this call's Do method. Any 10365// pending HTTP request will be aborted if the provided context is 10366// canceled. 10367func (c *ProjectsAgentGetValidationResultCall) Context(ctx context.Context) *ProjectsAgentGetValidationResultCall { 10368 c.ctx_ = ctx 10369 return c 10370} 10371 10372// Header returns an http.Header that can be modified by the caller to 10373// add HTTP headers to the request. 10374func (c *ProjectsAgentGetValidationResultCall) Header() http.Header { 10375 if c.header_ == nil { 10376 c.header_ = make(http.Header) 10377 } 10378 return c.header_ 10379} 10380 10381func (c *ProjectsAgentGetValidationResultCall) doRequest(alt string) (*http.Response, error) { 10382 reqHeaders := make(http.Header) 10383 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 10384 for k, v := range c.header_ { 10385 reqHeaders[k] = v 10386 } 10387 reqHeaders.Set("User-Agent", c.s.userAgent()) 10388 if c.ifNoneMatch_ != "" { 10389 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10390 } 10391 var body io.Reader = nil 10392 c.urlParams_.Set("alt", alt) 10393 c.urlParams_.Set("prettyPrint", "false") 10394 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent/validationResult") 10395 urls += "?" + c.urlParams_.Encode() 10396 req, err := http.NewRequest("GET", urls, body) 10397 if err != nil { 10398 return nil, err 10399 } 10400 req.Header = reqHeaders 10401 googleapi.Expand(req.URL, map[string]string{ 10402 "parent": c.parent, 10403 }) 10404 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10405} 10406 10407// Do executes the "dialogflow.projects.agent.getValidationResult" call. 10408// Exactly one of *GoogleCloudDialogflowV2ValidationResult or error will 10409// be non-nil. Any non-2xx status code is an error. Response headers are 10410// in either 10411// *GoogleCloudDialogflowV2ValidationResult.ServerResponse.Header or (if 10412// a response was returned at all) in error.(*googleapi.Error).Header. 10413// Use googleapi.IsNotModified to check whether the returned error was 10414// because http.StatusNotModified was returned. 10415func (c *ProjectsAgentGetValidationResultCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ValidationResult, error) { 10416 gensupport.SetOptions(c.urlParams_, opts...) 10417 res, err := c.doRequest("json") 10418 if res != nil && res.StatusCode == http.StatusNotModified { 10419 if res.Body != nil { 10420 res.Body.Close() 10421 } 10422 return nil, &googleapi.Error{ 10423 Code: res.StatusCode, 10424 Header: res.Header, 10425 } 10426 } 10427 if err != nil { 10428 return nil, err 10429 } 10430 defer googleapi.CloseBody(res) 10431 if err := googleapi.CheckResponse(res); err != nil { 10432 return nil, err 10433 } 10434 ret := &GoogleCloudDialogflowV2ValidationResult{ 10435 ServerResponse: googleapi.ServerResponse{ 10436 Header: res.Header, 10437 HTTPStatusCode: res.StatusCode, 10438 }, 10439 } 10440 target := &ret 10441 if err := gensupport.DecodeResponse(target, res); err != nil { 10442 return nil, err 10443 } 10444 return ret, nil 10445 // { 10446 // "description": "Gets agent validation result. Agent validation is performed during\ntraining time and is updated automatically when training is completed.", 10447 // "flatPath": "v2/projects/{projectsId}/agent/validationResult", 10448 // "httpMethod": "GET", 10449 // "id": "dialogflow.projects.agent.getValidationResult", 10450 // "parameterOrder": [ 10451 // "parent" 10452 // ], 10453 // "parameters": { 10454 // "languageCode": { 10455 // "description": "Optional. The language for which you want a validation result. If not\nspecified, the agent's default language is used. [Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.", 10456 // "location": "query", 10457 // "type": "string" 10458 // }, 10459 // "parent": { 10460 // "description": "Required. The project that the agent is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 10461 // "location": "path", 10462 // "pattern": "^projects/[^/]+$", 10463 // "required": true, 10464 // "type": "string" 10465 // } 10466 // }, 10467 // "path": "v2/{+parent}/agent/validationResult", 10468 // "response": { 10469 // "$ref": "GoogleCloudDialogflowV2ValidationResult" 10470 // }, 10471 // "scopes": [ 10472 // "https://www.googleapis.com/auth/cloud-platform", 10473 // "https://www.googleapis.com/auth/dialogflow" 10474 // ] 10475 // } 10476 10477} 10478 10479// method id "dialogflow.projects.agent.import": 10480 10481type ProjectsAgentImportCall struct { 10482 s *Service 10483 parent string 10484 googleclouddialogflowv2importagentrequest *GoogleCloudDialogflowV2ImportAgentRequest 10485 urlParams_ gensupport.URLParams 10486 ctx_ context.Context 10487 header_ http.Header 10488} 10489 10490// Import: Imports the specified agent from a ZIP file. 10491// 10492// Uploads new intents and entity types without deleting the existing 10493// ones. 10494// Intents and entity types with the same name are replaced with the 10495// new 10496// versions from ImportAgentRequest. After the import, the imported 10497// draft 10498// agent will be trained automatically (unless disabled in agent 10499// settings). 10500// However, once the import is done, training may not be completed yet. 10501// Please 10502// call TrainAgent and wait for the operation it returns in order to 10503// train 10504// explicitly. 10505// 10506// Operation <response: google.protobuf.Empty> 10507// An operation which tracks when importing is complete. It only 10508// tracks 10509// when the draft agent is updated not when it is done training. 10510func (r *ProjectsAgentService) Import(parent string, googleclouddialogflowv2importagentrequest *GoogleCloudDialogflowV2ImportAgentRequest) *ProjectsAgentImportCall { 10511 c := &ProjectsAgentImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10512 c.parent = parent 10513 c.googleclouddialogflowv2importagentrequest = googleclouddialogflowv2importagentrequest 10514 return c 10515} 10516 10517// Fields allows partial responses to be retrieved. See 10518// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10519// for more information. 10520func (c *ProjectsAgentImportCall) Fields(s ...googleapi.Field) *ProjectsAgentImportCall { 10521 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10522 return c 10523} 10524 10525// Context sets the context to be used in this call's Do method. Any 10526// pending HTTP request will be aborted if the provided context is 10527// canceled. 10528func (c *ProjectsAgentImportCall) Context(ctx context.Context) *ProjectsAgentImportCall { 10529 c.ctx_ = ctx 10530 return c 10531} 10532 10533// Header returns an http.Header that can be modified by the caller to 10534// add HTTP headers to the request. 10535func (c *ProjectsAgentImportCall) Header() http.Header { 10536 if c.header_ == nil { 10537 c.header_ = make(http.Header) 10538 } 10539 return c.header_ 10540} 10541 10542func (c *ProjectsAgentImportCall) doRequest(alt string) (*http.Response, error) { 10543 reqHeaders := make(http.Header) 10544 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 10545 for k, v := range c.header_ { 10546 reqHeaders[k] = v 10547 } 10548 reqHeaders.Set("User-Agent", c.s.userAgent()) 10549 var body io.Reader = nil 10550 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2importagentrequest) 10551 if err != nil { 10552 return nil, err 10553 } 10554 reqHeaders.Set("Content-Type", "application/json") 10555 c.urlParams_.Set("alt", alt) 10556 c.urlParams_.Set("prettyPrint", "false") 10557 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:import") 10558 urls += "?" + c.urlParams_.Encode() 10559 req, err := http.NewRequest("POST", urls, body) 10560 if err != nil { 10561 return nil, err 10562 } 10563 req.Header = reqHeaders 10564 googleapi.Expand(req.URL, map[string]string{ 10565 "parent": c.parent, 10566 }) 10567 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10568} 10569 10570// Do executes the "dialogflow.projects.agent.import" call. 10571// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 10572// Any non-2xx status code is an error. Response headers are in either 10573// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 10574// was returned at all) in error.(*googleapi.Error).Header. Use 10575// googleapi.IsNotModified to check whether the returned error was 10576// because http.StatusNotModified was returned. 10577func (c *ProjectsAgentImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 10578 gensupport.SetOptions(c.urlParams_, opts...) 10579 res, err := c.doRequest("json") 10580 if res != nil && res.StatusCode == http.StatusNotModified { 10581 if res.Body != nil { 10582 res.Body.Close() 10583 } 10584 return nil, &googleapi.Error{ 10585 Code: res.StatusCode, 10586 Header: res.Header, 10587 } 10588 } 10589 if err != nil { 10590 return nil, err 10591 } 10592 defer googleapi.CloseBody(res) 10593 if err := googleapi.CheckResponse(res); err != nil { 10594 return nil, err 10595 } 10596 ret := &GoogleLongrunningOperation{ 10597 ServerResponse: googleapi.ServerResponse{ 10598 Header: res.Header, 10599 HTTPStatusCode: res.StatusCode, 10600 }, 10601 } 10602 target := &ret 10603 if err := gensupport.DecodeResponse(target, res); err != nil { 10604 return nil, err 10605 } 10606 return ret, nil 10607 // { 10608 // "description": "Imports the specified agent from a ZIP file.\n\nUploads new intents and entity types without deleting the existing ones.\nIntents and entity types with the same name are replaced with the new\nversions from ImportAgentRequest. After the import, the imported draft\nagent will be trained automatically (unless disabled in agent settings).\nHowever, once the import is done, training may not be completed yet. Please\ncall TrainAgent and wait for the operation it returns in order to train\nexplicitly.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e\nAn operation which tracks when importing is complete. It only tracks\nwhen the draft agent is updated not when it is done training.", 10609 // "flatPath": "v2/projects/{projectsId}/agent:import", 10610 // "httpMethod": "POST", 10611 // "id": "dialogflow.projects.agent.import", 10612 // "parameterOrder": [ 10613 // "parent" 10614 // ], 10615 // "parameters": { 10616 // "parent": { 10617 // "description": "Required. The project that the agent to import is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 10618 // "location": "path", 10619 // "pattern": "^projects/[^/]+$", 10620 // "required": true, 10621 // "type": "string" 10622 // } 10623 // }, 10624 // "path": "v2/{+parent}/agent:import", 10625 // "request": { 10626 // "$ref": "GoogleCloudDialogflowV2ImportAgentRequest" 10627 // }, 10628 // "response": { 10629 // "$ref": "GoogleLongrunningOperation" 10630 // }, 10631 // "scopes": [ 10632 // "https://www.googleapis.com/auth/cloud-platform", 10633 // "https://www.googleapis.com/auth/dialogflow" 10634 // ] 10635 // } 10636 10637} 10638 10639// method id "dialogflow.projects.agent.restore": 10640 10641type ProjectsAgentRestoreCall struct { 10642 s *Service 10643 parent string 10644 googleclouddialogflowv2restoreagentrequest *GoogleCloudDialogflowV2RestoreAgentRequest 10645 urlParams_ gensupport.URLParams 10646 ctx_ context.Context 10647 header_ http.Header 10648} 10649 10650// Restore: Restores the specified agent from a ZIP file. 10651// 10652// Replaces the current agent version with a new one. All the intents 10653// and 10654// entity types in the older version are deleted. After the restore, 10655// the 10656// restored draft agent will be trained automatically (unless disabled 10657// in 10658// agent settings). However, once the restore is done, training may not 10659// be 10660// completed yet. Please call TrainAgent and wait for the operation 10661// it 10662// returns in order to train explicitly. 10663// 10664// Operation <response: google.protobuf.Empty> 10665// An operation which tracks when restoring is complete. It only 10666// tracks 10667// when the draft agent is updated not when it is done training. 10668func (r *ProjectsAgentService) Restore(parent string, googleclouddialogflowv2restoreagentrequest *GoogleCloudDialogflowV2RestoreAgentRequest) *ProjectsAgentRestoreCall { 10669 c := &ProjectsAgentRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10670 c.parent = parent 10671 c.googleclouddialogflowv2restoreagentrequest = googleclouddialogflowv2restoreagentrequest 10672 return c 10673} 10674 10675// Fields allows partial responses to be retrieved. See 10676// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10677// for more information. 10678func (c *ProjectsAgentRestoreCall) Fields(s ...googleapi.Field) *ProjectsAgentRestoreCall { 10679 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10680 return c 10681} 10682 10683// Context sets the context to be used in this call's Do method. Any 10684// pending HTTP request will be aborted if the provided context is 10685// canceled. 10686func (c *ProjectsAgentRestoreCall) Context(ctx context.Context) *ProjectsAgentRestoreCall { 10687 c.ctx_ = ctx 10688 return c 10689} 10690 10691// Header returns an http.Header that can be modified by the caller to 10692// add HTTP headers to the request. 10693func (c *ProjectsAgentRestoreCall) Header() http.Header { 10694 if c.header_ == nil { 10695 c.header_ = make(http.Header) 10696 } 10697 return c.header_ 10698} 10699 10700func (c *ProjectsAgentRestoreCall) doRequest(alt string) (*http.Response, error) { 10701 reqHeaders := make(http.Header) 10702 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 10703 for k, v := range c.header_ { 10704 reqHeaders[k] = v 10705 } 10706 reqHeaders.Set("User-Agent", c.s.userAgent()) 10707 var body io.Reader = nil 10708 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2restoreagentrequest) 10709 if err != nil { 10710 return nil, err 10711 } 10712 reqHeaders.Set("Content-Type", "application/json") 10713 c.urlParams_.Set("alt", alt) 10714 c.urlParams_.Set("prettyPrint", "false") 10715 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:restore") 10716 urls += "?" + c.urlParams_.Encode() 10717 req, err := http.NewRequest("POST", urls, body) 10718 if err != nil { 10719 return nil, err 10720 } 10721 req.Header = reqHeaders 10722 googleapi.Expand(req.URL, map[string]string{ 10723 "parent": c.parent, 10724 }) 10725 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10726} 10727 10728// Do executes the "dialogflow.projects.agent.restore" call. 10729// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 10730// Any non-2xx status code is an error. Response headers are in either 10731// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 10732// was returned at all) in error.(*googleapi.Error).Header. Use 10733// googleapi.IsNotModified to check whether the returned error was 10734// because http.StatusNotModified was returned. 10735func (c *ProjectsAgentRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 10736 gensupport.SetOptions(c.urlParams_, opts...) 10737 res, err := c.doRequest("json") 10738 if res != nil && res.StatusCode == http.StatusNotModified { 10739 if res.Body != nil { 10740 res.Body.Close() 10741 } 10742 return nil, &googleapi.Error{ 10743 Code: res.StatusCode, 10744 Header: res.Header, 10745 } 10746 } 10747 if err != nil { 10748 return nil, err 10749 } 10750 defer googleapi.CloseBody(res) 10751 if err := googleapi.CheckResponse(res); err != nil { 10752 return nil, err 10753 } 10754 ret := &GoogleLongrunningOperation{ 10755 ServerResponse: googleapi.ServerResponse{ 10756 Header: res.Header, 10757 HTTPStatusCode: res.StatusCode, 10758 }, 10759 } 10760 target := &ret 10761 if err := gensupport.DecodeResponse(target, res); err != nil { 10762 return nil, err 10763 } 10764 return ret, nil 10765 // { 10766 // "description": "Restores the specified agent from a ZIP file.\n\nReplaces the current agent version with a new one. All the intents and\nentity types in the older version are deleted. After the restore, the\nrestored draft agent will be trained automatically (unless disabled in\nagent settings). However, once the restore is done, training may not be\ncompleted yet. Please call TrainAgent and wait for the operation it\nreturns in order to train explicitly.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e\nAn operation which tracks when restoring is complete. It only tracks\nwhen the draft agent is updated not when it is done training.", 10767 // "flatPath": "v2/projects/{projectsId}/agent:restore", 10768 // "httpMethod": "POST", 10769 // "id": "dialogflow.projects.agent.restore", 10770 // "parameterOrder": [ 10771 // "parent" 10772 // ], 10773 // "parameters": { 10774 // "parent": { 10775 // "description": "Required. The project that the agent to restore is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 10776 // "location": "path", 10777 // "pattern": "^projects/[^/]+$", 10778 // "required": true, 10779 // "type": "string" 10780 // } 10781 // }, 10782 // "path": "v2/{+parent}/agent:restore", 10783 // "request": { 10784 // "$ref": "GoogleCloudDialogflowV2RestoreAgentRequest" 10785 // }, 10786 // "response": { 10787 // "$ref": "GoogleLongrunningOperation" 10788 // }, 10789 // "scopes": [ 10790 // "https://www.googleapis.com/auth/cloud-platform", 10791 // "https://www.googleapis.com/auth/dialogflow" 10792 // ] 10793 // } 10794 10795} 10796 10797// method id "dialogflow.projects.agent.search": 10798 10799type ProjectsAgentSearchCall struct { 10800 s *Service 10801 parent string 10802 urlParams_ gensupport.URLParams 10803 ifNoneMatch_ string 10804 ctx_ context.Context 10805 header_ http.Header 10806} 10807 10808// Search: Returns the list of agents. 10809// 10810// Since there is at most one conversational agent per project, this 10811// method is 10812// useful primarily for listing all agents across projects the caller 10813// has 10814// access to. One can achieve that with a wildcard project collection id 10815// "-". 10816// Refer to 10817// [List 10818// Sub-Collections](https://cloud.google.com/apis/design/design_pat 10819// terns#list_sub-collections). 10820func (r *ProjectsAgentService) Search(parent string) *ProjectsAgentSearchCall { 10821 c := &ProjectsAgentSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10822 c.parent = parent 10823 return c 10824} 10825 10826// PageSize sets the optional parameter "pageSize": The maximum number 10827// of items to return in a single page. By 10828// default 100 and at most 1000. 10829func (c *ProjectsAgentSearchCall) PageSize(pageSize int64) *ProjectsAgentSearchCall { 10830 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10831 return c 10832} 10833 10834// PageToken sets the optional parameter "pageToken": The 10835// next_page_token value returned from a previous list request. 10836func (c *ProjectsAgentSearchCall) PageToken(pageToken string) *ProjectsAgentSearchCall { 10837 c.urlParams_.Set("pageToken", pageToken) 10838 return c 10839} 10840 10841// Fields allows partial responses to be retrieved. See 10842// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10843// for more information. 10844func (c *ProjectsAgentSearchCall) Fields(s ...googleapi.Field) *ProjectsAgentSearchCall { 10845 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10846 return c 10847} 10848 10849// IfNoneMatch sets the optional parameter which makes the operation 10850// fail if the object's ETag matches the given value. This is useful for 10851// getting updates only after the object has changed since the last 10852// request. Use googleapi.IsNotModified to check whether the response 10853// error from Do is the result of In-None-Match. 10854func (c *ProjectsAgentSearchCall) IfNoneMatch(entityTag string) *ProjectsAgentSearchCall { 10855 c.ifNoneMatch_ = entityTag 10856 return c 10857} 10858 10859// Context sets the context to be used in this call's Do method. Any 10860// pending HTTP request will be aborted if the provided context is 10861// canceled. 10862func (c *ProjectsAgentSearchCall) Context(ctx context.Context) *ProjectsAgentSearchCall { 10863 c.ctx_ = ctx 10864 return c 10865} 10866 10867// Header returns an http.Header that can be modified by the caller to 10868// add HTTP headers to the request. 10869func (c *ProjectsAgentSearchCall) Header() http.Header { 10870 if c.header_ == nil { 10871 c.header_ = make(http.Header) 10872 } 10873 return c.header_ 10874} 10875 10876func (c *ProjectsAgentSearchCall) doRequest(alt string) (*http.Response, error) { 10877 reqHeaders := make(http.Header) 10878 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 10879 for k, v := range c.header_ { 10880 reqHeaders[k] = v 10881 } 10882 reqHeaders.Set("User-Agent", c.s.userAgent()) 10883 if c.ifNoneMatch_ != "" { 10884 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10885 } 10886 var body io.Reader = nil 10887 c.urlParams_.Set("alt", alt) 10888 c.urlParams_.Set("prettyPrint", "false") 10889 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:search") 10890 urls += "?" + c.urlParams_.Encode() 10891 req, err := http.NewRequest("GET", urls, body) 10892 if err != nil { 10893 return nil, err 10894 } 10895 req.Header = reqHeaders 10896 googleapi.Expand(req.URL, map[string]string{ 10897 "parent": c.parent, 10898 }) 10899 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10900} 10901 10902// Do executes the "dialogflow.projects.agent.search" call. 10903// Exactly one of *GoogleCloudDialogflowV2SearchAgentsResponse or error 10904// will be non-nil. Any non-2xx status code is an error. Response 10905// headers are in either 10906// *GoogleCloudDialogflowV2SearchAgentsResponse.ServerResponse.Header or 10907// (if a response was returned at all) in 10908// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10909// whether the returned error was because http.StatusNotModified was 10910// returned. 10911func (c *ProjectsAgentSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SearchAgentsResponse, error) { 10912 gensupport.SetOptions(c.urlParams_, opts...) 10913 res, err := c.doRequest("json") 10914 if res != nil && res.StatusCode == http.StatusNotModified { 10915 if res.Body != nil { 10916 res.Body.Close() 10917 } 10918 return nil, &googleapi.Error{ 10919 Code: res.StatusCode, 10920 Header: res.Header, 10921 } 10922 } 10923 if err != nil { 10924 return nil, err 10925 } 10926 defer googleapi.CloseBody(res) 10927 if err := googleapi.CheckResponse(res); err != nil { 10928 return nil, err 10929 } 10930 ret := &GoogleCloudDialogflowV2SearchAgentsResponse{ 10931 ServerResponse: googleapi.ServerResponse{ 10932 Header: res.Header, 10933 HTTPStatusCode: res.StatusCode, 10934 }, 10935 } 10936 target := &ret 10937 if err := gensupport.DecodeResponse(target, res); err != nil { 10938 return nil, err 10939 } 10940 return ret, nil 10941 // { 10942 // "description": "Returns the list of agents.\n\nSince there is at most one conversational agent per project, this method is\nuseful primarily for listing all agents across projects the caller has\naccess to. One can achieve that with a wildcard project collection id \"-\".\nRefer to [List\nSub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).", 10943 // "flatPath": "v2/projects/{projectsId}/agent:search", 10944 // "httpMethod": "GET", 10945 // "id": "dialogflow.projects.agent.search", 10946 // "parameterOrder": [ 10947 // "parent" 10948 // ], 10949 // "parameters": { 10950 // "pageSize": { 10951 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 10952 // "format": "int32", 10953 // "location": "query", 10954 // "type": "integer" 10955 // }, 10956 // "pageToken": { 10957 // "description": "The next_page_token value returned from a previous list request.", 10958 // "location": "query", 10959 // "type": "string" 10960 // }, 10961 // "parent": { 10962 // "description": "Required. The project to list agents from.\nFormat: `projects/\u003cProject ID or '-'\u003e`.", 10963 // "location": "path", 10964 // "pattern": "^projects/[^/]+$", 10965 // "required": true, 10966 // "type": "string" 10967 // } 10968 // }, 10969 // "path": "v2/{+parent}/agent:search", 10970 // "response": { 10971 // "$ref": "GoogleCloudDialogflowV2SearchAgentsResponse" 10972 // }, 10973 // "scopes": [ 10974 // "https://www.googleapis.com/auth/cloud-platform", 10975 // "https://www.googleapis.com/auth/dialogflow" 10976 // ] 10977 // } 10978 10979} 10980 10981// Pages invokes f for each page of results. 10982// A non-nil error returned from f will halt the iteration. 10983// The provided context supersedes any context provided to the Context method. 10984func (c *ProjectsAgentSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2SearchAgentsResponse) error) error { 10985 c.ctx_ = ctx 10986 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10987 for { 10988 x, err := c.Do() 10989 if err != nil { 10990 return err 10991 } 10992 if err := f(x); err != nil { 10993 return err 10994 } 10995 if x.NextPageToken == "" { 10996 return nil 10997 } 10998 c.PageToken(x.NextPageToken) 10999 } 11000} 11001 11002// method id "dialogflow.projects.agent.train": 11003 11004type ProjectsAgentTrainCall struct { 11005 s *Service 11006 parent string 11007 googleclouddialogflowv2trainagentrequest *GoogleCloudDialogflowV2TrainAgentRequest 11008 urlParams_ gensupport.URLParams 11009 ctx_ context.Context 11010 header_ http.Header 11011} 11012 11013// Train: Trains the specified agent. 11014// 11015// Operation <response: google.protobuf.Empty> 11016func (r *ProjectsAgentService) Train(parent string, googleclouddialogflowv2trainagentrequest *GoogleCloudDialogflowV2TrainAgentRequest) *ProjectsAgentTrainCall { 11017 c := &ProjectsAgentTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11018 c.parent = parent 11019 c.googleclouddialogflowv2trainagentrequest = googleclouddialogflowv2trainagentrequest 11020 return c 11021} 11022 11023// Fields allows partial responses to be retrieved. See 11024// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11025// for more information. 11026func (c *ProjectsAgentTrainCall) Fields(s ...googleapi.Field) *ProjectsAgentTrainCall { 11027 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11028 return c 11029} 11030 11031// Context sets the context to be used in this call's Do method. Any 11032// pending HTTP request will be aborted if the provided context is 11033// canceled. 11034func (c *ProjectsAgentTrainCall) Context(ctx context.Context) *ProjectsAgentTrainCall { 11035 c.ctx_ = ctx 11036 return c 11037} 11038 11039// Header returns an http.Header that can be modified by the caller to 11040// add HTTP headers to the request. 11041func (c *ProjectsAgentTrainCall) Header() http.Header { 11042 if c.header_ == nil { 11043 c.header_ = make(http.Header) 11044 } 11045 return c.header_ 11046} 11047 11048func (c *ProjectsAgentTrainCall) doRequest(alt string) (*http.Response, error) { 11049 reqHeaders := make(http.Header) 11050 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 11051 for k, v := range c.header_ { 11052 reqHeaders[k] = v 11053 } 11054 reqHeaders.Set("User-Agent", c.s.userAgent()) 11055 var body io.Reader = nil 11056 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2trainagentrequest) 11057 if err != nil { 11058 return nil, err 11059 } 11060 reqHeaders.Set("Content-Type", "application/json") 11061 c.urlParams_.Set("alt", alt) 11062 c.urlParams_.Set("prettyPrint", "false") 11063 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:train") 11064 urls += "?" + c.urlParams_.Encode() 11065 req, err := http.NewRequest("POST", urls, body) 11066 if err != nil { 11067 return nil, err 11068 } 11069 req.Header = reqHeaders 11070 googleapi.Expand(req.URL, map[string]string{ 11071 "parent": c.parent, 11072 }) 11073 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11074} 11075 11076// Do executes the "dialogflow.projects.agent.train" call. 11077// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 11078// Any non-2xx status code is an error. Response headers are in either 11079// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 11080// was returned at all) in error.(*googleapi.Error).Header. Use 11081// googleapi.IsNotModified to check whether the returned error was 11082// because http.StatusNotModified was returned. 11083func (c *ProjectsAgentTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11084 gensupport.SetOptions(c.urlParams_, opts...) 11085 res, err := c.doRequest("json") 11086 if res != nil && res.StatusCode == http.StatusNotModified { 11087 if res.Body != nil { 11088 res.Body.Close() 11089 } 11090 return nil, &googleapi.Error{ 11091 Code: res.StatusCode, 11092 Header: res.Header, 11093 } 11094 } 11095 if err != nil { 11096 return nil, err 11097 } 11098 defer googleapi.CloseBody(res) 11099 if err := googleapi.CheckResponse(res); err != nil { 11100 return nil, err 11101 } 11102 ret := &GoogleLongrunningOperation{ 11103 ServerResponse: googleapi.ServerResponse{ 11104 Header: res.Header, 11105 HTTPStatusCode: res.StatusCode, 11106 }, 11107 } 11108 target := &ret 11109 if err := gensupport.DecodeResponse(target, res); err != nil { 11110 return nil, err 11111 } 11112 return ret, nil 11113 // { 11114 // "description": "Trains the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 11115 // "flatPath": "v2/projects/{projectsId}/agent:train", 11116 // "httpMethod": "POST", 11117 // "id": "dialogflow.projects.agent.train", 11118 // "parameterOrder": [ 11119 // "parent" 11120 // ], 11121 // "parameters": { 11122 // "parent": { 11123 // "description": "Required. The project that the agent to train is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 11124 // "location": "path", 11125 // "pattern": "^projects/[^/]+$", 11126 // "required": true, 11127 // "type": "string" 11128 // } 11129 // }, 11130 // "path": "v2/{+parent}/agent:train", 11131 // "request": { 11132 // "$ref": "GoogleCloudDialogflowV2TrainAgentRequest" 11133 // }, 11134 // "response": { 11135 // "$ref": "GoogleLongrunningOperation" 11136 // }, 11137 // "scopes": [ 11138 // "https://www.googleapis.com/auth/cloud-platform", 11139 // "https://www.googleapis.com/auth/dialogflow" 11140 // ] 11141 // } 11142 11143} 11144 11145// method id "dialogflow.projects.agent.updateFulfillment": 11146 11147type ProjectsAgentUpdateFulfillmentCall struct { 11148 s *Service 11149 nameid string 11150 googleclouddialogflowv2fulfillment *GoogleCloudDialogflowV2Fulfillment 11151 urlParams_ gensupport.URLParams 11152 ctx_ context.Context 11153 header_ http.Header 11154} 11155 11156// UpdateFulfillment: Updates the fulfillment. 11157func (r *ProjectsAgentService) UpdateFulfillment(nameid string, googleclouddialogflowv2fulfillment *GoogleCloudDialogflowV2Fulfillment) *ProjectsAgentUpdateFulfillmentCall { 11158 c := &ProjectsAgentUpdateFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11159 c.nameid = nameid 11160 c.googleclouddialogflowv2fulfillment = googleclouddialogflowv2fulfillment 11161 return c 11162} 11163 11164// UpdateMask sets the optional parameter "updateMask": Required. The 11165// mask to control which fields get updated. If the mask is not 11166// present, all fields will be updated. 11167func (c *ProjectsAgentUpdateFulfillmentCall) UpdateMask(updateMask string) *ProjectsAgentUpdateFulfillmentCall { 11168 c.urlParams_.Set("updateMask", updateMask) 11169 return c 11170} 11171 11172// Fields allows partial responses to be retrieved. See 11173// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11174// for more information. 11175func (c *ProjectsAgentUpdateFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsAgentUpdateFulfillmentCall { 11176 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11177 return c 11178} 11179 11180// Context sets the context to be used in this call's Do method. Any 11181// pending HTTP request will be aborted if the provided context is 11182// canceled. 11183func (c *ProjectsAgentUpdateFulfillmentCall) Context(ctx context.Context) *ProjectsAgentUpdateFulfillmentCall { 11184 c.ctx_ = ctx 11185 return c 11186} 11187 11188// Header returns an http.Header that can be modified by the caller to 11189// add HTTP headers to the request. 11190func (c *ProjectsAgentUpdateFulfillmentCall) Header() http.Header { 11191 if c.header_ == nil { 11192 c.header_ = make(http.Header) 11193 } 11194 return c.header_ 11195} 11196 11197func (c *ProjectsAgentUpdateFulfillmentCall) doRequest(alt string) (*http.Response, error) { 11198 reqHeaders := make(http.Header) 11199 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 11200 for k, v := range c.header_ { 11201 reqHeaders[k] = v 11202 } 11203 reqHeaders.Set("User-Agent", c.s.userAgent()) 11204 var body io.Reader = nil 11205 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2fulfillment) 11206 if err != nil { 11207 return nil, err 11208 } 11209 reqHeaders.Set("Content-Type", "application/json") 11210 c.urlParams_.Set("alt", alt) 11211 c.urlParams_.Set("prettyPrint", "false") 11212 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11213 urls += "?" + c.urlParams_.Encode() 11214 req, err := http.NewRequest("PATCH", urls, body) 11215 if err != nil { 11216 return nil, err 11217 } 11218 req.Header = reqHeaders 11219 googleapi.Expand(req.URL, map[string]string{ 11220 "name": c.nameid, 11221 }) 11222 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11223} 11224 11225// Do executes the "dialogflow.projects.agent.updateFulfillment" call. 11226// Exactly one of *GoogleCloudDialogflowV2Fulfillment or error will be 11227// non-nil. Any non-2xx status code is an error. Response headers are in 11228// either *GoogleCloudDialogflowV2Fulfillment.ServerResponse.Header or 11229// (if a response was returned at all) in 11230// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11231// whether the returned error was because http.StatusNotModified was 11232// returned. 11233func (c *ProjectsAgentUpdateFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Fulfillment, error) { 11234 gensupport.SetOptions(c.urlParams_, opts...) 11235 res, err := c.doRequest("json") 11236 if res != nil && res.StatusCode == http.StatusNotModified { 11237 if res.Body != nil { 11238 res.Body.Close() 11239 } 11240 return nil, &googleapi.Error{ 11241 Code: res.StatusCode, 11242 Header: res.Header, 11243 } 11244 } 11245 if err != nil { 11246 return nil, err 11247 } 11248 defer googleapi.CloseBody(res) 11249 if err := googleapi.CheckResponse(res); err != nil { 11250 return nil, err 11251 } 11252 ret := &GoogleCloudDialogflowV2Fulfillment{ 11253 ServerResponse: googleapi.ServerResponse{ 11254 Header: res.Header, 11255 HTTPStatusCode: res.StatusCode, 11256 }, 11257 } 11258 target := &ret 11259 if err := gensupport.DecodeResponse(target, res); err != nil { 11260 return nil, err 11261 } 11262 return ret, nil 11263 // { 11264 // "description": "Updates the fulfillment.", 11265 // "flatPath": "v2/projects/{projectsId}/agent/fulfillment", 11266 // "httpMethod": "PATCH", 11267 // "id": "dialogflow.projects.agent.updateFulfillment", 11268 // "parameterOrder": [ 11269 // "name" 11270 // ], 11271 // "parameters": { 11272 // "name": { 11273 // "description": "Required. The unique identifier of the fulfillment.\nFormat: `projects/\u003cProject ID\u003e/agent/fulfillment`.", 11274 // "location": "path", 11275 // "pattern": "^projects/[^/]+/agent/fulfillment$", 11276 // "required": true, 11277 // "type": "string" 11278 // }, 11279 // "updateMask": { 11280 // "description": "Required. The mask to control which fields get updated. If the mask is not\npresent, all fields will be updated.", 11281 // "format": "google-fieldmask", 11282 // "location": "query", 11283 // "type": "string" 11284 // } 11285 // }, 11286 // "path": "v2/{+name}", 11287 // "request": { 11288 // "$ref": "GoogleCloudDialogflowV2Fulfillment" 11289 // }, 11290 // "response": { 11291 // "$ref": "GoogleCloudDialogflowV2Fulfillment" 11292 // }, 11293 // "scopes": [ 11294 // "https://www.googleapis.com/auth/cloud-platform", 11295 // "https://www.googleapis.com/auth/dialogflow" 11296 // ] 11297 // } 11298 11299} 11300 11301// method id "dialogflow.projects.agent.entityTypes.batchDelete": 11302 11303type ProjectsAgentEntityTypesBatchDeleteCall struct { 11304 s *Service 11305 parent string 11306 googleclouddialogflowv2batchdeleteentitytypesrequest *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest 11307 urlParams_ gensupport.URLParams 11308 ctx_ context.Context 11309 header_ http.Header 11310} 11311 11312// BatchDelete: Deletes entity types in the specified agent. 11313// 11314// Operation <response: google.protobuf.Empty> 11315func (r *ProjectsAgentEntityTypesService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteentitytypesrequest *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest) *ProjectsAgentEntityTypesBatchDeleteCall { 11316 c := &ProjectsAgentEntityTypesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11317 c.parent = parent 11318 c.googleclouddialogflowv2batchdeleteentitytypesrequest = googleclouddialogflowv2batchdeleteentitytypesrequest 11319 return c 11320} 11321 11322// Fields allows partial responses to be retrieved. See 11323// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11324// for more information. 11325func (c *ProjectsAgentEntityTypesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchDeleteCall { 11326 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11327 return c 11328} 11329 11330// Context sets the context to be used in this call's Do method. Any 11331// pending HTTP request will be aborted if the provided context is 11332// canceled. 11333func (c *ProjectsAgentEntityTypesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchDeleteCall { 11334 c.ctx_ = ctx 11335 return c 11336} 11337 11338// Header returns an http.Header that can be modified by the caller to 11339// add HTTP headers to the request. 11340func (c *ProjectsAgentEntityTypesBatchDeleteCall) Header() http.Header { 11341 if c.header_ == nil { 11342 c.header_ = make(http.Header) 11343 } 11344 return c.header_ 11345} 11346 11347func (c *ProjectsAgentEntityTypesBatchDeleteCall) doRequest(alt string) (*http.Response, error) { 11348 reqHeaders := make(http.Header) 11349 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 11350 for k, v := range c.header_ { 11351 reqHeaders[k] = v 11352 } 11353 reqHeaders.Set("User-Agent", c.s.userAgent()) 11354 var body io.Reader = nil 11355 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteentitytypesrequest) 11356 if err != nil { 11357 return nil, err 11358 } 11359 reqHeaders.Set("Content-Type", "application/json") 11360 c.urlParams_.Set("alt", alt) 11361 c.urlParams_.Set("prettyPrint", "false") 11362 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes:batchDelete") 11363 urls += "?" + c.urlParams_.Encode() 11364 req, err := http.NewRequest("POST", urls, body) 11365 if err != nil { 11366 return nil, err 11367 } 11368 req.Header = reqHeaders 11369 googleapi.Expand(req.URL, map[string]string{ 11370 "parent": c.parent, 11371 }) 11372 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11373} 11374 11375// Do executes the "dialogflow.projects.agent.entityTypes.batchDelete" call. 11376// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 11377// Any non-2xx status code is an error. Response headers are in either 11378// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 11379// was returned at all) in error.(*googleapi.Error).Header. Use 11380// googleapi.IsNotModified to check whether the returned error was 11381// because http.StatusNotModified was returned. 11382func (c *ProjectsAgentEntityTypesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11383 gensupport.SetOptions(c.urlParams_, opts...) 11384 res, err := c.doRequest("json") 11385 if res != nil && res.StatusCode == http.StatusNotModified { 11386 if res.Body != nil { 11387 res.Body.Close() 11388 } 11389 return nil, &googleapi.Error{ 11390 Code: res.StatusCode, 11391 Header: res.Header, 11392 } 11393 } 11394 if err != nil { 11395 return nil, err 11396 } 11397 defer googleapi.CloseBody(res) 11398 if err := googleapi.CheckResponse(res); err != nil { 11399 return nil, err 11400 } 11401 ret := &GoogleLongrunningOperation{ 11402 ServerResponse: googleapi.ServerResponse{ 11403 Header: res.Header, 11404 HTTPStatusCode: res.StatusCode, 11405 }, 11406 } 11407 target := &ret 11408 if err := gensupport.DecodeResponse(target, res); err != nil { 11409 return nil, err 11410 } 11411 return ret, nil 11412 // { 11413 // "description": "Deletes entity types in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 11414 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes:batchDelete", 11415 // "httpMethod": "POST", 11416 // "id": "dialogflow.projects.agent.entityTypes.batchDelete", 11417 // "parameterOrder": [ 11418 // "parent" 11419 // ], 11420 // "parameters": { 11421 // "parent": { 11422 // "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.", 11423 // "location": "path", 11424 // "pattern": "^projects/[^/]+/agent$", 11425 // "required": true, 11426 // "type": "string" 11427 // } 11428 // }, 11429 // "path": "v2/{+parent}/entityTypes:batchDelete", 11430 // "request": { 11431 // "$ref": "GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest" 11432 // }, 11433 // "response": { 11434 // "$ref": "GoogleLongrunningOperation" 11435 // }, 11436 // "scopes": [ 11437 // "https://www.googleapis.com/auth/cloud-platform", 11438 // "https://www.googleapis.com/auth/dialogflow" 11439 // ] 11440 // } 11441 11442} 11443 11444// method id "dialogflow.projects.agent.entityTypes.batchUpdate": 11445 11446type ProjectsAgentEntityTypesBatchUpdateCall struct { 11447 s *Service 11448 parent string 11449 googleclouddialogflowv2batchupdateentitytypesrequest *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest 11450 urlParams_ gensupport.URLParams 11451 ctx_ context.Context 11452 header_ http.Header 11453} 11454 11455// BatchUpdate: Updates/Creates multiple entity types in the specified 11456// agent. 11457// 11458// Operation <response: BatchUpdateEntityTypesResponse> 11459func (r *ProjectsAgentEntityTypesService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateentitytypesrequest *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest) *ProjectsAgentEntityTypesBatchUpdateCall { 11460 c := &ProjectsAgentEntityTypesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11461 c.parent = parent 11462 c.googleclouddialogflowv2batchupdateentitytypesrequest = googleclouddialogflowv2batchupdateentitytypesrequest 11463 return c 11464} 11465 11466// Fields allows partial responses to be retrieved. See 11467// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11468// for more information. 11469func (c *ProjectsAgentEntityTypesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchUpdateCall { 11470 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11471 return c 11472} 11473 11474// Context sets the context to be used in this call's Do method. Any 11475// pending HTTP request will be aborted if the provided context is 11476// canceled. 11477func (c *ProjectsAgentEntityTypesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchUpdateCall { 11478 c.ctx_ = ctx 11479 return c 11480} 11481 11482// Header returns an http.Header that can be modified by the caller to 11483// add HTTP headers to the request. 11484func (c *ProjectsAgentEntityTypesBatchUpdateCall) Header() http.Header { 11485 if c.header_ == nil { 11486 c.header_ = make(http.Header) 11487 } 11488 return c.header_ 11489} 11490 11491func (c *ProjectsAgentEntityTypesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 11492 reqHeaders := make(http.Header) 11493 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 11494 for k, v := range c.header_ { 11495 reqHeaders[k] = v 11496 } 11497 reqHeaders.Set("User-Agent", c.s.userAgent()) 11498 var body io.Reader = nil 11499 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateentitytypesrequest) 11500 if err != nil { 11501 return nil, err 11502 } 11503 reqHeaders.Set("Content-Type", "application/json") 11504 c.urlParams_.Set("alt", alt) 11505 c.urlParams_.Set("prettyPrint", "false") 11506 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes:batchUpdate") 11507 urls += "?" + c.urlParams_.Encode() 11508 req, err := http.NewRequest("POST", urls, body) 11509 if err != nil { 11510 return nil, err 11511 } 11512 req.Header = reqHeaders 11513 googleapi.Expand(req.URL, map[string]string{ 11514 "parent": c.parent, 11515 }) 11516 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11517} 11518 11519// Do executes the "dialogflow.projects.agent.entityTypes.batchUpdate" call. 11520// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 11521// Any non-2xx status code is an error. Response headers are in either 11522// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 11523// was returned at all) in error.(*googleapi.Error).Header. Use 11524// googleapi.IsNotModified to check whether the returned error was 11525// because http.StatusNotModified was returned. 11526func (c *ProjectsAgentEntityTypesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11527 gensupport.SetOptions(c.urlParams_, opts...) 11528 res, err := c.doRequest("json") 11529 if res != nil && res.StatusCode == http.StatusNotModified { 11530 if res.Body != nil { 11531 res.Body.Close() 11532 } 11533 return nil, &googleapi.Error{ 11534 Code: res.StatusCode, 11535 Header: res.Header, 11536 } 11537 } 11538 if err != nil { 11539 return nil, err 11540 } 11541 defer googleapi.CloseBody(res) 11542 if err := googleapi.CheckResponse(res); err != nil { 11543 return nil, err 11544 } 11545 ret := &GoogleLongrunningOperation{ 11546 ServerResponse: googleapi.ServerResponse{ 11547 Header: res.Header, 11548 HTTPStatusCode: res.StatusCode, 11549 }, 11550 } 11551 target := &ret 11552 if err := gensupport.DecodeResponse(target, res); err != nil { 11553 return nil, err 11554 } 11555 return ret, nil 11556 // { 11557 // "description": "Updates/Creates multiple entity types in the specified agent.\n\nOperation \u003cresponse: BatchUpdateEntityTypesResponse\u003e", 11558 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes:batchUpdate", 11559 // "httpMethod": "POST", 11560 // "id": "dialogflow.projects.agent.entityTypes.batchUpdate", 11561 // "parameterOrder": [ 11562 // "parent" 11563 // ], 11564 // "parameters": { 11565 // "parent": { 11566 // "description": "Required. The name of the agent to update or create entity types in.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 11567 // "location": "path", 11568 // "pattern": "^projects/[^/]+/agent$", 11569 // "required": true, 11570 // "type": "string" 11571 // } 11572 // }, 11573 // "path": "v2/{+parent}/entityTypes:batchUpdate", 11574 // "request": { 11575 // "$ref": "GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest" 11576 // }, 11577 // "response": { 11578 // "$ref": "GoogleLongrunningOperation" 11579 // }, 11580 // "scopes": [ 11581 // "https://www.googleapis.com/auth/cloud-platform", 11582 // "https://www.googleapis.com/auth/dialogflow" 11583 // ] 11584 // } 11585 11586} 11587 11588// method id "dialogflow.projects.agent.entityTypes.create": 11589 11590type ProjectsAgentEntityTypesCreateCall struct { 11591 s *Service 11592 parent string 11593 googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType 11594 urlParams_ gensupport.URLParams 11595 ctx_ context.Context 11596 header_ http.Header 11597} 11598 11599// Create: Creates an entity type in the specified agent. 11600func (r *ProjectsAgentEntityTypesService) Create(parent string, googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType) *ProjectsAgentEntityTypesCreateCall { 11601 c := &ProjectsAgentEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11602 c.parent = parent 11603 c.googleclouddialogflowv2entitytype = googleclouddialogflowv2entitytype 11604 return c 11605} 11606 11607// LanguageCode sets the optional parameter "languageCode": The language 11608// used to access language-specific data. 11609// If not specified, the agent's default language is used. 11610// For more information, see 11611// [Multilingual intent and 11612// entity 11613// data](https://cloud.google.com/dialogflow/docs/agents-multiling 11614// ual#intent-entity). 11615func (c *ProjectsAgentEntityTypesCreateCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesCreateCall { 11616 c.urlParams_.Set("languageCode", languageCode) 11617 return c 11618} 11619 11620// Fields allows partial responses to be retrieved. See 11621// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11622// for more information. 11623func (c *ProjectsAgentEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesCreateCall { 11624 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11625 return c 11626} 11627 11628// Context sets the context to be used in this call's Do method. Any 11629// pending HTTP request will be aborted if the provided context is 11630// canceled. 11631func (c *ProjectsAgentEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesCreateCall { 11632 c.ctx_ = ctx 11633 return c 11634} 11635 11636// Header returns an http.Header that can be modified by the caller to 11637// add HTTP headers to the request. 11638func (c *ProjectsAgentEntityTypesCreateCall) Header() http.Header { 11639 if c.header_ == nil { 11640 c.header_ = make(http.Header) 11641 } 11642 return c.header_ 11643} 11644 11645func (c *ProjectsAgentEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { 11646 reqHeaders := make(http.Header) 11647 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 11648 for k, v := range c.header_ { 11649 reqHeaders[k] = v 11650 } 11651 reqHeaders.Set("User-Agent", c.s.userAgent()) 11652 var body io.Reader = nil 11653 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2entitytype) 11654 if err != nil { 11655 return nil, err 11656 } 11657 reqHeaders.Set("Content-Type", "application/json") 11658 c.urlParams_.Set("alt", alt) 11659 c.urlParams_.Set("prettyPrint", "false") 11660 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes") 11661 urls += "?" + c.urlParams_.Encode() 11662 req, err := http.NewRequest("POST", urls, body) 11663 if err != nil { 11664 return nil, err 11665 } 11666 req.Header = reqHeaders 11667 googleapi.Expand(req.URL, map[string]string{ 11668 "parent": c.parent, 11669 }) 11670 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11671} 11672 11673// Do executes the "dialogflow.projects.agent.entityTypes.create" call. 11674// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be 11675// non-nil. Any non-2xx status code is an error. Response headers are in 11676// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or 11677// (if a response was returned at all) in 11678// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11679// whether the returned error was because http.StatusNotModified was 11680// returned. 11681func (c *ProjectsAgentEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) { 11682 gensupport.SetOptions(c.urlParams_, opts...) 11683 res, err := c.doRequest("json") 11684 if res != nil && res.StatusCode == http.StatusNotModified { 11685 if res.Body != nil { 11686 res.Body.Close() 11687 } 11688 return nil, &googleapi.Error{ 11689 Code: res.StatusCode, 11690 Header: res.Header, 11691 } 11692 } 11693 if err != nil { 11694 return nil, err 11695 } 11696 defer googleapi.CloseBody(res) 11697 if err := googleapi.CheckResponse(res); err != nil { 11698 return nil, err 11699 } 11700 ret := &GoogleCloudDialogflowV2EntityType{ 11701 ServerResponse: googleapi.ServerResponse{ 11702 Header: res.Header, 11703 HTTPStatusCode: res.StatusCode, 11704 }, 11705 } 11706 target := &ret 11707 if err := gensupport.DecodeResponse(target, res); err != nil { 11708 return nil, err 11709 } 11710 return ret, nil 11711 // { 11712 // "description": "Creates an entity type in the specified agent.", 11713 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes", 11714 // "httpMethod": "POST", 11715 // "id": "dialogflow.projects.agent.entityTypes.create", 11716 // "parameterOrder": [ 11717 // "parent" 11718 // ], 11719 // "parameters": { 11720 // "languageCode": { 11721 // "description": "Optional. The language used to access language-specific data.\nIf not specified, the agent's default language is used.\nFor more information, see\n[Multilingual intent and entity\ndata](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", 11722 // "location": "query", 11723 // "type": "string" 11724 // }, 11725 // "parent": { 11726 // "description": "Required. The agent to create a entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 11727 // "location": "path", 11728 // "pattern": "^projects/[^/]+/agent$", 11729 // "required": true, 11730 // "type": "string" 11731 // } 11732 // }, 11733 // "path": "v2/{+parent}/entityTypes", 11734 // "request": { 11735 // "$ref": "GoogleCloudDialogflowV2EntityType" 11736 // }, 11737 // "response": { 11738 // "$ref": "GoogleCloudDialogflowV2EntityType" 11739 // }, 11740 // "scopes": [ 11741 // "https://www.googleapis.com/auth/cloud-platform", 11742 // "https://www.googleapis.com/auth/dialogflow" 11743 // ] 11744 // } 11745 11746} 11747 11748// method id "dialogflow.projects.agent.entityTypes.delete": 11749 11750type ProjectsAgentEntityTypesDeleteCall struct { 11751 s *Service 11752 name string 11753 urlParams_ gensupport.URLParams 11754 ctx_ context.Context 11755 header_ http.Header 11756} 11757 11758// Delete: Deletes the specified entity type. 11759func (r *ProjectsAgentEntityTypesService) Delete(name string) *ProjectsAgentEntityTypesDeleteCall { 11760 c := &ProjectsAgentEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11761 c.name = name 11762 return c 11763} 11764 11765// Fields allows partial responses to be retrieved. See 11766// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11767// for more information. 11768func (c *ProjectsAgentEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesDeleteCall { 11769 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11770 return c 11771} 11772 11773// Context sets the context to be used in this call's Do method. Any 11774// pending HTTP request will be aborted if the provided context is 11775// canceled. 11776func (c *ProjectsAgentEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesDeleteCall { 11777 c.ctx_ = ctx 11778 return c 11779} 11780 11781// Header returns an http.Header that can be modified by the caller to 11782// add HTTP headers to the request. 11783func (c *ProjectsAgentEntityTypesDeleteCall) Header() http.Header { 11784 if c.header_ == nil { 11785 c.header_ = make(http.Header) 11786 } 11787 return c.header_ 11788} 11789 11790func (c *ProjectsAgentEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 11791 reqHeaders := make(http.Header) 11792 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 11793 for k, v := range c.header_ { 11794 reqHeaders[k] = v 11795 } 11796 reqHeaders.Set("User-Agent", c.s.userAgent()) 11797 var body io.Reader = nil 11798 c.urlParams_.Set("alt", alt) 11799 c.urlParams_.Set("prettyPrint", "false") 11800 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11801 urls += "?" + c.urlParams_.Encode() 11802 req, err := http.NewRequest("DELETE", urls, body) 11803 if err != nil { 11804 return nil, err 11805 } 11806 req.Header = reqHeaders 11807 googleapi.Expand(req.URL, map[string]string{ 11808 "name": c.name, 11809 }) 11810 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11811} 11812 11813// Do executes the "dialogflow.projects.agent.entityTypes.delete" call. 11814// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 11815// non-2xx status code is an error. Response headers are in either 11816// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 11817// returned at all) in error.(*googleapi.Error).Header. Use 11818// googleapi.IsNotModified to check whether the returned error was 11819// because http.StatusNotModified was returned. 11820func (c *ProjectsAgentEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 11821 gensupport.SetOptions(c.urlParams_, opts...) 11822 res, err := c.doRequest("json") 11823 if res != nil && res.StatusCode == http.StatusNotModified { 11824 if res.Body != nil { 11825 res.Body.Close() 11826 } 11827 return nil, &googleapi.Error{ 11828 Code: res.StatusCode, 11829 Header: res.Header, 11830 } 11831 } 11832 if err != nil { 11833 return nil, err 11834 } 11835 defer googleapi.CloseBody(res) 11836 if err := googleapi.CheckResponse(res); err != nil { 11837 return nil, err 11838 } 11839 ret := &GoogleProtobufEmpty{ 11840 ServerResponse: googleapi.ServerResponse{ 11841 Header: res.Header, 11842 HTTPStatusCode: res.StatusCode, 11843 }, 11844 } 11845 target := &ret 11846 if err := gensupport.DecodeResponse(target, res); err != nil { 11847 return nil, err 11848 } 11849 return ret, nil 11850 // { 11851 // "description": "Deletes the specified entity type.", 11852 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}", 11853 // "httpMethod": "DELETE", 11854 // "id": "dialogflow.projects.agent.entityTypes.delete", 11855 // "parameterOrder": [ 11856 // "name" 11857 // ], 11858 // "parameters": { 11859 // "name": { 11860 // "description": "Required. The name of the entity type to delete.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.", 11861 // "location": "path", 11862 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 11863 // "required": true, 11864 // "type": "string" 11865 // } 11866 // }, 11867 // "path": "v2/{+name}", 11868 // "response": { 11869 // "$ref": "GoogleProtobufEmpty" 11870 // }, 11871 // "scopes": [ 11872 // "https://www.googleapis.com/auth/cloud-platform", 11873 // "https://www.googleapis.com/auth/dialogflow" 11874 // ] 11875 // } 11876 11877} 11878 11879// method id "dialogflow.projects.agent.entityTypes.get": 11880 11881type ProjectsAgentEntityTypesGetCall struct { 11882 s *Service 11883 name string 11884 urlParams_ gensupport.URLParams 11885 ifNoneMatch_ string 11886 ctx_ context.Context 11887 header_ http.Header 11888} 11889 11890// Get: Retrieves the specified entity type. 11891func (r *ProjectsAgentEntityTypesService) Get(name string) *ProjectsAgentEntityTypesGetCall { 11892 c := &ProjectsAgentEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11893 c.name = name 11894 return c 11895} 11896 11897// LanguageCode sets the optional parameter "languageCode": The language 11898// used to access language-specific data. 11899// If not specified, the agent's default language is used. 11900// For more information, see 11901// [Multilingual intent and 11902// entity 11903// data](https://cloud.google.com/dialogflow/docs/agents-multiling 11904// ual#intent-entity). 11905func (c *ProjectsAgentEntityTypesGetCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesGetCall { 11906 c.urlParams_.Set("languageCode", languageCode) 11907 return c 11908} 11909 11910// Fields allows partial responses to be retrieved. See 11911// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11912// for more information. 11913func (c *ProjectsAgentEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesGetCall { 11914 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11915 return c 11916} 11917 11918// IfNoneMatch sets the optional parameter which makes the operation 11919// fail if the object's ETag matches the given value. This is useful for 11920// getting updates only after the object has changed since the last 11921// request. Use googleapi.IsNotModified to check whether the response 11922// error from Do is the result of In-None-Match. 11923func (c *ProjectsAgentEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesGetCall { 11924 c.ifNoneMatch_ = entityTag 11925 return c 11926} 11927 11928// Context sets the context to be used in this call's Do method. Any 11929// pending HTTP request will be aborted if the provided context is 11930// canceled. 11931func (c *ProjectsAgentEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEntityTypesGetCall { 11932 c.ctx_ = ctx 11933 return c 11934} 11935 11936// Header returns an http.Header that can be modified by the caller to 11937// add HTTP headers to the request. 11938func (c *ProjectsAgentEntityTypesGetCall) Header() http.Header { 11939 if c.header_ == nil { 11940 c.header_ = make(http.Header) 11941 } 11942 return c.header_ 11943} 11944 11945func (c *ProjectsAgentEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { 11946 reqHeaders := make(http.Header) 11947 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 11948 for k, v := range c.header_ { 11949 reqHeaders[k] = v 11950 } 11951 reqHeaders.Set("User-Agent", c.s.userAgent()) 11952 if c.ifNoneMatch_ != "" { 11953 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11954 } 11955 var body io.Reader = nil 11956 c.urlParams_.Set("alt", alt) 11957 c.urlParams_.Set("prettyPrint", "false") 11958 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11959 urls += "?" + c.urlParams_.Encode() 11960 req, err := http.NewRequest("GET", urls, body) 11961 if err != nil { 11962 return nil, err 11963 } 11964 req.Header = reqHeaders 11965 googleapi.Expand(req.URL, map[string]string{ 11966 "name": c.name, 11967 }) 11968 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11969} 11970 11971// Do executes the "dialogflow.projects.agent.entityTypes.get" call. 11972// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be 11973// non-nil. Any non-2xx status code is an error. Response headers are in 11974// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or 11975// (if a response was returned at all) in 11976// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11977// whether the returned error was because http.StatusNotModified was 11978// returned. 11979func (c *ProjectsAgentEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) { 11980 gensupport.SetOptions(c.urlParams_, opts...) 11981 res, err := c.doRequest("json") 11982 if res != nil && res.StatusCode == http.StatusNotModified { 11983 if res.Body != nil { 11984 res.Body.Close() 11985 } 11986 return nil, &googleapi.Error{ 11987 Code: res.StatusCode, 11988 Header: res.Header, 11989 } 11990 } 11991 if err != nil { 11992 return nil, err 11993 } 11994 defer googleapi.CloseBody(res) 11995 if err := googleapi.CheckResponse(res); err != nil { 11996 return nil, err 11997 } 11998 ret := &GoogleCloudDialogflowV2EntityType{ 11999 ServerResponse: googleapi.ServerResponse{ 12000 Header: res.Header, 12001 HTTPStatusCode: res.StatusCode, 12002 }, 12003 } 12004 target := &ret 12005 if err := gensupport.DecodeResponse(target, res); err != nil { 12006 return nil, err 12007 } 12008 return ret, nil 12009 // { 12010 // "description": "Retrieves the specified entity type.", 12011 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}", 12012 // "httpMethod": "GET", 12013 // "id": "dialogflow.projects.agent.entityTypes.get", 12014 // "parameterOrder": [ 12015 // "name" 12016 // ], 12017 // "parameters": { 12018 // "languageCode": { 12019 // "description": "Optional. The language used to access language-specific data.\nIf not specified, the agent's default language is used.\nFor more information, see\n[Multilingual intent and entity\ndata](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", 12020 // "location": "query", 12021 // "type": "string" 12022 // }, 12023 // "name": { 12024 // "description": "Required. The name of the entity type.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.", 12025 // "location": "path", 12026 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 12027 // "required": true, 12028 // "type": "string" 12029 // } 12030 // }, 12031 // "path": "v2/{+name}", 12032 // "response": { 12033 // "$ref": "GoogleCloudDialogflowV2EntityType" 12034 // }, 12035 // "scopes": [ 12036 // "https://www.googleapis.com/auth/cloud-platform", 12037 // "https://www.googleapis.com/auth/dialogflow" 12038 // ] 12039 // } 12040 12041} 12042 12043// method id "dialogflow.projects.agent.entityTypes.list": 12044 12045type ProjectsAgentEntityTypesListCall struct { 12046 s *Service 12047 parent string 12048 urlParams_ gensupport.URLParams 12049 ifNoneMatch_ string 12050 ctx_ context.Context 12051 header_ http.Header 12052} 12053 12054// List: Returns the list of all entity types in the specified agent. 12055func (r *ProjectsAgentEntityTypesService) List(parent string) *ProjectsAgentEntityTypesListCall { 12056 c := &ProjectsAgentEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12057 c.parent = parent 12058 return c 12059} 12060 12061// LanguageCode sets the optional parameter "languageCode": The language 12062// used to access language-specific data. 12063// If not specified, the agent's default language is used. 12064// For more information, see 12065// [Multilingual intent and 12066// entity 12067// data](https://cloud.google.com/dialogflow/docs/agents-multiling 12068// ual#intent-entity). 12069func (c *ProjectsAgentEntityTypesListCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesListCall { 12070 c.urlParams_.Set("languageCode", languageCode) 12071 return c 12072} 12073 12074// PageSize sets the optional parameter "pageSize": The maximum number 12075// of items to return in a single page. By 12076// default 100 and at most 1000. 12077func (c *ProjectsAgentEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEntityTypesListCall { 12078 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12079 return c 12080} 12081 12082// PageToken sets the optional parameter "pageToken": The 12083// next_page_token value returned from a previous list request. 12084func (c *ProjectsAgentEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEntityTypesListCall { 12085 c.urlParams_.Set("pageToken", pageToken) 12086 return c 12087} 12088 12089// Fields allows partial responses to be retrieved. See 12090// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12091// for more information. 12092func (c *ProjectsAgentEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesListCall { 12093 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12094 return c 12095} 12096 12097// IfNoneMatch sets the optional parameter which makes the operation 12098// fail if the object's ETag matches the given value. This is useful for 12099// getting updates only after the object has changed since the last 12100// request. Use googleapi.IsNotModified to check whether the response 12101// error from Do is the result of In-None-Match. 12102func (c *ProjectsAgentEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesListCall { 12103 c.ifNoneMatch_ = entityTag 12104 return c 12105} 12106 12107// Context sets the context to be used in this call's Do method. Any 12108// pending HTTP request will be aborted if the provided context is 12109// canceled. 12110func (c *ProjectsAgentEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEntityTypesListCall { 12111 c.ctx_ = ctx 12112 return c 12113} 12114 12115// Header returns an http.Header that can be modified by the caller to 12116// add HTTP headers to the request. 12117func (c *ProjectsAgentEntityTypesListCall) Header() http.Header { 12118 if c.header_ == nil { 12119 c.header_ = make(http.Header) 12120 } 12121 return c.header_ 12122} 12123 12124func (c *ProjectsAgentEntityTypesListCall) doRequest(alt string) (*http.Response, error) { 12125 reqHeaders := make(http.Header) 12126 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 12127 for k, v := range c.header_ { 12128 reqHeaders[k] = v 12129 } 12130 reqHeaders.Set("User-Agent", c.s.userAgent()) 12131 if c.ifNoneMatch_ != "" { 12132 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12133 } 12134 var body io.Reader = nil 12135 c.urlParams_.Set("alt", alt) 12136 c.urlParams_.Set("prettyPrint", "false") 12137 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes") 12138 urls += "?" + c.urlParams_.Encode() 12139 req, err := http.NewRequest("GET", urls, body) 12140 if err != nil { 12141 return nil, err 12142 } 12143 req.Header = reqHeaders 12144 googleapi.Expand(req.URL, map[string]string{ 12145 "parent": c.parent, 12146 }) 12147 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12148} 12149 12150// Do executes the "dialogflow.projects.agent.entityTypes.list" call. 12151// Exactly one of *GoogleCloudDialogflowV2ListEntityTypesResponse or 12152// error will be non-nil. Any non-2xx status code is an error. Response 12153// headers are in either 12154// *GoogleCloudDialogflowV2ListEntityTypesResponse.ServerResponse.Header 12155// or (if a response was returned at all) in 12156// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12157// whether the returned error was because http.StatusNotModified was 12158// returned. 12159func (c *ProjectsAgentEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListEntityTypesResponse, error) { 12160 gensupport.SetOptions(c.urlParams_, opts...) 12161 res, err := c.doRequest("json") 12162 if res != nil && res.StatusCode == http.StatusNotModified { 12163 if res.Body != nil { 12164 res.Body.Close() 12165 } 12166 return nil, &googleapi.Error{ 12167 Code: res.StatusCode, 12168 Header: res.Header, 12169 } 12170 } 12171 if err != nil { 12172 return nil, err 12173 } 12174 defer googleapi.CloseBody(res) 12175 if err := googleapi.CheckResponse(res); err != nil { 12176 return nil, err 12177 } 12178 ret := &GoogleCloudDialogflowV2ListEntityTypesResponse{ 12179 ServerResponse: googleapi.ServerResponse{ 12180 Header: res.Header, 12181 HTTPStatusCode: res.StatusCode, 12182 }, 12183 } 12184 target := &ret 12185 if err := gensupport.DecodeResponse(target, res); err != nil { 12186 return nil, err 12187 } 12188 return ret, nil 12189 // { 12190 // "description": "Returns the list of all entity types in the specified agent.", 12191 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes", 12192 // "httpMethod": "GET", 12193 // "id": "dialogflow.projects.agent.entityTypes.list", 12194 // "parameterOrder": [ 12195 // "parent" 12196 // ], 12197 // "parameters": { 12198 // "languageCode": { 12199 // "description": "Optional. The language used to access language-specific data.\nIf not specified, the agent's default language is used.\nFor more information, see\n[Multilingual intent and entity\ndata](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", 12200 // "location": "query", 12201 // "type": "string" 12202 // }, 12203 // "pageSize": { 12204 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 12205 // "format": "int32", 12206 // "location": "query", 12207 // "type": "integer" 12208 // }, 12209 // "pageToken": { 12210 // "description": "Optional. The next_page_token value returned from a previous list request.", 12211 // "location": "query", 12212 // "type": "string" 12213 // }, 12214 // "parent": { 12215 // "description": "Required. The agent to list all entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 12216 // "location": "path", 12217 // "pattern": "^projects/[^/]+/agent$", 12218 // "required": true, 12219 // "type": "string" 12220 // } 12221 // }, 12222 // "path": "v2/{+parent}/entityTypes", 12223 // "response": { 12224 // "$ref": "GoogleCloudDialogflowV2ListEntityTypesResponse" 12225 // }, 12226 // "scopes": [ 12227 // "https://www.googleapis.com/auth/cloud-platform", 12228 // "https://www.googleapis.com/auth/dialogflow" 12229 // ] 12230 // } 12231 12232} 12233 12234// Pages invokes f for each page of results. 12235// A non-nil error returned from f will halt the iteration. 12236// The provided context supersedes any context provided to the Context method. 12237func (c *ProjectsAgentEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListEntityTypesResponse) error) error { 12238 c.ctx_ = ctx 12239 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12240 for { 12241 x, err := c.Do() 12242 if err != nil { 12243 return err 12244 } 12245 if err := f(x); err != nil { 12246 return err 12247 } 12248 if x.NextPageToken == "" { 12249 return nil 12250 } 12251 c.PageToken(x.NextPageToken) 12252 } 12253} 12254 12255// method id "dialogflow.projects.agent.entityTypes.patch": 12256 12257type ProjectsAgentEntityTypesPatchCall struct { 12258 s *Service 12259 nameid string 12260 googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType 12261 urlParams_ gensupport.URLParams 12262 ctx_ context.Context 12263 header_ http.Header 12264} 12265 12266// Patch: Updates the specified entity type. 12267func (r *ProjectsAgentEntityTypesService) Patch(nameid string, googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType) *ProjectsAgentEntityTypesPatchCall { 12268 c := &ProjectsAgentEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12269 c.nameid = nameid 12270 c.googleclouddialogflowv2entitytype = googleclouddialogflowv2entitytype 12271 return c 12272} 12273 12274// LanguageCode sets the optional parameter "languageCode": The language 12275// used to access language-specific data. 12276// If not specified, the agent's default language is used. 12277// For more information, see 12278// [Multilingual intent and 12279// entity 12280// data](https://cloud.google.com/dialogflow/docs/agents-multiling 12281// ual#intent-entity). 12282func (c *ProjectsAgentEntityTypesPatchCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesPatchCall { 12283 c.urlParams_.Set("languageCode", languageCode) 12284 return c 12285} 12286 12287// UpdateMask sets the optional parameter "updateMask": The mask to 12288// control which fields get updated. 12289func (c *ProjectsAgentEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEntityTypesPatchCall { 12290 c.urlParams_.Set("updateMask", updateMask) 12291 return c 12292} 12293 12294// Fields allows partial responses to be retrieved. See 12295// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12296// for more information. 12297func (c *ProjectsAgentEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesPatchCall { 12298 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12299 return c 12300} 12301 12302// Context sets the context to be used in this call's Do method. Any 12303// pending HTTP request will be aborted if the provided context is 12304// canceled. 12305func (c *ProjectsAgentEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEntityTypesPatchCall { 12306 c.ctx_ = ctx 12307 return c 12308} 12309 12310// Header returns an http.Header that can be modified by the caller to 12311// add HTTP headers to the request. 12312func (c *ProjectsAgentEntityTypesPatchCall) Header() http.Header { 12313 if c.header_ == nil { 12314 c.header_ = make(http.Header) 12315 } 12316 return c.header_ 12317} 12318 12319func (c *ProjectsAgentEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { 12320 reqHeaders := make(http.Header) 12321 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 12322 for k, v := range c.header_ { 12323 reqHeaders[k] = v 12324 } 12325 reqHeaders.Set("User-Agent", c.s.userAgent()) 12326 var body io.Reader = nil 12327 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2entitytype) 12328 if err != nil { 12329 return nil, err 12330 } 12331 reqHeaders.Set("Content-Type", "application/json") 12332 c.urlParams_.Set("alt", alt) 12333 c.urlParams_.Set("prettyPrint", "false") 12334 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12335 urls += "?" + c.urlParams_.Encode() 12336 req, err := http.NewRequest("PATCH", urls, body) 12337 if err != nil { 12338 return nil, err 12339 } 12340 req.Header = reqHeaders 12341 googleapi.Expand(req.URL, map[string]string{ 12342 "name": c.nameid, 12343 }) 12344 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12345} 12346 12347// Do executes the "dialogflow.projects.agent.entityTypes.patch" call. 12348// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be 12349// non-nil. Any non-2xx status code is an error. Response headers are in 12350// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or 12351// (if a response was returned at all) in 12352// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12353// whether the returned error was because http.StatusNotModified was 12354// returned. 12355func (c *ProjectsAgentEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) { 12356 gensupport.SetOptions(c.urlParams_, opts...) 12357 res, err := c.doRequest("json") 12358 if res != nil && res.StatusCode == http.StatusNotModified { 12359 if res.Body != nil { 12360 res.Body.Close() 12361 } 12362 return nil, &googleapi.Error{ 12363 Code: res.StatusCode, 12364 Header: res.Header, 12365 } 12366 } 12367 if err != nil { 12368 return nil, err 12369 } 12370 defer googleapi.CloseBody(res) 12371 if err := googleapi.CheckResponse(res); err != nil { 12372 return nil, err 12373 } 12374 ret := &GoogleCloudDialogflowV2EntityType{ 12375 ServerResponse: googleapi.ServerResponse{ 12376 Header: res.Header, 12377 HTTPStatusCode: res.StatusCode, 12378 }, 12379 } 12380 target := &ret 12381 if err := gensupport.DecodeResponse(target, res); err != nil { 12382 return nil, err 12383 } 12384 return ret, nil 12385 // { 12386 // "description": "Updates the specified entity type.", 12387 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}", 12388 // "httpMethod": "PATCH", 12389 // "id": "dialogflow.projects.agent.entityTypes.patch", 12390 // "parameterOrder": [ 12391 // "name" 12392 // ], 12393 // "parameters": { 12394 // "languageCode": { 12395 // "description": "Optional. The language used to access language-specific data.\nIf not specified, the agent's default language is used.\nFor more information, see\n[Multilingual intent and entity\ndata](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", 12396 // "location": "query", 12397 // "type": "string" 12398 // }, 12399 // "name": { 12400 // "description": "The unique identifier of the entity type.\nRequired for EntityTypes.UpdateEntityType and\nEntityTypes.BatchUpdateEntityTypes methods.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.", 12401 // "location": "path", 12402 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 12403 // "required": true, 12404 // "type": "string" 12405 // }, 12406 // "updateMask": { 12407 // "description": "Optional. The mask to control which fields get updated.", 12408 // "format": "google-fieldmask", 12409 // "location": "query", 12410 // "type": "string" 12411 // } 12412 // }, 12413 // "path": "v2/{+name}", 12414 // "request": { 12415 // "$ref": "GoogleCloudDialogflowV2EntityType" 12416 // }, 12417 // "response": { 12418 // "$ref": "GoogleCloudDialogflowV2EntityType" 12419 // }, 12420 // "scopes": [ 12421 // "https://www.googleapis.com/auth/cloud-platform", 12422 // "https://www.googleapis.com/auth/dialogflow" 12423 // ] 12424 // } 12425 12426} 12427 12428// method id "dialogflow.projects.agent.entityTypes.entities.batchCreate": 12429 12430type ProjectsAgentEntityTypesEntitiesBatchCreateCall struct { 12431 s *Service 12432 parent string 12433 googleclouddialogflowv2batchcreateentitiesrequest *GoogleCloudDialogflowV2BatchCreateEntitiesRequest 12434 urlParams_ gensupport.URLParams 12435 ctx_ context.Context 12436 header_ http.Header 12437} 12438 12439// BatchCreate: Creates multiple new entities in the specified entity 12440// type. 12441// 12442// Operation <response: google.protobuf.Empty> 12443func (r *ProjectsAgentEntityTypesEntitiesService) BatchCreate(parent string, googleclouddialogflowv2batchcreateentitiesrequest *GoogleCloudDialogflowV2BatchCreateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchCreateCall { 12444 c := &ProjectsAgentEntityTypesEntitiesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12445 c.parent = parent 12446 c.googleclouddialogflowv2batchcreateentitiesrequest = googleclouddialogflowv2batchcreateentitiesrequest 12447 return c 12448} 12449 12450// Fields allows partial responses to be retrieved. See 12451// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12452// for more information. 12453func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchCreateCall { 12454 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12455 return c 12456} 12457 12458// Context sets the context to be used in this call's Do method. Any 12459// pending HTTP request will be aborted if the provided context is 12460// canceled. 12461func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchCreateCall { 12462 c.ctx_ = ctx 12463 return c 12464} 12465 12466// Header returns an http.Header that can be modified by the caller to 12467// add HTTP headers to the request. 12468func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Header() http.Header { 12469 if c.header_ == nil { 12470 c.header_ = make(http.Header) 12471 } 12472 return c.header_ 12473} 12474 12475func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) doRequest(alt string) (*http.Response, error) { 12476 reqHeaders := make(http.Header) 12477 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 12478 for k, v := range c.header_ { 12479 reqHeaders[k] = v 12480 } 12481 reqHeaders.Set("User-Agent", c.s.userAgent()) 12482 var body io.Reader = nil 12483 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchcreateentitiesrequest) 12484 if err != nil { 12485 return nil, err 12486 } 12487 reqHeaders.Set("Content-Type", "application/json") 12488 c.urlParams_.Set("alt", alt) 12489 c.urlParams_.Set("prettyPrint", "false") 12490 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchCreate") 12491 urls += "?" + c.urlParams_.Encode() 12492 req, err := http.NewRequest("POST", urls, body) 12493 if err != nil { 12494 return nil, err 12495 } 12496 req.Header = reqHeaders 12497 googleapi.Expand(req.URL, map[string]string{ 12498 "parent": c.parent, 12499 }) 12500 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12501} 12502 12503// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchCreate" call. 12504// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 12505// Any non-2xx status code is an error. Response headers are in either 12506// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 12507// was returned at all) in error.(*googleapi.Error).Header. Use 12508// googleapi.IsNotModified to check whether the returned error was 12509// because http.StatusNotModified was returned. 12510func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12511 gensupport.SetOptions(c.urlParams_, opts...) 12512 res, err := c.doRequest("json") 12513 if res != nil && res.StatusCode == http.StatusNotModified { 12514 if res.Body != nil { 12515 res.Body.Close() 12516 } 12517 return nil, &googleapi.Error{ 12518 Code: res.StatusCode, 12519 Header: res.Header, 12520 } 12521 } 12522 if err != nil { 12523 return nil, err 12524 } 12525 defer googleapi.CloseBody(res) 12526 if err := googleapi.CheckResponse(res); err != nil { 12527 return nil, err 12528 } 12529 ret := &GoogleLongrunningOperation{ 12530 ServerResponse: googleapi.ServerResponse{ 12531 Header: res.Header, 12532 HTTPStatusCode: res.StatusCode, 12533 }, 12534 } 12535 target := &ret 12536 if err := gensupport.DecodeResponse(target, res); err != nil { 12537 return nil, err 12538 } 12539 return ret, nil 12540 // { 12541 // "description": "Creates multiple new entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 12542 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate", 12543 // "httpMethod": "POST", 12544 // "id": "dialogflow.projects.agent.entityTypes.entities.batchCreate", 12545 // "parameterOrder": [ 12546 // "parent" 12547 // ], 12548 // "parameters": { 12549 // "parent": { 12550 // "description": "Required. The name of the entity type to create entities in. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.", 12551 // "location": "path", 12552 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 12553 // "required": true, 12554 // "type": "string" 12555 // } 12556 // }, 12557 // "path": "v2/{+parent}/entities:batchCreate", 12558 // "request": { 12559 // "$ref": "GoogleCloudDialogflowV2BatchCreateEntitiesRequest" 12560 // }, 12561 // "response": { 12562 // "$ref": "GoogleLongrunningOperation" 12563 // }, 12564 // "scopes": [ 12565 // "https://www.googleapis.com/auth/cloud-platform", 12566 // "https://www.googleapis.com/auth/dialogflow" 12567 // ] 12568 // } 12569 12570} 12571 12572// method id "dialogflow.projects.agent.entityTypes.entities.batchDelete": 12573 12574type ProjectsAgentEntityTypesEntitiesBatchDeleteCall struct { 12575 s *Service 12576 parent string 12577 googleclouddialogflowv2batchdeleteentitiesrequest *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest 12578 urlParams_ gensupport.URLParams 12579 ctx_ context.Context 12580 header_ http.Header 12581} 12582 12583// BatchDelete: Deletes entities in the specified entity 12584// type. 12585// 12586// 12587// Operation <response: google.protobuf.Empty> 12588func (r *ProjectsAgentEntityTypesEntitiesService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteentitiesrequest *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall { 12589 c := &ProjectsAgentEntityTypesEntitiesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12590 c.parent = parent 12591 c.googleclouddialogflowv2batchdeleteentitiesrequest = googleclouddialogflowv2batchdeleteentitiesrequest 12592 return c 12593} 12594 12595// Fields allows partial responses to be retrieved. See 12596// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12597// for more information. 12598func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall { 12599 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12600 return c 12601} 12602 12603// Context sets the context to be used in this call's Do method. Any 12604// pending HTTP request will be aborted if the provided context is 12605// canceled. 12606func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall { 12607 c.ctx_ = ctx 12608 return c 12609} 12610 12611// Header returns an http.Header that can be modified by the caller to 12612// add HTTP headers to the request. 12613func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Header() http.Header { 12614 if c.header_ == nil { 12615 c.header_ = make(http.Header) 12616 } 12617 return c.header_ 12618} 12619 12620func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) doRequest(alt string) (*http.Response, error) { 12621 reqHeaders := make(http.Header) 12622 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 12623 for k, v := range c.header_ { 12624 reqHeaders[k] = v 12625 } 12626 reqHeaders.Set("User-Agent", c.s.userAgent()) 12627 var body io.Reader = nil 12628 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteentitiesrequest) 12629 if err != nil { 12630 return nil, err 12631 } 12632 reqHeaders.Set("Content-Type", "application/json") 12633 c.urlParams_.Set("alt", alt) 12634 c.urlParams_.Set("prettyPrint", "false") 12635 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchDelete") 12636 urls += "?" + c.urlParams_.Encode() 12637 req, err := http.NewRequest("POST", urls, body) 12638 if err != nil { 12639 return nil, err 12640 } 12641 req.Header = reqHeaders 12642 googleapi.Expand(req.URL, map[string]string{ 12643 "parent": c.parent, 12644 }) 12645 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12646} 12647 12648// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchDelete" call. 12649// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 12650// Any non-2xx status code is an error. Response headers are in either 12651// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 12652// was returned at all) in error.(*googleapi.Error).Header. Use 12653// googleapi.IsNotModified to check whether the returned error was 12654// because http.StatusNotModified was returned. 12655func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12656 gensupport.SetOptions(c.urlParams_, opts...) 12657 res, err := c.doRequest("json") 12658 if res != nil && res.StatusCode == http.StatusNotModified { 12659 if res.Body != nil { 12660 res.Body.Close() 12661 } 12662 return nil, &googleapi.Error{ 12663 Code: res.StatusCode, 12664 Header: res.Header, 12665 } 12666 } 12667 if err != nil { 12668 return nil, err 12669 } 12670 defer googleapi.CloseBody(res) 12671 if err := googleapi.CheckResponse(res); err != nil { 12672 return nil, err 12673 } 12674 ret := &GoogleLongrunningOperation{ 12675 ServerResponse: googleapi.ServerResponse{ 12676 Header: res.Header, 12677 HTTPStatusCode: res.StatusCode, 12678 }, 12679 } 12680 target := &ret 12681 if err := gensupport.DecodeResponse(target, res); err != nil { 12682 return nil, err 12683 } 12684 return ret, nil 12685 // { 12686 // "description": "Deletes entities in the specified entity type.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 12687 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete", 12688 // "httpMethod": "POST", 12689 // "id": "dialogflow.projects.agent.entityTypes.entities.batchDelete", 12690 // "parameterOrder": [ 12691 // "parent" 12692 // ], 12693 // "parameters": { 12694 // "parent": { 12695 // "description": "Required. The name of the entity type to delete entries for. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.", 12696 // "location": "path", 12697 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 12698 // "required": true, 12699 // "type": "string" 12700 // } 12701 // }, 12702 // "path": "v2/{+parent}/entities:batchDelete", 12703 // "request": { 12704 // "$ref": "GoogleCloudDialogflowV2BatchDeleteEntitiesRequest" 12705 // }, 12706 // "response": { 12707 // "$ref": "GoogleLongrunningOperation" 12708 // }, 12709 // "scopes": [ 12710 // "https://www.googleapis.com/auth/cloud-platform", 12711 // "https://www.googleapis.com/auth/dialogflow" 12712 // ] 12713 // } 12714 12715} 12716 12717// method id "dialogflow.projects.agent.entityTypes.entities.batchUpdate": 12718 12719type ProjectsAgentEntityTypesEntitiesBatchUpdateCall struct { 12720 s *Service 12721 parent string 12722 googleclouddialogflowv2batchupdateentitiesrequest *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest 12723 urlParams_ gensupport.URLParams 12724 ctx_ context.Context 12725 header_ http.Header 12726} 12727 12728// BatchUpdate: Updates or creates multiple entities in the specified 12729// entity type. This 12730// method does not affect entities in the entity type that aren't 12731// explicitly 12732// specified in the request. 12733// 12734// 12735// Operation <response: google.protobuf.Empty> 12736func (r *ProjectsAgentEntityTypesEntitiesService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateentitiesrequest *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall { 12737 c := &ProjectsAgentEntityTypesEntitiesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12738 c.parent = parent 12739 c.googleclouddialogflowv2batchupdateentitiesrequest = googleclouddialogflowv2batchupdateentitiesrequest 12740 return c 12741} 12742 12743// Fields allows partial responses to be retrieved. See 12744// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12745// for more information. 12746func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall { 12747 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12748 return c 12749} 12750 12751// Context sets the context to be used in this call's Do method. Any 12752// pending HTTP request will be aborted if the provided context is 12753// canceled. 12754func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall { 12755 c.ctx_ = ctx 12756 return c 12757} 12758 12759// Header returns an http.Header that can be modified by the caller to 12760// add HTTP headers to the request. 12761func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Header() http.Header { 12762 if c.header_ == nil { 12763 c.header_ = make(http.Header) 12764 } 12765 return c.header_ 12766} 12767 12768func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 12769 reqHeaders := make(http.Header) 12770 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 12771 for k, v := range c.header_ { 12772 reqHeaders[k] = v 12773 } 12774 reqHeaders.Set("User-Agent", c.s.userAgent()) 12775 var body io.Reader = nil 12776 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateentitiesrequest) 12777 if err != nil { 12778 return nil, err 12779 } 12780 reqHeaders.Set("Content-Type", "application/json") 12781 c.urlParams_.Set("alt", alt) 12782 c.urlParams_.Set("prettyPrint", "false") 12783 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchUpdate") 12784 urls += "?" + c.urlParams_.Encode() 12785 req, err := http.NewRequest("POST", urls, body) 12786 if err != nil { 12787 return nil, err 12788 } 12789 req.Header = reqHeaders 12790 googleapi.Expand(req.URL, map[string]string{ 12791 "parent": c.parent, 12792 }) 12793 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12794} 12795 12796// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchUpdate" call. 12797// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 12798// Any non-2xx status code is an error. Response headers are in either 12799// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 12800// was returned at all) in error.(*googleapi.Error).Header. Use 12801// googleapi.IsNotModified to check whether the returned error was 12802// because http.StatusNotModified was returned. 12803func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12804 gensupport.SetOptions(c.urlParams_, opts...) 12805 res, err := c.doRequest("json") 12806 if res != nil && res.StatusCode == http.StatusNotModified { 12807 if res.Body != nil { 12808 res.Body.Close() 12809 } 12810 return nil, &googleapi.Error{ 12811 Code: res.StatusCode, 12812 Header: res.Header, 12813 } 12814 } 12815 if err != nil { 12816 return nil, err 12817 } 12818 defer googleapi.CloseBody(res) 12819 if err := googleapi.CheckResponse(res); err != nil { 12820 return nil, err 12821 } 12822 ret := &GoogleLongrunningOperation{ 12823 ServerResponse: googleapi.ServerResponse{ 12824 Header: res.Header, 12825 HTTPStatusCode: res.StatusCode, 12826 }, 12827 } 12828 target := &ret 12829 if err := gensupport.DecodeResponse(target, res); err != nil { 12830 return nil, err 12831 } 12832 return ret, nil 12833 // { 12834 // "description": "Updates or creates multiple entities in the specified entity type. This\nmethod does not affect entities in the entity type that aren't explicitly\nspecified in the request.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 12835 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate", 12836 // "httpMethod": "POST", 12837 // "id": "dialogflow.projects.agent.entityTypes.entities.batchUpdate", 12838 // "parameterOrder": [ 12839 // "parent" 12840 // ], 12841 // "parameters": { 12842 // "parent": { 12843 // "description": "Required. The name of the entity type to update or create entities in.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.", 12844 // "location": "path", 12845 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 12846 // "required": true, 12847 // "type": "string" 12848 // } 12849 // }, 12850 // "path": "v2/{+parent}/entities:batchUpdate", 12851 // "request": { 12852 // "$ref": "GoogleCloudDialogflowV2BatchUpdateEntitiesRequest" 12853 // }, 12854 // "response": { 12855 // "$ref": "GoogleLongrunningOperation" 12856 // }, 12857 // "scopes": [ 12858 // "https://www.googleapis.com/auth/cloud-platform", 12859 // "https://www.googleapis.com/auth/dialogflow" 12860 // ] 12861 // } 12862 12863} 12864 12865// method id "dialogflow.projects.agent.environments.list": 12866 12867type ProjectsAgentEnvironmentsListCall struct { 12868 s *Service 12869 parent string 12870 urlParams_ gensupport.URLParams 12871 ifNoneMatch_ string 12872 ctx_ context.Context 12873 header_ http.Header 12874} 12875 12876// List: Returns the list of all non-draft environments of the specified 12877// agent. 12878func (r *ProjectsAgentEnvironmentsService) List(parent string) *ProjectsAgentEnvironmentsListCall { 12879 c := &ProjectsAgentEnvironmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12880 c.parent = parent 12881 return c 12882} 12883 12884// PageSize sets the optional parameter "pageSize": The maximum number 12885// of items to return in a single page. By default 100 and 12886// at most 1000. 12887func (c *ProjectsAgentEnvironmentsListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsListCall { 12888 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12889 return c 12890} 12891 12892// PageToken sets the optional parameter "pageToken": The 12893// next_page_token value returned from a previous list request. 12894func (c *ProjectsAgentEnvironmentsListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsListCall { 12895 c.urlParams_.Set("pageToken", pageToken) 12896 return c 12897} 12898 12899// Fields allows partial responses to be retrieved. See 12900// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12901// for more information. 12902func (c *ProjectsAgentEnvironmentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsListCall { 12903 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12904 return c 12905} 12906 12907// IfNoneMatch sets the optional parameter which makes the operation 12908// fail if the object's ETag matches the given value. This is useful for 12909// getting updates only after the object has changed since the last 12910// request. Use googleapi.IsNotModified to check whether the response 12911// error from Do is the result of In-None-Match. 12912func (c *ProjectsAgentEnvironmentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsListCall { 12913 c.ifNoneMatch_ = entityTag 12914 return c 12915} 12916 12917// Context sets the context to be used in this call's Do method. Any 12918// pending HTTP request will be aborted if the provided context is 12919// canceled. 12920func (c *ProjectsAgentEnvironmentsListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsListCall { 12921 c.ctx_ = ctx 12922 return c 12923} 12924 12925// Header returns an http.Header that can be modified by the caller to 12926// add HTTP headers to the request. 12927func (c *ProjectsAgentEnvironmentsListCall) Header() http.Header { 12928 if c.header_ == nil { 12929 c.header_ = make(http.Header) 12930 } 12931 return c.header_ 12932} 12933 12934func (c *ProjectsAgentEnvironmentsListCall) doRequest(alt string) (*http.Response, error) { 12935 reqHeaders := make(http.Header) 12936 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 12937 for k, v := range c.header_ { 12938 reqHeaders[k] = v 12939 } 12940 reqHeaders.Set("User-Agent", c.s.userAgent()) 12941 if c.ifNoneMatch_ != "" { 12942 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12943 } 12944 var body io.Reader = nil 12945 c.urlParams_.Set("alt", alt) 12946 c.urlParams_.Set("prettyPrint", "false") 12947 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/environments") 12948 urls += "?" + c.urlParams_.Encode() 12949 req, err := http.NewRequest("GET", urls, body) 12950 if err != nil { 12951 return nil, err 12952 } 12953 req.Header = reqHeaders 12954 googleapi.Expand(req.URL, map[string]string{ 12955 "parent": c.parent, 12956 }) 12957 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12958} 12959 12960// Do executes the "dialogflow.projects.agent.environments.list" call. 12961// Exactly one of *GoogleCloudDialogflowV2ListEnvironmentsResponse or 12962// error will be non-nil. Any non-2xx status code is an error. Response 12963// headers are in either 12964// *GoogleCloudDialogflowV2ListEnvironmentsResponse.ServerResponse.Header 12965// or (if a response was returned at all) in 12966// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12967// whether the returned error was because http.StatusNotModified was 12968// returned. 12969func (c *ProjectsAgentEnvironmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListEnvironmentsResponse, error) { 12970 gensupport.SetOptions(c.urlParams_, opts...) 12971 res, err := c.doRequest("json") 12972 if res != nil && res.StatusCode == http.StatusNotModified { 12973 if res.Body != nil { 12974 res.Body.Close() 12975 } 12976 return nil, &googleapi.Error{ 12977 Code: res.StatusCode, 12978 Header: res.Header, 12979 } 12980 } 12981 if err != nil { 12982 return nil, err 12983 } 12984 defer googleapi.CloseBody(res) 12985 if err := googleapi.CheckResponse(res); err != nil { 12986 return nil, err 12987 } 12988 ret := &GoogleCloudDialogflowV2ListEnvironmentsResponse{ 12989 ServerResponse: googleapi.ServerResponse{ 12990 Header: res.Header, 12991 HTTPStatusCode: res.StatusCode, 12992 }, 12993 } 12994 target := &ret 12995 if err := gensupport.DecodeResponse(target, res); err != nil { 12996 return nil, err 12997 } 12998 return ret, nil 12999 // { 13000 // "description": "Returns the list of all non-draft environments of the specified agent.", 13001 // "flatPath": "v2/projects/{projectsId}/agent/environments", 13002 // "httpMethod": "GET", 13003 // "id": "dialogflow.projects.agent.environments.list", 13004 // "parameterOrder": [ 13005 // "parent" 13006 // ], 13007 // "parameters": { 13008 // "pageSize": { 13009 // "description": "Optional. The maximum number of items to return in a single page. By default 100 and\nat most 1000.", 13010 // "format": "int32", 13011 // "location": "query", 13012 // "type": "integer" 13013 // }, 13014 // "pageToken": { 13015 // "description": "Optional. The next_page_token value returned from a previous list request.", 13016 // "location": "query", 13017 // "type": "string" 13018 // }, 13019 // "parent": { 13020 // "description": "Required. The agent to list all environments from.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 13021 // "location": "path", 13022 // "pattern": "^projects/[^/]+/agent$", 13023 // "required": true, 13024 // "type": "string" 13025 // } 13026 // }, 13027 // "path": "v2/{+parent}/environments", 13028 // "response": { 13029 // "$ref": "GoogleCloudDialogflowV2ListEnvironmentsResponse" 13030 // }, 13031 // "scopes": [ 13032 // "https://www.googleapis.com/auth/cloud-platform", 13033 // "https://www.googleapis.com/auth/dialogflow" 13034 // ] 13035 // } 13036 13037} 13038 13039// Pages invokes f for each page of results. 13040// A non-nil error returned from f will halt the iteration. 13041// The provided context supersedes any context provided to the Context method. 13042func (c *ProjectsAgentEnvironmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListEnvironmentsResponse) error) error { 13043 c.ctx_ = ctx 13044 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13045 for { 13046 x, err := c.Do() 13047 if err != nil { 13048 return err 13049 } 13050 if err := f(x); err != nil { 13051 return err 13052 } 13053 if x.NextPageToken == "" { 13054 return nil 13055 } 13056 c.PageToken(x.NextPageToken) 13057 } 13058} 13059 13060// method id "dialogflow.projects.agent.environments.users.sessions.deleteContexts": 13061 13062type ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall struct { 13063 s *Service 13064 parent string 13065 urlParams_ gensupport.URLParams 13066 ctx_ context.Context 13067 header_ http.Header 13068} 13069 13070// DeleteContexts: Deletes all active contexts in the specified session. 13071func (r *ProjectsAgentEnvironmentsUsersSessionsService) DeleteContexts(parent string) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall { 13072 c := &ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13073 c.parent = parent 13074 return c 13075} 13076 13077// Fields allows partial responses to be retrieved. See 13078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13079// for more information. 13080func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall { 13081 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13082 return c 13083} 13084 13085// Context sets the context to be used in this call's Do method. Any 13086// pending HTTP request will be aborted if the provided context is 13087// canceled. 13088func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall { 13089 c.ctx_ = ctx 13090 return c 13091} 13092 13093// Header returns an http.Header that can be modified by the caller to 13094// add HTTP headers to the request. 13095func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Header() http.Header { 13096 if c.header_ == nil { 13097 c.header_ = make(http.Header) 13098 } 13099 return c.header_ 13100} 13101 13102func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) { 13103 reqHeaders := make(http.Header) 13104 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 13105 for k, v := range c.header_ { 13106 reqHeaders[k] = v 13107 } 13108 reqHeaders.Set("User-Agent", c.s.userAgent()) 13109 var body io.Reader = nil 13110 c.urlParams_.Set("alt", alt) 13111 c.urlParams_.Set("prettyPrint", "false") 13112 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts") 13113 urls += "?" + c.urlParams_.Encode() 13114 req, err := http.NewRequest("DELETE", urls, body) 13115 if err != nil { 13116 return nil, err 13117 } 13118 req.Header = reqHeaders 13119 googleapi.Expand(req.URL, map[string]string{ 13120 "parent": c.parent, 13121 }) 13122 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13123} 13124 13125// Do executes the "dialogflow.projects.agent.environments.users.sessions.deleteContexts" call. 13126// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13127// non-2xx status code is an error. Response headers are in either 13128// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13129// returned at all) in error.(*googleapi.Error).Header. Use 13130// googleapi.IsNotModified to check whether the returned error was 13131// because http.StatusNotModified was returned. 13132func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13133 gensupport.SetOptions(c.urlParams_, opts...) 13134 res, err := c.doRequest("json") 13135 if res != nil && res.StatusCode == http.StatusNotModified { 13136 if res.Body != nil { 13137 res.Body.Close() 13138 } 13139 return nil, &googleapi.Error{ 13140 Code: res.StatusCode, 13141 Header: res.Header, 13142 } 13143 } 13144 if err != nil { 13145 return nil, err 13146 } 13147 defer googleapi.CloseBody(res) 13148 if err := googleapi.CheckResponse(res); err != nil { 13149 return nil, err 13150 } 13151 ret := &GoogleProtobufEmpty{ 13152 ServerResponse: googleapi.ServerResponse{ 13153 Header: res.Header, 13154 HTTPStatusCode: res.StatusCode, 13155 }, 13156 } 13157 target := &ret 13158 if err := gensupport.DecodeResponse(target, res); err != nil { 13159 return nil, err 13160 } 13161 return ret, nil 13162 // { 13163 // "description": "Deletes all active contexts in the specified session.", 13164 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", 13165 // "httpMethod": "DELETE", 13166 // "id": "dialogflow.projects.agent.environments.users.sessions.deleteContexts", 13167 // "parameterOrder": [ 13168 // "parent" 13169 // ], 13170 // "parameters": { 13171 // "parent": { 13172 // "description": "Required. The name of the session to delete all contexts from. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or `projects/\u003cProject\nID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession\nID\u003e`.\nIf `Environment ID` is not specified we assume default 'draft' environment.\nIf `User ID` is not specified, we assume default '-' user.", 13173 // "location": "path", 13174 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", 13175 // "required": true, 13176 // "type": "string" 13177 // } 13178 // }, 13179 // "path": "v2/{+parent}/contexts", 13180 // "response": { 13181 // "$ref": "GoogleProtobufEmpty" 13182 // }, 13183 // "scopes": [ 13184 // "https://www.googleapis.com/auth/cloud-platform", 13185 // "https://www.googleapis.com/auth/dialogflow" 13186 // ] 13187 // } 13188 13189} 13190 13191// method id "dialogflow.projects.agent.environments.users.sessions.detectIntent": 13192 13193type ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall struct { 13194 s *Service 13195 sessionid string 13196 googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest 13197 urlParams_ gensupport.URLParams 13198 ctx_ context.Context 13199 header_ http.Header 13200} 13201 13202// DetectIntent: Processes a natural language query and returns 13203// structured, actionable data 13204// as a result. This method is not idempotent, because it may cause 13205// contexts 13206// and session entity types to be updated, which in turn might 13207// affect 13208// results of future queries. 13209func (r *ProjectsAgentEnvironmentsUsersSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall { 13210 c := &ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13211 c.sessionid = sessionid 13212 c.googleclouddialogflowv2detectintentrequest = googleclouddialogflowv2detectintentrequest 13213 return c 13214} 13215 13216// Fields allows partial responses to be retrieved. See 13217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13218// for more information. 13219func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall { 13220 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13221 return c 13222} 13223 13224// Context sets the context to be used in this call's Do method. Any 13225// pending HTTP request will be aborted if the provided context is 13226// canceled. 13227func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall { 13228 c.ctx_ = ctx 13229 return c 13230} 13231 13232// Header returns an http.Header that can be modified by the caller to 13233// add HTTP headers to the request. 13234func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Header() http.Header { 13235 if c.header_ == nil { 13236 c.header_ = make(http.Header) 13237 } 13238 return c.header_ 13239} 13240 13241func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) { 13242 reqHeaders := make(http.Header) 13243 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 13244 for k, v := range c.header_ { 13245 reqHeaders[k] = v 13246 } 13247 reqHeaders.Set("User-Agent", c.s.userAgent()) 13248 var body io.Reader = nil 13249 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2detectintentrequest) 13250 if err != nil { 13251 return nil, err 13252 } 13253 reqHeaders.Set("Content-Type", "application/json") 13254 c.urlParams_.Set("alt", alt) 13255 c.urlParams_.Set("prettyPrint", "false") 13256 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+session}:detectIntent") 13257 urls += "?" + c.urlParams_.Encode() 13258 req, err := http.NewRequest("POST", urls, body) 13259 if err != nil { 13260 return nil, err 13261 } 13262 req.Header = reqHeaders 13263 googleapi.Expand(req.URL, map[string]string{ 13264 "session": c.sessionid, 13265 }) 13266 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13267} 13268 13269// Do executes the "dialogflow.projects.agent.environments.users.sessions.detectIntent" call. 13270// Exactly one of *GoogleCloudDialogflowV2DetectIntentResponse or error 13271// will be non-nil. Any non-2xx status code is an error. Response 13272// headers are in either 13273// *GoogleCloudDialogflowV2DetectIntentResponse.ServerResponse.Header or 13274// (if a response was returned at all) in 13275// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13276// whether the returned error was because http.StatusNotModified was 13277// returned. 13278func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2DetectIntentResponse, error) { 13279 gensupport.SetOptions(c.urlParams_, opts...) 13280 res, err := c.doRequest("json") 13281 if res != nil && res.StatusCode == http.StatusNotModified { 13282 if res.Body != nil { 13283 res.Body.Close() 13284 } 13285 return nil, &googleapi.Error{ 13286 Code: res.StatusCode, 13287 Header: res.Header, 13288 } 13289 } 13290 if err != nil { 13291 return nil, err 13292 } 13293 defer googleapi.CloseBody(res) 13294 if err := googleapi.CheckResponse(res); err != nil { 13295 return nil, err 13296 } 13297 ret := &GoogleCloudDialogflowV2DetectIntentResponse{ 13298 ServerResponse: googleapi.ServerResponse{ 13299 Header: res.Header, 13300 HTTPStatusCode: res.StatusCode, 13301 }, 13302 } 13303 target := &ret 13304 if err := gensupport.DecodeResponse(target, res); err != nil { 13305 return nil, err 13306 } 13307 return ret, nil 13308 // { 13309 // "description": "Processes a natural language query and returns structured, actionable data\nas a result. This method is not idempotent, because it may cause contexts\nand session entity types to be updated, which in turn might affect\nresults of future queries.", 13310 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent", 13311 // "httpMethod": "POST", 13312 // "id": "dialogflow.projects.agent.environments.users.sessions.detectIntent", 13313 // "parameterOrder": [ 13314 // "session" 13315 // ], 13316 // "parameters": { 13317 // "session": { 13318 // "description": "Required. The name of the session this query is sent to. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`, or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we are using\n\"-\". It's up to the API caller to choose an appropriate `Session ID` and\n`User Id`. They can be a random number or some type of user and session\nidentifiers (preferably hashed). The length of the `Session ID` and\n`User ID` must not exceed 36 characters.", 13319 // "location": "path", 13320 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", 13321 // "required": true, 13322 // "type": "string" 13323 // } 13324 // }, 13325 // "path": "v2/{+session}:detectIntent", 13326 // "request": { 13327 // "$ref": "GoogleCloudDialogflowV2DetectIntentRequest" 13328 // }, 13329 // "response": { 13330 // "$ref": "GoogleCloudDialogflowV2DetectIntentResponse" 13331 // }, 13332 // "scopes": [ 13333 // "https://www.googleapis.com/auth/cloud-platform", 13334 // "https://www.googleapis.com/auth/dialogflow" 13335 // ] 13336 // } 13337 13338} 13339 13340// method id "dialogflow.projects.agent.environments.users.sessions.contexts.create": 13341 13342type ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall struct { 13343 s *Service 13344 parent string 13345 googleclouddialogflowv2context *GoogleCloudDialogflowV2Context 13346 urlParams_ gensupport.URLParams 13347 ctx_ context.Context 13348 header_ http.Header 13349} 13350 13351// Create: Creates a context. 13352// 13353// If the specified context already exists, overrides the context. 13354func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Create(parent string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall { 13355 c := &ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13356 c.parent = parent 13357 c.googleclouddialogflowv2context = googleclouddialogflowv2context 13358 return c 13359} 13360 13361// Fields allows partial responses to be retrieved. See 13362// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13363// for more information. 13364func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall { 13365 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13366 return c 13367} 13368 13369// Context sets the context to be used in this call's Do method. Any 13370// pending HTTP request will be aborted if the provided context is 13371// canceled. 13372func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall { 13373 c.ctx_ = ctx 13374 return c 13375} 13376 13377// Header returns an http.Header that can be modified by the caller to 13378// add HTTP headers to the request. 13379func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Header() http.Header { 13380 if c.header_ == nil { 13381 c.header_ = make(http.Header) 13382 } 13383 return c.header_ 13384} 13385 13386func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) { 13387 reqHeaders := make(http.Header) 13388 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 13389 for k, v := range c.header_ { 13390 reqHeaders[k] = v 13391 } 13392 reqHeaders.Set("User-Agent", c.s.userAgent()) 13393 var body io.Reader = nil 13394 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context) 13395 if err != nil { 13396 return nil, err 13397 } 13398 reqHeaders.Set("Content-Type", "application/json") 13399 c.urlParams_.Set("alt", alt) 13400 c.urlParams_.Set("prettyPrint", "false") 13401 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts") 13402 urls += "?" + c.urlParams_.Encode() 13403 req, err := http.NewRequest("POST", urls, body) 13404 if err != nil { 13405 return nil, err 13406 } 13407 req.Header = reqHeaders 13408 googleapi.Expand(req.URL, map[string]string{ 13409 "parent": c.parent, 13410 }) 13411 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13412} 13413 13414// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.create" call. 13415// Exactly one of *GoogleCloudDialogflowV2Context or error will be 13416// non-nil. Any non-2xx status code is an error. Response headers are in 13417// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a 13418// response was returned at all) in error.(*googleapi.Error).Header. Use 13419// googleapi.IsNotModified to check whether the returned error was 13420// because http.StatusNotModified was returned. 13421func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) { 13422 gensupport.SetOptions(c.urlParams_, opts...) 13423 res, err := c.doRequest("json") 13424 if res != nil && res.StatusCode == http.StatusNotModified { 13425 if res.Body != nil { 13426 res.Body.Close() 13427 } 13428 return nil, &googleapi.Error{ 13429 Code: res.StatusCode, 13430 Header: res.Header, 13431 } 13432 } 13433 if err != nil { 13434 return nil, err 13435 } 13436 defer googleapi.CloseBody(res) 13437 if err := googleapi.CheckResponse(res); err != nil { 13438 return nil, err 13439 } 13440 ret := &GoogleCloudDialogflowV2Context{ 13441 ServerResponse: googleapi.ServerResponse{ 13442 Header: res.Header, 13443 HTTPStatusCode: res.StatusCode, 13444 }, 13445 } 13446 target := &ret 13447 if err := gensupport.DecodeResponse(target, res); err != nil { 13448 return nil, err 13449 } 13450 return ret, nil 13451 // { 13452 // "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.", 13453 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", 13454 // "httpMethod": "POST", 13455 // "id": "dialogflow.projects.agent.environments.users.sessions.contexts.create", 13456 // "parameterOrder": [ 13457 // "parent" 13458 // ], 13459 // "parameters": { 13460 // "parent": { 13461 // "description": "Required. The session to create a context for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 13462 // "location": "path", 13463 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", 13464 // "required": true, 13465 // "type": "string" 13466 // } 13467 // }, 13468 // "path": "v2/{+parent}/contexts", 13469 // "request": { 13470 // "$ref": "GoogleCloudDialogflowV2Context" 13471 // }, 13472 // "response": { 13473 // "$ref": "GoogleCloudDialogflowV2Context" 13474 // }, 13475 // "scopes": [ 13476 // "https://www.googleapis.com/auth/cloud-platform", 13477 // "https://www.googleapis.com/auth/dialogflow" 13478 // ] 13479 // } 13480 13481} 13482 13483// method id "dialogflow.projects.agent.environments.users.sessions.contexts.delete": 13484 13485type ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall struct { 13486 s *Service 13487 name string 13488 urlParams_ gensupport.URLParams 13489 ctx_ context.Context 13490 header_ http.Header 13491} 13492 13493// Delete: Deletes the specified context. 13494func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Delete(name string) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall { 13495 c := &ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13496 c.name = name 13497 return c 13498} 13499 13500// Fields allows partial responses to be retrieved. See 13501// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13502// for more information. 13503func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall { 13504 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13505 return c 13506} 13507 13508// Context sets the context to be used in this call's Do method. Any 13509// pending HTTP request will be aborted if the provided context is 13510// canceled. 13511func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall { 13512 c.ctx_ = ctx 13513 return c 13514} 13515 13516// Header returns an http.Header that can be modified by the caller to 13517// add HTTP headers to the request. 13518func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Header() http.Header { 13519 if c.header_ == nil { 13520 c.header_ = make(http.Header) 13521 } 13522 return c.header_ 13523} 13524 13525func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) { 13526 reqHeaders := make(http.Header) 13527 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 13528 for k, v := range c.header_ { 13529 reqHeaders[k] = v 13530 } 13531 reqHeaders.Set("User-Agent", c.s.userAgent()) 13532 var body io.Reader = nil 13533 c.urlParams_.Set("alt", alt) 13534 c.urlParams_.Set("prettyPrint", "false") 13535 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13536 urls += "?" + c.urlParams_.Encode() 13537 req, err := http.NewRequest("DELETE", urls, body) 13538 if err != nil { 13539 return nil, err 13540 } 13541 req.Header = reqHeaders 13542 googleapi.Expand(req.URL, map[string]string{ 13543 "name": c.name, 13544 }) 13545 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13546} 13547 13548// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.delete" call. 13549// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13550// non-2xx status code is an error. Response headers are in either 13551// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13552// returned at all) in error.(*googleapi.Error).Header. Use 13553// googleapi.IsNotModified to check whether the returned error was 13554// because http.StatusNotModified was returned. 13555func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13556 gensupport.SetOptions(c.urlParams_, opts...) 13557 res, err := c.doRequest("json") 13558 if res != nil && res.StatusCode == http.StatusNotModified { 13559 if res.Body != nil { 13560 res.Body.Close() 13561 } 13562 return nil, &googleapi.Error{ 13563 Code: res.StatusCode, 13564 Header: res.Header, 13565 } 13566 } 13567 if err != nil { 13568 return nil, err 13569 } 13570 defer googleapi.CloseBody(res) 13571 if err := googleapi.CheckResponse(res); err != nil { 13572 return nil, err 13573 } 13574 ret := &GoogleProtobufEmpty{ 13575 ServerResponse: googleapi.ServerResponse{ 13576 Header: res.Header, 13577 HTTPStatusCode: res.StatusCode, 13578 }, 13579 } 13580 target := &ret 13581 if err := gensupport.DecodeResponse(target, res); err != nil { 13582 return nil, err 13583 } 13584 return ret, nil 13585 // { 13586 // "description": "Deletes the specified context.", 13587 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", 13588 // "httpMethod": "DELETE", 13589 // "id": "dialogflow.projects.agent.environments.users.sessions.contexts.delete", 13590 // "parameterOrder": [ 13591 // "name" 13592 // ], 13593 // "parameters": { 13594 // "name": { 13595 // "description": "Required. The name of the context to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 13596 // "location": "path", 13597 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", 13598 // "required": true, 13599 // "type": "string" 13600 // } 13601 // }, 13602 // "path": "v2/{+name}", 13603 // "response": { 13604 // "$ref": "GoogleProtobufEmpty" 13605 // }, 13606 // "scopes": [ 13607 // "https://www.googleapis.com/auth/cloud-platform", 13608 // "https://www.googleapis.com/auth/dialogflow" 13609 // ] 13610 // } 13611 13612} 13613 13614// method id "dialogflow.projects.agent.environments.users.sessions.contexts.get": 13615 13616type ProjectsAgentEnvironmentsUsersSessionsContextsGetCall struct { 13617 s *Service 13618 name string 13619 urlParams_ gensupport.URLParams 13620 ifNoneMatch_ string 13621 ctx_ context.Context 13622 header_ http.Header 13623} 13624 13625// Get: Retrieves the specified context. 13626func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Get(name string) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall { 13627 c := &ProjectsAgentEnvironmentsUsersSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13628 c.name = name 13629 return c 13630} 13631 13632// Fields allows partial responses to be retrieved. See 13633// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13634// for more information. 13635func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall { 13636 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13637 return c 13638} 13639 13640// IfNoneMatch sets the optional parameter which makes the operation 13641// fail if the object's ETag matches the given value. This is useful for 13642// getting updates only after the object has changed since the last 13643// request. Use googleapi.IsNotModified to check whether the response 13644// error from Do is the result of In-None-Match. 13645func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall { 13646 c.ifNoneMatch_ = entityTag 13647 return c 13648} 13649 13650// Context sets the context to be used in this call's Do method. Any 13651// pending HTTP request will be aborted if the provided context is 13652// canceled. 13653func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall { 13654 c.ctx_ = ctx 13655 return c 13656} 13657 13658// Header returns an http.Header that can be modified by the caller to 13659// add HTTP headers to the request. 13660func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Header() http.Header { 13661 if c.header_ == nil { 13662 c.header_ = make(http.Header) 13663 } 13664 return c.header_ 13665} 13666 13667func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) { 13668 reqHeaders := make(http.Header) 13669 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 13670 for k, v := range c.header_ { 13671 reqHeaders[k] = v 13672 } 13673 reqHeaders.Set("User-Agent", c.s.userAgent()) 13674 if c.ifNoneMatch_ != "" { 13675 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13676 } 13677 var body io.Reader = nil 13678 c.urlParams_.Set("alt", alt) 13679 c.urlParams_.Set("prettyPrint", "false") 13680 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13681 urls += "?" + c.urlParams_.Encode() 13682 req, err := http.NewRequest("GET", urls, body) 13683 if err != nil { 13684 return nil, err 13685 } 13686 req.Header = reqHeaders 13687 googleapi.Expand(req.URL, map[string]string{ 13688 "name": c.name, 13689 }) 13690 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13691} 13692 13693// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.get" call. 13694// Exactly one of *GoogleCloudDialogflowV2Context or error will be 13695// non-nil. Any non-2xx status code is an error. Response headers are in 13696// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a 13697// response was returned at all) in error.(*googleapi.Error).Header. Use 13698// googleapi.IsNotModified to check whether the returned error was 13699// because http.StatusNotModified was returned. 13700func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) { 13701 gensupport.SetOptions(c.urlParams_, opts...) 13702 res, err := c.doRequest("json") 13703 if res != nil && res.StatusCode == http.StatusNotModified { 13704 if res.Body != nil { 13705 res.Body.Close() 13706 } 13707 return nil, &googleapi.Error{ 13708 Code: res.StatusCode, 13709 Header: res.Header, 13710 } 13711 } 13712 if err != nil { 13713 return nil, err 13714 } 13715 defer googleapi.CloseBody(res) 13716 if err := googleapi.CheckResponse(res); err != nil { 13717 return nil, err 13718 } 13719 ret := &GoogleCloudDialogflowV2Context{ 13720 ServerResponse: googleapi.ServerResponse{ 13721 Header: res.Header, 13722 HTTPStatusCode: res.StatusCode, 13723 }, 13724 } 13725 target := &ret 13726 if err := gensupport.DecodeResponse(target, res); err != nil { 13727 return nil, err 13728 } 13729 return ret, nil 13730 // { 13731 // "description": "Retrieves the specified context.", 13732 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", 13733 // "httpMethod": "GET", 13734 // "id": "dialogflow.projects.agent.environments.users.sessions.contexts.get", 13735 // "parameterOrder": [ 13736 // "name" 13737 // ], 13738 // "parameters": { 13739 // "name": { 13740 // "description": "Required. The name of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 13741 // "location": "path", 13742 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", 13743 // "required": true, 13744 // "type": "string" 13745 // } 13746 // }, 13747 // "path": "v2/{+name}", 13748 // "response": { 13749 // "$ref": "GoogleCloudDialogflowV2Context" 13750 // }, 13751 // "scopes": [ 13752 // "https://www.googleapis.com/auth/cloud-platform", 13753 // "https://www.googleapis.com/auth/dialogflow" 13754 // ] 13755 // } 13756 13757} 13758 13759// method id "dialogflow.projects.agent.environments.users.sessions.contexts.list": 13760 13761type ProjectsAgentEnvironmentsUsersSessionsContextsListCall struct { 13762 s *Service 13763 parent string 13764 urlParams_ gensupport.URLParams 13765 ifNoneMatch_ string 13766 ctx_ context.Context 13767 header_ http.Header 13768} 13769 13770// List: Returns the list of all contexts in the specified session. 13771func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) List(parent string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall { 13772 c := &ProjectsAgentEnvironmentsUsersSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13773 c.parent = parent 13774 return c 13775} 13776 13777// PageSize sets the optional parameter "pageSize": The maximum number 13778// of items to return in a single page. By 13779// default 100 and at most 1000. 13780func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall { 13781 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13782 return c 13783} 13784 13785// PageToken sets the optional parameter "pageToken": The 13786// next_page_token value returned from a previous list request. 13787func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall { 13788 c.urlParams_.Set("pageToken", pageToken) 13789 return c 13790} 13791 13792// Fields allows partial responses to be retrieved. See 13793// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13794// for more information. 13795func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall { 13796 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13797 return c 13798} 13799 13800// IfNoneMatch sets the optional parameter which makes the operation 13801// fail if the object's ETag matches the given value. This is useful for 13802// getting updates only after the object has changed since the last 13803// request. Use googleapi.IsNotModified to check whether the response 13804// error from Do is the result of In-None-Match. 13805func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall { 13806 c.ifNoneMatch_ = entityTag 13807 return c 13808} 13809 13810// Context sets the context to be used in this call's Do method. Any 13811// pending HTTP request will be aborted if the provided context is 13812// canceled. 13813func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall { 13814 c.ctx_ = ctx 13815 return c 13816} 13817 13818// Header returns an http.Header that can be modified by the caller to 13819// add HTTP headers to the request. 13820func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Header() http.Header { 13821 if c.header_ == nil { 13822 c.header_ = make(http.Header) 13823 } 13824 return c.header_ 13825} 13826 13827func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) doRequest(alt string) (*http.Response, error) { 13828 reqHeaders := make(http.Header) 13829 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 13830 for k, v := range c.header_ { 13831 reqHeaders[k] = v 13832 } 13833 reqHeaders.Set("User-Agent", c.s.userAgent()) 13834 if c.ifNoneMatch_ != "" { 13835 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13836 } 13837 var body io.Reader = nil 13838 c.urlParams_.Set("alt", alt) 13839 c.urlParams_.Set("prettyPrint", "false") 13840 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts") 13841 urls += "?" + c.urlParams_.Encode() 13842 req, err := http.NewRequest("GET", urls, body) 13843 if err != nil { 13844 return nil, err 13845 } 13846 req.Header = reqHeaders 13847 googleapi.Expand(req.URL, map[string]string{ 13848 "parent": c.parent, 13849 }) 13850 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13851} 13852 13853// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.list" call. 13854// Exactly one of *GoogleCloudDialogflowV2ListContextsResponse or error 13855// will be non-nil. Any non-2xx status code is an error. Response 13856// headers are in either 13857// *GoogleCloudDialogflowV2ListContextsResponse.ServerResponse.Header or 13858// (if a response was returned at all) in 13859// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13860// whether the returned error was because http.StatusNotModified was 13861// returned. 13862func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListContextsResponse, error) { 13863 gensupport.SetOptions(c.urlParams_, opts...) 13864 res, err := c.doRequest("json") 13865 if res != nil && res.StatusCode == http.StatusNotModified { 13866 if res.Body != nil { 13867 res.Body.Close() 13868 } 13869 return nil, &googleapi.Error{ 13870 Code: res.StatusCode, 13871 Header: res.Header, 13872 } 13873 } 13874 if err != nil { 13875 return nil, err 13876 } 13877 defer googleapi.CloseBody(res) 13878 if err := googleapi.CheckResponse(res); err != nil { 13879 return nil, err 13880 } 13881 ret := &GoogleCloudDialogflowV2ListContextsResponse{ 13882 ServerResponse: googleapi.ServerResponse{ 13883 Header: res.Header, 13884 HTTPStatusCode: res.StatusCode, 13885 }, 13886 } 13887 target := &ret 13888 if err := gensupport.DecodeResponse(target, res); err != nil { 13889 return nil, err 13890 } 13891 return ret, nil 13892 // { 13893 // "description": "Returns the list of all contexts in the specified session.", 13894 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", 13895 // "httpMethod": "GET", 13896 // "id": "dialogflow.projects.agent.environments.users.sessions.contexts.list", 13897 // "parameterOrder": [ 13898 // "parent" 13899 // ], 13900 // "parameters": { 13901 // "pageSize": { 13902 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 13903 // "format": "int32", 13904 // "location": "query", 13905 // "type": "integer" 13906 // }, 13907 // "pageToken": { 13908 // "description": "Optional. The next_page_token value returned from a previous list request.", 13909 // "location": "query", 13910 // "type": "string" 13911 // }, 13912 // "parent": { 13913 // "description": "Required. The session to list all contexts from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 13914 // "location": "path", 13915 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", 13916 // "required": true, 13917 // "type": "string" 13918 // } 13919 // }, 13920 // "path": "v2/{+parent}/contexts", 13921 // "response": { 13922 // "$ref": "GoogleCloudDialogflowV2ListContextsResponse" 13923 // }, 13924 // "scopes": [ 13925 // "https://www.googleapis.com/auth/cloud-platform", 13926 // "https://www.googleapis.com/auth/dialogflow" 13927 // ] 13928 // } 13929 13930} 13931 13932// Pages invokes f for each page of results. 13933// A non-nil error returned from f will halt the iteration. 13934// The provided context supersedes any context provided to the Context method. 13935func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListContextsResponse) error) error { 13936 c.ctx_ = ctx 13937 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13938 for { 13939 x, err := c.Do() 13940 if err != nil { 13941 return err 13942 } 13943 if err := f(x); err != nil { 13944 return err 13945 } 13946 if x.NextPageToken == "" { 13947 return nil 13948 } 13949 c.PageToken(x.NextPageToken) 13950 } 13951} 13952 13953// method id "dialogflow.projects.agent.environments.users.sessions.contexts.patch": 13954 13955type ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall struct { 13956 s *Service 13957 nameid string 13958 googleclouddialogflowv2context *GoogleCloudDialogflowV2Context 13959 urlParams_ gensupport.URLParams 13960 ctx_ context.Context 13961 header_ http.Header 13962} 13963 13964// Patch: Updates the specified context. 13965func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Patch(nameid string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall { 13966 c := &ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13967 c.nameid = nameid 13968 c.googleclouddialogflowv2context = googleclouddialogflowv2context 13969 return c 13970} 13971 13972// UpdateMask sets the optional parameter "updateMask": The mask to 13973// control which fields get updated. 13974func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall { 13975 c.urlParams_.Set("updateMask", updateMask) 13976 return c 13977} 13978 13979// Fields allows partial responses to be retrieved. See 13980// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13981// for more information. 13982func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall { 13983 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13984 return c 13985} 13986 13987// Context sets the context to be used in this call's Do method. Any 13988// pending HTTP request will be aborted if the provided context is 13989// canceled. 13990func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall { 13991 c.ctx_ = ctx 13992 return c 13993} 13994 13995// Header returns an http.Header that can be modified by the caller to 13996// add HTTP headers to the request. 13997func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Header() http.Header { 13998 if c.header_ == nil { 13999 c.header_ = make(http.Header) 14000 } 14001 return c.header_ 14002} 14003 14004func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) { 14005 reqHeaders := make(http.Header) 14006 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 14007 for k, v := range c.header_ { 14008 reqHeaders[k] = v 14009 } 14010 reqHeaders.Set("User-Agent", c.s.userAgent()) 14011 var body io.Reader = nil 14012 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context) 14013 if err != nil { 14014 return nil, err 14015 } 14016 reqHeaders.Set("Content-Type", "application/json") 14017 c.urlParams_.Set("alt", alt) 14018 c.urlParams_.Set("prettyPrint", "false") 14019 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14020 urls += "?" + c.urlParams_.Encode() 14021 req, err := http.NewRequest("PATCH", urls, body) 14022 if err != nil { 14023 return nil, err 14024 } 14025 req.Header = reqHeaders 14026 googleapi.Expand(req.URL, map[string]string{ 14027 "name": c.nameid, 14028 }) 14029 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14030} 14031 14032// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.patch" call. 14033// Exactly one of *GoogleCloudDialogflowV2Context or error will be 14034// non-nil. Any non-2xx status code is an error. Response headers are in 14035// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a 14036// response was returned at all) in error.(*googleapi.Error).Header. Use 14037// googleapi.IsNotModified to check whether the returned error was 14038// because http.StatusNotModified was returned. 14039func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) { 14040 gensupport.SetOptions(c.urlParams_, opts...) 14041 res, err := c.doRequest("json") 14042 if res != nil && res.StatusCode == http.StatusNotModified { 14043 if res.Body != nil { 14044 res.Body.Close() 14045 } 14046 return nil, &googleapi.Error{ 14047 Code: res.StatusCode, 14048 Header: res.Header, 14049 } 14050 } 14051 if err != nil { 14052 return nil, err 14053 } 14054 defer googleapi.CloseBody(res) 14055 if err := googleapi.CheckResponse(res); err != nil { 14056 return nil, err 14057 } 14058 ret := &GoogleCloudDialogflowV2Context{ 14059 ServerResponse: googleapi.ServerResponse{ 14060 Header: res.Header, 14061 HTTPStatusCode: res.StatusCode, 14062 }, 14063 } 14064 target := &ret 14065 if err := gensupport.DecodeResponse(target, res); err != nil { 14066 return nil, err 14067 } 14068 return ret, nil 14069 // { 14070 // "description": "Updates the specified context.", 14071 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", 14072 // "httpMethod": "PATCH", 14073 // "id": "dialogflow.projects.agent.environments.users.sessions.contexts.patch", 14074 // "parameterOrder": [ 14075 // "name" 14076 // ], 14077 // "parameters": { 14078 // "name": { 14079 // "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`,\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\n\nThe `Context ID` is always converted to lowercase, may only contain\ncharacters in a-zA-Z0-9_-% and may be at most 250 bytes long.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\nThe following context names are reserved for internal use by Dialogflow.\nYou should not use these contexts or create contexts with these names:\n\n* `__system_counters__`\n* `*_id_dialog_context`\n* `*_dialog_params_size`", 14080 // "location": "path", 14081 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", 14082 // "required": true, 14083 // "type": "string" 14084 // }, 14085 // "updateMask": { 14086 // "description": "Optional. The mask to control which fields get updated.", 14087 // "format": "google-fieldmask", 14088 // "location": "query", 14089 // "type": "string" 14090 // } 14091 // }, 14092 // "path": "v2/{+name}", 14093 // "request": { 14094 // "$ref": "GoogleCloudDialogflowV2Context" 14095 // }, 14096 // "response": { 14097 // "$ref": "GoogleCloudDialogflowV2Context" 14098 // }, 14099 // "scopes": [ 14100 // "https://www.googleapis.com/auth/cloud-platform", 14101 // "https://www.googleapis.com/auth/dialogflow" 14102 // ] 14103 // } 14104 14105} 14106 14107// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.create": 14108 14109type ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall struct { 14110 s *Service 14111 parent string 14112 googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType 14113 urlParams_ gensupport.URLParams 14114 ctx_ context.Context 14115 header_ http.Header 14116} 14117 14118// Create: Creates a session entity type. 14119// 14120// If the specified session entity type already exists, overrides the 14121// session 14122// entity type. 14123// 14124// This method doesn't work with Google Assistant integration. 14125// Contact Dialogflow support if you need to use session entities 14126// with Google Assistant integration. 14127func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall { 14128 c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14129 c.parent = parent 14130 c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype 14131 return c 14132} 14133 14134// Fields allows partial responses to be retrieved. See 14135// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14136// for more information. 14137func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall { 14138 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14139 return c 14140} 14141 14142// Context sets the context to be used in this call's Do method. Any 14143// pending HTTP request will be aborted if the provided context is 14144// canceled. 14145func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall { 14146 c.ctx_ = ctx 14147 return c 14148} 14149 14150// Header returns an http.Header that can be modified by the caller to 14151// add HTTP headers to the request. 14152func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Header() http.Header { 14153 if c.header_ == nil { 14154 c.header_ = make(http.Header) 14155 } 14156 return c.header_ 14157} 14158 14159func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { 14160 reqHeaders := make(http.Header) 14161 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 14162 for k, v := range c.header_ { 14163 reqHeaders[k] = v 14164 } 14165 reqHeaders.Set("User-Agent", c.s.userAgent()) 14166 var body io.Reader = nil 14167 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype) 14168 if err != nil { 14169 return nil, err 14170 } 14171 reqHeaders.Set("Content-Type", "application/json") 14172 c.urlParams_.Set("alt", alt) 14173 c.urlParams_.Set("prettyPrint", "false") 14174 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes") 14175 urls += "?" + c.urlParams_.Encode() 14176 req, err := http.NewRequest("POST", urls, body) 14177 if err != nil { 14178 return nil, err 14179 } 14180 req.Header = reqHeaders 14181 googleapi.Expand(req.URL, map[string]string{ 14182 "parent": c.parent, 14183 }) 14184 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14185} 14186 14187// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.create" call. 14188// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error 14189// will be non-nil. Any non-2xx status code is an error. Response 14190// headers are in either 14191// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or 14192// (if a response was returned at all) in 14193// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14194// whether the returned error was because http.StatusNotModified was 14195// returned. 14196func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) { 14197 gensupport.SetOptions(c.urlParams_, opts...) 14198 res, err := c.doRequest("json") 14199 if res != nil && res.StatusCode == http.StatusNotModified { 14200 if res.Body != nil { 14201 res.Body.Close() 14202 } 14203 return nil, &googleapi.Error{ 14204 Code: res.StatusCode, 14205 Header: res.Header, 14206 } 14207 } 14208 if err != nil { 14209 return nil, err 14210 } 14211 defer googleapi.CloseBody(res) 14212 if err := googleapi.CheckResponse(res); err != nil { 14213 return nil, err 14214 } 14215 ret := &GoogleCloudDialogflowV2SessionEntityType{ 14216 ServerResponse: googleapi.ServerResponse{ 14217 Header: res.Header, 14218 HTTPStatusCode: res.StatusCode, 14219 }, 14220 } 14221 target := &ret 14222 if err := gensupport.DecodeResponse(target, res); err != nil { 14223 return nil, err 14224 } 14225 return ret, nil 14226 // { 14227 // "description": "Creates a session entity type.\n\nIf the specified session entity type already exists, overrides the session\nentity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.", 14228 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes", 14229 // "httpMethod": "POST", 14230 // "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.create", 14231 // "parameterOrder": [ 14232 // "parent" 14233 // ], 14234 // "parameters": { 14235 // "parent": { 14236 // "description": "Required. The session to create a session entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 14237 // "location": "path", 14238 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", 14239 // "required": true, 14240 // "type": "string" 14241 // } 14242 // }, 14243 // "path": "v2/{+parent}/entityTypes", 14244 // "request": { 14245 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 14246 // }, 14247 // "response": { 14248 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 14249 // }, 14250 // "scopes": [ 14251 // "https://www.googleapis.com/auth/cloud-platform", 14252 // "https://www.googleapis.com/auth/dialogflow" 14253 // ] 14254 // } 14255 14256} 14257 14258// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete": 14259 14260type ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall struct { 14261 s *Service 14262 name string 14263 urlParams_ gensupport.URLParams 14264 ctx_ context.Context 14265 header_ http.Header 14266} 14267 14268// Delete: Deletes the specified session entity type. 14269// 14270// This method doesn't work with Google Assistant integration. 14271// Contact Dialogflow support if you need to use session entities 14272// with Google Assistant integration. 14273func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Delete(name string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall { 14274 c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14275 c.name = name 14276 return c 14277} 14278 14279// Fields allows partial responses to be retrieved. See 14280// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14281// for more information. 14282func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall { 14283 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14284 return c 14285} 14286 14287// Context sets the context to be used in this call's Do method. Any 14288// pending HTTP request will be aborted if the provided context is 14289// canceled. 14290func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall { 14291 c.ctx_ = ctx 14292 return c 14293} 14294 14295// Header returns an http.Header that can be modified by the caller to 14296// add HTTP headers to the request. 14297func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Header() http.Header { 14298 if c.header_ == nil { 14299 c.header_ = make(http.Header) 14300 } 14301 return c.header_ 14302} 14303 14304func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 14305 reqHeaders := make(http.Header) 14306 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 14307 for k, v := range c.header_ { 14308 reqHeaders[k] = v 14309 } 14310 reqHeaders.Set("User-Agent", c.s.userAgent()) 14311 var body io.Reader = nil 14312 c.urlParams_.Set("alt", alt) 14313 c.urlParams_.Set("prettyPrint", "false") 14314 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14315 urls += "?" + c.urlParams_.Encode() 14316 req, err := http.NewRequest("DELETE", urls, body) 14317 if err != nil { 14318 return nil, err 14319 } 14320 req.Header = reqHeaders 14321 googleapi.Expand(req.URL, map[string]string{ 14322 "name": c.name, 14323 }) 14324 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14325} 14326 14327// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete" call. 14328// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14329// non-2xx status code is an error. Response headers are in either 14330// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14331// returned at all) in error.(*googleapi.Error).Header. Use 14332// googleapi.IsNotModified to check whether the returned error was 14333// because http.StatusNotModified was returned. 14334func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14335 gensupport.SetOptions(c.urlParams_, opts...) 14336 res, err := c.doRequest("json") 14337 if res != nil && res.StatusCode == http.StatusNotModified { 14338 if res.Body != nil { 14339 res.Body.Close() 14340 } 14341 return nil, &googleapi.Error{ 14342 Code: res.StatusCode, 14343 Header: res.Header, 14344 } 14345 } 14346 if err != nil { 14347 return nil, err 14348 } 14349 defer googleapi.CloseBody(res) 14350 if err := googleapi.CheckResponse(res); err != nil { 14351 return nil, err 14352 } 14353 ret := &GoogleProtobufEmpty{ 14354 ServerResponse: googleapi.ServerResponse{ 14355 Header: res.Header, 14356 HTTPStatusCode: res.StatusCode, 14357 }, 14358 } 14359 target := &ret 14360 if err := gensupport.DecodeResponse(target, res); err != nil { 14361 return nil, err 14362 } 14363 return ret, nil 14364 // { 14365 // "description": "Deletes the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.", 14366 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", 14367 // "httpMethod": "DELETE", 14368 // "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete", 14369 // "parameterOrder": [ 14370 // "name" 14371 // ], 14372 // "parameters": { 14373 // "name": { 14374 // "description": "Required. The name of the entity type to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 14375 // "location": "path", 14376 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", 14377 // "required": true, 14378 // "type": "string" 14379 // } 14380 // }, 14381 // "path": "v2/{+name}", 14382 // "response": { 14383 // "$ref": "GoogleProtobufEmpty" 14384 // }, 14385 // "scopes": [ 14386 // "https://www.googleapis.com/auth/cloud-platform", 14387 // "https://www.googleapis.com/auth/dialogflow" 14388 // ] 14389 // } 14390 14391} 14392 14393// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.get": 14394 14395type ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall struct { 14396 s *Service 14397 name string 14398 urlParams_ gensupport.URLParams 14399 ifNoneMatch_ string 14400 ctx_ context.Context 14401 header_ http.Header 14402} 14403 14404// Get: Retrieves the specified session entity type. 14405// 14406// This method doesn't work with Google Assistant integration. 14407// Contact Dialogflow support if you need to use session entities 14408// with Google Assistant integration. 14409func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Get(name string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall { 14410 c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14411 c.name = name 14412 return c 14413} 14414 14415// Fields allows partial responses to be retrieved. See 14416// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14417// for more information. 14418func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall { 14419 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14420 return c 14421} 14422 14423// IfNoneMatch sets the optional parameter which makes the operation 14424// fail if the object's ETag matches the given value. This is useful for 14425// getting updates only after the object has changed since the last 14426// request. Use googleapi.IsNotModified to check whether the response 14427// error from Do is the result of In-None-Match. 14428func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall { 14429 c.ifNoneMatch_ = entityTag 14430 return c 14431} 14432 14433// Context sets the context to be used in this call's Do method. Any 14434// pending HTTP request will be aborted if the provided context is 14435// canceled. 14436func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall { 14437 c.ctx_ = ctx 14438 return c 14439} 14440 14441// Header returns an http.Header that can be modified by the caller to 14442// add HTTP headers to the request. 14443func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Header() http.Header { 14444 if c.header_ == nil { 14445 c.header_ = make(http.Header) 14446 } 14447 return c.header_ 14448} 14449 14450func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { 14451 reqHeaders := make(http.Header) 14452 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 14453 for k, v := range c.header_ { 14454 reqHeaders[k] = v 14455 } 14456 reqHeaders.Set("User-Agent", c.s.userAgent()) 14457 if c.ifNoneMatch_ != "" { 14458 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14459 } 14460 var body io.Reader = nil 14461 c.urlParams_.Set("alt", alt) 14462 c.urlParams_.Set("prettyPrint", "false") 14463 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14464 urls += "?" + c.urlParams_.Encode() 14465 req, err := http.NewRequest("GET", urls, body) 14466 if err != nil { 14467 return nil, err 14468 } 14469 req.Header = reqHeaders 14470 googleapi.Expand(req.URL, map[string]string{ 14471 "name": c.name, 14472 }) 14473 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14474} 14475 14476// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.get" call. 14477// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error 14478// will be non-nil. Any non-2xx status code is an error. Response 14479// headers are in either 14480// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or 14481// (if a response was returned at all) in 14482// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14483// whether the returned error was because http.StatusNotModified was 14484// returned. 14485func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) { 14486 gensupport.SetOptions(c.urlParams_, opts...) 14487 res, err := c.doRequest("json") 14488 if res != nil && res.StatusCode == http.StatusNotModified { 14489 if res.Body != nil { 14490 res.Body.Close() 14491 } 14492 return nil, &googleapi.Error{ 14493 Code: res.StatusCode, 14494 Header: res.Header, 14495 } 14496 } 14497 if err != nil { 14498 return nil, err 14499 } 14500 defer googleapi.CloseBody(res) 14501 if err := googleapi.CheckResponse(res); err != nil { 14502 return nil, err 14503 } 14504 ret := &GoogleCloudDialogflowV2SessionEntityType{ 14505 ServerResponse: googleapi.ServerResponse{ 14506 Header: res.Header, 14507 HTTPStatusCode: res.StatusCode, 14508 }, 14509 } 14510 target := &ret 14511 if err := gensupport.DecodeResponse(target, res); err != nil { 14512 return nil, err 14513 } 14514 return ret, nil 14515 // { 14516 // "description": "Retrieves the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.", 14517 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", 14518 // "httpMethod": "GET", 14519 // "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.get", 14520 // "parameterOrder": [ 14521 // "name" 14522 // ], 14523 // "parameters": { 14524 // "name": { 14525 // "description": "Required. The name of the session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 14526 // "location": "path", 14527 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", 14528 // "required": true, 14529 // "type": "string" 14530 // } 14531 // }, 14532 // "path": "v2/{+name}", 14533 // "response": { 14534 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 14535 // }, 14536 // "scopes": [ 14537 // "https://www.googleapis.com/auth/cloud-platform", 14538 // "https://www.googleapis.com/auth/dialogflow" 14539 // ] 14540 // } 14541 14542} 14543 14544// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.list": 14545 14546type ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall struct { 14547 s *Service 14548 parent string 14549 urlParams_ gensupport.URLParams 14550 ifNoneMatch_ string 14551 ctx_ context.Context 14552 header_ http.Header 14553} 14554 14555// List: Returns the list of all session entity types in the specified 14556// session. 14557// 14558// This method doesn't work with Google Assistant integration. 14559// Contact Dialogflow support if you need to use session entities 14560// with Google Assistant integration. 14561func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) List(parent string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall { 14562 c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14563 c.parent = parent 14564 return c 14565} 14566 14567// PageSize sets the optional parameter "pageSize": The maximum number 14568// of items to return in a single page. By 14569// default 100 and at most 1000. 14570func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall { 14571 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14572 return c 14573} 14574 14575// PageToken sets the optional parameter "pageToken": The 14576// next_page_token value returned from a previous list request. 14577func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall { 14578 c.urlParams_.Set("pageToken", pageToken) 14579 return c 14580} 14581 14582// Fields allows partial responses to be retrieved. See 14583// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14584// for more information. 14585func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall { 14586 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14587 return c 14588} 14589 14590// IfNoneMatch sets the optional parameter which makes the operation 14591// fail if the object's ETag matches the given value. This is useful for 14592// getting updates only after the object has changed since the last 14593// request. Use googleapi.IsNotModified to check whether the response 14594// error from Do is the result of In-None-Match. 14595func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall { 14596 c.ifNoneMatch_ = entityTag 14597 return c 14598} 14599 14600// Context sets the context to be used in this call's Do method. Any 14601// pending HTTP request will be aborted if the provided context is 14602// canceled. 14603func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall { 14604 c.ctx_ = ctx 14605 return c 14606} 14607 14608// Header returns an http.Header that can be modified by the caller to 14609// add HTTP headers to the request. 14610func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Header() http.Header { 14611 if c.header_ == nil { 14612 c.header_ = make(http.Header) 14613 } 14614 return c.header_ 14615} 14616 14617func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) { 14618 reqHeaders := make(http.Header) 14619 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 14620 for k, v := range c.header_ { 14621 reqHeaders[k] = v 14622 } 14623 reqHeaders.Set("User-Agent", c.s.userAgent()) 14624 if c.ifNoneMatch_ != "" { 14625 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14626 } 14627 var body io.Reader = nil 14628 c.urlParams_.Set("alt", alt) 14629 c.urlParams_.Set("prettyPrint", "false") 14630 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes") 14631 urls += "?" + c.urlParams_.Encode() 14632 req, err := http.NewRequest("GET", urls, body) 14633 if err != nil { 14634 return nil, err 14635 } 14636 req.Header = reqHeaders 14637 googleapi.Expand(req.URL, map[string]string{ 14638 "parent": c.parent, 14639 }) 14640 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14641} 14642 14643// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.list" call. 14644// Exactly one of *GoogleCloudDialogflowV2ListSessionEntityTypesResponse 14645// or error will be non-nil. Any non-2xx status code is an error. 14646// Response headers are in either 14647// *GoogleCloudDialogflowV2ListSessionEntityTypesResponse.ServerResponse. 14648// Header or (if a response was returned at all) in 14649// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14650// whether the returned error was because http.StatusNotModified was 14651// returned. 14652func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListSessionEntityTypesResponse, error) { 14653 gensupport.SetOptions(c.urlParams_, opts...) 14654 res, err := c.doRequest("json") 14655 if res != nil && res.StatusCode == http.StatusNotModified { 14656 if res.Body != nil { 14657 res.Body.Close() 14658 } 14659 return nil, &googleapi.Error{ 14660 Code: res.StatusCode, 14661 Header: res.Header, 14662 } 14663 } 14664 if err != nil { 14665 return nil, err 14666 } 14667 defer googleapi.CloseBody(res) 14668 if err := googleapi.CheckResponse(res); err != nil { 14669 return nil, err 14670 } 14671 ret := &GoogleCloudDialogflowV2ListSessionEntityTypesResponse{ 14672 ServerResponse: googleapi.ServerResponse{ 14673 Header: res.Header, 14674 HTTPStatusCode: res.StatusCode, 14675 }, 14676 } 14677 target := &ret 14678 if err := gensupport.DecodeResponse(target, res); err != nil { 14679 return nil, err 14680 } 14681 return ret, nil 14682 // { 14683 // "description": "Returns the list of all session entity types in the specified session.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.", 14684 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes", 14685 // "httpMethod": "GET", 14686 // "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.list", 14687 // "parameterOrder": [ 14688 // "parent" 14689 // ], 14690 // "parameters": { 14691 // "pageSize": { 14692 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 14693 // "format": "int32", 14694 // "location": "query", 14695 // "type": "integer" 14696 // }, 14697 // "pageToken": { 14698 // "description": "Optional. The next_page_token value returned from a previous list request.", 14699 // "location": "query", 14700 // "type": "string" 14701 // }, 14702 // "parent": { 14703 // "description": "Required. The session to list all session entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 14704 // "location": "path", 14705 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", 14706 // "required": true, 14707 // "type": "string" 14708 // } 14709 // }, 14710 // "path": "v2/{+parent}/entityTypes", 14711 // "response": { 14712 // "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse" 14713 // }, 14714 // "scopes": [ 14715 // "https://www.googleapis.com/auth/cloud-platform", 14716 // "https://www.googleapis.com/auth/dialogflow" 14717 // ] 14718 // } 14719 14720} 14721 14722// Pages invokes f for each page of results. 14723// A non-nil error returned from f will halt the iteration. 14724// The provided context supersedes any context provided to the Context method. 14725func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListSessionEntityTypesResponse) error) error { 14726 c.ctx_ = ctx 14727 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14728 for { 14729 x, err := c.Do() 14730 if err != nil { 14731 return err 14732 } 14733 if err := f(x); err != nil { 14734 return err 14735 } 14736 if x.NextPageToken == "" { 14737 return nil 14738 } 14739 c.PageToken(x.NextPageToken) 14740 } 14741} 14742 14743// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch": 14744 14745type ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall struct { 14746 s *Service 14747 nameid string 14748 googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType 14749 urlParams_ gensupport.URLParams 14750 ctx_ context.Context 14751 header_ http.Header 14752} 14753 14754// Patch: Updates the specified session entity type. 14755// 14756// This method doesn't work with Google Assistant integration. 14757// Contact Dialogflow support if you need to use session entities 14758// with Google Assistant integration. 14759func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall { 14760 c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14761 c.nameid = nameid 14762 c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype 14763 return c 14764} 14765 14766// UpdateMask sets the optional parameter "updateMask": The mask to 14767// control which fields get updated. 14768func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall { 14769 c.urlParams_.Set("updateMask", updateMask) 14770 return c 14771} 14772 14773// Fields allows partial responses to be retrieved. See 14774// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14775// for more information. 14776func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall { 14777 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14778 return c 14779} 14780 14781// Context sets the context to be used in this call's Do method. Any 14782// pending HTTP request will be aborted if the provided context is 14783// canceled. 14784func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall { 14785 c.ctx_ = ctx 14786 return c 14787} 14788 14789// Header returns an http.Header that can be modified by the caller to 14790// add HTTP headers to the request. 14791func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Header() http.Header { 14792 if c.header_ == nil { 14793 c.header_ = make(http.Header) 14794 } 14795 return c.header_ 14796} 14797 14798func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { 14799 reqHeaders := make(http.Header) 14800 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 14801 for k, v := range c.header_ { 14802 reqHeaders[k] = v 14803 } 14804 reqHeaders.Set("User-Agent", c.s.userAgent()) 14805 var body io.Reader = nil 14806 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype) 14807 if err != nil { 14808 return nil, err 14809 } 14810 reqHeaders.Set("Content-Type", "application/json") 14811 c.urlParams_.Set("alt", alt) 14812 c.urlParams_.Set("prettyPrint", "false") 14813 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14814 urls += "?" + c.urlParams_.Encode() 14815 req, err := http.NewRequest("PATCH", urls, body) 14816 if err != nil { 14817 return nil, err 14818 } 14819 req.Header = reqHeaders 14820 googleapi.Expand(req.URL, map[string]string{ 14821 "name": c.nameid, 14822 }) 14823 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14824} 14825 14826// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch" call. 14827// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error 14828// will be non-nil. Any non-2xx status code is an error. Response 14829// headers are in either 14830// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or 14831// (if a response was returned at all) in 14832// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14833// whether the returned error was because http.StatusNotModified was 14834// returned. 14835func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) { 14836 gensupport.SetOptions(c.urlParams_, opts...) 14837 res, err := c.doRequest("json") 14838 if res != nil && res.StatusCode == http.StatusNotModified { 14839 if res.Body != nil { 14840 res.Body.Close() 14841 } 14842 return nil, &googleapi.Error{ 14843 Code: res.StatusCode, 14844 Header: res.Header, 14845 } 14846 } 14847 if err != nil { 14848 return nil, err 14849 } 14850 defer googleapi.CloseBody(res) 14851 if err := googleapi.CheckResponse(res); err != nil { 14852 return nil, err 14853 } 14854 ret := &GoogleCloudDialogflowV2SessionEntityType{ 14855 ServerResponse: googleapi.ServerResponse{ 14856 Header: res.Header, 14857 HTTPStatusCode: res.StatusCode, 14858 }, 14859 } 14860 target := &ret 14861 if err := gensupport.DecodeResponse(target, res); err != nil { 14862 return nil, err 14863 } 14864 return ret, nil 14865 // { 14866 // "description": "Updates the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.", 14867 // "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", 14868 // "httpMethod": "PATCH", 14869 // "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch", 14870 // "parameterOrder": [ 14871 // "name" 14872 // ], 14873 // "parameters": { 14874 // "name": { 14875 // "description": "Required. The unique identifier of this session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e`, or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\n`\u003cEntity Type Display Name\u003e` must be the display name of an existing entity\ntype in the same agent that will be overridden or supplemented.", 14876 // "location": "path", 14877 // "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", 14878 // "required": true, 14879 // "type": "string" 14880 // }, 14881 // "updateMask": { 14882 // "description": "Optional. The mask to control which fields get updated.", 14883 // "format": "google-fieldmask", 14884 // "location": "query", 14885 // "type": "string" 14886 // } 14887 // }, 14888 // "path": "v2/{+name}", 14889 // "request": { 14890 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 14891 // }, 14892 // "response": { 14893 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 14894 // }, 14895 // "scopes": [ 14896 // "https://www.googleapis.com/auth/cloud-platform", 14897 // "https://www.googleapis.com/auth/dialogflow" 14898 // ] 14899 // } 14900 14901} 14902 14903// method id "dialogflow.projects.agent.intents.batchDelete": 14904 14905type ProjectsAgentIntentsBatchDeleteCall struct { 14906 s *Service 14907 parent string 14908 googleclouddialogflowv2batchdeleteintentsrequest *GoogleCloudDialogflowV2BatchDeleteIntentsRequest 14909 urlParams_ gensupport.URLParams 14910 ctx_ context.Context 14911 header_ http.Header 14912} 14913 14914// BatchDelete: Deletes intents in the specified agent. 14915// 14916// Operation <response: google.protobuf.Empty> 14917func (r *ProjectsAgentIntentsService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteintentsrequest *GoogleCloudDialogflowV2BatchDeleteIntentsRequest) *ProjectsAgentIntentsBatchDeleteCall { 14918 c := &ProjectsAgentIntentsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14919 c.parent = parent 14920 c.googleclouddialogflowv2batchdeleteintentsrequest = googleclouddialogflowv2batchdeleteintentsrequest 14921 return c 14922} 14923 14924// Fields allows partial responses to be retrieved. See 14925// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14926// for more information. 14927func (c *ProjectsAgentIntentsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchDeleteCall { 14928 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14929 return c 14930} 14931 14932// Context sets the context to be used in this call's Do method. Any 14933// pending HTTP request will be aborted if the provided context is 14934// canceled. 14935func (c *ProjectsAgentIntentsBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchDeleteCall { 14936 c.ctx_ = ctx 14937 return c 14938} 14939 14940// Header returns an http.Header that can be modified by the caller to 14941// add HTTP headers to the request. 14942func (c *ProjectsAgentIntentsBatchDeleteCall) Header() http.Header { 14943 if c.header_ == nil { 14944 c.header_ = make(http.Header) 14945 } 14946 return c.header_ 14947} 14948 14949func (c *ProjectsAgentIntentsBatchDeleteCall) doRequest(alt string) (*http.Response, error) { 14950 reqHeaders := make(http.Header) 14951 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 14952 for k, v := range c.header_ { 14953 reqHeaders[k] = v 14954 } 14955 reqHeaders.Set("User-Agent", c.s.userAgent()) 14956 var body io.Reader = nil 14957 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteintentsrequest) 14958 if err != nil { 14959 return nil, err 14960 } 14961 reqHeaders.Set("Content-Type", "application/json") 14962 c.urlParams_.Set("alt", alt) 14963 c.urlParams_.Set("prettyPrint", "false") 14964 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents:batchDelete") 14965 urls += "?" + c.urlParams_.Encode() 14966 req, err := http.NewRequest("POST", urls, body) 14967 if err != nil { 14968 return nil, err 14969 } 14970 req.Header = reqHeaders 14971 googleapi.Expand(req.URL, map[string]string{ 14972 "parent": c.parent, 14973 }) 14974 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14975} 14976 14977// Do executes the "dialogflow.projects.agent.intents.batchDelete" call. 14978// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 14979// Any non-2xx status code is an error. Response headers are in either 14980// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 14981// was returned at all) in error.(*googleapi.Error).Header. Use 14982// googleapi.IsNotModified to check whether the returned error was 14983// because http.StatusNotModified was returned. 14984func (c *ProjectsAgentIntentsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 14985 gensupport.SetOptions(c.urlParams_, opts...) 14986 res, err := c.doRequest("json") 14987 if res != nil && res.StatusCode == http.StatusNotModified { 14988 if res.Body != nil { 14989 res.Body.Close() 14990 } 14991 return nil, &googleapi.Error{ 14992 Code: res.StatusCode, 14993 Header: res.Header, 14994 } 14995 } 14996 if err != nil { 14997 return nil, err 14998 } 14999 defer googleapi.CloseBody(res) 15000 if err := googleapi.CheckResponse(res); err != nil { 15001 return nil, err 15002 } 15003 ret := &GoogleLongrunningOperation{ 15004 ServerResponse: googleapi.ServerResponse{ 15005 Header: res.Header, 15006 HTTPStatusCode: res.StatusCode, 15007 }, 15008 } 15009 target := &ret 15010 if err := gensupport.DecodeResponse(target, res); err != nil { 15011 return nil, err 15012 } 15013 return ret, nil 15014 // { 15015 // "description": "Deletes intents in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 15016 // "flatPath": "v2/projects/{projectsId}/agent/intents:batchDelete", 15017 // "httpMethod": "POST", 15018 // "id": "dialogflow.projects.agent.intents.batchDelete", 15019 // "parameterOrder": [ 15020 // "parent" 15021 // ], 15022 // "parameters": { 15023 // "parent": { 15024 // "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.", 15025 // "location": "path", 15026 // "pattern": "^projects/[^/]+/agent$", 15027 // "required": true, 15028 // "type": "string" 15029 // } 15030 // }, 15031 // "path": "v2/{+parent}/intents:batchDelete", 15032 // "request": { 15033 // "$ref": "GoogleCloudDialogflowV2BatchDeleteIntentsRequest" 15034 // }, 15035 // "response": { 15036 // "$ref": "GoogleLongrunningOperation" 15037 // }, 15038 // "scopes": [ 15039 // "https://www.googleapis.com/auth/cloud-platform", 15040 // "https://www.googleapis.com/auth/dialogflow" 15041 // ] 15042 // } 15043 15044} 15045 15046// method id "dialogflow.projects.agent.intents.batchUpdate": 15047 15048type ProjectsAgentIntentsBatchUpdateCall struct { 15049 s *Service 15050 parent string 15051 googleclouddialogflowv2batchupdateintentsrequest *GoogleCloudDialogflowV2BatchUpdateIntentsRequest 15052 urlParams_ gensupport.URLParams 15053 ctx_ context.Context 15054 header_ http.Header 15055} 15056 15057// BatchUpdate: Updates/Creates multiple intents in the specified 15058// agent. 15059// 15060// Operation <response: BatchUpdateIntentsResponse> 15061func (r *ProjectsAgentIntentsService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateintentsrequest *GoogleCloudDialogflowV2BatchUpdateIntentsRequest) *ProjectsAgentIntentsBatchUpdateCall { 15062 c := &ProjectsAgentIntentsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15063 c.parent = parent 15064 c.googleclouddialogflowv2batchupdateintentsrequest = googleclouddialogflowv2batchupdateintentsrequest 15065 return c 15066} 15067 15068// Fields allows partial responses to be retrieved. See 15069// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15070// for more information. 15071func (c *ProjectsAgentIntentsBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchUpdateCall { 15072 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15073 return c 15074} 15075 15076// Context sets the context to be used in this call's Do method. Any 15077// pending HTTP request will be aborted if the provided context is 15078// canceled. 15079func (c *ProjectsAgentIntentsBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchUpdateCall { 15080 c.ctx_ = ctx 15081 return c 15082} 15083 15084// Header returns an http.Header that can be modified by the caller to 15085// add HTTP headers to the request. 15086func (c *ProjectsAgentIntentsBatchUpdateCall) Header() http.Header { 15087 if c.header_ == nil { 15088 c.header_ = make(http.Header) 15089 } 15090 return c.header_ 15091} 15092 15093func (c *ProjectsAgentIntentsBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 15094 reqHeaders := make(http.Header) 15095 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 15096 for k, v := range c.header_ { 15097 reqHeaders[k] = v 15098 } 15099 reqHeaders.Set("User-Agent", c.s.userAgent()) 15100 var body io.Reader = nil 15101 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateintentsrequest) 15102 if err != nil { 15103 return nil, err 15104 } 15105 reqHeaders.Set("Content-Type", "application/json") 15106 c.urlParams_.Set("alt", alt) 15107 c.urlParams_.Set("prettyPrint", "false") 15108 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents:batchUpdate") 15109 urls += "?" + c.urlParams_.Encode() 15110 req, err := http.NewRequest("POST", urls, body) 15111 if err != nil { 15112 return nil, err 15113 } 15114 req.Header = reqHeaders 15115 googleapi.Expand(req.URL, map[string]string{ 15116 "parent": c.parent, 15117 }) 15118 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15119} 15120 15121// Do executes the "dialogflow.projects.agent.intents.batchUpdate" call. 15122// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 15123// Any non-2xx status code is an error. Response headers are in either 15124// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 15125// was returned at all) in error.(*googleapi.Error).Header. Use 15126// googleapi.IsNotModified to check whether the returned error was 15127// because http.StatusNotModified was returned. 15128func (c *ProjectsAgentIntentsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 15129 gensupport.SetOptions(c.urlParams_, opts...) 15130 res, err := c.doRequest("json") 15131 if res != nil && res.StatusCode == http.StatusNotModified { 15132 if res.Body != nil { 15133 res.Body.Close() 15134 } 15135 return nil, &googleapi.Error{ 15136 Code: res.StatusCode, 15137 Header: res.Header, 15138 } 15139 } 15140 if err != nil { 15141 return nil, err 15142 } 15143 defer googleapi.CloseBody(res) 15144 if err := googleapi.CheckResponse(res); err != nil { 15145 return nil, err 15146 } 15147 ret := &GoogleLongrunningOperation{ 15148 ServerResponse: googleapi.ServerResponse{ 15149 Header: res.Header, 15150 HTTPStatusCode: res.StatusCode, 15151 }, 15152 } 15153 target := &ret 15154 if err := gensupport.DecodeResponse(target, res); err != nil { 15155 return nil, err 15156 } 15157 return ret, nil 15158 // { 15159 // "description": "Updates/Creates multiple intents in the specified agent.\n\nOperation \u003cresponse: BatchUpdateIntentsResponse\u003e", 15160 // "flatPath": "v2/projects/{projectsId}/agent/intents:batchUpdate", 15161 // "httpMethod": "POST", 15162 // "id": "dialogflow.projects.agent.intents.batchUpdate", 15163 // "parameterOrder": [ 15164 // "parent" 15165 // ], 15166 // "parameters": { 15167 // "parent": { 15168 // "description": "Required. The name of the agent to update or create intents in.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 15169 // "location": "path", 15170 // "pattern": "^projects/[^/]+/agent$", 15171 // "required": true, 15172 // "type": "string" 15173 // } 15174 // }, 15175 // "path": "v2/{+parent}/intents:batchUpdate", 15176 // "request": { 15177 // "$ref": "GoogleCloudDialogflowV2BatchUpdateIntentsRequest" 15178 // }, 15179 // "response": { 15180 // "$ref": "GoogleLongrunningOperation" 15181 // }, 15182 // "scopes": [ 15183 // "https://www.googleapis.com/auth/cloud-platform", 15184 // "https://www.googleapis.com/auth/dialogflow" 15185 // ] 15186 // } 15187 15188} 15189 15190// method id "dialogflow.projects.agent.intents.create": 15191 15192type ProjectsAgentIntentsCreateCall struct { 15193 s *Service 15194 parent string 15195 googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent 15196 urlParams_ gensupport.URLParams 15197 ctx_ context.Context 15198 header_ http.Header 15199} 15200 15201// Create: Creates an intent in the specified agent. 15202func (r *ProjectsAgentIntentsService) Create(parent string, googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent) *ProjectsAgentIntentsCreateCall { 15203 c := &ProjectsAgentIntentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15204 c.parent = parent 15205 c.googleclouddialogflowv2intent = googleclouddialogflowv2intent 15206 return c 15207} 15208 15209// IntentView sets the optional parameter "intentView": The resource 15210// view to apply to the returned intent. 15211// 15212// Possible values: 15213// "INTENT_VIEW_UNSPECIFIED" 15214// "INTENT_VIEW_FULL" 15215func (c *ProjectsAgentIntentsCreateCall) IntentView(intentView string) *ProjectsAgentIntentsCreateCall { 15216 c.urlParams_.Set("intentView", intentView) 15217 return c 15218} 15219 15220// LanguageCode sets the optional parameter "languageCode": The language 15221// used to access language-specific data. 15222// If not specified, the agent's default language is used. 15223// For more information, see 15224// [Multilingual intent and 15225// entity 15226// data](https://cloud.google.com/dialogflow/docs/agents-multiling 15227// ual#intent-entity). 15228func (c *ProjectsAgentIntentsCreateCall) LanguageCode(languageCode string) *ProjectsAgentIntentsCreateCall { 15229 c.urlParams_.Set("languageCode", languageCode) 15230 return c 15231} 15232 15233// Fields allows partial responses to be retrieved. See 15234// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15235// for more information. 15236func (c *ProjectsAgentIntentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsCreateCall { 15237 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15238 return c 15239} 15240 15241// Context sets the context to be used in this call's Do method. Any 15242// pending HTTP request will be aborted if the provided context is 15243// canceled. 15244func (c *ProjectsAgentIntentsCreateCall) Context(ctx context.Context) *ProjectsAgentIntentsCreateCall { 15245 c.ctx_ = ctx 15246 return c 15247} 15248 15249// Header returns an http.Header that can be modified by the caller to 15250// add HTTP headers to the request. 15251func (c *ProjectsAgentIntentsCreateCall) Header() http.Header { 15252 if c.header_ == nil { 15253 c.header_ = make(http.Header) 15254 } 15255 return c.header_ 15256} 15257 15258func (c *ProjectsAgentIntentsCreateCall) doRequest(alt string) (*http.Response, error) { 15259 reqHeaders := make(http.Header) 15260 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 15261 for k, v := range c.header_ { 15262 reqHeaders[k] = v 15263 } 15264 reqHeaders.Set("User-Agent", c.s.userAgent()) 15265 var body io.Reader = nil 15266 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2intent) 15267 if err != nil { 15268 return nil, err 15269 } 15270 reqHeaders.Set("Content-Type", "application/json") 15271 c.urlParams_.Set("alt", alt) 15272 c.urlParams_.Set("prettyPrint", "false") 15273 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents") 15274 urls += "?" + c.urlParams_.Encode() 15275 req, err := http.NewRequest("POST", urls, body) 15276 if err != nil { 15277 return nil, err 15278 } 15279 req.Header = reqHeaders 15280 googleapi.Expand(req.URL, map[string]string{ 15281 "parent": c.parent, 15282 }) 15283 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15284} 15285 15286// Do executes the "dialogflow.projects.agent.intents.create" call. 15287// Exactly one of *GoogleCloudDialogflowV2Intent or error will be 15288// non-nil. Any non-2xx status code is an error. Response headers are in 15289// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a 15290// response was returned at all) in error.(*googleapi.Error).Header. Use 15291// googleapi.IsNotModified to check whether the returned error was 15292// because http.StatusNotModified was returned. 15293func (c *ProjectsAgentIntentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) { 15294 gensupport.SetOptions(c.urlParams_, opts...) 15295 res, err := c.doRequest("json") 15296 if res != nil && res.StatusCode == http.StatusNotModified { 15297 if res.Body != nil { 15298 res.Body.Close() 15299 } 15300 return nil, &googleapi.Error{ 15301 Code: res.StatusCode, 15302 Header: res.Header, 15303 } 15304 } 15305 if err != nil { 15306 return nil, err 15307 } 15308 defer googleapi.CloseBody(res) 15309 if err := googleapi.CheckResponse(res); err != nil { 15310 return nil, err 15311 } 15312 ret := &GoogleCloudDialogflowV2Intent{ 15313 ServerResponse: googleapi.ServerResponse{ 15314 Header: res.Header, 15315 HTTPStatusCode: res.StatusCode, 15316 }, 15317 } 15318 target := &ret 15319 if err := gensupport.DecodeResponse(target, res); err != nil { 15320 return nil, err 15321 } 15322 return ret, nil 15323 // { 15324 // "description": "Creates an intent in the specified agent.", 15325 // "flatPath": "v2/projects/{projectsId}/agent/intents", 15326 // "httpMethod": "POST", 15327 // "id": "dialogflow.projects.agent.intents.create", 15328 // "parameterOrder": [ 15329 // "parent" 15330 // ], 15331 // "parameters": { 15332 // "intentView": { 15333 // "description": "Optional. The resource view to apply to the returned intent.", 15334 // "enum": [ 15335 // "INTENT_VIEW_UNSPECIFIED", 15336 // "INTENT_VIEW_FULL" 15337 // ], 15338 // "location": "query", 15339 // "type": "string" 15340 // }, 15341 // "languageCode": { 15342 // "description": "Optional. The language used to access language-specific data.\nIf not specified, the agent's default language is used.\nFor more information, see\n[Multilingual intent and entity\ndata](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", 15343 // "location": "query", 15344 // "type": "string" 15345 // }, 15346 // "parent": { 15347 // "description": "Required. The agent to create a intent for.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 15348 // "location": "path", 15349 // "pattern": "^projects/[^/]+/agent$", 15350 // "required": true, 15351 // "type": "string" 15352 // } 15353 // }, 15354 // "path": "v2/{+parent}/intents", 15355 // "request": { 15356 // "$ref": "GoogleCloudDialogflowV2Intent" 15357 // }, 15358 // "response": { 15359 // "$ref": "GoogleCloudDialogflowV2Intent" 15360 // }, 15361 // "scopes": [ 15362 // "https://www.googleapis.com/auth/cloud-platform", 15363 // "https://www.googleapis.com/auth/dialogflow" 15364 // ] 15365 // } 15366 15367} 15368 15369// method id "dialogflow.projects.agent.intents.delete": 15370 15371type ProjectsAgentIntentsDeleteCall struct { 15372 s *Service 15373 name string 15374 urlParams_ gensupport.URLParams 15375 ctx_ context.Context 15376 header_ http.Header 15377} 15378 15379// Delete: Deletes the specified intent and its direct or indirect 15380// followup intents. 15381func (r *ProjectsAgentIntentsService) Delete(name string) *ProjectsAgentIntentsDeleteCall { 15382 c := &ProjectsAgentIntentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15383 c.name = name 15384 return c 15385} 15386 15387// Fields allows partial responses to be retrieved. See 15388// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15389// for more information. 15390func (c *ProjectsAgentIntentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsDeleteCall { 15391 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15392 return c 15393} 15394 15395// Context sets the context to be used in this call's Do method. Any 15396// pending HTTP request will be aborted if the provided context is 15397// canceled. 15398func (c *ProjectsAgentIntentsDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsDeleteCall { 15399 c.ctx_ = ctx 15400 return c 15401} 15402 15403// Header returns an http.Header that can be modified by the caller to 15404// add HTTP headers to the request. 15405func (c *ProjectsAgentIntentsDeleteCall) Header() http.Header { 15406 if c.header_ == nil { 15407 c.header_ = make(http.Header) 15408 } 15409 return c.header_ 15410} 15411 15412func (c *ProjectsAgentIntentsDeleteCall) doRequest(alt string) (*http.Response, error) { 15413 reqHeaders := make(http.Header) 15414 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 15415 for k, v := range c.header_ { 15416 reqHeaders[k] = v 15417 } 15418 reqHeaders.Set("User-Agent", c.s.userAgent()) 15419 var body io.Reader = nil 15420 c.urlParams_.Set("alt", alt) 15421 c.urlParams_.Set("prettyPrint", "false") 15422 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15423 urls += "?" + c.urlParams_.Encode() 15424 req, err := http.NewRequest("DELETE", urls, body) 15425 if err != nil { 15426 return nil, err 15427 } 15428 req.Header = reqHeaders 15429 googleapi.Expand(req.URL, map[string]string{ 15430 "name": c.name, 15431 }) 15432 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15433} 15434 15435// Do executes the "dialogflow.projects.agent.intents.delete" call. 15436// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 15437// non-2xx status code is an error. Response headers are in either 15438// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 15439// returned at all) in error.(*googleapi.Error).Header. Use 15440// googleapi.IsNotModified to check whether the returned error was 15441// because http.StatusNotModified was returned. 15442func (c *ProjectsAgentIntentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 15443 gensupport.SetOptions(c.urlParams_, opts...) 15444 res, err := c.doRequest("json") 15445 if res != nil && res.StatusCode == http.StatusNotModified { 15446 if res.Body != nil { 15447 res.Body.Close() 15448 } 15449 return nil, &googleapi.Error{ 15450 Code: res.StatusCode, 15451 Header: res.Header, 15452 } 15453 } 15454 if err != nil { 15455 return nil, err 15456 } 15457 defer googleapi.CloseBody(res) 15458 if err := googleapi.CheckResponse(res); err != nil { 15459 return nil, err 15460 } 15461 ret := &GoogleProtobufEmpty{ 15462 ServerResponse: googleapi.ServerResponse{ 15463 Header: res.Header, 15464 HTTPStatusCode: res.StatusCode, 15465 }, 15466 } 15467 target := &ret 15468 if err := gensupport.DecodeResponse(target, res); err != nil { 15469 return nil, err 15470 } 15471 return ret, nil 15472 // { 15473 // "description": "Deletes the specified intent and its direct or indirect followup intents.", 15474 // "flatPath": "v2/projects/{projectsId}/agent/intents/{intentsId}", 15475 // "httpMethod": "DELETE", 15476 // "id": "dialogflow.projects.agent.intents.delete", 15477 // "parameterOrder": [ 15478 // "name" 15479 // ], 15480 // "parameters": { 15481 // "name": { 15482 // "description": "Required. The name of the intent to delete. If this intent has direct or\nindirect followup intents, we also delete them.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.", 15483 // "location": "path", 15484 // "pattern": "^projects/[^/]+/agent/intents/[^/]+$", 15485 // "required": true, 15486 // "type": "string" 15487 // } 15488 // }, 15489 // "path": "v2/{+name}", 15490 // "response": { 15491 // "$ref": "GoogleProtobufEmpty" 15492 // }, 15493 // "scopes": [ 15494 // "https://www.googleapis.com/auth/cloud-platform", 15495 // "https://www.googleapis.com/auth/dialogflow" 15496 // ] 15497 // } 15498 15499} 15500 15501// method id "dialogflow.projects.agent.intents.get": 15502 15503type ProjectsAgentIntentsGetCall struct { 15504 s *Service 15505 name string 15506 urlParams_ gensupport.URLParams 15507 ifNoneMatch_ string 15508 ctx_ context.Context 15509 header_ http.Header 15510} 15511 15512// Get: Retrieves the specified intent. 15513func (r *ProjectsAgentIntentsService) Get(name string) *ProjectsAgentIntentsGetCall { 15514 c := &ProjectsAgentIntentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15515 c.name = name 15516 return c 15517} 15518 15519// IntentView sets the optional parameter "intentView": The resource 15520// view to apply to the returned intent. 15521// 15522// Possible values: 15523// "INTENT_VIEW_UNSPECIFIED" 15524// "INTENT_VIEW_FULL" 15525func (c *ProjectsAgentIntentsGetCall) IntentView(intentView string) *ProjectsAgentIntentsGetCall { 15526 c.urlParams_.Set("intentView", intentView) 15527 return c 15528} 15529 15530// LanguageCode sets the optional parameter "languageCode": The language 15531// used to access language-specific data. 15532// If not specified, the agent's default language is used. 15533// For more information, see 15534// [Multilingual intent and 15535// entity 15536// data](https://cloud.google.com/dialogflow/docs/agents-multiling 15537// ual#intent-entity). 15538func (c *ProjectsAgentIntentsGetCall) LanguageCode(languageCode string) *ProjectsAgentIntentsGetCall { 15539 c.urlParams_.Set("languageCode", languageCode) 15540 return c 15541} 15542 15543// Fields allows partial responses to be retrieved. See 15544// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15545// for more information. 15546func (c *ProjectsAgentIntentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsGetCall { 15547 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15548 return c 15549} 15550 15551// IfNoneMatch sets the optional parameter which makes the operation 15552// fail if the object's ETag matches the given value. This is useful for 15553// getting updates only after the object has changed since the last 15554// request. Use googleapi.IsNotModified to check whether the response 15555// error from Do is the result of In-None-Match. 15556func (c *ProjectsAgentIntentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsGetCall { 15557 c.ifNoneMatch_ = entityTag 15558 return c 15559} 15560 15561// Context sets the context to be used in this call's Do method. Any 15562// pending HTTP request will be aborted if the provided context is 15563// canceled. 15564func (c *ProjectsAgentIntentsGetCall) Context(ctx context.Context) *ProjectsAgentIntentsGetCall { 15565 c.ctx_ = ctx 15566 return c 15567} 15568 15569// Header returns an http.Header that can be modified by the caller to 15570// add HTTP headers to the request. 15571func (c *ProjectsAgentIntentsGetCall) Header() http.Header { 15572 if c.header_ == nil { 15573 c.header_ = make(http.Header) 15574 } 15575 return c.header_ 15576} 15577 15578func (c *ProjectsAgentIntentsGetCall) doRequest(alt string) (*http.Response, error) { 15579 reqHeaders := make(http.Header) 15580 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 15581 for k, v := range c.header_ { 15582 reqHeaders[k] = v 15583 } 15584 reqHeaders.Set("User-Agent", c.s.userAgent()) 15585 if c.ifNoneMatch_ != "" { 15586 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15587 } 15588 var body io.Reader = nil 15589 c.urlParams_.Set("alt", alt) 15590 c.urlParams_.Set("prettyPrint", "false") 15591 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15592 urls += "?" + c.urlParams_.Encode() 15593 req, err := http.NewRequest("GET", urls, body) 15594 if err != nil { 15595 return nil, err 15596 } 15597 req.Header = reqHeaders 15598 googleapi.Expand(req.URL, map[string]string{ 15599 "name": c.name, 15600 }) 15601 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15602} 15603 15604// Do executes the "dialogflow.projects.agent.intents.get" call. 15605// Exactly one of *GoogleCloudDialogflowV2Intent or error will be 15606// non-nil. Any non-2xx status code is an error. Response headers are in 15607// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a 15608// response was returned at all) in error.(*googleapi.Error).Header. Use 15609// googleapi.IsNotModified to check whether the returned error was 15610// because http.StatusNotModified was returned. 15611func (c *ProjectsAgentIntentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) { 15612 gensupport.SetOptions(c.urlParams_, opts...) 15613 res, err := c.doRequest("json") 15614 if res != nil && res.StatusCode == http.StatusNotModified { 15615 if res.Body != nil { 15616 res.Body.Close() 15617 } 15618 return nil, &googleapi.Error{ 15619 Code: res.StatusCode, 15620 Header: res.Header, 15621 } 15622 } 15623 if err != nil { 15624 return nil, err 15625 } 15626 defer googleapi.CloseBody(res) 15627 if err := googleapi.CheckResponse(res); err != nil { 15628 return nil, err 15629 } 15630 ret := &GoogleCloudDialogflowV2Intent{ 15631 ServerResponse: googleapi.ServerResponse{ 15632 Header: res.Header, 15633 HTTPStatusCode: res.StatusCode, 15634 }, 15635 } 15636 target := &ret 15637 if err := gensupport.DecodeResponse(target, res); err != nil { 15638 return nil, err 15639 } 15640 return ret, nil 15641 // { 15642 // "description": "Retrieves the specified intent.", 15643 // "flatPath": "v2/projects/{projectsId}/agent/intents/{intentsId}", 15644 // "httpMethod": "GET", 15645 // "id": "dialogflow.projects.agent.intents.get", 15646 // "parameterOrder": [ 15647 // "name" 15648 // ], 15649 // "parameters": { 15650 // "intentView": { 15651 // "description": "Optional. The resource view to apply to the returned intent.", 15652 // "enum": [ 15653 // "INTENT_VIEW_UNSPECIFIED", 15654 // "INTENT_VIEW_FULL" 15655 // ], 15656 // "location": "query", 15657 // "type": "string" 15658 // }, 15659 // "languageCode": { 15660 // "description": "Optional. The language used to access language-specific data.\nIf not specified, the agent's default language is used.\nFor more information, see\n[Multilingual intent and entity\ndata](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", 15661 // "location": "query", 15662 // "type": "string" 15663 // }, 15664 // "name": { 15665 // "description": "Required. The name of the intent.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.", 15666 // "location": "path", 15667 // "pattern": "^projects/[^/]+/agent/intents/[^/]+$", 15668 // "required": true, 15669 // "type": "string" 15670 // } 15671 // }, 15672 // "path": "v2/{+name}", 15673 // "response": { 15674 // "$ref": "GoogleCloudDialogflowV2Intent" 15675 // }, 15676 // "scopes": [ 15677 // "https://www.googleapis.com/auth/cloud-platform", 15678 // "https://www.googleapis.com/auth/dialogflow" 15679 // ] 15680 // } 15681 15682} 15683 15684// method id "dialogflow.projects.agent.intents.list": 15685 15686type ProjectsAgentIntentsListCall struct { 15687 s *Service 15688 parent string 15689 urlParams_ gensupport.URLParams 15690 ifNoneMatch_ string 15691 ctx_ context.Context 15692 header_ http.Header 15693} 15694 15695// List: Returns the list of all intents in the specified agent. 15696func (r *ProjectsAgentIntentsService) List(parent string) *ProjectsAgentIntentsListCall { 15697 c := &ProjectsAgentIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15698 c.parent = parent 15699 return c 15700} 15701 15702// IntentView sets the optional parameter "intentView": The resource 15703// view to apply to the returned intent. 15704// 15705// Possible values: 15706// "INTENT_VIEW_UNSPECIFIED" 15707// "INTENT_VIEW_FULL" 15708func (c *ProjectsAgentIntentsListCall) IntentView(intentView string) *ProjectsAgentIntentsListCall { 15709 c.urlParams_.Set("intentView", intentView) 15710 return c 15711} 15712 15713// LanguageCode sets the optional parameter "languageCode": The language 15714// used to access language-specific data. 15715// If not specified, the agent's default language is used. 15716// For more information, see 15717// [Multilingual intent and 15718// entity 15719// data](https://cloud.google.com/dialogflow/docs/agents-multiling 15720// ual#intent-entity). 15721func (c *ProjectsAgentIntentsListCall) LanguageCode(languageCode string) *ProjectsAgentIntentsListCall { 15722 c.urlParams_.Set("languageCode", languageCode) 15723 return c 15724} 15725 15726// PageSize sets the optional parameter "pageSize": The maximum number 15727// of items to return in a single page. By 15728// default 100 and at most 1000. 15729func (c *ProjectsAgentIntentsListCall) PageSize(pageSize int64) *ProjectsAgentIntentsListCall { 15730 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15731 return c 15732} 15733 15734// PageToken sets the optional parameter "pageToken": The 15735// next_page_token value returned from a previous list request. 15736func (c *ProjectsAgentIntentsListCall) PageToken(pageToken string) *ProjectsAgentIntentsListCall { 15737 c.urlParams_.Set("pageToken", pageToken) 15738 return c 15739} 15740 15741// Fields allows partial responses to be retrieved. See 15742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15743// for more information. 15744func (c *ProjectsAgentIntentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsListCall { 15745 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15746 return c 15747} 15748 15749// IfNoneMatch sets the optional parameter which makes the operation 15750// fail if the object's ETag matches the given value. This is useful for 15751// getting updates only after the object has changed since the last 15752// request. Use googleapi.IsNotModified to check whether the response 15753// error from Do is the result of In-None-Match. 15754func (c *ProjectsAgentIntentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsListCall { 15755 c.ifNoneMatch_ = entityTag 15756 return c 15757} 15758 15759// Context sets the context to be used in this call's Do method. Any 15760// pending HTTP request will be aborted if the provided context is 15761// canceled. 15762func (c *ProjectsAgentIntentsListCall) Context(ctx context.Context) *ProjectsAgentIntentsListCall { 15763 c.ctx_ = ctx 15764 return c 15765} 15766 15767// Header returns an http.Header that can be modified by the caller to 15768// add HTTP headers to the request. 15769func (c *ProjectsAgentIntentsListCall) Header() http.Header { 15770 if c.header_ == nil { 15771 c.header_ = make(http.Header) 15772 } 15773 return c.header_ 15774} 15775 15776func (c *ProjectsAgentIntentsListCall) doRequest(alt string) (*http.Response, error) { 15777 reqHeaders := make(http.Header) 15778 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 15779 for k, v := range c.header_ { 15780 reqHeaders[k] = v 15781 } 15782 reqHeaders.Set("User-Agent", c.s.userAgent()) 15783 if c.ifNoneMatch_ != "" { 15784 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15785 } 15786 var body io.Reader = nil 15787 c.urlParams_.Set("alt", alt) 15788 c.urlParams_.Set("prettyPrint", "false") 15789 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents") 15790 urls += "?" + c.urlParams_.Encode() 15791 req, err := http.NewRequest("GET", urls, body) 15792 if err != nil { 15793 return nil, err 15794 } 15795 req.Header = reqHeaders 15796 googleapi.Expand(req.URL, map[string]string{ 15797 "parent": c.parent, 15798 }) 15799 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15800} 15801 15802// Do executes the "dialogflow.projects.agent.intents.list" call. 15803// Exactly one of *GoogleCloudDialogflowV2ListIntentsResponse or error 15804// will be non-nil. Any non-2xx status code is an error. Response 15805// headers are in either 15806// *GoogleCloudDialogflowV2ListIntentsResponse.ServerResponse.Header or 15807// (if a response was returned at all) in 15808// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15809// whether the returned error was because http.StatusNotModified was 15810// returned. 15811func (c *ProjectsAgentIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListIntentsResponse, error) { 15812 gensupport.SetOptions(c.urlParams_, opts...) 15813 res, err := c.doRequest("json") 15814 if res != nil && res.StatusCode == http.StatusNotModified { 15815 if res.Body != nil { 15816 res.Body.Close() 15817 } 15818 return nil, &googleapi.Error{ 15819 Code: res.StatusCode, 15820 Header: res.Header, 15821 } 15822 } 15823 if err != nil { 15824 return nil, err 15825 } 15826 defer googleapi.CloseBody(res) 15827 if err := googleapi.CheckResponse(res); err != nil { 15828 return nil, err 15829 } 15830 ret := &GoogleCloudDialogflowV2ListIntentsResponse{ 15831 ServerResponse: googleapi.ServerResponse{ 15832 Header: res.Header, 15833 HTTPStatusCode: res.StatusCode, 15834 }, 15835 } 15836 target := &ret 15837 if err := gensupport.DecodeResponse(target, res); err != nil { 15838 return nil, err 15839 } 15840 return ret, nil 15841 // { 15842 // "description": "Returns the list of all intents in the specified agent.", 15843 // "flatPath": "v2/projects/{projectsId}/agent/intents", 15844 // "httpMethod": "GET", 15845 // "id": "dialogflow.projects.agent.intents.list", 15846 // "parameterOrder": [ 15847 // "parent" 15848 // ], 15849 // "parameters": { 15850 // "intentView": { 15851 // "description": "Optional. The resource view to apply to the returned intent.", 15852 // "enum": [ 15853 // "INTENT_VIEW_UNSPECIFIED", 15854 // "INTENT_VIEW_FULL" 15855 // ], 15856 // "location": "query", 15857 // "type": "string" 15858 // }, 15859 // "languageCode": { 15860 // "description": "Optional. The language used to access language-specific data.\nIf not specified, the agent's default language is used.\nFor more information, see\n[Multilingual intent and entity\ndata](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", 15861 // "location": "query", 15862 // "type": "string" 15863 // }, 15864 // "pageSize": { 15865 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 15866 // "format": "int32", 15867 // "location": "query", 15868 // "type": "integer" 15869 // }, 15870 // "pageToken": { 15871 // "description": "Optional. The next_page_token value returned from a previous list request.", 15872 // "location": "query", 15873 // "type": "string" 15874 // }, 15875 // "parent": { 15876 // "description": "Required. The agent to list all intents from.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 15877 // "location": "path", 15878 // "pattern": "^projects/[^/]+/agent$", 15879 // "required": true, 15880 // "type": "string" 15881 // } 15882 // }, 15883 // "path": "v2/{+parent}/intents", 15884 // "response": { 15885 // "$ref": "GoogleCloudDialogflowV2ListIntentsResponse" 15886 // }, 15887 // "scopes": [ 15888 // "https://www.googleapis.com/auth/cloud-platform", 15889 // "https://www.googleapis.com/auth/dialogflow" 15890 // ] 15891 // } 15892 15893} 15894 15895// Pages invokes f for each page of results. 15896// A non-nil error returned from f will halt the iteration. 15897// The provided context supersedes any context provided to the Context method. 15898func (c *ProjectsAgentIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListIntentsResponse) error) error { 15899 c.ctx_ = ctx 15900 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15901 for { 15902 x, err := c.Do() 15903 if err != nil { 15904 return err 15905 } 15906 if err := f(x); err != nil { 15907 return err 15908 } 15909 if x.NextPageToken == "" { 15910 return nil 15911 } 15912 c.PageToken(x.NextPageToken) 15913 } 15914} 15915 15916// method id "dialogflow.projects.agent.intents.patch": 15917 15918type ProjectsAgentIntentsPatchCall struct { 15919 s *Service 15920 nameid string 15921 googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent 15922 urlParams_ gensupport.URLParams 15923 ctx_ context.Context 15924 header_ http.Header 15925} 15926 15927// Patch: Updates the specified intent. 15928func (r *ProjectsAgentIntentsService) Patch(nameid string, googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent) *ProjectsAgentIntentsPatchCall { 15929 c := &ProjectsAgentIntentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15930 c.nameid = nameid 15931 c.googleclouddialogflowv2intent = googleclouddialogflowv2intent 15932 return c 15933} 15934 15935// IntentView sets the optional parameter "intentView": The resource 15936// view to apply to the returned intent. 15937// 15938// Possible values: 15939// "INTENT_VIEW_UNSPECIFIED" 15940// "INTENT_VIEW_FULL" 15941func (c *ProjectsAgentIntentsPatchCall) IntentView(intentView string) *ProjectsAgentIntentsPatchCall { 15942 c.urlParams_.Set("intentView", intentView) 15943 return c 15944} 15945 15946// LanguageCode sets the optional parameter "languageCode": The language 15947// used to access language-specific data. 15948// If not specified, the agent's default language is used. 15949// For more information, see 15950// [Multilingual intent and 15951// entity 15952// data](https://cloud.google.com/dialogflow/docs/agents-multiling 15953// ual#intent-entity). 15954func (c *ProjectsAgentIntentsPatchCall) LanguageCode(languageCode string) *ProjectsAgentIntentsPatchCall { 15955 c.urlParams_.Set("languageCode", languageCode) 15956 return c 15957} 15958 15959// UpdateMask sets the optional parameter "updateMask": The mask to 15960// control which fields get updated. 15961func (c *ProjectsAgentIntentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentIntentsPatchCall { 15962 c.urlParams_.Set("updateMask", updateMask) 15963 return c 15964} 15965 15966// Fields allows partial responses to be retrieved. See 15967// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15968// for more information. 15969func (c *ProjectsAgentIntentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsPatchCall { 15970 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15971 return c 15972} 15973 15974// Context sets the context to be used in this call's Do method. Any 15975// pending HTTP request will be aborted if the provided context is 15976// canceled. 15977func (c *ProjectsAgentIntentsPatchCall) Context(ctx context.Context) *ProjectsAgentIntentsPatchCall { 15978 c.ctx_ = ctx 15979 return c 15980} 15981 15982// Header returns an http.Header that can be modified by the caller to 15983// add HTTP headers to the request. 15984func (c *ProjectsAgentIntentsPatchCall) Header() http.Header { 15985 if c.header_ == nil { 15986 c.header_ = make(http.Header) 15987 } 15988 return c.header_ 15989} 15990 15991func (c *ProjectsAgentIntentsPatchCall) doRequest(alt string) (*http.Response, error) { 15992 reqHeaders := make(http.Header) 15993 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 15994 for k, v := range c.header_ { 15995 reqHeaders[k] = v 15996 } 15997 reqHeaders.Set("User-Agent", c.s.userAgent()) 15998 var body io.Reader = nil 15999 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2intent) 16000 if err != nil { 16001 return nil, err 16002 } 16003 reqHeaders.Set("Content-Type", "application/json") 16004 c.urlParams_.Set("alt", alt) 16005 c.urlParams_.Set("prettyPrint", "false") 16006 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16007 urls += "?" + c.urlParams_.Encode() 16008 req, err := http.NewRequest("PATCH", urls, body) 16009 if err != nil { 16010 return nil, err 16011 } 16012 req.Header = reqHeaders 16013 googleapi.Expand(req.URL, map[string]string{ 16014 "name": c.nameid, 16015 }) 16016 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16017} 16018 16019// Do executes the "dialogflow.projects.agent.intents.patch" call. 16020// Exactly one of *GoogleCloudDialogflowV2Intent or error will be 16021// non-nil. Any non-2xx status code is an error. Response headers are in 16022// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a 16023// response was returned at all) in error.(*googleapi.Error).Header. Use 16024// googleapi.IsNotModified to check whether the returned error was 16025// because http.StatusNotModified was returned. 16026func (c *ProjectsAgentIntentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) { 16027 gensupport.SetOptions(c.urlParams_, opts...) 16028 res, err := c.doRequest("json") 16029 if res != nil && res.StatusCode == http.StatusNotModified { 16030 if res.Body != nil { 16031 res.Body.Close() 16032 } 16033 return nil, &googleapi.Error{ 16034 Code: res.StatusCode, 16035 Header: res.Header, 16036 } 16037 } 16038 if err != nil { 16039 return nil, err 16040 } 16041 defer googleapi.CloseBody(res) 16042 if err := googleapi.CheckResponse(res); err != nil { 16043 return nil, err 16044 } 16045 ret := &GoogleCloudDialogflowV2Intent{ 16046 ServerResponse: googleapi.ServerResponse{ 16047 Header: res.Header, 16048 HTTPStatusCode: res.StatusCode, 16049 }, 16050 } 16051 target := &ret 16052 if err := gensupport.DecodeResponse(target, res); err != nil { 16053 return nil, err 16054 } 16055 return ret, nil 16056 // { 16057 // "description": "Updates the specified intent.", 16058 // "flatPath": "v2/projects/{projectsId}/agent/intents/{intentsId}", 16059 // "httpMethod": "PATCH", 16060 // "id": "dialogflow.projects.agent.intents.patch", 16061 // "parameterOrder": [ 16062 // "name" 16063 // ], 16064 // "parameters": { 16065 // "intentView": { 16066 // "description": "Optional. The resource view to apply to the returned intent.", 16067 // "enum": [ 16068 // "INTENT_VIEW_UNSPECIFIED", 16069 // "INTENT_VIEW_FULL" 16070 // ], 16071 // "location": "query", 16072 // "type": "string" 16073 // }, 16074 // "languageCode": { 16075 // "description": "Optional. The language used to access language-specific data.\nIf not specified, the agent's default language is used.\nFor more information, see\n[Multilingual intent and entity\ndata](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", 16076 // "location": "query", 16077 // "type": "string" 16078 // }, 16079 // "name": { 16080 // "description": "Optional. The unique identifier of this intent.\nRequired for Intents.UpdateIntent and Intents.BatchUpdateIntents\nmethods.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.", 16081 // "location": "path", 16082 // "pattern": "^projects/[^/]+/agent/intents/[^/]+$", 16083 // "required": true, 16084 // "type": "string" 16085 // }, 16086 // "updateMask": { 16087 // "description": "Optional. The mask to control which fields get updated.", 16088 // "format": "google-fieldmask", 16089 // "location": "query", 16090 // "type": "string" 16091 // } 16092 // }, 16093 // "path": "v2/{+name}", 16094 // "request": { 16095 // "$ref": "GoogleCloudDialogflowV2Intent" 16096 // }, 16097 // "response": { 16098 // "$ref": "GoogleCloudDialogflowV2Intent" 16099 // }, 16100 // "scopes": [ 16101 // "https://www.googleapis.com/auth/cloud-platform", 16102 // "https://www.googleapis.com/auth/dialogflow" 16103 // ] 16104 // } 16105 16106} 16107 16108// method id "dialogflow.projects.agent.sessions.deleteContexts": 16109 16110type ProjectsAgentSessionsDeleteContextsCall struct { 16111 s *Service 16112 parent string 16113 urlParams_ gensupport.URLParams 16114 ctx_ context.Context 16115 header_ http.Header 16116} 16117 16118// DeleteContexts: Deletes all active contexts in the specified session. 16119func (r *ProjectsAgentSessionsService) DeleteContexts(parent string) *ProjectsAgentSessionsDeleteContextsCall { 16120 c := &ProjectsAgentSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16121 c.parent = parent 16122 return c 16123} 16124 16125// Fields allows partial responses to be retrieved. See 16126// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16127// for more information. 16128func (c *ProjectsAgentSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDeleteContextsCall { 16129 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16130 return c 16131} 16132 16133// Context sets the context to be used in this call's Do method. Any 16134// pending HTTP request will be aborted if the provided context is 16135// canceled. 16136func (c *ProjectsAgentSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentSessionsDeleteContextsCall { 16137 c.ctx_ = ctx 16138 return c 16139} 16140 16141// Header returns an http.Header that can be modified by the caller to 16142// add HTTP headers to the request. 16143func (c *ProjectsAgentSessionsDeleteContextsCall) Header() http.Header { 16144 if c.header_ == nil { 16145 c.header_ = make(http.Header) 16146 } 16147 return c.header_ 16148} 16149 16150func (c *ProjectsAgentSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) { 16151 reqHeaders := make(http.Header) 16152 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 16153 for k, v := range c.header_ { 16154 reqHeaders[k] = v 16155 } 16156 reqHeaders.Set("User-Agent", c.s.userAgent()) 16157 var body io.Reader = nil 16158 c.urlParams_.Set("alt", alt) 16159 c.urlParams_.Set("prettyPrint", "false") 16160 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts") 16161 urls += "?" + c.urlParams_.Encode() 16162 req, err := http.NewRequest("DELETE", urls, body) 16163 if err != nil { 16164 return nil, err 16165 } 16166 req.Header = reqHeaders 16167 googleapi.Expand(req.URL, map[string]string{ 16168 "parent": c.parent, 16169 }) 16170 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16171} 16172 16173// Do executes the "dialogflow.projects.agent.sessions.deleteContexts" call. 16174// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 16175// non-2xx status code is an error. Response headers are in either 16176// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 16177// returned at all) in error.(*googleapi.Error).Header. Use 16178// googleapi.IsNotModified to check whether the returned error was 16179// because http.StatusNotModified was returned. 16180func (c *ProjectsAgentSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 16181 gensupport.SetOptions(c.urlParams_, opts...) 16182 res, err := c.doRequest("json") 16183 if res != nil && res.StatusCode == http.StatusNotModified { 16184 if res.Body != nil { 16185 res.Body.Close() 16186 } 16187 return nil, &googleapi.Error{ 16188 Code: res.StatusCode, 16189 Header: res.Header, 16190 } 16191 } 16192 if err != nil { 16193 return nil, err 16194 } 16195 defer googleapi.CloseBody(res) 16196 if err := googleapi.CheckResponse(res); err != nil { 16197 return nil, err 16198 } 16199 ret := &GoogleProtobufEmpty{ 16200 ServerResponse: googleapi.ServerResponse{ 16201 Header: res.Header, 16202 HTTPStatusCode: res.StatusCode, 16203 }, 16204 } 16205 target := &ret 16206 if err := gensupport.DecodeResponse(target, res); err != nil { 16207 return nil, err 16208 } 16209 return ret, nil 16210 // { 16211 // "description": "Deletes all active contexts in the specified session.", 16212 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", 16213 // "httpMethod": "DELETE", 16214 // "id": "dialogflow.projects.agent.sessions.deleteContexts", 16215 // "parameterOrder": [ 16216 // "parent" 16217 // ], 16218 // "parameters": { 16219 // "parent": { 16220 // "description": "Required. The name of the session to delete all contexts from. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or `projects/\u003cProject\nID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession\nID\u003e`.\nIf `Environment ID` is not specified we assume default 'draft' environment.\nIf `User ID` is not specified, we assume default '-' user.", 16221 // "location": "path", 16222 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 16223 // "required": true, 16224 // "type": "string" 16225 // } 16226 // }, 16227 // "path": "v2/{+parent}/contexts", 16228 // "response": { 16229 // "$ref": "GoogleProtobufEmpty" 16230 // }, 16231 // "scopes": [ 16232 // "https://www.googleapis.com/auth/cloud-platform", 16233 // "https://www.googleapis.com/auth/dialogflow" 16234 // ] 16235 // } 16236 16237} 16238 16239// method id "dialogflow.projects.agent.sessions.detectIntent": 16240 16241type ProjectsAgentSessionsDetectIntentCall struct { 16242 s *Service 16243 sessionid string 16244 googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest 16245 urlParams_ gensupport.URLParams 16246 ctx_ context.Context 16247 header_ http.Header 16248} 16249 16250// DetectIntent: Processes a natural language query and returns 16251// structured, actionable data 16252// as a result. This method is not idempotent, because it may cause 16253// contexts 16254// and session entity types to be updated, which in turn might 16255// affect 16256// results of future queries. 16257func (r *ProjectsAgentSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest) *ProjectsAgentSessionsDetectIntentCall { 16258 c := &ProjectsAgentSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16259 c.sessionid = sessionid 16260 c.googleclouddialogflowv2detectintentrequest = googleclouddialogflowv2detectintentrequest 16261 return c 16262} 16263 16264// Fields allows partial responses to be retrieved. See 16265// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16266// for more information. 16267func (c *ProjectsAgentSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDetectIntentCall { 16268 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16269 return c 16270} 16271 16272// Context sets the context to be used in this call's Do method. Any 16273// pending HTTP request will be aborted if the provided context is 16274// canceled. 16275func (c *ProjectsAgentSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentSessionsDetectIntentCall { 16276 c.ctx_ = ctx 16277 return c 16278} 16279 16280// Header returns an http.Header that can be modified by the caller to 16281// add HTTP headers to the request. 16282func (c *ProjectsAgentSessionsDetectIntentCall) Header() http.Header { 16283 if c.header_ == nil { 16284 c.header_ = make(http.Header) 16285 } 16286 return c.header_ 16287} 16288 16289func (c *ProjectsAgentSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) { 16290 reqHeaders := make(http.Header) 16291 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 16292 for k, v := range c.header_ { 16293 reqHeaders[k] = v 16294 } 16295 reqHeaders.Set("User-Agent", c.s.userAgent()) 16296 var body io.Reader = nil 16297 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2detectintentrequest) 16298 if err != nil { 16299 return nil, err 16300 } 16301 reqHeaders.Set("Content-Type", "application/json") 16302 c.urlParams_.Set("alt", alt) 16303 c.urlParams_.Set("prettyPrint", "false") 16304 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+session}:detectIntent") 16305 urls += "?" + c.urlParams_.Encode() 16306 req, err := http.NewRequest("POST", urls, body) 16307 if err != nil { 16308 return nil, err 16309 } 16310 req.Header = reqHeaders 16311 googleapi.Expand(req.URL, map[string]string{ 16312 "session": c.sessionid, 16313 }) 16314 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16315} 16316 16317// Do executes the "dialogflow.projects.agent.sessions.detectIntent" call. 16318// Exactly one of *GoogleCloudDialogflowV2DetectIntentResponse or error 16319// will be non-nil. Any non-2xx status code is an error. Response 16320// headers are in either 16321// *GoogleCloudDialogflowV2DetectIntentResponse.ServerResponse.Header or 16322// (if a response was returned at all) in 16323// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16324// whether the returned error was because http.StatusNotModified was 16325// returned. 16326func (c *ProjectsAgentSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2DetectIntentResponse, error) { 16327 gensupport.SetOptions(c.urlParams_, opts...) 16328 res, err := c.doRequest("json") 16329 if res != nil && res.StatusCode == http.StatusNotModified { 16330 if res.Body != nil { 16331 res.Body.Close() 16332 } 16333 return nil, &googleapi.Error{ 16334 Code: res.StatusCode, 16335 Header: res.Header, 16336 } 16337 } 16338 if err != nil { 16339 return nil, err 16340 } 16341 defer googleapi.CloseBody(res) 16342 if err := googleapi.CheckResponse(res); err != nil { 16343 return nil, err 16344 } 16345 ret := &GoogleCloudDialogflowV2DetectIntentResponse{ 16346 ServerResponse: googleapi.ServerResponse{ 16347 Header: res.Header, 16348 HTTPStatusCode: res.StatusCode, 16349 }, 16350 } 16351 target := &ret 16352 if err := gensupport.DecodeResponse(target, res); err != nil { 16353 return nil, err 16354 } 16355 return ret, nil 16356 // { 16357 // "description": "Processes a natural language query and returns structured, actionable data\nas a result. This method is not idempotent, because it may cause contexts\nand session entity types to be updated, which in turn might affect\nresults of future queries.", 16358 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}:detectIntent", 16359 // "httpMethod": "POST", 16360 // "id": "dialogflow.projects.agent.sessions.detectIntent", 16361 // "parameterOrder": [ 16362 // "session" 16363 // ], 16364 // "parameters": { 16365 // "session": { 16366 // "description": "Required. The name of the session this query is sent to. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`, or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we are using\n\"-\". It's up to the API caller to choose an appropriate `Session ID` and\n`User Id`. They can be a random number or some type of user and session\nidentifiers (preferably hashed). The length of the `Session ID` and\n`User ID` must not exceed 36 characters.", 16367 // "location": "path", 16368 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 16369 // "required": true, 16370 // "type": "string" 16371 // } 16372 // }, 16373 // "path": "v2/{+session}:detectIntent", 16374 // "request": { 16375 // "$ref": "GoogleCloudDialogflowV2DetectIntentRequest" 16376 // }, 16377 // "response": { 16378 // "$ref": "GoogleCloudDialogflowV2DetectIntentResponse" 16379 // }, 16380 // "scopes": [ 16381 // "https://www.googleapis.com/auth/cloud-platform", 16382 // "https://www.googleapis.com/auth/dialogflow" 16383 // ] 16384 // } 16385 16386} 16387 16388// method id "dialogflow.projects.agent.sessions.contexts.create": 16389 16390type ProjectsAgentSessionsContextsCreateCall struct { 16391 s *Service 16392 parent string 16393 googleclouddialogflowv2context *GoogleCloudDialogflowV2Context 16394 urlParams_ gensupport.URLParams 16395 ctx_ context.Context 16396 header_ http.Header 16397} 16398 16399// Create: Creates a context. 16400// 16401// If the specified context already exists, overrides the context. 16402func (r *ProjectsAgentSessionsContextsService) Create(parent string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsAgentSessionsContextsCreateCall { 16403 c := &ProjectsAgentSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16404 c.parent = parent 16405 c.googleclouddialogflowv2context = googleclouddialogflowv2context 16406 return c 16407} 16408 16409// Fields allows partial responses to be retrieved. See 16410// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16411// for more information. 16412func (c *ProjectsAgentSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsCreateCall { 16413 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16414 return c 16415} 16416 16417// Context sets the context to be used in this call's Do method. Any 16418// pending HTTP request will be aborted if the provided context is 16419// canceled. 16420func (c *ProjectsAgentSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsCreateCall { 16421 c.ctx_ = ctx 16422 return c 16423} 16424 16425// Header returns an http.Header that can be modified by the caller to 16426// add HTTP headers to the request. 16427func (c *ProjectsAgentSessionsContextsCreateCall) Header() http.Header { 16428 if c.header_ == nil { 16429 c.header_ = make(http.Header) 16430 } 16431 return c.header_ 16432} 16433 16434func (c *ProjectsAgentSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) { 16435 reqHeaders := make(http.Header) 16436 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 16437 for k, v := range c.header_ { 16438 reqHeaders[k] = v 16439 } 16440 reqHeaders.Set("User-Agent", c.s.userAgent()) 16441 var body io.Reader = nil 16442 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context) 16443 if err != nil { 16444 return nil, err 16445 } 16446 reqHeaders.Set("Content-Type", "application/json") 16447 c.urlParams_.Set("alt", alt) 16448 c.urlParams_.Set("prettyPrint", "false") 16449 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts") 16450 urls += "?" + c.urlParams_.Encode() 16451 req, err := http.NewRequest("POST", urls, body) 16452 if err != nil { 16453 return nil, err 16454 } 16455 req.Header = reqHeaders 16456 googleapi.Expand(req.URL, map[string]string{ 16457 "parent": c.parent, 16458 }) 16459 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16460} 16461 16462// Do executes the "dialogflow.projects.agent.sessions.contexts.create" call. 16463// Exactly one of *GoogleCloudDialogflowV2Context or error will be 16464// non-nil. Any non-2xx status code is an error. Response headers are in 16465// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a 16466// response was returned at all) in error.(*googleapi.Error).Header. Use 16467// googleapi.IsNotModified to check whether the returned error was 16468// because http.StatusNotModified was returned. 16469func (c *ProjectsAgentSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) { 16470 gensupport.SetOptions(c.urlParams_, opts...) 16471 res, err := c.doRequest("json") 16472 if res != nil && res.StatusCode == http.StatusNotModified { 16473 if res.Body != nil { 16474 res.Body.Close() 16475 } 16476 return nil, &googleapi.Error{ 16477 Code: res.StatusCode, 16478 Header: res.Header, 16479 } 16480 } 16481 if err != nil { 16482 return nil, err 16483 } 16484 defer googleapi.CloseBody(res) 16485 if err := googleapi.CheckResponse(res); err != nil { 16486 return nil, err 16487 } 16488 ret := &GoogleCloudDialogflowV2Context{ 16489 ServerResponse: googleapi.ServerResponse{ 16490 Header: res.Header, 16491 HTTPStatusCode: res.StatusCode, 16492 }, 16493 } 16494 target := &ret 16495 if err := gensupport.DecodeResponse(target, res); err != nil { 16496 return nil, err 16497 } 16498 return ret, nil 16499 // { 16500 // "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.", 16501 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", 16502 // "httpMethod": "POST", 16503 // "id": "dialogflow.projects.agent.sessions.contexts.create", 16504 // "parameterOrder": [ 16505 // "parent" 16506 // ], 16507 // "parameters": { 16508 // "parent": { 16509 // "description": "Required. The session to create a context for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 16510 // "location": "path", 16511 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 16512 // "required": true, 16513 // "type": "string" 16514 // } 16515 // }, 16516 // "path": "v2/{+parent}/contexts", 16517 // "request": { 16518 // "$ref": "GoogleCloudDialogflowV2Context" 16519 // }, 16520 // "response": { 16521 // "$ref": "GoogleCloudDialogflowV2Context" 16522 // }, 16523 // "scopes": [ 16524 // "https://www.googleapis.com/auth/cloud-platform", 16525 // "https://www.googleapis.com/auth/dialogflow" 16526 // ] 16527 // } 16528 16529} 16530 16531// method id "dialogflow.projects.agent.sessions.contexts.delete": 16532 16533type ProjectsAgentSessionsContextsDeleteCall struct { 16534 s *Service 16535 name string 16536 urlParams_ gensupport.URLParams 16537 ctx_ context.Context 16538 header_ http.Header 16539} 16540 16541// Delete: Deletes the specified context. 16542func (r *ProjectsAgentSessionsContextsService) Delete(name string) *ProjectsAgentSessionsContextsDeleteCall { 16543 c := &ProjectsAgentSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16544 c.name = name 16545 return c 16546} 16547 16548// Fields allows partial responses to be retrieved. See 16549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16550// for more information. 16551func (c *ProjectsAgentSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsDeleteCall { 16552 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16553 return c 16554} 16555 16556// Context sets the context to be used in this call's Do method. Any 16557// pending HTTP request will be aborted if the provided context is 16558// canceled. 16559func (c *ProjectsAgentSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsDeleteCall { 16560 c.ctx_ = ctx 16561 return c 16562} 16563 16564// Header returns an http.Header that can be modified by the caller to 16565// add HTTP headers to the request. 16566func (c *ProjectsAgentSessionsContextsDeleteCall) Header() http.Header { 16567 if c.header_ == nil { 16568 c.header_ = make(http.Header) 16569 } 16570 return c.header_ 16571} 16572 16573func (c *ProjectsAgentSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) { 16574 reqHeaders := make(http.Header) 16575 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 16576 for k, v := range c.header_ { 16577 reqHeaders[k] = v 16578 } 16579 reqHeaders.Set("User-Agent", c.s.userAgent()) 16580 var body io.Reader = nil 16581 c.urlParams_.Set("alt", alt) 16582 c.urlParams_.Set("prettyPrint", "false") 16583 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16584 urls += "?" + c.urlParams_.Encode() 16585 req, err := http.NewRequest("DELETE", urls, body) 16586 if err != nil { 16587 return nil, err 16588 } 16589 req.Header = reqHeaders 16590 googleapi.Expand(req.URL, map[string]string{ 16591 "name": c.name, 16592 }) 16593 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16594} 16595 16596// Do executes the "dialogflow.projects.agent.sessions.contexts.delete" call. 16597// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 16598// non-2xx status code is an error. Response headers are in either 16599// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 16600// returned at all) in error.(*googleapi.Error).Header. Use 16601// googleapi.IsNotModified to check whether the returned error was 16602// because http.StatusNotModified was returned. 16603func (c *ProjectsAgentSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 16604 gensupport.SetOptions(c.urlParams_, opts...) 16605 res, err := c.doRequest("json") 16606 if res != nil && res.StatusCode == http.StatusNotModified { 16607 if res.Body != nil { 16608 res.Body.Close() 16609 } 16610 return nil, &googleapi.Error{ 16611 Code: res.StatusCode, 16612 Header: res.Header, 16613 } 16614 } 16615 if err != nil { 16616 return nil, err 16617 } 16618 defer googleapi.CloseBody(res) 16619 if err := googleapi.CheckResponse(res); err != nil { 16620 return nil, err 16621 } 16622 ret := &GoogleProtobufEmpty{ 16623 ServerResponse: googleapi.ServerResponse{ 16624 Header: res.Header, 16625 HTTPStatusCode: res.StatusCode, 16626 }, 16627 } 16628 target := &ret 16629 if err := gensupport.DecodeResponse(target, res); err != nil { 16630 return nil, err 16631 } 16632 return ret, nil 16633 // { 16634 // "description": "Deletes the specified context.", 16635 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", 16636 // "httpMethod": "DELETE", 16637 // "id": "dialogflow.projects.agent.sessions.contexts.delete", 16638 // "parameterOrder": [ 16639 // "name" 16640 // ], 16641 // "parameters": { 16642 // "name": { 16643 // "description": "Required. The name of the context to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 16644 // "location": "path", 16645 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", 16646 // "required": true, 16647 // "type": "string" 16648 // } 16649 // }, 16650 // "path": "v2/{+name}", 16651 // "response": { 16652 // "$ref": "GoogleProtobufEmpty" 16653 // }, 16654 // "scopes": [ 16655 // "https://www.googleapis.com/auth/cloud-platform", 16656 // "https://www.googleapis.com/auth/dialogflow" 16657 // ] 16658 // } 16659 16660} 16661 16662// method id "dialogflow.projects.agent.sessions.contexts.get": 16663 16664type ProjectsAgentSessionsContextsGetCall struct { 16665 s *Service 16666 name string 16667 urlParams_ gensupport.URLParams 16668 ifNoneMatch_ string 16669 ctx_ context.Context 16670 header_ http.Header 16671} 16672 16673// Get: Retrieves the specified context. 16674func (r *ProjectsAgentSessionsContextsService) Get(name string) *ProjectsAgentSessionsContextsGetCall { 16675 c := &ProjectsAgentSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16676 c.name = name 16677 return c 16678} 16679 16680// Fields allows partial responses to be retrieved. See 16681// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16682// for more information. 16683func (c *ProjectsAgentSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsGetCall { 16684 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16685 return c 16686} 16687 16688// IfNoneMatch sets the optional parameter which makes the operation 16689// fail if the object's ETag matches the given value. This is useful for 16690// getting updates only after the object has changed since the last 16691// request. Use googleapi.IsNotModified to check whether the response 16692// error from Do is the result of In-None-Match. 16693func (c *ProjectsAgentSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsGetCall { 16694 c.ifNoneMatch_ = entityTag 16695 return c 16696} 16697 16698// Context sets the context to be used in this call's Do method. Any 16699// pending HTTP request will be aborted if the provided context is 16700// canceled. 16701func (c *ProjectsAgentSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsGetCall { 16702 c.ctx_ = ctx 16703 return c 16704} 16705 16706// Header returns an http.Header that can be modified by the caller to 16707// add HTTP headers to the request. 16708func (c *ProjectsAgentSessionsContextsGetCall) Header() http.Header { 16709 if c.header_ == nil { 16710 c.header_ = make(http.Header) 16711 } 16712 return c.header_ 16713} 16714 16715func (c *ProjectsAgentSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) { 16716 reqHeaders := make(http.Header) 16717 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 16718 for k, v := range c.header_ { 16719 reqHeaders[k] = v 16720 } 16721 reqHeaders.Set("User-Agent", c.s.userAgent()) 16722 if c.ifNoneMatch_ != "" { 16723 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16724 } 16725 var body io.Reader = nil 16726 c.urlParams_.Set("alt", alt) 16727 c.urlParams_.Set("prettyPrint", "false") 16728 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16729 urls += "?" + c.urlParams_.Encode() 16730 req, err := http.NewRequest("GET", urls, body) 16731 if err != nil { 16732 return nil, err 16733 } 16734 req.Header = reqHeaders 16735 googleapi.Expand(req.URL, map[string]string{ 16736 "name": c.name, 16737 }) 16738 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16739} 16740 16741// Do executes the "dialogflow.projects.agent.sessions.contexts.get" call. 16742// Exactly one of *GoogleCloudDialogflowV2Context or error will be 16743// non-nil. Any non-2xx status code is an error. Response headers are in 16744// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a 16745// response was returned at all) in error.(*googleapi.Error).Header. Use 16746// googleapi.IsNotModified to check whether the returned error was 16747// because http.StatusNotModified was returned. 16748func (c *ProjectsAgentSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) { 16749 gensupport.SetOptions(c.urlParams_, opts...) 16750 res, err := c.doRequest("json") 16751 if res != nil && res.StatusCode == http.StatusNotModified { 16752 if res.Body != nil { 16753 res.Body.Close() 16754 } 16755 return nil, &googleapi.Error{ 16756 Code: res.StatusCode, 16757 Header: res.Header, 16758 } 16759 } 16760 if err != nil { 16761 return nil, err 16762 } 16763 defer googleapi.CloseBody(res) 16764 if err := googleapi.CheckResponse(res); err != nil { 16765 return nil, err 16766 } 16767 ret := &GoogleCloudDialogflowV2Context{ 16768 ServerResponse: googleapi.ServerResponse{ 16769 Header: res.Header, 16770 HTTPStatusCode: res.StatusCode, 16771 }, 16772 } 16773 target := &ret 16774 if err := gensupport.DecodeResponse(target, res); err != nil { 16775 return nil, err 16776 } 16777 return ret, nil 16778 // { 16779 // "description": "Retrieves the specified context.", 16780 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", 16781 // "httpMethod": "GET", 16782 // "id": "dialogflow.projects.agent.sessions.contexts.get", 16783 // "parameterOrder": [ 16784 // "name" 16785 // ], 16786 // "parameters": { 16787 // "name": { 16788 // "description": "Required. The name of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 16789 // "location": "path", 16790 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", 16791 // "required": true, 16792 // "type": "string" 16793 // } 16794 // }, 16795 // "path": "v2/{+name}", 16796 // "response": { 16797 // "$ref": "GoogleCloudDialogflowV2Context" 16798 // }, 16799 // "scopes": [ 16800 // "https://www.googleapis.com/auth/cloud-platform", 16801 // "https://www.googleapis.com/auth/dialogflow" 16802 // ] 16803 // } 16804 16805} 16806 16807// method id "dialogflow.projects.agent.sessions.contexts.list": 16808 16809type ProjectsAgentSessionsContextsListCall struct { 16810 s *Service 16811 parent string 16812 urlParams_ gensupport.URLParams 16813 ifNoneMatch_ string 16814 ctx_ context.Context 16815 header_ http.Header 16816} 16817 16818// List: Returns the list of all contexts in the specified session. 16819func (r *ProjectsAgentSessionsContextsService) List(parent string) *ProjectsAgentSessionsContextsListCall { 16820 c := &ProjectsAgentSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16821 c.parent = parent 16822 return c 16823} 16824 16825// PageSize sets the optional parameter "pageSize": The maximum number 16826// of items to return in a single page. By 16827// default 100 and at most 1000. 16828func (c *ProjectsAgentSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentSessionsContextsListCall { 16829 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16830 return c 16831} 16832 16833// PageToken sets the optional parameter "pageToken": The 16834// next_page_token value returned from a previous list request. 16835func (c *ProjectsAgentSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentSessionsContextsListCall { 16836 c.urlParams_.Set("pageToken", pageToken) 16837 return c 16838} 16839 16840// Fields allows partial responses to be retrieved. See 16841// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16842// for more information. 16843func (c *ProjectsAgentSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsListCall { 16844 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16845 return c 16846} 16847 16848// IfNoneMatch sets the optional parameter which makes the operation 16849// fail if the object's ETag matches the given value. This is useful for 16850// getting updates only after the object has changed since the last 16851// request. Use googleapi.IsNotModified to check whether the response 16852// error from Do is the result of In-None-Match. 16853func (c *ProjectsAgentSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsListCall { 16854 c.ifNoneMatch_ = entityTag 16855 return c 16856} 16857 16858// Context sets the context to be used in this call's Do method. Any 16859// pending HTTP request will be aborted if the provided context is 16860// canceled. 16861func (c *ProjectsAgentSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsListCall { 16862 c.ctx_ = ctx 16863 return c 16864} 16865 16866// Header returns an http.Header that can be modified by the caller to 16867// add HTTP headers to the request. 16868func (c *ProjectsAgentSessionsContextsListCall) Header() http.Header { 16869 if c.header_ == nil { 16870 c.header_ = make(http.Header) 16871 } 16872 return c.header_ 16873} 16874 16875func (c *ProjectsAgentSessionsContextsListCall) doRequest(alt string) (*http.Response, error) { 16876 reqHeaders := make(http.Header) 16877 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 16878 for k, v := range c.header_ { 16879 reqHeaders[k] = v 16880 } 16881 reqHeaders.Set("User-Agent", c.s.userAgent()) 16882 if c.ifNoneMatch_ != "" { 16883 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16884 } 16885 var body io.Reader = nil 16886 c.urlParams_.Set("alt", alt) 16887 c.urlParams_.Set("prettyPrint", "false") 16888 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts") 16889 urls += "?" + c.urlParams_.Encode() 16890 req, err := http.NewRequest("GET", urls, body) 16891 if err != nil { 16892 return nil, err 16893 } 16894 req.Header = reqHeaders 16895 googleapi.Expand(req.URL, map[string]string{ 16896 "parent": c.parent, 16897 }) 16898 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16899} 16900 16901// Do executes the "dialogflow.projects.agent.sessions.contexts.list" call. 16902// Exactly one of *GoogleCloudDialogflowV2ListContextsResponse or error 16903// will be non-nil. Any non-2xx status code is an error. Response 16904// headers are in either 16905// *GoogleCloudDialogflowV2ListContextsResponse.ServerResponse.Header or 16906// (if a response was returned at all) in 16907// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16908// whether the returned error was because http.StatusNotModified was 16909// returned. 16910func (c *ProjectsAgentSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListContextsResponse, error) { 16911 gensupport.SetOptions(c.urlParams_, opts...) 16912 res, err := c.doRequest("json") 16913 if res != nil && res.StatusCode == http.StatusNotModified { 16914 if res.Body != nil { 16915 res.Body.Close() 16916 } 16917 return nil, &googleapi.Error{ 16918 Code: res.StatusCode, 16919 Header: res.Header, 16920 } 16921 } 16922 if err != nil { 16923 return nil, err 16924 } 16925 defer googleapi.CloseBody(res) 16926 if err := googleapi.CheckResponse(res); err != nil { 16927 return nil, err 16928 } 16929 ret := &GoogleCloudDialogflowV2ListContextsResponse{ 16930 ServerResponse: googleapi.ServerResponse{ 16931 Header: res.Header, 16932 HTTPStatusCode: res.StatusCode, 16933 }, 16934 } 16935 target := &ret 16936 if err := gensupport.DecodeResponse(target, res); err != nil { 16937 return nil, err 16938 } 16939 return ret, nil 16940 // { 16941 // "description": "Returns the list of all contexts in the specified session.", 16942 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", 16943 // "httpMethod": "GET", 16944 // "id": "dialogflow.projects.agent.sessions.contexts.list", 16945 // "parameterOrder": [ 16946 // "parent" 16947 // ], 16948 // "parameters": { 16949 // "pageSize": { 16950 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 16951 // "format": "int32", 16952 // "location": "query", 16953 // "type": "integer" 16954 // }, 16955 // "pageToken": { 16956 // "description": "Optional. The next_page_token value returned from a previous list request.", 16957 // "location": "query", 16958 // "type": "string" 16959 // }, 16960 // "parent": { 16961 // "description": "Required. The session to list all contexts from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 16962 // "location": "path", 16963 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 16964 // "required": true, 16965 // "type": "string" 16966 // } 16967 // }, 16968 // "path": "v2/{+parent}/contexts", 16969 // "response": { 16970 // "$ref": "GoogleCloudDialogflowV2ListContextsResponse" 16971 // }, 16972 // "scopes": [ 16973 // "https://www.googleapis.com/auth/cloud-platform", 16974 // "https://www.googleapis.com/auth/dialogflow" 16975 // ] 16976 // } 16977 16978} 16979 16980// Pages invokes f for each page of results. 16981// A non-nil error returned from f will halt the iteration. 16982// The provided context supersedes any context provided to the Context method. 16983func (c *ProjectsAgentSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListContextsResponse) error) error { 16984 c.ctx_ = ctx 16985 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16986 for { 16987 x, err := c.Do() 16988 if err != nil { 16989 return err 16990 } 16991 if err := f(x); err != nil { 16992 return err 16993 } 16994 if x.NextPageToken == "" { 16995 return nil 16996 } 16997 c.PageToken(x.NextPageToken) 16998 } 16999} 17000 17001// method id "dialogflow.projects.agent.sessions.contexts.patch": 17002 17003type ProjectsAgentSessionsContextsPatchCall struct { 17004 s *Service 17005 nameid string 17006 googleclouddialogflowv2context *GoogleCloudDialogflowV2Context 17007 urlParams_ gensupport.URLParams 17008 ctx_ context.Context 17009 header_ http.Header 17010} 17011 17012// Patch: Updates the specified context. 17013func (r *ProjectsAgentSessionsContextsService) Patch(nameid string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsAgentSessionsContextsPatchCall { 17014 c := &ProjectsAgentSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17015 c.nameid = nameid 17016 c.googleclouddialogflowv2context = googleclouddialogflowv2context 17017 return c 17018} 17019 17020// UpdateMask sets the optional parameter "updateMask": The mask to 17021// control which fields get updated. 17022func (c *ProjectsAgentSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsContextsPatchCall { 17023 c.urlParams_.Set("updateMask", updateMask) 17024 return c 17025} 17026 17027// Fields allows partial responses to be retrieved. See 17028// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17029// for more information. 17030func (c *ProjectsAgentSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsPatchCall { 17031 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17032 return c 17033} 17034 17035// Context sets the context to be used in this call's Do method. Any 17036// pending HTTP request will be aborted if the provided context is 17037// canceled. 17038func (c *ProjectsAgentSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsPatchCall { 17039 c.ctx_ = ctx 17040 return c 17041} 17042 17043// Header returns an http.Header that can be modified by the caller to 17044// add HTTP headers to the request. 17045func (c *ProjectsAgentSessionsContextsPatchCall) Header() http.Header { 17046 if c.header_ == nil { 17047 c.header_ = make(http.Header) 17048 } 17049 return c.header_ 17050} 17051 17052func (c *ProjectsAgentSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) { 17053 reqHeaders := make(http.Header) 17054 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 17055 for k, v := range c.header_ { 17056 reqHeaders[k] = v 17057 } 17058 reqHeaders.Set("User-Agent", c.s.userAgent()) 17059 var body io.Reader = nil 17060 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context) 17061 if err != nil { 17062 return nil, err 17063 } 17064 reqHeaders.Set("Content-Type", "application/json") 17065 c.urlParams_.Set("alt", alt) 17066 c.urlParams_.Set("prettyPrint", "false") 17067 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17068 urls += "?" + c.urlParams_.Encode() 17069 req, err := http.NewRequest("PATCH", urls, body) 17070 if err != nil { 17071 return nil, err 17072 } 17073 req.Header = reqHeaders 17074 googleapi.Expand(req.URL, map[string]string{ 17075 "name": c.nameid, 17076 }) 17077 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17078} 17079 17080// Do executes the "dialogflow.projects.agent.sessions.contexts.patch" call. 17081// Exactly one of *GoogleCloudDialogflowV2Context or error will be 17082// non-nil. Any non-2xx status code is an error. Response headers are in 17083// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a 17084// response was returned at all) in error.(*googleapi.Error).Header. Use 17085// googleapi.IsNotModified to check whether the returned error was 17086// because http.StatusNotModified was returned. 17087func (c *ProjectsAgentSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) { 17088 gensupport.SetOptions(c.urlParams_, opts...) 17089 res, err := c.doRequest("json") 17090 if res != nil && res.StatusCode == http.StatusNotModified { 17091 if res.Body != nil { 17092 res.Body.Close() 17093 } 17094 return nil, &googleapi.Error{ 17095 Code: res.StatusCode, 17096 Header: res.Header, 17097 } 17098 } 17099 if err != nil { 17100 return nil, err 17101 } 17102 defer googleapi.CloseBody(res) 17103 if err := googleapi.CheckResponse(res); err != nil { 17104 return nil, err 17105 } 17106 ret := &GoogleCloudDialogflowV2Context{ 17107 ServerResponse: googleapi.ServerResponse{ 17108 Header: res.Header, 17109 HTTPStatusCode: res.StatusCode, 17110 }, 17111 } 17112 target := &ret 17113 if err := gensupport.DecodeResponse(target, res); err != nil { 17114 return nil, err 17115 } 17116 return ret, nil 17117 // { 17118 // "description": "Updates the specified context.", 17119 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", 17120 // "httpMethod": "PATCH", 17121 // "id": "dialogflow.projects.agent.sessions.contexts.patch", 17122 // "parameterOrder": [ 17123 // "name" 17124 // ], 17125 // "parameters": { 17126 // "name": { 17127 // "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`,\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\n\nThe `Context ID` is always converted to lowercase, may only contain\ncharacters in a-zA-Z0-9_-% and may be at most 250 bytes long.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\nThe following context names are reserved for internal use by Dialogflow.\nYou should not use these contexts or create contexts with these names:\n\n* `__system_counters__`\n* `*_id_dialog_context`\n* `*_dialog_params_size`", 17128 // "location": "path", 17129 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", 17130 // "required": true, 17131 // "type": "string" 17132 // }, 17133 // "updateMask": { 17134 // "description": "Optional. The mask to control which fields get updated.", 17135 // "format": "google-fieldmask", 17136 // "location": "query", 17137 // "type": "string" 17138 // } 17139 // }, 17140 // "path": "v2/{+name}", 17141 // "request": { 17142 // "$ref": "GoogleCloudDialogflowV2Context" 17143 // }, 17144 // "response": { 17145 // "$ref": "GoogleCloudDialogflowV2Context" 17146 // }, 17147 // "scopes": [ 17148 // "https://www.googleapis.com/auth/cloud-platform", 17149 // "https://www.googleapis.com/auth/dialogflow" 17150 // ] 17151 // } 17152 17153} 17154 17155// method id "dialogflow.projects.agent.sessions.entityTypes.create": 17156 17157type ProjectsAgentSessionsEntityTypesCreateCall struct { 17158 s *Service 17159 parent string 17160 googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType 17161 urlParams_ gensupport.URLParams 17162 ctx_ context.Context 17163 header_ http.Header 17164} 17165 17166// Create: Creates a session entity type. 17167// 17168// If the specified session entity type already exists, overrides the 17169// session 17170// entity type. 17171// 17172// This method doesn't work with Google Assistant integration. 17173// Contact Dialogflow support if you need to use session entities 17174// with Google Assistant integration. 17175func (r *ProjectsAgentSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsAgentSessionsEntityTypesCreateCall { 17176 c := &ProjectsAgentSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17177 c.parent = parent 17178 c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype 17179 return c 17180} 17181 17182// Fields allows partial responses to be retrieved. See 17183// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17184// for more information. 17185func (c *ProjectsAgentSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesCreateCall { 17186 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17187 return c 17188} 17189 17190// Context sets the context to be used in this call's Do method. Any 17191// pending HTTP request will be aborted if the provided context is 17192// canceled. 17193func (c *ProjectsAgentSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesCreateCall { 17194 c.ctx_ = ctx 17195 return c 17196} 17197 17198// Header returns an http.Header that can be modified by the caller to 17199// add HTTP headers to the request. 17200func (c *ProjectsAgentSessionsEntityTypesCreateCall) Header() http.Header { 17201 if c.header_ == nil { 17202 c.header_ = make(http.Header) 17203 } 17204 return c.header_ 17205} 17206 17207func (c *ProjectsAgentSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { 17208 reqHeaders := make(http.Header) 17209 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 17210 for k, v := range c.header_ { 17211 reqHeaders[k] = v 17212 } 17213 reqHeaders.Set("User-Agent", c.s.userAgent()) 17214 var body io.Reader = nil 17215 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype) 17216 if err != nil { 17217 return nil, err 17218 } 17219 reqHeaders.Set("Content-Type", "application/json") 17220 c.urlParams_.Set("alt", alt) 17221 c.urlParams_.Set("prettyPrint", "false") 17222 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes") 17223 urls += "?" + c.urlParams_.Encode() 17224 req, err := http.NewRequest("POST", urls, body) 17225 if err != nil { 17226 return nil, err 17227 } 17228 req.Header = reqHeaders 17229 googleapi.Expand(req.URL, map[string]string{ 17230 "parent": c.parent, 17231 }) 17232 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17233} 17234 17235// Do executes the "dialogflow.projects.agent.sessions.entityTypes.create" call. 17236// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error 17237// will be non-nil. Any non-2xx status code is an error. Response 17238// headers are in either 17239// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or 17240// (if a response was returned at all) in 17241// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17242// whether the returned error was because http.StatusNotModified was 17243// returned. 17244func (c *ProjectsAgentSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) { 17245 gensupport.SetOptions(c.urlParams_, opts...) 17246 res, err := c.doRequest("json") 17247 if res != nil && res.StatusCode == http.StatusNotModified { 17248 if res.Body != nil { 17249 res.Body.Close() 17250 } 17251 return nil, &googleapi.Error{ 17252 Code: res.StatusCode, 17253 Header: res.Header, 17254 } 17255 } 17256 if err != nil { 17257 return nil, err 17258 } 17259 defer googleapi.CloseBody(res) 17260 if err := googleapi.CheckResponse(res); err != nil { 17261 return nil, err 17262 } 17263 ret := &GoogleCloudDialogflowV2SessionEntityType{ 17264 ServerResponse: googleapi.ServerResponse{ 17265 Header: res.Header, 17266 HTTPStatusCode: res.StatusCode, 17267 }, 17268 } 17269 target := &ret 17270 if err := gensupport.DecodeResponse(target, res); err != nil { 17271 return nil, err 17272 } 17273 return ret, nil 17274 // { 17275 // "description": "Creates a session entity type.\n\nIf the specified session entity type already exists, overrides the session\nentity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.", 17276 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes", 17277 // "httpMethod": "POST", 17278 // "id": "dialogflow.projects.agent.sessions.entityTypes.create", 17279 // "parameterOrder": [ 17280 // "parent" 17281 // ], 17282 // "parameters": { 17283 // "parent": { 17284 // "description": "Required. The session to create a session entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 17285 // "location": "path", 17286 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 17287 // "required": true, 17288 // "type": "string" 17289 // } 17290 // }, 17291 // "path": "v2/{+parent}/entityTypes", 17292 // "request": { 17293 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 17294 // }, 17295 // "response": { 17296 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 17297 // }, 17298 // "scopes": [ 17299 // "https://www.googleapis.com/auth/cloud-platform", 17300 // "https://www.googleapis.com/auth/dialogflow" 17301 // ] 17302 // } 17303 17304} 17305 17306// method id "dialogflow.projects.agent.sessions.entityTypes.delete": 17307 17308type ProjectsAgentSessionsEntityTypesDeleteCall struct { 17309 s *Service 17310 name string 17311 urlParams_ gensupport.URLParams 17312 ctx_ context.Context 17313 header_ http.Header 17314} 17315 17316// Delete: Deletes the specified session entity type. 17317// 17318// This method doesn't work with Google Assistant integration. 17319// Contact Dialogflow support if you need to use session entities 17320// with Google Assistant integration. 17321func (r *ProjectsAgentSessionsEntityTypesService) Delete(name string) *ProjectsAgentSessionsEntityTypesDeleteCall { 17322 c := &ProjectsAgentSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17323 c.name = name 17324 return c 17325} 17326 17327// Fields allows partial responses to be retrieved. See 17328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17329// for more information. 17330func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesDeleteCall { 17331 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17332 return c 17333} 17334 17335// Context sets the context to be used in this call's Do method. Any 17336// pending HTTP request will be aborted if the provided context is 17337// canceled. 17338func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesDeleteCall { 17339 c.ctx_ = ctx 17340 return c 17341} 17342 17343// Header returns an http.Header that can be modified by the caller to 17344// add HTTP headers to the request. 17345func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Header() http.Header { 17346 if c.header_ == nil { 17347 c.header_ = make(http.Header) 17348 } 17349 return c.header_ 17350} 17351 17352func (c *ProjectsAgentSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 17353 reqHeaders := make(http.Header) 17354 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 17355 for k, v := range c.header_ { 17356 reqHeaders[k] = v 17357 } 17358 reqHeaders.Set("User-Agent", c.s.userAgent()) 17359 var body io.Reader = nil 17360 c.urlParams_.Set("alt", alt) 17361 c.urlParams_.Set("prettyPrint", "false") 17362 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17363 urls += "?" + c.urlParams_.Encode() 17364 req, err := http.NewRequest("DELETE", urls, body) 17365 if err != nil { 17366 return nil, err 17367 } 17368 req.Header = reqHeaders 17369 googleapi.Expand(req.URL, map[string]string{ 17370 "name": c.name, 17371 }) 17372 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17373} 17374 17375// Do executes the "dialogflow.projects.agent.sessions.entityTypes.delete" call. 17376// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 17377// non-2xx status code is an error. Response headers are in either 17378// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 17379// returned at all) in error.(*googleapi.Error).Header. Use 17380// googleapi.IsNotModified to check whether the returned error was 17381// because http.StatusNotModified was returned. 17382func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 17383 gensupport.SetOptions(c.urlParams_, opts...) 17384 res, err := c.doRequest("json") 17385 if res != nil && res.StatusCode == http.StatusNotModified { 17386 if res.Body != nil { 17387 res.Body.Close() 17388 } 17389 return nil, &googleapi.Error{ 17390 Code: res.StatusCode, 17391 Header: res.Header, 17392 } 17393 } 17394 if err != nil { 17395 return nil, err 17396 } 17397 defer googleapi.CloseBody(res) 17398 if err := googleapi.CheckResponse(res); err != nil { 17399 return nil, err 17400 } 17401 ret := &GoogleProtobufEmpty{ 17402 ServerResponse: googleapi.ServerResponse{ 17403 Header: res.Header, 17404 HTTPStatusCode: res.StatusCode, 17405 }, 17406 } 17407 target := &ret 17408 if err := gensupport.DecodeResponse(target, res); err != nil { 17409 return nil, err 17410 } 17411 return ret, nil 17412 // { 17413 // "description": "Deletes the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.", 17414 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", 17415 // "httpMethod": "DELETE", 17416 // "id": "dialogflow.projects.agent.sessions.entityTypes.delete", 17417 // "parameterOrder": [ 17418 // "name" 17419 // ], 17420 // "parameters": { 17421 // "name": { 17422 // "description": "Required. The name of the entity type to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 17423 // "location": "path", 17424 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", 17425 // "required": true, 17426 // "type": "string" 17427 // } 17428 // }, 17429 // "path": "v2/{+name}", 17430 // "response": { 17431 // "$ref": "GoogleProtobufEmpty" 17432 // }, 17433 // "scopes": [ 17434 // "https://www.googleapis.com/auth/cloud-platform", 17435 // "https://www.googleapis.com/auth/dialogflow" 17436 // ] 17437 // } 17438 17439} 17440 17441// method id "dialogflow.projects.agent.sessions.entityTypes.get": 17442 17443type ProjectsAgentSessionsEntityTypesGetCall struct { 17444 s *Service 17445 name string 17446 urlParams_ gensupport.URLParams 17447 ifNoneMatch_ string 17448 ctx_ context.Context 17449 header_ http.Header 17450} 17451 17452// Get: Retrieves the specified session entity type. 17453// 17454// This method doesn't work with Google Assistant integration. 17455// Contact Dialogflow support if you need to use session entities 17456// with Google Assistant integration. 17457func (r *ProjectsAgentSessionsEntityTypesService) Get(name string) *ProjectsAgentSessionsEntityTypesGetCall { 17458 c := &ProjectsAgentSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17459 c.name = name 17460 return c 17461} 17462 17463// Fields allows partial responses to be retrieved. See 17464// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17465// for more information. 17466func (c *ProjectsAgentSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesGetCall { 17467 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17468 return c 17469} 17470 17471// IfNoneMatch sets the optional parameter which makes the operation 17472// fail if the object's ETag matches the given value. This is useful for 17473// getting updates only after the object has changed since the last 17474// request. Use googleapi.IsNotModified to check whether the response 17475// error from Do is the result of In-None-Match. 17476func (c *ProjectsAgentSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesGetCall { 17477 c.ifNoneMatch_ = entityTag 17478 return c 17479} 17480 17481// Context sets the context to be used in this call's Do method. Any 17482// pending HTTP request will be aborted if the provided context is 17483// canceled. 17484func (c *ProjectsAgentSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesGetCall { 17485 c.ctx_ = ctx 17486 return c 17487} 17488 17489// Header returns an http.Header that can be modified by the caller to 17490// add HTTP headers to the request. 17491func (c *ProjectsAgentSessionsEntityTypesGetCall) Header() http.Header { 17492 if c.header_ == nil { 17493 c.header_ = make(http.Header) 17494 } 17495 return c.header_ 17496} 17497 17498func (c *ProjectsAgentSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { 17499 reqHeaders := make(http.Header) 17500 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 17501 for k, v := range c.header_ { 17502 reqHeaders[k] = v 17503 } 17504 reqHeaders.Set("User-Agent", c.s.userAgent()) 17505 if c.ifNoneMatch_ != "" { 17506 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17507 } 17508 var body io.Reader = nil 17509 c.urlParams_.Set("alt", alt) 17510 c.urlParams_.Set("prettyPrint", "false") 17511 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17512 urls += "?" + c.urlParams_.Encode() 17513 req, err := http.NewRequest("GET", urls, body) 17514 if err != nil { 17515 return nil, err 17516 } 17517 req.Header = reqHeaders 17518 googleapi.Expand(req.URL, map[string]string{ 17519 "name": c.name, 17520 }) 17521 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17522} 17523 17524// Do executes the "dialogflow.projects.agent.sessions.entityTypes.get" call. 17525// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error 17526// will be non-nil. Any non-2xx status code is an error. Response 17527// headers are in either 17528// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or 17529// (if a response was returned at all) in 17530// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17531// whether the returned error was because http.StatusNotModified was 17532// returned. 17533func (c *ProjectsAgentSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) { 17534 gensupport.SetOptions(c.urlParams_, opts...) 17535 res, err := c.doRequest("json") 17536 if res != nil && res.StatusCode == http.StatusNotModified { 17537 if res.Body != nil { 17538 res.Body.Close() 17539 } 17540 return nil, &googleapi.Error{ 17541 Code: res.StatusCode, 17542 Header: res.Header, 17543 } 17544 } 17545 if err != nil { 17546 return nil, err 17547 } 17548 defer googleapi.CloseBody(res) 17549 if err := googleapi.CheckResponse(res); err != nil { 17550 return nil, err 17551 } 17552 ret := &GoogleCloudDialogflowV2SessionEntityType{ 17553 ServerResponse: googleapi.ServerResponse{ 17554 Header: res.Header, 17555 HTTPStatusCode: res.StatusCode, 17556 }, 17557 } 17558 target := &ret 17559 if err := gensupport.DecodeResponse(target, res); err != nil { 17560 return nil, err 17561 } 17562 return ret, nil 17563 // { 17564 // "description": "Retrieves the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.", 17565 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", 17566 // "httpMethod": "GET", 17567 // "id": "dialogflow.projects.agent.sessions.entityTypes.get", 17568 // "parameterOrder": [ 17569 // "name" 17570 // ], 17571 // "parameters": { 17572 // "name": { 17573 // "description": "Required. The name of the session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 17574 // "location": "path", 17575 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", 17576 // "required": true, 17577 // "type": "string" 17578 // } 17579 // }, 17580 // "path": "v2/{+name}", 17581 // "response": { 17582 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 17583 // }, 17584 // "scopes": [ 17585 // "https://www.googleapis.com/auth/cloud-platform", 17586 // "https://www.googleapis.com/auth/dialogflow" 17587 // ] 17588 // } 17589 17590} 17591 17592// method id "dialogflow.projects.agent.sessions.entityTypes.list": 17593 17594type ProjectsAgentSessionsEntityTypesListCall struct { 17595 s *Service 17596 parent string 17597 urlParams_ gensupport.URLParams 17598 ifNoneMatch_ string 17599 ctx_ context.Context 17600 header_ http.Header 17601} 17602 17603// List: Returns the list of all session entity types in the specified 17604// session. 17605// 17606// This method doesn't work with Google Assistant integration. 17607// Contact Dialogflow support if you need to use session entities 17608// with Google Assistant integration. 17609func (r *ProjectsAgentSessionsEntityTypesService) List(parent string) *ProjectsAgentSessionsEntityTypesListCall { 17610 c := &ProjectsAgentSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17611 c.parent = parent 17612 return c 17613} 17614 17615// PageSize sets the optional parameter "pageSize": The maximum number 17616// of items to return in a single page. By 17617// default 100 and at most 1000. 17618func (c *ProjectsAgentSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentSessionsEntityTypesListCall { 17619 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 17620 return c 17621} 17622 17623// PageToken sets the optional parameter "pageToken": The 17624// next_page_token value returned from a previous list request. 17625func (c *ProjectsAgentSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentSessionsEntityTypesListCall { 17626 c.urlParams_.Set("pageToken", pageToken) 17627 return c 17628} 17629 17630// Fields allows partial responses to be retrieved. See 17631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17632// for more information. 17633func (c *ProjectsAgentSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesListCall { 17634 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17635 return c 17636} 17637 17638// IfNoneMatch sets the optional parameter which makes the operation 17639// fail if the object's ETag matches the given value. This is useful for 17640// getting updates only after the object has changed since the last 17641// request. Use googleapi.IsNotModified to check whether the response 17642// error from Do is the result of In-None-Match. 17643func (c *ProjectsAgentSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesListCall { 17644 c.ifNoneMatch_ = entityTag 17645 return c 17646} 17647 17648// Context sets the context to be used in this call's Do method. Any 17649// pending HTTP request will be aborted if the provided context is 17650// canceled. 17651func (c *ProjectsAgentSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesListCall { 17652 c.ctx_ = ctx 17653 return c 17654} 17655 17656// Header returns an http.Header that can be modified by the caller to 17657// add HTTP headers to the request. 17658func (c *ProjectsAgentSessionsEntityTypesListCall) Header() http.Header { 17659 if c.header_ == nil { 17660 c.header_ = make(http.Header) 17661 } 17662 return c.header_ 17663} 17664 17665func (c *ProjectsAgentSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) { 17666 reqHeaders := make(http.Header) 17667 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 17668 for k, v := range c.header_ { 17669 reqHeaders[k] = v 17670 } 17671 reqHeaders.Set("User-Agent", c.s.userAgent()) 17672 if c.ifNoneMatch_ != "" { 17673 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17674 } 17675 var body io.Reader = nil 17676 c.urlParams_.Set("alt", alt) 17677 c.urlParams_.Set("prettyPrint", "false") 17678 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes") 17679 urls += "?" + c.urlParams_.Encode() 17680 req, err := http.NewRequest("GET", urls, body) 17681 if err != nil { 17682 return nil, err 17683 } 17684 req.Header = reqHeaders 17685 googleapi.Expand(req.URL, map[string]string{ 17686 "parent": c.parent, 17687 }) 17688 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17689} 17690 17691// Do executes the "dialogflow.projects.agent.sessions.entityTypes.list" call. 17692// Exactly one of *GoogleCloudDialogflowV2ListSessionEntityTypesResponse 17693// or error will be non-nil. Any non-2xx status code is an error. 17694// Response headers are in either 17695// *GoogleCloudDialogflowV2ListSessionEntityTypesResponse.ServerResponse. 17696// Header or (if a response was returned at all) in 17697// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17698// whether the returned error was because http.StatusNotModified was 17699// returned. 17700func (c *ProjectsAgentSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListSessionEntityTypesResponse, error) { 17701 gensupport.SetOptions(c.urlParams_, opts...) 17702 res, err := c.doRequest("json") 17703 if res != nil && res.StatusCode == http.StatusNotModified { 17704 if res.Body != nil { 17705 res.Body.Close() 17706 } 17707 return nil, &googleapi.Error{ 17708 Code: res.StatusCode, 17709 Header: res.Header, 17710 } 17711 } 17712 if err != nil { 17713 return nil, err 17714 } 17715 defer googleapi.CloseBody(res) 17716 if err := googleapi.CheckResponse(res); err != nil { 17717 return nil, err 17718 } 17719 ret := &GoogleCloudDialogflowV2ListSessionEntityTypesResponse{ 17720 ServerResponse: googleapi.ServerResponse{ 17721 Header: res.Header, 17722 HTTPStatusCode: res.StatusCode, 17723 }, 17724 } 17725 target := &ret 17726 if err := gensupport.DecodeResponse(target, res); err != nil { 17727 return nil, err 17728 } 17729 return ret, nil 17730 // { 17731 // "description": "Returns the list of all session entity types in the specified session.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.", 17732 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes", 17733 // "httpMethod": "GET", 17734 // "id": "dialogflow.projects.agent.sessions.entityTypes.list", 17735 // "parameterOrder": [ 17736 // "parent" 17737 // ], 17738 // "parameters": { 17739 // "pageSize": { 17740 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 17741 // "format": "int32", 17742 // "location": "query", 17743 // "type": "integer" 17744 // }, 17745 // "pageToken": { 17746 // "description": "Optional. The next_page_token value returned from a previous list request.", 17747 // "location": "query", 17748 // "type": "string" 17749 // }, 17750 // "parent": { 17751 // "description": "Required. The session to list all session entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.", 17752 // "location": "path", 17753 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 17754 // "required": true, 17755 // "type": "string" 17756 // } 17757 // }, 17758 // "path": "v2/{+parent}/entityTypes", 17759 // "response": { 17760 // "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse" 17761 // }, 17762 // "scopes": [ 17763 // "https://www.googleapis.com/auth/cloud-platform", 17764 // "https://www.googleapis.com/auth/dialogflow" 17765 // ] 17766 // } 17767 17768} 17769 17770// Pages invokes f for each page of results. 17771// A non-nil error returned from f will halt the iteration. 17772// The provided context supersedes any context provided to the Context method. 17773func (c *ProjectsAgentSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListSessionEntityTypesResponse) error) error { 17774 c.ctx_ = ctx 17775 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17776 for { 17777 x, err := c.Do() 17778 if err != nil { 17779 return err 17780 } 17781 if err := f(x); err != nil { 17782 return err 17783 } 17784 if x.NextPageToken == "" { 17785 return nil 17786 } 17787 c.PageToken(x.NextPageToken) 17788 } 17789} 17790 17791// method id "dialogflow.projects.agent.sessions.entityTypes.patch": 17792 17793type ProjectsAgentSessionsEntityTypesPatchCall struct { 17794 s *Service 17795 nameid string 17796 googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType 17797 urlParams_ gensupport.URLParams 17798 ctx_ context.Context 17799 header_ http.Header 17800} 17801 17802// Patch: Updates the specified session entity type. 17803// 17804// This method doesn't work with Google Assistant integration. 17805// Contact Dialogflow support if you need to use session entities 17806// with Google Assistant integration. 17807func (r *ProjectsAgentSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsAgentSessionsEntityTypesPatchCall { 17808 c := &ProjectsAgentSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17809 c.nameid = nameid 17810 c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype 17811 return c 17812} 17813 17814// UpdateMask sets the optional parameter "updateMask": The mask to 17815// control which fields get updated. 17816func (c *ProjectsAgentSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsEntityTypesPatchCall { 17817 c.urlParams_.Set("updateMask", updateMask) 17818 return c 17819} 17820 17821// Fields allows partial responses to be retrieved. See 17822// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17823// for more information. 17824func (c *ProjectsAgentSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesPatchCall { 17825 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17826 return c 17827} 17828 17829// Context sets the context to be used in this call's Do method. Any 17830// pending HTTP request will be aborted if the provided context is 17831// canceled. 17832func (c *ProjectsAgentSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesPatchCall { 17833 c.ctx_ = ctx 17834 return c 17835} 17836 17837// Header returns an http.Header that can be modified by the caller to 17838// add HTTP headers to the request. 17839func (c *ProjectsAgentSessionsEntityTypesPatchCall) Header() http.Header { 17840 if c.header_ == nil { 17841 c.header_ = make(http.Header) 17842 } 17843 return c.header_ 17844} 17845 17846func (c *ProjectsAgentSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { 17847 reqHeaders := make(http.Header) 17848 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 17849 for k, v := range c.header_ { 17850 reqHeaders[k] = v 17851 } 17852 reqHeaders.Set("User-Agent", c.s.userAgent()) 17853 var body io.Reader = nil 17854 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype) 17855 if err != nil { 17856 return nil, err 17857 } 17858 reqHeaders.Set("Content-Type", "application/json") 17859 c.urlParams_.Set("alt", alt) 17860 c.urlParams_.Set("prettyPrint", "false") 17861 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17862 urls += "?" + c.urlParams_.Encode() 17863 req, err := http.NewRequest("PATCH", urls, body) 17864 if err != nil { 17865 return nil, err 17866 } 17867 req.Header = reqHeaders 17868 googleapi.Expand(req.URL, map[string]string{ 17869 "name": c.nameid, 17870 }) 17871 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17872} 17873 17874// Do executes the "dialogflow.projects.agent.sessions.entityTypes.patch" call. 17875// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error 17876// will be non-nil. Any non-2xx status code is an error. Response 17877// headers are in either 17878// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or 17879// (if a response was returned at all) in 17880// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17881// whether the returned error was because http.StatusNotModified was 17882// returned. 17883func (c *ProjectsAgentSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) { 17884 gensupport.SetOptions(c.urlParams_, opts...) 17885 res, err := c.doRequest("json") 17886 if res != nil && res.StatusCode == http.StatusNotModified { 17887 if res.Body != nil { 17888 res.Body.Close() 17889 } 17890 return nil, &googleapi.Error{ 17891 Code: res.StatusCode, 17892 Header: res.Header, 17893 } 17894 } 17895 if err != nil { 17896 return nil, err 17897 } 17898 defer googleapi.CloseBody(res) 17899 if err := googleapi.CheckResponse(res); err != nil { 17900 return nil, err 17901 } 17902 ret := &GoogleCloudDialogflowV2SessionEntityType{ 17903 ServerResponse: googleapi.ServerResponse{ 17904 Header: res.Header, 17905 HTTPStatusCode: res.StatusCode, 17906 }, 17907 } 17908 target := &ret 17909 if err := gensupport.DecodeResponse(target, res); err != nil { 17910 return nil, err 17911 } 17912 return ret, nil 17913 // { 17914 // "description": "Updates the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.", 17915 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", 17916 // "httpMethod": "PATCH", 17917 // "id": "dialogflow.projects.agent.sessions.entityTypes.patch", 17918 // "parameterOrder": [ 17919 // "name" 17920 // ], 17921 // "parameters": { 17922 // "name": { 17923 // "description": "Required. The unique identifier of this session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e`, or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\n`\u003cEntity Type Display Name\u003e` must be the display name of an existing entity\ntype in the same agent that will be overridden or supplemented.", 17924 // "location": "path", 17925 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", 17926 // "required": true, 17927 // "type": "string" 17928 // }, 17929 // "updateMask": { 17930 // "description": "Optional. The mask to control which fields get updated.", 17931 // "format": "google-fieldmask", 17932 // "location": "query", 17933 // "type": "string" 17934 // } 17935 // }, 17936 // "path": "v2/{+name}", 17937 // "request": { 17938 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 17939 // }, 17940 // "response": { 17941 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 17942 // }, 17943 // "scopes": [ 17944 // "https://www.googleapis.com/auth/cloud-platform", 17945 // "https://www.googleapis.com/auth/dialogflow" 17946 // ] 17947 // } 17948 17949} 17950 17951// method id "dialogflow.projects.locations.operations.cancel": 17952 17953type ProjectsLocationsOperationsCancelCall struct { 17954 s *Service 17955 name string 17956 urlParams_ gensupport.URLParams 17957 ctx_ context.Context 17958 header_ http.Header 17959} 17960 17961// Cancel: Starts asynchronous cancellation on a long-running operation. 17962// The server 17963// makes a best effort to cancel the operation, but success is 17964// not 17965// guaranteed. If the server doesn't support this method, it 17966// returns 17967// `google.rpc.Code.UNIMPLEMENTED`. Clients can 17968// use 17969// Operations.GetOperation or 17970// other methods to check whether the cancellation succeeded or whether 17971// the 17972// operation completed despite cancellation. On successful 17973// cancellation, 17974// the operation is not deleted; instead, it becomes an operation 17975// with 17976// an Operation.error value with a google.rpc.Status.code of 17977// 1, 17978// corresponding to `Code.CANCELLED`. 17979func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { 17980 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17981 c.name = name 17982 return c 17983} 17984 17985// Fields allows partial responses to be retrieved. See 17986// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17987// for more information. 17988func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 17989 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17990 return c 17991} 17992 17993// Context sets the context to be used in this call's Do method. Any 17994// pending HTTP request will be aborted if the provided context is 17995// canceled. 17996func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 17997 c.ctx_ = ctx 17998 return c 17999} 18000 18001// Header returns an http.Header that can be modified by the caller to 18002// add HTTP headers to the request. 18003func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 18004 if c.header_ == nil { 18005 c.header_ = make(http.Header) 18006 } 18007 return c.header_ 18008} 18009 18010func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 18011 reqHeaders := make(http.Header) 18012 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 18013 for k, v := range c.header_ { 18014 reqHeaders[k] = v 18015 } 18016 reqHeaders.Set("User-Agent", c.s.userAgent()) 18017 var body io.Reader = nil 18018 c.urlParams_.Set("alt", alt) 18019 c.urlParams_.Set("prettyPrint", "false") 18020 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 18021 urls += "?" + c.urlParams_.Encode() 18022 req, err := http.NewRequest("POST", urls, body) 18023 if err != nil { 18024 return nil, err 18025 } 18026 req.Header = reqHeaders 18027 googleapi.Expand(req.URL, map[string]string{ 18028 "name": c.name, 18029 }) 18030 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18031} 18032 18033// Do executes the "dialogflow.projects.locations.operations.cancel" call. 18034// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 18035// non-2xx status code is an error. Response headers are in either 18036// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 18037// returned at all) in error.(*googleapi.Error).Header. Use 18038// googleapi.IsNotModified to check whether the returned error was 18039// because http.StatusNotModified was returned. 18040func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 18041 gensupport.SetOptions(c.urlParams_, opts...) 18042 res, err := c.doRequest("json") 18043 if res != nil && res.StatusCode == http.StatusNotModified { 18044 if res.Body != nil { 18045 res.Body.Close() 18046 } 18047 return nil, &googleapi.Error{ 18048 Code: res.StatusCode, 18049 Header: res.Header, 18050 } 18051 } 18052 if err != nil { 18053 return nil, err 18054 } 18055 defer googleapi.CloseBody(res) 18056 if err := googleapi.CheckResponse(res); err != nil { 18057 return nil, err 18058 } 18059 ret := &GoogleProtobufEmpty{ 18060 ServerResponse: googleapi.ServerResponse{ 18061 Header: res.Header, 18062 HTTPStatusCode: res.StatusCode, 18063 }, 18064 } 18065 target := &ret 18066 if err := gensupport.DecodeResponse(target, res); err != nil { 18067 return nil, err 18068 } 18069 return ret, nil 18070 // { 18071 // "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", 18072 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", 18073 // "httpMethod": "POST", 18074 // "id": "dialogflow.projects.locations.operations.cancel", 18075 // "parameterOrder": [ 18076 // "name" 18077 // ], 18078 // "parameters": { 18079 // "name": { 18080 // "description": "The name of the operation resource to be cancelled.", 18081 // "location": "path", 18082 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 18083 // "required": true, 18084 // "type": "string" 18085 // } 18086 // }, 18087 // "path": "v2/{+name}:cancel", 18088 // "response": { 18089 // "$ref": "GoogleProtobufEmpty" 18090 // }, 18091 // "scopes": [ 18092 // "https://www.googleapis.com/auth/cloud-platform", 18093 // "https://www.googleapis.com/auth/dialogflow" 18094 // ] 18095 // } 18096 18097} 18098 18099// method id "dialogflow.projects.locations.operations.get": 18100 18101type ProjectsLocationsOperationsGetCall struct { 18102 s *Service 18103 name string 18104 urlParams_ gensupport.URLParams 18105 ifNoneMatch_ string 18106 ctx_ context.Context 18107 header_ http.Header 18108} 18109 18110// Get: Gets the latest state of a long-running operation. Clients can 18111// use this 18112// method to poll the operation result at intervals as recommended by 18113// the API 18114// service. 18115func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 18116 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18117 c.name = name 18118 return c 18119} 18120 18121// Fields allows partial responses to be retrieved. See 18122// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18123// for more information. 18124func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 18125 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18126 return c 18127} 18128 18129// IfNoneMatch sets the optional parameter which makes the operation 18130// fail if the object's ETag matches the given value. This is useful for 18131// getting updates only after the object has changed since the last 18132// request. Use googleapi.IsNotModified to check whether the response 18133// error from Do is the result of In-None-Match. 18134func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 18135 c.ifNoneMatch_ = entityTag 18136 return c 18137} 18138 18139// Context sets the context to be used in this call's Do method. Any 18140// pending HTTP request will be aborted if the provided context is 18141// canceled. 18142func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 18143 c.ctx_ = ctx 18144 return c 18145} 18146 18147// Header returns an http.Header that can be modified by the caller to 18148// add HTTP headers to the request. 18149func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 18150 if c.header_ == nil { 18151 c.header_ = make(http.Header) 18152 } 18153 return c.header_ 18154} 18155 18156func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 18157 reqHeaders := make(http.Header) 18158 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 18159 for k, v := range c.header_ { 18160 reqHeaders[k] = v 18161 } 18162 reqHeaders.Set("User-Agent", c.s.userAgent()) 18163 if c.ifNoneMatch_ != "" { 18164 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18165 } 18166 var body io.Reader = nil 18167 c.urlParams_.Set("alt", alt) 18168 c.urlParams_.Set("prettyPrint", "false") 18169 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 18170 urls += "?" + c.urlParams_.Encode() 18171 req, err := http.NewRequest("GET", urls, body) 18172 if err != nil { 18173 return nil, err 18174 } 18175 req.Header = reqHeaders 18176 googleapi.Expand(req.URL, map[string]string{ 18177 "name": c.name, 18178 }) 18179 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18180} 18181 18182// Do executes the "dialogflow.projects.locations.operations.get" call. 18183// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 18184// Any non-2xx status code is an error. Response headers are in either 18185// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 18186// was returned at all) in error.(*googleapi.Error).Header. Use 18187// googleapi.IsNotModified to check whether the returned error was 18188// because http.StatusNotModified was returned. 18189func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 18190 gensupport.SetOptions(c.urlParams_, opts...) 18191 res, err := c.doRequest("json") 18192 if res != nil && res.StatusCode == http.StatusNotModified { 18193 if res.Body != nil { 18194 res.Body.Close() 18195 } 18196 return nil, &googleapi.Error{ 18197 Code: res.StatusCode, 18198 Header: res.Header, 18199 } 18200 } 18201 if err != nil { 18202 return nil, err 18203 } 18204 defer googleapi.CloseBody(res) 18205 if err := googleapi.CheckResponse(res); err != nil { 18206 return nil, err 18207 } 18208 ret := &GoogleLongrunningOperation{ 18209 ServerResponse: googleapi.ServerResponse{ 18210 Header: res.Header, 18211 HTTPStatusCode: res.StatusCode, 18212 }, 18213 } 18214 target := &ret 18215 if err := gensupport.DecodeResponse(target, res); err != nil { 18216 return nil, err 18217 } 18218 return ret, nil 18219 // { 18220 // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", 18221 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", 18222 // "httpMethod": "GET", 18223 // "id": "dialogflow.projects.locations.operations.get", 18224 // "parameterOrder": [ 18225 // "name" 18226 // ], 18227 // "parameters": { 18228 // "name": { 18229 // "description": "The name of the operation resource.", 18230 // "location": "path", 18231 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 18232 // "required": true, 18233 // "type": "string" 18234 // } 18235 // }, 18236 // "path": "v2/{+name}", 18237 // "response": { 18238 // "$ref": "GoogleLongrunningOperation" 18239 // }, 18240 // "scopes": [ 18241 // "https://www.googleapis.com/auth/cloud-platform", 18242 // "https://www.googleapis.com/auth/dialogflow" 18243 // ] 18244 // } 18245 18246} 18247 18248// method id "dialogflow.projects.locations.operations.list": 18249 18250type ProjectsLocationsOperationsListCall struct { 18251 s *Service 18252 name string 18253 urlParams_ gensupport.URLParams 18254 ifNoneMatch_ string 18255 ctx_ context.Context 18256 header_ http.Header 18257} 18258 18259// List: Lists operations that match the specified filter in the 18260// request. If the 18261// server doesn't support this method, it returns 18262// `UNIMPLEMENTED`. 18263// 18264// NOTE: the `name` binding allows API services to override the 18265// binding 18266// to use different resource name schemes, such as `users/*/operations`. 18267// To 18268// override the binding, API services can add a binding such 18269// as 18270// "/v1/{name=users/*}/operations" to their service configuration. 18271// For backwards compatibility, the default name includes the 18272// operations 18273// collection id, however overriding users must ensure the name 18274// binding 18275// is the parent resource, without the operations collection id. 18276func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { 18277 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18278 c.name = name 18279 return c 18280} 18281 18282// Filter sets the optional parameter "filter": The standard list 18283// filter. 18284func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { 18285 c.urlParams_.Set("filter", filter) 18286 return c 18287} 18288 18289// PageSize sets the optional parameter "pageSize": The standard list 18290// page size. 18291func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { 18292 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18293 return c 18294} 18295 18296// PageToken sets the optional parameter "pageToken": The standard list 18297// page token. 18298func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { 18299 c.urlParams_.Set("pageToken", pageToken) 18300 return c 18301} 18302 18303// Fields allows partial responses to be retrieved. See 18304// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18305// for more information. 18306func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 18307 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18308 return c 18309} 18310 18311// IfNoneMatch sets the optional parameter which makes the operation 18312// fail if the object's ETag matches the given value. This is useful for 18313// getting updates only after the object has changed since the last 18314// request. Use googleapi.IsNotModified to check whether the response 18315// error from Do is the result of In-None-Match. 18316func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 18317 c.ifNoneMatch_ = entityTag 18318 return c 18319} 18320 18321// Context sets the context to be used in this call's Do method. Any 18322// pending HTTP request will be aborted if the provided context is 18323// canceled. 18324func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 18325 c.ctx_ = ctx 18326 return c 18327} 18328 18329// Header returns an http.Header that can be modified by the caller to 18330// add HTTP headers to the request. 18331func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 18332 if c.header_ == nil { 18333 c.header_ = make(http.Header) 18334 } 18335 return c.header_ 18336} 18337 18338func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 18339 reqHeaders := make(http.Header) 18340 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 18341 for k, v := range c.header_ { 18342 reqHeaders[k] = v 18343 } 18344 reqHeaders.Set("User-Agent", c.s.userAgent()) 18345 if c.ifNoneMatch_ != "" { 18346 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18347 } 18348 var body io.Reader = nil 18349 c.urlParams_.Set("alt", alt) 18350 c.urlParams_.Set("prettyPrint", "false") 18351 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") 18352 urls += "?" + c.urlParams_.Encode() 18353 req, err := http.NewRequest("GET", urls, body) 18354 if err != nil { 18355 return nil, err 18356 } 18357 req.Header = reqHeaders 18358 googleapi.Expand(req.URL, map[string]string{ 18359 "name": c.name, 18360 }) 18361 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18362} 18363 18364// Do executes the "dialogflow.projects.locations.operations.list" call. 18365// Exactly one of *GoogleLongrunningListOperationsResponse or error will 18366// be non-nil. Any non-2xx status code is an error. Response headers are 18367// in either 18368// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if 18369// a response was returned at all) in error.(*googleapi.Error).Header. 18370// Use googleapi.IsNotModified to check whether the returned error was 18371// because http.StatusNotModified was returned. 18372func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { 18373 gensupport.SetOptions(c.urlParams_, opts...) 18374 res, err := c.doRequest("json") 18375 if res != nil && res.StatusCode == http.StatusNotModified { 18376 if res.Body != nil { 18377 res.Body.Close() 18378 } 18379 return nil, &googleapi.Error{ 18380 Code: res.StatusCode, 18381 Header: res.Header, 18382 } 18383 } 18384 if err != nil { 18385 return nil, err 18386 } 18387 defer googleapi.CloseBody(res) 18388 if err := googleapi.CheckResponse(res); err != nil { 18389 return nil, err 18390 } 18391 ret := &GoogleLongrunningListOperationsResponse{ 18392 ServerResponse: googleapi.ServerResponse{ 18393 Header: res.Header, 18394 HTTPStatusCode: res.StatusCode, 18395 }, 18396 } 18397 target := &ret 18398 if err := gensupport.DecodeResponse(target, res); err != nil { 18399 return nil, err 18400 } 18401 return ret, nil 18402 // { 18403 // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", 18404 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations", 18405 // "httpMethod": "GET", 18406 // "id": "dialogflow.projects.locations.operations.list", 18407 // "parameterOrder": [ 18408 // "name" 18409 // ], 18410 // "parameters": { 18411 // "filter": { 18412 // "description": "The standard list filter.", 18413 // "location": "query", 18414 // "type": "string" 18415 // }, 18416 // "name": { 18417 // "description": "The name of the operation's parent resource.", 18418 // "location": "path", 18419 // "pattern": "^projects/[^/]+/locations/[^/]+$", 18420 // "required": true, 18421 // "type": "string" 18422 // }, 18423 // "pageSize": { 18424 // "description": "The standard list page size.", 18425 // "format": "int32", 18426 // "location": "query", 18427 // "type": "integer" 18428 // }, 18429 // "pageToken": { 18430 // "description": "The standard list page token.", 18431 // "location": "query", 18432 // "type": "string" 18433 // } 18434 // }, 18435 // "path": "v2/{+name}/operations", 18436 // "response": { 18437 // "$ref": "GoogleLongrunningListOperationsResponse" 18438 // }, 18439 // "scopes": [ 18440 // "https://www.googleapis.com/auth/cloud-platform", 18441 // "https://www.googleapis.com/auth/dialogflow" 18442 // ] 18443 // } 18444 18445} 18446 18447// Pages invokes f for each page of results. 18448// A non-nil error returned from f will halt the iteration. 18449// The provided context supersedes any context provided to the Context method. 18450func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { 18451 c.ctx_ = ctx 18452 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18453 for { 18454 x, err := c.Do() 18455 if err != nil { 18456 return err 18457 } 18458 if err := f(x); err != nil { 18459 return err 18460 } 18461 if x.NextPageToken == "" { 18462 return nil 18463 } 18464 c.PageToken(x.NextPageToken) 18465 } 18466} 18467 18468// method id "dialogflow.projects.operations.cancel": 18469 18470type ProjectsOperationsCancelCall struct { 18471 s *Service 18472 name string 18473 urlParams_ gensupport.URLParams 18474 ctx_ context.Context 18475 header_ http.Header 18476} 18477 18478// Cancel: Starts asynchronous cancellation on a long-running operation. 18479// The server 18480// makes a best effort to cancel the operation, but success is 18481// not 18482// guaranteed. If the server doesn't support this method, it 18483// returns 18484// `google.rpc.Code.UNIMPLEMENTED`. Clients can 18485// use 18486// Operations.GetOperation or 18487// other methods to check whether the cancellation succeeded or whether 18488// the 18489// operation completed despite cancellation. On successful 18490// cancellation, 18491// the operation is not deleted; instead, it becomes an operation 18492// with 18493// an Operation.error value with a google.rpc.Status.code of 18494// 1, 18495// corresponding to `Code.CANCELLED`. 18496func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall { 18497 c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18498 c.name = name 18499 return c 18500} 18501 18502// Fields allows partial responses to be retrieved. See 18503// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18504// for more information. 18505func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall { 18506 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18507 return c 18508} 18509 18510// Context sets the context to be used in this call's Do method. Any 18511// pending HTTP request will be aborted if the provided context is 18512// canceled. 18513func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall { 18514 c.ctx_ = ctx 18515 return c 18516} 18517 18518// Header returns an http.Header that can be modified by the caller to 18519// add HTTP headers to the request. 18520func (c *ProjectsOperationsCancelCall) Header() http.Header { 18521 if c.header_ == nil { 18522 c.header_ = make(http.Header) 18523 } 18524 return c.header_ 18525} 18526 18527func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 18528 reqHeaders := make(http.Header) 18529 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 18530 for k, v := range c.header_ { 18531 reqHeaders[k] = v 18532 } 18533 reqHeaders.Set("User-Agent", c.s.userAgent()) 18534 var body io.Reader = nil 18535 c.urlParams_.Set("alt", alt) 18536 c.urlParams_.Set("prettyPrint", "false") 18537 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 18538 urls += "?" + c.urlParams_.Encode() 18539 req, err := http.NewRequest("POST", urls, body) 18540 if err != nil { 18541 return nil, err 18542 } 18543 req.Header = reqHeaders 18544 googleapi.Expand(req.URL, map[string]string{ 18545 "name": c.name, 18546 }) 18547 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18548} 18549 18550// Do executes the "dialogflow.projects.operations.cancel" call. 18551// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 18552// non-2xx status code is an error. Response headers are in either 18553// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 18554// returned at all) in error.(*googleapi.Error).Header. Use 18555// googleapi.IsNotModified to check whether the returned error was 18556// because http.StatusNotModified was returned. 18557func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 18558 gensupport.SetOptions(c.urlParams_, opts...) 18559 res, err := c.doRequest("json") 18560 if res != nil && res.StatusCode == http.StatusNotModified { 18561 if res.Body != nil { 18562 res.Body.Close() 18563 } 18564 return nil, &googleapi.Error{ 18565 Code: res.StatusCode, 18566 Header: res.Header, 18567 } 18568 } 18569 if err != nil { 18570 return nil, err 18571 } 18572 defer googleapi.CloseBody(res) 18573 if err := googleapi.CheckResponse(res); err != nil { 18574 return nil, err 18575 } 18576 ret := &GoogleProtobufEmpty{ 18577 ServerResponse: googleapi.ServerResponse{ 18578 Header: res.Header, 18579 HTTPStatusCode: res.StatusCode, 18580 }, 18581 } 18582 target := &ret 18583 if err := gensupport.DecodeResponse(target, res); err != nil { 18584 return nil, err 18585 } 18586 return ret, nil 18587 // { 18588 // "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", 18589 // "flatPath": "v2/projects/{projectsId}/operations/{operationsId}:cancel", 18590 // "httpMethod": "POST", 18591 // "id": "dialogflow.projects.operations.cancel", 18592 // "parameterOrder": [ 18593 // "name" 18594 // ], 18595 // "parameters": { 18596 // "name": { 18597 // "description": "The name of the operation resource to be cancelled.", 18598 // "location": "path", 18599 // "pattern": "^projects/[^/]+/operations/[^/]+$", 18600 // "required": true, 18601 // "type": "string" 18602 // } 18603 // }, 18604 // "path": "v2/{+name}:cancel", 18605 // "response": { 18606 // "$ref": "GoogleProtobufEmpty" 18607 // }, 18608 // "scopes": [ 18609 // "https://www.googleapis.com/auth/cloud-platform", 18610 // "https://www.googleapis.com/auth/dialogflow" 18611 // ] 18612 // } 18613 18614} 18615 18616// method id "dialogflow.projects.operations.get": 18617 18618type ProjectsOperationsGetCall struct { 18619 s *Service 18620 name string 18621 urlParams_ gensupport.URLParams 18622 ifNoneMatch_ string 18623 ctx_ context.Context 18624 header_ http.Header 18625} 18626 18627// Get: Gets the latest state of a long-running operation. Clients can 18628// use this 18629// method to poll the operation result at intervals as recommended by 18630// the API 18631// service. 18632func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { 18633 c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18634 c.name = name 18635 return c 18636} 18637 18638// Fields allows partial responses to be retrieved. See 18639// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18640// for more information. 18641func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { 18642 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18643 return c 18644} 18645 18646// IfNoneMatch sets the optional parameter which makes the operation 18647// fail if the object's ETag matches the given value. This is useful for 18648// getting updates only after the object has changed since the last 18649// request. Use googleapi.IsNotModified to check whether the response 18650// error from Do is the result of In-None-Match. 18651func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { 18652 c.ifNoneMatch_ = entityTag 18653 return c 18654} 18655 18656// Context sets the context to be used in this call's Do method. Any 18657// pending HTTP request will be aborted if the provided context is 18658// canceled. 18659func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { 18660 c.ctx_ = ctx 18661 return c 18662} 18663 18664// Header returns an http.Header that can be modified by the caller to 18665// add HTTP headers to the request. 18666func (c *ProjectsOperationsGetCall) Header() http.Header { 18667 if c.header_ == nil { 18668 c.header_ = make(http.Header) 18669 } 18670 return c.header_ 18671} 18672 18673func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 18674 reqHeaders := make(http.Header) 18675 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 18676 for k, v := range c.header_ { 18677 reqHeaders[k] = v 18678 } 18679 reqHeaders.Set("User-Agent", c.s.userAgent()) 18680 if c.ifNoneMatch_ != "" { 18681 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18682 } 18683 var body io.Reader = nil 18684 c.urlParams_.Set("alt", alt) 18685 c.urlParams_.Set("prettyPrint", "false") 18686 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 18687 urls += "?" + c.urlParams_.Encode() 18688 req, err := http.NewRequest("GET", urls, body) 18689 if err != nil { 18690 return nil, err 18691 } 18692 req.Header = reqHeaders 18693 googleapi.Expand(req.URL, map[string]string{ 18694 "name": c.name, 18695 }) 18696 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18697} 18698 18699// Do executes the "dialogflow.projects.operations.get" call. 18700// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 18701// Any non-2xx status code is an error. Response headers are in either 18702// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 18703// was returned at all) in error.(*googleapi.Error).Header. Use 18704// googleapi.IsNotModified to check whether the returned error was 18705// because http.StatusNotModified was returned. 18706func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 18707 gensupport.SetOptions(c.urlParams_, opts...) 18708 res, err := c.doRequest("json") 18709 if res != nil && res.StatusCode == http.StatusNotModified { 18710 if res.Body != nil { 18711 res.Body.Close() 18712 } 18713 return nil, &googleapi.Error{ 18714 Code: res.StatusCode, 18715 Header: res.Header, 18716 } 18717 } 18718 if err != nil { 18719 return nil, err 18720 } 18721 defer googleapi.CloseBody(res) 18722 if err := googleapi.CheckResponse(res); err != nil { 18723 return nil, err 18724 } 18725 ret := &GoogleLongrunningOperation{ 18726 ServerResponse: googleapi.ServerResponse{ 18727 Header: res.Header, 18728 HTTPStatusCode: res.StatusCode, 18729 }, 18730 } 18731 target := &ret 18732 if err := gensupport.DecodeResponse(target, res); err != nil { 18733 return nil, err 18734 } 18735 return ret, nil 18736 // { 18737 // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", 18738 // "flatPath": "v2/projects/{projectsId}/operations/{operationsId}", 18739 // "httpMethod": "GET", 18740 // "id": "dialogflow.projects.operations.get", 18741 // "parameterOrder": [ 18742 // "name" 18743 // ], 18744 // "parameters": { 18745 // "name": { 18746 // "description": "The name of the operation resource.", 18747 // "location": "path", 18748 // "pattern": "^projects/[^/]+/operations/[^/]+$", 18749 // "required": true, 18750 // "type": "string" 18751 // } 18752 // }, 18753 // "path": "v2/{+name}", 18754 // "response": { 18755 // "$ref": "GoogleLongrunningOperation" 18756 // }, 18757 // "scopes": [ 18758 // "https://www.googleapis.com/auth/cloud-platform", 18759 // "https://www.googleapis.com/auth/dialogflow" 18760 // ] 18761 // } 18762 18763} 18764 18765// method id "dialogflow.projects.operations.list": 18766 18767type ProjectsOperationsListCall struct { 18768 s *Service 18769 name string 18770 urlParams_ gensupport.URLParams 18771 ifNoneMatch_ string 18772 ctx_ context.Context 18773 header_ http.Header 18774} 18775 18776// List: Lists operations that match the specified filter in the 18777// request. If the 18778// server doesn't support this method, it returns 18779// `UNIMPLEMENTED`. 18780// 18781// NOTE: the `name` binding allows API services to override the 18782// binding 18783// to use different resource name schemes, such as `users/*/operations`. 18784// To 18785// override the binding, API services can add a binding such 18786// as 18787// "/v1/{name=users/*}/operations" to their service configuration. 18788// For backwards compatibility, the default name includes the 18789// operations 18790// collection id, however overriding users must ensure the name 18791// binding 18792// is the parent resource, without the operations collection id. 18793func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall { 18794 c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18795 c.name = name 18796 return c 18797} 18798 18799// Filter sets the optional parameter "filter": The standard list 18800// filter. 18801func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall { 18802 c.urlParams_.Set("filter", filter) 18803 return c 18804} 18805 18806// PageSize sets the optional parameter "pageSize": The standard list 18807// page size. 18808func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall { 18809 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18810 return c 18811} 18812 18813// PageToken sets the optional parameter "pageToken": The standard list 18814// page token. 18815func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall { 18816 c.urlParams_.Set("pageToken", pageToken) 18817 return c 18818} 18819 18820// Fields allows partial responses to be retrieved. See 18821// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18822// for more information. 18823func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall { 18824 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18825 return c 18826} 18827 18828// IfNoneMatch sets the optional parameter which makes the operation 18829// fail if the object's ETag matches the given value. This is useful for 18830// getting updates only after the object has changed since the last 18831// request. Use googleapi.IsNotModified to check whether the response 18832// error from Do is the result of In-None-Match. 18833func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall { 18834 c.ifNoneMatch_ = entityTag 18835 return c 18836} 18837 18838// Context sets the context to be used in this call's Do method. Any 18839// pending HTTP request will be aborted if the provided context is 18840// canceled. 18841func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall { 18842 c.ctx_ = ctx 18843 return c 18844} 18845 18846// Header returns an http.Header that can be modified by the caller to 18847// add HTTP headers to the request. 18848func (c *ProjectsOperationsListCall) Header() http.Header { 18849 if c.header_ == nil { 18850 c.header_ = make(http.Header) 18851 } 18852 return c.header_ 18853} 18854 18855func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) { 18856 reqHeaders := make(http.Header) 18857 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 18858 for k, v := range c.header_ { 18859 reqHeaders[k] = v 18860 } 18861 reqHeaders.Set("User-Agent", c.s.userAgent()) 18862 if c.ifNoneMatch_ != "" { 18863 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18864 } 18865 var body io.Reader = nil 18866 c.urlParams_.Set("alt", alt) 18867 c.urlParams_.Set("prettyPrint", "false") 18868 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") 18869 urls += "?" + c.urlParams_.Encode() 18870 req, err := http.NewRequest("GET", urls, body) 18871 if err != nil { 18872 return nil, err 18873 } 18874 req.Header = reqHeaders 18875 googleapi.Expand(req.URL, map[string]string{ 18876 "name": c.name, 18877 }) 18878 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18879} 18880 18881// Do executes the "dialogflow.projects.operations.list" call. 18882// Exactly one of *GoogleLongrunningListOperationsResponse or error will 18883// be non-nil. Any non-2xx status code is an error. Response headers are 18884// in either 18885// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if 18886// a response was returned at all) in error.(*googleapi.Error).Header. 18887// Use googleapi.IsNotModified to check whether the returned error was 18888// because http.StatusNotModified was returned. 18889func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { 18890 gensupport.SetOptions(c.urlParams_, opts...) 18891 res, err := c.doRequest("json") 18892 if res != nil && res.StatusCode == http.StatusNotModified { 18893 if res.Body != nil { 18894 res.Body.Close() 18895 } 18896 return nil, &googleapi.Error{ 18897 Code: res.StatusCode, 18898 Header: res.Header, 18899 } 18900 } 18901 if err != nil { 18902 return nil, err 18903 } 18904 defer googleapi.CloseBody(res) 18905 if err := googleapi.CheckResponse(res); err != nil { 18906 return nil, err 18907 } 18908 ret := &GoogleLongrunningListOperationsResponse{ 18909 ServerResponse: googleapi.ServerResponse{ 18910 Header: res.Header, 18911 HTTPStatusCode: res.StatusCode, 18912 }, 18913 } 18914 target := &ret 18915 if err := gensupport.DecodeResponse(target, res); err != nil { 18916 return nil, err 18917 } 18918 return ret, nil 18919 // { 18920 // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", 18921 // "flatPath": "v2/projects/{projectsId}/operations", 18922 // "httpMethod": "GET", 18923 // "id": "dialogflow.projects.operations.list", 18924 // "parameterOrder": [ 18925 // "name" 18926 // ], 18927 // "parameters": { 18928 // "filter": { 18929 // "description": "The standard list filter.", 18930 // "location": "query", 18931 // "type": "string" 18932 // }, 18933 // "name": { 18934 // "description": "The name of the operation's parent resource.", 18935 // "location": "path", 18936 // "pattern": "^projects/[^/]+$", 18937 // "required": true, 18938 // "type": "string" 18939 // }, 18940 // "pageSize": { 18941 // "description": "The standard list page size.", 18942 // "format": "int32", 18943 // "location": "query", 18944 // "type": "integer" 18945 // }, 18946 // "pageToken": { 18947 // "description": "The standard list page token.", 18948 // "location": "query", 18949 // "type": "string" 18950 // } 18951 // }, 18952 // "path": "v2/{+name}/operations", 18953 // "response": { 18954 // "$ref": "GoogleLongrunningListOperationsResponse" 18955 // }, 18956 // "scopes": [ 18957 // "https://www.googleapis.com/auth/cloud-platform", 18958 // "https://www.googleapis.com/auth/dialogflow" 18959 // ] 18960 // } 18961 18962} 18963 18964// Pages invokes f for each page of results. 18965// A non-nil error returned from f will halt the iteration. 18966// The provided context supersedes any context provided to the Context method. 18967func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { 18968 c.ctx_ = ctx 18969 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18970 for { 18971 x, err := c.Do() 18972 if err != nil { 18973 return err 18974 } 18975 if err := f(x); err != nil { 18976 return err 18977 } 18978 if x.NextPageToken == "" { 18979 return nil 18980 } 18981 c.PageToken(x.NextPageToken) 18982 } 18983} 18984