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/" 84 85// OAuth2 scopes used by this API. 86const ( 87 // View and manage your data across Google Cloud Platform services 88 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 89 90 // View, manage and query your Dialogflow agents 91 DialogflowScope = "https://www.googleapis.com/auth/dialogflow" 92) 93 94// NewService creates a new Service. 95func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 96 scopesOption := option.WithScopes( 97 "https://www.googleapis.com/auth/cloud-platform", 98 "https://www.googleapis.com/auth/dialogflow", 99 ) 100 // NOTE: prepend, so we don't override user-specified scopes. 101 opts = append([]option.ClientOption{scopesOption}, opts...) 102 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 103 client, endpoint, err := htransport.NewClient(ctx, opts...) 104 if err != nil { 105 return nil, err 106 } 107 s, err := New(client) 108 if err != nil { 109 return nil, err 110 } 111 if endpoint != "" { 112 s.BasePath = endpoint 113 } 114 return s, nil 115} 116 117// New creates a new Service. It uses the provided http.Client for requests. 118// 119// Deprecated: please use NewService instead. 120// To provide a custom HTTP client, use option.WithHTTPClient. 121// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 122func New(client *http.Client) (*Service, error) { 123 if client == nil { 124 return nil, errors.New("client is nil") 125 } 126 s := &Service{client: client, BasePath: basePath} 127 s.Projects = NewProjectsService(s) 128 return s, nil 129} 130 131type Service struct { 132 client *http.Client 133 BasePath string // API endpoint base URL 134 UserAgent string // optional additional User-Agent fragment 135 136 Projects *ProjectsService 137} 138 139func (s *Service) userAgent() string { 140 if s.UserAgent == "" { 141 return googleapi.UserAgent 142 } 143 return googleapi.UserAgent + " " + s.UserAgent 144} 145 146func NewProjectsService(s *Service) *ProjectsService { 147 rs := &ProjectsService{s: s} 148 rs.Agent = NewProjectsAgentService(s) 149 rs.Locations = NewProjectsLocationsService(s) 150 rs.Operations = NewProjectsOperationsService(s) 151 return rs 152} 153 154type ProjectsService struct { 155 s *Service 156 157 Agent *ProjectsAgentService 158 159 Locations *ProjectsLocationsService 160 161 Operations *ProjectsOperationsService 162} 163 164func NewProjectsAgentService(s *Service) *ProjectsAgentService { 165 rs := &ProjectsAgentService{s: s} 166 rs.EntityTypes = NewProjectsAgentEntityTypesService(s) 167 rs.Intents = NewProjectsAgentIntentsService(s) 168 rs.Sessions = NewProjectsAgentSessionsService(s) 169 return rs 170} 171 172type ProjectsAgentService struct { 173 s *Service 174 175 EntityTypes *ProjectsAgentEntityTypesService 176 177 Intents *ProjectsAgentIntentsService 178 179 Sessions *ProjectsAgentSessionsService 180} 181 182func NewProjectsAgentEntityTypesService(s *Service) *ProjectsAgentEntityTypesService { 183 rs := &ProjectsAgentEntityTypesService{s: s} 184 rs.Entities = NewProjectsAgentEntityTypesEntitiesService(s) 185 return rs 186} 187 188type ProjectsAgentEntityTypesService struct { 189 s *Service 190 191 Entities *ProjectsAgentEntityTypesEntitiesService 192} 193 194func NewProjectsAgentEntityTypesEntitiesService(s *Service) *ProjectsAgentEntityTypesEntitiesService { 195 rs := &ProjectsAgentEntityTypesEntitiesService{s: s} 196 return rs 197} 198 199type ProjectsAgentEntityTypesEntitiesService struct { 200 s *Service 201} 202 203func NewProjectsAgentIntentsService(s *Service) *ProjectsAgentIntentsService { 204 rs := &ProjectsAgentIntentsService{s: s} 205 return rs 206} 207 208type ProjectsAgentIntentsService struct { 209 s *Service 210} 211 212func NewProjectsAgentSessionsService(s *Service) *ProjectsAgentSessionsService { 213 rs := &ProjectsAgentSessionsService{s: s} 214 rs.Contexts = NewProjectsAgentSessionsContextsService(s) 215 rs.EntityTypes = NewProjectsAgentSessionsEntityTypesService(s) 216 return rs 217} 218 219type ProjectsAgentSessionsService struct { 220 s *Service 221 222 Contexts *ProjectsAgentSessionsContextsService 223 224 EntityTypes *ProjectsAgentSessionsEntityTypesService 225} 226 227func NewProjectsAgentSessionsContextsService(s *Service) *ProjectsAgentSessionsContextsService { 228 rs := &ProjectsAgentSessionsContextsService{s: s} 229 return rs 230} 231 232type ProjectsAgentSessionsContextsService struct { 233 s *Service 234} 235 236func NewProjectsAgentSessionsEntityTypesService(s *Service) *ProjectsAgentSessionsEntityTypesService { 237 rs := &ProjectsAgentSessionsEntityTypesService{s: s} 238 return rs 239} 240 241type ProjectsAgentSessionsEntityTypesService struct { 242 s *Service 243} 244 245func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 246 rs := &ProjectsLocationsService{s: s} 247 rs.Operations = NewProjectsLocationsOperationsService(s) 248 return rs 249} 250 251type ProjectsLocationsService struct { 252 s *Service 253 254 Operations *ProjectsLocationsOperationsService 255} 256 257func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 258 rs := &ProjectsLocationsOperationsService{s: s} 259 return rs 260} 261 262type ProjectsLocationsOperationsService struct { 263 s *Service 264} 265 266func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { 267 rs := &ProjectsOperationsService{s: s} 268 return rs 269} 270 271type ProjectsOperationsService struct { 272 s *Service 273} 274 275// GoogleCloudDialogflowV2Agent: Represents a conversational agent. 276type GoogleCloudDialogflowV2Agent struct { 277 // ApiVersion: Optional. API version displayed in Dialogflow console. If 278 // not specified, 279 // V2 API is assumed. Clients are free to query different service 280 // endpoints 281 // for different API versions. However, bots connectors and webhook 282 // calls will 283 // follow the specified API version. 284 // 285 // Possible values: 286 // "API_VERSION_UNSPECIFIED" - Not specified. 287 // "API_VERSION_V1" - Legacy V1 API. 288 // "API_VERSION_V2" - V2 API. 289 // "API_VERSION_V2_BETA_1" - V2beta1 API. 290 ApiVersion string `json:"apiVersion,omitempty"` 291 292 // AvatarUri: Optional. The URI of the agent's avatar. 293 // Avatars are used throughout the Dialogflow console and in the 294 // self-hosted 295 // [Web 296 // Demo](https://cloud.google.com/dialogflow/docs/integr 297 // ations/web-demo) 298 // integration. 299 AvatarUri string `json:"avatarUri,omitempty"` 300 301 // ClassificationThreshold: Optional. To filter out false positive 302 // results and still get variety in 303 // matched natural language inputs for your agent, you can tune the 304 // machine 305 // learning classification threshold. If the returned score value is 306 // less than 307 // the threshold value, then a fallback intent will be triggered or, if 308 // there 309 // are no fallback intents defined, no intent will be triggered. The 310 // score 311 // values range from 0.0 (completely uncertain) to 1.0 (completely 312 // certain). 313 // If set to 0.0, the default of 0.3 is used. 314 ClassificationThreshold float64 `json:"classificationThreshold,omitempty"` 315 316 // DefaultLanguageCode: Required. The default language of the agent as a 317 // language tag. 318 // See 319 // [Language 320 // Support](https://cloud.google.com/dialogflow/docs/refere 321 // nce/language) 322 // for a list of the currently supported language codes. This field 323 // cannot be 324 // set by the `Update` method. 325 DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` 326 327 // Description: Optional. The description of this agent. 328 // The maximum length is 500 characters. If exceeded, the request is 329 // rejected. 330 Description string `json:"description,omitempty"` 331 332 // DisplayName: Required. The name of this agent. 333 DisplayName string `json:"displayName,omitempty"` 334 335 // EnableLogging: Optional. Determines whether this agent should log 336 // conversation queries. 337 EnableLogging bool `json:"enableLogging,omitempty"` 338 339 // MatchMode: Optional. Determines how intents are detected from user 340 // queries. 341 // 342 // Possible values: 343 // "MATCH_MODE_UNSPECIFIED" - Not specified. 344 // "MATCH_MODE_HYBRID" - Best for agents with a small number of 345 // examples in intents and/or wide 346 // use of templates syntax and composite entities. 347 // "MATCH_MODE_ML_ONLY" - Can be used for agents with a large number 348 // of examples in intents, 349 // especially the ones using @sys.any or very large custom entities. 350 MatchMode string `json:"matchMode,omitempty"` 351 352 // Parent: Required. The project of this agent. 353 // Format: `projects/<Project ID>`. 354 Parent string `json:"parent,omitempty"` 355 356 // SupportedLanguageCodes: Optional. The list of all languages supported 357 // by this agent (except for the 358 // `default_language_code`). 359 SupportedLanguageCodes []string `json:"supportedLanguageCodes,omitempty"` 360 361 // Tier: Optional. The agent tier. If not specified, TIER_STANDARD is 362 // assumed. 363 // 364 // Possible values: 365 // "TIER_UNSPECIFIED" - Not specified. This value should never be 366 // used. 367 // "TIER_STANDARD" - Standard tier. 368 // "TIER_ENTERPRISE" - Enterprise tier (Essentials). 369 // "TIER_ENTERPRISE_PLUS" - Enterprise tier (Plus). 370 Tier string `json:"tier,omitempty"` 371 372 // TimeZone: Required. The time zone of this agent from the 373 // [time zone database](https://www.iana.org/time-zones), 374 // e.g., 375 // America/New_York, Europe/Paris. 376 TimeZone string `json:"timeZone,omitempty"` 377 378 // ServerResponse contains the HTTP response code and headers from the 379 // server. 380 googleapi.ServerResponse `json:"-"` 381 382 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 383 // unconditionally include in API requests. By default, fields with 384 // empty values are omitted from API requests. However, any non-pointer, 385 // non-interface field appearing in ForceSendFields will be sent to the 386 // server regardless of whether the field is empty or not. This may be 387 // used to include empty fields in Patch requests. 388 ForceSendFields []string `json:"-"` 389 390 // NullFields is a list of field names (e.g. "ApiVersion") to include in 391 // API requests with the JSON null value. By default, fields with empty 392 // values are omitted from API requests. However, any field with an 393 // empty value appearing in NullFields will be sent to the server as 394 // null. It is an error if a field in this list has a non-empty value. 395 // This may be used to include null fields in Patch requests. 396 NullFields []string `json:"-"` 397} 398 399func (s *GoogleCloudDialogflowV2Agent) MarshalJSON() ([]byte, error) { 400 type NoMethod GoogleCloudDialogflowV2Agent 401 raw := NoMethod(*s) 402 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 403} 404 405func (s *GoogleCloudDialogflowV2Agent) UnmarshalJSON(data []byte) error { 406 type NoMethod GoogleCloudDialogflowV2Agent 407 var s1 struct { 408 ClassificationThreshold gensupport.JSONFloat64 `json:"classificationThreshold"` 409 *NoMethod 410 } 411 s1.NoMethod = (*NoMethod)(s) 412 if err := json.Unmarshal(data, &s1); err != nil { 413 return err 414 } 415 s.ClassificationThreshold = float64(s1.ClassificationThreshold) 416 return nil 417} 418 419// GoogleCloudDialogflowV2AnnotatedMessagePart: Represents a part of a 420// message possibly annotated with an entity. The part 421// can be an entity or purely a part of the message between two entities 422// or 423// message start/end. 424type GoogleCloudDialogflowV2AnnotatedMessagePart struct { 425 // EntityType: The [Dialogflow system 426 // entity 427 // type](https://cloud.google.com/dialogflow/docs/reference/system 428 // -entities) 429 // of this message part. If this is empty, Dialogflow could not annotate 430 // the 431 // phrase part with a system entity. 432 EntityType string `json:"entityType,omitempty"` 433 434 // FormattedValue: The [Dialogflow system entity formatted 435 // value 436 // ](https://cloud.google.com/dialogflow/docs/reference/system-enti 437 // ties) of 438 // this message part. For example for a system entity of 439 // type 440 // `@sys.unit-currency`, this may contain: 441 // <pre> 442 // { 443 // "amount": 5, 444 // "currency": "USD" 445 // } 446 // </pre> 447 FormattedValue interface{} `json:"formattedValue,omitempty"` 448 449 // Text: A part of a message possibly annotated with an entity. 450 Text string `json:"text,omitempty"` 451 452 // ForceSendFields is a list of field names (e.g. "EntityType") to 453 // unconditionally include in API requests. By default, fields with 454 // empty values are omitted from API requests. However, any non-pointer, 455 // non-interface field appearing in ForceSendFields will be sent to the 456 // server regardless of whether the field is empty or not. This may be 457 // used to include empty fields in Patch requests. 458 ForceSendFields []string `json:"-"` 459 460 // NullFields is a list of field names (e.g. "EntityType") to include in 461 // API requests with the JSON null value. By default, fields with empty 462 // values are omitted from API requests. However, any field with an 463 // empty value appearing in NullFields will be sent to the server as 464 // null. It is an error if a field in this list has a non-empty value. 465 // This may be used to include null fields in Patch requests. 466 NullFields []string `json:"-"` 467} 468 469func (s *GoogleCloudDialogflowV2AnnotatedMessagePart) MarshalJSON() ([]byte, error) { 470 type NoMethod GoogleCloudDialogflowV2AnnotatedMessagePart 471 raw := NoMethod(*s) 472 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 473} 474 475// GoogleCloudDialogflowV2BatchCreateEntitiesRequest: The request 476// message for EntityTypes.BatchCreateEntities. 477type GoogleCloudDialogflowV2BatchCreateEntitiesRequest struct { 478 // Entities: Required. The entities to create. 479 Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"` 480 481 // LanguageCode: Optional. The language of entity synonyms defined in 482 // `entities`. If not 483 // specified, the agent's default language is 484 // used. 485 // [Many 486 // languages](https://cloud.google.com/dialogflow/docs/refere 487 // nce/language) 488 // are supported. Note: languages must be enabled in the agent before 489 // they can 490 // be used. 491 LanguageCode string `json:"languageCode,omitempty"` 492 493 // ForceSendFields is a list of field names (e.g. "Entities") to 494 // unconditionally include in API requests. By default, fields with 495 // empty values are omitted from API requests. However, any non-pointer, 496 // non-interface field appearing in ForceSendFields will be sent to the 497 // server regardless of whether the field is empty or not. This may be 498 // used to include empty fields in Patch requests. 499 ForceSendFields []string `json:"-"` 500 501 // NullFields is a list of field names (e.g. "Entities") to include in 502 // API requests with the JSON null value. By default, fields with empty 503 // values are omitted from API requests. However, any field with an 504 // empty value appearing in NullFields will be sent to the server as 505 // null. It is an error if a field in this list has a non-empty value. 506 // This may be used to include null fields in Patch requests. 507 NullFields []string `json:"-"` 508} 509 510func (s *GoogleCloudDialogflowV2BatchCreateEntitiesRequest) MarshalJSON() ([]byte, error) { 511 type NoMethod GoogleCloudDialogflowV2BatchCreateEntitiesRequest 512 raw := NoMethod(*s) 513 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 514} 515 516// GoogleCloudDialogflowV2BatchDeleteEntitiesRequest: The request 517// message for EntityTypes.BatchDeleteEntities. 518type GoogleCloudDialogflowV2BatchDeleteEntitiesRequest struct { 519 // EntityValues: Required. The reference `values` of the entities to 520 // delete. Note that 521 // these are not fully-qualified names, i.e. they don't start 522 // with 523 // `projects/<Project ID>`. 524 EntityValues []string `json:"entityValues,omitempty"` 525 526 // LanguageCode: Optional. The language of entity synonyms defined in 527 // `entities`. If not 528 // specified, the agent's default language is 529 // used. 530 // [Many 531 // languages](https://cloud.google.com/dialogflow/docs/refere 532 // nce/language) 533 // are supported. Note: languages must be enabled in the agent before 534 // they can 535 // be used. 536 LanguageCode string `json:"languageCode,omitempty"` 537 538 // ForceSendFields is a list of field names (e.g. "EntityValues") to 539 // unconditionally include in API requests. By default, fields with 540 // empty values are omitted from API requests. However, any non-pointer, 541 // non-interface field appearing in ForceSendFields will be sent to the 542 // server regardless of whether the field is empty or not. This may be 543 // used to include empty fields in Patch requests. 544 ForceSendFields []string `json:"-"` 545 546 // NullFields is a list of field names (e.g. "EntityValues") to include 547 // in API requests with the JSON null value. By default, fields with 548 // empty values are omitted from API requests. However, any field with 549 // an empty value appearing in NullFields will be sent to the server as 550 // null. It is an error if a field in this list has a non-empty value. 551 // This may be used to include null fields in Patch requests. 552 NullFields []string `json:"-"` 553} 554 555func (s *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest) MarshalJSON() ([]byte, error) { 556 type NoMethod GoogleCloudDialogflowV2BatchDeleteEntitiesRequest 557 raw := NoMethod(*s) 558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 559} 560 561// GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest: The request 562// message for EntityTypes.BatchDeleteEntityTypes. 563type GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest struct { 564 // EntityTypeNames: Required. The names entity types to delete. All 565 // names must point to the 566 // same agent as `parent`. 567 EntityTypeNames []string `json:"entityTypeNames,omitempty"` 568 569 // ForceSendFields is a list of field names (e.g. "EntityTypeNames") to 570 // unconditionally include in API requests. By default, fields with 571 // empty values are omitted from API requests. However, any non-pointer, 572 // non-interface field appearing in ForceSendFields will be sent to the 573 // server regardless of whether the field is empty or not. This may be 574 // used to include empty fields in Patch requests. 575 ForceSendFields []string `json:"-"` 576 577 // NullFields is a list of field names (e.g. "EntityTypeNames") to 578 // include in API requests with the JSON null value. By default, fields 579 // with empty values are omitted from API requests. However, any field 580 // with an empty value appearing in NullFields will be sent to the 581 // server as null. It is an error if a field in this list has a 582 // non-empty value. This may be used to include null fields in Patch 583 // requests. 584 NullFields []string `json:"-"` 585} 586 587func (s *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest) MarshalJSON() ([]byte, error) { 588 type NoMethod GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest 589 raw := NoMethod(*s) 590 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 591} 592 593// GoogleCloudDialogflowV2BatchDeleteIntentsRequest: The request message 594// for Intents.BatchDeleteIntents. 595type GoogleCloudDialogflowV2BatchDeleteIntentsRequest struct { 596 // Intents: Required. The collection of intents to delete. Only intent 597 // `name` must be 598 // filled in. 599 Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"` 600 601 // ForceSendFields is a list of field names (e.g. "Intents") to 602 // unconditionally include in API requests. By default, fields with 603 // empty values are omitted from API requests. However, any non-pointer, 604 // non-interface field appearing in ForceSendFields will be sent to the 605 // server regardless of whether the field is empty or not. This may be 606 // used to include empty fields in Patch requests. 607 ForceSendFields []string `json:"-"` 608 609 // NullFields is a list of field names (e.g. "Intents") to include in 610 // API requests with the JSON null value. By default, fields with empty 611 // values are omitted from API requests. However, any field with an 612 // empty value appearing in NullFields will be sent to the server as 613 // null. It is an error if a field in this list has a non-empty value. 614 // This may be used to include null fields in Patch requests. 615 NullFields []string `json:"-"` 616} 617 618func (s *GoogleCloudDialogflowV2BatchDeleteIntentsRequest) MarshalJSON() ([]byte, error) { 619 type NoMethod GoogleCloudDialogflowV2BatchDeleteIntentsRequest 620 raw := NoMethod(*s) 621 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 622} 623 624// GoogleCloudDialogflowV2BatchUpdateEntitiesRequest: The request 625// message for EntityTypes.BatchUpdateEntities. 626type GoogleCloudDialogflowV2BatchUpdateEntitiesRequest struct { 627 // Entities: Required. The entities to update or create. 628 Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"` 629 630 // LanguageCode: Optional. The language of entity synonyms defined in 631 // `entities`. If not 632 // specified, the agent's default language is 633 // used. 634 // [Many 635 // languages](https://cloud.google.com/dialogflow/docs/refere 636 // nce/language) 637 // are supported. Note: languages must be enabled in the agent before 638 // they can 639 // be used. 640 LanguageCode string `json:"languageCode,omitempty"` 641 642 // UpdateMask: Optional. The mask to control which fields get updated. 643 UpdateMask string `json:"updateMask,omitempty"` 644 645 // ForceSendFields is a list of field names (e.g. "Entities") to 646 // unconditionally include in API requests. By default, fields with 647 // empty values are omitted from API requests. However, any non-pointer, 648 // non-interface field appearing in ForceSendFields will be sent to the 649 // server regardless of whether the field is empty or not. This may be 650 // used to include empty fields in Patch requests. 651 ForceSendFields []string `json:"-"` 652 653 // NullFields is a list of field names (e.g. "Entities") to include in 654 // API requests with the JSON null value. By default, fields with empty 655 // values are omitted from API requests. However, any field with an 656 // empty value appearing in NullFields will be sent to the server as 657 // null. It is an error if a field in this list has a non-empty value. 658 // This may be used to include null fields in Patch requests. 659 NullFields []string `json:"-"` 660} 661 662func (s *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest) MarshalJSON() ([]byte, error) { 663 type NoMethod GoogleCloudDialogflowV2BatchUpdateEntitiesRequest 664 raw := NoMethod(*s) 665 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 666} 667 668// GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest: The request 669// message for EntityTypes.BatchUpdateEntityTypes. 670type GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest struct { 671 // EntityTypeBatchInline: The collection of entity types to update or 672 // create. 673 EntityTypeBatchInline *GoogleCloudDialogflowV2EntityTypeBatch `json:"entityTypeBatchInline,omitempty"` 674 675 // EntityTypeBatchUri: The URI to a Google Cloud Storage file containing 676 // entity types to update 677 // or create. The file format can either be a serialized proto 678 // (of 679 // EntityBatch type) or a JSON object. Note: The URI must start 680 // with 681 // "gs://". 682 EntityTypeBatchUri string `json:"entityTypeBatchUri,omitempty"` 683 684 // LanguageCode: Optional. The language of entity synonyms defined in 685 // `entity_types`. If not 686 // specified, the agent's default language is 687 // used. 688 // [Many 689 // languages](https://cloud.google.com/dialogflow/docs/refere 690 // nce/language) 691 // are supported. Note: languages must be enabled in the agent before 692 // they can 693 // be used. 694 LanguageCode string `json:"languageCode,omitempty"` 695 696 // UpdateMask: Optional. The mask to control which fields get updated. 697 UpdateMask string `json:"updateMask,omitempty"` 698 699 // ForceSendFields is a list of field names (e.g. 700 // "EntityTypeBatchInline") to unconditionally include in API requests. 701 // By default, fields with empty values are omitted from API requests. 702 // However, any non-pointer, non-interface field appearing in 703 // ForceSendFields will be sent to the server regardless of whether the 704 // field is empty or not. This may be used to include empty fields in 705 // Patch requests. 706 ForceSendFields []string `json:"-"` 707 708 // NullFields is a list of field names (e.g. "EntityTypeBatchInline") to 709 // include in API requests with the JSON null value. By default, fields 710 // with empty values are omitted from API requests. However, any field 711 // with an empty value appearing in NullFields will be sent to the 712 // server as null. It is an error if a field in this list has a 713 // non-empty value. This may be used to include null fields in Patch 714 // requests. 715 NullFields []string `json:"-"` 716} 717 718func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest) MarshalJSON() ([]byte, error) { 719 type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest 720 raw := NoMethod(*s) 721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 722} 723 724// GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse: The response 725// message for EntityTypes.BatchUpdateEntityTypes. 726type GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse struct { 727 // EntityTypes: The collection of updated or created entity types. 728 EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"` 729 730 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 731 // unconditionally include in API requests. By default, fields with 732 // empty values are omitted from API requests. However, any non-pointer, 733 // non-interface field appearing in ForceSendFields will be sent to the 734 // server regardless of whether the field is empty or not. This may be 735 // used to include empty fields in Patch requests. 736 ForceSendFields []string `json:"-"` 737 738 // NullFields is a list of field names (e.g. "EntityTypes") to include 739 // in API requests with the JSON null value. By default, fields with 740 // empty values are omitted from API requests. However, any field with 741 // an empty value appearing in NullFields will be sent to the server as 742 // null. It is an error if a field in this list has a non-empty value. 743 // This may be used to include null fields in Patch requests. 744 NullFields []string `json:"-"` 745} 746 747func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) { 748 type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse 749 raw := NoMethod(*s) 750 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 751} 752 753// GoogleCloudDialogflowV2BatchUpdateIntentsRequest: The request message 754// for Intents.BatchUpdateIntents. 755type GoogleCloudDialogflowV2BatchUpdateIntentsRequest struct { 756 // IntentBatchInline: The collection of intents to update or create. 757 IntentBatchInline *GoogleCloudDialogflowV2IntentBatch `json:"intentBatchInline,omitempty"` 758 759 // IntentBatchUri: The URI to a Google Cloud Storage file containing 760 // intents to update or 761 // create. The file format can either be a serialized proto (of 762 // IntentBatch 763 // type) or JSON object. Note: The URI must start with "gs://". 764 IntentBatchUri string `json:"intentBatchUri,omitempty"` 765 766 // IntentView: Optional. The resource view to apply to the returned 767 // intent. 768 // 769 // Possible values: 770 // "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated 771 // in the response. 772 // "INTENT_VIEW_FULL" - All fields are populated. 773 IntentView string `json:"intentView,omitempty"` 774 775 // LanguageCode: Optional. The language of training phrases, parameters 776 // and rich messages 777 // defined in `intents`. If not specified, the agent's default language 778 // is 779 // used. 780 // [Many 781 // languages](https://cloud.google.com/dialogflow/docs/reference/la 782 // nguage) 783 // are supported. Note: languages must be enabled in the agent before 784 // they can 785 // be used. 786 LanguageCode string `json:"languageCode,omitempty"` 787 788 // UpdateMask: Optional. The mask to control which fields get updated. 789 UpdateMask string `json:"updateMask,omitempty"` 790 791 // ForceSendFields is a list of field names (e.g. "IntentBatchInline") 792 // to unconditionally include in API requests. By default, fields with 793 // empty values are omitted from API requests. However, any non-pointer, 794 // non-interface field appearing in ForceSendFields will be sent to the 795 // server regardless of whether the field is empty or not. This may be 796 // used to include empty fields in Patch requests. 797 ForceSendFields []string `json:"-"` 798 799 // NullFields is a list of field names (e.g. "IntentBatchInline") to 800 // include in API requests with the JSON null value. By default, fields 801 // with empty values are omitted from API requests. However, any field 802 // with an empty value appearing in NullFields will be sent to the 803 // server as null. It is an error if a field in this list has a 804 // non-empty value. This may be used to include null fields in Patch 805 // requests. 806 NullFields []string `json:"-"` 807} 808 809func (s *GoogleCloudDialogflowV2BatchUpdateIntentsRequest) MarshalJSON() ([]byte, error) { 810 type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsRequest 811 raw := NoMethod(*s) 812 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 813} 814 815// GoogleCloudDialogflowV2BatchUpdateIntentsResponse: The response 816// message for Intents.BatchUpdateIntents. 817type GoogleCloudDialogflowV2BatchUpdateIntentsResponse struct { 818 // Intents: The collection of updated or created intents. 819 Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"` 820 821 // ForceSendFields is a list of field names (e.g. "Intents") to 822 // unconditionally include in API requests. By default, fields with 823 // empty values are omitted from API requests. However, any non-pointer, 824 // non-interface field appearing in ForceSendFields will be sent to the 825 // server regardless of whether the field is empty or not. This may be 826 // used to include empty fields in Patch requests. 827 ForceSendFields []string `json:"-"` 828 829 // NullFields is a list of field names (e.g. "Intents") to include in 830 // API requests with the JSON null value. By default, fields with empty 831 // values are omitted from API requests. However, any field with an 832 // empty value appearing in NullFields will be sent to the server as 833 // null. It is an error if a field in this list has a non-empty value. 834 // This may be used to include null fields in Patch requests. 835 NullFields []string `json:"-"` 836} 837 838func (s *GoogleCloudDialogflowV2BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) { 839 type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsResponse 840 raw := NoMethod(*s) 841 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 842} 843 844// GoogleCloudDialogflowV2Context: Represents a context. 845type GoogleCloudDialogflowV2Context struct { 846 // LifespanCount: Optional. The number of conversational query requests 847 // after which the 848 // context expires. If set to `0` (the default) the context 849 // expires 850 // immediately. Contexts expire automatically after 20 minutes if 851 // there 852 // are no matching queries. 853 LifespanCount int64 `json:"lifespanCount,omitempty"` 854 855 // Name: Required. The unique identifier of the context. 856 // Format: 857 // `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context 858 // ID>`. 859 // 860 // The `Context ID` is always converted to lowercase, may only 861 // contain 862 // characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long. 863 // 864 // The following context names are reserved for internal use by 865 // Dialogflow. 866 // You should not use these contexts or create contexts with these 867 // names: 868 // 869 // * `__system_counters__` 870 // * `*_id_dialog_context` 871 // * `*_dialog_params_size` 872 Name string `json:"name,omitempty"` 873 874 // Parameters: Optional. The collection of parameters associated with 875 // this context. 876 // Refer to 877 // [this 878 // doc](https://cloud.google.com/dialogflow/docs/intents-actions-pa 879 // rameters) 880 // for syntax. 881 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 882 883 // ServerResponse contains the HTTP response code and headers from the 884 // server. 885 googleapi.ServerResponse `json:"-"` 886 887 // ForceSendFields is a list of field names (e.g. "LifespanCount") to 888 // unconditionally include in API requests. By default, fields with 889 // empty values are omitted from API requests. However, any non-pointer, 890 // non-interface field appearing in ForceSendFields will be sent to the 891 // server regardless of whether the field is empty or not. This may be 892 // used to include empty fields in Patch requests. 893 ForceSendFields []string `json:"-"` 894 895 // NullFields is a list of field names (e.g. "LifespanCount") to include 896 // in API requests with the JSON null value. By default, fields with 897 // empty values are omitted from API requests. However, any field with 898 // an empty value appearing in NullFields will be sent to the server as 899 // null. It is an error if a field in this list has a non-empty value. 900 // This may be used to include null fields in Patch requests. 901 NullFields []string `json:"-"` 902} 903 904func (s *GoogleCloudDialogflowV2Context) MarshalJSON() ([]byte, error) { 905 type NoMethod GoogleCloudDialogflowV2Context 906 raw := NoMethod(*s) 907 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 908} 909 910// GoogleCloudDialogflowV2ConversationEvent: Represents a notification 911// sent to Cloud Pub/Sub subscribers for conversation 912// lifecycle events. 913type GoogleCloudDialogflowV2ConversationEvent struct { 914 // Conversation: The unique identifier of the conversation this 915 // notification 916 // refers to. 917 // Format: `projects/<Project ID>/conversations/<Conversation ID>`. 918 Conversation string `json:"conversation,omitempty"` 919 920 // ErrorStatus: More detailed information about an error. Only set for 921 // type 922 // UNRECOVERABLE_ERROR_IN_PHONE_CALL. 923 ErrorStatus *GoogleRpcStatus `json:"errorStatus,omitempty"` 924 925 // NewMessagePayload: Payload of NEW_MESSAGE event. 926 NewMessagePayload *GoogleCloudDialogflowV2Message `json:"newMessagePayload,omitempty"` 927 928 // Type: The type of the event that this notification refers to. 929 // 930 // Possible values: 931 // "TYPE_UNSPECIFIED" - Type not set. 932 // "CONVERSATION_STARTED" - A new conversation has been opened. This 933 // is fired when a telephone call 934 // is answered, or a conversation is created via the API. 935 // "CONVERSATION_FINISHED" - An existing conversation has closed. This 936 // is fired when a telephone call 937 // is terminated, or a conversation is closed via the API. 938 // "HUMAN_INTERVENTION_NEEDED" - An existing conversation has received 939 // notification from Dialogflow that 940 // human intervention is required. 941 // "NEW_MESSAGE" - An existing conversation has received a new 942 // message, either from API or 943 // telephony. It is configured 944 // in 945 // ConversationProfile.new_message_event_notification_config 946 // "UNRECOVERABLE_ERROR" - Unrecoverable error during a telephone 947 // call. 948 // 949 // In general non-recoverable errors only occur if something 950 // was 951 // misconfigured in the ConversationProfile corresponding to the call. 952 // After 953 // a non-recoverable error, Dialogflow may stop responding. 954 // 955 // We don't fire this event: 956 // * in an API call because we can directly return the error, or, 957 // * when we can recover from an error. 958 Type string `json:"type,omitempty"` 959 960 // ForceSendFields is a list of field names (e.g. "Conversation") to 961 // unconditionally include in API requests. By default, fields with 962 // empty values are omitted from API requests. However, any non-pointer, 963 // non-interface field appearing in ForceSendFields will be sent to the 964 // server regardless of whether the field is empty or not. This may be 965 // used to include empty fields in Patch requests. 966 ForceSendFields []string `json:"-"` 967 968 // NullFields is a list of field names (e.g. "Conversation") to include 969 // in API requests with the JSON null value. By default, fields with 970 // empty values are omitted from API requests. However, any field with 971 // an empty value appearing in NullFields will be sent to the server as 972 // null. It is an error if a field in this list has a non-empty value. 973 // This may be used to include null fields in Patch requests. 974 NullFields []string `json:"-"` 975} 976 977func (s *GoogleCloudDialogflowV2ConversationEvent) MarshalJSON() ([]byte, error) { 978 type NoMethod GoogleCloudDialogflowV2ConversationEvent 979 raw := NoMethod(*s) 980 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 981} 982 983// GoogleCloudDialogflowV2DetectIntentRequest: 984// ====================================================================== 985// ====== 986// Requests and responses for custom methods. 987// The request to detect user's intent. 988type GoogleCloudDialogflowV2DetectIntentRequest struct { 989 // InputAudio: The natural language speech audio to be processed. This 990 // field 991 // should be populated iff `query_input` is set to an input audio 992 // config. 993 // A single request can contain up to 1 minute of speech audio data. 994 InputAudio string `json:"inputAudio,omitempty"` 995 996 // OutputAudioConfig: Instructs the speech synthesizer how to generate 997 // the output 998 // audio. If this field is not set and agent-level speech synthesizer is 999 // not 1000 // configured, no output audio is generated. 1001 OutputAudioConfig *GoogleCloudDialogflowV2OutputAudioConfig `json:"outputAudioConfig,omitempty"` 1002 1003 // OutputAudioConfigMask: Mask for output_audio_config indicating which 1004 // settings in this 1005 // request-level config should override speech synthesizer settings 1006 // defined at 1007 // agent-level. 1008 // 1009 // If unspecified or empty, output_audio_config replaces the 1010 // agent-level 1011 // config in its entirety. 1012 OutputAudioConfigMask string `json:"outputAudioConfigMask,omitempty"` 1013 1014 // QueryInput: Required. The input specification. It can be set to: 1015 // 1016 // 1. an audio config 1017 // which instructs the speech recognizer how to process the speech 1018 // audio, 1019 // 1020 // 2. a conversational query in the form of text, or 1021 // 1022 // 3. an event that specifies which intent to trigger. 1023 QueryInput *GoogleCloudDialogflowV2QueryInput `json:"queryInput,omitempty"` 1024 1025 // QueryParams: The parameters of this query. 1026 QueryParams *GoogleCloudDialogflowV2QueryParameters `json:"queryParams,omitempty"` 1027 1028 // ForceSendFields is a list of field names (e.g. "InputAudio") to 1029 // unconditionally include in API requests. By default, fields with 1030 // empty values are omitted from API requests. However, any non-pointer, 1031 // non-interface field appearing in ForceSendFields will be sent to the 1032 // server regardless of whether the field is empty or not. This may be 1033 // used to include empty fields in Patch requests. 1034 ForceSendFields []string `json:"-"` 1035 1036 // NullFields is a list of field names (e.g. "InputAudio") to include in 1037 // API requests with the JSON null value. By default, fields with empty 1038 // values are omitted from API requests. However, any field with an 1039 // empty value appearing in NullFields will be sent to the server as 1040 // null. It is an error if a field in this list has a non-empty value. 1041 // This may be used to include null fields in Patch requests. 1042 NullFields []string `json:"-"` 1043} 1044 1045func (s *GoogleCloudDialogflowV2DetectIntentRequest) MarshalJSON() ([]byte, error) { 1046 type NoMethod GoogleCloudDialogflowV2DetectIntentRequest 1047 raw := NoMethod(*s) 1048 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1049} 1050 1051// GoogleCloudDialogflowV2DetectIntentResponse: The message returned 1052// from the DetectIntent method. 1053type GoogleCloudDialogflowV2DetectIntentResponse struct { 1054 // OutputAudio: The audio data bytes encoded as specified in the 1055 // request. 1056 // Note: The output audio is generated based on the values of default 1057 // platform 1058 // text responses found in the `query_result.fulfillment_messages` 1059 // field. If 1060 // multiple default text responses exist, they will be concatenated 1061 // when 1062 // generating audio. If no default platform text responses exist, 1063 // the 1064 // generated audio content will be empty. 1065 OutputAudio string `json:"outputAudio,omitempty"` 1066 1067 // OutputAudioConfig: The config used by the speech synthesizer to 1068 // generate the output audio. 1069 OutputAudioConfig *GoogleCloudDialogflowV2OutputAudioConfig `json:"outputAudioConfig,omitempty"` 1070 1071 // QueryResult: The selected results of the conversational query or 1072 // event processing. 1073 // See `alternative_query_results` for additional potential results. 1074 QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"` 1075 1076 // ResponseId: The unique identifier of the response. It can be used 1077 // to 1078 // locate a response in the training example set or for reporting 1079 // issues. 1080 ResponseId string `json:"responseId,omitempty"` 1081 1082 // WebhookStatus: Specifies the status of the webhook request. 1083 WebhookStatus *GoogleRpcStatus `json:"webhookStatus,omitempty"` 1084 1085 // ServerResponse contains the HTTP response code and headers from the 1086 // server. 1087 googleapi.ServerResponse `json:"-"` 1088 1089 // ForceSendFields is a list of field names (e.g. "OutputAudio") to 1090 // unconditionally include in API requests. By default, fields with 1091 // empty values are omitted from API requests. However, any non-pointer, 1092 // non-interface field appearing in ForceSendFields will be sent to the 1093 // server regardless of whether the field is empty or not. This may be 1094 // used to include empty fields in Patch requests. 1095 ForceSendFields []string `json:"-"` 1096 1097 // NullFields is a list of field names (e.g. "OutputAudio") to include 1098 // in API requests with the JSON null value. By default, fields with 1099 // empty values are omitted from API requests. However, any field with 1100 // an empty value appearing in NullFields will be sent to the server as 1101 // null. It is an error if a field in this list has a non-empty value. 1102 // This may be used to include null fields in Patch requests. 1103 NullFields []string `json:"-"` 1104} 1105 1106func (s *GoogleCloudDialogflowV2DetectIntentResponse) MarshalJSON() ([]byte, error) { 1107 type NoMethod GoogleCloudDialogflowV2DetectIntentResponse 1108 raw := NoMethod(*s) 1109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1110} 1111 1112// GoogleCloudDialogflowV2EntityType: Represents an entity type. 1113// Entity types serve as a tool for extracting parameter values from 1114// natural 1115// language queries. 1116type GoogleCloudDialogflowV2EntityType struct { 1117 // AutoExpansionMode: Optional. Indicates whether the entity type can be 1118 // automatically 1119 // expanded. 1120 // 1121 // Possible values: 1122 // "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the 1123 // entity. 1124 // "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values 1125 // that have not been explicitly 1126 // listed in the entity. 1127 AutoExpansionMode string `json:"autoExpansionMode,omitempty"` 1128 1129 // DisplayName: Required. The name of the entity type. 1130 DisplayName string `json:"displayName,omitempty"` 1131 1132 // EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction 1133 // during classification. 1134 EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"` 1135 1136 // Entities: Optional. The collection of entity entries associated with 1137 // the entity type. 1138 Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"` 1139 1140 // Kind: Required. Indicates the kind of entity type. 1141 // 1142 // Possible values: 1143 // "KIND_UNSPECIFIED" - Not specified. This value should be never 1144 // used. 1145 // "KIND_MAP" - Map entity types allow mapping of a group of synonyms 1146 // to a reference 1147 // value. 1148 // "KIND_LIST" - List entity types contain a set of entries that do 1149 // not map to reference 1150 // values. However, list entity types can contain references to other 1151 // entity 1152 // types (with or without aliases). 1153 // "KIND_REGEXP" - Regexp entity types allow to specify regular 1154 // expressions in entries 1155 // values. 1156 Kind string `json:"kind,omitempty"` 1157 1158 // Name: The unique identifier of the entity type. 1159 // Required for EntityTypes.UpdateEntityType 1160 // and 1161 // EntityTypes.BatchUpdateEntityTypes methods. 1162 // Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. 1163 Name string `json:"name,omitempty"` 1164 1165 // ServerResponse contains the HTTP response code and headers from the 1166 // server. 1167 googleapi.ServerResponse `json:"-"` 1168 1169 // ForceSendFields is a list of field names (e.g. "AutoExpansionMode") 1170 // to unconditionally include in API requests. By default, fields with 1171 // empty values are omitted from API requests. However, any non-pointer, 1172 // non-interface field appearing in ForceSendFields will be sent to the 1173 // server regardless of whether the field is empty or not. This may be 1174 // used to include empty fields in Patch requests. 1175 ForceSendFields []string `json:"-"` 1176 1177 // NullFields is a list of field names (e.g. "AutoExpansionMode") to 1178 // include in API requests with the JSON null value. By default, fields 1179 // with empty values are omitted from API requests. However, any field 1180 // with an empty value appearing in NullFields will be sent to the 1181 // server as null. It is an error if a field in this list has a 1182 // non-empty value. This may be used to include null fields in Patch 1183 // requests. 1184 NullFields []string `json:"-"` 1185} 1186 1187func (s *GoogleCloudDialogflowV2EntityType) MarshalJSON() ([]byte, error) { 1188 type NoMethod GoogleCloudDialogflowV2EntityType 1189 raw := NoMethod(*s) 1190 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1191} 1192 1193// GoogleCloudDialogflowV2EntityTypeBatch: This message is a wrapper 1194// around a collection of entity types. 1195type GoogleCloudDialogflowV2EntityTypeBatch struct { 1196 // EntityTypes: A collection of entity types. 1197 EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"` 1198 1199 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 1200 // unconditionally include in API requests. By default, fields with 1201 // empty values are omitted from API requests. However, any non-pointer, 1202 // non-interface field appearing in ForceSendFields will be sent to the 1203 // server regardless of whether the field is empty or not. This may be 1204 // used to include empty fields in Patch requests. 1205 ForceSendFields []string `json:"-"` 1206 1207 // NullFields is a list of field names (e.g. "EntityTypes") to include 1208 // in API requests with the JSON null value. By default, fields with 1209 // empty values are omitted from API requests. However, any field with 1210 // an empty value appearing in NullFields will be sent to the server as 1211 // null. It is an error if a field in this list has a non-empty value. 1212 // This may be used to include null fields in Patch requests. 1213 NullFields []string `json:"-"` 1214} 1215 1216func (s *GoogleCloudDialogflowV2EntityTypeBatch) MarshalJSON() ([]byte, error) { 1217 type NoMethod GoogleCloudDialogflowV2EntityTypeBatch 1218 raw := NoMethod(*s) 1219 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1220} 1221 1222// GoogleCloudDialogflowV2EntityTypeEntity: An **entity entry** for an 1223// associated entity type. 1224type GoogleCloudDialogflowV2EntityTypeEntity struct { 1225 // Synonyms: Required. A collection of value synonyms. For example, if 1226 // the entity type 1227 // is *vegetable*, and `value` is *scallions*, a synonym could be 1228 // *green 1229 // onions*. 1230 // 1231 // For `KIND_LIST` entity types: 1232 // 1233 // * This collection must contain exactly one synonym equal to 1234 // `value`. 1235 Synonyms []string `json:"synonyms,omitempty"` 1236 1237 // Value: Required. The primary value associated with this entity 1238 // entry. 1239 // For example, if the entity type is *vegetable*, the value could 1240 // be 1241 // *scallions*. 1242 // 1243 // For `KIND_MAP` entity types: 1244 // 1245 // * A reference value to be used in place of synonyms. 1246 // 1247 // For `KIND_LIST` entity types: 1248 // 1249 // * A string that can contain references to other entity types (with 1250 // or 1251 // without aliases). 1252 Value string `json:"value,omitempty"` 1253 1254 // ForceSendFields is a list of field names (e.g. "Synonyms") to 1255 // unconditionally include in API requests. By default, fields with 1256 // empty values are omitted from API requests. However, any non-pointer, 1257 // non-interface field appearing in ForceSendFields will be sent to the 1258 // server regardless of whether the field is empty or not. This may be 1259 // used to include empty fields in Patch requests. 1260 ForceSendFields []string `json:"-"` 1261 1262 // NullFields is a list of field names (e.g. "Synonyms") to include in 1263 // API requests with the JSON null value. By default, fields with empty 1264 // values are omitted from API requests. However, any field with an 1265 // empty value appearing in NullFields will be sent to the server as 1266 // null. It is an error if a field in this list has a non-empty value. 1267 // This may be used to include null fields in Patch requests. 1268 NullFields []string `json:"-"` 1269} 1270 1271func (s *GoogleCloudDialogflowV2EntityTypeEntity) MarshalJSON() ([]byte, error) { 1272 type NoMethod GoogleCloudDialogflowV2EntityTypeEntity 1273 raw := NoMethod(*s) 1274 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1275} 1276 1277// GoogleCloudDialogflowV2EventInput: Events allow for matching intents 1278// by event name instead of the natural 1279// language input. For instance, input `<event: { name: 1280// "welcome_event", 1281// parameters: { name: "Sam" } }>` can trigger a personalized welcome 1282// response. 1283// The parameter `name` may be used by the agent in the 1284// response: 1285// "Hello #welcome_event.name! What can I do for you today?". 1286type GoogleCloudDialogflowV2EventInput struct { 1287 // LanguageCode: Required. The language of this query. See 1288 // [Language 1289 // Support](https://cloud.google.com/dialogflow/docs/reference/ 1290 // language) 1291 // for a list of the currently supported language codes. Note that 1292 // queries in 1293 // the same session do not necessarily need to specify the same 1294 // language. 1295 LanguageCode string `json:"languageCode,omitempty"` 1296 1297 // Name: Required. The unique identifier of the event. 1298 Name string `json:"name,omitempty"` 1299 1300 // Parameters: The collection of parameters associated with the event. 1301 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 1302 1303 // ForceSendFields is a list of field names (e.g. "LanguageCode") to 1304 // unconditionally include in API requests. By default, fields with 1305 // empty values are omitted from API requests. However, any non-pointer, 1306 // non-interface field appearing in ForceSendFields will be sent to the 1307 // server regardless of whether the field is empty or not. This may be 1308 // used to include empty fields in Patch requests. 1309 ForceSendFields []string `json:"-"` 1310 1311 // NullFields is a list of field names (e.g. "LanguageCode") to include 1312 // in API requests with the JSON null value. By default, fields with 1313 // empty values are omitted from API requests. However, any field with 1314 // an empty value appearing in NullFields will be sent to the server as 1315 // null. It is an error if a field in this list has a non-empty value. 1316 // This may be used to include null fields in Patch requests. 1317 NullFields []string `json:"-"` 1318} 1319 1320func (s *GoogleCloudDialogflowV2EventInput) MarshalJSON() ([]byte, error) { 1321 type NoMethod GoogleCloudDialogflowV2EventInput 1322 raw := NoMethod(*s) 1323 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1324} 1325 1326// GoogleCloudDialogflowV2ExportAgentRequest: The request message for 1327// Agents.ExportAgent. 1328type GoogleCloudDialogflowV2ExportAgentRequest struct { 1329 // AgentUri: Required. The [Google Cloud 1330 // Storage](https://cloud.google.com/storage/docs/) 1331 // URI to export the agent to. 1332 // The format of this URI must be `gs://<bucket-name>/<object-name>`. 1333 // If left unspecified, the serialized agent is returned inline. 1334 AgentUri string `json:"agentUri,omitempty"` 1335 1336 // ForceSendFields is a list of field names (e.g. "AgentUri") to 1337 // unconditionally include in API requests. By default, fields with 1338 // empty values are omitted from API requests. However, any non-pointer, 1339 // non-interface field appearing in ForceSendFields will be sent to the 1340 // server regardless of whether the field is empty or not. This may be 1341 // used to include empty fields in Patch requests. 1342 ForceSendFields []string `json:"-"` 1343 1344 // NullFields is a list of field names (e.g. "AgentUri") to include in 1345 // API requests with the JSON null value. By default, fields with empty 1346 // values are omitted from API requests. However, any field with an 1347 // empty value appearing in NullFields will be sent to the server as 1348 // null. It is an error if a field in this list has a non-empty value. 1349 // This may be used to include null fields in Patch requests. 1350 NullFields []string `json:"-"` 1351} 1352 1353func (s *GoogleCloudDialogflowV2ExportAgentRequest) MarshalJSON() ([]byte, error) { 1354 type NoMethod GoogleCloudDialogflowV2ExportAgentRequest 1355 raw := NoMethod(*s) 1356 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1357} 1358 1359// GoogleCloudDialogflowV2ExportAgentResponse: The response message for 1360// Agents.ExportAgent. 1361type GoogleCloudDialogflowV2ExportAgentResponse struct { 1362 // AgentContent: Zip compressed raw byte content for agent. 1363 AgentContent string `json:"agentContent,omitempty"` 1364 1365 // AgentUri: The URI to a file containing the exported agent. This field 1366 // is populated 1367 // only if `agent_uri` is specified in `ExportAgentRequest`. 1368 AgentUri string `json:"agentUri,omitempty"` 1369 1370 // ForceSendFields is a list of field names (e.g. "AgentContent") to 1371 // unconditionally include in API requests. By default, fields with 1372 // empty values are omitted from API requests. However, any non-pointer, 1373 // non-interface field appearing in ForceSendFields will be sent to the 1374 // server regardless of whether the field is empty or not. This may be 1375 // used to include empty fields in Patch requests. 1376 ForceSendFields []string `json:"-"` 1377 1378 // NullFields is a list of field names (e.g. "AgentContent") to include 1379 // in API requests with the JSON null value. By default, fields with 1380 // empty values are omitted from API requests. However, any field with 1381 // an empty value appearing in NullFields will be sent to the server as 1382 // null. It is an error if a field in this list has a non-empty value. 1383 // This may be used to include null fields in Patch requests. 1384 NullFields []string `json:"-"` 1385} 1386 1387func (s *GoogleCloudDialogflowV2ExportAgentResponse) MarshalJSON() ([]byte, error) { 1388 type NoMethod GoogleCloudDialogflowV2ExportAgentResponse 1389 raw := NoMethod(*s) 1390 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1391} 1392 1393// GoogleCloudDialogflowV2Fulfillment: Represents a fulfillment. 1394type GoogleCloudDialogflowV2Fulfillment struct { 1395 // DisplayName: Optional. The human-readable name of the fulfillment, 1396 // unique within the agent. 1397 DisplayName string `json:"displayName,omitempty"` 1398 1399 // Enabled: Optional. Whether fulfillment is enabled. 1400 Enabled bool `json:"enabled,omitempty"` 1401 1402 // Features: Optional. The field defines whether the fulfillment is 1403 // enabled for certain features. 1404 Features []*GoogleCloudDialogflowV2FulfillmentFeature `json:"features,omitempty"` 1405 1406 // GenericWebService: Configuration for a generic web service. 1407 GenericWebService *GoogleCloudDialogflowV2FulfillmentGenericWebService `json:"genericWebService,omitempty"` 1408 1409 // Name: Required. The unique identifier of the fulfillment. 1410 // Format: `projects/<Project ID>/agent/fulfillment`. 1411 Name string `json:"name,omitempty"` 1412 1413 // ServerResponse contains the HTTP response code and headers from the 1414 // server. 1415 googleapi.ServerResponse `json:"-"` 1416 1417 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1418 // unconditionally include in API requests. By default, fields with 1419 // empty values are omitted from API requests. However, any non-pointer, 1420 // non-interface field appearing in ForceSendFields will be sent to the 1421 // server regardless of whether the field is empty or not. This may be 1422 // used to include empty fields in Patch requests. 1423 ForceSendFields []string `json:"-"` 1424 1425 // NullFields is a list of field names (e.g. "DisplayName") to include 1426 // in API requests with the JSON null value. By default, fields with 1427 // empty values are omitted from API requests. However, any field with 1428 // an empty value appearing in NullFields will be sent to the server as 1429 // null. It is an error if a field in this list has a non-empty value. 1430 // This may be used to include null fields in Patch requests. 1431 NullFields []string `json:"-"` 1432} 1433 1434func (s *GoogleCloudDialogflowV2Fulfillment) MarshalJSON() ([]byte, error) { 1435 type NoMethod GoogleCloudDialogflowV2Fulfillment 1436 raw := NoMethod(*s) 1437 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1438} 1439 1440// GoogleCloudDialogflowV2FulfillmentFeature: Whether fulfillment is 1441// enabled for the specific feature. 1442type GoogleCloudDialogflowV2FulfillmentFeature struct { 1443 // Type: The type of the feature that enabled for fulfillment. 1444 // 1445 // Possible values: 1446 // "TYPE_UNSPECIFIED" - Feature type not specified. 1447 // "SMALLTALK" - Fulfillment is enabled for SmallTalk. 1448 Type string `json:"type,omitempty"` 1449 1450 // ForceSendFields is a list of field names (e.g. "Type") to 1451 // unconditionally include in API requests. By default, fields with 1452 // empty values are omitted from API requests. However, any non-pointer, 1453 // non-interface field appearing in ForceSendFields will be sent to the 1454 // server regardless of whether the field is empty or not. This may be 1455 // used to include empty fields in Patch requests. 1456 ForceSendFields []string `json:"-"` 1457 1458 // NullFields is a list of field names (e.g. "Type") to include in API 1459 // requests with the JSON null value. By default, fields with empty 1460 // values are omitted from API requests. However, any field with an 1461 // empty value appearing in NullFields will be sent to the server as 1462 // null. It is an error if a field in this list has a non-empty value. 1463 // This may be used to include null fields in Patch requests. 1464 NullFields []string `json:"-"` 1465} 1466 1467func (s *GoogleCloudDialogflowV2FulfillmentFeature) MarshalJSON() ([]byte, error) { 1468 type NoMethod GoogleCloudDialogflowV2FulfillmentFeature 1469 raw := NoMethod(*s) 1470 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1471} 1472 1473// GoogleCloudDialogflowV2FulfillmentGenericWebService: Represents 1474// configuration for a generic web service. 1475// Dialogflow supports two mechanisms for authentications: 1476// - Basic authentication with username and password. 1477// - Authentication with additional authentication headers. 1478// More information could be found 1479// at: 1480// https://cloud.google.com/dialogflow/docs/fulfillment-configure. 1481type GoogleCloudDialogflowV2FulfillmentGenericWebService struct { 1482 // IsCloudFunction: Optional. Indicates if generic web service is 1483 // created through Cloud Functions 1484 // integration. Defaults to false. 1485 IsCloudFunction bool `json:"isCloudFunction,omitempty"` 1486 1487 // Password: Optional. The password for HTTP Basic authentication. 1488 Password string `json:"password,omitempty"` 1489 1490 // RequestHeaders: Optional. The HTTP request headers to send together 1491 // with fulfillment requests. 1492 RequestHeaders map[string]string `json:"requestHeaders,omitempty"` 1493 1494 // Uri: Required. The fulfillment URI for receiving POST requests. 1495 Uri string `json:"uri,omitempty"` 1496 1497 // Username: Optional. The user name for HTTP Basic authentication. 1498 Username string `json:"username,omitempty"` 1499 1500 // ForceSendFields is a list of field names (e.g. "IsCloudFunction") to 1501 // unconditionally include in API requests. By default, fields with 1502 // empty values are omitted from API requests. However, any non-pointer, 1503 // non-interface field appearing in ForceSendFields will be sent to the 1504 // server regardless of whether the field is empty or not. This may be 1505 // used to include empty fields in Patch requests. 1506 ForceSendFields []string `json:"-"` 1507 1508 // NullFields is a list of field names (e.g. "IsCloudFunction") to 1509 // include in API requests with the JSON null value. By default, fields 1510 // with empty values are omitted from API requests. However, any field 1511 // with an empty value appearing in NullFields will be sent to the 1512 // server as null. It is an error if a field in this list has a 1513 // non-empty value. This may be used to include null fields in Patch 1514 // requests. 1515 NullFields []string `json:"-"` 1516} 1517 1518func (s *GoogleCloudDialogflowV2FulfillmentGenericWebService) MarshalJSON() ([]byte, error) { 1519 type NoMethod GoogleCloudDialogflowV2FulfillmentGenericWebService 1520 raw := NoMethod(*s) 1521 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1522} 1523 1524// GoogleCloudDialogflowV2ImportAgentRequest: The request message for 1525// Agents.ImportAgent. 1526type GoogleCloudDialogflowV2ImportAgentRequest struct { 1527 // AgentContent: Zip compressed raw byte content for agent. 1528 AgentContent string `json:"agentContent,omitempty"` 1529 1530 // AgentUri: The URI to a Google Cloud Storage file containing the agent 1531 // to import. 1532 // Note: The URI must start with "gs://". 1533 AgentUri string `json:"agentUri,omitempty"` 1534 1535 // ForceSendFields is a list of field names (e.g. "AgentContent") to 1536 // unconditionally include in API requests. By default, fields with 1537 // empty values are omitted from API requests. However, any non-pointer, 1538 // non-interface field appearing in ForceSendFields will be sent to the 1539 // server regardless of whether the field is empty or not. This may be 1540 // used to include empty fields in Patch requests. 1541 ForceSendFields []string `json:"-"` 1542 1543 // NullFields is a list of field names (e.g. "AgentContent") to include 1544 // in API requests with the JSON null value. By default, fields with 1545 // empty values are omitted from API requests. However, any field with 1546 // an empty value appearing in NullFields will be sent to the server as 1547 // null. It is an error if a field in this list has a non-empty value. 1548 // This may be used to include null fields in Patch requests. 1549 NullFields []string `json:"-"` 1550} 1551 1552func (s *GoogleCloudDialogflowV2ImportAgentRequest) MarshalJSON() ([]byte, error) { 1553 type NoMethod GoogleCloudDialogflowV2ImportAgentRequest 1554 raw := NoMethod(*s) 1555 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1556} 1557 1558// GoogleCloudDialogflowV2InputAudioConfig: Instructs the speech 1559// recognizer how to process the audio content. 1560type GoogleCloudDialogflowV2InputAudioConfig struct { 1561 // AudioEncoding: Required. Audio encoding of the audio content to 1562 // process. 1563 // 1564 // Possible values: 1565 // "AUDIO_ENCODING_UNSPECIFIED" - Not specified. 1566 // "AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed 1567 // little-endian samples (Linear PCM). 1568 // "AUDIO_ENCODING_FLAC" - 1569 // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless 1570 // Audio 1571 // Codec) is the recommended encoding because it is lossless 1572 // (therefore 1573 // recognition is not compromised) and requires only about half 1574 // the 1575 // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit 1576 // and 1577 // 24-bit samples, however, not all fields in `STREAMINFO` are 1578 // supported. 1579 // "AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit audio 1580 // samples using G.711 PCMU/mu-law. 1581 // "AUDIO_ENCODING_AMR" - Adaptive Multi-Rate Narrowband codec. 1582 // `sample_rate_hertz` must be 8000. 1583 // "AUDIO_ENCODING_AMR_WB" - Adaptive Multi-Rate Wideband codec. 1584 // `sample_rate_hertz` must be 16000. 1585 // "AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio frames in Ogg 1586 // container 1587 // ([OggOpus](https://wiki.xiph.org/OggOpus)). 1588 // `sample_rate_her 1589 // tz` must be 16000. 1590 // "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE" - Although the use of lossy 1591 // encodings is not recommended, if a very low 1592 // bitrate encoding is required, `OGG_OPUS` is highly preferred 1593 // over 1594 // Speex encoding. The [Speex](https://speex.org/) encoding supported 1595 // by 1596 // Dialogflow API has a header byte in each block, as in MIME 1597 // type 1598 // `audio/x-speex-with-header-byte`. 1599 // It is a variant of the RTP Speex encoding defined in 1600 // [RFC 5574](https://tools.ietf.org/html/rfc5574). 1601 // The stream is a sequence of blocks, one block per RTP packet. Each 1602 // block 1603 // starts with a byte containing the length of the block, in bytes, 1604 // followed 1605 // by one or more frames of Speex data, padded to an integral number 1606 // of 1607 // bytes (octets) as specified in RFC 5574. In other words, each RTP 1608 // header 1609 // is replaced with a single byte containing the block length. Only 1610 // Speex 1611 // wideband is supported. `sample_rate_hertz` must be 16000. 1612 AudioEncoding string `json:"audioEncoding,omitempty"` 1613 1614 // EnableWordInfo: Optional. If `true`, Dialogflow returns 1615 // SpeechWordInfo in 1616 // StreamingRecognitionResult with information about the recognized 1617 // speech 1618 // words, e.g. start and end time offsets. If false or unspecified, 1619 // Speech 1620 // doesn't return any word-level information. 1621 EnableWordInfo bool `json:"enableWordInfo,omitempty"` 1622 1623 // LanguageCode: Required. The language of the supplied audio. 1624 // Dialogflow does not do 1625 // translations. See 1626 // [Language 1627 // Support](https://cloud.google.com/dialogflow/docs/reference/ 1628 // language) 1629 // for a list of the currently supported language codes. Note that 1630 // queries in 1631 // the same session do not necessarily need to specify the same 1632 // language. 1633 LanguageCode string `json:"languageCode,omitempty"` 1634 1635 // Model: Optional. Which Speech model to select for the given request. 1636 // Select the 1637 // model best suited to your domain to get best results. If a model is 1638 // not 1639 // explicitly specified, then we auto-select a model based on the 1640 // parameters 1641 // in the InputAudioConfig. 1642 // If enhanced speech model is enabled for the agent and an 1643 // enhanced 1644 // version of the specified model for the language does not exist, then 1645 // the 1646 // speech is recognized using the standard version of the specified 1647 // model. 1648 // Refer to 1649 // [Cloud Speech 1650 // API 1651 // documentation](https://cloud.google.com/speech-to-text/docs/basics 1652 // #select-model) 1653 // for more details. 1654 Model string `json:"model,omitempty"` 1655 1656 // ModelVariant: Optional. Which variant of the Speech model to use. 1657 // 1658 // Possible values: 1659 // "SPEECH_MODEL_VARIANT_UNSPECIFIED" - No model variant specified. In 1660 // this case Dialogflow defaults to 1661 // USE_BEST_AVAILABLE. 1662 // "USE_BEST_AVAILABLE" - Use the best available variant of the 1663 // Speech 1664 // model that the caller is eligible for. 1665 // 1666 // Please see the 1667 // [Dialogflow 1668 // docs](https://cloud.google.com/dialogflow/docs/data-loggin 1669 // g) for 1670 // how to make your project eligible for enhanced models. 1671 // "USE_STANDARD" - Use standard model variant even if an enhanced 1672 // model is available. See the 1673 // [Cloud 1674 // Speech 1675 // documentation](https://cloud.google.com/speech-to-text/docs/enh 1676 // anced-models) 1677 // for details about enhanced models. 1678 // "USE_ENHANCED" - Use an enhanced model variant: 1679 // 1680 // * If an enhanced variant does not exist for the given 1681 // model and request language, Dialogflow falls 1682 // back to the standard variant. 1683 // 1684 // The [Cloud Speech 1685 // 1686 // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m 1687 // odels) 1688 // describes which models have enhanced variants. 1689 // 1690 // * If the API caller isn't eligible for enhanced models, Dialogflow 1691 // returns 1692 // an error. Please see the [Dialogflow 1693 // docs](https://cloud.google.com/dialogflow/docs/data-logging) 1694 // for how to make your project eligible. 1695 ModelVariant string `json:"modelVariant,omitempty"` 1696 1697 // PhraseHints: Optional. A list of strings containing words and phrases 1698 // that the speech 1699 // recognizer should recognize with higher likelihood. 1700 // 1701 // See [the Cloud 1702 // Speech 1703 // documentation](https://cloud.google.com/speech-to-text/docs/bas 1704 // ics#phrase-hints) 1705 // for more details. 1706 // 1707 // This field is deprecated. Please use [speech_contexts]() instead. If 1708 // you 1709 // specify both [phrase_hints]() and [speech_contexts](), Dialogflow 1710 // will 1711 // treat the [phrase_hints]() as a single additional [SpeechContext](). 1712 PhraseHints []string `json:"phraseHints,omitempty"` 1713 1714 // SampleRateHertz: Required. Sample rate (in Hertz) of the audio 1715 // content sent in the query. 1716 // Refer to 1717 // [Cloud Speech 1718 // API 1719 // documentation](https://cloud.google.com/speech-to-text/docs/basics 1720 // ) for 1721 // more details. 1722 SampleRateHertz int64 `json:"sampleRateHertz,omitempty"` 1723 1724 // SingleUtterance: Optional. If `false` (default), recognition does not 1725 // cease until the 1726 // client closes the stream. 1727 // If `true`, the recognizer will detect a single spoken utterance in 1728 // input 1729 // audio. Recognition ceases when it detects the audio's voice 1730 // has 1731 // stopped or paused. In this case, once a detected intent is received, 1732 // the 1733 // client should close the stream and start a new request with a new 1734 // stream as 1735 // needed. 1736 // Note: This setting is relevant only for streaming methods. 1737 // Note: When specified, InputAudioConfig.single_utterance takes 1738 // precedence 1739 // over StreamingDetectIntentRequest.single_utterance. 1740 SingleUtterance bool `json:"singleUtterance,omitempty"` 1741 1742 // SpeechContexts: Optional. Context information to assist speech 1743 // recognition. 1744 // 1745 // See [the Cloud 1746 // Speech 1747 // documentation](https://cloud.google.com/speech-to-text/docs/bas 1748 // ics#phrase-hints) 1749 // for more details. 1750 SpeechContexts []*GoogleCloudDialogflowV2SpeechContext `json:"speechContexts,omitempty"` 1751 1752 // ForceSendFields is a list of field names (e.g. "AudioEncoding") to 1753 // unconditionally include in API requests. By default, fields with 1754 // empty values are omitted from API requests. However, any non-pointer, 1755 // non-interface field appearing in ForceSendFields will be sent to the 1756 // server regardless of whether the field is empty or not. This may be 1757 // used to include empty fields in Patch requests. 1758 ForceSendFields []string `json:"-"` 1759 1760 // NullFields is a list of field names (e.g. "AudioEncoding") to include 1761 // in API requests with the JSON null value. By default, fields with 1762 // empty values are omitted from API requests. However, any field with 1763 // an empty value appearing in NullFields will be sent to the server as 1764 // null. It is an error if a field in this list has a non-empty value. 1765 // This may be used to include null fields in Patch requests. 1766 NullFields []string `json:"-"` 1767} 1768 1769func (s *GoogleCloudDialogflowV2InputAudioConfig) MarshalJSON() ([]byte, error) { 1770 type NoMethod GoogleCloudDialogflowV2InputAudioConfig 1771 raw := NoMethod(*s) 1772 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1773} 1774 1775// GoogleCloudDialogflowV2Intent: Represents an intent. 1776// Intents convert a number of user expressions or patterns into an 1777// action. An 1778// action is an extraction of a user command or sentence semantics. 1779type GoogleCloudDialogflowV2Intent struct { 1780 // Action: Optional. The name of the action associated with the 1781 // intent. 1782 // Note: The action name must not contain whitespaces. 1783 Action string `json:"action,omitempty"` 1784 1785 // DefaultResponsePlatforms: Optional. The list of platforms for which 1786 // the first responses will be 1787 // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default 1788 // platform). 1789 // 1790 // Possible values: 1791 // "PLATFORM_UNSPECIFIED" - Not specified. 1792 // "FACEBOOK" - Facebook. 1793 // "SLACK" - Slack. 1794 // "TELEGRAM" - Telegram. 1795 // "KIK" - Kik. 1796 // "SKYPE" - Skype. 1797 // "LINE" - Line. 1798 // "VIBER" - Viber. 1799 // "ACTIONS_ON_GOOGLE" - Actions on Google. 1800 // When using Actions on Google, you can choose one of the 1801 // specific 1802 // Intent.Message types that mention support for Actions on Google, 1803 // or you can use the advanced Intent.Message.payload field. 1804 // The payload field provides access to AoG features not available in 1805 // the 1806 // specific message types. 1807 // If using the Intent.Message.payload field, it should have a 1808 // structure 1809 // similar to the JSON message shown here. For more information, 1810 // see 1811 // [Actions on Google 1812 // Webhook 1813 // Format](https://developers.google.com/actions/dialogflow/webho 1814 // ok) 1815 // <pre>{ 1816 // "expectUserResponse": true, 1817 // "isSsml": false, 1818 // "noInputPrompts": [], 1819 // "richResponse": { 1820 // "items": [ 1821 // { 1822 // "simpleResponse": { 1823 // "displayText": "hi", 1824 // "textToSpeech": "hello" 1825 // } 1826 // } 1827 // ], 1828 // "suggestions": [ 1829 // { 1830 // "title": "Say this" 1831 // }, 1832 // { 1833 // "title": "or this" 1834 // } 1835 // ] 1836 // }, 1837 // "systemIntent": { 1838 // "data": { 1839 // "@type": 1840 // "type.googleapis.com/google.actions.v2.OptionValueSpec", 1841 // "listSelect": { 1842 // "items": [ 1843 // { 1844 // "optionInfo": { 1845 // "key": "key1", 1846 // "synonyms": [ 1847 // "key one" 1848 // ] 1849 // }, 1850 // "title": "must not be empty, but unique" 1851 // }, 1852 // { 1853 // "optionInfo": { 1854 // "key": "key2", 1855 // "synonyms": [ 1856 // "key two" 1857 // ] 1858 // }, 1859 // "title": "must not be empty, but unique" 1860 // } 1861 // ] 1862 // } 1863 // }, 1864 // "intent": "actions.intent.OPTION" 1865 // } 1866 // }</pre> 1867 // "GOOGLE_HANGOUTS" - Google Hangouts. 1868 DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"` 1869 1870 // DisplayName: Required. The name of this intent. 1871 DisplayName string `json:"displayName,omitempty"` 1872 1873 // Events: Optional. The collection of event names that trigger the 1874 // intent. 1875 // If the collection of input contexts is not empty, all of the contexts 1876 // must 1877 // be present in the active user session for an event to trigger this 1878 // intent. 1879 Events []string `json:"events,omitempty"` 1880 1881 // FollowupIntentInfo: Read-only. Information about all followup intents 1882 // that have this intent as 1883 // a direct or indirect parent. We populate this field only in the 1884 // output. 1885 FollowupIntentInfo []*GoogleCloudDialogflowV2IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"` 1886 1887 // InputContextNames: Optional. The list of context names required for 1888 // this intent to be 1889 // triggered. 1890 // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context 1891 // ID>`. 1892 InputContextNames []string `json:"inputContextNames,omitempty"` 1893 1894 // IsFallback: Optional. Indicates whether this is a fallback intent. 1895 IsFallback bool `json:"isFallback,omitempty"` 1896 1897 // Messages: Optional. The collection of rich messages corresponding to 1898 // the 1899 // `Response` field in the Dialogflow console. 1900 Messages []*GoogleCloudDialogflowV2IntentMessage `json:"messages,omitempty"` 1901 1902 // MlDisabled: Optional. Indicates whether Machine Learning is disabled 1903 // for the intent. 1904 // Note: If `ml_disabled` setting is set to true, then this intent is 1905 // not 1906 // taken into account during inference in `ML ONLY` match mode. 1907 // Also, 1908 // auto-markup in the UI is turned off. 1909 MlDisabled bool `json:"mlDisabled,omitempty"` 1910 1911 // Name: The unique identifier of this intent. 1912 // Required for Intents.UpdateIntent and 1913 // Intents.BatchUpdateIntents 1914 // methods. 1915 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 1916 Name string `json:"name,omitempty"` 1917 1918 // OutputContexts: Optional. The collection of contexts that are 1919 // activated when the intent 1920 // is matched. Context messages in this collection should not set 1921 // the 1922 // parameters field. Setting the `lifespan_count` to 0 will reset the 1923 // context 1924 // when the intent is matched. 1925 // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context 1926 // ID>`. 1927 OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"` 1928 1929 // Parameters: Optional. The collection of parameters associated with 1930 // the intent. 1931 Parameters []*GoogleCloudDialogflowV2IntentParameter `json:"parameters,omitempty"` 1932 1933 // ParentFollowupIntentName: Read-only after creation. The unique 1934 // identifier of the parent intent in the 1935 // chain of followup intents. You can set this field when creating an 1936 // intent, 1937 // for example with CreateIntent or 1938 // BatchUpdateIntents, in order to make this 1939 // intent a followup intent. 1940 // 1941 // It identifies the parent followup intent. 1942 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 1943 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 1944 1945 // Priority: Optional. The priority of this intent. Higher numbers 1946 // represent higher 1947 // priorities. 1948 // 1949 // - If the supplied value is unspecified or 0, the service 1950 // translates the value to 500,000, which corresponds to the 1951 // `Normal` priority in the console. 1952 // - If the supplied value is negative, the intent is ignored 1953 // in runtime detect intent requests. 1954 Priority int64 `json:"priority,omitempty"` 1955 1956 // ResetContexts: Optional. Indicates whether to delete all contexts in 1957 // the current 1958 // session when this intent is matched. 1959 ResetContexts bool `json:"resetContexts,omitempty"` 1960 1961 // RootFollowupIntentName: Read-only. The unique identifier of the root 1962 // intent in the chain of 1963 // followup intents. It identifies the correct followup intents chain 1964 // for 1965 // this intent. We populate this field only in the output. 1966 // 1967 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 1968 RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"` 1969 1970 // TrainingPhrases: Optional. The collection of examples that the agent 1971 // is 1972 // trained on. 1973 TrainingPhrases []*GoogleCloudDialogflowV2IntentTrainingPhrase `json:"trainingPhrases,omitempty"` 1974 1975 // WebhookState: Optional. Indicates whether webhooks are enabled for 1976 // the intent. 1977 // 1978 // Possible values: 1979 // "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and 1980 // in the intent. 1981 // "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in 1982 // the intent. 1983 // "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in 1984 // the agent and in the intent. Also, each slot 1985 // filling prompt is forwarded to the webhook. 1986 WebhookState string `json:"webhookState,omitempty"` 1987 1988 // ServerResponse contains the HTTP response code and headers from the 1989 // server. 1990 googleapi.ServerResponse `json:"-"` 1991 1992 // ForceSendFields is a list of field names (e.g. "Action") to 1993 // unconditionally include in API requests. By default, fields with 1994 // empty values are omitted from API requests. However, any non-pointer, 1995 // non-interface field appearing in ForceSendFields will be sent to the 1996 // server regardless of whether the field is empty or not. This may be 1997 // used to include empty fields in Patch requests. 1998 ForceSendFields []string `json:"-"` 1999 2000 // NullFields is a list of field names (e.g. "Action") to include in API 2001 // requests with the JSON null value. By default, fields with empty 2002 // values are omitted from API requests. However, any field with an 2003 // empty value appearing in NullFields will be sent to the server as 2004 // null. It is an error if a field in this list has a non-empty value. 2005 // This may be used to include null fields in Patch requests. 2006 NullFields []string `json:"-"` 2007} 2008 2009func (s *GoogleCloudDialogflowV2Intent) MarshalJSON() ([]byte, error) { 2010 type NoMethod GoogleCloudDialogflowV2Intent 2011 raw := NoMethod(*s) 2012 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2013} 2014 2015// GoogleCloudDialogflowV2IntentBatch: This message is a wrapper around 2016// a collection of intents. 2017type GoogleCloudDialogflowV2IntentBatch struct { 2018 // Intents: A collection of intents. 2019 Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"` 2020 2021 // ForceSendFields is a list of field names (e.g. "Intents") to 2022 // unconditionally include in API requests. By default, fields with 2023 // empty values are omitted from API requests. However, any non-pointer, 2024 // non-interface field appearing in ForceSendFields will be sent to the 2025 // server regardless of whether the field is empty or not. This may be 2026 // used to include empty fields in Patch requests. 2027 ForceSendFields []string `json:"-"` 2028 2029 // NullFields is a list of field names (e.g. "Intents") to include in 2030 // API requests with the JSON null value. By default, fields with empty 2031 // values are omitted from API requests. However, any field with an 2032 // empty value appearing in NullFields will be sent to the server as 2033 // null. It is an error if a field in this list has a non-empty value. 2034 // This may be used to include null fields in Patch requests. 2035 NullFields []string `json:"-"` 2036} 2037 2038func (s *GoogleCloudDialogflowV2IntentBatch) MarshalJSON() ([]byte, error) { 2039 type NoMethod GoogleCloudDialogflowV2IntentBatch 2040 raw := NoMethod(*s) 2041 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2042} 2043 2044// GoogleCloudDialogflowV2IntentFollowupIntentInfo: Represents a single 2045// followup intent in the chain. 2046type GoogleCloudDialogflowV2IntentFollowupIntentInfo struct { 2047 // FollowupIntentName: The unique identifier of the followup 2048 // intent. 2049 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 2050 FollowupIntentName string `json:"followupIntentName,omitempty"` 2051 2052 // ParentFollowupIntentName: The unique identifier of the followup 2053 // intent's parent. 2054 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 2055 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 2056 2057 // ForceSendFields is a list of field names (e.g. "FollowupIntentName") 2058 // to unconditionally include in API requests. By default, fields with 2059 // empty values are omitted from API requests. However, any non-pointer, 2060 // non-interface field appearing in ForceSendFields will be sent to the 2061 // server regardless of whether the field is empty or not. This may be 2062 // used to include empty fields in Patch requests. 2063 ForceSendFields []string `json:"-"` 2064 2065 // NullFields is a list of field names (e.g. "FollowupIntentName") to 2066 // include in API requests with the JSON null value. By default, fields 2067 // with empty values are omitted from API requests. However, any field 2068 // with an empty value appearing in NullFields will be sent to the 2069 // server as null. It is an error if a field in this list has a 2070 // non-empty value. This may be used to include null fields in Patch 2071 // requests. 2072 NullFields []string `json:"-"` 2073} 2074 2075func (s *GoogleCloudDialogflowV2IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) { 2076 type NoMethod GoogleCloudDialogflowV2IntentFollowupIntentInfo 2077 raw := NoMethod(*s) 2078 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2079} 2080 2081// GoogleCloudDialogflowV2IntentMessage: Corresponds to the `Response` 2082// field in the Dialogflow console. 2083type GoogleCloudDialogflowV2IntentMessage struct { 2084 // BasicCard: The basic card response for Actions on Google. 2085 BasicCard *GoogleCloudDialogflowV2IntentMessageBasicCard `json:"basicCard,omitempty"` 2086 2087 // BrowseCarouselCard: Browse carousel card for Actions on Google. 2088 BrowseCarouselCard *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"` 2089 2090 // Card: The card response. 2091 Card *GoogleCloudDialogflowV2IntentMessageCard `json:"card,omitempty"` 2092 2093 // CarouselSelect: The carousel card response for Actions on Google. 2094 CarouselSelect *GoogleCloudDialogflowV2IntentMessageCarouselSelect `json:"carouselSelect,omitempty"` 2095 2096 // Image: The image response. 2097 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 2098 2099 // LinkOutSuggestion: The link out suggestion chip for Actions on 2100 // Google. 2101 LinkOutSuggestion *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"` 2102 2103 // ListSelect: The list card response for Actions on Google. 2104 ListSelect *GoogleCloudDialogflowV2IntentMessageListSelect `json:"listSelect,omitempty"` 2105 2106 // MediaContent: The media content card for Actions on Google. 2107 MediaContent *GoogleCloudDialogflowV2IntentMessageMediaContent `json:"mediaContent,omitempty"` 2108 2109 // Payload: Returns a response containing a custom, platform-specific 2110 // payload. 2111 // See the Intent.Message.Platform type for a description of 2112 // the 2113 // structure that may be required for your platform. 2114 Payload googleapi.RawMessage `json:"payload,omitempty"` 2115 2116 // Platform: Optional. The platform that this message is intended for. 2117 // 2118 // Possible values: 2119 // "PLATFORM_UNSPECIFIED" - Not specified. 2120 // "FACEBOOK" - Facebook. 2121 // "SLACK" - Slack. 2122 // "TELEGRAM" - Telegram. 2123 // "KIK" - Kik. 2124 // "SKYPE" - Skype. 2125 // "LINE" - Line. 2126 // "VIBER" - Viber. 2127 // "ACTIONS_ON_GOOGLE" - Actions on Google. 2128 // When using Actions on Google, you can choose one of the 2129 // specific 2130 // Intent.Message types that mention support for Actions on Google, 2131 // or you can use the advanced Intent.Message.payload field. 2132 // The payload field provides access to AoG features not available in 2133 // the 2134 // specific message types. 2135 // If using the Intent.Message.payload field, it should have a 2136 // structure 2137 // similar to the JSON message shown here. For more information, 2138 // see 2139 // [Actions on Google 2140 // Webhook 2141 // Format](https://developers.google.com/actions/dialogflow/webho 2142 // ok) 2143 // <pre>{ 2144 // "expectUserResponse": true, 2145 // "isSsml": false, 2146 // "noInputPrompts": [], 2147 // "richResponse": { 2148 // "items": [ 2149 // { 2150 // "simpleResponse": { 2151 // "displayText": "hi", 2152 // "textToSpeech": "hello" 2153 // } 2154 // } 2155 // ], 2156 // "suggestions": [ 2157 // { 2158 // "title": "Say this" 2159 // }, 2160 // { 2161 // "title": "or this" 2162 // } 2163 // ] 2164 // }, 2165 // "systemIntent": { 2166 // "data": { 2167 // "@type": 2168 // "type.googleapis.com/google.actions.v2.OptionValueSpec", 2169 // "listSelect": { 2170 // "items": [ 2171 // { 2172 // "optionInfo": { 2173 // "key": "key1", 2174 // "synonyms": [ 2175 // "key one" 2176 // ] 2177 // }, 2178 // "title": "must not be empty, but unique" 2179 // }, 2180 // { 2181 // "optionInfo": { 2182 // "key": "key2", 2183 // "synonyms": [ 2184 // "key two" 2185 // ] 2186 // }, 2187 // "title": "must not be empty, but unique" 2188 // } 2189 // ] 2190 // } 2191 // }, 2192 // "intent": "actions.intent.OPTION" 2193 // } 2194 // }</pre> 2195 // "GOOGLE_HANGOUTS" - Google Hangouts. 2196 Platform string `json:"platform,omitempty"` 2197 2198 // QuickReplies: The quick replies response. 2199 QuickReplies *GoogleCloudDialogflowV2IntentMessageQuickReplies `json:"quickReplies,omitempty"` 2200 2201 // SimpleResponses: The voice and text-only responses for Actions on 2202 // Google. 2203 SimpleResponses *GoogleCloudDialogflowV2IntentMessageSimpleResponses `json:"simpleResponses,omitempty"` 2204 2205 // Suggestions: The suggestion chips for Actions on Google. 2206 Suggestions *GoogleCloudDialogflowV2IntentMessageSuggestions `json:"suggestions,omitempty"` 2207 2208 // TableCard: Table card for Actions on Google. 2209 TableCard *GoogleCloudDialogflowV2IntentMessageTableCard `json:"tableCard,omitempty"` 2210 2211 // Text: The text response. 2212 Text *GoogleCloudDialogflowV2IntentMessageText `json:"text,omitempty"` 2213 2214 // ForceSendFields is a list of field names (e.g. "BasicCard") to 2215 // unconditionally include in API requests. By default, fields with 2216 // empty values are omitted from API requests. However, any non-pointer, 2217 // non-interface field appearing in ForceSendFields will be sent to the 2218 // server regardless of whether the field is empty or not. This may be 2219 // used to include empty fields in Patch requests. 2220 ForceSendFields []string `json:"-"` 2221 2222 // NullFields is a list of field names (e.g. "BasicCard") to include in 2223 // API requests with the JSON null value. By default, fields with empty 2224 // values are omitted from API requests. However, any field with an 2225 // empty value appearing in NullFields will be sent to the server as 2226 // null. It is an error if a field in this list has a non-empty value. 2227 // This may be used to include null fields in Patch requests. 2228 NullFields []string `json:"-"` 2229} 2230 2231func (s *GoogleCloudDialogflowV2IntentMessage) MarshalJSON() ([]byte, error) { 2232 type NoMethod GoogleCloudDialogflowV2IntentMessage 2233 raw := NoMethod(*s) 2234 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2235} 2236 2237// GoogleCloudDialogflowV2IntentMessageBasicCard: The basic card 2238// message. Useful for displaying information. 2239type GoogleCloudDialogflowV2IntentMessageBasicCard struct { 2240 // Buttons: Optional. The collection of card buttons. 2241 Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"` 2242 2243 // FormattedText: Required, unless image is present. The body text of 2244 // the card. 2245 FormattedText string `json:"formattedText,omitempty"` 2246 2247 // Image: Optional. The image for the card. 2248 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 2249 2250 // Subtitle: Optional. The subtitle of the card. 2251 Subtitle string `json:"subtitle,omitempty"` 2252 2253 // Title: Optional. The title of the card. 2254 Title string `json:"title,omitempty"` 2255 2256 // ForceSendFields is a list of field names (e.g. "Buttons") to 2257 // unconditionally include in API requests. By default, fields with 2258 // empty values are omitted from API requests. However, any non-pointer, 2259 // non-interface field appearing in ForceSendFields will be sent to the 2260 // server regardless of whether the field is empty or not. This may be 2261 // used to include empty fields in Patch requests. 2262 ForceSendFields []string `json:"-"` 2263 2264 // NullFields is a list of field names (e.g. "Buttons") to include in 2265 // API requests with the JSON null value. By default, fields with empty 2266 // values are omitted from API requests. However, any field with an 2267 // empty value appearing in NullFields will be sent to the server as 2268 // null. It is an error if a field in this list has a non-empty value. 2269 // This may be used to include null fields in Patch requests. 2270 NullFields []string `json:"-"` 2271} 2272 2273func (s *GoogleCloudDialogflowV2IntentMessageBasicCard) MarshalJSON() ([]byte, error) { 2274 type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCard 2275 raw := NoMethod(*s) 2276 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2277} 2278 2279// GoogleCloudDialogflowV2IntentMessageBasicCardButton: The button 2280// object that appears at the bottom of a card. 2281type GoogleCloudDialogflowV2IntentMessageBasicCardButton struct { 2282 // OpenUriAction: Required. Action to take when a user taps on the 2283 // button. 2284 OpenUriAction *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"` 2285 2286 // Title: Required. The title of the button. 2287 Title string `json:"title,omitempty"` 2288 2289 // ForceSendFields is a list of field names (e.g. "OpenUriAction") to 2290 // unconditionally include in API requests. By default, fields with 2291 // empty values are omitted from API requests. However, any non-pointer, 2292 // non-interface field appearing in ForceSendFields will be sent to the 2293 // server regardless of whether the field is empty or not. This may be 2294 // used to include empty fields in Patch requests. 2295 ForceSendFields []string `json:"-"` 2296 2297 // NullFields is a list of field names (e.g. "OpenUriAction") to include 2298 // in API requests with the JSON null value. By default, fields with 2299 // empty values are omitted from API requests. However, any field with 2300 // an empty value appearing in NullFields will be sent to the server as 2301 // null. It is an error if a field in this list has a non-empty value. 2302 // This may be used to include null fields in Patch requests. 2303 NullFields []string `json:"-"` 2304} 2305 2306func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) { 2307 type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButton 2308 raw := NoMethod(*s) 2309 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2310} 2311 2312// GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction: 2313// Opens the given URI. 2314type GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction struct { 2315 // Uri: Required. The HTTP or HTTPS scheme URI. 2316 Uri string `json:"uri,omitempty"` 2317 2318 // ForceSendFields is a list of field names (e.g. "Uri") to 2319 // unconditionally include in API requests. By default, fields with 2320 // empty values are omitted from API requests. However, any non-pointer, 2321 // non-interface field appearing in ForceSendFields will be sent to the 2322 // server regardless of whether the field is empty or not. This may be 2323 // used to include empty fields in Patch requests. 2324 ForceSendFields []string `json:"-"` 2325 2326 // NullFields is a list of field names (e.g. "Uri") to include in API 2327 // requests with the JSON null value. By default, fields with empty 2328 // values are omitted from API requests. However, any field with an 2329 // empty value appearing in NullFields will be sent to the server as 2330 // null. It is an error if a field in this list has a non-empty value. 2331 // This may be used to include null fields in Patch requests. 2332 NullFields []string `json:"-"` 2333} 2334 2335func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) { 2336 type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction 2337 raw := NoMethod(*s) 2338 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2339} 2340 2341// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard: Browse 2342// Carousel Card for Actions on 2343// Google. 2344// https://developers.google.com/actions/assistant/responses#brow 2345// sing_carousel 2346type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard struct { 2347 // ImageDisplayOptions: Optional. Settings for displaying the image. 2348 // Applies to every image in 2349 // items. 2350 // 2351 // Possible values: 2352 // "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the 2353 // image and the image container with gray 2354 // bars. 2355 // "GRAY" - Fill the gaps between the image and the image container 2356 // with gray 2357 // bars. 2358 // "WHITE" - Fill the gaps between the image and the image container 2359 // with white 2360 // bars. 2361 // "CROPPED" - Image is scaled such that the image width and height 2362 // match or exceed 2363 // the container dimensions. This may crop the top and bottom of 2364 // the 2365 // image if the scaled image height is greater than the 2366 // container 2367 // height, or crop the left and right of the image if the scaled 2368 // image 2369 // width is greater than the container width. This is similar to 2370 // "Zoom 2371 // Mode" on a widescreen TV when playing a 4:3 video. 2372 // "BLURRED_BACKGROUND" - Pad the gaps between image and image frame 2373 // with a blurred copy of the 2374 // same image. 2375 ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"` 2376 2377 // Items: Required. List of items in the Browse Carousel Card. Minimum 2378 // of two 2379 // items, maximum of ten. 2380 Items []*GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"` 2381 2382 // ForceSendFields is a list of field names (e.g. "ImageDisplayOptions") 2383 // to unconditionally include in API requests. By default, fields with 2384 // empty values are omitted from API requests. However, any non-pointer, 2385 // non-interface field appearing in ForceSendFields will be sent to the 2386 // server regardless of whether the field is empty or not. This may be 2387 // used to include empty fields in Patch requests. 2388 ForceSendFields []string `json:"-"` 2389 2390 // NullFields is a list of field names (e.g. "ImageDisplayOptions") to 2391 // include in API requests with the JSON null value. By default, fields 2392 // with empty values are omitted from API requests. However, any field 2393 // with an empty value appearing in NullFields will be sent to the 2394 // server as null. It is an error if a field in this list has a 2395 // non-empty value. This may be used to include null fields in Patch 2396 // requests. 2397 NullFields []string `json:"-"` 2398} 2399 2400func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) { 2401 type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard 2402 raw := NoMethod(*s) 2403 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2404} 2405 2406// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa 2407// rdItem: Browsing carousel tile 2408type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct { 2409 // Description: Optional. Description of the carousel item. Maximum of 2410 // four lines of 2411 // text. 2412 Description string `json:"description,omitempty"` 2413 2414 // Footer: Optional. Text that appears at the bottom of the Browse 2415 // Carousel 2416 // Card. Maximum of one line of text. 2417 Footer string `json:"footer,omitempty"` 2418 2419 // Image: Optional. Hero image for the carousel item. 2420 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 2421 2422 // OpenUriAction: Required. Action to present to the user. 2423 OpenUriAction *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"` 2424 2425 // Title: Required. Title of the carousel item. Maximum of two lines of 2426 // text. 2427 Title string `json:"title,omitempty"` 2428 2429 // ForceSendFields is a list of field names (e.g. "Description") to 2430 // unconditionally include in API requests. By default, fields with 2431 // empty values are omitted from API requests. However, any non-pointer, 2432 // non-interface field appearing in ForceSendFields will be sent to the 2433 // server regardless of whether the field is empty or not. This may be 2434 // used to include empty fields in Patch requests. 2435 ForceSendFields []string `json:"-"` 2436 2437 // NullFields is a list of field names (e.g. "Description") to include 2438 // in API requests with the JSON null value. By default, fields with 2439 // empty values are omitted from API requests. However, any field with 2440 // an empty value appearing in NullFields will be sent to the server as 2441 // null. It is an error if a field in this list has a non-empty value. 2442 // This may be used to include null fields in Patch requests. 2443 NullFields []string `json:"-"` 2444} 2445 2446func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) { 2447 type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem 2448 raw := NoMethod(*s) 2449 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2450} 2451 2452// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa 2453// rdItemOpenUrlAction: Actions on Google action to open a given url. 2454type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct { 2455 // Url: Required. URL 2456 Url string `json:"url,omitempty"` 2457 2458 // UrlTypeHint: Optional. Specifies the type of viewer that is used when 2459 // opening 2460 // the URL. Defaults to opening via web browser. 2461 // 2462 // Possible values: 2463 // "URL_TYPE_HINT_UNSPECIFIED" - Unspecified 2464 // "AMP_ACTION" - Url would be an amp action 2465 // "AMP_CONTENT" - URL that points directly to AMP content, or to a 2466 // canonical URL 2467 // which refers to AMP content via <link rel="amphtml">. 2468 UrlTypeHint string `json:"urlTypeHint,omitempty"` 2469 2470 // ForceSendFields is a list of field names (e.g. "Url") to 2471 // unconditionally include in API requests. By default, fields with 2472 // empty values are omitted from API requests. However, any non-pointer, 2473 // non-interface field appearing in ForceSendFields will be sent to the 2474 // server regardless of whether the field is empty or not. This may be 2475 // used to include empty fields in Patch requests. 2476 ForceSendFields []string `json:"-"` 2477 2478 // NullFields is a list of field names (e.g. "Url") to include in API 2479 // requests with the JSON null value. By default, fields with empty 2480 // values are omitted from API requests. However, any field with an 2481 // empty value appearing in NullFields will be sent to the server as 2482 // null. It is an error if a field in this list has a non-empty value. 2483 // This may be used to include null fields in Patch requests. 2484 NullFields []string `json:"-"` 2485} 2486 2487func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) { 2488 type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction 2489 raw := NoMethod(*s) 2490 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2491} 2492 2493// GoogleCloudDialogflowV2IntentMessageCard: The card response message. 2494type GoogleCloudDialogflowV2IntentMessageCard struct { 2495 // Buttons: Optional. The collection of card buttons. 2496 Buttons []*GoogleCloudDialogflowV2IntentMessageCardButton `json:"buttons,omitempty"` 2497 2498 // ImageUri: Optional. The public URI to an image file for the card. 2499 ImageUri string `json:"imageUri,omitempty"` 2500 2501 // Subtitle: Optional. The subtitle of the card. 2502 Subtitle string `json:"subtitle,omitempty"` 2503 2504 // Title: Optional. The title of the card. 2505 Title string `json:"title,omitempty"` 2506 2507 // ForceSendFields is a list of field names (e.g. "Buttons") to 2508 // unconditionally include in API requests. By default, fields with 2509 // empty values are omitted from API requests. However, any non-pointer, 2510 // non-interface field appearing in ForceSendFields will be sent to the 2511 // server regardless of whether the field is empty or not. This may be 2512 // used to include empty fields in Patch requests. 2513 ForceSendFields []string `json:"-"` 2514 2515 // NullFields is a list of field names (e.g. "Buttons") to include in 2516 // API requests with the JSON null value. By default, fields with empty 2517 // values are omitted from API requests. However, any field with an 2518 // empty value appearing in NullFields will be sent to the server as 2519 // null. It is an error if a field in this list has a non-empty value. 2520 // This may be used to include null fields in Patch requests. 2521 NullFields []string `json:"-"` 2522} 2523 2524func (s *GoogleCloudDialogflowV2IntentMessageCard) MarshalJSON() ([]byte, error) { 2525 type NoMethod GoogleCloudDialogflowV2IntentMessageCard 2526 raw := NoMethod(*s) 2527 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2528} 2529 2530// GoogleCloudDialogflowV2IntentMessageCardButton: Contains information 2531// about a button. 2532type GoogleCloudDialogflowV2IntentMessageCardButton struct { 2533 // Postback: Optional. The text to send back to the Dialogflow API or a 2534 // URI to 2535 // open. 2536 Postback string `json:"postback,omitempty"` 2537 2538 // Text: Optional. The text to show on the button. 2539 Text string `json:"text,omitempty"` 2540 2541 // ForceSendFields is a list of field names (e.g. "Postback") to 2542 // unconditionally include in API requests. By default, fields with 2543 // empty values are omitted from API requests. However, any non-pointer, 2544 // non-interface field appearing in ForceSendFields will be sent to the 2545 // server regardless of whether the field is empty or not. This may be 2546 // used to include empty fields in Patch requests. 2547 ForceSendFields []string `json:"-"` 2548 2549 // NullFields is a list of field names (e.g. "Postback") to include in 2550 // API requests with the JSON null value. By default, fields with empty 2551 // values are omitted from API requests. However, any field with an 2552 // empty value appearing in NullFields will be sent to the server as 2553 // null. It is an error if a field in this list has a non-empty value. 2554 // This may be used to include null fields in Patch requests. 2555 NullFields []string `json:"-"` 2556} 2557 2558func (s *GoogleCloudDialogflowV2IntentMessageCardButton) MarshalJSON() ([]byte, error) { 2559 type NoMethod GoogleCloudDialogflowV2IntentMessageCardButton 2560 raw := NoMethod(*s) 2561 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2562} 2563 2564// GoogleCloudDialogflowV2IntentMessageCarouselSelect: The card for 2565// presenting a carousel of options to select from. 2566type GoogleCloudDialogflowV2IntentMessageCarouselSelect struct { 2567 // Items: Required. Carousel items. 2568 Items []*GoogleCloudDialogflowV2IntentMessageCarouselSelectItem `json:"items,omitempty"` 2569 2570 // ForceSendFields is a list of field names (e.g. "Items") to 2571 // unconditionally include in API requests. By default, fields with 2572 // empty values are omitted from API requests. However, any non-pointer, 2573 // non-interface field appearing in ForceSendFields will be sent to the 2574 // server regardless of whether the field is empty or not. This may be 2575 // used to include empty fields in Patch requests. 2576 ForceSendFields []string `json:"-"` 2577 2578 // NullFields is a list of field names (e.g. "Items") to include in API 2579 // requests with the JSON null value. By default, fields with empty 2580 // values are omitted from API requests. However, any field with an 2581 // empty value appearing in NullFields will be sent to the server as 2582 // null. It is an error if a field in this list has a non-empty value. 2583 // This may be used to include null fields in Patch requests. 2584 NullFields []string `json:"-"` 2585} 2586 2587func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) { 2588 type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelect 2589 raw := NoMethod(*s) 2590 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2591} 2592 2593// GoogleCloudDialogflowV2IntentMessageCarouselSelectItem: An item in 2594// the carousel. 2595type GoogleCloudDialogflowV2IntentMessageCarouselSelectItem struct { 2596 // Description: Optional. The body text of the card. 2597 Description string `json:"description,omitempty"` 2598 2599 // Image: Optional. The image to display. 2600 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 2601 2602 // Info: Required. Additional info about the option item. 2603 Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"` 2604 2605 // Title: Required. Title of the carousel item. 2606 Title string `json:"title,omitempty"` 2607 2608 // ForceSendFields is a list of field names (e.g. "Description") to 2609 // unconditionally include in API requests. By default, fields with 2610 // empty values are omitted from API requests. However, any non-pointer, 2611 // non-interface field appearing in ForceSendFields will be sent to the 2612 // server regardless of whether the field is empty or not. This may be 2613 // used to include empty fields in Patch requests. 2614 ForceSendFields []string `json:"-"` 2615 2616 // NullFields is a list of field names (e.g. "Description") to include 2617 // in API requests with the JSON null value. By default, fields with 2618 // empty values are omitted from API requests. However, any field with 2619 // an empty value appearing in NullFields will be sent to the server as 2620 // null. It is an error if a field in this list has a non-empty value. 2621 // This may be used to include null fields in Patch requests. 2622 NullFields []string `json:"-"` 2623} 2624 2625func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) { 2626 type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelectItem 2627 raw := NoMethod(*s) 2628 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2629} 2630 2631// GoogleCloudDialogflowV2IntentMessageColumnProperties: Column 2632// properties for TableCard. 2633type GoogleCloudDialogflowV2IntentMessageColumnProperties struct { 2634 // Header: Required. Column heading. 2635 Header string `json:"header,omitempty"` 2636 2637 // HorizontalAlignment: Optional. Defines text alignment for all cells 2638 // in this column. 2639 // 2640 // Possible values: 2641 // "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading 2642 // edge of the column. 2643 // "LEADING" - Text is aligned to the leading edge of the column. 2644 // "CENTER" - Text is centered in the column. 2645 // "TRAILING" - Text is aligned to the trailing edge of the column. 2646 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 2647 2648 // ForceSendFields is a list of field names (e.g. "Header") to 2649 // unconditionally include in API requests. By default, fields with 2650 // empty values are omitted from API requests. However, any non-pointer, 2651 // non-interface field appearing in ForceSendFields will be sent to the 2652 // server regardless of whether the field is empty or not. This may be 2653 // used to include empty fields in Patch requests. 2654 ForceSendFields []string `json:"-"` 2655 2656 // NullFields is a list of field names (e.g. "Header") to include in API 2657 // requests with the JSON null value. By default, fields with empty 2658 // values are omitted from API requests. However, any field with an 2659 // empty value appearing in NullFields will be sent to the server as 2660 // null. It is an error if a field in this list has a non-empty value. 2661 // This may be used to include null fields in Patch requests. 2662 NullFields []string `json:"-"` 2663} 2664 2665func (s *GoogleCloudDialogflowV2IntentMessageColumnProperties) MarshalJSON() ([]byte, error) { 2666 type NoMethod GoogleCloudDialogflowV2IntentMessageColumnProperties 2667 raw := NoMethod(*s) 2668 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2669} 2670 2671// GoogleCloudDialogflowV2IntentMessageImage: The image response 2672// message. 2673type GoogleCloudDialogflowV2IntentMessageImage struct { 2674 // AccessibilityText: Optional. A text description of the image to be 2675 // used for accessibility, 2676 // e.g., screen readers. 2677 AccessibilityText string `json:"accessibilityText,omitempty"` 2678 2679 // ImageUri: Optional. The public URI to an image file. 2680 ImageUri string `json:"imageUri,omitempty"` 2681 2682 // ForceSendFields is a list of field names (e.g. "AccessibilityText") 2683 // to unconditionally include in API requests. By default, fields with 2684 // empty values are omitted from API requests. However, any non-pointer, 2685 // non-interface field appearing in ForceSendFields will be sent to the 2686 // server regardless of whether the field is empty or not. This may be 2687 // used to include empty fields in Patch requests. 2688 ForceSendFields []string `json:"-"` 2689 2690 // NullFields is a list of field names (e.g. "AccessibilityText") to 2691 // include in API requests with the JSON null value. By default, fields 2692 // with empty values are omitted from API requests. However, any field 2693 // with an empty value appearing in NullFields will be sent to the 2694 // server as null. It is an error if a field in this list has a 2695 // non-empty value. This may be used to include null fields in Patch 2696 // requests. 2697 NullFields []string `json:"-"` 2698} 2699 2700func (s *GoogleCloudDialogflowV2IntentMessageImage) MarshalJSON() ([]byte, error) { 2701 type NoMethod GoogleCloudDialogflowV2IntentMessageImage 2702 raw := NoMethod(*s) 2703 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2704} 2705 2706// GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion: The suggestion 2707// chip message that allows the user to jump out to the app 2708// or website associated with this agent. 2709type GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion struct { 2710 // DestinationName: Required. The name of the app or site this chip is 2711 // linking to. 2712 DestinationName string `json:"destinationName,omitempty"` 2713 2714 // Uri: Required. The URI of the app or site to open when the user taps 2715 // the 2716 // suggestion chip. 2717 Uri string `json:"uri,omitempty"` 2718 2719 // ForceSendFields is a list of field names (e.g. "DestinationName") to 2720 // unconditionally include in API requests. By default, fields with 2721 // empty values are omitted from API requests. However, any non-pointer, 2722 // non-interface field appearing in ForceSendFields will be sent to the 2723 // server regardless of whether the field is empty or not. This may be 2724 // used to include empty fields in Patch requests. 2725 ForceSendFields []string `json:"-"` 2726 2727 // NullFields is a list of field names (e.g. "DestinationName") to 2728 // include in API requests with the JSON null value. By default, fields 2729 // with empty values are omitted from API requests. However, any field 2730 // with an empty value appearing in NullFields will be sent to the 2731 // server as null. It is an error if a field in this list has a 2732 // non-empty value. This may be used to include null fields in Patch 2733 // requests. 2734 NullFields []string `json:"-"` 2735} 2736 2737func (s *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) { 2738 type NoMethod GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion 2739 raw := NoMethod(*s) 2740 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2741} 2742 2743// GoogleCloudDialogflowV2IntentMessageListSelect: The card for 2744// presenting a list of options to select from. 2745type GoogleCloudDialogflowV2IntentMessageListSelect struct { 2746 // Items: Required. List items. 2747 Items []*GoogleCloudDialogflowV2IntentMessageListSelectItem `json:"items,omitempty"` 2748 2749 // Subtitle: Optional. Subtitle of the list. 2750 Subtitle string `json:"subtitle,omitempty"` 2751 2752 // Title: Optional. The overall title of the list. 2753 Title string `json:"title,omitempty"` 2754 2755 // ForceSendFields is a list of field names (e.g. "Items") to 2756 // unconditionally include in API requests. By default, fields with 2757 // empty values are omitted from API requests. However, any non-pointer, 2758 // non-interface field appearing in ForceSendFields will be sent to the 2759 // server regardless of whether the field is empty or not. This may be 2760 // used to include empty fields in Patch requests. 2761 ForceSendFields []string `json:"-"` 2762 2763 // NullFields is a list of field names (e.g. "Items") to include in API 2764 // requests with the JSON null value. By default, fields with empty 2765 // values are omitted from API requests. However, any field with an 2766 // empty value appearing in NullFields will be sent to the server as 2767 // null. It is an error if a field in this list has a non-empty value. 2768 // This may be used to include null fields in Patch requests. 2769 NullFields []string `json:"-"` 2770} 2771 2772func (s *GoogleCloudDialogflowV2IntentMessageListSelect) MarshalJSON() ([]byte, error) { 2773 type NoMethod GoogleCloudDialogflowV2IntentMessageListSelect 2774 raw := NoMethod(*s) 2775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2776} 2777 2778// GoogleCloudDialogflowV2IntentMessageListSelectItem: An item in the 2779// list. 2780type GoogleCloudDialogflowV2IntentMessageListSelectItem struct { 2781 // Description: Optional. The main text describing the item. 2782 Description string `json:"description,omitempty"` 2783 2784 // Image: Optional. The image to display. 2785 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 2786 2787 // Info: Required. Additional information about this option. 2788 Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"` 2789 2790 // Title: Required. The title of the list item. 2791 Title string `json:"title,omitempty"` 2792 2793 // ForceSendFields is a list of field names (e.g. "Description") to 2794 // unconditionally include in API requests. By default, fields with 2795 // empty values are omitted from API requests. However, any non-pointer, 2796 // non-interface field appearing in ForceSendFields will be sent to the 2797 // server regardless of whether the field is empty or not. This may be 2798 // used to include empty fields in Patch requests. 2799 ForceSendFields []string `json:"-"` 2800 2801 // NullFields is a list of field names (e.g. "Description") to include 2802 // in API requests with the JSON null value. By default, fields with 2803 // empty values are omitted from API requests. However, any field with 2804 // an empty value appearing in NullFields will be sent to the server as 2805 // null. It is an error if a field in this list has a non-empty value. 2806 // This may be used to include null fields in Patch requests. 2807 NullFields []string `json:"-"` 2808} 2809 2810func (s *GoogleCloudDialogflowV2IntentMessageListSelectItem) MarshalJSON() ([]byte, error) { 2811 type NoMethod GoogleCloudDialogflowV2IntentMessageListSelectItem 2812 raw := NoMethod(*s) 2813 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2814} 2815 2816// GoogleCloudDialogflowV2IntentMessageMediaContent: The media content 2817// card for Actions on Google. 2818type GoogleCloudDialogflowV2IntentMessageMediaContent struct { 2819 // MediaObjects: Required. List of media objects. 2820 MediaObjects []*GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"` 2821 2822 // MediaType: Optional. What type of media is the content (ie "audio"). 2823 // 2824 // Possible values: 2825 // "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified. 2826 // "AUDIO" - Response media type is audio. 2827 MediaType string `json:"mediaType,omitempty"` 2828 2829 // ForceSendFields is a list of field names (e.g. "MediaObjects") to 2830 // unconditionally include in API requests. By default, fields with 2831 // empty values are omitted from API requests. However, any non-pointer, 2832 // non-interface field appearing in ForceSendFields will be sent to the 2833 // server regardless of whether the field is empty or not. This may be 2834 // used to include empty fields in Patch requests. 2835 ForceSendFields []string `json:"-"` 2836 2837 // NullFields is a list of field names (e.g. "MediaObjects") to include 2838 // in API requests with the JSON null value. By default, fields with 2839 // empty values are omitted from API requests. However, any field with 2840 // an empty value appearing in NullFields will be sent to the server as 2841 // null. It is an error if a field in this list has a non-empty value. 2842 // This may be used to include null fields in Patch requests. 2843 NullFields []string `json:"-"` 2844} 2845 2846func (s *GoogleCloudDialogflowV2IntentMessageMediaContent) MarshalJSON() ([]byte, error) { 2847 type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContent 2848 raw := NoMethod(*s) 2849 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2850} 2851 2852// GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject: 2853// Response media object for media content card. 2854type GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject struct { 2855 // ContentUrl: Required. Url where the media is stored. 2856 ContentUrl string `json:"contentUrl,omitempty"` 2857 2858 // Description: Optional. Description of media card. 2859 Description string `json:"description,omitempty"` 2860 2861 // Icon: Optional. Icon to display above media content. 2862 Icon *GoogleCloudDialogflowV2IntentMessageImage `json:"icon,omitempty"` 2863 2864 // LargeImage: Optional. Image to display above media content. 2865 LargeImage *GoogleCloudDialogflowV2IntentMessageImage `json:"largeImage,omitempty"` 2866 2867 // Name: Required. Name of media card. 2868 Name string `json:"name,omitempty"` 2869 2870 // ForceSendFields is a list of field names (e.g. "ContentUrl") to 2871 // unconditionally include in API requests. By default, fields with 2872 // empty values are omitted from API requests. However, any non-pointer, 2873 // non-interface field appearing in ForceSendFields will be sent to the 2874 // server regardless of whether the field is empty or not. This may be 2875 // used to include empty fields in Patch requests. 2876 ForceSendFields []string `json:"-"` 2877 2878 // NullFields is a list of field names (e.g. "ContentUrl") to include in 2879 // API requests with the JSON null value. By default, fields with empty 2880 // values are omitted from API requests. However, any field with an 2881 // empty value appearing in NullFields will be sent to the server as 2882 // null. It is an error if a field in this list has a non-empty value. 2883 // This may be used to include null fields in Patch requests. 2884 NullFields []string `json:"-"` 2885} 2886 2887func (s *GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) { 2888 type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject 2889 raw := NoMethod(*s) 2890 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2891} 2892 2893// GoogleCloudDialogflowV2IntentMessageQuickReplies: The quick replies 2894// response message. 2895type GoogleCloudDialogflowV2IntentMessageQuickReplies struct { 2896 // QuickReplies: Optional. The collection of quick replies. 2897 QuickReplies []string `json:"quickReplies,omitempty"` 2898 2899 // Title: Optional. The title of the collection of quick replies. 2900 Title string `json:"title,omitempty"` 2901 2902 // ForceSendFields is a list of field names (e.g. "QuickReplies") to 2903 // unconditionally include in API requests. By default, fields with 2904 // empty values are omitted from API requests. However, any non-pointer, 2905 // non-interface field appearing in ForceSendFields will be sent to the 2906 // server regardless of whether the field is empty or not. This may be 2907 // used to include empty fields in Patch requests. 2908 ForceSendFields []string `json:"-"` 2909 2910 // NullFields is a list of field names (e.g. "QuickReplies") to include 2911 // in API requests with the JSON null value. By default, fields with 2912 // empty values are omitted from API requests. However, any field with 2913 // an empty value appearing in NullFields will be sent to the server as 2914 // null. It is an error if a field in this list has a non-empty value. 2915 // This may be used to include null fields in Patch requests. 2916 NullFields []string `json:"-"` 2917} 2918 2919func (s *GoogleCloudDialogflowV2IntentMessageQuickReplies) MarshalJSON() ([]byte, error) { 2920 type NoMethod GoogleCloudDialogflowV2IntentMessageQuickReplies 2921 raw := NoMethod(*s) 2922 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2923} 2924 2925// GoogleCloudDialogflowV2IntentMessageSelectItemInfo: Additional info 2926// about the select item for when it is triggered in a 2927// dialog. 2928type GoogleCloudDialogflowV2IntentMessageSelectItemInfo struct { 2929 // Key: Required. A unique key that will be sent back to the agent if 2930 // this 2931 // response is given. 2932 Key string `json:"key,omitempty"` 2933 2934 // Synonyms: Optional. A list of synonyms that can also be used to 2935 // trigger this 2936 // item in dialog. 2937 Synonyms []string `json:"synonyms,omitempty"` 2938 2939 // ForceSendFields is a list of field names (e.g. "Key") to 2940 // unconditionally include in API requests. By default, fields with 2941 // empty values are omitted from API requests. However, any non-pointer, 2942 // non-interface field appearing in ForceSendFields will be sent to the 2943 // server regardless of whether the field is empty or not. This may be 2944 // used to include empty fields in Patch requests. 2945 ForceSendFields []string `json:"-"` 2946 2947 // NullFields is a list of field names (e.g. "Key") to include in API 2948 // requests with the JSON null value. By default, fields with empty 2949 // values are omitted from API requests. However, any field with an 2950 // empty value appearing in NullFields will be sent to the server as 2951 // null. It is an error if a field in this list has a non-empty value. 2952 // This may be used to include null fields in Patch requests. 2953 NullFields []string `json:"-"` 2954} 2955 2956func (s *GoogleCloudDialogflowV2IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) { 2957 type NoMethod GoogleCloudDialogflowV2IntentMessageSelectItemInfo 2958 raw := NoMethod(*s) 2959 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2960} 2961 2962// GoogleCloudDialogflowV2IntentMessageSimpleResponse: The simple 2963// response message containing speech or text. 2964type GoogleCloudDialogflowV2IntentMessageSimpleResponse struct { 2965 // DisplayText: Optional. The text to display. 2966 DisplayText string `json:"displayText,omitempty"` 2967 2968 // Ssml: One of text_to_speech or ssml must be provided. Structured 2969 // spoken 2970 // response to the user in the SSML format. Mutually exclusive 2971 // with 2972 // text_to_speech. 2973 Ssml string `json:"ssml,omitempty"` 2974 2975 // TextToSpeech: One of text_to_speech or ssml must be provided. The 2976 // plain text of the 2977 // speech output. Mutually exclusive with ssml. 2978 TextToSpeech string `json:"textToSpeech,omitempty"` 2979 2980 // ForceSendFields is a list of field names (e.g. "DisplayText") to 2981 // unconditionally include in API requests. By default, fields with 2982 // empty values are omitted from API requests. However, any non-pointer, 2983 // non-interface field appearing in ForceSendFields will be sent to the 2984 // server regardless of whether the field is empty or not. This may be 2985 // used to include empty fields in Patch requests. 2986 ForceSendFields []string `json:"-"` 2987 2988 // NullFields is a list of field names (e.g. "DisplayText") to include 2989 // in API requests with the JSON null value. By default, fields with 2990 // empty values are omitted from API requests. However, any field with 2991 // an empty value appearing in NullFields will be sent to the server as 2992 // null. It is an error if a field in this list has a non-empty value. 2993 // This may be used to include null fields in Patch requests. 2994 NullFields []string `json:"-"` 2995} 2996 2997func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) { 2998 type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponse 2999 raw := NoMethod(*s) 3000 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3001} 3002 3003// GoogleCloudDialogflowV2IntentMessageSimpleResponses: The collection 3004// of simple response candidates. 3005// This message in `QueryResult.fulfillment_messages` 3006// and 3007// `WebhookResponse.fulfillment_messages` should contain only 3008// one 3009// `SimpleResponse`. 3010type GoogleCloudDialogflowV2IntentMessageSimpleResponses struct { 3011 // SimpleResponses: Required. The list of simple responses. 3012 SimpleResponses []*GoogleCloudDialogflowV2IntentMessageSimpleResponse `json:"simpleResponses,omitempty"` 3013 3014 // ForceSendFields is a list of field names (e.g. "SimpleResponses") to 3015 // unconditionally include in API requests. By default, fields with 3016 // empty values are omitted from API requests. However, any non-pointer, 3017 // non-interface field appearing in ForceSendFields will be sent to the 3018 // server regardless of whether the field is empty or not. This may be 3019 // used to include empty fields in Patch requests. 3020 ForceSendFields []string `json:"-"` 3021 3022 // NullFields is a list of field names (e.g. "SimpleResponses") to 3023 // include in API requests with the JSON null value. By default, fields 3024 // with empty values are omitted from API requests. However, any field 3025 // with an empty value appearing in NullFields will be sent to the 3026 // server as null. It is an error if a field in this list has a 3027 // non-empty value. This may be used to include null fields in Patch 3028 // requests. 3029 NullFields []string `json:"-"` 3030} 3031 3032func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) { 3033 type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponses 3034 raw := NoMethod(*s) 3035 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3036} 3037 3038// GoogleCloudDialogflowV2IntentMessageSuggestion: The suggestion chip 3039// message that the user can tap to quickly post a reply 3040// to the conversation. 3041type GoogleCloudDialogflowV2IntentMessageSuggestion struct { 3042 // Title: Required. The text shown the in the suggestion chip. 3043 Title string `json:"title,omitempty"` 3044 3045 // ForceSendFields is a list of field names (e.g. "Title") to 3046 // unconditionally include in API requests. By default, fields with 3047 // empty values are omitted from API requests. However, any non-pointer, 3048 // non-interface field appearing in ForceSendFields will be sent to the 3049 // server regardless of whether the field is empty or not. This may be 3050 // used to include empty fields in Patch requests. 3051 ForceSendFields []string `json:"-"` 3052 3053 // NullFields is a list of field names (e.g. "Title") to include in API 3054 // requests with the JSON null value. By default, fields with empty 3055 // values are omitted from API requests. However, any field with an 3056 // empty value appearing in NullFields will be sent to the server as 3057 // null. It is an error if a field in this list has a non-empty value. 3058 // This may be used to include null fields in Patch requests. 3059 NullFields []string `json:"-"` 3060} 3061 3062func (s *GoogleCloudDialogflowV2IntentMessageSuggestion) MarshalJSON() ([]byte, error) { 3063 type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestion 3064 raw := NoMethod(*s) 3065 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3066} 3067 3068// GoogleCloudDialogflowV2IntentMessageSuggestions: The collection of 3069// suggestions. 3070type GoogleCloudDialogflowV2IntentMessageSuggestions struct { 3071 // Suggestions: Required. The list of suggested replies. 3072 Suggestions []*GoogleCloudDialogflowV2IntentMessageSuggestion `json:"suggestions,omitempty"` 3073 3074 // ForceSendFields is a list of field names (e.g. "Suggestions") to 3075 // unconditionally include in API requests. By default, fields with 3076 // empty values are omitted from API requests. However, any non-pointer, 3077 // non-interface field appearing in ForceSendFields will be sent to the 3078 // server regardless of whether the field is empty or not. This may be 3079 // used to include empty fields in Patch requests. 3080 ForceSendFields []string `json:"-"` 3081 3082 // NullFields is a list of field names (e.g. "Suggestions") to include 3083 // in API requests with the JSON null value. By default, fields with 3084 // empty values are omitted from API requests. However, any field with 3085 // an empty value appearing in NullFields will be sent to the server as 3086 // null. It is an error if a field in this list has a non-empty value. 3087 // This may be used to include null fields in Patch requests. 3088 NullFields []string `json:"-"` 3089} 3090 3091func (s *GoogleCloudDialogflowV2IntentMessageSuggestions) MarshalJSON() ([]byte, error) { 3092 type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestions 3093 raw := NoMethod(*s) 3094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3095} 3096 3097// GoogleCloudDialogflowV2IntentMessageTableCard: Table card for Actions 3098// on Google. 3099type GoogleCloudDialogflowV2IntentMessageTableCard struct { 3100 // Buttons: Optional. List of buttons for the card. 3101 Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"` 3102 3103 // ColumnProperties: Optional. Display properties for the columns in 3104 // this table. 3105 ColumnProperties []*GoogleCloudDialogflowV2IntentMessageColumnProperties `json:"columnProperties,omitempty"` 3106 3107 // Image: Optional. Image which should be displayed on the card. 3108 Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"` 3109 3110 // Rows: Optional. Rows in this table of data. 3111 Rows []*GoogleCloudDialogflowV2IntentMessageTableCardRow `json:"rows,omitempty"` 3112 3113 // Subtitle: Optional. Subtitle to the title. 3114 Subtitle string `json:"subtitle,omitempty"` 3115 3116 // Title: Required. Title of the card. 3117 Title string `json:"title,omitempty"` 3118 3119 // ForceSendFields is a list of field names (e.g. "Buttons") to 3120 // unconditionally include in API requests. By default, fields with 3121 // empty values are omitted from API requests. However, any non-pointer, 3122 // non-interface field appearing in ForceSendFields will be sent to the 3123 // server regardless of whether the field is empty or not. This may be 3124 // used to include empty fields in Patch requests. 3125 ForceSendFields []string `json:"-"` 3126 3127 // NullFields is a list of field names (e.g. "Buttons") to include in 3128 // API requests with the JSON null value. By default, fields with empty 3129 // values are omitted from API requests. However, any field with an 3130 // empty value appearing in NullFields will be sent to the server as 3131 // null. It is an error if a field in this list has a non-empty value. 3132 // This may be used to include null fields in Patch requests. 3133 NullFields []string `json:"-"` 3134} 3135 3136func (s *GoogleCloudDialogflowV2IntentMessageTableCard) MarshalJSON() ([]byte, error) { 3137 type NoMethod GoogleCloudDialogflowV2IntentMessageTableCard 3138 raw := NoMethod(*s) 3139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3140} 3141 3142// GoogleCloudDialogflowV2IntentMessageTableCardCell: Cell of 3143// TableCardRow. 3144type GoogleCloudDialogflowV2IntentMessageTableCardCell struct { 3145 // Text: Required. Text in this cell. 3146 Text string `json:"text,omitempty"` 3147 3148 // ForceSendFields is a list of field names (e.g. "Text") to 3149 // unconditionally include in API requests. By default, fields with 3150 // empty values are omitted from API requests. However, any non-pointer, 3151 // non-interface field appearing in ForceSendFields will be sent to the 3152 // server regardless of whether the field is empty or not. This may be 3153 // used to include empty fields in Patch requests. 3154 ForceSendFields []string `json:"-"` 3155 3156 // NullFields is a list of field names (e.g. "Text") to include in API 3157 // requests with the JSON null value. By default, fields with empty 3158 // values are omitted from API requests. However, any field with an 3159 // empty value appearing in NullFields will be sent to the server as 3160 // null. It is an error if a field in this list has a non-empty value. 3161 // This may be used to include null fields in Patch requests. 3162 NullFields []string `json:"-"` 3163} 3164 3165func (s *GoogleCloudDialogflowV2IntentMessageTableCardCell) MarshalJSON() ([]byte, error) { 3166 type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardCell 3167 raw := NoMethod(*s) 3168 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3169} 3170 3171// GoogleCloudDialogflowV2IntentMessageTableCardRow: Row of TableCard. 3172type GoogleCloudDialogflowV2IntentMessageTableCardRow struct { 3173 // Cells: Optional. List of cells that make up this row. 3174 Cells []*GoogleCloudDialogflowV2IntentMessageTableCardCell `json:"cells,omitempty"` 3175 3176 // DividerAfter: Optional. Whether to add a visual divider after this 3177 // row. 3178 DividerAfter bool `json:"dividerAfter,omitempty"` 3179 3180 // ForceSendFields is a list of field names (e.g. "Cells") to 3181 // unconditionally include in API requests. By default, fields with 3182 // empty values are omitted from API requests. However, any non-pointer, 3183 // non-interface field appearing in ForceSendFields will be sent to the 3184 // server regardless of whether the field is empty or not. This may be 3185 // used to include empty fields in Patch requests. 3186 ForceSendFields []string `json:"-"` 3187 3188 // NullFields is a list of field names (e.g. "Cells") to include in API 3189 // requests with the JSON null value. By default, fields with empty 3190 // values are omitted from API requests. However, any field with an 3191 // empty value appearing in NullFields will be sent to the server as 3192 // null. It is an error if a field in this list has a non-empty value. 3193 // This may be used to include null fields in Patch requests. 3194 NullFields []string `json:"-"` 3195} 3196 3197func (s *GoogleCloudDialogflowV2IntentMessageTableCardRow) MarshalJSON() ([]byte, error) { 3198 type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardRow 3199 raw := NoMethod(*s) 3200 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3201} 3202 3203// GoogleCloudDialogflowV2IntentMessageText: The text response message. 3204type GoogleCloudDialogflowV2IntentMessageText struct { 3205 // Text: Optional. The collection of the agent's responses. 3206 Text []string `json:"text,omitempty"` 3207 3208 // ForceSendFields is a list of field names (e.g. "Text") to 3209 // unconditionally include in API requests. By default, fields with 3210 // empty values are omitted from API requests. However, any non-pointer, 3211 // non-interface field appearing in ForceSendFields will be sent to the 3212 // server regardless of whether the field is empty or not. This may be 3213 // used to include empty fields in Patch requests. 3214 ForceSendFields []string `json:"-"` 3215 3216 // NullFields is a list of field names (e.g. "Text") to include in API 3217 // requests with the JSON null value. By default, fields with empty 3218 // values are omitted from API requests. However, any field with an 3219 // empty value appearing in NullFields will be sent to the server as 3220 // null. It is an error if a field in this list has a non-empty value. 3221 // This may be used to include null fields in Patch requests. 3222 NullFields []string `json:"-"` 3223} 3224 3225func (s *GoogleCloudDialogflowV2IntentMessageText) MarshalJSON() ([]byte, error) { 3226 type NoMethod GoogleCloudDialogflowV2IntentMessageText 3227 raw := NoMethod(*s) 3228 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3229} 3230 3231// GoogleCloudDialogflowV2IntentParameter: Represents intent parameters. 3232type GoogleCloudDialogflowV2IntentParameter struct { 3233 // DefaultValue: Optional. The default value to use when the `value` 3234 // yields an empty 3235 // result. 3236 // Default values can be extracted from contexts by using the 3237 // following 3238 // syntax: `#context_name.parameter_name`. 3239 DefaultValue string `json:"defaultValue,omitempty"` 3240 3241 // DisplayName: Required. The name of the parameter. 3242 DisplayName string `json:"displayName,omitempty"` 3243 3244 // EntityTypeDisplayName: Optional. The name of the entity type, 3245 // prefixed with `@`, that 3246 // describes values of the parameter. If the parameter is 3247 // required, this must be provided. 3248 EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"` 3249 3250 // IsList: Optional. Indicates whether the parameter represents a list 3251 // of values. 3252 IsList bool `json:"isList,omitempty"` 3253 3254 // Mandatory: Optional. Indicates whether the parameter is required. 3255 // That is, 3256 // whether the intent cannot be completed without collecting the 3257 // parameter 3258 // value. 3259 Mandatory bool `json:"mandatory,omitempty"` 3260 3261 // Name: The unique identifier of this parameter. 3262 Name string `json:"name,omitempty"` 3263 3264 // Prompts: Optional. The collection of prompts that the agent can 3265 // present to the 3266 // user in order to collect a value for the parameter. 3267 Prompts []string `json:"prompts,omitempty"` 3268 3269 // Value: Optional. The definition of the parameter value. It can be: 3270 // - a constant string, 3271 // - a parameter value defined as `$parameter_name`, 3272 // - an original parameter value defined as 3273 // `$parameter_name.original`, 3274 // - a parameter value from some context defined as 3275 // `#context_name.parameter_name`. 3276 Value string `json:"value,omitempty"` 3277 3278 // ForceSendFields is a list of field names (e.g. "DefaultValue") to 3279 // unconditionally include in API requests. By default, fields with 3280 // empty values are omitted from API requests. However, any non-pointer, 3281 // non-interface field appearing in ForceSendFields will be sent to the 3282 // server regardless of whether the field is empty or not. This may be 3283 // used to include empty fields in Patch requests. 3284 ForceSendFields []string `json:"-"` 3285 3286 // NullFields is a list of field names (e.g. "DefaultValue") to include 3287 // in API requests with the JSON null value. By default, fields with 3288 // empty values are omitted from API requests. However, any field with 3289 // an empty value appearing in NullFields will be sent to the server as 3290 // null. It is an error if a field in this list has a non-empty value. 3291 // This may be used to include null fields in Patch requests. 3292 NullFields []string `json:"-"` 3293} 3294 3295func (s *GoogleCloudDialogflowV2IntentParameter) MarshalJSON() ([]byte, error) { 3296 type NoMethod GoogleCloudDialogflowV2IntentParameter 3297 raw := NoMethod(*s) 3298 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3299} 3300 3301// GoogleCloudDialogflowV2IntentTrainingPhrase: Represents an example 3302// that the agent is trained on. 3303type GoogleCloudDialogflowV2IntentTrainingPhrase struct { 3304 // Name: Output only. The unique identifier of this training phrase. 3305 Name string `json:"name,omitempty"` 3306 3307 // Parts: Required. The ordered list of training phrase parts. 3308 // The parts are concatenated in order to form the training 3309 // phrase. 3310 // 3311 // Note: The API does not automatically annotate training phrases like 3312 // the 3313 // Dialogflow Console does. 3314 // 3315 // Note: Do not forget to include whitespace at part boundaries, 3316 // so the training phrase is well formatted when the parts are 3317 // concatenated. 3318 // 3319 // If the training phrase does not need to be annotated with 3320 // parameters, 3321 // you just need a single part with only the Part.text field set. 3322 // 3323 // If you want to annotate the training phrase, you must create 3324 // multiple 3325 // parts, where the fields of each part are populated in one of two 3326 // ways: 3327 // 3328 // - `Part.text` is set to a part of the phrase that has no 3329 // parameters. 3330 // - `Part.text` is set to a part of the phrase that you want to 3331 // annotate, 3332 // and the `entity_type`, `alias`, and `user_defined` fields are 3333 // all 3334 // set. 3335 Parts []*GoogleCloudDialogflowV2IntentTrainingPhrasePart `json:"parts,omitempty"` 3336 3337 // TimesAddedCount: Optional. Indicates how many times this example was 3338 // added to 3339 // the intent. Each time a developer adds an existing sample by editing 3340 // an 3341 // intent or training, this counter is increased. 3342 TimesAddedCount int64 `json:"timesAddedCount,omitempty"` 3343 3344 // Type: Required. The type of the training phrase. 3345 // 3346 // Possible values: 3347 // "TYPE_UNSPECIFIED" - Not specified. This value should never be 3348 // used. 3349 // "EXAMPLE" - Examples do not contain @-prefixed entity type names, 3350 // but example parts 3351 // can be annotated with entity types. 3352 // "TEMPLATE" - Templates are not annotated with entity types, but 3353 // they can contain 3354 // @-prefixed entity type names as substrings. 3355 // Template mode has been deprecated. Example mode is the only 3356 // supported 3357 // way to create new training phrases. If you have existing 3358 // training 3359 // phrases that you've created in template mode, those will continue 3360 // to 3361 // work. 3362 Type string `json:"type,omitempty"` 3363 3364 // ForceSendFields is a list of field names (e.g. "Name") to 3365 // 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. "Name") to include in API 3373 // requests with the JSON null value. By default, fields with empty 3374 // values are omitted from API requests. However, any field with an 3375 // empty value appearing in NullFields will be sent to the server as 3376 // null. It is an error if a field in this list has a non-empty value. 3377 // This may be used to include null fields in Patch requests. 3378 NullFields []string `json:"-"` 3379} 3380 3381func (s *GoogleCloudDialogflowV2IntentTrainingPhrase) MarshalJSON() ([]byte, error) { 3382 type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrase 3383 raw := NoMethod(*s) 3384 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3385} 3386 3387// GoogleCloudDialogflowV2IntentTrainingPhrasePart: Represents a part of 3388// a training phrase. 3389type GoogleCloudDialogflowV2IntentTrainingPhrasePart struct { 3390 // Alias: Optional. The parameter name for the value extracted from 3391 // the 3392 // annotated part of the example. 3393 // This field is required for annotated parts of the training phrase. 3394 Alias string `json:"alias,omitempty"` 3395 3396 // EntityType: Optional. The entity type name prefixed with `@`. 3397 // This field is required for annotated parts of the training phrase. 3398 EntityType string `json:"entityType,omitempty"` 3399 3400 // Text: Required. The text for this part. 3401 Text string `json:"text,omitempty"` 3402 3403 // UserDefined: Optional. Indicates whether the text was manually 3404 // annotated. 3405 // This field is set to true when the Dialogflow Console is used 3406 // to 3407 // manually annotate the part. When creating an annotated part with 3408 // the 3409 // API, you must set this to true. 3410 UserDefined bool `json:"userDefined,omitempty"` 3411 3412 // ForceSendFields is a list of field names (e.g. "Alias") to 3413 // unconditionally include in API requests. By default, fields with 3414 // empty values are omitted from API requests. However, any non-pointer, 3415 // non-interface field appearing in ForceSendFields will be sent to the 3416 // server regardless of whether the field is empty or not. This may be 3417 // used to include empty fields in Patch requests. 3418 ForceSendFields []string `json:"-"` 3419 3420 // NullFields is a list of field names (e.g. "Alias") to include in API 3421 // requests with the JSON null value. By default, fields with empty 3422 // values are omitted from API requests. However, any field with an 3423 // empty value appearing in NullFields will be sent to the server as 3424 // null. It is an error if a field in this list has a non-empty value. 3425 // This may be used to include null fields in Patch requests. 3426 NullFields []string `json:"-"` 3427} 3428 3429func (s *GoogleCloudDialogflowV2IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) { 3430 type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrasePart 3431 raw := NoMethod(*s) 3432 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3433} 3434 3435// GoogleCloudDialogflowV2ListContextsResponse: The response message for 3436// Contexts.ListContexts. 3437type GoogleCloudDialogflowV2ListContextsResponse struct { 3438 // Contexts: The list of contexts. There will be a maximum number of 3439 // items 3440 // returned based on the page_size field in the request. 3441 Contexts []*GoogleCloudDialogflowV2Context `json:"contexts,omitempty"` 3442 3443 // NextPageToken: Token to retrieve the next page of results, or empty 3444 // if there are no 3445 // more results in the list. 3446 NextPageToken string `json:"nextPageToken,omitempty"` 3447 3448 // ServerResponse contains the HTTP response code and headers from the 3449 // server. 3450 googleapi.ServerResponse `json:"-"` 3451 3452 // ForceSendFields is a list of field names (e.g. "Contexts") 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. "Contexts") to include in 3461 // API 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 *GoogleCloudDialogflowV2ListContextsResponse) MarshalJSON() ([]byte, error) { 3470 type NoMethod GoogleCloudDialogflowV2ListContextsResponse 3471 raw := NoMethod(*s) 3472 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3473} 3474 3475// GoogleCloudDialogflowV2ListEntityTypesResponse: The response message 3476// for EntityTypes.ListEntityTypes. 3477type GoogleCloudDialogflowV2ListEntityTypesResponse struct { 3478 // EntityTypes: The list of agent entity types. There will be a maximum 3479 // number of items 3480 // returned based on the page_size field in the request. 3481 EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"` 3482 3483 // NextPageToken: Token to retrieve the next page of results, or empty 3484 // if there are no 3485 // more results in the list. 3486 NextPageToken string `json:"nextPageToken,omitempty"` 3487 3488 // ServerResponse contains the HTTP response code and headers from the 3489 // server. 3490 googleapi.ServerResponse `json:"-"` 3491 3492 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 3493 // unconditionally include in API requests. By default, fields with 3494 // empty values are omitted from API requests. However, any non-pointer, 3495 // non-interface field appearing in ForceSendFields will be sent to the 3496 // server regardless of whether the field is empty or not. This may be 3497 // used to include empty fields in Patch requests. 3498 ForceSendFields []string `json:"-"` 3499 3500 // NullFields is a list of field names (e.g. "EntityTypes") to include 3501 // in API requests with the JSON null value. By default, fields with 3502 // empty values are omitted from API requests. However, any field with 3503 // an empty value appearing in NullFields will be sent to the server as 3504 // null. It is an error if a field in this list has a non-empty value. 3505 // This may be used to include null fields in Patch requests. 3506 NullFields []string `json:"-"` 3507} 3508 3509func (s *GoogleCloudDialogflowV2ListEntityTypesResponse) MarshalJSON() ([]byte, error) { 3510 type NoMethod GoogleCloudDialogflowV2ListEntityTypesResponse 3511 raw := NoMethod(*s) 3512 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3513} 3514 3515// GoogleCloudDialogflowV2ListIntentsResponse: The response message for 3516// Intents.ListIntents. 3517type GoogleCloudDialogflowV2ListIntentsResponse struct { 3518 // Intents: The list of agent intents. There will be a maximum number of 3519 // items 3520 // returned based on the page_size field in the request. 3521 Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"` 3522 3523 // NextPageToken: Token to retrieve the next page of results, or empty 3524 // if there are no 3525 // more results in the list. 3526 NextPageToken string `json:"nextPageToken,omitempty"` 3527 3528 // ServerResponse contains the HTTP response code and headers from the 3529 // server. 3530 googleapi.ServerResponse `json:"-"` 3531 3532 // ForceSendFields is a list of field names (e.g. "Intents") to 3533 // unconditionally include in API requests. By default, fields with 3534 // empty values are omitted from API requests. However, any non-pointer, 3535 // non-interface field appearing in ForceSendFields will be sent to the 3536 // server regardless of whether the field is empty or not. This may be 3537 // used to include empty fields in Patch requests. 3538 ForceSendFields []string `json:"-"` 3539 3540 // NullFields is a list of field names (e.g. "Intents") to include in 3541 // API requests with the JSON null value. By default, fields with empty 3542 // values are omitted from API requests. However, any field with an 3543 // empty value appearing in NullFields will be sent to the server as 3544 // null. It is an error if a field in this list has a non-empty value. 3545 // This may be used to include null fields in Patch requests. 3546 NullFields []string `json:"-"` 3547} 3548 3549func (s *GoogleCloudDialogflowV2ListIntentsResponse) MarshalJSON() ([]byte, error) { 3550 type NoMethod GoogleCloudDialogflowV2ListIntentsResponse 3551 raw := NoMethod(*s) 3552 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3553} 3554 3555// GoogleCloudDialogflowV2ListSessionEntityTypesResponse: The response 3556// message for SessionEntityTypes.ListSessionEntityTypes. 3557type GoogleCloudDialogflowV2ListSessionEntityTypesResponse struct { 3558 // NextPageToken: Token to retrieve the next page of results, or empty 3559 // if there are no 3560 // more results in the list. 3561 NextPageToken string `json:"nextPageToken,omitempty"` 3562 3563 // SessionEntityTypes: The list of session entity types. There will be a 3564 // maximum number of items 3565 // returned based on the page_size field in the request. 3566 SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"` 3567 3568 // ServerResponse contains the HTTP response code and headers from the 3569 // server. 3570 googleapi.ServerResponse `json:"-"` 3571 3572 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3573 // unconditionally include in API requests. By default, fields with 3574 // empty values are omitted from API requests. However, any non-pointer, 3575 // non-interface field appearing in ForceSendFields will be sent to the 3576 // server regardless of whether the field is empty or not. This may be 3577 // used to include empty fields in Patch requests. 3578 ForceSendFields []string `json:"-"` 3579 3580 // NullFields is a list of field names (e.g. "NextPageToken") to include 3581 // in API requests with the JSON null value. By default, fields with 3582 // empty values are omitted from API requests. However, any field with 3583 // an empty value appearing in NullFields will be sent to the server as 3584 // null. It is an error if a field in this list has a non-empty value. 3585 // This may be used to include null fields in Patch requests. 3586 NullFields []string `json:"-"` 3587} 3588 3589func (s *GoogleCloudDialogflowV2ListSessionEntityTypesResponse) MarshalJSON() ([]byte, error) { 3590 type NoMethod GoogleCloudDialogflowV2ListSessionEntityTypesResponse 3591 raw := NoMethod(*s) 3592 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3593} 3594 3595// GoogleCloudDialogflowV2Message: Represents a message posted into a 3596// conversation. 3597type GoogleCloudDialogflowV2Message struct { 3598 // Content: Required. The message content. 3599 Content string `json:"content,omitempty"` 3600 3601 // CreateTime: Output only. The time when the message was created. 3602 CreateTime string `json:"createTime,omitempty"` 3603 3604 // LanguageCode: Optional. The message language. 3605 // This should be a 3606 // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 3607 // language tag. Example: "en-US". 3608 LanguageCode string `json:"languageCode,omitempty"` 3609 3610 // MessageAnnotation: Output only. The annotation for the message. 3611 MessageAnnotation *GoogleCloudDialogflowV2MessageAnnotation `json:"messageAnnotation,omitempty"` 3612 3613 // Name: The unique identifier of the message. 3614 // Format: `projects/<Project 3615 // ID>/conversations/<Conversation 3616 // ID>/messages/<Message ID>`. 3617 Name string `json:"name,omitempty"` 3618 3619 // Participant: Output only. The participant that sends this message. 3620 Participant string `json:"participant,omitempty"` 3621 3622 // ParticipantRole: Output only. The role of the participant. 3623 // 3624 // Possible values: 3625 // "ROLE_UNSPECIFIED" - Participant role not set. 3626 // "HUMAN_AGENT" - Participant is a human agent. 3627 // "AUTOMATED_AGENT" - Participant is an automated agent, such as a 3628 // Dialogflow agent. 3629 // "END_USER" - Participant is an end user that has called or chatted 3630 // with 3631 // Dialogflow services. 3632 ParticipantRole string `json:"participantRole,omitempty"` 3633 3634 // ForceSendFields is a list of field names (e.g. "Content") to 3635 // unconditionally include in API requests. By default, fields with 3636 // empty values are omitted from API requests. However, any non-pointer, 3637 // non-interface field appearing in ForceSendFields will be sent to the 3638 // server regardless of whether the field is empty or not. This may be 3639 // used to include empty fields in Patch requests. 3640 ForceSendFields []string `json:"-"` 3641 3642 // NullFields is a list of field names (e.g. "Content") to include in 3643 // API requests with the JSON null value. By default, fields with empty 3644 // values are omitted from API requests. However, any field with an 3645 // empty value appearing in NullFields will be sent to the server as 3646 // null. It is an error if a field in this list has a non-empty value. 3647 // This may be used to include null fields in Patch requests. 3648 NullFields []string `json:"-"` 3649} 3650 3651func (s *GoogleCloudDialogflowV2Message) MarshalJSON() ([]byte, error) { 3652 type NoMethod GoogleCloudDialogflowV2Message 3653 raw := NoMethod(*s) 3654 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3655} 3656 3657// GoogleCloudDialogflowV2MessageAnnotation: Represents the result of 3658// annotation for the message. 3659type GoogleCloudDialogflowV2MessageAnnotation struct { 3660 // ContainEntities: Indicates whether the text message contains 3661 // entities. 3662 ContainEntities bool `json:"containEntities,omitempty"` 3663 3664 // Parts: The collection of annotated message parts ordered by 3665 // their 3666 // position in the message. You can recover the annotated message 3667 // by 3668 // concatenating [AnnotatedMessagePart.text]. 3669 Parts []*GoogleCloudDialogflowV2AnnotatedMessagePart `json:"parts,omitempty"` 3670 3671 // ForceSendFields is a list of field names (e.g. "ContainEntities") to 3672 // unconditionally include in API requests. By default, fields with 3673 // empty values are omitted from API requests. However, any non-pointer, 3674 // non-interface field appearing in ForceSendFields will be sent to the 3675 // server regardless of whether the field is empty or not. This may be 3676 // used to include empty fields in Patch requests. 3677 ForceSendFields []string `json:"-"` 3678 3679 // NullFields is a list of field names (e.g. "ContainEntities") to 3680 // include in API requests with the JSON null value. By default, fields 3681 // with empty values are omitted from API requests. However, any field 3682 // with an empty value appearing in NullFields will be sent to the 3683 // server as null. It is an error if a field in this list has a 3684 // non-empty value. This may be used to include null fields in Patch 3685 // requests. 3686 NullFields []string `json:"-"` 3687} 3688 3689func (s *GoogleCloudDialogflowV2MessageAnnotation) MarshalJSON() ([]byte, error) { 3690 type NoMethod GoogleCloudDialogflowV2MessageAnnotation 3691 raw := NoMethod(*s) 3692 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3693} 3694 3695// GoogleCloudDialogflowV2OriginalDetectIntentRequest: Represents the 3696// contents of the original request that was passed to 3697// the `[Streaming]DetectIntent` call. 3698type GoogleCloudDialogflowV2OriginalDetectIntentRequest struct { 3699 // Payload: Optional. This field is set to the value of the 3700 // `QueryParameters.payload` 3701 // field passed in the request. Some integrations that query a 3702 // Dialogflow 3703 // agent may provide additional information in the payload. 3704 // 3705 // In particular for the Telephony Gateway this field has the 3706 // form: 3707 // <pre>{ 3708 // "telephony": { 3709 // "caller_id": "+18558363987" 3710 // } 3711 // }</pre> 3712 // Note: The caller ID field (`caller_id`) will be redacted for 3713 // Standard 3714 // Edition agents and populated with the caller ID in 3715 // [E.164 3716 // format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition 3717 // agents. 3718 Payload googleapi.RawMessage `json:"payload,omitempty"` 3719 3720 // Source: The source of this request, e.g., `google`, `facebook`, 3721 // `slack`. It is set 3722 // by Dialogflow-owned servers. 3723 Source string `json:"source,omitempty"` 3724 3725 // Version: Optional. The version of the protocol used for this 3726 // request. 3727 // This field is AoG-specific. 3728 Version string `json:"version,omitempty"` 3729 3730 // ForceSendFields is a list of field names (e.g. "Payload") to 3731 // unconditionally include in API requests. By default, fields with 3732 // empty values are omitted from API requests. However, any non-pointer, 3733 // non-interface field appearing in ForceSendFields will be sent to the 3734 // server regardless of whether the field is empty or not. This may be 3735 // used to include empty fields in Patch requests. 3736 ForceSendFields []string `json:"-"` 3737 3738 // NullFields is a list of field names (e.g. "Payload") to include in 3739 // API requests with the JSON null value. By default, fields with empty 3740 // values are omitted from API requests. However, any field with an 3741 // empty value appearing in NullFields will be sent to the server as 3742 // null. It is an error if a field in this list has a non-empty value. 3743 // This may be used to include null fields in Patch requests. 3744 NullFields []string `json:"-"` 3745} 3746 3747func (s *GoogleCloudDialogflowV2OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) { 3748 type NoMethod GoogleCloudDialogflowV2OriginalDetectIntentRequest 3749 raw := NoMethod(*s) 3750 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3751} 3752 3753// GoogleCloudDialogflowV2OutputAudioConfig: Instructs the speech 3754// synthesizer on how to generate the output audio content. 3755// If this audio config is supplied in a request, it overrides all 3756// existing 3757// text-to-speech settings applied to the agent. 3758type GoogleCloudDialogflowV2OutputAudioConfig struct { 3759 // AudioEncoding: Required. Audio encoding of the synthesized audio 3760 // content. 3761 // 3762 // Possible values: 3763 // "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" - Not specified. 3764 // "OUTPUT_AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed 3765 // little-endian samples (Linear PCM). 3766 // Audio content returned as LINEAR16 also contains a WAV header. 3767 // "OUTPUT_AUDIO_ENCODING_MP3" - MP3 audio at 32kbps. 3768 // "OUTPUT_AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio wrapped in an 3769 // ogg container. The result will be a 3770 // file which can be played natively on Android, and in browsers (at 3771 // least 3772 // Chrome and Firefox). The quality of the encoding is considerably 3773 // higher 3774 // than MP3 while using approximately the same bitrate. 3775 AudioEncoding string `json:"audioEncoding,omitempty"` 3776 3777 // SampleRateHertz: The synthesis sample rate (in hertz) for this audio. 3778 // If not 3779 // provided, then the synthesizer will use the default sample rate based 3780 // on 3781 // the audio encoding. If this is different from the voice's natural 3782 // sample 3783 // rate, then the synthesizer will honor this request by converting to 3784 // the 3785 // desired sample rate (which might result in worse audio quality). 3786 SampleRateHertz int64 `json:"sampleRateHertz,omitempty"` 3787 3788 // SynthesizeSpeechConfig: Configuration of how speech should be 3789 // synthesized. 3790 SynthesizeSpeechConfig *GoogleCloudDialogflowV2SynthesizeSpeechConfig `json:"synthesizeSpeechConfig,omitempty"` 3791 3792 // ForceSendFields is a list of field names (e.g. "AudioEncoding") to 3793 // unconditionally include in API requests. By default, fields with 3794 // empty values are omitted from API requests. However, any non-pointer, 3795 // non-interface field appearing in ForceSendFields will be sent to the 3796 // server regardless of whether the field is empty or not. This may be 3797 // used to include empty fields in Patch requests. 3798 ForceSendFields []string `json:"-"` 3799 3800 // NullFields is a list of field names (e.g. "AudioEncoding") to include 3801 // in API requests with the JSON null value. By default, fields with 3802 // empty values are omitted from API requests. However, any field with 3803 // an empty value appearing in NullFields will be sent to the server as 3804 // null. It is an error if a field in this list has a non-empty value. 3805 // This may be used to include null fields in Patch requests. 3806 NullFields []string `json:"-"` 3807} 3808 3809func (s *GoogleCloudDialogflowV2OutputAudioConfig) MarshalJSON() ([]byte, error) { 3810 type NoMethod GoogleCloudDialogflowV2OutputAudioConfig 3811 raw := NoMethod(*s) 3812 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3813} 3814 3815// GoogleCloudDialogflowV2QueryInput: Represents the query input. It can 3816// contain either: 3817// 3818// 1. An audio config which 3819// instructs the speech recognizer how to process the speech 3820// audio. 3821// 3822// 2. A conversational query in the form of text,. 3823// 3824// 3. An event that specifies which intent to trigger. 3825type GoogleCloudDialogflowV2QueryInput struct { 3826 // AudioConfig: Instructs the speech recognizer how to process the 3827 // speech audio. 3828 AudioConfig *GoogleCloudDialogflowV2InputAudioConfig `json:"audioConfig,omitempty"` 3829 3830 // Event: The event to be processed. 3831 Event *GoogleCloudDialogflowV2EventInput `json:"event,omitempty"` 3832 3833 // Text: The natural language text to be processed. 3834 Text *GoogleCloudDialogflowV2TextInput `json:"text,omitempty"` 3835 3836 // ForceSendFields is a list of field names (e.g. "AudioConfig") to 3837 // unconditionally include in API requests. By default, fields with 3838 // empty values are omitted from API requests. However, any non-pointer, 3839 // non-interface field appearing in ForceSendFields will be sent to the 3840 // server regardless of whether the field is empty or not. This may be 3841 // used to include empty fields in Patch requests. 3842 ForceSendFields []string `json:"-"` 3843 3844 // NullFields is a list of field names (e.g. "AudioConfig") to include 3845 // in API requests with the JSON null value. By default, fields with 3846 // empty values are omitted from API requests. However, any field with 3847 // an empty value appearing in NullFields will be sent to the server as 3848 // null. It is an error if a field in this list has a non-empty value. 3849 // This may be used to include null fields in Patch requests. 3850 NullFields []string `json:"-"` 3851} 3852 3853func (s *GoogleCloudDialogflowV2QueryInput) MarshalJSON() ([]byte, error) { 3854 type NoMethod GoogleCloudDialogflowV2QueryInput 3855 raw := NoMethod(*s) 3856 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3857} 3858 3859// GoogleCloudDialogflowV2QueryParameters: Represents the parameters of 3860// the conversational query. 3861type GoogleCloudDialogflowV2QueryParameters struct { 3862 // Contexts: The collection of contexts to be activated before this 3863 // query is 3864 // executed. 3865 Contexts []*GoogleCloudDialogflowV2Context `json:"contexts,omitempty"` 3866 3867 // GeoLocation: The geo location of this conversational query. 3868 GeoLocation *GoogleTypeLatLng `json:"geoLocation,omitempty"` 3869 3870 // Payload: This field can be used to pass custom data into the 3871 // webhook 3872 // associated with the agent. Arbitrary JSON objects are supported. 3873 Payload googleapi.RawMessage `json:"payload,omitempty"` 3874 3875 // ResetContexts: Specifies whether to delete all contexts in the 3876 // current session 3877 // before the new ones are activated. 3878 ResetContexts bool `json:"resetContexts,omitempty"` 3879 3880 // SentimentAnalysisRequestConfig: Configures the type of sentiment 3881 // analysis to perform. If not 3882 // provided, sentiment analysis is not performed. 3883 SentimentAnalysisRequestConfig *GoogleCloudDialogflowV2SentimentAnalysisRequestConfig `json:"sentimentAnalysisRequestConfig,omitempty"` 3884 3885 // SessionEntityTypes: Additional session entity types to replace or 3886 // extend developer 3887 // entity types with. The entity synonyms apply to all languages and 3888 // persist 3889 // for the session of this query. 3890 SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"` 3891 3892 // TimeZone: The time zone of this conversational query from the 3893 // [time zone database](https://www.iana.org/time-zones), 3894 // e.g., 3895 // America/New_York, Europe/Paris. If not provided, the time zone 3896 // specified in 3897 // agent settings is used. 3898 TimeZone string `json:"timeZone,omitempty"` 3899 3900 // ForceSendFields is a list of field names (e.g. "Contexts") to 3901 // unconditionally include in API requests. By default, fields with 3902 // empty values are omitted from API requests. However, any non-pointer, 3903 // non-interface field appearing in ForceSendFields will be sent to the 3904 // server regardless of whether the field is empty or not. This may be 3905 // used to include empty fields in Patch requests. 3906 ForceSendFields []string `json:"-"` 3907 3908 // NullFields is a list of field names (e.g. "Contexts") to include in 3909 // API requests with the JSON null value. By default, fields with empty 3910 // values are omitted from API requests. However, any field with an 3911 // empty value appearing in NullFields will be sent to the server as 3912 // null. It is an error if a field in this list has a non-empty value. 3913 // This may be used to include null fields in Patch requests. 3914 NullFields []string `json:"-"` 3915} 3916 3917func (s *GoogleCloudDialogflowV2QueryParameters) MarshalJSON() ([]byte, error) { 3918 type NoMethod GoogleCloudDialogflowV2QueryParameters 3919 raw := NoMethod(*s) 3920 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3921} 3922 3923// GoogleCloudDialogflowV2QueryResult: Represents the result of 3924// conversational query or event processing. 3925type GoogleCloudDialogflowV2QueryResult struct { 3926 // Action: The action name from the matched intent. 3927 Action string `json:"action,omitempty"` 3928 3929 // AllRequiredParamsPresent: This field is set to: 3930 // 3931 // - `false` if the matched intent has required parameters and not all 3932 // of 3933 // the required parameter values have been collected. 3934 // - `true` if all required parameter values have been collected, or if 3935 // the 3936 // matched intent doesn't contain any required parameters. 3937 AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"` 3938 3939 // DiagnosticInfo: Free-form diagnostic information for the associated 3940 // detect intent request. 3941 // The fields of this data can change without notice, so you should not 3942 // write 3943 // code that depends on its structure. 3944 // The data may contain: 3945 // 3946 // - webhook call latency 3947 // - webhook errors 3948 DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"` 3949 3950 // FulfillmentMessages: The collection of rich messages to present to 3951 // the user. 3952 FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"` 3953 3954 // FulfillmentText: The text to be pronounced to the user or shown on 3955 // the screen. 3956 // Note: This is a legacy field, `fulfillment_messages` should be 3957 // preferred. 3958 FulfillmentText string `json:"fulfillmentText,omitempty"` 3959 3960 // Intent: The intent that matched the conversational query. Some, 3961 // not 3962 // all fields are filled in this message, including but not limited 3963 // to: 3964 // `name`, `display_name`, `end_interaction` and `is_fallback`. 3965 Intent *GoogleCloudDialogflowV2Intent `json:"intent,omitempty"` 3966 3967 // IntentDetectionConfidence: The intent detection confidence. Values 3968 // range from 0.0 3969 // (completely uncertain) to 1.0 (completely certain). 3970 // This value is for informational purpose only and is only used to 3971 // help match the best intent within the classification threshold. 3972 // This value may change for the same end-user expression at any time 3973 // due to a 3974 // model retraining or change in implementation. 3975 // If there are `multiple knowledge_answers` messages, this value is set 3976 // to 3977 // the greatest `knowledgeAnswers.match_confidence` value in the list. 3978 IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"` 3979 3980 // LanguageCode: The language that was triggered during intent 3981 // detection. 3982 // See 3983 // [Language 3984 // Support](https://cloud.google.com/dialogflow/docs/reference/ 3985 // language) 3986 // for a list of the currently supported language codes. 3987 LanguageCode string `json:"languageCode,omitempty"` 3988 3989 // OutputContexts: The collection of output contexts. If 3990 // applicable, 3991 // `output_contexts.parameters` contains entries with name 3992 // `<parameter name>.original` containing the original parameter 3993 // values 3994 // before the query. 3995 OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"` 3996 3997 // Parameters: The collection of extracted parameters. 3998 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 3999 4000 // QueryText: The original conversational query text: 4001 // 4002 // - If natural language text was provided as input, `query_text` 4003 // contains 4004 // a copy of the input. 4005 // - If natural language speech audio was provided as input, 4006 // `query_text` 4007 // contains the speech recognition result. If speech recognizer 4008 // produced 4009 // multiple alternatives, a particular one is picked. 4010 // - If automatic spell correction is enabled, `query_text` will contain 4011 // the 4012 // corrected user input. 4013 QueryText string `json:"queryText,omitempty"` 4014 4015 // SentimentAnalysisResult: The sentiment analysis result, which depends 4016 // on the 4017 // `sentiment_analysis_request_config` specified in the request. 4018 SentimentAnalysisResult *GoogleCloudDialogflowV2SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"` 4019 4020 // SpeechRecognitionConfidence: The Speech recognition confidence 4021 // between 0.0 and 1.0. A higher number 4022 // indicates an estimated greater likelihood that the recognized words 4023 // are 4024 // correct. The default of 0.0 is a sentinel value indicating that 4025 // confidence 4026 // was not set. 4027 // 4028 // This field is not guaranteed to be accurate or set. In particular 4029 // this 4030 // field isn't set for StreamingDetectIntent since the streaming 4031 // endpoint has 4032 // separate confidence estimates per portion of the audio 4033 // in 4034 // StreamingRecognitionResult. 4035 SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"` 4036 4037 // WebhookPayload: If the query was fulfilled by a webhook call, this 4038 // field is set to the 4039 // value of the `payload` field returned in the webhook response. 4040 WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"` 4041 4042 // WebhookSource: If the query was fulfilled by a webhook call, this 4043 // field is set to the 4044 // value of the `source` field returned in the webhook response. 4045 WebhookSource string `json:"webhookSource,omitempty"` 4046 4047 // ForceSendFields is a list of field names (e.g. "Action") to 4048 // unconditionally include in API requests. By default, fields with 4049 // empty values are omitted from API requests. However, any non-pointer, 4050 // non-interface field appearing in ForceSendFields will be sent to the 4051 // server regardless of whether the field is empty or not. This may be 4052 // used to include empty fields in Patch requests. 4053 ForceSendFields []string `json:"-"` 4054 4055 // NullFields is a list of field names (e.g. "Action") to include in API 4056 // requests with the JSON null value. By default, fields with empty 4057 // values are omitted from API requests. However, any field with an 4058 // empty value appearing in NullFields will be sent to the server as 4059 // null. It is an error if a field in this list has a non-empty value. 4060 // This may be used to include null fields in Patch requests. 4061 NullFields []string `json:"-"` 4062} 4063 4064func (s *GoogleCloudDialogflowV2QueryResult) MarshalJSON() ([]byte, error) { 4065 type NoMethod GoogleCloudDialogflowV2QueryResult 4066 raw := NoMethod(*s) 4067 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4068} 4069 4070func (s *GoogleCloudDialogflowV2QueryResult) UnmarshalJSON(data []byte) error { 4071 type NoMethod GoogleCloudDialogflowV2QueryResult 4072 var s1 struct { 4073 IntentDetectionConfidence gensupport.JSONFloat64 `json:"intentDetectionConfidence"` 4074 SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"` 4075 *NoMethod 4076 } 4077 s1.NoMethod = (*NoMethod)(s) 4078 if err := json.Unmarshal(data, &s1); err != nil { 4079 return err 4080 } 4081 s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence) 4082 s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence) 4083 return nil 4084} 4085 4086// GoogleCloudDialogflowV2RestoreAgentRequest: The request message for 4087// Agents.RestoreAgent. 4088type GoogleCloudDialogflowV2RestoreAgentRequest struct { 4089 // AgentContent: Zip compressed raw byte content for agent. 4090 AgentContent string `json:"agentContent,omitempty"` 4091 4092 // AgentUri: The URI to a Google Cloud Storage file containing the agent 4093 // to restore. 4094 // Note: The URI must start with "gs://". 4095 AgentUri string `json:"agentUri,omitempty"` 4096 4097 // ForceSendFields is a list of field names (e.g. "AgentContent") to 4098 // unconditionally include in API requests. By default, fields with 4099 // empty values are omitted from API requests. However, any non-pointer, 4100 // non-interface field appearing in ForceSendFields will be sent to the 4101 // server regardless of whether the field is empty or not. This may be 4102 // used to include empty fields in Patch requests. 4103 ForceSendFields []string `json:"-"` 4104 4105 // NullFields is a list of field names (e.g. "AgentContent") to include 4106 // in API requests with the JSON null value. By default, fields with 4107 // empty values are omitted from API requests. However, any field with 4108 // an empty value appearing in NullFields will be sent to the server as 4109 // null. It is an error if a field in this list has a non-empty value. 4110 // This may be used to include null fields in Patch requests. 4111 NullFields []string `json:"-"` 4112} 4113 4114func (s *GoogleCloudDialogflowV2RestoreAgentRequest) MarshalJSON() ([]byte, error) { 4115 type NoMethod GoogleCloudDialogflowV2RestoreAgentRequest 4116 raw := NoMethod(*s) 4117 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4118} 4119 4120// GoogleCloudDialogflowV2SearchAgentsResponse: The response message for 4121// Agents.SearchAgents. 4122type GoogleCloudDialogflowV2SearchAgentsResponse struct { 4123 // Agents: The list of agents. There will be a maximum number of items 4124 // returned based 4125 // on the page_size field in the request. 4126 Agents []*GoogleCloudDialogflowV2Agent `json:"agents,omitempty"` 4127 4128 // NextPageToken: Token to retrieve the next page of results, or empty 4129 // if there are no 4130 // more results in the list. 4131 NextPageToken string `json:"nextPageToken,omitempty"` 4132 4133 // ServerResponse contains the HTTP response code and headers from the 4134 // server. 4135 googleapi.ServerResponse `json:"-"` 4136 4137 // ForceSendFields is a list of field names (e.g. "Agents") to 4138 // unconditionally include in API requests. By default, fields with 4139 // empty values are omitted from API requests. However, any non-pointer, 4140 // non-interface field appearing in ForceSendFields will be sent to the 4141 // server regardless of whether the field is empty or not. This may be 4142 // used to include empty fields in Patch requests. 4143 ForceSendFields []string `json:"-"` 4144 4145 // NullFields is a list of field names (e.g. "Agents") to include in API 4146 // requests with the JSON null value. By default, fields with empty 4147 // values are omitted from API requests. However, any field with an 4148 // empty value appearing in NullFields will be sent to the server as 4149 // null. It is an error if a field in this list has a non-empty value. 4150 // This may be used to include null fields in Patch requests. 4151 NullFields []string `json:"-"` 4152} 4153 4154func (s *GoogleCloudDialogflowV2SearchAgentsResponse) MarshalJSON() ([]byte, error) { 4155 type NoMethod GoogleCloudDialogflowV2SearchAgentsResponse 4156 raw := NoMethod(*s) 4157 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4158} 4159 4160// GoogleCloudDialogflowV2Sentiment: The sentiment, such as 4161// positive/negative feeling or association, for a unit 4162// of analysis, such as the query text. 4163type GoogleCloudDialogflowV2Sentiment struct { 4164 // Magnitude: A non-negative number in the [0, +inf) range, which 4165 // represents the absolute 4166 // magnitude of sentiment, regardless of score (positive or negative). 4167 Magnitude float64 `json:"magnitude,omitempty"` 4168 4169 // Score: Sentiment score between -1.0 (negative sentiment) and 1.0 4170 // (positive 4171 // sentiment). 4172 Score float64 `json:"score,omitempty"` 4173 4174 // ForceSendFields is a list of field names (e.g. "Magnitude") to 4175 // unconditionally include in API requests. By default, fields with 4176 // empty values are omitted from API requests. However, any non-pointer, 4177 // non-interface field appearing in ForceSendFields will be sent to the 4178 // server regardless of whether the field is empty or not. This may be 4179 // used to include empty fields in Patch requests. 4180 ForceSendFields []string `json:"-"` 4181 4182 // NullFields is a list of field names (e.g. "Magnitude") to include in 4183 // API requests with the JSON null value. By default, fields with empty 4184 // values are omitted from API requests. However, any field with an 4185 // empty value appearing in NullFields will be sent to the server as 4186 // null. It is an error if a field in this list has a non-empty value. 4187 // This may be used to include null fields in Patch requests. 4188 NullFields []string `json:"-"` 4189} 4190 4191func (s *GoogleCloudDialogflowV2Sentiment) MarshalJSON() ([]byte, error) { 4192 type NoMethod GoogleCloudDialogflowV2Sentiment 4193 raw := NoMethod(*s) 4194 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4195} 4196 4197func (s *GoogleCloudDialogflowV2Sentiment) UnmarshalJSON(data []byte) error { 4198 type NoMethod GoogleCloudDialogflowV2Sentiment 4199 var s1 struct { 4200 Magnitude gensupport.JSONFloat64 `json:"magnitude"` 4201 Score gensupport.JSONFloat64 `json:"score"` 4202 *NoMethod 4203 } 4204 s1.NoMethod = (*NoMethod)(s) 4205 if err := json.Unmarshal(data, &s1); err != nil { 4206 return err 4207 } 4208 s.Magnitude = float64(s1.Magnitude) 4209 s.Score = float64(s1.Score) 4210 return nil 4211} 4212 4213// GoogleCloudDialogflowV2SentimentAnalysisRequestConfig: Configures the 4214// types of sentiment analysis to perform. 4215type GoogleCloudDialogflowV2SentimentAnalysisRequestConfig struct { 4216 // AnalyzeQueryTextSentiment: Instructs the service to perform sentiment 4217 // analysis on 4218 // `query_text`. If not provided, sentiment analysis is not performed 4219 // on 4220 // `query_text`. 4221 AnalyzeQueryTextSentiment bool `json:"analyzeQueryTextSentiment,omitempty"` 4222 4223 // ForceSendFields is a list of field names (e.g. 4224 // "AnalyzeQueryTextSentiment") to unconditionally include in API 4225 // requests. By default, fields with empty values are omitted from API 4226 // requests. However, any non-pointer, non-interface field appearing in 4227 // ForceSendFields will be sent to the server regardless of whether the 4228 // field is empty or not. This may be used to include empty fields in 4229 // Patch requests. 4230 ForceSendFields []string `json:"-"` 4231 4232 // NullFields is a list of field names (e.g. 4233 // "AnalyzeQueryTextSentiment") to include in API requests with the JSON 4234 // null value. By default, fields with empty values are omitted from API 4235 // requests. However, any field with an empty value appearing in 4236 // NullFields will be sent to the server as null. It is an error if a 4237 // field in this list has a non-empty value. This may be used to include 4238 // null fields in Patch requests. 4239 NullFields []string `json:"-"` 4240} 4241 4242func (s *GoogleCloudDialogflowV2SentimentAnalysisRequestConfig) MarshalJSON() ([]byte, error) { 4243 type NoMethod GoogleCloudDialogflowV2SentimentAnalysisRequestConfig 4244 raw := NoMethod(*s) 4245 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4246} 4247 4248// GoogleCloudDialogflowV2SentimentAnalysisResult: The result of 4249// sentiment analysis as configured 4250// by 4251// `sentiment_analysis_request_config`. 4252type GoogleCloudDialogflowV2SentimentAnalysisResult struct { 4253 // QueryTextSentiment: The sentiment analysis result for `query_text`. 4254 QueryTextSentiment *GoogleCloudDialogflowV2Sentiment `json:"queryTextSentiment,omitempty"` 4255 4256 // ForceSendFields is a list of field names (e.g. "QueryTextSentiment") 4257 // to unconditionally include in API requests. By default, fields with 4258 // empty values are omitted from API requests. However, any non-pointer, 4259 // non-interface field appearing in ForceSendFields will be sent to the 4260 // server regardless of whether the field is empty or not. This may be 4261 // used to include empty fields in Patch requests. 4262 ForceSendFields []string `json:"-"` 4263 4264 // NullFields is a list of field names (e.g. "QueryTextSentiment") to 4265 // include in API requests with the JSON null value. By default, fields 4266 // with empty values are omitted from API requests. However, any field 4267 // with an empty value appearing in NullFields will be sent to the 4268 // server as null. It is an error if a field in this list has a 4269 // non-empty value. This may be used to include null fields in Patch 4270 // requests. 4271 NullFields []string `json:"-"` 4272} 4273 4274func (s *GoogleCloudDialogflowV2SentimentAnalysisResult) MarshalJSON() ([]byte, error) { 4275 type NoMethod GoogleCloudDialogflowV2SentimentAnalysisResult 4276 raw := NoMethod(*s) 4277 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4278} 4279 4280// GoogleCloudDialogflowV2SessionEntityType: Represents a session entity 4281// type. 4282// 4283// Extends or replaces a custom entity type at the user session level 4284// (we 4285// refer to the entity types defined at the agent level as "custom 4286// entity 4287// types"). 4288// 4289// Note: session entity types apply to all queries, regardless of the 4290// language. 4291type GoogleCloudDialogflowV2SessionEntityType struct { 4292 // Entities: Required. The collection of entities associated with this 4293 // session entity 4294 // type. 4295 Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"` 4296 4297 // EntityOverrideMode: Required. Indicates whether the additional data 4298 // should override or 4299 // supplement the custom entity type definition. 4300 // 4301 // Possible values: 4302 // "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value 4303 // should be never used. 4304 // "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session 4305 // entities overrides the collection of entities 4306 // in the corresponding custom entity type. 4307 // "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session 4308 // entities extends the collection of entities in 4309 // the corresponding custom entity type. 4310 // 4311 // Note: Even in this override mode calls to 4312 // `ListSessionEntityTypes`, 4313 // `GetSessionEntityType`, `CreateSessionEntityType` 4314 // and 4315 // `UpdateSessionEntityType` only return the additional entities added 4316 // in 4317 // this session entity type. If you want to get the supplemented 4318 // list, 4319 // please call EntityTypes.GetEntityType on the custom entity type 4320 // and merge. 4321 EntityOverrideMode string `json:"entityOverrideMode,omitempty"` 4322 4323 // Name: Required. The unique identifier of this session entity type. 4324 // Format: 4325 // `projects/<Project ID>/agent/sessions/<Session 4326 // ID>/entityTypes/<Entity Type 4327 // Display Name>`. 4328 // 4329 // `<Entity Type Display Name>` must be the display name of an existing 4330 // entity 4331 // type in the same agent that will be overridden or supplemented. 4332 Name string `json:"name,omitempty"` 4333 4334 // ServerResponse contains the HTTP response code and headers from the 4335 // server. 4336 googleapi.ServerResponse `json:"-"` 4337 4338 // ForceSendFields is a list of field names (e.g. "Entities") to 4339 // unconditionally include in API requests. By default, fields with 4340 // empty values are omitted from API requests. However, any non-pointer, 4341 // non-interface field appearing in ForceSendFields will be sent to the 4342 // server regardless of whether the field is empty or not. This may be 4343 // used to include empty fields in Patch requests. 4344 ForceSendFields []string `json:"-"` 4345 4346 // NullFields is a list of field names (e.g. "Entities") to include in 4347 // API requests with the JSON null value. By default, fields with empty 4348 // values are omitted from API requests. However, any field with an 4349 // empty value appearing in NullFields will be sent to the server as 4350 // null. It is an error if a field in this list has a non-empty value. 4351 // This may be used to include null fields in Patch requests. 4352 NullFields []string `json:"-"` 4353} 4354 4355func (s *GoogleCloudDialogflowV2SessionEntityType) MarshalJSON() ([]byte, error) { 4356 type NoMethod GoogleCloudDialogflowV2SessionEntityType 4357 raw := NoMethod(*s) 4358 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4359} 4360 4361// GoogleCloudDialogflowV2SpeechContext: Hints for the speech recognizer 4362// to help with recognition in a specific 4363// conversation state. 4364type GoogleCloudDialogflowV2SpeechContext struct { 4365 // Boost: Optional. Boost for this context compared to other contexts: 4366 // * If the boost is positive, Dialogflow will increase the probability 4367 // that 4368 // the phrases in this context are recognized over similar sounding 4369 // phrases. 4370 // * If the boost is unspecified or non-positive, Dialogflow will not 4371 // apply 4372 // any boost. 4373 // 4374 // Dialogflow recommends that you use boosts in the range (0, 20] and 4375 // that you 4376 // find a value that fits your use case with binary search. 4377 Boost float64 `json:"boost,omitempty"` 4378 4379 // Phrases: Optional. A list of strings containing words and phrases 4380 // that the speech 4381 // recognizer should recognize with higher likelihood. 4382 // 4383 // This list can be used to: 4384 // * improve accuracy for words and phrases you expect the user to say, 4385 // e.g. typical commands for your Dialogflow agent 4386 // * add additional words to the speech recognizer vocabulary 4387 // * ... 4388 // 4389 // See the [Cloud 4390 // Speech 4391 // documentation](https://cloud.google.com/speech-to-text/quotas) for 4392 // usage 4393 // limits. 4394 Phrases []string `json:"phrases,omitempty"` 4395 4396 // ForceSendFields is a list of field names (e.g. "Boost") to 4397 // unconditionally include in API requests. By default, fields with 4398 // empty values are omitted from API requests. However, any non-pointer, 4399 // non-interface field appearing in ForceSendFields will be sent to the 4400 // server regardless of whether the field is empty or not. This may be 4401 // used to include empty fields in Patch requests. 4402 ForceSendFields []string `json:"-"` 4403 4404 // NullFields is a list of field names (e.g. "Boost") to include in API 4405 // requests with the JSON null value. By default, fields with empty 4406 // values are omitted from API requests. However, any field with an 4407 // empty value appearing in NullFields will be sent to the server as 4408 // null. It is an error if a field in this list has a non-empty value. 4409 // This may be used to include null fields in Patch requests. 4410 NullFields []string `json:"-"` 4411} 4412 4413func (s *GoogleCloudDialogflowV2SpeechContext) MarshalJSON() ([]byte, error) { 4414 type NoMethod GoogleCloudDialogflowV2SpeechContext 4415 raw := NoMethod(*s) 4416 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4417} 4418 4419func (s *GoogleCloudDialogflowV2SpeechContext) UnmarshalJSON(data []byte) error { 4420 type NoMethod GoogleCloudDialogflowV2SpeechContext 4421 var s1 struct { 4422 Boost gensupport.JSONFloat64 `json:"boost"` 4423 *NoMethod 4424 } 4425 s1.NoMethod = (*NoMethod)(s) 4426 if err := json.Unmarshal(data, &s1); err != nil { 4427 return err 4428 } 4429 s.Boost = float64(s1.Boost) 4430 return nil 4431} 4432 4433// GoogleCloudDialogflowV2SynthesizeSpeechConfig: Configuration of how 4434// speech should be synthesized. 4435type GoogleCloudDialogflowV2SynthesizeSpeechConfig struct { 4436 // EffectsProfileId: Optional. An identifier which selects 'audio 4437 // effects' profiles that are 4438 // applied on (post synthesized) text to speech. Effects are applied on 4439 // top of 4440 // each other in the order they are given. 4441 EffectsProfileId []string `json:"effectsProfileId,omitempty"` 4442 4443 // Pitch: Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means 4444 // increase 20 4445 // semitones from the original pitch. -20 means decrease 20 semitones 4446 // from the 4447 // original pitch. 4448 Pitch float64 `json:"pitch,omitempty"` 4449 4450 // SpeakingRate: Optional. Speaking rate/speed, in the range [0.25, 4451 // 4.0]. 1.0 is the normal 4452 // native speed supported by the specific voice. 2.0 is twice as fast, 4453 // and 4454 // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. 4455 // Any 4456 // other values < 0.25 or > 4.0 will return an error. 4457 SpeakingRate float64 `json:"speakingRate,omitempty"` 4458 4459 // Voice: Optional. The desired voice of the synthesized audio. 4460 Voice *GoogleCloudDialogflowV2VoiceSelectionParams `json:"voice,omitempty"` 4461 4462 // VolumeGainDb: Optional. Volume gain (in dB) of the normal native 4463 // volume supported by the 4464 // specific voice, in the range [-96.0, 16.0]. If unset, or set to a 4465 // value of 4466 // 0.0 (dB), will play at normal native signal amplitude. A value of 4467 // -6.0 (dB) 4468 // will play at approximately half the amplitude of the normal native 4469 // signal 4470 // amplitude. A value of +6.0 (dB) will play at approximately twice 4471 // the 4472 // amplitude of the normal native signal amplitude. We strongly 4473 // recommend not 4474 // to exceed +10 (dB) as there's usually no effective increase in 4475 // loudness for 4476 // any value greater than that. 4477 VolumeGainDb float64 `json:"volumeGainDb,omitempty"` 4478 4479 // ForceSendFields is a list of field names (e.g. "EffectsProfileId") to 4480 // unconditionally include in API requests. By default, fields with 4481 // empty values are omitted from API requests. However, any non-pointer, 4482 // non-interface field appearing in ForceSendFields will be sent to the 4483 // server regardless of whether the field is empty or not. This may be 4484 // used to include empty fields in Patch requests. 4485 ForceSendFields []string `json:"-"` 4486 4487 // NullFields is a list of field names (e.g. "EffectsProfileId") to 4488 // include in API requests with the JSON null value. By default, fields 4489 // with empty values are omitted from API requests. However, any field 4490 // with an empty value appearing in NullFields will be sent to the 4491 // server as null. It is an error if a field in this list has a 4492 // non-empty value. This may be used to include null fields in Patch 4493 // requests. 4494 NullFields []string `json:"-"` 4495} 4496 4497func (s *GoogleCloudDialogflowV2SynthesizeSpeechConfig) MarshalJSON() ([]byte, error) { 4498 type NoMethod GoogleCloudDialogflowV2SynthesizeSpeechConfig 4499 raw := NoMethod(*s) 4500 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4501} 4502 4503func (s *GoogleCloudDialogflowV2SynthesizeSpeechConfig) UnmarshalJSON(data []byte) error { 4504 type NoMethod GoogleCloudDialogflowV2SynthesizeSpeechConfig 4505 var s1 struct { 4506 Pitch gensupport.JSONFloat64 `json:"pitch"` 4507 SpeakingRate gensupport.JSONFloat64 `json:"speakingRate"` 4508 VolumeGainDb gensupport.JSONFloat64 `json:"volumeGainDb"` 4509 *NoMethod 4510 } 4511 s1.NoMethod = (*NoMethod)(s) 4512 if err := json.Unmarshal(data, &s1); err != nil { 4513 return err 4514 } 4515 s.Pitch = float64(s1.Pitch) 4516 s.SpeakingRate = float64(s1.SpeakingRate) 4517 s.VolumeGainDb = float64(s1.VolumeGainDb) 4518 return nil 4519} 4520 4521// GoogleCloudDialogflowV2TextInput: Represents the natural language 4522// text to be processed. 4523type GoogleCloudDialogflowV2TextInput struct { 4524 // LanguageCode: Required. The language of this conversational query. 4525 // See 4526 // [Language 4527 // Support](https://cloud.google.com/dialogflow/docs/reference/ 4528 // language) 4529 // for a list of the currently supported language codes. Note that 4530 // queries in 4531 // the same session do not necessarily need to specify the same 4532 // language. 4533 LanguageCode string `json:"languageCode,omitempty"` 4534 4535 // Text: Required. The UTF-8 encoded natural language text to be 4536 // processed. 4537 // Text length must not exceed 256 characters. 4538 Text string `json:"text,omitempty"` 4539 4540 // ForceSendFields is a list of field names (e.g. "LanguageCode") to 4541 // unconditionally include in API requests. By default, fields with 4542 // empty values are omitted from API requests. However, any non-pointer, 4543 // non-interface field appearing in ForceSendFields will be sent to the 4544 // server regardless of whether the field is empty or not. This may be 4545 // used to include empty fields in Patch requests. 4546 ForceSendFields []string `json:"-"` 4547 4548 // NullFields is a list of field names (e.g. "LanguageCode") to include 4549 // in API requests with the JSON null value. By default, fields with 4550 // empty values are omitted from API requests. However, any field with 4551 // an empty value appearing in NullFields will be sent to the server as 4552 // null. It is an error if a field in this list has a non-empty value. 4553 // This may be used to include null fields in Patch requests. 4554 NullFields []string `json:"-"` 4555} 4556 4557func (s *GoogleCloudDialogflowV2TextInput) MarshalJSON() ([]byte, error) { 4558 type NoMethod GoogleCloudDialogflowV2TextInput 4559 raw := NoMethod(*s) 4560 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4561} 4562 4563// GoogleCloudDialogflowV2TrainAgentRequest: The request message for 4564// Agents.TrainAgent. 4565type GoogleCloudDialogflowV2TrainAgentRequest struct { 4566} 4567 4568// GoogleCloudDialogflowV2ValidationError: Represents a single 4569// validation error. 4570type GoogleCloudDialogflowV2ValidationError struct { 4571 // Entries: The names of the entries that the error is associated 4572 // with. 4573 // Format: 4574 // 4575 // - "projects/<Project ID>/agent", if the error is associated with the 4576 // entire 4577 // agent. 4578 // - "projects/<Project ID>/agent/intents/<Intent ID>", if the error 4579 // is 4580 // associated with certain intents. 4581 // - "projects/<Project 4582 // ID>/agent/intents/<Intent Id>/trainingPhrases/<Training Phrase ID>", 4583 // if the 4584 // error is associated with certain intent training phrases. 4585 // - "projects/<Project ID>/agent/intents/<Intent 4586 // Id>/parameters/<Parameter 4587 // ID>", if the error is associated with certain intent parameters. 4588 // - "projects/<Project ID>/agent/entities/<Entity ID>", if the error 4589 // is 4590 // associated with certain entities. 4591 Entries []string `json:"entries,omitempty"` 4592 4593 // ErrorMessage: The detailed error messsage. 4594 ErrorMessage string `json:"errorMessage,omitempty"` 4595 4596 // Severity: The severity of the error. 4597 // 4598 // Possible values: 4599 // "SEVERITY_UNSPECIFIED" - Not specified. This value should never be 4600 // used. 4601 // "INFO" - The agent doesn't follow Dialogflow best practicies. 4602 // "WARNING" - The agent may not behave as expected. 4603 // "ERROR" - The agent may experience partial failures. 4604 // "CRITICAL" - The agent may completely fail. 4605 Severity string `json:"severity,omitempty"` 4606 4607 // ForceSendFields is a list of field names (e.g. "Entries") to 4608 // unconditionally include in API requests. By default, fields with 4609 // empty values are omitted from API requests. However, any non-pointer, 4610 // non-interface field appearing in ForceSendFields will be sent to the 4611 // server regardless of whether the field is empty or not. This may be 4612 // used to include empty fields in Patch requests. 4613 ForceSendFields []string `json:"-"` 4614 4615 // NullFields is a list of field names (e.g. "Entries") to include in 4616 // API requests with the JSON null value. By default, fields with empty 4617 // values are omitted from API requests. However, any field with an 4618 // empty value appearing in NullFields will be sent to the server as 4619 // null. It is an error if a field in this list has a non-empty value. 4620 // This may be used to include null fields in Patch requests. 4621 NullFields []string `json:"-"` 4622} 4623 4624func (s *GoogleCloudDialogflowV2ValidationError) MarshalJSON() ([]byte, error) { 4625 type NoMethod GoogleCloudDialogflowV2ValidationError 4626 raw := NoMethod(*s) 4627 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4628} 4629 4630// GoogleCloudDialogflowV2ValidationResult: Represents the output of 4631// agent validation. 4632type GoogleCloudDialogflowV2ValidationResult struct { 4633 // ValidationErrors: Contains all validation errors. 4634 ValidationErrors []*GoogleCloudDialogflowV2ValidationError `json:"validationErrors,omitempty"` 4635 4636 // ServerResponse contains the HTTP response code and headers from the 4637 // server. 4638 googleapi.ServerResponse `json:"-"` 4639 4640 // ForceSendFields is a list of field names (e.g. "ValidationErrors") to 4641 // unconditionally include in API requests. By default, fields with 4642 // empty values are omitted from API requests. However, any non-pointer, 4643 // non-interface field appearing in ForceSendFields will be sent to the 4644 // server regardless of whether the field is empty or not. This may be 4645 // used to include empty fields in Patch requests. 4646 ForceSendFields []string `json:"-"` 4647 4648 // NullFields is a list of field names (e.g. "ValidationErrors") to 4649 // include in API requests with the JSON null value. By default, fields 4650 // with empty values are omitted from API requests. However, any field 4651 // with an empty value appearing in NullFields will be sent to the 4652 // server as null. It is an error if a field in this list has a 4653 // non-empty value. This may be used to include null fields in Patch 4654 // requests. 4655 NullFields []string `json:"-"` 4656} 4657 4658func (s *GoogleCloudDialogflowV2ValidationResult) MarshalJSON() ([]byte, error) { 4659 type NoMethod GoogleCloudDialogflowV2ValidationResult 4660 raw := NoMethod(*s) 4661 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4662} 4663 4664// GoogleCloudDialogflowV2VoiceSelectionParams: Description of which 4665// voice to use for speech synthesis. 4666type GoogleCloudDialogflowV2VoiceSelectionParams struct { 4667 // Name: Optional. The name of the voice. If not set, the service will 4668 // choose a 4669 // voice based on the other parameters such as language_code 4670 // and 4671 // ssml_gender. 4672 Name string `json:"name,omitempty"` 4673 4674 // SsmlGender: Optional. The preferred gender of the voice. If not set, 4675 // the service will 4676 // choose a voice based on the other parameters such as language_code 4677 // and 4678 // name. Note that this is only a preference, not requirement. If 4679 // a 4680 // voice of the appropriate gender is not available, the synthesizer 4681 // should 4682 // substitute a voice with a different gender rather than failing the 4683 // request. 4684 // 4685 // Possible values: 4686 // "SSML_VOICE_GENDER_UNSPECIFIED" - An unspecified gender, which 4687 // means that the client doesn't care which 4688 // gender the selected voice will have. 4689 // "SSML_VOICE_GENDER_MALE" - A male voice. 4690 // "SSML_VOICE_GENDER_FEMALE" - A female voice. 4691 // "SSML_VOICE_GENDER_NEUTRAL" - A gender-neutral voice. 4692 SsmlGender string `json:"ssmlGender,omitempty"` 4693 4694 // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") to include in API 4703 // requests with the JSON null value. By default, fields with empty 4704 // values are omitted from API requests. However, any field with an 4705 // empty value appearing in NullFields will be sent to the server as 4706 // null. It is an error if a field in this list has a non-empty value. 4707 // This may be used to include null fields in Patch requests. 4708 NullFields []string `json:"-"` 4709} 4710 4711func (s *GoogleCloudDialogflowV2VoiceSelectionParams) MarshalJSON() ([]byte, error) { 4712 type NoMethod GoogleCloudDialogflowV2VoiceSelectionParams 4713 raw := NoMethod(*s) 4714 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4715} 4716 4717// GoogleCloudDialogflowV2WebhookRequest: The request message for a 4718// webhook call. 4719type GoogleCloudDialogflowV2WebhookRequest struct { 4720 // OriginalDetectIntentRequest: Optional. The contents of the original 4721 // request that was passed to 4722 // `[Streaming]DetectIntent` call. 4723 OriginalDetectIntentRequest *GoogleCloudDialogflowV2OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"` 4724 4725 // QueryResult: The result of the conversational query or event 4726 // processing. Contains the 4727 // same value as `[Streaming]DetectIntentResponse.query_result`. 4728 QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"` 4729 4730 // ResponseId: The unique identifier of the response. Contains the same 4731 // value as 4732 // `[Streaming]DetectIntentResponse.response_id`. 4733 ResponseId string `json:"responseId,omitempty"` 4734 4735 // Session: The unique identifier of detectIntent request session. 4736 // Can be used to identify end-user inside webhook 4737 // implementation. 4738 // Format: `projects/<Project ID>/agent/sessions/<Session ID>`, 4739 // or 4740 // `projects/<Project ID>/agent/environments/<Environment 4741 // ID>/users/<User 4742 // ID>/sessions/<Session ID>`. 4743 Session string `json:"session,omitempty"` 4744 4745 // ForceSendFields is a list of field names (e.g. 4746 // "OriginalDetectIntentRequest") to unconditionally include in API 4747 // requests. By default, fields with empty values are omitted from API 4748 // requests. However, any non-pointer, non-interface field appearing in 4749 // ForceSendFields will be sent to the server regardless of whether the 4750 // field is empty or not. This may be used to include empty fields in 4751 // Patch requests. 4752 ForceSendFields []string `json:"-"` 4753 4754 // NullFields is a list of field names (e.g. 4755 // "OriginalDetectIntentRequest") to include in API requests with the 4756 // JSON null value. By default, fields with empty values are omitted 4757 // from API requests. However, any field with an empty value appearing 4758 // in NullFields will be sent to the server as null. It is an error if a 4759 // field in this list has a non-empty value. This may be used to include 4760 // null fields in Patch requests. 4761 NullFields []string `json:"-"` 4762} 4763 4764func (s *GoogleCloudDialogflowV2WebhookRequest) MarshalJSON() ([]byte, error) { 4765 type NoMethod GoogleCloudDialogflowV2WebhookRequest 4766 raw := NoMethod(*s) 4767 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4768} 4769 4770// GoogleCloudDialogflowV2WebhookResponse: The response message for a 4771// webhook call. 4772// 4773// This response is validated by the Dialogflow server. If validation 4774// fails, 4775// an error will be returned in the QueryResult.diagnostic_info 4776// field. 4777// Setting JSON fields to an empty value with the wrong type is a common 4778// error. 4779// To avoid this error: 4780// 4781// - Use "" for empty strings 4782// - Use `{}` or `null` for empty objects 4783// - Use `[]` or `null` for empty arrays 4784// 4785// For more information, see the 4786// [Protocol Buffers 4787// Language 4788// Guide](https://developers.google.com/protocol-buffers/docs/pr 4789// oto3#json). 4790type GoogleCloudDialogflowV2WebhookResponse struct { 4791 // FollowupEventInput: Optional. Makes the platform immediately invoke 4792 // another `DetectIntent` call 4793 // internally with the specified event as input. 4794 // When this field is set, Dialogflow ignores the 4795 // `fulfillment_text`, 4796 // `fulfillment_messages`, and `payload` fields. 4797 FollowupEventInput *GoogleCloudDialogflowV2EventInput `json:"followupEventInput,omitempty"` 4798 4799 // FulfillmentMessages: Optional. The collection of rich messages to 4800 // present to the user. This 4801 // value is passed directly to `QueryResult.fulfillment_messages`. 4802 FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"` 4803 4804 // FulfillmentText: Optional. The text to be shown on the screen. This 4805 // value is passed directly 4806 // to `QueryResult.fulfillment_text`. 4807 FulfillmentText string `json:"fulfillmentText,omitempty"` 4808 4809 // OutputContexts: Optional. The collection of output contexts. This 4810 // value is passed directly 4811 // to `QueryResult.output_contexts`. 4812 OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"` 4813 4814 // Payload: Optional. This value is passed directly to 4815 // `QueryResult.webhook_payload`. 4816 // See the related `fulfillment_messages[i].payload field`, which may be 4817 // used 4818 // as an alternative to this field. 4819 // 4820 // This field can be used for Actions on Google responses. 4821 // It should have a structure similar to the JSON message shown here. 4822 // For more 4823 // information, see 4824 // [Actions on Google 4825 // Webhook 4826 // Format](https://developers.google.com/actions/dialogflow/webho 4827 // ok) 4828 // <pre>{ 4829 // "google": { 4830 // "expectUserResponse": true, 4831 // "richResponse": { 4832 // "items": [ 4833 // { 4834 // "simpleResponse": { 4835 // "textToSpeech": "this is a simple response" 4836 // } 4837 // } 4838 // ] 4839 // } 4840 // } 4841 // }</pre> 4842 Payload googleapi.RawMessage `json:"payload,omitempty"` 4843 4844 // SessionEntityTypes: Optional. Additional session entity types to 4845 // replace or extend developer 4846 // entity types with. The entity synonyms apply to all languages and 4847 // persist 4848 // for the session of this query. Setting the session entity types 4849 // inside 4850 // webhook overwrites the session entity types that have been set 4851 // through 4852 // `DetectIntentRequest.query_params.session_entity_types`. 4853 SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"` 4854 4855 // Source: Optional. This value is passed directly to 4856 // `QueryResult.webhook_source`. 4857 Source string `json:"source,omitempty"` 4858 4859 // ForceSendFields is a list of field names (e.g. "FollowupEventInput") 4860 // to unconditionally include in API requests. By default, fields with 4861 // empty values are omitted from API requests. However, any non-pointer, 4862 // non-interface field appearing in ForceSendFields will be sent to the 4863 // server regardless of whether the field is empty or not. This may be 4864 // used to include empty fields in Patch requests. 4865 ForceSendFields []string `json:"-"` 4866 4867 // NullFields is a list of field names (e.g. "FollowupEventInput") to 4868 // include in API requests with the JSON null value. By default, fields 4869 // with empty values are omitted from API requests. However, any field 4870 // with an empty value appearing in NullFields will be sent to the 4871 // server as null. It is an error if a field in this list has a 4872 // non-empty value. This may be used to include null fields in Patch 4873 // requests. 4874 NullFields []string `json:"-"` 4875} 4876 4877func (s *GoogleCloudDialogflowV2WebhookResponse) MarshalJSON() ([]byte, error) { 4878 type NoMethod GoogleCloudDialogflowV2WebhookResponse 4879 raw := NoMethod(*s) 4880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4881} 4882 4883// GoogleCloudDialogflowV2beta1AnnotatedConversationDataset: Represents 4884// an annotated conversation dataset. 4885// ConversationDataset can have multiple AnnotatedConversationDataset, 4886// each of 4887// them represents one result from one annotation 4888// task. 4889// AnnotatedConversationDataset can only be generated from annotation 4890// task, 4891// which will be triggered by LabelConversation. 4892type GoogleCloudDialogflowV2beta1AnnotatedConversationDataset struct { 4893 // CompletedExampleCount: Output only. Number of examples that have 4894 // annotations in the annotated 4895 // conversation dataset. 4896 CompletedExampleCount int64 `json:"completedExampleCount,omitempty,string"` 4897 4898 // CreateTime: Output only. Creation time of this annotated conversation 4899 // dataset. 4900 CreateTime string `json:"createTime,omitempty"` 4901 4902 // Description: Optional. The description of the annotated conversation 4903 // dataset. 4904 // Maximum of 10000 bytes. 4905 Description string `json:"description,omitempty"` 4906 4907 // DisplayName: Required. The display name of the annotated conversation 4908 // dataset. 4909 // It's specified when user starts an annotation task. Maximum of 64 4910 // bytes. 4911 DisplayName string `json:"displayName,omitempty"` 4912 4913 // ExampleCount: Output only. Number of examples in the annotated 4914 // conversation dataset. 4915 ExampleCount int64 `json:"exampleCount,omitempty,string"` 4916 4917 // Name: Output only. AnnotatedConversationDataset resource name. 4918 // Format: 4919 // `projects/<Project ID>/conversationDatasets/<Conversation 4920 // Dataset 4921 // ID>/annotatedConversationDatasets/<Annotated Conversation Dataset 4922 // ID>` 4923 Name string `json:"name,omitempty"` 4924 4925 // QuestionTypeName: Output only. Question type name that identifies a 4926 // labeling task. 4927 // A question is a single task that a worker answers. A question type is 4928 // set 4929 // of related questions. Each question belongs to a particular question 4930 // type. 4931 // It can be used in CrowdCompute UI to filter and manage labeling 4932 // tasks. 4933 QuestionTypeName string `json:"questionTypeName,omitempty"` 4934 4935 // ForceSendFields is a list of field names (e.g. 4936 // "CompletedExampleCount") to unconditionally include in API requests. 4937 // By default, fields with empty values are omitted from API requests. 4938 // However, any non-pointer, non-interface field appearing in 4939 // ForceSendFields will be sent to the server regardless of whether the 4940 // field is empty or not. This may be used to include empty fields in 4941 // Patch requests. 4942 ForceSendFields []string `json:"-"` 4943 4944 // NullFields is a list of field names (e.g. "CompletedExampleCount") to 4945 // include in API requests with the JSON null value. By default, fields 4946 // with empty values are omitted from API requests. However, any field 4947 // with an empty value appearing in NullFields will be sent to the 4948 // server as null. It is an error if a field in this list has a 4949 // non-empty value. This may be used to include null fields in Patch 4950 // requests. 4951 NullFields []string `json:"-"` 4952} 4953 4954func (s *GoogleCloudDialogflowV2beta1AnnotatedConversationDataset) MarshalJSON() ([]byte, error) { 4955 type NoMethod GoogleCloudDialogflowV2beta1AnnotatedConversationDataset 4956 raw := NoMethod(*s) 4957 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4958} 4959 4960// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse: The 4961// response message for EntityTypes.BatchUpdateEntityTypes. 4962type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse struct { 4963 // EntityTypes: The collection of updated or created entity types. 4964 EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"` 4965 4966 // ForceSendFields is a list of field names (e.g. "EntityTypes") to 4967 // unconditionally include in API requests. By default, fields with 4968 // empty values are omitted from API requests. However, any non-pointer, 4969 // non-interface field appearing in ForceSendFields will be sent to the 4970 // server regardless of whether the field is empty or not. This may be 4971 // used to include empty fields in Patch requests. 4972 ForceSendFields []string `json:"-"` 4973 4974 // NullFields is a list of field names (e.g. "EntityTypes") to include 4975 // in API requests with the JSON null value. By default, fields with 4976 // empty values are omitted from API requests. However, any field with 4977 // an empty value appearing in NullFields will be sent to the server as 4978 // null. It is an error if a field in this list has a non-empty value. 4979 // This may be used to include null fields in Patch requests. 4980 NullFields []string `json:"-"` 4981} 4982 4983func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) { 4984 type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse 4985 raw := NoMethod(*s) 4986 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4987} 4988 4989// GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse: The response 4990// message for Intents.BatchUpdateIntents. 4991type GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse struct { 4992 // Intents: The collection of updated or created intents. 4993 Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"` 4994 4995 // ForceSendFields is a list of field names (e.g. "Intents") to 4996 // unconditionally include in API requests. By default, fields with 4997 // empty values are omitted from API requests. However, any non-pointer, 4998 // non-interface field appearing in ForceSendFields will be sent to the 4999 // server regardless of whether the field is empty or not. This may be 5000 // used to include empty fields in Patch requests. 5001 ForceSendFields []string `json:"-"` 5002 5003 // NullFields is a list of field names (e.g. "Intents") to include in 5004 // API requests with the JSON null value. By default, fields with empty 5005 // values are omitted from API requests. However, any field with an 5006 // empty value appearing in NullFields will be sent to the server as 5007 // null. It is an error if a field in this list has a non-empty value. 5008 // This may be used to include null fields in Patch requests. 5009 NullFields []string `json:"-"` 5010} 5011 5012func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) { 5013 type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse 5014 raw := NoMethod(*s) 5015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5016} 5017 5018// GoogleCloudDialogflowV2beta1Context: Represents a context. 5019type GoogleCloudDialogflowV2beta1Context struct { 5020 // LifespanCount: Optional. The number of conversational query requests 5021 // after which the 5022 // context expires. If set to `0` (the default) the context 5023 // expires 5024 // immediately. Contexts expire automatically after 20 minutes if 5025 // there 5026 // are no matching queries. 5027 LifespanCount int64 `json:"lifespanCount,omitempty"` 5028 5029 // Name: Required. The unique identifier of the context. 5030 // Format: 5031 // `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context 5032 // ID>`, 5033 // or `projects/<Project ID>/agent/environments/<Environment 5034 // ID>/users/<User 5035 // ID>/sessions/<Session ID>/contexts/<Context ID>`. 5036 // 5037 // The `Context ID` is always converted to lowercase, may only 5038 // contain 5039 // characters in a-zA-Z0-9_-% and may be at most 250 bytes long. 5040 // 5041 // If `Environment ID` is not specified, we assume default 5042 // 'draft' 5043 // environment. If `User ID` is not specified, we assume default '-' 5044 // user. 5045 // 5046 // The following context names are reserved for internal use by 5047 // Dialogflow. 5048 // You should not use these contexts or create contexts with these 5049 // names: 5050 // 5051 // * `__system_counters__` 5052 // * `*_id_dialog_context` 5053 // * `*_dialog_params_size` 5054 Name string `json:"name,omitempty"` 5055 5056 // Parameters: Optional. The collection of parameters associated with 5057 // this context. 5058 // Refer to 5059 // [this 5060 // doc](https://cloud.google.com/dialogflow/docs/intents-actions-pa 5061 // rameters) 5062 // for syntax. 5063 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 5064 5065 // ForceSendFields is a list of field names (e.g. "LifespanCount") to 5066 // unconditionally include in API requests. By default, fields with 5067 // empty values are omitted from API requests. However, any non-pointer, 5068 // non-interface field appearing in ForceSendFields will be sent to the 5069 // server regardless of whether the field is empty or not. This may be 5070 // used to include empty fields in Patch requests. 5071 ForceSendFields []string `json:"-"` 5072 5073 // NullFields is a list of field names (e.g. "LifespanCount") to include 5074 // in API requests with the JSON null value. By default, fields with 5075 // empty values are omitted from API requests. However, any field with 5076 // an empty value appearing in NullFields will be sent to the server as 5077 // null. It is an error if a field in this list has a non-empty value. 5078 // This may be used to include null fields in Patch requests. 5079 NullFields []string `json:"-"` 5080} 5081 5082func (s *GoogleCloudDialogflowV2beta1Context) MarshalJSON() ([]byte, error) { 5083 type NoMethod GoogleCloudDialogflowV2beta1Context 5084 raw := NoMethod(*s) 5085 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5086} 5087 5088// GoogleCloudDialogflowV2beta1EntityType: Represents an entity 5089// type. 5090// Entity types serve as a tool for extracting parameter values from 5091// natural 5092// language queries. 5093type GoogleCloudDialogflowV2beta1EntityType struct { 5094 // AutoExpansionMode: Optional. Indicates whether the entity type can be 5095 // automatically 5096 // expanded. 5097 // 5098 // Possible values: 5099 // "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the 5100 // entity. 5101 // "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values 5102 // that have not been explicitly 5103 // listed in the entity. 5104 AutoExpansionMode string `json:"autoExpansionMode,omitempty"` 5105 5106 // DisplayName: Required. The name of the entity type. 5107 DisplayName string `json:"displayName,omitempty"` 5108 5109 // EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction 5110 // during classification. 5111 EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"` 5112 5113 // Entities: Optional. The collection of entity entries associated with 5114 // the entity type. 5115 Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"` 5116 5117 // Kind: Required. Indicates the kind of entity type. 5118 // 5119 // Possible values: 5120 // "KIND_UNSPECIFIED" - Not specified. This value should be never 5121 // used. 5122 // "KIND_MAP" - Map entity types allow mapping of a group of synonyms 5123 // to a reference 5124 // value. 5125 // "KIND_LIST" - List entity types contain a set of entries that do 5126 // not map to reference 5127 // values. However, list entity types can contain references to other 5128 // entity 5129 // types (with or without aliases). 5130 // "KIND_REGEXP" - Regexp entity types allow to specify regular 5131 // expressions in entries 5132 // values. 5133 Kind string `json:"kind,omitempty"` 5134 5135 // Name: The unique identifier of the entity type. 5136 // Required for EntityTypes.UpdateEntityType 5137 // and 5138 // EntityTypes.BatchUpdateEntityTypes methods. 5139 // Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. 5140 Name string `json:"name,omitempty"` 5141 5142 // ForceSendFields is a list of field names (e.g. "AutoExpansionMode") 5143 // to unconditionally include in API requests. By default, fields with 5144 // empty values are omitted from API requests. However, any non-pointer, 5145 // non-interface field appearing in ForceSendFields will be sent to the 5146 // server regardless of whether the field is empty or not. This may be 5147 // used to include empty fields in Patch requests. 5148 ForceSendFields []string `json:"-"` 5149 5150 // NullFields is a list of field names (e.g. "AutoExpansionMode") to 5151 // include in API requests with the JSON null value. By default, fields 5152 // with empty values are omitted from API requests. However, any field 5153 // with an empty value appearing in NullFields will be sent to the 5154 // server as null. It is an error if a field in this list has a 5155 // non-empty value. This may be used to include null fields in Patch 5156 // requests. 5157 NullFields []string `json:"-"` 5158} 5159 5160func (s *GoogleCloudDialogflowV2beta1EntityType) MarshalJSON() ([]byte, error) { 5161 type NoMethod GoogleCloudDialogflowV2beta1EntityType 5162 raw := NoMethod(*s) 5163 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5164} 5165 5166// GoogleCloudDialogflowV2beta1EntityTypeEntity: An **entity entry** for 5167// an associated entity type. 5168type GoogleCloudDialogflowV2beta1EntityTypeEntity struct { 5169 // Synonyms: Required. A collection of value synonyms. For example, if 5170 // the entity type 5171 // is *vegetable*, and `value` is *scallions*, a synonym could be 5172 // *green 5173 // onions*. 5174 // 5175 // For `KIND_LIST` entity types: 5176 // 5177 // * This collection must contain exactly one synonym equal to 5178 // `value`. 5179 Synonyms []string `json:"synonyms,omitempty"` 5180 5181 // Value: Required. The primary value associated with this entity 5182 // entry. 5183 // For example, if the entity type is *vegetable*, the value could 5184 // be 5185 // *scallions*. 5186 // 5187 // For `KIND_MAP` entity types: 5188 // 5189 // * A reference value to be used in place of synonyms. 5190 // 5191 // For `KIND_LIST` entity types: 5192 // 5193 // * A string that can contain references to other entity types (with 5194 // or 5195 // without aliases). 5196 Value string `json:"value,omitempty"` 5197 5198 // ForceSendFields is a list of field names (e.g. "Synonyms") to 5199 // unconditionally include in API requests. By default, fields with 5200 // empty values are omitted from API requests. However, any non-pointer, 5201 // non-interface field appearing in ForceSendFields will be sent to the 5202 // server regardless of whether the field is empty or not. This may be 5203 // used to include empty fields in Patch requests. 5204 ForceSendFields []string `json:"-"` 5205 5206 // NullFields is a list of field names (e.g. "Synonyms") to include in 5207 // API requests with the JSON null value. By default, fields with empty 5208 // values are omitted from API requests. However, any field with an 5209 // empty value appearing in NullFields will be sent to the server as 5210 // null. It is an error if a field in this list has a non-empty value. 5211 // This may be used to include null fields in Patch requests. 5212 NullFields []string `json:"-"` 5213} 5214 5215func (s *GoogleCloudDialogflowV2beta1EntityTypeEntity) MarshalJSON() ([]byte, error) { 5216 type NoMethod GoogleCloudDialogflowV2beta1EntityTypeEntity 5217 raw := NoMethod(*s) 5218 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5219} 5220 5221// GoogleCloudDialogflowV2beta1EventInput: Events allow for matching 5222// intents by event name instead of the natural 5223// language input. For instance, input `<event: { name: 5224// "welcome_event", 5225// parameters: { name: "Sam" } }>` can trigger a personalized welcome 5226// response. 5227// The parameter `name` may be used by the agent in the 5228// response: 5229// "Hello #welcome_event.name! What can I do for you today?". 5230type GoogleCloudDialogflowV2beta1EventInput struct { 5231 // LanguageCode: Required. The language of this query. See 5232 // [Language 5233 // Support](https://cloud.google.com/dialogflow/docs/reference/ 5234 // language) 5235 // for a list of the currently supported language codes. Note that 5236 // queries in 5237 // the same session do not necessarily need to specify the same 5238 // language. 5239 LanguageCode string `json:"languageCode,omitempty"` 5240 5241 // Name: Required. The unique identifier of the event. 5242 Name string `json:"name,omitempty"` 5243 5244 // Parameters: The collection of parameters associated with the event. 5245 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 5246 5247 // ForceSendFields is a list of field names (e.g. "LanguageCode") to 5248 // unconditionally include in API requests. By default, fields with 5249 // empty values are omitted from API requests. However, any non-pointer, 5250 // non-interface field appearing in ForceSendFields will be sent to the 5251 // server regardless of whether the field is empty or not. This may be 5252 // used to include empty fields in Patch requests. 5253 ForceSendFields []string `json:"-"` 5254 5255 // NullFields is a list of field names (e.g. "LanguageCode") to include 5256 // in API requests with the JSON null value. By default, fields with 5257 // empty values are omitted from API requests. However, any field with 5258 // an empty value appearing in NullFields will be sent to the server as 5259 // null. It is an error if a field in this list has a non-empty value. 5260 // This may be used to include null fields in Patch requests. 5261 NullFields []string `json:"-"` 5262} 5263 5264func (s *GoogleCloudDialogflowV2beta1EventInput) MarshalJSON() ([]byte, error) { 5265 type NoMethod GoogleCloudDialogflowV2beta1EventInput 5266 raw := NoMethod(*s) 5267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5268} 5269 5270// GoogleCloudDialogflowV2beta1ExportAgentResponse: The response message 5271// for Agents.ExportAgent. 5272type GoogleCloudDialogflowV2beta1ExportAgentResponse struct { 5273 // AgentContent: Zip compressed raw byte content for agent. 5274 AgentContent string `json:"agentContent,omitempty"` 5275 5276 // AgentUri: The URI to a file containing the exported agent. This field 5277 // is populated 5278 // only if `agent_uri` is specified in `ExportAgentRequest`. 5279 AgentUri string `json:"agentUri,omitempty"` 5280 5281 // ForceSendFields is a list of field names (e.g. "AgentContent") to 5282 // unconditionally include in API requests. By default, fields with 5283 // empty values are omitted from API requests. However, any non-pointer, 5284 // non-interface field appearing in ForceSendFields will be sent to the 5285 // server regardless of whether the field is empty or not. This may be 5286 // used to include empty fields in Patch requests. 5287 ForceSendFields []string `json:"-"` 5288 5289 // NullFields is a list of field names (e.g. "AgentContent") to include 5290 // in API requests with the JSON null value. By default, fields with 5291 // empty values are omitted from API requests. However, any field with 5292 // an empty value appearing in NullFields will be sent to the server as 5293 // null. It is an error if a field in this list has a non-empty value. 5294 // This may be used to include null fields in Patch requests. 5295 NullFields []string `json:"-"` 5296} 5297 5298func (s *GoogleCloudDialogflowV2beta1ExportAgentResponse) MarshalJSON() ([]byte, error) { 5299 type NoMethod GoogleCloudDialogflowV2beta1ExportAgentResponse 5300 raw := NoMethod(*s) 5301 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5302} 5303 5304// GoogleCloudDialogflowV2beta1Intent: Represents an intent. 5305// Intents convert a number of user expressions or patterns into an 5306// action. An 5307// action is an extraction of a user command or sentence semantics. 5308type GoogleCloudDialogflowV2beta1Intent struct { 5309 // Action: Optional. The name of the action associated with the 5310 // intent. 5311 // Note: The action name must not contain whitespaces. 5312 Action string `json:"action,omitempty"` 5313 5314 // DefaultResponsePlatforms: Optional. The list of platforms for which 5315 // the first responses will be 5316 // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default 5317 // platform). 5318 // 5319 // Possible values: 5320 // "PLATFORM_UNSPECIFIED" - Not specified. 5321 // "FACEBOOK" - Facebook. 5322 // "SLACK" - Slack. 5323 // "TELEGRAM" - Telegram. 5324 // "KIK" - Kik. 5325 // "SKYPE" - Skype. 5326 // "LINE" - Line. 5327 // "VIBER" - Viber. 5328 // "ACTIONS_ON_GOOGLE" - Actions on Google. 5329 // When using Actions on Google, you can choose one of the 5330 // specific 5331 // Intent.Message types that mention support for Actions on Google, 5332 // or you can use the advanced Intent.Message.payload field. 5333 // The payload field provides access to AoG features not available in 5334 // the 5335 // specific message types. 5336 // If using the Intent.Message.payload field, it should have a 5337 // structure 5338 // similar to the JSON message shown here. For more information, 5339 // see 5340 // [Actions on Google 5341 // Webhook 5342 // Format](https://developers.google.com/actions/dialogflow/webho 5343 // ok) 5344 // <pre>{ 5345 // "expectUserResponse": true, 5346 // "isSsml": false, 5347 // "noInputPrompts": [], 5348 // "richResponse": { 5349 // "items": [ 5350 // { 5351 // "simpleResponse": { 5352 // "displayText": "hi", 5353 // "textToSpeech": "hello" 5354 // } 5355 // } 5356 // ], 5357 // "suggestions": [ 5358 // { 5359 // "title": "Say this" 5360 // }, 5361 // { 5362 // "title": "or this" 5363 // } 5364 // ] 5365 // }, 5366 // "systemIntent": { 5367 // "data": { 5368 // "@type": 5369 // "type.googleapis.com/google.actions.v2.OptionValueSpec", 5370 // "listSelect": { 5371 // "items": [ 5372 // { 5373 // "optionInfo": { 5374 // "key": "key1", 5375 // "synonyms": [ 5376 // "key one" 5377 // ] 5378 // }, 5379 // "title": "must not be empty, but unique" 5380 // }, 5381 // { 5382 // "optionInfo": { 5383 // "key": "key2", 5384 // "synonyms": [ 5385 // "key two" 5386 // ] 5387 // }, 5388 // "title": "must not be empty, but unique" 5389 // } 5390 // ] 5391 // } 5392 // }, 5393 // "intent": "actions.intent.OPTION" 5394 // } 5395 // }</pre> 5396 // "TELEPHONY" - Telephony Gateway. 5397 // "GOOGLE_HANGOUTS" - Google Hangouts. 5398 DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"` 5399 5400 // DisplayName: Required. The name of this intent. 5401 DisplayName string `json:"displayName,omitempty"` 5402 5403 // EndInteraction: Optional. Indicates that this intent ends an 5404 // interaction. Some integrations 5405 // (e.g., Actions on Google or Dialogflow phone gateway) use this 5406 // information 5407 // to close interaction with an end user. Default is false. 5408 EndInteraction bool `json:"endInteraction,omitempty"` 5409 5410 // Events: Optional. The collection of event names that trigger the 5411 // intent. 5412 // If the collection of input contexts is not empty, all of the contexts 5413 // must 5414 // be present in the active user session for an event to trigger this 5415 // intent. 5416 Events []string `json:"events,omitempty"` 5417 5418 // FollowupIntentInfo: Read-only. Information about all followup intents 5419 // that have this intent as 5420 // a direct or indirect parent. We populate this field only in the 5421 // output. 5422 FollowupIntentInfo []*GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"` 5423 5424 // InputContextNames: Optional. The list of context names required for 5425 // this intent to be 5426 // triggered. 5427 // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context 5428 // ID>`. 5429 InputContextNames []string `json:"inputContextNames,omitempty"` 5430 5431 // IsFallback: Optional. Indicates whether this is a fallback intent. 5432 IsFallback bool `json:"isFallback,omitempty"` 5433 5434 // Messages: Optional. The collection of rich messages corresponding to 5435 // the 5436 // `Response` field in the Dialogflow console. 5437 Messages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"messages,omitempty"` 5438 5439 // MlDisabled: Optional. Indicates whether Machine Learning is disabled 5440 // for the intent. 5441 // Note: If `ml_disabled` setting is set to true, then this intent is 5442 // not 5443 // taken into account during inference in `ML ONLY` match mode. 5444 // Also, 5445 // auto-markup in the UI is turned off. 5446 MlDisabled bool `json:"mlDisabled,omitempty"` 5447 5448 // MlEnabled: Optional. Indicates whether Machine Learning is enabled 5449 // for the intent. 5450 // Note: If `ml_enabled` setting is set to false, then this intent is 5451 // not 5452 // taken into account during inference in `ML ONLY` match mode. 5453 // Also, 5454 // auto-markup in the UI is turned off. 5455 // DEPRECATED! Please use `ml_disabled` field instead. 5456 // NOTE: If both `ml_enabled` and `ml_disabled` are either not set or 5457 // false, 5458 // then the default value is determined as follows: 5459 // - Before April 15th, 2018 the default is: 5460 // ml_enabled = false / ml_disabled = true. 5461 // - After April 15th, 2018 the default is: 5462 // ml_enabled = true / ml_disabled = false. 5463 MlEnabled bool `json:"mlEnabled,omitempty"` 5464 5465 // Name: The unique identifier of this intent. 5466 // Required for Intents.UpdateIntent and 5467 // Intents.BatchUpdateIntents 5468 // methods. 5469 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 5470 Name string `json:"name,omitempty"` 5471 5472 // OutputContexts: Optional. The collection of contexts that are 5473 // activated when the intent 5474 // is matched. Context messages in this collection should not set 5475 // the 5476 // parameters field. Setting the `lifespan_count` to 0 will reset the 5477 // context 5478 // when the intent is matched. 5479 // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context 5480 // ID>`. 5481 OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"` 5482 5483 // Parameters: Optional. The collection of parameters associated with 5484 // the intent. 5485 Parameters []*GoogleCloudDialogflowV2beta1IntentParameter `json:"parameters,omitempty"` 5486 5487 // ParentFollowupIntentName: Read-only after creation. The unique 5488 // identifier of the parent intent in the 5489 // chain of followup intents. You can set this field when creating an 5490 // intent, 5491 // for example with CreateIntent or 5492 // BatchUpdateIntents, in order to make this 5493 // intent a followup intent. 5494 // 5495 // It identifies the parent followup intent. 5496 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 5497 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 5498 5499 // Priority: The priority of this intent. Higher numbers represent 5500 // higher 5501 // priorities. 5502 // 5503 // - If the supplied value is unspecified or 0, the service 5504 // translates the value to 500,000, which corresponds to the 5505 // `Normal` priority in the console. 5506 // - If the supplied value is negative, the intent is ignored 5507 // in runtime detect intent requests. 5508 Priority int64 `json:"priority,omitempty"` 5509 5510 // ResetContexts: Optional. Indicates whether to delete all contexts in 5511 // the current 5512 // session when this intent is matched. 5513 ResetContexts bool `json:"resetContexts,omitempty"` 5514 5515 // RootFollowupIntentName: Read-only. The unique identifier of the root 5516 // intent in the chain of 5517 // followup intents. It identifies the correct followup intents chain 5518 // for 5519 // this intent. We populate this field only in the output. 5520 // 5521 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 5522 RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"` 5523 5524 // TrainingPhrases: Optional. The collection of examples that the agent 5525 // is 5526 // trained on. 5527 TrainingPhrases []*GoogleCloudDialogflowV2beta1IntentTrainingPhrase `json:"trainingPhrases,omitempty"` 5528 5529 // WebhookState: Optional. Indicates whether webhooks are enabled for 5530 // the intent. 5531 // 5532 // Possible values: 5533 // "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and 5534 // in the intent. 5535 // "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in 5536 // the intent. 5537 // "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in 5538 // the agent and in the intent. Also, each slot 5539 // filling prompt is forwarded to the webhook. 5540 WebhookState string `json:"webhookState,omitempty"` 5541 5542 // ForceSendFields is a list of field names (e.g. "Action") to 5543 // unconditionally include in API requests. By default, fields with 5544 // empty values are omitted from API requests. However, any non-pointer, 5545 // non-interface field appearing in ForceSendFields will be sent to the 5546 // server regardless of whether the field is empty or not. This may be 5547 // used to include empty fields in Patch requests. 5548 ForceSendFields []string `json:"-"` 5549 5550 // NullFields is a list of field names (e.g. "Action") to include in API 5551 // requests with the JSON null value. By default, fields with empty 5552 // values are omitted from API requests. However, any field with an 5553 // empty value appearing in NullFields will be sent to the server as 5554 // null. It is an error if a field in this list has a non-empty value. 5555 // This may be used to include null fields in Patch requests. 5556 NullFields []string `json:"-"` 5557} 5558 5559func (s *GoogleCloudDialogflowV2beta1Intent) MarshalJSON() ([]byte, error) { 5560 type NoMethod GoogleCloudDialogflowV2beta1Intent 5561 raw := NoMethod(*s) 5562 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5563} 5564 5565// GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo: Represents a 5566// single followup intent in the chain. 5567type GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo struct { 5568 // FollowupIntentName: The unique identifier of the followup 5569 // intent. 5570 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 5571 FollowupIntentName string `json:"followupIntentName,omitempty"` 5572 5573 // ParentFollowupIntentName: The unique identifier of the followup 5574 // intent's parent. 5575 // Format: `projects/<Project ID>/agent/intents/<Intent ID>`. 5576 ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"` 5577 5578 // ForceSendFields is a list of field names (e.g. "FollowupIntentName") 5579 // to unconditionally include in API requests. By default, fields with 5580 // empty values are omitted from API requests. However, any non-pointer, 5581 // non-interface field appearing in ForceSendFields will be sent to the 5582 // server regardless of whether the field is empty or not. This may be 5583 // used to include empty fields in Patch requests. 5584 ForceSendFields []string `json:"-"` 5585 5586 // NullFields is a list of field names (e.g. "FollowupIntentName") to 5587 // include in API requests with the JSON null value. By default, fields 5588 // with empty values are omitted from API requests. However, any field 5589 // with an empty value appearing in NullFields will be sent to the 5590 // server as null. It is an error if a field in this list has a 5591 // non-empty value. This may be used to include null fields in Patch 5592 // requests. 5593 NullFields []string `json:"-"` 5594} 5595 5596func (s *GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) { 5597 type NoMethod GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo 5598 raw := NoMethod(*s) 5599 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5600} 5601 5602// GoogleCloudDialogflowV2beta1IntentMessage: Corresponds to the 5603// `Response` field in the Dialogflow console. 5604type GoogleCloudDialogflowV2beta1IntentMessage struct { 5605 // BasicCard: Displays a basic card for Actions on Google. 5606 BasicCard *GoogleCloudDialogflowV2beta1IntentMessageBasicCard `json:"basicCard,omitempty"` 5607 5608 // BrowseCarouselCard: Browse carousel card for Actions on Google. 5609 BrowseCarouselCard *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"` 5610 5611 // Card: Displays a card. 5612 Card *GoogleCloudDialogflowV2beta1IntentMessageCard `json:"card,omitempty"` 5613 5614 // CarouselSelect: Displays a carousel card for Actions on Google. 5615 CarouselSelect *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect `json:"carouselSelect,omitempty"` 5616 5617 // Image: Displays an image. 5618 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 5619 5620 // LinkOutSuggestion: Displays a link out suggestion chip for Actions on 5621 // Google. 5622 LinkOutSuggestion *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"` 5623 5624 // ListSelect: Displays a list card for Actions on Google. 5625 ListSelect *GoogleCloudDialogflowV2beta1IntentMessageListSelect `json:"listSelect,omitempty"` 5626 5627 // MediaContent: The media content card for Actions on Google. 5628 MediaContent *GoogleCloudDialogflowV2beta1IntentMessageMediaContent `json:"mediaContent,omitempty"` 5629 5630 // Payload: Returns a response containing a custom, platform-specific 5631 // payload. 5632 // See the Intent.Message.Platform type for a description of 5633 // the 5634 // structure that may be required for your platform. 5635 Payload googleapi.RawMessage `json:"payload,omitempty"` 5636 5637 // Platform: Optional. The platform that this message is intended for. 5638 // 5639 // Possible values: 5640 // "PLATFORM_UNSPECIFIED" - Not specified. 5641 // "FACEBOOK" - Facebook. 5642 // "SLACK" - Slack. 5643 // "TELEGRAM" - Telegram. 5644 // "KIK" - Kik. 5645 // "SKYPE" - Skype. 5646 // "LINE" - Line. 5647 // "VIBER" - Viber. 5648 // "ACTIONS_ON_GOOGLE" - Actions on Google. 5649 // When using Actions on Google, you can choose one of the 5650 // specific 5651 // Intent.Message types that mention support for Actions on Google, 5652 // or you can use the advanced Intent.Message.payload field. 5653 // The payload field provides access to AoG features not available in 5654 // the 5655 // specific message types. 5656 // If using the Intent.Message.payload field, it should have a 5657 // structure 5658 // similar to the JSON message shown here. For more information, 5659 // see 5660 // [Actions on Google 5661 // Webhook 5662 // Format](https://developers.google.com/actions/dialogflow/webho 5663 // ok) 5664 // <pre>{ 5665 // "expectUserResponse": true, 5666 // "isSsml": false, 5667 // "noInputPrompts": [], 5668 // "richResponse": { 5669 // "items": [ 5670 // { 5671 // "simpleResponse": { 5672 // "displayText": "hi", 5673 // "textToSpeech": "hello" 5674 // } 5675 // } 5676 // ], 5677 // "suggestions": [ 5678 // { 5679 // "title": "Say this" 5680 // }, 5681 // { 5682 // "title": "or this" 5683 // } 5684 // ] 5685 // }, 5686 // "systemIntent": { 5687 // "data": { 5688 // "@type": 5689 // "type.googleapis.com/google.actions.v2.OptionValueSpec", 5690 // "listSelect": { 5691 // "items": [ 5692 // { 5693 // "optionInfo": { 5694 // "key": "key1", 5695 // "synonyms": [ 5696 // "key one" 5697 // ] 5698 // }, 5699 // "title": "must not be empty, but unique" 5700 // }, 5701 // { 5702 // "optionInfo": { 5703 // "key": "key2", 5704 // "synonyms": [ 5705 // "key two" 5706 // ] 5707 // }, 5708 // "title": "must not be empty, but unique" 5709 // } 5710 // ] 5711 // } 5712 // }, 5713 // "intent": "actions.intent.OPTION" 5714 // } 5715 // }</pre> 5716 // "TELEPHONY" - Telephony Gateway. 5717 // "GOOGLE_HANGOUTS" - Google Hangouts. 5718 Platform string `json:"platform,omitempty"` 5719 5720 // QuickReplies: Displays quick replies. 5721 QuickReplies *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies `json:"quickReplies,omitempty"` 5722 5723 // RbmCarouselRichCard: Rich Business Messaging (RBM) carousel rich card 5724 // response. 5725 RbmCarouselRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard `json:"rbmCarouselRichCard,omitempty"` 5726 5727 // RbmStandaloneRichCard: Standalone Rich Business Messaging (RBM) rich 5728 // card response. 5729 RbmStandaloneRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard `json:"rbmStandaloneRichCard,omitempty"` 5730 5731 // RbmText: Rich Business Messaging (RBM) text response. 5732 // 5733 // RBM allows businesses to send enriched and branded versions of SMS. 5734 // See 5735 // https://jibe.google.com/business-messaging. 5736 RbmText *GoogleCloudDialogflowV2beta1IntentMessageRbmText `json:"rbmText,omitempty"` 5737 5738 // SimpleResponses: Returns a voice or text-only response for Actions on 5739 // Google. 5740 SimpleResponses *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses `json:"simpleResponses,omitempty"` 5741 5742 // Suggestions: Displays suggestion chips for Actions on Google. 5743 Suggestions *GoogleCloudDialogflowV2beta1IntentMessageSuggestions `json:"suggestions,omitempty"` 5744 5745 // TableCard: Table card for Actions on Google. 5746 TableCard *GoogleCloudDialogflowV2beta1IntentMessageTableCard `json:"tableCard,omitempty"` 5747 5748 // TelephonyPlayAudio: Plays audio from a file in Telephony Gateway. 5749 TelephonyPlayAudio *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio `json:"telephonyPlayAudio,omitempty"` 5750 5751 // TelephonySynthesizeSpeech: Synthesizes speech in Telephony Gateway. 5752 TelephonySynthesizeSpeech *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech `json:"telephonySynthesizeSpeech,omitempty"` 5753 5754 // TelephonyTransferCall: Transfers the call in Telephony Gateway. 5755 TelephonyTransferCall *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall `json:"telephonyTransferCall,omitempty"` 5756 5757 // Text: Returns a text response. 5758 Text *GoogleCloudDialogflowV2beta1IntentMessageText `json:"text,omitempty"` 5759 5760 // ForceSendFields is a list of field names (e.g. "BasicCard") 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. "BasicCard") to include in 5769 // API 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 *GoogleCloudDialogflowV2beta1IntentMessage) MarshalJSON() ([]byte, error) { 5778 type NoMethod GoogleCloudDialogflowV2beta1IntentMessage 5779 raw := NoMethod(*s) 5780 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5781} 5782 5783// GoogleCloudDialogflowV2beta1IntentMessageBasicCard: The basic card 5784// message. Useful for displaying information. 5785type GoogleCloudDialogflowV2beta1IntentMessageBasicCard struct { 5786 // Buttons: Optional. The collection of card buttons. 5787 Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"` 5788 5789 // FormattedText: Required, unless image is present. The body text of 5790 // the card. 5791 FormattedText string `json:"formattedText,omitempty"` 5792 5793 // Image: Optional. The image for the card. 5794 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 5795 5796 // Subtitle: Optional. The subtitle of the card. 5797 Subtitle string `json:"subtitle,omitempty"` 5798 5799 // Title: Optional. The title of the card. 5800 Title string `json:"title,omitempty"` 5801 5802 // ForceSendFields is a list of field names (e.g. "Buttons") to 5803 // unconditionally include in API requests. By default, fields with 5804 // empty values are omitted from API requests. However, any non-pointer, 5805 // non-interface field appearing in ForceSendFields will be sent to the 5806 // server regardless of whether the field is empty or not. This may be 5807 // used to include empty fields in Patch requests. 5808 ForceSendFields []string `json:"-"` 5809 5810 // NullFields is a list of field names (e.g. "Buttons") to include in 5811 // API requests with the JSON null value. By default, fields with empty 5812 // values are omitted from API requests. However, any field with an 5813 // empty value appearing in NullFields will be sent to the server as 5814 // null. It is an error if a field in this list has a non-empty value. 5815 // This may be used to include null fields in Patch requests. 5816 NullFields []string `json:"-"` 5817} 5818 5819func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCard) MarshalJSON() ([]byte, error) { 5820 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCard 5821 raw := NoMethod(*s) 5822 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5823} 5824 5825// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton: The button 5826// object that appears at the bottom of a card. 5827type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton struct { 5828 // OpenUriAction: Required. Action to take when a user taps on the 5829 // button. 5830 OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"` 5831 5832 // Title: Required. The title of the button. 5833 Title string `json:"title,omitempty"` 5834 5835 // ForceSendFields is a list of field names (e.g. "OpenUriAction") to 5836 // unconditionally include in API requests. By default, fields with 5837 // empty values are omitted from API requests. However, any non-pointer, 5838 // non-interface field appearing in ForceSendFields will be sent to the 5839 // server regardless of whether the field is empty or not. This may be 5840 // used to include empty fields in Patch requests. 5841 ForceSendFields []string `json:"-"` 5842 5843 // NullFields is a list of field names (e.g. "OpenUriAction") to include 5844 // in API requests with the JSON null value. By default, fields with 5845 // empty values are omitted from API requests. However, any field with 5846 // an empty value appearing in NullFields will be sent to the server as 5847 // null. It is an error if a field in this list has a non-empty value. 5848 // This may be used to include null fields in Patch requests. 5849 NullFields []string `json:"-"` 5850} 5851 5852func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) { 5853 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton 5854 raw := NoMethod(*s) 5855 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5856} 5857 5858// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction: 5859// Opens the given URI. 5860type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction struct { 5861 // Uri: Required. The HTTP or HTTPS scheme URI. 5862 Uri string `json:"uri,omitempty"` 5863 5864 // ForceSendFields is a list of field names (e.g. "Uri") to 5865 // unconditionally include in API requests. By default, fields with 5866 // empty values are omitted from API requests. However, any non-pointer, 5867 // non-interface field appearing in ForceSendFields will be sent to the 5868 // server regardless of whether the field is empty or not. This may be 5869 // used to include empty fields in Patch requests. 5870 ForceSendFields []string `json:"-"` 5871 5872 // NullFields is a list of field names (e.g. "Uri") to include in API 5873 // requests with the JSON null value. By default, fields with empty 5874 // values are omitted from API requests. However, any field with an 5875 // empty value appearing in NullFields will be sent to the server as 5876 // null. It is an error if a field in this list has a non-empty value. 5877 // This may be used to include null fields in Patch requests. 5878 NullFields []string `json:"-"` 5879} 5880 5881func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) { 5882 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction 5883 raw := NoMethod(*s) 5884 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5885} 5886 5887// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard: Browse 5888// Carousel Card for Actions on 5889// Google. 5890// https://developers.google.com/actions/assistant/responses#brow 5891// sing_carousel 5892type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard struct { 5893 // ImageDisplayOptions: Optional. Settings for displaying the image. 5894 // Applies to every image in 5895 // items. 5896 // 5897 // Possible values: 5898 // "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the 5899 // image and the image container with gray 5900 // bars. 5901 // "GRAY" - Fill the gaps between the image and the image container 5902 // with gray 5903 // bars. 5904 // "WHITE" - Fill the gaps between the image and the image container 5905 // with white 5906 // bars. 5907 // "CROPPED" - Image is scaled such that the image width and height 5908 // match or exceed 5909 // the container dimensions. This may crop the top and bottom of 5910 // the 5911 // image if the scaled image height is greater than the 5912 // container 5913 // height, or crop the left and right of the image if the scaled 5914 // image 5915 // width is greater than the container width. This is similar to 5916 // "Zoom 5917 // Mode" on a widescreen TV when playing a 4:3 video. 5918 // "BLURRED_BACKGROUND" - Pad the gaps between image and image frame 5919 // with a blurred copy of the 5920 // same image. 5921 ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"` 5922 5923 // Items: Required. List of items in the Browse Carousel Card. Minimum 5924 // of two 5925 // items, maximum of ten. 5926 Items []*GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"` 5927 5928 // ForceSendFields is a list of field names (e.g. "ImageDisplayOptions") 5929 // to unconditionally include in API requests. By default, fields with 5930 // empty values are omitted from API requests. However, any non-pointer, 5931 // non-interface field appearing in ForceSendFields will be sent to the 5932 // server regardless of whether the field is empty or not. This may be 5933 // used to include empty fields in Patch requests. 5934 ForceSendFields []string `json:"-"` 5935 5936 // NullFields is a list of field names (e.g. "ImageDisplayOptions") to 5937 // include in API requests with the JSON null value. By default, fields 5938 // with empty values are omitted from API requests. However, any field 5939 // with an empty value appearing in NullFields will be sent to the 5940 // server as null. It is an error if a field in this list has a 5941 // non-empty value. This may be used to include null fields in Patch 5942 // requests. 5943 NullFields []string `json:"-"` 5944} 5945 5946func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) { 5947 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard 5948 raw := NoMethod(*s) 5949 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5950} 5951 5952// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou 5953// selCardItem: Browsing carousel tile 5954type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct { 5955 // Description: Optional. Description of the carousel item. Maximum of 5956 // four lines of 5957 // text. 5958 Description string `json:"description,omitempty"` 5959 5960 // Footer: Optional. Text that appears at the bottom of the Browse 5961 // Carousel 5962 // Card. Maximum of one line of text. 5963 Footer string `json:"footer,omitempty"` 5964 5965 // Image: Optional. Hero image for the carousel item. 5966 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 5967 5968 // OpenUriAction: Required. Action to present to the user. 5969 OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"` 5970 5971 // Title: Required. Title of the carousel item. Maximum of two lines of 5972 // text. 5973 Title string `json:"title,omitempty"` 5974 5975 // ForceSendFields is a list of field names (e.g. "Description") to 5976 // unconditionally include in API requests. By default, fields with 5977 // empty values are omitted from API requests. However, any non-pointer, 5978 // non-interface field appearing in ForceSendFields will be sent to the 5979 // server regardless of whether the field is empty or not. This may be 5980 // used to include empty fields in Patch requests. 5981 ForceSendFields []string `json:"-"` 5982 5983 // NullFields is a list of field names (e.g. "Description") to include 5984 // in API requests with the JSON null value. By default, fields with 5985 // empty values are omitted from API requests. However, any field with 5986 // an empty value appearing in NullFields will be sent to the server as 5987 // null. It is an error if a field in this list has a non-empty value. 5988 // This may be used to include null fields in Patch requests. 5989 NullFields []string `json:"-"` 5990} 5991 5992func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) { 5993 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem 5994 raw := NoMethod(*s) 5995 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5996} 5997 5998// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou 5999// selCardItemOpenUrlAction: Actions on Google action to open a given 6000// url. 6001type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct { 6002 // Url: Required. URL 6003 Url string `json:"url,omitempty"` 6004 6005 // UrlTypeHint: Optional. Specifies the type of viewer that is used when 6006 // opening 6007 // the URL. Defaults to opening via web browser. 6008 // 6009 // Possible values: 6010 // "URL_TYPE_HINT_UNSPECIFIED" - Unspecified 6011 // "AMP_ACTION" - Url would be an amp action 6012 // "AMP_CONTENT" - URL that points directly to AMP content, or to a 6013 // canonical URL 6014 // which refers to AMP content via <link rel="amphtml">. 6015 UrlTypeHint string `json:"urlTypeHint,omitempty"` 6016 6017 // ForceSendFields is a list of field names (e.g. "Url") to 6018 // unconditionally include in API requests. By default, fields with 6019 // empty values are omitted from API requests. However, any non-pointer, 6020 // non-interface field appearing in ForceSendFields will be sent to the 6021 // server regardless of whether the field is empty or not. This may be 6022 // used to include empty fields in Patch requests. 6023 ForceSendFields []string `json:"-"` 6024 6025 // NullFields is a list of field names (e.g. "Url") to include in API 6026 // requests with the JSON null value. By default, fields with empty 6027 // values are omitted from API requests. However, any field with an 6028 // empty value appearing in NullFields will be sent to the server as 6029 // null. It is an error if a field in this list has a non-empty value. 6030 // This may be used to include null fields in Patch requests. 6031 NullFields []string `json:"-"` 6032} 6033 6034func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) { 6035 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction 6036 raw := NoMethod(*s) 6037 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6038} 6039 6040// GoogleCloudDialogflowV2beta1IntentMessageCard: The card response 6041// message. 6042type GoogleCloudDialogflowV2beta1IntentMessageCard struct { 6043 // Buttons: Optional. The collection of card buttons. 6044 Buttons []*GoogleCloudDialogflowV2beta1IntentMessageCardButton `json:"buttons,omitempty"` 6045 6046 // ImageUri: Optional. The public URI to an image file for the card. 6047 ImageUri string `json:"imageUri,omitempty"` 6048 6049 // Subtitle: Optional. The subtitle of the card. 6050 Subtitle string `json:"subtitle,omitempty"` 6051 6052 // Title: Optional. The title of the card. 6053 Title string `json:"title,omitempty"` 6054 6055 // ForceSendFields is a list of field names (e.g. "Buttons") to 6056 // unconditionally include in API requests. By default, fields with 6057 // empty values are omitted from API requests. However, any non-pointer, 6058 // non-interface field appearing in ForceSendFields will be sent to the 6059 // server regardless of whether the field is empty or not. This may be 6060 // used to include empty fields in Patch requests. 6061 ForceSendFields []string `json:"-"` 6062 6063 // NullFields is a list of field names (e.g. "Buttons") to include in 6064 // API requests with the JSON null value. By default, fields with empty 6065 // values are omitted from API requests. However, any field with an 6066 // empty value appearing in NullFields will be sent to the server as 6067 // null. It is an error if a field in this list has a non-empty value. 6068 // This may be used to include null fields in Patch requests. 6069 NullFields []string `json:"-"` 6070} 6071 6072func (s *GoogleCloudDialogflowV2beta1IntentMessageCard) MarshalJSON() ([]byte, error) { 6073 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCard 6074 raw := NoMethod(*s) 6075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6076} 6077 6078// GoogleCloudDialogflowV2beta1IntentMessageCardButton: Optional. 6079// Contains information about a button. 6080type GoogleCloudDialogflowV2beta1IntentMessageCardButton struct { 6081 // Postback: Optional. The text to send back to the Dialogflow API or a 6082 // URI to 6083 // open. 6084 Postback string `json:"postback,omitempty"` 6085 6086 // Text: Optional. The text to show on the button. 6087 Text string `json:"text,omitempty"` 6088 6089 // ForceSendFields is a list of field names (e.g. "Postback") to 6090 // unconditionally include in API requests. By default, fields with 6091 // empty values are omitted from API requests. However, any non-pointer, 6092 // non-interface field appearing in ForceSendFields will be sent to the 6093 // server regardless of whether the field is empty or not. This may be 6094 // used to include empty fields in Patch requests. 6095 ForceSendFields []string `json:"-"` 6096 6097 // NullFields is a list of field names (e.g. "Postback") to include in 6098 // API requests with the JSON null value. By default, fields with empty 6099 // values are omitted from API requests. However, any field with an 6100 // empty value appearing in NullFields will be sent to the server as 6101 // null. It is an error if a field in this list has a non-empty value. 6102 // This may be used to include null fields in Patch requests. 6103 NullFields []string `json:"-"` 6104} 6105 6106func (s *GoogleCloudDialogflowV2beta1IntentMessageCardButton) MarshalJSON() ([]byte, error) { 6107 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCardButton 6108 raw := NoMethod(*s) 6109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6110} 6111 6112// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect: The card for 6113// presenting a carousel of options to select from. 6114type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect struct { 6115 // Items: Required. Carousel items. 6116 Items []*GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem `json:"items,omitempty"` 6117 6118 // ForceSendFields is a list of field names (e.g. "Items") to 6119 // unconditionally include in API requests. By default, fields with 6120 // empty values are omitted from API requests. However, any non-pointer, 6121 // non-interface field appearing in ForceSendFields will be sent to the 6122 // server regardless of whether the field is empty or not. This may be 6123 // used to include empty fields in Patch requests. 6124 ForceSendFields []string `json:"-"` 6125 6126 // NullFields is a list of field names (e.g. "Items") to include in API 6127 // requests with the JSON null value. By default, fields with empty 6128 // values are omitted from API requests. However, any field with an 6129 // empty value appearing in NullFields will be sent to the server as 6130 // null. It is an error if a field in this list has a non-empty value. 6131 // This may be used to include null fields in Patch requests. 6132 NullFields []string `json:"-"` 6133} 6134 6135func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) { 6136 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect 6137 raw := NoMethod(*s) 6138 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6139} 6140 6141// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem: An item 6142// in the carousel. 6143type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem struct { 6144 // Description: Optional. The body text of the card. 6145 Description string `json:"description,omitempty"` 6146 6147 // Image: Optional. The image to display. 6148 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 6149 6150 // Info: Required. Additional info about the option item. 6151 Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"` 6152 6153 // Title: Required. Title of the carousel item. 6154 Title string `json:"title,omitempty"` 6155 6156 // ForceSendFields is a list of field names (e.g. "Description") to 6157 // unconditionally include in API requests. By default, fields with 6158 // empty values are omitted from API requests. However, any non-pointer, 6159 // non-interface field appearing in ForceSendFields will be sent to the 6160 // server regardless of whether the field is empty or not. This may be 6161 // used to include empty fields in Patch requests. 6162 ForceSendFields []string `json:"-"` 6163 6164 // NullFields is a list of field names (e.g. "Description") to include 6165 // in API requests with the JSON null value. By default, fields with 6166 // empty values are omitted from API requests. However, any field with 6167 // an empty value appearing in NullFields will be sent to the server as 6168 // null. It is an error if a field in this list has a non-empty value. 6169 // This may be used to include null fields in Patch requests. 6170 NullFields []string `json:"-"` 6171} 6172 6173func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) { 6174 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem 6175 raw := NoMethod(*s) 6176 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6177} 6178 6179// GoogleCloudDialogflowV2beta1IntentMessageColumnProperties: Column 6180// properties for TableCard. 6181type GoogleCloudDialogflowV2beta1IntentMessageColumnProperties struct { 6182 // Header: Required. Column heading. 6183 Header string `json:"header,omitempty"` 6184 6185 // HorizontalAlignment: Optional. Defines text alignment for all cells 6186 // in this column. 6187 // 6188 // Possible values: 6189 // "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading 6190 // edge of the column. 6191 // "LEADING" - Text is aligned to the leading edge of the column. 6192 // "CENTER" - Text is centered in the column. 6193 // "TRAILING" - Text is aligned to the trailing edge of the column. 6194 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 6195 6196 // ForceSendFields is a list of field names (e.g. "Header") to 6197 // unconditionally include in API requests. By default, fields with 6198 // empty values are omitted from API requests. However, any non-pointer, 6199 // non-interface field appearing in ForceSendFields will be sent to the 6200 // server regardless of whether the field is empty or not. This may be 6201 // used to include empty fields in Patch requests. 6202 ForceSendFields []string `json:"-"` 6203 6204 // NullFields is a list of field names (e.g. "Header") to include in API 6205 // requests with the JSON null value. By default, fields with empty 6206 // values are omitted from API requests. However, any field with an 6207 // empty value appearing in NullFields will be sent to the server as 6208 // null. It is an error if a field in this list has a non-empty value. 6209 // This may be used to include null fields in Patch requests. 6210 NullFields []string `json:"-"` 6211} 6212 6213func (s *GoogleCloudDialogflowV2beta1IntentMessageColumnProperties) MarshalJSON() ([]byte, error) { 6214 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageColumnProperties 6215 raw := NoMethod(*s) 6216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6217} 6218 6219// GoogleCloudDialogflowV2beta1IntentMessageImage: The image response 6220// message. 6221type GoogleCloudDialogflowV2beta1IntentMessageImage struct { 6222 // AccessibilityText: A text description of the image to be used for 6223 // accessibility, 6224 // e.g., screen readers. Required if image_uri is set for 6225 // CarouselSelect. 6226 AccessibilityText string `json:"accessibilityText,omitempty"` 6227 6228 // ImageUri: Optional. The public URI to an image file. 6229 ImageUri string `json:"imageUri,omitempty"` 6230 6231 // ForceSendFields is a list of field names (e.g. "AccessibilityText") 6232 // to unconditionally include in API requests. By default, fields with 6233 // empty values are omitted from API requests. However, any non-pointer, 6234 // non-interface field appearing in ForceSendFields will be sent to the 6235 // server regardless of whether the field is empty or not. This may be 6236 // used to include empty fields in Patch requests. 6237 ForceSendFields []string `json:"-"` 6238 6239 // NullFields is a list of field names (e.g. "AccessibilityText") to 6240 // include in API requests with the JSON null value. By default, fields 6241 // with empty values are omitted from API requests. However, any field 6242 // with an empty value appearing in NullFields will be sent to the 6243 // server as null. It is an error if a field in this list has a 6244 // non-empty value. This may be used to include null fields in Patch 6245 // requests. 6246 NullFields []string `json:"-"` 6247} 6248 6249func (s *GoogleCloudDialogflowV2beta1IntentMessageImage) MarshalJSON() ([]byte, error) { 6250 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageImage 6251 raw := NoMethod(*s) 6252 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6253} 6254 6255// GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion: The 6256// suggestion chip message that allows the user to jump out to the 6257// app 6258// or website associated with this agent. 6259type GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion struct { 6260 // DestinationName: Required. The name of the app or site this chip is 6261 // linking to. 6262 DestinationName string `json:"destinationName,omitempty"` 6263 6264 // Uri: Required. The URI of the app or site to open when the user taps 6265 // the 6266 // suggestion chip. 6267 Uri string `json:"uri,omitempty"` 6268 6269 // ForceSendFields is a list of field names (e.g. "DestinationName") to 6270 // unconditionally include in API requests. By default, fields with 6271 // empty values are omitted from API requests. However, any non-pointer, 6272 // non-interface field appearing in ForceSendFields will be sent to the 6273 // server regardless of whether the field is empty or not. This may be 6274 // used to include empty fields in Patch requests. 6275 ForceSendFields []string `json:"-"` 6276 6277 // NullFields is a list of field names (e.g. "DestinationName") to 6278 // include in API requests with the JSON null value. By default, fields 6279 // with empty values are omitted from API requests. However, any field 6280 // with an empty value appearing in NullFields will be sent to the 6281 // server as null. It is an error if a field in this list has a 6282 // non-empty value. This may be used to include null fields in Patch 6283 // requests. 6284 NullFields []string `json:"-"` 6285} 6286 6287func (s *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) { 6288 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion 6289 raw := NoMethod(*s) 6290 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6291} 6292 6293// GoogleCloudDialogflowV2beta1IntentMessageListSelect: The card for 6294// presenting a list of options to select from. 6295type GoogleCloudDialogflowV2beta1IntentMessageListSelect struct { 6296 // Items: Required. List items. 6297 Items []*GoogleCloudDialogflowV2beta1IntentMessageListSelectItem `json:"items,omitempty"` 6298 6299 // Subtitle: Optional. Subtitle of the list. 6300 Subtitle string `json:"subtitle,omitempty"` 6301 6302 // Title: Optional. The overall title of the list. 6303 Title string `json:"title,omitempty"` 6304 6305 // ForceSendFields is a list of field names (e.g. "Items") to 6306 // unconditionally include in API requests. By default, fields with 6307 // empty values are omitted from API requests. However, any non-pointer, 6308 // non-interface field appearing in ForceSendFields will be sent to the 6309 // server regardless of whether the field is empty or not. This may be 6310 // used to include empty fields in Patch requests. 6311 ForceSendFields []string `json:"-"` 6312 6313 // NullFields is a list of field names (e.g. "Items") to include in API 6314 // requests with the JSON null value. By default, fields with empty 6315 // values are omitted from API requests. However, any field with an 6316 // empty value appearing in NullFields will be sent to the server as 6317 // null. It is an error if a field in this list has a non-empty value. 6318 // This may be used to include null fields in Patch requests. 6319 NullFields []string `json:"-"` 6320} 6321 6322func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelect) MarshalJSON() ([]byte, error) { 6323 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelect 6324 raw := NoMethod(*s) 6325 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6326} 6327 6328// GoogleCloudDialogflowV2beta1IntentMessageListSelectItem: An item in 6329// the list. 6330type GoogleCloudDialogflowV2beta1IntentMessageListSelectItem struct { 6331 // Description: Optional. The main text describing the item. 6332 Description string `json:"description,omitempty"` 6333 6334 // Image: Optional. The image to display. 6335 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 6336 6337 // Info: Required. Additional information about this option. 6338 Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"` 6339 6340 // Title: Required. The title of the list item. 6341 Title string `json:"title,omitempty"` 6342 6343 // ForceSendFields is a list of field names (e.g. "Description") to 6344 // unconditionally include in API requests. By default, fields with 6345 // empty values are omitted from API requests. However, any non-pointer, 6346 // non-interface field appearing in ForceSendFields will be sent to the 6347 // server regardless of whether the field is empty or not. This may be 6348 // used to include empty fields in Patch requests. 6349 ForceSendFields []string `json:"-"` 6350 6351 // NullFields is a list of field names (e.g. "Description") to include 6352 // in API requests with the JSON null value. By default, fields with 6353 // empty values are omitted from API requests. However, any field with 6354 // an empty value appearing in NullFields will be sent to the server as 6355 // null. It is an error if a field in this list has a non-empty value. 6356 // This may be used to include null fields in Patch requests. 6357 NullFields []string `json:"-"` 6358} 6359 6360func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelectItem) MarshalJSON() ([]byte, error) { 6361 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelectItem 6362 raw := NoMethod(*s) 6363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6364} 6365 6366// GoogleCloudDialogflowV2beta1IntentMessageMediaContent: The media 6367// content card for Actions on Google. 6368type GoogleCloudDialogflowV2beta1IntentMessageMediaContent struct { 6369 // MediaObjects: Required. List of media objects. 6370 MediaObjects []*GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"` 6371 6372 // MediaType: Optional. What type of media is the content (ie "audio"). 6373 // 6374 // Possible values: 6375 // "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified. 6376 // "AUDIO" - Response media type is audio. 6377 MediaType string `json:"mediaType,omitempty"` 6378 6379 // ForceSendFields is a list of field names (e.g. "MediaObjects") to 6380 // unconditionally include in API requests. By default, fields with 6381 // empty values are omitted from API requests. However, any non-pointer, 6382 // non-interface field appearing in ForceSendFields will be sent to the 6383 // server regardless of whether the field is empty or not. This may be 6384 // used to include empty fields in Patch requests. 6385 ForceSendFields []string `json:"-"` 6386 6387 // NullFields is a list of field names (e.g. "MediaObjects") to include 6388 // in API requests with the JSON null value. By default, fields with 6389 // empty values are omitted from API requests. However, any field with 6390 // an empty value appearing in NullFields will be sent to the server as 6391 // null. It is an error if a field in this list has a non-empty value. 6392 // This may be used to include null fields in Patch requests. 6393 NullFields []string `json:"-"` 6394} 6395 6396func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContent) MarshalJSON() ([]byte, error) { 6397 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContent 6398 raw := NoMethod(*s) 6399 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6400} 6401 6402// GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObje 6403// ct: Response media object for media content card. 6404type GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject struct { 6405 // ContentUrl: Required. Url where the media is stored. 6406 ContentUrl string `json:"contentUrl,omitempty"` 6407 6408 // Description: Optional. Description of media card. 6409 Description string `json:"description,omitempty"` 6410 6411 // Icon: Optional. Icon to display above media content. 6412 Icon *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"icon,omitempty"` 6413 6414 // LargeImage: Optional. Image to display above media content. 6415 LargeImage *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"largeImage,omitempty"` 6416 6417 // Name: Required. Name of media card. 6418 Name string `json:"name,omitempty"` 6419 6420 // ForceSendFields is a list of field names (e.g. "ContentUrl") to 6421 // unconditionally include in API requests. By default, fields with 6422 // empty values are omitted from API requests. However, any non-pointer, 6423 // non-interface field appearing in ForceSendFields will be sent to the 6424 // server regardless of whether the field is empty or not. This may be 6425 // used to include empty fields in Patch requests. 6426 ForceSendFields []string `json:"-"` 6427 6428 // NullFields is a list of field names (e.g. "ContentUrl") to include in 6429 // API requests with the JSON null value. By default, fields with empty 6430 // values are omitted from API requests. However, any field with an 6431 // empty value appearing in NullFields will be sent to the server as 6432 // null. It is an error if a field in this list has a non-empty value. 6433 // This may be used to include null fields in Patch requests. 6434 NullFields []string `json:"-"` 6435} 6436 6437func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) { 6438 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject 6439 raw := NoMethod(*s) 6440 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6441} 6442 6443// GoogleCloudDialogflowV2beta1IntentMessageQuickReplies: The quick 6444// replies response message. 6445type GoogleCloudDialogflowV2beta1IntentMessageQuickReplies struct { 6446 // QuickReplies: Optional. The collection of quick replies. 6447 QuickReplies []string `json:"quickReplies,omitempty"` 6448 6449 // Title: Optional. The title of the collection of quick replies. 6450 Title string `json:"title,omitempty"` 6451 6452 // ForceSendFields is a list of field names (e.g. "QuickReplies") to 6453 // unconditionally include in API requests. By default, fields with 6454 // empty values are omitted from API requests. However, any non-pointer, 6455 // non-interface field appearing in ForceSendFields will be sent to the 6456 // server regardless of whether the field is empty or not. This may be 6457 // used to include empty fields in Patch requests. 6458 ForceSendFields []string `json:"-"` 6459 6460 // NullFields is a list of field names (e.g. "QuickReplies") to include 6461 // in API requests with the JSON null value. By default, fields with 6462 // empty values are omitted from API requests. However, any field with 6463 // an empty value appearing in NullFields will be sent to the server as 6464 // null. It is an error if a field in this list has a non-empty value. 6465 // This may be used to include null fields in Patch requests. 6466 NullFields []string `json:"-"` 6467} 6468 6469func (s *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies) MarshalJSON() ([]byte, error) { 6470 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageQuickReplies 6471 raw := NoMethod(*s) 6472 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6473} 6474 6475// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent: Rich 6476// Business Messaging (RBM) Card content 6477type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent struct { 6478 // Description: Optional. Description of the card (at most 2000 6479 // bytes). 6480 // 6481 // At least one of the title, description or media must be set. 6482 Description string `json:"description,omitempty"` 6483 6484 // Media: Optional. However at least one of the title, description or 6485 // media must 6486 // be set. Media (image, GIF or a video) to include in the card. 6487 Media *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia `json:"media,omitempty"` 6488 6489 // Suggestions: Optional. List of suggestions to include in the card. 6490 Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"suggestions,omitempty"` 6491 6492 // Title: Optional. Title of the card (at most 200 bytes). 6493 // 6494 // At least one of the title, description or media must be set. 6495 Title string `json:"title,omitempty"` 6496 6497 // ForceSendFields is a list of field names (e.g. "Description") to 6498 // unconditionally include in API requests. By default, fields with 6499 // empty values are omitted from API requests. However, any non-pointer, 6500 // non-interface field appearing in ForceSendFields will be sent to the 6501 // server regardless of whether the field is empty or not. This may be 6502 // used to include empty fields in Patch requests. 6503 ForceSendFields []string `json:"-"` 6504 6505 // NullFields is a list of field names (e.g. "Description") to include 6506 // in API requests with the JSON null value. By default, fields with 6507 // empty values are omitted from API requests. However, any field with 6508 // an empty value appearing in NullFields will be sent to the server as 6509 // null. It is an error if a field in this list has a non-empty value. 6510 // This may be used to include null fields in Patch requests. 6511 NullFields []string `json:"-"` 6512} 6513 6514func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent) MarshalJSON() ([]byte, error) { 6515 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent 6516 raw := NoMethod(*s) 6517 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6518} 6519 6520// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia: Rich 6521// Business Messaging (RBM) Media displayed in Cards 6522// The following media-types are currently supported: 6523// 6524// ## Image Types 6525// 6526// image/jpeg 6527// image/jpg' 6528// image/gif 6529// image/png 6530// 6531// ## Video Types 6532// 6533// video/h263 6534// video/m4v 6535// video/mp4 6536// video/mpeg 6537// video/mpeg4 6538// video/webm 6539type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia struct { 6540 // FileUri: Required. Publicly reachable URI of the file. The RBM 6541 // platform 6542 // determines the MIME type of the file from the content-type field 6543 // in 6544 // the HTTP headers when the platform fetches the file. The 6545 // content-type 6546 // field must be present and accurate in the HTTP response from the URL. 6547 FileUri string `json:"fileUri,omitempty"` 6548 6549 // Height: Required for cards with vertical orientation. The height of 6550 // the media 6551 // within a rich card with a vertical layout. 6552 // (https://goo.gl/NeFCjz). 6553 // For a standalone card with horizontal layout, height is 6554 // not 6555 // customizable, and this field is ignored. 6556 // 6557 // Possible values: 6558 // "HEIGHT_UNSPECIFIED" - Not specified. 6559 // "SHORT" - 112 DP. 6560 // "MEDIUM" - 168 DP. 6561 // "TALL" - 264 DP. Not available for rich card carousels when the 6562 // card width 6563 // is set to small. 6564 Height string `json:"height,omitempty"` 6565 6566 // ThumbnailUri: Optional. Publicly reachable URI of the thumbnail.If 6567 // you don't 6568 // provide a thumbnail URI, the RBM platform displays a 6569 // blank 6570 // placeholder thumbnail until the user's device downloads the 6571 // file. 6572 // Depending on the user's setting, the file may not 6573 // download 6574 // automatically and may require the user to tap a download button. 6575 ThumbnailUri string `json:"thumbnailUri,omitempty"` 6576 6577 // ForceSendFields is a list of field names (e.g. "FileUri") to 6578 // unconditionally include in API requests. By default, fields with 6579 // empty values are omitted from API requests. However, any non-pointer, 6580 // non-interface field appearing in ForceSendFields will be sent to the 6581 // server regardless of whether the field is empty or not. This may be 6582 // used to include empty fields in Patch requests. 6583 ForceSendFields []string `json:"-"` 6584 6585 // NullFields is a list of field names (e.g. "FileUri") to include in 6586 // API requests with the JSON null value. By default, fields with empty 6587 // values are omitted from API requests. However, any field with an 6588 // empty value appearing in NullFields will be sent to the server as 6589 // null. It is an error if a field in this list has a non-empty value. 6590 // This may be used to include null fields in Patch requests. 6591 NullFields []string `json:"-"` 6592} 6593 6594func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia) MarshalJSON() ([]byte, error) { 6595 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia 6596 raw := NoMethod(*s) 6597 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6598} 6599 6600// GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard: Carousel 6601// Rich Business Messaging (RBM) rich card. 6602// 6603// Rich cards allow you to respond to users with more vivid content, 6604// e.g. 6605// with media and suggestions. 6606// 6607// For more details about RBM rich cards, please 6608// see: 6609// https://developers.google.com/rcs-business-messaging/rbm/guides/b 6610// uild/send-messages#rich-cards. 6611// If you want to show a single card with more control over the 6612// layout, 6613// please use RbmStandaloneCard instead. 6614type GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard struct { 6615 // CardContents: Required. The cards in the carousel. A carousel must 6616 // have at least 6617 // 2 cards and at most 10. 6618 CardContents []*GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContents,omitempty"` 6619 6620 // CardWidth: Required. The width of the cards in the carousel. 6621 // 6622 // Possible values: 6623 // "CARD_WIDTH_UNSPECIFIED" - Not specified. 6624 // "SMALL" - 120 DP. Note that tall media cannot be used. 6625 // "MEDIUM" - 232 DP. 6626 CardWidth string `json:"cardWidth,omitempty"` 6627 6628 // ForceSendFields is a list of field names (e.g. "CardContents") to 6629 // unconditionally include in API requests. By default, fields with 6630 // empty values are omitted from API requests. However, any non-pointer, 6631 // non-interface field appearing in ForceSendFields will be sent to the 6632 // server regardless of whether the field is empty or not. This may be 6633 // used to include empty fields in Patch requests. 6634 ForceSendFields []string `json:"-"` 6635 6636 // NullFields is a list of field names (e.g. "CardContents") to include 6637 // in API requests with the JSON null value. By default, fields with 6638 // empty values are omitted from API requests. However, any field with 6639 // an empty value appearing in NullFields will be sent to the server as 6640 // null. It is an error if a field in this list has a non-empty value. 6641 // This may be used to include null fields in Patch requests. 6642 NullFields []string `json:"-"` 6643} 6644 6645func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard) MarshalJSON() ([]byte, error) { 6646 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard 6647 raw := NoMethod(*s) 6648 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6649} 6650 6651// GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard: 6652// Standalone Rich Business Messaging (RBM) rich card. 6653// 6654// Rich cards allow you to respond to users with more vivid content, 6655// e.g. 6656// with media and suggestions. 6657// 6658// For more details about RBM rich cards, please 6659// see: 6660// https://developers.google.com/rcs-business-messaging/rbm/guides/b 6661// uild/send-messages#rich-cards. 6662// You can group multiple rich cards into one using RbmCarouselCard 6663// but 6664// carousel cards will give you less control over the card layout. 6665type GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard struct { 6666 // CardContent: Required. Card content. 6667 CardContent *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContent,omitempty"` 6668 6669 // CardOrientation: Required. Orientation of the card. 6670 // 6671 // Possible values: 6672 // "CARD_ORIENTATION_UNSPECIFIED" - Not specified. 6673 // "HORIZONTAL" - Horizontal layout. 6674 // "VERTICAL" - Vertical layout. 6675 CardOrientation string `json:"cardOrientation,omitempty"` 6676 6677 // ThumbnailImageAlignment: Required if orientation is horizontal. 6678 // Image preview alignment for standalone cards with horizontal layout. 6679 // 6680 // Possible values: 6681 // "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED" - Not specified. 6682 // "LEFT" - Thumbnail preview is left-aligned. 6683 // "RIGHT" - Thumbnail preview is right-aligned. 6684 ThumbnailImageAlignment string `json:"thumbnailImageAlignment,omitempty"` 6685 6686 // ForceSendFields is a list of field names (e.g. "CardContent") to 6687 // unconditionally include in API requests. By default, fields with 6688 // empty values are omitted from API requests. However, any non-pointer, 6689 // non-interface field appearing in ForceSendFields will be sent to the 6690 // server regardless of whether the field is empty or not. This may be 6691 // used to include empty fields in Patch requests. 6692 ForceSendFields []string `json:"-"` 6693 6694 // NullFields is a list of field names (e.g. "CardContent") to include 6695 // in API requests with the JSON null value. By default, fields with 6696 // empty values are omitted from API requests. However, any field with 6697 // an empty value appearing in NullFields will be sent to the server as 6698 // null. It is an error if a field in this list has a non-empty value. 6699 // This may be used to include null fields in Patch requests. 6700 NullFields []string `json:"-"` 6701} 6702 6703func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard) MarshalJSON() ([]byte, error) { 6704 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard 6705 raw := NoMethod(*s) 6706 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6707} 6708 6709// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction: Rich 6710// Business Messaging (RBM) suggested client-side action that the 6711// user 6712// can choose from the card. 6713type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction struct { 6714 // Dial: Suggested client side action: Dial a phone number 6715 Dial *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial `json:"dial,omitempty"` 6716 6717 // OpenUrl: Suggested client side action: Open a URI on device 6718 OpenUrl *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri `json:"openUrl,omitempty"` 6719 6720 // PostbackData: Opaque payload that the Dialogflow receives in a user 6721 // event 6722 // when the user taps the suggested action. This data will be 6723 // also 6724 // forwarded to webhook to allow performing custom business logic. 6725 PostbackData string `json:"postbackData,omitempty"` 6726 6727 // ShareLocation: Suggested client side action: Share user location 6728 ShareLocation *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation `json:"shareLocation,omitempty"` 6729 6730 // Text: Text to display alongside the action. 6731 Text string `json:"text,omitempty"` 6732 6733 // ForceSendFields is a list of field names (e.g. "Dial") to 6734 // unconditionally include in API requests. By default, fields with 6735 // empty values are omitted from API requests. However, any non-pointer, 6736 // non-interface field appearing in ForceSendFields will be sent to the 6737 // server regardless of whether the field is empty or not. This may be 6738 // used to include empty fields in Patch requests. 6739 ForceSendFields []string `json:"-"` 6740 6741 // NullFields is a list of field names (e.g. "Dial") to include in API 6742 // requests with the JSON null value. By default, fields with empty 6743 // values are omitted from API requests. However, any field with an 6744 // empty value appearing in NullFields will be sent to the server as 6745 // null. It is an error if a field in this list has a non-empty value. 6746 // This may be used to include null fields in Patch requests. 6747 NullFields []string `json:"-"` 6748} 6749 6750func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction) MarshalJSON() ([]byte, error) { 6751 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction 6752 raw := NoMethod(*s) 6753 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6754} 6755 6756// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste 6757// dActionDial: Opens the user's default dialer app with the specified 6758// phone number 6759// but does not dial automatically (https://goo.gl/ergbB2). 6760type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial struct { 6761 // PhoneNumber: Required. The phone number to fill in the default dialer 6762 // app. 6763 // This field should be in 6764 // [E.164](https://en.wikipedia.org/wiki/E.164) 6765 // format. An example of a correctly formatted phone 6766 // number: 6767 // +15556767888. 6768 PhoneNumber string `json:"phoneNumber,omitempty"` 6769 6770 // ForceSendFields is a list of field names (e.g. "PhoneNumber") to 6771 // unconditionally include in API requests. By default, fields with 6772 // empty values are omitted from API requests. However, any non-pointer, 6773 // non-interface field appearing in ForceSendFields will be sent to the 6774 // server regardless of whether the field is empty or not. This may be 6775 // used to include empty fields in Patch requests. 6776 ForceSendFields []string `json:"-"` 6777 6778 // NullFields is a list of field names (e.g. "PhoneNumber") to include 6779 // in API requests with the JSON null value. By default, fields with 6780 // empty values are omitted from API requests. However, any field with 6781 // an empty value appearing in NullFields will be sent to the server as 6782 // null. It is an error if a field in this list has a non-empty value. 6783 // This may be used to include null fields in Patch requests. 6784 NullFields []string `json:"-"` 6785} 6786 6787func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial) MarshalJSON() ([]byte, error) { 6788 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial 6789 raw := NoMethod(*s) 6790 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6791} 6792 6793// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste 6794// dActionOpenUri: Opens the user's default web browser app to the 6795// specified uri 6796// (https://goo.gl/6GLJD2). If the user has an app installed that 6797// is 6798// registered as the default handler for the URL, then this app will 6799// be 6800// opened instead, and its icon will be used in the suggested action UI. 6801type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri struct { 6802 // Uri: Required. The uri to open on the user device 6803 Uri string `json:"uri,omitempty"` 6804 6805 // ForceSendFields is a list of field names (e.g. "Uri") to 6806 // unconditionally include in API requests. By default, fields with 6807 // empty values are omitted from API requests. However, any non-pointer, 6808 // non-interface field appearing in ForceSendFields will be sent to the 6809 // server regardless of whether the field is empty or not. This may be 6810 // used to include empty fields in Patch requests. 6811 ForceSendFields []string `json:"-"` 6812 6813 // NullFields is a list of field names (e.g. "Uri") to include in API 6814 // requests with the JSON null value. By default, fields with empty 6815 // values are omitted from API requests. However, any field with an 6816 // empty value appearing in NullFields will be sent to the server as 6817 // null. It is an error if a field in this list has a non-empty value. 6818 // This may be used to include null fields in Patch requests. 6819 NullFields []string `json:"-"` 6820} 6821 6822func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri) MarshalJSON() ([]byte, error) { 6823 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri 6824 raw := NoMethod(*s) 6825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6826} 6827 6828// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste 6829// dActionShareLocation: Opens the device's location chooser so the user 6830// can pick a location 6831// to send back to the agent (https://goo.gl/GXotJW). 6832type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation struct { 6833} 6834 6835// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply: Rich 6836// Business Messaging (RBM) suggested reply that the user can 6837// click 6838// instead of typing in their own response. 6839type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply struct { 6840 // PostbackData: Opaque payload that the Dialogflow receives in a user 6841 // event 6842 // when the user taps the suggested reply. This data will be 6843 // also 6844 // forwarded to webhook to allow performing custom business logic. 6845 PostbackData string `json:"postbackData,omitempty"` 6846 6847 // Text: Suggested reply text. 6848 Text string `json:"text,omitempty"` 6849 6850 // ForceSendFields is a list of field names (e.g. "PostbackData") to 6851 // unconditionally include in API requests. By default, fields with 6852 // empty values are omitted from API requests. However, any non-pointer, 6853 // non-interface field appearing in ForceSendFields will be sent to the 6854 // server regardless of whether the field is empty or not. This may be 6855 // used to include empty fields in Patch requests. 6856 ForceSendFields []string `json:"-"` 6857 6858 // NullFields is a list of field names (e.g. "PostbackData") to include 6859 // in API requests with the JSON null value. By default, fields with 6860 // empty values are omitted from API requests. However, any field with 6861 // an empty value appearing in NullFields will be sent to the server as 6862 // null. It is an error if a field in this list has a non-empty value. 6863 // This may be used to include null fields in Patch requests. 6864 NullFields []string `json:"-"` 6865} 6866 6867func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply) MarshalJSON() ([]byte, error) { 6868 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply 6869 raw := NoMethod(*s) 6870 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6871} 6872 6873// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion: Rich Business 6874// Messaging (RBM) suggestion. Suggestions allow user to 6875// easily select/click a predefined response or perform an action 6876// (like 6877// opening a web uri). 6878type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion struct { 6879 // Action: Predefined client side actions that user can choose 6880 Action *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction `json:"action,omitempty"` 6881 6882 // Reply: Predefined replies for user to select instead of typing 6883 Reply *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply `json:"reply,omitempty"` 6884 6885 // ForceSendFields is a list of field names (e.g. "Action") to 6886 // unconditionally include in API requests. By default, fields with 6887 // empty values are omitted from API requests. However, any non-pointer, 6888 // non-interface field appearing in ForceSendFields will be sent to the 6889 // server regardless of whether the field is empty or not. This may be 6890 // used to include empty fields in Patch requests. 6891 ForceSendFields []string `json:"-"` 6892 6893 // NullFields is a list of field names (e.g. "Action") to include in API 6894 // requests with the JSON null value. By default, fields with empty 6895 // values are omitted from API requests. However, any field with an 6896 // empty value appearing in NullFields will be sent to the server as 6897 // null. It is an error if a field in this list has a non-empty value. 6898 // This may be used to include null fields in Patch requests. 6899 NullFields []string `json:"-"` 6900} 6901 6902func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion) MarshalJSON() ([]byte, error) { 6903 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion 6904 raw := NoMethod(*s) 6905 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6906} 6907 6908// GoogleCloudDialogflowV2beta1IntentMessageRbmText: Rich Business 6909// Messaging (RBM) text response with suggestions. 6910type GoogleCloudDialogflowV2beta1IntentMessageRbmText struct { 6911 // RbmSuggestion: Optional. One or more suggestions to show to the user. 6912 RbmSuggestion []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"rbmSuggestion,omitempty"` 6913 6914 // Text: Required. Text sent and displayed to the user. 6915 Text string `json:"text,omitempty"` 6916 6917 // ForceSendFields is a list of field names (e.g. "RbmSuggestion") to 6918 // unconditionally include in API requests. By default, fields with 6919 // empty values are omitted from API requests. However, any non-pointer, 6920 // non-interface field appearing in ForceSendFields will be sent to the 6921 // server regardless of whether the field is empty or not. This may be 6922 // used to include empty fields in Patch requests. 6923 ForceSendFields []string `json:"-"` 6924 6925 // NullFields is a list of field names (e.g. "RbmSuggestion") to include 6926 // in API requests with the JSON null value. By default, fields with 6927 // empty values are omitted from API requests. However, any field with 6928 // an empty value appearing in NullFields will be sent to the server as 6929 // null. It is an error if a field in this list has a non-empty value. 6930 // This may be used to include null fields in Patch requests. 6931 NullFields []string `json:"-"` 6932} 6933 6934func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmText) MarshalJSON() ([]byte, error) { 6935 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmText 6936 raw := NoMethod(*s) 6937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6938} 6939 6940// GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo: Additional 6941// info about the select item for when it is triggered in a 6942// dialog. 6943type GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo struct { 6944 // Key: Required. A unique key that will be sent back to the agent if 6945 // this 6946 // response is given. 6947 Key string `json:"key,omitempty"` 6948 6949 // Synonyms: Optional. A list of synonyms that can also be used to 6950 // trigger this 6951 // item in dialog. 6952 Synonyms []string `json:"synonyms,omitempty"` 6953 6954 // ForceSendFields is a list of field names (e.g. "Key") to 6955 // unconditionally include in API requests. By default, fields with 6956 // empty values are omitted from API requests. However, any non-pointer, 6957 // non-interface field appearing in ForceSendFields will be sent to the 6958 // server regardless of whether the field is empty or not. This may be 6959 // used to include empty fields in Patch requests. 6960 ForceSendFields []string `json:"-"` 6961 6962 // NullFields is a list of field names (e.g. "Key") to include in API 6963 // requests with the JSON null value. By default, fields with empty 6964 // values are omitted from API requests. However, any field with an 6965 // empty value appearing in NullFields will be sent to the server as 6966 // null. It is an error if a field in this list has a non-empty value. 6967 // This may be used to include null fields in Patch requests. 6968 NullFields []string `json:"-"` 6969} 6970 6971func (s *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) { 6972 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo 6973 raw := NoMethod(*s) 6974 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6975} 6976 6977// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse: The simple 6978// response message containing speech or text. 6979type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse struct { 6980 // DisplayText: Optional. The text to display. 6981 DisplayText string `json:"displayText,omitempty"` 6982 6983 // Ssml: One of text_to_speech or ssml must be provided. Structured 6984 // spoken 6985 // response to the user in the SSML format. Mutually exclusive 6986 // with 6987 // text_to_speech. 6988 Ssml string `json:"ssml,omitempty"` 6989 6990 // TextToSpeech: One of text_to_speech or ssml must be provided. The 6991 // plain text of the 6992 // speech output. Mutually exclusive with ssml. 6993 TextToSpeech string `json:"textToSpeech,omitempty"` 6994 6995 // ForceSendFields is a list of field names (e.g. "DisplayText") to 6996 // unconditionally include in API requests. By default, fields with 6997 // empty values are omitted from API requests. However, any non-pointer, 6998 // non-interface field appearing in ForceSendFields will be sent to the 6999 // server regardless of whether the field is empty or not. This may be 7000 // used to include empty fields in Patch requests. 7001 ForceSendFields []string `json:"-"` 7002 7003 // NullFields is a list of field names (e.g. "DisplayText") to include 7004 // in API requests with the JSON null value. By default, fields with 7005 // empty values are omitted from API requests. However, any field with 7006 // an empty value appearing in NullFields will be sent to the server as 7007 // null. It is an error if a field in this list has a non-empty value. 7008 // This may be used to include null fields in Patch requests. 7009 NullFields []string `json:"-"` 7010} 7011 7012func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) { 7013 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse 7014 raw := NoMethod(*s) 7015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7016} 7017 7018// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses: The 7019// collection of simple response candidates. 7020// This message in `QueryResult.fulfillment_messages` 7021// and 7022// `WebhookResponse.fulfillment_messages` should contain only 7023// one 7024// `SimpleResponse`. 7025type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses struct { 7026 // SimpleResponses: Required. The list of simple responses. 7027 SimpleResponses []*GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse `json:"simpleResponses,omitempty"` 7028 7029 // ForceSendFields is a list of field names (e.g. "SimpleResponses") to 7030 // unconditionally include in API requests. By default, fields with 7031 // empty values are omitted from API requests. However, any non-pointer, 7032 // non-interface field appearing in ForceSendFields will be sent to the 7033 // server regardless of whether the field is empty or not. This may be 7034 // used to include empty fields in Patch requests. 7035 ForceSendFields []string `json:"-"` 7036 7037 // NullFields is a list of field names (e.g. "SimpleResponses") to 7038 // include in API requests with the JSON null value. By default, fields 7039 // with empty values are omitted from API requests. However, any field 7040 // with an empty value appearing in NullFields will be sent to the 7041 // server as null. It is an error if a field in this list has a 7042 // non-empty value. This may be used to include null fields in Patch 7043 // requests. 7044 NullFields []string `json:"-"` 7045} 7046 7047func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) { 7048 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses 7049 raw := NoMethod(*s) 7050 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7051} 7052 7053// GoogleCloudDialogflowV2beta1IntentMessageSuggestion: The suggestion 7054// chip message that the user can tap to quickly post a reply 7055// to the conversation. 7056type GoogleCloudDialogflowV2beta1IntentMessageSuggestion struct { 7057 // Title: Required. The text shown the in the suggestion chip. 7058 Title string `json:"title,omitempty"` 7059 7060 // ForceSendFields is a list of field names (e.g. "Title") to 7061 // unconditionally include in API requests. By default, fields with 7062 // empty values are omitted from API requests. However, any non-pointer, 7063 // non-interface field appearing in ForceSendFields will be sent to the 7064 // server regardless of whether the field is empty or not. This may be 7065 // used to include empty fields in Patch requests. 7066 ForceSendFields []string `json:"-"` 7067 7068 // NullFields is a list of field names (e.g. "Title") to include in API 7069 // requests with the JSON null value. By default, fields with empty 7070 // values are omitted from API requests. However, any field with an 7071 // empty value appearing in NullFields will be sent to the server as 7072 // null. It is an error if a field in this list has a non-empty value. 7073 // This may be used to include null fields in Patch requests. 7074 NullFields []string `json:"-"` 7075} 7076 7077func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestion) MarshalJSON() ([]byte, error) { 7078 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestion 7079 raw := NoMethod(*s) 7080 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7081} 7082 7083// GoogleCloudDialogflowV2beta1IntentMessageSuggestions: The collection 7084// of suggestions. 7085type GoogleCloudDialogflowV2beta1IntentMessageSuggestions struct { 7086 // Suggestions: Required. The list of suggested replies. 7087 Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageSuggestion `json:"suggestions,omitempty"` 7088 7089 // ForceSendFields is a list of field names (e.g. "Suggestions") to 7090 // unconditionally include in API requests. By default, fields with 7091 // empty values are omitted from API requests. However, any non-pointer, 7092 // non-interface field appearing in ForceSendFields will be sent to the 7093 // server regardless of whether the field is empty or not. This may be 7094 // used to include empty fields in Patch requests. 7095 ForceSendFields []string `json:"-"` 7096 7097 // NullFields is a list of field names (e.g. "Suggestions") to include 7098 // in API requests with the JSON null value. By default, fields with 7099 // empty values are omitted from API requests. However, any field with 7100 // an empty value appearing in NullFields will be sent to the server as 7101 // null. It is an error if a field in this list has a non-empty value. 7102 // This may be used to include null fields in Patch requests. 7103 NullFields []string `json:"-"` 7104} 7105 7106func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestions) MarshalJSON() ([]byte, error) { 7107 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestions 7108 raw := NoMethod(*s) 7109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7110} 7111 7112// GoogleCloudDialogflowV2beta1IntentMessageTableCard: Table card for 7113// Actions on Google. 7114type GoogleCloudDialogflowV2beta1IntentMessageTableCard struct { 7115 // Buttons: Optional. List of buttons for the card. 7116 Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"` 7117 7118 // ColumnProperties: Optional. Display properties for the columns in 7119 // this table. 7120 ColumnProperties []*GoogleCloudDialogflowV2beta1IntentMessageColumnProperties `json:"columnProperties,omitempty"` 7121 7122 // Image: Optional. Image which should be displayed on the card. 7123 Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"` 7124 7125 // Rows: Optional. Rows in this table of data. 7126 Rows []*GoogleCloudDialogflowV2beta1IntentMessageTableCardRow `json:"rows,omitempty"` 7127 7128 // Subtitle: Optional. Subtitle to the title. 7129 Subtitle string `json:"subtitle,omitempty"` 7130 7131 // Title: Required. Title of the card. 7132 Title string `json:"title,omitempty"` 7133 7134 // ForceSendFields is a list of field names (e.g. "Buttons") to 7135 // unconditionally include in API requests. By default, fields with 7136 // empty values are omitted from API requests. However, any non-pointer, 7137 // non-interface field appearing in ForceSendFields will be sent to the 7138 // server regardless of whether the field is empty or not. This may be 7139 // used to include empty fields in Patch requests. 7140 ForceSendFields []string `json:"-"` 7141 7142 // NullFields is a list of field names (e.g. "Buttons") to include in 7143 // API requests with the JSON null value. By default, fields with empty 7144 // values are omitted from API requests. However, any field with an 7145 // empty value appearing in NullFields will be sent to the server as 7146 // null. It is an error if a field in this list has a non-empty value. 7147 // This may be used to include null fields in Patch requests. 7148 NullFields []string `json:"-"` 7149} 7150 7151func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCard) MarshalJSON() ([]byte, error) { 7152 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCard 7153 raw := NoMethod(*s) 7154 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7155} 7156 7157// GoogleCloudDialogflowV2beta1IntentMessageTableCardCell: Cell of 7158// TableCardRow. 7159type GoogleCloudDialogflowV2beta1IntentMessageTableCardCell struct { 7160 // Text: Required. Text in this cell. 7161 Text string `json:"text,omitempty"` 7162 7163 // ForceSendFields is a list of field names (e.g. "Text") to 7164 // unconditionally include in API requests. By default, fields with 7165 // empty values are omitted from API requests. However, any non-pointer, 7166 // non-interface field appearing in ForceSendFields will be sent to the 7167 // server regardless of whether the field is empty or not. This may be 7168 // used to include empty fields in Patch requests. 7169 ForceSendFields []string `json:"-"` 7170 7171 // NullFields is a list of field names (e.g. "Text") to include in API 7172 // requests with the JSON null value. By default, fields with empty 7173 // values are omitted from API requests. However, any field with an 7174 // empty value appearing in NullFields will be sent to the server as 7175 // null. It is an error if a field in this list has a non-empty value. 7176 // This may be used to include null fields in Patch requests. 7177 NullFields []string `json:"-"` 7178} 7179 7180func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardCell) MarshalJSON() ([]byte, error) { 7181 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardCell 7182 raw := NoMethod(*s) 7183 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7184} 7185 7186// GoogleCloudDialogflowV2beta1IntentMessageTableCardRow: Row of 7187// TableCard. 7188type GoogleCloudDialogflowV2beta1IntentMessageTableCardRow struct { 7189 // Cells: Optional. List of cells that make up this row. 7190 Cells []*GoogleCloudDialogflowV2beta1IntentMessageTableCardCell `json:"cells,omitempty"` 7191 7192 // DividerAfter: Optional. Whether to add a visual divider after this 7193 // row. 7194 DividerAfter bool `json:"dividerAfter,omitempty"` 7195 7196 // ForceSendFields is a list of field names (e.g. "Cells") to 7197 // unconditionally include in API requests. By default, fields with 7198 // empty values are omitted from API requests. However, any non-pointer, 7199 // non-interface field appearing in ForceSendFields will be sent to the 7200 // server regardless of whether the field is empty or not. This may be 7201 // used to include empty fields in Patch requests. 7202 ForceSendFields []string `json:"-"` 7203 7204 // NullFields is a list of field names (e.g. "Cells") to include in API 7205 // requests with the JSON null value. By default, fields with empty 7206 // values are omitted from API requests. However, any field with an 7207 // empty value appearing in NullFields will be sent to the server as 7208 // null. It is an error if a field in this list has a non-empty value. 7209 // This may be used to include null fields in Patch requests. 7210 NullFields []string `json:"-"` 7211} 7212 7213func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardRow) MarshalJSON() ([]byte, error) { 7214 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardRow 7215 raw := NoMethod(*s) 7216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7217} 7218 7219// GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio: Plays 7220// audio from a file in Telephony Gateway. 7221type GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio struct { 7222 // AudioUri: Required. URI to a Google Cloud Storage object containing 7223 // the audio to 7224 // play, e.g., "gs://bucket/object". The object must contain a 7225 // single 7226 // channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. 7227 // 7228 // This object must be readable by the 7229 // `service-<Project 7230 // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service 7231 // account 7232 // where <Project Number> is the number of the Telephony Gateway 7233 // project 7234 // (usually the same as the Dialogflow agent project). If the Google 7235 // Cloud 7236 // Storage bucket is in the Telephony Gateway project, this permission 7237 // is 7238 // added by default when enabling the Dialogflow V2 API. 7239 // 7240 // For audio from other sources, consider using 7241 // the 7242 // `TelephonySynthesizeSpeech` message with SSML. 7243 AudioUri string `json:"audioUri,omitempty"` 7244 7245 // ForceSendFields is a list of field names (e.g. "AudioUri") to 7246 // unconditionally include in API requests. By default, fields with 7247 // empty values are omitted from API requests. However, any non-pointer, 7248 // non-interface field appearing in ForceSendFields will be sent to the 7249 // server regardless of whether the field is empty or not. This may be 7250 // used to include empty fields in Patch requests. 7251 ForceSendFields []string `json:"-"` 7252 7253 // NullFields is a list of field names (e.g. "AudioUri") to include in 7254 // API requests with the JSON null value. By default, fields with empty 7255 // values are omitted from API requests. However, any field with an 7256 // empty value appearing in NullFields will be sent to the server as 7257 // null. It is an error if a field in this list has a non-empty value. 7258 // This may be used to include null fields in Patch requests. 7259 NullFields []string `json:"-"` 7260} 7261 7262func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio) MarshalJSON() ([]byte, error) { 7263 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio 7264 raw := NoMethod(*s) 7265 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7266} 7267 7268// GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech: 7269// Synthesizes speech and plays back the synthesized audio to the caller 7270// in 7271// Telephony Gateway. 7272// 7273// Telephony Gateway takes the synthesizer settings 7274// from 7275// `DetectIntentResponse.output_audio_config` which can either be set 7276// at request-level or can come from the agent-level synthesizer config. 7277type GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech struct { 7278 // Ssml: The SSML to be synthesized. For more information, 7279 // see 7280 // [SSML](https://developers.google.com/actions/reference/ssml). 7281 Ssml string `json:"ssml,omitempty"` 7282 7283 // Text: The raw text to be synthesized. 7284 Text string `json:"text,omitempty"` 7285 7286 // ForceSendFields is a list of field names (e.g. "Ssml") to 7287 // unconditionally include in API requests. By default, fields with 7288 // empty values are omitted from API requests. However, any non-pointer, 7289 // non-interface field appearing in ForceSendFields will be sent to the 7290 // server regardless of whether the field is empty or not. This may be 7291 // used to include empty fields in Patch requests. 7292 ForceSendFields []string `json:"-"` 7293 7294 // NullFields is a list of field names (e.g. "Ssml") to include in API 7295 // requests with the JSON null value. By default, fields with empty 7296 // values are omitted from API requests. However, any field with an 7297 // empty value appearing in NullFields will be sent to the server as 7298 // null. It is an error if a field in this list has a non-empty value. 7299 // This may be used to include null fields in Patch requests. 7300 NullFields []string `json:"-"` 7301} 7302 7303func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech) MarshalJSON() ([]byte, error) { 7304 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech 7305 raw := NoMethod(*s) 7306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7307} 7308 7309// GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall: 7310// Transfers the call in Telephony Gateway. 7311type GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall struct { 7312 // PhoneNumber: Required. The phone number to transfer the call to 7313 // in [E.164 format](https://en.wikipedia.org/wiki/E.164). 7314 // 7315 // We currently only allow transferring to US numbers (+1xxxyyyzzzz). 7316 PhoneNumber string `json:"phoneNumber,omitempty"` 7317 7318 // ForceSendFields is a list of field names (e.g. "PhoneNumber") to 7319 // unconditionally include in API requests. By default, fields with 7320 // empty values are omitted from API requests. However, any non-pointer, 7321 // non-interface field appearing in ForceSendFields will be sent to the 7322 // server regardless of whether the field is empty or not. This may be 7323 // used to include empty fields in Patch requests. 7324 ForceSendFields []string `json:"-"` 7325 7326 // NullFields is a list of field names (e.g. "PhoneNumber") to include 7327 // in API requests with the JSON null value. By default, fields with 7328 // empty values are omitted from API requests. However, any field with 7329 // an empty value appearing in NullFields will be sent to the server as 7330 // null. It is an error if a field in this list has a non-empty value. 7331 // This may be used to include null fields in Patch requests. 7332 NullFields []string `json:"-"` 7333} 7334 7335func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall) MarshalJSON() ([]byte, error) { 7336 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall 7337 raw := NoMethod(*s) 7338 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7339} 7340 7341// GoogleCloudDialogflowV2beta1IntentMessageText: The text response 7342// message. 7343type GoogleCloudDialogflowV2beta1IntentMessageText struct { 7344 // Text: Optional. The collection of the agent's responses. 7345 Text []string `json:"text,omitempty"` 7346 7347 // ForceSendFields is a list of field names (e.g. "Text") to 7348 // unconditionally include in API requests. By default, fields with 7349 // empty values are omitted from API requests. However, any non-pointer, 7350 // non-interface field appearing in ForceSendFields will be sent to the 7351 // server regardless of whether the field is empty or not. This may be 7352 // used to include empty fields in Patch requests. 7353 ForceSendFields []string `json:"-"` 7354 7355 // NullFields is a list of field names (e.g. "Text") to include in API 7356 // requests with the JSON null value. By default, fields with empty 7357 // values are omitted from API requests. However, any field with an 7358 // empty value appearing in NullFields will be sent to the server as 7359 // null. It is an error if a field in this list has a non-empty value. 7360 // This may be used to include null fields in Patch requests. 7361 NullFields []string `json:"-"` 7362} 7363 7364func (s *GoogleCloudDialogflowV2beta1IntentMessageText) MarshalJSON() ([]byte, error) { 7365 type NoMethod GoogleCloudDialogflowV2beta1IntentMessageText 7366 raw := NoMethod(*s) 7367 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7368} 7369 7370// GoogleCloudDialogflowV2beta1IntentParameter: Represents intent 7371// parameters. 7372type GoogleCloudDialogflowV2beta1IntentParameter struct { 7373 // DefaultValue: Optional. The default value to use when the `value` 7374 // yields an empty 7375 // result. 7376 // Default values can be extracted from contexts by using the 7377 // following 7378 // syntax: `#context_name.parameter_name`. 7379 DefaultValue string `json:"defaultValue,omitempty"` 7380 7381 // DisplayName: Required. The name of the parameter. 7382 DisplayName string `json:"displayName,omitempty"` 7383 7384 // EntityTypeDisplayName: Optional. The name of the entity type, 7385 // prefixed with `@`, that 7386 // describes values of the parameter. If the parameter is 7387 // required, this must be provided. 7388 EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"` 7389 7390 // IsList: Optional. Indicates whether the parameter represents a list 7391 // of values. 7392 IsList bool `json:"isList,omitempty"` 7393 7394 // Mandatory: Optional. Indicates whether the parameter is required. 7395 // That is, 7396 // whether the intent cannot be completed without collecting the 7397 // parameter 7398 // value. 7399 Mandatory bool `json:"mandatory,omitempty"` 7400 7401 // Name: The unique identifier of this parameter. 7402 Name string `json:"name,omitempty"` 7403 7404 // Prompts: Optional. The collection of prompts that the agent can 7405 // present to the 7406 // user in order to collect a value for the parameter. 7407 Prompts []string `json:"prompts,omitempty"` 7408 7409 // Value: Optional. The definition of the parameter value. It can be: 7410 // - a constant string, 7411 // - a parameter value defined as `$parameter_name`, 7412 // - an original parameter value defined as 7413 // `$parameter_name.original`, 7414 // - a parameter value from some context defined as 7415 // `#context_name.parameter_name`. 7416 Value string `json:"value,omitempty"` 7417 7418 // ForceSendFields is a list of field names (e.g. "DefaultValue") to 7419 // unconditionally include in API requests. By default, fields with 7420 // empty values are omitted from API requests. However, any non-pointer, 7421 // non-interface field appearing in ForceSendFields will be sent to the 7422 // server regardless of whether the field is empty or not. This may be 7423 // used to include empty fields in Patch requests. 7424 ForceSendFields []string `json:"-"` 7425 7426 // NullFields is a list of field names (e.g. "DefaultValue") to include 7427 // in API requests with the JSON null value. By default, fields with 7428 // empty values are omitted from API requests. However, any field with 7429 // an empty value appearing in NullFields will be sent to the server as 7430 // null. It is an error if a field in this list has a non-empty value. 7431 // This may be used to include null fields in Patch requests. 7432 NullFields []string `json:"-"` 7433} 7434 7435func (s *GoogleCloudDialogflowV2beta1IntentParameter) MarshalJSON() ([]byte, error) { 7436 type NoMethod GoogleCloudDialogflowV2beta1IntentParameter 7437 raw := NoMethod(*s) 7438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7439} 7440 7441// GoogleCloudDialogflowV2beta1IntentTrainingPhrase: Represents an 7442// example that the agent is trained on. 7443type GoogleCloudDialogflowV2beta1IntentTrainingPhrase struct { 7444 // Name: Output only. The unique identifier of this training phrase. 7445 Name string `json:"name,omitempty"` 7446 7447 // Parts: Required. The ordered list of training phrase parts. 7448 // The parts are concatenated in order to form the training 7449 // phrase. 7450 // 7451 // Note: The API does not automatically annotate training phrases like 7452 // the 7453 // Dialogflow Console does. 7454 // 7455 // Note: Do not forget to include whitespace at part boundaries, 7456 // so the training phrase is well formatted when the parts are 7457 // concatenated. 7458 // 7459 // If the training phrase does not need to be annotated with 7460 // parameters, 7461 // you just need a single part with only the Part.text field set. 7462 // 7463 // If you want to annotate the training phrase, you must create 7464 // multiple 7465 // parts, where the fields of each part are populated in one of two 7466 // ways: 7467 // 7468 // - `Part.text` is set to a part of the phrase that has no 7469 // parameters. 7470 // - `Part.text` is set to a part of the phrase that you want to 7471 // annotate, 7472 // and the `entity_type`, `alias`, and `user_defined` fields are 7473 // all 7474 // set. 7475 Parts []*GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart `json:"parts,omitempty"` 7476 7477 // TimesAddedCount: Optional. Indicates how many times this example was 7478 // added to 7479 // the intent. Each time a developer adds an existing sample by editing 7480 // an 7481 // intent or training, this counter is increased. 7482 TimesAddedCount int64 `json:"timesAddedCount,omitempty"` 7483 7484 // Type: Required. The type of the training phrase. 7485 // 7486 // Possible values: 7487 // "TYPE_UNSPECIFIED" - Not specified. This value should never be 7488 // used. 7489 // "EXAMPLE" - Examples do not contain @-prefixed entity type names, 7490 // but example parts 7491 // can be annotated with entity types. 7492 // "TEMPLATE" - Templates are not annotated with entity types, but 7493 // they can contain 7494 // @-prefixed entity type names as substrings. 7495 // Template mode has been deprecated. Example mode is the only 7496 // supported 7497 // way to create new training phrases. If you have existing 7498 // training 7499 // phrases that you've created in template mode, those will continue 7500 // to 7501 // work. 7502 Type string `json:"type,omitempty"` 7503 7504 // ForceSendFields is a list of field names (e.g. "Name") to 7505 // unconditionally include in API requests. By default, fields with 7506 // empty values are omitted from API requests. However, any non-pointer, 7507 // non-interface field appearing in ForceSendFields will be sent to the 7508 // server regardless of whether the field is empty or not. This may be 7509 // used to include empty fields in Patch requests. 7510 ForceSendFields []string `json:"-"` 7511 7512 // NullFields is a list of field names (e.g. "Name") to include in API 7513 // requests with the JSON null value. By default, fields with empty 7514 // values are omitted from API requests. However, any field with an 7515 // empty value appearing in NullFields will be sent to the server as 7516 // null. It is an error if a field in this list has a non-empty value. 7517 // This may be used to include null fields in Patch requests. 7518 NullFields []string `json:"-"` 7519} 7520 7521func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrase) MarshalJSON() ([]byte, error) { 7522 type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrase 7523 raw := NoMethod(*s) 7524 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7525} 7526 7527// GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart: Represents a 7528// part of a training phrase. 7529type GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart struct { 7530 // Alias: Optional. The parameter name for the value extracted from 7531 // the 7532 // annotated part of the example. 7533 // This field is required for annotated parts of the training phrase. 7534 Alias string `json:"alias,omitempty"` 7535 7536 // EntityType: Optional. The entity type name prefixed with `@`. 7537 // This field is required for annotated parts of the training phrase. 7538 EntityType string `json:"entityType,omitempty"` 7539 7540 // Text: Required. The text for this part. 7541 Text string `json:"text,omitempty"` 7542 7543 // UserDefined: Optional. Indicates whether the text was manually 7544 // annotated. 7545 // This field is set to true when the Dialogflow Console is used 7546 // to 7547 // manually annotate the part. When creating an annotated part with 7548 // the 7549 // API, you must set this to true. 7550 UserDefined bool `json:"userDefined,omitempty"` 7551 7552 // ForceSendFields is a list of field names (e.g. "Alias") to 7553 // unconditionally include in API requests. By default, fields with 7554 // empty values are omitted from API requests. However, any non-pointer, 7555 // non-interface field appearing in ForceSendFields will be sent to the 7556 // server regardless of whether the field is empty or not. This may be 7557 // used to include empty fields in Patch requests. 7558 ForceSendFields []string `json:"-"` 7559 7560 // NullFields is a list of field names (e.g. "Alias") to include in API 7561 // requests with the JSON null value. By default, fields with empty 7562 // values are omitted from API requests. However, any field with an 7563 // empty value appearing in NullFields will be sent to the server as 7564 // null. It is an error if a field in this list has a non-empty value. 7565 // This may be used to include null fields in Patch requests. 7566 NullFields []string `json:"-"` 7567} 7568 7569func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) { 7570 type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart 7571 raw := NoMethod(*s) 7572 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7573} 7574 7575// GoogleCloudDialogflowV2beta1KnowledgeAnswers: Represents the result 7576// of querying a Knowledge base. 7577type GoogleCloudDialogflowV2beta1KnowledgeAnswers struct { 7578 // Answers: A list of answers from Knowledge Connector. 7579 Answers []*GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer `json:"answers,omitempty"` 7580 7581 // ForceSendFields is a list of field names (e.g. "Answers") to 7582 // unconditionally include in API requests. By default, fields with 7583 // empty values are omitted from API requests. However, any non-pointer, 7584 // non-interface field appearing in ForceSendFields will be sent to the 7585 // server regardless of whether the field is empty or not. This may be 7586 // used to include empty fields in Patch requests. 7587 ForceSendFields []string `json:"-"` 7588 7589 // NullFields is a list of field names (e.g. "Answers") to include in 7590 // API requests with the JSON null value. By default, fields with empty 7591 // values are omitted from API requests. However, any field with an 7592 // empty value appearing in NullFields will be sent to the server as 7593 // null. It is an error if a field in this list has a non-empty value. 7594 // This may be used to include null fields in Patch requests. 7595 NullFields []string `json:"-"` 7596} 7597 7598func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswers) MarshalJSON() ([]byte, error) { 7599 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswers 7600 raw := NoMethod(*s) 7601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7602} 7603 7604// GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer: An answer from 7605// Knowledge Connector. 7606type GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer struct { 7607 // Answer: The piece of text from the `source` knowledge base document 7608 // that answers 7609 // this conversational query. 7610 Answer string `json:"answer,omitempty"` 7611 7612 // FaqQuestion: The corresponding FAQ question if the answer was 7613 // extracted from a FAQ 7614 // Document, empty otherwise. 7615 FaqQuestion string `json:"faqQuestion,omitempty"` 7616 7617 // MatchConfidence: The system's confidence score that this Knowledge 7618 // answer is a good match 7619 // for this conversational query. 7620 // The range is from 0.0 (completely uncertain) to 1.0 (completely 7621 // certain). 7622 // Note: The confidence score is likely to vary somewhat (possibly even 7623 // for 7624 // identical requests), as the underlying model is under 7625 // constant 7626 // improvement. It may be deprecated in the future. We recommend 7627 // using 7628 // `match_confidence_level` which should be generally more stable. 7629 MatchConfidence float64 `json:"matchConfidence,omitempty"` 7630 7631 // MatchConfidenceLevel: The system's confidence level that this 7632 // knowledge answer is a good match 7633 // for this conversational query. 7634 // NOTE: The confidence level for a given `<query, answer>` pair may 7635 // change 7636 // without notice, as it depends on models that are constantly 7637 // being 7638 // improved. However, it will change less frequently than the 7639 // confidence 7640 // score below, and should be preferred for referencing the quality of 7641 // an 7642 // answer. 7643 // 7644 // Possible values: 7645 // "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED" - Not specified. 7646 // "LOW" - Indicates that the confidence is low. 7647 // "MEDIUM" - Indicates our confidence is medium. 7648 // "HIGH" - Indicates our confidence is high. 7649 MatchConfidenceLevel string `json:"matchConfidenceLevel,omitempty"` 7650 7651 // Source: Indicates which Knowledge Document this answer was extracted 7652 // from. 7653 // Format: `projects/<Project ID>/knowledgeBases/<Knowledge 7654 // Base 7655 // ID>/documents/<Document ID>`. 7656 Source string `json:"source,omitempty"` 7657 7658 // ForceSendFields is a list of field names (e.g. "Answer") to 7659 // unconditionally include in API requests. By default, fields with 7660 // empty values are omitted from API requests. However, any non-pointer, 7661 // non-interface field appearing in ForceSendFields will be sent to the 7662 // server regardless of whether the field is empty or not. This may be 7663 // used to include empty fields in Patch requests. 7664 ForceSendFields []string `json:"-"` 7665 7666 // NullFields is a list of field names (e.g. "Answer") to include in API 7667 // requests with the JSON null value. By default, fields with empty 7668 // values are omitted from API requests. However, any field with an 7669 // empty value appearing in NullFields will be sent to the server as 7670 // null. It is an error if a field in this list has a non-empty value. 7671 // This may be used to include null fields in Patch requests. 7672 NullFields []string `json:"-"` 7673} 7674 7675func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) MarshalJSON() ([]byte, error) { 7676 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer 7677 raw := NoMethod(*s) 7678 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7679} 7680 7681func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) UnmarshalJSON(data []byte) error { 7682 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer 7683 var s1 struct { 7684 MatchConfidence gensupport.JSONFloat64 `json:"matchConfidence"` 7685 *NoMethod 7686 } 7687 s1.NoMethod = (*NoMethod)(s) 7688 if err := json.Unmarshal(data, &s1); err != nil { 7689 return err 7690 } 7691 s.MatchConfidence = float64(s1.MatchConfidence) 7692 return nil 7693} 7694 7695// GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata: Metadata in 7696// google::longrunning::Operation for Knowledge operations. 7697type GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata struct { 7698 // State: Required. The current state of this operation. 7699 // 7700 // Possible values: 7701 // "STATE_UNSPECIFIED" - State unspecified. 7702 // "PENDING" - The operation has been created. 7703 // "RUNNING" - The operation is currently running. 7704 // "DONE" - The operation is done, either cancelled or completed. 7705 State string `json:"state,omitempty"` 7706 7707 // ForceSendFields is a list of field names (e.g. "State") to 7708 // unconditionally include in API requests. By default, fields with 7709 // empty values are omitted from API requests. However, any non-pointer, 7710 // non-interface field appearing in ForceSendFields will be sent to the 7711 // server regardless of whether the field is empty or not. This may be 7712 // used to include empty fields in Patch requests. 7713 ForceSendFields []string `json:"-"` 7714 7715 // NullFields is a list of field names (e.g. "State") to include in API 7716 // requests with the JSON null value. By default, fields with empty 7717 // values are omitted from API requests. However, any field with an 7718 // empty value appearing in NullFields will be sent to the server as 7719 // null. It is an error if a field in this list has a non-empty value. 7720 // This may be used to include null fields in Patch requests. 7721 NullFields []string `json:"-"` 7722} 7723 7724func (s *GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { 7725 type NoMethod GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata 7726 raw := NoMethod(*s) 7727 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7728} 7729 7730// GoogleCloudDialogflowV2beta1LabelConversationResponse: The response 7731// for 7732// ConversationDatasets.LabelConversation. 7733type GoogleCloudDialogflowV2beta1LabelConversationResponse struct { 7734 // AnnotatedConversationDataset: New annotated conversation dataset 7735 // created by the labeling task. 7736 AnnotatedConversationDataset *GoogleCloudDialogflowV2beta1AnnotatedConversationDataset `json:"annotatedConversationDataset,omitempty"` 7737 7738 // ForceSendFields is a list of field names (e.g. 7739 // "AnnotatedConversationDataset") to unconditionally include in API 7740 // requests. By default, fields with empty values are omitted from API 7741 // requests. However, any non-pointer, non-interface field appearing in 7742 // ForceSendFields will be sent to the server regardless of whether the 7743 // field is empty or not. This may be used to include empty fields in 7744 // Patch requests. 7745 ForceSendFields []string `json:"-"` 7746 7747 // NullFields is a list of field names (e.g. 7748 // "AnnotatedConversationDataset") to include in API requests with the 7749 // JSON null value. By default, fields with empty values are omitted 7750 // from API requests. However, any field with an empty value appearing 7751 // in NullFields will be sent to the server as null. It is an error if a 7752 // field in this list has a non-empty value. This may be used to include 7753 // null fields in Patch requests. 7754 NullFields []string `json:"-"` 7755} 7756 7757func (s *GoogleCloudDialogflowV2beta1LabelConversationResponse) MarshalJSON() ([]byte, error) { 7758 type NoMethod GoogleCloudDialogflowV2beta1LabelConversationResponse 7759 raw := NoMethod(*s) 7760 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7761} 7762 7763// GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest: Represents 7764// the contents of the original request that was passed to 7765// the `[Streaming]DetectIntent` call. 7766type GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest struct { 7767 // Payload: Optional. This field is set to the value of the 7768 // `QueryParameters.payload` 7769 // field passed in the request. Some integrations that query a 7770 // Dialogflow 7771 // agent may provide additional information in the payload. 7772 // 7773 // In particular for the Telephony Gateway this field has the 7774 // form: 7775 // <pre>{ 7776 // "telephony": { 7777 // "caller_id": "+18558363987" 7778 // } 7779 // }</pre> 7780 // Note: The caller ID field (`caller_id`) will be redacted for 7781 // Standard 7782 // Edition agents and populated with the caller ID in 7783 // [E.164 7784 // format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition 7785 // agents. 7786 Payload googleapi.RawMessage `json:"payload,omitempty"` 7787 7788 // Source: The source of this request, e.g., `google`, `facebook`, 7789 // `slack`. It is set 7790 // by Dialogflow-owned servers. 7791 Source string `json:"source,omitempty"` 7792 7793 // Version: Optional. The version of the protocol used for this 7794 // request. 7795 // This field is AoG-specific. 7796 Version string `json:"version,omitempty"` 7797 7798 // ForceSendFields is a list of field names (e.g. "Payload") to 7799 // unconditionally include in API requests. By default, fields with 7800 // empty values are omitted from API requests. However, any non-pointer, 7801 // non-interface field appearing in ForceSendFields will be sent to the 7802 // server regardless of whether the field is empty or not. This may be 7803 // used to include empty fields in Patch requests. 7804 ForceSendFields []string `json:"-"` 7805 7806 // NullFields is a list of field names (e.g. "Payload") to include in 7807 // API requests with the JSON null value. By default, fields with empty 7808 // values are omitted from API requests. However, any field with an 7809 // empty value appearing in NullFields will be sent to the server as 7810 // null. It is an error if a field in this list has a non-empty value. 7811 // This may be used to include null fields in Patch requests. 7812 NullFields []string `json:"-"` 7813} 7814 7815func (s *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) { 7816 type NoMethod GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest 7817 raw := NoMethod(*s) 7818 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7819} 7820 7821// GoogleCloudDialogflowV2beta1QueryResult: Represents the result of 7822// conversational query or event processing. 7823type GoogleCloudDialogflowV2beta1QueryResult struct { 7824 // Action: The action name from the matched intent. 7825 Action string `json:"action,omitempty"` 7826 7827 // AllRequiredParamsPresent: This field is set to: 7828 // 7829 // - `false` if the matched intent has required parameters and not all 7830 // of 7831 // the required parameter values have been collected. 7832 // - `true` if all required parameter values have been collected, or if 7833 // the 7834 // matched intent doesn't contain any required parameters. 7835 AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"` 7836 7837 // DiagnosticInfo: Free-form diagnostic information for the associated 7838 // detect intent request. 7839 // The fields of this data can change without notice, so you should not 7840 // write 7841 // code that depends on its structure. 7842 // The data may contain: 7843 // 7844 // - webhook call latency 7845 // - webhook errors 7846 DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"` 7847 7848 // FulfillmentMessages: The collection of rich messages to present to 7849 // the user. 7850 FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"` 7851 7852 // FulfillmentText: The text to be pronounced to the user or shown on 7853 // the screen. 7854 // Note: This is a legacy field, `fulfillment_messages` should be 7855 // preferred. 7856 FulfillmentText string `json:"fulfillmentText,omitempty"` 7857 7858 // Intent: The intent that matched the conversational query. Some, 7859 // not 7860 // all fields are filled in this message, including but not limited 7861 // to: 7862 // `name`, `display_name`, `end_interaction` and `is_fallback`. 7863 Intent *GoogleCloudDialogflowV2beta1Intent `json:"intent,omitempty"` 7864 7865 // IntentDetectionConfidence: The intent detection confidence. Values 7866 // range from 0.0 7867 // (completely uncertain) to 1.0 (completely certain). 7868 // This value is for informational purpose only and is only used to 7869 // help match the best intent within the classification threshold. 7870 // This value may change for the same end-user expression at any time 7871 // due to a 7872 // model retraining or change in implementation. 7873 // If there are `multiple knowledge_answers` messages, this value is set 7874 // to 7875 // the greatest `knowledgeAnswers.match_confidence` value in the list. 7876 IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"` 7877 7878 // KnowledgeAnswers: The result from Knowledge Connector (if any), 7879 // ordered by decreasing 7880 // `KnowledgeAnswers.match_confidence`. 7881 KnowledgeAnswers *GoogleCloudDialogflowV2beta1KnowledgeAnswers `json:"knowledgeAnswers,omitempty"` 7882 7883 // LanguageCode: The language that was triggered during intent 7884 // detection. 7885 // See 7886 // [Language 7887 // Support](https://cloud.google.com/dialogflow/docs/reference/ 7888 // language) 7889 // for a list of the currently supported language codes. 7890 LanguageCode string `json:"languageCode,omitempty"` 7891 7892 // OutputContexts: The collection of output contexts. If 7893 // applicable, 7894 // `output_contexts.parameters` contains entries with name 7895 // `<parameter name>.original` containing the original parameter 7896 // values 7897 // before the query. 7898 OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"` 7899 7900 // Parameters: The collection of extracted parameters. 7901 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 7902 7903 // QueryText: The original conversational query text: 7904 // 7905 // - If natural language text was provided as input, `query_text` 7906 // contains 7907 // a copy of the input. 7908 // - If natural language speech audio was provided as input, 7909 // `query_text` 7910 // contains the speech recognition result. If speech recognizer 7911 // produced 7912 // multiple alternatives, a particular one is picked. 7913 // - If automatic spell correction is enabled, `query_text` will contain 7914 // the 7915 // corrected user input. 7916 QueryText string `json:"queryText,omitempty"` 7917 7918 // SentimentAnalysisResult: The sentiment analysis result, which depends 7919 // on the 7920 // `sentiment_analysis_request_config` specified in the request. 7921 SentimentAnalysisResult *GoogleCloudDialogflowV2beta1SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"` 7922 7923 // SpeechRecognitionConfidence: The Speech recognition confidence 7924 // between 0.0 and 1.0. A higher number 7925 // indicates an estimated greater likelihood that the recognized words 7926 // are 7927 // correct. The default of 0.0 is a sentinel value indicating that 7928 // confidence 7929 // was not set. 7930 // 7931 // This field is not guaranteed to be accurate or set. In particular 7932 // this 7933 // field isn't set for StreamingDetectIntent since the streaming 7934 // endpoint has 7935 // separate confidence estimates per portion of the audio 7936 // in 7937 // StreamingRecognitionResult. 7938 SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"` 7939 7940 // WebhookPayload: If the query was fulfilled by a webhook call, this 7941 // field is set to the 7942 // value of the `payload` field returned in the webhook response. 7943 WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"` 7944 7945 // WebhookSource: If the query was fulfilled by a webhook call, this 7946 // field is set to the 7947 // value of the `source` field returned in the webhook response. 7948 WebhookSource string `json:"webhookSource,omitempty"` 7949 7950 // ForceSendFields is a list of field names (e.g. "Action") to 7951 // unconditionally include in API requests. By default, fields with 7952 // empty values are omitted from API requests. However, any non-pointer, 7953 // non-interface field appearing in ForceSendFields will be sent to the 7954 // server regardless of whether the field is empty or not. This may be 7955 // used to include empty fields in Patch requests. 7956 ForceSendFields []string `json:"-"` 7957 7958 // NullFields is a list of field names (e.g. "Action") to include in API 7959 // requests with the JSON null value. By default, fields with empty 7960 // values are omitted from API requests. However, any field with an 7961 // empty value appearing in NullFields will be sent to the server as 7962 // null. It is an error if a field in this list has a non-empty value. 7963 // This may be used to include null fields in Patch requests. 7964 NullFields []string `json:"-"` 7965} 7966 7967func (s *GoogleCloudDialogflowV2beta1QueryResult) MarshalJSON() ([]byte, error) { 7968 type NoMethod GoogleCloudDialogflowV2beta1QueryResult 7969 raw := NoMethod(*s) 7970 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7971} 7972 7973func (s *GoogleCloudDialogflowV2beta1QueryResult) UnmarshalJSON(data []byte) error { 7974 type NoMethod GoogleCloudDialogflowV2beta1QueryResult 7975 var s1 struct { 7976 IntentDetectionConfidence gensupport.JSONFloat64 `json:"intentDetectionConfidence"` 7977 SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"` 7978 *NoMethod 7979 } 7980 s1.NoMethod = (*NoMethod)(s) 7981 if err := json.Unmarshal(data, &s1); err != nil { 7982 return err 7983 } 7984 s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence) 7985 s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence) 7986 return nil 7987} 7988 7989// GoogleCloudDialogflowV2beta1Sentiment: The sentiment, such as 7990// positive/negative feeling or association, for a unit 7991// of analysis, such as the query text. 7992type GoogleCloudDialogflowV2beta1Sentiment struct { 7993 // Magnitude: A non-negative number in the [0, +inf) range, which 7994 // represents the absolute 7995 // magnitude of sentiment, regardless of score (positive or negative). 7996 Magnitude float64 `json:"magnitude,omitempty"` 7997 7998 // Score: Sentiment score between -1.0 (negative sentiment) and 1.0 7999 // (positive 8000 // sentiment). 8001 Score float64 `json:"score,omitempty"` 8002 8003 // ForceSendFields is a list of field names (e.g. "Magnitude") to 8004 // unconditionally include in API requests. By default, fields with 8005 // empty values are omitted from API requests. However, any non-pointer, 8006 // non-interface field appearing in ForceSendFields will be sent to the 8007 // server regardless of whether the field is empty or not. This may be 8008 // used to include empty fields in Patch requests. 8009 ForceSendFields []string `json:"-"` 8010 8011 // NullFields is a list of field names (e.g. "Magnitude") to include in 8012 // API requests with the JSON null value. By default, fields with empty 8013 // values are omitted from API requests. However, any field with an 8014 // empty value appearing in NullFields will be sent to the server as 8015 // null. It is an error if a field in this list has a non-empty value. 8016 // This may be used to include null fields in Patch requests. 8017 NullFields []string `json:"-"` 8018} 8019 8020func (s *GoogleCloudDialogflowV2beta1Sentiment) MarshalJSON() ([]byte, error) { 8021 type NoMethod GoogleCloudDialogflowV2beta1Sentiment 8022 raw := NoMethod(*s) 8023 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8024} 8025 8026func (s *GoogleCloudDialogflowV2beta1Sentiment) UnmarshalJSON(data []byte) error { 8027 type NoMethod GoogleCloudDialogflowV2beta1Sentiment 8028 var s1 struct { 8029 Magnitude gensupport.JSONFloat64 `json:"magnitude"` 8030 Score gensupport.JSONFloat64 `json:"score"` 8031 *NoMethod 8032 } 8033 s1.NoMethod = (*NoMethod)(s) 8034 if err := json.Unmarshal(data, &s1); err != nil { 8035 return err 8036 } 8037 s.Magnitude = float64(s1.Magnitude) 8038 s.Score = float64(s1.Score) 8039 return nil 8040} 8041 8042// GoogleCloudDialogflowV2beta1SentimentAnalysisResult: The result of 8043// sentiment analysis as configured 8044// by 8045// `sentiment_analysis_request_config`. 8046type GoogleCloudDialogflowV2beta1SentimentAnalysisResult struct { 8047 // QueryTextSentiment: The sentiment analysis result for `query_text`. 8048 QueryTextSentiment *GoogleCloudDialogflowV2beta1Sentiment `json:"queryTextSentiment,omitempty"` 8049 8050 // ForceSendFields is a list of field names (e.g. "QueryTextSentiment") 8051 // to unconditionally include in API requests. By default, fields with 8052 // empty values are omitted from API requests. However, any non-pointer, 8053 // non-interface field appearing in ForceSendFields will be sent to the 8054 // server regardless of whether the field is empty or not. This may be 8055 // used to include empty fields in Patch requests. 8056 ForceSendFields []string `json:"-"` 8057 8058 // NullFields is a list of field names (e.g. "QueryTextSentiment") to 8059 // include in API requests with the JSON null value. By default, fields 8060 // with empty values are omitted from API requests. However, any field 8061 // with an empty value appearing in NullFields will be sent to the 8062 // server as null. It is an error if a field in this list has a 8063 // non-empty value. This may be used to include null fields in Patch 8064 // requests. 8065 NullFields []string `json:"-"` 8066} 8067 8068func (s *GoogleCloudDialogflowV2beta1SentimentAnalysisResult) MarshalJSON() ([]byte, error) { 8069 type NoMethod GoogleCloudDialogflowV2beta1SentimentAnalysisResult 8070 raw := NoMethod(*s) 8071 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8072} 8073 8074// GoogleCloudDialogflowV2beta1SessionEntityType: Represents a session 8075// entity type. 8076// 8077// Extends or replaces a custom entity type at the user session level 8078// (we 8079// refer to the entity types defined at the agent level as "custom 8080// entity 8081// types"). 8082// 8083// Note: session entity types apply to all queries, regardless of the 8084// language. 8085type GoogleCloudDialogflowV2beta1SessionEntityType struct { 8086 // Entities: Required. The collection of entities associated with this 8087 // session entity 8088 // type. 8089 Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"` 8090 8091 // EntityOverrideMode: Required. Indicates whether the additional data 8092 // should override or 8093 // supplement the custom entity type definition. 8094 // 8095 // Possible values: 8096 // "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value 8097 // should be never used. 8098 // "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session 8099 // entities overrides the collection of entities 8100 // in the corresponding custom entity type. 8101 // "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session 8102 // entities extends the collection of entities in 8103 // the corresponding custom entity type. 8104 // 8105 // Note: Even in this override mode calls to 8106 // `ListSessionEntityTypes`, 8107 // `GetSessionEntityType`, `CreateSessionEntityType` 8108 // and 8109 // `UpdateSessionEntityType` only return the additional entities added 8110 // in 8111 // this session entity type. If you want to get the supplemented 8112 // list, 8113 // please call EntityTypes.GetEntityType on the custom entity type 8114 // and merge. 8115 EntityOverrideMode string `json:"entityOverrideMode,omitempty"` 8116 8117 // Name: Required. The unique identifier of this session entity type. 8118 // Format: 8119 // `projects/<Project ID>/agent/sessions/<Session 8120 // ID>/entityTypes/<Entity Type 8121 // Display Name>`, or 8122 // `projects/<Project ID>/agent/environments/<Environment 8123 // ID>/users/<User 8124 // ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. 8125 // If `Environment ID` is not specified, we assume default 8126 // 'draft' 8127 // environment. If `User ID` is not specified, we assume default '-' 8128 // user. 8129 // 8130 // `<Entity Type Display Name>` must be the display name of an existing 8131 // entity 8132 // type in the same agent that will be overridden or supplemented. 8133 Name string `json:"name,omitempty"` 8134 8135 // ForceSendFields is a list of field names (e.g. "Entities") to 8136 // unconditionally include in API requests. By default, fields with 8137 // empty values are omitted from API requests. However, any non-pointer, 8138 // non-interface field appearing in ForceSendFields will be sent to the 8139 // server regardless of whether the field is empty or not. This may be 8140 // used to include empty fields in Patch requests. 8141 ForceSendFields []string `json:"-"` 8142 8143 // NullFields is a list of field names (e.g. "Entities") to include in 8144 // API requests with the JSON null value. By default, fields with empty 8145 // values are omitted from API requests. However, any field with an 8146 // empty value appearing in NullFields will be sent to the server as 8147 // null. It is an error if a field in this list has a non-empty value. 8148 // This may be used to include null fields in Patch requests. 8149 NullFields []string `json:"-"` 8150} 8151 8152func (s *GoogleCloudDialogflowV2beta1SessionEntityType) MarshalJSON() ([]byte, error) { 8153 type NoMethod GoogleCloudDialogflowV2beta1SessionEntityType 8154 raw := NoMethod(*s) 8155 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8156} 8157 8158// GoogleCloudDialogflowV2beta1WebhookRequest: The request message for a 8159// webhook call. 8160type GoogleCloudDialogflowV2beta1WebhookRequest struct { 8161 // AlternativeQueryResults: Alternative query results from 8162 // KnowledgeService. 8163 AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"` 8164 8165 // OriginalDetectIntentRequest: Optional. The contents of the original 8166 // request that was passed to 8167 // `[Streaming]DetectIntent` call. 8168 OriginalDetectIntentRequest *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"` 8169 8170 // QueryResult: The result of the conversational query or event 8171 // processing. Contains the 8172 // same value as `[Streaming]DetectIntentResponse.query_result`. 8173 QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"` 8174 8175 // ResponseId: The unique identifier of the response. Contains the same 8176 // value as 8177 // `[Streaming]DetectIntentResponse.response_id`. 8178 ResponseId string `json:"responseId,omitempty"` 8179 8180 // Session: The unique identifier of detectIntent request session. 8181 // Can be used to identify end-user inside webhook 8182 // implementation. 8183 // Format: `projects/<Project ID>/agent/sessions/<Session ID>`, 8184 // or 8185 // `projects/<Project ID>/agent/environments/<Environment 8186 // ID>/users/<User 8187 // ID>/sessions/<Session ID>`. 8188 Session string `json:"session,omitempty"` 8189 8190 // ForceSendFields is a list of field names (e.g. 8191 // "AlternativeQueryResults") to unconditionally include in API 8192 // requests. By default, fields with empty values are omitted from API 8193 // requests. However, any non-pointer, non-interface field appearing in 8194 // ForceSendFields will be sent to the server regardless of whether the 8195 // field is empty or not. This may be used to include empty fields in 8196 // Patch requests. 8197 ForceSendFields []string `json:"-"` 8198 8199 // NullFields is a list of field names (e.g. "AlternativeQueryResults") 8200 // to include in API requests with the JSON null value. By default, 8201 // fields with empty values are omitted from API requests. However, any 8202 // field with an empty value appearing in NullFields will be sent to the 8203 // server as null. It is an error if a field in this list has a 8204 // non-empty value. This may be used to include null fields in Patch 8205 // requests. 8206 NullFields []string `json:"-"` 8207} 8208 8209func (s *GoogleCloudDialogflowV2beta1WebhookRequest) MarshalJSON() ([]byte, error) { 8210 type NoMethod GoogleCloudDialogflowV2beta1WebhookRequest 8211 raw := NoMethod(*s) 8212 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8213} 8214 8215// GoogleCloudDialogflowV2beta1WebhookResponse: The response message for 8216// a webhook call. 8217// 8218// This response is validated by the Dialogflow server. If validation 8219// fails, 8220// an error will be returned in the QueryResult.diagnostic_info 8221// field. 8222// Setting JSON fields to an empty value with the wrong type is a common 8223// error. 8224// To avoid this error: 8225// 8226// - Use "" for empty strings 8227// - Use `{}` or `null` for empty objects 8228// - Use `[]` or `null` for empty arrays 8229// 8230// For more information, see the 8231// [Protocol Buffers 8232// Language 8233// Guide](https://developers.google.com/protocol-buffers/docs/pr 8234// oto3#json). 8235type GoogleCloudDialogflowV2beta1WebhookResponse struct { 8236 // EndInteraction: Optional. Indicates that this intent ends an 8237 // interaction. Some integrations 8238 // (e.g., Actions on Google or Dialogflow phone gateway) use this 8239 // information 8240 // to close interaction with an end user. Default is false. 8241 EndInteraction bool `json:"endInteraction,omitempty"` 8242 8243 // FollowupEventInput: Optional. Makes the platform immediately invoke 8244 // another `DetectIntent` call 8245 // internally with the specified event as input. 8246 // When this field is set, Dialogflow ignores the 8247 // `fulfillment_text`, 8248 // `fulfillment_messages`, and `payload` fields. 8249 FollowupEventInput *GoogleCloudDialogflowV2beta1EventInput `json:"followupEventInput,omitempty"` 8250 8251 // FulfillmentMessages: Optional. The collection of rich messages to 8252 // present to the user. This 8253 // value is passed directly to `QueryResult.fulfillment_messages`. 8254 FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"` 8255 8256 // FulfillmentText: Optional. The text to be shown on the screen. This 8257 // value is passed directly 8258 // to `QueryResult.fulfillment_text`. 8259 FulfillmentText string `json:"fulfillmentText,omitempty"` 8260 8261 // OutputContexts: Optional. The collection of output contexts. This 8262 // value is passed directly 8263 // to `QueryResult.output_contexts`. 8264 OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"` 8265 8266 // Payload: Optional. This value is passed directly to 8267 // `QueryResult.webhook_payload`. 8268 // See the related `fulfillment_messages[i].payload field`, which may be 8269 // used 8270 // as an alternative to this field. 8271 // 8272 // This field can be used for Actions on Google responses. 8273 // It should have a structure similar to the JSON message shown here. 8274 // For more 8275 // information, see 8276 // [Actions on Google 8277 // Webhook 8278 // Format](https://developers.google.com/actions/dialogflow/webho 8279 // ok) 8280 // <pre>{ 8281 // "google": { 8282 // "expectUserResponse": true, 8283 // "richResponse": { 8284 // "items": [ 8285 // { 8286 // "simpleResponse": { 8287 // "textToSpeech": "this is a simple response" 8288 // } 8289 // } 8290 // ] 8291 // } 8292 // } 8293 // }</pre> 8294 Payload googleapi.RawMessage `json:"payload,omitempty"` 8295 8296 // SessionEntityTypes: Optional. Additional session entity types to 8297 // replace or extend developer 8298 // entity types with. The entity synonyms apply to all languages and 8299 // persist 8300 // for the session of this query. Setting the session entity types 8301 // inside 8302 // webhook overwrites the session entity types that have been set 8303 // through 8304 // `DetectIntentRequest.query_params.session_entity_types`. 8305 SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"` 8306 8307 // Source: Optional. This value is passed directly to 8308 // `QueryResult.webhook_source`. 8309 Source string `json:"source,omitempty"` 8310 8311 // ForceSendFields is a list of field names (e.g. "EndInteraction") to 8312 // unconditionally include in API requests. By default, fields with 8313 // empty values are omitted from API requests. However, any non-pointer, 8314 // non-interface field appearing in ForceSendFields will be sent to the 8315 // server regardless of whether the field is empty or not. This may be 8316 // used to include empty fields in Patch requests. 8317 ForceSendFields []string `json:"-"` 8318 8319 // NullFields is a list of field names (e.g. "EndInteraction") to 8320 // include in API requests with the JSON null value. By default, fields 8321 // with empty values are omitted from API requests. However, any field 8322 // with an empty value appearing in NullFields will be sent to the 8323 // server as null. It is an error if a field in this list has a 8324 // non-empty value. This may be used to include null fields in Patch 8325 // requests. 8326 NullFields []string `json:"-"` 8327} 8328 8329func (s *GoogleCloudDialogflowV2beta1WebhookResponse) MarshalJSON() ([]byte, error) { 8330 type NoMethod GoogleCloudDialogflowV2beta1WebhookResponse 8331 raw := NoMethod(*s) 8332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8333} 8334 8335// GoogleLongrunningListOperationsResponse: The response message for 8336// Operations.ListOperations. 8337type GoogleLongrunningListOperationsResponse struct { 8338 // NextPageToken: The standard List next-page token. 8339 NextPageToken string `json:"nextPageToken,omitempty"` 8340 8341 // Operations: A list of operations that matches the specified filter in 8342 // the request. 8343 Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` 8344 8345 // ServerResponse contains the HTTP response code and headers from the 8346 // server. 8347 googleapi.ServerResponse `json:"-"` 8348 8349 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 8350 // unconditionally include in API requests. By default, fields with 8351 // empty values are omitted from API requests. However, any non-pointer, 8352 // non-interface field appearing in ForceSendFields will be sent to the 8353 // server regardless of whether the field is empty or not. This may be 8354 // used to include empty fields in Patch requests. 8355 ForceSendFields []string `json:"-"` 8356 8357 // NullFields is a list of field names (e.g. "NextPageToken") to include 8358 // in API requests with the JSON null value. By default, fields with 8359 // empty values are omitted from API requests. However, any field with 8360 // an empty value appearing in NullFields will be sent to the server as 8361 // null. It is an error if a field in this list has a non-empty value. 8362 // This may be used to include null fields in Patch requests. 8363 NullFields []string `json:"-"` 8364} 8365 8366func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { 8367 type NoMethod GoogleLongrunningListOperationsResponse 8368 raw := NoMethod(*s) 8369 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8370} 8371 8372// GoogleLongrunningOperation: This resource represents a long-running 8373// operation that is the result of a 8374// network API call. 8375type GoogleLongrunningOperation struct { 8376 // Done: If the value is `false`, it means the operation is still in 8377 // progress. 8378 // If `true`, the operation is completed, and either `error` or 8379 // `response` is 8380 // available. 8381 Done bool `json:"done,omitempty"` 8382 8383 // Error: The error result of the operation in case of failure or 8384 // cancellation. 8385 Error *GoogleRpcStatus `json:"error,omitempty"` 8386 8387 // Metadata: Service-specific metadata associated with the operation. 8388 // It typically 8389 // contains progress information and common metadata such as create 8390 // time. 8391 // Some services might not provide such metadata. Any method that 8392 // returns a 8393 // long-running operation should document the metadata type, if any. 8394 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 8395 8396 // Name: The server-assigned name, which is only unique within the same 8397 // service that 8398 // originally returns it. If you use the default HTTP mapping, 8399 // the 8400 // `name` should be a resource name ending with 8401 // `operations/{unique_id}`. 8402 Name string `json:"name,omitempty"` 8403 8404 // Response: The normal response of the operation in case of success. 8405 // If the original 8406 // method returns no data on success, such as `Delete`, the response 8407 // is 8408 // `google.protobuf.Empty`. If the original method is 8409 // standard 8410 // `Get`/`Create`/`Update`, the response should be the resource. For 8411 // other 8412 // methods, the response should have the type `XxxResponse`, where 8413 // `Xxx` 8414 // is the original method name. For example, if the original method 8415 // name 8416 // is `TakeSnapshot()`, the inferred response type 8417 // is 8418 // `TakeSnapshotResponse`. 8419 Response googleapi.RawMessage `json:"response,omitempty"` 8420 8421 // ServerResponse contains the HTTP response code and headers from the 8422 // server. 8423 googleapi.ServerResponse `json:"-"` 8424 8425 // ForceSendFields is a list of field names (e.g. "Done") to 8426 // unconditionally include in API requests. By default, fields with 8427 // empty values are omitted from API requests. However, any non-pointer, 8428 // non-interface field appearing in ForceSendFields will be sent to the 8429 // server regardless of whether the field is empty or not. This may be 8430 // used to include empty fields in Patch requests. 8431 ForceSendFields []string `json:"-"` 8432 8433 // NullFields is a list of field names (e.g. "Done") to include in API 8434 // requests with the JSON null value. By default, fields with empty 8435 // values are omitted from API requests. However, any field with an 8436 // empty value appearing in NullFields will be sent to the server as 8437 // null. It is an error if a field in this list has a non-empty value. 8438 // This may be used to include null fields in Patch requests. 8439 NullFields []string `json:"-"` 8440} 8441 8442func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { 8443 type NoMethod GoogleLongrunningOperation 8444 raw := NoMethod(*s) 8445 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8446} 8447 8448// GoogleProtobufEmpty: A generic empty message that you can re-use to 8449// avoid defining duplicated 8450// empty messages in your APIs. A typical example is to use it as the 8451// request 8452// or the response type of an API method. For instance: 8453// 8454// service Foo { 8455// rpc Bar(google.protobuf.Empty) returns 8456// (google.protobuf.Empty); 8457// } 8458// 8459// The JSON representation for `Empty` is empty JSON object `{}`. 8460type GoogleProtobufEmpty struct { 8461 // ServerResponse contains the HTTP response code and headers from the 8462 // server. 8463 googleapi.ServerResponse `json:"-"` 8464} 8465 8466// GoogleRpcStatus: The `Status` type defines a logical error model that 8467// is suitable for 8468// different programming environments, including REST APIs and RPC APIs. 8469// It is 8470// used by [gRPC](https://github.com/grpc). Each `Status` message 8471// contains 8472// three pieces of data: error code, error message, and error 8473// details. 8474// 8475// You can find out more about this error model and how to work with it 8476// in the 8477// [API Design Guide](https://cloud.google.com/apis/design/errors). 8478type GoogleRpcStatus struct { 8479 // Code: The status code, which should be an enum value of 8480 // google.rpc.Code. 8481 Code int64 `json:"code,omitempty"` 8482 8483 // Details: A list of messages that carry the error details. There is a 8484 // common set of 8485 // message types for APIs to use. 8486 Details []googleapi.RawMessage `json:"details,omitempty"` 8487 8488 // Message: A developer-facing error message, which should be in 8489 // English. Any 8490 // user-facing error message should be localized and sent in 8491 // the 8492 // google.rpc.Status.details field, or localized by the client. 8493 Message string `json:"message,omitempty"` 8494 8495 // ForceSendFields is a list of field names (e.g. "Code") to 8496 // unconditionally include in API requests. By default, fields with 8497 // empty values are omitted from API requests. However, any non-pointer, 8498 // non-interface field appearing in ForceSendFields will be sent to the 8499 // server regardless of whether the field is empty or not. This may be 8500 // used to include empty fields in Patch requests. 8501 ForceSendFields []string `json:"-"` 8502 8503 // NullFields is a list of field names (e.g. "Code") to include in API 8504 // requests with the JSON null value. By default, fields with empty 8505 // values are omitted from API requests. However, any field with an 8506 // empty value appearing in NullFields will be sent to the server as 8507 // null. It is an error if a field in this list has a non-empty value. 8508 // This may be used to include null fields in Patch requests. 8509 NullFields []string `json:"-"` 8510} 8511 8512func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 8513 type NoMethod GoogleRpcStatus 8514 raw := NoMethod(*s) 8515 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8516} 8517 8518// GoogleTypeLatLng: An object representing a latitude/longitude pair. 8519// This is expressed as a pair 8520// of doubles representing degrees latitude and degrees longitude. 8521// Unless 8522// specified otherwise, this must conform to the 8523// <a 8524// href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 8525// st 8526// andard</a>. Values must be within normalized ranges. 8527type GoogleTypeLatLng struct { 8528 // Latitude: The latitude in degrees. It must be in the range [-90.0, 8529 // +90.0]. 8530 Latitude float64 `json:"latitude,omitempty"` 8531 8532 // Longitude: The longitude in degrees. It must be in the range [-180.0, 8533 // +180.0]. 8534 Longitude float64 `json:"longitude,omitempty"` 8535 8536 // ForceSendFields is a list of field names (e.g. "Latitude") to 8537 // unconditionally include in API requests. By default, fields with 8538 // empty values are omitted from API requests. However, any non-pointer, 8539 // non-interface field appearing in ForceSendFields will be sent to the 8540 // server regardless of whether the field is empty or not. This may be 8541 // used to include empty fields in Patch requests. 8542 ForceSendFields []string `json:"-"` 8543 8544 // NullFields is a list of field names (e.g. "Latitude") to include in 8545 // API requests with the JSON null value. By default, fields with empty 8546 // values are omitted from API requests. However, any field with an 8547 // empty value appearing in NullFields will be sent to the server as 8548 // null. It is an error if a field in this list has a non-empty value. 8549 // This may be used to include null fields in Patch requests. 8550 NullFields []string `json:"-"` 8551} 8552 8553func (s *GoogleTypeLatLng) MarshalJSON() ([]byte, error) { 8554 type NoMethod GoogleTypeLatLng 8555 raw := NoMethod(*s) 8556 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8557} 8558 8559func (s *GoogleTypeLatLng) UnmarshalJSON(data []byte) error { 8560 type NoMethod GoogleTypeLatLng 8561 var s1 struct { 8562 Latitude gensupport.JSONFloat64 `json:"latitude"` 8563 Longitude gensupport.JSONFloat64 `json:"longitude"` 8564 *NoMethod 8565 } 8566 s1.NoMethod = (*NoMethod)(s) 8567 if err := json.Unmarshal(data, &s1); err != nil { 8568 return err 8569 } 8570 s.Latitude = float64(s1.Latitude) 8571 s.Longitude = float64(s1.Longitude) 8572 return nil 8573} 8574 8575// method id "dialogflow.projects.deleteAgent": 8576 8577type ProjectsDeleteAgentCall struct { 8578 s *Service 8579 parent string 8580 urlParams_ gensupport.URLParams 8581 ctx_ context.Context 8582 header_ http.Header 8583} 8584 8585// DeleteAgent: Deletes the specified agent. 8586func (r *ProjectsService) DeleteAgent(parent string) *ProjectsDeleteAgentCall { 8587 c := &ProjectsDeleteAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8588 c.parent = parent 8589 return c 8590} 8591 8592// Fields allows partial responses to be retrieved. See 8593// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8594// for more information. 8595func (c *ProjectsDeleteAgentCall) Fields(s ...googleapi.Field) *ProjectsDeleteAgentCall { 8596 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8597 return c 8598} 8599 8600// Context sets the context to be used in this call's Do method. Any 8601// pending HTTP request will be aborted if the provided context is 8602// canceled. 8603func (c *ProjectsDeleteAgentCall) Context(ctx context.Context) *ProjectsDeleteAgentCall { 8604 c.ctx_ = ctx 8605 return c 8606} 8607 8608// Header returns an http.Header that can be modified by the caller to 8609// add HTTP headers to the request. 8610func (c *ProjectsDeleteAgentCall) Header() http.Header { 8611 if c.header_ == nil { 8612 c.header_ = make(http.Header) 8613 } 8614 return c.header_ 8615} 8616 8617func (c *ProjectsDeleteAgentCall) doRequest(alt string) (*http.Response, error) { 8618 reqHeaders := make(http.Header) 8619 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8620 for k, v := range c.header_ { 8621 reqHeaders[k] = v 8622 } 8623 reqHeaders.Set("User-Agent", c.s.userAgent()) 8624 var body io.Reader = nil 8625 c.urlParams_.Set("alt", alt) 8626 c.urlParams_.Set("prettyPrint", "false") 8627 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent") 8628 urls += "?" + c.urlParams_.Encode() 8629 req, err := http.NewRequest("DELETE", urls, body) 8630 if err != nil { 8631 return nil, err 8632 } 8633 req.Header = reqHeaders 8634 googleapi.Expand(req.URL, map[string]string{ 8635 "parent": c.parent, 8636 }) 8637 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8638} 8639 8640// Do executes the "dialogflow.projects.deleteAgent" call. 8641// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 8642// non-2xx status code is an error. Response headers are in either 8643// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 8644// returned at all) in error.(*googleapi.Error).Header. Use 8645// googleapi.IsNotModified to check whether the returned error was 8646// because http.StatusNotModified was returned. 8647func (c *ProjectsDeleteAgentCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 8648 gensupport.SetOptions(c.urlParams_, opts...) 8649 res, err := c.doRequest("json") 8650 if res != nil && res.StatusCode == http.StatusNotModified { 8651 if res.Body != nil { 8652 res.Body.Close() 8653 } 8654 return nil, &googleapi.Error{ 8655 Code: res.StatusCode, 8656 Header: res.Header, 8657 } 8658 } 8659 if err != nil { 8660 return nil, err 8661 } 8662 defer googleapi.CloseBody(res) 8663 if err := googleapi.CheckResponse(res); err != nil { 8664 return nil, err 8665 } 8666 ret := &GoogleProtobufEmpty{ 8667 ServerResponse: googleapi.ServerResponse{ 8668 Header: res.Header, 8669 HTTPStatusCode: res.StatusCode, 8670 }, 8671 } 8672 target := &ret 8673 if err := gensupport.DecodeResponse(target, res); err != nil { 8674 return nil, err 8675 } 8676 return ret, nil 8677 // { 8678 // "description": "Deletes the specified agent.", 8679 // "flatPath": "v2/projects/{projectsId}/agent", 8680 // "httpMethod": "DELETE", 8681 // "id": "dialogflow.projects.deleteAgent", 8682 // "parameterOrder": [ 8683 // "parent" 8684 // ], 8685 // "parameters": { 8686 // "parent": { 8687 // "description": "Required. The project that the agent to delete is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 8688 // "location": "path", 8689 // "pattern": "^projects/[^/]+$", 8690 // "required": true, 8691 // "type": "string" 8692 // } 8693 // }, 8694 // "path": "v2/{+parent}/agent", 8695 // "response": { 8696 // "$ref": "GoogleProtobufEmpty" 8697 // }, 8698 // "scopes": [ 8699 // "https://www.googleapis.com/auth/cloud-platform", 8700 // "https://www.googleapis.com/auth/dialogflow" 8701 // ] 8702 // } 8703 8704} 8705 8706// method id "dialogflow.projects.getAgent": 8707 8708type ProjectsGetAgentCall struct { 8709 s *Service 8710 parent string 8711 urlParams_ gensupport.URLParams 8712 ifNoneMatch_ string 8713 ctx_ context.Context 8714 header_ http.Header 8715} 8716 8717// GetAgent: Retrieves the specified agent. 8718func (r *ProjectsService) GetAgent(parent string) *ProjectsGetAgentCall { 8719 c := &ProjectsGetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8720 c.parent = parent 8721 return c 8722} 8723 8724// Fields allows partial responses to be retrieved. See 8725// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8726// for more information. 8727func (c *ProjectsGetAgentCall) Fields(s ...googleapi.Field) *ProjectsGetAgentCall { 8728 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8729 return c 8730} 8731 8732// IfNoneMatch sets the optional parameter which makes the operation 8733// fail if the object's ETag matches the given value. This is useful for 8734// getting updates only after the object has changed since the last 8735// request. Use googleapi.IsNotModified to check whether the response 8736// error from Do is the result of In-None-Match. 8737func (c *ProjectsGetAgentCall) IfNoneMatch(entityTag string) *ProjectsGetAgentCall { 8738 c.ifNoneMatch_ = entityTag 8739 return c 8740} 8741 8742// Context sets the context to be used in this call's Do method. Any 8743// pending HTTP request will be aborted if the provided context is 8744// canceled. 8745func (c *ProjectsGetAgentCall) Context(ctx context.Context) *ProjectsGetAgentCall { 8746 c.ctx_ = ctx 8747 return c 8748} 8749 8750// Header returns an http.Header that can be modified by the caller to 8751// add HTTP headers to the request. 8752func (c *ProjectsGetAgentCall) Header() http.Header { 8753 if c.header_ == nil { 8754 c.header_ = make(http.Header) 8755 } 8756 return c.header_ 8757} 8758 8759func (c *ProjectsGetAgentCall) doRequest(alt string) (*http.Response, error) { 8760 reqHeaders := make(http.Header) 8761 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8762 for k, v := range c.header_ { 8763 reqHeaders[k] = v 8764 } 8765 reqHeaders.Set("User-Agent", c.s.userAgent()) 8766 if c.ifNoneMatch_ != "" { 8767 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8768 } 8769 var body io.Reader = nil 8770 c.urlParams_.Set("alt", alt) 8771 c.urlParams_.Set("prettyPrint", "false") 8772 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent") 8773 urls += "?" + c.urlParams_.Encode() 8774 req, err := http.NewRequest("GET", urls, body) 8775 if err != nil { 8776 return nil, err 8777 } 8778 req.Header = reqHeaders 8779 googleapi.Expand(req.URL, map[string]string{ 8780 "parent": c.parent, 8781 }) 8782 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8783} 8784 8785// Do executes the "dialogflow.projects.getAgent" call. 8786// Exactly one of *GoogleCloudDialogflowV2Agent or error will be 8787// non-nil. Any non-2xx status code is an error. Response headers are in 8788// either *GoogleCloudDialogflowV2Agent.ServerResponse.Header or (if a 8789// response was returned at all) in error.(*googleapi.Error).Header. Use 8790// googleapi.IsNotModified to check whether the returned error was 8791// because http.StatusNotModified was returned. 8792func (c *ProjectsGetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Agent, error) { 8793 gensupport.SetOptions(c.urlParams_, opts...) 8794 res, err := c.doRequest("json") 8795 if res != nil && res.StatusCode == http.StatusNotModified { 8796 if res.Body != nil { 8797 res.Body.Close() 8798 } 8799 return nil, &googleapi.Error{ 8800 Code: res.StatusCode, 8801 Header: res.Header, 8802 } 8803 } 8804 if err != nil { 8805 return nil, err 8806 } 8807 defer googleapi.CloseBody(res) 8808 if err := googleapi.CheckResponse(res); err != nil { 8809 return nil, err 8810 } 8811 ret := &GoogleCloudDialogflowV2Agent{ 8812 ServerResponse: googleapi.ServerResponse{ 8813 Header: res.Header, 8814 HTTPStatusCode: res.StatusCode, 8815 }, 8816 } 8817 target := &ret 8818 if err := gensupport.DecodeResponse(target, res); err != nil { 8819 return nil, err 8820 } 8821 return ret, nil 8822 // { 8823 // "description": "Retrieves the specified agent.", 8824 // "flatPath": "v2/projects/{projectsId}/agent", 8825 // "httpMethod": "GET", 8826 // "id": "dialogflow.projects.getAgent", 8827 // "parameterOrder": [ 8828 // "parent" 8829 // ], 8830 // "parameters": { 8831 // "parent": { 8832 // "description": "Required. The project that the agent to fetch is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 8833 // "location": "path", 8834 // "pattern": "^projects/[^/]+$", 8835 // "required": true, 8836 // "type": "string" 8837 // } 8838 // }, 8839 // "path": "v2/{+parent}/agent", 8840 // "response": { 8841 // "$ref": "GoogleCloudDialogflowV2Agent" 8842 // }, 8843 // "scopes": [ 8844 // "https://www.googleapis.com/auth/cloud-platform", 8845 // "https://www.googleapis.com/auth/dialogflow" 8846 // ] 8847 // } 8848 8849} 8850 8851// method id "dialogflow.projects.setAgent": 8852 8853type ProjectsSetAgentCall struct { 8854 s *Service 8855 parent string 8856 googleclouddialogflowv2agent *GoogleCloudDialogflowV2Agent 8857 urlParams_ gensupport.URLParams 8858 ctx_ context.Context 8859 header_ http.Header 8860} 8861 8862// SetAgent: Creates/updates the specified agent. 8863func (r *ProjectsService) SetAgent(parent string, googleclouddialogflowv2agent *GoogleCloudDialogflowV2Agent) *ProjectsSetAgentCall { 8864 c := &ProjectsSetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8865 c.parent = parent 8866 c.googleclouddialogflowv2agent = googleclouddialogflowv2agent 8867 return c 8868} 8869 8870// UpdateMask sets the optional parameter "updateMask": The mask to 8871// control which fields get updated. 8872func (c *ProjectsSetAgentCall) UpdateMask(updateMask string) *ProjectsSetAgentCall { 8873 c.urlParams_.Set("updateMask", updateMask) 8874 return c 8875} 8876 8877// Fields allows partial responses to be retrieved. See 8878// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8879// for more information. 8880func (c *ProjectsSetAgentCall) Fields(s ...googleapi.Field) *ProjectsSetAgentCall { 8881 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8882 return c 8883} 8884 8885// Context sets the context to be used in this call's Do method. Any 8886// pending HTTP request will be aborted if the provided context is 8887// canceled. 8888func (c *ProjectsSetAgentCall) Context(ctx context.Context) *ProjectsSetAgentCall { 8889 c.ctx_ = ctx 8890 return c 8891} 8892 8893// Header returns an http.Header that can be modified by the caller to 8894// add HTTP headers to the request. 8895func (c *ProjectsSetAgentCall) Header() http.Header { 8896 if c.header_ == nil { 8897 c.header_ = make(http.Header) 8898 } 8899 return c.header_ 8900} 8901 8902func (c *ProjectsSetAgentCall) doRequest(alt string) (*http.Response, error) { 8903 reqHeaders := make(http.Header) 8904 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8905 for k, v := range c.header_ { 8906 reqHeaders[k] = v 8907 } 8908 reqHeaders.Set("User-Agent", c.s.userAgent()) 8909 var body io.Reader = nil 8910 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2agent) 8911 if err != nil { 8912 return nil, err 8913 } 8914 reqHeaders.Set("Content-Type", "application/json") 8915 c.urlParams_.Set("alt", alt) 8916 c.urlParams_.Set("prettyPrint", "false") 8917 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent") 8918 urls += "?" + c.urlParams_.Encode() 8919 req, err := http.NewRequest("POST", urls, body) 8920 if err != nil { 8921 return nil, err 8922 } 8923 req.Header = reqHeaders 8924 googleapi.Expand(req.URL, map[string]string{ 8925 "parent": c.parent, 8926 }) 8927 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8928} 8929 8930// Do executes the "dialogflow.projects.setAgent" call. 8931// Exactly one of *GoogleCloudDialogflowV2Agent or error will be 8932// non-nil. Any non-2xx status code is an error. Response headers are in 8933// either *GoogleCloudDialogflowV2Agent.ServerResponse.Header or (if a 8934// response was returned at all) in error.(*googleapi.Error).Header. Use 8935// googleapi.IsNotModified to check whether the returned error was 8936// because http.StatusNotModified was returned. 8937func (c *ProjectsSetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Agent, error) { 8938 gensupport.SetOptions(c.urlParams_, opts...) 8939 res, err := c.doRequest("json") 8940 if res != nil && res.StatusCode == http.StatusNotModified { 8941 if res.Body != nil { 8942 res.Body.Close() 8943 } 8944 return nil, &googleapi.Error{ 8945 Code: res.StatusCode, 8946 Header: res.Header, 8947 } 8948 } 8949 if err != nil { 8950 return nil, err 8951 } 8952 defer googleapi.CloseBody(res) 8953 if err := googleapi.CheckResponse(res); err != nil { 8954 return nil, err 8955 } 8956 ret := &GoogleCloudDialogflowV2Agent{ 8957 ServerResponse: googleapi.ServerResponse{ 8958 Header: res.Header, 8959 HTTPStatusCode: res.StatusCode, 8960 }, 8961 } 8962 target := &ret 8963 if err := gensupport.DecodeResponse(target, res); err != nil { 8964 return nil, err 8965 } 8966 return ret, nil 8967 // { 8968 // "description": "Creates/updates the specified agent.", 8969 // "flatPath": "v2/projects/{projectsId}/agent", 8970 // "httpMethod": "POST", 8971 // "id": "dialogflow.projects.setAgent", 8972 // "parameterOrder": [ 8973 // "parent" 8974 // ], 8975 // "parameters": { 8976 // "parent": { 8977 // "description": "Required. The project of this agent.\nFormat: `projects/\u003cProject ID\u003e`.", 8978 // "location": "path", 8979 // "pattern": "^projects/[^/]+$", 8980 // "required": true, 8981 // "type": "string" 8982 // }, 8983 // "updateMask": { 8984 // "description": "Optional. The mask to control which fields get updated.", 8985 // "format": "google-fieldmask", 8986 // "location": "query", 8987 // "type": "string" 8988 // } 8989 // }, 8990 // "path": "v2/{+parent}/agent", 8991 // "request": { 8992 // "$ref": "GoogleCloudDialogflowV2Agent" 8993 // }, 8994 // "response": { 8995 // "$ref": "GoogleCloudDialogflowV2Agent" 8996 // }, 8997 // "scopes": [ 8998 // "https://www.googleapis.com/auth/cloud-platform", 8999 // "https://www.googleapis.com/auth/dialogflow" 9000 // ] 9001 // } 9002 9003} 9004 9005// method id "dialogflow.projects.agent.export": 9006 9007type ProjectsAgentExportCall struct { 9008 s *Service 9009 parent string 9010 googleclouddialogflowv2exportagentrequest *GoogleCloudDialogflowV2ExportAgentRequest 9011 urlParams_ gensupport.URLParams 9012 ctx_ context.Context 9013 header_ http.Header 9014} 9015 9016// Export: Exports the specified agent to a ZIP file. 9017// 9018// Operation <response: ExportAgentResponse> 9019func (r *ProjectsAgentService) Export(parent string, googleclouddialogflowv2exportagentrequest *GoogleCloudDialogflowV2ExportAgentRequest) *ProjectsAgentExportCall { 9020 c := &ProjectsAgentExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9021 c.parent = parent 9022 c.googleclouddialogflowv2exportagentrequest = googleclouddialogflowv2exportagentrequest 9023 return c 9024} 9025 9026// Fields allows partial responses to be retrieved. See 9027// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9028// for more information. 9029func (c *ProjectsAgentExportCall) Fields(s ...googleapi.Field) *ProjectsAgentExportCall { 9030 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9031 return c 9032} 9033 9034// Context sets the context to be used in this call's Do method. Any 9035// pending HTTP request will be aborted if the provided context is 9036// canceled. 9037func (c *ProjectsAgentExportCall) Context(ctx context.Context) *ProjectsAgentExportCall { 9038 c.ctx_ = ctx 9039 return c 9040} 9041 9042// Header returns an http.Header that can be modified by the caller to 9043// add HTTP headers to the request. 9044func (c *ProjectsAgentExportCall) Header() http.Header { 9045 if c.header_ == nil { 9046 c.header_ = make(http.Header) 9047 } 9048 return c.header_ 9049} 9050 9051func (c *ProjectsAgentExportCall) doRequest(alt string) (*http.Response, error) { 9052 reqHeaders := make(http.Header) 9053 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9054 for k, v := range c.header_ { 9055 reqHeaders[k] = v 9056 } 9057 reqHeaders.Set("User-Agent", c.s.userAgent()) 9058 var body io.Reader = nil 9059 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2exportagentrequest) 9060 if err != nil { 9061 return nil, err 9062 } 9063 reqHeaders.Set("Content-Type", "application/json") 9064 c.urlParams_.Set("alt", alt) 9065 c.urlParams_.Set("prettyPrint", "false") 9066 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:export") 9067 urls += "?" + c.urlParams_.Encode() 9068 req, err := http.NewRequest("POST", urls, body) 9069 if err != nil { 9070 return nil, err 9071 } 9072 req.Header = reqHeaders 9073 googleapi.Expand(req.URL, map[string]string{ 9074 "parent": c.parent, 9075 }) 9076 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9077} 9078 9079// Do executes the "dialogflow.projects.agent.export" call. 9080// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 9081// Any non-2xx status code is an error. Response headers are in either 9082// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 9083// was returned at all) in error.(*googleapi.Error).Header. Use 9084// googleapi.IsNotModified to check whether the returned error was 9085// because http.StatusNotModified was returned. 9086func (c *ProjectsAgentExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 9087 gensupport.SetOptions(c.urlParams_, opts...) 9088 res, err := c.doRequest("json") 9089 if res != nil && res.StatusCode == http.StatusNotModified { 9090 if res.Body != nil { 9091 res.Body.Close() 9092 } 9093 return nil, &googleapi.Error{ 9094 Code: res.StatusCode, 9095 Header: res.Header, 9096 } 9097 } 9098 if err != nil { 9099 return nil, err 9100 } 9101 defer googleapi.CloseBody(res) 9102 if err := googleapi.CheckResponse(res); err != nil { 9103 return nil, err 9104 } 9105 ret := &GoogleLongrunningOperation{ 9106 ServerResponse: googleapi.ServerResponse{ 9107 Header: res.Header, 9108 HTTPStatusCode: res.StatusCode, 9109 }, 9110 } 9111 target := &ret 9112 if err := gensupport.DecodeResponse(target, res); err != nil { 9113 return nil, err 9114 } 9115 return ret, nil 9116 // { 9117 // "description": "Exports the specified agent to a ZIP file.\n\nOperation \u003cresponse: ExportAgentResponse\u003e", 9118 // "flatPath": "v2/projects/{projectsId}/agent:export", 9119 // "httpMethod": "POST", 9120 // "id": "dialogflow.projects.agent.export", 9121 // "parameterOrder": [ 9122 // "parent" 9123 // ], 9124 // "parameters": { 9125 // "parent": { 9126 // "description": "Required. The project that the agent to export is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 9127 // "location": "path", 9128 // "pattern": "^projects/[^/]+$", 9129 // "required": true, 9130 // "type": "string" 9131 // } 9132 // }, 9133 // "path": "v2/{+parent}/agent:export", 9134 // "request": { 9135 // "$ref": "GoogleCloudDialogflowV2ExportAgentRequest" 9136 // }, 9137 // "response": { 9138 // "$ref": "GoogleLongrunningOperation" 9139 // }, 9140 // "scopes": [ 9141 // "https://www.googleapis.com/auth/cloud-platform", 9142 // "https://www.googleapis.com/auth/dialogflow" 9143 // ] 9144 // } 9145 9146} 9147 9148// method id "dialogflow.projects.agent.getFulfillment": 9149 9150type ProjectsAgentGetFulfillmentCall struct { 9151 s *Service 9152 name string 9153 urlParams_ gensupport.URLParams 9154 ifNoneMatch_ string 9155 ctx_ context.Context 9156 header_ http.Header 9157} 9158 9159// GetFulfillment: Retrieves the fulfillment. 9160func (r *ProjectsAgentService) GetFulfillment(name string) *ProjectsAgentGetFulfillmentCall { 9161 c := &ProjectsAgentGetFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9162 c.name = name 9163 return c 9164} 9165 9166// Fields allows partial responses to be retrieved. See 9167// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9168// for more information. 9169func (c *ProjectsAgentGetFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsAgentGetFulfillmentCall { 9170 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9171 return c 9172} 9173 9174// IfNoneMatch sets the optional parameter which makes the operation 9175// fail if the object's ETag matches the given value. This is useful for 9176// getting updates only after the object has changed since the last 9177// request. Use googleapi.IsNotModified to check whether the response 9178// error from Do is the result of In-None-Match. 9179func (c *ProjectsAgentGetFulfillmentCall) IfNoneMatch(entityTag string) *ProjectsAgentGetFulfillmentCall { 9180 c.ifNoneMatch_ = entityTag 9181 return c 9182} 9183 9184// Context sets the context to be used in this call's Do method. Any 9185// pending HTTP request will be aborted if the provided context is 9186// canceled. 9187func (c *ProjectsAgentGetFulfillmentCall) Context(ctx context.Context) *ProjectsAgentGetFulfillmentCall { 9188 c.ctx_ = ctx 9189 return c 9190} 9191 9192// Header returns an http.Header that can be modified by the caller to 9193// add HTTP headers to the request. 9194func (c *ProjectsAgentGetFulfillmentCall) Header() http.Header { 9195 if c.header_ == nil { 9196 c.header_ = make(http.Header) 9197 } 9198 return c.header_ 9199} 9200 9201func (c *ProjectsAgentGetFulfillmentCall) doRequest(alt string) (*http.Response, error) { 9202 reqHeaders := make(http.Header) 9203 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9204 for k, v := range c.header_ { 9205 reqHeaders[k] = v 9206 } 9207 reqHeaders.Set("User-Agent", c.s.userAgent()) 9208 if c.ifNoneMatch_ != "" { 9209 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9210 } 9211 var body io.Reader = nil 9212 c.urlParams_.Set("alt", alt) 9213 c.urlParams_.Set("prettyPrint", "false") 9214 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9215 urls += "?" + c.urlParams_.Encode() 9216 req, err := http.NewRequest("GET", urls, body) 9217 if err != nil { 9218 return nil, err 9219 } 9220 req.Header = reqHeaders 9221 googleapi.Expand(req.URL, map[string]string{ 9222 "name": c.name, 9223 }) 9224 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9225} 9226 9227// Do executes the "dialogflow.projects.agent.getFulfillment" call. 9228// Exactly one of *GoogleCloudDialogflowV2Fulfillment or error will be 9229// non-nil. Any non-2xx status code is an error. Response headers are in 9230// either *GoogleCloudDialogflowV2Fulfillment.ServerResponse.Header or 9231// (if a response was returned at all) in 9232// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9233// whether the returned error was because http.StatusNotModified was 9234// returned. 9235func (c *ProjectsAgentGetFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Fulfillment, error) { 9236 gensupport.SetOptions(c.urlParams_, opts...) 9237 res, err := c.doRequest("json") 9238 if res != nil && res.StatusCode == http.StatusNotModified { 9239 if res.Body != nil { 9240 res.Body.Close() 9241 } 9242 return nil, &googleapi.Error{ 9243 Code: res.StatusCode, 9244 Header: res.Header, 9245 } 9246 } 9247 if err != nil { 9248 return nil, err 9249 } 9250 defer googleapi.CloseBody(res) 9251 if err := googleapi.CheckResponse(res); err != nil { 9252 return nil, err 9253 } 9254 ret := &GoogleCloudDialogflowV2Fulfillment{ 9255 ServerResponse: googleapi.ServerResponse{ 9256 Header: res.Header, 9257 HTTPStatusCode: res.StatusCode, 9258 }, 9259 } 9260 target := &ret 9261 if err := gensupport.DecodeResponse(target, res); err != nil { 9262 return nil, err 9263 } 9264 return ret, nil 9265 // { 9266 // "description": "Retrieves the fulfillment.", 9267 // "flatPath": "v2/projects/{projectsId}/agent/fulfillment", 9268 // "httpMethod": "GET", 9269 // "id": "dialogflow.projects.agent.getFulfillment", 9270 // "parameterOrder": [ 9271 // "name" 9272 // ], 9273 // "parameters": { 9274 // "name": { 9275 // "description": "Required. The name of the fulfillment.\nFormat: `projects/\u003cProject ID\u003e/agent/fulfillment`.", 9276 // "location": "path", 9277 // "pattern": "^projects/[^/]+/agent/fulfillment$", 9278 // "required": true, 9279 // "type": "string" 9280 // } 9281 // }, 9282 // "path": "v2/{+name}", 9283 // "response": { 9284 // "$ref": "GoogleCloudDialogflowV2Fulfillment" 9285 // }, 9286 // "scopes": [ 9287 // "https://www.googleapis.com/auth/cloud-platform", 9288 // "https://www.googleapis.com/auth/dialogflow" 9289 // ] 9290 // } 9291 9292} 9293 9294// method id "dialogflow.projects.agent.getValidationResult": 9295 9296type ProjectsAgentGetValidationResultCall struct { 9297 s *Service 9298 parent string 9299 urlParams_ gensupport.URLParams 9300 ifNoneMatch_ string 9301 ctx_ context.Context 9302 header_ http.Header 9303} 9304 9305// GetValidationResult: Gets agent validation result. Agent validation 9306// is performed during 9307// training time and is updated automatically when training is 9308// completed. 9309func (r *ProjectsAgentService) GetValidationResult(parent string) *ProjectsAgentGetValidationResultCall { 9310 c := &ProjectsAgentGetValidationResultCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9311 c.parent = parent 9312 return c 9313} 9314 9315// LanguageCode sets the optional parameter "languageCode": The language 9316// for which you want a validation result. If not 9317// specified, the agent's default language is used. 9318// [Many 9319// languages](https://cloud.google.com/dialogflow/docs/reference/la 9320// nguage) 9321// are supported. Note: languages must be enabled in the agent before 9322// they can 9323// be used. 9324func (c *ProjectsAgentGetValidationResultCall) LanguageCode(languageCode string) *ProjectsAgentGetValidationResultCall { 9325 c.urlParams_.Set("languageCode", languageCode) 9326 return c 9327} 9328 9329// Fields allows partial responses to be retrieved. See 9330// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9331// for more information. 9332func (c *ProjectsAgentGetValidationResultCall) Fields(s ...googleapi.Field) *ProjectsAgentGetValidationResultCall { 9333 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9334 return c 9335} 9336 9337// IfNoneMatch sets the optional parameter which makes the operation 9338// fail if the object's ETag matches the given value. This is useful for 9339// getting updates only after the object has changed since the last 9340// request. Use googleapi.IsNotModified to check whether the response 9341// error from Do is the result of In-None-Match. 9342func (c *ProjectsAgentGetValidationResultCall) IfNoneMatch(entityTag string) *ProjectsAgentGetValidationResultCall { 9343 c.ifNoneMatch_ = entityTag 9344 return c 9345} 9346 9347// Context sets the context to be used in this call's Do method. Any 9348// pending HTTP request will be aborted if the provided context is 9349// canceled. 9350func (c *ProjectsAgentGetValidationResultCall) Context(ctx context.Context) *ProjectsAgentGetValidationResultCall { 9351 c.ctx_ = ctx 9352 return c 9353} 9354 9355// Header returns an http.Header that can be modified by the caller to 9356// add HTTP headers to the request. 9357func (c *ProjectsAgentGetValidationResultCall) Header() http.Header { 9358 if c.header_ == nil { 9359 c.header_ = make(http.Header) 9360 } 9361 return c.header_ 9362} 9363 9364func (c *ProjectsAgentGetValidationResultCall) doRequest(alt string) (*http.Response, error) { 9365 reqHeaders := make(http.Header) 9366 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9367 for k, v := range c.header_ { 9368 reqHeaders[k] = v 9369 } 9370 reqHeaders.Set("User-Agent", c.s.userAgent()) 9371 if c.ifNoneMatch_ != "" { 9372 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9373 } 9374 var body io.Reader = nil 9375 c.urlParams_.Set("alt", alt) 9376 c.urlParams_.Set("prettyPrint", "false") 9377 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent/validationResult") 9378 urls += "?" + c.urlParams_.Encode() 9379 req, err := http.NewRequest("GET", urls, body) 9380 if err != nil { 9381 return nil, err 9382 } 9383 req.Header = reqHeaders 9384 googleapi.Expand(req.URL, map[string]string{ 9385 "parent": c.parent, 9386 }) 9387 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9388} 9389 9390// Do executes the "dialogflow.projects.agent.getValidationResult" call. 9391// Exactly one of *GoogleCloudDialogflowV2ValidationResult or error will 9392// be non-nil. Any non-2xx status code is an error. Response headers are 9393// in either 9394// *GoogleCloudDialogflowV2ValidationResult.ServerResponse.Header or (if 9395// a response was returned at all) in error.(*googleapi.Error).Header. 9396// Use googleapi.IsNotModified to check whether the returned error was 9397// because http.StatusNotModified was returned. 9398func (c *ProjectsAgentGetValidationResultCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ValidationResult, error) { 9399 gensupport.SetOptions(c.urlParams_, opts...) 9400 res, err := c.doRequest("json") 9401 if res != nil && res.StatusCode == http.StatusNotModified { 9402 if res.Body != nil { 9403 res.Body.Close() 9404 } 9405 return nil, &googleapi.Error{ 9406 Code: res.StatusCode, 9407 Header: res.Header, 9408 } 9409 } 9410 if err != nil { 9411 return nil, err 9412 } 9413 defer googleapi.CloseBody(res) 9414 if err := googleapi.CheckResponse(res); err != nil { 9415 return nil, err 9416 } 9417 ret := &GoogleCloudDialogflowV2ValidationResult{ 9418 ServerResponse: googleapi.ServerResponse{ 9419 Header: res.Header, 9420 HTTPStatusCode: res.StatusCode, 9421 }, 9422 } 9423 target := &ret 9424 if err := gensupport.DecodeResponse(target, res); err != nil { 9425 return nil, err 9426 } 9427 return ret, nil 9428 // { 9429 // "description": "Gets agent validation result. Agent validation is performed during\ntraining time and is updated automatically when training is completed.", 9430 // "flatPath": "v2/projects/{projectsId}/agent/validationResult", 9431 // "httpMethod": "GET", 9432 // "id": "dialogflow.projects.agent.getValidationResult", 9433 // "parameterOrder": [ 9434 // "parent" 9435 // ], 9436 // "parameters": { 9437 // "languageCode": { 9438 // "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.", 9439 // "location": "query", 9440 // "type": "string" 9441 // }, 9442 // "parent": { 9443 // "description": "Required. The project that the agent is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 9444 // "location": "path", 9445 // "pattern": "^projects/[^/]+$", 9446 // "required": true, 9447 // "type": "string" 9448 // } 9449 // }, 9450 // "path": "v2/{+parent}/agent/validationResult", 9451 // "response": { 9452 // "$ref": "GoogleCloudDialogflowV2ValidationResult" 9453 // }, 9454 // "scopes": [ 9455 // "https://www.googleapis.com/auth/cloud-platform", 9456 // "https://www.googleapis.com/auth/dialogflow" 9457 // ] 9458 // } 9459 9460} 9461 9462// method id "dialogflow.projects.agent.import": 9463 9464type ProjectsAgentImportCall struct { 9465 s *Service 9466 parent string 9467 googleclouddialogflowv2importagentrequest *GoogleCloudDialogflowV2ImportAgentRequest 9468 urlParams_ gensupport.URLParams 9469 ctx_ context.Context 9470 header_ http.Header 9471} 9472 9473// Import: Imports the specified agent from a ZIP file. 9474// 9475// Uploads new intents and entity types without deleting the existing 9476// ones. 9477// Intents and entity types with the same name are replaced with the 9478// new 9479// versions from ImportAgentRequest. 9480// 9481// Operation <response: google.protobuf.Empty> 9482func (r *ProjectsAgentService) Import(parent string, googleclouddialogflowv2importagentrequest *GoogleCloudDialogflowV2ImportAgentRequest) *ProjectsAgentImportCall { 9483 c := &ProjectsAgentImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9484 c.parent = parent 9485 c.googleclouddialogflowv2importagentrequest = googleclouddialogflowv2importagentrequest 9486 return c 9487} 9488 9489// Fields allows partial responses to be retrieved. See 9490// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9491// for more information. 9492func (c *ProjectsAgentImportCall) Fields(s ...googleapi.Field) *ProjectsAgentImportCall { 9493 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9494 return c 9495} 9496 9497// Context sets the context to be used in this call's Do method. Any 9498// pending HTTP request will be aborted if the provided context is 9499// canceled. 9500func (c *ProjectsAgentImportCall) Context(ctx context.Context) *ProjectsAgentImportCall { 9501 c.ctx_ = ctx 9502 return c 9503} 9504 9505// Header returns an http.Header that can be modified by the caller to 9506// add HTTP headers to the request. 9507func (c *ProjectsAgentImportCall) Header() http.Header { 9508 if c.header_ == nil { 9509 c.header_ = make(http.Header) 9510 } 9511 return c.header_ 9512} 9513 9514func (c *ProjectsAgentImportCall) doRequest(alt string) (*http.Response, error) { 9515 reqHeaders := make(http.Header) 9516 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9517 for k, v := range c.header_ { 9518 reqHeaders[k] = v 9519 } 9520 reqHeaders.Set("User-Agent", c.s.userAgent()) 9521 var body io.Reader = nil 9522 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2importagentrequest) 9523 if err != nil { 9524 return nil, err 9525 } 9526 reqHeaders.Set("Content-Type", "application/json") 9527 c.urlParams_.Set("alt", alt) 9528 c.urlParams_.Set("prettyPrint", "false") 9529 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:import") 9530 urls += "?" + c.urlParams_.Encode() 9531 req, err := http.NewRequest("POST", urls, body) 9532 if err != nil { 9533 return nil, err 9534 } 9535 req.Header = reqHeaders 9536 googleapi.Expand(req.URL, map[string]string{ 9537 "parent": c.parent, 9538 }) 9539 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9540} 9541 9542// Do executes the "dialogflow.projects.agent.import" call. 9543// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 9544// Any non-2xx status code is an error. Response headers are in either 9545// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 9546// was returned at all) in error.(*googleapi.Error).Header. Use 9547// googleapi.IsNotModified to check whether the returned error was 9548// because http.StatusNotModified was returned. 9549func (c *ProjectsAgentImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 9550 gensupport.SetOptions(c.urlParams_, opts...) 9551 res, err := c.doRequest("json") 9552 if res != nil && res.StatusCode == http.StatusNotModified { 9553 if res.Body != nil { 9554 res.Body.Close() 9555 } 9556 return nil, &googleapi.Error{ 9557 Code: res.StatusCode, 9558 Header: res.Header, 9559 } 9560 } 9561 if err != nil { 9562 return nil, err 9563 } 9564 defer googleapi.CloseBody(res) 9565 if err := googleapi.CheckResponse(res); err != nil { 9566 return nil, err 9567 } 9568 ret := &GoogleLongrunningOperation{ 9569 ServerResponse: googleapi.ServerResponse{ 9570 Header: res.Header, 9571 HTTPStatusCode: res.StatusCode, 9572 }, 9573 } 9574 target := &ret 9575 if err := gensupport.DecodeResponse(target, res); err != nil { 9576 return nil, err 9577 } 9578 return ret, nil 9579 // { 9580 // "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.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 9581 // "flatPath": "v2/projects/{projectsId}/agent:import", 9582 // "httpMethod": "POST", 9583 // "id": "dialogflow.projects.agent.import", 9584 // "parameterOrder": [ 9585 // "parent" 9586 // ], 9587 // "parameters": { 9588 // "parent": { 9589 // "description": "Required. The project that the agent to import is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 9590 // "location": "path", 9591 // "pattern": "^projects/[^/]+$", 9592 // "required": true, 9593 // "type": "string" 9594 // } 9595 // }, 9596 // "path": "v2/{+parent}/agent:import", 9597 // "request": { 9598 // "$ref": "GoogleCloudDialogflowV2ImportAgentRequest" 9599 // }, 9600 // "response": { 9601 // "$ref": "GoogleLongrunningOperation" 9602 // }, 9603 // "scopes": [ 9604 // "https://www.googleapis.com/auth/cloud-platform", 9605 // "https://www.googleapis.com/auth/dialogflow" 9606 // ] 9607 // } 9608 9609} 9610 9611// method id "dialogflow.projects.agent.restore": 9612 9613type ProjectsAgentRestoreCall struct { 9614 s *Service 9615 parent string 9616 googleclouddialogflowv2restoreagentrequest *GoogleCloudDialogflowV2RestoreAgentRequest 9617 urlParams_ gensupport.URLParams 9618 ctx_ context.Context 9619 header_ http.Header 9620} 9621 9622// Restore: Restores the specified agent from a ZIP file. 9623// 9624// Replaces the current agent version with a new one. All the intents 9625// and 9626// entity types in the older version are deleted. 9627// 9628// Operation <response: google.protobuf.Empty> 9629func (r *ProjectsAgentService) Restore(parent string, googleclouddialogflowv2restoreagentrequest *GoogleCloudDialogflowV2RestoreAgentRequest) *ProjectsAgentRestoreCall { 9630 c := &ProjectsAgentRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9631 c.parent = parent 9632 c.googleclouddialogflowv2restoreagentrequest = googleclouddialogflowv2restoreagentrequest 9633 return c 9634} 9635 9636// Fields allows partial responses to be retrieved. See 9637// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9638// for more information. 9639func (c *ProjectsAgentRestoreCall) Fields(s ...googleapi.Field) *ProjectsAgentRestoreCall { 9640 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9641 return c 9642} 9643 9644// Context sets the context to be used in this call's Do method. Any 9645// pending HTTP request will be aborted if the provided context is 9646// canceled. 9647func (c *ProjectsAgentRestoreCall) Context(ctx context.Context) *ProjectsAgentRestoreCall { 9648 c.ctx_ = ctx 9649 return c 9650} 9651 9652// Header returns an http.Header that can be modified by the caller to 9653// add HTTP headers to the request. 9654func (c *ProjectsAgentRestoreCall) Header() http.Header { 9655 if c.header_ == nil { 9656 c.header_ = make(http.Header) 9657 } 9658 return c.header_ 9659} 9660 9661func (c *ProjectsAgentRestoreCall) doRequest(alt string) (*http.Response, error) { 9662 reqHeaders := make(http.Header) 9663 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9664 for k, v := range c.header_ { 9665 reqHeaders[k] = v 9666 } 9667 reqHeaders.Set("User-Agent", c.s.userAgent()) 9668 var body io.Reader = nil 9669 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2restoreagentrequest) 9670 if err != nil { 9671 return nil, err 9672 } 9673 reqHeaders.Set("Content-Type", "application/json") 9674 c.urlParams_.Set("alt", alt) 9675 c.urlParams_.Set("prettyPrint", "false") 9676 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:restore") 9677 urls += "?" + c.urlParams_.Encode() 9678 req, err := http.NewRequest("POST", urls, body) 9679 if err != nil { 9680 return nil, err 9681 } 9682 req.Header = reqHeaders 9683 googleapi.Expand(req.URL, map[string]string{ 9684 "parent": c.parent, 9685 }) 9686 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9687} 9688 9689// Do executes the "dialogflow.projects.agent.restore" call. 9690// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 9691// Any non-2xx status code is an error. Response headers are in either 9692// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 9693// was returned at all) in error.(*googleapi.Error).Header. Use 9694// googleapi.IsNotModified to check whether the returned error was 9695// because http.StatusNotModified was returned. 9696func (c *ProjectsAgentRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 9697 gensupport.SetOptions(c.urlParams_, opts...) 9698 res, err := c.doRequest("json") 9699 if res != nil && res.StatusCode == http.StatusNotModified { 9700 if res.Body != nil { 9701 res.Body.Close() 9702 } 9703 return nil, &googleapi.Error{ 9704 Code: res.StatusCode, 9705 Header: res.Header, 9706 } 9707 } 9708 if err != nil { 9709 return nil, err 9710 } 9711 defer googleapi.CloseBody(res) 9712 if err := googleapi.CheckResponse(res); err != nil { 9713 return nil, err 9714 } 9715 ret := &GoogleLongrunningOperation{ 9716 ServerResponse: googleapi.ServerResponse{ 9717 Header: res.Header, 9718 HTTPStatusCode: res.StatusCode, 9719 }, 9720 } 9721 target := &ret 9722 if err := gensupport.DecodeResponse(target, res); err != nil { 9723 return nil, err 9724 } 9725 return ret, nil 9726 // { 9727 // "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.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 9728 // "flatPath": "v2/projects/{projectsId}/agent:restore", 9729 // "httpMethod": "POST", 9730 // "id": "dialogflow.projects.agent.restore", 9731 // "parameterOrder": [ 9732 // "parent" 9733 // ], 9734 // "parameters": { 9735 // "parent": { 9736 // "description": "Required. The project that the agent to restore is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 9737 // "location": "path", 9738 // "pattern": "^projects/[^/]+$", 9739 // "required": true, 9740 // "type": "string" 9741 // } 9742 // }, 9743 // "path": "v2/{+parent}/agent:restore", 9744 // "request": { 9745 // "$ref": "GoogleCloudDialogflowV2RestoreAgentRequest" 9746 // }, 9747 // "response": { 9748 // "$ref": "GoogleLongrunningOperation" 9749 // }, 9750 // "scopes": [ 9751 // "https://www.googleapis.com/auth/cloud-platform", 9752 // "https://www.googleapis.com/auth/dialogflow" 9753 // ] 9754 // } 9755 9756} 9757 9758// method id "dialogflow.projects.agent.search": 9759 9760type ProjectsAgentSearchCall struct { 9761 s *Service 9762 parent string 9763 urlParams_ gensupport.URLParams 9764 ifNoneMatch_ string 9765 ctx_ context.Context 9766 header_ http.Header 9767} 9768 9769// Search: Returns the list of agents. 9770// 9771// Since there is at most one conversational agent per project, this 9772// method is 9773// useful primarily for listing all agents across projects the caller 9774// has 9775// access to. One can achieve that with a wildcard project collection id 9776// "-". 9777// Refer to 9778// [List 9779// Sub-Collections](https://cloud.google.com/apis/design/design_pat 9780// terns#list_sub-collections). 9781func (r *ProjectsAgentService) Search(parent string) *ProjectsAgentSearchCall { 9782 c := &ProjectsAgentSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9783 c.parent = parent 9784 return c 9785} 9786 9787// PageSize sets the optional parameter "pageSize": The maximum number 9788// of items to return in a single page. By 9789// default 100 and at most 1000. 9790func (c *ProjectsAgentSearchCall) PageSize(pageSize int64) *ProjectsAgentSearchCall { 9791 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9792 return c 9793} 9794 9795// PageToken sets the optional parameter "pageToken": The 9796// next_page_token value returned from a previous list request. 9797func (c *ProjectsAgentSearchCall) PageToken(pageToken string) *ProjectsAgentSearchCall { 9798 c.urlParams_.Set("pageToken", pageToken) 9799 return c 9800} 9801 9802// Fields allows partial responses to be retrieved. See 9803// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9804// for more information. 9805func (c *ProjectsAgentSearchCall) Fields(s ...googleapi.Field) *ProjectsAgentSearchCall { 9806 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9807 return c 9808} 9809 9810// IfNoneMatch sets the optional parameter which makes the operation 9811// fail if the object's ETag matches the given value. This is useful for 9812// getting updates only after the object has changed since the last 9813// request. Use googleapi.IsNotModified to check whether the response 9814// error from Do is the result of In-None-Match. 9815func (c *ProjectsAgentSearchCall) IfNoneMatch(entityTag string) *ProjectsAgentSearchCall { 9816 c.ifNoneMatch_ = entityTag 9817 return c 9818} 9819 9820// Context sets the context to be used in this call's Do method. Any 9821// pending HTTP request will be aborted if the provided context is 9822// canceled. 9823func (c *ProjectsAgentSearchCall) Context(ctx context.Context) *ProjectsAgentSearchCall { 9824 c.ctx_ = ctx 9825 return c 9826} 9827 9828// Header returns an http.Header that can be modified by the caller to 9829// add HTTP headers to the request. 9830func (c *ProjectsAgentSearchCall) Header() http.Header { 9831 if c.header_ == nil { 9832 c.header_ = make(http.Header) 9833 } 9834 return c.header_ 9835} 9836 9837func (c *ProjectsAgentSearchCall) doRequest(alt string) (*http.Response, error) { 9838 reqHeaders := make(http.Header) 9839 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9840 for k, v := range c.header_ { 9841 reqHeaders[k] = v 9842 } 9843 reqHeaders.Set("User-Agent", c.s.userAgent()) 9844 if c.ifNoneMatch_ != "" { 9845 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9846 } 9847 var body io.Reader = nil 9848 c.urlParams_.Set("alt", alt) 9849 c.urlParams_.Set("prettyPrint", "false") 9850 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:search") 9851 urls += "?" + c.urlParams_.Encode() 9852 req, err := http.NewRequest("GET", urls, body) 9853 if err != nil { 9854 return nil, err 9855 } 9856 req.Header = reqHeaders 9857 googleapi.Expand(req.URL, map[string]string{ 9858 "parent": c.parent, 9859 }) 9860 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9861} 9862 9863// Do executes the "dialogflow.projects.agent.search" call. 9864// Exactly one of *GoogleCloudDialogflowV2SearchAgentsResponse or error 9865// will be non-nil. Any non-2xx status code is an error. Response 9866// headers are in either 9867// *GoogleCloudDialogflowV2SearchAgentsResponse.ServerResponse.Header or 9868// (if a response was returned at all) in 9869// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9870// whether the returned error was because http.StatusNotModified was 9871// returned. 9872func (c *ProjectsAgentSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SearchAgentsResponse, error) { 9873 gensupport.SetOptions(c.urlParams_, opts...) 9874 res, err := c.doRequest("json") 9875 if res != nil && res.StatusCode == http.StatusNotModified { 9876 if res.Body != nil { 9877 res.Body.Close() 9878 } 9879 return nil, &googleapi.Error{ 9880 Code: res.StatusCode, 9881 Header: res.Header, 9882 } 9883 } 9884 if err != nil { 9885 return nil, err 9886 } 9887 defer googleapi.CloseBody(res) 9888 if err := googleapi.CheckResponse(res); err != nil { 9889 return nil, err 9890 } 9891 ret := &GoogleCloudDialogflowV2SearchAgentsResponse{ 9892 ServerResponse: googleapi.ServerResponse{ 9893 Header: res.Header, 9894 HTTPStatusCode: res.StatusCode, 9895 }, 9896 } 9897 target := &ret 9898 if err := gensupport.DecodeResponse(target, res); err != nil { 9899 return nil, err 9900 } 9901 return ret, nil 9902 // { 9903 // "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).", 9904 // "flatPath": "v2/projects/{projectsId}/agent:search", 9905 // "httpMethod": "GET", 9906 // "id": "dialogflow.projects.agent.search", 9907 // "parameterOrder": [ 9908 // "parent" 9909 // ], 9910 // "parameters": { 9911 // "pageSize": { 9912 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 9913 // "format": "int32", 9914 // "location": "query", 9915 // "type": "integer" 9916 // }, 9917 // "pageToken": { 9918 // "description": "The next_page_token value returned from a previous list request.", 9919 // "location": "query", 9920 // "type": "string" 9921 // }, 9922 // "parent": { 9923 // "description": "Required. The project to list agents from.\nFormat: `projects/\u003cProject ID or '-'\u003e`.", 9924 // "location": "path", 9925 // "pattern": "^projects/[^/]+$", 9926 // "required": true, 9927 // "type": "string" 9928 // } 9929 // }, 9930 // "path": "v2/{+parent}/agent:search", 9931 // "response": { 9932 // "$ref": "GoogleCloudDialogflowV2SearchAgentsResponse" 9933 // }, 9934 // "scopes": [ 9935 // "https://www.googleapis.com/auth/cloud-platform", 9936 // "https://www.googleapis.com/auth/dialogflow" 9937 // ] 9938 // } 9939 9940} 9941 9942// Pages invokes f for each page of results. 9943// A non-nil error returned from f will halt the iteration. 9944// The provided context supersedes any context provided to the Context method. 9945func (c *ProjectsAgentSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2SearchAgentsResponse) error) error { 9946 c.ctx_ = ctx 9947 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9948 for { 9949 x, err := c.Do() 9950 if err != nil { 9951 return err 9952 } 9953 if err := f(x); err != nil { 9954 return err 9955 } 9956 if x.NextPageToken == "" { 9957 return nil 9958 } 9959 c.PageToken(x.NextPageToken) 9960 } 9961} 9962 9963// method id "dialogflow.projects.agent.train": 9964 9965type ProjectsAgentTrainCall struct { 9966 s *Service 9967 parent string 9968 googleclouddialogflowv2trainagentrequest *GoogleCloudDialogflowV2TrainAgentRequest 9969 urlParams_ gensupport.URLParams 9970 ctx_ context.Context 9971 header_ http.Header 9972} 9973 9974// Train: Trains the specified agent. 9975// 9976// Operation <response: google.protobuf.Empty> 9977func (r *ProjectsAgentService) Train(parent string, googleclouddialogflowv2trainagentrequest *GoogleCloudDialogflowV2TrainAgentRequest) *ProjectsAgentTrainCall { 9978 c := &ProjectsAgentTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9979 c.parent = parent 9980 c.googleclouddialogflowv2trainagentrequest = googleclouddialogflowv2trainagentrequest 9981 return c 9982} 9983 9984// Fields allows partial responses to be retrieved. See 9985// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9986// for more information. 9987func (c *ProjectsAgentTrainCall) Fields(s ...googleapi.Field) *ProjectsAgentTrainCall { 9988 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9989 return c 9990} 9991 9992// Context sets the context to be used in this call's Do method. Any 9993// pending HTTP request will be aborted if the provided context is 9994// canceled. 9995func (c *ProjectsAgentTrainCall) Context(ctx context.Context) *ProjectsAgentTrainCall { 9996 c.ctx_ = ctx 9997 return c 9998} 9999 10000// Header returns an http.Header that can be modified by the caller to 10001// add HTTP headers to the request. 10002func (c *ProjectsAgentTrainCall) Header() http.Header { 10003 if c.header_ == nil { 10004 c.header_ = make(http.Header) 10005 } 10006 return c.header_ 10007} 10008 10009func (c *ProjectsAgentTrainCall) doRequest(alt string) (*http.Response, error) { 10010 reqHeaders := make(http.Header) 10011 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 10012 for k, v := range c.header_ { 10013 reqHeaders[k] = v 10014 } 10015 reqHeaders.Set("User-Agent", c.s.userAgent()) 10016 var body io.Reader = nil 10017 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2trainagentrequest) 10018 if err != nil { 10019 return nil, err 10020 } 10021 reqHeaders.Set("Content-Type", "application/json") 10022 c.urlParams_.Set("alt", alt) 10023 c.urlParams_.Set("prettyPrint", "false") 10024 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:train") 10025 urls += "?" + c.urlParams_.Encode() 10026 req, err := http.NewRequest("POST", urls, body) 10027 if err != nil { 10028 return nil, err 10029 } 10030 req.Header = reqHeaders 10031 googleapi.Expand(req.URL, map[string]string{ 10032 "parent": c.parent, 10033 }) 10034 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10035} 10036 10037// Do executes the "dialogflow.projects.agent.train" call. 10038// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 10039// Any non-2xx status code is an error. Response headers are in either 10040// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 10041// was returned at all) in error.(*googleapi.Error).Header. Use 10042// googleapi.IsNotModified to check whether the returned error was 10043// because http.StatusNotModified was returned. 10044func (c *ProjectsAgentTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 10045 gensupport.SetOptions(c.urlParams_, opts...) 10046 res, err := c.doRequest("json") 10047 if res != nil && res.StatusCode == http.StatusNotModified { 10048 if res.Body != nil { 10049 res.Body.Close() 10050 } 10051 return nil, &googleapi.Error{ 10052 Code: res.StatusCode, 10053 Header: res.Header, 10054 } 10055 } 10056 if err != nil { 10057 return nil, err 10058 } 10059 defer googleapi.CloseBody(res) 10060 if err := googleapi.CheckResponse(res); err != nil { 10061 return nil, err 10062 } 10063 ret := &GoogleLongrunningOperation{ 10064 ServerResponse: googleapi.ServerResponse{ 10065 Header: res.Header, 10066 HTTPStatusCode: res.StatusCode, 10067 }, 10068 } 10069 target := &ret 10070 if err := gensupport.DecodeResponse(target, res); err != nil { 10071 return nil, err 10072 } 10073 return ret, nil 10074 // { 10075 // "description": "Trains the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 10076 // "flatPath": "v2/projects/{projectsId}/agent:train", 10077 // "httpMethod": "POST", 10078 // "id": "dialogflow.projects.agent.train", 10079 // "parameterOrder": [ 10080 // "parent" 10081 // ], 10082 // "parameters": { 10083 // "parent": { 10084 // "description": "Required. The project that the agent to train is associated with.\nFormat: `projects/\u003cProject ID\u003e`.", 10085 // "location": "path", 10086 // "pattern": "^projects/[^/]+$", 10087 // "required": true, 10088 // "type": "string" 10089 // } 10090 // }, 10091 // "path": "v2/{+parent}/agent:train", 10092 // "request": { 10093 // "$ref": "GoogleCloudDialogflowV2TrainAgentRequest" 10094 // }, 10095 // "response": { 10096 // "$ref": "GoogleLongrunningOperation" 10097 // }, 10098 // "scopes": [ 10099 // "https://www.googleapis.com/auth/cloud-platform", 10100 // "https://www.googleapis.com/auth/dialogflow" 10101 // ] 10102 // } 10103 10104} 10105 10106// method id "dialogflow.projects.agent.updateFulfillment": 10107 10108type ProjectsAgentUpdateFulfillmentCall struct { 10109 s *Service 10110 nameid string 10111 googleclouddialogflowv2fulfillment *GoogleCloudDialogflowV2Fulfillment 10112 urlParams_ gensupport.URLParams 10113 ctx_ context.Context 10114 header_ http.Header 10115} 10116 10117// UpdateFulfillment: Updates the fulfillment. 10118func (r *ProjectsAgentService) UpdateFulfillment(nameid string, googleclouddialogflowv2fulfillment *GoogleCloudDialogflowV2Fulfillment) *ProjectsAgentUpdateFulfillmentCall { 10119 c := &ProjectsAgentUpdateFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10120 c.nameid = nameid 10121 c.googleclouddialogflowv2fulfillment = googleclouddialogflowv2fulfillment 10122 return c 10123} 10124 10125// UpdateMask sets the optional parameter "updateMask": Required. The 10126// mask to control which fields get updated. If the mask is not 10127// present, all fields will be updated. 10128func (c *ProjectsAgentUpdateFulfillmentCall) UpdateMask(updateMask string) *ProjectsAgentUpdateFulfillmentCall { 10129 c.urlParams_.Set("updateMask", updateMask) 10130 return c 10131} 10132 10133// Fields allows partial responses to be retrieved. See 10134// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10135// for more information. 10136func (c *ProjectsAgentUpdateFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsAgentUpdateFulfillmentCall { 10137 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10138 return c 10139} 10140 10141// Context sets the context to be used in this call's Do method. Any 10142// pending HTTP request will be aborted if the provided context is 10143// canceled. 10144func (c *ProjectsAgentUpdateFulfillmentCall) Context(ctx context.Context) *ProjectsAgentUpdateFulfillmentCall { 10145 c.ctx_ = ctx 10146 return c 10147} 10148 10149// Header returns an http.Header that can be modified by the caller to 10150// add HTTP headers to the request. 10151func (c *ProjectsAgentUpdateFulfillmentCall) Header() http.Header { 10152 if c.header_ == nil { 10153 c.header_ = make(http.Header) 10154 } 10155 return c.header_ 10156} 10157 10158func (c *ProjectsAgentUpdateFulfillmentCall) doRequest(alt string) (*http.Response, error) { 10159 reqHeaders := make(http.Header) 10160 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 10161 for k, v := range c.header_ { 10162 reqHeaders[k] = v 10163 } 10164 reqHeaders.Set("User-Agent", c.s.userAgent()) 10165 var body io.Reader = nil 10166 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2fulfillment) 10167 if err != nil { 10168 return nil, err 10169 } 10170 reqHeaders.Set("Content-Type", "application/json") 10171 c.urlParams_.Set("alt", alt) 10172 c.urlParams_.Set("prettyPrint", "false") 10173 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10174 urls += "?" + c.urlParams_.Encode() 10175 req, err := http.NewRequest("PATCH", urls, body) 10176 if err != nil { 10177 return nil, err 10178 } 10179 req.Header = reqHeaders 10180 googleapi.Expand(req.URL, map[string]string{ 10181 "name": c.nameid, 10182 }) 10183 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10184} 10185 10186// Do executes the "dialogflow.projects.agent.updateFulfillment" call. 10187// Exactly one of *GoogleCloudDialogflowV2Fulfillment or error will be 10188// non-nil. Any non-2xx status code is an error. Response headers are in 10189// either *GoogleCloudDialogflowV2Fulfillment.ServerResponse.Header or 10190// (if a response was returned at all) in 10191// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10192// whether the returned error was because http.StatusNotModified was 10193// returned. 10194func (c *ProjectsAgentUpdateFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Fulfillment, error) { 10195 gensupport.SetOptions(c.urlParams_, opts...) 10196 res, err := c.doRequest("json") 10197 if res != nil && res.StatusCode == http.StatusNotModified { 10198 if res.Body != nil { 10199 res.Body.Close() 10200 } 10201 return nil, &googleapi.Error{ 10202 Code: res.StatusCode, 10203 Header: res.Header, 10204 } 10205 } 10206 if err != nil { 10207 return nil, err 10208 } 10209 defer googleapi.CloseBody(res) 10210 if err := googleapi.CheckResponse(res); err != nil { 10211 return nil, err 10212 } 10213 ret := &GoogleCloudDialogflowV2Fulfillment{ 10214 ServerResponse: googleapi.ServerResponse{ 10215 Header: res.Header, 10216 HTTPStatusCode: res.StatusCode, 10217 }, 10218 } 10219 target := &ret 10220 if err := gensupport.DecodeResponse(target, res); err != nil { 10221 return nil, err 10222 } 10223 return ret, nil 10224 // { 10225 // "description": "Updates the fulfillment.", 10226 // "flatPath": "v2/projects/{projectsId}/agent/fulfillment", 10227 // "httpMethod": "PATCH", 10228 // "id": "dialogflow.projects.agent.updateFulfillment", 10229 // "parameterOrder": [ 10230 // "name" 10231 // ], 10232 // "parameters": { 10233 // "name": { 10234 // "description": "Required. The unique identifier of the fulfillment.\nFormat: `projects/\u003cProject ID\u003e/agent/fulfillment`.", 10235 // "location": "path", 10236 // "pattern": "^projects/[^/]+/agent/fulfillment$", 10237 // "required": true, 10238 // "type": "string" 10239 // }, 10240 // "updateMask": { 10241 // "description": "Required. The mask to control which fields get updated. If the mask is not\npresent, all fields will be updated.", 10242 // "format": "google-fieldmask", 10243 // "location": "query", 10244 // "type": "string" 10245 // } 10246 // }, 10247 // "path": "v2/{+name}", 10248 // "request": { 10249 // "$ref": "GoogleCloudDialogflowV2Fulfillment" 10250 // }, 10251 // "response": { 10252 // "$ref": "GoogleCloudDialogflowV2Fulfillment" 10253 // }, 10254 // "scopes": [ 10255 // "https://www.googleapis.com/auth/cloud-platform", 10256 // "https://www.googleapis.com/auth/dialogflow" 10257 // ] 10258 // } 10259 10260} 10261 10262// method id "dialogflow.projects.agent.entityTypes.batchDelete": 10263 10264type ProjectsAgentEntityTypesBatchDeleteCall struct { 10265 s *Service 10266 parent string 10267 googleclouddialogflowv2batchdeleteentitytypesrequest *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest 10268 urlParams_ gensupport.URLParams 10269 ctx_ context.Context 10270 header_ http.Header 10271} 10272 10273// BatchDelete: Deletes entity types in the specified agent. 10274// 10275// Operation <response: google.protobuf.Empty> 10276func (r *ProjectsAgentEntityTypesService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteentitytypesrequest *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest) *ProjectsAgentEntityTypesBatchDeleteCall { 10277 c := &ProjectsAgentEntityTypesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10278 c.parent = parent 10279 c.googleclouddialogflowv2batchdeleteentitytypesrequest = googleclouddialogflowv2batchdeleteentitytypesrequest 10280 return c 10281} 10282 10283// Fields allows partial responses to be retrieved. See 10284// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10285// for more information. 10286func (c *ProjectsAgentEntityTypesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchDeleteCall { 10287 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10288 return c 10289} 10290 10291// Context sets the context to be used in this call's Do method. Any 10292// pending HTTP request will be aborted if the provided context is 10293// canceled. 10294func (c *ProjectsAgentEntityTypesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchDeleteCall { 10295 c.ctx_ = ctx 10296 return c 10297} 10298 10299// Header returns an http.Header that can be modified by the caller to 10300// add HTTP headers to the request. 10301func (c *ProjectsAgentEntityTypesBatchDeleteCall) Header() http.Header { 10302 if c.header_ == nil { 10303 c.header_ = make(http.Header) 10304 } 10305 return c.header_ 10306} 10307 10308func (c *ProjectsAgentEntityTypesBatchDeleteCall) doRequest(alt string) (*http.Response, error) { 10309 reqHeaders := make(http.Header) 10310 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 10311 for k, v := range c.header_ { 10312 reqHeaders[k] = v 10313 } 10314 reqHeaders.Set("User-Agent", c.s.userAgent()) 10315 var body io.Reader = nil 10316 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteentitytypesrequest) 10317 if err != nil { 10318 return nil, err 10319 } 10320 reqHeaders.Set("Content-Type", "application/json") 10321 c.urlParams_.Set("alt", alt) 10322 c.urlParams_.Set("prettyPrint", "false") 10323 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes:batchDelete") 10324 urls += "?" + c.urlParams_.Encode() 10325 req, err := http.NewRequest("POST", urls, body) 10326 if err != nil { 10327 return nil, err 10328 } 10329 req.Header = reqHeaders 10330 googleapi.Expand(req.URL, map[string]string{ 10331 "parent": c.parent, 10332 }) 10333 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10334} 10335 10336// Do executes the "dialogflow.projects.agent.entityTypes.batchDelete" call. 10337// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 10338// Any non-2xx status code is an error. Response headers are in either 10339// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 10340// was returned at all) in error.(*googleapi.Error).Header. Use 10341// googleapi.IsNotModified to check whether the returned error was 10342// because http.StatusNotModified was returned. 10343func (c *ProjectsAgentEntityTypesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 10344 gensupport.SetOptions(c.urlParams_, opts...) 10345 res, err := c.doRequest("json") 10346 if res != nil && res.StatusCode == http.StatusNotModified { 10347 if res.Body != nil { 10348 res.Body.Close() 10349 } 10350 return nil, &googleapi.Error{ 10351 Code: res.StatusCode, 10352 Header: res.Header, 10353 } 10354 } 10355 if err != nil { 10356 return nil, err 10357 } 10358 defer googleapi.CloseBody(res) 10359 if err := googleapi.CheckResponse(res); err != nil { 10360 return nil, err 10361 } 10362 ret := &GoogleLongrunningOperation{ 10363 ServerResponse: googleapi.ServerResponse{ 10364 Header: res.Header, 10365 HTTPStatusCode: res.StatusCode, 10366 }, 10367 } 10368 target := &ret 10369 if err := gensupport.DecodeResponse(target, res); err != nil { 10370 return nil, err 10371 } 10372 return ret, nil 10373 // { 10374 // "description": "Deletes entity types in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 10375 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes:batchDelete", 10376 // "httpMethod": "POST", 10377 // "id": "dialogflow.projects.agent.entityTypes.batchDelete", 10378 // "parameterOrder": [ 10379 // "parent" 10380 // ], 10381 // "parameters": { 10382 // "parent": { 10383 // "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.", 10384 // "location": "path", 10385 // "pattern": "^projects/[^/]+/agent$", 10386 // "required": true, 10387 // "type": "string" 10388 // } 10389 // }, 10390 // "path": "v2/{+parent}/entityTypes:batchDelete", 10391 // "request": { 10392 // "$ref": "GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest" 10393 // }, 10394 // "response": { 10395 // "$ref": "GoogleLongrunningOperation" 10396 // }, 10397 // "scopes": [ 10398 // "https://www.googleapis.com/auth/cloud-platform", 10399 // "https://www.googleapis.com/auth/dialogflow" 10400 // ] 10401 // } 10402 10403} 10404 10405// method id "dialogflow.projects.agent.entityTypes.batchUpdate": 10406 10407type ProjectsAgentEntityTypesBatchUpdateCall struct { 10408 s *Service 10409 parent string 10410 googleclouddialogflowv2batchupdateentitytypesrequest *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest 10411 urlParams_ gensupport.URLParams 10412 ctx_ context.Context 10413 header_ http.Header 10414} 10415 10416// BatchUpdate: Updates/Creates multiple entity types in the specified 10417// agent. 10418// 10419// Operation <response: BatchUpdateEntityTypesResponse> 10420func (r *ProjectsAgentEntityTypesService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateentitytypesrequest *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest) *ProjectsAgentEntityTypesBatchUpdateCall { 10421 c := &ProjectsAgentEntityTypesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10422 c.parent = parent 10423 c.googleclouddialogflowv2batchupdateentitytypesrequest = googleclouddialogflowv2batchupdateentitytypesrequest 10424 return c 10425} 10426 10427// Fields allows partial responses to be retrieved. See 10428// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10429// for more information. 10430func (c *ProjectsAgentEntityTypesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchUpdateCall { 10431 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10432 return c 10433} 10434 10435// Context sets the context to be used in this call's Do method. Any 10436// pending HTTP request will be aborted if the provided context is 10437// canceled. 10438func (c *ProjectsAgentEntityTypesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchUpdateCall { 10439 c.ctx_ = ctx 10440 return c 10441} 10442 10443// Header returns an http.Header that can be modified by the caller to 10444// add HTTP headers to the request. 10445func (c *ProjectsAgentEntityTypesBatchUpdateCall) Header() http.Header { 10446 if c.header_ == nil { 10447 c.header_ = make(http.Header) 10448 } 10449 return c.header_ 10450} 10451 10452func (c *ProjectsAgentEntityTypesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 10453 reqHeaders := make(http.Header) 10454 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 10455 for k, v := range c.header_ { 10456 reqHeaders[k] = v 10457 } 10458 reqHeaders.Set("User-Agent", c.s.userAgent()) 10459 var body io.Reader = nil 10460 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateentitytypesrequest) 10461 if err != nil { 10462 return nil, err 10463 } 10464 reqHeaders.Set("Content-Type", "application/json") 10465 c.urlParams_.Set("alt", alt) 10466 c.urlParams_.Set("prettyPrint", "false") 10467 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes:batchUpdate") 10468 urls += "?" + c.urlParams_.Encode() 10469 req, err := http.NewRequest("POST", urls, body) 10470 if err != nil { 10471 return nil, err 10472 } 10473 req.Header = reqHeaders 10474 googleapi.Expand(req.URL, map[string]string{ 10475 "parent": c.parent, 10476 }) 10477 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10478} 10479 10480// Do executes the "dialogflow.projects.agent.entityTypes.batchUpdate" call. 10481// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 10482// Any non-2xx status code is an error. Response headers are in either 10483// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 10484// was returned at all) in error.(*googleapi.Error).Header. Use 10485// googleapi.IsNotModified to check whether the returned error was 10486// because http.StatusNotModified was returned. 10487func (c *ProjectsAgentEntityTypesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 10488 gensupport.SetOptions(c.urlParams_, opts...) 10489 res, err := c.doRequest("json") 10490 if res != nil && res.StatusCode == http.StatusNotModified { 10491 if res.Body != nil { 10492 res.Body.Close() 10493 } 10494 return nil, &googleapi.Error{ 10495 Code: res.StatusCode, 10496 Header: res.Header, 10497 } 10498 } 10499 if err != nil { 10500 return nil, err 10501 } 10502 defer googleapi.CloseBody(res) 10503 if err := googleapi.CheckResponse(res); err != nil { 10504 return nil, err 10505 } 10506 ret := &GoogleLongrunningOperation{ 10507 ServerResponse: googleapi.ServerResponse{ 10508 Header: res.Header, 10509 HTTPStatusCode: res.StatusCode, 10510 }, 10511 } 10512 target := &ret 10513 if err := gensupport.DecodeResponse(target, res); err != nil { 10514 return nil, err 10515 } 10516 return ret, nil 10517 // { 10518 // "description": "Updates/Creates multiple entity types in the specified agent.\n\nOperation \u003cresponse: BatchUpdateEntityTypesResponse\u003e", 10519 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes:batchUpdate", 10520 // "httpMethod": "POST", 10521 // "id": "dialogflow.projects.agent.entityTypes.batchUpdate", 10522 // "parameterOrder": [ 10523 // "parent" 10524 // ], 10525 // "parameters": { 10526 // "parent": { 10527 // "description": "Required. The name of the agent to update or create entity types in.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 10528 // "location": "path", 10529 // "pattern": "^projects/[^/]+/agent$", 10530 // "required": true, 10531 // "type": "string" 10532 // } 10533 // }, 10534 // "path": "v2/{+parent}/entityTypes:batchUpdate", 10535 // "request": { 10536 // "$ref": "GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest" 10537 // }, 10538 // "response": { 10539 // "$ref": "GoogleLongrunningOperation" 10540 // }, 10541 // "scopes": [ 10542 // "https://www.googleapis.com/auth/cloud-platform", 10543 // "https://www.googleapis.com/auth/dialogflow" 10544 // ] 10545 // } 10546 10547} 10548 10549// method id "dialogflow.projects.agent.entityTypes.create": 10550 10551type ProjectsAgentEntityTypesCreateCall struct { 10552 s *Service 10553 parent string 10554 googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType 10555 urlParams_ gensupport.URLParams 10556 ctx_ context.Context 10557 header_ http.Header 10558} 10559 10560// Create: Creates an entity type in the specified agent. 10561func (r *ProjectsAgentEntityTypesService) Create(parent string, googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType) *ProjectsAgentEntityTypesCreateCall { 10562 c := &ProjectsAgentEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10563 c.parent = parent 10564 c.googleclouddialogflowv2entitytype = googleclouddialogflowv2entitytype 10565 return c 10566} 10567 10568// LanguageCode sets the optional parameter "languageCode": The language 10569// of entity synonyms defined in `entity_type`. If not 10570// specified, the agent's default language is 10571// used. 10572// [Many 10573// languages](https://cloud.google.com/dialogflow/docs/refere 10574// nce/language) 10575// are supported. Note: languages must be enabled in the agent before 10576// they can 10577// be used. 10578func (c *ProjectsAgentEntityTypesCreateCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesCreateCall { 10579 c.urlParams_.Set("languageCode", languageCode) 10580 return c 10581} 10582 10583// Fields allows partial responses to be retrieved. See 10584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10585// for more information. 10586func (c *ProjectsAgentEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesCreateCall { 10587 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10588 return c 10589} 10590 10591// Context sets the context to be used in this call's Do method. Any 10592// pending HTTP request will be aborted if the provided context is 10593// canceled. 10594func (c *ProjectsAgentEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesCreateCall { 10595 c.ctx_ = ctx 10596 return c 10597} 10598 10599// Header returns an http.Header that can be modified by the caller to 10600// add HTTP headers to the request. 10601func (c *ProjectsAgentEntityTypesCreateCall) Header() http.Header { 10602 if c.header_ == nil { 10603 c.header_ = make(http.Header) 10604 } 10605 return c.header_ 10606} 10607 10608func (c *ProjectsAgentEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { 10609 reqHeaders := make(http.Header) 10610 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 10611 for k, v := range c.header_ { 10612 reqHeaders[k] = v 10613 } 10614 reqHeaders.Set("User-Agent", c.s.userAgent()) 10615 var body io.Reader = nil 10616 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2entitytype) 10617 if err != nil { 10618 return nil, err 10619 } 10620 reqHeaders.Set("Content-Type", "application/json") 10621 c.urlParams_.Set("alt", alt) 10622 c.urlParams_.Set("prettyPrint", "false") 10623 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes") 10624 urls += "?" + c.urlParams_.Encode() 10625 req, err := http.NewRequest("POST", urls, body) 10626 if err != nil { 10627 return nil, err 10628 } 10629 req.Header = reqHeaders 10630 googleapi.Expand(req.URL, map[string]string{ 10631 "parent": c.parent, 10632 }) 10633 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10634} 10635 10636// Do executes the "dialogflow.projects.agent.entityTypes.create" call. 10637// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be 10638// non-nil. Any non-2xx status code is an error. Response headers are in 10639// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or 10640// (if a response was returned at all) in 10641// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10642// whether the returned error was because http.StatusNotModified was 10643// returned. 10644func (c *ProjectsAgentEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) { 10645 gensupport.SetOptions(c.urlParams_, opts...) 10646 res, err := c.doRequest("json") 10647 if res != nil && res.StatusCode == http.StatusNotModified { 10648 if res.Body != nil { 10649 res.Body.Close() 10650 } 10651 return nil, &googleapi.Error{ 10652 Code: res.StatusCode, 10653 Header: res.Header, 10654 } 10655 } 10656 if err != nil { 10657 return nil, err 10658 } 10659 defer googleapi.CloseBody(res) 10660 if err := googleapi.CheckResponse(res); err != nil { 10661 return nil, err 10662 } 10663 ret := &GoogleCloudDialogflowV2EntityType{ 10664 ServerResponse: googleapi.ServerResponse{ 10665 Header: res.Header, 10666 HTTPStatusCode: res.StatusCode, 10667 }, 10668 } 10669 target := &ret 10670 if err := gensupport.DecodeResponse(target, res); err != nil { 10671 return nil, err 10672 } 10673 return ret, nil 10674 // { 10675 // "description": "Creates an entity type in the specified agent.", 10676 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes", 10677 // "httpMethod": "POST", 10678 // "id": "dialogflow.projects.agent.entityTypes.create", 10679 // "parameterOrder": [ 10680 // "parent" 10681 // ], 10682 // "parameters": { 10683 // "languageCode": { 10684 // "description": "Optional. The language of entity synonyms defined in `entity_type`. If not\nspecified, the agent's default language is used.\n[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.", 10685 // "location": "query", 10686 // "type": "string" 10687 // }, 10688 // "parent": { 10689 // "description": "Required. The agent to create a entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 10690 // "location": "path", 10691 // "pattern": "^projects/[^/]+/agent$", 10692 // "required": true, 10693 // "type": "string" 10694 // } 10695 // }, 10696 // "path": "v2/{+parent}/entityTypes", 10697 // "request": { 10698 // "$ref": "GoogleCloudDialogflowV2EntityType" 10699 // }, 10700 // "response": { 10701 // "$ref": "GoogleCloudDialogflowV2EntityType" 10702 // }, 10703 // "scopes": [ 10704 // "https://www.googleapis.com/auth/cloud-platform", 10705 // "https://www.googleapis.com/auth/dialogflow" 10706 // ] 10707 // } 10708 10709} 10710 10711// method id "dialogflow.projects.agent.entityTypes.delete": 10712 10713type ProjectsAgentEntityTypesDeleteCall struct { 10714 s *Service 10715 name string 10716 urlParams_ gensupport.URLParams 10717 ctx_ context.Context 10718 header_ http.Header 10719} 10720 10721// Delete: Deletes the specified entity type. 10722func (r *ProjectsAgentEntityTypesService) Delete(name string) *ProjectsAgentEntityTypesDeleteCall { 10723 c := &ProjectsAgentEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10724 c.name = name 10725 return c 10726} 10727 10728// Fields allows partial responses to be retrieved. See 10729// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10730// for more information. 10731func (c *ProjectsAgentEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesDeleteCall { 10732 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10733 return c 10734} 10735 10736// Context sets the context to be used in this call's Do method. Any 10737// pending HTTP request will be aborted if the provided context is 10738// canceled. 10739func (c *ProjectsAgentEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesDeleteCall { 10740 c.ctx_ = ctx 10741 return c 10742} 10743 10744// Header returns an http.Header that can be modified by the caller to 10745// add HTTP headers to the request. 10746func (c *ProjectsAgentEntityTypesDeleteCall) Header() http.Header { 10747 if c.header_ == nil { 10748 c.header_ = make(http.Header) 10749 } 10750 return c.header_ 10751} 10752 10753func (c *ProjectsAgentEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 10754 reqHeaders := make(http.Header) 10755 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 10756 for k, v := range c.header_ { 10757 reqHeaders[k] = v 10758 } 10759 reqHeaders.Set("User-Agent", c.s.userAgent()) 10760 var body io.Reader = nil 10761 c.urlParams_.Set("alt", alt) 10762 c.urlParams_.Set("prettyPrint", "false") 10763 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10764 urls += "?" + c.urlParams_.Encode() 10765 req, err := http.NewRequest("DELETE", urls, body) 10766 if err != nil { 10767 return nil, err 10768 } 10769 req.Header = reqHeaders 10770 googleapi.Expand(req.URL, map[string]string{ 10771 "name": c.name, 10772 }) 10773 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10774} 10775 10776// Do executes the "dialogflow.projects.agent.entityTypes.delete" call. 10777// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 10778// non-2xx status code is an error. Response headers are in either 10779// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 10780// returned at all) in error.(*googleapi.Error).Header. Use 10781// googleapi.IsNotModified to check whether the returned error was 10782// because http.StatusNotModified was returned. 10783func (c *ProjectsAgentEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 10784 gensupport.SetOptions(c.urlParams_, opts...) 10785 res, err := c.doRequest("json") 10786 if res != nil && res.StatusCode == http.StatusNotModified { 10787 if res.Body != nil { 10788 res.Body.Close() 10789 } 10790 return nil, &googleapi.Error{ 10791 Code: res.StatusCode, 10792 Header: res.Header, 10793 } 10794 } 10795 if err != nil { 10796 return nil, err 10797 } 10798 defer googleapi.CloseBody(res) 10799 if err := googleapi.CheckResponse(res); err != nil { 10800 return nil, err 10801 } 10802 ret := &GoogleProtobufEmpty{ 10803 ServerResponse: googleapi.ServerResponse{ 10804 Header: res.Header, 10805 HTTPStatusCode: res.StatusCode, 10806 }, 10807 } 10808 target := &ret 10809 if err := gensupport.DecodeResponse(target, res); err != nil { 10810 return nil, err 10811 } 10812 return ret, nil 10813 // { 10814 // "description": "Deletes the specified entity type.", 10815 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}", 10816 // "httpMethod": "DELETE", 10817 // "id": "dialogflow.projects.agent.entityTypes.delete", 10818 // "parameterOrder": [ 10819 // "name" 10820 // ], 10821 // "parameters": { 10822 // "name": { 10823 // "description": "Required. The name of the entity type to delete.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.", 10824 // "location": "path", 10825 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 10826 // "required": true, 10827 // "type": "string" 10828 // } 10829 // }, 10830 // "path": "v2/{+name}", 10831 // "response": { 10832 // "$ref": "GoogleProtobufEmpty" 10833 // }, 10834 // "scopes": [ 10835 // "https://www.googleapis.com/auth/cloud-platform", 10836 // "https://www.googleapis.com/auth/dialogflow" 10837 // ] 10838 // } 10839 10840} 10841 10842// method id "dialogflow.projects.agent.entityTypes.get": 10843 10844type ProjectsAgentEntityTypesGetCall struct { 10845 s *Service 10846 name string 10847 urlParams_ gensupport.URLParams 10848 ifNoneMatch_ string 10849 ctx_ context.Context 10850 header_ http.Header 10851} 10852 10853// Get: Retrieves the specified entity type. 10854func (r *ProjectsAgentEntityTypesService) Get(name string) *ProjectsAgentEntityTypesGetCall { 10855 c := &ProjectsAgentEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10856 c.name = name 10857 return c 10858} 10859 10860// LanguageCode sets the optional parameter "languageCode": The language 10861// to retrieve entity synonyms for. If not specified, 10862// the agent's default language is 10863// used. 10864// [Many 10865// languages](https://cloud.google.com/dialogflow/docs/refere 10866// nce/language) 10867// are supported. Note: languages must be enabled in the agent before 10868// they can 10869// be used. 10870func (c *ProjectsAgentEntityTypesGetCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesGetCall { 10871 c.urlParams_.Set("languageCode", languageCode) 10872 return c 10873} 10874 10875// Fields allows partial responses to be retrieved. See 10876// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10877// for more information. 10878func (c *ProjectsAgentEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesGetCall { 10879 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10880 return c 10881} 10882 10883// IfNoneMatch sets the optional parameter which makes the operation 10884// fail if the object's ETag matches the given value. This is useful for 10885// getting updates only after the object has changed since the last 10886// request. Use googleapi.IsNotModified to check whether the response 10887// error from Do is the result of In-None-Match. 10888func (c *ProjectsAgentEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesGetCall { 10889 c.ifNoneMatch_ = entityTag 10890 return c 10891} 10892 10893// Context sets the context to be used in this call's Do method. Any 10894// pending HTTP request will be aborted if the provided context is 10895// canceled. 10896func (c *ProjectsAgentEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEntityTypesGetCall { 10897 c.ctx_ = ctx 10898 return c 10899} 10900 10901// Header returns an http.Header that can be modified by the caller to 10902// add HTTP headers to the request. 10903func (c *ProjectsAgentEntityTypesGetCall) Header() http.Header { 10904 if c.header_ == nil { 10905 c.header_ = make(http.Header) 10906 } 10907 return c.header_ 10908} 10909 10910func (c *ProjectsAgentEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { 10911 reqHeaders := make(http.Header) 10912 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 10913 for k, v := range c.header_ { 10914 reqHeaders[k] = v 10915 } 10916 reqHeaders.Set("User-Agent", c.s.userAgent()) 10917 if c.ifNoneMatch_ != "" { 10918 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10919 } 10920 var body io.Reader = nil 10921 c.urlParams_.Set("alt", alt) 10922 c.urlParams_.Set("prettyPrint", "false") 10923 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10924 urls += "?" + c.urlParams_.Encode() 10925 req, err := http.NewRequest("GET", urls, body) 10926 if err != nil { 10927 return nil, err 10928 } 10929 req.Header = reqHeaders 10930 googleapi.Expand(req.URL, map[string]string{ 10931 "name": c.name, 10932 }) 10933 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10934} 10935 10936// Do executes the "dialogflow.projects.agent.entityTypes.get" call. 10937// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be 10938// non-nil. Any non-2xx status code is an error. Response headers are in 10939// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or 10940// (if a response was returned at all) in 10941// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10942// whether the returned error was because http.StatusNotModified was 10943// returned. 10944func (c *ProjectsAgentEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) { 10945 gensupport.SetOptions(c.urlParams_, opts...) 10946 res, err := c.doRequest("json") 10947 if res != nil && res.StatusCode == http.StatusNotModified { 10948 if res.Body != nil { 10949 res.Body.Close() 10950 } 10951 return nil, &googleapi.Error{ 10952 Code: res.StatusCode, 10953 Header: res.Header, 10954 } 10955 } 10956 if err != nil { 10957 return nil, err 10958 } 10959 defer googleapi.CloseBody(res) 10960 if err := googleapi.CheckResponse(res); err != nil { 10961 return nil, err 10962 } 10963 ret := &GoogleCloudDialogflowV2EntityType{ 10964 ServerResponse: googleapi.ServerResponse{ 10965 Header: res.Header, 10966 HTTPStatusCode: res.StatusCode, 10967 }, 10968 } 10969 target := &ret 10970 if err := gensupport.DecodeResponse(target, res); err != nil { 10971 return nil, err 10972 } 10973 return ret, nil 10974 // { 10975 // "description": "Retrieves the specified entity type.", 10976 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}", 10977 // "httpMethod": "GET", 10978 // "id": "dialogflow.projects.agent.entityTypes.get", 10979 // "parameterOrder": [ 10980 // "name" 10981 // ], 10982 // "parameters": { 10983 // "languageCode": { 10984 // "description": "Optional. The language to retrieve entity synonyms for. If not specified,\nthe agent's default language is used.\n[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.", 10985 // "location": "query", 10986 // "type": "string" 10987 // }, 10988 // "name": { 10989 // "description": "Required. The name of the entity type.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.", 10990 // "location": "path", 10991 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 10992 // "required": true, 10993 // "type": "string" 10994 // } 10995 // }, 10996 // "path": "v2/{+name}", 10997 // "response": { 10998 // "$ref": "GoogleCloudDialogflowV2EntityType" 10999 // }, 11000 // "scopes": [ 11001 // "https://www.googleapis.com/auth/cloud-platform", 11002 // "https://www.googleapis.com/auth/dialogflow" 11003 // ] 11004 // } 11005 11006} 11007 11008// method id "dialogflow.projects.agent.entityTypes.list": 11009 11010type ProjectsAgentEntityTypesListCall struct { 11011 s *Service 11012 parent string 11013 urlParams_ gensupport.URLParams 11014 ifNoneMatch_ string 11015 ctx_ context.Context 11016 header_ http.Header 11017} 11018 11019// List: Returns the list of all entity types in the specified agent. 11020func (r *ProjectsAgentEntityTypesService) List(parent string) *ProjectsAgentEntityTypesListCall { 11021 c := &ProjectsAgentEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11022 c.parent = parent 11023 return c 11024} 11025 11026// LanguageCode sets the optional parameter "languageCode": The language 11027// to list entity synonyms for. If not specified, 11028// the agent's default language is 11029// used. 11030// [Many 11031// languages](https://cloud.google.com/dialogflow/docs/refere 11032// nce/language) 11033// are supported. Note: languages must be enabled in the agent before 11034// they can 11035// be used. 11036func (c *ProjectsAgentEntityTypesListCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesListCall { 11037 c.urlParams_.Set("languageCode", languageCode) 11038 return c 11039} 11040 11041// PageSize sets the optional parameter "pageSize": The maximum number 11042// of items to return in a single page. By 11043// default 100 and at most 1000. 11044func (c *ProjectsAgentEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEntityTypesListCall { 11045 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11046 return c 11047} 11048 11049// PageToken sets the optional parameter "pageToken": The 11050// next_page_token value returned from a previous list request. 11051func (c *ProjectsAgentEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEntityTypesListCall { 11052 c.urlParams_.Set("pageToken", pageToken) 11053 return c 11054} 11055 11056// Fields allows partial responses to be retrieved. See 11057// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11058// for more information. 11059func (c *ProjectsAgentEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesListCall { 11060 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11061 return c 11062} 11063 11064// IfNoneMatch sets the optional parameter which makes the operation 11065// fail if the object's ETag matches the given value. This is useful for 11066// getting updates only after the object has changed since the last 11067// request. Use googleapi.IsNotModified to check whether the response 11068// error from Do is the result of In-None-Match. 11069func (c *ProjectsAgentEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesListCall { 11070 c.ifNoneMatch_ = entityTag 11071 return c 11072} 11073 11074// Context sets the context to be used in this call's Do method. Any 11075// pending HTTP request will be aborted if the provided context is 11076// canceled. 11077func (c *ProjectsAgentEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEntityTypesListCall { 11078 c.ctx_ = ctx 11079 return c 11080} 11081 11082// Header returns an http.Header that can be modified by the caller to 11083// add HTTP headers to the request. 11084func (c *ProjectsAgentEntityTypesListCall) Header() http.Header { 11085 if c.header_ == nil { 11086 c.header_ = make(http.Header) 11087 } 11088 return c.header_ 11089} 11090 11091func (c *ProjectsAgentEntityTypesListCall) doRequest(alt string) (*http.Response, error) { 11092 reqHeaders := make(http.Header) 11093 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 11094 for k, v := range c.header_ { 11095 reqHeaders[k] = v 11096 } 11097 reqHeaders.Set("User-Agent", c.s.userAgent()) 11098 if c.ifNoneMatch_ != "" { 11099 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11100 } 11101 var body io.Reader = nil 11102 c.urlParams_.Set("alt", alt) 11103 c.urlParams_.Set("prettyPrint", "false") 11104 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes") 11105 urls += "?" + c.urlParams_.Encode() 11106 req, err := http.NewRequest("GET", urls, body) 11107 if err != nil { 11108 return nil, err 11109 } 11110 req.Header = reqHeaders 11111 googleapi.Expand(req.URL, map[string]string{ 11112 "parent": c.parent, 11113 }) 11114 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11115} 11116 11117// Do executes the "dialogflow.projects.agent.entityTypes.list" call. 11118// Exactly one of *GoogleCloudDialogflowV2ListEntityTypesResponse or 11119// error will be non-nil. Any non-2xx status code is an error. Response 11120// headers are in either 11121// *GoogleCloudDialogflowV2ListEntityTypesResponse.ServerResponse.Header 11122// or (if a response was returned at all) in 11123// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11124// whether the returned error was because http.StatusNotModified was 11125// returned. 11126func (c *ProjectsAgentEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListEntityTypesResponse, error) { 11127 gensupport.SetOptions(c.urlParams_, opts...) 11128 res, err := c.doRequest("json") 11129 if res != nil && res.StatusCode == http.StatusNotModified { 11130 if res.Body != nil { 11131 res.Body.Close() 11132 } 11133 return nil, &googleapi.Error{ 11134 Code: res.StatusCode, 11135 Header: res.Header, 11136 } 11137 } 11138 if err != nil { 11139 return nil, err 11140 } 11141 defer googleapi.CloseBody(res) 11142 if err := googleapi.CheckResponse(res); err != nil { 11143 return nil, err 11144 } 11145 ret := &GoogleCloudDialogflowV2ListEntityTypesResponse{ 11146 ServerResponse: googleapi.ServerResponse{ 11147 Header: res.Header, 11148 HTTPStatusCode: res.StatusCode, 11149 }, 11150 } 11151 target := &ret 11152 if err := gensupport.DecodeResponse(target, res); err != nil { 11153 return nil, err 11154 } 11155 return ret, nil 11156 // { 11157 // "description": "Returns the list of all entity types in the specified agent.", 11158 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes", 11159 // "httpMethod": "GET", 11160 // "id": "dialogflow.projects.agent.entityTypes.list", 11161 // "parameterOrder": [ 11162 // "parent" 11163 // ], 11164 // "parameters": { 11165 // "languageCode": { 11166 // "description": "Optional. The language to list entity synonyms for. If not specified,\nthe agent's default language is used.\n[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.", 11167 // "location": "query", 11168 // "type": "string" 11169 // }, 11170 // "pageSize": { 11171 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 11172 // "format": "int32", 11173 // "location": "query", 11174 // "type": "integer" 11175 // }, 11176 // "pageToken": { 11177 // "description": "Optional. The next_page_token value returned from a previous list request.", 11178 // "location": "query", 11179 // "type": "string" 11180 // }, 11181 // "parent": { 11182 // "description": "Required. The agent to list all entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 11183 // "location": "path", 11184 // "pattern": "^projects/[^/]+/agent$", 11185 // "required": true, 11186 // "type": "string" 11187 // } 11188 // }, 11189 // "path": "v2/{+parent}/entityTypes", 11190 // "response": { 11191 // "$ref": "GoogleCloudDialogflowV2ListEntityTypesResponse" 11192 // }, 11193 // "scopes": [ 11194 // "https://www.googleapis.com/auth/cloud-platform", 11195 // "https://www.googleapis.com/auth/dialogflow" 11196 // ] 11197 // } 11198 11199} 11200 11201// Pages invokes f for each page of results. 11202// A non-nil error returned from f will halt the iteration. 11203// The provided context supersedes any context provided to the Context method. 11204func (c *ProjectsAgentEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListEntityTypesResponse) error) error { 11205 c.ctx_ = ctx 11206 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11207 for { 11208 x, err := c.Do() 11209 if err != nil { 11210 return err 11211 } 11212 if err := f(x); err != nil { 11213 return err 11214 } 11215 if x.NextPageToken == "" { 11216 return nil 11217 } 11218 c.PageToken(x.NextPageToken) 11219 } 11220} 11221 11222// method id "dialogflow.projects.agent.entityTypes.patch": 11223 11224type ProjectsAgentEntityTypesPatchCall struct { 11225 s *Service 11226 nameid string 11227 googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType 11228 urlParams_ gensupport.URLParams 11229 ctx_ context.Context 11230 header_ http.Header 11231} 11232 11233// Patch: Updates the specified entity type. 11234func (r *ProjectsAgentEntityTypesService) Patch(nameid string, googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType) *ProjectsAgentEntityTypesPatchCall { 11235 c := &ProjectsAgentEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11236 c.nameid = nameid 11237 c.googleclouddialogflowv2entitytype = googleclouddialogflowv2entitytype 11238 return c 11239} 11240 11241// LanguageCode sets the optional parameter "languageCode": The language 11242// of entity synonyms defined in `entity_type`. If not 11243// specified, the agent's default language is 11244// used. 11245// [Many 11246// languages](https://cloud.google.com/dialogflow/docs/refere 11247// nce/language) 11248// are supported. Note: languages must be enabled in the agent before 11249// they can 11250// be used. 11251func (c *ProjectsAgentEntityTypesPatchCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesPatchCall { 11252 c.urlParams_.Set("languageCode", languageCode) 11253 return c 11254} 11255 11256// UpdateMask sets the optional parameter "updateMask": The mask to 11257// control which fields get updated. 11258func (c *ProjectsAgentEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEntityTypesPatchCall { 11259 c.urlParams_.Set("updateMask", updateMask) 11260 return c 11261} 11262 11263// Fields allows partial responses to be retrieved. See 11264// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11265// for more information. 11266func (c *ProjectsAgentEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesPatchCall { 11267 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11268 return c 11269} 11270 11271// Context sets the context to be used in this call's Do method. Any 11272// pending HTTP request will be aborted if the provided context is 11273// canceled. 11274func (c *ProjectsAgentEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEntityTypesPatchCall { 11275 c.ctx_ = ctx 11276 return c 11277} 11278 11279// Header returns an http.Header that can be modified by the caller to 11280// add HTTP headers to the request. 11281func (c *ProjectsAgentEntityTypesPatchCall) Header() http.Header { 11282 if c.header_ == nil { 11283 c.header_ = make(http.Header) 11284 } 11285 return c.header_ 11286} 11287 11288func (c *ProjectsAgentEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { 11289 reqHeaders := make(http.Header) 11290 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 11291 for k, v := range c.header_ { 11292 reqHeaders[k] = v 11293 } 11294 reqHeaders.Set("User-Agent", c.s.userAgent()) 11295 var body io.Reader = nil 11296 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2entitytype) 11297 if err != nil { 11298 return nil, err 11299 } 11300 reqHeaders.Set("Content-Type", "application/json") 11301 c.urlParams_.Set("alt", alt) 11302 c.urlParams_.Set("prettyPrint", "false") 11303 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11304 urls += "?" + c.urlParams_.Encode() 11305 req, err := http.NewRequest("PATCH", urls, body) 11306 if err != nil { 11307 return nil, err 11308 } 11309 req.Header = reqHeaders 11310 googleapi.Expand(req.URL, map[string]string{ 11311 "name": c.nameid, 11312 }) 11313 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11314} 11315 11316// Do executes the "dialogflow.projects.agent.entityTypes.patch" call. 11317// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be 11318// non-nil. Any non-2xx status code is an error. Response headers are in 11319// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or 11320// (if a response was returned at all) in 11321// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11322// whether the returned error was because http.StatusNotModified was 11323// returned. 11324func (c *ProjectsAgentEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) { 11325 gensupport.SetOptions(c.urlParams_, opts...) 11326 res, err := c.doRequest("json") 11327 if res != nil && res.StatusCode == http.StatusNotModified { 11328 if res.Body != nil { 11329 res.Body.Close() 11330 } 11331 return nil, &googleapi.Error{ 11332 Code: res.StatusCode, 11333 Header: res.Header, 11334 } 11335 } 11336 if err != nil { 11337 return nil, err 11338 } 11339 defer googleapi.CloseBody(res) 11340 if err := googleapi.CheckResponse(res); err != nil { 11341 return nil, err 11342 } 11343 ret := &GoogleCloudDialogflowV2EntityType{ 11344 ServerResponse: googleapi.ServerResponse{ 11345 Header: res.Header, 11346 HTTPStatusCode: res.StatusCode, 11347 }, 11348 } 11349 target := &ret 11350 if err := gensupport.DecodeResponse(target, res); err != nil { 11351 return nil, err 11352 } 11353 return ret, nil 11354 // { 11355 // "description": "Updates the specified entity type.", 11356 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}", 11357 // "httpMethod": "PATCH", 11358 // "id": "dialogflow.projects.agent.entityTypes.patch", 11359 // "parameterOrder": [ 11360 // "name" 11361 // ], 11362 // "parameters": { 11363 // "languageCode": { 11364 // "description": "Optional. The language of entity synonyms defined in `entity_type`. If not\nspecified, the agent's default language is used.\n[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.", 11365 // "location": "query", 11366 // "type": "string" 11367 // }, 11368 // "name": { 11369 // "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`.", 11370 // "location": "path", 11371 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 11372 // "required": true, 11373 // "type": "string" 11374 // }, 11375 // "updateMask": { 11376 // "description": "Optional. The mask to control which fields get updated.", 11377 // "format": "google-fieldmask", 11378 // "location": "query", 11379 // "type": "string" 11380 // } 11381 // }, 11382 // "path": "v2/{+name}", 11383 // "request": { 11384 // "$ref": "GoogleCloudDialogflowV2EntityType" 11385 // }, 11386 // "response": { 11387 // "$ref": "GoogleCloudDialogflowV2EntityType" 11388 // }, 11389 // "scopes": [ 11390 // "https://www.googleapis.com/auth/cloud-platform", 11391 // "https://www.googleapis.com/auth/dialogflow" 11392 // ] 11393 // } 11394 11395} 11396 11397// method id "dialogflow.projects.agent.entityTypes.entities.batchCreate": 11398 11399type ProjectsAgentEntityTypesEntitiesBatchCreateCall struct { 11400 s *Service 11401 parent string 11402 googleclouddialogflowv2batchcreateentitiesrequest *GoogleCloudDialogflowV2BatchCreateEntitiesRequest 11403 urlParams_ gensupport.URLParams 11404 ctx_ context.Context 11405 header_ http.Header 11406} 11407 11408// BatchCreate: Creates multiple new entities in the specified entity 11409// type. 11410// 11411// Operation <response: google.protobuf.Empty> 11412func (r *ProjectsAgentEntityTypesEntitiesService) BatchCreate(parent string, googleclouddialogflowv2batchcreateentitiesrequest *GoogleCloudDialogflowV2BatchCreateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchCreateCall { 11413 c := &ProjectsAgentEntityTypesEntitiesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11414 c.parent = parent 11415 c.googleclouddialogflowv2batchcreateentitiesrequest = googleclouddialogflowv2batchcreateentitiesrequest 11416 return c 11417} 11418 11419// Fields allows partial responses to be retrieved. See 11420// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11421// for more information. 11422func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchCreateCall { 11423 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11424 return c 11425} 11426 11427// Context sets the context to be used in this call's Do method. Any 11428// pending HTTP request will be aborted if the provided context is 11429// canceled. 11430func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchCreateCall { 11431 c.ctx_ = ctx 11432 return c 11433} 11434 11435// Header returns an http.Header that can be modified by the caller to 11436// add HTTP headers to the request. 11437func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Header() http.Header { 11438 if c.header_ == nil { 11439 c.header_ = make(http.Header) 11440 } 11441 return c.header_ 11442} 11443 11444func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) doRequest(alt string) (*http.Response, error) { 11445 reqHeaders := make(http.Header) 11446 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 11447 for k, v := range c.header_ { 11448 reqHeaders[k] = v 11449 } 11450 reqHeaders.Set("User-Agent", c.s.userAgent()) 11451 var body io.Reader = nil 11452 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchcreateentitiesrequest) 11453 if err != nil { 11454 return nil, err 11455 } 11456 reqHeaders.Set("Content-Type", "application/json") 11457 c.urlParams_.Set("alt", alt) 11458 c.urlParams_.Set("prettyPrint", "false") 11459 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchCreate") 11460 urls += "?" + c.urlParams_.Encode() 11461 req, err := http.NewRequest("POST", urls, body) 11462 if err != nil { 11463 return nil, err 11464 } 11465 req.Header = reqHeaders 11466 googleapi.Expand(req.URL, map[string]string{ 11467 "parent": c.parent, 11468 }) 11469 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11470} 11471 11472// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchCreate" call. 11473// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 11474// Any non-2xx status code is an error. Response headers are in either 11475// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 11476// was returned at all) in error.(*googleapi.Error).Header. Use 11477// googleapi.IsNotModified to check whether the returned error was 11478// because http.StatusNotModified was returned. 11479func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11480 gensupport.SetOptions(c.urlParams_, opts...) 11481 res, err := c.doRequest("json") 11482 if res != nil && res.StatusCode == http.StatusNotModified { 11483 if res.Body != nil { 11484 res.Body.Close() 11485 } 11486 return nil, &googleapi.Error{ 11487 Code: res.StatusCode, 11488 Header: res.Header, 11489 } 11490 } 11491 if err != nil { 11492 return nil, err 11493 } 11494 defer googleapi.CloseBody(res) 11495 if err := googleapi.CheckResponse(res); err != nil { 11496 return nil, err 11497 } 11498 ret := &GoogleLongrunningOperation{ 11499 ServerResponse: googleapi.ServerResponse{ 11500 Header: res.Header, 11501 HTTPStatusCode: res.StatusCode, 11502 }, 11503 } 11504 target := &ret 11505 if err := gensupport.DecodeResponse(target, res); err != nil { 11506 return nil, err 11507 } 11508 return ret, nil 11509 // { 11510 // "description": "Creates multiple new entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 11511 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate", 11512 // "httpMethod": "POST", 11513 // "id": "dialogflow.projects.agent.entityTypes.entities.batchCreate", 11514 // "parameterOrder": [ 11515 // "parent" 11516 // ], 11517 // "parameters": { 11518 // "parent": { 11519 // "description": "Required. The name of the entity type to create entities in. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.", 11520 // "location": "path", 11521 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 11522 // "required": true, 11523 // "type": "string" 11524 // } 11525 // }, 11526 // "path": "v2/{+parent}/entities:batchCreate", 11527 // "request": { 11528 // "$ref": "GoogleCloudDialogflowV2BatchCreateEntitiesRequest" 11529 // }, 11530 // "response": { 11531 // "$ref": "GoogleLongrunningOperation" 11532 // }, 11533 // "scopes": [ 11534 // "https://www.googleapis.com/auth/cloud-platform", 11535 // "https://www.googleapis.com/auth/dialogflow" 11536 // ] 11537 // } 11538 11539} 11540 11541// method id "dialogflow.projects.agent.entityTypes.entities.batchDelete": 11542 11543type ProjectsAgentEntityTypesEntitiesBatchDeleteCall struct { 11544 s *Service 11545 parent string 11546 googleclouddialogflowv2batchdeleteentitiesrequest *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest 11547 urlParams_ gensupport.URLParams 11548 ctx_ context.Context 11549 header_ http.Header 11550} 11551 11552// BatchDelete: Deletes entities in the specified entity 11553// type. 11554// 11555// 11556// Operation <response: google.protobuf.Empty> 11557func (r *ProjectsAgentEntityTypesEntitiesService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteentitiesrequest *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall { 11558 c := &ProjectsAgentEntityTypesEntitiesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11559 c.parent = parent 11560 c.googleclouddialogflowv2batchdeleteentitiesrequest = googleclouddialogflowv2batchdeleteentitiesrequest 11561 return c 11562} 11563 11564// Fields allows partial responses to be retrieved. See 11565// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11566// for more information. 11567func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall { 11568 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11569 return c 11570} 11571 11572// Context sets the context to be used in this call's Do method. Any 11573// pending HTTP request will be aborted if the provided context is 11574// canceled. 11575func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall { 11576 c.ctx_ = ctx 11577 return c 11578} 11579 11580// Header returns an http.Header that can be modified by the caller to 11581// add HTTP headers to the request. 11582func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Header() http.Header { 11583 if c.header_ == nil { 11584 c.header_ = make(http.Header) 11585 } 11586 return c.header_ 11587} 11588 11589func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) doRequest(alt string) (*http.Response, error) { 11590 reqHeaders := make(http.Header) 11591 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 11592 for k, v := range c.header_ { 11593 reqHeaders[k] = v 11594 } 11595 reqHeaders.Set("User-Agent", c.s.userAgent()) 11596 var body io.Reader = nil 11597 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteentitiesrequest) 11598 if err != nil { 11599 return nil, err 11600 } 11601 reqHeaders.Set("Content-Type", "application/json") 11602 c.urlParams_.Set("alt", alt) 11603 c.urlParams_.Set("prettyPrint", "false") 11604 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchDelete") 11605 urls += "?" + c.urlParams_.Encode() 11606 req, err := http.NewRequest("POST", urls, body) 11607 if err != nil { 11608 return nil, err 11609 } 11610 req.Header = reqHeaders 11611 googleapi.Expand(req.URL, map[string]string{ 11612 "parent": c.parent, 11613 }) 11614 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11615} 11616 11617// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchDelete" call. 11618// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 11619// Any non-2xx status code is an error. Response headers are in either 11620// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 11621// was returned at all) in error.(*googleapi.Error).Header. Use 11622// googleapi.IsNotModified to check whether the returned error was 11623// because http.StatusNotModified was returned. 11624func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11625 gensupport.SetOptions(c.urlParams_, opts...) 11626 res, err := c.doRequest("json") 11627 if res != nil && res.StatusCode == http.StatusNotModified { 11628 if res.Body != nil { 11629 res.Body.Close() 11630 } 11631 return nil, &googleapi.Error{ 11632 Code: res.StatusCode, 11633 Header: res.Header, 11634 } 11635 } 11636 if err != nil { 11637 return nil, err 11638 } 11639 defer googleapi.CloseBody(res) 11640 if err := googleapi.CheckResponse(res); err != nil { 11641 return nil, err 11642 } 11643 ret := &GoogleLongrunningOperation{ 11644 ServerResponse: googleapi.ServerResponse{ 11645 Header: res.Header, 11646 HTTPStatusCode: res.StatusCode, 11647 }, 11648 } 11649 target := &ret 11650 if err := gensupport.DecodeResponse(target, res); err != nil { 11651 return nil, err 11652 } 11653 return ret, nil 11654 // { 11655 // "description": "Deletes entities in the specified entity type.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 11656 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete", 11657 // "httpMethod": "POST", 11658 // "id": "dialogflow.projects.agent.entityTypes.entities.batchDelete", 11659 // "parameterOrder": [ 11660 // "parent" 11661 // ], 11662 // "parameters": { 11663 // "parent": { 11664 // "description": "Required. The name of the entity type to delete entries for. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.", 11665 // "location": "path", 11666 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 11667 // "required": true, 11668 // "type": "string" 11669 // } 11670 // }, 11671 // "path": "v2/{+parent}/entities:batchDelete", 11672 // "request": { 11673 // "$ref": "GoogleCloudDialogflowV2BatchDeleteEntitiesRequest" 11674 // }, 11675 // "response": { 11676 // "$ref": "GoogleLongrunningOperation" 11677 // }, 11678 // "scopes": [ 11679 // "https://www.googleapis.com/auth/cloud-platform", 11680 // "https://www.googleapis.com/auth/dialogflow" 11681 // ] 11682 // } 11683 11684} 11685 11686// method id "dialogflow.projects.agent.entityTypes.entities.batchUpdate": 11687 11688type ProjectsAgentEntityTypesEntitiesBatchUpdateCall struct { 11689 s *Service 11690 parent string 11691 googleclouddialogflowv2batchupdateentitiesrequest *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest 11692 urlParams_ gensupport.URLParams 11693 ctx_ context.Context 11694 header_ http.Header 11695} 11696 11697// BatchUpdate: Updates or creates multiple entities in the specified 11698// entity type. This 11699// method does not affect entities in the entity type that aren't 11700// explicitly 11701// specified in the request. 11702// 11703// 11704// Operation <response: google.protobuf.Empty> 11705func (r *ProjectsAgentEntityTypesEntitiesService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateentitiesrequest *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall { 11706 c := &ProjectsAgentEntityTypesEntitiesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11707 c.parent = parent 11708 c.googleclouddialogflowv2batchupdateentitiesrequest = googleclouddialogflowv2batchupdateentitiesrequest 11709 return c 11710} 11711 11712// Fields allows partial responses to be retrieved. See 11713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11714// for more information. 11715func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall { 11716 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11717 return c 11718} 11719 11720// Context sets the context to be used in this call's Do method. Any 11721// pending HTTP request will be aborted if the provided context is 11722// canceled. 11723func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall { 11724 c.ctx_ = ctx 11725 return c 11726} 11727 11728// Header returns an http.Header that can be modified by the caller to 11729// add HTTP headers to the request. 11730func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Header() http.Header { 11731 if c.header_ == nil { 11732 c.header_ = make(http.Header) 11733 } 11734 return c.header_ 11735} 11736 11737func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 11738 reqHeaders := make(http.Header) 11739 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 11740 for k, v := range c.header_ { 11741 reqHeaders[k] = v 11742 } 11743 reqHeaders.Set("User-Agent", c.s.userAgent()) 11744 var body io.Reader = nil 11745 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateentitiesrequest) 11746 if err != nil { 11747 return nil, err 11748 } 11749 reqHeaders.Set("Content-Type", "application/json") 11750 c.urlParams_.Set("alt", alt) 11751 c.urlParams_.Set("prettyPrint", "false") 11752 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchUpdate") 11753 urls += "?" + c.urlParams_.Encode() 11754 req, err := http.NewRequest("POST", urls, body) 11755 if err != nil { 11756 return nil, err 11757 } 11758 req.Header = reqHeaders 11759 googleapi.Expand(req.URL, map[string]string{ 11760 "parent": c.parent, 11761 }) 11762 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11763} 11764 11765// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchUpdate" call. 11766// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 11767// Any non-2xx status code is an error. Response headers are in either 11768// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 11769// was returned at all) in error.(*googleapi.Error).Header. Use 11770// googleapi.IsNotModified to check whether the returned error was 11771// because http.StatusNotModified was returned. 11772func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11773 gensupport.SetOptions(c.urlParams_, opts...) 11774 res, err := c.doRequest("json") 11775 if res != nil && res.StatusCode == http.StatusNotModified { 11776 if res.Body != nil { 11777 res.Body.Close() 11778 } 11779 return nil, &googleapi.Error{ 11780 Code: res.StatusCode, 11781 Header: res.Header, 11782 } 11783 } 11784 if err != nil { 11785 return nil, err 11786 } 11787 defer googleapi.CloseBody(res) 11788 if err := googleapi.CheckResponse(res); err != nil { 11789 return nil, err 11790 } 11791 ret := &GoogleLongrunningOperation{ 11792 ServerResponse: googleapi.ServerResponse{ 11793 Header: res.Header, 11794 HTTPStatusCode: res.StatusCode, 11795 }, 11796 } 11797 target := &ret 11798 if err := gensupport.DecodeResponse(target, res); err != nil { 11799 return nil, err 11800 } 11801 return ret, nil 11802 // { 11803 // "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", 11804 // "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate", 11805 // "httpMethod": "POST", 11806 // "id": "dialogflow.projects.agent.entityTypes.entities.batchUpdate", 11807 // "parameterOrder": [ 11808 // "parent" 11809 // ], 11810 // "parameters": { 11811 // "parent": { 11812 // "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`.", 11813 // "location": "path", 11814 // "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$", 11815 // "required": true, 11816 // "type": "string" 11817 // } 11818 // }, 11819 // "path": "v2/{+parent}/entities:batchUpdate", 11820 // "request": { 11821 // "$ref": "GoogleCloudDialogflowV2BatchUpdateEntitiesRequest" 11822 // }, 11823 // "response": { 11824 // "$ref": "GoogleLongrunningOperation" 11825 // }, 11826 // "scopes": [ 11827 // "https://www.googleapis.com/auth/cloud-platform", 11828 // "https://www.googleapis.com/auth/dialogflow" 11829 // ] 11830 // } 11831 11832} 11833 11834// method id "dialogflow.projects.agent.intents.batchDelete": 11835 11836type ProjectsAgentIntentsBatchDeleteCall struct { 11837 s *Service 11838 parent string 11839 googleclouddialogflowv2batchdeleteintentsrequest *GoogleCloudDialogflowV2BatchDeleteIntentsRequest 11840 urlParams_ gensupport.URLParams 11841 ctx_ context.Context 11842 header_ http.Header 11843} 11844 11845// BatchDelete: Deletes intents in the specified agent. 11846// 11847// Operation <response: google.protobuf.Empty> 11848func (r *ProjectsAgentIntentsService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteintentsrequest *GoogleCloudDialogflowV2BatchDeleteIntentsRequest) *ProjectsAgentIntentsBatchDeleteCall { 11849 c := &ProjectsAgentIntentsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11850 c.parent = parent 11851 c.googleclouddialogflowv2batchdeleteintentsrequest = googleclouddialogflowv2batchdeleteintentsrequest 11852 return c 11853} 11854 11855// Fields allows partial responses to be retrieved. See 11856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11857// for more information. 11858func (c *ProjectsAgentIntentsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchDeleteCall { 11859 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11860 return c 11861} 11862 11863// Context sets the context to be used in this call's Do method. Any 11864// pending HTTP request will be aborted if the provided context is 11865// canceled. 11866func (c *ProjectsAgentIntentsBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchDeleteCall { 11867 c.ctx_ = ctx 11868 return c 11869} 11870 11871// Header returns an http.Header that can be modified by the caller to 11872// add HTTP headers to the request. 11873func (c *ProjectsAgentIntentsBatchDeleteCall) Header() http.Header { 11874 if c.header_ == nil { 11875 c.header_ = make(http.Header) 11876 } 11877 return c.header_ 11878} 11879 11880func (c *ProjectsAgentIntentsBatchDeleteCall) doRequest(alt string) (*http.Response, error) { 11881 reqHeaders := make(http.Header) 11882 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 11883 for k, v := range c.header_ { 11884 reqHeaders[k] = v 11885 } 11886 reqHeaders.Set("User-Agent", c.s.userAgent()) 11887 var body io.Reader = nil 11888 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteintentsrequest) 11889 if err != nil { 11890 return nil, err 11891 } 11892 reqHeaders.Set("Content-Type", "application/json") 11893 c.urlParams_.Set("alt", alt) 11894 c.urlParams_.Set("prettyPrint", "false") 11895 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents:batchDelete") 11896 urls += "?" + c.urlParams_.Encode() 11897 req, err := http.NewRequest("POST", urls, body) 11898 if err != nil { 11899 return nil, err 11900 } 11901 req.Header = reqHeaders 11902 googleapi.Expand(req.URL, map[string]string{ 11903 "parent": c.parent, 11904 }) 11905 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11906} 11907 11908// Do executes the "dialogflow.projects.agent.intents.batchDelete" call. 11909// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 11910// Any non-2xx status code is an error. Response headers are in either 11911// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 11912// was returned at all) in error.(*googleapi.Error).Header. Use 11913// googleapi.IsNotModified to check whether the returned error was 11914// because http.StatusNotModified was returned. 11915func (c *ProjectsAgentIntentsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11916 gensupport.SetOptions(c.urlParams_, opts...) 11917 res, err := c.doRequest("json") 11918 if res != nil && res.StatusCode == http.StatusNotModified { 11919 if res.Body != nil { 11920 res.Body.Close() 11921 } 11922 return nil, &googleapi.Error{ 11923 Code: res.StatusCode, 11924 Header: res.Header, 11925 } 11926 } 11927 if err != nil { 11928 return nil, err 11929 } 11930 defer googleapi.CloseBody(res) 11931 if err := googleapi.CheckResponse(res); err != nil { 11932 return nil, err 11933 } 11934 ret := &GoogleLongrunningOperation{ 11935 ServerResponse: googleapi.ServerResponse{ 11936 Header: res.Header, 11937 HTTPStatusCode: res.StatusCode, 11938 }, 11939 } 11940 target := &ret 11941 if err := gensupport.DecodeResponse(target, res); err != nil { 11942 return nil, err 11943 } 11944 return ret, nil 11945 // { 11946 // "description": "Deletes intents in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e", 11947 // "flatPath": "v2/projects/{projectsId}/agent/intents:batchDelete", 11948 // "httpMethod": "POST", 11949 // "id": "dialogflow.projects.agent.intents.batchDelete", 11950 // "parameterOrder": [ 11951 // "parent" 11952 // ], 11953 // "parameters": { 11954 // "parent": { 11955 // "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.", 11956 // "location": "path", 11957 // "pattern": "^projects/[^/]+/agent$", 11958 // "required": true, 11959 // "type": "string" 11960 // } 11961 // }, 11962 // "path": "v2/{+parent}/intents:batchDelete", 11963 // "request": { 11964 // "$ref": "GoogleCloudDialogflowV2BatchDeleteIntentsRequest" 11965 // }, 11966 // "response": { 11967 // "$ref": "GoogleLongrunningOperation" 11968 // }, 11969 // "scopes": [ 11970 // "https://www.googleapis.com/auth/cloud-platform", 11971 // "https://www.googleapis.com/auth/dialogflow" 11972 // ] 11973 // } 11974 11975} 11976 11977// method id "dialogflow.projects.agent.intents.batchUpdate": 11978 11979type ProjectsAgentIntentsBatchUpdateCall struct { 11980 s *Service 11981 parent string 11982 googleclouddialogflowv2batchupdateintentsrequest *GoogleCloudDialogflowV2BatchUpdateIntentsRequest 11983 urlParams_ gensupport.URLParams 11984 ctx_ context.Context 11985 header_ http.Header 11986} 11987 11988// BatchUpdate: Updates/Creates multiple intents in the specified 11989// agent. 11990// 11991// Operation <response: BatchUpdateIntentsResponse> 11992func (r *ProjectsAgentIntentsService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateintentsrequest *GoogleCloudDialogflowV2BatchUpdateIntentsRequest) *ProjectsAgentIntentsBatchUpdateCall { 11993 c := &ProjectsAgentIntentsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11994 c.parent = parent 11995 c.googleclouddialogflowv2batchupdateintentsrequest = googleclouddialogflowv2batchupdateintentsrequest 11996 return c 11997} 11998 11999// Fields allows partial responses to be retrieved. See 12000// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12001// for more information. 12002func (c *ProjectsAgentIntentsBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchUpdateCall { 12003 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12004 return c 12005} 12006 12007// Context sets the context to be used in this call's Do method. Any 12008// pending HTTP request will be aborted if the provided context is 12009// canceled. 12010func (c *ProjectsAgentIntentsBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchUpdateCall { 12011 c.ctx_ = ctx 12012 return c 12013} 12014 12015// Header returns an http.Header that can be modified by the caller to 12016// add HTTP headers to the request. 12017func (c *ProjectsAgentIntentsBatchUpdateCall) Header() http.Header { 12018 if c.header_ == nil { 12019 c.header_ = make(http.Header) 12020 } 12021 return c.header_ 12022} 12023 12024func (c *ProjectsAgentIntentsBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 12025 reqHeaders := make(http.Header) 12026 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 12027 for k, v := range c.header_ { 12028 reqHeaders[k] = v 12029 } 12030 reqHeaders.Set("User-Agent", c.s.userAgent()) 12031 var body io.Reader = nil 12032 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateintentsrequest) 12033 if err != nil { 12034 return nil, err 12035 } 12036 reqHeaders.Set("Content-Type", "application/json") 12037 c.urlParams_.Set("alt", alt) 12038 c.urlParams_.Set("prettyPrint", "false") 12039 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents:batchUpdate") 12040 urls += "?" + c.urlParams_.Encode() 12041 req, err := http.NewRequest("POST", urls, body) 12042 if err != nil { 12043 return nil, err 12044 } 12045 req.Header = reqHeaders 12046 googleapi.Expand(req.URL, map[string]string{ 12047 "parent": c.parent, 12048 }) 12049 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12050} 12051 12052// Do executes the "dialogflow.projects.agent.intents.batchUpdate" call. 12053// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 12054// Any non-2xx status code is an error. Response headers are in either 12055// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 12056// was returned at all) in error.(*googleapi.Error).Header. Use 12057// googleapi.IsNotModified to check whether the returned error was 12058// because http.StatusNotModified was returned. 12059func (c *ProjectsAgentIntentsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12060 gensupport.SetOptions(c.urlParams_, opts...) 12061 res, err := c.doRequest("json") 12062 if res != nil && res.StatusCode == http.StatusNotModified { 12063 if res.Body != nil { 12064 res.Body.Close() 12065 } 12066 return nil, &googleapi.Error{ 12067 Code: res.StatusCode, 12068 Header: res.Header, 12069 } 12070 } 12071 if err != nil { 12072 return nil, err 12073 } 12074 defer googleapi.CloseBody(res) 12075 if err := googleapi.CheckResponse(res); err != nil { 12076 return nil, err 12077 } 12078 ret := &GoogleLongrunningOperation{ 12079 ServerResponse: googleapi.ServerResponse{ 12080 Header: res.Header, 12081 HTTPStatusCode: res.StatusCode, 12082 }, 12083 } 12084 target := &ret 12085 if err := gensupport.DecodeResponse(target, res); err != nil { 12086 return nil, err 12087 } 12088 return ret, nil 12089 // { 12090 // "description": "Updates/Creates multiple intents in the specified agent.\n\nOperation \u003cresponse: BatchUpdateIntentsResponse\u003e", 12091 // "flatPath": "v2/projects/{projectsId}/agent/intents:batchUpdate", 12092 // "httpMethod": "POST", 12093 // "id": "dialogflow.projects.agent.intents.batchUpdate", 12094 // "parameterOrder": [ 12095 // "parent" 12096 // ], 12097 // "parameters": { 12098 // "parent": { 12099 // "description": "Required. The name of the agent to update or create intents in.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 12100 // "location": "path", 12101 // "pattern": "^projects/[^/]+/agent$", 12102 // "required": true, 12103 // "type": "string" 12104 // } 12105 // }, 12106 // "path": "v2/{+parent}/intents:batchUpdate", 12107 // "request": { 12108 // "$ref": "GoogleCloudDialogflowV2BatchUpdateIntentsRequest" 12109 // }, 12110 // "response": { 12111 // "$ref": "GoogleLongrunningOperation" 12112 // }, 12113 // "scopes": [ 12114 // "https://www.googleapis.com/auth/cloud-platform", 12115 // "https://www.googleapis.com/auth/dialogflow" 12116 // ] 12117 // } 12118 12119} 12120 12121// method id "dialogflow.projects.agent.intents.create": 12122 12123type ProjectsAgentIntentsCreateCall struct { 12124 s *Service 12125 parent string 12126 googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent 12127 urlParams_ gensupport.URLParams 12128 ctx_ context.Context 12129 header_ http.Header 12130} 12131 12132// Create: Creates an intent in the specified agent. 12133func (r *ProjectsAgentIntentsService) Create(parent string, googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent) *ProjectsAgentIntentsCreateCall { 12134 c := &ProjectsAgentIntentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12135 c.parent = parent 12136 c.googleclouddialogflowv2intent = googleclouddialogflowv2intent 12137 return c 12138} 12139 12140// IntentView sets the optional parameter "intentView": The resource 12141// view to apply to the returned intent. 12142// 12143// Possible values: 12144// "INTENT_VIEW_UNSPECIFIED" 12145// "INTENT_VIEW_FULL" 12146func (c *ProjectsAgentIntentsCreateCall) IntentView(intentView string) *ProjectsAgentIntentsCreateCall { 12147 c.urlParams_.Set("intentView", intentView) 12148 return c 12149} 12150 12151// LanguageCode sets the optional parameter "languageCode": The language 12152// of training phrases, parameters and rich messages 12153// defined in `intent`. If not specified, the agent's default language 12154// is 12155// used. 12156// [Many 12157// languages](https://cloud.google.com/dialogflow/docs/reference/la 12158// nguage) 12159// are supported. Note: languages must be enabled in the agent before 12160// they can 12161// be used. 12162func (c *ProjectsAgentIntentsCreateCall) LanguageCode(languageCode string) *ProjectsAgentIntentsCreateCall { 12163 c.urlParams_.Set("languageCode", languageCode) 12164 return c 12165} 12166 12167// Fields allows partial responses to be retrieved. See 12168// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12169// for more information. 12170func (c *ProjectsAgentIntentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsCreateCall { 12171 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12172 return c 12173} 12174 12175// Context sets the context to be used in this call's Do method. Any 12176// pending HTTP request will be aborted if the provided context is 12177// canceled. 12178func (c *ProjectsAgentIntentsCreateCall) Context(ctx context.Context) *ProjectsAgentIntentsCreateCall { 12179 c.ctx_ = ctx 12180 return c 12181} 12182 12183// Header returns an http.Header that can be modified by the caller to 12184// add HTTP headers to the request. 12185func (c *ProjectsAgentIntentsCreateCall) Header() http.Header { 12186 if c.header_ == nil { 12187 c.header_ = make(http.Header) 12188 } 12189 return c.header_ 12190} 12191 12192func (c *ProjectsAgentIntentsCreateCall) doRequest(alt string) (*http.Response, error) { 12193 reqHeaders := make(http.Header) 12194 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 12195 for k, v := range c.header_ { 12196 reqHeaders[k] = v 12197 } 12198 reqHeaders.Set("User-Agent", c.s.userAgent()) 12199 var body io.Reader = nil 12200 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2intent) 12201 if err != nil { 12202 return nil, err 12203 } 12204 reqHeaders.Set("Content-Type", "application/json") 12205 c.urlParams_.Set("alt", alt) 12206 c.urlParams_.Set("prettyPrint", "false") 12207 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents") 12208 urls += "?" + c.urlParams_.Encode() 12209 req, err := http.NewRequest("POST", urls, body) 12210 if err != nil { 12211 return nil, err 12212 } 12213 req.Header = reqHeaders 12214 googleapi.Expand(req.URL, map[string]string{ 12215 "parent": c.parent, 12216 }) 12217 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12218} 12219 12220// Do executes the "dialogflow.projects.agent.intents.create" call. 12221// Exactly one of *GoogleCloudDialogflowV2Intent or error will be 12222// non-nil. Any non-2xx status code is an error. Response headers are in 12223// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a 12224// response was returned at all) in error.(*googleapi.Error).Header. Use 12225// googleapi.IsNotModified to check whether the returned error was 12226// because http.StatusNotModified was returned. 12227func (c *ProjectsAgentIntentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) { 12228 gensupport.SetOptions(c.urlParams_, opts...) 12229 res, err := c.doRequest("json") 12230 if res != nil && res.StatusCode == http.StatusNotModified { 12231 if res.Body != nil { 12232 res.Body.Close() 12233 } 12234 return nil, &googleapi.Error{ 12235 Code: res.StatusCode, 12236 Header: res.Header, 12237 } 12238 } 12239 if err != nil { 12240 return nil, err 12241 } 12242 defer googleapi.CloseBody(res) 12243 if err := googleapi.CheckResponse(res); err != nil { 12244 return nil, err 12245 } 12246 ret := &GoogleCloudDialogflowV2Intent{ 12247 ServerResponse: googleapi.ServerResponse{ 12248 Header: res.Header, 12249 HTTPStatusCode: res.StatusCode, 12250 }, 12251 } 12252 target := &ret 12253 if err := gensupport.DecodeResponse(target, res); err != nil { 12254 return nil, err 12255 } 12256 return ret, nil 12257 // { 12258 // "description": "Creates an intent in the specified agent.", 12259 // "flatPath": "v2/projects/{projectsId}/agent/intents", 12260 // "httpMethod": "POST", 12261 // "id": "dialogflow.projects.agent.intents.create", 12262 // "parameterOrder": [ 12263 // "parent" 12264 // ], 12265 // "parameters": { 12266 // "intentView": { 12267 // "description": "Optional. The resource view to apply to the returned intent.", 12268 // "enum": [ 12269 // "INTENT_VIEW_UNSPECIFIED", 12270 // "INTENT_VIEW_FULL" 12271 // ], 12272 // "location": "query", 12273 // "type": "string" 12274 // }, 12275 // "languageCode": { 12276 // "description": "Optional. The language of training phrases, parameters and rich messages\ndefined in `intent`. If not specified, the agent's default language is\nused. [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.", 12277 // "location": "query", 12278 // "type": "string" 12279 // }, 12280 // "parent": { 12281 // "description": "Required. The agent to create a intent for.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 12282 // "location": "path", 12283 // "pattern": "^projects/[^/]+/agent$", 12284 // "required": true, 12285 // "type": "string" 12286 // } 12287 // }, 12288 // "path": "v2/{+parent}/intents", 12289 // "request": { 12290 // "$ref": "GoogleCloudDialogflowV2Intent" 12291 // }, 12292 // "response": { 12293 // "$ref": "GoogleCloudDialogflowV2Intent" 12294 // }, 12295 // "scopes": [ 12296 // "https://www.googleapis.com/auth/cloud-platform", 12297 // "https://www.googleapis.com/auth/dialogflow" 12298 // ] 12299 // } 12300 12301} 12302 12303// method id "dialogflow.projects.agent.intents.delete": 12304 12305type ProjectsAgentIntentsDeleteCall struct { 12306 s *Service 12307 name string 12308 urlParams_ gensupport.URLParams 12309 ctx_ context.Context 12310 header_ http.Header 12311} 12312 12313// Delete: Deletes the specified intent and its direct or indirect 12314// followup intents. 12315func (r *ProjectsAgentIntentsService) Delete(name string) *ProjectsAgentIntentsDeleteCall { 12316 c := &ProjectsAgentIntentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12317 c.name = name 12318 return c 12319} 12320 12321// Fields allows partial responses to be retrieved. See 12322// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12323// for more information. 12324func (c *ProjectsAgentIntentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsDeleteCall { 12325 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12326 return c 12327} 12328 12329// Context sets the context to be used in this call's Do method. Any 12330// pending HTTP request will be aborted if the provided context is 12331// canceled. 12332func (c *ProjectsAgentIntentsDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsDeleteCall { 12333 c.ctx_ = ctx 12334 return c 12335} 12336 12337// Header returns an http.Header that can be modified by the caller to 12338// add HTTP headers to the request. 12339func (c *ProjectsAgentIntentsDeleteCall) Header() http.Header { 12340 if c.header_ == nil { 12341 c.header_ = make(http.Header) 12342 } 12343 return c.header_ 12344} 12345 12346func (c *ProjectsAgentIntentsDeleteCall) doRequest(alt string) (*http.Response, error) { 12347 reqHeaders := make(http.Header) 12348 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 12349 for k, v := range c.header_ { 12350 reqHeaders[k] = v 12351 } 12352 reqHeaders.Set("User-Agent", c.s.userAgent()) 12353 var body io.Reader = nil 12354 c.urlParams_.Set("alt", alt) 12355 c.urlParams_.Set("prettyPrint", "false") 12356 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12357 urls += "?" + c.urlParams_.Encode() 12358 req, err := http.NewRequest("DELETE", urls, body) 12359 if err != nil { 12360 return nil, err 12361 } 12362 req.Header = reqHeaders 12363 googleapi.Expand(req.URL, map[string]string{ 12364 "name": c.name, 12365 }) 12366 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12367} 12368 12369// Do executes the "dialogflow.projects.agent.intents.delete" call. 12370// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 12371// non-2xx status code is an error. Response headers are in either 12372// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 12373// returned at all) in error.(*googleapi.Error).Header. Use 12374// googleapi.IsNotModified to check whether the returned error was 12375// because http.StatusNotModified was returned. 12376func (c *ProjectsAgentIntentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 12377 gensupport.SetOptions(c.urlParams_, opts...) 12378 res, err := c.doRequest("json") 12379 if res != nil && res.StatusCode == http.StatusNotModified { 12380 if res.Body != nil { 12381 res.Body.Close() 12382 } 12383 return nil, &googleapi.Error{ 12384 Code: res.StatusCode, 12385 Header: res.Header, 12386 } 12387 } 12388 if err != nil { 12389 return nil, err 12390 } 12391 defer googleapi.CloseBody(res) 12392 if err := googleapi.CheckResponse(res); err != nil { 12393 return nil, err 12394 } 12395 ret := &GoogleProtobufEmpty{ 12396 ServerResponse: googleapi.ServerResponse{ 12397 Header: res.Header, 12398 HTTPStatusCode: res.StatusCode, 12399 }, 12400 } 12401 target := &ret 12402 if err := gensupport.DecodeResponse(target, res); err != nil { 12403 return nil, err 12404 } 12405 return ret, nil 12406 // { 12407 // "description": "Deletes the specified intent and its direct or indirect followup intents.", 12408 // "flatPath": "v2/projects/{projectsId}/agent/intents/{intentsId}", 12409 // "httpMethod": "DELETE", 12410 // "id": "dialogflow.projects.agent.intents.delete", 12411 // "parameterOrder": [ 12412 // "name" 12413 // ], 12414 // "parameters": { 12415 // "name": { 12416 // "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`.", 12417 // "location": "path", 12418 // "pattern": "^projects/[^/]+/agent/intents/[^/]+$", 12419 // "required": true, 12420 // "type": "string" 12421 // } 12422 // }, 12423 // "path": "v2/{+name}", 12424 // "response": { 12425 // "$ref": "GoogleProtobufEmpty" 12426 // }, 12427 // "scopes": [ 12428 // "https://www.googleapis.com/auth/cloud-platform", 12429 // "https://www.googleapis.com/auth/dialogflow" 12430 // ] 12431 // } 12432 12433} 12434 12435// method id "dialogflow.projects.agent.intents.get": 12436 12437type ProjectsAgentIntentsGetCall struct { 12438 s *Service 12439 name string 12440 urlParams_ gensupport.URLParams 12441 ifNoneMatch_ string 12442 ctx_ context.Context 12443 header_ http.Header 12444} 12445 12446// Get: Retrieves the specified intent. 12447func (r *ProjectsAgentIntentsService) Get(name string) *ProjectsAgentIntentsGetCall { 12448 c := &ProjectsAgentIntentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12449 c.name = name 12450 return c 12451} 12452 12453// IntentView sets the optional parameter "intentView": The resource 12454// view to apply to the returned intent. 12455// 12456// Possible values: 12457// "INTENT_VIEW_UNSPECIFIED" 12458// "INTENT_VIEW_FULL" 12459func (c *ProjectsAgentIntentsGetCall) IntentView(intentView string) *ProjectsAgentIntentsGetCall { 12460 c.urlParams_.Set("intentView", intentView) 12461 return c 12462} 12463 12464// LanguageCode sets the optional parameter "languageCode": The language 12465// to retrieve training phrases, parameters and rich 12466// messages for. If not specified, the agent's default language is 12467// used. 12468// [Many 12469// languages](https://cloud.google.com/dialogflow/docs/refere 12470// nce/language) 12471// are supported. Note: languages must be enabled in the agent before 12472// they can 12473// be used. 12474func (c *ProjectsAgentIntentsGetCall) LanguageCode(languageCode string) *ProjectsAgentIntentsGetCall { 12475 c.urlParams_.Set("languageCode", languageCode) 12476 return c 12477} 12478 12479// Fields allows partial responses to be retrieved. See 12480// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12481// for more information. 12482func (c *ProjectsAgentIntentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsGetCall { 12483 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12484 return c 12485} 12486 12487// IfNoneMatch sets the optional parameter which makes the operation 12488// fail if the object's ETag matches the given value. This is useful for 12489// getting updates only after the object has changed since the last 12490// request. Use googleapi.IsNotModified to check whether the response 12491// error from Do is the result of In-None-Match. 12492func (c *ProjectsAgentIntentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsGetCall { 12493 c.ifNoneMatch_ = entityTag 12494 return c 12495} 12496 12497// Context sets the context to be used in this call's Do method. Any 12498// pending HTTP request will be aborted if the provided context is 12499// canceled. 12500func (c *ProjectsAgentIntentsGetCall) Context(ctx context.Context) *ProjectsAgentIntentsGetCall { 12501 c.ctx_ = ctx 12502 return c 12503} 12504 12505// Header returns an http.Header that can be modified by the caller to 12506// add HTTP headers to the request. 12507func (c *ProjectsAgentIntentsGetCall) Header() http.Header { 12508 if c.header_ == nil { 12509 c.header_ = make(http.Header) 12510 } 12511 return c.header_ 12512} 12513 12514func (c *ProjectsAgentIntentsGetCall) doRequest(alt string) (*http.Response, error) { 12515 reqHeaders := make(http.Header) 12516 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 12517 for k, v := range c.header_ { 12518 reqHeaders[k] = v 12519 } 12520 reqHeaders.Set("User-Agent", c.s.userAgent()) 12521 if c.ifNoneMatch_ != "" { 12522 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12523 } 12524 var body io.Reader = nil 12525 c.urlParams_.Set("alt", alt) 12526 c.urlParams_.Set("prettyPrint", "false") 12527 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12528 urls += "?" + c.urlParams_.Encode() 12529 req, err := http.NewRequest("GET", urls, body) 12530 if err != nil { 12531 return nil, err 12532 } 12533 req.Header = reqHeaders 12534 googleapi.Expand(req.URL, map[string]string{ 12535 "name": c.name, 12536 }) 12537 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12538} 12539 12540// Do executes the "dialogflow.projects.agent.intents.get" call. 12541// Exactly one of *GoogleCloudDialogflowV2Intent or error will be 12542// non-nil. Any non-2xx status code is an error. Response headers are in 12543// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a 12544// response was returned at all) in error.(*googleapi.Error).Header. Use 12545// googleapi.IsNotModified to check whether the returned error was 12546// because http.StatusNotModified was returned. 12547func (c *ProjectsAgentIntentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) { 12548 gensupport.SetOptions(c.urlParams_, opts...) 12549 res, err := c.doRequest("json") 12550 if res != nil && res.StatusCode == http.StatusNotModified { 12551 if res.Body != nil { 12552 res.Body.Close() 12553 } 12554 return nil, &googleapi.Error{ 12555 Code: res.StatusCode, 12556 Header: res.Header, 12557 } 12558 } 12559 if err != nil { 12560 return nil, err 12561 } 12562 defer googleapi.CloseBody(res) 12563 if err := googleapi.CheckResponse(res); err != nil { 12564 return nil, err 12565 } 12566 ret := &GoogleCloudDialogflowV2Intent{ 12567 ServerResponse: googleapi.ServerResponse{ 12568 Header: res.Header, 12569 HTTPStatusCode: res.StatusCode, 12570 }, 12571 } 12572 target := &ret 12573 if err := gensupport.DecodeResponse(target, res); err != nil { 12574 return nil, err 12575 } 12576 return ret, nil 12577 // { 12578 // "description": "Retrieves the specified intent.", 12579 // "flatPath": "v2/projects/{projectsId}/agent/intents/{intentsId}", 12580 // "httpMethod": "GET", 12581 // "id": "dialogflow.projects.agent.intents.get", 12582 // "parameterOrder": [ 12583 // "name" 12584 // ], 12585 // "parameters": { 12586 // "intentView": { 12587 // "description": "Optional. The resource view to apply to the returned intent.", 12588 // "enum": [ 12589 // "INTENT_VIEW_UNSPECIFIED", 12590 // "INTENT_VIEW_FULL" 12591 // ], 12592 // "location": "query", 12593 // "type": "string" 12594 // }, 12595 // "languageCode": { 12596 // "description": "Optional. The language to retrieve training phrases, parameters and rich\nmessages for. If not specified, the agent's default language is used.\n[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.", 12597 // "location": "query", 12598 // "type": "string" 12599 // }, 12600 // "name": { 12601 // "description": "Required. The name of the intent.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.", 12602 // "location": "path", 12603 // "pattern": "^projects/[^/]+/agent/intents/[^/]+$", 12604 // "required": true, 12605 // "type": "string" 12606 // } 12607 // }, 12608 // "path": "v2/{+name}", 12609 // "response": { 12610 // "$ref": "GoogleCloudDialogflowV2Intent" 12611 // }, 12612 // "scopes": [ 12613 // "https://www.googleapis.com/auth/cloud-platform", 12614 // "https://www.googleapis.com/auth/dialogflow" 12615 // ] 12616 // } 12617 12618} 12619 12620// method id "dialogflow.projects.agent.intents.list": 12621 12622type ProjectsAgentIntentsListCall struct { 12623 s *Service 12624 parent string 12625 urlParams_ gensupport.URLParams 12626 ifNoneMatch_ string 12627 ctx_ context.Context 12628 header_ http.Header 12629} 12630 12631// List: Returns the list of all intents in the specified agent. 12632func (r *ProjectsAgentIntentsService) List(parent string) *ProjectsAgentIntentsListCall { 12633 c := &ProjectsAgentIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12634 c.parent = parent 12635 return c 12636} 12637 12638// IntentView sets the optional parameter "intentView": The resource 12639// view to apply to the returned intent. 12640// 12641// Possible values: 12642// "INTENT_VIEW_UNSPECIFIED" 12643// "INTENT_VIEW_FULL" 12644func (c *ProjectsAgentIntentsListCall) IntentView(intentView string) *ProjectsAgentIntentsListCall { 12645 c.urlParams_.Set("intentView", intentView) 12646 return c 12647} 12648 12649// LanguageCode sets the optional parameter "languageCode": The language 12650// to list training phrases, parameters and rich 12651// messages for. If not specified, the agent's default language is 12652// used. 12653// [Many 12654// languages](https://cloud.google.com/dialogflow/docs/refere 12655// nce/language) 12656// are supported. Note: languages must be enabled in the agent before 12657// they can 12658// be used. 12659func (c *ProjectsAgentIntentsListCall) LanguageCode(languageCode string) *ProjectsAgentIntentsListCall { 12660 c.urlParams_.Set("languageCode", languageCode) 12661 return c 12662} 12663 12664// PageSize sets the optional parameter "pageSize": The maximum number 12665// of items to return in a single page. By 12666// default 100 and at most 1000. 12667func (c *ProjectsAgentIntentsListCall) PageSize(pageSize int64) *ProjectsAgentIntentsListCall { 12668 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12669 return c 12670} 12671 12672// PageToken sets the optional parameter "pageToken": The 12673// next_page_token value returned from a previous list request. 12674func (c *ProjectsAgentIntentsListCall) PageToken(pageToken string) *ProjectsAgentIntentsListCall { 12675 c.urlParams_.Set("pageToken", pageToken) 12676 return c 12677} 12678 12679// Fields allows partial responses to be retrieved. See 12680// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12681// for more information. 12682func (c *ProjectsAgentIntentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsListCall { 12683 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12684 return c 12685} 12686 12687// IfNoneMatch sets the optional parameter which makes the operation 12688// fail if the object's ETag matches the given value. This is useful for 12689// getting updates only after the object has changed since the last 12690// request. Use googleapi.IsNotModified to check whether the response 12691// error from Do is the result of In-None-Match. 12692func (c *ProjectsAgentIntentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsListCall { 12693 c.ifNoneMatch_ = entityTag 12694 return c 12695} 12696 12697// Context sets the context to be used in this call's Do method. Any 12698// pending HTTP request will be aborted if the provided context is 12699// canceled. 12700func (c *ProjectsAgentIntentsListCall) Context(ctx context.Context) *ProjectsAgentIntentsListCall { 12701 c.ctx_ = ctx 12702 return c 12703} 12704 12705// Header returns an http.Header that can be modified by the caller to 12706// add HTTP headers to the request. 12707func (c *ProjectsAgentIntentsListCall) Header() http.Header { 12708 if c.header_ == nil { 12709 c.header_ = make(http.Header) 12710 } 12711 return c.header_ 12712} 12713 12714func (c *ProjectsAgentIntentsListCall) doRequest(alt string) (*http.Response, error) { 12715 reqHeaders := make(http.Header) 12716 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 12717 for k, v := range c.header_ { 12718 reqHeaders[k] = v 12719 } 12720 reqHeaders.Set("User-Agent", c.s.userAgent()) 12721 if c.ifNoneMatch_ != "" { 12722 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12723 } 12724 var body io.Reader = nil 12725 c.urlParams_.Set("alt", alt) 12726 c.urlParams_.Set("prettyPrint", "false") 12727 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents") 12728 urls += "?" + c.urlParams_.Encode() 12729 req, err := http.NewRequest("GET", urls, body) 12730 if err != nil { 12731 return nil, err 12732 } 12733 req.Header = reqHeaders 12734 googleapi.Expand(req.URL, map[string]string{ 12735 "parent": c.parent, 12736 }) 12737 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12738} 12739 12740// Do executes the "dialogflow.projects.agent.intents.list" call. 12741// Exactly one of *GoogleCloudDialogflowV2ListIntentsResponse or error 12742// will be non-nil. Any non-2xx status code is an error. Response 12743// headers are in either 12744// *GoogleCloudDialogflowV2ListIntentsResponse.ServerResponse.Header or 12745// (if a response was returned at all) in 12746// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12747// whether the returned error was because http.StatusNotModified was 12748// returned. 12749func (c *ProjectsAgentIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListIntentsResponse, error) { 12750 gensupport.SetOptions(c.urlParams_, opts...) 12751 res, err := c.doRequest("json") 12752 if res != nil && res.StatusCode == http.StatusNotModified { 12753 if res.Body != nil { 12754 res.Body.Close() 12755 } 12756 return nil, &googleapi.Error{ 12757 Code: res.StatusCode, 12758 Header: res.Header, 12759 } 12760 } 12761 if err != nil { 12762 return nil, err 12763 } 12764 defer googleapi.CloseBody(res) 12765 if err := googleapi.CheckResponse(res); err != nil { 12766 return nil, err 12767 } 12768 ret := &GoogleCloudDialogflowV2ListIntentsResponse{ 12769 ServerResponse: googleapi.ServerResponse{ 12770 Header: res.Header, 12771 HTTPStatusCode: res.StatusCode, 12772 }, 12773 } 12774 target := &ret 12775 if err := gensupport.DecodeResponse(target, res); err != nil { 12776 return nil, err 12777 } 12778 return ret, nil 12779 // { 12780 // "description": "Returns the list of all intents in the specified agent.", 12781 // "flatPath": "v2/projects/{projectsId}/agent/intents", 12782 // "httpMethod": "GET", 12783 // "id": "dialogflow.projects.agent.intents.list", 12784 // "parameterOrder": [ 12785 // "parent" 12786 // ], 12787 // "parameters": { 12788 // "intentView": { 12789 // "description": "Optional. The resource view to apply to the returned intent.", 12790 // "enum": [ 12791 // "INTENT_VIEW_UNSPECIFIED", 12792 // "INTENT_VIEW_FULL" 12793 // ], 12794 // "location": "query", 12795 // "type": "string" 12796 // }, 12797 // "languageCode": { 12798 // "description": "Optional. The language to list training phrases, parameters and rich\nmessages for. If not specified, the agent's default language is used.\n[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.", 12799 // "location": "query", 12800 // "type": "string" 12801 // }, 12802 // "pageSize": { 12803 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 12804 // "format": "int32", 12805 // "location": "query", 12806 // "type": "integer" 12807 // }, 12808 // "pageToken": { 12809 // "description": "Optional. The next_page_token value returned from a previous list request.", 12810 // "location": "query", 12811 // "type": "string" 12812 // }, 12813 // "parent": { 12814 // "description": "Required. The agent to list all intents from.\nFormat: `projects/\u003cProject ID\u003e/agent`.", 12815 // "location": "path", 12816 // "pattern": "^projects/[^/]+/agent$", 12817 // "required": true, 12818 // "type": "string" 12819 // } 12820 // }, 12821 // "path": "v2/{+parent}/intents", 12822 // "response": { 12823 // "$ref": "GoogleCloudDialogflowV2ListIntentsResponse" 12824 // }, 12825 // "scopes": [ 12826 // "https://www.googleapis.com/auth/cloud-platform", 12827 // "https://www.googleapis.com/auth/dialogflow" 12828 // ] 12829 // } 12830 12831} 12832 12833// Pages invokes f for each page of results. 12834// A non-nil error returned from f will halt the iteration. 12835// The provided context supersedes any context provided to the Context method. 12836func (c *ProjectsAgentIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListIntentsResponse) error) error { 12837 c.ctx_ = ctx 12838 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12839 for { 12840 x, err := c.Do() 12841 if err != nil { 12842 return err 12843 } 12844 if err := f(x); err != nil { 12845 return err 12846 } 12847 if x.NextPageToken == "" { 12848 return nil 12849 } 12850 c.PageToken(x.NextPageToken) 12851 } 12852} 12853 12854// method id "dialogflow.projects.agent.intents.patch": 12855 12856type ProjectsAgentIntentsPatchCall struct { 12857 s *Service 12858 nameid string 12859 googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent 12860 urlParams_ gensupport.URLParams 12861 ctx_ context.Context 12862 header_ http.Header 12863} 12864 12865// Patch: Updates the specified intent. 12866func (r *ProjectsAgentIntentsService) Patch(nameid string, googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent) *ProjectsAgentIntentsPatchCall { 12867 c := &ProjectsAgentIntentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12868 c.nameid = nameid 12869 c.googleclouddialogflowv2intent = googleclouddialogflowv2intent 12870 return c 12871} 12872 12873// IntentView sets the optional parameter "intentView": The resource 12874// view to apply to the returned intent. 12875// 12876// Possible values: 12877// "INTENT_VIEW_UNSPECIFIED" 12878// "INTENT_VIEW_FULL" 12879func (c *ProjectsAgentIntentsPatchCall) IntentView(intentView string) *ProjectsAgentIntentsPatchCall { 12880 c.urlParams_.Set("intentView", intentView) 12881 return c 12882} 12883 12884// LanguageCode sets the optional parameter "languageCode": The language 12885// of training phrases, parameters and rich messages 12886// defined in `intent`. If not specified, the agent's default language 12887// is 12888// used. 12889// [Many 12890// languages](https://cloud.google.com/dialogflow/docs/reference/la 12891// nguage) 12892// are supported. Note: languages must be enabled in the agent before 12893// they can 12894// be used. 12895func (c *ProjectsAgentIntentsPatchCall) LanguageCode(languageCode string) *ProjectsAgentIntentsPatchCall { 12896 c.urlParams_.Set("languageCode", languageCode) 12897 return c 12898} 12899 12900// UpdateMask sets the optional parameter "updateMask": The mask to 12901// control which fields get updated. 12902func (c *ProjectsAgentIntentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentIntentsPatchCall { 12903 c.urlParams_.Set("updateMask", updateMask) 12904 return c 12905} 12906 12907// Fields allows partial responses to be retrieved. See 12908// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12909// for more information. 12910func (c *ProjectsAgentIntentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsPatchCall { 12911 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12912 return c 12913} 12914 12915// Context sets the context to be used in this call's Do method. Any 12916// pending HTTP request will be aborted if the provided context is 12917// canceled. 12918func (c *ProjectsAgentIntentsPatchCall) Context(ctx context.Context) *ProjectsAgentIntentsPatchCall { 12919 c.ctx_ = ctx 12920 return c 12921} 12922 12923// Header returns an http.Header that can be modified by the caller to 12924// add HTTP headers to the request. 12925func (c *ProjectsAgentIntentsPatchCall) Header() http.Header { 12926 if c.header_ == nil { 12927 c.header_ = make(http.Header) 12928 } 12929 return c.header_ 12930} 12931 12932func (c *ProjectsAgentIntentsPatchCall) doRequest(alt string) (*http.Response, error) { 12933 reqHeaders := make(http.Header) 12934 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 12935 for k, v := range c.header_ { 12936 reqHeaders[k] = v 12937 } 12938 reqHeaders.Set("User-Agent", c.s.userAgent()) 12939 var body io.Reader = nil 12940 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2intent) 12941 if err != nil { 12942 return nil, err 12943 } 12944 reqHeaders.Set("Content-Type", "application/json") 12945 c.urlParams_.Set("alt", alt) 12946 c.urlParams_.Set("prettyPrint", "false") 12947 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12948 urls += "?" + c.urlParams_.Encode() 12949 req, err := http.NewRequest("PATCH", urls, body) 12950 if err != nil { 12951 return nil, err 12952 } 12953 req.Header = reqHeaders 12954 googleapi.Expand(req.URL, map[string]string{ 12955 "name": c.nameid, 12956 }) 12957 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12958} 12959 12960// Do executes the "dialogflow.projects.agent.intents.patch" call. 12961// Exactly one of *GoogleCloudDialogflowV2Intent or error will be 12962// non-nil. Any non-2xx status code is an error. Response headers are in 12963// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a 12964// response was returned at all) in error.(*googleapi.Error).Header. Use 12965// googleapi.IsNotModified to check whether the returned error was 12966// because http.StatusNotModified was returned. 12967func (c *ProjectsAgentIntentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) { 12968 gensupport.SetOptions(c.urlParams_, opts...) 12969 res, err := c.doRequest("json") 12970 if res != nil && res.StatusCode == http.StatusNotModified { 12971 if res.Body != nil { 12972 res.Body.Close() 12973 } 12974 return nil, &googleapi.Error{ 12975 Code: res.StatusCode, 12976 Header: res.Header, 12977 } 12978 } 12979 if err != nil { 12980 return nil, err 12981 } 12982 defer googleapi.CloseBody(res) 12983 if err := googleapi.CheckResponse(res); err != nil { 12984 return nil, err 12985 } 12986 ret := &GoogleCloudDialogflowV2Intent{ 12987 ServerResponse: googleapi.ServerResponse{ 12988 Header: res.Header, 12989 HTTPStatusCode: res.StatusCode, 12990 }, 12991 } 12992 target := &ret 12993 if err := gensupport.DecodeResponse(target, res); err != nil { 12994 return nil, err 12995 } 12996 return ret, nil 12997 // { 12998 // "description": "Updates the specified intent.", 12999 // "flatPath": "v2/projects/{projectsId}/agent/intents/{intentsId}", 13000 // "httpMethod": "PATCH", 13001 // "id": "dialogflow.projects.agent.intents.patch", 13002 // "parameterOrder": [ 13003 // "name" 13004 // ], 13005 // "parameters": { 13006 // "intentView": { 13007 // "description": "Optional. The resource view to apply to the returned intent.", 13008 // "enum": [ 13009 // "INTENT_VIEW_UNSPECIFIED", 13010 // "INTENT_VIEW_FULL" 13011 // ], 13012 // "location": "query", 13013 // "type": "string" 13014 // }, 13015 // "languageCode": { 13016 // "description": "Optional. The language of training phrases, parameters and rich messages\ndefined in `intent`. If not specified, the agent's default language is\nused. [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.", 13017 // "location": "query", 13018 // "type": "string" 13019 // }, 13020 // "name": { 13021 // "description": "The unique identifier of this intent.\nRequired for Intents.UpdateIntent and Intents.BatchUpdateIntents\nmethods.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.", 13022 // "location": "path", 13023 // "pattern": "^projects/[^/]+/agent/intents/[^/]+$", 13024 // "required": true, 13025 // "type": "string" 13026 // }, 13027 // "updateMask": { 13028 // "description": "Optional. The mask to control which fields get updated.", 13029 // "format": "google-fieldmask", 13030 // "location": "query", 13031 // "type": "string" 13032 // } 13033 // }, 13034 // "path": "v2/{+name}", 13035 // "request": { 13036 // "$ref": "GoogleCloudDialogflowV2Intent" 13037 // }, 13038 // "response": { 13039 // "$ref": "GoogleCloudDialogflowV2Intent" 13040 // }, 13041 // "scopes": [ 13042 // "https://www.googleapis.com/auth/cloud-platform", 13043 // "https://www.googleapis.com/auth/dialogflow" 13044 // ] 13045 // } 13046 13047} 13048 13049// method id "dialogflow.projects.agent.sessions.deleteContexts": 13050 13051type ProjectsAgentSessionsDeleteContextsCall struct { 13052 s *Service 13053 parent string 13054 urlParams_ gensupport.URLParams 13055 ctx_ context.Context 13056 header_ http.Header 13057} 13058 13059// DeleteContexts: Deletes all active contexts in the specified session. 13060func (r *ProjectsAgentSessionsService) DeleteContexts(parent string) *ProjectsAgentSessionsDeleteContextsCall { 13061 c := &ProjectsAgentSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13062 c.parent = parent 13063 return c 13064} 13065 13066// Fields allows partial responses to be retrieved. See 13067// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13068// for more information. 13069func (c *ProjectsAgentSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDeleteContextsCall { 13070 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13071 return c 13072} 13073 13074// Context sets the context to be used in this call's Do method. Any 13075// pending HTTP request will be aborted if the provided context is 13076// canceled. 13077func (c *ProjectsAgentSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentSessionsDeleteContextsCall { 13078 c.ctx_ = ctx 13079 return c 13080} 13081 13082// Header returns an http.Header that can be modified by the caller to 13083// add HTTP headers to the request. 13084func (c *ProjectsAgentSessionsDeleteContextsCall) Header() http.Header { 13085 if c.header_ == nil { 13086 c.header_ = make(http.Header) 13087 } 13088 return c.header_ 13089} 13090 13091func (c *ProjectsAgentSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) { 13092 reqHeaders := make(http.Header) 13093 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 13094 for k, v := range c.header_ { 13095 reqHeaders[k] = v 13096 } 13097 reqHeaders.Set("User-Agent", c.s.userAgent()) 13098 var body io.Reader = nil 13099 c.urlParams_.Set("alt", alt) 13100 c.urlParams_.Set("prettyPrint", "false") 13101 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts") 13102 urls += "?" + c.urlParams_.Encode() 13103 req, err := http.NewRequest("DELETE", urls, body) 13104 if err != nil { 13105 return nil, err 13106 } 13107 req.Header = reqHeaders 13108 googleapi.Expand(req.URL, map[string]string{ 13109 "parent": c.parent, 13110 }) 13111 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13112} 13113 13114// Do executes the "dialogflow.projects.agent.sessions.deleteContexts" call. 13115// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13116// non-2xx status code is an error. Response headers are in either 13117// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13118// returned at all) in error.(*googleapi.Error).Header. Use 13119// googleapi.IsNotModified to check whether the returned error was 13120// because http.StatusNotModified was returned. 13121func (c *ProjectsAgentSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13122 gensupport.SetOptions(c.urlParams_, opts...) 13123 res, err := c.doRequest("json") 13124 if res != nil && res.StatusCode == http.StatusNotModified { 13125 if res.Body != nil { 13126 res.Body.Close() 13127 } 13128 return nil, &googleapi.Error{ 13129 Code: res.StatusCode, 13130 Header: res.Header, 13131 } 13132 } 13133 if err != nil { 13134 return nil, err 13135 } 13136 defer googleapi.CloseBody(res) 13137 if err := googleapi.CheckResponse(res); err != nil { 13138 return nil, err 13139 } 13140 ret := &GoogleProtobufEmpty{ 13141 ServerResponse: googleapi.ServerResponse{ 13142 Header: res.Header, 13143 HTTPStatusCode: res.StatusCode, 13144 }, 13145 } 13146 target := &ret 13147 if err := gensupport.DecodeResponse(target, res); err != nil { 13148 return nil, err 13149 } 13150 return ret, nil 13151 // { 13152 // "description": "Deletes all active contexts in the specified session.", 13153 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", 13154 // "httpMethod": "DELETE", 13155 // "id": "dialogflow.projects.agent.sessions.deleteContexts", 13156 // "parameterOrder": [ 13157 // "parent" 13158 // ], 13159 // "parameters": { 13160 // "parent": { 13161 // "description": "Required. The name of the session to delete all contexts from. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`.", 13162 // "location": "path", 13163 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 13164 // "required": true, 13165 // "type": "string" 13166 // } 13167 // }, 13168 // "path": "v2/{+parent}/contexts", 13169 // "response": { 13170 // "$ref": "GoogleProtobufEmpty" 13171 // }, 13172 // "scopes": [ 13173 // "https://www.googleapis.com/auth/cloud-platform", 13174 // "https://www.googleapis.com/auth/dialogflow" 13175 // ] 13176 // } 13177 13178} 13179 13180// method id "dialogflow.projects.agent.sessions.detectIntent": 13181 13182type ProjectsAgentSessionsDetectIntentCall struct { 13183 s *Service 13184 sessionid string 13185 googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest 13186 urlParams_ gensupport.URLParams 13187 ctx_ context.Context 13188 header_ http.Header 13189} 13190 13191// DetectIntent: Processes a natural language query and returns 13192// structured, actionable data 13193// as a result. This method is not idempotent, because it may cause 13194// contexts 13195// and session entity types to be updated, which in turn might 13196// affect 13197// results of future queries. 13198func (r *ProjectsAgentSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest) *ProjectsAgentSessionsDetectIntentCall { 13199 c := &ProjectsAgentSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13200 c.sessionid = sessionid 13201 c.googleclouddialogflowv2detectintentrequest = googleclouddialogflowv2detectintentrequest 13202 return c 13203} 13204 13205// Fields allows partial responses to be retrieved. See 13206// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13207// for more information. 13208func (c *ProjectsAgentSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDetectIntentCall { 13209 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13210 return c 13211} 13212 13213// Context sets the context to be used in this call's Do method. Any 13214// pending HTTP request will be aborted if the provided context is 13215// canceled. 13216func (c *ProjectsAgentSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentSessionsDetectIntentCall { 13217 c.ctx_ = ctx 13218 return c 13219} 13220 13221// Header returns an http.Header that can be modified by the caller to 13222// add HTTP headers to the request. 13223func (c *ProjectsAgentSessionsDetectIntentCall) Header() http.Header { 13224 if c.header_ == nil { 13225 c.header_ = make(http.Header) 13226 } 13227 return c.header_ 13228} 13229 13230func (c *ProjectsAgentSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) { 13231 reqHeaders := make(http.Header) 13232 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 13233 for k, v := range c.header_ { 13234 reqHeaders[k] = v 13235 } 13236 reqHeaders.Set("User-Agent", c.s.userAgent()) 13237 var body io.Reader = nil 13238 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2detectintentrequest) 13239 if err != nil { 13240 return nil, err 13241 } 13242 reqHeaders.Set("Content-Type", "application/json") 13243 c.urlParams_.Set("alt", alt) 13244 c.urlParams_.Set("prettyPrint", "false") 13245 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+session}:detectIntent") 13246 urls += "?" + c.urlParams_.Encode() 13247 req, err := http.NewRequest("POST", urls, body) 13248 if err != nil { 13249 return nil, err 13250 } 13251 req.Header = reqHeaders 13252 googleapi.Expand(req.URL, map[string]string{ 13253 "session": c.sessionid, 13254 }) 13255 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13256} 13257 13258// Do executes the "dialogflow.projects.agent.sessions.detectIntent" call. 13259// Exactly one of *GoogleCloudDialogflowV2DetectIntentResponse or error 13260// will be non-nil. Any non-2xx status code is an error. Response 13261// headers are in either 13262// *GoogleCloudDialogflowV2DetectIntentResponse.ServerResponse.Header or 13263// (if a response was returned at all) in 13264// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13265// whether the returned error was because http.StatusNotModified was 13266// returned. 13267func (c *ProjectsAgentSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2DetectIntentResponse, error) { 13268 gensupport.SetOptions(c.urlParams_, opts...) 13269 res, err := c.doRequest("json") 13270 if res != nil && res.StatusCode == http.StatusNotModified { 13271 if res.Body != nil { 13272 res.Body.Close() 13273 } 13274 return nil, &googleapi.Error{ 13275 Code: res.StatusCode, 13276 Header: res.Header, 13277 } 13278 } 13279 if err != nil { 13280 return nil, err 13281 } 13282 defer googleapi.CloseBody(res) 13283 if err := googleapi.CheckResponse(res); err != nil { 13284 return nil, err 13285 } 13286 ret := &GoogleCloudDialogflowV2DetectIntentResponse{ 13287 ServerResponse: googleapi.ServerResponse{ 13288 Header: res.Header, 13289 HTTPStatusCode: res.StatusCode, 13290 }, 13291 } 13292 target := &ret 13293 if err := gensupport.DecodeResponse(target, res); err != nil { 13294 return nil, err 13295 } 13296 return ret, nil 13297 // { 13298 // "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.", 13299 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}:detectIntent", 13300 // "httpMethod": "POST", 13301 // "id": "dialogflow.projects.agent.sessions.detectIntent", 13302 // "parameterOrder": [ 13303 // "session" 13304 // ], 13305 // "parameters": { 13306 // "session": { 13307 // "description": "Required. The name of the session this query is sent to. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`. It's up to the API\ncaller to choose an appropriate session ID. It can be a random number or\nsome type of user identifier (preferably hashed). The length of the session\nID must not exceed 36 bytes.", 13308 // "location": "path", 13309 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 13310 // "required": true, 13311 // "type": "string" 13312 // } 13313 // }, 13314 // "path": "v2/{+session}:detectIntent", 13315 // "request": { 13316 // "$ref": "GoogleCloudDialogflowV2DetectIntentRequest" 13317 // }, 13318 // "response": { 13319 // "$ref": "GoogleCloudDialogflowV2DetectIntentResponse" 13320 // }, 13321 // "scopes": [ 13322 // "https://www.googleapis.com/auth/cloud-platform", 13323 // "https://www.googleapis.com/auth/dialogflow" 13324 // ] 13325 // } 13326 13327} 13328 13329// method id "dialogflow.projects.agent.sessions.contexts.create": 13330 13331type ProjectsAgentSessionsContextsCreateCall struct { 13332 s *Service 13333 parent string 13334 googleclouddialogflowv2context *GoogleCloudDialogflowV2Context 13335 urlParams_ gensupport.URLParams 13336 ctx_ context.Context 13337 header_ http.Header 13338} 13339 13340// Create: Creates a context. 13341// 13342// If the specified context already exists, overrides the context. 13343func (r *ProjectsAgentSessionsContextsService) Create(parent string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsAgentSessionsContextsCreateCall { 13344 c := &ProjectsAgentSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13345 c.parent = parent 13346 c.googleclouddialogflowv2context = googleclouddialogflowv2context 13347 return c 13348} 13349 13350// Fields allows partial responses to be retrieved. See 13351// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13352// for more information. 13353func (c *ProjectsAgentSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsCreateCall { 13354 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13355 return c 13356} 13357 13358// Context sets the context to be used in this call's Do method. Any 13359// pending HTTP request will be aborted if the provided context is 13360// canceled. 13361func (c *ProjectsAgentSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsCreateCall { 13362 c.ctx_ = ctx 13363 return c 13364} 13365 13366// Header returns an http.Header that can be modified by the caller to 13367// add HTTP headers to the request. 13368func (c *ProjectsAgentSessionsContextsCreateCall) Header() http.Header { 13369 if c.header_ == nil { 13370 c.header_ = make(http.Header) 13371 } 13372 return c.header_ 13373} 13374 13375func (c *ProjectsAgentSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) { 13376 reqHeaders := make(http.Header) 13377 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 13378 for k, v := range c.header_ { 13379 reqHeaders[k] = v 13380 } 13381 reqHeaders.Set("User-Agent", c.s.userAgent()) 13382 var body io.Reader = nil 13383 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context) 13384 if err != nil { 13385 return nil, err 13386 } 13387 reqHeaders.Set("Content-Type", "application/json") 13388 c.urlParams_.Set("alt", alt) 13389 c.urlParams_.Set("prettyPrint", "false") 13390 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts") 13391 urls += "?" + c.urlParams_.Encode() 13392 req, err := http.NewRequest("POST", urls, body) 13393 if err != nil { 13394 return nil, err 13395 } 13396 req.Header = reqHeaders 13397 googleapi.Expand(req.URL, map[string]string{ 13398 "parent": c.parent, 13399 }) 13400 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13401} 13402 13403// Do executes the "dialogflow.projects.agent.sessions.contexts.create" call. 13404// Exactly one of *GoogleCloudDialogflowV2Context or error will be 13405// non-nil. Any non-2xx status code is an error. Response headers are in 13406// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a 13407// response was returned at all) in error.(*googleapi.Error).Header. Use 13408// googleapi.IsNotModified to check whether the returned error was 13409// because http.StatusNotModified was returned. 13410func (c *ProjectsAgentSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) { 13411 gensupport.SetOptions(c.urlParams_, opts...) 13412 res, err := c.doRequest("json") 13413 if res != nil && res.StatusCode == http.StatusNotModified { 13414 if res.Body != nil { 13415 res.Body.Close() 13416 } 13417 return nil, &googleapi.Error{ 13418 Code: res.StatusCode, 13419 Header: res.Header, 13420 } 13421 } 13422 if err != nil { 13423 return nil, err 13424 } 13425 defer googleapi.CloseBody(res) 13426 if err := googleapi.CheckResponse(res); err != nil { 13427 return nil, err 13428 } 13429 ret := &GoogleCloudDialogflowV2Context{ 13430 ServerResponse: googleapi.ServerResponse{ 13431 Header: res.Header, 13432 HTTPStatusCode: res.StatusCode, 13433 }, 13434 } 13435 target := &ret 13436 if err := gensupport.DecodeResponse(target, res); err != nil { 13437 return nil, err 13438 } 13439 return ret, nil 13440 // { 13441 // "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.", 13442 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", 13443 // "httpMethod": "POST", 13444 // "id": "dialogflow.projects.agent.sessions.contexts.create", 13445 // "parameterOrder": [ 13446 // "parent" 13447 // ], 13448 // "parameters": { 13449 // "parent": { 13450 // "description": "Required. The session to create a context for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`.", 13451 // "location": "path", 13452 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 13453 // "required": true, 13454 // "type": "string" 13455 // } 13456 // }, 13457 // "path": "v2/{+parent}/contexts", 13458 // "request": { 13459 // "$ref": "GoogleCloudDialogflowV2Context" 13460 // }, 13461 // "response": { 13462 // "$ref": "GoogleCloudDialogflowV2Context" 13463 // }, 13464 // "scopes": [ 13465 // "https://www.googleapis.com/auth/cloud-platform", 13466 // "https://www.googleapis.com/auth/dialogflow" 13467 // ] 13468 // } 13469 13470} 13471 13472// method id "dialogflow.projects.agent.sessions.contexts.delete": 13473 13474type ProjectsAgentSessionsContextsDeleteCall struct { 13475 s *Service 13476 name string 13477 urlParams_ gensupport.URLParams 13478 ctx_ context.Context 13479 header_ http.Header 13480} 13481 13482// Delete: Deletes the specified context. 13483func (r *ProjectsAgentSessionsContextsService) Delete(name string) *ProjectsAgentSessionsContextsDeleteCall { 13484 c := &ProjectsAgentSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13485 c.name = name 13486 return c 13487} 13488 13489// Fields allows partial responses to be retrieved. See 13490// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13491// for more information. 13492func (c *ProjectsAgentSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsDeleteCall { 13493 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13494 return c 13495} 13496 13497// Context sets the context to be used in this call's Do method. Any 13498// pending HTTP request will be aborted if the provided context is 13499// canceled. 13500func (c *ProjectsAgentSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsDeleteCall { 13501 c.ctx_ = ctx 13502 return c 13503} 13504 13505// Header returns an http.Header that can be modified by the caller to 13506// add HTTP headers to the request. 13507func (c *ProjectsAgentSessionsContextsDeleteCall) Header() http.Header { 13508 if c.header_ == nil { 13509 c.header_ = make(http.Header) 13510 } 13511 return c.header_ 13512} 13513 13514func (c *ProjectsAgentSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) { 13515 reqHeaders := make(http.Header) 13516 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 13517 for k, v := range c.header_ { 13518 reqHeaders[k] = v 13519 } 13520 reqHeaders.Set("User-Agent", c.s.userAgent()) 13521 var body io.Reader = nil 13522 c.urlParams_.Set("alt", alt) 13523 c.urlParams_.Set("prettyPrint", "false") 13524 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13525 urls += "?" + c.urlParams_.Encode() 13526 req, err := http.NewRequest("DELETE", urls, body) 13527 if err != nil { 13528 return nil, err 13529 } 13530 req.Header = reqHeaders 13531 googleapi.Expand(req.URL, map[string]string{ 13532 "name": c.name, 13533 }) 13534 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13535} 13536 13537// Do executes the "dialogflow.projects.agent.sessions.contexts.delete" call. 13538// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13539// non-2xx status code is an error. Response headers are in either 13540// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13541// returned at all) in error.(*googleapi.Error).Header. Use 13542// googleapi.IsNotModified to check whether the returned error was 13543// because http.StatusNotModified was returned. 13544func (c *ProjectsAgentSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13545 gensupport.SetOptions(c.urlParams_, opts...) 13546 res, err := c.doRequest("json") 13547 if res != nil && res.StatusCode == http.StatusNotModified { 13548 if res.Body != nil { 13549 res.Body.Close() 13550 } 13551 return nil, &googleapi.Error{ 13552 Code: res.StatusCode, 13553 Header: res.Header, 13554 } 13555 } 13556 if err != nil { 13557 return nil, err 13558 } 13559 defer googleapi.CloseBody(res) 13560 if err := googleapi.CheckResponse(res); err != nil { 13561 return nil, err 13562 } 13563 ret := &GoogleProtobufEmpty{ 13564 ServerResponse: googleapi.ServerResponse{ 13565 Header: res.Header, 13566 HTTPStatusCode: res.StatusCode, 13567 }, 13568 } 13569 target := &ret 13570 if err := gensupport.DecodeResponse(target, res); err != nil { 13571 return nil, err 13572 } 13573 return ret, nil 13574 // { 13575 // "description": "Deletes the specified context.", 13576 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", 13577 // "httpMethod": "DELETE", 13578 // "id": "dialogflow.projects.agent.sessions.contexts.delete", 13579 // "parameterOrder": [ 13580 // "name" 13581 // ], 13582 // "parameters": { 13583 // "name": { 13584 // "description": "Required. The name of the context to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.", 13585 // "location": "path", 13586 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", 13587 // "required": true, 13588 // "type": "string" 13589 // } 13590 // }, 13591 // "path": "v2/{+name}", 13592 // "response": { 13593 // "$ref": "GoogleProtobufEmpty" 13594 // }, 13595 // "scopes": [ 13596 // "https://www.googleapis.com/auth/cloud-platform", 13597 // "https://www.googleapis.com/auth/dialogflow" 13598 // ] 13599 // } 13600 13601} 13602 13603// method id "dialogflow.projects.agent.sessions.contexts.get": 13604 13605type ProjectsAgentSessionsContextsGetCall struct { 13606 s *Service 13607 name string 13608 urlParams_ gensupport.URLParams 13609 ifNoneMatch_ string 13610 ctx_ context.Context 13611 header_ http.Header 13612} 13613 13614// Get: Retrieves the specified context. 13615func (r *ProjectsAgentSessionsContextsService) Get(name string) *ProjectsAgentSessionsContextsGetCall { 13616 c := &ProjectsAgentSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13617 c.name = name 13618 return c 13619} 13620 13621// Fields allows partial responses to be retrieved. See 13622// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13623// for more information. 13624func (c *ProjectsAgentSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsGetCall { 13625 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13626 return c 13627} 13628 13629// IfNoneMatch sets the optional parameter which makes the operation 13630// fail if the object's ETag matches the given value. This is useful for 13631// getting updates only after the object has changed since the last 13632// request. Use googleapi.IsNotModified to check whether the response 13633// error from Do is the result of In-None-Match. 13634func (c *ProjectsAgentSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsGetCall { 13635 c.ifNoneMatch_ = entityTag 13636 return c 13637} 13638 13639// Context sets the context to be used in this call's Do method. Any 13640// pending HTTP request will be aborted if the provided context is 13641// canceled. 13642func (c *ProjectsAgentSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsGetCall { 13643 c.ctx_ = ctx 13644 return c 13645} 13646 13647// Header returns an http.Header that can be modified by the caller to 13648// add HTTP headers to the request. 13649func (c *ProjectsAgentSessionsContextsGetCall) Header() http.Header { 13650 if c.header_ == nil { 13651 c.header_ = make(http.Header) 13652 } 13653 return c.header_ 13654} 13655 13656func (c *ProjectsAgentSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) { 13657 reqHeaders := make(http.Header) 13658 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 13659 for k, v := range c.header_ { 13660 reqHeaders[k] = v 13661 } 13662 reqHeaders.Set("User-Agent", c.s.userAgent()) 13663 if c.ifNoneMatch_ != "" { 13664 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13665 } 13666 var body io.Reader = nil 13667 c.urlParams_.Set("alt", alt) 13668 c.urlParams_.Set("prettyPrint", "false") 13669 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13670 urls += "?" + c.urlParams_.Encode() 13671 req, err := http.NewRequest("GET", urls, body) 13672 if err != nil { 13673 return nil, err 13674 } 13675 req.Header = reqHeaders 13676 googleapi.Expand(req.URL, map[string]string{ 13677 "name": c.name, 13678 }) 13679 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13680} 13681 13682// Do executes the "dialogflow.projects.agent.sessions.contexts.get" call. 13683// Exactly one of *GoogleCloudDialogflowV2Context or error will be 13684// non-nil. Any non-2xx status code is an error. Response headers are in 13685// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a 13686// response was returned at all) in error.(*googleapi.Error).Header. Use 13687// googleapi.IsNotModified to check whether the returned error was 13688// because http.StatusNotModified was returned. 13689func (c *ProjectsAgentSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) { 13690 gensupport.SetOptions(c.urlParams_, opts...) 13691 res, err := c.doRequest("json") 13692 if res != nil && res.StatusCode == http.StatusNotModified { 13693 if res.Body != nil { 13694 res.Body.Close() 13695 } 13696 return nil, &googleapi.Error{ 13697 Code: res.StatusCode, 13698 Header: res.Header, 13699 } 13700 } 13701 if err != nil { 13702 return nil, err 13703 } 13704 defer googleapi.CloseBody(res) 13705 if err := googleapi.CheckResponse(res); err != nil { 13706 return nil, err 13707 } 13708 ret := &GoogleCloudDialogflowV2Context{ 13709 ServerResponse: googleapi.ServerResponse{ 13710 Header: res.Header, 13711 HTTPStatusCode: res.StatusCode, 13712 }, 13713 } 13714 target := &ret 13715 if err := gensupport.DecodeResponse(target, res); err != nil { 13716 return nil, err 13717 } 13718 return ret, nil 13719 // { 13720 // "description": "Retrieves the specified context.", 13721 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", 13722 // "httpMethod": "GET", 13723 // "id": "dialogflow.projects.agent.sessions.contexts.get", 13724 // "parameterOrder": [ 13725 // "name" 13726 // ], 13727 // "parameters": { 13728 // "name": { 13729 // "description": "Required. The name of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.", 13730 // "location": "path", 13731 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", 13732 // "required": true, 13733 // "type": "string" 13734 // } 13735 // }, 13736 // "path": "v2/{+name}", 13737 // "response": { 13738 // "$ref": "GoogleCloudDialogflowV2Context" 13739 // }, 13740 // "scopes": [ 13741 // "https://www.googleapis.com/auth/cloud-platform", 13742 // "https://www.googleapis.com/auth/dialogflow" 13743 // ] 13744 // } 13745 13746} 13747 13748// method id "dialogflow.projects.agent.sessions.contexts.list": 13749 13750type ProjectsAgentSessionsContextsListCall struct { 13751 s *Service 13752 parent string 13753 urlParams_ gensupport.URLParams 13754 ifNoneMatch_ string 13755 ctx_ context.Context 13756 header_ http.Header 13757} 13758 13759// List: Returns the list of all contexts in the specified session. 13760func (r *ProjectsAgentSessionsContextsService) List(parent string) *ProjectsAgentSessionsContextsListCall { 13761 c := &ProjectsAgentSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13762 c.parent = parent 13763 return c 13764} 13765 13766// PageSize sets the optional parameter "pageSize": The maximum number 13767// of items to return in a single page. By 13768// default 100 and at most 1000. 13769func (c *ProjectsAgentSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentSessionsContextsListCall { 13770 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13771 return c 13772} 13773 13774// PageToken sets the optional parameter "pageToken": The 13775// next_page_token value returned from a previous list request. 13776func (c *ProjectsAgentSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentSessionsContextsListCall { 13777 c.urlParams_.Set("pageToken", pageToken) 13778 return c 13779} 13780 13781// Fields allows partial responses to be retrieved. See 13782// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13783// for more information. 13784func (c *ProjectsAgentSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsListCall { 13785 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13786 return c 13787} 13788 13789// IfNoneMatch sets the optional parameter which makes the operation 13790// fail if the object's ETag matches the given value. This is useful for 13791// getting updates only after the object has changed since the last 13792// request. Use googleapi.IsNotModified to check whether the response 13793// error from Do is the result of In-None-Match. 13794func (c *ProjectsAgentSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsListCall { 13795 c.ifNoneMatch_ = entityTag 13796 return c 13797} 13798 13799// Context sets the context to be used in this call's Do method. Any 13800// pending HTTP request will be aborted if the provided context is 13801// canceled. 13802func (c *ProjectsAgentSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsListCall { 13803 c.ctx_ = ctx 13804 return c 13805} 13806 13807// Header returns an http.Header that can be modified by the caller to 13808// add HTTP headers to the request. 13809func (c *ProjectsAgentSessionsContextsListCall) Header() http.Header { 13810 if c.header_ == nil { 13811 c.header_ = make(http.Header) 13812 } 13813 return c.header_ 13814} 13815 13816func (c *ProjectsAgentSessionsContextsListCall) doRequest(alt string) (*http.Response, error) { 13817 reqHeaders := make(http.Header) 13818 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 13819 for k, v := range c.header_ { 13820 reqHeaders[k] = v 13821 } 13822 reqHeaders.Set("User-Agent", c.s.userAgent()) 13823 if c.ifNoneMatch_ != "" { 13824 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13825 } 13826 var body io.Reader = nil 13827 c.urlParams_.Set("alt", alt) 13828 c.urlParams_.Set("prettyPrint", "false") 13829 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts") 13830 urls += "?" + c.urlParams_.Encode() 13831 req, err := http.NewRequest("GET", urls, body) 13832 if err != nil { 13833 return nil, err 13834 } 13835 req.Header = reqHeaders 13836 googleapi.Expand(req.URL, map[string]string{ 13837 "parent": c.parent, 13838 }) 13839 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13840} 13841 13842// Do executes the "dialogflow.projects.agent.sessions.contexts.list" call. 13843// Exactly one of *GoogleCloudDialogflowV2ListContextsResponse or error 13844// will be non-nil. Any non-2xx status code is an error. Response 13845// headers are in either 13846// *GoogleCloudDialogflowV2ListContextsResponse.ServerResponse.Header or 13847// (if a response was returned at all) in 13848// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13849// whether the returned error was because http.StatusNotModified was 13850// returned. 13851func (c *ProjectsAgentSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListContextsResponse, error) { 13852 gensupport.SetOptions(c.urlParams_, opts...) 13853 res, err := c.doRequest("json") 13854 if res != nil && res.StatusCode == http.StatusNotModified { 13855 if res.Body != nil { 13856 res.Body.Close() 13857 } 13858 return nil, &googleapi.Error{ 13859 Code: res.StatusCode, 13860 Header: res.Header, 13861 } 13862 } 13863 if err != nil { 13864 return nil, err 13865 } 13866 defer googleapi.CloseBody(res) 13867 if err := googleapi.CheckResponse(res); err != nil { 13868 return nil, err 13869 } 13870 ret := &GoogleCloudDialogflowV2ListContextsResponse{ 13871 ServerResponse: googleapi.ServerResponse{ 13872 Header: res.Header, 13873 HTTPStatusCode: res.StatusCode, 13874 }, 13875 } 13876 target := &ret 13877 if err := gensupport.DecodeResponse(target, res); err != nil { 13878 return nil, err 13879 } 13880 return ret, nil 13881 // { 13882 // "description": "Returns the list of all contexts in the specified session.", 13883 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", 13884 // "httpMethod": "GET", 13885 // "id": "dialogflow.projects.agent.sessions.contexts.list", 13886 // "parameterOrder": [ 13887 // "parent" 13888 // ], 13889 // "parameters": { 13890 // "pageSize": { 13891 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 13892 // "format": "int32", 13893 // "location": "query", 13894 // "type": "integer" 13895 // }, 13896 // "pageToken": { 13897 // "description": "Optional. The next_page_token value returned from a previous list request.", 13898 // "location": "query", 13899 // "type": "string" 13900 // }, 13901 // "parent": { 13902 // "description": "Required. The session to list all contexts from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`.", 13903 // "location": "path", 13904 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 13905 // "required": true, 13906 // "type": "string" 13907 // } 13908 // }, 13909 // "path": "v2/{+parent}/contexts", 13910 // "response": { 13911 // "$ref": "GoogleCloudDialogflowV2ListContextsResponse" 13912 // }, 13913 // "scopes": [ 13914 // "https://www.googleapis.com/auth/cloud-platform", 13915 // "https://www.googleapis.com/auth/dialogflow" 13916 // ] 13917 // } 13918 13919} 13920 13921// Pages invokes f for each page of results. 13922// A non-nil error returned from f will halt the iteration. 13923// The provided context supersedes any context provided to the Context method. 13924func (c *ProjectsAgentSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListContextsResponse) error) error { 13925 c.ctx_ = ctx 13926 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13927 for { 13928 x, err := c.Do() 13929 if err != nil { 13930 return err 13931 } 13932 if err := f(x); err != nil { 13933 return err 13934 } 13935 if x.NextPageToken == "" { 13936 return nil 13937 } 13938 c.PageToken(x.NextPageToken) 13939 } 13940} 13941 13942// method id "dialogflow.projects.agent.sessions.contexts.patch": 13943 13944type ProjectsAgentSessionsContextsPatchCall struct { 13945 s *Service 13946 nameid string 13947 googleclouddialogflowv2context *GoogleCloudDialogflowV2Context 13948 urlParams_ gensupport.URLParams 13949 ctx_ context.Context 13950 header_ http.Header 13951} 13952 13953// Patch: Updates the specified context. 13954func (r *ProjectsAgentSessionsContextsService) Patch(nameid string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsAgentSessionsContextsPatchCall { 13955 c := &ProjectsAgentSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13956 c.nameid = nameid 13957 c.googleclouddialogflowv2context = googleclouddialogflowv2context 13958 return c 13959} 13960 13961// UpdateMask sets the optional parameter "updateMask": The mask to 13962// control which fields get updated. 13963func (c *ProjectsAgentSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsContextsPatchCall { 13964 c.urlParams_.Set("updateMask", updateMask) 13965 return c 13966} 13967 13968// Fields allows partial responses to be retrieved. See 13969// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13970// for more information. 13971func (c *ProjectsAgentSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsPatchCall { 13972 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13973 return c 13974} 13975 13976// Context sets the context to be used in this call's Do method. Any 13977// pending HTTP request will be aborted if the provided context is 13978// canceled. 13979func (c *ProjectsAgentSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsPatchCall { 13980 c.ctx_ = ctx 13981 return c 13982} 13983 13984// Header returns an http.Header that can be modified by the caller to 13985// add HTTP headers to the request. 13986func (c *ProjectsAgentSessionsContextsPatchCall) Header() http.Header { 13987 if c.header_ == nil { 13988 c.header_ = make(http.Header) 13989 } 13990 return c.header_ 13991} 13992 13993func (c *ProjectsAgentSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) { 13994 reqHeaders := make(http.Header) 13995 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 13996 for k, v := range c.header_ { 13997 reqHeaders[k] = v 13998 } 13999 reqHeaders.Set("User-Agent", c.s.userAgent()) 14000 var body io.Reader = nil 14001 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context) 14002 if err != nil { 14003 return nil, err 14004 } 14005 reqHeaders.Set("Content-Type", "application/json") 14006 c.urlParams_.Set("alt", alt) 14007 c.urlParams_.Set("prettyPrint", "false") 14008 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14009 urls += "?" + c.urlParams_.Encode() 14010 req, err := http.NewRequest("PATCH", urls, body) 14011 if err != nil { 14012 return nil, err 14013 } 14014 req.Header = reqHeaders 14015 googleapi.Expand(req.URL, map[string]string{ 14016 "name": c.nameid, 14017 }) 14018 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14019} 14020 14021// Do executes the "dialogflow.projects.agent.sessions.contexts.patch" call. 14022// Exactly one of *GoogleCloudDialogflowV2Context or error will be 14023// non-nil. Any non-2xx status code is an error. Response headers are in 14024// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a 14025// response was returned at all) in error.(*googleapi.Error).Header. Use 14026// googleapi.IsNotModified to check whether the returned error was 14027// because http.StatusNotModified was returned. 14028func (c *ProjectsAgentSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) { 14029 gensupport.SetOptions(c.urlParams_, opts...) 14030 res, err := c.doRequest("json") 14031 if res != nil && res.StatusCode == http.StatusNotModified { 14032 if res.Body != nil { 14033 res.Body.Close() 14034 } 14035 return nil, &googleapi.Error{ 14036 Code: res.StatusCode, 14037 Header: res.Header, 14038 } 14039 } 14040 if err != nil { 14041 return nil, err 14042 } 14043 defer googleapi.CloseBody(res) 14044 if err := googleapi.CheckResponse(res); err != nil { 14045 return nil, err 14046 } 14047 ret := &GoogleCloudDialogflowV2Context{ 14048 ServerResponse: googleapi.ServerResponse{ 14049 Header: res.Header, 14050 HTTPStatusCode: res.StatusCode, 14051 }, 14052 } 14053 target := &ret 14054 if err := gensupport.DecodeResponse(target, res); err != nil { 14055 return nil, err 14056 } 14057 return ret, nil 14058 // { 14059 // "description": "Updates the specified context.", 14060 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", 14061 // "httpMethod": "PATCH", 14062 // "id": "dialogflow.projects.agent.sessions.contexts.patch", 14063 // "parameterOrder": [ 14064 // "name" 14065 // ], 14066 // "parameters": { 14067 // "name": { 14068 // "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/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\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`", 14069 // "location": "path", 14070 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", 14071 // "required": true, 14072 // "type": "string" 14073 // }, 14074 // "updateMask": { 14075 // "description": "Optional. The mask to control which fields get updated.", 14076 // "format": "google-fieldmask", 14077 // "location": "query", 14078 // "type": "string" 14079 // } 14080 // }, 14081 // "path": "v2/{+name}", 14082 // "request": { 14083 // "$ref": "GoogleCloudDialogflowV2Context" 14084 // }, 14085 // "response": { 14086 // "$ref": "GoogleCloudDialogflowV2Context" 14087 // }, 14088 // "scopes": [ 14089 // "https://www.googleapis.com/auth/cloud-platform", 14090 // "https://www.googleapis.com/auth/dialogflow" 14091 // ] 14092 // } 14093 14094} 14095 14096// method id "dialogflow.projects.agent.sessions.entityTypes.create": 14097 14098type ProjectsAgentSessionsEntityTypesCreateCall struct { 14099 s *Service 14100 parent string 14101 googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType 14102 urlParams_ gensupport.URLParams 14103 ctx_ context.Context 14104 header_ http.Header 14105} 14106 14107// Create: Creates a session entity type. 14108// 14109// If the specified session entity type already exists, overrides the 14110// session 14111// entity type. 14112// 14113// This method doesn't work with Google Assistant integration. 14114// Contact Dialogflow support if you need to use session entities 14115// with Google Assistant integration. 14116func (r *ProjectsAgentSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsAgentSessionsEntityTypesCreateCall { 14117 c := &ProjectsAgentSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14118 c.parent = parent 14119 c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype 14120 return c 14121} 14122 14123// Fields allows partial responses to be retrieved. See 14124// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14125// for more information. 14126func (c *ProjectsAgentSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesCreateCall { 14127 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14128 return c 14129} 14130 14131// Context sets the context to be used in this call's Do method. Any 14132// pending HTTP request will be aborted if the provided context is 14133// canceled. 14134func (c *ProjectsAgentSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesCreateCall { 14135 c.ctx_ = ctx 14136 return c 14137} 14138 14139// Header returns an http.Header that can be modified by the caller to 14140// add HTTP headers to the request. 14141func (c *ProjectsAgentSessionsEntityTypesCreateCall) Header() http.Header { 14142 if c.header_ == nil { 14143 c.header_ = make(http.Header) 14144 } 14145 return c.header_ 14146} 14147 14148func (c *ProjectsAgentSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { 14149 reqHeaders := make(http.Header) 14150 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 14151 for k, v := range c.header_ { 14152 reqHeaders[k] = v 14153 } 14154 reqHeaders.Set("User-Agent", c.s.userAgent()) 14155 var body io.Reader = nil 14156 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype) 14157 if err != nil { 14158 return nil, err 14159 } 14160 reqHeaders.Set("Content-Type", "application/json") 14161 c.urlParams_.Set("alt", alt) 14162 c.urlParams_.Set("prettyPrint", "false") 14163 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes") 14164 urls += "?" + c.urlParams_.Encode() 14165 req, err := http.NewRequest("POST", urls, body) 14166 if err != nil { 14167 return nil, err 14168 } 14169 req.Header = reqHeaders 14170 googleapi.Expand(req.URL, map[string]string{ 14171 "parent": c.parent, 14172 }) 14173 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14174} 14175 14176// Do executes the "dialogflow.projects.agent.sessions.entityTypes.create" call. 14177// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error 14178// will be non-nil. Any non-2xx status code is an error. Response 14179// headers are in either 14180// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or 14181// (if a response was returned at all) in 14182// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14183// whether the returned error was because http.StatusNotModified was 14184// returned. 14185func (c *ProjectsAgentSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) { 14186 gensupport.SetOptions(c.urlParams_, opts...) 14187 res, err := c.doRequest("json") 14188 if res != nil && res.StatusCode == http.StatusNotModified { 14189 if res.Body != nil { 14190 res.Body.Close() 14191 } 14192 return nil, &googleapi.Error{ 14193 Code: res.StatusCode, 14194 Header: res.Header, 14195 } 14196 } 14197 if err != nil { 14198 return nil, err 14199 } 14200 defer googleapi.CloseBody(res) 14201 if err := googleapi.CheckResponse(res); err != nil { 14202 return nil, err 14203 } 14204 ret := &GoogleCloudDialogflowV2SessionEntityType{ 14205 ServerResponse: googleapi.ServerResponse{ 14206 Header: res.Header, 14207 HTTPStatusCode: res.StatusCode, 14208 }, 14209 } 14210 target := &ret 14211 if err := gensupport.DecodeResponse(target, res); err != nil { 14212 return nil, err 14213 } 14214 return ret, nil 14215 // { 14216 // "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.", 14217 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes", 14218 // "httpMethod": "POST", 14219 // "id": "dialogflow.projects.agent.sessions.entityTypes.create", 14220 // "parameterOrder": [ 14221 // "parent" 14222 // ], 14223 // "parameters": { 14224 // "parent": { 14225 // "description": "Required. The session to create a session entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`.", 14226 // "location": "path", 14227 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 14228 // "required": true, 14229 // "type": "string" 14230 // } 14231 // }, 14232 // "path": "v2/{+parent}/entityTypes", 14233 // "request": { 14234 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 14235 // }, 14236 // "response": { 14237 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 14238 // }, 14239 // "scopes": [ 14240 // "https://www.googleapis.com/auth/cloud-platform", 14241 // "https://www.googleapis.com/auth/dialogflow" 14242 // ] 14243 // } 14244 14245} 14246 14247// method id "dialogflow.projects.agent.sessions.entityTypes.delete": 14248 14249type ProjectsAgentSessionsEntityTypesDeleteCall struct { 14250 s *Service 14251 name string 14252 urlParams_ gensupport.URLParams 14253 ctx_ context.Context 14254 header_ http.Header 14255} 14256 14257// Delete: Deletes the specified session entity type. 14258// 14259// This method doesn't work with Google Assistant integration. 14260// Contact Dialogflow support if you need to use session entities 14261// with Google Assistant integration. 14262func (r *ProjectsAgentSessionsEntityTypesService) Delete(name string) *ProjectsAgentSessionsEntityTypesDeleteCall { 14263 c := &ProjectsAgentSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14264 c.name = name 14265 return c 14266} 14267 14268// Fields allows partial responses to be retrieved. See 14269// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14270// for more information. 14271func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesDeleteCall { 14272 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14273 return c 14274} 14275 14276// Context sets the context to be used in this call's Do method. Any 14277// pending HTTP request will be aborted if the provided context is 14278// canceled. 14279func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesDeleteCall { 14280 c.ctx_ = ctx 14281 return c 14282} 14283 14284// Header returns an http.Header that can be modified by the caller to 14285// add HTTP headers to the request. 14286func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Header() http.Header { 14287 if c.header_ == nil { 14288 c.header_ = make(http.Header) 14289 } 14290 return c.header_ 14291} 14292 14293func (c *ProjectsAgentSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 14294 reqHeaders := make(http.Header) 14295 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 14296 for k, v := range c.header_ { 14297 reqHeaders[k] = v 14298 } 14299 reqHeaders.Set("User-Agent", c.s.userAgent()) 14300 var body io.Reader = nil 14301 c.urlParams_.Set("alt", alt) 14302 c.urlParams_.Set("prettyPrint", "false") 14303 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14304 urls += "?" + c.urlParams_.Encode() 14305 req, err := http.NewRequest("DELETE", urls, body) 14306 if err != nil { 14307 return nil, err 14308 } 14309 req.Header = reqHeaders 14310 googleapi.Expand(req.URL, map[string]string{ 14311 "name": c.name, 14312 }) 14313 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14314} 14315 14316// Do executes the "dialogflow.projects.agent.sessions.entityTypes.delete" call. 14317// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14318// non-2xx status code is an error. Response headers are in either 14319// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14320// returned at all) in error.(*googleapi.Error).Header. Use 14321// googleapi.IsNotModified to check whether the returned error was 14322// because http.StatusNotModified was returned. 14323func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14324 gensupport.SetOptions(c.urlParams_, opts...) 14325 res, err := c.doRequest("json") 14326 if res != nil && res.StatusCode == http.StatusNotModified { 14327 if res.Body != nil { 14328 res.Body.Close() 14329 } 14330 return nil, &googleapi.Error{ 14331 Code: res.StatusCode, 14332 Header: res.Header, 14333 } 14334 } 14335 if err != nil { 14336 return nil, err 14337 } 14338 defer googleapi.CloseBody(res) 14339 if err := googleapi.CheckResponse(res); err != nil { 14340 return nil, err 14341 } 14342 ret := &GoogleProtobufEmpty{ 14343 ServerResponse: googleapi.ServerResponse{ 14344 Header: res.Header, 14345 HTTPStatusCode: res.StatusCode, 14346 }, 14347 } 14348 target := &ret 14349 if err := gensupport.DecodeResponse(target, res); err != nil { 14350 return nil, err 14351 } 14352 return ret, nil 14353 // { 14354 // "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.", 14355 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", 14356 // "httpMethod": "DELETE", 14357 // "id": "dialogflow.projects.agent.sessions.entityTypes.delete", 14358 // "parameterOrder": [ 14359 // "name" 14360 // ], 14361 // "parameters": { 14362 // "name": { 14363 // "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`.", 14364 // "location": "path", 14365 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", 14366 // "required": true, 14367 // "type": "string" 14368 // } 14369 // }, 14370 // "path": "v2/{+name}", 14371 // "response": { 14372 // "$ref": "GoogleProtobufEmpty" 14373 // }, 14374 // "scopes": [ 14375 // "https://www.googleapis.com/auth/cloud-platform", 14376 // "https://www.googleapis.com/auth/dialogflow" 14377 // ] 14378 // } 14379 14380} 14381 14382// method id "dialogflow.projects.agent.sessions.entityTypes.get": 14383 14384type ProjectsAgentSessionsEntityTypesGetCall struct { 14385 s *Service 14386 name string 14387 urlParams_ gensupport.URLParams 14388 ifNoneMatch_ string 14389 ctx_ context.Context 14390 header_ http.Header 14391} 14392 14393// Get: Retrieves the specified session entity type. 14394// 14395// This method doesn't work with Google Assistant integration. 14396// Contact Dialogflow support if you need to use session entities 14397// with Google Assistant integration. 14398func (r *ProjectsAgentSessionsEntityTypesService) Get(name string) *ProjectsAgentSessionsEntityTypesGetCall { 14399 c := &ProjectsAgentSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14400 c.name = name 14401 return c 14402} 14403 14404// Fields allows partial responses to be retrieved. See 14405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14406// for more information. 14407func (c *ProjectsAgentSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesGetCall { 14408 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14409 return c 14410} 14411 14412// IfNoneMatch sets the optional parameter which makes the operation 14413// fail if the object's ETag matches the given value. This is useful for 14414// getting updates only after the object has changed since the last 14415// request. Use googleapi.IsNotModified to check whether the response 14416// error from Do is the result of In-None-Match. 14417func (c *ProjectsAgentSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesGetCall { 14418 c.ifNoneMatch_ = entityTag 14419 return c 14420} 14421 14422// Context sets the context to be used in this call's Do method. Any 14423// pending HTTP request will be aborted if the provided context is 14424// canceled. 14425func (c *ProjectsAgentSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesGetCall { 14426 c.ctx_ = ctx 14427 return c 14428} 14429 14430// Header returns an http.Header that can be modified by the caller to 14431// add HTTP headers to the request. 14432func (c *ProjectsAgentSessionsEntityTypesGetCall) Header() http.Header { 14433 if c.header_ == nil { 14434 c.header_ = make(http.Header) 14435 } 14436 return c.header_ 14437} 14438 14439func (c *ProjectsAgentSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { 14440 reqHeaders := make(http.Header) 14441 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 14442 for k, v := range c.header_ { 14443 reqHeaders[k] = v 14444 } 14445 reqHeaders.Set("User-Agent", c.s.userAgent()) 14446 if c.ifNoneMatch_ != "" { 14447 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14448 } 14449 var body io.Reader = nil 14450 c.urlParams_.Set("alt", alt) 14451 c.urlParams_.Set("prettyPrint", "false") 14452 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14453 urls += "?" + c.urlParams_.Encode() 14454 req, err := http.NewRequest("GET", urls, body) 14455 if err != nil { 14456 return nil, err 14457 } 14458 req.Header = reqHeaders 14459 googleapi.Expand(req.URL, map[string]string{ 14460 "name": c.name, 14461 }) 14462 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14463} 14464 14465// Do executes the "dialogflow.projects.agent.sessions.entityTypes.get" call. 14466// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error 14467// will be non-nil. Any non-2xx status code is an error. Response 14468// headers are in either 14469// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or 14470// (if a response was returned at all) in 14471// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14472// whether the returned error was because http.StatusNotModified was 14473// returned. 14474func (c *ProjectsAgentSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) { 14475 gensupport.SetOptions(c.urlParams_, opts...) 14476 res, err := c.doRequest("json") 14477 if res != nil && res.StatusCode == http.StatusNotModified { 14478 if res.Body != nil { 14479 res.Body.Close() 14480 } 14481 return nil, &googleapi.Error{ 14482 Code: res.StatusCode, 14483 Header: res.Header, 14484 } 14485 } 14486 if err != nil { 14487 return nil, err 14488 } 14489 defer googleapi.CloseBody(res) 14490 if err := googleapi.CheckResponse(res); err != nil { 14491 return nil, err 14492 } 14493 ret := &GoogleCloudDialogflowV2SessionEntityType{ 14494 ServerResponse: googleapi.ServerResponse{ 14495 Header: res.Header, 14496 HTTPStatusCode: res.StatusCode, 14497 }, 14498 } 14499 target := &ret 14500 if err := gensupport.DecodeResponse(target, res); err != nil { 14501 return nil, err 14502 } 14503 return ret, nil 14504 // { 14505 // "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.", 14506 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", 14507 // "httpMethod": "GET", 14508 // "id": "dialogflow.projects.agent.sessions.entityTypes.get", 14509 // "parameterOrder": [ 14510 // "name" 14511 // ], 14512 // "parameters": { 14513 // "name": { 14514 // "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`.", 14515 // "location": "path", 14516 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", 14517 // "required": true, 14518 // "type": "string" 14519 // } 14520 // }, 14521 // "path": "v2/{+name}", 14522 // "response": { 14523 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 14524 // }, 14525 // "scopes": [ 14526 // "https://www.googleapis.com/auth/cloud-platform", 14527 // "https://www.googleapis.com/auth/dialogflow" 14528 // ] 14529 // } 14530 14531} 14532 14533// method id "dialogflow.projects.agent.sessions.entityTypes.list": 14534 14535type ProjectsAgentSessionsEntityTypesListCall struct { 14536 s *Service 14537 parent string 14538 urlParams_ gensupport.URLParams 14539 ifNoneMatch_ string 14540 ctx_ context.Context 14541 header_ http.Header 14542} 14543 14544// List: Returns the list of all session entity types in the specified 14545// session. 14546// 14547// This method doesn't work with Google Assistant integration. 14548// Contact Dialogflow support if you need to use session entities 14549// with Google Assistant integration. 14550func (r *ProjectsAgentSessionsEntityTypesService) List(parent string) *ProjectsAgentSessionsEntityTypesListCall { 14551 c := &ProjectsAgentSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14552 c.parent = parent 14553 return c 14554} 14555 14556// PageSize sets the optional parameter "pageSize": The maximum number 14557// of items to return in a single page. By 14558// default 100 and at most 1000. 14559func (c *ProjectsAgentSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentSessionsEntityTypesListCall { 14560 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14561 return c 14562} 14563 14564// PageToken sets the optional parameter "pageToken": The 14565// next_page_token value returned from a previous list request. 14566func (c *ProjectsAgentSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentSessionsEntityTypesListCall { 14567 c.urlParams_.Set("pageToken", pageToken) 14568 return c 14569} 14570 14571// Fields allows partial responses to be retrieved. See 14572// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14573// for more information. 14574func (c *ProjectsAgentSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesListCall { 14575 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14576 return c 14577} 14578 14579// IfNoneMatch sets the optional parameter which makes the operation 14580// fail if the object's ETag matches the given value. This is useful for 14581// getting updates only after the object has changed since the last 14582// request. Use googleapi.IsNotModified to check whether the response 14583// error from Do is the result of In-None-Match. 14584func (c *ProjectsAgentSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesListCall { 14585 c.ifNoneMatch_ = entityTag 14586 return c 14587} 14588 14589// Context sets the context to be used in this call's Do method. Any 14590// pending HTTP request will be aborted if the provided context is 14591// canceled. 14592func (c *ProjectsAgentSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesListCall { 14593 c.ctx_ = ctx 14594 return c 14595} 14596 14597// Header returns an http.Header that can be modified by the caller to 14598// add HTTP headers to the request. 14599func (c *ProjectsAgentSessionsEntityTypesListCall) Header() http.Header { 14600 if c.header_ == nil { 14601 c.header_ = make(http.Header) 14602 } 14603 return c.header_ 14604} 14605 14606func (c *ProjectsAgentSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) { 14607 reqHeaders := make(http.Header) 14608 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 14609 for k, v := range c.header_ { 14610 reqHeaders[k] = v 14611 } 14612 reqHeaders.Set("User-Agent", c.s.userAgent()) 14613 if c.ifNoneMatch_ != "" { 14614 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14615 } 14616 var body io.Reader = nil 14617 c.urlParams_.Set("alt", alt) 14618 c.urlParams_.Set("prettyPrint", "false") 14619 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes") 14620 urls += "?" + c.urlParams_.Encode() 14621 req, err := http.NewRequest("GET", urls, body) 14622 if err != nil { 14623 return nil, err 14624 } 14625 req.Header = reqHeaders 14626 googleapi.Expand(req.URL, map[string]string{ 14627 "parent": c.parent, 14628 }) 14629 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14630} 14631 14632// Do executes the "dialogflow.projects.agent.sessions.entityTypes.list" call. 14633// Exactly one of *GoogleCloudDialogflowV2ListSessionEntityTypesResponse 14634// or error will be non-nil. Any non-2xx status code is an error. 14635// Response headers are in either 14636// *GoogleCloudDialogflowV2ListSessionEntityTypesResponse.ServerResponse. 14637// Header or (if a response was returned at all) in 14638// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14639// whether the returned error was because http.StatusNotModified was 14640// returned. 14641func (c *ProjectsAgentSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListSessionEntityTypesResponse, error) { 14642 gensupport.SetOptions(c.urlParams_, opts...) 14643 res, err := c.doRequest("json") 14644 if res != nil && res.StatusCode == http.StatusNotModified { 14645 if res.Body != nil { 14646 res.Body.Close() 14647 } 14648 return nil, &googleapi.Error{ 14649 Code: res.StatusCode, 14650 Header: res.Header, 14651 } 14652 } 14653 if err != nil { 14654 return nil, err 14655 } 14656 defer googleapi.CloseBody(res) 14657 if err := googleapi.CheckResponse(res); err != nil { 14658 return nil, err 14659 } 14660 ret := &GoogleCloudDialogflowV2ListSessionEntityTypesResponse{ 14661 ServerResponse: googleapi.ServerResponse{ 14662 Header: res.Header, 14663 HTTPStatusCode: res.StatusCode, 14664 }, 14665 } 14666 target := &ret 14667 if err := gensupport.DecodeResponse(target, res); err != nil { 14668 return nil, err 14669 } 14670 return ret, nil 14671 // { 14672 // "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.", 14673 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes", 14674 // "httpMethod": "GET", 14675 // "id": "dialogflow.projects.agent.sessions.entityTypes.list", 14676 // "parameterOrder": [ 14677 // "parent" 14678 // ], 14679 // "parameters": { 14680 // "pageSize": { 14681 // "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.", 14682 // "format": "int32", 14683 // "location": "query", 14684 // "type": "integer" 14685 // }, 14686 // "pageToken": { 14687 // "description": "Optional. The next_page_token value returned from a previous list request.", 14688 // "location": "query", 14689 // "type": "string" 14690 // }, 14691 // "parent": { 14692 // "description": "Required. The session to list all session entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`.", 14693 // "location": "path", 14694 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", 14695 // "required": true, 14696 // "type": "string" 14697 // } 14698 // }, 14699 // "path": "v2/{+parent}/entityTypes", 14700 // "response": { 14701 // "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse" 14702 // }, 14703 // "scopes": [ 14704 // "https://www.googleapis.com/auth/cloud-platform", 14705 // "https://www.googleapis.com/auth/dialogflow" 14706 // ] 14707 // } 14708 14709} 14710 14711// Pages invokes f for each page of results. 14712// A non-nil error returned from f will halt the iteration. 14713// The provided context supersedes any context provided to the Context method. 14714func (c *ProjectsAgentSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListSessionEntityTypesResponse) error) error { 14715 c.ctx_ = ctx 14716 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14717 for { 14718 x, err := c.Do() 14719 if err != nil { 14720 return err 14721 } 14722 if err := f(x); err != nil { 14723 return err 14724 } 14725 if x.NextPageToken == "" { 14726 return nil 14727 } 14728 c.PageToken(x.NextPageToken) 14729 } 14730} 14731 14732// method id "dialogflow.projects.agent.sessions.entityTypes.patch": 14733 14734type ProjectsAgentSessionsEntityTypesPatchCall struct { 14735 s *Service 14736 nameid string 14737 googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType 14738 urlParams_ gensupport.URLParams 14739 ctx_ context.Context 14740 header_ http.Header 14741} 14742 14743// Patch: Updates the specified session entity type. 14744// 14745// This method doesn't work with Google Assistant integration. 14746// Contact Dialogflow support if you need to use session entities 14747// with Google Assistant integration. 14748func (r *ProjectsAgentSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsAgentSessionsEntityTypesPatchCall { 14749 c := &ProjectsAgentSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14750 c.nameid = nameid 14751 c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype 14752 return c 14753} 14754 14755// UpdateMask sets the optional parameter "updateMask": The mask to 14756// control which fields get updated. 14757func (c *ProjectsAgentSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsEntityTypesPatchCall { 14758 c.urlParams_.Set("updateMask", updateMask) 14759 return c 14760} 14761 14762// Fields allows partial responses to be retrieved. See 14763// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14764// for more information. 14765func (c *ProjectsAgentSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesPatchCall { 14766 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14767 return c 14768} 14769 14770// Context sets the context to be used in this call's Do method. Any 14771// pending HTTP request will be aborted if the provided context is 14772// canceled. 14773func (c *ProjectsAgentSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesPatchCall { 14774 c.ctx_ = ctx 14775 return c 14776} 14777 14778// Header returns an http.Header that can be modified by the caller to 14779// add HTTP headers to the request. 14780func (c *ProjectsAgentSessionsEntityTypesPatchCall) Header() http.Header { 14781 if c.header_ == nil { 14782 c.header_ = make(http.Header) 14783 } 14784 return c.header_ 14785} 14786 14787func (c *ProjectsAgentSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { 14788 reqHeaders := make(http.Header) 14789 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 14790 for k, v := range c.header_ { 14791 reqHeaders[k] = v 14792 } 14793 reqHeaders.Set("User-Agent", c.s.userAgent()) 14794 var body io.Reader = nil 14795 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype) 14796 if err != nil { 14797 return nil, err 14798 } 14799 reqHeaders.Set("Content-Type", "application/json") 14800 c.urlParams_.Set("alt", alt) 14801 c.urlParams_.Set("prettyPrint", "false") 14802 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14803 urls += "?" + c.urlParams_.Encode() 14804 req, err := http.NewRequest("PATCH", urls, body) 14805 if err != nil { 14806 return nil, err 14807 } 14808 req.Header = reqHeaders 14809 googleapi.Expand(req.URL, map[string]string{ 14810 "name": c.nameid, 14811 }) 14812 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14813} 14814 14815// Do executes the "dialogflow.projects.agent.sessions.entityTypes.patch" call. 14816// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error 14817// will be non-nil. Any non-2xx status code is an error. Response 14818// headers are in either 14819// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or 14820// (if a response was returned at all) in 14821// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14822// whether the returned error was because http.StatusNotModified was 14823// returned. 14824func (c *ProjectsAgentSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) { 14825 gensupport.SetOptions(c.urlParams_, opts...) 14826 res, err := c.doRequest("json") 14827 if res != nil && res.StatusCode == http.StatusNotModified { 14828 if res.Body != nil { 14829 res.Body.Close() 14830 } 14831 return nil, &googleapi.Error{ 14832 Code: res.StatusCode, 14833 Header: res.Header, 14834 } 14835 } 14836 if err != nil { 14837 return nil, err 14838 } 14839 defer googleapi.CloseBody(res) 14840 if err := googleapi.CheckResponse(res); err != nil { 14841 return nil, err 14842 } 14843 ret := &GoogleCloudDialogflowV2SessionEntityType{ 14844 ServerResponse: googleapi.ServerResponse{ 14845 Header: res.Header, 14846 HTTPStatusCode: res.StatusCode, 14847 }, 14848 } 14849 target := &ret 14850 if err := gensupport.DecodeResponse(target, res); err != nil { 14851 return nil, err 14852 } 14853 return ret, nil 14854 // { 14855 // "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.", 14856 // "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", 14857 // "httpMethod": "PATCH", 14858 // "id": "dialogflow.projects.agent.sessions.entityTypes.patch", 14859 // "parameterOrder": [ 14860 // "name" 14861 // ], 14862 // "parameters": { 14863 // "name": { 14864 // "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`.\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.", 14865 // "location": "path", 14866 // "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", 14867 // "required": true, 14868 // "type": "string" 14869 // }, 14870 // "updateMask": { 14871 // "description": "Optional. The mask to control which fields get updated.", 14872 // "format": "google-fieldmask", 14873 // "location": "query", 14874 // "type": "string" 14875 // } 14876 // }, 14877 // "path": "v2/{+name}", 14878 // "request": { 14879 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 14880 // }, 14881 // "response": { 14882 // "$ref": "GoogleCloudDialogflowV2SessionEntityType" 14883 // }, 14884 // "scopes": [ 14885 // "https://www.googleapis.com/auth/cloud-platform", 14886 // "https://www.googleapis.com/auth/dialogflow" 14887 // ] 14888 // } 14889 14890} 14891 14892// method id "dialogflow.projects.locations.operations.cancel": 14893 14894type ProjectsLocationsOperationsCancelCall struct { 14895 s *Service 14896 name string 14897 urlParams_ gensupport.URLParams 14898 ctx_ context.Context 14899 header_ http.Header 14900} 14901 14902// Cancel: Starts asynchronous cancellation on a long-running operation. 14903// The server 14904// makes a best effort to cancel the operation, but success is 14905// not 14906// guaranteed. If the server doesn't support this method, it 14907// returns 14908// `google.rpc.Code.UNIMPLEMENTED`. Clients can 14909// use 14910// Operations.GetOperation or 14911// other methods to check whether the cancellation succeeded or whether 14912// the 14913// operation completed despite cancellation. On successful 14914// cancellation, 14915// the operation is not deleted; instead, it becomes an operation 14916// with 14917// an Operation.error value with a google.rpc.Status.code of 14918// 1, 14919// corresponding to `Code.CANCELLED`. 14920func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { 14921 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14922 c.name = name 14923 return c 14924} 14925 14926// Fields allows partial responses to be retrieved. See 14927// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14928// for more information. 14929func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 14930 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14931 return c 14932} 14933 14934// Context sets the context to be used in this call's Do method. Any 14935// pending HTTP request will be aborted if the provided context is 14936// canceled. 14937func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 14938 c.ctx_ = ctx 14939 return c 14940} 14941 14942// Header returns an http.Header that can be modified by the caller to 14943// add HTTP headers to the request. 14944func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 14945 if c.header_ == nil { 14946 c.header_ = make(http.Header) 14947 } 14948 return c.header_ 14949} 14950 14951func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 14952 reqHeaders := make(http.Header) 14953 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 14954 for k, v := range c.header_ { 14955 reqHeaders[k] = v 14956 } 14957 reqHeaders.Set("User-Agent", c.s.userAgent()) 14958 var body io.Reader = nil 14959 c.urlParams_.Set("alt", alt) 14960 c.urlParams_.Set("prettyPrint", "false") 14961 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 14962 urls += "?" + c.urlParams_.Encode() 14963 req, err := http.NewRequest("POST", urls, body) 14964 if err != nil { 14965 return nil, err 14966 } 14967 req.Header = reqHeaders 14968 googleapi.Expand(req.URL, map[string]string{ 14969 "name": c.name, 14970 }) 14971 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14972} 14973 14974// Do executes the "dialogflow.projects.locations.operations.cancel" call. 14975// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14976// non-2xx status code is an error. Response headers are in either 14977// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14978// returned at all) in error.(*googleapi.Error).Header. Use 14979// googleapi.IsNotModified to check whether the returned error was 14980// because http.StatusNotModified was returned. 14981func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14982 gensupport.SetOptions(c.urlParams_, opts...) 14983 res, err := c.doRequest("json") 14984 if res != nil && res.StatusCode == http.StatusNotModified { 14985 if res.Body != nil { 14986 res.Body.Close() 14987 } 14988 return nil, &googleapi.Error{ 14989 Code: res.StatusCode, 14990 Header: res.Header, 14991 } 14992 } 14993 if err != nil { 14994 return nil, err 14995 } 14996 defer googleapi.CloseBody(res) 14997 if err := googleapi.CheckResponse(res); err != nil { 14998 return nil, err 14999 } 15000 ret := &GoogleProtobufEmpty{ 15001 ServerResponse: googleapi.ServerResponse{ 15002 Header: res.Header, 15003 HTTPStatusCode: res.StatusCode, 15004 }, 15005 } 15006 target := &ret 15007 if err := gensupport.DecodeResponse(target, res); err != nil { 15008 return nil, err 15009 } 15010 return ret, nil 15011 // { 15012 // "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`.", 15013 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", 15014 // "httpMethod": "POST", 15015 // "id": "dialogflow.projects.locations.operations.cancel", 15016 // "parameterOrder": [ 15017 // "name" 15018 // ], 15019 // "parameters": { 15020 // "name": { 15021 // "description": "The name of the operation resource to be cancelled.", 15022 // "location": "path", 15023 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 15024 // "required": true, 15025 // "type": "string" 15026 // } 15027 // }, 15028 // "path": "v2/{+name}:cancel", 15029 // "response": { 15030 // "$ref": "GoogleProtobufEmpty" 15031 // }, 15032 // "scopes": [ 15033 // "https://www.googleapis.com/auth/cloud-platform", 15034 // "https://www.googleapis.com/auth/dialogflow" 15035 // ] 15036 // } 15037 15038} 15039 15040// method id "dialogflow.projects.locations.operations.get": 15041 15042type ProjectsLocationsOperationsGetCall struct { 15043 s *Service 15044 name string 15045 urlParams_ gensupport.URLParams 15046 ifNoneMatch_ string 15047 ctx_ context.Context 15048 header_ http.Header 15049} 15050 15051// Get: Gets the latest state of a long-running operation. Clients can 15052// use this 15053// method to poll the operation result at intervals as recommended by 15054// the API 15055// service. 15056func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 15057 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15058 c.name = name 15059 return c 15060} 15061 15062// Fields allows partial responses to be retrieved. See 15063// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15064// for more information. 15065func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 15066 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15067 return c 15068} 15069 15070// IfNoneMatch sets the optional parameter which makes the operation 15071// fail if the object's ETag matches the given value. This is useful for 15072// getting updates only after the object has changed since the last 15073// request. Use googleapi.IsNotModified to check whether the response 15074// error from Do is the result of In-None-Match. 15075func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 15076 c.ifNoneMatch_ = entityTag 15077 return c 15078} 15079 15080// Context sets the context to be used in this call's Do method. Any 15081// pending HTTP request will be aborted if the provided context is 15082// canceled. 15083func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 15084 c.ctx_ = ctx 15085 return c 15086} 15087 15088// Header returns an http.Header that can be modified by the caller to 15089// add HTTP headers to the request. 15090func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 15091 if c.header_ == nil { 15092 c.header_ = make(http.Header) 15093 } 15094 return c.header_ 15095} 15096 15097func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 15098 reqHeaders := make(http.Header) 15099 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 15100 for k, v := range c.header_ { 15101 reqHeaders[k] = v 15102 } 15103 reqHeaders.Set("User-Agent", c.s.userAgent()) 15104 if c.ifNoneMatch_ != "" { 15105 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15106 } 15107 var body io.Reader = nil 15108 c.urlParams_.Set("alt", alt) 15109 c.urlParams_.Set("prettyPrint", "false") 15110 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15111 urls += "?" + c.urlParams_.Encode() 15112 req, err := http.NewRequest("GET", urls, body) 15113 if err != nil { 15114 return nil, err 15115 } 15116 req.Header = reqHeaders 15117 googleapi.Expand(req.URL, map[string]string{ 15118 "name": c.name, 15119 }) 15120 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15121} 15122 15123// Do executes the "dialogflow.projects.locations.operations.get" call. 15124// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 15125// Any non-2xx status code is an error. Response headers are in either 15126// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 15127// was returned at all) in error.(*googleapi.Error).Header. Use 15128// googleapi.IsNotModified to check whether the returned error was 15129// because http.StatusNotModified was returned. 15130func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 15131 gensupport.SetOptions(c.urlParams_, opts...) 15132 res, err := c.doRequest("json") 15133 if res != nil && res.StatusCode == http.StatusNotModified { 15134 if res.Body != nil { 15135 res.Body.Close() 15136 } 15137 return nil, &googleapi.Error{ 15138 Code: res.StatusCode, 15139 Header: res.Header, 15140 } 15141 } 15142 if err != nil { 15143 return nil, err 15144 } 15145 defer googleapi.CloseBody(res) 15146 if err := googleapi.CheckResponse(res); err != nil { 15147 return nil, err 15148 } 15149 ret := &GoogleLongrunningOperation{ 15150 ServerResponse: googleapi.ServerResponse{ 15151 Header: res.Header, 15152 HTTPStatusCode: res.StatusCode, 15153 }, 15154 } 15155 target := &ret 15156 if err := gensupport.DecodeResponse(target, res); err != nil { 15157 return nil, err 15158 } 15159 return ret, nil 15160 // { 15161 // "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.", 15162 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", 15163 // "httpMethod": "GET", 15164 // "id": "dialogflow.projects.locations.operations.get", 15165 // "parameterOrder": [ 15166 // "name" 15167 // ], 15168 // "parameters": { 15169 // "name": { 15170 // "description": "The name of the operation resource.", 15171 // "location": "path", 15172 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 15173 // "required": true, 15174 // "type": "string" 15175 // } 15176 // }, 15177 // "path": "v2/{+name}", 15178 // "response": { 15179 // "$ref": "GoogleLongrunningOperation" 15180 // }, 15181 // "scopes": [ 15182 // "https://www.googleapis.com/auth/cloud-platform", 15183 // "https://www.googleapis.com/auth/dialogflow" 15184 // ] 15185 // } 15186 15187} 15188 15189// method id "dialogflow.projects.locations.operations.list": 15190 15191type ProjectsLocationsOperationsListCall struct { 15192 s *Service 15193 name string 15194 urlParams_ gensupport.URLParams 15195 ifNoneMatch_ string 15196 ctx_ context.Context 15197 header_ http.Header 15198} 15199 15200// List: Lists operations that match the specified filter in the 15201// request. If the 15202// server doesn't support this method, it returns 15203// `UNIMPLEMENTED`. 15204// 15205// NOTE: the `name` binding allows API services to override the 15206// binding 15207// to use different resource name schemes, such as `users/*/operations`. 15208// To 15209// override the binding, API services can add a binding such 15210// as 15211// "/v1/{name=users/*}/operations" to their service configuration. 15212// For backwards compatibility, the default name includes the 15213// operations 15214// collection id, however overriding users must ensure the name 15215// binding 15216// is the parent resource, without the operations collection id. 15217func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { 15218 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15219 c.name = name 15220 return c 15221} 15222 15223// Filter sets the optional parameter "filter": The standard list 15224// filter. 15225func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { 15226 c.urlParams_.Set("filter", filter) 15227 return c 15228} 15229 15230// PageSize sets the optional parameter "pageSize": The standard list 15231// page size. 15232func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { 15233 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15234 return c 15235} 15236 15237// PageToken sets the optional parameter "pageToken": The standard list 15238// page token. 15239func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { 15240 c.urlParams_.Set("pageToken", pageToken) 15241 return c 15242} 15243 15244// Fields allows partial responses to be retrieved. See 15245// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15246// for more information. 15247func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 15248 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15249 return c 15250} 15251 15252// IfNoneMatch sets the optional parameter which makes the operation 15253// fail if the object's ETag matches the given value. This is useful for 15254// getting updates only after the object has changed since the last 15255// request. Use googleapi.IsNotModified to check whether the response 15256// error from Do is the result of In-None-Match. 15257func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 15258 c.ifNoneMatch_ = entityTag 15259 return c 15260} 15261 15262// Context sets the context to be used in this call's Do method. Any 15263// pending HTTP request will be aborted if the provided context is 15264// canceled. 15265func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 15266 c.ctx_ = ctx 15267 return c 15268} 15269 15270// Header returns an http.Header that can be modified by the caller to 15271// add HTTP headers to the request. 15272func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 15273 if c.header_ == nil { 15274 c.header_ = make(http.Header) 15275 } 15276 return c.header_ 15277} 15278 15279func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 15280 reqHeaders := make(http.Header) 15281 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 15282 for k, v := range c.header_ { 15283 reqHeaders[k] = v 15284 } 15285 reqHeaders.Set("User-Agent", c.s.userAgent()) 15286 if c.ifNoneMatch_ != "" { 15287 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15288 } 15289 var body io.Reader = nil 15290 c.urlParams_.Set("alt", alt) 15291 c.urlParams_.Set("prettyPrint", "false") 15292 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") 15293 urls += "?" + c.urlParams_.Encode() 15294 req, err := http.NewRequest("GET", urls, body) 15295 if err != nil { 15296 return nil, err 15297 } 15298 req.Header = reqHeaders 15299 googleapi.Expand(req.URL, map[string]string{ 15300 "name": c.name, 15301 }) 15302 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15303} 15304 15305// Do executes the "dialogflow.projects.locations.operations.list" call. 15306// Exactly one of *GoogleLongrunningListOperationsResponse or error will 15307// be non-nil. Any non-2xx status code is an error. Response headers are 15308// in either 15309// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if 15310// a response was returned at all) in error.(*googleapi.Error).Header. 15311// Use googleapi.IsNotModified to check whether the returned error was 15312// because http.StatusNotModified was returned. 15313func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { 15314 gensupport.SetOptions(c.urlParams_, opts...) 15315 res, err := c.doRequest("json") 15316 if res != nil && res.StatusCode == http.StatusNotModified { 15317 if res.Body != nil { 15318 res.Body.Close() 15319 } 15320 return nil, &googleapi.Error{ 15321 Code: res.StatusCode, 15322 Header: res.Header, 15323 } 15324 } 15325 if err != nil { 15326 return nil, err 15327 } 15328 defer googleapi.CloseBody(res) 15329 if err := googleapi.CheckResponse(res); err != nil { 15330 return nil, err 15331 } 15332 ret := &GoogleLongrunningListOperationsResponse{ 15333 ServerResponse: googleapi.ServerResponse{ 15334 Header: res.Header, 15335 HTTPStatusCode: res.StatusCode, 15336 }, 15337 } 15338 target := &ret 15339 if err := gensupport.DecodeResponse(target, res); err != nil { 15340 return nil, err 15341 } 15342 return ret, nil 15343 // { 15344 // "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.", 15345 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations", 15346 // "httpMethod": "GET", 15347 // "id": "dialogflow.projects.locations.operations.list", 15348 // "parameterOrder": [ 15349 // "name" 15350 // ], 15351 // "parameters": { 15352 // "filter": { 15353 // "description": "The standard list filter.", 15354 // "location": "query", 15355 // "type": "string" 15356 // }, 15357 // "name": { 15358 // "description": "The name of the operation's parent resource.", 15359 // "location": "path", 15360 // "pattern": "^projects/[^/]+/locations/[^/]+$", 15361 // "required": true, 15362 // "type": "string" 15363 // }, 15364 // "pageSize": { 15365 // "description": "The standard list page size.", 15366 // "format": "int32", 15367 // "location": "query", 15368 // "type": "integer" 15369 // }, 15370 // "pageToken": { 15371 // "description": "The standard list page token.", 15372 // "location": "query", 15373 // "type": "string" 15374 // } 15375 // }, 15376 // "path": "v2/{+name}/operations", 15377 // "response": { 15378 // "$ref": "GoogleLongrunningListOperationsResponse" 15379 // }, 15380 // "scopes": [ 15381 // "https://www.googleapis.com/auth/cloud-platform", 15382 // "https://www.googleapis.com/auth/dialogflow" 15383 // ] 15384 // } 15385 15386} 15387 15388// Pages invokes f for each page of results. 15389// A non-nil error returned from f will halt the iteration. 15390// The provided context supersedes any context provided to the Context method. 15391func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { 15392 c.ctx_ = ctx 15393 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15394 for { 15395 x, err := c.Do() 15396 if err != nil { 15397 return err 15398 } 15399 if err := f(x); err != nil { 15400 return err 15401 } 15402 if x.NextPageToken == "" { 15403 return nil 15404 } 15405 c.PageToken(x.NextPageToken) 15406 } 15407} 15408 15409// method id "dialogflow.projects.operations.cancel": 15410 15411type ProjectsOperationsCancelCall struct { 15412 s *Service 15413 name string 15414 urlParams_ gensupport.URLParams 15415 ctx_ context.Context 15416 header_ http.Header 15417} 15418 15419// Cancel: Starts asynchronous cancellation on a long-running operation. 15420// The server 15421// makes a best effort to cancel the operation, but success is 15422// not 15423// guaranteed. If the server doesn't support this method, it 15424// returns 15425// `google.rpc.Code.UNIMPLEMENTED`. Clients can 15426// use 15427// Operations.GetOperation or 15428// other methods to check whether the cancellation succeeded or whether 15429// the 15430// operation completed despite cancellation. On successful 15431// cancellation, 15432// the operation is not deleted; instead, it becomes an operation 15433// with 15434// an Operation.error value with a google.rpc.Status.code of 15435// 1, 15436// corresponding to `Code.CANCELLED`. 15437func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall { 15438 c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15439 c.name = name 15440 return c 15441} 15442 15443// Fields allows partial responses to be retrieved. See 15444// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15445// for more information. 15446func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall { 15447 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15448 return c 15449} 15450 15451// Context sets the context to be used in this call's Do method. Any 15452// pending HTTP request will be aborted if the provided context is 15453// canceled. 15454func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall { 15455 c.ctx_ = ctx 15456 return c 15457} 15458 15459// Header returns an http.Header that can be modified by the caller to 15460// add HTTP headers to the request. 15461func (c *ProjectsOperationsCancelCall) Header() http.Header { 15462 if c.header_ == nil { 15463 c.header_ = make(http.Header) 15464 } 15465 return c.header_ 15466} 15467 15468func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 15469 reqHeaders := make(http.Header) 15470 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 15471 for k, v := range c.header_ { 15472 reqHeaders[k] = v 15473 } 15474 reqHeaders.Set("User-Agent", c.s.userAgent()) 15475 var body io.Reader = nil 15476 c.urlParams_.Set("alt", alt) 15477 c.urlParams_.Set("prettyPrint", "false") 15478 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 15479 urls += "?" + c.urlParams_.Encode() 15480 req, err := http.NewRequest("POST", urls, body) 15481 if err != nil { 15482 return nil, err 15483 } 15484 req.Header = reqHeaders 15485 googleapi.Expand(req.URL, map[string]string{ 15486 "name": c.name, 15487 }) 15488 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15489} 15490 15491// Do executes the "dialogflow.projects.operations.cancel" call. 15492// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 15493// non-2xx status code is an error. Response headers are in either 15494// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 15495// returned at all) in error.(*googleapi.Error).Header. Use 15496// googleapi.IsNotModified to check whether the returned error was 15497// because http.StatusNotModified was returned. 15498func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 15499 gensupport.SetOptions(c.urlParams_, opts...) 15500 res, err := c.doRequest("json") 15501 if res != nil && res.StatusCode == http.StatusNotModified { 15502 if res.Body != nil { 15503 res.Body.Close() 15504 } 15505 return nil, &googleapi.Error{ 15506 Code: res.StatusCode, 15507 Header: res.Header, 15508 } 15509 } 15510 if err != nil { 15511 return nil, err 15512 } 15513 defer googleapi.CloseBody(res) 15514 if err := googleapi.CheckResponse(res); err != nil { 15515 return nil, err 15516 } 15517 ret := &GoogleProtobufEmpty{ 15518 ServerResponse: googleapi.ServerResponse{ 15519 Header: res.Header, 15520 HTTPStatusCode: res.StatusCode, 15521 }, 15522 } 15523 target := &ret 15524 if err := gensupport.DecodeResponse(target, res); err != nil { 15525 return nil, err 15526 } 15527 return ret, nil 15528 // { 15529 // "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`.", 15530 // "flatPath": "v2/projects/{projectsId}/operations/{operationsId}:cancel", 15531 // "httpMethod": "POST", 15532 // "id": "dialogflow.projects.operations.cancel", 15533 // "parameterOrder": [ 15534 // "name" 15535 // ], 15536 // "parameters": { 15537 // "name": { 15538 // "description": "The name of the operation resource to be cancelled.", 15539 // "location": "path", 15540 // "pattern": "^projects/[^/]+/operations/[^/]+$", 15541 // "required": true, 15542 // "type": "string" 15543 // } 15544 // }, 15545 // "path": "v2/{+name}:cancel", 15546 // "response": { 15547 // "$ref": "GoogleProtobufEmpty" 15548 // }, 15549 // "scopes": [ 15550 // "https://www.googleapis.com/auth/cloud-platform", 15551 // "https://www.googleapis.com/auth/dialogflow" 15552 // ] 15553 // } 15554 15555} 15556 15557// method id "dialogflow.projects.operations.get": 15558 15559type ProjectsOperationsGetCall struct { 15560 s *Service 15561 name string 15562 urlParams_ gensupport.URLParams 15563 ifNoneMatch_ string 15564 ctx_ context.Context 15565 header_ http.Header 15566} 15567 15568// Get: Gets the latest state of a long-running operation. Clients can 15569// use this 15570// method to poll the operation result at intervals as recommended by 15571// the API 15572// service. 15573func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { 15574 c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15575 c.name = name 15576 return c 15577} 15578 15579// Fields allows partial responses to be retrieved. See 15580// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15581// for more information. 15582func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { 15583 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15584 return c 15585} 15586 15587// IfNoneMatch sets the optional parameter which makes the operation 15588// fail if the object's ETag matches the given value. This is useful for 15589// getting updates only after the object has changed since the last 15590// request. Use googleapi.IsNotModified to check whether the response 15591// error from Do is the result of In-None-Match. 15592func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { 15593 c.ifNoneMatch_ = entityTag 15594 return c 15595} 15596 15597// Context sets the context to be used in this call's Do method. Any 15598// pending HTTP request will be aborted if the provided context is 15599// canceled. 15600func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { 15601 c.ctx_ = ctx 15602 return c 15603} 15604 15605// Header returns an http.Header that can be modified by the caller to 15606// add HTTP headers to the request. 15607func (c *ProjectsOperationsGetCall) Header() http.Header { 15608 if c.header_ == nil { 15609 c.header_ = make(http.Header) 15610 } 15611 return c.header_ 15612} 15613 15614func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 15615 reqHeaders := make(http.Header) 15616 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 15617 for k, v := range c.header_ { 15618 reqHeaders[k] = v 15619 } 15620 reqHeaders.Set("User-Agent", c.s.userAgent()) 15621 if c.ifNoneMatch_ != "" { 15622 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15623 } 15624 var body io.Reader = nil 15625 c.urlParams_.Set("alt", alt) 15626 c.urlParams_.Set("prettyPrint", "false") 15627 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15628 urls += "?" + c.urlParams_.Encode() 15629 req, err := http.NewRequest("GET", urls, body) 15630 if err != nil { 15631 return nil, err 15632 } 15633 req.Header = reqHeaders 15634 googleapi.Expand(req.URL, map[string]string{ 15635 "name": c.name, 15636 }) 15637 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15638} 15639 15640// Do executes the "dialogflow.projects.operations.get" call. 15641// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 15642// Any non-2xx status code is an error. Response headers are in either 15643// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 15644// was returned at all) in error.(*googleapi.Error).Header. Use 15645// googleapi.IsNotModified to check whether the returned error was 15646// because http.StatusNotModified was returned. 15647func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 15648 gensupport.SetOptions(c.urlParams_, opts...) 15649 res, err := c.doRequest("json") 15650 if res != nil && res.StatusCode == http.StatusNotModified { 15651 if res.Body != nil { 15652 res.Body.Close() 15653 } 15654 return nil, &googleapi.Error{ 15655 Code: res.StatusCode, 15656 Header: res.Header, 15657 } 15658 } 15659 if err != nil { 15660 return nil, err 15661 } 15662 defer googleapi.CloseBody(res) 15663 if err := googleapi.CheckResponse(res); err != nil { 15664 return nil, err 15665 } 15666 ret := &GoogleLongrunningOperation{ 15667 ServerResponse: googleapi.ServerResponse{ 15668 Header: res.Header, 15669 HTTPStatusCode: res.StatusCode, 15670 }, 15671 } 15672 target := &ret 15673 if err := gensupport.DecodeResponse(target, res); err != nil { 15674 return nil, err 15675 } 15676 return ret, nil 15677 // { 15678 // "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.", 15679 // "flatPath": "v2/projects/{projectsId}/operations/{operationsId}", 15680 // "httpMethod": "GET", 15681 // "id": "dialogflow.projects.operations.get", 15682 // "parameterOrder": [ 15683 // "name" 15684 // ], 15685 // "parameters": { 15686 // "name": { 15687 // "description": "The name of the operation resource.", 15688 // "location": "path", 15689 // "pattern": "^projects/[^/]+/operations/[^/]+$", 15690 // "required": true, 15691 // "type": "string" 15692 // } 15693 // }, 15694 // "path": "v2/{+name}", 15695 // "response": { 15696 // "$ref": "GoogleLongrunningOperation" 15697 // }, 15698 // "scopes": [ 15699 // "https://www.googleapis.com/auth/cloud-platform", 15700 // "https://www.googleapis.com/auth/dialogflow" 15701 // ] 15702 // } 15703 15704} 15705 15706// method id "dialogflow.projects.operations.list": 15707 15708type ProjectsOperationsListCall struct { 15709 s *Service 15710 name string 15711 urlParams_ gensupport.URLParams 15712 ifNoneMatch_ string 15713 ctx_ context.Context 15714 header_ http.Header 15715} 15716 15717// List: Lists operations that match the specified filter in the 15718// request. If the 15719// server doesn't support this method, it returns 15720// `UNIMPLEMENTED`. 15721// 15722// NOTE: the `name` binding allows API services to override the 15723// binding 15724// to use different resource name schemes, such as `users/*/operations`. 15725// To 15726// override the binding, API services can add a binding such 15727// as 15728// "/v1/{name=users/*}/operations" to their service configuration. 15729// For backwards compatibility, the default name includes the 15730// operations 15731// collection id, however overriding users must ensure the name 15732// binding 15733// is the parent resource, without the operations collection id. 15734func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall { 15735 c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15736 c.name = name 15737 return c 15738} 15739 15740// Filter sets the optional parameter "filter": The standard list 15741// filter. 15742func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall { 15743 c.urlParams_.Set("filter", filter) 15744 return c 15745} 15746 15747// PageSize sets the optional parameter "pageSize": The standard list 15748// page size. 15749func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall { 15750 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15751 return c 15752} 15753 15754// PageToken sets the optional parameter "pageToken": The standard list 15755// page token. 15756func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall { 15757 c.urlParams_.Set("pageToken", pageToken) 15758 return c 15759} 15760 15761// Fields allows partial responses to be retrieved. See 15762// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15763// for more information. 15764func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall { 15765 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15766 return c 15767} 15768 15769// IfNoneMatch sets the optional parameter which makes the operation 15770// fail if the object's ETag matches the given value. This is useful for 15771// getting updates only after the object has changed since the last 15772// request. Use googleapi.IsNotModified to check whether the response 15773// error from Do is the result of In-None-Match. 15774func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall { 15775 c.ifNoneMatch_ = entityTag 15776 return c 15777} 15778 15779// Context sets the context to be used in this call's Do method. Any 15780// pending HTTP request will be aborted if the provided context is 15781// canceled. 15782func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall { 15783 c.ctx_ = ctx 15784 return c 15785} 15786 15787// Header returns an http.Header that can be modified by the caller to 15788// add HTTP headers to the request. 15789func (c *ProjectsOperationsListCall) Header() http.Header { 15790 if c.header_ == nil { 15791 c.header_ = make(http.Header) 15792 } 15793 return c.header_ 15794} 15795 15796func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) { 15797 reqHeaders := make(http.Header) 15798 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 15799 for k, v := range c.header_ { 15800 reqHeaders[k] = v 15801 } 15802 reqHeaders.Set("User-Agent", c.s.userAgent()) 15803 if c.ifNoneMatch_ != "" { 15804 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15805 } 15806 var body io.Reader = nil 15807 c.urlParams_.Set("alt", alt) 15808 c.urlParams_.Set("prettyPrint", "false") 15809 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") 15810 urls += "?" + c.urlParams_.Encode() 15811 req, err := http.NewRequest("GET", urls, body) 15812 if err != nil { 15813 return nil, err 15814 } 15815 req.Header = reqHeaders 15816 googleapi.Expand(req.URL, map[string]string{ 15817 "name": c.name, 15818 }) 15819 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15820} 15821 15822// Do executes the "dialogflow.projects.operations.list" call. 15823// Exactly one of *GoogleLongrunningListOperationsResponse or error will 15824// be non-nil. Any non-2xx status code is an error. Response headers are 15825// in either 15826// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if 15827// a response was returned at all) in error.(*googleapi.Error).Header. 15828// Use googleapi.IsNotModified to check whether the returned error was 15829// because http.StatusNotModified was returned. 15830func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { 15831 gensupport.SetOptions(c.urlParams_, opts...) 15832 res, err := c.doRequest("json") 15833 if res != nil && res.StatusCode == http.StatusNotModified { 15834 if res.Body != nil { 15835 res.Body.Close() 15836 } 15837 return nil, &googleapi.Error{ 15838 Code: res.StatusCode, 15839 Header: res.Header, 15840 } 15841 } 15842 if err != nil { 15843 return nil, err 15844 } 15845 defer googleapi.CloseBody(res) 15846 if err := googleapi.CheckResponse(res); err != nil { 15847 return nil, err 15848 } 15849 ret := &GoogleLongrunningListOperationsResponse{ 15850 ServerResponse: googleapi.ServerResponse{ 15851 Header: res.Header, 15852 HTTPStatusCode: res.StatusCode, 15853 }, 15854 } 15855 target := &ret 15856 if err := gensupport.DecodeResponse(target, res); err != nil { 15857 return nil, err 15858 } 15859 return ret, nil 15860 // { 15861 // "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.", 15862 // "flatPath": "v2/projects/{projectsId}/operations", 15863 // "httpMethod": "GET", 15864 // "id": "dialogflow.projects.operations.list", 15865 // "parameterOrder": [ 15866 // "name" 15867 // ], 15868 // "parameters": { 15869 // "filter": { 15870 // "description": "The standard list filter.", 15871 // "location": "query", 15872 // "type": "string" 15873 // }, 15874 // "name": { 15875 // "description": "The name of the operation's parent resource.", 15876 // "location": "path", 15877 // "pattern": "^projects/[^/]+$", 15878 // "required": true, 15879 // "type": "string" 15880 // }, 15881 // "pageSize": { 15882 // "description": "The standard list page size.", 15883 // "format": "int32", 15884 // "location": "query", 15885 // "type": "integer" 15886 // }, 15887 // "pageToken": { 15888 // "description": "The standard list page token.", 15889 // "location": "query", 15890 // "type": "string" 15891 // } 15892 // }, 15893 // "path": "v2/{+name}/operations", 15894 // "response": { 15895 // "$ref": "GoogleLongrunningListOperationsResponse" 15896 // }, 15897 // "scopes": [ 15898 // "https://www.googleapis.com/auth/cloud-platform", 15899 // "https://www.googleapis.com/auth/dialogflow" 15900 // ] 15901 // } 15902 15903} 15904 15905// Pages invokes f for each page of results. 15906// A non-nil error returned from f will halt the iteration. 15907// The provided context supersedes any context provided to the Context method. 15908func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { 15909 c.ctx_ = ctx 15910 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15911 for { 15912 x, err := c.Do() 15913 if err != nil { 15914 return err 15915 } 15916 if err := f(x); err != nil { 15917 return err 15918 } 15919 if x.NextPageToken == "" { 15920 return nil 15921 } 15922 c.PageToken(x.NextPageToken) 15923 } 15924} 15925