1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package dialogflow provides access to the Dialogflow API.
8//
9// This package is DEPRECATED. Use package cloud.google.com/go/dialogflow/apiv2 instead.
10//
11// For product documentation, see: https://cloud.google.com/dialogflow/
12//
13// Creating a client
14//
15// Usage example:
16//
17//   import "google.golang.org/api/dialogflow/v2"
18//   ...
19//   ctx := context.Background()
20//   dialogflowService, err := dialogflow.NewService(ctx)
21//
22// In this example, Google Application Default Credentials are used for authentication.
23//
24// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
25//
26// Other authentication options
27//
28// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
29//
30//   dialogflowService, err := dialogflow.NewService(ctx, option.WithScopes(dialogflow.DialogflowScope))
31//
32// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
33//
34//   dialogflowService, err := dialogflow.NewService(ctx, option.WithAPIKey("AIza..."))
35//
36// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
37//
38//   config := &oauth2.Config{...}
39//   // ...
40//   token, err := config.Exchange(ctx, ...)
41//   dialogflowService, err := dialogflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
42//
43// See https://godoc.org/google.golang.org/api/option/ for details on options.
44package dialogflow // import "google.golang.org/api/dialogflow/v2"
45
46import (
47	"bytes"
48	"context"
49	"encoding/json"
50	"errors"
51	"fmt"
52	"io"
53	"net/http"
54	"net/url"
55	"strconv"
56	"strings"
57
58	googleapi "google.golang.org/api/googleapi"
59	gensupport "google.golang.org/api/internal/gensupport"
60	option "google.golang.org/api/option"
61	internaloption "google.golang.org/api/option/internaloption"
62	htransport "google.golang.org/api/transport/http"
63)
64
65// Always reference these packages, just in case the auto-generated code
66// below doesn't.
67var _ = bytes.NewBuffer
68var _ = strconv.Itoa
69var _ = fmt.Sprintf
70var _ = json.NewDecoder
71var _ = io.Copy
72var _ = url.Parse
73var _ = gensupport.MarshalJSON
74var _ = googleapi.Version
75var _ = errors.New
76var _ = strings.Replace
77var _ = context.Canceled
78var _ = internaloption.WithDefaultEndpoint
79
80const apiId = "dialogflow:v2"
81const apiName = "dialogflow"
82const apiVersion = "v2"
83const basePath = "https://dialogflow.googleapis.com/"
84const mtlsBasePath = "https://dialogflow.mtls.googleapis.com/"
85
86// OAuth2 scopes used by this API.
87const (
88	// See, edit, configure, and delete your Google Cloud Platform data
89	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
90
91	// View, manage and query your Dialogflow agents
92	DialogflowScope = "https://www.googleapis.com/auth/dialogflow"
93)
94
95// NewService creates a new Service.
96func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
97	scopesOption := option.WithScopes(
98		"https://www.googleapis.com/auth/cloud-platform",
99		"https://www.googleapis.com/auth/dialogflow",
100	)
101	// NOTE: prepend, so we don't override user-specified scopes.
102	opts = append([]option.ClientOption{scopesOption}, opts...)
103	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
104	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
105	client, endpoint, err := htransport.NewClient(ctx, opts...)
106	if err != nil {
107		return nil, err
108	}
109	s, err := New(client)
110	if err != nil {
111		return nil, err
112	}
113	if endpoint != "" {
114		s.BasePath = endpoint
115	}
116	return s, nil
117}
118
119// New creates a new Service. It uses the provided http.Client for requests.
120//
121// Deprecated: please use NewService instead.
122// To provide a custom HTTP client, use option.WithHTTPClient.
123// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
124func New(client *http.Client) (*Service, error) {
125	if client == nil {
126		return nil, errors.New("client is nil")
127	}
128	s := &Service{client: client, BasePath: basePath}
129	s.Projects = NewProjectsService(s)
130	return s, nil
131}
132
133type Service struct {
134	client    *http.Client
135	BasePath  string // API endpoint base URL
136	UserAgent string // optional additional User-Agent fragment
137
138	Projects *ProjectsService
139}
140
141func (s *Service) userAgent() string {
142	if s.UserAgent == "" {
143		return googleapi.UserAgent
144	}
145	return googleapi.UserAgent + " " + s.UserAgent
146}
147
148func NewProjectsService(s *Service) *ProjectsService {
149	rs := &ProjectsService{s: s}
150	rs.Agent = NewProjectsAgentService(s)
151	rs.AnswerRecords = NewProjectsAnswerRecordsService(s)
152	rs.ConversationProfiles = NewProjectsConversationProfilesService(s)
153	rs.Conversations = NewProjectsConversationsService(s)
154	rs.KnowledgeBases = NewProjectsKnowledgeBasesService(s)
155	rs.Locations = NewProjectsLocationsService(s)
156	rs.Operations = NewProjectsOperationsService(s)
157	return rs
158}
159
160type ProjectsService struct {
161	s *Service
162
163	Agent *ProjectsAgentService
164
165	AnswerRecords *ProjectsAnswerRecordsService
166
167	ConversationProfiles *ProjectsConversationProfilesService
168
169	Conversations *ProjectsConversationsService
170
171	KnowledgeBases *ProjectsKnowledgeBasesService
172
173	Locations *ProjectsLocationsService
174
175	Operations *ProjectsOperationsService
176}
177
178func NewProjectsAgentService(s *Service) *ProjectsAgentService {
179	rs := &ProjectsAgentService{s: s}
180	rs.EntityTypes = NewProjectsAgentEntityTypesService(s)
181	rs.Environments = NewProjectsAgentEnvironmentsService(s)
182	rs.Intents = NewProjectsAgentIntentsService(s)
183	rs.KnowledgeBases = NewProjectsAgentKnowledgeBasesService(s)
184	rs.Sessions = NewProjectsAgentSessionsService(s)
185	rs.Versions = NewProjectsAgentVersionsService(s)
186	return rs
187}
188
189type ProjectsAgentService struct {
190	s *Service
191
192	EntityTypes *ProjectsAgentEntityTypesService
193
194	Environments *ProjectsAgentEnvironmentsService
195
196	Intents *ProjectsAgentIntentsService
197
198	KnowledgeBases *ProjectsAgentKnowledgeBasesService
199
200	Sessions *ProjectsAgentSessionsService
201
202	Versions *ProjectsAgentVersionsService
203}
204
205func NewProjectsAgentEntityTypesService(s *Service) *ProjectsAgentEntityTypesService {
206	rs := &ProjectsAgentEntityTypesService{s: s}
207	rs.Entities = NewProjectsAgentEntityTypesEntitiesService(s)
208	return rs
209}
210
211type ProjectsAgentEntityTypesService struct {
212	s *Service
213
214	Entities *ProjectsAgentEntityTypesEntitiesService
215}
216
217func NewProjectsAgentEntityTypesEntitiesService(s *Service) *ProjectsAgentEntityTypesEntitiesService {
218	rs := &ProjectsAgentEntityTypesEntitiesService{s: s}
219	return rs
220}
221
222type ProjectsAgentEntityTypesEntitiesService struct {
223	s *Service
224}
225
226func NewProjectsAgentEnvironmentsService(s *Service) *ProjectsAgentEnvironmentsService {
227	rs := &ProjectsAgentEnvironmentsService{s: s}
228	rs.Intents = NewProjectsAgentEnvironmentsIntentsService(s)
229	rs.Users = NewProjectsAgentEnvironmentsUsersService(s)
230	return rs
231}
232
233type ProjectsAgentEnvironmentsService struct {
234	s *Service
235
236	Intents *ProjectsAgentEnvironmentsIntentsService
237
238	Users *ProjectsAgentEnvironmentsUsersService
239}
240
241func NewProjectsAgentEnvironmentsIntentsService(s *Service) *ProjectsAgentEnvironmentsIntentsService {
242	rs := &ProjectsAgentEnvironmentsIntentsService{s: s}
243	return rs
244}
245
246type ProjectsAgentEnvironmentsIntentsService struct {
247	s *Service
248}
249
250func NewProjectsAgentEnvironmentsUsersService(s *Service) *ProjectsAgentEnvironmentsUsersService {
251	rs := &ProjectsAgentEnvironmentsUsersService{s: s}
252	rs.Sessions = NewProjectsAgentEnvironmentsUsersSessionsService(s)
253	return rs
254}
255
256type ProjectsAgentEnvironmentsUsersService struct {
257	s *Service
258
259	Sessions *ProjectsAgentEnvironmentsUsersSessionsService
260}
261
262func NewProjectsAgentEnvironmentsUsersSessionsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsService {
263	rs := &ProjectsAgentEnvironmentsUsersSessionsService{s: s}
264	rs.Contexts = NewProjectsAgentEnvironmentsUsersSessionsContextsService(s)
265	rs.EntityTypes = NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s)
266	return rs
267}
268
269type ProjectsAgentEnvironmentsUsersSessionsService struct {
270	s *Service
271
272	Contexts *ProjectsAgentEnvironmentsUsersSessionsContextsService
273
274	EntityTypes *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService
275}
276
277func NewProjectsAgentEnvironmentsUsersSessionsContextsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsContextsService {
278	rs := &ProjectsAgentEnvironmentsUsersSessionsContextsService{s: s}
279	return rs
280}
281
282type ProjectsAgentEnvironmentsUsersSessionsContextsService struct {
283	s *Service
284}
285
286func NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService {
287	rs := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesService{s: s}
288	return rs
289}
290
291type ProjectsAgentEnvironmentsUsersSessionsEntityTypesService struct {
292	s *Service
293}
294
295func NewProjectsAgentIntentsService(s *Service) *ProjectsAgentIntentsService {
296	rs := &ProjectsAgentIntentsService{s: s}
297	return rs
298}
299
300type ProjectsAgentIntentsService struct {
301	s *Service
302}
303
304func NewProjectsAgentKnowledgeBasesService(s *Service) *ProjectsAgentKnowledgeBasesService {
305	rs := &ProjectsAgentKnowledgeBasesService{s: s}
306	rs.Documents = NewProjectsAgentKnowledgeBasesDocumentsService(s)
307	return rs
308}
309
310type ProjectsAgentKnowledgeBasesService struct {
311	s *Service
312
313	Documents *ProjectsAgentKnowledgeBasesDocumentsService
314}
315
316func NewProjectsAgentKnowledgeBasesDocumentsService(s *Service) *ProjectsAgentKnowledgeBasesDocumentsService {
317	rs := &ProjectsAgentKnowledgeBasesDocumentsService{s: s}
318	return rs
319}
320
321type ProjectsAgentKnowledgeBasesDocumentsService struct {
322	s *Service
323}
324
325func NewProjectsAgentSessionsService(s *Service) *ProjectsAgentSessionsService {
326	rs := &ProjectsAgentSessionsService{s: s}
327	rs.Contexts = NewProjectsAgentSessionsContextsService(s)
328	rs.EntityTypes = NewProjectsAgentSessionsEntityTypesService(s)
329	return rs
330}
331
332type ProjectsAgentSessionsService struct {
333	s *Service
334
335	Contexts *ProjectsAgentSessionsContextsService
336
337	EntityTypes *ProjectsAgentSessionsEntityTypesService
338}
339
340func NewProjectsAgentSessionsContextsService(s *Service) *ProjectsAgentSessionsContextsService {
341	rs := &ProjectsAgentSessionsContextsService{s: s}
342	return rs
343}
344
345type ProjectsAgentSessionsContextsService struct {
346	s *Service
347}
348
349func NewProjectsAgentSessionsEntityTypesService(s *Service) *ProjectsAgentSessionsEntityTypesService {
350	rs := &ProjectsAgentSessionsEntityTypesService{s: s}
351	return rs
352}
353
354type ProjectsAgentSessionsEntityTypesService struct {
355	s *Service
356}
357
358func NewProjectsAgentVersionsService(s *Service) *ProjectsAgentVersionsService {
359	rs := &ProjectsAgentVersionsService{s: s}
360	return rs
361}
362
363type ProjectsAgentVersionsService struct {
364	s *Service
365}
366
367func NewProjectsAnswerRecordsService(s *Service) *ProjectsAnswerRecordsService {
368	rs := &ProjectsAnswerRecordsService{s: s}
369	return rs
370}
371
372type ProjectsAnswerRecordsService struct {
373	s *Service
374}
375
376func NewProjectsConversationProfilesService(s *Service) *ProjectsConversationProfilesService {
377	rs := &ProjectsConversationProfilesService{s: s}
378	return rs
379}
380
381type ProjectsConversationProfilesService struct {
382	s *Service
383}
384
385func NewProjectsConversationsService(s *Service) *ProjectsConversationsService {
386	rs := &ProjectsConversationsService{s: s}
387	rs.Messages = NewProjectsConversationsMessagesService(s)
388	rs.Participants = NewProjectsConversationsParticipantsService(s)
389	return rs
390}
391
392type ProjectsConversationsService struct {
393	s *Service
394
395	Messages *ProjectsConversationsMessagesService
396
397	Participants *ProjectsConversationsParticipantsService
398}
399
400func NewProjectsConversationsMessagesService(s *Service) *ProjectsConversationsMessagesService {
401	rs := &ProjectsConversationsMessagesService{s: s}
402	return rs
403}
404
405type ProjectsConversationsMessagesService struct {
406	s *Service
407}
408
409func NewProjectsConversationsParticipantsService(s *Service) *ProjectsConversationsParticipantsService {
410	rs := &ProjectsConversationsParticipantsService{s: s}
411	rs.Suggestions = NewProjectsConversationsParticipantsSuggestionsService(s)
412	return rs
413}
414
415type ProjectsConversationsParticipantsService struct {
416	s *Service
417
418	Suggestions *ProjectsConversationsParticipantsSuggestionsService
419}
420
421func NewProjectsConversationsParticipantsSuggestionsService(s *Service) *ProjectsConversationsParticipantsSuggestionsService {
422	rs := &ProjectsConversationsParticipantsSuggestionsService{s: s}
423	return rs
424}
425
426type ProjectsConversationsParticipantsSuggestionsService struct {
427	s *Service
428}
429
430func NewProjectsKnowledgeBasesService(s *Service) *ProjectsKnowledgeBasesService {
431	rs := &ProjectsKnowledgeBasesService{s: s}
432	rs.Documents = NewProjectsKnowledgeBasesDocumentsService(s)
433	return rs
434}
435
436type ProjectsKnowledgeBasesService struct {
437	s *Service
438
439	Documents *ProjectsKnowledgeBasesDocumentsService
440}
441
442func NewProjectsKnowledgeBasesDocumentsService(s *Service) *ProjectsKnowledgeBasesDocumentsService {
443	rs := &ProjectsKnowledgeBasesDocumentsService{s: s}
444	return rs
445}
446
447type ProjectsKnowledgeBasesDocumentsService struct {
448	s *Service
449}
450
451func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
452	rs := &ProjectsLocationsService{s: s}
453	rs.Agent = NewProjectsLocationsAgentService(s)
454	rs.AnswerRecords = NewProjectsLocationsAnswerRecordsService(s)
455	rs.ConversationProfiles = NewProjectsLocationsConversationProfilesService(s)
456	rs.Conversations = NewProjectsLocationsConversationsService(s)
457	rs.KnowledgeBases = NewProjectsLocationsKnowledgeBasesService(s)
458	rs.Operations = NewProjectsLocationsOperationsService(s)
459	return rs
460}
461
462type ProjectsLocationsService struct {
463	s *Service
464
465	Agent *ProjectsLocationsAgentService
466
467	AnswerRecords *ProjectsLocationsAnswerRecordsService
468
469	ConversationProfiles *ProjectsLocationsConversationProfilesService
470
471	Conversations *ProjectsLocationsConversationsService
472
473	KnowledgeBases *ProjectsLocationsKnowledgeBasesService
474
475	Operations *ProjectsLocationsOperationsService
476}
477
478func NewProjectsLocationsAgentService(s *Service) *ProjectsLocationsAgentService {
479	rs := &ProjectsLocationsAgentService{s: s}
480	rs.EntityTypes = NewProjectsLocationsAgentEntityTypesService(s)
481	rs.Environments = NewProjectsLocationsAgentEnvironmentsService(s)
482	rs.Intents = NewProjectsLocationsAgentIntentsService(s)
483	rs.Sessions = NewProjectsLocationsAgentSessionsService(s)
484	rs.Versions = NewProjectsLocationsAgentVersionsService(s)
485	return rs
486}
487
488type ProjectsLocationsAgentService struct {
489	s *Service
490
491	EntityTypes *ProjectsLocationsAgentEntityTypesService
492
493	Environments *ProjectsLocationsAgentEnvironmentsService
494
495	Intents *ProjectsLocationsAgentIntentsService
496
497	Sessions *ProjectsLocationsAgentSessionsService
498
499	Versions *ProjectsLocationsAgentVersionsService
500}
501
502func NewProjectsLocationsAgentEntityTypesService(s *Service) *ProjectsLocationsAgentEntityTypesService {
503	rs := &ProjectsLocationsAgentEntityTypesService{s: s}
504	rs.Entities = NewProjectsLocationsAgentEntityTypesEntitiesService(s)
505	return rs
506}
507
508type ProjectsLocationsAgentEntityTypesService struct {
509	s *Service
510
511	Entities *ProjectsLocationsAgentEntityTypesEntitiesService
512}
513
514func NewProjectsLocationsAgentEntityTypesEntitiesService(s *Service) *ProjectsLocationsAgentEntityTypesEntitiesService {
515	rs := &ProjectsLocationsAgentEntityTypesEntitiesService{s: s}
516	return rs
517}
518
519type ProjectsLocationsAgentEntityTypesEntitiesService struct {
520	s *Service
521}
522
523func NewProjectsLocationsAgentEnvironmentsService(s *Service) *ProjectsLocationsAgentEnvironmentsService {
524	rs := &ProjectsLocationsAgentEnvironmentsService{s: s}
525	rs.Intents = NewProjectsLocationsAgentEnvironmentsIntentsService(s)
526	rs.Users = NewProjectsLocationsAgentEnvironmentsUsersService(s)
527	return rs
528}
529
530type ProjectsLocationsAgentEnvironmentsService struct {
531	s *Service
532
533	Intents *ProjectsLocationsAgentEnvironmentsIntentsService
534
535	Users *ProjectsLocationsAgentEnvironmentsUsersService
536}
537
538func NewProjectsLocationsAgentEnvironmentsIntentsService(s *Service) *ProjectsLocationsAgentEnvironmentsIntentsService {
539	rs := &ProjectsLocationsAgentEnvironmentsIntentsService{s: s}
540	return rs
541}
542
543type ProjectsLocationsAgentEnvironmentsIntentsService struct {
544	s *Service
545}
546
547func NewProjectsLocationsAgentEnvironmentsUsersService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersService {
548	rs := &ProjectsLocationsAgentEnvironmentsUsersService{s: s}
549	rs.Sessions = NewProjectsLocationsAgentEnvironmentsUsersSessionsService(s)
550	return rs
551}
552
553type ProjectsLocationsAgentEnvironmentsUsersService struct {
554	s *Service
555
556	Sessions *ProjectsLocationsAgentEnvironmentsUsersSessionsService
557}
558
559func NewProjectsLocationsAgentEnvironmentsUsersSessionsService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersSessionsService {
560	rs := &ProjectsLocationsAgentEnvironmentsUsersSessionsService{s: s}
561	rs.Contexts = NewProjectsLocationsAgentEnvironmentsUsersSessionsContextsService(s)
562	rs.EntityTypes = NewProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService(s)
563	return rs
564}
565
566type ProjectsLocationsAgentEnvironmentsUsersSessionsService struct {
567	s *Service
568
569	Contexts *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService
570
571	EntityTypes *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService
572}
573
574func NewProjectsLocationsAgentEnvironmentsUsersSessionsContextsService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService {
575	rs := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService{s: s}
576	return rs
577}
578
579type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService struct {
580	s *Service
581}
582
583func NewProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService {
584	rs := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService{s: s}
585	return rs
586}
587
588type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService struct {
589	s *Service
590}
591
592func NewProjectsLocationsAgentIntentsService(s *Service) *ProjectsLocationsAgentIntentsService {
593	rs := &ProjectsLocationsAgentIntentsService{s: s}
594	return rs
595}
596
597type ProjectsLocationsAgentIntentsService struct {
598	s *Service
599}
600
601func NewProjectsLocationsAgentSessionsService(s *Service) *ProjectsLocationsAgentSessionsService {
602	rs := &ProjectsLocationsAgentSessionsService{s: s}
603	rs.Contexts = NewProjectsLocationsAgentSessionsContextsService(s)
604	rs.EntityTypes = NewProjectsLocationsAgentSessionsEntityTypesService(s)
605	return rs
606}
607
608type ProjectsLocationsAgentSessionsService struct {
609	s *Service
610
611	Contexts *ProjectsLocationsAgentSessionsContextsService
612
613	EntityTypes *ProjectsLocationsAgentSessionsEntityTypesService
614}
615
616func NewProjectsLocationsAgentSessionsContextsService(s *Service) *ProjectsLocationsAgentSessionsContextsService {
617	rs := &ProjectsLocationsAgentSessionsContextsService{s: s}
618	return rs
619}
620
621type ProjectsLocationsAgentSessionsContextsService struct {
622	s *Service
623}
624
625func NewProjectsLocationsAgentSessionsEntityTypesService(s *Service) *ProjectsLocationsAgentSessionsEntityTypesService {
626	rs := &ProjectsLocationsAgentSessionsEntityTypesService{s: s}
627	return rs
628}
629
630type ProjectsLocationsAgentSessionsEntityTypesService struct {
631	s *Service
632}
633
634func NewProjectsLocationsAgentVersionsService(s *Service) *ProjectsLocationsAgentVersionsService {
635	rs := &ProjectsLocationsAgentVersionsService{s: s}
636	return rs
637}
638
639type ProjectsLocationsAgentVersionsService struct {
640	s *Service
641}
642
643func NewProjectsLocationsAnswerRecordsService(s *Service) *ProjectsLocationsAnswerRecordsService {
644	rs := &ProjectsLocationsAnswerRecordsService{s: s}
645	return rs
646}
647
648type ProjectsLocationsAnswerRecordsService struct {
649	s *Service
650}
651
652func NewProjectsLocationsConversationProfilesService(s *Service) *ProjectsLocationsConversationProfilesService {
653	rs := &ProjectsLocationsConversationProfilesService{s: s}
654	return rs
655}
656
657type ProjectsLocationsConversationProfilesService struct {
658	s *Service
659}
660
661func NewProjectsLocationsConversationsService(s *Service) *ProjectsLocationsConversationsService {
662	rs := &ProjectsLocationsConversationsService{s: s}
663	rs.Messages = NewProjectsLocationsConversationsMessagesService(s)
664	rs.Participants = NewProjectsLocationsConversationsParticipantsService(s)
665	return rs
666}
667
668type ProjectsLocationsConversationsService struct {
669	s *Service
670
671	Messages *ProjectsLocationsConversationsMessagesService
672
673	Participants *ProjectsLocationsConversationsParticipantsService
674}
675
676func NewProjectsLocationsConversationsMessagesService(s *Service) *ProjectsLocationsConversationsMessagesService {
677	rs := &ProjectsLocationsConversationsMessagesService{s: s}
678	return rs
679}
680
681type ProjectsLocationsConversationsMessagesService struct {
682	s *Service
683}
684
685func NewProjectsLocationsConversationsParticipantsService(s *Service) *ProjectsLocationsConversationsParticipantsService {
686	rs := &ProjectsLocationsConversationsParticipantsService{s: s}
687	rs.Suggestions = NewProjectsLocationsConversationsParticipantsSuggestionsService(s)
688	return rs
689}
690
691type ProjectsLocationsConversationsParticipantsService struct {
692	s *Service
693
694	Suggestions *ProjectsLocationsConversationsParticipantsSuggestionsService
695}
696
697func NewProjectsLocationsConversationsParticipantsSuggestionsService(s *Service) *ProjectsLocationsConversationsParticipantsSuggestionsService {
698	rs := &ProjectsLocationsConversationsParticipantsSuggestionsService{s: s}
699	return rs
700}
701
702type ProjectsLocationsConversationsParticipantsSuggestionsService struct {
703	s *Service
704}
705
706func NewProjectsLocationsKnowledgeBasesService(s *Service) *ProjectsLocationsKnowledgeBasesService {
707	rs := &ProjectsLocationsKnowledgeBasesService{s: s}
708	rs.Documents = NewProjectsLocationsKnowledgeBasesDocumentsService(s)
709	return rs
710}
711
712type ProjectsLocationsKnowledgeBasesService struct {
713	s *Service
714
715	Documents *ProjectsLocationsKnowledgeBasesDocumentsService
716}
717
718func NewProjectsLocationsKnowledgeBasesDocumentsService(s *Service) *ProjectsLocationsKnowledgeBasesDocumentsService {
719	rs := &ProjectsLocationsKnowledgeBasesDocumentsService{s: s}
720	return rs
721}
722
723type ProjectsLocationsKnowledgeBasesDocumentsService struct {
724	s *Service
725}
726
727func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
728	rs := &ProjectsLocationsOperationsService{s: s}
729	return rs
730}
731
732type ProjectsLocationsOperationsService struct {
733	s *Service
734}
735
736func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
737	rs := &ProjectsOperationsService{s: s}
738	return rs
739}
740
741type ProjectsOperationsService struct {
742	s *Service
743}
744
745// GoogleCloudDialogflowCxV3AudioInput: Represents the natural speech
746// audio to be processed.
747type GoogleCloudDialogflowCxV3AudioInput struct {
748	// Audio: The natural language speech audio to be processed. A single
749	// request can contain up to 1 minute of speech audio data. The
750	// transcribed text cannot contain more than 256 bytes. For
751	// non-streaming audio detect intent, both `config` and `audio` must be
752	// provided. For streaming audio detect intent, `config` must be
753	// provided in the first request and `audio` must be provided in all
754	// following requests.
755	Audio string `json:"audio,omitempty"`
756
757	// Config: Required. Instructs the speech recognizer how to process the
758	// speech audio.
759	Config *GoogleCloudDialogflowCxV3InputAudioConfig `json:"config,omitempty"`
760
761	// ForceSendFields is a list of field names (e.g. "Audio") to
762	// unconditionally include in API requests. By default, fields with
763	// empty values are omitted from API requests. However, any non-pointer,
764	// non-interface field appearing in ForceSendFields will be sent to the
765	// server regardless of whether the field is empty or not. This may be
766	// used to include empty fields in Patch requests.
767	ForceSendFields []string `json:"-"`
768
769	// NullFields is a list of field names (e.g. "Audio") to include in API
770	// requests with the JSON null value. By default, fields with empty
771	// values are omitted from API requests. However, any field with an
772	// empty value appearing in NullFields will be sent to the server as
773	// null. It is an error if a field in this list has a non-empty value.
774	// This may be used to include null fields in Patch requests.
775	NullFields []string `json:"-"`
776}
777
778func (s *GoogleCloudDialogflowCxV3AudioInput) MarshalJSON() ([]byte, error) {
779	type NoMethod GoogleCloudDialogflowCxV3AudioInput
780	raw := NoMethod(*s)
781	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
782}
783
784// GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata: Metadata returned
785// for the TestCases.BatchRunTestCases long running operation.
786type GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata struct {
787	// Errors: The test errors.
788	Errors []*GoogleCloudDialogflowCxV3TestError `json:"errors,omitempty"`
789
790	// ForceSendFields is a list of field names (e.g. "Errors") to
791	// unconditionally include in API requests. By default, fields with
792	// empty values are omitted from API requests. However, any non-pointer,
793	// non-interface field appearing in ForceSendFields will be sent to the
794	// server regardless of whether the field is empty or not. This may be
795	// used to include empty fields in Patch requests.
796	ForceSendFields []string `json:"-"`
797
798	// NullFields is a list of field names (e.g. "Errors") to include in API
799	// requests with the JSON null value. By default, fields with empty
800	// values are omitted from API requests. However, any field with an
801	// empty value appearing in NullFields will be sent to the server as
802	// null. It is an error if a field in this list has a non-empty value.
803	// This may be used to include null fields in Patch requests.
804	NullFields []string `json:"-"`
805}
806
807func (s *GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata) MarshalJSON() ([]byte, error) {
808	type NoMethod GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata
809	raw := NoMethod(*s)
810	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
811}
812
813// GoogleCloudDialogflowCxV3BatchRunTestCasesResponse: The response
814// message for TestCases.BatchRunTestCases.
815type GoogleCloudDialogflowCxV3BatchRunTestCasesResponse struct {
816	// Results: The test case results. The detailed conversation turns are
817	// empty in this response.
818	Results []*GoogleCloudDialogflowCxV3TestCaseResult `json:"results,omitempty"`
819
820	// ForceSendFields is a list of field names (e.g. "Results") to
821	// unconditionally include in API requests. By default, fields with
822	// empty values are omitted from API requests. However, any non-pointer,
823	// non-interface field appearing in ForceSendFields will be sent to the
824	// server regardless of whether the field is empty or not. This may be
825	// used to include empty fields in Patch requests.
826	ForceSendFields []string `json:"-"`
827
828	// NullFields is a list of field names (e.g. "Results") to include in
829	// API requests with the JSON null value. By default, fields with empty
830	// values are omitted from API requests. However, any field with an
831	// empty value appearing in NullFields will be sent to the server as
832	// null. It is an error if a field in this list has a non-empty value.
833	// This may be used to include null fields in Patch requests.
834	NullFields []string `json:"-"`
835}
836
837func (s *GoogleCloudDialogflowCxV3BatchRunTestCasesResponse) MarshalJSON() ([]byte, error) {
838	type NoMethod GoogleCloudDialogflowCxV3BatchRunTestCasesResponse
839	raw := NoMethod(*s)
840	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
841}
842
843// GoogleCloudDialogflowCxV3ContinuousTestResult: Represents a result
844// from running a test case in an agent environment.
845type GoogleCloudDialogflowCxV3ContinuousTestResult struct {
846	// Name: The resource name for the continuous test result. Format:
847	// `projects//locations//agents//environments//continuousTestResults/`.
848	Name string `json:"name,omitempty"`
849
850	// Result: The result of this continuous test run, i.e. whether all the
851	// tests in this continuous test run pass or not.
852	//
853	// Possible values:
854	//   "AGGREGATED_TEST_RESULT_UNSPECIFIED" - Not specified. Should never
855	// be used.
856	//   "PASSED" - All the tests passed.
857	//   "FAILED" - At least one test did not pass.
858	Result string `json:"result,omitempty"`
859
860	// RunTime: Time when the continuous testing run starts.
861	RunTime string `json:"runTime,omitempty"`
862
863	// TestCaseResults: A list of individual test case results names in this
864	// continuous test run.
865	TestCaseResults []string `json:"testCaseResults,omitempty"`
866
867	// ForceSendFields is a list of field names (e.g. "Name") to
868	// unconditionally include in API requests. By default, fields with
869	// empty values are omitted from API requests. However, any non-pointer,
870	// non-interface field appearing in ForceSendFields will be sent to the
871	// server regardless of whether the field is empty or not. This may be
872	// used to include empty fields in Patch requests.
873	ForceSendFields []string `json:"-"`
874
875	// NullFields is a list of field names (e.g. "Name") to include in API
876	// requests with the JSON null value. By default, fields with empty
877	// values are omitted from API requests. However, any field with an
878	// empty value appearing in NullFields will be sent to the server as
879	// null. It is an error if a field in this list has a non-empty value.
880	// This may be used to include null fields in Patch requests.
881	NullFields []string `json:"-"`
882}
883
884func (s *GoogleCloudDialogflowCxV3ContinuousTestResult) MarshalJSON() ([]byte, error) {
885	type NoMethod GoogleCloudDialogflowCxV3ContinuousTestResult
886	raw := NoMethod(*s)
887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
888}
889
890// GoogleCloudDialogflowCxV3ConversationTurn: One interaction between a
891// human and virtual agent. The human provides some input and the
892// virtual agent provides a response.
893type GoogleCloudDialogflowCxV3ConversationTurn struct {
894	// UserInput: The user input.
895	UserInput *GoogleCloudDialogflowCxV3ConversationTurnUserInput `json:"userInput,omitempty"`
896
897	// VirtualAgentOutput: The virtual agent output.
898	VirtualAgentOutput *GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput `json:"virtualAgentOutput,omitempty"`
899
900	// ForceSendFields is a list of field names (e.g. "UserInput") to
901	// unconditionally include in API requests. By default, fields with
902	// empty values are omitted from API requests. However, any non-pointer,
903	// non-interface field appearing in ForceSendFields will be sent to the
904	// server regardless of whether the field is empty or not. This may be
905	// used to include empty fields in Patch requests.
906	ForceSendFields []string `json:"-"`
907
908	// NullFields is a list of field names (e.g. "UserInput") to include in
909	// API requests with the JSON null value. By default, fields with empty
910	// values are omitted from API requests. However, any field with an
911	// empty value appearing in NullFields will be sent to the server as
912	// null. It is an error if a field in this list has a non-empty value.
913	// This may be used to include null fields in Patch requests.
914	NullFields []string `json:"-"`
915}
916
917func (s *GoogleCloudDialogflowCxV3ConversationTurn) MarshalJSON() ([]byte, error) {
918	type NoMethod GoogleCloudDialogflowCxV3ConversationTurn
919	raw := NoMethod(*s)
920	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
921}
922
923// GoogleCloudDialogflowCxV3ConversationTurnUserInput: The input from
924// the human user.
925type GoogleCloudDialogflowCxV3ConversationTurnUserInput struct {
926	// EnableSentimentAnalysis: Whether sentiment analysis is enabled.
927	EnableSentimentAnalysis bool `json:"enableSentimentAnalysis,omitempty"`
928
929	// InjectedParameters: Parameters that need to be injected into the
930	// conversation during intent detection.
931	InjectedParameters googleapi.RawMessage `json:"injectedParameters,omitempty"`
932
933	// Input: Supports text input, event input, dtmf input in the test case.
934	Input *GoogleCloudDialogflowCxV3QueryInput `json:"input,omitempty"`
935
936	// IsWebhookEnabled: If webhooks should be allowed to trigger in
937	// response to the user utterance. Often if parameters are injected,
938	// webhooks should not be enabled.
939	IsWebhookEnabled bool `json:"isWebhookEnabled,omitempty"`
940
941	// ForceSendFields is a list of field names (e.g.
942	// "EnableSentimentAnalysis") to unconditionally include in API
943	// requests. By default, fields with empty values are omitted from API
944	// requests. However, any non-pointer, non-interface field appearing in
945	// ForceSendFields will be sent to the server regardless of whether the
946	// field is empty or not. This may be used to include empty fields in
947	// Patch requests.
948	ForceSendFields []string `json:"-"`
949
950	// NullFields is a list of field names (e.g. "EnableSentimentAnalysis")
951	// to include in API requests with the JSON null value. By default,
952	// fields with empty values are omitted from API requests. However, any
953	// field with an empty value appearing in NullFields will be sent to the
954	// server as null. It is an error if a field in this list has a
955	// non-empty value. This may be used to include null fields in Patch
956	// requests.
957	NullFields []string `json:"-"`
958}
959
960func (s *GoogleCloudDialogflowCxV3ConversationTurnUserInput) MarshalJSON() ([]byte, error) {
961	type NoMethod GoogleCloudDialogflowCxV3ConversationTurnUserInput
962	raw := NoMethod(*s)
963	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
964}
965
966// GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput: The
967// output from the virtual agent.
968type GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput struct {
969	// CurrentPage: The Page on which the utterance was spoken. Only name
970	// and displayName will be set.
971	CurrentPage *GoogleCloudDialogflowCxV3Page `json:"currentPage,omitempty"`
972
973	// DiagnosticInfo: Required. Input only. The diagnostic info output for
974	// the turn.
975	DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
976
977	// Differences: Output only. If this is part of a result conversation
978	// turn, the list of differences between the original run and the replay
979	// for this output, if any.
980	Differences []*GoogleCloudDialogflowCxV3TestRunDifference `json:"differences,omitempty"`
981
982	// SessionParameters: The session parameters available to the bot at
983	// this point.
984	SessionParameters googleapi.RawMessage `json:"sessionParameters,omitempty"`
985
986	// Status: Response error from the agent in the test result. If set,
987	// other output is empty.
988	Status *GoogleRpcStatus `json:"status,omitempty"`
989
990	// TextResponses: The text responses from the agent for the turn.
991	TextResponses []*GoogleCloudDialogflowCxV3ResponseMessageText `json:"textResponses,omitempty"`
992
993	// TriggeredIntent: The Intent that triggered the response. Only name
994	// and displayName will be set.
995	TriggeredIntent *GoogleCloudDialogflowCxV3Intent `json:"triggeredIntent,omitempty"`
996
997	// ForceSendFields is a list of field names (e.g. "CurrentPage") to
998	// unconditionally include in API requests. By default, fields with
999	// empty values are omitted from API requests. However, any non-pointer,
1000	// non-interface field appearing in ForceSendFields will be sent to the
1001	// server regardless of whether the field is empty or not. This may be
1002	// used to include empty fields in Patch requests.
1003	ForceSendFields []string `json:"-"`
1004
1005	// NullFields is a list of field names (e.g. "CurrentPage") to include
1006	// in API requests with the JSON null value. By default, fields with
1007	// empty values are omitted from API requests. However, any field with
1008	// an empty value appearing in NullFields will be sent to the server as
1009	// null. It is an error if a field in this list has a non-empty value.
1010	// This may be used to include null fields in Patch requests.
1011	NullFields []string `json:"-"`
1012}
1013
1014func (s *GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput) MarshalJSON() ([]byte, error) {
1015	type NoMethod GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput
1016	raw := NoMethod(*s)
1017	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1018}
1019
1020// GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata: Metadata
1021// for CreateDocument operation.
1022type GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata struct {
1023	// GenericMetadata: The generic information of the operation.
1024	GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
1025
1026	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
1027	// unconditionally include in API requests. By default, fields with
1028	// empty values are omitted from API requests. However, any non-pointer,
1029	// non-interface field appearing in ForceSendFields will be sent to the
1030	// server regardless of whether the field is empty or not. This may be
1031	// used to include empty fields in Patch requests.
1032	ForceSendFields []string `json:"-"`
1033
1034	// NullFields is a list of field names (e.g. "GenericMetadata") to
1035	// include in API requests with the JSON null value. By default, fields
1036	// with empty values are omitted from API requests. However, any field
1037	// with an empty value appearing in NullFields will be sent to the
1038	// server as null. It is an error if a field in this list has a
1039	// non-empty value. This may be used to include null fields in Patch
1040	// requests.
1041	NullFields []string `json:"-"`
1042}
1043
1044func (s *GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
1045	type NoMethod GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata
1046	raw := NoMethod(*s)
1047	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1048}
1049
1050// GoogleCloudDialogflowCxV3CreateVersionOperationMetadata: Metadata
1051// associated with the long running operation for
1052// Versions.CreateVersion.
1053type GoogleCloudDialogflowCxV3CreateVersionOperationMetadata struct {
1054	// Version: Name of the created version. Format:
1055	// `projects//locations//agents//flows//versions/`.
1056	Version string `json:"version,omitempty"`
1057
1058	// ForceSendFields is a list of field names (e.g. "Version") to
1059	// unconditionally include in API requests. By default, fields with
1060	// empty values are omitted from API requests. However, any non-pointer,
1061	// non-interface field appearing in ForceSendFields will be sent to the
1062	// server regardless of whether the field is empty or not. This may be
1063	// used to include empty fields in Patch requests.
1064	ForceSendFields []string `json:"-"`
1065
1066	// NullFields is a list of field names (e.g. "Version") to include in
1067	// API requests with the JSON null value. By default, fields with empty
1068	// values are omitted from API requests. However, any field with an
1069	// empty value appearing in NullFields will be sent to the server as
1070	// null. It is an error if a field in this list has a non-empty value.
1071	// This may be used to include null fields in Patch requests.
1072	NullFields []string `json:"-"`
1073}
1074
1075func (s *GoogleCloudDialogflowCxV3CreateVersionOperationMetadata) MarshalJSON() ([]byte, error) {
1076	type NoMethod GoogleCloudDialogflowCxV3CreateVersionOperationMetadata
1077	raw := NoMethod(*s)
1078	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1079}
1080
1081// GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata: Metadata
1082// for DeleteDocument operation.
1083type GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata struct {
1084	// GenericMetadata: The generic information of the operation.
1085	GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
1086
1087	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
1088	// unconditionally include in API requests. By default, fields with
1089	// empty values are omitted from API requests. However, any non-pointer,
1090	// non-interface field appearing in ForceSendFields will be sent to the
1091	// server regardless of whether the field is empty or not. This may be
1092	// used to include empty fields in Patch requests.
1093	ForceSendFields []string `json:"-"`
1094
1095	// NullFields is a list of field names (e.g. "GenericMetadata") to
1096	// include in API requests with the JSON null value. By default, fields
1097	// with empty values are omitted from API requests. However, any field
1098	// with an empty value appearing in NullFields will be sent to the
1099	// server as null. It is an error if a field in this list has a
1100	// non-empty value. This may be used to include null fields in Patch
1101	// requests.
1102	NullFields []string `json:"-"`
1103}
1104
1105func (s *GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
1106	type NoMethod GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata
1107	raw := NoMethod(*s)
1108	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1109}
1110
1111// GoogleCloudDialogflowCxV3DtmfInput: Represents the input for dtmf
1112// event.
1113type GoogleCloudDialogflowCxV3DtmfInput struct {
1114	// Digits: The dtmf digits.
1115	Digits string `json:"digits,omitempty"`
1116
1117	// FinishDigit: The finish digit (if any).
1118	FinishDigit string `json:"finishDigit,omitempty"`
1119
1120	// ForceSendFields is a list of field names (e.g. "Digits") to
1121	// unconditionally include in API requests. By default, fields with
1122	// empty values are omitted from API requests. However, any non-pointer,
1123	// non-interface field appearing in ForceSendFields will be sent to the
1124	// server regardless of whether the field is empty or not. This may be
1125	// used to include empty fields in Patch requests.
1126	ForceSendFields []string `json:"-"`
1127
1128	// NullFields is a list of field names (e.g. "Digits") to include in API
1129	// requests with the JSON null value. By default, fields with empty
1130	// values are omitted from API requests. However, any field with an
1131	// empty value appearing in NullFields will be sent to the server as
1132	// null. It is an error if a field in this list has a non-empty value.
1133	// This may be used to include null fields in Patch requests.
1134	NullFields []string `json:"-"`
1135}
1136
1137func (s *GoogleCloudDialogflowCxV3DtmfInput) MarshalJSON() ([]byte, error) {
1138	type NoMethod GoogleCloudDialogflowCxV3DtmfInput
1139	raw := NoMethod(*s)
1140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1141}
1142
1143// GoogleCloudDialogflowCxV3EventHandler: An event handler specifies an
1144// event that can be handled during a session. When the specified event
1145// happens, the following actions are taken in order: * If there is a
1146// `trigger_fulfillment` associated with the event, it will be called. *
1147// If there is a `target_page` associated with the event, the session
1148// will transition into the specified page. * If there is a
1149// `target_flow` associated with the event, the session will transition
1150// into the specified flow.
1151type GoogleCloudDialogflowCxV3EventHandler struct {
1152	// Event: Required. The name of the event to handle.
1153	Event string `json:"event,omitempty"`
1154
1155	// Name: Output only. The unique identifier of this event handler.
1156	Name string `json:"name,omitempty"`
1157
1158	// TargetFlow: The target flow to transition to. Format:
1159	// `projects//locations//agents//flows/`.
1160	TargetFlow string `json:"targetFlow,omitempty"`
1161
1162	// TargetPage: The target page to transition to. Format:
1163	// `projects//locations//agents//flows//pages/`.
1164	TargetPage string `json:"targetPage,omitempty"`
1165
1166	// TriggerFulfillment: The fulfillment to call when the event occurs.
1167	// Handling webhook errors with a fulfillment enabled with webhook could
1168	// cause infinite loop. It is invalid to specify such fulfillment for a
1169	// handler handling webhooks.
1170	TriggerFulfillment *GoogleCloudDialogflowCxV3Fulfillment `json:"triggerFulfillment,omitempty"`
1171
1172	// ForceSendFields is a list of field names (e.g. "Event") to
1173	// unconditionally include in API requests. By default, fields with
1174	// empty values are omitted from API requests. However, any non-pointer,
1175	// non-interface field appearing in ForceSendFields will be sent to the
1176	// server regardless of whether the field is empty or not. This may be
1177	// used to include empty fields in Patch requests.
1178	ForceSendFields []string `json:"-"`
1179
1180	// NullFields is a list of field names (e.g. "Event") to include in API
1181	// requests with the JSON null value. By default, fields with empty
1182	// values are omitted from API requests. However, any field with an
1183	// empty value appearing in NullFields will be sent to the server as
1184	// null. It is an error if a field in this list has a non-empty value.
1185	// This may be used to include null fields in Patch requests.
1186	NullFields []string `json:"-"`
1187}
1188
1189func (s *GoogleCloudDialogflowCxV3EventHandler) MarshalJSON() ([]byte, error) {
1190	type NoMethod GoogleCloudDialogflowCxV3EventHandler
1191	raw := NoMethod(*s)
1192	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1193}
1194
1195// GoogleCloudDialogflowCxV3EventInput: Represents the event to trigger.
1196type GoogleCloudDialogflowCxV3EventInput struct {
1197	// Event: Name of the event.
1198	Event string `json:"event,omitempty"`
1199
1200	// ForceSendFields is a list of field names (e.g. "Event") to
1201	// unconditionally include in API requests. By default, fields with
1202	// empty values are omitted from API requests. However, any non-pointer,
1203	// non-interface field appearing in ForceSendFields will be sent to the
1204	// server regardless of whether the field is empty or not. This may be
1205	// used to include empty fields in Patch requests.
1206	ForceSendFields []string `json:"-"`
1207
1208	// NullFields is a list of field names (e.g. "Event") to include in API
1209	// requests with the JSON null value. By default, fields with empty
1210	// values are omitted from API requests. However, any field with an
1211	// empty value appearing in NullFields will be sent to the server as
1212	// null. It is an error if a field in this list has a non-empty value.
1213	// This may be used to include null fields in Patch requests.
1214	NullFields []string `json:"-"`
1215}
1216
1217func (s *GoogleCloudDialogflowCxV3EventInput) MarshalJSON() ([]byte, error) {
1218	type NoMethod GoogleCloudDialogflowCxV3EventInput
1219	raw := NoMethod(*s)
1220	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1221}
1222
1223// GoogleCloudDialogflowCxV3ExportAgentResponse: The response message
1224// for Agents.ExportAgent.
1225type GoogleCloudDialogflowCxV3ExportAgentResponse struct {
1226	// AgentContent: Uncompressed raw byte content for agent.
1227	AgentContent string `json:"agentContent,omitempty"`
1228
1229	// AgentUri: The URI to a file containing the exported agent. This field
1230	// is populated only if `agent_uri` is specified in ExportAgentRequest.
1231	AgentUri string `json:"agentUri,omitempty"`
1232
1233	// ForceSendFields is a list of field names (e.g. "AgentContent") to
1234	// unconditionally include in API requests. By default, fields with
1235	// empty values are omitted from API requests. However, any non-pointer,
1236	// non-interface field appearing in ForceSendFields will be sent to the
1237	// server regardless of whether the field is empty or not. This may be
1238	// used to include empty fields in Patch requests.
1239	ForceSendFields []string `json:"-"`
1240
1241	// NullFields is a list of field names (e.g. "AgentContent") to include
1242	// in API requests with the JSON null value. By default, fields with
1243	// empty values are omitted from API requests. However, any field with
1244	// an empty value appearing in NullFields will be sent to the server as
1245	// null. It is an error if a field in this list has a non-empty value.
1246	// This may be used to include null fields in Patch requests.
1247	NullFields []string `json:"-"`
1248}
1249
1250func (s *GoogleCloudDialogflowCxV3ExportAgentResponse) MarshalJSON() ([]byte, error) {
1251	type NoMethod GoogleCloudDialogflowCxV3ExportAgentResponse
1252	raw := NoMethod(*s)
1253	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1254}
1255
1256// GoogleCloudDialogflowCxV3ExportFlowResponse: The response message for
1257// Flows.ExportFlow.
1258type GoogleCloudDialogflowCxV3ExportFlowResponse struct {
1259	// FlowContent: Uncompressed raw byte content for flow.
1260	FlowContent string `json:"flowContent,omitempty"`
1261
1262	// FlowUri: The URI to a file containing the exported flow. This field
1263	// is populated only if `flow_uri` is specified in ExportFlowRequest.
1264	FlowUri string `json:"flowUri,omitempty"`
1265
1266	// ForceSendFields is a list of field names (e.g. "FlowContent") to
1267	// unconditionally include in API requests. By default, fields with
1268	// empty values are omitted from API requests. However, any non-pointer,
1269	// non-interface field appearing in ForceSendFields will be sent to the
1270	// server regardless of whether the field is empty or not. This may be
1271	// used to include empty fields in Patch requests.
1272	ForceSendFields []string `json:"-"`
1273
1274	// NullFields is a list of field names (e.g. "FlowContent") to include
1275	// in API requests with the JSON null value. By default, fields with
1276	// empty values are omitted from API requests. However, any field with
1277	// an empty value appearing in NullFields will be sent to the server as
1278	// null. It is an error if a field in this list has a non-empty value.
1279	// This may be used to include null fields in Patch requests.
1280	NullFields []string `json:"-"`
1281}
1282
1283func (s *GoogleCloudDialogflowCxV3ExportFlowResponse) MarshalJSON() ([]byte, error) {
1284	type NoMethod GoogleCloudDialogflowCxV3ExportFlowResponse
1285	raw := NoMethod(*s)
1286	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1287}
1288
1289// GoogleCloudDialogflowCxV3ExportTestCasesMetadata: Metadata returned
1290// for the TestCases.ExportTestCases long running operation.
1291type GoogleCloudDialogflowCxV3ExportTestCasesMetadata struct {
1292}
1293
1294// GoogleCloudDialogflowCxV3ExportTestCasesResponse: The response
1295// message for TestCases.ExportTestCases.
1296type GoogleCloudDialogflowCxV3ExportTestCasesResponse struct {
1297	// Content: Uncompressed raw byte content for test cases.
1298	Content string `json:"content,omitempty"`
1299
1300	// GcsUri: The URI to a file containing the exported test cases. This
1301	// field is populated only if `gcs_uri` is specified in
1302	// ExportTestCasesRequest.
1303	GcsUri string `json:"gcsUri,omitempty"`
1304
1305	// ForceSendFields is a list of field names (e.g. "Content") to
1306	// unconditionally include in API requests. By default, fields with
1307	// empty values are omitted from API requests. However, any non-pointer,
1308	// non-interface field appearing in ForceSendFields will be sent to the
1309	// server regardless of whether the field is empty or not. This may be
1310	// used to include empty fields in Patch requests.
1311	ForceSendFields []string `json:"-"`
1312
1313	// NullFields is a list of field names (e.g. "Content") to include in
1314	// API requests with the JSON null value. By default, fields with empty
1315	// values are omitted from API requests. However, any field with an
1316	// empty value appearing in NullFields will be sent to the server as
1317	// null. It is an error if a field in this list has a non-empty value.
1318	// This may be used to include null fields in Patch requests.
1319	NullFields []string `json:"-"`
1320}
1321
1322func (s *GoogleCloudDialogflowCxV3ExportTestCasesResponse) MarshalJSON() ([]byte, error) {
1323	type NoMethod GoogleCloudDialogflowCxV3ExportTestCasesResponse
1324	raw := NoMethod(*s)
1325	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1326}
1327
1328// GoogleCloudDialogflowCxV3Form: A form is a data model that groups
1329// related parameters that can be collected from the user. The process
1330// in which the agent prompts the user and collects parameter values
1331// from the user is called form filling. A form can be added to a page.
1332// When form filling is done, the filled parameters will be written to
1333// the session.
1334type GoogleCloudDialogflowCxV3Form struct {
1335	// Parameters: Parameters to collect from the user.
1336	Parameters []*GoogleCloudDialogflowCxV3FormParameter `json:"parameters,omitempty"`
1337
1338	// ForceSendFields is a list of field names (e.g. "Parameters") to
1339	// unconditionally include in API requests. By default, fields with
1340	// empty values are omitted from API requests. However, any non-pointer,
1341	// non-interface field appearing in ForceSendFields will be sent to the
1342	// server regardless of whether the field is empty or not. This may be
1343	// used to include empty fields in Patch requests.
1344	ForceSendFields []string `json:"-"`
1345
1346	// NullFields is a list of field names (e.g. "Parameters") to include in
1347	// API requests with the JSON null value. By default, fields with empty
1348	// values are omitted from API requests. However, any field with an
1349	// empty value appearing in NullFields will be sent to the server as
1350	// null. It is an error if a field in this list has a non-empty value.
1351	// This may be used to include null fields in Patch requests.
1352	NullFields []string `json:"-"`
1353}
1354
1355func (s *GoogleCloudDialogflowCxV3Form) MarshalJSON() ([]byte, error) {
1356	type NoMethod GoogleCloudDialogflowCxV3Form
1357	raw := NoMethod(*s)
1358	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1359}
1360
1361// GoogleCloudDialogflowCxV3FormParameter: Represents a form parameter.
1362type GoogleCloudDialogflowCxV3FormParameter struct {
1363	// DefaultValue: The default value of an optional parameter. If the
1364	// parameter is required, the default value will be ignored.
1365	DefaultValue interface{} `json:"defaultValue,omitempty"`
1366
1367	// DisplayName: Required. The human-readable name of the parameter,
1368	// unique within the form.
1369	DisplayName string `json:"displayName,omitempty"`
1370
1371	// EntityType: Required. The entity type of the parameter. Format:
1372	// `projects/-/locations/-/agents/-/entityTypes/` for system entity
1373	// types (for example,
1374	// `projects/-/locations/-/agents/-/entityTypes/sys.date`), or
1375	// `projects//locations//agents//entityTypes/` for developer entity
1376	// types.
1377	EntityType string `json:"entityType,omitempty"`
1378
1379	// FillBehavior: Required. Defines fill behavior for the parameter.
1380	FillBehavior *GoogleCloudDialogflowCxV3FormParameterFillBehavior `json:"fillBehavior,omitempty"`
1381
1382	// IsList: Indicates whether the parameter represents a list of values.
1383	IsList bool `json:"isList,omitempty"`
1384
1385	// Redact: Indicates whether the parameter content should be redacted in
1386	// log. If redaction is enabled, the parameter content will be replaced
1387	// by parameter name during logging. Note: the parameter content is
1388	// subject to redaction if either parameter level redaction or entity
1389	// type level redaction is enabled.
1390	Redact bool `json:"redact,omitempty"`
1391
1392	// Required: Indicates whether the parameter is required. Optional
1393	// parameters will not trigger prompts; however, they are filled if the
1394	// user specifies them. Required parameters must be filled before form
1395	// filling concludes.
1396	Required bool `json:"required,omitempty"`
1397
1398	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
1399	// unconditionally include in API requests. By default, fields with
1400	// empty values are omitted from API requests. However, any non-pointer,
1401	// non-interface field appearing in ForceSendFields will be sent to the
1402	// server regardless of whether the field is empty or not. This may be
1403	// used to include empty fields in Patch requests.
1404	ForceSendFields []string `json:"-"`
1405
1406	// NullFields is a list of field names (e.g. "DefaultValue") to include
1407	// in API requests with the JSON null value. By default, fields with
1408	// empty values are omitted from API requests. However, any field with
1409	// an empty value appearing in NullFields will be sent to the server as
1410	// null. It is an error if a field in this list has a non-empty value.
1411	// This may be used to include null fields in Patch requests.
1412	NullFields []string `json:"-"`
1413}
1414
1415func (s *GoogleCloudDialogflowCxV3FormParameter) MarshalJSON() ([]byte, error) {
1416	type NoMethod GoogleCloudDialogflowCxV3FormParameter
1417	raw := NoMethod(*s)
1418	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1419}
1420
1421// GoogleCloudDialogflowCxV3FormParameterFillBehavior: Configuration for
1422// how the filling of a parameter should be handled.
1423type GoogleCloudDialogflowCxV3FormParameterFillBehavior struct {
1424	// InitialPromptFulfillment: Required. The fulfillment to provide the
1425	// initial prompt that the agent can present to the user in order to
1426	// fill the parameter.
1427	InitialPromptFulfillment *GoogleCloudDialogflowCxV3Fulfillment `json:"initialPromptFulfillment,omitempty"`
1428
1429	// RepromptEventHandlers: The handlers for parameter-level events, used
1430	// to provide reprompt for the parameter or transition to a different
1431	// page/flow. The supported events are: * `sys.no-match-`, where N can
1432	// be from 1 to 6 * `sys.no-match-default` * `sys.no-input-`, where N
1433	// can be from 1 to 6 * `sys.no-input-default` * `sys.invalid-parameter`
1434	// `initial_prompt_fulfillment` provides the first prompt for the
1435	// parameter. If the user's response does not fill the parameter, a
1436	// no-match/no-input event will be triggered, and the fulfillment
1437	// associated with the `sys.no-match-1`/`sys.no-input-1` handler (if
1438	// defined) will be called to provide a prompt. The
1439	// `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond
1440	// to the next no-match/no-input event, and so on. A
1441	// `sys.no-match-default` or `sys.no-input-default` handler will be used
1442	// to handle all following no-match/no-input events after all numbered
1443	// no-match/no-input handlers for the parameter are consumed. A
1444	// `sys.invalid-parameter` handler can be defined to handle the case
1445	// where the parameter values have been `invalidated` by webhook. For
1446	// example, if the user's response fill the parameter, however the
1447	// parameter was invalidated by webhook, the fulfillment associated with
1448	// the `sys.invalid-parameter` handler (if defined) will be called to
1449	// provide a prompt. If the event handler for the corresponding event
1450	// can't be found on the parameter, `initial_prompt_fulfillment` will be
1451	// re-prompted.
1452	RepromptEventHandlers []*GoogleCloudDialogflowCxV3EventHandler `json:"repromptEventHandlers,omitempty"`
1453
1454	// ForceSendFields is a list of field names (e.g.
1455	// "InitialPromptFulfillment") to unconditionally include in API
1456	// requests. By default, fields with empty values are omitted from API
1457	// requests. However, any non-pointer, non-interface field appearing in
1458	// ForceSendFields will be sent to the server regardless of whether the
1459	// field is empty or not. This may be used to include empty fields in
1460	// Patch requests.
1461	ForceSendFields []string `json:"-"`
1462
1463	// NullFields is a list of field names (e.g. "InitialPromptFulfillment")
1464	// to include in API requests with the JSON null value. By default,
1465	// fields with empty values are omitted from API requests. However, any
1466	// field with an empty value appearing in NullFields will be sent to the
1467	// server as null. It is an error if a field in this list has a
1468	// non-empty value. This may be used to include null fields in Patch
1469	// requests.
1470	NullFields []string `json:"-"`
1471}
1472
1473func (s *GoogleCloudDialogflowCxV3FormParameterFillBehavior) MarshalJSON() ([]byte, error) {
1474	type NoMethod GoogleCloudDialogflowCxV3FormParameterFillBehavior
1475	raw := NoMethod(*s)
1476	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1477}
1478
1479// GoogleCloudDialogflowCxV3Fulfillment: A fulfillment can do one or
1480// more of the following actions at the same time: * Generate rich
1481// message responses. * Set parameter values. * Call the webhook.
1482// Fulfillments can be called at various stages in the Page or Form
1483// lifecycle. For example, when a DetectIntentRequest drives a session
1484// to enter a new page, the page's entry fulfillment can add a static
1485// response to the QueryResult in the returning DetectIntentResponse,
1486// call the webhook (for example, to load user data from a database), or
1487// both.
1488type GoogleCloudDialogflowCxV3Fulfillment struct {
1489	// ConditionalCases: Conditional cases for this fulfillment.
1490	ConditionalCases []*GoogleCloudDialogflowCxV3FulfillmentConditionalCases `json:"conditionalCases,omitempty"`
1491
1492	// Messages: The list of rich message responses to present to the user.
1493	Messages []*GoogleCloudDialogflowCxV3ResponseMessage `json:"messages,omitempty"`
1494
1495	// ReturnPartialResponses: Whether Dialogflow should return currently
1496	// queued fulfillment response messages in streaming APIs. If a webhook
1497	// is specified, it happens before Dialogflow invokes webhook. Warning:
1498	// 1) This flag only affects streaming API. Responses are still queued
1499	// and returned once in non-streaming API. 2) The flag can be enabled in
1500	// any fulfillment but only the first 3 partial responses will be
1501	// returned. You may only want to apply it to fulfillments that have
1502	// slow webhooks.
1503	ReturnPartialResponses bool `json:"returnPartialResponses,omitempty"`
1504
1505	// SetParameterActions: Set parameter values before executing the
1506	// webhook.
1507	SetParameterActions []*GoogleCloudDialogflowCxV3FulfillmentSetParameterAction `json:"setParameterActions,omitempty"`
1508
1509	// Tag: The tag used by the webhook to identify which fulfillment is
1510	// being called. This field is required if `webhook` is specified.
1511	Tag string `json:"tag,omitempty"`
1512
1513	// Webhook: The webhook to call. Format:
1514	// `projects//locations//agents//webhooks/`.
1515	Webhook string `json:"webhook,omitempty"`
1516
1517	// ForceSendFields is a list of field names (e.g. "ConditionalCases") to
1518	// unconditionally include in API requests. By default, fields with
1519	// empty values are omitted from API requests. However, any non-pointer,
1520	// non-interface field appearing in ForceSendFields will be sent to the
1521	// server regardless of whether the field is empty or not. This may be
1522	// used to include empty fields in Patch requests.
1523	ForceSendFields []string `json:"-"`
1524
1525	// NullFields is a list of field names (e.g. "ConditionalCases") to
1526	// include in API requests with the JSON null value. By default, fields
1527	// with empty values are omitted from API requests. However, any field
1528	// with an empty value appearing in NullFields will be sent to the
1529	// server as null. It is an error if a field in this list has a
1530	// non-empty value. This may be used to include null fields in Patch
1531	// requests.
1532	NullFields []string `json:"-"`
1533}
1534
1535func (s *GoogleCloudDialogflowCxV3Fulfillment) MarshalJSON() ([]byte, error) {
1536	type NoMethod GoogleCloudDialogflowCxV3Fulfillment
1537	raw := NoMethod(*s)
1538	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1539}
1540
1541// GoogleCloudDialogflowCxV3FulfillmentConditionalCases: A list of
1542// cascading if-else conditions. Cases are mutually exclusive. The first
1543// one with a matching condition is selected, all the rest ignored.
1544type GoogleCloudDialogflowCxV3FulfillmentConditionalCases struct {
1545	// Cases: A list of cascading if-else conditions.
1546	Cases []*GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase `json:"cases,omitempty"`
1547
1548	// ForceSendFields is a list of field names (e.g. "Cases") to
1549	// unconditionally include in API requests. By default, fields with
1550	// empty values are omitted from API requests. However, any non-pointer,
1551	// non-interface field appearing in ForceSendFields will be sent to the
1552	// server regardless of whether the field is empty or not. This may be
1553	// used to include empty fields in Patch requests.
1554	ForceSendFields []string `json:"-"`
1555
1556	// NullFields is a list of field names (e.g. "Cases") to include in API
1557	// requests with the JSON null value. By default, fields with empty
1558	// values are omitted from API requests. However, any field with an
1559	// empty value appearing in NullFields will be sent to the server as
1560	// null. It is an error if a field in this list has a non-empty value.
1561	// This may be used to include null fields in Patch requests.
1562	NullFields []string `json:"-"`
1563}
1564
1565func (s *GoogleCloudDialogflowCxV3FulfillmentConditionalCases) MarshalJSON() ([]byte, error) {
1566	type NoMethod GoogleCloudDialogflowCxV3FulfillmentConditionalCases
1567	raw := NoMethod(*s)
1568	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1569}
1570
1571// GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase: Each case
1572// has a Boolean condition. When it is evaluated to be True, the
1573// corresponding messages will be selected and evaluated recursively.
1574type GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase struct {
1575	// CaseContent: A list of case content.
1576	CaseContent []*GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent `json:"caseContent,omitempty"`
1577
1578	// Condition: The condition to activate and select this case. Empty
1579	// means the condition is always true. The condition is evaluated
1580	// against form parameters or session parameters. See the conditions
1581	// reference
1582	// (https://cloud.google.com/dialogflow/cx/docs/reference/condition).
1583	Condition string `json:"condition,omitempty"`
1584
1585	// ForceSendFields is a list of field names (e.g. "CaseContent") to
1586	// unconditionally include in API requests. By default, fields with
1587	// empty values are omitted from API requests. However, any non-pointer,
1588	// non-interface field appearing in ForceSendFields will be sent to the
1589	// server regardless of whether the field is empty or not. This may be
1590	// used to include empty fields in Patch requests.
1591	ForceSendFields []string `json:"-"`
1592
1593	// NullFields is a list of field names (e.g. "CaseContent") to include
1594	// in API requests with the JSON null value. By default, fields with
1595	// empty values are omitted from API requests. However, any field with
1596	// an empty value appearing in NullFields will be sent to the server as
1597	// null. It is an error if a field in this list has a non-empty value.
1598	// This may be used to include null fields in Patch requests.
1599	NullFields []string `json:"-"`
1600}
1601
1602func (s *GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase) MarshalJSON() ([]byte, error) {
1603	type NoMethod GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase
1604	raw := NoMethod(*s)
1605	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1606}
1607
1608// GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent:
1609// The list of messages or conditional cases to activate for this case.
1610type GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent struct {
1611	// AdditionalCases: Additional cases to be evaluated.
1612	AdditionalCases *GoogleCloudDialogflowCxV3FulfillmentConditionalCases `json:"additionalCases,omitempty"`
1613
1614	// Message: Returned message.
1615	Message *GoogleCloudDialogflowCxV3ResponseMessage `json:"message,omitempty"`
1616
1617	// ForceSendFields is a list of field names (e.g. "AdditionalCases") to
1618	// unconditionally include in API requests. By default, fields with
1619	// empty values are omitted from API requests. However, any non-pointer,
1620	// non-interface field appearing in ForceSendFields will be sent to the
1621	// server regardless of whether the field is empty or not. This may be
1622	// used to include empty fields in Patch requests.
1623	ForceSendFields []string `json:"-"`
1624
1625	// NullFields is a list of field names (e.g. "AdditionalCases") to
1626	// include in API requests with the JSON null value. By default, fields
1627	// with empty values are omitted from API requests. However, any field
1628	// with an empty value appearing in NullFields will be sent to the
1629	// server as null. It is an error if a field in this list has a
1630	// non-empty value. This may be used to include null fields in Patch
1631	// requests.
1632	NullFields []string `json:"-"`
1633}
1634
1635func (s *GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent) MarshalJSON() ([]byte, error) {
1636	type NoMethod GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent
1637	raw := NoMethod(*s)
1638	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1639}
1640
1641// GoogleCloudDialogflowCxV3FulfillmentSetParameterAction: Setting a
1642// parameter value.
1643type GoogleCloudDialogflowCxV3FulfillmentSetParameterAction struct {
1644	// Parameter: Display name of the parameter.
1645	Parameter string `json:"parameter,omitempty"`
1646
1647	// Value: The new value of the parameter. A null value clears the
1648	// parameter.
1649	Value interface{} `json:"value,omitempty"`
1650
1651	// ForceSendFields is a list of field names (e.g. "Parameter") to
1652	// unconditionally include in API requests. By default, fields with
1653	// empty values are omitted from API requests. However, any non-pointer,
1654	// non-interface field appearing in ForceSendFields will be sent to the
1655	// server regardless of whether the field is empty or not. This may be
1656	// used to include empty fields in Patch requests.
1657	ForceSendFields []string `json:"-"`
1658
1659	// NullFields is a list of field names (e.g. "Parameter") to include in
1660	// API requests with the JSON null value. By default, fields with empty
1661	// values are omitted from API requests. However, any field with an
1662	// empty value appearing in NullFields will be sent to the server as
1663	// null. It is an error if a field in this list has a non-empty value.
1664	// This may be used to include null fields in Patch requests.
1665	NullFields []string `json:"-"`
1666}
1667
1668func (s *GoogleCloudDialogflowCxV3FulfillmentSetParameterAction) MarshalJSON() ([]byte, error) {
1669	type NoMethod GoogleCloudDialogflowCxV3FulfillmentSetParameterAction
1670	raw := NoMethod(*s)
1671	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1672}
1673
1674// GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata: Metadata
1675// in google::longrunning::Operation for Knowledge operations.
1676type GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata struct {
1677	// State: Required. Output only. The current state of this operation.
1678	//
1679	// Possible values:
1680	//   "STATE_UNSPECIFIED" - State unspecified.
1681	//   "PENDING" - The operation has been created.
1682	//   "RUNNING" - The operation is currently running.
1683	//   "DONE" - The operation is done, either cancelled or completed.
1684	State string `json:"state,omitempty"`
1685
1686	// ForceSendFields is a list of field names (e.g. "State") to
1687	// unconditionally include in API requests. By default, fields with
1688	// empty values are omitted from API requests. However, any non-pointer,
1689	// non-interface field appearing in ForceSendFields will be sent to the
1690	// server regardless of whether the field is empty or not. This may be
1691	// used to include empty fields in Patch requests.
1692	ForceSendFields []string `json:"-"`
1693
1694	// NullFields is a list of field names (e.g. "State") to include in API
1695	// requests with the JSON null value. By default, fields with empty
1696	// values are omitted from API requests. However, any field with an
1697	// empty value appearing in NullFields will be sent to the server as
1698	// null. It is an error if a field in this list has a non-empty value.
1699	// This may be used to include null fields in Patch requests.
1700	NullFields []string `json:"-"`
1701}
1702
1703func (s *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) {
1704	type NoMethod GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata
1705	raw := NoMethod(*s)
1706	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1707}
1708
1709// GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata: Metadata
1710// for ImportDocuments operation.
1711type GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata struct {
1712	// GenericMetadata: The generic information of the operation.
1713	GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
1714
1715	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
1716	// unconditionally include in API requests. By default, fields with
1717	// empty values are omitted from API requests. However, any non-pointer,
1718	// non-interface field appearing in ForceSendFields will be sent to the
1719	// server regardless of whether the field is empty or not. This may be
1720	// used to include empty fields in Patch requests.
1721	ForceSendFields []string `json:"-"`
1722
1723	// NullFields is a list of field names (e.g. "GenericMetadata") to
1724	// include in API requests with the JSON null value. By default, fields
1725	// with empty values are omitted from API requests. However, any field
1726	// with an empty value appearing in NullFields will be sent to the
1727	// server as null. It is an error if a field in this list has a
1728	// non-empty value. This may be used to include null fields in Patch
1729	// requests.
1730	NullFields []string `json:"-"`
1731}
1732
1733func (s *GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) {
1734	type NoMethod GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata
1735	raw := NoMethod(*s)
1736	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1737}
1738
1739// GoogleCloudDialogflowCxV3ImportDocumentsResponse: Response message
1740// for Documents.ImportDocuments.
1741type GoogleCloudDialogflowCxV3ImportDocumentsResponse struct {
1742	// Warnings: Includes details about skipped documents or any other
1743	// warnings.
1744	Warnings []*GoogleRpcStatus `json:"warnings,omitempty"`
1745
1746	// ForceSendFields is a list of field names (e.g. "Warnings") to
1747	// unconditionally include in API requests. By default, fields with
1748	// empty values are omitted from API requests. However, any non-pointer,
1749	// non-interface field appearing in ForceSendFields will be sent to the
1750	// server regardless of whether the field is empty or not. This may be
1751	// used to include empty fields in Patch requests.
1752	ForceSendFields []string `json:"-"`
1753
1754	// NullFields is a list of field names (e.g. "Warnings") to include in
1755	// API requests with the JSON null value. By default, fields with empty
1756	// values are omitted from API requests. However, any field with an
1757	// empty value appearing in NullFields will be sent to the server as
1758	// null. It is an error if a field in this list has a non-empty value.
1759	// This may be used to include null fields in Patch requests.
1760	NullFields []string `json:"-"`
1761}
1762
1763func (s *GoogleCloudDialogflowCxV3ImportDocumentsResponse) MarshalJSON() ([]byte, error) {
1764	type NoMethod GoogleCloudDialogflowCxV3ImportDocumentsResponse
1765	raw := NoMethod(*s)
1766	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1767}
1768
1769// GoogleCloudDialogflowCxV3ImportFlowResponse: The response message for
1770// Flows.ImportFlow.
1771type GoogleCloudDialogflowCxV3ImportFlowResponse struct {
1772	// Flow: The unique identifier of the new flow. Format:
1773	// `projects//locations//agents//flows/`.
1774	Flow string `json:"flow,omitempty"`
1775
1776	// ForceSendFields is a list of field names (e.g. "Flow") to
1777	// unconditionally include in API requests. By default, fields with
1778	// empty values are omitted from API requests. However, any non-pointer,
1779	// non-interface field appearing in ForceSendFields will be sent to the
1780	// server regardless of whether the field is empty or not. This may be
1781	// used to include empty fields in Patch requests.
1782	ForceSendFields []string `json:"-"`
1783
1784	// NullFields is a list of field names (e.g. "Flow") to include in API
1785	// requests with the JSON null value. By default, fields with empty
1786	// values are omitted from API requests. However, any field with an
1787	// empty value appearing in NullFields will be sent to the server as
1788	// null. It is an error if a field in this list has a non-empty value.
1789	// This may be used to include null fields in Patch requests.
1790	NullFields []string `json:"-"`
1791}
1792
1793func (s *GoogleCloudDialogflowCxV3ImportFlowResponse) MarshalJSON() ([]byte, error) {
1794	type NoMethod GoogleCloudDialogflowCxV3ImportFlowResponse
1795	raw := NoMethod(*s)
1796	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1797}
1798
1799// GoogleCloudDialogflowCxV3ImportTestCasesMetadata: Metadata returned
1800// for the TestCases.ImportTestCases long running operation.
1801type GoogleCloudDialogflowCxV3ImportTestCasesMetadata struct {
1802	// Errors: Errors for failed test cases.
1803	Errors []*GoogleCloudDialogflowCxV3TestCaseError `json:"errors,omitempty"`
1804
1805	// ForceSendFields is a list of field names (e.g. "Errors") to
1806	// unconditionally include in API requests. By default, fields with
1807	// empty values are omitted from API requests. However, any non-pointer,
1808	// non-interface field appearing in ForceSendFields will be sent to the
1809	// server regardless of whether the field is empty or not. This may be
1810	// used to include empty fields in Patch requests.
1811	ForceSendFields []string `json:"-"`
1812
1813	// NullFields is a list of field names (e.g. "Errors") to include in API
1814	// requests with the JSON null value. By default, fields with empty
1815	// values are omitted from API requests. However, any field with an
1816	// empty value appearing in NullFields will be sent to the server as
1817	// null. It is an error if a field in this list has a non-empty value.
1818	// This may be used to include null fields in Patch requests.
1819	NullFields []string `json:"-"`
1820}
1821
1822func (s *GoogleCloudDialogflowCxV3ImportTestCasesMetadata) MarshalJSON() ([]byte, error) {
1823	type NoMethod GoogleCloudDialogflowCxV3ImportTestCasesMetadata
1824	raw := NoMethod(*s)
1825	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1826}
1827
1828// GoogleCloudDialogflowCxV3ImportTestCasesResponse: The response
1829// message for TestCases.ImportTestCases.
1830type GoogleCloudDialogflowCxV3ImportTestCasesResponse struct {
1831	// Names: The unique identifiers of the new test cases. Format:
1832	// `projects//locations//agents//testCases/`.
1833	Names []string `json:"names,omitempty"`
1834
1835	// ForceSendFields is a list of field names (e.g. "Names") to
1836	// unconditionally include in API requests. By default, fields with
1837	// empty values are omitted from API requests. However, any non-pointer,
1838	// non-interface field appearing in ForceSendFields will be sent to the
1839	// server regardless of whether the field is empty or not. This may be
1840	// used to include empty fields in Patch requests.
1841	ForceSendFields []string `json:"-"`
1842
1843	// NullFields is a list of field names (e.g. "Names") to include in API
1844	// requests with the JSON null value. By default, fields with empty
1845	// values are omitted from API requests. However, any field with an
1846	// empty value appearing in NullFields will be sent to the server as
1847	// null. It is an error if a field in this list has a non-empty value.
1848	// This may be used to include null fields in Patch requests.
1849	NullFields []string `json:"-"`
1850}
1851
1852func (s *GoogleCloudDialogflowCxV3ImportTestCasesResponse) MarshalJSON() ([]byte, error) {
1853	type NoMethod GoogleCloudDialogflowCxV3ImportTestCasesResponse
1854	raw := NoMethod(*s)
1855	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1856}
1857
1858// GoogleCloudDialogflowCxV3InputAudioConfig: Instructs the speech
1859// recognizer on how to process the audio content.
1860type GoogleCloudDialogflowCxV3InputAudioConfig struct {
1861	// AudioEncoding: Required. Audio encoding of the audio content to
1862	// process.
1863	//
1864	// Possible values:
1865	//   "AUDIO_ENCODING_UNSPECIFIED" - Not specified.
1866	//   "AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
1867	// little-endian samples (Linear PCM).
1868	//   "AUDIO_ENCODING_FLAC" -
1869	// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless
1870	// Audio Codec) is the recommended encoding because it is lossless
1871	// (therefore recognition is not compromised) and requires only about
1872	// half the bandwidth of `LINEAR16`. `FLAC` stream encoding supports
1873	// 16-bit and 24-bit samples, however, not all fields in `STREAMINFO`
1874	// are supported.
1875	//   "AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit audio
1876	// samples using G.711 PCMU/mu-law.
1877	//   "AUDIO_ENCODING_AMR" - Adaptive Multi-Rate Narrowband codec.
1878	// `sample_rate_hertz` must be 8000.
1879	//   "AUDIO_ENCODING_AMR_WB" - Adaptive Multi-Rate Wideband codec.
1880	// `sample_rate_hertz` must be 16000.
1881	//   "AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio frames in Ogg
1882	// container ([OggOpus](https://wiki.xiph.org/OggOpus)).
1883	// `sample_rate_hertz` must be 16000.
1884	//   "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE" - Although the use of lossy
1885	// encodings is not recommended, if a very low bitrate encoding is
1886	// required, `OGG_OPUS` is highly preferred over Speex encoding. The
1887	// [Speex](https://speex.org/) encoding supported by Dialogflow API has
1888	// a header byte in each block, as in MIME type
1889	// `audio/x-speex-with-header-byte`. It is a variant of the RTP Speex
1890	// encoding defined in [RFC 5574](https://tools.ietf.org/html/rfc5574).
1891	// The stream is a sequence of blocks, one block per RTP packet. Each
1892	// block starts with a byte containing the length of the block, in
1893	// bytes, followed by one or more frames of Speex data, padded to an
1894	// integral number of bytes (octets) as specified in RFC 5574. In other
1895	// words, each RTP header is replaced with a single byte containing the
1896	// block length. Only Speex wideband is supported. `sample_rate_hertz`
1897	// must be 16000.
1898	AudioEncoding string `json:"audioEncoding,omitempty"`
1899
1900	// EnableWordInfo: Optional. If `true`, Dialogflow returns
1901	// SpeechWordInfo in StreamingRecognitionResult with information about
1902	// the recognized speech words, e.g. start and end time offsets. If
1903	// false or unspecified, Speech doesn't return any word-level
1904	// information.
1905	EnableWordInfo bool `json:"enableWordInfo,omitempty"`
1906
1907	// Model: Optional. Which Speech model to select for the given request.
1908	// Select the model best suited to your domain to get best results. If a
1909	// model is not explicitly specified, then we auto-select a model based
1910	// on the parameters in the InputAudioConfig. If enhanced speech model
1911	// is enabled for the agent and an enhanced version of the specified
1912	// model for the language does not exist, then the speech is recognized
1913	// using the standard version of the specified model. Refer to Cloud
1914	// Speech API documentation
1915	// (https://cloud.google.com/speech-to-text/docs/basics#select-model)
1916	// for more details.
1917	Model string `json:"model,omitempty"`
1918
1919	// ModelVariant: Optional. Which variant of the Speech model to use.
1920	//
1921	// Possible values:
1922	//   "SPEECH_MODEL_VARIANT_UNSPECIFIED" - No model variant specified. In
1923	// this case Dialogflow defaults to USE_BEST_AVAILABLE.
1924	//   "USE_BEST_AVAILABLE" - Use the best available variant of the Speech
1925	// model that the caller is eligible for. Please see the [Dialogflow
1926	// docs](https://cloud.google.com/dialogflow/docs/data-logging) for how
1927	// to make your project eligible for enhanced models.
1928	//   "USE_STANDARD" - Use standard model variant even if an enhanced
1929	// model is available. See the [Cloud Speech
1930	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
1931	// odels) for details about enhanced models.
1932	//   "USE_ENHANCED" - Use an enhanced model variant: * If an enhanced
1933	// variant does not exist for the given model and request language,
1934	// Dialogflow falls back to the standard variant. The [Cloud Speech
1935	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
1936	// odels) describes which models have enhanced variants. * If the API
1937	// caller isn't eligible for enhanced models, Dialogflow returns an
1938	// error. Please see the [Dialogflow
1939	// docs](https://cloud.google.com/dialogflow/docs/data-logging) for how
1940	// to make your project eligible.
1941	ModelVariant string `json:"modelVariant,omitempty"`
1942
1943	// PhraseHints: Optional. A list of strings containing words and phrases
1944	// that the speech recognizer should recognize with higher likelihood.
1945	// See the Cloud Speech documentation
1946	// (https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
1947	// for more details.
1948	PhraseHints []string `json:"phraseHints,omitempty"`
1949
1950	// SampleRateHertz: Sample rate (in Hertz) of the audio content sent in
1951	// the query. Refer to Cloud Speech API documentation
1952	// (https://cloud.google.com/speech-to-text/docs/basics) for more
1953	// details.
1954	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
1955
1956	// SingleUtterance: Optional. If `false` (default), recognition does not
1957	// cease until the client closes the stream. If `true`, the recognizer
1958	// will detect a single spoken utterance in input audio. Recognition
1959	// ceases when it detects the audio's voice has stopped or paused. In
1960	// this case, once a detected intent is received, the client should
1961	// close the stream and start a new request with a new stream as needed.
1962	// Note: This setting is relevant only for streaming methods.
1963	SingleUtterance bool `json:"singleUtterance,omitempty"`
1964
1965	// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
1966	// unconditionally include in API requests. By default, fields with
1967	// empty values are omitted from API requests. However, any non-pointer,
1968	// non-interface field appearing in ForceSendFields will be sent to the
1969	// server regardless of whether the field is empty or not. This may be
1970	// used to include empty fields in Patch requests.
1971	ForceSendFields []string `json:"-"`
1972
1973	// NullFields is a list of field names (e.g. "AudioEncoding") to include
1974	// in API requests with the JSON null value. By default, fields with
1975	// empty values are omitted from API requests. However, any field with
1976	// an empty value appearing in NullFields will be sent to the server as
1977	// null. It is an error if a field in this list has a non-empty value.
1978	// This may be used to include null fields in Patch requests.
1979	NullFields []string `json:"-"`
1980}
1981
1982func (s *GoogleCloudDialogflowCxV3InputAudioConfig) MarshalJSON() ([]byte, error) {
1983	type NoMethod GoogleCloudDialogflowCxV3InputAudioConfig
1984	raw := NoMethod(*s)
1985	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1986}
1987
1988// GoogleCloudDialogflowCxV3Intent: An intent represents a user's intent
1989// to interact with a conversational agent. You can provide information
1990// for the Dialogflow API to use to match user input to an intent by
1991// adding training phrases (i.e., examples of user input) to your
1992// intent.
1993type GoogleCloudDialogflowCxV3Intent struct {
1994	// Description: Human readable description for better understanding an
1995	// intent like its scope, content, result etc. Maximum character limit:
1996	// 140 characters.
1997	Description string `json:"description,omitempty"`
1998
1999	// DisplayName: Required. The human-readable name of the intent, unique
2000	// within the agent.
2001	DisplayName string `json:"displayName,omitempty"`
2002
2003	// IsFallback: Indicates whether this is a fallback intent. Currently
2004	// only default fallback intent is allowed in the agent, which is added
2005	// upon agent creation. Adding training phrases to fallback intent is
2006	// useful in the case of requests that are mistakenly matched, since
2007	// training phrases assigned to fallback intents act as negative
2008	// examples that triggers no-match event.
2009	IsFallback bool `json:"isFallback,omitempty"`
2010
2011	// Labels: The key/value metadata to label an intent. Labels can contain
2012	// lowercase letters, digits and the symbols '-' and '_'. International
2013	// characters are allowed, including letters from unicase alphabets.
2014	// Keys must start with a letter. Keys and values can be no longer than
2015	// 63 characters and no more than 128 bytes. Prefix "sys-" is reserved
2016	// for Dialogflow defined labels. Currently allowed Dialogflow defined
2017	// labels include: * sys-head * sys-contextual The above labels do not
2018	// require value. "sys-head" means the intent is a head intent.
2019	// "sys.contextual" means the intent is a contextual intent.
2020	Labels map[string]string `json:"labels,omitempty"`
2021
2022	// Name: The unique identifier of the intent. Required for the
2023	// Intents.UpdateIntent method. Intents.CreateIntent populates the name
2024	// automatically. Format: `projects//locations//agents//intents/`.
2025	Name string `json:"name,omitempty"`
2026
2027	// Parameters: The collection of parameters associated with the intent.
2028	Parameters []*GoogleCloudDialogflowCxV3IntentParameter `json:"parameters,omitempty"`
2029
2030	// Priority: The priority of this intent. Higher numbers represent
2031	// higher priorities. - If the supplied value is unspecified or 0, the
2032	// service translates the value to 500,000, which corresponds to the
2033	// `Normal` priority in the console. - If the supplied value is
2034	// negative, the intent is ignored in runtime detect intent requests.
2035	Priority int64 `json:"priority,omitempty"`
2036
2037	// TrainingPhrases: The collection of training phrases the agent is
2038	// trained on to identify the intent.
2039	TrainingPhrases []*GoogleCloudDialogflowCxV3IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
2040
2041	// ForceSendFields is a list of field names (e.g. "Description") to
2042	// unconditionally include in API requests. By default, fields with
2043	// empty values are omitted from API requests. However, any non-pointer,
2044	// non-interface field appearing in ForceSendFields will be sent to the
2045	// server regardless of whether the field is empty or not. This may be
2046	// used to include empty fields in Patch requests.
2047	ForceSendFields []string `json:"-"`
2048
2049	// NullFields is a list of field names (e.g. "Description") to include
2050	// in API requests with the JSON null value. By default, fields with
2051	// empty values are omitted from API requests. However, any field with
2052	// an empty value appearing in NullFields will be sent to the server as
2053	// null. It is an error if a field in this list has a non-empty value.
2054	// This may be used to include null fields in Patch requests.
2055	NullFields []string `json:"-"`
2056}
2057
2058func (s *GoogleCloudDialogflowCxV3Intent) MarshalJSON() ([]byte, error) {
2059	type NoMethod GoogleCloudDialogflowCxV3Intent
2060	raw := NoMethod(*s)
2061	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2062}
2063
2064// GoogleCloudDialogflowCxV3IntentInput: Represents the intent to
2065// trigger programmatically rather than as a result of natural language
2066// processing.
2067type GoogleCloudDialogflowCxV3IntentInput struct {
2068	// Intent: Required. The unique identifier of the intent. Format:
2069	// `projects//locations//agents//intents/`.
2070	Intent string `json:"intent,omitempty"`
2071
2072	// ForceSendFields is a list of field names (e.g. "Intent") to
2073	// unconditionally include in API requests. By default, fields with
2074	// empty values are omitted from API requests. However, any non-pointer,
2075	// non-interface field appearing in ForceSendFields will be sent to the
2076	// server regardless of whether the field is empty or not. This may be
2077	// used to include empty fields in Patch requests.
2078	ForceSendFields []string `json:"-"`
2079
2080	// NullFields is a list of field names (e.g. "Intent") to include in API
2081	// requests with the JSON null value. By default, fields with empty
2082	// values are omitted from API requests. However, any field with an
2083	// empty value appearing in NullFields will be sent to the server as
2084	// null. It is an error if a field in this list has a non-empty value.
2085	// This may be used to include null fields in Patch requests.
2086	NullFields []string `json:"-"`
2087}
2088
2089func (s *GoogleCloudDialogflowCxV3IntentInput) MarshalJSON() ([]byte, error) {
2090	type NoMethod GoogleCloudDialogflowCxV3IntentInput
2091	raw := NoMethod(*s)
2092	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2093}
2094
2095// GoogleCloudDialogflowCxV3IntentParameter: Represents an intent
2096// parameter.
2097type GoogleCloudDialogflowCxV3IntentParameter struct {
2098	// EntityType: Required. The entity type of the parameter. Format:
2099	// `projects/-/locations/-/agents/-/entityTypes/` for system entity
2100	// types (for example,
2101	// `projects/-/locations/-/agents/-/entityTypes/sys.date`), or
2102	// `projects//locations//agents//entityTypes/` for developer entity
2103	// types.
2104	EntityType string `json:"entityType,omitempty"`
2105
2106	// Id: Required. The unique identifier of the parameter. This field is
2107	// used by training phrases to annotate their parts.
2108	Id string `json:"id,omitempty"`
2109
2110	// IsList: Indicates whether the parameter represents a list of values.
2111	IsList bool `json:"isList,omitempty"`
2112
2113	// Redact: Indicates whether the parameter content should be redacted in
2114	// log. If redaction is enabled, the parameter content will be replaced
2115	// by parameter name during logging. Note: the parameter content is
2116	// subject to redaction if either parameter level redaction or entity
2117	// type level redaction is enabled.
2118	Redact bool `json:"redact,omitempty"`
2119
2120	// ForceSendFields is a list of field names (e.g. "EntityType") to
2121	// unconditionally include in API requests. By default, fields with
2122	// empty values are omitted from API requests. However, any non-pointer,
2123	// non-interface field appearing in ForceSendFields will be sent to the
2124	// server regardless of whether the field is empty or not. This may be
2125	// used to include empty fields in Patch requests.
2126	ForceSendFields []string `json:"-"`
2127
2128	// NullFields is a list of field names (e.g. "EntityType") to include in
2129	// API requests with the JSON null value. By default, fields with empty
2130	// values are omitted from API requests. However, any field with an
2131	// empty value appearing in NullFields will be sent to the server as
2132	// null. It is an error if a field in this list has a non-empty value.
2133	// This may be used to include null fields in Patch requests.
2134	NullFields []string `json:"-"`
2135}
2136
2137func (s *GoogleCloudDialogflowCxV3IntentParameter) MarshalJSON() ([]byte, error) {
2138	type NoMethod GoogleCloudDialogflowCxV3IntentParameter
2139	raw := NoMethod(*s)
2140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2141}
2142
2143// GoogleCloudDialogflowCxV3IntentTrainingPhrase: Represents an example
2144// that the agent is trained on to identify the intent.
2145type GoogleCloudDialogflowCxV3IntentTrainingPhrase struct {
2146	// Id: Output only. The unique identifier of the training phrase.
2147	Id string `json:"id,omitempty"`
2148
2149	// Parts: Required. The ordered list of training phrase parts. The parts
2150	// are concatenated in order to form the training phrase. Note: The API
2151	// does not automatically annotate training phrases like the Dialogflow
2152	// Console does. Note: Do not forget to include whitespace at part
2153	// boundaries, so the training phrase is well formatted when the parts
2154	// are concatenated. If the training phrase does not need to be
2155	// annotated with parameters, you just need a single part with only the
2156	// Part.text field set. If you want to annotate the training phrase, you
2157	// must create multiple parts, where the fields of each part are
2158	// populated in one of two ways: - `Part.text` is set to a part of the
2159	// phrase that has no parameters. - `Part.text` is set to a part of the
2160	// phrase that you want to annotate, and the `parameter_id` field is
2161	// set.
2162	Parts []*GoogleCloudDialogflowCxV3IntentTrainingPhrasePart `json:"parts,omitempty"`
2163
2164	// RepeatCount: Indicates how many times this example was added to the
2165	// intent.
2166	RepeatCount int64 `json:"repeatCount,omitempty"`
2167
2168	// ForceSendFields is a list of field names (e.g. "Id") to
2169	// unconditionally include in API requests. By default, fields with
2170	// empty values are omitted from API requests. However, any non-pointer,
2171	// non-interface field appearing in ForceSendFields will be sent to the
2172	// server regardless of whether the field is empty or not. This may be
2173	// used to include empty fields in Patch requests.
2174	ForceSendFields []string `json:"-"`
2175
2176	// NullFields is a list of field names (e.g. "Id") to include in API
2177	// requests with the JSON null value. By default, fields with empty
2178	// values are omitted from API requests. However, any field with an
2179	// empty value appearing in NullFields will be sent to the server as
2180	// null. It is an error if a field in this list has a non-empty value.
2181	// This may be used to include null fields in Patch requests.
2182	NullFields []string `json:"-"`
2183}
2184
2185func (s *GoogleCloudDialogflowCxV3IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
2186	type NoMethod GoogleCloudDialogflowCxV3IntentTrainingPhrase
2187	raw := NoMethod(*s)
2188	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2189}
2190
2191// GoogleCloudDialogflowCxV3IntentTrainingPhrasePart: Represents a part
2192// of a training phrase.
2193type GoogleCloudDialogflowCxV3IntentTrainingPhrasePart struct {
2194	// ParameterId: The parameter used to annotate this part of the training
2195	// phrase. This field is required for annotated parts of the training
2196	// phrase.
2197	ParameterId string `json:"parameterId,omitempty"`
2198
2199	// Text: Required. The text for this part.
2200	Text string `json:"text,omitempty"`
2201
2202	// ForceSendFields is a list of field names (e.g. "ParameterId") to
2203	// unconditionally include in API requests. By default, fields with
2204	// empty values are omitted from API requests. However, any non-pointer,
2205	// non-interface field appearing in ForceSendFields will be sent to the
2206	// server regardless of whether the field is empty or not. This may be
2207	// used to include empty fields in Patch requests.
2208	ForceSendFields []string `json:"-"`
2209
2210	// NullFields is a list of field names (e.g. "ParameterId") to include
2211	// in API requests with the JSON null value. By default, fields with
2212	// empty values are omitted from API requests. However, any field with
2213	// an empty value appearing in NullFields will be sent to the server as
2214	// null. It is an error if a field in this list has a non-empty value.
2215	// This may be used to include null fields in Patch requests.
2216	NullFields []string `json:"-"`
2217}
2218
2219func (s *GoogleCloudDialogflowCxV3IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
2220	type NoMethod GoogleCloudDialogflowCxV3IntentTrainingPhrasePart
2221	raw := NoMethod(*s)
2222	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2223}
2224
2225// GoogleCloudDialogflowCxV3Page: A Dialogflow CX conversation (session)
2226// can be described and visualized as a state machine. The states of a
2227// CX session are represented by pages. For each flow, you define many
2228// pages, where your combined pages can handle a complete conversation
2229// on the topics the flow is designed for. At any given moment, exactly
2230// one page is the current page, the current page is considered active,
2231// and the flow associated with that page is considered active. Every
2232// flow has a special start page. When a flow initially becomes active,
2233// the start page page becomes the current page. For each conversational
2234// turn, the current page will either stay the same or transition to
2235// another page. You configure each page to collect information from the
2236// end-user that is relevant for the conversational state represented by
2237// the page. For more information, see the Page guide
2238// (https://cloud.google.com/dialogflow/cx/docs/concept/page).
2239type GoogleCloudDialogflowCxV3Page struct {
2240	// DisplayName: Required. The human-readable name of the page, unique
2241	// within the agent.
2242	DisplayName string `json:"displayName,omitempty"`
2243
2244	// EntryFulfillment: The fulfillment to call when the session is
2245	// entering the page.
2246	EntryFulfillment *GoogleCloudDialogflowCxV3Fulfillment `json:"entryFulfillment,omitempty"`
2247
2248	// EventHandlers: Handlers associated with the page to handle events
2249	// such as webhook errors, no match or no input.
2250	EventHandlers []*GoogleCloudDialogflowCxV3EventHandler `json:"eventHandlers,omitempty"`
2251
2252	// Form: The form associated with the page, used for collecting
2253	// parameters relevant to the page.
2254	Form *GoogleCloudDialogflowCxV3Form `json:"form,omitempty"`
2255
2256	// Name: The unique identifier of the page. Required for the
2257	// Pages.UpdatePage method. Pages.CreatePage populates the name
2258	// automatically. Format: `projects//locations//agents//flows//pages/`.
2259	Name string `json:"name,omitempty"`
2260
2261	// TransitionRouteGroups: Ordered list of `TransitionRouteGroups`
2262	// associated with the page. Transition route groups must be unique
2263	// within a page. * If multiple transition routes within a page scope
2264	// refer to the same intent, then the precedence order is: page's
2265	// transition route -> page's transition route group -> flow's
2266	// transition routes. * If multiple transition route groups within a
2267	// page contain the same intent, then the first group in the ordered
2268	// list takes precedence.
2269	// Format:`projects//locations//agents//flows//transitionRouteGroups/`.
2270	TransitionRouteGroups []string `json:"transitionRouteGroups,omitempty"`
2271
2272	// TransitionRoutes: A list of transitions for the transition rules of
2273	// this page. They route the conversation to another page in the same
2274	// flow, or another flow. When we are in a certain page, the
2275	// TransitionRoutes are evalauted in the following order: *
2276	// TransitionRoutes defined in the page with intent specified. *
2277	// TransitionRoutes defined in the transition route groups with intent
2278	// specified. * TransitionRoutes defined in flow with intent specified.
2279	// * TransitionRoutes defined in the transition route groups with intent
2280	// specified. * TransitionRoutes defined in the page with only condition
2281	// specified. * TransitionRoutes defined in the transition route groups
2282	// with only condition specified.
2283	TransitionRoutes []*GoogleCloudDialogflowCxV3TransitionRoute `json:"transitionRoutes,omitempty"`
2284
2285	// ForceSendFields is a list of field names (e.g. "DisplayName") to
2286	// unconditionally include in API requests. By default, fields with
2287	// empty values are omitted from API requests. However, any non-pointer,
2288	// non-interface field appearing in ForceSendFields will be sent to the
2289	// server regardless of whether the field is empty or not. This may be
2290	// used to include empty fields in Patch requests.
2291	ForceSendFields []string `json:"-"`
2292
2293	// NullFields is a list of field names (e.g. "DisplayName") to include
2294	// in API requests with the JSON null value. By default, fields with
2295	// empty values are omitted from API requests. However, any field with
2296	// an empty value appearing in NullFields will be sent to the server as
2297	// null. It is an error if a field in this list has a non-empty value.
2298	// This may be used to include null fields in Patch requests.
2299	NullFields []string `json:"-"`
2300}
2301
2302func (s *GoogleCloudDialogflowCxV3Page) MarshalJSON() ([]byte, error) {
2303	type NoMethod GoogleCloudDialogflowCxV3Page
2304	raw := NoMethod(*s)
2305	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2306}
2307
2308// GoogleCloudDialogflowCxV3PageInfo: Represents page information
2309// communicated to and from the webhook.
2310type GoogleCloudDialogflowCxV3PageInfo struct {
2311	// CurrentPage: Always present for WebhookRequest. Ignored for
2312	// WebhookResponse. The unique identifier of the current page. Format:
2313	// `projects//locations//agents//flows//pages/`.
2314	CurrentPage string `json:"currentPage,omitempty"`
2315
2316	// FormInfo: Optional for both WebhookRequest and WebhookResponse.
2317	// Information about the form.
2318	FormInfo *GoogleCloudDialogflowCxV3PageInfoFormInfo `json:"formInfo,omitempty"`
2319
2320	// ForceSendFields is a list of field names (e.g. "CurrentPage") to
2321	// unconditionally include in API requests. By default, fields with
2322	// empty values are omitted from API requests. However, any non-pointer,
2323	// non-interface field appearing in ForceSendFields will be sent to the
2324	// server regardless of whether the field is empty or not. This may be
2325	// used to include empty fields in Patch requests.
2326	ForceSendFields []string `json:"-"`
2327
2328	// NullFields is a list of field names (e.g. "CurrentPage") to include
2329	// in API requests with the JSON null value. By default, fields with
2330	// empty values are omitted from API requests. However, any field with
2331	// an empty value appearing in NullFields will be sent to the server as
2332	// null. It is an error if a field in this list has a non-empty value.
2333	// This may be used to include null fields in Patch requests.
2334	NullFields []string `json:"-"`
2335}
2336
2337func (s *GoogleCloudDialogflowCxV3PageInfo) MarshalJSON() ([]byte, error) {
2338	type NoMethod GoogleCloudDialogflowCxV3PageInfo
2339	raw := NoMethod(*s)
2340	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2341}
2342
2343// GoogleCloudDialogflowCxV3PageInfoFormInfo: Represents form
2344// information.
2345type GoogleCloudDialogflowCxV3PageInfoFormInfo struct {
2346	// ParameterInfo: Optional for both WebhookRequest and WebhookResponse.
2347	// The parameters contained in the form. Note that the webhook cannot
2348	// add or remove any form parameter.
2349	ParameterInfo []*GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo `json:"parameterInfo,omitempty"`
2350
2351	// ForceSendFields is a list of field names (e.g. "ParameterInfo") to
2352	// unconditionally include in API requests. By default, fields with
2353	// empty values are omitted from API requests. However, any non-pointer,
2354	// non-interface field appearing in ForceSendFields will be sent to the
2355	// server regardless of whether the field is empty or not. This may be
2356	// used to include empty fields in Patch requests.
2357	ForceSendFields []string `json:"-"`
2358
2359	// NullFields is a list of field names (e.g. "ParameterInfo") to include
2360	// in API requests with the JSON null value. By default, fields with
2361	// empty values are omitted from API requests. However, any field with
2362	// an empty value appearing in NullFields will be sent to the server as
2363	// null. It is an error if a field in this list has a non-empty value.
2364	// This may be used to include null fields in Patch requests.
2365	NullFields []string `json:"-"`
2366}
2367
2368func (s *GoogleCloudDialogflowCxV3PageInfoFormInfo) MarshalJSON() ([]byte, error) {
2369	type NoMethod GoogleCloudDialogflowCxV3PageInfoFormInfo
2370	raw := NoMethod(*s)
2371	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2372}
2373
2374// GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo: Represents
2375// parameter information.
2376type GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo struct {
2377	// DisplayName: Always present for WebhookRequest. Required for
2378	// WebhookResponse. The human-readable name of the parameter, unique
2379	// within the form. This field cannot be modified by the webhook.
2380	DisplayName string `json:"displayName,omitempty"`
2381
2382	// JustCollected: Optional for WebhookRequest. Ignored for
2383	// WebhookResponse. Indicates if the parameter value was just collected
2384	// on the last conversation turn.
2385	JustCollected bool `json:"justCollected,omitempty"`
2386
2387	// Required: Optional for both WebhookRequest and WebhookResponse.
2388	// Indicates whether the parameter is required. Optional parameters will
2389	// not trigger prompts; however, they are filled if the user specifies
2390	// them. Required parameters must be filled before form filling
2391	// concludes.
2392	Required bool `json:"required,omitempty"`
2393
2394	// State: Always present for WebhookRequest. Required for
2395	// WebhookResponse. The state of the parameter. This field can be set to
2396	// INVALID by the webhook to invalidate the parameter; other values set
2397	// by the webhook will be ignored.
2398	//
2399	// Possible values:
2400	//   "PARAMETER_STATE_UNSPECIFIED" - Not specified. This value should be
2401	// never used.
2402	//   "EMPTY" - Indicates that the parameter does not have a value.
2403	//   "INVALID" - Indicates that the parameter value is invalid. This
2404	// field can be used by the webhook to invalidate the parameter and ask
2405	// the server to collect it from the user again.
2406	//   "FILLED" - Indicates that the parameter has a value.
2407	State string `json:"state,omitempty"`
2408
2409	// Value: Optional for both WebhookRequest and WebhookResponse. The
2410	// value of the parameter. This field can be set by the webhook to
2411	// change the parameter value.
2412	Value interface{} `json:"value,omitempty"`
2413
2414	// ForceSendFields is a list of field names (e.g. "DisplayName") to
2415	// unconditionally include in API requests. By default, fields with
2416	// empty values are omitted from API requests. However, any non-pointer,
2417	// non-interface field appearing in ForceSendFields will be sent to the
2418	// server regardless of whether the field is empty or not. This may be
2419	// used to include empty fields in Patch requests.
2420	ForceSendFields []string `json:"-"`
2421
2422	// NullFields is a list of field names (e.g. "DisplayName") to include
2423	// in API requests with the JSON null value. By default, fields with
2424	// empty values are omitted from API requests. However, any field with
2425	// an empty value appearing in NullFields will be sent to the server as
2426	// null. It is an error if a field in this list has a non-empty value.
2427	// This may be used to include null fields in Patch requests.
2428	NullFields []string `json:"-"`
2429}
2430
2431func (s *GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo) MarshalJSON() ([]byte, error) {
2432	type NoMethod GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo
2433	raw := NoMethod(*s)
2434	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2435}
2436
2437// GoogleCloudDialogflowCxV3QueryInput: Represents the query input. It
2438// can contain one of: 1. A conversational query in the form of text. 2.
2439// An intent query that specifies which intent to trigger. 3. Natural
2440// language speech audio to be processed. 4. An event to be triggered.
2441type GoogleCloudDialogflowCxV3QueryInput struct {
2442	// Audio: The natural language speech audio to be processed.
2443	Audio *GoogleCloudDialogflowCxV3AudioInput `json:"audio,omitempty"`
2444
2445	// Dtmf: The DTMF event to be handled.
2446	Dtmf *GoogleCloudDialogflowCxV3DtmfInput `json:"dtmf,omitempty"`
2447
2448	// Event: The event to be triggered.
2449	Event *GoogleCloudDialogflowCxV3EventInput `json:"event,omitempty"`
2450
2451	// Intent: The intent to be triggered.
2452	Intent *GoogleCloudDialogflowCxV3IntentInput `json:"intent,omitempty"`
2453
2454	// LanguageCode: Required. The language of the input. See Language
2455	// Support
2456	// (https://cloud.google.com/dialogflow/cx/docs/reference/language) for
2457	// a list of the currently supported language codes. Note that queries
2458	// in the same session do not necessarily need to specify the same
2459	// language.
2460	LanguageCode string `json:"languageCode,omitempty"`
2461
2462	// Text: The natural language text to be processed.
2463	Text *GoogleCloudDialogflowCxV3TextInput `json:"text,omitempty"`
2464
2465	// ForceSendFields is a list of field names (e.g. "Audio") to
2466	// unconditionally include in API requests. By default, fields with
2467	// empty values are omitted from API requests. However, any non-pointer,
2468	// non-interface field appearing in ForceSendFields will be sent to the
2469	// server regardless of whether the field is empty or not. This may be
2470	// used to include empty fields in Patch requests.
2471	ForceSendFields []string `json:"-"`
2472
2473	// NullFields is a list of field names (e.g. "Audio") to include in API
2474	// requests with the JSON null value. By default, fields with empty
2475	// values are omitted from API requests. However, any field with an
2476	// empty value appearing in NullFields will be sent to the server as
2477	// null. It is an error if a field in this list has a non-empty value.
2478	// This may be used to include null fields in Patch requests.
2479	NullFields []string `json:"-"`
2480}
2481
2482func (s *GoogleCloudDialogflowCxV3QueryInput) MarshalJSON() ([]byte, error) {
2483	type NoMethod GoogleCloudDialogflowCxV3QueryInput
2484	raw := NoMethod(*s)
2485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2486}
2487
2488// GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata: Metadata
2489// for ReloadDocument operation.
2490type GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata struct {
2491	// GenericMetadata: The generic information of the operation.
2492	GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
2493
2494	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
2495	// unconditionally include in API requests. By default, fields with
2496	// empty values are omitted from API requests. However, any non-pointer,
2497	// non-interface field appearing in ForceSendFields will be sent to the
2498	// server regardless of whether the field is empty or not. This may be
2499	// used to include empty fields in Patch requests.
2500	ForceSendFields []string `json:"-"`
2501
2502	// NullFields is a list of field names (e.g. "GenericMetadata") to
2503	// include in API requests with the JSON null value. By default, fields
2504	// with empty values are omitted from API requests. However, any field
2505	// with an empty value appearing in NullFields will be sent to the
2506	// server as null. It is an error if a field in this list has a
2507	// non-empty value. This may be used to include null fields in Patch
2508	// requests.
2509	NullFields []string `json:"-"`
2510}
2511
2512func (s *GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
2513	type NoMethod GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata
2514	raw := NoMethod(*s)
2515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2516}
2517
2518// GoogleCloudDialogflowCxV3ResponseMessage: Represents a response
2519// message that can be returned by a conversational agent. Response
2520// messages are also used for output audio synthesis. The approach is as
2521// follows: * If at least one OutputAudioText response is present, then
2522// all OutputAudioText responses are linearly concatenated, and the
2523// result is used for output audio synthesis. * If the OutputAudioText
2524// responses are a mixture of text and SSML, then the concatenated
2525// result is treated as SSML; otherwise, the result is treated as either
2526// text or SSML as appropriate. The agent designer should ideally use
2527// either text or SSML consistently throughout the bot design. *
2528// Otherwise, all Text responses are linearly concatenated, and the
2529// result is used for output audio synthesis. This approach allows for
2530// more sophisticated user experience scenarios, where the text
2531// displayed to the user may differ from what is heard.
2532type GoogleCloudDialogflowCxV3ResponseMessage struct {
2533	// ConversationSuccess: Indicates that the conversation succeeded.
2534	ConversationSuccess *GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess `json:"conversationSuccess,omitempty"`
2535
2536	// EndInteraction: Output only. A signal that indicates the interaction
2537	// with the Dialogflow agent has ended. This message is generated by
2538	// Dialogflow only when the conversation reaches `END_SESSION` page. It
2539	// is not supposed to be defined by the user. It's guaranteed that there
2540	// is at most one such message in each response.
2541	EndInteraction *GoogleCloudDialogflowCxV3ResponseMessageEndInteraction `json:"endInteraction,omitempty"`
2542
2543	// LiveAgentHandoff: Hands off conversation to a human agent.
2544	LiveAgentHandoff *GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"`
2545
2546	// MixedAudio: Output only. An audio response message composed of both
2547	// the synthesized Dialogflow agent responses and responses defined via
2548	// play_audio. This message is generated by Dialogflow only and not
2549	// supposed to be defined by the user.
2550	MixedAudio *GoogleCloudDialogflowCxV3ResponseMessageMixedAudio `json:"mixedAudio,omitempty"`
2551
2552	// OutputAudioText: A text or ssml response that is preferentially used
2553	// for TTS output audio synthesis, as described in the comment on the
2554	// ResponseMessage message.
2555	OutputAudioText *GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText `json:"outputAudioText,omitempty"`
2556
2557	// Payload: Returns a response containing a custom, platform-specific
2558	// payload.
2559	Payload googleapi.RawMessage `json:"payload,omitempty"`
2560
2561	// PlayAudio: Signal that the client should play an audio clip hosted at
2562	// a client-specific URI. Dialogflow uses this to construct mixed_audio.
2563	// However, Dialogflow itself does not try to read or process the URI in
2564	// any way.
2565	PlayAudio *GoogleCloudDialogflowCxV3ResponseMessagePlayAudio `json:"playAudio,omitempty"`
2566
2567	// Text: Returns a text response.
2568	Text *GoogleCloudDialogflowCxV3ResponseMessageText `json:"text,omitempty"`
2569
2570	// ForceSendFields is a list of field names (e.g. "ConversationSuccess")
2571	// to 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. "ConversationSuccess") to
2579	// include in API requests with the JSON null value. By default, fields
2580	// with empty values are omitted from API requests. However, any field
2581	// with an empty value appearing in NullFields will be sent to the
2582	// server as null. It is an error if a field in this list has a
2583	// non-empty value. This may be used to include null fields in Patch
2584	// requests.
2585	NullFields []string `json:"-"`
2586}
2587
2588func (s *GoogleCloudDialogflowCxV3ResponseMessage) MarshalJSON() ([]byte, error) {
2589	type NoMethod GoogleCloudDialogflowCxV3ResponseMessage
2590	raw := NoMethod(*s)
2591	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2592}
2593
2594// GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess:
2595// Indicates that the conversation succeeded, i.e., the bot handled the
2596// issue that the customer talked to it about. Dialogflow only uses this
2597// to determine which conversations should be counted as successful and
2598// doesn't process the metadata in this message in any way. Note that
2599// Dialogflow also considers conversations that get to the conversation
2600// end page as successful even if they don't return ConversationSuccess.
2601// You may set this, for example: * In the entry_fulfillment of a Page
2602// if entering the page indicates that the conversation succeeded. * In
2603// a webhook response when you determine that you handled the customer
2604// issue.
2605type GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess struct {
2606	// Metadata: Custom metadata. Dialogflow doesn't impose any structure on
2607	// this.
2608	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2609
2610	// ForceSendFields is a list of field names (e.g. "Metadata") to
2611	// unconditionally include in API requests. By default, fields with
2612	// empty values are omitted from API requests. However, any non-pointer,
2613	// non-interface field appearing in ForceSendFields will be sent to the
2614	// server regardless of whether the field is empty or not. This may be
2615	// used to include empty fields in Patch requests.
2616	ForceSendFields []string `json:"-"`
2617
2618	// NullFields is a list of field names (e.g. "Metadata") to include in
2619	// API requests with the JSON null value. By default, fields with empty
2620	// values are omitted from API requests. However, any field with an
2621	// empty value appearing in NullFields will be sent to the server as
2622	// null. It is an error if a field in this list has a non-empty value.
2623	// This may be used to include null fields in Patch requests.
2624	NullFields []string `json:"-"`
2625}
2626
2627func (s *GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess) MarshalJSON() ([]byte, error) {
2628	type NoMethod GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess
2629	raw := NoMethod(*s)
2630	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2631}
2632
2633// GoogleCloudDialogflowCxV3ResponseMessageEndInteraction: Indicates
2634// that interaction with the Dialogflow agent has ended. This message is
2635// generated by Dialogflow only and not supposed to be defined by the
2636// user.
2637type GoogleCloudDialogflowCxV3ResponseMessageEndInteraction struct {
2638}
2639
2640// GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff: Indicates
2641// that the conversation should be handed off to a live agent.
2642// Dialogflow only uses this to determine which conversations were
2643// handed off to a human agent for measurement purposes. What else to do
2644// with this signal is up to you and your handoff procedures. You may
2645// set this, for example: * In the entry_fulfillment of a Page if
2646// entering the page indicates something went extremely wrong in the
2647// conversation. * In a webhook response when you determine that the
2648// customer issue can only be handled by a human.
2649type GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff struct {
2650	// Metadata: Custom metadata for your handoff procedure. Dialogflow
2651	// doesn't impose any structure on this.
2652	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2653
2654	// ForceSendFields is a list of field names (e.g. "Metadata") to
2655	// unconditionally include in API requests. By default, fields with
2656	// empty values are omitted from API requests. However, any non-pointer,
2657	// non-interface field appearing in ForceSendFields will be sent to the
2658	// server regardless of whether the field is empty or not. This may be
2659	// used to include empty fields in Patch requests.
2660	ForceSendFields []string `json:"-"`
2661
2662	// NullFields is a list of field names (e.g. "Metadata") to include in
2663	// API requests with the JSON null value. By default, fields with empty
2664	// values are omitted from API requests. However, any field with an
2665	// empty value appearing in NullFields will be sent to the server as
2666	// null. It is an error if a field in this list has a non-empty value.
2667	// This may be used to include null fields in Patch requests.
2668	NullFields []string `json:"-"`
2669}
2670
2671func (s *GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff) MarshalJSON() ([]byte, error) {
2672	type NoMethod GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff
2673	raw := NoMethod(*s)
2674	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2675}
2676
2677// GoogleCloudDialogflowCxV3ResponseMessageMixedAudio: Represents an
2678// audio message that is composed of both segments synthesized from the
2679// Dialogflow agent prompts and ones hosted externally at the specified
2680// URIs. The external URIs are specified via play_audio. This message is
2681// generated by Dialogflow only and not supposed to be defined by the
2682// user.
2683type GoogleCloudDialogflowCxV3ResponseMessageMixedAudio struct {
2684	// Segments: Segments this audio response is composed of.
2685	Segments []*GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment `json:"segments,omitempty"`
2686
2687	// ForceSendFields is a list of field names (e.g. "Segments") to
2688	// unconditionally include in API requests. By default, fields with
2689	// empty values are omitted from API requests. However, any non-pointer,
2690	// non-interface field appearing in ForceSendFields will be sent to the
2691	// server regardless of whether the field is empty or not. This may be
2692	// used to include empty fields in Patch requests.
2693	ForceSendFields []string `json:"-"`
2694
2695	// NullFields is a list of field names (e.g. "Segments") to include in
2696	// API requests with the JSON null value. By default, fields with empty
2697	// values are omitted from API requests. However, any field with an
2698	// empty value appearing in NullFields will be sent to the server as
2699	// null. It is an error if a field in this list has a non-empty value.
2700	// This may be used to include null fields in Patch requests.
2701	NullFields []string `json:"-"`
2702}
2703
2704func (s *GoogleCloudDialogflowCxV3ResponseMessageMixedAudio) MarshalJSON() ([]byte, error) {
2705	type NoMethod GoogleCloudDialogflowCxV3ResponseMessageMixedAudio
2706	raw := NoMethod(*s)
2707	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2708}
2709
2710// GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment: Represents
2711// one segment of audio.
2712type GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment struct {
2713	// AllowPlaybackInterruption: Output only. Whether the playback of this
2714	// segment can be interrupted by the end user's speech and the client
2715	// should then start the next Dialogflow request.
2716	AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"`
2717
2718	// Audio: Raw audio synthesized from the Dialogflow agent's response
2719	// using the output config specified in the request.
2720	Audio string `json:"audio,omitempty"`
2721
2722	// Uri: Client-specific URI that points to an audio clip accessible to
2723	// the client. Dialogflow does not impose any validation on it.
2724	Uri string `json:"uri,omitempty"`
2725
2726	// ForceSendFields is a list of field names (e.g.
2727	// "AllowPlaybackInterruption") to unconditionally include in API
2728	// requests. By default, fields with empty values are omitted from API
2729	// requests. However, any non-pointer, non-interface field appearing in
2730	// ForceSendFields will be sent to the server regardless of whether the
2731	// field is empty or not. This may be used to include empty fields in
2732	// Patch requests.
2733	ForceSendFields []string `json:"-"`
2734
2735	// NullFields is a list of field names (e.g.
2736	// "AllowPlaybackInterruption") to include in API requests with the JSON
2737	// null value. By default, fields with empty values are omitted from API
2738	// requests. However, any field with an empty value appearing in
2739	// NullFields will be sent to the server as null. It is an error if a
2740	// field in this list has a non-empty value. This may be used to include
2741	// null fields in Patch requests.
2742	NullFields []string `json:"-"`
2743}
2744
2745func (s *GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment) MarshalJSON() ([]byte, error) {
2746	type NoMethod GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment
2747	raw := NoMethod(*s)
2748	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2749}
2750
2751// GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText: A text or
2752// ssml response that is preferentially used for TTS output audio
2753// synthesis, as described in the comment on the ResponseMessage
2754// message.
2755type GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText struct {
2756	// AllowPlaybackInterruption: Output only. Whether the playback of this
2757	// message can be interrupted by the end user's speech and the client
2758	// can then starts the next Dialogflow request.
2759	AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"`
2760
2761	// Ssml: The SSML text to be synthesized. For more information, see SSML
2762	// (/speech/text-to-speech/docs/ssml).
2763	Ssml string `json:"ssml,omitempty"`
2764
2765	// Text: The raw text to be synthesized.
2766	Text string `json:"text,omitempty"`
2767
2768	// ForceSendFields is a list of field names (e.g.
2769	// "AllowPlaybackInterruption") to unconditionally include in API
2770	// requests. By default, fields with empty values are omitted from API
2771	// requests. However, any non-pointer, non-interface field appearing in
2772	// ForceSendFields will be sent to the server regardless of whether the
2773	// field is empty or not. This may be used to include empty fields in
2774	// Patch requests.
2775	ForceSendFields []string `json:"-"`
2776
2777	// NullFields is a list of field names (e.g.
2778	// "AllowPlaybackInterruption") to include in API requests with the JSON
2779	// null value. By default, fields with empty values are omitted from API
2780	// requests. However, any field with an empty value appearing in
2781	// NullFields will be sent to the server as null. It is an error if a
2782	// field in this list has a non-empty value. This may be used to include
2783	// null fields in Patch requests.
2784	NullFields []string `json:"-"`
2785}
2786
2787func (s *GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText) MarshalJSON() ([]byte, error) {
2788	type NoMethod GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText
2789	raw := NoMethod(*s)
2790	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2791}
2792
2793// GoogleCloudDialogflowCxV3ResponseMessagePlayAudio: Specifies an audio
2794// clip to be played by the client as part of the response.
2795type GoogleCloudDialogflowCxV3ResponseMessagePlayAudio struct {
2796	// AllowPlaybackInterruption: Output only. Whether the playback of this
2797	// message can be interrupted by the end user's speech and the client
2798	// can then starts the next Dialogflow request.
2799	AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"`
2800
2801	// AudioUri: Required. URI of the audio clip. Dialogflow does not impose
2802	// any validation on this value. It is specific to the client that reads
2803	// it.
2804	AudioUri string `json:"audioUri,omitempty"`
2805
2806	// ForceSendFields is a list of field names (e.g.
2807	// "AllowPlaybackInterruption") to unconditionally include in API
2808	// requests. By default, fields with empty values are omitted from API
2809	// requests. However, any non-pointer, non-interface field appearing in
2810	// ForceSendFields will be sent to the server regardless of whether the
2811	// field is empty or not. This may be used to include empty fields in
2812	// Patch requests.
2813	ForceSendFields []string `json:"-"`
2814
2815	// NullFields is a list of field names (e.g.
2816	// "AllowPlaybackInterruption") to include in API requests with the JSON
2817	// null value. By default, fields with empty values are omitted from API
2818	// requests. However, any field with an empty value appearing in
2819	// NullFields will be sent to the server as null. It is an error if a
2820	// field in this list has a non-empty value. This may be used to include
2821	// null fields in Patch requests.
2822	NullFields []string `json:"-"`
2823}
2824
2825func (s *GoogleCloudDialogflowCxV3ResponseMessagePlayAudio) MarshalJSON() ([]byte, error) {
2826	type NoMethod GoogleCloudDialogflowCxV3ResponseMessagePlayAudio
2827	raw := NoMethod(*s)
2828	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2829}
2830
2831// GoogleCloudDialogflowCxV3ResponseMessageText: The text response
2832// message.
2833type GoogleCloudDialogflowCxV3ResponseMessageText struct {
2834	// AllowPlaybackInterruption: Output only. Whether the playback of this
2835	// message can be interrupted by the end user's speech and the client
2836	// can then starts the next Dialogflow request.
2837	AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"`
2838
2839	// Text: Required. A collection of text responses.
2840	Text []string `json:"text,omitempty"`
2841
2842	// ForceSendFields is a list of field names (e.g.
2843	// "AllowPlaybackInterruption") to unconditionally include in API
2844	// requests. By default, fields with empty values are omitted from API
2845	// requests. However, any non-pointer, non-interface field appearing in
2846	// ForceSendFields will be sent to the server regardless of whether the
2847	// field is empty or not. This may be used to include empty fields in
2848	// Patch requests.
2849	ForceSendFields []string `json:"-"`
2850
2851	// NullFields is a list of field names (e.g.
2852	// "AllowPlaybackInterruption") to include in API requests with the JSON
2853	// null value. By default, fields with empty values are omitted from API
2854	// requests. However, any field with an empty value appearing in
2855	// NullFields will be sent to the server as null. It is an error if a
2856	// field in this list has a non-empty value. This may be used to include
2857	// null fields in Patch requests.
2858	NullFields []string `json:"-"`
2859}
2860
2861func (s *GoogleCloudDialogflowCxV3ResponseMessageText) MarshalJSON() ([]byte, error) {
2862	type NoMethod GoogleCloudDialogflowCxV3ResponseMessageText
2863	raw := NoMethod(*s)
2864	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2865}
2866
2867// GoogleCloudDialogflowCxV3RunContinuousTestMetadata: Metadata returned
2868// for the Environments.RunContinuousTest long running operation.
2869type GoogleCloudDialogflowCxV3RunContinuousTestMetadata struct {
2870	// Errors: The test errors.
2871	Errors []*GoogleCloudDialogflowCxV3TestError `json:"errors,omitempty"`
2872
2873	// ForceSendFields is a list of field names (e.g. "Errors") to
2874	// unconditionally include in API requests. By default, fields with
2875	// empty values are omitted from API requests. However, any non-pointer,
2876	// non-interface field appearing in ForceSendFields will be sent to the
2877	// server regardless of whether the field is empty or not. This may be
2878	// used to include empty fields in Patch requests.
2879	ForceSendFields []string `json:"-"`
2880
2881	// NullFields is a list of field names (e.g. "Errors") to include in API
2882	// requests with the JSON null value. By default, fields with empty
2883	// values are omitted from API requests. However, any field with an
2884	// empty value appearing in NullFields will be sent to the server as
2885	// null. It is an error if a field in this list has a non-empty value.
2886	// This may be used to include null fields in Patch requests.
2887	NullFields []string `json:"-"`
2888}
2889
2890func (s *GoogleCloudDialogflowCxV3RunContinuousTestMetadata) MarshalJSON() ([]byte, error) {
2891	type NoMethod GoogleCloudDialogflowCxV3RunContinuousTestMetadata
2892	raw := NoMethod(*s)
2893	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2894}
2895
2896// GoogleCloudDialogflowCxV3RunContinuousTestResponse: The response
2897// message for Environments.RunContinuousTest.
2898type GoogleCloudDialogflowCxV3RunContinuousTestResponse struct {
2899	// ContinuousTestResult: The result for a continuous test run.
2900	ContinuousTestResult *GoogleCloudDialogflowCxV3ContinuousTestResult `json:"continuousTestResult,omitempty"`
2901
2902	// ForceSendFields is a list of field names (e.g.
2903	// "ContinuousTestResult") to unconditionally include in API requests.
2904	// By default, fields with empty values are omitted from API requests.
2905	// However, any non-pointer, non-interface field appearing in
2906	// ForceSendFields will be sent to the server regardless of whether the
2907	// field is empty or not. This may be used to include empty fields in
2908	// Patch requests.
2909	ForceSendFields []string `json:"-"`
2910
2911	// NullFields is a list of field names (e.g. "ContinuousTestResult") to
2912	// include in API requests with the JSON null value. By default, fields
2913	// with empty values are omitted from API requests. However, any field
2914	// with an empty value appearing in NullFields will be sent to the
2915	// server as null. It is an error if a field in this list has a
2916	// non-empty value. This may be used to include null fields in Patch
2917	// requests.
2918	NullFields []string `json:"-"`
2919}
2920
2921func (s *GoogleCloudDialogflowCxV3RunContinuousTestResponse) MarshalJSON() ([]byte, error) {
2922	type NoMethod GoogleCloudDialogflowCxV3RunContinuousTestResponse
2923	raw := NoMethod(*s)
2924	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2925}
2926
2927// GoogleCloudDialogflowCxV3RunTestCaseMetadata: Metadata returned for
2928// the TestCases.RunTestCase long running operation.
2929type GoogleCloudDialogflowCxV3RunTestCaseMetadata struct {
2930}
2931
2932// GoogleCloudDialogflowCxV3RunTestCaseResponse: The response message
2933// for TestCases.RunTestCase.
2934type GoogleCloudDialogflowCxV3RunTestCaseResponse struct {
2935	// Result: The result.
2936	Result *GoogleCloudDialogflowCxV3TestCaseResult `json:"result,omitempty"`
2937
2938	// ForceSendFields is a list of field names (e.g. "Result") to
2939	// unconditionally include in API requests. By default, fields with
2940	// empty values are omitted from API requests. However, any non-pointer,
2941	// non-interface field appearing in ForceSendFields will be sent to the
2942	// server regardless of whether the field is empty or not. This may be
2943	// used to include empty fields in Patch requests.
2944	ForceSendFields []string `json:"-"`
2945
2946	// NullFields is a list of field names (e.g. "Result") to include in API
2947	// requests with the JSON null value. By default, fields with empty
2948	// values are omitted from API requests. However, any field with an
2949	// empty value appearing in NullFields will be sent to the server as
2950	// null. It is an error if a field in this list has a non-empty value.
2951	// This may be used to include null fields in Patch requests.
2952	NullFields []string `json:"-"`
2953}
2954
2955func (s *GoogleCloudDialogflowCxV3RunTestCaseResponse) MarshalJSON() ([]byte, error) {
2956	type NoMethod GoogleCloudDialogflowCxV3RunTestCaseResponse
2957	raw := NoMethod(*s)
2958	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2959}
2960
2961// GoogleCloudDialogflowCxV3SessionInfo: Represents session information
2962// communicated to and from the webhook.
2963type GoogleCloudDialogflowCxV3SessionInfo struct {
2964	// Parameters: Optional for WebhookRequest. Optional for
2965	// WebhookResponse. All parameters collected from forms and intents
2966	// during the session. Parameters can be created, updated, or removed by
2967	// the webhook. To remove a parameter from the session, the webhook
2968	// should explicitly set the parameter value to null in WebhookResponse.
2969	// The map is keyed by parameters' display names.
2970	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
2971
2972	// Session: Always present for WebhookRequest. Ignored for
2973	// WebhookResponse. The unique identifier of the session. This field can
2974	// be used by the webhook to identify a session. Format:
2975	// `projects//locations//agents//sessions/` or
2976	// `projects//locations//agents//environments//sessions/` if environment
2977	// is specified.
2978	Session string `json:"session,omitempty"`
2979
2980	// ForceSendFields is a list of field names (e.g. "Parameters") 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. "Parameters") to include in
2989	// API requests with the JSON null value. By default, fields with empty
2990	// values are omitted from API requests. However, any field with an
2991	// 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 *GoogleCloudDialogflowCxV3SessionInfo) MarshalJSON() ([]byte, error) {
2998	type NoMethod GoogleCloudDialogflowCxV3SessionInfo
2999	raw := NoMethod(*s)
3000	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3001}
3002
3003// GoogleCloudDialogflowCxV3TestCase: Represents a test case.
3004type GoogleCloudDialogflowCxV3TestCase struct {
3005	// CreationTime: Output only. When the test was created.
3006	CreationTime string `json:"creationTime,omitempty"`
3007
3008	// DisplayName: Required. The human-readable name of the test case,
3009	// unique within the agent. Limit of 200 characters.
3010	DisplayName string `json:"displayName,omitempty"`
3011
3012	// LastTestResult: The latest test result.
3013	LastTestResult *GoogleCloudDialogflowCxV3TestCaseResult `json:"lastTestResult,omitempty"`
3014
3015	// Name: The unique identifier of the test case.
3016	// TestCases.CreateTestCase will populate the name automatically.
3017	// Otherwise use format: `projects//locations//agents/ /testCases/`.
3018	Name string `json:"name,omitempty"`
3019
3020	// Notes: Additional freeform notes about the test case. Limit of 400
3021	// characters.
3022	Notes string `json:"notes,omitempty"`
3023
3024	// Tags: Tags are short descriptions that users may apply to test cases
3025	// for organizational and filtering purposes. Each tag should start with
3026	// "#" and has a limit of 30 characters.
3027	Tags []string `json:"tags,omitempty"`
3028
3029	// TestCaseConversationTurns: The conversation turns uttered when the
3030	// test case was created, in chronological order. These include the
3031	// canonical set of agent utterances that should occur when the agent is
3032	// working properly.
3033	TestCaseConversationTurns []*GoogleCloudDialogflowCxV3ConversationTurn `json:"testCaseConversationTurns,omitempty"`
3034
3035	// TestConfig: Config for the test case.
3036	TestConfig *GoogleCloudDialogflowCxV3TestConfig `json:"testConfig,omitempty"`
3037
3038	// ForceSendFields is a list of field names (e.g. "CreationTime") to
3039	// unconditionally include in API requests. By default, fields with
3040	// empty values are omitted from API requests. However, any non-pointer,
3041	// non-interface field appearing in ForceSendFields will be sent to the
3042	// server regardless of whether the field is empty or not. This may be
3043	// used to include empty fields in Patch requests.
3044	ForceSendFields []string `json:"-"`
3045
3046	// NullFields is a list of field names (e.g. "CreationTime") to include
3047	// in API requests with the JSON null value. By default, fields with
3048	// empty values are omitted from API requests. However, any field with
3049	// an empty value appearing in NullFields will be sent to the server as
3050	// null. It is an error if a field in this list has a non-empty value.
3051	// This may be used to include null fields in Patch requests.
3052	NullFields []string `json:"-"`
3053}
3054
3055func (s *GoogleCloudDialogflowCxV3TestCase) MarshalJSON() ([]byte, error) {
3056	type NoMethod GoogleCloudDialogflowCxV3TestCase
3057	raw := NoMethod(*s)
3058	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3059}
3060
3061// GoogleCloudDialogflowCxV3TestCaseError: Error info for importing a
3062// test.
3063type GoogleCloudDialogflowCxV3TestCaseError struct {
3064	// Status: The status associated with the test case.
3065	Status *GoogleRpcStatus `json:"status,omitempty"`
3066
3067	// TestCase: The test case.
3068	TestCase *GoogleCloudDialogflowCxV3TestCase `json:"testCase,omitempty"`
3069
3070	// ForceSendFields is a list of field names (e.g. "Status") to
3071	// unconditionally include in API requests. By default, fields with
3072	// empty values are omitted from API requests. However, any non-pointer,
3073	// non-interface field appearing in ForceSendFields will be sent to the
3074	// server regardless of whether the field is empty or not. This may be
3075	// used to include empty fields in Patch requests.
3076	ForceSendFields []string `json:"-"`
3077
3078	// NullFields is a list of field names (e.g. "Status") to include in API
3079	// requests with the JSON null value. By default, fields with empty
3080	// values are omitted from API requests. However, any field with an
3081	// empty value appearing in NullFields will be sent to the server as
3082	// null. It is an error if a field in this list has a non-empty value.
3083	// This may be used to include null fields in Patch requests.
3084	NullFields []string `json:"-"`
3085}
3086
3087func (s *GoogleCloudDialogflowCxV3TestCaseError) MarshalJSON() ([]byte, error) {
3088	type NoMethod GoogleCloudDialogflowCxV3TestCaseError
3089	raw := NoMethod(*s)
3090	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3091}
3092
3093// GoogleCloudDialogflowCxV3TestCaseResult: Represents a result from
3094// running a test case in an agent environment.
3095type GoogleCloudDialogflowCxV3TestCaseResult struct {
3096	// ConversationTurns: The conversation turns uttered during the test
3097	// case replay in chronological order.
3098	ConversationTurns []*GoogleCloudDialogflowCxV3ConversationTurn `json:"conversationTurns,omitempty"`
3099
3100	// Environment: Environment where the test was run. If not set, it
3101	// indicates the draft environment.
3102	Environment string `json:"environment,omitempty"`
3103
3104	// Name: The resource name for the test case result. Format:
3105	// `projects//locations//agents//testCases/ /results/`.
3106	Name string `json:"name,omitempty"`
3107
3108	// TestResult: Whether the test case passed in the agent environment.
3109	//
3110	// Possible values:
3111	//   "TEST_RESULT_UNSPECIFIED" - Not specified. Should never be used.
3112	//   "PASSED" - The test passed.
3113	//   "FAILED" - The test did not pass.
3114	TestResult string `json:"testResult,omitempty"`
3115
3116	// TestTime: The time that the test was run.
3117	TestTime string `json:"testTime,omitempty"`
3118
3119	// ForceSendFields is a list of field names (e.g. "ConversationTurns")
3120	// to 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. "ConversationTurns") to
3128	// include in API requests with the JSON null value. By default, fields
3129	// with empty values are omitted from API requests. However, any field
3130	// with an empty value appearing in NullFields will be sent to the
3131	// server as null. It is an error if a field in this list has a
3132	// non-empty value. This may be used to include null fields in Patch
3133	// requests.
3134	NullFields []string `json:"-"`
3135}
3136
3137func (s *GoogleCloudDialogflowCxV3TestCaseResult) MarshalJSON() ([]byte, error) {
3138	type NoMethod GoogleCloudDialogflowCxV3TestCaseResult
3139	raw := NoMethod(*s)
3140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3141}
3142
3143// GoogleCloudDialogflowCxV3TestConfig: Represents configurations for a
3144// test case.
3145type GoogleCloudDialogflowCxV3TestConfig struct {
3146	// Flow: Flow name. If not set, default start flow is assumed. Format:
3147	// `projects//locations//agents//flows/`.
3148	Flow string `json:"flow,omitempty"`
3149
3150	// TrackingParameters: Session parameters to be compared when
3151	// calculating differences.
3152	TrackingParameters []string `json:"trackingParameters,omitempty"`
3153
3154	// ForceSendFields is a list of field names (e.g. "Flow") to
3155	// unconditionally include in API requests. By default, fields with
3156	// empty values are omitted from API requests. However, any non-pointer,
3157	// non-interface field appearing in ForceSendFields will be sent to the
3158	// server regardless of whether the field is empty or not. This may be
3159	// used to include empty fields in Patch requests.
3160	ForceSendFields []string `json:"-"`
3161
3162	// NullFields is a list of field names (e.g. "Flow") to include in API
3163	// requests with the JSON null value. By default, fields with empty
3164	// values are omitted from API requests. However, any field with an
3165	// empty value appearing in NullFields will be sent to the server as
3166	// null. It is an error if a field in this list has a non-empty value.
3167	// This may be used to include null fields in Patch requests.
3168	NullFields []string `json:"-"`
3169}
3170
3171func (s *GoogleCloudDialogflowCxV3TestConfig) MarshalJSON() ([]byte, error) {
3172	type NoMethod GoogleCloudDialogflowCxV3TestConfig
3173	raw := NoMethod(*s)
3174	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3175}
3176
3177// GoogleCloudDialogflowCxV3TestError: Error info for running a test.
3178type GoogleCloudDialogflowCxV3TestError struct {
3179	// Status: The status associated with the test.
3180	Status *GoogleRpcStatus `json:"status,omitempty"`
3181
3182	// TestCase: The test case resource name.
3183	TestCase string `json:"testCase,omitempty"`
3184
3185	// TestTime: The timestamp when the test was completed.
3186	TestTime string `json:"testTime,omitempty"`
3187
3188	// ForceSendFields is a list of field names (e.g. "Status") to
3189	// unconditionally include in API requests. By default, fields with
3190	// empty values are omitted from API requests. However, any non-pointer,
3191	// non-interface field appearing in ForceSendFields will be sent to the
3192	// server regardless of whether the field is empty or not. This may be
3193	// used to include empty fields in Patch requests.
3194	ForceSendFields []string `json:"-"`
3195
3196	// NullFields is a list of field names (e.g. "Status") to include in API
3197	// requests with the JSON null value. By default, fields with empty
3198	// values are omitted from API requests. However, any field with an
3199	// empty value appearing in NullFields will be sent to the server as
3200	// null. It is an error if a field in this list has a non-empty value.
3201	// This may be used to include null fields in Patch requests.
3202	NullFields []string `json:"-"`
3203}
3204
3205func (s *GoogleCloudDialogflowCxV3TestError) MarshalJSON() ([]byte, error) {
3206	type NoMethod GoogleCloudDialogflowCxV3TestError
3207	raw := NoMethod(*s)
3208	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3209}
3210
3211// GoogleCloudDialogflowCxV3TestRunDifference: The description of
3212// differences between original and replayed agent output.
3213type GoogleCloudDialogflowCxV3TestRunDifference struct {
3214	// Description: A description of the diff, showing the actual output vs
3215	// expected output.
3216	Description string `json:"description,omitempty"`
3217
3218	// Type: The type of diff.
3219	//
3220	// Possible values:
3221	//   "DIFF_TYPE_UNSPECIFIED" - Should never be used.
3222	//   "INTENT" - The intent.
3223	//   "PAGE" - The page.
3224	//   "PARAMETERS" - The parameters.
3225	//   "UTTERANCE" - The message utterance.
3226	Type string `json:"type,omitempty"`
3227
3228	// ForceSendFields is a list of field names (e.g. "Description") to
3229	// unconditionally include in API requests. By default, fields with
3230	// empty values are omitted from API requests. However, any non-pointer,
3231	// non-interface field appearing in ForceSendFields will be sent to the
3232	// server regardless of whether the field is empty or not. This may be
3233	// used to include empty fields in Patch requests.
3234	ForceSendFields []string `json:"-"`
3235
3236	// NullFields is a list of field names (e.g. "Description") to include
3237	// in API requests with the JSON null value. By default, fields with
3238	// empty values are omitted from API requests. However, any field with
3239	// an empty value appearing in NullFields will be sent to the server as
3240	// null. It is an error if a field in this list has a non-empty value.
3241	// This may be used to include null fields in Patch requests.
3242	NullFields []string `json:"-"`
3243}
3244
3245func (s *GoogleCloudDialogflowCxV3TestRunDifference) MarshalJSON() ([]byte, error) {
3246	type NoMethod GoogleCloudDialogflowCxV3TestRunDifference
3247	raw := NoMethod(*s)
3248	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3249}
3250
3251// GoogleCloudDialogflowCxV3TextInput: Represents the natural language
3252// text to be processed.
3253type GoogleCloudDialogflowCxV3TextInput struct {
3254	// Text: Required. The UTF-8 encoded natural language text to be
3255	// processed. Text length must not exceed 256 characters.
3256	Text string `json:"text,omitempty"`
3257
3258	// ForceSendFields is a list of field names (e.g. "Text") to
3259	// unconditionally include in API requests. By default, fields with
3260	// empty values are omitted from API requests. However, any non-pointer,
3261	// non-interface field appearing in ForceSendFields will be sent to the
3262	// server regardless of whether the field is empty or not. This may be
3263	// used to include empty fields in Patch requests.
3264	ForceSendFields []string `json:"-"`
3265
3266	// NullFields is a list of field names (e.g. "Text") to include in API
3267	// requests with the JSON null value. By default, fields with empty
3268	// values are omitted from API requests. However, any field with an
3269	// empty value appearing in NullFields will be sent to the server as
3270	// null. It is an error if a field in this list has a non-empty value.
3271	// This may be used to include null fields in Patch requests.
3272	NullFields []string `json:"-"`
3273}
3274
3275func (s *GoogleCloudDialogflowCxV3TextInput) MarshalJSON() ([]byte, error) {
3276	type NoMethod GoogleCloudDialogflowCxV3TextInput
3277	raw := NoMethod(*s)
3278	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3279}
3280
3281// GoogleCloudDialogflowCxV3TransitionRoute: A transition route
3282// specifies a intent that can be matched and/or a data condition that
3283// can be evaluated during a session. When a specified transition is
3284// matched, the following actions are taken in order: * If there is a
3285// `trigger_fulfillment` associated with the transition, it will be
3286// called. * If there is a `target_page` associated with the transition,
3287// the session will transition into the specified page. * If there is a
3288// `target_flow` associated with the transition, the session will
3289// transition into the specified flow.
3290type GoogleCloudDialogflowCxV3TransitionRoute struct {
3291	// Condition: The condition to evaluate against form parameters or
3292	// session parameters. See the conditions reference
3293	// (https://cloud.google.com/dialogflow/cx/docs/reference/condition). At
3294	// least one of `intent` or `condition` must be specified. When both
3295	// `intent` and `condition` are specified, the transition can only
3296	// happen when both are fulfilled.
3297	Condition string `json:"condition,omitempty"`
3298
3299	// Intent: The unique identifier of an Intent. Format:
3300	// `projects//locations//agents//intents/`. Indicates that the
3301	// transition can only happen when the given intent is matched. At least
3302	// one of `intent` or `condition` must be specified. When both `intent`
3303	// and `condition` are specified, the transition can only happen when
3304	// both are fulfilled.
3305	Intent string `json:"intent,omitempty"`
3306
3307	// Name: Output only. The unique identifier of this transition route.
3308	Name string `json:"name,omitempty"`
3309
3310	// TargetFlow: The target flow to transition to. Format:
3311	// `projects//locations//agents//flows/`.
3312	TargetFlow string `json:"targetFlow,omitempty"`
3313
3314	// TargetPage: The target page to transition to. Format:
3315	// `projects//locations//agents//flows//pages/`.
3316	TargetPage string `json:"targetPage,omitempty"`
3317
3318	// TriggerFulfillment: The fulfillment to call when the condition is
3319	// satisfied. At least one of `trigger_fulfillment` and `target` must be
3320	// specified. When both are defined, `trigger_fulfillment` is executed
3321	// first.
3322	TriggerFulfillment *GoogleCloudDialogflowCxV3Fulfillment `json:"triggerFulfillment,omitempty"`
3323
3324	// ForceSendFields is a list of field names (e.g. "Condition") to
3325	// unconditionally include in API requests. By default, fields with
3326	// empty values are omitted from API requests. However, any non-pointer,
3327	// non-interface field appearing in ForceSendFields will be sent to the
3328	// server regardless of whether the field is empty or not. This may be
3329	// used to include empty fields in Patch requests.
3330	ForceSendFields []string `json:"-"`
3331
3332	// NullFields is a list of field names (e.g. "Condition") to include in
3333	// API requests with the JSON null value. By default, fields with empty
3334	// values are omitted from API requests. However, any field with an
3335	// empty value appearing in NullFields will be sent to the server as
3336	// null. It is an error if a field in this list has a non-empty value.
3337	// This may be used to include null fields in Patch requests.
3338	NullFields []string `json:"-"`
3339}
3340
3341func (s *GoogleCloudDialogflowCxV3TransitionRoute) MarshalJSON() ([]byte, error) {
3342	type NoMethod GoogleCloudDialogflowCxV3TransitionRoute
3343	raw := NoMethod(*s)
3344	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3345}
3346
3347// GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata: Metadata
3348// for UpdateDocument operation.
3349type GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata struct {
3350	// GenericMetadata: The generic information of the operation.
3351	GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
3352
3353	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
3354	// unconditionally include in API requests. By default, fields with
3355	// empty values are omitted from API requests. However, any non-pointer,
3356	// non-interface field appearing in ForceSendFields will be sent to the
3357	// server regardless of whether the field is empty or not. This may be
3358	// used to include empty fields in Patch requests.
3359	ForceSendFields []string `json:"-"`
3360
3361	// NullFields is a list of field names (e.g. "GenericMetadata") to
3362	// include in API requests with the JSON null value. By default, fields
3363	// with empty values are omitted from API requests. However, any field
3364	// with an empty value appearing in NullFields will be sent to the
3365	// server as null. It is an error if a field in this list has a
3366	// non-empty value. This may be used to include null fields in Patch
3367	// requests.
3368	NullFields []string `json:"-"`
3369}
3370
3371func (s *GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
3372	type NoMethod GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata
3373	raw := NoMethod(*s)
3374	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3375}
3376
3377// GoogleCloudDialogflowCxV3WebhookRequest: The request message for a
3378// webhook call. The request is sent as a JSON object and the field
3379// names will be presented in camel cases.
3380type GoogleCloudDialogflowCxV3WebhookRequest struct {
3381	// DetectIntentResponseId: Always present. The unique identifier of the
3382	// DetectIntentResponse that will be returned to the API caller.
3383	DetectIntentResponseId string `json:"detectIntentResponseId,omitempty"`
3384
3385	// FulfillmentInfo: Always present. Information about the fulfillment
3386	// that triggered this webhook call.
3387	FulfillmentInfo *GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo `json:"fulfillmentInfo,omitempty"`
3388
3389	// IntentInfo: Information about the last matched intent.
3390	IntentInfo *GoogleCloudDialogflowCxV3WebhookRequestIntentInfo `json:"intentInfo,omitempty"`
3391
3392	// LanguageCode: The language code specified in the original request.
3393	LanguageCode string `json:"languageCode,omitempty"`
3394
3395	// Messages: The list of rich message responses to present to the user.
3396	// Webhook can choose to append or replace this list in
3397	// WebhookResponse.fulfillment_response;
3398	Messages []*GoogleCloudDialogflowCxV3ResponseMessage `json:"messages,omitempty"`
3399
3400	// PageInfo: Information about page status.
3401	PageInfo *GoogleCloudDialogflowCxV3PageInfo `json:"pageInfo,omitempty"`
3402
3403	// Payload: Custom data set in QueryParameters.payload.
3404	Payload googleapi.RawMessage `json:"payload,omitempty"`
3405
3406	// SentimentAnalysisResult: The sentiment analysis result of the current
3407	// user request. The field is filled when sentiment analysis is
3408	// configured to be enabled for the request.
3409	SentimentAnalysisResult *GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"`
3410
3411	// SessionInfo: Information about session status.
3412	SessionInfo *GoogleCloudDialogflowCxV3SessionInfo `json:"sessionInfo,omitempty"`
3413
3414	// Text: If natural language text was provided as input, this field will
3415	// contain a copy of the text.
3416	Text string `json:"text,omitempty"`
3417
3418	// Transcript: If natural language speech audio was provided as input,
3419	// this field will contain the transcript for the audio.
3420	Transcript string `json:"transcript,omitempty"`
3421
3422	// TriggerEvent: If an event was provided as input, this field will
3423	// contain the name of the event.
3424	TriggerEvent string `json:"triggerEvent,omitempty"`
3425
3426	// TriggerIntent: If an intent was provided as input, this field will
3427	// contain a copy of the intent identifier. Format:
3428	// `projects//locations//agents//intents/`.
3429	TriggerIntent string `json:"triggerIntent,omitempty"`
3430
3431	// ForceSendFields is a list of field names (e.g.
3432	// "DetectIntentResponseId") to unconditionally include in API requests.
3433	// By default, fields with empty values are omitted from API requests.
3434	// However, any non-pointer, non-interface field appearing in
3435	// ForceSendFields will be sent to the server regardless of whether the
3436	// field is empty or not. This may be used to include empty fields in
3437	// Patch requests.
3438	ForceSendFields []string `json:"-"`
3439
3440	// NullFields is a list of field names (e.g. "DetectIntentResponseId")
3441	// to include in API requests with the JSON null value. By default,
3442	// fields with empty values are omitted from API requests. However, any
3443	// field with an empty value appearing in NullFields will be sent to the
3444	// server as null. It is an error if a field in this list has a
3445	// non-empty value. This may be used to include null fields in Patch
3446	// requests.
3447	NullFields []string `json:"-"`
3448}
3449
3450func (s *GoogleCloudDialogflowCxV3WebhookRequest) MarshalJSON() ([]byte, error) {
3451	type NoMethod GoogleCloudDialogflowCxV3WebhookRequest
3452	raw := NoMethod(*s)
3453	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3454}
3455
3456// GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo: Represents
3457// fulfillment information communicated to the webhook.
3458type GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo struct {
3459	// Tag: Always present. The tag used to identify which fulfillment is
3460	// being called.
3461	Tag string `json:"tag,omitempty"`
3462
3463	// ForceSendFields is a list of field names (e.g. "Tag") to
3464	// unconditionally include in API requests. By default, fields with
3465	// empty values are omitted from API requests. However, any non-pointer,
3466	// non-interface field appearing in ForceSendFields will be sent to the
3467	// server regardless of whether the field is empty or not. This may be
3468	// used to include empty fields in Patch requests.
3469	ForceSendFields []string `json:"-"`
3470
3471	// NullFields is a list of field names (e.g. "Tag") to include in API
3472	// requests with the JSON null value. By default, fields with empty
3473	// values are omitted from API requests. However, any field with an
3474	// empty value appearing in NullFields will be sent to the server as
3475	// null. It is an error if a field in this list has a non-empty value.
3476	// This may be used to include null fields in Patch requests.
3477	NullFields []string `json:"-"`
3478}
3479
3480func (s *GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo) MarshalJSON() ([]byte, error) {
3481	type NoMethod GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo
3482	raw := NoMethod(*s)
3483	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3484}
3485
3486// GoogleCloudDialogflowCxV3WebhookRequestIntentInfo: Represents intent
3487// information communicated to the webhook.
3488type GoogleCloudDialogflowCxV3WebhookRequestIntentInfo struct {
3489	// Confidence: The confidence of the matched intent. Values range from
3490	// 0.0 (completely uncertain) to 1.0 (completely certain).
3491	Confidence float64 `json:"confidence,omitempty"`
3492
3493	// DisplayName: Always present. The display name of the last matched
3494	// intent.
3495	DisplayName string `json:"displayName,omitempty"`
3496
3497	// LastMatchedIntent: Always present. The unique identifier of the last
3498	// matched intent. Format: `projects//locations//agents//intents/`.
3499	LastMatchedIntent string `json:"lastMatchedIntent,omitempty"`
3500
3501	// Parameters: Parameters identified as a result of intent matching.
3502	// This is a map of the name of the identified parameter to the value of
3503	// the parameter identified from the user's utterance. All parameters
3504	// defined in the matched intent that are identified will be surfaced
3505	// here.
3506	Parameters map[string]GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue `json:"parameters,omitempty"`
3507
3508	// ForceSendFields is a list of field names (e.g. "Confidence") to
3509	// unconditionally include in API requests. By default, fields with
3510	// empty values are omitted from API requests. However, any non-pointer,
3511	// non-interface field appearing in ForceSendFields will be sent to the
3512	// server regardless of whether the field is empty or not. This may be
3513	// used to include empty fields in Patch requests.
3514	ForceSendFields []string `json:"-"`
3515
3516	// NullFields is a list of field names (e.g. "Confidence") to include in
3517	// API requests with the JSON null value. By default, fields with empty
3518	// values are omitted from API requests. However, any field with an
3519	// empty value appearing in NullFields will be sent to the server as
3520	// null. It is an error if a field in this list has a non-empty value.
3521	// This may be used to include null fields in Patch requests.
3522	NullFields []string `json:"-"`
3523}
3524
3525func (s *GoogleCloudDialogflowCxV3WebhookRequestIntentInfo) MarshalJSON() ([]byte, error) {
3526	type NoMethod GoogleCloudDialogflowCxV3WebhookRequestIntentInfo
3527	raw := NoMethod(*s)
3528	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3529}
3530
3531func (s *GoogleCloudDialogflowCxV3WebhookRequestIntentInfo) UnmarshalJSON(data []byte) error {
3532	type NoMethod GoogleCloudDialogflowCxV3WebhookRequestIntentInfo
3533	var s1 struct {
3534		Confidence gensupport.JSONFloat64 `json:"confidence"`
3535		*NoMethod
3536	}
3537	s1.NoMethod = (*NoMethod)(s)
3538	if err := json.Unmarshal(data, &s1); err != nil {
3539		return err
3540	}
3541	s.Confidence = float64(s1.Confidence)
3542	return nil
3543}
3544
3545// GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue:
3546//  Represents a value for an intent parameter.
3547type GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue struct {
3548	// OriginalValue: Always present. Original text value extracted from
3549	// user utterance.
3550	OriginalValue string `json:"originalValue,omitempty"`
3551
3552	// ResolvedValue: Always present. Structured value for the parameter
3553	// extracted from user utterance.
3554	ResolvedValue interface{} `json:"resolvedValue,omitempty"`
3555
3556	// ForceSendFields is a list of field names (e.g. "OriginalValue") to
3557	// unconditionally include in API requests. By default, fields with
3558	// empty values are omitted from API requests. However, any non-pointer,
3559	// non-interface field appearing in ForceSendFields will be sent to the
3560	// server regardless of whether the field is empty or not. This may be
3561	// used to include empty fields in Patch requests.
3562	ForceSendFields []string `json:"-"`
3563
3564	// NullFields is a list of field names (e.g. "OriginalValue") to include
3565	// in API requests with the JSON null value. By default, fields with
3566	// empty values are omitted from API requests. However, any field with
3567	// an empty value appearing in NullFields will be sent to the server as
3568	// null. It is an error if a field in this list has a non-empty value.
3569	// This may be used to include null fields in Patch requests.
3570	NullFields []string `json:"-"`
3571}
3572
3573func (s *GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue) MarshalJSON() ([]byte, error) {
3574	type NoMethod GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue
3575	raw := NoMethod(*s)
3576	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3577}
3578
3579// GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult:
3580// Represents the result of sentiment analysis.
3581type GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult struct {
3582	// Magnitude: A non-negative number in the [0, +inf) range, which
3583	// represents the absolute magnitude of sentiment, regardless of score
3584	// (positive or negative).
3585	Magnitude float64 `json:"magnitude,omitempty"`
3586
3587	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0
3588	// (positive sentiment).
3589	Score float64 `json:"score,omitempty"`
3590
3591	// ForceSendFields is a list of field names (e.g. "Magnitude") to
3592	// unconditionally include in API requests. By default, fields with
3593	// empty values are omitted from API requests. However, any non-pointer,
3594	// non-interface field appearing in ForceSendFields will be sent to the
3595	// server regardless of whether the field is empty or not. This may be
3596	// used to include empty fields in Patch requests.
3597	ForceSendFields []string `json:"-"`
3598
3599	// NullFields is a list of field names (e.g. "Magnitude") to include in
3600	// API requests with the JSON null value. By default, fields with empty
3601	// values are omitted from API requests. However, any field with an
3602	// empty value appearing in NullFields will be sent to the server as
3603	// null. It is an error if a field in this list has a non-empty value.
3604	// This may be used to include null fields in Patch requests.
3605	NullFields []string `json:"-"`
3606}
3607
3608func (s *GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult) MarshalJSON() ([]byte, error) {
3609	type NoMethod GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult
3610	raw := NoMethod(*s)
3611	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3612}
3613
3614func (s *GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult) UnmarshalJSON(data []byte) error {
3615	type NoMethod GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult
3616	var s1 struct {
3617		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
3618		Score     gensupport.JSONFloat64 `json:"score"`
3619		*NoMethod
3620	}
3621	s1.NoMethod = (*NoMethod)(s)
3622	if err := json.Unmarshal(data, &s1); err != nil {
3623		return err
3624	}
3625	s.Magnitude = float64(s1.Magnitude)
3626	s.Score = float64(s1.Score)
3627	return nil
3628}
3629
3630// GoogleCloudDialogflowCxV3WebhookResponse: The response message for a
3631// webhook call.
3632type GoogleCloudDialogflowCxV3WebhookResponse struct {
3633	// FulfillmentResponse: The fulfillment response to send to the user.
3634	// This field can be omitted by the webhook if it does not intend to
3635	// send any response to the user.
3636	FulfillmentResponse *GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse `json:"fulfillmentResponse,omitempty"`
3637
3638	// PageInfo: Information about page status. This field can be omitted by
3639	// the webhook if it does not intend to modify page status.
3640	PageInfo *GoogleCloudDialogflowCxV3PageInfo `json:"pageInfo,omitempty"`
3641
3642	// Payload: Value to append directly to QueryResult.webhook_payloads.
3643	Payload googleapi.RawMessage `json:"payload,omitempty"`
3644
3645	// SessionInfo: Information about session status. This field can be
3646	// omitted by the webhook if it does not intend to modify session
3647	// status.
3648	SessionInfo *GoogleCloudDialogflowCxV3SessionInfo `json:"sessionInfo,omitempty"`
3649
3650	// TargetFlow: The target flow to transition to. Format:
3651	// `projects//locations//agents//flows/`.
3652	TargetFlow string `json:"targetFlow,omitempty"`
3653
3654	// TargetPage: The target page to transition to. Format:
3655	// `projects//locations//agents//flows//pages/`.
3656	TargetPage string `json:"targetPage,omitempty"`
3657
3658	// ForceSendFields is a list of field names (e.g. "FulfillmentResponse")
3659	// to unconditionally include in API requests. By default, fields with
3660	// empty values are omitted from API requests. However, any non-pointer,
3661	// non-interface field appearing in ForceSendFields will be sent to the
3662	// server regardless of whether the field is empty or not. This may be
3663	// used to include empty fields in Patch requests.
3664	ForceSendFields []string `json:"-"`
3665
3666	// NullFields is a list of field names (e.g. "FulfillmentResponse") to
3667	// include in API requests with the JSON null value. By default, fields
3668	// with empty values are omitted from API requests. However, any field
3669	// with an empty value appearing in NullFields will be sent to the
3670	// server as null. It is an error if a field in this list has a
3671	// non-empty value. This may be used to include null fields in Patch
3672	// requests.
3673	NullFields []string `json:"-"`
3674}
3675
3676func (s *GoogleCloudDialogflowCxV3WebhookResponse) MarshalJSON() ([]byte, error) {
3677	type NoMethod GoogleCloudDialogflowCxV3WebhookResponse
3678	raw := NoMethod(*s)
3679	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3680}
3681
3682// GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse:
3683// Represents a fulfillment response to the user.
3684type GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse struct {
3685	// MergeBehavior: Merge behavior for `messages`.
3686	//
3687	// Possible values:
3688	//   "MERGE_BEHAVIOR_UNSPECIFIED" - Not specified. `APPEND` will be
3689	// used.
3690	//   "APPEND" - `messages` will be appended to the list of messages
3691	// waiting to be sent to the user.
3692	//   "REPLACE" - `messages` will replace the list of messages waiting to
3693	// be sent to the user.
3694	MergeBehavior string `json:"mergeBehavior,omitempty"`
3695
3696	// Messages: The list of rich message responses to present to the user.
3697	Messages []*GoogleCloudDialogflowCxV3ResponseMessage `json:"messages,omitempty"`
3698
3699	// ForceSendFields is a list of field names (e.g. "MergeBehavior") to
3700	// unconditionally include in API requests. By default, fields with
3701	// empty values are omitted from API requests. However, any non-pointer,
3702	// non-interface field appearing in ForceSendFields will be sent to the
3703	// server regardless of whether the field is empty or not. This may be
3704	// used to include empty fields in Patch requests.
3705	ForceSendFields []string `json:"-"`
3706
3707	// NullFields is a list of field names (e.g. "MergeBehavior") to include
3708	// in API requests with the JSON null value. By default, fields with
3709	// empty values are omitted from API requests. However, any field with
3710	// an empty value appearing in NullFields will be sent to the server as
3711	// null. It is an error if a field in this list has a non-empty value.
3712	// This may be used to include null fields in Patch requests.
3713	NullFields []string `json:"-"`
3714}
3715
3716func (s *GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse) MarshalJSON() ([]byte, error) {
3717	type NoMethod GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse
3718	raw := NoMethod(*s)
3719	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3720}
3721
3722// GoogleCloudDialogflowCxV3beta1AudioInput: Represents the natural
3723// speech audio to be processed.
3724type GoogleCloudDialogflowCxV3beta1AudioInput struct {
3725	// Audio: The natural language speech audio to be processed. A single
3726	// request can contain up to 1 minute of speech audio data. The
3727	// transcribed text cannot contain more than 256 bytes. For
3728	// non-streaming audio detect intent, both `config` and `audio` must be
3729	// provided. For streaming audio detect intent, `config` must be
3730	// provided in the first request and `audio` must be provided in all
3731	// following requests.
3732	Audio string `json:"audio,omitempty"`
3733
3734	// Config: Required. Instructs the speech recognizer how to process the
3735	// speech audio.
3736	Config *GoogleCloudDialogflowCxV3beta1InputAudioConfig `json:"config,omitempty"`
3737
3738	// ForceSendFields is a list of field names (e.g. "Audio") to
3739	// unconditionally include in API requests. By default, fields with
3740	// empty values are omitted from API requests. However, any non-pointer,
3741	// non-interface field appearing in ForceSendFields will be sent to the
3742	// server regardless of whether the field is empty or not. This may be
3743	// used to include empty fields in Patch requests.
3744	ForceSendFields []string `json:"-"`
3745
3746	// NullFields is a list of field names (e.g. "Audio") to include in API
3747	// requests with the JSON null value. By default, fields with empty
3748	// values are omitted from API requests. However, any field with an
3749	// empty value appearing in NullFields will be sent to the server as
3750	// null. It is an error if a field in this list has a non-empty value.
3751	// This may be used to include null fields in Patch requests.
3752	NullFields []string `json:"-"`
3753}
3754
3755func (s *GoogleCloudDialogflowCxV3beta1AudioInput) MarshalJSON() ([]byte, error) {
3756	type NoMethod GoogleCloudDialogflowCxV3beta1AudioInput
3757	raw := NoMethod(*s)
3758	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3759}
3760
3761// GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata: Metadata
3762// returned for the TestCases.BatchRunTestCases long running operation.
3763type GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata struct {
3764	// Errors: The test errors.
3765	Errors []*GoogleCloudDialogflowCxV3beta1TestError `json:"errors,omitempty"`
3766
3767	// ForceSendFields is a list of field names (e.g. "Errors") to
3768	// unconditionally include in API requests. By default, fields with
3769	// empty values are omitted from API requests. However, any non-pointer,
3770	// non-interface field appearing in ForceSendFields will be sent to the
3771	// server regardless of whether the field is empty or not. This may be
3772	// used to include empty fields in Patch requests.
3773	ForceSendFields []string `json:"-"`
3774
3775	// NullFields is a list of field names (e.g. "Errors") to include in API
3776	// requests with the JSON null value. By default, fields with empty
3777	// values are omitted from API requests. However, any field with an
3778	// empty value appearing in NullFields will be sent to the server as
3779	// null. It is an error if a field in this list has a non-empty value.
3780	// This may be used to include null fields in Patch requests.
3781	NullFields []string `json:"-"`
3782}
3783
3784func (s *GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata) MarshalJSON() ([]byte, error) {
3785	type NoMethod GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata
3786	raw := NoMethod(*s)
3787	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3788}
3789
3790// GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse: The response
3791// message for TestCases.BatchRunTestCases.
3792type GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse struct {
3793	// Results: The test case results. The detailed conversation turns are
3794	// empty in this response.
3795	Results []*GoogleCloudDialogflowCxV3beta1TestCaseResult `json:"results,omitempty"`
3796
3797	// ForceSendFields is a list of field names (e.g. "Results") to
3798	// unconditionally include in API requests. By default, fields with
3799	// empty values are omitted from API requests. However, any non-pointer,
3800	// non-interface field appearing in ForceSendFields will be sent to the
3801	// server regardless of whether the field is empty or not. This may be
3802	// used to include empty fields in Patch requests.
3803	ForceSendFields []string `json:"-"`
3804
3805	// NullFields is a list of field names (e.g. "Results") to include in
3806	// API requests with the JSON null value. By default, fields with empty
3807	// values are omitted from API requests. However, any field with an
3808	// empty value appearing in NullFields will be sent to the server as
3809	// null. It is an error if a field in this list has a non-empty value.
3810	// This may be used to include null fields in Patch requests.
3811	NullFields []string `json:"-"`
3812}
3813
3814func (s *GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse) MarshalJSON() ([]byte, error) {
3815	type NoMethod GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse
3816	raw := NoMethod(*s)
3817	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3818}
3819
3820// GoogleCloudDialogflowCxV3beta1ContinuousTestResult: Represents a
3821// result from running a test case in an agent environment.
3822type GoogleCloudDialogflowCxV3beta1ContinuousTestResult struct {
3823	// Name: The resource name for the continuous test result. Format:
3824	// `projects//locations//agents//environments//continuousTestResults/`.
3825	Name string `json:"name,omitempty"`
3826
3827	// Result: The result of this continuous test run, i.e. whether all the
3828	// tests in this continuous test run pass or not.
3829	//
3830	// Possible values:
3831	//   "AGGREGATED_TEST_RESULT_UNSPECIFIED" - Not specified. Should never
3832	// be used.
3833	//   "PASSED" - All the tests passed.
3834	//   "FAILED" - At least one test did not pass.
3835	Result string `json:"result,omitempty"`
3836
3837	// RunTime: Time when the continuous testing run starts.
3838	RunTime string `json:"runTime,omitempty"`
3839
3840	// TestCaseResults: A list of individual test case results names in this
3841	// continuous test run.
3842	TestCaseResults []string `json:"testCaseResults,omitempty"`
3843
3844	// ForceSendFields is a list of field names (e.g. "Name") to
3845	// unconditionally include in API requests. By default, fields with
3846	// empty values are omitted from API requests. However, any non-pointer,
3847	// non-interface field appearing in ForceSendFields will be sent to the
3848	// server regardless of whether the field is empty or not. This may be
3849	// used to include empty fields in Patch requests.
3850	ForceSendFields []string `json:"-"`
3851
3852	// NullFields is a list of field names (e.g. "Name") to include in API
3853	// requests with the JSON null value. By default, fields with empty
3854	// values are omitted from API requests. However, any field with an
3855	// empty value appearing in NullFields will be sent to the server as
3856	// null. It is an error if a field in this list has a non-empty value.
3857	// This may be used to include null fields in Patch requests.
3858	NullFields []string `json:"-"`
3859}
3860
3861func (s *GoogleCloudDialogflowCxV3beta1ContinuousTestResult) MarshalJSON() ([]byte, error) {
3862	type NoMethod GoogleCloudDialogflowCxV3beta1ContinuousTestResult
3863	raw := NoMethod(*s)
3864	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3865}
3866
3867// GoogleCloudDialogflowCxV3beta1ConversationTurn: One interaction
3868// between a human and virtual agent. The human provides some input and
3869// the virtual agent provides a response.
3870type GoogleCloudDialogflowCxV3beta1ConversationTurn struct {
3871	// UserInput: The user input.
3872	UserInput *GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput `json:"userInput,omitempty"`
3873
3874	// VirtualAgentOutput: The virtual agent output.
3875	VirtualAgentOutput *GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput `json:"virtualAgentOutput,omitempty"`
3876
3877	// ForceSendFields is a list of field names (e.g. "UserInput") to
3878	// unconditionally include in API requests. By default, fields with
3879	// empty values are omitted from API requests. However, any non-pointer,
3880	// non-interface field appearing in ForceSendFields will be sent to the
3881	// server regardless of whether the field is empty or not. This may be
3882	// used to include empty fields in Patch requests.
3883	ForceSendFields []string `json:"-"`
3884
3885	// NullFields is a list of field names (e.g. "UserInput") to include in
3886	// API requests with the JSON null value. By default, fields with empty
3887	// values are omitted from API requests. However, any field with an
3888	// empty value appearing in NullFields will be sent to the server as
3889	// null. It is an error if a field in this list has a non-empty value.
3890	// This may be used to include null fields in Patch requests.
3891	NullFields []string `json:"-"`
3892}
3893
3894func (s *GoogleCloudDialogflowCxV3beta1ConversationTurn) MarshalJSON() ([]byte, error) {
3895	type NoMethod GoogleCloudDialogflowCxV3beta1ConversationTurn
3896	raw := NoMethod(*s)
3897	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3898}
3899
3900// GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput: The input
3901// from the human user.
3902type GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput struct {
3903	// EnableSentimentAnalysis: Whether sentiment analysis is enabled.
3904	EnableSentimentAnalysis bool `json:"enableSentimentAnalysis,omitempty"`
3905
3906	// InjectedParameters: Parameters that need to be injected into the
3907	// conversation during intent detection.
3908	InjectedParameters googleapi.RawMessage `json:"injectedParameters,omitempty"`
3909
3910	// Input: Supports text input, event input, dtmf input in the test case.
3911	Input *GoogleCloudDialogflowCxV3beta1QueryInput `json:"input,omitempty"`
3912
3913	// IsWebhookEnabled: If webhooks should be allowed to trigger in
3914	// response to the user utterance. Often if parameters are injected,
3915	// webhooks should not be enabled.
3916	IsWebhookEnabled bool `json:"isWebhookEnabled,omitempty"`
3917
3918	// ForceSendFields is a list of field names (e.g.
3919	// "EnableSentimentAnalysis") to unconditionally include in API
3920	// requests. By default, fields with empty values are omitted from API
3921	// requests. However, any non-pointer, non-interface field appearing in
3922	// ForceSendFields will be sent to the server regardless of whether the
3923	// field is empty or not. This may be used to include empty fields in
3924	// Patch requests.
3925	ForceSendFields []string `json:"-"`
3926
3927	// NullFields is a list of field names (e.g. "EnableSentimentAnalysis")
3928	// to include in API requests with the JSON null value. By default,
3929	// fields with empty values are omitted from API requests. However, any
3930	// field with an empty value appearing in NullFields will be sent to the
3931	// server as null. It is an error if a field in this list has a
3932	// non-empty value. This may be used to include null fields in Patch
3933	// requests.
3934	NullFields []string `json:"-"`
3935}
3936
3937func (s *GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput) MarshalJSON() ([]byte, error) {
3938	type NoMethod GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput
3939	raw := NoMethod(*s)
3940	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3941}
3942
3943// GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput: The
3944// output from the virtual agent.
3945type GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput struct {
3946	// CurrentPage: The Page on which the utterance was spoken. Only name
3947	// and displayName will be set.
3948	CurrentPage *GoogleCloudDialogflowCxV3beta1Page `json:"currentPage,omitempty"`
3949
3950	// DiagnosticInfo: Required. Input only. The diagnostic info output for
3951	// the turn.
3952	DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
3953
3954	// Differences: Output only. If this is part of a result conversation
3955	// turn, the list of differences between the original run and the replay
3956	// for this output, if any.
3957	Differences []*GoogleCloudDialogflowCxV3beta1TestRunDifference `json:"differences,omitempty"`
3958
3959	// SessionParameters: The session parameters available to the bot at
3960	// this point.
3961	SessionParameters googleapi.RawMessage `json:"sessionParameters,omitempty"`
3962
3963	// Status: Response error from the agent in the test result. If set,
3964	// other output is empty.
3965	Status *GoogleRpcStatus `json:"status,omitempty"`
3966
3967	// TextResponses: The text responses from the agent for the turn.
3968	TextResponses []*GoogleCloudDialogflowCxV3beta1ResponseMessageText `json:"textResponses,omitempty"`
3969
3970	// TriggeredIntent: The Intent that triggered the response. Only name
3971	// and displayName will be set.
3972	TriggeredIntent *GoogleCloudDialogflowCxV3beta1Intent `json:"triggeredIntent,omitempty"`
3973
3974	// ForceSendFields is a list of field names (e.g. "CurrentPage") to
3975	// unconditionally include in API requests. By default, fields with
3976	// empty values are omitted from API requests. However, any non-pointer,
3977	// non-interface field appearing in ForceSendFields will be sent to the
3978	// server regardless of whether the field is empty or not. This may be
3979	// used to include empty fields in Patch requests.
3980	ForceSendFields []string `json:"-"`
3981
3982	// NullFields is a list of field names (e.g. "CurrentPage") to include
3983	// in API requests with the JSON null value. By default, fields with
3984	// empty values are omitted from API requests. However, any field with
3985	// an empty value appearing in NullFields will be sent to the server as
3986	// null. It is an error if a field in this list has a non-empty value.
3987	// This may be used to include null fields in Patch requests.
3988	NullFields []string `json:"-"`
3989}
3990
3991func (s *GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput) MarshalJSON() ([]byte, error) {
3992	type NoMethod GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput
3993	raw := NoMethod(*s)
3994	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3995}
3996
3997// GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata:
3998// Metadata for CreateDocument operation.
3999type GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata struct {
4000	// GenericMetadata: The generic information of the operation.
4001	GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
4002
4003	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
4004	// unconditionally include in API requests. By default, fields with
4005	// empty values are omitted from API requests. However, any non-pointer,
4006	// non-interface field appearing in ForceSendFields will be sent to the
4007	// server regardless of whether the field is empty or not. This may be
4008	// used to include empty fields in Patch requests.
4009	ForceSendFields []string `json:"-"`
4010
4011	// NullFields is a list of field names (e.g. "GenericMetadata") to
4012	// include in API requests with the JSON null value. By default, fields
4013	// with empty values are omitted from API requests. However, any field
4014	// with an empty value appearing in NullFields will be sent to the
4015	// server as null. It is an error if a field in this list has a
4016	// non-empty value. This may be used to include null fields in Patch
4017	// requests.
4018	NullFields []string `json:"-"`
4019}
4020
4021func (s *GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
4022	type NoMethod GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata
4023	raw := NoMethod(*s)
4024	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4025}
4026
4027// GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata:
4028// Metadata associated with the long running operation for
4029// Versions.CreateVersion.
4030type GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata struct {
4031	// Version: Name of the created version. Format:
4032	// `projects//locations//agents//flows//versions/`.
4033	Version string `json:"version,omitempty"`
4034
4035	// ForceSendFields is a list of field names (e.g. "Version") to
4036	// unconditionally include in API requests. By default, fields with
4037	// empty values are omitted from API requests. However, any non-pointer,
4038	// non-interface field appearing in ForceSendFields will be sent to the
4039	// server regardless of whether the field is empty or not. This may be
4040	// used to include empty fields in Patch requests.
4041	ForceSendFields []string `json:"-"`
4042
4043	// NullFields is a list of field names (e.g. "Version") to include in
4044	// API requests with the JSON null value. By default, fields with empty
4045	// values are omitted from API requests. However, any field with an
4046	// empty value appearing in NullFields will be sent to the server as
4047	// null. It is an error if a field in this list has a non-empty value.
4048	// This may be used to include null fields in Patch requests.
4049	NullFields []string `json:"-"`
4050}
4051
4052func (s *GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata) MarshalJSON() ([]byte, error) {
4053	type NoMethod GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata
4054	raw := NoMethod(*s)
4055	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4056}
4057
4058// GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata:
4059// Metadata for DeleteDocument operation.
4060type GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata struct {
4061	// GenericMetadata: The generic information of the operation.
4062	GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
4063
4064	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
4065	// unconditionally include in API requests. By default, fields with
4066	// empty values are omitted from API requests. However, any non-pointer,
4067	// non-interface field appearing in ForceSendFields will be sent to the
4068	// server regardless of whether the field is empty or not. This may be
4069	// used to include empty fields in Patch requests.
4070	ForceSendFields []string `json:"-"`
4071
4072	// NullFields is a list of field names (e.g. "GenericMetadata") to
4073	// include in API requests with the JSON null value. By default, fields
4074	// with empty values are omitted from API requests. However, any field
4075	// with an empty value appearing in NullFields will be sent to the
4076	// server as null. It is an error if a field in this list has a
4077	// non-empty value. This may be used to include null fields in Patch
4078	// requests.
4079	NullFields []string `json:"-"`
4080}
4081
4082func (s *GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
4083	type NoMethod GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata
4084	raw := NoMethod(*s)
4085	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4086}
4087
4088// GoogleCloudDialogflowCxV3beta1DtmfInput: Represents the input for
4089// dtmf event.
4090type GoogleCloudDialogflowCxV3beta1DtmfInput struct {
4091	// Digits: The dtmf digits.
4092	Digits string `json:"digits,omitempty"`
4093
4094	// FinishDigit: The finish digit (if any).
4095	FinishDigit string `json:"finishDigit,omitempty"`
4096
4097	// ForceSendFields is a list of field names (e.g. "Digits") 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. "Digits") to include in API
4106	// requests with the JSON null value. By default, fields with empty
4107	// values are omitted from API requests. However, any field with an
4108	// 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 *GoogleCloudDialogflowCxV3beta1DtmfInput) MarshalJSON() ([]byte, error) {
4115	type NoMethod GoogleCloudDialogflowCxV3beta1DtmfInput
4116	raw := NoMethod(*s)
4117	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4118}
4119
4120// GoogleCloudDialogflowCxV3beta1EventHandler: An event handler
4121// specifies an event that can be handled during a session. When the
4122// specified event happens, the following actions are taken in order: *
4123// If there is a `trigger_fulfillment` associated with the event, it
4124// will be called. * If there is a `target_page` associated with the
4125// event, the session will transition into the specified page. * If
4126// there is a `target_flow` associated with the event, the session will
4127// transition into the specified flow.
4128type GoogleCloudDialogflowCxV3beta1EventHandler struct {
4129	// Event: Required. The name of the event to handle.
4130	Event string `json:"event,omitempty"`
4131
4132	// Name: Output only. The unique identifier of this event handler.
4133	Name string `json:"name,omitempty"`
4134
4135	// TargetFlow: The target flow to transition to. Format:
4136	// `projects//locations//agents//flows/`.
4137	TargetFlow string `json:"targetFlow,omitempty"`
4138
4139	// TargetPage: The target page to transition to. Format:
4140	// `projects//locations//agents//flows//pages/`.
4141	TargetPage string `json:"targetPage,omitempty"`
4142
4143	// TriggerFulfillment: The fulfillment to call when the event occurs.
4144	// Handling webhook errors with a fulfillment enabled with webhook could
4145	// cause infinite loop. It is invalid to specify such fulfillment for a
4146	// handler handling webhooks.
4147	TriggerFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"triggerFulfillment,omitempty"`
4148
4149	// ForceSendFields is a list of field names (e.g. "Event") to
4150	// unconditionally include in API requests. By default, fields with
4151	// empty values are omitted from API requests. However, any non-pointer,
4152	// non-interface field appearing in ForceSendFields will be sent to the
4153	// server regardless of whether the field is empty or not. This may be
4154	// used to include empty fields in Patch requests.
4155	ForceSendFields []string `json:"-"`
4156
4157	// NullFields is a list of field names (e.g. "Event") to include in API
4158	// requests with the JSON null value. By default, fields with empty
4159	// values are omitted from API requests. However, any field with an
4160	// empty value appearing in NullFields will be sent to the server as
4161	// null. It is an error if a field in this list has a non-empty value.
4162	// This may be used to include null fields in Patch requests.
4163	NullFields []string `json:"-"`
4164}
4165
4166func (s *GoogleCloudDialogflowCxV3beta1EventHandler) MarshalJSON() ([]byte, error) {
4167	type NoMethod GoogleCloudDialogflowCxV3beta1EventHandler
4168	raw := NoMethod(*s)
4169	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4170}
4171
4172// GoogleCloudDialogflowCxV3beta1EventInput: Represents the event to
4173// trigger.
4174type GoogleCloudDialogflowCxV3beta1EventInput struct {
4175	// Event: Name of the event.
4176	Event string `json:"event,omitempty"`
4177
4178	// ForceSendFields is a list of field names (e.g. "Event") to
4179	// unconditionally include in API requests. By default, fields with
4180	// empty values are omitted from API requests. However, any non-pointer,
4181	// non-interface field appearing in ForceSendFields will be sent to the
4182	// server regardless of whether the field is empty or not. This may be
4183	// used to include empty fields in Patch requests.
4184	ForceSendFields []string `json:"-"`
4185
4186	// NullFields is a list of field names (e.g. "Event") to include in API
4187	// requests with the JSON null value. By default, fields with empty
4188	// values are omitted from API requests. However, any field with an
4189	// empty value appearing in NullFields will be sent to the server as
4190	// null. It is an error if a field in this list has a non-empty value.
4191	// This may be used to include null fields in Patch requests.
4192	NullFields []string `json:"-"`
4193}
4194
4195func (s *GoogleCloudDialogflowCxV3beta1EventInput) MarshalJSON() ([]byte, error) {
4196	type NoMethod GoogleCloudDialogflowCxV3beta1EventInput
4197	raw := NoMethod(*s)
4198	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4199}
4200
4201// GoogleCloudDialogflowCxV3beta1ExportAgentResponse: The response
4202// message for Agents.ExportAgent.
4203type GoogleCloudDialogflowCxV3beta1ExportAgentResponse struct {
4204	// AgentContent: Uncompressed raw byte content for agent.
4205	AgentContent string `json:"agentContent,omitempty"`
4206
4207	// AgentUri: The URI to a file containing the exported agent. This field
4208	// is populated only if `agent_uri` is specified in ExportAgentRequest.
4209	AgentUri string `json:"agentUri,omitempty"`
4210
4211	// ForceSendFields is a list of field names (e.g. "AgentContent") to
4212	// unconditionally include in API requests. By default, fields with
4213	// empty values are omitted from API requests. However, any non-pointer,
4214	// non-interface field appearing in ForceSendFields will be sent to the
4215	// server regardless of whether the field is empty or not. This may be
4216	// used to include empty fields in Patch requests.
4217	ForceSendFields []string `json:"-"`
4218
4219	// NullFields is a list of field names (e.g. "AgentContent") to include
4220	// in API requests with the JSON null value. By default, fields with
4221	// empty values are omitted from API requests. However, any field with
4222	// an empty value appearing in NullFields will be sent to the server as
4223	// null. It is an error if a field in this list has a non-empty value.
4224	// This may be used to include null fields in Patch requests.
4225	NullFields []string `json:"-"`
4226}
4227
4228func (s *GoogleCloudDialogflowCxV3beta1ExportAgentResponse) MarshalJSON() ([]byte, error) {
4229	type NoMethod GoogleCloudDialogflowCxV3beta1ExportAgentResponse
4230	raw := NoMethod(*s)
4231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4232}
4233
4234// GoogleCloudDialogflowCxV3beta1ExportFlowResponse: The response
4235// message for Flows.ExportFlow.
4236type GoogleCloudDialogflowCxV3beta1ExportFlowResponse struct {
4237	// FlowContent: Uncompressed raw byte content for flow.
4238	FlowContent string `json:"flowContent,omitempty"`
4239
4240	// FlowUri: The URI to a file containing the exported flow. This field
4241	// is populated only if `flow_uri` is specified in ExportFlowRequest.
4242	FlowUri string `json:"flowUri,omitempty"`
4243
4244	// ForceSendFields is a list of field names (e.g. "FlowContent") to
4245	// unconditionally include in API requests. By default, fields with
4246	// empty values are omitted from API requests. However, any non-pointer,
4247	// non-interface field appearing in ForceSendFields will be sent to the
4248	// server regardless of whether the field is empty or not. This may be
4249	// used to include empty fields in Patch requests.
4250	ForceSendFields []string `json:"-"`
4251
4252	// NullFields is a list of field names (e.g. "FlowContent") to include
4253	// in API requests with the JSON null value. By default, fields with
4254	// empty values are omitted from API requests. However, any field with
4255	// an empty value appearing in NullFields will be sent to the server as
4256	// null. It is an error if a field in this list has a non-empty value.
4257	// This may be used to include null fields in Patch requests.
4258	NullFields []string `json:"-"`
4259}
4260
4261func (s *GoogleCloudDialogflowCxV3beta1ExportFlowResponse) MarshalJSON() ([]byte, error) {
4262	type NoMethod GoogleCloudDialogflowCxV3beta1ExportFlowResponse
4263	raw := NoMethod(*s)
4264	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4265}
4266
4267// GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata: Metadata
4268// returned for the TestCases.ExportTestCases long running operation.
4269type GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata struct {
4270}
4271
4272// GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse: The response
4273// message for TestCases.ExportTestCases.
4274type GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse struct {
4275	// Content: Uncompressed raw byte content for test cases.
4276	Content string `json:"content,omitempty"`
4277
4278	// GcsUri: The URI to a file containing the exported test cases. This
4279	// field is populated only if `gcs_uri` is specified in
4280	// ExportTestCasesRequest.
4281	GcsUri string `json:"gcsUri,omitempty"`
4282
4283	// ForceSendFields is a list of field names (e.g. "Content") to
4284	// unconditionally include in API requests. By default, fields with
4285	// empty values are omitted from API requests. However, any non-pointer,
4286	// non-interface field appearing in ForceSendFields will be sent to the
4287	// server regardless of whether the field is empty or not. This may be
4288	// used to include empty fields in Patch requests.
4289	ForceSendFields []string `json:"-"`
4290
4291	// NullFields is a list of field names (e.g. "Content") to include in
4292	// API requests with the JSON null value. By default, fields with empty
4293	// values are omitted from API requests. However, any field with an
4294	// empty value appearing in NullFields will be sent to the server as
4295	// null. It is an error if a field in this list has a non-empty value.
4296	// This may be used to include null fields in Patch requests.
4297	NullFields []string `json:"-"`
4298}
4299
4300func (s *GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse) MarshalJSON() ([]byte, error) {
4301	type NoMethod GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse
4302	raw := NoMethod(*s)
4303	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4304}
4305
4306// GoogleCloudDialogflowCxV3beta1Form: A form is a data model that
4307// groups related parameters that can be collected from the user. The
4308// process in which the agent prompts the user and collects parameter
4309// values from the user is called form filling. A form can be added to a
4310// page. When form filling is done, the filled parameters will be
4311// written to the session.
4312type GoogleCloudDialogflowCxV3beta1Form struct {
4313	// Parameters: Parameters to collect from the user.
4314	Parameters []*GoogleCloudDialogflowCxV3beta1FormParameter `json:"parameters,omitempty"`
4315
4316	// ForceSendFields is a list of field names (e.g. "Parameters") to
4317	// unconditionally include in API requests. By default, fields with
4318	// empty values are omitted from API requests. However, any non-pointer,
4319	// non-interface field appearing in ForceSendFields will be sent to the
4320	// server regardless of whether the field is empty or not. This may be
4321	// used to include empty fields in Patch requests.
4322	ForceSendFields []string `json:"-"`
4323
4324	// NullFields is a list of field names (e.g. "Parameters") to include in
4325	// API requests with the JSON null value. By default, fields with empty
4326	// values are omitted from API requests. However, any field with an
4327	// empty value appearing in NullFields will be sent to the server as
4328	// null. It is an error if a field in this list has a non-empty value.
4329	// This may be used to include null fields in Patch requests.
4330	NullFields []string `json:"-"`
4331}
4332
4333func (s *GoogleCloudDialogflowCxV3beta1Form) MarshalJSON() ([]byte, error) {
4334	type NoMethod GoogleCloudDialogflowCxV3beta1Form
4335	raw := NoMethod(*s)
4336	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4337}
4338
4339// GoogleCloudDialogflowCxV3beta1FormParameter: Represents a form
4340// parameter.
4341type GoogleCloudDialogflowCxV3beta1FormParameter struct {
4342	// DefaultValue: The default value of an optional parameter. If the
4343	// parameter is required, the default value will be ignored.
4344	DefaultValue interface{} `json:"defaultValue,omitempty"`
4345
4346	// DisplayName: Required. The human-readable name of the parameter,
4347	// unique within the form.
4348	DisplayName string `json:"displayName,omitempty"`
4349
4350	// EntityType: Required. The entity type of the parameter. Format:
4351	// `projects/-/locations/-/agents/-/entityTypes/` for system entity
4352	// types (for example,
4353	// `projects/-/locations/-/agents/-/entityTypes/sys.date`), or
4354	// `projects//locations//agents//entityTypes/` for developer entity
4355	// types.
4356	EntityType string `json:"entityType,omitempty"`
4357
4358	// FillBehavior: Required. Defines fill behavior for the parameter.
4359	FillBehavior *GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior `json:"fillBehavior,omitempty"`
4360
4361	// IsList: Indicates whether the parameter represents a list of values.
4362	IsList bool `json:"isList,omitempty"`
4363
4364	// Redact: Indicates whether the parameter content should be redacted in
4365	// log. If redaction is enabled, the parameter content will be replaced
4366	// by parameter name during logging. Note: the parameter content is
4367	// subject to redaction if either parameter level redaction or entity
4368	// type level redaction is enabled.
4369	Redact bool `json:"redact,omitempty"`
4370
4371	// Required: Indicates whether the parameter is required. Optional
4372	// parameters will not trigger prompts; however, they are filled if the
4373	// user specifies them. Required parameters must be filled before form
4374	// filling concludes.
4375	Required bool `json:"required,omitempty"`
4376
4377	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
4378	// unconditionally include in API requests. By default, fields with
4379	// empty values are omitted from API requests. However, any non-pointer,
4380	// non-interface field appearing in ForceSendFields will be sent to the
4381	// server regardless of whether the field is empty or not. This may be
4382	// used to include empty fields in Patch requests.
4383	ForceSendFields []string `json:"-"`
4384
4385	// NullFields is a list of field names (e.g. "DefaultValue") to include
4386	// in API requests with the JSON null value. By default, fields with
4387	// empty values are omitted from API requests. However, any field with
4388	// an empty value appearing in NullFields will be sent to the server as
4389	// null. It is an error if a field in this list has a non-empty value.
4390	// This may be used to include null fields in Patch requests.
4391	NullFields []string `json:"-"`
4392}
4393
4394func (s *GoogleCloudDialogflowCxV3beta1FormParameter) MarshalJSON() ([]byte, error) {
4395	type NoMethod GoogleCloudDialogflowCxV3beta1FormParameter
4396	raw := NoMethod(*s)
4397	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4398}
4399
4400// GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior:
4401// Configuration for how the filling of a parameter should be handled.
4402type GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior struct {
4403	// InitialPromptFulfillment: Required. The fulfillment to provide the
4404	// initial prompt that the agent can present to the user in order to
4405	// fill the parameter.
4406	InitialPromptFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"initialPromptFulfillment,omitempty"`
4407
4408	// RepromptEventHandlers: The handlers for parameter-level events, used
4409	// to provide reprompt for the parameter or transition to a different
4410	// page/flow. The supported events are: * `sys.no-match-`, where N can
4411	// be from 1 to 6 * `sys.no-match-default` * `sys.no-input-`, where N
4412	// can be from 1 to 6 * `sys.no-input-default` * `sys.invalid-parameter`
4413	// `initial_prompt_fulfillment` provides the first prompt for the
4414	// parameter. If the user's response does not fill the parameter, a
4415	// no-match/no-input event will be triggered, and the fulfillment
4416	// associated with the `sys.no-match-1`/`sys.no-input-1` handler (if
4417	// defined) will be called to provide a prompt. The
4418	// `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond
4419	// to the next no-match/no-input event, and so on. A
4420	// `sys.no-match-default` or `sys.no-input-default` handler will be used
4421	// to handle all following no-match/no-input events after all numbered
4422	// no-match/no-input handlers for the parameter are consumed. A
4423	// `sys.invalid-parameter` handler can be defined to handle the case
4424	// where the parameter values have been `invalidated` by webhook. For
4425	// example, if the user's response fill the parameter, however the
4426	// parameter was invalidated by webhook, the fulfillment associated with
4427	// the `sys.invalid-parameter` handler (if defined) will be called to
4428	// provide a prompt. If the event handler for the corresponding event
4429	// can't be found on the parameter, `initial_prompt_fulfillment` will be
4430	// re-prompted.
4431	RepromptEventHandlers []*GoogleCloudDialogflowCxV3beta1EventHandler `json:"repromptEventHandlers,omitempty"`
4432
4433	// ForceSendFields is a list of field names (e.g.
4434	// "InitialPromptFulfillment") to unconditionally include in API
4435	// requests. By default, fields with empty values are omitted from API
4436	// requests. However, any non-pointer, non-interface field appearing in
4437	// ForceSendFields will be sent to the server regardless of whether the
4438	// field is empty or not. This may be used to include empty fields in
4439	// Patch requests.
4440	ForceSendFields []string `json:"-"`
4441
4442	// NullFields is a list of field names (e.g. "InitialPromptFulfillment")
4443	// to include in API requests with the JSON null value. By default,
4444	// fields with empty values are omitted from API requests. However, any
4445	// field with an empty value appearing in NullFields will be sent to the
4446	// server as null. It is an error if a field in this list has a
4447	// non-empty value. This may be used to include null fields in Patch
4448	// requests.
4449	NullFields []string `json:"-"`
4450}
4451
4452func (s *GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior) MarshalJSON() ([]byte, error) {
4453	type NoMethod GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior
4454	raw := NoMethod(*s)
4455	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4456}
4457
4458// GoogleCloudDialogflowCxV3beta1Fulfillment: A fulfillment can do one
4459// or more of the following actions at the same time: * Generate rich
4460// message responses. * Set parameter values. * Call the webhook.
4461// Fulfillments can be called at various stages in the Page or Form
4462// lifecycle. For example, when a DetectIntentRequest drives a session
4463// to enter a new page, the page's entry fulfillment can add a static
4464// response to the QueryResult in the returning DetectIntentResponse,
4465// call the webhook (for example, to load user data from a database), or
4466// both.
4467type GoogleCloudDialogflowCxV3beta1Fulfillment struct {
4468	// ConditionalCases: Conditional cases for this fulfillment.
4469	ConditionalCases []*GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases `json:"conditionalCases,omitempty"`
4470
4471	// Messages: The list of rich message responses to present to the user.
4472	Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"`
4473
4474	// ReturnPartialResponses: Whether Dialogflow should return currently
4475	// queued fulfillment response messages in streaming APIs. If a webhook
4476	// is specified, it happens before Dialogflow invokes webhook. Warning:
4477	// 1) This flag only affects streaming API. Responses are still queued
4478	// and returned once in non-streaming API. 2) The flag can be enabled in
4479	// any fulfillment but only the first 3 partial responses will be
4480	// returned. You may only want to apply it to fulfillments that have
4481	// slow webhooks.
4482	ReturnPartialResponses bool `json:"returnPartialResponses,omitempty"`
4483
4484	// SetParameterActions: Set parameter values before executing the
4485	// webhook.
4486	SetParameterActions []*GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction `json:"setParameterActions,omitempty"`
4487
4488	// Tag: The tag used by the webhook to identify which fulfillment is
4489	// being called. This field is required if `webhook` is specified.
4490	Tag string `json:"tag,omitempty"`
4491
4492	// Webhook: The webhook to call. Format:
4493	// `projects//locations//agents//webhooks/`.
4494	Webhook string `json:"webhook,omitempty"`
4495
4496	// ForceSendFields is a list of field names (e.g. "ConditionalCases") to
4497	// unconditionally include in API requests. By default, fields with
4498	// empty values are omitted from API requests. However, any non-pointer,
4499	// non-interface field appearing in ForceSendFields will be sent to the
4500	// server regardless of whether the field is empty or not. This may be
4501	// used to include empty fields in Patch requests.
4502	ForceSendFields []string `json:"-"`
4503
4504	// NullFields is a list of field names (e.g. "ConditionalCases") to
4505	// include in API requests with the JSON null value. By default, fields
4506	// with empty values are omitted from API requests. However, any field
4507	// with an empty value appearing in NullFields will be sent to the
4508	// server as null. It is an error if a field in this list has a
4509	// non-empty value. This may be used to include null fields in Patch
4510	// requests.
4511	NullFields []string `json:"-"`
4512}
4513
4514func (s *GoogleCloudDialogflowCxV3beta1Fulfillment) MarshalJSON() ([]byte, error) {
4515	type NoMethod GoogleCloudDialogflowCxV3beta1Fulfillment
4516	raw := NoMethod(*s)
4517	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4518}
4519
4520// GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases: A list of
4521// cascading if-else conditions. Cases are mutually exclusive. The first
4522// one with a matching condition is selected, all the rest ignored.
4523type GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases struct {
4524	// Cases: A list of cascading if-else conditions.
4525	Cases []*GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase `json:"cases,omitempty"`
4526
4527	// ForceSendFields is a list of field names (e.g. "Cases") to
4528	// unconditionally include in API requests. By default, fields with
4529	// empty values are omitted from API requests. However, any non-pointer,
4530	// non-interface field appearing in ForceSendFields will be sent to the
4531	// server regardless of whether the field is empty or not. This may be
4532	// used to include empty fields in Patch requests.
4533	ForceSendFields []string `json:"-"`
4534
4535	// NullFields is a list of field names (e.g. "Cases") to include in API
4536	// requests with the JSON null value. By default, fields with empty
4537	// values are omitted from API requests. However, any field with an
4538	// empty value appearing in NullFields will be sent to the server as
4539	// null. It is an error if a field in this list has a non-empty value.
4540	// This may be used to include null fields in Patch requests.
4541	NullFields []string `json:"-"`
4542}
4543
4544func (s *GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases) MarshalJSON() ([]byte, error) {
4545	type NoMethod GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases
4546	raw := NoMethod(*s)
4547	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4548}
4549
4550// GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase: Each
4551// case has a Boolean condition. When it is evaluated to be True, the
4552// corresponding messages will be selected and evaluated recursively.
4553type GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase struct {
4554	// CaseContent: A list of case content.
4555	CaseContent []*GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent `json:"caseContent,omitempty"`
4556
4557	// Condition: The condition to activate and select this case. Empty
4558	// means the condition is always true. The condition is evaluated
4559	// against form parameters or session parameters. See the conditions
4560	// reference
4561	// (https://cloud.google.com/dialogflow/cx/docs/reference/condition).
4562	Condition string `json:"condition,omitempty"`
4563
4564	// ForceSendFields is a list of field names (e.g. "CaseContent") to
4565	// unconditionally include in API requests. By default, fields with
4566	// empty values are omitted from API requests. However, any non-pointer,
4567	// non-interface field appearing in ForceSendFields will be sent to the
4568	// server regardless of whether the field is empty or not. This may be
4569	// used to include empty fields in Patch requests.
4570	ForceSendFields []string `json:"-"`
4571
4572	// NullFields is a list of field names (e.g. "CaseContent") to include
4573	// in API requests with the JSON null value. By default, fields with
4574	// empty values are omitted from API requests. However, any field with
4575	// an empty value appearing in NullFields will be sent to the server as
4576	// null. It is an error if a field in this list has a non-empty value.
4577	// This may be used to include null fields in Patch requests.
4578	NullFields []string `json:"-"`
4579}
4580
4581func (s *GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase) MarshalJSON() ([]byte, error) {
4582	type NoMethod GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase
4583	raw := NoMethod(*s)
4584	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4585}
4586
4587// GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseConte
4588// nt: The list of messages or conditional cases to activate for this
4589// case.
4590type GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent struct {
4591	// AdditionalCases: Additional cases to be evaluated.
4592	AdditionalCases *GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases `json:"additionalCases,omitempty"`
4593
4594	// Message: Returned message.
4595	Message *GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"message,omitempty"`
4596
4597	// ForceSendFields is a list of field names (e.g. "AdditionalCases") to
4598	// unconditionally include in API requests. By default, fields with
4599	// empty values are omitted from API requests. However, any non-pointer,
4600	// non-interface field appearing in ForceSendFields will be sent to the
4601	// server regardless of whether the field is empty or not. This may be
4602	// used to include empty fields in Patch requests.
4603	ForceSendFields []string `json:"-"`
4604
4605	// NullFields is a list of field names (e.g. "AdditionalCases") to
4606	// include in API requests with the JSON null value. By default, fields
4607	// with empty values are omitted from API requests. However, any field
4608	// with an empty value appearing in NullFields will be sent to the
4609	// server as null. It is an error if a field in this list has a
4610	// non-empty value. This may be used to include null fields in Patch
4611	// requests.
4612	NullFields []string `json:"-"`
4613}
4614
4615func (s *GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent) MarshalJSON() ([]byte, error) {
4616	type NoMethod GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent
4617	raw := NoMethod(*s)
4618	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4619}
4620
4621// GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction: Setting
4622// a parameter value.
4623type GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction struct {
4624	// Parameter: Display name of the parameter.
4625	Parameter string `json:"parameter,omitempty"`
4626
4627	// Value: The new value of the parameter. A null value clears the
4628	// parameter.
4629	Value interface{} `json:"value,omitempty"`
4630
4631	// ForceSendFields is a list of field names (e.g. "Parameter") to
4632	// unconditionally include in API requests. By default, fields with
4633	// empty values are omitted from API requests. However, any non-pointer,
4634	// non-interface field appearing in ForceSendFields will be sent to the
4635	// server regardless of whether the field is empty or not. This may be
4636	// used to include empty fields in Patch requests.
4637	ForceSendFields []string `json:"-"`
4638
4639	// NullFields is a list of field names (e.g. "Parameter") to include in
4640	// API requests with the JSON null value. By default, fields with empty
4641	// values are omitted from API requests. However, any field with an
4642	// empty value appearing in NullFields will be sent to the server as
4643	// null. It is an error if a field in this list has a non-empty value.
4644	// This may be used to include null fields in Patch requests.
4645	NullFields []string `json:"-"`
4646}
4647
4648func (s *GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction) MarshalJSON() ([]byte, error) {
4649	type NoMethod GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction
4650	raw := NoMethod(*s)
4651	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4652}
4653
4654// GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata:
4655// Metadata in google::longrunning::Operation for Knowledge operations.
4656type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct {
4657	// State: Required. Output only. The current state of this operation.
4658	//
4659	// Possible values:
4660	//   "STATE_UNSPECIFIED" - State unspecified.
4661	//   "PENDING" - The operation has been created.
4662	//   "RUNNING" - The operation is currently running.
4663	//   "DONE" - The operation is done, either cancelled or completed.
4664	State string `json:"state,omitempty"`
4665
4666	// ForceSendFields is a list of field names (e.g. "State") to
4667	// unconditionally include in API requests. By default, fields with
4668	// empty values are omitted from API requests. However, any non-pointer,
4669	// non-interface field appearing in ForceSendFields will be sent to the
4670	// server regardless of whether the field is empty or not. This may be
4671	// used to include empty fields in Patch requests.
4672	ForceSendFields []string `json:"-"`
4673
4674	// NullFields is a list of field names (e.g. "State") to include in API
4675	// requests with the JSON null value. By default, fields with empty
4676	// values are omitted from API requests. However, any field with an
4677	// empty value appearing in NullFields will be sent to the server as
4678	// null. It is an error if a field in this list has a non-empty value.
4679	// This may be used to include null fields in Patch requests.
4680	NullFields []string `json:"-"`
4681}
4682
4683func (s *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) {
4684	type NoMethod GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata
4685	raw := NoMethod(*s)
4686	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4687}
4688
4689// GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata:
4690// Metadata for ImportDocuments operation.
4691type GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata struct {
4692	// GenericMetadata: The generic information of the operation.
4693	GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
4694
4695	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
4696	// unconditionally include in API requests. By default, fields with
4697	// empty values are omitted from API requests. However, any non-pointer,
4698	// non-interface field appearing in ForceSendFields will be sent to the
4699	// server regardless of whether the field is empty or not. This may be
4700	// used to include empty fields in Patch requests.
4701	ForceSendFields []string `json:"-"`
4702
4703	// NullFields is a list of field names (e.g. "GenericMetadata") to
4704	// include in API requests with the JSON null value. By default, fields
4705	// with empty values are omitted from API requests. However, any field
4706	// with an empty value appearing in NullFields will be sent to the
4707	// server as null. It is an error if a field in this list has a
4708	// non-empty value. This may be used to include null fields in Patch
4709	// requests.
4710	NullFields []string `json:"-"`
4711}
4712
4713func (s *GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) {
4714	type NoMethod GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata
4715	raw := NoMethod(*s)
4716	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4717}
4718
4719// GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse: Response
4720// message for Documents.ImportDocuments.
4721type GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse struct {
4722	// Warnings: Includes details about skipped documents or any other
4723	// warnings.
4724	Warnings []*GoogleRpcStatus `json:"warnings,omitempty"`
4725
4726	// ForceSendFields is a list of field names (e.g. "Warnings") to
4727	// unconditionally include in API requests. By default, fields with
4728	// empty values are omitted from API requests. However, any non-pointer,
4729	// non-interface field appearing in ForceSendFields will be sent to the
4730	// server regardless of whether the field is empty or not. This may be
4731	// used to include empty fields in Patch requests.
4732	ForceSendFields []string `json:"-"`
4733
4734	// NullFields is a list of field names (e.g. "Warnings") to include in
4735	// API requests with the JSON null value. By default, fields with empty
4736	// values are omitted from API requests. However, any field with an
4737	// empty value appearing in NullFields will be sent to the server as
4738	// null. It is an error if a field in this list has a non-empty value.
4739	// This may be used to include null fields in Patch requests.
4740	NullFields []string `json:"-"`
4741}
4742
4743func (s *GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse) MarshalJSON() ([]byte, error) {
4744	type NoMethod GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse
4745	raw := NoMethod(*s)
4746	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4747}
4748
4749// GoogleCloudDialogflowCxV3beta1ImportFlowResponse: The response
4750// message for Flows.ImportFlow.
4751type GoogleCloudDialogflowCxV3beta1ImportFlowResponse struct {
4752	// Flow: The unique identifier of the new flow. Format:
4753	// `projects//locations//agents//flows/`.
4754	Flow string `json:"flow,omitempty"`
4755
4756	// ForceSendFields is a list of field names (e.g. "Flow") to
4757	// unconditionally include in API requests. By default, fields with
4758	// empty values are omitted from API requests. However, any non-pointer,
4759	// non-interface field appearing in ForceSendFields will be sent to the
4760	// server regardless of whether the field is empty or not. This may be
4761	// used to include empty fields in Patch requests.
4762	ForceSendFields []string `json:"-"`
4763
4764	// NullFields is a list of field names (e.g. "Flow") to include in API
4765	// requests with the JSON null value. By default, fields with empty
4766	// values are omitted from API requests. However, any field with an
4767	// empty value appearing in NullFields will be sent to the server as
4768	// null. It is an error if a field in this list has a non-empty value.
4769	// This may be used to include null fields in Patch requests.
4770	NullFields []string `json:"-"`
4771}
4772
4773func (s *GoogleCloudDialogflowCxV3beta1ImportFlowResponse) MarshalJSON() ([]byte, error) {
4774	type NoMethod GoogleCloudDialogflowCxV3beta1ImportFlowResponse
4775	raw := NoMethod(*s)
4776	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4777}
4778
4779// GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata: Metadata
4780// returned for the TestCases.ImportTestCases long running operation.
4781type GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata struct {
4782	// Errors: Errors for failed test cases.
4783	Errors []*GoogleCloudDialogflowCxV3beta1TestCaseError `json:"errors,omitempty"`
4784
4785	// ForceSendFields is a list of field names (e.g. "Errors") to
4786	// unconditionally include in API requests. By default, fields with
4787	// empty values are omitted from API requests. However, any non-pointer,
4788	// non-interface field appearing in ForceSendFields will be sent to the
4789	// server regardless of whether the field is empty or not. This may be
4790	// used to include empty fields in Patch requests.
4791	ForceSendFields []string `json:"-"`
4792
4793	// NullFields is a list of field names (e.g. "Errors") to include in API
4794	// requests with the JSON null value. By default, fields with empty
4795	// values are omitted from API requests. However, any field with an
4796	// empty value appearing in NullFields will be sent to the server as
4797	// null. It is an error if a field in this list has a non-empty value.
4798	// This may be used to include null fields in Patch requests.
4799	NullFields []string `json:"-"`
4800}
4801
4802func (s *GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata) MarshalJSON() ([]byte, error) {
4803	type NoMethod GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata
4804	raw := NoMethod(*s)
4805	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4806}
4807
4808// GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse: The response
4809// message for TestCases.ImportTestCases.
4810type GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse struct {
4811	// Names: The unique identifiers of the new test cases. Format:
4812	// `projects//locations//agents//testCases/`.
4813	Names []string `json:"names,omitempty"`
4814
4815	// ForceSendFields is a list of field names (e.g. "Names") to
4816	// unconditionally include in API requests. By default, fields with
4817	// empty values are omitted from API requests. However, any non-pointer,
4818	// non-interface field appearing in ForceSendFields will be sent to the
4819	// server regardless of whether the field is empty or not. This may be
4820	// used to include empty fields in Patch requests.
4821	ForceSendFields []string `json:"-"`
4822
4823	// NullFields is a list of field names (e.g. "Names") to include in API
4824	// requests with the JSON null value. By default, fields with empty
4825	// values are omitted from API requests. However, any field with an
4826	// empty value appearing in NullFields will be sent to the server as
4827	// null. It is an error if a field in this list has a non-empty value.
4828	// This may be used to include null fields in Patch requests.
4829	NullFields []string `json:"-"`
4830}
4831
4832func (s *GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse) MarshalJSON() ([]byte, error) {
4833	type NoMethod GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse
4834	raw := NoMethod(*s)
4835	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4836}
4837
4838// GoogleCloudDialogflowCxV3beta1InputAudioConfig: Instructs the speech
4839// recognizer on how to process the audio content.
4840type GoogleCloudDialogflowCxV3beta1InputAudioConfig struct {
4841	// AudioEncoding: Required. Audio encoding of the audio content to
4842	// process.
4843	//
4844	// Possible values:
4845	//   "AUDIO_ENCODING_UNSPECIFIED" - Not specified.
4846	//   "AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
4847	// little-endian samples (Linear PCM).
4848	//   "AUDIO_ENCODING_FLAC" -
4849	// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless
4850	// Audio Codec) is the recommended encoding because it is lossless
4851	// (therefore recognition is not compromised) and requires only about
4852	// half the bandwidth of `LINEAR16`. `FLAC` stream encoding supports
4853	// 16-bit and 24-bit samples, however, not all fields in `STREAMINFO`
4854	// are supported.
4855	//   "AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit audio
4856	// samples using G.711 PCMU/mu-law.
4857	//   "AUDIO_ENCODING_AMR" - Adaptive Multi-Rate Narrowband codec.
4858	// `sample_rate_hertz` must be 8000.
4859	//   "AUDIO_ENCODING_AMR_WB" - Adaptive Multi-Rate Wideband codec.
4860	// `sample_rate_hertz` must be 16000.
4861	//   "AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio frames in Ogg
4862	// container ([OggOpus](https://wiki.xiph.org/OggOpus)).
4863	// `sample_rate_hertz` must be 16000.
4864	//   "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE" - Although the use of lossy
4865	// encodings is not recommended, if a very low bitrate encoding is
4866	// required, `OGG_OPUS` is highly preferred over Speex encoding. The
4867	// [Speex](https://speex.org/) encoding supported by Dialogflow API has
4868	// a header byte in each block, as in MIME type
4869	// `audio/x-speex-with-header-byte`. It is a variant of the RTP Speex
4870	// encoding defined in [RFC 5574](https://tools.ietf.org/html/rfc5574).
4871	// The stream is a sequence of blocks, one block per RTP packet. Each
4872	// block starts with a byte containing the length of the block, in
4873	// bytes, followed by one or more frames of Speex data, padded to an
4874	// integral number of bytes (octets) as specified in RFC 5574. In other
4875	// words, each RTP header is replaced with a single byte containing the
4876	// block length. Only Speex wideband is supported. `sample_rate_hertz`
4877	// must be 16000.
4878	AudioEncoding string `json:"audioEncoding,omitempty"`
4879
4880	// EnableWordInfo: Optional. If `true`, Dialogflow returns
4881	// SpeechWordInfo in StreamingRecognitionResult with information about
4882	// the recognized speech words, e.g. start and end time offsets. If
4883	// false or unspecified, Speech doesn't return any word-level
4884	// information.
4885	EnableWordInfo bool `json:"enableWordInfo,omitempty"`
4886
4887	// Model: Optional. Which Speech model to select for the given request.
4888	// Select the model best suited to your domain to get best results. If a
4889	// model is not explicitly specified, then we auto-select a model based
4890	// on the parameters in the InputAudioConfig. If enhanced speech model
4891	// is enabled for the agent and an enhanced version of the specified
4892	// model for the language does not exist, then the speech is recognized
4893	// using the standard version of the specified model. Refer to Cloud
4894	// Speech API documentation
4895	// (https://cloud.google.com/speech-to-text/docs/basics#select-model)
4896	// for more details.
4897	Model string `json:"model,omitempty"`
4898
4899	// ModelVariant: Optional. Which variant of the Speech model to use.
4900	//
4901	// Possible values:
4902	//   "SPEECH_MODEL_VARIANT_UNSPECIFIED" - No model variant specified. In
4903	// this case Dialogflow defaults to USE_BEST_AVAILABLE.
4904	//   "USE_BEST_AVAILABLE" - Use the best available variant of the Speech
4905	// model that the caller is eligible for. Please see the [Dialogflow
4906	// docs](https://cloud.google.com/dialogflow/docs/data-logging) for how
4907	// to make your project eligible for enhanced models.
4908	//   "USE_STANDARD" - Use standard model variant even if an enhanced
4909	// model is available. See the [Cloud Speech
4910	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
4911	// odels) for details about enhanced models.
4912	//   "USE_ENHANCED" - Use an enhanced model variant: * If an enhanced
4913	// variant does not exist for the given model and request language,
4914	// Dialogflow falls back to the standard variant. The [Cloud Speech
4915	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
4916	// odels) describes which models have enhanced variants. * If the API
4917	// caller isn't eligible for enhanced models, Dialogflow returns an
4918	// error. Please see the [Dialogflow
4919	// docs](https://cloud.google.com/dialogflow/docs/data-logging) for how
4920	// to make your project eligible.
4921	ModelVariant string `json:"modelVariant,omitempty"`
4922
4923	// PhraseHints: Optional. A list of strings containing words and phrases
4924	// that the speech recognizer should recognize with higher likelihood.
4925	// See the Cloud Speech documentation
4926	// (https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
4927	// for more details.
4928	PhraseHints []string `json:"phraseHints,omitempty"`
4929
4930	// SampleRateHertz: Sample rate (in Hertz) of the audio content sent in
4931	// the query. Refer to Cloud Speech API documentation
4932	// (https://cloud.google.com/speech-to-text/docs/basics) for more
4933	// details.
4934	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
4935
4936	// SingleUtterance: Optional. If `false` (default), recognition does not
4937	// cease until the client closes the stream. If `true`, the recognizer
4938	// will detect a single spoken utterance in input audio. Recognition
4939	// ceases when it detects the audio's voice has stopped or paused. In
4940	// this case, once a detected intent is received, the client should
4941	// close the stream and start a new request with a new stream as needed.
4942	// Note: This setting is relevant only for streaming methods.
4943	SingleUtterance bool `json:"singleUtterance,omitempty"`
4944
4945	// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
4946	// unconditionally include in API requests. By default, fields with
4947	// empty values are omitted from API requests. However, any non-pointer,
4948	// non-interface field appearing in ForceSendFields will be sent to the
4949	// server regardless of whether the field is empty or not. This may be
4950	// used to include empty fields in Patch requests.
4951	ForceSendFields []string `json:"-"`
4952
4953	// NullFields is a list of field names (e.g. "AudioEncoding") to include
4954	// in API requests with the JSON null value. By default, fields with
4955	// empty values are omitted from API requests. However, any field with
4956	// an empty value appearing in NullFields will be sent to the server as
4957	// null. It is an error if a field in this list has a non-empty value.
4958	// This may be used to include null fields in Patch requests.
4959	NullFields []string `json:"-"`
4960}
4961
4962func (s *GoogleCloudDialogflowCxV3beta1InputAudioConfig) MarshalJSON() ([]byte, error) {
4963	type NoMethod GoogleCloudDialogflowCxV3beta1InputAudioConfig
4964	raw := NoMethod(*s)
4965	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4966}
4967
4968// GoogleCloudDialogflowCxV3beta1Intent: An intent represents a user's
4969// intent to interact with a conversational agent. You can provide
4970// information for the Dialogflow API to use to match user input to an
4971// intent by adding training phrases (i.e., examples of user input) to
4972// your intent.
4973type GoogleCloudDialogflowCxV3beta1Intent struct {
4974	// Description: Human readable description for better understanding an
4975	// intent like its scope, content, result etc. Maximum character limit:
4976	// 140 characters.
4977	Description string `json:"description,omitempty"`
4978
4979	// DisplayName: Required. The human-readable name of the intent, unique
4980	// within the agent.
4981	DisplayName string `json:"displayName,omitempty"`
4982
4983	// IsFallback: Indicates whether this is a fallback intent. Currently
4984	// only default fallback intent is allowed in the agent, which is added
4985	// upon agent creation. Adding training phrases to fallback intent is
4986	// useful in the case of requests that are mistakenly matched, since
4987	// training phrases assigned to fallback intents act as negative
4988	// examples that triggers no-match event.
4989	IsFallback bool `json:"isFallback,omitempty"`
4990
4991	// Labels: The key/value metadata to label an intent. Labels can contain
4992	// lowercase letters, digits and the symbols '-' and '_'. International
4993	// characters are allowed, including letters from unicase alphabets.
4994	// Keys must start with a letter. Keys and values can be no longer than
4995	// 63 characters and no more than 128 bytes. Prefix "sys-" is reserved
4996	// for Dialogflow defined labels. Currently allowed Dialogflow defined
4997	// labels include: * sys-head * sys-contextual The above labels do not
4998	// require value. "sys-head" means the intent is a head intent.
4999	// "sys-contextual" means the intent is a contextual intent.
5000	Labels map[string]string `json:"labels,omitempty"`
5001
5002	// Name: The unique identifier of the intent. Required for the
5003	// Intents.UpdateIntent method. Intents.CreateIntent populates the name
5004	// automatically. Format: `projects//locations//agents//intents/`.
5005	Name string `json:"name,omitempty"`
5006
5007	// Parameters: The collection of parameters associated with the intent.
5008	Parameters []*GoogleCloudDialogflowCxV3beta1IntentParameter `json:"parameters,omitempty"`
5009
5010	// Priority: The priority of this intent. Higher numbers represent
5011	// higher priorities. - If the supplied value is unspecified or 0, the
5012	// service translates the value to 500,000, which corresponds to the
5013	// `Normal` priority in the console. - If the supplied value is
5014	// negative, the intent is ignored in runtime detect intent requests.
5015	Priority int64 `json:"priority,omitempty"`
5016
5017	// TrainingPhrases: The collection of training phrases the agent is
5018	// trained on to identify the intent.
5019	TrainingPhrases []*GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
5020
5021	// ForceSendFields is a list of field names (e.g. "Description") to
5022	// unconditionally include in API requests. By default, fields with
5023	// empty values are omitted from API requests. However, any non-pointer,
5024	// non-interface field appearing in ForceSendFields will be sent to the
5025	// server regardless of whether the field is empty or not. This may be
5026	// used to include empty fields in Patch requests.
5027	ForceSendFields []string `json:"-"`
5028
5029	// NullFields is a list of field names (e.g. "Description") to include
5030	// in API requests with the JSON null value. By default, fields with
5031	// empty values are omitted from API requests. However, any field with
5032	// an empty value appearing in NullFields will be sent to the server as
5033	// null. It is an error if a field in this list has a non-empty value.
5034	// This may be used to include null fields in Patch requests.
5035	NullFields []string `json:"-"`
5036}
5037
5038func (s *GoogleCloudDialogflowCxV3beta1Intent) MarshalJSON() ([]byte, error) {
5039	type NoMethod GoogleCloudDialogflowCxV3beta1Intent
5040	raw := NoMethod(*s)
5041	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5042}
5043
5044// GoogleCloudDialogflowCxV3beta1IntentInput: Represents the intent to
5045// trigger programmatically rather than as a result of natural language
5046// processing.
5047type GoogleCloudDialogflowCxV3beta1IntentInput struct {
5048	// Intent: Required. The unique identifier of the intent. Format:
5049	// `projects//locations//agents//intents/`.
5050	Intent string `json:"intent,omitempty"`
5051
5052	// ForceSendFields is a list of field names (e.g. "Intent") to
5053	// unconditionally include in API requests. By default, fields with
5054	// empty values are omitted from API requests. However, any non-pointer,
5055	// non-interface field appearing in ForceSendFields will be sent to the
5056	// server regardless of whether the field is empty or not. This may be
5057	// used to include empty fields in Patch requests.
5058	ForceSendFields []string `json:"-"`
5059
5060	// NullFields is a list of field names (e.g. "Intent") to include in API
5061	// requests with the JSON null value. By default, fields with empty
5062	// values are omitted from API requests. However, any field with an
5063	// empty value appearing in NullFields will be sent to the server as
5064	// null. It is an error if a field in this list has a non-empty value.
5065	// This may be used to include null fields in Patch requests.
5066	NullFields []string `json:"-"`
5067}
5068
5069func (s *GoogleCloudDialogflowCxV3beta1IntentInput) MarshalJSON() ([]byte, error) {
5070	type NoMethod GoogleCloudDialogflowCxV3beta1IntentInput
5071	raw := NoMethod(*s)
5072	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5073}
5074
5075// GoogleCloudDialogflowCxV3beta1IntentParameter: Represents an intent
5076// parameter.
5077type GoogleCloudDialogflowCxV3beta1IntentParameter struct {
5078	// EntityType: Required. The entity type of the parameter. Format:
5079	// `projects/-/locations/-/agents/-/entityTypes/` for system entity
5080	// types (for example,
5081	// `projects/-/locations/-/agents/-/entityTypes/sys.date`), or
5082	// `projects//locations//agents//entityTypes/` for developer entity
5083	// types.
5084	EntityType string `json:"entityType,omitempty"`
5085
5086	// Id: Required. The unique identifier of the parameter. This field is
5087	// used by training phrases to annotate their parts.
5088	Id string `json:"id,omitempty"`
5089
5090	// IsList: Indicates whether the parameter represents a list of values.
5091	IsList bool `json:"isList,omitempty"`
5092
5093	// Redact: Indicates whether the parameter content should be redacted in
5094	// log. If redaction is enabled, the parameter content will be replaced
5095	// by parameter name during logging. Note: the parameter content is
5096	// subject to redaction if either parameter level redaction or entity
5097	// type level redaction is enabled.
5098	Redact bool `json:"redact,omitempty"`
5099
5100	// ForceSendFields is a list of field names (e.g. "EntityType") to
5101	// unconditionally include in API requests. By default, fields with
5102	// empty values are omitted from API requests. However, any non-pointer,
5103	// non-interface field appearing in ForceSendFields will be sent to the
5104	// server regardless of whether the field is empty or not. This may be
5105	// used to include empty fields in Patch requests.
5106	ForceSendFields []string `json:"-"`
5107
5108	// NullFields is a list of field names (e.g. "EntityType") to include in
5109	// API requests with the JSON null value. By default, fields with empty
5110	// values are omitted from API requests. However, any field with an
5111	// empty value appearing in NullFields will be sent to the server as
5112	// null. It is an error if a field in this list has a non-empty value.
5113	// This may be used to include null fields in Patch requests.
5114	NullFields []string `json:"-"`
5115}
5116
5117func (s *GoogleCloudDialogflowCxV3beta1IntentParameter) MarshalJSON() ([]byte, error) {
5118	type NoMethod GoogleCloudDialogflowCxV3beta1IntentParameter
5119	raw := NoMethod(*s)
5120	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5121}
5122
5123// GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase: Represents an
5124// example that the agent is trained on to identify the intent.
5125type GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase struct {
5126	// Id: Output only. The unique identifier of the training phrase.
5127	Id string `json:"id,omitempty"`
5128
5129	// Parts: Required. The ordered list of training phrase parts. The parts
5130	// are concatenated in order to form the training phrase. Note: The API
5131	// does not automatically annotate training phrases like the Dialogflow
5132	// Console does. Note: Do not forget to include whitespace at part
5133	// boundaries, so the training phrase is well formatted when the parts
5134	// are concatenated. If the training phrase does not need to be
5135	// annotated with parameters, you just need a single part with only the
5136	// Part.text field set. If you want to annotate the training phrase, you
5137	// must create multiple parts, where the fields of each part are
5138	// populated in one of two ways: - `Part.text` is set to a part of the
5139	// phrase that has no parameters. - `Part.text` is set to a part of the
5140	// phrase that you want to annotate, and the `parameter_id` field is
5141	// set.
5142	Parts []*GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart `json:"parts,omitempty"`
5143
5144	// RepeatCount: Indicates how many times this example was added to the
5145	// intent.
5146	RepeatCount int64 `json:"repeatCount,omitempty"`
5147
5148	// ForceSendFields is a list of field names (e.g. "Id") to
5149	// unconditionally include in API requests. By default, fields with
5150	// empty values are omitted from API requests. However, any non-pointer,
5151	// non-interface field appearing in ForceSendFields will be sent to the
5152	// server regardless of whether the field is empty or not. This may be
5153	// used to include empty fields in Patch requests.
5154	ForceSendFields []string `json:"-"`
5155
5156	// NullFields is a list of field names (e.g. "Id") to include in API
5157	// requests with the JSON null value. By default, fields with empty
5158	// values are omitted from API requests. However, any field with an
5159	// empty value appearing in NullFields will be sent to the server as
5160	// null. It is an error if a field in this list has a non-empty value.
5161	// This may be used to include null fields in Patch requests.
5162	NullFields []string `json:"-"`
5163}
5164
5165func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
5166	type NoMethod GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase
5167	raw := NoMethod(*s)
5168	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5169}
5170
5171// GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart: Represents a
5172// part of a training phrase.
5173type GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart struct {
5174	// ParameterId: The parameter used to annotate this part of the training
5175	// phrase. This field is required for annotated parts of the training
5176	// phrase.
5177	ParameterId string `json:"parameterId,omitempty"`
5178
5179	// Text: Required. The text for this part.
5180	Text string `json:"text,omitempty"`
5181
5182	// ForceSendFields is a list of field names (e.g. "ParameterId") to
5183	// unconditionally include in API requests. By default, fields with
5184	// empty values are omitted from API requests. However, any non-pointer,
5185	// non-interface field appearing in ForceSendFields will be sent to the
5186	// server regardless of whether the field is empty or not. This may be
5187	// used to include empty fields in Patch requests.
5188	ForceSendFields []string `json:"-"`
5189
5190	// NullFields is a list of field names (e.g. "ParameterId") to include
5191	// in API requests with the JSON null value. By default, fields with
5192	// empty values are omitted from API requests. However, any field with
5193	// an empty value appearing in NullFields will be sent to the server as
5194	// null. It is an error if a field in this list has a non-empty value.
5195	// This may be used to include null fields in Patch requests.
5196	NullFields []string `json:"-"`
5197}
5198
5199func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
5200	type NoMethod GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart
5201	raw := NoMethod(*s)
5202	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5203}
5204
5205// GoogleCloudDialogflowCxV3beta1Page: A Dialogflow CX conversation
5206// (session) can be described and visualized as a state machine. The
5207// states of a CX session are represented by pages. For each flow, you
5208// define many pages, where your combined pages can handle a complete
5209// conversation on the topics the flow is designed for. At any given
5210// moment, exactly one page is the current page, the current page is
5211// considered active, and the flow associated with that page is
5212// considered active. Every flow has a special start page. When a flow
5213// initially becomes active, the start page page becomes the current
5214// page. For each conversational turn, the current page will either stay
5215// the same or transition to another page. You configure each page to
5216// collect information from the end-user that is relevant for the
5217// conversational state represented by the page. For more information,
5218// see the Page guide
5219// (https://cloud.google.com/dialogflow/cx/docs/concept/page).
5220type GoogleCloudDialogflowCxV3beta1Page struct {
5221	// DisplayName: Required. The human-readable name of the page, unique
5222	// within the agent.
5223	DisplayName string `json:"displayName,omitempty"`
5224
5225	// EntryFulfillment: The fulfillment to call when the session is
5226	// entering the page.
5227	EntryFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"entryFulfillment,omitempty"`
5228
5229	// EventHandlers: Handlers associated with the page to handle events
5230	// such as webhook errors, no match or no input.
5231	EventHandlers []*GoogleCloudDialogflowCxV3beta1EventHandler `json:"eventHandlers,omitempty"`
5232
5233	// Form: The form associated with the page, used for collecting
5234	// parameters relevant to the page.
5235	Form *GoogleCloudDialogflowCxV3beta1Form `json:"form,omitempty"`
5236
5237	// Name: The unique identifier of the page. Required for the
5238	// Pages.UpdatePage method. Pages.CreatePage populates the name
5239	// automatically. Format: `projects//locations//agents//flows//pages/`.
5240	Name string `json:"name,omitempty"`
5241
5242	// TransitionRouteGroups: Ordered list of `TransitionRouteGroups`
5243	// associated with the page. Transition route groups must be unique
5244	// within a page. * If multiple transition routes within a page scope
5245	// refer to the same intent, then the precedence order is: page's
5246	// transition route -> page's transition route group -> flow's
5247	// transition routes. * If multiple transition route groups within a
5248	// page contain the same intent, then the first group in the ordered
5249	// list takes precedence.
5250	// Format:`projects//locations//agents//flows//transitionRouteGroups/`.
5251	TransitionRouteGroups []string `json:"transitionRouteGroups,omitempty"`
5252
5253	// TransitionRoutes: A list of transitions for the transition rules of
5254	// this page. They route the conversation to another page in the same
5255	// flow, or another flow. When we are in a certain page, the
5256	// TransitionRoutes are evalauted in the following order: *
5257	// TransitionRoutes defined in the page with intent specified. *
5258	// TransitionRoutes defined in the transition route groups with intent
5259	// specified. * TransitionRoutes defined in flow with intent specified.
5260	// * TransitionRoutes defined in the transition route groups with intent
5261	// specified. * TransitionRoutes defined in the page with only condition
5262	// specified. * TransitionRoutes defined in the transition route groups
5263	// with only condition specified.
5264	TransitionRoutes []*GoogleCloudDialogflowCxV3beta1TransitionRoute `json:"transitionRoutes,omitempty"`
5265
5266	// ForceSendFields is a list of field names (e.g. "DisplayName") to
5267	// unconditionally include in API requests. By default, fields with
5268	// empty values are omitted from API requests. However, any non-pointer,
5269	// non-interface field appearing in ForceSendFields will be sent to the
5270	// server regardless of whether the field is empty or not. This may be
5271	// used to include empty fields in Patch requests.
5272	ForceSendFields []string `json:"-"`
5273
5274	// NullFields is a list of field names (e.g. "DisplayName") to include
5275	// in API requests with the JSON null value. By default, fields with
5276	// empty values are omitted from API requests. However, any field with
5277	// an empty value appearing in NullFields will be sent to the server as
5278	// null. It is an error if a field in this list has a non-empty value.
5279	// This may be used to include null fields in Patch requests.
5280	NullFields []string `json:"-"`
5281}
5282
5283func (s *GoogleCloudDialogflowCxV3beta1Page) MarshalJSON() ([]byte, error) {
5284	type NoMethod GoogleCloudDialogflowCxV3beta1Page
5285	raw := NoMethod(*s)
5286	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5287}
5288
5289// GoogleCloudDialogflowCxV3beta1PageInfo: Represents page information
5290// communicated to and from the webhook.
5291type GoogleCloudDialogflowCxV3beta1PageInfo struct {
5292	// CurrentPage: Always present for WebhookRequest. Ignored for
5293	// WebhookResponse. The unique identifier of the current page. Format:
5294	// `projects//locations//agents//flows//pages/`.
5295	CurrentPage string `json:"currentPage,omitempty"`
5296
5297	// FormInfo: Optional for both WebhookRequest and WebhookResponse.
5298	// Information about the form.
5299	FormInfo *GoogleCloudDialogflowCxV3beta1PageInfoFormInfo `json:"formInfo,omitempty"`
5300
5301	// ForceSendFields is a list of field names (e.g. "CurrentPage") to
5302	// unconditionally include in API requests. By default, fields with
5303	// empty values are omitted from API requests. However, any non-pointer,
5304	// non-interface field appearing in ForceSendFields will be sent to the
5305	// server regardless of whether the field is empty or not. This may be
5306	// used to include empty fields in Patch requests.
5307	ForceSendFields []string `json:"-"`
5308
5309	// NullFields is a list of field names (e.g. "CurrentPage") to include
5310	// in API requests with the JSON null value. By default, fields with
5311	// empty values are omitted from API requests. However, any field with
5312	// an empty value appearing in NullFields will be sent to the server as
5313	// null. It is an error if a field in this list has a non-empty value.
5314	// This may be used to include null fields in Patch requests.
5315	NullFields []string `json:"-"`
5316}
5317
5318func (s *GoogleCloudDialogflowCxV3beta1PageInfo) MarshalJSON() ([]byte, error) {
5319	type NoMethod GoogleCloudDialogflowCxV3beta1PageInfo
5320	raw := NoMethod(*s)
5321	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5322}
5323
5324// GoogleCloudDialogflowCxV3beta1PageInfoFormInfo: Represents form
5325// information.
5326type GoogleCloudDialogflowCxV3beta1PageInfoFormInfo struct {
5327	// ParameterInfo: Optional for both WebhookRequest and WebhookResponse.
5328	// The parameters contained in the form. Note that the webhook cannot
5329	// add or remove any form parameter.
5330	ParameterInfo []*GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo `json:"parameterInfo,omitempty"`
5331
5332	// ForceSendFields is a list of field names (e.g. "ParameterInfo") to
5333	// unconditionally include in API requests. By default, fields with
5334	// empty values are omitted from API requests. However, any non-pointer,
5335	// non-interface field appearing in ForceSendFields will be sent to the
5336	// server regardless of whether the field is empty or not. This may be
5337	// used to include empty fields in Patch requests.
5338	ForceSendFields []string `json:"-"`
5339
5340	// NullFields is a list of field names (e.g. "ParameterInfo") to include
5341	// in API requests with the JSON null value. By default, fields with
5342	// empty values are omitted from API requests. However, any field with
5343	// an empty value appearing in NullFields will be sent to the server as
5344	// null. It is an error if a field in this list has a non-empty value.
5345	// This may be used to include null fields in Patch requests.
5346	NullFields []string `json:"-"`
5347}
5348
5349func (s *GoogleCloudDialogflowCxV3beta1PageInfoFormInfo) MarshalJSON() ([]byte, error) {
5350	type NoMethod GoogleCloudDialogflowCxV3beta1PageInfoFormInfo
5351	raw := NoMethod(*s)
5352	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5353}
5354
5355// GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo:
5356// Represents parameter information.
5357type GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo struct {
5358	// DisplayName: Always present for WebhookRequest. Required for
5359	// WebhookResponse. The human-readable name of the parameter, unique
5360	// within the form. This field cannot be modified by the webhook.
5361	DisplayName string `json:"displayName,omitempty"`
5362
5363	// JustCollected: Optional for WebhookRequest. Ignored for
5364	// WebhookResponse. Indicates if the parameter value was just collected
5365	// on the last conversation turn.
5366	JustCollected bool `json:"justCollected,omitempty"`
5367
5368	// Required: Optional for both WebhookRequest and WebhookResponse.
5369	// Indicates whether the parameter is required. Optional parameters will
5370	// not trigger prompts; however, they are filled if the user specifies
5371	// them. Required parameters must be filled before form filling
5372	// concludes.
5373	Required bool `json:"required,omitempty"`
5374
5375	// State: Always present for WebhookRequest. Required for
5376	// WebhookResponse. The state of the parameter. This field can be set to
5377	// INVALID by the webhook to invalidate the parameter; other values set
5378	// by the webhook will be ignored.
5379	//
5380	// Possible values:
5381	//   "PARAMETER_STATE_UNSPECIFIED" - Not specified. This value should be
5382	// never used.
5383	//   "EMPTY" - Indicates that the parameter does not have a value.
5384	//   "INVALID" - Indicates that the parameter value is invalid. This
5385	// field can be used by the webhook to invalidate the parameter and ask
5386	// the server to collect it from the user again.
5387	//   "FILLED" - Indicates that the parameter has a value.
5388	State string `json:"state,omitempty"`
5389
5390	// Value: Optional for both WebhookRequest and WebhookResponse. The
5391	// value of the parameter. This field can be set by the webhook to
5392	// change the parameter value.
5393	Value interface{} `json:"value,omitempty"`
5394
5395	// ForceSendFields is a list of field names (e.g. "DisplayName") to
5396	// unconditionally include in API requests. By default, fields with
5397	// empty values are omitted from API requests. However, any non-pointer,
5398	// non-interface field appearing in ForceSendFields will be sent to the
5399	// server regardless of whether the field is empty or not. This may be
5400	// used to include empty fields in Patch requests.
5401	ForceSendFields []string `json:"-"`
5402
5403	// NullFields is a list of field names (e.g. "DisplayName") to include
5404	// in API requests with the JSON null value. By default, fields with
5405	// empty values are omitted from API requests. However, any field with
5406	// an empty value appearing in NullFields will be sent to the server as
5407	// null. It is an error if a field in this list has a non-empty value.
5408	// This may be used to include null fields in Patch requests.
5409	NullFields []string `json:"-"`
5410}
5411
5412func (s *GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo) MarshalJSON() ([]byte, error) {
5413	type NoMethod GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo
5414	raw := NoMethod(*s)
5415	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5416}
5417
5418// GoogleCloudDialogflowCxV3beta1QueryInput: Represents the query input.
5419// It can contain one of: 1. A conversational query in the form of text.
5420// 2. An intent query that specifies which intent to trigger. 3. Natural
5421// language speech audio to be processed. 4. An event to be triggered.
5422type GoogleCloudDialogflowCxV3beta1QueryInput struct {
5423	// Audio: The natural language speech audio to be processed.
5424	Audio *GoogleCloudDialogflowCxV3beta1AudioInput `json:"audio,omitempty"`
5425
5426	// Dtmf: The DTMF event to be handled.
5427	Dtmf *GoogleCloudDialogflowCxV3beta1DtmfInput `json:"dtmf,omitempty"`
5428
5429	// Event: The event to be triggered.
5430	Event *GoogleCloudDialogflowCxV3beta1EventInput `json:"event,omitempty"`
5431
5432	// Intent: The intent to be triggered.
5433	Intent *GoogleCloudDialogflowCxV3beta1IntentInput `json:"intent,omitempty"`
5434
5435	// LanguageCode: Required. The language of the input. See Language
5436	// Support
5437	// (https://cloud.google.com/dialogflow/cx/docs/reference/language) for
5438	// a list of the currently supported language codes. Note that queries
5439	// in the same session do not necessarily need to specify the same
5440	// language.
5441	LanguageCode string `json:"languageCode,omitempty"`
5442
5443	// Text: The natural language text to be processed.
5444	Text *GoogleCloudDialogflowCxV3beta1TextInput `json:"text,omitempty"`
5445
5446	// ForceSendFields is a list of field names (e.g. "Audio") to
5447	// unconditionally include in API requests. By default, fields with
5448	// empty values are omitted from API requests. However, any non-pointer,
5449	// non-interface field appearing in ForceSendFields will be sent to the
5450	// server regardless of whether the field is empty or not. This may be
5451	// used to include empty fields in Patch requests.
5452	ForceSendFields []string `json:"-"`
5453
5454	// NullFields is a list of field names (e.g. "Audio") to include in API
5455	// requests with the JSON null value. By default, fields with empty
5456	// values are omitted from API requests. However, any field with an
5457	// empty value appearing in NullFields will be sent to the server as
5458	// null. It is an error if a field in this list has a non-empty value.
5459	// This may be used to include null fields in Patch requests.
5460	NullFields []string `json:"-"`
5461}
5462
5463func (s *GoogleCloudDialogflowCxV3beta1QueryInput) MarshalJSON() ([]byte, error) {
5464	type NoMethod GoogleCloudDialogflowCxV3beta1QueryInput
5465	raw := NoMethod(*s)
5466	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5467}
5468
5469// GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata:
5470// Metadata for ReloadDocument operation.
5471type GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata struct {
5472	// GenericMetadata: The generic information of the operation.
5473	GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
5474
5475	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
5476	// unconditionally include in API requests. By default, fields with
5477	// empty values are omitted from API requests. However, any non-pointer,
5478	// non-interface field appearing in ForceSendFields will be sent to the
5479	// server regardless of whether the field is empty or not. This may be
5480	// used to include empty fields in Patch requests.
5481	ForceSendFields []string `json:"-"`
5482
5483	// NullFields is a list of field names (e.g. "GenericMetadata") to
5484	// include in API requests with the JSON null value. By default, fields
5485	// with empty values are omitted from API requests. However, any field
5486	// with an empty value appearing in NullFields will be sent to the
5487	// server as null. It is an error if a field in this list has a
5488	// non-empty value. This may be used to include null fields in Patch
5489	// requests.
5490	NullFields []string `json:"-"`
5491}
5492
5493func (s *GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
5494	type NoMethod GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata
5495	raw := NoMethod(*s)
5496	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5497}
5498
5499// GoogleCloudDialogflowCxV3beta1ResponseMessage: Represents a response
5500// message that can be returned by a conversational agent. Response
5501// messages are also used for output audio synthesis. The approach is as
5502// follows: * If at least one OutputAudioText response is present, then
5503// all OutputAudioText responses are linearly concatenated, and the
5504// result is used for output audio synthesis. * If the OutputAudioText
5505// responses are a mixture of text and SSML, then the concatenated
5506// result is treated as SSML; otherwise, the result is treated as either
5507// text or SSML as appropriate. The agent designer should ideally use
5508// either text or SSML consistently throughout the bot design. *
5509// Otherwise, all Text responses are linearly concatenated, and the
5510// result is used for output audio synthesis. This approach allows for
5511// more sophisticated user experience scenarios, where the text
5512// displayed to the user may differ from what is heard.
5513type GoogleCloudDialogflowCxV3beta1ResponseMessage struct {
5514	// ConversationSuccess: Indicates that the conversation succeeded.
5515	ConversationSuccess *GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess `json:"conversationSuccess,omitempty"`
5516
5517	// EndInteraction: Output only. A signal that indicates the interaction
5518	// with the Dialogflow agent has ended. This message is generated by
5519	// Dialogflow only when the conversation reaches `END_SESSION` page. It
5520	// is not supposed to be defined by the user. It's guaranteed that there
5521	// is at most one such message in each response.
5522	EndInteraction *GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction `json:"endInteraction,omitempty"`
5523
5524	// LiveAgentHandoff: Hands off conversation to a human agent.
5525	LiveAgentHandoff *GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"`
5526
5527	// MixedAudio: Output only. An audio response message composed of both
5528	// the synthesized Dialogflow agent responses and responses defined via
5529	// play_audio. This message is generated by Dialogflow only and not
5530	// supposed to be defined by the user.
5531	MixedAudio *GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio `json:"mixedAudio,omitempty"`
5532
5533	// OutputAudioText: A text or ssml response that is preferentially used
5534	// for TTS output audio synthesis, as described in the comment on the
5535	// ResponseMessage message.
5536	OutputAudioText *GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText `json:"outputAudioText,omitempty"`
5537
5538	// Payload: Returns a response containing a custom, platform-specific
5539	// payload.
5540	Payload googleapi.RawMessage `json:"payload,omitempty"`
5541
5542	// PlayAudio: Signal that the client should play an audio clip hosted at
5543	// a client-specific URI. Dialogflow uses this to construct mixed_audio.
5544	// However, Dialogflow itself does not try to read or process the URI in
5545	// any way.
5546	PlayAudio *GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio `json:"playAudio,omitempty"`
5547
5548	// Text: Returns a text response.
5549	Text *GoogleCloudDialogflowCxV3beta1ResponseMessageText `json:"text,omitempty"`
5550
5551	// ForceSendFields is a list of field names (e.g. "ConversationSuccess")
5552	// to unconditionally include in API requests. By default, fields with
5553	// empty values are omitted from API requests. However, any non-pointer,
5554	// non-interface field appearing in ForceSendFields will be sent to the
5555	// server regardless of whether the field is empty or not. This may be
5556	// used to include empty fields in Patch requests.
5557	ForceSendFields []string `json:"-"`
5558
5559	// NullFields is a list of field names (e.g. "ConversationSuccess") to
5560	// include in API requests with the JSON null value. By default, fields
5561	// with empty values are omitted from API requests. However, any field
5562	// with an empty value appearing in NullFields will be sent to the
5563	// server as null. It is an error if a field in this list has a
5564	// non-empty value. This may be used to include null fields in Patch
5565	// requests.
5566	NullFields []string `json:"-"`
5567}
5568
5569func (s *GoogleCloudDialogflowCxV3beta1ResponseMessage) MarshalJSON() ([]byte, error) {
5570	type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessage
5571	raw := NoMethod(*s)
5572	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5573}
5574
5575// GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess:
5576// Indicates that the conversation succeeded, i.e., the bot handled the
5577// issue that the customer talked to it about. Dialogflow only uses this
5578// to determine which conversations should be counted as successful and
5579// doesn't process the metadata in this message in any way. Note that
5580// Dialogflow also considers conversations that get to the conversation
5581// end page as successful even if they don't return ConversationSuccess.
5582// You may set this, for example: * In the entry_fulfillment of a Page
5583// if entering the page indicates that the conversation succeeded. * In
5584// a webhook response when you determine that you handled the customer
5585// issue.
5586type GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess struct {
5587	// Metadata: Custom metadata. Dialogflow doesn't impose any structure on
5588	// this.
5589	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
5590
5591	// ForceSendFields is a list of field names (e.g. "Metadata") to
5592	// unconditionally include in API requests. By default, fields with
5593	// empty values are omitted from API requests. However, any non-pointer,
5594	// non-interface field appearing in ForceSendFields will be sent to the
5595	// server regardless of whether the field is empty or not. This may be
5596	// used to include empty fields in Patch requests.
5597	ForceSendFields []string `json:"-"`
5598
5599	// NullFields is a list of field names (e.g. "Metadata") to include in
5600	// API requests with the JSON null value. By default, fields with empty
5601	// values are omitted from API requests. However, any field with an
5602	// empty value appearing in NullFields will be sent to the server as
5603	// null. It is an error if a field in this list has a non-empty value.
5604	// This may be used to include null fields in Patch requests.
5605	NullFields []string `json:"-"`
5606}
5607
5608func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess) MarshalJSON() ([]byte, error) {
5609	type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess
5610	raw := NoMethod(*s)
5611	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5612}
5613
5614// GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction:
5615// Indicates that interaction with the Dialogflow agent has ended. This
5616// message is generated by Dialogflow only and not supposed to be
5617// defined by the user.
5618type GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction struct {
5619}
5620
5621// GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff:
5622// Indicates that the conversation should be handed off to a live agent.
5623// Dialogflow only uses this to determine which conversations were
5624// handed off to a human agent for measurement purposes. What else to do
5625// with this signal is up to you and your handoff procedures. You may
5626// set this, for example: * In the entry_fulfillment of a Page if
5627// entering the page indicates something went extremely wrong in the
5628// conversation. * In a webhook response when you determine that the
5629// customer issue can only be handled by a human.
5630type GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff struct {
5631	// Metadata: Custom metadata for your handoff procedure. Dialogflow
5632	// doesn't impose any structure on this.
5633	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
5634
5635	// ForceSendFields is a list of field names (e.g. "Metadata") to
5636	// unconditionally include in API requests. By default, fields with
5637	// empty values are omitted from API requests. However, any non-pointer,
5638	// non-interface field appearing in ForceSendFields will be sent to the
5639	// server regardless of whether the field is empty or not. This may be
5640	// used to include empty fields in Patch requests.
5641	ForceSendFields []string `json:"-"`
5642
5643	// NullFields is a list of field names (e.g. "Metadata") to include in
5644	// API requests with the JSON null value. By default, fields with empty
5645	// values are omitted from API requests. However, any field with an
5646	// empty value appearing in NullFields will be sent to the server as
5647	// null. It is an error if a field in this list has a non-empty value.
5648	// This may be used to include null fields in Patch requests.
5649	NullFields []string `json:"-"`
5650}
5651
5652func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff) MarshalJSON() ([]byte, error) {
5653	type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff
5654	raw := NoMethod(*s)
5655	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5656}
5657
5658// GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio: Represents
5659// an audio message that is composed of both segments synthesized from
5660// the Dialogflow agent prompts and ones hosted externally at the
5661// specified URIs. The external URIs are specified via play_audio. This
5662// message is generated by Dialogflow only and not supposed to be
5663// defined by the user.
5664type GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio struct {
5665	// Segments: Segments this audio response is composed of.
5666	Segments []*GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment `json:"segments,omitempty"`
5667
5668	// ForceSendFields is a list of field names (e.g. "Segments") to
5669	// unconditionally include in API requests. By default, fields with
5670	// empty values are omitted from API requests. However, any non-pointer,
5671	// non-interface field appearing in ForceSendFields will be sent to the
5672	// server regardless of whether the field is empty or not. This may be
5673	// used to include empty fields in Patch requests.
5674	ForceSendFields []string `json:"-"`
5675
5676	// NullFields is a list of field names (e.g. "Segments") to include in
5677	// API requests with the JSON null value. By default, fields with empty
5678	// values are omitted from API requests. However, any field with an
5679	// empty value appearing in NullFields will be sent to the server as
5680	// null. It is an error if a field in this list has a non-empty value.
5681	// This may be used to include null fields in Patch requests.
5682	NullFields []string `json:"-"`
5683}
5684
5685func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio) MarshalJSON() ([]byte, error) {
5686	type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio
5687	raw := NoMethod(*s)
5688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5689}
5690
5691// GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment:
5692// Represents one segment of audio.
5693type GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment struct {
5694	// AllowPlaybackInterruption: Output only. Whether the playback of this
5695	// segment can be interrupted by the end user's speech and the client
5696	// should then start the next Dialogflow request.
5697	AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"`
5698
5699	// Audio: Raw audio synthesized from the Dialogflow agent's response
5700	// using the output config specified in the request.
5701	Audio string `json:"audio,omitempty"`
5702
5703	// Uri: Client-specific URI that points to an audio clip accessible to
5704	// the client. Dialogflow does not impose any validation on it.
5705	Uri string `json:"uri,omitempty"`
5706
5707	// ForceSendFields is a list of field names (e.g.
5708	// "AllowPlaybackInterruption") to unconditionally include in API
5709	// requests. By default, fields with empty values are omitted from API
5710	// requests. However, any non-pointer, non-interface field appearing in
5711	// ForceSendFields will be sent to the server regardless of whether the
5712	// field is empty or not. This may be used to include empty fields in
5713	// Patch requests.
5714	ForceSendFields []string `json:"-"`
5715
5716	// NullFields is a list of field names (e.g.
5717	// "AllowPlaybackInterruption") to include in API requests with the JSON
5718	// null value. By default, fields with empty values are omitted from API
5719	// requests. However, any field with an empty value appearing in
5720	// NullFields will be sent to the server as null. It is an error if a
5721	// field in this list has a non-empty value. This may be used to include
5722	// null fields in Patch requests.
5723	NullFields []string `json:"-"`
5724}
5725
5726func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment) MarshalJSON() ([]byte, error) {
5727	type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment
5728	raw := NoMethod(*s)
5729	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5730}
5731
5732// GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText: A text
5733// or ssml response that is preferentially used for TTS output audio
5734// synthesis, as described in the comment on the ResponseMessage
5735// message.
5736type GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText struct {
5737	// AllowPlaybackInterruption: Output only. Whether the playback of this
5738	// message can be interrupted by the end user's speech and the client
5739	// can then starts the next Dialogflow request.
5740	AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"`
5741
5742	// Ssml: The SSML text to be synthesized. For more information, see SSML
5743	// (/speech/text-to-speech/docs/ssml).
5744	Ssml string `json:"ssml,omitempty"`
5745
5746	// Text: The raw text to be synthesized.
5747	Text string `json:"text,omitempty"`
5748
5749	// ForceSendFields is a list of field names (e.g.
5750	// "AllowPlaybackInterruption") to unconditionally include in API
5751	// requests. By default, fields with empty values are omitted from API
5752	// requests. However, any non-pointer, non-interface field appearing in
5753	// ForceSendFields will be sent to the server regardless of whether the
5754	// field is empty or not. This may be used to include empty fields in
5755	// Patch requests.
5756	ForceSendFields []string `json:"-"`
5757
5758	// NullFields is a list of field names (e.g.
5759	// "AllowPlaybackInterruption") to include in API requests with the JSON
5760	// null value. By default, fields with empty values are omitted from API
5761	// requests. However, any field with an empty value appearing in
5762	// NullFields will be sent to the server as null. It is an error if a
5763	// field in this list has a non-empty value. This may be used to include
5764	// null fields in Patch requests.
5765	NullFields []string `json:"-"`
5766}
5767
5768func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText) MarshalJSON() ([]byte, error) {
5769	type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText
5770	raw := NoMethod(*s)
5771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5772}
5773
5774// GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio: Specifies an
5775// audio clip to be played by the client as part of the response.
5776type GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio struct {
5777	// AllowPlaybackInterruption: Output only. Whether the playback of this
5778	// message can be interrupted by the end user's speech and the client
5779	// can then starts the next Dialogflow request.
5780	AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"`
5781
5782	// AudioUri: Required. URI of the audio clip. Dialogflow does not impose
5783	// any validation on this value. It is specific to the client that reads
5784	// it.
5785	AudioUri string `json:"audioUri,omitempty"`
5786
5787	// ForceSendFields is a list of field names (e.g.
5788	// "AllowPlaybackInterruption") to unconditionally include in API
5789	// requests. By default, fields with empty values are omitted from API
5790	// requests. However, any non-pointer, non-interface field appearing in
5791	// ForceSendFields will be sent to the server regardless of whether the
5792	// field is empty or not. This may be used to include empty fields in
5793	// Patch requests.
5794	ForceSendFields []string `json:"-"`
5795
5796	// NullFields is a list of field names (e.g.
5797	// "AllowPlaybackInterruption") to include in API requests with the JSON
5798	// null value. By default, fields with empty values are omitted from API
5799	// requests. However, any field with an empty value appearing in
5800	// NullFields will be sent to the server as null. It is an error if a
5801	// field in this list has a non-empty value. This may be used to include
5802	// null fields in Patch requests.
5803	NullFields []string `json:"-"`
5804}
5805
5806func (s *GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio) MarshalJSON() ([]byte, error) {
5807	type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio
5808	raw := NoMethod(*s)
5809	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5810}
5811
5812// GoogleCloudDialogflowCxV3beta1ResponseMessageText: The text response
5813// message.
5814type GoogleCloudDialogflowCxV3beta1ResponseMessageText struct {
5815	// AllowPlaybackInterruption: Output only. Whether the playback of this
5816	// message can be interrupted by the end user's speech and the client
5817	// can then starts the next Dialogflow request.
5818	AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"`
5819
5820	// Text: Required. A collection of text responses.
5821	Text []string `json:"text,omitempty"`
5822
5823	// ForceSendFields is a list of field names (e.g.
5824	// "AllowPlaybackInterruption") to unconditionally include in API
5825	// requests. By default, fields with empty values are omitted from API
5826	// requests. However, any non-pointer, non-interface field appearing in
5827	// ForceSendFields will be sent to the server regardless of whether the
5828	// field is empty or not. This may be used to include empty fields in
5829	// Patch requests.
5830	ForceSendFields []string `json:"-"`
5831
5832	// NullFields is a list of field names (e.g.
5833	// "AllowPlaybackInterruption") to include in API requests with the JSON
5834	// null value. By default, fields with empty values are omitted from API
5835	// requests. However, any field with an empty value appearing in
5836	// NullFields will be sent to the server as null. It is an error if a
5837	// field in this list has a non-empty value. This may be used to include
5838	// null fields in Patch requests.
5839	NullFields []string `json:"-"`
5840}
5841
5842func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageText) MarshalJSON() ([]byte, error) {
5843	type NoMethod GoogleCloudDialogflowCxV3beta1ResponseMessageText
5844	raw := NoMethod(*s)
5845	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5846}
5847
5848// GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata: Metadata
5849// returned for the Environments.RunContinuousTest long running
5850// operation.
5851type GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata struct {
5852	// Errors: The test errors.
5853	Errors []*GoogleCloudDialogflowCxV3beta1TestError `json:"errors,omitempty"`
5854
5855	// ForceSendFields is a list of field names (e.g. "Errors") to
5856	// unconditionally include in API requests. By default, fields with
5857	// empty values are omitted from API requests. However, any non-pointer,
5858	// non-interface field appearing in ForceSendFields will be sent to the
5859	// server regardless of whether the field is empty or not. This may be
5860	// used to include empty fields in Patch requests.
5861	ForceSendFields []string `json:"-"`
5862
5863	// NullFields is a list of field names (e.g. "Errors") to include in API
5864	// requests with the JSON null value. By default, fields with empty
5865	// values are omitted from API requests. However, any field with an
5866	// empty value appearing in NullFields will be sent to the server as
5867	// null. It is an error if a field in this list has a non-empty value.
5868	// This may be used to include null fields in Patch requests.
5869	NullFields []string `json:"-"`
5870}
5871
5872func (s *GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata) MarshalJSON() ([]byte, error) {
5873	type NoMethod GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata
5874	raw := NoMethod(*s)
5875	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5876}
5877
5878// GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse: The response
5879// message for Environments.RunContinuousTest.
5880type GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse struct {
5881	// ContinuousTestResult: The result for a continuous test run.
5882	ContinuousTestResult *GoogleCloudDialogflowCxV3beta1ContinuousTestResult `json:"continuousTestResult,omitempty"`
5883
5884	// ForceSendFields is a list of field names (e.g.
5885	// "ContinuousTestResult") to unconditionally include in API requests.
5886	// By default, fields with empty values are omitted from API requests.
5887	// However, any non-pointer, non-interface field appearing in
5888	// ForceSendFields will be sent to the server regardless of whether the
5889	// field is empty or not. This may be used to include empty fields in
5890	// Patch requests.
5891	ForceSendFields []string `json:"-"`
5892
5893	// NullFields is a list of field names (e.g. "ContinuousTestResult") to
5894	// include in API requests with the JSON null value. By default, fields
5895	// with empty values are omitted from API requests. However, any field
5896	// with an empty value appearing in NullFields will be sent to the
5897	// server as null. It is an error if a field in this list has a
5898	// non-empty value. This may be used to include null fields in Patch
5899	// requests.
5900	NullFields []string `json:"-"`
5901}
5902
5903func (s *GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse) MarshalJSON() ([]byte, error) {
5904	type NoMethod GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse
5905	raw := NoMethod(*s)
5906	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5907}
5908
5909// GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata: Metadata returned
5910// for the TestCases.RunTestCase long running operation.
5911type GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata struct {
5912}
5913
5914// GoogleCloudDialogflowCxV3beta1RunTestCaseResponse: The response
5915// message for TestCases.RunTestCase.
5916type GoogleCloudDialogflowCxV3beta1RunTestCaseResponse struct {
5917	// Result: The result.
5918	Result *GoogleCloudDialogflowCxV3beta1TestCaseResult `json:"result,omitempty"`
5919
5920	// ForceSendFields is a list of field names (e.g. "Result") to
5921	// unconditionally include in API requests. By default, fields with
5922	// empty values are omitted from API requests. However, any non-pointer,
5923	// non-interface field appearing in ForceSendFields will be sent to the
5924	// server regardless of whether the field is empty or not. This may be
5925	// used to include empty fields in Patch requests.
5926	ForceSendFields []string `json:"-"`
5927
5928	// NullFields is a list of field names (e.g. "Result") to include in API
5929	// requests with the JSON null value. By default, fields with empty
5930	// values are omitted from API requests. However, any field with an
5931	// empty value appearing in NullFields will be sent to the server as
5932	// null. It is an error if a field in this list has a non-empty value.
5933	// This may be used to include null fields in Patch requests.
5934	NullFields []string `json:"-"`
5935}
5936
5937func (s *GoogleCloudDialogflowCxV3beta1RunTestCaseResponse) MarshalJSON() ([]byte, error) {
5938	type NoMethod GoogleCloudDialogflowCxV3beta1RunTestCaseResponse
5939	raw := NoMethod(*s)
5940	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5941}
5942
5943// GoogleCloudDialogflowCxV3beta1SessionInfo: Represents session
5944// information communicated to and from the webhook.
5945type GoogleCloudDialogflowCxV3beta1SessionInfo struct {
5946	// Parameters: Optional for WebhookRequest. Optional for
5947	// WebhookResponse. All parameters collected from forms and intents
5948	// during the session. Parameters can be created, updated, or removed by
5949	// the webhook. To remove a parameter from the session, the webhook
5950	// should explicitly set the parameter value to null in WebhookResponse.
5951	// The map is keyed by parameters' display names.
5952	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
5953
5954	// Session: Always present for WebhookRequest. Ignored for
5955	// WebhookResponse. The unique identifier of the session. This field can
5956	// be used by the webhook to identify a session. Format:
5957	// `projects//locations//agents//sessions/` or
5958	// `projects//locations//agents//environments//sessions/` if environment
5959	// is specified.
5960	Session string `json:"session,omitempty"`
5961
5962	// ForceSendFields is a list of field names (e.g. "Parameters") to
5963	// unconditionally include in API requests. By default, fields with
5964	// empty values are omitted from API requests. However, any non-pointer,
5965	// non-interface field appearing in ForceSendFields will be sent to the
5966	// server regardless of whether the field is empty or not. This may be
5967	// used to include empty fields in Patch requests.
5968	ForceSendFields []string `json:"-"`
5969
5970	// NullFields is a list of field names (e.g. "Parameters") to include in
5971	// API requests with the JSON null value. By default, fields with empty
5972	// values are omitted from API requests. However, any field with an
5973	// empty value appearing in NullFields will be sent to the server as
5974	// null. It is an error if a field in this list has a non-empty value.
5975	// This may be used to include null fields in Patch requests.
5976	NullFields []string `json:"-"`
5977}
5978
5979func (s *GoogleCloudDialogflowCxV3beta1SessionInfo) MarshalJSON() ([]byte, error) {
5980	type NoMethod GoogleCloudDialogflowCxV3beta1SessionInfo
5981	raw := NoMethod(*s)
5982	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5983}
5984
5985// GoogleCloudDialogflowCxV3beta1TestCase: Represents a test case.
5986type GoogleCloudDialogflowCxV3beta1TestCase struct {
5987	// CreationTime: Output only. When the test was created.
5988	CreationTime string `json:"creationTime,omitempty"`
5989
5990	// DisplayName: Required. The human-readable name of the test case,
5991	// unique within the agent. Limit of 200 characters.
5992	DisplayName string `json:"displayName,omitempty"`
5993
5994	// LastTestResult: The latest test result.
5995	LastTestResult *GoogleCloudDialogflowCxV3beta1TestCaseResult `json:"lastTestResult,omitempty"`
5996
5997	// Name: The unique identifier of the test case.
5998	// TestCases.CreateTestCase will populate the name automatically.
5999	// Otherwise use format: `projects//locations//agents/ /testCases/`.
6000	Name string `json:"name,omitempty"`
6001
6002	// Notes: Additional freeform notes about the test case. Limit of 400
6003	// characters.
6004	Notes string `json:"notes,omitempty"`
6005
6006	// Tags: Tags are short descriptions that users may apply to test cases
6007	// for organizational and filtering purposes. Each tag should start with
6008	// "#" and has a limit of 30 characters.
6009	Tags []string `json:"tags,omitempty"`
6010
6011	// TestCaseConversationTurns: The conversation turns uttered when the
6012	// test case was created, in chronological order. These include the
6013	// canonical set of agent utterances that should occur when the agent is
6014	// working properly.
6015	TestCaseConversationTurns []*GoogleCloudDialogflowCxV3beta1ConversationTurn `json:"testCaseConversationTurns,omitempty"`
6016
6017	// TestConfig: Config for the test case.
6018	TestConfig *GoogleCloudDialogflowCxV3beta1TestConfig `json:"testConfig,omitempty"`
6019
6020	// ForceSendFields is a list of field names (e.g. "CreationTime") to
6021	// unconditionally include in API requests. By default, fields with
6022	// empty values are omitted from API requests. However, any non-pointer,
6023	// non-interface field appearing in ForceSendFields will be sent to the
6024	// server regardless of whether the field is empty or not. This may be
6025	// used to include empty fields in Patch requests.
6026	ForceSendFields []string `json:"-"`
6027
6028	// NullFields is a list of field names (e.g. "CreationTime") to include
6029	// in API requests with the JSON null value. By default, fields with
6030	// empty values are omitted from API requests. However, any field with
6031	// an empty value appearing in NullFields will be sent to the server as
6032	// null. It is an error if a field in this list has a non-empty value.
6033	// This may be used to include null fields in Patch requests.
6034	NullFields []string `json:"-"`
6035}
6036
6037func (s *GoogleCloudDialogflowCxV3beta1TestCase) MarshalJSON() ([]byte, error) {
6038	type NoMethod GoogleCloudDialogflowCxV3beta1TestCase
6039	raw := NoMethod(*s)
6040	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6041}
6042
6043// GoogleCloudDialogflowCxV3beta1TestCaseError: Error info for importing
6044// a test.
6045type GoogleCloudDialogflowCxV3beta1TestCaseError struct {
6046	// Status: The status associated with the test case.
6047	Status *GoogleRpcStatus `json:"status,omitempty"`
6048
6049	// TestCase: The test case.
6050	TestCase *GoogleCloudDialogflowCxV3beta1TestCase `json:"testCase,omitempty"`
6051
6052	// ForceSendFields is a list of field names (e.g. "Status") to
6053	// unconditionally include in API requests. By default, fields with
6054	// empty values are omitted from API requests. However, any non-pointer,
6055	// non-interface field appearing in ForceSendFields will be sent to the
6056	// server regardless of whether the field is empty or not. This may be
6057	// used to include empty fields in Patch requests.
6058	ForceSendFields []string `json:"-"`
6059
6060	// NullFields is a list of field names (e.g. "Status") to include in API
6061	// requests with the JSON null value. By default, fields with empty
6062	// values are omitted from API requests. However, any field with an
6063	// empty value appearing in NullFields will be sent to the server as
6064	// null. It is an error if a field in this list has a non-empty value.
6065	// This may be used to include null fields in Patch requests.
6066	NullFields []string `json:"-"`
6067}
6068
6069func (s *GoogleCloudDialogflowCxV3beta1TestCaseError) MarshalJSON() ([]byte, error) {
6070	type NoMethod GoogleCloudDialogflowCxV3beta1TestCaseError
6071	raw := NoMethod(*s)
6072	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6073}
6074
6075// GoogleCloudDialogflowCxV3beta1TestCaseResult: Represents a result
6076// from running a test case in an agent environment.
6077type GoogleCloudDialogflowCxV3beta1TestCaseResult struct {
6078	// ConversationTurns: The conversation turns uttered during the test
6079	// case replay in chronological order.
6080	ConversationTurns []*GoogleCloudDialogflowCxV3beta1ConversationTurn `json:"conversationTurns,omitempty"`
6081
6082	// Environment: Environment where the test was run. If not set, it
6083	// indicates the draft environment.
6084	Environment string `json:"environment,omitempty"`
6085
6086	// Name: The resource name for the test case result. Format:
6087	// `projects//locations//agents//testCases/ /results/`.
6088	Name string `json:"name,omitempty"`
6089
6090	// TestResult: Whether the test case passed in the agent environment.
6091	//
6092	// Possible values:
6093	//   "TEST_RESULT_UNSPECIFIED" - Not specified. Should never be used.
6094	//   "PASSED" - The test passed.
6095	//   "FAILED" - The test did not pass.
6096	TestResult string `json:"testResult,omitempty"`
6097
6098	// TestTime: The time that the test was run.
6099	TestTime string `json:"testTime,omitempty"`
6100
6101	// ForceSendFields is a list of field names (e.g. "ConversationTurns")
6102	// to unconditionally include in API requests. By default, fields with
6103	// empty values are omitted from API requests. However, any non-pointer,
6104	// non-interface field appearing in ForceSendFields will be sent to the
6105	// server regardless of whether the field is empty or not. This may be
6106	// used to include empty fields in Patch requests.
6107	ForceSendFields []string `json:"-"`
6108
6109	// NullFields is a list of field names (e.g. "ConversationTurns") to
6110	// include in API requests with the JSON null value. By default, fields
6111	// with empty values are omitted from API requests. However, any field
6112	// with an empty value appearing in NullFields will be sent to the
6113	// server as null. It is an error if a field in this list has a
6114	// non-empty value. This may be used to include null fields in Patch
6115	// requests.
6116	NullFields []string `json:"-"`
6117}
6118
6119func (s *GoogleCloudDialogflowCxV3beta1TestCaseResult) MarshalJSON() ([]byte, error) {
6120	type NoMethod GoogleCloudDialogflowCxV3beta1TestCaseResult
6121	raw := NoMethod(*s)
6122	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6123}
6124
6125// GoogleCloudDialogflowCxV3beta1TestConfig: Represents configurations
6126// for a test case.
6127type GoogleCloudDialogflowCxV3beta1TestConfig struct {
6128	// Flow: Flow name. If not set, default start flow is assumed. Format:
6129	// `projects//locations//agents//flows/`.
6130	Flow string `json:"flow,omitempty"`
6131
6132	// TrackingParameters: Session parameters to be compared when
6133	// calculating differences.
6134	TrackingParameters []string `json:"trackingParameters,omitempty"`
6135
6136	// ForceSendFields is a list of field names (e.g. "Flow") to
6137	// unconditionally include in API requests. By default, fields with
6138	// empty values are omitted from API requests. However, any non-pointer,
6139	// non-interface field appearing in ForceSendFields will be sent to the
6140	// server regardless of whether the field is empty or not. This may be
6141	// used to include empty fields in Patch requests.
6142	ForceSendFields []string `json:"-"`
6143
6144	// NullFields is a list of field names (e.g. "Flow") to include in API
6145	// requests with the JSON null value. By default, fields with empty
6146	// values are omitted from API requests. However, any field with an
6147	// empty value appearing in NullFields will be sent to the server as
6148	// null. It is an error if a field in this list has a non-empty value.
6149	// This may be used to include null fields in Patch requests.
6150	NullFields []string `json:"-"`
6151}
6152
6153func (s *GoogleCloudDialogflowCxV3beta1TestConfig) MarshalJSON() ([]byte, error) {
6154	type NoMethod GoogleCloudDialogflowCxV3beta1TestConfig
6155	raw := NoMethod(*s)
6156	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6157}
6158
6159// GoogleCloudDialogflowCxV3beta1TestError: Error info for running a
6160// test.
6161type GoogleCloudDialogflowCxV3beta1TestError struct {
6162	// Status: The status associated with the test.
6163	Status *GoogleRpcStatus `json:"status,omitempty"`
6164
6165	// TestCase: The test case resource name.
6166	TestCase string `json:"testCase,omitempty"`
6167
6168	// TestTime: The timestamp when the test was completed.
6169	TestTime string `json:"testTime,omitempty"`
6170
6171	// ForceSendFields is a list of field names (e.g. "Status") to
6172	// unconditionally include in API requests. By default, fields with
6173	// empty values are omitted from API requests. However, any non-pointer,
6174	// non-interface field appearing in ForceSendFields will be sent to the
6175	// server regardless of whether the field is empty or not. This may be
6176	// used to include empty fields in Patch requests.
6177	ForceSendFields []string `json:"-"`
6178
6179	// NullFields is a list of field names (e.g. "Status") to include in API
6180	// requests with the JSON null value. By default, fields with empty
6181	// values are omitted from API requests. However, any field with an
6182	// empty value appearing in NullFields will be sent to the server as
6183	// null. It is an error if a field in this list has a non-empty value.
6184	// This may be used to include null fields in Patch requests.
6185	NullFields []string `json:"-"`
6186}
6187
6188func (s *GoogleCloudDialogflowCxV3beta1TestError) MarshalJSON() ([]byte, error) {
6189	type NoMethod GoogleCloudDialogflowCxV3beta1TestError
6190	raw := NoMethod(*s)
6191	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6192}
6193
6194// GoogleCloudDialogflowCxV3beta1TestRunDifference: The description of
6195// differences between original and replayed agent output.
6196type GoogleCloudDialogflowCxV3beta1TestRunDifference struct {
6197	// Description: A description of the diff, showing the actual output vs
6198	// expected output.
6199	Description string `json:"description,omitempty"`
6200
6201	// Type: The type of diff.
6202	//
6203	// Possible values:
6204	//   "DIFF_TYPE_UNSPECIFIED" - Should never be used.
6205	//   "INTENT" - The intent.
6206	//   "PAGE" - The page.
6207	//   "PARAMETERS" - The parameters.
6208	//   "UTTERANCE" - The message utterance.
6209	Type string `json:"type,omitempty"`
6210
6211	// ForceSendFields is a list of field names (e.g. "Description") to
6212	// unconditionally include in API requests. By default, fields with
6213	// empty values are omitted from API requests. However, any non-pointer,
6214	// non-interface field appearing in ForceSendFields will be sent to the
6215	// server regardless of whether the field is empty or not. This may be
6216	// used to include empty fields in Patch requests.
6217	ForceSendFields []string `json:"-"`
6218
6219	// NullFields is a list of field names (e.g. "Description") to include
6220	// in API requests with the JSON null value. By default, fields with
6221	// empty values are omitted from API requests. However, any field with
6222	// an empty value appearing in NullFields will be sent to the server as
6223	// null. It is an error if a field in this list has a non-empty value.
6224	// This may be used to include null fields in Patch requests.
6225	NullFields []string `json:"-"`
6226}
6227
6228func (s *GoogleCloudDialogflowCxV3beta1TestRunDifference) MarshalJSON() ([]byte, error) {
6229	type NoMethod GoogleCloudDialogflowCxV3beta1TestRunDifference
6230	raw := NoMethod(*s)
6231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6232}
6233
6234// GoogleCloudDialogflowCxV3beta1TextInput: Represents the natural
6235// language text to be processed.
6236type GoogleCloudDialogflowCxV3beta1TextInput struct {
6237	// Text: Required. The UTF-8 encoded natural language text to be
6238	// processed. Text length must not exceed 256 characters.
6239	Text string `json:"text,omitempty"`
6240
6241	// ForceSendFields is a list of field names (e.g. "Text") to
6242	// unconditionally include in API requests. By default, fields with
6243	// empty values are omitted from API requests. However, any non-pointer,
6244	// non-interface field appearing in ForceSendFields will be sent to the
6245	// server regardless of whether the field is empty or not. This may be
6246	// used to include empty fields in Patch requests.
6247	ForceSendFields []string `json:"-"`
6248
6249	// NullFields is a list of field names (e.g. "Text") to include in API
6250	// requests with the JSON null value. By default, fields with empty
6251	// values are omitted from API requests. However, any field with an
6252	// empty value appearing in NullFields will be sent to the server as
6253	// null. It is an error if a field in this list has a non-empty value.
6254	// This may be used to include null fields in Patch requests.
6255	NullFields []string `json:"-"`
6256}
6257
6258func (s *GoogleCloudDialogflowCxV3beta1TextInput) MarshalJSON() ([]byte, error) {
6259	type NoMethod GoogleCloudDialogflowCxV3beta1TextInput
6260	raw := NoMethod(*s)
6261	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6262}
6263
6264// GoogleCloudDialogflowCxV3beta1TransitionRoute: A transition route
6265// specifies a intent that can be matched and/or a data condition that
6266// can be evaluated during a session. When a specified transition is
6267// matched, the following actions are taken in order: * If there is a
6268// `trigger_fulfillment` associated with the transition, it will be
6269// called. * If there is a `target_page` associated with the transition,
6270// the session will transition into the specified page. * If there is a
6271// `target_flow` associated with the transition, the session will
6272// transition into the specified flow.
6273type GoogleCloudDialogflowCxV3beta1TransitionRoute struct {
6274	// Condition: The condition to evaluate against form parameters or
6275	// session parameters. See the conditions reference
6276	// (https://cloud.google.com/dialogflow/cx/docs/reference/condition). At
6277	// least one of `intent` or `condition` must be specified. When both
6278	// `intent` and `condition` are specified, the transition can only
6279	// happen when both are fulfilled.
6280	Condition string `json:"condition,omitempty"`
6281
6282	// Intent: The unique identifier of an Intent. Format:
6283	// `projects//locations//agents//intents/`. Indicates that the
6284	// transition can only happen when the given intent is matched. At least
6285	// one of `intent` or `condition` must be specified. When both `intent`
6286	// and `condition` are specified, the transition can only happen when
6287	// both are fulfilled.
6288	Intent string `json:"intent,omitempty"`
6289
6290	// Name: Output only. The unique identifier of this transition route.
6291	Name string `json:"name,omitempty"`
6292
6293	// TargetFlow: The target flow to transition to. Format:
6294	// `projects//locations//agents//flows/`.
6295	TargetFlow string `json:"targetFlow,omitempty"`
6296
6297	// TargetPage: The target page to transition to. Format:
6298	// `projects//locations//agents//flows//pages/`.
6299	TargetPage string `json:"targetPage,omitempty"`
6300
6301	// TriggerFulfillment: The fulfillment to call when the condition is
6302	// satisfied. At least one of `trigger_fulfillment` and `target` must be
6303	// specified. When both are defined, `trigger_fulfillment` is executed
6304	// first.
6305	TriggerFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"triggerFulfillment,omitempty"`
6306
6307	// ForceSendFields is a list of field names (e.g. "Condition") to
6308	// unconditionally include in API requests. By default, fields with
6309	// empty values are omitted from API requests. However, any non-pointer,
6310	// non-interface field appearing in ForceSendFields will be sent to the
6311	// server regardless of whether the field is empty or not. This may be
6312	// used to include empty fields in Patch requests.
6313	ForceSendFields []string `json:"-"`
6314
6315	// NullFields is a list of field names (e.g. "Condition") to include in
6316	// API requests with the JSON null value. By default, fields with empty
6317	// values are omitted from API requests. However, any field with an
6318	// empty value appearing in NullFields will be sent to the server as
6319	// null. It is an error if a field in this list has a non-empty value.
6320	// This may be used to include null fields in Patch requests.
6321	NullFields []string `json:"-"`
6322}
6323
6324func (s *GoogleCloudDialogflowCxV3beta1TransitionRoute) MarshalJSON() ([]byte, error) {
6325	type NoMethod GoogleCloudDialogflowCxV3beta1TransitionRoute
6326	raw := NoMethod(*s)
6327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6328}
6329
6330// GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata:
6331// Metadata for UpdateDocument operation.
6332type GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata struct {
6333	// GenericMetadata: The generic information of the operation.
6334	GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
6335
6336	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
6337	// unconditionally include in API requests. By default, fields with
6338	// empty values are omitted from API requests. However, any non-pointer,
6339	// non-interface field appearing in ForceSendFields will be sent to the
6340	// server regardless of whether the field is empty or not. This may be
6341	// used to include empty fields in Patch requests.
6342	ForceSendFields []string `json:"-"`
6343
6344	// NullFields is a list of field names (e.g. "GenericMetadata") to
6345	// include in API requests with the JSON null value. By default, fields
6346	// with empty values are omitted from API requests. However, any field
6347	// with an empty value appearing in NullFields will be sent to the
6348	// server as null. It is an error if a field in this list has a
6349	// non-empty value. This may be used to include null fields in Patch
6350	// requests.
6351	NullFields []string `json:"-"`
6352}
6353
6354func (s *GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
6355	type NoMethod GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata
6356	raw := NoMethod(*s)
6357	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6358}
6359
6360// GoogleCloudDialogflowCxV3beta1WebhookRequest: The request message for
6361// a webhook call. The request is sent as a JSON object and the field
6362// names will be presented in camel cases.
6363type GoogleCloudDialogflowCxV3beta1WebhookRequest struct {
6364	// DetectIntentResponseId: Always present. The unique identifier of the
6365	// DetectIntentResponse that will be returned to the API caller.
6366	DetectIntentResponseId string `json:"detectIntentResponseId,omitempty"`
6367
6368	// FulfillmentInfo: Always present. Information about the fulfillment
6369	// that triggered this webhook call.
6370	FulfillmentInfo *GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo `json:"fulfillmentInfo,omitempty"`
6371
6372	// IntentInfo: Information about the last matched intent.
6373	IntentInfo *GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo `json:"intentInfo,omitempty"`
6374
6375	// LanguageCode: The language code specified in the original request.
6376	LanguageCode string `json:"languageCode,omitempty"`
6377
6378	// Messages: The list of rich message responses to present to the user.
6379	// Webhook can choose to append or replace this list in
6380	// WebhookResponse.fulfillment_response;
6381	Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"`
6382
6383	// PageInfo: Information about page status.
6384	PageInfo *GoogleCloudDialogflowCxV3beta1PageInfo `json:"pageInfo,omitempty"`
6385
6386	// Payload: Custom data set in QueryParameters.payload.
6387	Payload googleapi.RawMessage `json:"payload,omitempty"`
6388
6389	// SentimentAnalysisResult: The sentiment analysis result of the current
6390	// user request. The field is filled when sentiment analysis is
6391	// configured to be enabled for the request.
6392	SentimentAnalysisResult *GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"`
6393
6394	// SessionInfo: Information about session status.
6395	SessionInfo *GoogleCloudDialogflowCxV3beta1SessionInfo `json:"sessionInfo,omitempty"`
6396
6397	// Text: If natural language text was provided as input, this field will
6398	// contain a copy of the text.
6399	Text string `json:"text,omitempty"`
6400
6401	// Transcript: If natural language speech audio was provided as input,
6402	// this field will contain the transcript for the audio.
6403	Transcript string `json:"transcript,omitempty"`
6404
6405	// TriggerEvent: If an event was provided as input, this field will
6406	// contain the name of the event.
6407	TriggerEvent string `json:"triggerEvent,omitempty"`
6408
6409	// TriggerIntent: If an intent was provided as input, this field will
6410	// contain a copy of the intent identifier. Format:
6411	// `projects//locations//agents//intents/`.
6412	TriggerIntent string `json:"triggerIntent,omitempty"`
6413
6414	// ForceSendFields is a list of field names (e.g.
6415	// "DetectIntentResponseId") to unconditionally include in API requests.
6416	// By default, fields with empty values are omitted from API requests.
6417	// However, any non-pointer, non-interface field appearing in
6418	// ForceSendFields will be sent to the server regardless of whether the
6419	// field is empty or not. This may be used to include empty fields in
6420	// Patch requests.
6421	ForceSendFields []string `json:"-"`
6422
6423	// NullFields is a list of field names (e.g. "DetectIntentResponseId")
6424	// to include in API requests with the JSON null value. By default,
6425	// fields with empty values are omitted from API requests. However, any
6426	// field with an empty value appearing in NullFields will be sent to the
6427	// server as null. It is an error if a field in this list has a
6428	// non-empty value. This may be used to include null fields in Patch
6429	// requests.
6430	NullFields []string `json:"-"`
6431}
6432
6433func (s *GoogleCloudDialogflowCxV3beta1WebhookRequest) MarshalJSON() ([]byte, error) {
6434	type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequest
6435	raw := NoMethod(*s)
6436	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6437}
6438
6439// GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo:
6440// Represents fulfillment information communicated to the webhook.
6441type GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo struct {
6442	// Tag: Always present. The tag used to identify which fulfillment is
6443	// being called.
6444	Tag string `json:"tag,omitempty"`
6445
6446	// ForceSendFields is a list of field names (e.g. "Tag") to
6447	// unconditionally include in API requests. By default, fields with
6448	// empty values are omitted from API requests. However, any non-pointer,
6449	// non-interface field appearing in ForceSendFields will be sent to the
6450	// server regardless of whether the field is empty or not. This may be
6451	// used to include empty fields in Patch requests.
6452	ForceSendFields []string `json:"-"`
6453
6454	// NullFields is a list of field names (e.g. "Tag") to include in API
6455	// requests with the JSON null value. By default, fields with empty
6456	// values are omitted from API requests. However, any field with an
6457	// empty value appearing in NullFields will be sent to the server as
6458	// null. It is an error if a field in this list has a non-empty value.
6459	// This may be used to include null fields in Patch requests.
6460	NullFields []string `json:"-"`
6461}
6462
6463func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo) MarshalJSON() ([]byte, error) {
6464	type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo
6465	raw := NoMethod(*s)
6466	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6467}
6468
6469// GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo: Represents
6470// intent information communicated to the webhook.
6471type GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo struct {
6472	// Confidence: The confidence of the matched intent. Values range from
6473	// 0.0 (completely uncertain) to 1.0 (completely certain).
6474	Confidence float64 `json:"confidence,omitempty"`
6475
6476	// DisplayName: Always present. The display name of the last matched
6477	// intent.
6478	DisplayName string `json:"displayName,omitempty"`
6479
6480	// LastMatchedIntent: Always present. The unique identifier of the last
6481	// matched intent. Format: `projects//locations//agents//intents/`.
6482	LastMatchedIntent string `json:"lastMatchedIntent,omitempty"`
6483
6484	// Parameters: Parameters identified as a result of intent matching.
6485	// This is a map of the name of the identified parameter to the value of
6486	// the parameter identified from the user's utterance. All parameters
6487	// defined in the matched intent that are identified will be surfaced
6488	// here.
6489	Parameters map[string]GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue `json:"parameters,omitempty"`
6490
6491	// ForceSendFields is a list of field names (e.g. "Confidence") to
6492	// unconditionally include in API requests. By default, fields with
6493	// empty values are omitted from API requests. However, any non-pointer,
6494	// non-interface field appearing in ForceSendFields will be sent to the
6495	// server regardless of whether the field is empty or not. This may be
6496	// used to include empty fields in Patch requests.
6497	ForceSendFields []string `json:"-"`
6498
6499	// NullFields is a list of field names (e.g. "Confidence") to include in
6500	// API requests with the JSON null value. By default, fields with empty
6501	// values are omitted from API requests. However, any field with an
6502	// empty value appearing in NullFields will be sent to the server as
6503	// null. It is an error if a field in this list has a non-empty value.
6504	// This may be used to include null fields in Patch requests.
6505	NullFields []string `json:"-"`
6506}
6507
6508func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo) MarshalJSON() ([]byte, error) {
6509	type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo
6510	raw := NoMethod(*s)
6511	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6512}
6513
6514func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo) UnmarshalJSON(data []byte) error {
6515	type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo
6516	var s1 struct {
6517		Confidence gensupport.JSONFloat64 `json:"confidence"`
6518		*NoMethod
6519	}
6520	s1.NoMethod = (*NoMethod)(s)
6521	if err := json.Unmarshal(data, &s1); err != nil {
6522		return err
6523	}
6524	s.Confidence = float64(s1.Confidence)
6525	return nil
6526}
6527
6528// GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterV
6529// alue: Represents a value for an intent parameter.
6530type GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue struct {
6531	// OriginalValue: Always present. Original text value extracted from
6532	// user utterance.
6533	OriginalValue string `json:"originalValue,omitempty"`
6534
6535	// ResolvedValue: Always present. Structured value for the parameter
6536	// extracted from user utterance.
6537	ResolvedValue interface{} `json:"resolvedValue,omitempty"`
6538
6539	// ForceSendFields is a list of field names (e.g. "OriginalValue") to
6540	// unconditionally include in API requests. By default, fields with
6541	// empty values are omitted from API requests. However, any non-pointer,
6542	// non-interface field appearing in ForceSendFields will be sent to the
6543	// server regardless of whether the field is empty or not. This may be
6544	// used to include empty fields in Patch requests.
6545	ForceSendFields []string `json:"-"`
6546
6547	// NullFields is a list of field names (e.g. "OriginalValue") to include
6548	// in API requests with the JSON null value. By default, fields with
6549	// empty values are omitted from API requests. However, any field with
6550	// an empty value appearing in NullFields will be sent to the server as
6551	// null. It is an error if a field in this list has a non-empty value.
6552	// This may be used to include null fields in Patch requests.
6553	NullFields []string `json:"-"`
6554}
6555
6556func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue) MarshalJSON() ([]byte, error) {
6557	type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue
6558	raw := NoMethod(*s)
6559	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6560}
6561
6562// GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult:
6563// Represents the result of sentiment analysis.
6564type GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult struct {
6565	// Magnitude: A non-negative number in the [0, +inf) range, which
6566	// represents the absolute magnitude of sentiment, regardless of score
6567	// (positive or negative).
6568	Magnitude float64 `json:"magnitude,omitempty"`
6569
6570	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0
6571	// (positive sentiment).
6572	Score float64 `json:"score,omitempty"`
6573
6574	// ForceSendFields is a list of field names (e.g. "Magnitude") to
6575	// unconditionally include in API requests. By default, fields with
6576	// empty values are omitted from API requests. However, any non-pointer,
6577	// non-interface field appearing in ForceSendFields will be sent to the
6578	// server regardless of whether the field is empty or not. This may be
6579	// used to include empty fields in Patch requests.
6580	ForceSendFields []string `json:"-"`
6581
6582	// NullFields is a list of field names (e.g. "Magnitude") to include in
6583	// API requests with the JSON null value. By default, fields with empty
6584	// values are omitted from API requests. However, any field with an
6585	// empty value appearing in NullFields will be sent to the server as
6586	// null. It is an error if a field in this list has a non-empty value.
6587	// This may be used to include null fields in Patch requests.
6588	NullFields []string `json:"-"`
6589}
6590
6591func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult) MarshalJSON() ([]byte, error) {
6592	type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult
6593	raw := NoMethod(*s)
6594	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6595}
6596
6597func (s *GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult) UnmarshalJSON(data []byte) error {
6598	type NoMethod GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult
6599	var s1 struct {
6600		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
6601		Score     gensupport.JSONFloat64 `json:"score"`
6602		*NoMethod
6603	}
6604	s1.NoMethod = (*NoMethod)(s)
6605	if err := json.Unmarshal(data, &s1); err != nil {
6606		return err
6607	}
6608	s.Magnitude = float64(s1.Magnitude)
6609	s.Score = float64(s1.Score)
6610	return nil
6611}
6612
6613// GoogleCloudDialogflowCxV3beta1WebhookResponse: The response message
6614// for a webhook call.
6615type GoogleCloudDialogflowCxV3beta1WebhookResponse struct {
6616	// FulfillmentResponse: The fulfillment response to send to the user.
6617	// This field can be omitted by the webhook if it does not intend to
6618	// send any response to the user.
6619	FulfillmentResponse *GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse `json:"fulfillmentResponse,omitempty"`
6620
6621	// PageInfo: Information about page status. This field can be omitted by
6622	// the webhook if it does not intend to modify page status.
6623	PageInfo *GoogleCloudDialogflowCxV3beta1PageInfo `json:"pageInfo,omitempty"`
6624
6625	// Payload: Value to append directly to QueryResult.webhook_payloads.
6626	Payload googleapi.RawMessage `json:"payload,omitempty"`
6627
6628	// SessionInfo: Information about session status. This field can be
6629	// omitted by the webhook if it does not intend to modify session
6630	// status.
6631	SessionInfo *GoogleCloudDialogflowCxV3beta1SessionInfo `json:"sessionInfo,omitempty"`
6632
6633	// TargetFlow: The target flow to transition to. Format:
6634	// `projects//locations//agents//flows/`.
6635	TargetFlow string `json:"targetFlow,omitempty"`
6636
6637	// TargetPage: The target page to transition to. Format:
6638	// `projects//locations//agents//flows//pages/`.
6639	TargetPage string `json:"targetPage,omitempty"`
6640
6641	// ForceSendFields is a list of field names (e.g. "FulfillmentResponse")
6642	// to unconditionally include in API requests. By default, fields with
6643	// empty values are omitted from API requests. However, any non-pointer,
6644	// non-interface field appearing in ForceSendFields will be sent to the
6645	// server regardless of whether the field is empty or not. This may be
6646	// used to include empty fields in Patch requests.
6647	ForceSendFields []string `json:"-"`
6648
6649	// NullFields is a list of field names (e.g. "FulfillmentResponse") to
6650	// include in API requests with the JSON null value. By default, fields
6651	// with empty values are omitted from API requests. However, any field
6652	// with an empty value appearing in NullFields will be sent to the
6653	// server as null. It is an error if a field in this list has a
6654	// non-empty value. This may be used to include null fields in Patch
6655	// requests.
6656	NullFields []string `json:"-"`
6657}
6658
6659func (s *GoogleCloudDialogflowCxV3beta1WebhookResponse) MarshalJSON() ([]byte, error) {
6660	type NoMethod GoogleCloudDialogflowCxV3beta1WebhookResponse
6661	raw := NoMethod(*s)
6662	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6663}
6664
6665// GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse:
6666// Represents a fulfillment response to the user.
6667type GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse struct {
6668	// MergeBehavior: Merge behavior for `messages`.
6669	//
6670	// Possible values:
6671	//   "MERGE_BEHAVIOR_UNSPECIFIED" - Not specified. `APPEND` will be
6672	// used.
6673	//   "APPEND" - `messages` will be appended to the list of messages
6674	// waiting to be sent to the user.
6675	//   "REPLACE" - `messages` will replace the list of messages waiting to
6676	// be sent to the user.
6677	MergeBehavior string `json:"mergeBehavior,omitempty"`
6678
6679	// Messages: The list of rich message responses to present to the user.
6680	Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"`
6681
6682	// ForceSendFields is a list of field names (e.g. "MergeBehavior") to
6683	// unconditionally include in API requests. By default, fields with
6684	// empty values are omitted from API requests. However, any non-pointer,
6685	// non-interface field appearing in ForceSendFields will be sent to the
6686	// server regardless of whether the field is empty or not. This may be
6687	// used to include empty fields in Patch requests.
6688	ForceSendFields []string `json:"-"`
6689
6690	// NullFields is a list of field names (e.g. "MergeBehavior") to include
6691	// in API requests with the JSON null value. By default, fields with
6692	// empty values are omitted from API requests. However, any field with
6693	// an empty value appearing in NullFields will be sent to the server as
6694	// null. It is an error if a field in this list has a non-empty value.
6695	// This may be used to include null fields in Patch requests.
6696	NullFields []string `json:"-"`
6697}
6698
6699func (s *GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse) MarshalJSON() ([]byte, error) {
6700	type NoMethod GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse
6701	raw := NoMethod(*s)
6702	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6703}
6704
6705// GoogleCloudDialogflowV2Agent: A Dialogflow agent is a virtual agent
6706// that handles conversations with your end-users. It is a natural
6707// language understanding module that understands the nuances of human
6708// language. Dialogflow translates end-user text or audio during a
6709// conversation to structured data that your apps and services can
6710// understand. You design and build a Dialogflow agent to handle the
6711// types of conversations required for your system. For more information
6712// about agents, see the Agent guide
6713// (https://cloud.google.com/dialogflow/docs/agents-overview).
6714type GoogleCloudDialogflowV2Agent struct {
6715	// ApiVersion: Optional. API version displayed in Dialogflow console. If
6716	// not specified, V2 API is assumed. Clients are free to query different
6717	// service endpoints for different API versions. However, bots
6718	// connectors and webhook calls will follow the specified API version.
6719	//
6720	// Possible values:
6721	//   "API_VERSION_UNSPECIFIED" - Not specified.
6722	//   "API_VERSION_V1" - Legacy V1 API.
6723	//   "API_VERSION_V2" - V2 API.
6724	//   "API_VERSION_V2_BETA_1" - V2beta1 API.
6725	ApiVersion string `json:"apiVersion,omitempty"`
6726
6727	// AvatarUri: Optional. The URI of the agent's avatar. Avatars are used
6728	// throughout the Dialogflow console and in the self-hosted Web Demo
6729	// (https://cloud.google.com/dialogflow/docs/integrations/web-demo)
6730	// integration.
6731	AvatarUri string `json:"avatarUri,omitempty"`
6732
6733	// ClassificationThreshold: Optional. To filter out false positive
6734	// results and still get variety in matched natural language inputs for
6735	// your agent, you can tune the machine learning classification
6736	// threshold. If the returned score value is less than the threshold
6737	// value, then a fallback intent will be triggered or, if there are no
6738	// fallback intents defined, no intent will be triggered. The score
6739	// values range from 0.0 (completely uncertain) to 1.0 (completely
6740	// certain). If set to 0.0, the default of 0.3 is used.
6741	ClassificationThreshold float64 `json:"classificationThreshold,omitempty"`
6742
6743	// DefaultLanguageCode: Required. The default language of the agent as a
6744	// language tag. See Language Support
6745	// (https://cloud.google.com/dialogflow/docs/reference/language) for a
6746	// list of the currently supported language codes. This field cannot be
6747	// set by the `Update` method.
6748	DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"`
6749
6750	// Description: Optional. The description of this agent. The maximum
6751	// length is 500 characters. If exceeded, the request is rejected.
6752	Description string `json:"description,omitempty"`
6753
6754	// DisplayName: Required. The name of this agent.
6755	DisplayName string `json:"displayName,omitempty"`
6756
6757	// EnableLogging: Optional. Determines whether this agent should log
6758	// conversation queries.
6759	EnableLogging bool `json:"enableLogging,omitempty"`
6760
6761	// MatchMode: Optional. Determines how intents are detected from user
6762	// queries.
6763	//
6764	// Possible values:
6765	//   "MATCH_MODE_UNSPECIFIED" - Not specified.
6766	//   "MATCH_MODE_HYBRID" - Best for agents with a small number of
6767	// examples in intents and/or wide use of templates syntax and composite
6768	// entities.
6769	//   "MATCH_MODE_ML_ONLY" - Can be used for agents with a large number
6770	// of examples in intents, especially the ones using @sys.any or very
6771	// large custom entities.
6772	MatchMode string `json:"matchMode,omitempty"`
6773
6774	// Parent: Required. The project of this agent. Format: `projects/`.
6775	Parent string `json:"parent,omitempty"`
6776
6777	// SupportedLanguageCodes: Optional. The list of all languages supported
6778	// by this agent (except for the `default_language_code`).
6779	SupportedLanguageCodes []string `json:"supportedLanguageCodes,omitempty"`
6780
6781	// Tier: Optional. The agent tier. If not specified, TIER_STANDARD is
6782	// assumed.
6783	//
6784	// Possible values:
6785	//   "TIER_UNSPECIFIED" - Not specified. This value should never be
6786	// used.
6787	//   "TIER_STANDARD" - Standard tier.
6788	//   "TIER_ENTERPRISE" - Enterprise tier (Essentials).
6789	//   "TIER_ENTERPRISE_PLUS" - Enterprise tier (Plus).
6790	Tier string `json:"tier,omitempty"`
6791
6792	// TimeZone: Required. The time zone of this agent from the time zone
6793	// database (https://www.iana.org/time-zones), e.g., America/New_York,
6794	// Europe/Paris.
6795	TimeZone string `json:"timeZone,omitempty"`
6796
6797	// ServerResponse contains the HTTP response code and headers from the
6798	// server.
6799	googleapi.ServerResponse `json:"-"`
6800
6801	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
6802	// unconditionally include in API requests. By default, fields with
6803	// empty values are omitted from API requests. However, any non-pointer,
6804	// non-interface field appearing in ForceSendFields will be sent to the
6805	// server regardless of whether the field is empty or not. This may be
6806	// used to include empty fields in Patch requests.
6807	ForceSendFields []string `json:"-"`
6808
6809	// NullFields is a list of field names (e.g. "ApiVersion") to include in
6810	// API requests with the JSON null value. By default, fields with empty
6811	// values are omitted from API requests. However, any field with an
6812	// empty value appearing in NullFields will be sent to the server as
6813	// null. It is an error if a field in this list has a non-empty value.
6814	// This may be used to include null fields in Patch requests.
6815	NullFields []string `json:"-"`
6816}
6817
6818func (s *GoogleCloudDialogflowV2Agent) MarshalJSON() ([]byte, error) {
6819	type NoMethod GoogleCloudDialogflowV2Agent
6820	raw := NoMethod(*s)
6821	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6822}
6823
6824func (s *GoogleCloudDialogflowV2Agent) UnmarshalJSON(data []byte) error {
6825	type NoMethod GoogleCloudDialogflowV2Agent
6826	var s1 struct {
6827		ClassificationThreshold gensupport.JSONFloat64 `json:"classificationThreshold"`
6828		*NoMethod
6829	}
6830	s1.NoMethod = (*NoMethod)(s)
6831	if err := json.Unmarshal(data, &s1); err != nil {
6832		return err
6833	}
6834	s.ClassificationThreshold = float64(s1.ClassificationThreshold)
6835	return nil
6836}
6837
6838// GoogleCloudDialogflowV2AgentAssistantFeedback: Detail feedback of
6839// Agent Assist result.
6840type GoogleCloudDialogflowV2AgentAssistantFeedback struct {
6841	// AnswerRelevance: Optional. Whether or not the suggested answer is
6842	// relevant. For example: * Query: "Can I change my mailing address?" *
6843	// Suggested document says: "Items must be returned/exchanged within 60
6844	// days of the purchase date." * answer_relevance:
6845	// AnswerRelevance.IRRELEVANT
6846	//
6847	// Possible values:
6848	//   "ANSWER_RELEVANCE_UNSPECIFIED" - Answer relevance unspecified.
6849	//   "IRRELEVANT" - Answer is irrelevant to query.
6850	//   "RELEVANT" - Answer is relevant to query.
6851	AnswerRelevance string `json:"answerRelevance,omitempty"`
6852
6853	// DocumentCorrectness: Optional. Whether or not the information in the
6854	// document is correct. For example: * Query: "Can I return the package
6855	// in 2 days once received?" * Suggested document says: "Items must be
6856	// returned/exchanged within 60 days of the purchase date." * Ground
6857	// truth: "No return or exchange is allowed." * [document_correctness]:
6858	// INCORRECT
6859	//
6860	// Possible values:
6861	//   "DOCUMENT_CORRECTNESS_UNSPECIFIED" - Document correctness
6862	// unspecified.
6863	//   "INCORRECT" - Information in document is incorrect.
6864	//   "CORRECT" - Information in document is correct.
6865	DocumentCorrectness string `json:"documentCorrectness,omitempty"`
6866
6867	// DocumentEfficiency: Optional. Whether or not the suggested document
6868	// is efficient. For example, if the document is poorly written, hard to
6869	// understand, hard to use or too long to find useful information,
6870	// document_efficiency is DocumentEfficiency.INEFFICIENT.
6871	//
6872	// Possible values:
6873	//   "DOCUMENT_EFFICIENCY_UNSPECIFIED" - Document efficiency
6874	// unspecified.
6875	//   "INEFFICIENT" - Document is inefficient.
6876	//   "EFFICIENT" - Document is efficient.
6877	DocumentEfficiency string `json:"documentEfficiency,omitempty"`
6878
6879	// ForceSendFields is a list of field names (e.g. "AnswerRelevance") to
6880	// unconditionally include in API requests. By default, fields with
6881	// empty values are omitted from API requests. However, any non-pointer,
6882	// non-interface field appearing in ForceSendFields will be sent to the
6883	// server regardless of whether the field is empty or not. This may be
6884	// used to include empty fields in Patch requests.
6885	ForceSendFields []string `json:"-"`
6886
6887	// NullFields is a list of field names (e.g. "AnswerRelevance") to
6888	// include in API requests with the JSON null value. By default, fields
6889	// with empty values are omitted from API requests. However, any field
6890	// with an empty value appearing in NullFields will be sent to the
6891	// server as null. It is an error if a field in this list has a
6892	// non-empty value. This may be used to include null fields in Patch
6893	// requests.
6894	NullFields []string `json:"-"`
6895}
6896
6897func (s *GoogleCloudDialogflowV2AgentAssistantFeedback) MarshalJSON() ([]byte, error) {
6898	type NoMethod GoogleCloudDialogflowV2AgentAssistantFeedback
6899	raw := NoMethod(*s)
6900	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6901}
6902
6903// GoogleCloudDialogflowV2AgentAssistantRecord: Represents a record of a
6904// human agent assist answer.
6905type GoogleCloudDialogflowV2AgentAssistantRecord struct {
6906	// ArticleSuggestionAnswer: Output only. The article suggestion answer.
6907	ArticleSuggestionAnswer *GoogleCloudDialogflowV2ArticleAnswer `json:"articleSuggestionAnswer,omitempty"`
6908
6909	// FaqAnswer: Output only. The FAQ answer.
6910	FaqAnswer *GoogleCloudDialogflowV2FaqAnswer `json:"faqAnswer,omitempty"`
6911
6912	// ForceSendFields is a list of field names (e.g.
6913	// "ArticleSuggestionAnswer") to unconditionally include in API
6914	// requests. By default, fields with empty values are omitted from API
6915	// requests. However, any non-pointer, non-interface field appearing in
6916	// ForceSendFields will be sent to the server regardless of whether the
6917	// field is empty or not. This may be used to include empty fields in
6918	// Patch requests.
6919	ForceSendFields []string `json:"-"`
6920
6921	// NullFields is a list of field names (e.g. "ArticleSuggestionAnswer")
6922	// to include in API requests with the JSON null value. By default,
6923	// fields with empty values are omitted from API requests. However, any
6924	// field with an empty value appearing in NullFields will be sent to the
6925	// server as null. It is an error if a field in this list has a
6926	// non-empty value. This may be used to include null fields in Patch
6927	// requests.
6928	NullFields []string `json:"-"`
6929}
6930
6931func (s *GoogleCloudDialogflowV2AgentAssistantRecord) MarshalJSON() ([]byte, error) {
6932	type NoMethod GoogleCloudDialogflowV2AgentAssistantRecord
6933	raw := NoMethod(*s)
6934	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6935}
6936
6937// GoogleCloudDialogflowV2AnalyzeContentRequest: The request message for
6938// Participants.AnalyzeContent.
6939type GoogleCloudDialogflowV2AnalyzeContentRequest struct {
6940	// EventInput: An input event to send to Dialogflow.
6941	EventInput *GoogleCloudDialogflowV2EventInput `json:"eventInput,omitempty"`
6942
6943	// QueryParams: Parameters for a Dialogflow virtual-agent query.
6944	QueryParams *GoogleCloudDialogflowV2QueryParameters `json:"queryParams,omitempty"`
6945
6946	// ReplyAudioConfig: Speech synthesis configuration. The speech
6947	// synthesis settings for a virtual agent that may be configured for the
6948	// associated conversation profile are not used when calling
6949	// AnalyzeContent. If this configuration is not supplied, speech
6950	// synthesis is disabled.
6951	ReplyAudioConfig *GoogleCloudDialogflowV2OutputAudioConfig `json:"replyAudioConfig,omitempty"`
6952
6953	// RequestId: A unique identifier for this request. Restricted to 36
6954	// ASCII characters. A random UUID is recommended. This request is only
6955	// idempotent if a `request_id` is provided.
6956	RequestId string `json:"requestId,omitempty"`
6957
6958	// TextInput: The natural language text to be processed.
6959	TextInput *GoogleCloudDialogflowV2TextInput `json:"textInput,omitempty"`
6960
6961	// ForceSendFields is a list of field names (e.g. "EventInput") to
6962	// unconditionally include in API requests. By default, fields with
6963	// empty values are omitted from API requests. However, any non-pointer,
6964	// non-interface field appearing in ForceSendFields will be sent to the
6965	// server regardless of whether the field is empty or not. This may be
6966	// used to include empty fields in Patch requests.
6967	ForceSendFields []string `json:"-"`
6968
6969	// NullFields is a list of field names (e.g. "EventInput") to include in
6970	// API requests with the JSON null value. By default, fields with empty
6971	// values are omitted from API requests. However, any field with an
6972	// empty value appearing in NullFields will be sent to the server as
6973	// null. It is an error if a field in this list has a non-empty value.
6974	// This may be used to include null fields in Patch requests.
6975	NullFields []string `json:"-"`
6976}
6977
6978func (s *GoogleCloudDialogflowV2AnalyzeContentRequest) MarshalJSON() ([]byte, error) {
6979	type NoMethod GoogleCloudDialogflowV2AnalyzeContentRequest
6980	raw := NoMethod(*s)
6981	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6982}
6983
6984// GoogleCloudDialogflowV2AnalyzeContentResponse: The response message
6985// for Participants.AnalyzeContent.
6986type GoogleCloudDialogflowV2AnalyzeContentResponse struct {
6987	// AutomatedAgentReply: Only set if a Dialogflow automated agent has
6988	// responded. Note that:
6989	// AutomatedAgentReply.detect_intent_response.output_audio and
6990	// AutomatedAgentReply.detect_intent_response.output_audio_config are
6991	// always empty, use reply_audio instead.
6992	AutomatedAgentReply *GoogleCloudDialogflowV2AutomatedAgentReply `json:"automatedAgentReply,omitempty"`
6993
6994	// DtmfParameters: Indicates the parameters of DTMF.
6995	DtmfParameters *GoogleCloudDialogflowV2DtmfParameters `json:"dtmfParameters,omitempty"`
6996
6997	// EndUserSuggestionResults: The suggestions for end user. The order is
6998	// the same as
6999	// HumanAgentAssistantConfig.SuggestionConfig.feature_configs of
7000	// HumanAgentAssistantConfig.end_user_suggestion_config.
7001	EndUserSuggestionResults []*GoogleCloudDialogflowV2SuggestionResult `json:"endUserSuggestionResults,omitempty"`
7002
7003	// HumanAgentSuggestionResults: The suggestions for most recent human
7004	// agent. The order is the same as
7005	// HumanAgentAssistantConfig.SuggestionConfig.feature_configs of
7006	// HumanAgentAssistantConfig.human_agent_suggestion_config.
7007	HumanAgentSuggestionResults []*GoogleCloudDialogflowV2SuggestionResult `json:"humanAgentSuggestionResults,omitempty"`
7008
7009	// Message: Message analyzed by CCAI.
7010	Message *GoogleCloudDialogflowV2Message `json:"message,omitempty"`
7011
7012	// ReplyAudio: The audio data bytes encoded as specified in the request.
7013	// This field is set if: - `reply_audio_config` was specified in the
7014	// request, or - The automated agent responded with audio to play to the
7015	// user. In such case, `reply_audio.config` contains settings used to
7016	// synthesize the speech. In some scenarios, multiple output audio
7017	// fields may be present in the response structure. In these cases, only
7018	// the top-most-level audio output has content.
7019	ReplyAudio *GoogleCloudDialogflowV2OutputAudio `json:"replyAudio,omitempty"`
7020
7021	// ReplyText: The output text content. This field is set if the
7022	// automated agent responded with text to show to the user.
7023	ReplyText string `json:"replyText,omitempty"`
7024
7025	// ServerResponse contains the HTTP response code and headers from the
7026	// server.
7027	googleapi.ServerResponse `json:"-"`
7028
7029	// ForceSendFields is a list of field names (e.g. "AutomatedAgentReply")
7030	// to 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. "AutomatedAgentReply") 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 *GoogleCloudDialogflowV2AnalyzeContentResponse) MarshalJSON() ([]byte, error) {
7048	type NoMethod GoogleCloudDialogflowV2AnalyzeContentResponse
7049	raw := NoMethod(*s)
7050	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7051}
7052
7053// GoogleCloudDialogflowV2AnnotatedMessagePart: Represents a part of a
7054// message possibly annotated with an entity. The part can be an entity
7055// or purely a part of the message between two entities or message
7056// start/end.
7057type GoogleCloudDialogflowV2AnnotatedMessagePart struct {
7058	// EntityType: The Dialogflow system entity type
7059	// (https://cloud.google.com/dialogflow/docs/reference/system-entities)
7060	// of this message part. If this is empty, Dialogflow could not annotate
7061	// the phrase part with a system entity.
7062	EntityType string `json:"entityType,omitempty"`
7063
7064	// FormattedValue: The Dialogflow system entity formatted value
7065	// (https://cloud.google.com/dialogflow/docs/reference/system-entities)
7066	// of this message part. For example for a system entity of type
7067	// `@sys.unit-currency`, this may contain: { "amount": 5, "currency":
7068	// "USD" }
7069	FormattedValue interface{} `json:"formattedValue,omitempty"`
7070
7071	// Text: A part of a message possibly annotated with an entity.
7072	Text string `json:"text,omitempty"`
7073
7074	// ForceSendFields is a list of field names (e.g. "EntityType") to
7075	// unconditionally include in API requests. By default, fields with
7076	// empty values are omitted from API requests. However, any non-pointer,
7077	// non-interface field appearing in ForceSendFields will be sent to the
7078	// server regardless of whether the field is empty or not. This may be
7079	// used to include empty fields in Patch requests.
7080	ForceSendFields []string `json:"-"`
7081
7082	// NullFields is a list of field names (e.g. "EntityType") to include in
7083	// API requests with the JSON null value. By default, fields with empty
7084	// values are omitted from API requests. However, any field with an
7085	// empty value appearing in NullFields will be sent to the server as
7086	// null. It is an error if a field in this list has a non-empty value.
7087	// This may be used to include null fields in Patch requests.
7088	NullFields []string `json:"-"`
7089}
7090
7091func (s *GoogleCloudDialogflowV2AnnotatedMessagePart) MarshalJSON() ([]byte, error) {
7092	type NoMethod GoogleCloudDialogflowV2AnnotatedMessagePart
7093	raw := NoMethod(*s)
7094	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7095}
7096
7097// GoogleCloudDialogflowV2AnswerFeedback: Represents feedback the
7098// customer has about the quality & correctness of a certain answer in a
7099// conversation.
7100type GoogleCloudDialogflowV2AnswerFeedback struct {
7101	// AgentAssistantDetailFeedback: Detail feedback of agent assist
7102	// suggestions.
7103	AgentAssistantDetailFeedback *GoogleCloudDialogflowV2AgentAssistantFeedback `json:"agentAssistantDetailFeedback,omitempty"`
7104
7105	// ClickTime: Time when the answer/item was clicked.
7106	ClickTime string `json:"clickTime,omitempty"`
7107
7108	// Clicked: Indicates whether the answer/item was clicked by the human
7109	// agent or not. Default to false.
7110	Clicked bool `json:"clicked,omitempty"`
7111
7112	// CorrectnessLevel: The correctness level of the specific answer.
7113	//
7114	// Possible values:
7115	//   "CORRECTNESS_LEVEL_UNSPECIFIED" - Correctness level unspecified.
7116	//   "NOT_CORRECT" - Answer is totally wrong.
7117	//   "PARTIALLY_CORRECT" - Answer is partially correct.
7118	//   "FULLY_CORRECT" - Answer is fully correct.
7119	CorrectnessLevel string `json:"correctnessLevel,omitempty"`
7120
7121	// DisplayTime: Time when the answer/item was displayed.
7122	DisplayTime string `json:"displayTime,omitempty"`
7123
7124	// Displayed: Indicates whether the answer/item was displayed to the
7125	// human agent in the agent desktop UI. Default to false.
7126	Displayed bool `json:"displayed,omitempty"`
7127
7128	// ForceSendFields is a list of field names (e.g.
7129	// "AgentAssistantDetailFeedback") to unconditionally include in API
7130	// requests. By default, fields with empty values are omitted from API
7131	// requests. However, any non-pointer, non-interface field appearing in
7132	// ForceSendFields will be sent to the server regardless of whether the
7133	// field is empty or not. This may be used to include empty fields in
7134	// Patch requests.
7135	ForceSendFields []string `json:"-"`
7136
7137	// NullFields is a list of field names (e.g.
7138	// "AgentAssistantDetailFeedback") to include in API requests with the
7139	// JSON null value. By default, fields with empty values are omitted
7140	// from API requests. However, any field with an empty value appearing
7141	// in NullFields will be sent to the server as null. It is an error if a
7142	// field in this list has a non-empty value. This may be used to include
7143	// null fields in Patch requests.
7144	NullFields []string `json:"-"`
7145}
7146
7147func (s *GoogleCloudDialogflowV2AnswerFeedback) MarshalJSON() ([]byte, error) {
7148	type NoMethod GoogleCloudDialogflowV2AnswerFeedback
7149	raw := NoMethod(*s)
7150	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7151}
7152
7153// GoogleCloudDialogflowV2AnswerRecord: Answer records are records to
7154// manage answer history and feedbacks for Dialogflow. Currently, answer
7155// record includes: - human agent assistant article suggestion - human
7156// agent assistant faq article It doesn't include: - `DetectIntent`
7157// intent matching - `DetectIntent` knowledge Answer records are not
7158// related to the conversation history in the Dialogflow Console. A
7159// Record is generated even when the end-user disables conversation
7160// history in the console. Records are created when there's a human
7161// agent assistant suggestion generated. A typical workflow for
7162// customers provide feedback to an answer is: 1. For human agent
7163// assistant, customers get suggestion via ListSuggestions API. Together
7164// with the answers, AnswerRecord.name are returned to the customers. 2.
7165// The customer uses the AnswerRecord.name to call the
7166// UpdateAnswerRecord method to send feedback about a specific answer
7167// that they believe is wrong.
7168type GoogleCloudDialogflowV2AnswerRecord struct {
7169	// AgentAssistantRecord: Output only. The record for human agent
7170	// assistant.
7171	AgentAssistantRecord *GoogleCloudDialogflowV2AgentAssistantRecord `json:"agentAssistantRecord,omitempty"`
7172
7173	// AnswerFeedback: Required. The AnswerFeedback for this record. You can
7174	// set this with AnswerRecords.UpdateAnswerRecord in order to give us
7175	// feedback about this answer.
7176	AnswerFeedback *GoogleCloudDialogflowV2AnswerFeedback `json:"answerFeedback,omitempty"`
7177
7178	// Name: The unique identifier of this answer record. Format:
7179	// `projects//locations//answerRecords/`.
7180	Name string `json:"name,omitempty"`
7181
7182	// ServerResponse contains the HTTP response code and headers from the
7183	// server.
7184	googleapi.ServerResponse `json:"-"`
7185
7186	// ForceSendFields is a list of field names (e.g.
7187	// "AgentAssistantRecord") to unconditionally include in API requests.
7188	// By default, fields with empty values are omitted from API requests.
7189	// However, any non-pointer, non-interface field appearing in
7190	// ForceSendFields will be sent to the server regardless of whether the
7191	// field is empty or not. This may be used to include empty fields in
7192	// Patch requests.
7193	ForceSendFields []string `json:"-"`
7194
7195	// NullFields is a list of field names (e.g. "AgentAssistantRecord") to
7196	// include in API requests with the JSON null value. By default, fields
7197	// with empty values are omitted from API requests. However, any field
7198	// with an empty value appearing in NullFields will be sent to the
7199	// server as null. It is an error if a field in this list has a
7200	// non-empty value. This may be used to include null fields in Patch
7201	// requests.
7202	NullFields []string `json:"-"`
7203}
7204
7205func (s *GoogleCloudDialogflowV2AnswerRecord) MarshalJSON() ([]byte, error) {
7206	type NoMethod GoogleCloudDialogflowV2AnswerRecord
7207	raw := NoMethod(*s)
7208	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7209}
7210
7211// GoogleCloudDialogflowV2ArticleAnswer: Represents article answer.
7212type GoogleCloudDialogflowV2ArticleAnswer struct {
7213	// AnswerRecord: The name of answer record, in the format of
7214	// "projects//locations//answerRecords/"
7215	AnswerRecord string `json:"answerRecord,omitempty"`
7216
7217	// Confidence: Article match confidence. The system's confidence score
7218	// that this article is a good match for this conversation, as a value
7219	// from 0.0 (completely uncertain) to 1.0 (completely certain).
7220	Confidence float64 `json:"confidence,omitempty"`
7221
7222	// Metadata: A map that contains metadata about the answer and the
7223	// document from which it originates.
7224	Metadata map[string]string `json:"metadata,omitempty"`
7225
7226	// Snippets: Article snippets.
7227	Snippets []string `json:"snippets,omitempty"`
7228
7229	// Title: The article title.
7230	Title string `json:"title,omitempty"`
7231
7232	// Uri: The article URI.
7233	Uri string `json:"uri,omitempty"`
7234
7235	// ForceSendFields is a list of field names (e.g. "AnswerRecord") to
7236	// unconditionally include in API requests. By default, fields with
7237	// empty values are omitted from API requests. However, any non-pointer,
7238	// non-interface field appearing in ForceSendFields will be sent to the
7239	// server regardless of whether the field is empty or not. This may be
7240	// used to include empty fields in Patch requests.
7241	ForceSendFields []string `json:"-"`
7242
7243	// NullFields is a list of field names (e.g. "AnswerRecord") to include
7244	// in API requests with the JSON null value. By default, fields with
7245	// empty values are omitted from API requests. However, any field with
7246	// an empty value appearing in NullFields will be sent to the server as
7247	// null. It is an error if a field in this list has a non-empty value.
7248	// This may be used to include null fields in Patch requests.
7249	NullFields []string `json:"-"`
7250}
7251
7252func (s *GoogleCloudDialogflowV2ArticleAnswer) MarshalJSON() ([]byte, error) {
7253	type NoMethod GoogleCloudDialogflowV2ArticleAnswer
7254	raw := NoMethod(*s)
7255	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7256}
7257
7258func (s *GoogleCloudDialogflowV2ArticleAnswer) UnmarshalJSON(data []byte) error {
7259	type NoMethod GoogleCloudDialogflowV2ArticleAnswer
7260	var s1 struct {
7261		Confidence gensupport.JSONFloat64 `json:"confidence"`
7262		*NoMethod
7263	}
7264	s1.NoMethod = (*NoMethod)(s)
7265	if err := json.Unmarshal(data, &s1); err != nil {
7266		return err
7267	}
7268	s.Confidence = float64(s1.Confidence)
7269	return nil
7270}
7271
7272// GoogleCloudDialogflowV2AutomatedAgentConfig: Defines the Automated
7273// Agent to connect to a conversation.
7274type GoogleCloudDialogflowV2AutomatedAgentConfig struct {
7275	// Agent: Required. ID of the Dialogflow agent environment to use. This
7276	// project needs to either be the same project as the conversation or
7277	// you need to grant
7278	// `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow
7279	// API Service Agent` role in this project. Format:
7280	// `projects//locations//agent/environments/`. If environment is not
7281	// specified, the default `draft` environment is used. Refer to
7282	// DetectIntentRequest
7283	// (/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.clou
7284	// d.dialogflow.v2.DetectIntentRequest) for more details.
7285	Agent string `json:"agent,omitempty"`
7286
7287	// ForceSendFields is a list of field names (e.g. "Agent") to
7288	// unconditionally include in API requests. By default, fields with
7289	// empty values are omitted from API requests. However, any non-pointer,
7290	// non-interface field appearing in ForceSendFields will be sent to the
7291	// server regardless of whether the field is empty or not. This may be
7292	// used to include empty fields in Patch requests.
7293	ForceSendFields []string `json:"-"`
7294
7295	// NullFields is a list of field names (e.g. "Agent") to include in API
7296	// requests with the JSON null value. By default, fields with empty
7297	// values are omitted from API requests. However, any field with an
7298	// empty value appearing in NullFields will be sent to the server as
7299	// null. It is an error if a field in this list has a non-empty value.
7300	// This may be used to include null fields in Patch requests.
7301	NullFields []string `json:"-"`
7302}
7303
7304func (s *GoogleCloudDialogflowV2AutomatedAgentConfig) MarshalJSON() ([]byte, error) {
7305	type NoMethod GoogleCloudDialogflowV2AutomatedAgentConfig
7306	raw := NoMethod(*s)
7307	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7308}
7309
7310// GoogleCloudDialogflowV2AutomatedAgentReply: Represents a response
7311// from an automated agent.
7312type GoogleCloudDialogflowV2AutomatedAgentReply struct {
7313	// AllowCancellation: Indicates whether the partial automated agent
7314	// reply is interruptible when a later reply message arrives. e.g. if
7315	// the agent specified some music as partial response, it can be
7316	// cancelled.
7317	AllowCancellation bool `json:"allowCancellation,omitempty"`
7318
7319	// AutomatedAgentReplyType: AutomatedAgentReply type.
7320	//
7321	// Possible values:
7322	//   "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED" - Not specified. This
7323	// should never happen.
7324	//   "PARTIAL" - Partial reply. e.g. Aggregated responses in a
7325	// `Fulfillment` that enables `return_partial_response` can be returned
7326	// as partial reply. WARNING: partial reply is not eligible for
7327	// barge-in.
7328	//   "FINAL" - Final reply.
7329	AutomatedAgentReplyType string `json:"automatedAgentReplyType,omitempty"`
7330
7331	// DetectIntentResponse: Response of the Dialogflow
7332	// Sessions.DetectIntent call.
7333	DetectIntentResponse *GoogleCloudDialogflowV2DetectIntentResponse `json:"detectIntentResponse,omitempty"`
7334
7335	// ForceSendFields is a list of field names (e.g. "AllowCancellation")
7336	// to unconditionally include in API requests. By default, fields with
7337	// empty values are omitted from API requests. However, any non-pointer,
7338	// non-interface field appearing in ForceSendFields will be sent to the
7339	// server regardless of whether the field is empty or not. This may be
7340	// used to include empty fields in Patch requests.
7341	ForceSendFields []string `json:"-"`
7342
7343	// NullFields is a list of field names (e.g. "AllowCancellation") to
7344	// include in API requests with the JSON null value. By default, fields
7345	// with empty values are omitted from API requests. However, any field
7346	// with an empty value appearing in NullFields will be sent to the
7347	// server as null. It is an error if a field in this list has a
7348	// non-empty value. This may be used to include null fields in Patch
7349	// requests.
7350	NullFields []string `json:"-"`
7351}
7352
7353func (s *GoogleCloudDialogflowV2AutomatedAgentReply) MarshalJSON() ([]byte, error) {
7354	type NoMethod GoogleCloudDialogflowV2AutomatedAgentReply
7355	raw := NoMethod(*s)
7356	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7357}
7358
7359// GoogleCloudDialogflowV2BatchCreateEntitiesRequest: The request
7360// message for EntityTypes.BatchCreateEntities.
7361type GoogleCloudDialogflowV2BatchCreateEntitiesRequest struct {
7362	// Entities: Required. The entities to create.
7363	Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"`
7364
7365	// LanguageCode: Optional. The language used to access language-specific
7366	// data. If not specified, the agent's default language is used. For
7367	// more information, see Multilingual intent and entity data
7368	// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
7369	LanguageCode string `json:"languageCode,omitempty"`
7370
7371	// ForceSendFields is a list of field names (e.g. "Entities") to
7372	// unconditionally include in API requests. By default, fields with
7373	// empty values are omitted from API requests. However, any non-pointer,
7374	// non-interface field appearing in ForceSendFields will be sent to the
7375	// server regardless of whether the field is empty or not. This may be
7376	// used to include empty fields in Patch requests.
7377	ForceSendFields []string `json:"-"`
7378
7379	// NullFields is a list of field names (e.g. "Entities") to include in
7380	// API requests with the JSON null value. By default, fields with empty
7381	// values are omitted from API requests. However, any field with an
7382	// empty value appearing in NullFields will be sent to the server as
7383	// null. It is an error if a field in this list has a non-empty value.
7384	// This may be used to include null fields in Patch requests.
7385	NullFields []string `json:"-"`
7386}
7387
7388func (s *GoogleCloudDialogflowV2BatchCreateEntitiesRequest) MarshalJSON() ([]byte, error) {
7389	type NoMethod GoogleCloudDialogflowV2BatchCreateEntitiesRequest
7390	raw := NoMethod(*s)
7391	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7392}
7393
7394// GoogleCloudDialogflowV2BatchDeleteEntitiesRequest: The request
7395// message for EntityTypes.BatchDeleteEntities.
7396type GoogleCloudDialogflowV2BatchDeleteEntitiesRequest struct {
7397	// EntityValues: Required. The reference `values` of the entities to
7398	// delete. Note that these are not fully-qualified names, i.e. they
7399	// don't start with `projects/`.
7400	EntityValues []string `json:"entityValues,omitempty"`
7401
7402	// LanguageCode: Optional. The language used to access language-specific
7403	// data. If not specified, the agent's default language is used. For
7404	// more information, see Multilingual intent and entity data
7405	// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
7406	LanguageCode string `json:"languageCode,omitempty"`
7407
7408	// ForceSendFields is a list of field names (e.g. "EntityValues") to
7409	// unconditionally include in API requests. By default, fields with
7410	// empty values are omitted from API requests. However, any non-pointer,
7411	// non-interface field appearing in ForceSendFields will be sent to the
7412	// server regardless of whether the field is empty or not. This may be
7413	// used to include empty fields in Patch requests.
7414	ForceSendFields []string `json:"-"`
7415
7416	// NullFields is a list of field names (e.g. "EntityValues") to include
7417	// in API requests with the JSON null value. By default, fields with
7418	// empty values are omitted from API requests. However, any field with
7419	// an empty value appearing in NullFields will be sent to the server as
7420	// null. It is an error if a field in this list has a non-empty value.
7421	// This may be used to include null fields in Patch requests.
7422	NullFields []string `json:"-"`
7423}
7424
7425func (s *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest) MarshalJSON() ([]byte, error) {
7426	type NoMethod GoogleCloudDialogflowV2BatchDeleteEntitiesRequest
7427	raw := NoMethod(*s)
7428	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7429}
7430
7431// GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest: The request
7432// message for EntityTypes.BatchDeleteEntityTypes.
7433type GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest struct {
7434	// EntityTypeNames: Required. The names entity types to delete. All
7435	// names must point to the same agent as `parent`.
7436	EntityTypeNames []string `json:"entityTypeNames,omitempty"`
7437
7438	// ForceSendFields is a list of field names (e.g. "EntityTypeNames") to
7439	// unconditionally include in API requests. By default, fields with
7440	// empty values are omitted from API requests. However, any non-pointer,
7441	// non-interface field appearing in ForceSendFields will be sent to the
7442	// server regardless of whether the field is empty or not. This may be
7443	// used to include empty fields in Patch requests.
7444	ForceSendFields []string `json:"-"`
7445
7446	// NullFields is a list of field names (e.g. "EntityTypeNames") to
7447	// include in API requests with the JSON null value. By default, fields
7448	// with empty values are omitted from API requests. However, any field
7449	// with an empty value appearing in NullFields will be sent to the
7450	// server as null. It is an error if a field in this list has a
7451	// non-empty value. This may be used to include null fields in Patch
7452	// requests.
7453	NullFields []string `json:"-"`
7454}
7455
7456func (s *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest) MarshalJSON() ([]byte, error) {
7457	type NoMethod GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest
7458	raw := NoMethod(*s)
7459	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7460}
7461
7462// GoogleCloudDialogflowV2BatchDeleteIntentsRequest: The request message
7463// for Intents.BatchDeleteIntents.
7464type GoogleCloudDialogflowV2BatchDeleteIntentsRequest struct {
7465	// Intents: Required. The collection of intents to delete. Only intent
7466	// `name` must be filled in.
7467	Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"`
7468
7469	// ForceSendFields is a list of field names (e.g. "Intents") to
7470	// unconditionally include in API requests. By default, fields with
7471	// empty values are omitted from API requests. However, any non-pointer,
7472	// non-interface field appearing in ForceSendFields will be sent to the
7473	// server regardless of whether the field is empty or not. This may be
7474	// used to include empty fields in Patch requests.
7475	ForceSendFields []string `json:"-"`
7476
7477	// NullFields is a list of field names (e.g. "Intents") to include in
7478	// API requests with the JSON null value. By default, fields with empty
7479	// values are omitted from API requests. However, any field with an
7480	// empty value appearing in NullFields will be sent to the server as
7481	// null. It is an error if a field in this list has a non-empty value.
7482	// This may be used to include null fields in Patch requests.
7483	NullFields []string `json:"-"`
7484}
7485
7486func (s *GoogleCloudDialogflowV2BatchDeleteIntentsRequest) MarshalJSON() ([]byte, error) {
7487	type NoMethod GoogleCloudDialogflowV2BatchDeleteIntentsRequest
7488	raw := NoMethod(*s)
7489	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7490}
7491
7492// GoogleCloudDialogflowV2BatchUpdateEntitiesRequest: The request
7493// message for EntityTypes.BatchUpdateEntities.
7494type GoogleCloudDialogflowV2BatchUpdateEntitiesRequest struct {
7495	// Entities: Required. The entities to update or create.
7496	Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"`
7497
7498	// LanguageCode: Optional. The language used to access language-specific
7499	// data. If not specified, the agent's default language is used. For
7500	// more information, see Multilingual intent and entity data
7501	// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
7502	LanguageCode string `json:"languageCode,omitempty"`
7503
7504	// UpdateMask: Optional. The mask to control which fields get updated.
7505	UpdateMask string `json:"updateMask,omitempty"`
7506
7507	// ForceSendFields is a list of field names (e.g. "Entities") to
7508	// unconditionally include in API requests. By default, fields with
7509	// empty values are omitted from API requests. However, any non-pointer,
7510	// non-interface field appearing in ForceSendFields will be sent to the
7511	// server regardless of whether the field is empty or not. This may be
7512	// used to include empty fields in Patch requests.
7513	ForceSendFields []string `json:"-"`
7514
7515	// NullFields is a list of field names (e.g. "Entities") to include in
7516	// API requests with the JSON null value. By default, fields with empty
7517	// values are omitted from API requests. However, any field with an
7518	// empty value appearing in NullFields will be sent to the server as
7519	// null. It is an error if a field in this list has a non-empty value.
7520	// This may be used to include null fields in Patch requests.
7521	NullFields []string `json:"-"`
7522}
7523
7524func (s *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest) MarshalJSON() ([]byte, error) {
7525	type NoMethod GoogleCloudDialogflowV2BatchUpdateEntitiesRequest
7526	raw := NoMethod(*s)
7527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7528}
7529
7530// GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest: The request
7531// message for EntityTypes.BatchUpdateEntityTypes.
7532type GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest struct {
7533	// EntityTypeBatchInline: The collection of entity types to update or
7534	// create.
7535	EntityTypeBatchInline *GoogleCloudDialogflowV2EntityTypeBatch `json:"entityTypeBatchInline,omitempty"`
7536
7537	// EntityTypeBatchUri: The URI to a Google Cloud Storage file containing
7538	// entity types to update or create. The file format can either be a
7539	// serialized proto (of EntityBatch type) or a JSON object. Note: The
7540	// URI must start with "gs://".
7541	EntityTypeBatchUri string `json:"entityTypeBatchUri,omitempty"`
7542
7543	// LanguageCode: Optional. The language used to access language-specific
7544	// data. If not specified, the agent's default language is used. For
7545	// more information, see Multilingual intent and entity data
7546	// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
7547	LanguageCode string `json:"languageCode,omitempty"`
7548
7549	// UpdateMask: Optional. The mask to control which fields get updated.
7550	UpdateMask string `json:"updateMask,omitempty"`
7551
7552	// ForceSendFields is a list of field names (e.g.
7553	// "EntityTypeBatchInline") to unconditionally include in API requests.
7554	// By default, fields with empty values are omitted from API requests.
7555	// However, any non-pointer, non-interface field appearing in
7556	// ForceSendFields will be sent to the server regardless of whether the
7557	// field is empty or not. This may be used to include empty fields in
7558	// Patch requests.
7559	ForceSendFields []string `json:"-"`
7560
7561	// NullFields is a list of field names (e.g. "EntityTypeBatchInline") to
7562	// include in API requests with the JSON null value. By default, fields
7563	// with empty values are omitted from API requests. However, any field
7564	// with an empty value appearing in NullFields will be sent to the
7565	// server as null. It is an error if a field in this list has a
7566	// non-empty value. This may be used to include null fields in Patch
7567	// requests.
7568	NullFields []string `json:"-"`
7569}
7570
7571func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest) MarshalJSON() ([]byte, error) {
7572	type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest
7573	raw := NoMethod(*s)
7574	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7575}
7576
7577// GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse: The response
7578// message for EntityTypes.BatchUpdateEntityTypes.
7579type GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse struct {
7580	// EntityTypes: The collection of updated or created entity types.
7581	EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"`
7582
7583	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
7584	// unconditionally include in API requests. By default, fields with
7585	// empty values are omitted from API requests. However, any non-pointer,
7586	// non-interface field appearing in ForceSendFields will be sent to the
7587	// server regardless of whether the field is empty or not. This may be
7588	// used to include empty fields in Patch requests.
7589	ForceSendFields []string `json:"-"`
7590
7591	// NullFields is a list of field names (e.g. "EntityTypes") to include
7592	// in API requests with the JSON null value. By default, fields with
7593	// empty values are omitted from API requests. However, any field with
7594	// an empty value appearing in NullFields will be sent to the server as
7595	// null. It is an error if a field in this list has a non-empty value.
7596	// This may be used to include null fields in Patch requests.
7597	NullFields []string `json:"-"`
7598}
7599
7600func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) {
7601	type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
7602	raw := NoMethod(*s)
7603	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7604}
7605
7606type GoogleCloudDialogflowV2BatchUpdateIntentsRequest struct {
7607	// IntentBatchInline: The collection of intents to update or create.
7608	IntentBatchInline *GoogleCloudDialogflowV2IntentBatch `json:"intentBatchInline,omitempty"`
7609
7610	// IntentBatchUri: The URI to a Google Cloud Storage file containing
7611	// intents to update or create. The file format can either be a
7612	// serialized proto (of IntentBatch type) or JSON object. Note: The URI
7613	// must start with "gs://".
7614	IntentBatchUri string `json:"intentBatchUri,omitempty"`
7615
7616	// IntentView: Optional. The resource view to apply to the returned
7617	// intent.
7618	//
7619	// Possible values:
7620	//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
7621	// in the response.
7622	//   "INTENT_VIEW_FULL" - All fields are populated.
7623	IntentView string `json:"intentView,omitempty"`
7624
7625	// LanguageCode: Optional. The language used to access language-specific
7626	// data. If not specified, the agent's default language is used. For
7627	// more information, see Multilingual intent and entity data
7628	// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
7629	LanguageCode string `json:"languageCode,omitempty"`
7630
7631	// UpdateMask: Optional. The mask to control which fields get updated.
7632	UpdateMask string `json:"updateMask,omitempty"`
7633
7634	// ForceSendFields is a list of field names (e.g. "IntentBatchInline")
7635	// to unconditionally include in API requests. By default, fields with
7636	// empty values are omitted from API requests. However, any non-pointer,
7637	// non-interface field appearing in ForceSendFields will be sent to the
7638	// server regardless of whether the field is empty or not. This may be
7639	// used to include empty fields in Patch requests.
7640	ForceSendFields []string `json:"-"`
7641
7642	// NullFields is a list of field names (e.g. "IntentBatchInline") to
7643	// include in API requests with the JSON null value. By default, fields
7644	// with empty values are omitted from API requests. However, any field
7645	// with an empty value appearing in NullFields will be sent to the
7646	// server as null. It is an error if a field in this list has a
7647	// non-empty value. This may be used to include null fields in Patch
7648	// requests.
7649	NullFields []string `json:"-"`
7650}
7651
7652func (s *GoogleCloudDialogflowV2BatchUpdateIntentsRequest) MarshalJSON() ([]byte, error) {
7653	type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsRequest
7654	raw := NoMethod(*s)
7655	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7656}
7657
7658// GoogleCloudDialogflowV2BatchUpdateIntentsResponse: The response
7659// message for Intents.BatchUpdateIntents.
7660type GoogleCloudDialogflowV2BatchUpdateIntentsResponse struct {
7661	// Intents: The collection of updated or created intents.
7662	Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"`
7663
7664	// ForceSendFields is a list of field names (e.g. "Intents") to
7665	// unconditionally include in API requests. By default, fields with
7666	// empty values are omitted from API requests. However, any non-pointer,
7667	// non-interface field appearing in ForceSendFields will be sent to the
7668	// server regardless of whether the field is empty or not. This may be
7669	// used to include empty fields in Patch requests.
7670	ForceSendFields []string `json:"-"`
7671
7672	// NullFields is a list of field names (e.g. "Intents") to include in
7673	// API requests with the JSON null value. By default, fields with empty
7674	// values are omitted from API requests. However, any field with an
7675	// empty value appearing in NullFields will be sent to the server as
7676	// null. It is an error if a field in this list has a non-empty value.
7677	// This may be used to include null fields in Patch requests.
7678	NullFields []string `json:"-"`
7679}
7680
7681func (s *GoogleCloudDialogflowV2BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) {
7682	type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsResponse
7683	raw := NoMethod(*s)
7684	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7685}
7686
7687// GoogleCloudDialogflowV2CompleteConversationRequest: The request
7688// message for Conversations.CompleteConversation.
7689type GoogleCloudDialogflowV2CompleteConversationRequest struct {
7690}
7691
7692// GoogleCloudDialogflowV2Context: Dialogflow contexts are similar to
7693// natural language context. If a person says to you "they are orange",
7694// you need context in order to understand what "they" is referring to.
7695// Similarly, for Dialogflow to handle an end-user expression like that,
7696// it needs to be provided with context in order to correctly match an
7697// intent. Using contexts, you can control the flow of a conversation.
7698// You can configure contexts for an intent by setting input and output
7699// contexts, which are identified by string names. When an intent is
7700// matched, any configured output contexts for that intent become
7701// active. While any contexts are active, Dialogflow is more likely to
7702// match intents that are configured with input contexts that correspond
7703// to the currently active contexts. For more information about context,
7704// see the Contexts guide
7705// (https://cloud.google.com/dialogflow/docs/contexts-overview).
7706type GoogleCloudDialogflowV2Context struct {
7707	// LifespanCount: Optional. The number of conversational query requests
7708	// after which the context expires. The default is `0`. If set to `0`,
7709	// the context expires immediately. Contexts expire automatically after
7710	// 20 minutes if there are no matching queries.
7711	LifespanCount int64 `json:"lifespanCount,omitempty"`
7712
7713	// Name: Required. The unique identifier of the context. Format:
7714	// `projects//agent/sessions//contexts/`, or
7715	// `projects//agent/environments//users//sessions//contexts/`. The
7716	// `Context ID` is always converted to lowercase, may only contain
7717	// characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If
7718	// `Environment ID` is not specified, we assume default 'draft'
7719	// environment. If `User ID` is not specified, we assume default '-'
7720	// user. The following context names are reserved for internal use by
7721	// Dialogflow. You should not use these contexts or create contexts with
7722	// these names: * `__system_counters__` * `*_id_dialog_context` *
7723	// `*_dialog_params_size`
7724	Name string `json:"name,omitempty"`
7725
7726	// Parameters: Optional. The collection of parameters associated with
7727	// this context. Depending on your protocol or client library language,
7728	// this is a map, associative array, symbol table, dictionary, or JSON
7729	// object composed of a collection of (MapKey, MapValue) pairs: - MapKey
7730	// type: string - MapKey value: parameter name - MapValue type: - If
7731	// parameter's entity type is a composite entity: map - Else: depending
7732	// on parameter value type, could be one of string, number, boolean,
7733	// null, list or map - MapValue value: - If parameter's entity type is a
7734	// composite entity: map from composite entity property names to
7735	// property values - Else: parameter value
7736	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
7737
7738	// ServerResponse contains the HTTP response code and headers from the
7739	// server.
7740	googleapi.ServerResponse `json:"-"`
7741
7742	// ForceSendFields is a list of field names (e.g. "LifespanCount") to
7743	// unconditionally include in API requests. By default, fields with
7744	// empty values are omitted from API requests. However, any non-pointer,
7745	// non-interface field appearing in ForceSendFields will be sent to the
7746	// server regardless of whether the field is empty or not. This may be
7747	// used to include empty fields in Patch requests.
7748	ForceSendFields []string `json:"-"`
7749
7750	// NullFields is a list of field names (e.g. "LifespanCount") to include
7751	// in API requests with the JSON null value. By default, fields with
7752	// empty values are omitted from API requests. However, any field with
7753	// an empty value appearing in NullFields will be sent to the server as
7754	// null. It is an error if a field in this list has a non-empty value.
7755	// This may be used to include null fields in Patch requests.
7756	NullFields []string `json:"-"`
7757}
7758
7759func (s *GoogleCloudDialogflowV2Context) MarshalJSON() ([]byte, error) {
7760	type NoMethod GoogleCloudDialogflowV2Context
7761	raw := NoMethod(*s)
7762	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7763}
7764
7765// GoogleCloudDialogflowV2Conversation: Represents a conversation. A
7766// conversation is an interaction between an agent, including live
7767// agents and Dialogflow agents, and a support customer. Conversations
7768// can include phone calls and text-based chat sessions.
7769type GoogleCloudDialogflowV2Conversation struct {
7770	// ConversationProfile: Required. The Conversation Profile to be used to
7771	// configure this Conversation. This field cannot be updated. Format:
7772	// `projects//locations//conversationProfiles/`.
7773	ConversationProfile string `json:"conversationProfile,omitempty"`
7774
7775	// ConversationStage: The stage of a conversation. It indicates whether
7776	// the virtual agent or a human agent is handling the conversation. If
7777	// the conversation is created with the conversation profile that has
7778	// Dialogflow config set, defaults to
7779	// ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to
7780	// ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created
7781	// with the conversation profile that has Dialogflow config set but
7782	// explicitly sets conversation_stage to
7783	// ConversationStage.HUMAN_ASSIST_STAGE, it skips
7784	// ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to
7785	// ConversationStage.HUMAN_ASSIST_STAGE.
7786	//
7787	// Possible values:
7788	//   "CONVERSATION_STAGE_UNSPECIFIED" - Unknown. Should never be used
7789	// after a conversation is successfully created.
7790	//   "VIRTUAL_AGENT_STAGE" - The conversation should return virtual
7791	// agent responses into the conversation.
7792	//   "HUMAN_ASSIST_STAGE" - The conversation should not provide
7793	// responses, just listen and provide suggestions.
7794	ConversationStage string `json:"conversationStage,omitempty"`
7795
7796	// EndTime: Output only. The time the conversation was finished.
7797	EndTime string `json:"endTime,omitempty"`
7798
7799	// LifecycleState: Output only. The current state of the Conversation.
7800	//
7801	// Possible values:
7802	//   "LIFECYCLE_STATE_UNSPECIFIED" - Unknown.
7803	//   "IN_PROGRESS" - Conversation is currently open for media analysis.
7804	//   "COMPLETED" - Conversation has been completed.
7805	LifecycleState string `json:"lifecycleState,omitempty"`
7806
7807	// Name: Output only. The unique identifier of this conversation.
7808	// Format: `projects//locations//conversations/`.
7809	Name string `json:"name,omitempty"`
7810
7811	// PhoneNumber: Output only. It will not be empty if the conversation is
7812	// to be connected over telephony.
7813	PhoneNumber *GoogleCloudDialogflowV2ConversationPhoneNumber `json:"phoneNumber,omitempty"`
7814
7815	// StartTime: Output only. The time the conversation was started.
7816	StartTime string `json:"startTime,omitempty"`
7817
7818	// ServerResponse contains the HTTP response code and headers from the
7819	// server.
7820	googleapi.ServerResponse `json:"-"`
7821
7822	// ForceSendFields is a list of field names (e.g. "ConversationProfile")
7823	// to unconditionally include in API requests. By default, fields with
7824	// empty values are omitted from API requests. However, any non-pointer,
7825	// non-interface field appearing in ForceSendFields will be sent to the
7826	// server regardless of whether the field is empty or not. This may be
7827	// used to include empty fields in Patch requests.
7828	ForceSendFields []string `json:"-"`
7829
7830	// NullFields is a list of field names (e.g. "ConversationProfile") to
7831	// include in API requests with the JSON null value. By default, fields
7832	// with empty values are omitted from API requests. However, any field
7833	// with an empty value appearing in NullFields will be sent to the
7834	// server as null. It is an error if a field in this list has a
7835	// non-empty value. This may be used to include null fields in Patch
7836	// requests.
7837	NullFields []string `json:"-"`
7838}
7839
7840func (s *GoogleCloudDialogflowV2Conversation) MarshalJSON() ([]byte, error) {
7841	type NoMethod GoogleCloudDialogflowV2Conversation
7842	raw := NoMethod(*s)
7843	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7844}
7845
7846// GoogleCloudDialogflowV2ConversationEvent: Represents a notification
7847// sent to Pub/Sub subscribers for conversation lifecycle events.
7848type GoogleCloudDialogflowV2ConversationEvent struct {
7849	// Conversation: The unique identifier of the conversation this
7850	// notification refers to. Format: `projects//conversations/`.
7851	Conversation string `json:"conversation,omitempty"`
7852
7853	// ErrorStatus: More detailed information about an error. Only set for
7854	// type UNRECOVERABLE_ERROR_IN_PHONE_CALL.
7855	ErrorStatus *GoogleRpcStatus `json:"errorStatus,omitempty"`
7856
7857	// NewMessagePayload: Payload of NEW_MESSAGE event.
7858	NewMessagePayload *GoogleCloudDialogflowV2Message `json:"newMessagePayload,omitempty"`
7859
7860	// Type: The type of the event that this notification refers to.
7861	//
7862	// Possible values:
7863	//   "TYPE_UNSPECIFIED" - Type not set.
7864	//   "CONVERSATION_STARTED" - A new conversation has been opened. This
7865	// is fired when a telephone call is answered, or a conversation is
7866	// created via the API.
7867	//   "CONVERSATION_FINISHED" - An existing conversation has closed. This
7868	// is fired when a telephone call is terminated, or a conversation is
7869	// closed via the API.
7870	//   "HUMAN_INTERVENTION_NEEDED" - An existing conversation has received
7871	// notification from Dialogflow that human intervention is required.
7872	//   "NEW_MESSAGE" - An existing conversation has received a new
7873	// message, either from API or telephony. It is configured in
7874	// ConversationProfile.new_message_event_notification_config
7875	//   "UNRECOVERABLE_ERROR" - Unrecoverable error during a telephone
7876	// call. In general non-recoverable errors only occur if something was
7877	// misconfigured in the ConversationProfile corresponding to the call.
7878	// After a non-recoverable error, Dialogflow may stop responding. We
7879	// don't fire this event: * in an API call because we can directly
7880	// return the error, or, * when we can recover from an error.
7881	Type string `json:"type,omitempty"`
7882
7883	// ForceSendFields is a list of field names (e.g. "Conversation") to
7884	// unconditionally include in API requests. By default, fields with
7885	// empty values are omitted from API requests. However, any non-pointer,
7886	// non-interface field appearing in ForceSendFields will be sent to the
7887	// server regardless of whether the field is empty or not. This may be
7888	// used to include empty fields in Patch requests.
7889	ForceSendFields []string `json:"-"`
7890
7891	// NullFields is a list of field names (e.g. "Conversation") to include
7892	// in API requests with the JSON null value. By default, fields with
7893	// empty values are omitted from API requests. However, any field with
7894	// an empty value appearing in NullFields will be sent to the server as
7895	// null. It is an error if a field in this list has a non-empty value.
7896	// This may be used to include null fields in Patch requests.
7897	NullFields []string `json:"-"`
7898}
7899
7900func (s *GoogleCloudDialogflowV2ConversationEvent) MarshalJSON() ([]byte, error) {
7901	type NoMethod GoogleCloudDialogflowV2ConversationEvent
7902	raw := NoMethod(*s)
7903	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7904}
7905
7906// GoogleCloudDialogflowV2ConversationPhoneNumber: Represents a phone
7907// number for telephony integration. It allows for connecting a
7908// particular conversation over telephony.
7909type GoogleCloudDialogflowV2ConversationPhoneNumber struct {
7910	// PhoneNumber: Output only. The phone number to connect to this
7911	// conversation.
7912	PhoneNumber string `json:"phoneNumber,omitempty"`
7913
7914	// ForceSendFields is a list of field names (e.g. "PhoneNumber") to
7915	// unconditionally include in API requests. By default, fields with
7916	// empty values are omitted from API requests. However, any non-pointer,
7917	// non-interface field appearing in ForceSendFields will be sent to the
7918	// server regardless of whether the field is empty or not. This may be
7919	// used to include empty fields in Patch requests.
7920	ForceSendFields []string `json:"-"`
7921
7922	// NullFields is a list of field names (e.g. "PhoneNumber") to include
7923	// in API requests with the JSON null value. By default, fields with
7924	// empty values are omitted from API requests. However, any field with
7925	// an empty value appearing in NullFields will be sent to the server as
7926	// null. It is an error if a field in this list has a non-empty value.
7927	// This may be used to include null fields in Patch requests.
7928	NullFields []string `json:"-"`
7929}
7930
7931func (s *GoogleCloudDialogflowV2ConversationPhoneNumber) MarshalJSON() ([]byte, error) {
7932	type NoMethod GoogleCloudDialogflowV2ConversationPhoneNumber
7933	raw := NoMethod(*s)
7934	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7935}
7936
7937// GoogleCloudDialogflowV2ConversationProfile: Defines the services to
7938// connect to incoming Dialogflow conversations.
7939type GoogleCloudDialogflowV2ConversationProfile struct {
7940	// AutomatedAgentConfig: Configuration for an automated agent to use
7941	// with this profile.
7942	AutomatedAgentConfig *GoogleCloudDialogflowV2AutomatedAgentConfig `json:"automatedAgentConfig,omitempty"`
7943
7944	// CreateTime: Output only. Create time of the conversation profile.
7945	CreateTime string `json:"createTime,omitempty"`
7946
7947	// DisplayName: Required. Human readable name for this profile. Max
7948	// length 1024 bytes.
7949	DisplayName string `json:"displayName,omitempty"`
7950
7951	// HumanAgentAssistantConfig: Configuration for agent assistance to use
7952	// with this profile.
7953	HumanAgentAssistantConfig *GoogleCloudDialogflowV2HumanAgentAssistantConfig `json:"humanAgentAssistantConfig,omitempty"`
7954
7955	// HumanAgentHandoffConfig: Configuration for connecting to a live
7956	// agent. Currently, this feature is not general available, please
7957	// contact Google to get access.
7958	HumanAgentHandoffConfig *GoogleCloudDialogflowV2HumanAgentHandoffConfig `json:"humanAgentHandoffConfig,omitempty"`
7959
7960	// LanguageCode: Language which represents the conversationProfile. If
7961	// unspecified, the default language code en-us applies. Users need to
7962	// create a ConversationProfile for each language they want to support.
7963	LanguageCode string `json:"languageCode,omitempty"`
7964
7965	// LoggingConfig: Configuration for logging conversation lifecycle
7966	// events.
7967	LoggingConfig *GoogleCloudDialogflowV2LoggingConfig `json:"loggingConfig,omitempty"`
7968
7969	// Name: The unique identifier of this conversation profile. Format:
7970	// `projects//locations//conversationProfiles/`.
7971	Name string `json:"name,omitempty"`
7972
7973	// NewMessageEventNotificationConfig: Configuration for publishing new
7974	// message events. Event will be sent in format of ConversationEvent
7975	NewMessageEventNotificationConfig *GoogleCloudDialogflowV2NotificationConfig `json:"newMessageEventNotificationConfig,omitempty"`
7976
7977	// NotificationConfig: Configuration for publishing conversation
7978	// lifecycle events.
7979	NotificationConfig *GoogleCloudDialogflowV2NotificationConfig `json:"notificationConfig,omitempty"`
7980
7981	// SttConfig: Settings for speech transcription.
7982	SttConfig *GoogleCloudDialogflowV2SpeechToTextConfig `json:"sttConfig,omitempty"`
7983
7984	// UpdateTime: Output only. Update time of the conversation profile.
7985	UpdateTime string `json:"updateTime,omitempty"`
7986
7987	// ServerResponse contains the HTTP response code and headers from the
7988	// server.
7989	googleapi.ServerResponse `json:"-"`
7990
7991	// ForceSendFields is a list of field names (e.g.
7992	// "AutomatedAgentConfig") to unconditionally include in API requests.
7993	// By default, fields with empty values are omitted from API requests.
7994	// However, any non-pointer, non-interface field appearing in
7995	// ForceSendFields will be sent to the server regardless of whether the
7996	// field is empty or not. This may be used to include empty fields in
7997	// Patch requests.
7998	ForceSendFields []string `json:"-"`
7999
8000	// NullFields is a list of field names (e.g. "AutomatedAgentConfig") to
8001	// include in API requests with the JSON null value. By default, fields
8002	// with empty values are omitted from API requests. However, any field
8003	// with an empty value appearing in NullFields will be sent to the
8004	// server as null. It is an error if a field in this list has a
8005	// non-empty value. This may be used to include null fields in Patch
8006	// requests.
8007	NullFields []string `json:"-"`
8008}
8009
8010func (s *GoogleCloudDialogflowV2ConversationProfile) MarshalJSON() ([]byte, error) {
8011	type NoMethod GoogleCloudDialogflowV2ConversationProfile
8012	raw := NoMethod(*s)
8013	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8014}
8015
8016// GoogleCloudDialogflowV2DetectIntentRequest: The request to detect
8017// user's intent.
8018type GoogleCloudDialogflowV2DetectIntentRequest struct {
8019	// InputAudio: The natural language speech audio to be processed. This
8020	// field should be populated iff `query_input` is set to an input audio
8021	// config. A single request can contain up to 1 minute of speech audio
8022	// data.
8023	InputAudio string `json:"inputAudio,omitempty"`
8024
8025	// OutputAudioConfig: Instructs the speech synthesizer how to generate
8026	// the output audio. If this field is not set and agent-level speech
8027	// synthesizer is not configured, no output audio is generated.
8028	OutputAudioConfig *GoogleCloudDialogflowV2OutputAudioConfig `json:"outputAudioConfig,omitempty"`
8029
8030	// OutputAudioConfigMask: Mask for output_audio_config indicating which
8031	// settings in this request-level config should override speech
8032	// synthesizer settings defined at agent-level. If unspecified or empty,
8033	// output_audio_config replaces the agent-level config in its entirety.
8034	OutputAudioConfigMask string `json:"outputAudioConfigMask,omitempty"`
8035
8036	// QueryInput: Required. The input specification. It can be set to: 1.
8037	// an audio config which instructs the speech recognizer how to process
8038	// the speech audio, 2. a conversational query in the form of text, or
8039	// 3. an event that specifies which intent to trigger.
8040	QueryInput *GoogleCloudDialogflowV2QueryInput `json:"queryInput,omitempty"`
8041
8042	// QueryParams: The parameters of this query.
8043	QueryParams *GoogleCloudDialogflowV2QueryParameters `json:"queryParams,omitempty"`
8044
8045	// ForceSendFields is a list of field names (e.g. "InputAudio") to
8046	// unconditionally include in API requests. By default, fields with
8047	// empty values are omitted from API requests. However, any non-pointer,
8048	// non-interface field appearing in ForceSendFields will be sent to the
8049	// server regardless of whether the field is empty or not. This may be
8050	// used to include empty fields in Patch requests.
8051	ForceSendFields []string `json:"-"`
8052
8053	// NullFields is a list of field names (e.g. "InputAudio") to include in
8054	// API requests with the JSON null value. By default, fields with empty
8055	// values are omitted from API requests. However, any field with an
8056	// empty value appearing in NullFields will be sent to the server as
8057	// null. It is an error if a field in this list has a non-empty value.
8058	// This may be used to include null fields in Patch requests.
8059	NullFields []string `json:"-"`
8060}
8061
8062func (s *GoogleCloudDialogflowV2DetectIntentRequest) MarshalJSON() ([]byte, error) {
8063	type NoMethod GoogleCloudDialogflowV2DetectIntentRequest
8064	raw := NoMethod(*s)
8065	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8066}
8067
8068// GoogleCloudDialogflowV2DetectIntentResponse: The message returned
8069// from the DetectIntent method.
8070type GoogleCloudDialogflowV2DetectIntentResponse struct {
8071	// OutputAudio: The audio data bytes encoded as specified in the
8072	// request. Note: The output audio is generated based on the values of
8073	// default platform text responses found in the
8074	// `query_result.fulfillment_messages` field. If multiple default text
8075	// responses exist, they will be concatenated when generating audio. If
8076	// no default platform text responses exist, the generated audio content
8077	// will be empty. In some scenarios, multiple output audio fields may be
8078	// present in the response structure. In these cases, only the
8079	// top-most-level audio output has content.
8080	OutputAudio string `json:"outputAudio,omitempty"`
8081
8082	// OutputAudioConfig: The config used by the speech synthesizer to
8083	// generate the output audio.
8084	OutputAudioConfig *GoogleCloudDialogflowV2OutputAudioConfig `json:"outputAudioConfig,omitempty"`
8085
8086	// QueryResult: The selected results of the conversational query or
8087	// event processing. See `alternative_query_results` for additional
8088	// potential results.
8089	QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"`
8090
8091	// ResponseId: The unique identifier of the response. It can be used to
8092	// locate a response in the training example set or for reporting
8093	// issues.
8094	ResponseId string `json:"responseId,omitempty"`
8095
8096	// WebhookStatus: Specifies the status of the webhook request.
8097	WebhookStatus *GoogleRpcStatus `json:"webhookStatus,omitempty"`
8098
8099	// ServerResponse contains the HTTP response code and headers from the
8100	// server.
8101	googleapi.ServerResponse `json:"-"`
8102
8103	// ForceSendFields is a list of field names (e.g. "OutputAudio") to
8104	// unconditionally include in API requests. By default, fields with
8105	// empty values are omitted from API requests. However, any non-pointer,
8106	// non-interface field appearing in ForceSendFields will be sent to the
8107	// server regardless of whether the field is empty or not. This may be
8108	// used to include empty fields in Patch requests.
8109	ForceSendFields []string `json:"-"`
8110
8111	// NullFields is a list of field names (e.g. "OutputAudio") to include
8112	// in API requests with the JSON null value. By default, fields with
8113	// empty values are omitted from API requests. However, any field with
8114	// an empty value appearing in NullFields will be sent to the server as
8115	// null. It is an error if a field in this list has a non-empty value.
8116	// This may be used to include null fields in Patch requests.
8117	NullFields []string `json:"-"`
8118}
8119
8120func (s *GoogleCloudDialogflowV2DetectIntentResponse) MarshalJSON() ([]byte, error) {
8121	type NoMethod GoogleCloudDialogflowV2DetectIntentResponse
8122	raw := NoMethod(*s)
8123	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8124}
8125
8126// GoogleCloudDialogflowV2Document: A knowledge document to be used by a
8127// KnowledgeBase. For more information, see the knowledge base guide
8128// (https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note:
8129// The `projects.agent.knowledgeBases.documents` resource is deprecated;
8130// only use `projects.knowledgeBases.documents`.
8131type GoogleCloudDialogflowV2Document struct {
8132	// ContentUri: The URI where the file content is located. For documents
8133	// stored in Google Cloud Storage, these URIs must have the form
8134	// `gs:///`. NOTE: External URLs must correspond to public webpages,
8135	// i.e., they must be indexed by Google Search. In particular, URLs for
8136	// showing documents in Google Cloud Storage (i.e. the URL in your
8137	// browser) are not supported. Instead use the `gs://` format URI
8138	// described above.
8139	ContentUri string `json:"contentUri,omitempty"`
8140
8141	// DisplayName: Required. The display name of the document. The name
8142	// must be 1024 bytes or less; otherwise, the creation request fails.
8143	DisplayName string `json:"displayName,omitempty"`
8144
8145	// EnableAutoReload: Optional. If true, we try to automatically reload
8146	// the document every day (at a time picked by the system). If false or
8147	// unspecified, we don't try to automatically reload the document.
8148	// Currently you can only enable automatic reload for documents sourced
8149	// from a public url, see `source` field for the source types. Reload
8150	// status can be tracked in `latest_reload_status`. If a reload fails,
8151	// we will keep the document unchanged. If a reload fails with internal
8152	// errors, the system will try to reload the document on the next day.
8153	// If a reload fails with non-retriable errors (e.g. PERMISION_DENIED),
8154	// the system will not try to reload the document anymore. You need to
8155	// manually reload the document successfully by calling `ReloadDocument`
8156	// and clear the errors.
8157	EnableAutoReload bool `json:"enableAutoReload,omitempty"`
8158
8159	// KnowledgeTypes: Required. The knowledge type of document content.
8160	//
8161	// Possible values:
8162	//   "KNOWLEDGE_TYPE_UNSPECIFIED" - The type is unspecified or
8163	// arbitrary.
8164	//   "FAQ" - The document content contains question and answer pairs as
8165	// either HTML or CSV. Typical FAQ HTML formats are parsed accurately,
8166	// but unusual formats may fail to be parsed. CSV must have questions in
8167	// the first column and answers in the second, with no header. Because
8168	// of this explicit format, they are always parsed accurately.
8169	//   "EXTRACTIVE_QA" - Documents for which unstructured text is
8170	// extracted and used for question answering.
8171	//   "ARTICLE_SUGGESTION" - The entire document content as a whole can
8172	// be used for query results. Only for Contact Center Solutions on
8173	// Dialogflow.
8174	KnowledgeTypes []string `json:"knowledgeTypes,omitempty"`
8175
8176	// LatestReloadStatus: Output only. The time and status of the latest
8177	// reload. This reload may have been triggered automatically or manually
8178	// and may not have succeeded.
8179	LatestReloadStatus *GoogleCloudDialogflowV2DocumentReloadStatus `json:"latestReloadStatus,omitempty"`
8180
8181	// Metadata: Optional. Metadata for the document. The metadata supports
8182	// arbitrary key-value pairs. Suggested use cases include storing a
8183	// document's title, an external URL distinct from the document's
8184	// content_uri, etc. The max size of a `key` or a `value` of the
8185	// metadata is 1024 bytes.
8186	Metadata map[string]string `json:"metadata,omitempty"`
8187
8188	// MimeType: Required. The MIME type of this document.
8189	MimeType string `json:"mimeType,omitempty"`
8190
8191	// Name: Optional. The document resource name. The name must be empty
8192	// when creating a document. Format:
8193	// `projects//locations//knowledgeBases//documents/`.
8194	Name string `json:"name,omitempty"`
8195
8196	// RawContent: The raw content of the document. This field is only
8197	// permitted for EXTRACTIVE_QA and FAQ knowledge types.
8198	RawContent string `json:"rawContent,omitempty"`
8199
8200	// ServerResponse contains the HTTP response code and headers from the
8201	// server.
8202	googleapi.ServerResponse `json:"-"`
8203
8204	// ForceSendFields is a list of field names (e.g. "ContentUri") to
8205	// unconditionally include in API requests. By default, fields with
8206	// empty values are omitted from API requests. However, any non-pointer,
8207	// non-interface field appearing in ForceSendFields will be sent to the
8208	// server regardless of whether the field is empty or not. This may be
8209	// used to include empty fields in Patch requests.
8210	ForceSendFields []string `json:"-"`
8211
8212	// NullFields is a list of field names (e.g. "ContentUri") to include in
8213	// API requests with the JSON null value. By default, fields with empty
8214	// values are omitted from API requests. However, any field with an
8215	// empty value appearing in NullFields will be sent to the server as
8216	// null. It is an error if a field in this list has a non-empty value.
8217	// This may be used to include null fields in Patch requests.
8218	NullFields []string `json:"-"`
8219}
8220
8221func (s *GoogleCloudDialogflowV2Document) MarshalJSON() ([]byte, error) {
8222	type NoMethod GoogleCloudDialogflowV2Document
8223	raw := NoMethod(*s)
8224	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8225}
8226
8227// GoogleCloudDialogflowV2DocumentReloadStatus: The status of a reload
8228// attempt.
8229type GoogleCloudDialogflowV2DocumentReloadStatus struct {
8230	// Status: The status of a reload attempt or the initial load.
8231	Status *GoogleRpcStatus `json:"status,omitempty"`
8232
8233	// Time: The time of a reload attempt. This reload may have been
8234	// triggered automatically or manually and may not have succeeded.
8235	Time string `json:"time,omitempty"`
8236
8237	// ForceSendFields is a list of field names (e.g. "Status") to
8238	// unconditionally include in API requests. By default, fields with
8239	// empty values are omitted from API requests. However, any non-pointer,
8240	// non-interface field appearing in ForceSendFields will be sent to the
8241	// server regardless of whether the field is empty or not. This may be
8242	// used to include empty fields in Patch requests.
8243	ForceSendFields []string `json:"-"`
8244
8245	// NullFields is a list of field names (e.g. "Status") to include in API
8246	// requests with the JSON null value. By default, fields with empty
8247	// values are omitted from API requests. However, any field with an
8248	// empty value appearing in NullFields will be sent to the server as
8249	// null. It is an error if a field in this list has a non-empty value.
8250	// This may be used to include null fields in Patch requests.
8251	NullFields []string `json:"-"`
8252}
8253
8254func (s *GoogleCloudDialogflowV2DocumentReloadStatus) MarshalJSON() ([]byte, error) {
8255	type NoMethod GoogleCloudDialogflowV2DocumentReloadStatus
8256	raw := NoMethod(*s)
8257	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8258}
8259
8260// GoogleCloudDialogflowV2DtmfParameters: The message in the response
8261// that indicates the parameters of DTMF.
8262type GoogleCloudDialogflowV2DtmfParameters struct {
8263	// AcceptsDtmfInput: Indicates whether DTMF input can be handled in the
8264	// next request.
8265	AcceptsDtmfInput bool `json:"acceptsDtmfInput,omitempty"`
8266
8267	// ForceSendFields is a list of field names (e.g. "AcceptsDtmfInput") to
8268	// unconditionally include in API requests. By default, fields with
8269	// empty values are omitted from API requests. However, any non-pointer,
8270	// non-interface field appearing in ForceSendFields will be sent to the
8271	// server regardless of whether the field is empty or not. This may be
8272	// used to include empty fields in Patch requests.
8273	ForceSendFields []string `json:"-"`
8274
8275	// NullFields is a list of field names (e.g. "AcceptsDtmfInput") to
8276	// include in API requests with the JSON null value. By default, fields
8277	// with empty values are omitted from API requests. However, any field
8278	// with an empty value appearing in NullFields will be sent to the
8279	// server as null. It is an error if a field in this list has a
8280	// non-empty value. This may be used to include null fields in Patch
8281	// requests.
8282	NullFields []string `json:"-"`
8283}
8284
8285func (s *GoogleCloudDialogflowV2DtmfParameters) MarshalJSON() ([]byte, error) {
8286	type NoMethod GoogleCloudDialogflowV2DtmfParameters
8287	raw := NoMethod(*s)
8288	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8289}
8290
8291// GoogleCloudDialogflowV2EntityType: Each intent parameter has a type,
8292// called the entity type, which dictates exactly how data from an
8293// end-user expression is extracted. Dialogflow provides predefined
8294// system entities that can match many common types of data. For
8295// example, there are system entities for matching dates, times, colors,
8296// email addresses, and so on. You can also create your own custom
8297// entities for matching custom data. For example, you could define a
8298// vegetable entity that can match the types of vegetables available for
8299// purchase with a grocery store agent. For more information, see the
8300// Entity guide
8301// (https://cloud.google.com/dialogflow/docs/entities-overview).
8302type GoogleCloudDialogflowV2EntityType struct {
8303	// AutoExpansionMode: Optional. Indicates whether the entity type can be
8304	// automatically expanded.
8305	//
8306	// Possible values:
8307	//   "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the
8308	// entity.
8309	//   "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values
8310	// that have not been explicitly listed in the entity.
8311	AutoExpansionMode string `json:"autoExpansionMode,omitempty"`
8312
8313	// DisplayName: Required. The name of the entity type.
8314	DisplayName string `json:"displayName,omitempty"`
8315
8316	// EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction
8317	// during classification.
8318	EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"`
8319
8320	// Entities: Optional. The collection of entity entries associated with
8321	// the entity type.
8322	Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"`
8323
8324	// Kind: Required. Indicates the kind of entity type.
8325	//
8326	// Possible values:
8327	//   "KIND_UNSPECIFIED" - Not specified. This value should be never
8328	// used.
8329	//   "KIND_MAP" - Map entity types allow mapping of a group of synonyms
8330	// to a reference value.
8331	//   "KIND_LIST" - List entity types contain a set of entries that do
8332	// not map to reference values. However, list entity types can contain
8333	// references to other entity types (with or without aliases).
8334	//   "KIND_REGEXP" - Regexp entity types allow to specify regular
8335	// expressions in entries values.
8336	Kind string `json:"kind,omitempty"`
8337
8338	// Name: The unique identifier of the entity type. Required for
8339	// EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes
8340	// methods. Format: `projects//agent/entityTypes/`.
8341	Name string `json:"name,omitempty"`
8342
8343	// ServerResponse contains the HTTP response code and headers from the
8344	// server.
8345	googleapi.ServerResponse `json:"-"`
8346
8347	// ForceSendFields is a list of field names (e.g. "AutoExpansionMode")
8348	// to unconditionally include in API requests. By default, fields with
8349	// empty values are omitted from API requests. However, any non-pointer,
8350	// non-interface field appearing in ForceSendFields will be sent to the
8351	// server regardless of whether the field is empty or not. This may be
8352	// used to include empty fields in Patch requests.
8353	ForceSendFields []string `json:"-"`
8354
8355	// NullFields is a list of field names (e.g. "AutoExpansionMode") to
8356	// include in API requests with the JSON null value. By default, fields
8357	// with empty values are omitted from API requests. However, any field
8358	// with an empty value appearing in NullFields will be sent to the
8359	// server as null. It is an error if a field in this list has a
8360	// non-empty value. This may be used to include null fields in Patch
8361	// requests.
8362	NullFields []string `json:"-"`
8363}
8364
8365func (s *GoogleCloudDialogflowV2EntityType) MarshalJSON() ([]byte, error) {
8366	type NoMethod GoogleCloudDialogflowV2EntityType
8367	raw := NoMethod(*s)
8368	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8369}
8370
8371// GoogleCloudDialogflowV2EntityTypeBatch: This message is a wrapper
8372// around a collection of entity types.
8373type GoogleCloudDialogflowV2EntityTypeBatch struct {
8374	// EntityTypes: A collection of entity types.
8375	EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"`
8376
8377	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
8378	// unconditionally include in API requests. By default, fields with
8379	// empty values are omitted from API requests. However, any non-pointer,
8380	// non-interface field appearing in ForceSendFields will be sent to the
8381	// server regardless of whether the field is empty or not. This may be
8382	// used to include empty fields in Patch requests.
8383	ForceSendFields []string `json:"-"`
8384
8385	// NullFields is a list of field names (e.g. "EntityTypes") to include
8386	// in API requests with the JSON null value. By default, fields with
8387	// empty values are omitted from API requests. However, any field with
8388	// an empty value appearing in NullFields will be sent to the server as
8389	// null. It is an error if a field in this list has a non-empty value.
8390	// This may be used to include null fields in Patch requests.
8391	NullFields []string `json:"-"`
8392}
8393
8394func (s *GoogleCloudDialogflowV2EntityTypeBatch) MarshalJSON() ([]byte, error) {
8395	type NoMethod GoogleCloudDialogflowV2EntityTypeBatch
8396	raw := NoMethod(*s)
8397	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8398}
8399
8400// GoogleCloudDialogflowV2EntityTypeEntity: An **entity entry** for an
8401// associated entity type.
8402type GoogleCloudDialogflowV2EntityTypeEntity struct {
8403	// Synonyms: Required. A collection of value synonyms. For example, if
8404	// the entity type is *vegetable*, and `value` is *scallions*, a synonym
8405	// could be *green onions*. For `KIND_LIST` entity types: * This
8406	// collection must contain exactly one synonym equal to `value`.
8407	Synonyms []string `json:"synonyms,omitempty"`
8408
8409	// Value: Required. The primary value associated with this entity entry.
8410	// For example, if the entity type is *vegetable*, the value could be
8411	// *scallions*. For `KIND_MAP` entity types: * A reference value to be
8412	// used in place of synonyms. For `KIND_LIST` entity types: * A string
8413	// that can contain references to other entity types (with or without
8414	// aliases).
8415	Value string `json:"value,omitempty"`
8416
8417	// ForceSendFields is a list of field names (e.g. "Synonyms") to
8418	// unconditionally include in API requests. By default, fields with
8419	// empty values are omitted from API requests. However, any non-pointer,
8420	// non-interface field appearing in ForceSendFields will be sent to the
8421	// server regardless of whether the field is empty or not. This may be
8422	// used to include empty fields in Patch requests.
8423	ForceSendFields []string `json:"-"`
8424
8425	// NullFields is a list of field names (e.g. "Synonyms") to include in
8426	// API requests with the JSON null value. By default, fields with empty
8427	// values are omitted from API requests. However, any field with an
8428	// empty value appearing in NullFields will be sent to the server as
8429	// null. It is an error if a field in this list has a non-empty value.
8430	// This may be used to include null fields in Patch requests.
8431	NullFields []string `json:"-"`
8432}
8433
8434func (s *GoogleCloudDialogflowV2EntityTypeEntity) MarshalJSON() ([]byte, error) {
8435	type NoMethod GoogleCloudDialogflowV2EntityTypeEntity
8436	raw := NoMethod(*s)
8437	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8438}
8439
8440// GoogleCloudDialogflowV2Environment: You can create multiple versions
8441// of your agent and publish them to separate environments. When you
8442// edit an agent, you are editing the draft agent. At any point, you can
8443// save the draft agent as an agent version, which is an immutable
8444// snapshot of your agent. When you save the draft agent, it is
8445// published to the default environment. When you create agent versions,
8446// you can publish them to custom environments. You can create a variety
8447// of custom environments for: - testing - development - production -
8448// etc. For more information, see the versions and environments guide
8449// (https://cloud.google.com/dialogflow/docs/agents-versions).
8450type GoogleCloudDialogflowV2Environment struct {
8451	// AgentVersion: Required. The agent version loaded into this
8452	// environment. Supported formats: - `projects//agent/versions/` -
8453	// `projects//locations//agent/versions/`
8454	AgentVersion string `json:"agentVersion,omitempty"`
8455
8456	// Description: Optional. The developer-provided description for this
8457	// environment. The maximum length is 500 characters. If exceeded, the
8458	// request is rejected.
8459	Description string `json:"description,omitempty"`
8460
8461	// Fulfillment: Optional. The fulfillment settings to use for this
8462	// environment.
8463	Fulfillment *GoogleCloudDialogflowV2Fulfillment `json:"fulfillment,omitempty"`
8464
8465	// Name: Output only. The unique identifier of this agent environment.
8466	// Supported formats: - `projects//agent/environments/` -
8467	// `projects//locations//agent/environments/`
8468	Name string `json:"name,omitempty"`
8469
8470	// State: Output only. The state of this environment. This field is
8471	// read-only, i.e., it cannot be set by create and update methods.
8472	//
8473	// Possible values:
8474	//   "STATE_UNSPECIFIED" - Not specified. This value is not used.
8475	//   "STOPPED" - Stopped.
8476	//   "LOADING" - Loading.
8477	//   "RUNNING" - Running.
8478	State string `json:"state,omitempty"`
8479
8480	// TextToSpeechSettings: Optional. Text to speech settings for this
8481	// environment.
8482	TextToSpeechSettings *GoogleCloudDialogflowV2TextToSpeechSettings `json:"textToSpeechSettings,omitempty"`
8483
8484	// UpdateTime: Output only. The last update time of this environment.
8485	// This field is read-only, i.e., it cannot be set by create and update
8486	// methods.
8487	UpdateTime string `json:"updateTime,omitempty"`
8488
8489	// ServerResponse contains the HTTP response code and headers from the
8490	// server.
8491	googleapi.ServerResponse `json:"-"`
8492
8493	// ForceSendFields is a list of field names (e.g. "AgentVersion") to
8494	// unconditionally include in API requests. By default, fields with
8495	// empty values are omitted from API requests. However, any non-pointer,
8496	// non-interface field appearing in ForceSendFields will be sent to the
8497	// server regardless of whether the field is empty or not. This may be
8498	// used to include empty fields in Patch requests.
8499	ForceSendFields []string `json:"-"`
8500
8501	// NullFields is a list of field names (e.g. "AgentVersion") to include
8502	// in API requests with the JSON null value. By default, fields with
8503	// empty values are omitted from API requests. However, any field with
8504	// an empty value appearing in NullFields will be sent to the server as
8505	// null. It is an error if a field in this list has a non-empty value.
8506	// This may be used to include null fields in Patch requests.
8507	NullFields []string `json:"-"`
8508}
8509
8510func (s *GoogleCloudDialogflowV2Environment) MarshalJSON() ([]byte, error) {
8511	type NoMethod GoogleCloudDialogflowV2Environment
8512	raw := NoMethod(*s)
8513	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8514}
8515
8516// GoogleCloudDialogflowV2EnvironmentHistory: The response message for
8517// Environments.GetEnvironmentHistory.
8518type GoogleCloudDialogflowV2EnvironmentHistory struct {
8519	// Entries: Output only. The list of agent environments. There will be a
8520	// maximum number of items returned based on the page_size field in the
8521	// request.
8522	Entries []*GoogleCloudDialogflowV2EnvironmentHistoryEntry `json:"entries,omitempty"`
8523
8524	// NextPageToken: Output only. Token to retrieve the next page of
8525	// results, or empty if there are no more results in the list.
8526	NextPageToken string `json:"nextPageToken,omitempty"`
8527
8528	// Parent: Output only. The name of the environment this history is for.
8529	// Supported formats: - `projects//agent/environments/` -
8530	// `projects//locations//agent/environments/`
8531	Parent string `json:"parent,omitempty"`
8532
8533	// ServerResponse contains the HTTP response code and headers from the
8534	// server.
8535	googleapi.ServerResponse `json:"-"`
8536
8537	// ForceSendFields is a list of field names (e.g. "Entries") to
8538	// unconditionally include in API requests. By default, fields with
8539	// empty values are omitted from API requests. However, any non-pointer,
8540	// non-interface field appearing in ForceSendFields will be sent to the
8541	// server regardless of whether the field is empty or not. This may be
8542	// used to include empty fields in Patch requests.
8543	ForceSendFields []string `json:"-"`
8544
8545	// NullFields is a list of field names (e.g. "Entries") to include in
8546	// API requests with the JSON null value. By default, fields with empty
8547	// values are omitted from API requests. However, any field with an
8548	// empty value appearing in NullFields will be sent to the server as
8549	// null. It is an error if a field in this list has a non-empty value.
8550	// This may be used to include null fields in Patch requests.
8551	NullFields []string `json:"-"`
8552}
8553
8554func (s *GoogleCloudDialogflowV2EnvironmentHistory) MarshalJSON() ([]byte, error) {
8555	type NoMethod GoogleCloudDialogflowV2EnvironmentHistory
8556	raw := NoMethod(*s)
8557	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8558}
8559
8560// GoogleCloudDialogflowV2EnvironmentHistoryEntry: Represents an
8561// environment history entry.
8562type GoogleCloudDialogflowV2EnvironmentHistoryEntry struct {
8563	// AgentVersion: The agent version loaded into this environment history
8564	// entry.
8565	AgentVersion string `json:"agentVersion,omitempty"`
8566
8567	// CreateTime: The creation time of this environment history entry.
8568	CreateTime string `json:"createTime,omitempty"`
8569
8570	// Description: The developer-provided description for this environment
8571	// history entry.
8572	Description string `json:"description,omitempty"`
8573
8574	// ForceSendFields is a list of field names (e.g. "AgentVersion") to
8575	// unconditionally include in API requests. By default, fields with
8576	// empty values are omitted from API requests. However, any non-pointer,
8577	// non-interface field appearing in ForceSendFields will be sent to the
8578	// server regardless of whether the field is empty or not. This may be
8579	// used to include empty fields in Patch requests.
8580	ForceSendFields []string `json:"-"`
8581
8582	// NullFields is a list of field names (e.g. "AgentVersion") to include
8583	// in API requests with the JSON null value. By default, fields with
8584	// empty values are omitted from API requests. However, any field with
8585	// an empty value appearing in NullFields will be sent to the server as
8586	// null. It is an error if a field in this list has a non-empty value.
8587	// This may be used to include null fields in Patch requests.
8588	NullFields []string `json:"-"`
8589}
8590
8591func (s *GoogleCloudDialogflowV2EnvironmentHistoryEntry) MarshalJSON() ([]byte, error) {
8592	type NoMethod GoogleCloudDialogflowV2EnvironmentHistoryEntry
8593	raw := NoMethod(*s)
8594	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8595}
8596
8597// GoogleCloudDialogflowV2EventInput: Events allow for matching intents
8598// by event name instead of the natural language input. For instance,
8599// input `` can trigger a personalized welcome response. The parameter
8600// `name` may be used by the agent in the response: "Hello
8601// #welcome_event.name! What can I do for you today?".
8602type GoogleCloudDialogflowV2EventInput struct {
8603	// LanguageCode: Required. The language of this query. See Language
8604	// Support (https://cloud.google.com/dialogflow/docs/reference/language)
8605	// for a list of the currently supported language codes. Note that
8606	// queries in the same session do not necessarily need to specify the
8607	// same language.
8608	LanguageCode string `json:"languageCode,omitempty"`
8609
8610	// Name: Required. The unique identifier of the event.
8611	Name string `json:"name,omitempty"`
8612
8613	// Parameters: The collection of parameters associated with the event.
8614	// Depending on your protocol or client library language, this is a map,
8615	// associative array, symbol table, dictionary, or JSON object composed
8616	// of a collection of (MapKey, MapValue) pairs: - MapKey type: string -
8617	// MapKey value: parameter name - MapValue type: - If parameter's entity
8618	// type is a composite entity: map - Else: depending on parameter value
8619	// type, could be one of string, number, boolean, null, list or map -
8620	// MapValue value: - If parameter's entity type is a composite entity:
8621	// map from composite entity property names to property values - Else:
8622	// parameter value
8623	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
8624
8625	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
8626	// unconditionally include in API requests. By default, fields with
8627	// empty values are omitted from API requests. However, any non-pointer,
8628	// non-interface field appearing in ForceSendFields will be sent to the
8629	// server regardless of whether the field is empty or not. This may be
8630	// used to include empty fields in Patch requests.
8631	ForceSendFields []string `json:"-"`
8632
8633	// NullFields is a list of field names (e.g. "LanguageCode") to include
8634	// in API requests with the JSON null value. By default, fields with
8635	// empty values are omitted from API requests. However, any field with
8636	// an empty value appearing in NullFields will be sent to the server as
8637	// null. It is an error if a field in this list has a non-empty value.
8638	// This may be used to include null fields in Patch requests.
8639	NullFields []string `json:"-"`
8640}
8641
8642func (s *GoogleCloudDialogflowV2EventInput) MarshalJSON() ([]byte, error) {
8643	type NoMethod GoogleCloudDialogflowV2EventInput
8644	raw := NoMethod(*s)
8645	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8646}
8647
8648// GoogleCloudDialogflowV2ExportAgentRequest: The request message for
8649// Agents.ExportAgent.
8650type GoogleCloudDialogflowV2ExportAgentRequest struct {
8651	// AgentUri: Required. The Google Cloud Storage
8652	// (https://cloud.google.com/storage/docs/) URI to export the agent to.
8653	// The format of this URI must be `gs:///`. If left unspecified, the
8654	// serialized agent is returned inline.
8655	AgentUri string `json:"agentUri,omitempty"`
8656
8657	// ForceSendFields is a list of field names (e.g. "AgentUri") to
8658	// unconditionally include in API requests. By default, fields with
8659	// empty values are omitted from API requests. However, any non-pointer,
8660	// non-interface field appearing in ForceSendFields will be sent to the
8661	// server regardless of whether the field is empty or not. This may be
8662	// used to include empty fields in Patch requests.
8663	ForceSendFields []string `json:"-"`
8664
8665	// NullFields is a list of field names (e.g. "AgentUri") to include in
8666	// API requests with the JSON null value. By default, fields with empty
8667	// values are omitted from API requests. However, any field with an
8668	// empty value appearing in NullFields will be sent to the server as
8669	// null. It is an error if a field in this list has a non-empty value.
8670	// This may be used to include null fields in Patch requests.
8671	NullFields []string `json:"-"`
8672}
8673
8674func (s *GoogleCloudDialogflowV2ExportAgentRequest) MarshalJSON() ([]byte, error) {
8675	type NoMethod GoogleCloudDialogflowV2ExportAgentRequest
8676	raw := NoMethod(*s)
8677	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8678}
8679
8680// GoogleCloudDialogflowV2ExportAgentResponse: The response message for
8681// Agents.ExportAgent.
8682type GoogleCloudDialogflowV2ExportAgentResponse struct {
8683	// AgentContent: Zip compressed raw byte content for agent.
8684	AgentContent string `json:"agentContent,omitempty"`
8685
8686	// AgentUri: The URI to a file containing the exported agent. This field
8687	// is populated only if `agent_uri` is specified in
8688	// `ExportAgentRequest`.
8689	AgentUri string `json:"agentUri,omitempty"`
8690
8691	// ForceSendFields is a list of field names (e.g. "AgentContent") to
8692	// unconditionally include in API requests. By default, fields with
8693	// empty values are omitted from API requests. However, any non-pointer,
8694	// non-interface field appearing in ForceSendFields will be sent to the
8695	// server regardless of whether the field is empty or not. This may be
8696	// used to include empty fields in Patch requests.
8697	ForceSendFields []string `json:"-"`
8698
8699	// NullFields is a list of field names (e.g. "AgentContent") to include
8700	// in API requests with the JSON null value. By default, fields with
8701	// empty values are omitted from API requests. However, any field with
8702	// an empty value appearing in NullFields will be sent to the server as
8703	// null. It is an error if a field in this list has a non-empty value.
8704	// This may be used to include null fields in Patch requests.
8705	NullFields []string `json:"-"`
8706}
8707
8708func (s *GoogleCloudDialogflowV2ExportAgentResponse) MarshalJSON() ([]byte, error) {
8709	type NoMethod GoogleCloudDialogflowV2ExportAgentResponse
8710	raw := NoMethod(*s)
8711	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8712}
8713
8714// GoogleCloudDialogflowV2FaqAnswer: Represents answer from "frequently
8715// asked questions".
8716type GoogleCloudDialogflowV2FaqAnswer struct {
8717	// Answer: The piece of text from the `source` knowledge base document.
8718	Answer string `json:"answer,omitempty"`
8719
8720	// AnswerRecord: The name of answer record, in the format of
8721	// "projects//locations//answerRecords/"
8722	AnswerRecord string `json:"answerRecord,omitempty"`
8723
8724	// Confidence: The system's confidence score that this Knowledge answer
8725	// is a good match for this conversational query, range from 0.0
8726	// (completely uncertain) to 1.0 (completely certain).
8727	Confidence float64 `json:"confidence,omitempty"`
8728
8729	// Metadata: A map that contains metadata about the answer and the
8730	// document from which it originates.
8731	Metadata map[string]string `json:"metadata,omitempty"`
8732
8733	// Question: The corresponding FAQ question.
8734	Question string `json:"question,omitempty"`
8735
8736	// Source: Indicates which Knowledge Document this answer was extracted
8737	// from. Format:
8738	// `projects//locations//agent/knowledgeBases//documents/`.
8739	Source string `json:"source,omitempty"`
8740
8741	// ForceSendFields is a list of field names (e.g. "Answer") to
8742	// unconditionally include in API requests. By default, fields with
8743	// empty values are omitted from API requests. However, any non-pointer,
8744	// non-interface field appearing in ForceSendFields will be sent to the
8745	// server regardless of whether the field is empty or not. This may be
8746	// used to include empty fields in Patch requests.
8747	ForceSendFields []string `json:"-"`
8748
8749	// NullFields is a list of field names (e.g. "Answer") to include in API
8750	// requests with the JSON null value. By default, fields with empty
8751	// values are omitted from API requests. However, any field with an
8752	// empty value appearing in NullFields will be sent to the server as
8753	// null. It is an error if a field in this list has a non-empty value.
8754	// This may be used to include null fields in Patch requests.
8755	NullFields []string `json:"-"`
8756}
8757
8758func (s *GoogleCloudDialogflowV2FaqAnswer) MarshalJSON() ([]byte, error) {
8759	type NoMethod GoogleCloudDialogflowV2FaqAnswer
8760	raw := NoMethod(*s)
8761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8762}
8763
8764func (s *GoogleCloudDialogflowV2FaqAnswer) UnmarshalJSON(data []byte) error {
8765	type NoMethod GoogleCloudDialogflowV2FaqAnswer
8766	var s1 struct {
8767		Confidence gensupport.JSONFloat64 `json:"confidence"`
8768		*NoMethod
8769	}
8770	s1.NoMethod = (*NoMethod)(s)
8771	if err := json.Unmarshal(data, &s1); err != nil {
8772		return err
8773	}
8774	s.Confidence = float64(s1.Confidence)
8775	return nil
8776}
8777
8778// GoogleCloudDialogflowV2Fulfillment: By default, your agent responds
8779// to a matched intent with a static response. As an alternative, you
8780// can provide a more dynamic response by using fulfillment. When you
8781// enable fulfillment for an intent, Dialogflow responds to that intent
8782// by calling a service that you define. For example, if an end-user
8783// wants to schedule a haircut on Friday, your service can check your
8784// database and respond to the end-user with availability information
8785// for Friday. For more information, see the fulfillment guide
8786// (https://cloud.google.com/dialogflow/docs/fulfillment-overview).
8787type GoogleCloudDialogflowV2Fulfillment struct {
8788	// DisplayName: Optional. The human-readable name of the fulfillment,
8789	// unique within the agent. This field is not used for Fulfillment in an
8790	// Environment.
8791	DisplayName string `json:"displayName,omitempty"`
8792
8793	// Enabled: Optional. Whether fulfillment is enabled.
8794	Enabled bool `json:"enabled,omitempty"`
8795
8796	// Features: Optional. The field defines whether the fulfillment is
8797	// enabled for certain features.
8798	Features []*GoogleCloudDialogflowV2FulfillmentFeature `json:"features,omitempty"`
8799
8800	// GenericWebService: Configuration for a generic web service.
8801	GenericWebService *GoogleCloudDialogflowV2FulfillmentGenericWebService `json:"genericWebService,omitempty"`
8802
8803	// Name: Required. The unique identifier of the fulfillment. Supported
8804	// formats: - `projects//agent/fulfillment` -
8805	// `projects//locations//agent/fulfillment` This field is not used for
8806	// Fulfillment in an Environment.
8807	Name string `json:"name,omitempty"`
8808
8809	// ServerResponse contains the HTTP response code and headers from the
8810	// server.
8811	googleapi.ServerResponse `json:"-"`
8812
8813	// ForceSendFields is a list of field names (e.g. "DisplayName") to
8814	// unconditionally include in API requests. By default, fields with
8815	// empty values are omitted from API requests. However, any non-pointer,
8816	// non-interface field appearing in ForceSendFields will be sent to the
8817	// server regardless of whether the field is empty or not. This may be
8818	// used to include empty fields in Patch requests.
8819	ForceSendFields []string `json:"-"`
8820
8821	// NullFields is a list of field names (e.g. "DisplayName") to include
8822	// in API requests with the JSON null value. By default, fields with
8823	// empty values are omitted from API requests. However, any field with
8824	// an empty value appearing in NullFields will be sent to the server as
8825	// null. It is an error if a field in this list has a non-empty value.
8826	// This may be used to include null fields in Patch requests.
8827	NullFields []string `json:"-"`
8828}
8829
8830func (s *GoogleCloudDialogflowV2Fulfillment) MarshalJSON() ([]byte, error) {
8831	type NoMethod GoogleCloudDialogflowV2Fulfillment
8832	raw := NoMethod(*s)
8833	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8834}
8835
8836// GoogleCloudDialogflowV2FulfillmentFeature: Whether fulfillment is
8837// enabled for the specific feature.
8838type GoogleCloudDialogflowV2FulfillmentFeature struct {
8839	// Type: The type of the feature that enabled for fulfillment.
8840	//
8841	// Possible values:
8842	//   "TYPE_UNSPECIFIED" - Feature type not specified.
8843	//   "SMALLTALK" - Fulfillment is enabled for SmallTalk.
8844	Type string `json:"type,omitempty"`
8845
8846	// ForceSendFields is a list of field names (e.g. "Type") to
8847	// unconditionally include in API requests. By default, fields with
8848	// empty values are omitted from API requests. However, any non-pointer,
8849	// non-interface field appearing in ForceSendFields will be sent to the
8850	// server regardless of whether the field is empty or not. This may be
8851	// used to include empty fields in Patch requests.
8852	ForceSendFields []string `json:"-"`
8853
8854	// NullFields is a list of field names (e.g. "Type") to include in API
8855	// requests with the JSON null value. By default, fields with empty
8856	// values are omitted from API requests. However, any field with an
8857	// empty value appearing in NullFields will be sent to the server as
8858	// null. It is an error if a field in this list has a non-empty value.
8859	// This may be used to include null fields in Patch requests.
8860	NullFields []string `json:"-"`
8861}
8862
8863func (s *GoogleCloudDialogflowV2FulfillmentFeature) MarshalJSON() ([]byte, error) {
8864	type NoMethod GoogleCloudDialogflowV2FulfillmentFeature
8865	raw := NoMethod(*s)
8866	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8867}
8868
8869// GoogleCloudDialogflowV2FulfillmentGenericWebService: Represents
8870// configuration for a generic web service. Dialogflow supports two
8871// mechanisms for authentications: - Basic authentication with username
8872// and password. - Authentication with additional authentication
8873// headers. More information could be found at:
8874// https://cloud.google.com/dialogflow/docs/fulfillment-configure.
8875type GoogleCloudDialogflowV2FulfillmentGenericWebService struct {
8876	// IsCloudFunction: Optional. Indicates if generic web service is
8877	// created through Cloud Functions integration. Defaults to false.
8878	// is_cloud_function is deprecated. Cloud functions can be configured by
8879	// its uri as a regular web service now.
8880	IsCloudFunction bool `json:"isCloudFunction,omitempty"`
8881
8882	// Password: Optional. The password for HTTP Basic authentication.
8883	Password string `json:"password,omitempty"`
8884
8885	// RequestHeaders: Optional. The HTTP request headers to send together
8886	// with fulfillment requests.
8887	RequestHeaders map[string]string `json:"requestHeaders,omitempty"`
8888
8889	// Uri: Required. The fulfillment URI for receiving POST requests. It
8890	// must use https protocol.
8891	Uri string `json:"uri,omitempty"`
8892
8893	// Username: Optional. The user name for HTTP Basic authentication.
8894	Username string `json:"username,omitempty"`
8895
8896	// ForceSendFields is a list of field names (e.g. "IsCloudFunction") to
8897	// unconditionally include in API requests. By default, fields with
8898	// empty values are omitted from API requests. However, any non-pointer,
8899	// non-interface field appearing in ForceSendFields will be sent to the
8900	// server regardless of whether the field is empty or not. This may be
8901	// used to include empty fields in Patch requests.
8902	ForceSendFields []string `json:"-"`
8903
8904	// NullFields is a list of field names (e.g. "IsCloudFunction") to
8905	// include in API requests with the JSON null value. By default, fields
8906	// with empty values are omitted from API requests. However, any field
8907	// with an empty value appearing in NullFields will be sent to the
8908	// server as null. It is an error if a field in this list has a
8909	// non-empty value. This may be used to include null fields in Patch
8910	// requests.
8911	NullFields []string `json:"-"`
8912}
8913
8914func (s *GoogleCloudDialogflowV2FulfillmentGenericWebService) MarshalJSON() ([]byte, error) {
8915	type NoMethod GoogleCloudDialogflowV2FulfillmentGenericWebService
8916	raw := NoMethod(*s)
8917	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8918}
8919
8920// GoogleCloudDialogflowV2HumanAgentAssistantConfig: Defines the Human
8921// Agent Assist to connect to a conversation.
8922type GoogleCloudDialogflowV2HumanAgentAssistantConfig struct {
8923	// EndUserSuggestionConfig: Configuration for agent assistance of end
8924	// user participant. Currently, this feature is not general available,
8925	// please contact Google to get access.
8926	EndUserSuggestionConfig *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig `json:"endUserSuggestionConfig,omitempty"`
8927
8928	// HumanAgentSuggestionConfig: Configuration for agent assistance of
8929	// human agent participant.
8930	HumanAgentSuggestionConfig *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig `json:"humanAgentSuggestionConfig,omitempty"`
8931
8932	// MessageAnalysisConfig: Configuration for message analysis.
8933	MessageAnalysisConfig *GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig `json:"messageAnalysisConfig,omitempty"`
8934
8935	// NotificationConfig: Pub/Sub topic on which to publish new agent
8936	// assistant events.
8937	NotificationConfig *GoogleCloudDialogflowV2NotificationConfig `json:"notificationConfig,omitempty"`
8938
8939	// ForceSendFields is a list of field names (e.g.
8940	// "EndUserSuggestionConfig") to unconditionally include in API
8941	// requests. By default, fields with empty values are omitted from API
8942	// requests. However, any non-pointer, non-interface field appearing in
8943	// ForceSendFields will be sent to the server regardless of whether the
8944	// field is empty or not. This may be used to include empty fields in
8945	// Patch requests.
8946	ForceSendFields []string `json:"-"`
8947
8948	// NullFields is a list of field names (e.g. "EndUserSuggestionConfig")
8949	// to include in API requests with the JSON null value. By default,
8950	// fields with empty values are omitted from API requests. However, any
8951	// field with an empty value appearing in NullFields will be sent to the
8952	// server as null. It is an error if a field in this list has a
8953	// non-empty value. This may be used to include null fields in Patch
8954	// requests.
8955	NullFields []string `json:"-"`
8956}
8957
8958func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfig) MarshalJSON() ([]byte, error) {
8959	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfig
8960	raw := NoMethod(*s)
8961	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8962}
8963
8964// GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfi
8965// g: Custom conversation models used in agent assist feature. Supported
8966// feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY.
8967type GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig struct {
8968	// Model: Conversation model resource name. Format:
8969	// `projects//conversationModels/`.
8970	Model string `json:"model,omitempty"`
8971
8972	// ForceSendFields is a list of field names (e.g. "Model") to
8973	// unconditionally include in API requests. By default, fields with
8974	// empty values are omitted from API requests. However, any non-pointer,
8975	// non-interface field appearing in ForceSendFields will be sent to the
8976	// server regardless of whether the field is empty or not. This may be
8977	// used to include empty fields in Patch requests.
8978	ForceSendFields []string `json:"-"`
8979
8980	// NullFields is a list of field names (e.g. "Model") to include in API
8981	// requests with the JSON null value. By default, fields with empty
8982	// values are omitted from API requests. However, any field with an
8983	// empty value appearing in NullFields will be sent to the server as
8984	// null. It is an error if a field in this list has a non-empty value.
8985	// This may be used to include null fields in Patch requests.
8986	NullFields []string `json:"-"`
8987}
8988
8989func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig) MarshalJSON() ([]byte, error) {
8990	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig
8991	raw := NoMethod(*s)
8992	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8993}
8994
8995// GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig:
8996//  Configuration for analyses to run on each conversation message.
8997type GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig struct {
8998	// EnableEntityExtraction: Enable entity extraction in conversation
8999	// messages on agent assist stage
9000	// (https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
9001	// If unspecified, defaults to false. Currently, this feature is not
9002	// general available, please contact Google to get access.
9003	EnableEntityExtraction bool `json:"enableEntityExtraction,omitempty"`
9004
9005	// EnableSentimentAnalysis: Enable sentiment analysis in conversation
9006	// messages on agent assist stage
9007	// (https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
9008	// If unspecified, defaults to false. Sentiment analysis inspects user
9009	// input and identifies the prevailing subjective opinion, especially to
9010	// determine a user's attitude as positive, negative, or neutral:
9011	// https://cloud.google.com/natural-language/docs/basics#sentiment_analysis
9012	// For Participants.StreamingAnalyzeContent method, result will be in
9013	// StreamingAnalyzeContentResponse.message.SentimentAnalysisResult. For
9014	// Participants.AnalyzeContent method, result will be in
9015	// AnalyzeContentResponse.message.SentimentAnalysisResult For
9016	// Conversations.ListMessages method, result will be in
9017	// ListMessagesResponse.messages.SentimentAnalysisResult If Pub/Sub
9018	// notification is configured, result will be in
9019	// ConversationEvent.new_message_payload.SentimentAnalysisResult.
9020	EnableSentimentAnalysis bool `json:"enableSentimentAnalysis,omitempty"`
9021
9022	// ForceSendFields is a list of field names (e.g.
9023	// "EnableEntityExtraction") to unconditionally include in API requests.
9024	// By default, fields with empty values are omitted from API requests.
9025	// However, any non-pointer, non-interface field appearing in
9026	// ForceSendFields will be sent to the server regardless of whether the
9027	// field is empty or not. This may be used to include empty fields in
9028	// Patch requests.
9029	ForceSendFields []string `json:"-"`
9030
9031	// NullFields is a list of field names (e.g. "EnableEntityExtraction")
9032	// to include in API requests with the JSON null value. By default,
9033	// fields with empty values are omitted from API requests. However, any
9034	// field with an empty value appearing in NullFields will be sent to the
9035	// server as null. It is an error if a field in this list has a
9036	// non-empty value. This may be used to include null fields in Patch
9037	// requests.
9038	NullFields []string `json:"-"`
9039}
9040
9041func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig) MarshalJSON() ([]byte, error) {
9042	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig
9043	raw := NoMethod(*s)
9044	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9045}
9046
9047// GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig:
9048// Detail human agent assistant config.
9049type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig struct {
9050	// FeatureConfigs: Configuration of different suggestion features. One
9051	// feature can have only one config.
9052	FeatureConfigs []*GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig `json:"featureConfigs,omitempty"`
9053
9054	// GroupSuggestionResponses: If `group_suggestion_responses` is false,
9055	// and there are multiple `feature_configs` in `event based suggestion`
9056	// or StreamingAnalyzeContent, we will try to deliver suggestions to
9057	// customers as soon as we get new suggestion. Different type of
9058	// suggestions based on the same context will be in separate Pub/Sub
9059	// event or `StreamingAnalyzeContentResponse`. If
9060	// `group_suggestion_responses` set to true. All the suggestions to the
9061	// same participant based on the same context will be grouped into a
9062	// single Pub/Sub event or StreamingAnalyzeContentResponse.
9063	GroupSuggestionResponses bool `json:"groupSuggestionResponses,omitempty"`
9064
9065	// ForceSendFields is a list of field names (e.g. "FeatureConfigs") to
9066	// unconditionally include in API requests. By default, fields with
9067	// empty values are omitted from API requests. However, any non-pointer,
9068	// non-interface field appearing in ForceSendFields will be sent to the
9069	// server regardless of whether the field is empty or not. This may be
9070	// used to include empty fields in Patch requests.
9071	ForceSendFields []string `json:"-"`
9072
9073	// NullFields is a list of field names (e.g. "FeatureConfigs") to
9074	// include in API requests with the JSON null value. By default, fields
9075	// with empty values are omitted from API requests. However, any field
9076	// with an empty value appearing in NullFields will be sent to the
9077	// server as null. It is an error if a field in this list has a
9078	// non-empty value. This may be used to include null fields in Patch
9079	// requests.
9080	NullFields []string `json:"-"`
9081}
9082
9083func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig) MarshalJSON() ([]byte, error) {
9084	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig
9085	raw := NoMethod(*s)
9086	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9087}
9088
9089// GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfi
9090// g: Config for suggestion features.
9091type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig struct {
9092	// ConversationModelConfig: Configs of custom conversation model.
9093	ConversationModelConfig *GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig `json:"conversationModelConfig,omitempty"`
9094
9095	// EnableEventBasedSuggestion: Automatically iterates all participants
9096	// and tries to compile suggestions. Supported features:
9097	// ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST.
9098	EnableEventBasedSuggestion bool `json:"enableEventBasedSuggestion,omitempty"`
9099
9100	// QueryConfig: Configs of query.
9101	QueryConfig *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig `json:"queryConfig,omitempty"`
9102
9103	// SuggestionFeature: The suggestion feature.
9104	SuggestionFeature *GoogleCloudDialogflowV2SuggestionFeature `json:"suggestionFeature,omitempty"`
9105
9106	// SuggestionTriggerSettings: Settings of suggestion trigger. Currently,
9107	// only ARTICLE_SUGGESTION and FAQ will use this field.
9108	SuggestionTriggerSettings *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings `json:"suggestionTriggerSettings,omitempty"`
9109
9110	// ForceSendFields is a list of field names (e.g.
9111	// "ConversationModelConfig") to unconditionally include in API
9112	// requests. By default, fields with empty values are omitted from API
9113	// requests. However, any non-pointer, non-interface field appearing in
9114	// ForceSendFields will be sent to the server regardless of whether the
9115	// field is empty or not. This may be used to include empty fields in
9116	// Patch requests.
9117	ForceSendFields []string `json:"-"`
9118
9119	// NullFields is a list of field names (e.g. "ConversationModelConfig")
9120	// to include in API requests with the JSON null value. By default,
9121	// fields with empty values are omitted from API requests. However, any
9122	// field with an empty value appearing in NullFields will be sent to the
9123	// server as null. It is an error if a field in this list has a
9124	// non-empty value. This may be used to include null fields in Patch
9125	// requests.
9126	NullFields []string `json:"-"`
9127}
9128
9129func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig) MarshalJSON() ([]byte, error) {
9130	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig
9131	raw := NoMethod(*s)
9132	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9133}
9134
9135// GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig:
9136//  Config for suggestion query.
9137type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig struct {
9138	// ConfidenceThreshold: Confidence threshold of query result. Agent
9139	// Assist gives each suggestion a score in the range [0.0, 1.0], based
9140	// on the relevance between the suggestion and the current conversation
9141	// context. A score of 0.0 has no relevance, while a score of 1.0 has
9142	// high relevance. Only suggestions with a score greater than or equal
9143	// to the value of this field are included in the results. For a
9144	// baseline model (the default), the recommended value is in the range
9145	// [0.05, 0.1]. For a custom model, there is no recommended value. Tune
9146	// this value by starting from a very low value and slowly increasing
9147	// until you have desired results. If this field is not set, it defaults
9148	// to 0.0, which means that all suggestions are returned. Supported
9149	// features: ARTICLE_SUGGESTION.
9150	ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"`
9151
9152	// ContextFilterSettings: Determines how recent conversation context is
9153	// filtered when generating suggestions. If unspecified, no messages
9154	// will be dropped.
9155	ContextFilterSettings *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings `json:"contextFilterSettings,omitempty"`
9156
9157	// DialogflowQuerySource: Query from Dialogflow agent. It is used by
9158	// DIALOGFLOW_ASSIST.
9159	DialogflowQuerySource *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource `json:"dialogflowQuerySource,omitempty"`
9160
9161	// DocumentQuerySource: Query from knowledge base document. It is used
9162	// by: SMART_REPLY, SMART_COMPOSE.
9163	DocumentQuerySource *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource `json:"documentQuerySource,omitempty"`
9164
9165	// KnowledgeBaseQuerySource: Query from knowledgebase. It is used by:
9166	// ARTICLE_SUGGESTION, FAQ.
9167	KnowledgeBaseQuerySource *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource `json:"knowledgeBaseQuerySource,omitempty"`
9168
9169	// MaxResults: Maximum number of results to return. Currently, if unset,
9170	// defaults to 10. And the max number is 20.
9171	MaxResults int64 `json:"maxResults,omitempty"`
9172
9173	// ForceSendFields is a list of field names (e.g. "ConfidenceThreshold")
9174	// to unconditionally include in API requests. By default, fields with
9175	// empty values are omitted from API requests. However, any non-pointer,
9176	// non-interface field appearing in ForceSendFields will be sent to the
9177	// server regardless of whether the field is empty or not. This may be
9178	// used to include empty fields in Patch requests.
9179	ForceSendFields []string `json:"-"`
9180
9181	// NullFields is a list of field names (e.g. "ConfidenceThreshold") to
9182	// include in API requests with the JSON null value. By default, fields
9183	// with empty values are omitted from API requests. However, any field
9184	// with an empty value appearing in NullFields will be sent to the
9185	// server as null. It is an error if a field in this list has a
9186	// non-empty value. This may be used to include null fields in Patch
9187	// requests.
9188	NullFields []string `json:"-"`
9189}
9190
9191func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig) MarshalJSON() ([]byte, error) {
9192	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig
9193	raw := NoMethod(*s)
9194	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9195}
9196
9197func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig) UnmarshalJSON(data []byte) error {
9198	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig
9199	var s1 struct {
9200		ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"`
9201		*NoMethod
9202	}
9203	s1.NoMethod = (*NoMethod)(s)
9204	if err := json.Unmarshal(data, &s1); err != nil {
9205		return err
9206	}
9207	s.ConfidenceThreshold = float64(s1.ConfidenceThreshold)
9208	return nil
9209}
9210
9211// GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigC
9212// ontextFilterSettings: Settings that determine how to filter recent
9213// conversation context when generating suggestions.
9214type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings struct {
9215	// DropHandoffMessages: If set to true, the last message from virtual
9216	// agent (hand off message) and the message before it (trigger message
9217	// of hand off) are dropped.
9218	DropHandoffMessages bool `json:"dropHandoffMessages,omitempty"`
9219
9220	// DropIvrMessages: If set to true, all messages from ivr stage are
9221	// dropped.
9222	DropIvrMessages bool `json:"dropIvrMessages,omitempty"`
9223
9224	// DropVirtualAgentMessages: If set to true, all messages from virtual
9225	// agent are dropped.
9226	DropVirtualAgentMessages bool `json:"dropVirtualAgentMessages,omitempty"`
9227
9228	// ForceSendFields is a list of field names (e.g. "DropHandoffMessages")
9229	// to unconditionally include in API requests. By default, fields with
9230	// empty values are omitted from API requests. However, any non-pointer,
9231	// non-interface field appearing in ForceSendFields will be sent to the
9232	// server regardless of whether the field is empty or not. This may be
9233	// used to include empty fields in Patch requests.
9234	ForceSendFields []string `json:"-"`
9235
9236	// NullFields is a list of field names (e.g. "DropHandoffMessages") to
9237	// include in API requests with the JSON null value. By default, fields
9238	// with empty values are omitted from API requests. However, any field
9239	// with an empty value appearing in NullFields will be sent to the
9240	// server as null. It is an error if a field in this list has a
9241	// non-empty value. This may be used to include null fields in Patch
9242	// requests.
9243	NullFields []string `json:"-"`
9244}
9245
9246func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings) MarshalJSON() ([]byte, error) {
9247	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings
9248	raw := NoMethod(*s)
9249	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9250}
9251
9252// GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigD
9253// ialogflowQuerySource: Dialogflow source setting. Supported feature:
9254// DIALOGFLOW_ASSIST.
9255type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource struct {
9256	// Agent: Required. The name of a Dialogflow virtual agent used for end
9257	// user side intent detection and suggestion. Format:
9258	// `projects//locations//agent`. When multiple agents are allowed in the
9259	// same Dialogflow project.
9260	Agent string `json:"agent,omitempty"`
9261
9262	// ForceSendFields is a list of field names (e.g. "Agent") to
9263	// unconditionally include in API requests. By default, fields with
9264	// empty values are omitted from API requests. However, any non-pointer,
9265	// non-interface field appearing in ForceSendFields will be sent to the
9266	// server regardless of whether the field is empty or not. This may be
9267	// used to include empty fields in Patch requests.
9268	ForceSendFields []string `json:"-"`
9269
9270	// NullFields is a list of field names (e.g. "Agent") to include in API
9271	// requests with the JSON null value. By default, fields with empty
9272	// values are omitted from API requests. However, any field with an
9273	// empty value appearing in NullFields will be sent to the server as
9274	// null. It is an error if a field in this list has a non-empty value.
9275	// This may be used to include null fields in Patch requests.
9276	NullFields []string `json:"-"`
9277}
9278
9279func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource) MarshalJSON() ([]byte, error) {
9280	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource
9281	raw := NoMethod(*s)
9282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9283}
9284
9285// GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigD
9286// ocumentQuerySource: Document source settings. Supported features:
9287// SMART_REPLY, SMART_COMPOSE.
9288type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource struct {
9289	// Documents: Required. Knowledge documents to query from. Format:
9290	// `projects//locations//knowledgeBases//documents/`. Currently, at most
9291	// 5 documents are supported.
9292	Documents []string `json:"documents,omitempty"`
9293
9294	// ForceSendFields is a list of field names (e.g. "Documents") to
9295	// unconditionally include in API requests. By default, fields with
9296	// empty values are omitted from API requests. However, any non-pointer,
9297	// non-interface field appearing in ForceSendFields will be sent to the
9298	// server regardless of whether the field is empty or not. This may be
9299	// used to include empty fields in Patch requests.
9300	ForceSendFields []string `json:"-"`
9301
9302	// NullFields is a list of field names (e.g. "Documents") to include in
9303	// API requests with the JSON null value. By default, fields with empty
9304	// values are omitted from API requests. However, any field with an
9305	// empty value appearing in NullFields will be sent to the server as
9306	// null. It is an error if a field in this list has a non-empty value.
9307	// This may be used to include null fields in Patch requests.
9308	NullFields []string `json:"-"`
9309}
9310
9311func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource) MarshalJSON() ([]byte, error) {
9312	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource
9313	raw := NoMethod(*s)
9314	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9315}
9316
9317// GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigK
9318// nowledgeBaseQuerySource: Knowledge base source settings. Supported
9319// features: ARTICLE_SUGGESTION, FAQ.
9320type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource struct {
9321	// KnowledgeBases: Required. Knowledge bases to query. Format:
9322	// `projects//locations//knowledgeBases/`. Currently, at most 5
9323	// knowledge bases are supported.
9324	KnowledgeBases []string `json:"knowledgeBases,omitempty"`
9325
9326	// ForceSendFields is a list of field names (e.g. "KnowledgeBases") to
9327	// unconditionally include in API requests. By default, fields with
9328	// empty values are omitted from API requests. However, any non-pointer,
9329	// non-interface field appearing in ForceSendFields will be sent to the
9330	// server regardless of whether the field is empty or not. This may be
9331	// used to include empty fields in Patch requests.
9332	ForceSendFields []string `json:"-"`
9333
9334	// NullFields is a list of field names (e.g. "KnowledgeBases") to
9335	// include in API requests with the JSON null value. By default, fields
9336	// with empty values are omitted from API requests. However, any field
9337	// with an empty value appearing in NullFields will be sent to the
9338	// server as null. It is an error if a field in this list has a
9339	// non-empty value. This may be used to include null fields in Patch
9340	// requests.
9341	NullFields []string `json:"-"`
9342}
9343
9344func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource) MarshalJSON() ([]byte, error) {
9345	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource
9346	raw := NoMethod(*s)
9347	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9348}
9349
9350// GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSetti
9351// ngs: Settings of suggestion trigger.
9352type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings struct {
9353	// NoSmalltalk: Do not trigger if last utterance is small talk.
9354	NoSmalltalk bool `json:"noSmalltalk,omitempty"`
9355
9356	// OnlyEndUser: Only trigger suggestion if participant role of last
9357	// utterance is END_USER.
9358	OnlyEndUser bool `json:"onlyEndUser,omitempty"`
9359
9360	// ForceSendFields is a list of field names (e.g. "NoSmalltalk") to
9361	// unconditionally include in API requests. By default, fields with
9362	// empty values are omitted from API requests. However, any non-pointer,
9363	// non-interface field appearing in ForceSendFields will be sent to the
9364	// server regardless of whether the field is empty or not. This may be
9365	// used to include empty fields in Patch requests.
9366	ForceSendFields []string `json:"-"`
9367
9368	// NullFields is a list of field names (e.g. "NoSmalltalk") to include
9369	// in API requests with the JSON null value. By default, fields with
9370	// empty values are omitted from API requests. However, any field with
9371	// an empty value appearing in NullFields will be sent to the server as
9372	// null. It is an error if a field in this list has a non-empty value.
9373	// This may be used to include null fields in Patch requests.
9374	NullFields []string `json:"-"`
9375}
9376
9377func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings) MarshalJSON() ([]byte, error) {
9378	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings
9379	raw := NoMethod(*s)
9380	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9381}
9382
9383// GoogleCloudDialogflowV2HumanAgentAssistantEvent: Represents a
9384// notification sent to Cloud Pub/Sub subscribers for human agent
9385// assistant events in a specific conversation.
9386type GoogleCloudDialogflowV2HumanAgentAssistantEvent struct {
9387	// Conversation: The conversation this notification refers to. Format:
9388	// `projects//conversations/`.
9389	Conversation string `json:"conversation,omitempty"`
9390
9391	// Participant: The participant that the suggestion is compiled for.
9392	// Format: `projects//conversations//participants/`. It will not be set
9393	// in legacy workflow.
9394	Participant string `json:"participant,omitempty"`
9395
9396	// SuggestionResults: The suggestion results payload that this
9397	// notification refers to.
9398	SuggestionResults []*GoogleCloudDialogflowV2SuggestionResult `json:"suggestionResults,omitempty"`
9399
9400	// ForceSendFields is a list of field names (e.g. "Conversation") to
9401	// unconditionally include in API requests. By default, fields with
9402	// empty values are omitted from API requests. However, any non-pointer,
9403	// non-interface field appearing in ForceSendFields will be sent to the
9404	// server regardless of whether the field is empty or not. This may be
9405	// used to include empty fields in Patch requests.
9406	ForceSendFields []string `json:"-"`
9407
9408	// NullFields is a list of field names (e.g. "Conversation") to include
9409	// in API requests with the JSON null value. By default, fields with
9410	// empty values are omitted from API requests. However, any field with
9411	// an empty value appearing in NullFields will be sent to the server as
9412	// null. It is an error if a field in this list has a non-empty value.
9413	// This may be used to include null fields in Patch requests.
9414	NullFields []string `json:"-"`
9415}
9416
9417func (s *GoogleCloudDialogflowV2HumanAgentAssistantEvent) MarshalJSON() ([]byte, error) {
9418	type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantEvent
9419	raw := NoMethod(*s)
9420	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9421}
9422
9423// GoogleCloudDialogflowV2HumanAgentHandoffConfig: Defines the hand off
9424// to a live agent, typically on which external agent service provider
9425// to connect to a conversation. Currently, this feature is not general
9426// available, please contact Google to get access.
9427type GoogleCloudDialogflowV2HumanAgentHandoffConfig struct {
9428	// LivePersonConfig: Uses LivePerson (https://www.liveperson.com).
9429	LivePersonConfig *GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig `json:"livePersonConfig,omitempty"`
9430
9431	// SalesforceLiveAgentConfig: Uses Salesforce Live Agent.
9432	SalesforceLiveAgentConfig *GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig `json:"salesforceLiveAgentConfig,omitempty"`
9433
9434	// ForceSendFields is a list of field names (e.g. "LivePersonConfig") to
9435	// unconditionally include in API requests. By default, fields with
9436	// empty values are omitted from API requests. However, any non-pointer,
9437	// non-interface field appearing in ForceSendFields will be sent to the
9438	// server regardless of whether the field is empty or not. This may be
9439	// used to include empty fields in Patch requests.
9440	ForceSendFields []string `json:"-"`
9441
9442	// NullFields is a list of field names (e.g. "LivePersonConfig") to
9443	// include in API requests with the JSON null value. By default, fields
9444	// with empty values are omitted from API requests. However, any field
9445	// with an empty value appearing in NullFields will be sent to the
9446	// server as null. It is an error if a field in this list has a
9447	// non-empty value. This may be used to include null fields in Patch
9448	// requests.
9449	NullFields []string `json:"-"`
9450}
9451
9452func (s *GoogleCloudDialogflowV2HumanAgentHandoffConfig) MarshalJSON() ([]byte, error) {
9453	type NoMethod GoogleCloudDialogflowV2HumanAgentHandoffConfig
9454	raw := NoMethod(*s)
9455	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9456}
9457
9458// GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig:
9459// Configuration specific to LivePerson (https://www.liveperson.com).
9460type GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig struct {
9461	// AccountNumber: Required. Account number of the LivePerson account to
9462	// connect. This is the account number you input at the login page.
9463	AccountNumber string `json:"accountNumber,omitempty"`
9464
9465	// ForceSendFields is a list of field names (e.g. "AccountNumber") to
9466	// unconditionally include in API requests. By default, fields with
9467	// empty values are omitted from API requests. However, any non-pointer,
9468	// non-interface field appearing in ForceSendFields will be sent to the
9469	// server regardless of whether the field is empty or not. This may be
9470	// used to include empty fields in Patch requests.
9471	ForceSendFields []string `json:"-"`
9472
9473	// NullFields is a list of field names (e.g. "AccountNumber") to include
9474	// in API requests with the JSON null value. By default, fields with
9475	// empty values are omitted from API requests. However, any field with
9476	// an empty value appearing in NullFields will be sent to the server as
9477	// null. It is an error if a field in this list has a non-empty value.
9478	// This may be used to include null fields in Patch requests.
9479	NullFields []string `json:"-"`
9480}
9481
9482func (s *GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig) MarshalJSON() ([]byte, error) {
9483	type NoMethod GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig
9484	raw := NoMethod(*s)
9485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9486}
9487
9488// GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfi
9489// g: Configuration specific to Salesforce Live Agent.
9490type GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig struct {
9491	// ButtonId: Required. Live Agent chat button ID.
9492	ButtonId string `json:"buttonId,omitempty"`
9493
9494	// DeploymentId: Required. Live Agent deployment ID.
9495	DeploymentId string `json:"deploymentId,omitempty"`
9496
9497	// EndpointDomain: Required. Domain of the Live Agent endpoint for this
9498	// agent. You can find the endpoint URL in the `Live Agent settings`
9499	// page. For example if URL has the form
9500	// https://d.la4-c2-phx.salesforceliveagent.com/..., you should fill in
9501	// d.la4-c2-phx.salesforceliveagent.com.
9502	EndpointDomain string `json:"endpointDomain,omitempty"`
9503
9504	// OrganizationId: Required. The organization ID of the Salesforce
9505	// account.
9506	OrganizationId string `json:"organizationId,omitempty"`
9507
9508	// ForceSendFields is a list of field names (e.g. "ButtonId") to
9509	// unconditionally include in API requests. By default, fields with
9510	// empty values are omitted from API requests. However, any non-pointer,
9511	// non-interface field appearing in ForceSendFields will be sent to the
9512	// server regardless of whether the field is empty or not. This may be
9513	// used to include empty fields in Patch requests.
9514	ForceSendFields []string `json:"-"`
9515
9516	// NullFields is a list of field names (e.g. "ButtonId") to include in
9517	// API requests with the JSON null value. By default, fields with empty
9518	// values are omitted from API requests. However, any field with an
9519	// empty value appearing in NullFields will be sent to the server as
9520	// null. It is an error if a field in this list has a non-empty value.
9521	// This may be used to include null fields in Patch requests.
9522	NullFields []string `json:"-"`
9523}
9524
9525func (s *GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig) MarshalJSON() ([]byte, error) {
9526	type NoMethod GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig
9527	raw := NoMethod(*s)
9528	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9529}
9530
9531// GoogleCloudDialogflowV2ImportAgentRequest: The request message for
9532// Agents.ImportAgent.
9533type GoogleCloudDialogflowV2ImportAgentRequest struct {
9534	// AgentContent: Zip compressed raw byte content for agent.
9535	AgentContent string `json:"agentContent,omitempty"`
9536
9537	// AgentUri: The URI to a Google Cloud Storage file containing the agent
9538	// to import. Note: The URI must start with "gs://".
9539	AgentUri string `json:"agentUri,omitempty"`
9540
9541	// ForceSendFields is a list of field names (e.g. "AgentContent") to
9542	// unconditionally include in API requests. By default, fields with
9543	// empty values are omitted from API requests. However, any non-pointer,
9544	// non-interface field appearing in ForceSendFields will be sent to the
9545	// server regardless of whether the field is empty or not. This may be
9546	// used to include empty fields in Patch requests.
9547	ForceSendFields []string `json:"-"`
9548
9549	// NullFields is a list of field names (e.g. "AgentContent") to include
9550	// in API requests with the JSON null value. By default, fields with
9551	// empty values are omitted from API requests. However, any field with
9552	// an empty value appearing in NullFields will be sent to the server as
9553	// null. It is an error if a field in this list has a non-empty value.
9554	// This may be used to include null fields in Patch requests.
9555	NullFields []string `json:"-"`
9556}
9557
9558func (s *GoogleCloudDialogflowV2ImportAgentRequest) MarshalJSON() ([]byte, error) {
9559	type NoMethod GoogleCloudDialogflowV2ImportAgentRequest
9560	raw := NoMethod(*s)
9561	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9562}
9563
9564// GoogleCloudDialogflowV2InputAudioConfig: Instructs the speech
9565// recognizer how to process the audio content.
9566type GoogleCloudDialogflowV2InputAudioConfig struct {
9567	// AudioEncoding: Required. Audio encoding of the audio content to
9568	// process.
9569	//
9570	// Possible values:
9571	//   "AUDIO_ENCODING_UNSPECIFIED" - Not specified.
9572	//   "AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
9573	// little-endian samples (Linear PCM).
9574	//   "AUDIO_ENCODING_FLAC" -
9575	// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless
9576	// Audio Codec) is the recommended encoding because it is lossless
9577	// (therefore recognition is not compromised) and requires only about
9578	// half the bandwidth of `LINEAR16`. `FLAC` stream encoding supports
9579	// 16-bit and 24-bit samples, however, not all fields in `STREAMINFO`
9580	// are supported.
9581	//   "AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit audio
9582	// samples using G.711 PCMU/mu-law.
9583	//   "AUDIO_ENCODING_AMR" - Adaptive Multi-Rate Narrowband codec.
9584	// `sample_rate_hertz` must be 8000.
9585	//   "AUDIO_ENCODING_AMR_WB" - Adaptive Multi-Rate Wideband codec.
9586	// `sample_rate_hertz` must be 16000.
9587	//   "AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio frames in Ogg
9588	// container ([OggOpus](https://wiki.xiph.org/OggOpus)).
9589	// `sample_rate_hertz` must be 16000.
9590	//   "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE" - Although the use of lossy
9591	// encodings is not recommended, if a very low bitrate encoding is
9592	// required, `OGG_OPUS` is highly preferred over Speex encoding. The
9593	// [Speex](https://speex.org/) encoding supported by Dialogflow API has
9594	// a header byte in each block, as in MIME type
9595	// `audio/x-speex-with-header-byte`. It is a variant of the RTP Speex
9596	// encoding defined in [RFC 5574](https://tools.ietf.org/html/rfc5574).
9597	// The stream is a sequence of blocks, one block per RTP packet. Each
9598	// block starts with a byte containing the length of the block, in
9599	// bytes, followed by one or more frames of Speex data, padded to an
9600	// integral number of bytes (octets) as specified in RFC 5574. In other
9601	// words, each RTP header is replaced with a single byte containing the
9602	// block length. Only Speex wideband is supported. `sample_rate_hertz`
9603	// must be 16000.
9604	AudioEncoding string `json:"audioEncoding,omitempty"`
9605
9606	// DisableNoSpeechRecognizedEvent: Only used in
9607	// Participants.AnalyzeContent and Participants.StreamingAnalyzeContent.
9608	// If `false` and recognition doesn't return any result, trigger
9609	// `NO_SPEECH_RECOGNIZED` event to Dialogflow agent.
9610	DisableNoSpeechRecognizedEvent bool `json:"disableNoSpeechRecognizedEvent,omitempty"`
9611
9612	// EnableWordInfo: If `true`, Dialogflow returns SpeechWordInfo in
9613	// StreamingRecognitionResult with information about the recognized
9614	// speech words, e.g. start and end time offsets. If false or
9615	// unspecified, Speech doesn't return any word-level information.
9616	EnableWordInfo bool `json:"enableWordInfo,omitempty"`
9617
9618	// LanguageCode: Required. The language of the supplied audio.
9619	// Dialogflow does not do translations. See Language Support
9620	// (https://cloud.google.com/dialogflow/docs/reference/language) for a
9621	// list of the currently supported language codes. Note that queries in
9622	// the same session do not necessarily need to specify the same
9623	// language.
9624	LanguageCode string `json:"languageCode,omitempty"`
9625
9626	// Model: Which Speech model to select for the given request. Select the
9627	// model best suited to your domain to get best results. If a model is
9628	// not explicitly specified, then we auto-select a model based on the
9629	// parameters in the InputAudioConfig. If enhanced speech model is
9630	// enabled for the agent and an enhanced version of the specified model
9631	// for the language does not exist, then the speech is recognized using
9632	// the standard version of the specified model. Refer to Cloud Speech
9633	// API documentation
9634	// (https://cloud.google.com/speech-to-text/docs/basics#select-model)
9635	// for more details.
9636	Model string `json:"model,omitempty"`
9637
9638	// ModelVariant: Which variant of the Speech model to use.
9639	//
9640	// Possible values:
9641	//   "SPEECH_MODEL_VARIANT_UNSPECIFIED" - No model variant specified. In
9642	// this case Dialogflow defaults to USE_BEST_AVAILABLE.
9643	//   "USE_BEST_AVAILABLE" - Use the best available variant of the Speech
9644	// model that the caller is eligible for. Please see the [Dialogflow
9645	// docs](https://cloud.google.com/dialogflow/docs/data-logging) for how
9646	// to make your project eligible for enhanced models.
9647	//   "USE_STANDARD" - Use standard model variant even if an enhanced
9648	// model is available. See the [Cloud Speech
9649	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
9650	// odels) for details about enhanced models.
9651	//   "USE_ENHANCED" - Use an enhanced model variant: * If an enhanced
9652	// variant does not exist for the given model and request language,
9653	// Dialogflow falls back to the standard variant. The [Cloud Speech
9654	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
9655	// odels) describes which models have enhanced variants. * If the API
9656	// caller isn't eligible for enhanced models, Dialogflow returns an
9657	// error. Please see the [Dialogflow
9658	// docs](https://cloud.google.com/dialogflow/docs/data-logging) for how
9659	// to make your project eligible.
9660	ModelVariant string `json:"modelVariant,omitempty"`
9661
9662	// PhraseHints: A list of strings containing words and phrases that the
9663	// speech recognizer should recognize with higher likelihood. See the
9664	// Cloud Speech documentation
9665	// (https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
9666	// for more details. This field is deprecated. Please use
9667	// speech_contexts () instead. If you specify both phrase_hints () and
9668	// speech_contexts (), Dialogflow will treat the phrase_hints () as a
9669	// single additional SpeechContext ().
9670	PhraseHints []string `json:"phraseHints,omitempty"`
9671
9672	// SampleRateHertz: Required. Sample rate (in Hertz) of the audio
9673	// content sent in the query. Refer to Cloud Speech API documentation
9674	// (https://cloud.google.com/speech-to-text/docs/basics) for more
9675	// details.
9676	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
9677
9678	// SingleUtterance: If `false` (default), recognition does not cease
9679	// until the client closes the stream. If `true`, the recognizer will
9680	// detect a single spoken utterance in input audio. Recognition ceases
9681	// when it detects the audio's voice has stopped or paused. In this
9682	// case, once a detected intent is received, the client should close the
9683	// stream and start a new request with a new stream as needed. Note:
9684	// This setting is relevant only for streaming methods. Note: When
9685	// specified, InputAudioConfig.single_utterance takes precedence over
9686	// StreamingDetectIntentRequest.single_utterance.
9687	SingleUtterance bool `json:"singleUtterance,omitempty"`
9688
9689	// SpeechContexts: Context information to assist speech recognition. See
9690	// the Cloud Speech documentation
9691	// (https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
9692	// for more details.
9693	SpeechContexts []*GoogleCloudDialogflowV2SpeechContext `json:"speechContexts,omitempty"`
9694
9695	// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
9696	// unconditionally include in API requests. By default, fields with
9697	// empty values are omitted from API requests. However, any non-pointer,
9698	// non-interface field appearing in ForceSendFields will be sent to the
9699	// server regardless of whether the field is empty or not. This may be
9700	// used to include empty fields in Patch requests.
9701	ForceSendFields []string `json:"-"`
9702
9703	// NullFields is a list of field names (e.g. "AudioEncoding") to include
9704	// in API requests with the JSON null value. By default, fields with
9705	// empty values are omitted from API requests. However, any field with
9706	// an empty value appearing in NullFields will be sent to the server as
9707	// null. It is an error if a field in this list has a non-empty value.
9708	// This may be used to include null fields in Patch requests.
9709	NullFields []string `json:"-"`
9710}
9711
9712func (s *GoogleCloudDialogflowV2InputAudioConfig) MarshalJSON() ([]byte, error) {
9713	type NoMethod GoogleCloudDialogflowV2InputAudioConfig
9714	raw := NoMethod(*s)
9715	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9716}
9717
9718// GoogleCloudDialogflowV2Intent: An intent categorizes an end-user's
9719// intention for one conversation turn. For each agent, you define many
9720// intents, where your combined intents can handle a complete
9721// conversation. When an end-user writes or says something, referred to
9722// as an end-user expression or end-user input, Dialogflow matches the
9723// end-user input to the best intent in your agent. Matching an intent
9724// is also known as intent classification. For more information, see the
9725// intent guide
9726// (https://cloud.google.com/dialogflow/docs/intents-overview).
9727type GoogleCloudDialogflowV2Intent struct {
9728	// Action: Optional. The name of the action associated with the intent.
9729	// Note: The action name must not contain whitespaces.
9730	Action string `json:"action,omitempty"`
9731
9732	// DefaultResponsePlatforms: Optional. The list of platforms for which
9733	// the first responses will be copied from the messages in
9734	// PLATFORM_UNSPECIFIED (i.e. default platform).
9735	//
9736	// Possible values:
9737	//   "PLATFORM_UNSPECIFIED" - Default platform.
9738	//   "FACEBOOK" - Facebook.
9739	//   "SLACK" - Slack.
9740	//   "TELEGRAM" - Telegram.
9741	//   "KIK" - Kik.
9742	//   "SKYPE" - Skype.
9743	//   "LINE" - Line.
9744	//   "VIBER" - Viber.
9745	//   "ACTIONS_ON_GOOGLE" - Google Assistant See [Dialogflow webhook
9746	// format](https://developers.google.com/assistant/actions/build/json/dia
9747	// logflow-webhook-json)
9748	//   "GOOGLE_HANGOUTS" - Google Hangouts.
9749	DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"`
9750
9751	// DisplayName: Required. The name of this intent.
9752	DisplayName string `json:"displayName,omitempty"`
9753
9754	// EndInteraction: Optional. Indicates that this intent ends an
9755	// interaction. Some integrations (e.g., Actions on Google or Dialogflow
9756	// phone gateway) use this information to close interaction with an end
9757	// user. Default is false.
9758	EndInteraction bool `json:"endInteraction,omitempty"`
9759
9760	// Events: Optional. The collection of event names that trigger the
9761	// intent. If the collection of input contexts is not empty, all of the
9762	// contexts must be present in the active user session for an event to
9763	// trigger this intent. Event names are limited to 150 characters.
9764	Events []string `json:"events,omitempty"`
9765
9766	// FollowupIntentInfo: Read-only. Information about all followup intents
9767	// that have this intent as a direct or indirect parent. We populate
9768	// this field only in the output.
9769	FollowupIntentInfo []*GoogleCloudDialogflowV2IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"`
9770
9771	// InputContextNames: Optional. The list of context names required for
9772	// this intent to be triggered. Format:
9773	// `projects//agent/sessions/-/contexts/`.
9774	InputContextNames []string `json:"inputContextNames,omitempty"`
9775
9776	// IsFallback: Optional. Indicates whether this is a fallback intent.
9777	IsFallback bool `json:"isFallback,omitempty"`
9778
9779	// LiveAgentHandoff: Optional. Indicates that a live agent should be
9780	// brought in to handle the interaction with the user. In most cases,
9781	// when you set this flag to true, you would also want to set
9782	// end_interaction to true as well. Default is false.
9783	LiveAgentHandoff bool `json:"liveAgentHandoff,omitempty"`
9784
9785	// Messages: Optional. The collection of rich messages corresponding to
9786	// the `Response` field in the Dialogflow console.
9787	Messages []*GoogleCloudDialogflowV2IntentMessage `json:"messages,omitempty"`
9788
9789	// MlDisabled: Optional. Indicates whether Machine Learning is disabled
9790	// for the intent. Note: If `ml_disabled` setting is set to true, then
9791	// this intent is not taken into account during inference in `ML ONLY`
9792	// match mode. Also, auto-markup in the UI is turned off.
9793	MlDisabled bool `json:"mlDisabled,omitempty"`
9794
9795	// Name: Optional. The unique identifier of this intent. Required for
9796	// Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format:
9797	// `projects//agent/intents/`.
9798	Name string `json:"name,omitempty"`
9799
9800	// OutputContexts: Optional. The collection of contexts that are
9801	// activated when the intent is matched. Context messages in this
9802	// collection should not set the parameters field. Setting the
9803	// `lifespan_count` to 0 will reset the context when the intent is
9804	// matched. Format: `projects//agent/sessions/-/contexts/`.
9805	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
9806
9807	// Parameters: Optional. The collection of parameters associated with
9808	// the intent.
9809	Parameters []*GoogleCloudDialogflowV2IntentParameter `json:"parameters,omitempty"`
9810
9811	// ParentFollowupIntentName: Read-only after creation. The unique
9812	// identifier of the parent intent in the chain of followup intents. You
9813	// can set this field when creating an intent, for example with
9814	// CreateIntent or BatchUpdateIntents, in order to make this intent a
9815	// followup intent. It identifies the parent followup intent. Format:
9816	// `projects//agent/intents/`.
9817	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
9818
9819	// Priority: Optional. The priority of this intent. Higher numbers
9820	// represent higher priorities. - If the supplied value is unspecified
9821	// or 0, the service translates the value to 500,000, which corresponds
9822	// to the `Normal` priority in the console. - If the supplied value is
9823	// negative, the intent is ignored in runtime detect intent requests.
9824	Priority int64 `json:"priority,omitempty"`
9825
9826	// ResetContexts: Optional. Indicates whether to delete all contexts in
9827	// the current session when this intent is matched.
9828	ResetContexts bool `json:"resetContexts,omitempty"`
9829
9830	// RootFollowupIntentName: Read-only. The unique identifier of the root
9831	// intent in the chain of followup intents. It identifies the correct
9832	// followup intents chain for this intent. We populate this field only
9833	// in the output. Format: `projects//agent/intents/`.
9834	RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"`
9835
9836	// TrainingPhrases: Optional. The collection of examples that the agent
9837	// is trained on.
9838	TrainingPhrases []*GoogleCloudDialogflowV2IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
9839
9840	// WebhookState: Optional. Indicates whether webhooks are enabled for
9841	// the intent.
9842	//
9843	// Possible values:
9844	//   "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and
9845	// in the intent.
9846	//   "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in
9847	// the intent.
9848	//   "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in
9849	// the agent and in the intent. Also, each slot filling prompt is
9850	// forwarded to the webhook.
9851	WebhookState string `json:"webhookState,omitempty"`
9852
9853	// ServerResponse contains the HTTP response code and headers from the
9854	// server.
9855	googleapi.ServerResponse `json:"-"`
9856
9857	// ForceSendFields is a list of field names (e.g. "Action") to
9858	// unconditionally include in API requests. By default, fields with
9859	// empty values are omitted from API requests. However, any non-pointer,
9860	// non-interface field appearing in ForceSendFields will be sent to the
9861	// server regardless of whether the field is empty or not. This may be
9862	// used to include empty fields in Patch requests.
9863	ForceSendFields []string `json:"-"`
9864
9865	// NullFields is a list of field names (e.g. "Action") to include in API
9866	// requests with the JSON null value. By default, fields with empty
9867	// values are omitted from API requests. However, any field with an
9868	// empty value appearing in NullFields will be sent to the server as
9869	// null. It is an error if a field in this list has a non-empty value.
9870	// This may be used to include null fields in Patch requests.
9871	NullFields []string `json:"-"`
9872}
9873
9874func (s *GoogleCloudDialogflowV2Intent) MarshalJSON() ([]byte, error) {
9875	type NoMethod GoogleCloudDialogflowV2Intent
9876	raw := NoMethod(*s)
9877	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9878}
9879
9880// GoogleCloudDialogflowV2IntentBatch: This message is a wrapper around
9881// a collection of intents.
9882type GoogleCloudDialogflowV2IntentBatch struct {
9883	// Intents: A collection of intents.
9884	Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"`
9885
9886	// ForceSendFields is a list of field names (e.g. "Intents") to
9887	// unconditionally include in API requests. By default, fields with
9888	// empty values are omitted from API requests. However, any non-pointer,
9889	// non-interface field appearing in ForceSendFields will be sent to the
9890	// server regardless of whether the field is empty or not. This may be
9891	// used to include empty fields in Patch requests.
9892	ForceSendFields []string `json:"-"`
9893
9894	// NullFields is a list of field names (e.g. "Intents") to include in
9895	// API requests with the JSON null value. By default, fields with empty
9896	// values are omitted from API requests. However, any field with an
9897	// empty value appearing in NullFields will be sent to the server as
9898	// null. It is an error if a field in this list has a non-empty value.
9899	// This may be used to include null fields in Patch requests.
9900	NullFields []string `json:"-"`
9901}
9902
9903func (s *GoogleCloudDialogflowV2IntentBatch) MarshalJSON() ([]byte, error) {
9904	type NoMethod GoogleCloudDialogflowV2IntentBatch
9905	raw := NoMethod(*s)
9906	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9907}
9908
9909// GoogleCloudDialogflowV2IntentFollowupIntentInfo: Represents a single
9910// followup intent in the chain.
9911type GoogleCloudDialogflowV2IntentFollowupIntentInfo struct {
9912	// FollowupIntentName: The unique identifier of the followup intent.
9913	// Format: `projects//agent/intents/`.
9914	FollowupIntentName string `json:"followupIntentName,omitempty"`
9915
9916	// ParentFollowupIntentName: The unique identifier of the followup
9917	// intent's parent. Format: `projects//agent/intents/`.
9918	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
9919
9920	// ForceSendFields is a list of field names (e.g. "FollowupIntentName")
9921	// to unconditionally include in API requests. By default, fields with
9922	// empty values are omitted from API requests. However, any non-pointer,
9923	// non-interface field appearing in ForceSendFields will be sent to the
9924	// server regardless of whether the field is empty or not. This may be
9925	// used to include empty fields in Patch requests.
9926	ForceSendFields []string `json:"-"`
9927
9928	// NullFields is a list of field names (e.g. "FollowupIntentName") to
9929	// include in API requests with the JSON null value. By default, fields
9930	// with empty values are omitted from API requests. However, any field
9931	// with an empty value appearing in NullFields will be sent to the
9932	// server as null. It is an error if a field in this list has a
9933	// non-empty value. This may be used to include null fields in Patch
9934	// requests.
9935	NullFields []string `json:"-"`
9936}
9937
9938func (s *GoogleCloudDialogflowV2IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) {
9939	type NoMethod GoogleCloudDialogflowV2IntentFollowupIntentInfo
9940	raw := NoMethod(*s)
9941	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9942}
9943
9944// GoogleCloudDialogflowV2IntentMessage: A rich response message.
9945// Corresponds to the intent `Response` field in the Dialogflow console.
9946// For more information, see Rich response messages
9947// (https://cloud.google.com/dialogflow/docs/intents-rich-messages).
9948type GoogleCloudDialogflowV2IntentMessage struct {
9949	// BasicCard: The basic card response for Actions on Google.
9950	BasicCard *GoogleCloudDialogflowV2IntentMessageBasicCard `json:"basicCard,omitempty"`
9951
9952	// BrowseCarouselCard: Browse carousel card for Actions on Google.
9953	BrowseCarouselCard *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"`
9954
9955	// Card: The card response.
9956	Card *GoogleCloudDialogflowV2IntentMessageCard `json:"card,omitempty"`
9957
9958	// CarouselSelect: The carousel card response for Actions on Google.
9959	CarouselSelect *GoogleCloudDialogflowV2IntentMessageCarouselSelect `json:"carouselSelect,omitempty"`
9960
9961	// Image: The image response.
9962	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
9963
9964	// LinkOutSuggestion: The link out suggestion chip for Actions on
9965	// Google.
9966	LinkOutSuggestion *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"`
9967
9968	// ListSelect: The list card response for Actions on Google.
9969	ListSelect *GoogleCloudDialogflowV2IntentMessageListSelect `json:"listSelect,omitempty"`
9970
9971	// MediaContent: The media content card for Actions on Google.
9972	MediaContent *GoogleCloudDialogflowV2IntentMessageMediaContent `json:"mediaContent,omitempty"`
9973
9974	// Payload: A custom platform-specific response.
9975	Payload googleapi.RawMessage `json:"payload,omitempty"`
9976
9977	// Platform: Optional. The platform that this message is intended for.
9978	//
9979	// Possible values:
9980	//   "PLATFORM_UNSPECIFIED" - Default platform.
9981	//   "FACEBOOK" - Facebook.
9982	//   "SLACK" - Slack.
9983	//   "TELEGRAM" - Telegram.
9984	//   "KIK" - Kik.
9985	//   "SKYPE" - Skype.
9986	//   "LINE" - Line.
9987	//   "VIBER" - Viber.
9988	//   "ACTIONS_ON_GOOGLE" - Google Assistant See [Dialogflow webhook
9989	// format](https://developers.google.com/assistant/actions/build/json/dia
9990	// logflow-webhook-json)
9991	//   "GOOGLE_HANGOUTS" - Google Hangouts.
9992	Platform string `json:"platform,omitempty"`
9993
9994	// QuickReplies: The quick replies response.
9995	QuickReplies *GoogleCloudDialogflowV2IntentMessageQuickReplies `json:"quickReplies,omitempty"`
9996
9997	// SimpleResponses: The voice and text-only responses for Actions on
9998	// Google.
9999	SimpleResponses *GoogleCloudDialogflowV2IntentMessageSimpleResponses `json:"simpleResponses,omitempty"`
10000
10001	// Suggestions: The suggestion chips for Actions on Google.
10002	Suggestions *GoogleCloudDialogflowV2IntentMessageSuggestions `json:"suggestions,omitempty"`
10003
10004	// TableCard: Table card for Actions on Google.
10005	TableCard *GoogleCloudDialogflowV2IntentMessageTableCard `json:"tableCard,omitempty"`
10006
10007	// Text: The text response.
10008	Text *GoogleCloudDialogflowV2IntentMessageText `json:"text,omitempty"`
10009
10010	// ForceSendFields is a list of field names (e.g. "BasicCard") to
10011	// unconditionally include in API requests. By default, fields with
10012	// empty values are omitted from API requests. However, any non-pointer,
10013	// non-interface field appearing in ForceSendFields will be sent to the
10014	// server regardless of whether the field is empty or not. This may be
10015	// used to include empty fields in Patch requests.
10016	ForceSendFields []string `json:"-"`
10017
10018	// NullFields is a list of field names (e.g. "BasicCard") to include in
10019	// API requests with the JSON null value. By default, fields with empty
10020	// values are omitted from API requests. However, any field with an
10021	// empty value appearing in NullFields will be sent to the server as
10022	// null. It is an error if a field in this list has a non-empty value.
10023	// This may be used to include null fields in Patch requests.
10024	NullFields []string `json:"-"`
10025}
10026
10027func (s *GoogleCloudDialogflowV2IntentMessage) MarshalJSON() ([]byte, error) {
10028	type NoMethod GoogleCloudDialogflowV2IntentMessage
10029	raw := NoMethod(*s)
10030	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10031}
10032
10033// GoogleCloudDialogflowV2IntentMessageBasicCard: The basic card
10034// message. Useful for displaying information.
10035type GoogleCloudDialogflowV2IntentMessageBasicCard struct {
10036	// Buttons: Optional. The collection of card buttons.
10037	Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"`
10038
10039	// FormattedText: Required, unless image is present. The body text of
10040	// the card.
10041	FormattedText string `json:"formattedText,omitempty"`
10042
10043	// Image: Optional. The image for the card.
10044	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
10045
10046	// Subtitle: Optional. The subtitle of the card.
10047	Subtitle string `json:"subtitle,omitempty"`
10048
10049	// Title: Optional. The title of the card.
10050	Title string `json:"title,omitempty"`
10051
10052	// ForceSendFields is a list of field names (e.g. "Buttons") to
10053	// unconditionally include in API requests. By default, fields with
10054	// empty values are omitted from API requests. However, any non-pointer,
10055	// non-interface field appearing in ForceSendFields will be sent to the
10056	// server regardless of whether the field is empty or not. This may be
10057	// used to include empty fields in Patch requests.
10058	ForceSendFields []string `json:"-"`
10059
10060	// NullFields is a list of field names (e.g. "Buttons") to include in
10061	// API requests with the JSON null value. By default, fields with empty
10062	// values are omitted from API requests. However, any field with an
10063	// empty value appearing in NullFields will be sent to the server as
10064	// null. It is an error if a field in this list has a non-empty value.
10065	// This may be used to include null fields in Patch requests.
10066	NullFields []string `json:"-"`
10067}
10068
10069func (s *GoogleCloudDialogflowV2IntentMessageBasicCard) MarshalJSON() ([]byte, error) {
10070	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCard
10071	raw := NoMethod(*s)
10072	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10073}
10074
10075// GoogleCloudDialogflowV2IntentMessageBasicCardButton: The button
10076// object that appears at the bottom of a card.
10077type GoogleCloudDialogflowV2IntentMessageBasicCardButton struct {
10078	// OpenUriAction: Required. Action to take when a user taps on the
10079	// button.
10080	OpenUriAction *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"`
10081
10082	// Title: Required. The title of the button.
10083	Title string `json:"title,omitempty"`
10084
10085	// ForceSendFields is a list of field names (e.g. "OpenUriAction") to
10086	// unconditionally include in API requests. By default, fields with
10087	// empty values are omitted from API requests. However, any non-pointer,
10088	// non-interface field appearing in ForceSendFields will be sent to the
10089	// server regardless of whether the field is empty or not. This may be
10090	// used to include empty fields in Patch requests.
10091	ForceSendFields []string `json:"-"`
10092
10093	// NullFields is a list of field names (e.g. "OpenUriAction") to include
10094	// in API requests with the JSON null value. By default, fields with
10095	// empty values are omitted from API requests. However, any field with
10096	// an empty value appearing in NullFields will be sent to the server as
10097	// null. It is an error if a field in this list has a non-empty value.
10098	// This may be used to include null fields in Patch requests.
10099	NullFields []string `json:"-"`
10100}
10101
10102func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) {
10103	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButton
10104	raw := NoMethod(*s)
10105	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10106}
10107
10108// GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction:
10109// Opens the given URI.
10110type GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction struct {
10111	// Uri: Required. The HTTP or HTTPS scheme URI.
10112	Uri string `json:"uri,omitempty"`
10113
10114	// ForceSendFields is a list of field names (e.g. "Uri") to
10115	// unconditionally include in API requests. By default, fields with
10116	// empty values are omitted from API requests. However, any non-pointer,
10117	// non-interface field appearing in ForceSendFields will be sent to the
10118	// server regardless of whether the field is empty or not. This may be
10119	// used to include empty fields in Patch requests.
10120	ForceSendFields []string `json:"-"`
10121
10122	// NullFields is a list of field names (e.g. "Uri") to include in API
10123	// requests with the JSON null value. By default, fields with empty
10124	// values are omitted from API requests. However, any field with an
10125	// empty value appearing in NullFields will be sent to the server as
10126	// null. It is an error if a field in this list has a non-empty value.
10127	// This may be used to include null fields in Patch requests.
10128	NullFields []string `json:"-"`
10129}
10130
10131func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) {
10132	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
10133	raw := NoMethod(*s)
10134	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10135}
10136
10137// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard: Browse
10138// Carousel Card for Actions on Google.
10139// https://developers.google.com/actions/assistant/responses#browsing_carousel
10140type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard struct {
10141	// ImageDisplayOptions: Optional. Settings for displaying the image.
10142	// Applies to every image in items.
10143	//
10144	// Possible values:
10145	//   "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the
10146	// image and the image container with gray bars.
10147	//   "GRAY" - Fill the gaps between the image and the image container
10148	// with gray bars.
10149	//   "WHITE" - Fill the gaps between the image and the image container
10150	// with white bars.
10151	//   "CROPPED" - Image is scaled such that the image width and height
10152	// match or exceed the container dimensions. This may crop the top and
10153	// bottom of the image if the scaled image height is greater than the
10154	// container height, or crop the left and right of the image if the
10155	// scaled image width is greater than the container width. This is
10156	// similar to "Zoom Mode" on a widescreen TV when playing a 4:3 video.
10157	//   "BLURRED_BACKGROUND" - Pad the gaps between image and image frame
10158	// with a blurred copy of the same image.
10159	ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"`
10160
10161	// Items: Required. List of items in the Browse Carousel Card. Minimum
10162	// of two items, maximum of ten.
10163	Items []*GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"`
10164
10165	// ForceSendFields is a list of field names (e.g. "ImageDisplayOptions")
10166	// to unconditionally include in API requests. By default, fields with
10167	// empty values are omitted from API requests. However, any non-pointer,
10168	// non-interface field appearing in ForceSendFields will be sent to the
10169	// server regardless of whether the field is empty or not. This may be
10170	// used to include empty fields in Patch requests.
10171	ForceSendFields []string `json:"-"`
10172
10173	// NullFields is a list of field names (e.g. "ImageDisplayOptions") to
10174	// include in API requests with the JSON null value. By default, fields
10175	// with empty values are omitted from API requests. However, any field
10176	// with an empty value appearing in NullFields will be sent to the
10177	// server as null. It is an error if a field in this list has a
10178	// non-empty value. This may be used to include null fields in Patch
10179	// requests.
10180	NullFields []string `json:"-"`
10181}
10182
10183func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) {
10184	type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard
10185	raw := NoMethod(*s)
10186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10187}
10188
10189// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa
10190// rdItem: Browsing carousel tile
10191type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct {
10192	// Description: Optional. Description of the carousel item. Maximum of
10193	// four lines of text.
10194	Description string `json:"description,omitempty"`
10195
10196	// Footer: Optional. Text that appears at the bottom of the Browse
10197	// Carousel Card. Maximum of one line of text.
10198	Footer string `json:"footer,omitempty"`
10199
10200	// Image: Optional. Hero image for the carousel item.
10201	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
10202
10203	// OpenUriAction: Required. Action to present to the user.
10204	OpenUriAction *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"`
10205
10206	// Title: Required. Title of the carousel item. Maximum of two lines of
10207	// text.
10208	Title string `json:"title,omitempty"`
10209
10210	// ForceSendFields is a list of field names (e.g. "Description") to
10211	// unconditionally include in API requests. By default, fields with
10212	// empty values are omitted from API requests. However, any non-pointer,
10213	// non-interface field appearing in ForceSendFields will be sent to the
10214	// server regardless of whether the field is empty or not. This may be
10215	// used to include empty fields in Patch requests.
10216	ForceSendFields []string `json:"-"`
10217
10218	// NullFields is a list of field names (e.g. "Description") to include
10219	// in API requests with the JSON null value. By default, fields with
10220	// empty values are omitted from API requests. However, any field with
10221	// an empty value appearing in NullFields will be sent to the server as
10222	// null. It is an error if a field in this list has a non-empty value.
10223	// This may be used to include null fields in Patch requests.
10224	NullFields []string `json:"-"`
10225}
10226
10227func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) {
10228	type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem
10229	raw := NoMethod(*s)
10230	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10231}
10232
10233// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa
10234// rdItemOpenUrlAction: Actions on Google action to open a given url.
10235type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct {
10236	// Url: Required. URL
10237	Url string `json:"url,omitempty"`
10238
10239	// UrlTypeHint: Optional. Specifies the type of viewer that is used when
10240	// opening the URL. Defaults to opening via web browser.
10241	//
10242	// Possible values:
10243	//   "URL_TYPE_HINT_UNSPECIFIED" - Unspecified
10244	//   "AMP_ACTION" - Url would be an amp action
10245	//   "AMP_CONTENT" - URL that points directly to AMP content, or to a
10246	// canonical URL which refers to AMP content via .
10247	UrlTypeHint string `json:"urlTypeHint,omitempty"`
10248
10249	// ForceSendFields is a list of field names (e.g. "Url") to
10250	// unconditionally include in API requests. By default, fields with
10251	// empty values are omitted from API requests. However, any non-pointer,
10252	// non-interface field appearing in ForceSendFields will be sent to the
10253	// server regardless of whether the field is empty or not. This may be
10254	// used to include empty fields in Patch requests.
10255	ForceSendFields []string `json:"-"`
10256
10257	// NullFields is a list of field names (e.g. "Url") to include in API
10258	// requests with the JSON null value. By default, fields with empty
10259	// values are omitted from API requests. However, any field with an
10260	// empty value appearing in NullFields will be sent to the server as
10261	// null. It is an error if a field in this list has a non-empty value.
10262	// This may be used to include null fields in Patch requests.
10263	NullFields []string `json:"-"`
10264}
10265
10266func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) {
10267	type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
10268	raw := NoMethod(*s)
10269	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10270}
10271
10272// GoogleCloudDialogflowV2IntentMessageCard: The card response message.
10273type GoogleCloudDialogflowV2IntentMessageCard struct {
10274	// Buttons: Optional. The collection of card buttons.
10275	Buttons []*GoogleCloudDialogflowV2IntentMessageCardButton `json:"buttons,omitempty"`
10276
10277	// ImageUri: Optional. The public URI to an image file for the card.
10278	ImageUri string `json:"imageUri,omitempty"`
10279
10280	// Subtitle: Optional. The subtitle of the card.
10281	Subtitle string `json:"subtitle,omitempty"`
10282
10283	// Title: Optional. The title of the card.
10284	Title string `json:"title,omitempty"`
10285
10286	// ForceSendFields is a list of field names (e.g. "Buttons") to
10287	// unconditionally include in API requests. By default, fields with
10288	// empty values are omitted from API requests. However, any non-pointer,
10289	// non-interface field appearing in ForceSendFields will be sent to the
10290	// server regardless of whether the field is empty or not. This may be
10291	// used to include empty fields in Patch requests.
10292	ForceSendFields []string `json:"-"`
10293
10294	// NullFields is a list of field names (e.g. "Buttons") to include in
10295	// API requests with the JSON null value. By default, fields with empty
10296	// values are omitted from API requests. However, any field with an
10297	// empty value appearing in NullFields will be sent to the server as
10298	// null. It is an error if a field in this list has a non-empty value.
10299	// This may be used to include null fields in Patch requests.
10300	NullFields []string `json:"-"`
10301}
10302
10303func (s *GoogleCloudDialogflowV2IntentMessageCard) MarshalJSON() ([]byte, error) {
10304	type NoMethod GoogleCloudDialogflowV2IntentMessageCard
10305	raw := NoMethod(*s)
10306	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10307}
10308
10309// GoogleCloudDialogflowV2IntentMessageCardButton: Contains information
10310// about a button.
10311type GoogleCloudDialogflowV2IntentMessageCardButton struct {
10312	// Postback: Optional. The text to send back to the Dialogflow API or a
10313	// URI to open.
10314	Postback string `json:"postback,omitempty"`
10315
10316	// Text: Optional. The text to show on the button.
10317	Text string `json:"text,omitempty"`
10318
10319	// ForceSendFields is a list of field names (e.g. "Postback") to
10320	// unconditionally include in API requests. By default, fields with
10321	// empty values are omitted from API requests. However, any non-pointer,
10322	// non-interface field appearing in ForceSendFields will be sent to the
10323	// server regardless of whether the field is empty or not. This may be
10324	// used to include empty fields in Patch requests.
10325	ForceSendFields []string `json:"-"`
10326
10327	// NullFields is a list of field names (e.g. "Postback") to include in
10328	// API requests with the JSON null value. By default, fields with empty
10329	// values are omitted from API requests. However, any field with an
10330	// empty value appearing in NullFields will be sent to the server as
10331	// null. It is an error if a field in this list has a non-empty value.
10332	// This may be used to include null fields in Patch requests.
10333	NullFields []string `json:"-"`
10334}
10335
10336func (s *GoogleCloudDialogflowV2IntentMessageCardButton) MarshalJSON() ([]byte, error) {
10337	type NoMethod GoogleCloudDialogflowV2IntentMessageCardButton
10338	raw := NoMethod(*s)
10339	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10340}
10341
10342// GoogleCloudDialogflowV2IntentMessageCarouselSelect: The card for
10343// presenting a carousel of options to select from.
10344type GoogleCloudDialogflowV2IntentMessageCarouselSelect struct {
10345	// Items: Required. Carousel items.
10346	Items []*GoogleCloudDialogflowV2IntentMessageCarouselSelectItem `json:"items,omitempty"`
10347
10348	// ForceSendFields is a list of field names (e.g. "Items") to
10349	// unconditionally include in API requests. By default, fields with
10350	// empty values are omitted from API requests. However, any non-pointer,
10351	// non-interface field appearing in ForceSendFields will be sent to the
10352	// server regardless of whether the field is empty or not. This may be
10353	// used to include empty fields in Patch requests.
10354	ForceSendFields []string `json:"-"`
10355
10356	// NullFields is a list of field names (e.g. "Items") to include in API
10357	// requests with the JSON null value. By default, fields with empty
10358	// values are omitted from API requests. However, any field with an
10359	// empty value appearing in NullFields will be sent to the server as
10360	// null. It is an error if a field in this list has a non-empty value.
10361	// This may be used to include null fields in Patch requests.
10362	NullFields []string `json:"-"`
10363}
10364
10365func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) {
10366	type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelect
10367	raw := NoMethod(*s)
10368	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10369}
10370
10371// GoogleCloudDialogflowV2IntentMessageCarouselSelectItem: An item in
10372// the carousel.
10373type GoogleCloudDialogflowV2IntentMessageCarouselSelectItem struct {
10374	// Description: Optional. The body text of the card.
10375	Description string `json:"description,omitempty"`
10376
10377	// Image: Optional. The image to display.
10378	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
10379
10380	// Info: Required. Additional info about the option item.
10381	Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"`
10382
10383	// Title: Required. Title of the carousel item.
10384	Title string `json:"title,omitempty"`
10385
10386	// ForceSendFields is a list of field names (e.g. "Description") to
10387	// unconditionally include in API requests. By default, fields with
10388	// empty values are omitted from API requests. However, any non-pointer,
10389	// non-interface field appearing in ForceSendFields will be sent to the
10390	// server regardless of whether the field is empty or not. This may be
10391	// used to include empty fields in Patch requests.
10392	ForceSendFields []string `json:"-"`
10393
10394	// NullFields is a list of field names (e.g. "Description") to include
10395	// in API requests with the JSON null value. By default, fields with
10396	// empty values are omitted from API requests. However, any field with
10397	// an empty value appearing in NullFields will be sent to the server as
10398	// null. It is an error if a field in this list has a non-empty value.
10399	// This may be used to include null fields in Patch requests.
10400	NullFields []string `json:"-"`
10401}
10402
10403func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) {
10404	type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
10405	raw := NoMethod(*s)
10406	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10407}
10408
10409// GoogleCloudDialogflowV2IntentMessageColumnProperties: Column
10410// properties for TableCard.
10411type GoogleCloudDialogflowV2IntentMessageColumnProperties struct {
10412	// Header: Required. Column heading.
10413	Header string `json:"header,omitempty"`
10414
10415	// HorizontalAlignment: Optional. Defines text alignment for all cells
10416	// in this column.
10417	//
10418	// Possible values:
10419	//   "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading
10420	// edge of the column.
10421	//   "LEADING" - Text is aligned to the leading edge of the column.
10422	//   "CENTER" - Text is centered in the column.
10423	//   "TRAILING" - Text is aligned to the trailing edge of the column.
10424	HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
10425
10426	// ForceSendFields is a list of field names (e.g. "Header") to
10427	// unconditionally include in API requests. By default, fields with
10428	// empty values are omitted from API requests. However, any non-pointer,
10429	// non-interface field appearing in ForceSendFields will be sent to the
10430	// server regardless of whether the field is empty or not. This may be
10431	// used to include empty fields in Patch requests.
10432	ForceSendFields []string `json:"-"`
10433
10434	// NullFields is a list of field names (e.g. "Header") to include in API
10435	// requests with the JSON null value. By default, fields with empty
10436	// values are omitted from API requests. However, any field with an
10437	// empty value appearing in NullFields will be sent to the server as
10438	// null. It is an error if a field in this list has a non-empty value.
10439	// This may be used to include null fields in Patch requests.
10440	NullFields []string `json:"-"`
10441}
10442
10443func (s *GoogleCloudDialogflowV2IntentMessageColumnProperties) MarshalJSON() ([]byte, error) {
10444	type NoMethod GoogleCloudDialogflowV2IntentMessageColumnProperties
10445	raw := NoMethod(*s)
10446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10447}
10448
10449// GoogleCloudDialogflowV2IntentMessageImage: The image response
10450// message.
10451type GoogleCloudDialogflowV2IntentMessageImage struct {
10452	// AccessibilityText: Optional. A text description of the image to be
10453	// used for accessibility, e.g., screen readers.
10454	AccessibilityText string `json:"accessibilityText,omitempty"`
10455
10456	// ImageUri: Optional. The public URI to an image file.
10457	ImageUri string `json:"imageUri,omitempty"`
10458
10459	// ForceSendFields is a list of field names (e.g. "AccessibilityText")
10460	// to unconditionally include in API requests. By default, fields with
10461	// empty values are omitted from API requests. However, any non-pointer,
10462	// non-interface field appearing in ForceSendFields will be sent to the
10463	// server regardless of whether the field is empty or not. This may be
10464	// used to include empty fields in Patch requests.
10465	ForceSendFields []string `json:"-"`
10466
10467	// NullFields is a list of field names (e.g. "AccessibilityText") to
10468	// include in API requests with the JSON null value. By default, fields
10469	// with empty values are omitted from API requests. However, any field
10470	// with an empty value appearing in NullFields will be sent to the
10471	// server as null. It is an error if a field in this list has a
10472	// non-empty value. This may be used to include null fields in Patch
10473	// requests.
10474	NullFields []string `json:"-"`
10475}
10476
10477func (s *GoogleCloudDialogflowV2IntentMessageImage) MarshalJSON() ([]byte, error) {
10478	type NoMethod GoogleCloudDialogflowV2IntentMessageImage
10479	raw := NoMethod(*s)
10480	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10481}
10482
10483// GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion: The suggestion
10484// chip message that allows the user to jump out to the app or website
10485// associated with this agent.
10486type GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion struct {
10487	// DestinationName: Required. The name of the app or site this chip is
10488	// linking to.
10489	DestinationName string `json:"destinationName,omitempty"`
10490
10491	// Uri: Required. The URI of the app or site to open when the user taps
10492	// the suggestion chip.
10493	Uri string `json:"uri,omitempty"`
10494
10495	// ForceSendFields is a list of field names (e.g. "DestinationName") to
10496	// unconditionally include in API requests. By default, fields with
10497	// empty values are omitted from API requests. However, any non-pointer,
10498	// non-interface field appearing in ForceSendFields will be sent to the
10499	// server regardless of whether the field is empty or not. This may be
10500	// used to include empty fields in Patch requests.
10501	ForceSendFields []string `json:"-"`
10502
10503	// NullFields is a list of field names (e.g. "DestinationName") to
10504	// include in API requests with the JSON null value. By default, fields
10505	// with empty values are omitted from API requests. However, any field
10506	// with an empty value appearing in NullFields will be sent to the
10507	// server as null. It is an error if a field in this list has a
10508	// non-empty value. This may be used to include null fields in Patch
10509	// requests.
10510	NullFields []string `json:"-"`
10511}
10512
10513func (s *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) {
10514	type NoMethod GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
10515	raw := NoMethod(*s)
10516	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10517}
10518
10519// GoogleCloudDialogflowV2IntentMessageListSelect: The card for
10520// presenting a list of options to select from.
10521type GoogleCloudDialogflowV2IntentMessageListSelect struct {
10522	// Items: Required. List items.
10523	Items []*GoogleCloudDialogflowV2IntentMessageListSelectItem `json:"items,omitempty"`
10524
10525	// Subtitle: Optional. Subtitle of the list.
10526	Subtitle string `json:"subtitle,omitempty"`
10527
10528	// Title: Optional. The overall title of the list.
10529	Title string `json:"title,omitempty"`
10530
10531	// ForceSendFields is a list of field names (e.g. "Items") to
10532	// unconditionally include in API requests. By default, fields with
10533	// empty values are omitted from API requests. However, any non-pointer,
10534	// non-interface field appearing in ForceSendFields will be sent to the
10535	// server regardless of whether the field is empty or not. This may be
10536	// used to include empty fields in Patch requests.
10537	ForceSendFields []string `json:"-"`
10538
10539	// NullFields is a list of field names (e.g. "Items") to include in API
10540	// requests with the JSON null value. By default, fields with empty
10541	// values are omitted from API requests. However, any field with an
10542	// empty value appearing in NullFields will be sent to the server as
10543	// null. It is an error if a field in this list has a non-empty value.
10544	// This may be used to include null fields in Patch requests.
10545	NullFields []string `json:"-"`
10546}
10547
10548func (s *GoogleCloudDialogflowV2IntentMessageListSelect) MarshalJSON() ([]byte, error) {
10549	type NoMethod GoogleCloudDialogflowV2IntentMessageListSelect
10550	raw := NoMethod(*s)
10551	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10552}
10553
10554// GoogleCloudDialogflowV2IntentMessageListSelectItem: An item in the
10555// list.
10556type GoogleCloudDialogflowV2IntentMessageListSelectItem struct {
10557	// Description: Optional. The main text describing the item.
10558	Description string `json:"description,omitempty"`
10559
10560	// Image: Optional. The image to display.
10561	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
10562
10563	// Info: Required. Additional information about this option.
10564	Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"`
10565
10566	// Title: Required. The title of the list item.
10567	Title string `json:"title,omitempty"`
10568
10569	// ForceSendFields is a list of field names (e.g. "Description") to
10570	// unconditionally include in API requests. By default, fields with
10571	// empty values are omitted from API requests. However, any non-pointer,
10572	// non-interface field appearing in ForceSendFields will be sent to the
10573	// server regardless of whether the field is empty or not. This may be
10574	// used to include empty fields in Patch requests.
10575	ForceSendFields []string `json:"-"`
10576
10577	// NullFields is a list of field names (e.g. "Description") to include
10578	// in API requests with the JSON null value. By default, fields with
10579	// empty values are omitted from API requests. However, any field with
10580	// an empty value appearing in NullFields will be sent to the server as
10581	// null. It is an error if a field in this list has a non-empty value.
10582	// This may be used to include null fields in Patch requests.
10583	NullFields []string `json:"-"`
10584}
10585
10586func (s *GoogleCloudDialogflowV2IntentMessageListSelectItem) MarshalJSON() ([]byte, error) {
10587	type NoMethod GoogleCloudDialogflowV2IntentMessageListSelectItem
10588	raw := NoMethod(*s)
10589	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10590}
10591
10592// GoogleCloudDialogflowV2IntentMessageMediaContent: The media content
10593// card for Actions on Google.
10594type GoogleCloudDialogflowV2IntentMessageMediaContent struct {
10595	// MediaObjects: Required. List of media objects.
10596	MediaObjects []*GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"`
10597
10598	// MediaType: Optional. What type of media is the content (ie "audio").
10599	//
10600	// Possible values:
10601	//   "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified.
10602	//   "AUDIO" - Response media type is audio.
10603	MediaType string `json:"mediaType,omitempty"`
10604
10605	// ForceSendFields is a list of field names (e.g. "MediaObjects") to
10606	// unconditionally include in API requests. By default, fields with
10607	// empty values are omitted from API requests. However, any non-pointer,
10608	// non-interface field appearing in ForceSendFields will be sent to the
10609	// server regardless of whether the field is empty or not. This may be
10610	// used to include empty fields in Patch requests.
10611	ForceSendFields []string `json:"-"`
10612
10613	// NullFields is a list of field names (e.g. "MediaObjects") to include
10614	// in API requests with the JSON null value. By default, fields with
10615	// empty values are omitted from API requests. However, any field with
10616	// an empty value appearing in NullFields will be sent to the server as
10617	// null. It is an error if a field in this list has a non-empty value.
10618	// This may be used to include null fields in Patch requests.
10619	NullFields []string `json:"-"`
10620}
10621
10622func (s *GoogleCloudDialogflowV2IntentMessageMediaContent) MarshalJSON() ([]byte, error) {
10623	type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContent
10624	raw := NoMethod(*s)
10625	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10626}
10627
10628// GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject:
10629// Response media object for media content card.
10630type GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject struct {
10631	// ContentUrl: Required. Url where the media is stored.
10632	ContentUrl string `json:"contentUrl,omitempty"`
10633
10634	// Description: Optional. Description of media card.
10635	Description string `json:"description,omitempty"`
10636
10637	// Icon: Optional. Icon to display above media content.
10638	Icon *GoogleCloudDialogflowV2IntentMessageImage `json:"icon,omitempty"`
10639
10640	// LargeImage: Optional. Image to display above media content.
10641	LargeImage *GoogleCloudDialogflowV2IntentMessageImage `json:"largeImage,omitempty"`
10642
10643	// Name: Required. Name of media card.
10644	Name string `json:"name,omitempty"`
10645
10646	// ForceSendFields is a list of field names (e.g. "ContentUrl") to
10647	// unconditionally include in API requests. By default, fields with
10648	// empty values are omitted from API requests. However, any non-pointer,
10649	// non-interface field appearing in ForceSendFields will be sent to the
10650	// server regardless of whether the field is empty or not. This may be
10651	// used to include empty fields in Patch requests.
10652	ForceSendFields []string `json:"-"`
10653
10654	// NullFields is a list of field names (e.g. "ContentUrl") to include in
10655	// API requests with the JSON null value. By default, fields with empty
10656	// values are omitted from API requests. However, any field with an
10657	// empty value appearing in NullFields will be sent to the server as
10658	// null. It is an error if a field in this list has a non-empty value.
10659	// This may be used to include null fields in Patch requests.
10660	NullFields []string `json:"-"`
10661}
10662
10663func (s *GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) {
10664	type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject
10665	raw := NoMethod(*s)
10666	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10667}
10668
10669// GoogleCloudDialogflowV2IntentMessageQuickReplies: The quick replies
10670// response message.
10671type GoogleCloudDialogflowV2IntentMessageQuickReplies struct {
10672	// QuickReplies: Optional. The collection of quick replies.
10673	QuickReplies []string `json:"quickReplies,omitempty"`
10674
10675	// Title: Optional. The title of the collection of quick replies.
10676	Title string `json:"title,omitempty"`
10677
10678	// ForceSendFields is a list of field names (e.g. "QuickReplies") to
10679	// unconditionally include in API requests. By default, fields with
10680	// empty values are omitted from API requests. However, any non-pointer,
10681	// non-interface field appearing in ForceSendFields will be sent to the
10682	// server regardless of whether the field is empty or not. This may be
10683	// used to include empty fields in Patch requests.
10684	ForceSendFields []string `json:"-"`
10685
10686	// NullFields is a list of field names (e.g. "QuickReplies") to include
10687	// in API requests with the JSON null value. By default, fields with
10688	// empty values are omitted from API requests. However, any field with
10689	// an empty value appearing in NullFields will be sent to the server as
10690	// null. It is an error if a field in this list has a non-empty value.
10691	// This may be used to include null fields in Patch requests.
10692	NullFields []string `json:"-"`
10693}
10694
10695func (s *GoogleCloudDialogflowV2IntentMessageQuickReplies) MarshalJSON() ([]byte, error) {
10696	type NoMethod GoogleCloudDialogflowV2IntentMessageQuickReplies
10697	raw := NoMethod(*s)
10698	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10699}
10700
10701// GoogleCloudDialogflowV2IntentMessageSelectItemInfo: Additional info
10702// about the select item for when it is triggered in a dialog.
10703type GoogleCloudDialogflowV2IntentMessageSelectItemInfo struct {
10704	// Key: Required. A unique key that will be sent back to the agent if
10705	// this response is given.
10706	Key string `json:"key,omitempty"`
10707
10708	// Synonyms: Optional. A list of synonyms that can also be used to
10709	// trigger this item in dialog.
10710	Synonyms []string `json:"synonyms,omitempty"`
10711
10712	// ForceSendFields is a list of field names (e.g. "Key") to
10713	// unconditionally include in API requests. By default, fields with
10714	// empty values are omitted from API requests. However, any non-pointer,
10715	// non-interface field appearing in ForceSendFields will be sent to the
10716	// server regardless of whether the field is empty or not. This may be
10717	// used to include empty fields in Patch requests.
10718	ForceSendFields []string `json:"-"`
10719
10720	// NullFields is a list of field names (e.g. "Key") to include in API
10721	// requests with the JSON null value. By default, fields with empty
10722	// values are omitted from API requests. However, any field with an
10723	// empty value appearing in NullFields will be sent to the server as
10724	// null. It is an error if a field in this list has a non-empty value.
10725	// This may be used to include null fields in Patch requests.
10726	NullFields []string `json:"-"`
10727}
10728
10729func (s *GoogleCloudDialogflowV2IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) {
10730	type NoMethod GoogleCloudDialogflowV2IntentMessageSelectItemInfo
10731	raw := NoMethod(*s)
10732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10733}
10734
10735// GoogleCloudDialogflowV2IntentMessageSimpleResponse: The simple
10736// response message containing speech or text.
10737type GoogleCloudDialogflowV2IntentMessageSimpleResponse struct {
10738	// DisplayText: Optional. The text to display.
10739	DisplayText string `json:"displayText,omitempty"`
10740
10741	// Ssml: One of text_to_speech or ssml must be provided. Structured
10742	// spoken response to the user in the SSML format. Mutually exclusive
10743	// with text_to_speech.
10744	Ssml string `json:"ssml,omitempty"`
10745
10746	// TextToSpeech: One of text_to_speech or ssml must be provided. The
10747	// plain text of the speech output. Mutually exclusive with ssml.
10748	TextToSpeech string `json:"textToSpeech,omitempty"`
10749
10750	// ForceSendFields is a list of field names (e.g. "DisplayText") to
10751	// unconditionally include in API requests. By default, fields with
10752	// empty values are omitted from API requests. However, any non-pointer,
10753	// non-interface field appearing in ForceSendFields will be sent to the
10754	// server regardless of whether the field is empty or not. This may be
10755	// used to include empty fields in Patch requests.
10756	ForceSendFields []string `json:"-"`
10757
10758	// NullFields is a list of field names (e.g. "DisplayText") to include
10759	// in API requests with the JSON null value. By default, fields with
10760	// empty values are omitted from API requests. However, any field with
10761	// an empty value appearing in NullFields will be sent to the server as
10762	// null. It is an error if a field in this list has a non-empty value.
10763	// This may be used to include null fields in Patch requests.
10764	NullFields []string `json:"-"`
10765}
10766
10767func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) {
10768	type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponse
10769	raw := NoMethod(*s)
10770	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10771}
10772
10773// GoogleCloudDialogflowV2IntentMessageSimpleResponses: The collection
10774// of simple response candidates. This message in
10775// `QueryResult.fulfillment_messages` and
10776// `WebhookResponse.fulfillment_messages` should contain only one
10777// `SimpleResponse`.
10778type GoogleCloudDialogflowV2IntentMessageSimpleResponses struct {
10779	// SimpleResponses: Required. The list of simple responses.
10780	SimpleResponses []*GoogleCloudDialogflowV2IntentMessageSimpleResponse `json:"simpleResponses,omitempty"`
10781
10782	// ForceSendFields is a list of field names (e.g. "SimpleResponses") to
10783	// unconditionally include in API requests. By default, fields with
10784	// empty values are omitted from API requests. However, any non-pointer,
10785	// non-interface field appearing in ForceSendFields will be sent to the
10786	// server regardless of whether the field is empty or not. This may be
10787	// used to include empty fields in Patch requests.
10788	ForceSendFields []string `json:"-"`
10789
10790	// NullFields is a list of field names (e.g. "SimpleResponses") to
10791	// include in API requests with the JSON null value. By default, fields
10792	// with empty values are omitted from API requests. However, any field
10793	// with an empty value appearing in NullFields will be sent to the
10794	// server as null. It is an error if a field in this list has a
10795	// non-empty value. This may be used to include null fields in Patch
10796	// requests.
10797	NullFields []string `json:"-"`
10798}
10799
10800func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) {
10801	type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponses
10802	raw := NoMethod(*s)
10803	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10804}
10805
10806// GoogleCloudDialogflowV2IntentMessageSuggestion: The suggestion chip
10807// message that the user can tap to quickly post a reply to the
10808// conversation.
10809type GoogleCloudDialogflowV2IntentMessageSuggestion struct {
10810	// Title: Required. The text shown the in the suggestion chip.
10811	Title string `json:"title,omitempty"`
10812
10813	// ForceSendFields is a list of field names (e.g. "Title") to
10814	// unconditionally include in API requests. By default, fields with
10815	// empty values are omitted from API requests. However, any non-pointer,
10816	// non-interface field appearing in ForceSendFields will be sent to the
10817	// server regardless of whether the field is empty or not. This may be
10818	// used to include empty fields in Patch requests.
10819	ForceSendFields []string `json:"-"`
10820
10821	// NullFields is a list of field names (e.g. "Title") to include in API
10822	// requests with the JSON null value. By default, fields with empty
10823	// values are omitted from API requests. However, any field with an
10824	// empty value appearing in NullFields will be sent to the server as
10825	// null. It is an error if a field in this list has a non-empty value.
10826	// This may be used to include null fields in Patch requests.
10827	NullFields []string `json:"-"`
10828}
10829
10830func (s *GoogleCloudDialogflowV2IntentMessageSuggestion) MarshalJSON() ([]byte, error) {
10831	type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestion
10832	raw := NoMethod(*s)
10833	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10834}
10835
10836// GoogleCloudDialogflowV2IntentMessageSuggestions: The collection of
10837// suggestions.
10838type GoogleCloudDialogflowV2IntentMessageSuggestions struct {
10839	// Suggestions: Required. The list of suggested replies.
10840	Suggestions []*GoogleCloudDialogflowV2IntentMessageSuggestion `json:"suggestions,omitempty"`
10841
10842	// ForceSendFields is a list of field names (e.g. "Suggestions") to
10843	// unconditionally include in API requests. By default, fields with
10844	// empty values are omitted from API requests. However, any non-pointer,
10845	// non-interface field appearing in ForceSendFields will be sent to the
10846	// server regardless of whether the field is empty or not. This may be
10847	// used to include empty fields in Patch requests.
10848	ForceSendFields []string `json:"-"`
10849
10850	// NullFields is a list of field names (e.g. "Suggestions") to include
10851	// in API requests with the JSON null value. By default, fields with
10852	// empty values are omitted from API requests. However, any field with
10853	// an empty value appearing in NullFields will be sent to the server as
10854	// null. It is an error if a field in this list has a non-empty value.
10855	// This may be used to include null fields in Patch requests.
10856	NullFields []string `json:"-"`
10857}
10858
10859func (s *GoogleCloudDialogflowV2IntentMessageSuggestions) MarshalJSON() ([]byte, error) {
10860	type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestions
10861	raw := NoMethod(*s)
10862	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10863}
10864
10865// GoogleCloudDialogflowV2IntentMessageTableCard: Table card for Actions
10866// on Google.
10867type GoogleCloudDialogflowV2IntentMessageTableCard struct {
10868	// Buttons: Optional. List of buttons for the card.
10869	Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"`
10870
10871	// ColumnProperties: Optional. Display properties for the columns in
10872	// this table.
10873	ColumnProperties []*GoogleCloudDialogflowV2IntentMessageColumnProperties `json:"columnProperties,omitempty"`
10874
10875	// Image: Optional. Image which should be displayed on the card.
10876	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
10877
10878	// Rows: Optional. Rows in this table of data.
10879	Rows []*GoogleCloudDialogflowV2IntentMessageTableCardRow `json:"rows,omitempty"`
10880
10881	// Subtitle: Optional. Subtitle to the title.
10882	Subtitle string `json:"subtitle,omitempty"`
10883
10884	// Title: Required. Title of the card.
10885	Title string `json:"title,omitempty"`
10886
10887	// ForceSendFields is a list of field names (e.g. "Buttons") to
10888	// unconditionally include in API requests. By default, fields with
10889	// empty values are omitted from API requests. However, any non-pointer,
10890	// non-interface field appearing in ForceSendFields will be sent to the
10891	// server regardless of whether the field is empty or not. This may be
10892	// used to include empty fields in Patch requests.
10893	ForceSendFields []string `json:"-"`
10894
10895	// NullFields is a list of field names (e.g. "Buttons") to include in
10896	// API requests with the JSON null value. By default, fields with empty
10897	// values are omitted from API requests. However, any field with an
10898	// empty value appearing in NullFields will be sent to the server as
10899	// null. It is an error if a field in this list has a non-empty value.
10900	// This may be used to include null fields in Patch requests.
10901	NullFields []string `json:"-"`
10902}
10903
10904func (s *GoogleCloudDialogflowV2IntentMessageTableCard) MarshalJSON() ([]byte, error) {
10905	type NoMethod GoogleCloudDialogflowV2IntentMessageTableCard
10906	raw := NoMethod(*s)
10907	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10908}
10909
10910// GoogleCloudDialogflowV2IntentMessageTableCardCell: Cell of
10911// TableCardRow.
10912type GoogleCloudDialogflowV2IntentMessageTableCardCell struct {
10913	// Text: Required. Text in this cell.
10914	Text string `json:"text,omitempty"`
10915
10916	// ForceSendFields is a list of field names (e.g. "Text") to
10917	// unconditionally include in API requests. By default, fields with
10918	// empty values are omitted from API requests. However, any non-pointer,
10919	// non-interface field appearing in ForceSendFields will be sent to the
10920	// server regardless of whether the field is empty or not. This may be
10921	// used to include empty fields in Patch requests.
10922	ForceSendFields []string `json:"-"`
10923
10924	// NullFields is a list of field names (e.g. "Text") to include in API
10925	// requests with the JSON null value. By default, fields with empty
10926	// values are omitted from API requests. However, any field with an
10927	// empty value appearing in NullFields will be sent to the server as
10928	// null. It is an error if a field in this list has a non-empty value.
10929	// This may be used to include null fields in Patch requests.
10930	NullFields []string `json:"-"`
10931}
10932
10933func (s *GoogleCloudDialogflowV2IntentMessageTableCardCell) MarshalJSON() ([]byte, error) {
10934	type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardCell
10935	raw := NoMethod(*s)
10936	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10937}
10938
10939// GoogleCloudDialogflowV2IntentMessageTableCardRow: Row of TableCard.
10940type GoogleCloudDialogflowV2IntentMessageTableCardRow struct {
10941	// Cells: Optional. List of cells that make up this row.
10942	Cells []*GoogleCloudDialogflowV2IntentMessageTableCardCell `json:"cells,omitempty"`
10943
10944	// DividerAfter: Optional. Whether to add a visual divider after this
10945	// row.
10946	DividerAfter bool `json:"dividerAfter,omitempty"`
10947
10948	// ForceSendFields is a list of field names (e.g. "Cells") to
10949	// unconditionally include in API requests. By default, fields with
10950	// empty values are omitted from API requests. However, any non-pointer,
10951	// non-interface field appearing in ForceSendFields will be sent to the
10952	// server regardless of whether the field is empty or not. This may be
10953	// used to include empty fields in Patch requests.
10954	ForceSendFields []string `json:"-"`
10955
10956	// NullFields is a list of field names (e.g. "Cells") to include in API
10957	// requests with the JSON null value. By default, fields with empty
10958	// values are omitted from API requests. However, any field with an
10959	// empty value appearing in NullFields will be sent to the server as
10960	// null. It is an error if a field in this list has a non-empty value.
10961	// This may be used to include null fields in Patch requests.
10962	NullFields []string `json:"-"`
10963}
10964
10965func (s *GoogleCloudDialogflowV2IntentMessageTableCardRow) MarshalJSON() ([]byte, error) {
10966	type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardRow
10967	raw := NoMethod(*s)
10968	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10969}
10970
10971// GoogleCloudDialogflowV2IntentMessageText: The text response message.
10972type GoogleCloudDialogflowV2IntentMessageText struct {
10973	// Text: Optional. The collection of the agent's responses.
10974	Text []string `json:"text,omitempty"`
10975
10976	// ForceSendFields is a list of field names (e.g. "Text") to
10977	// unconditionally include in API requests. By default, fields with
10978	// empty values are omitted from API requests. However, any non-pointer,
10979	// non-interface field appearing in ForceSendFields will be sent to the
10980	// server regardless of whether the field is empty or not. This may be
10981	// used to include empty fields in Patch requests.
10982	ForceSendFields []string `json:"-"`
10983
10984	// NullFields is a list of field names (e.g. "Text") to include in API
10985	// requests with the JSON null value. By default, fields with empty
10986	// values are omitted from API requests. However, any field with an
10987	// empty value appearing in NullFields will be sent to the server as
10988	// null. It is an error if a field in this list has a non-empty value.
10989	// This may be used to include null fields in Patch requests.
10990	NullFields []string `json:"-"`
10991}
10992
10993func (s *GoogleCloudDialogflowV2IntentMessageText) MarshalJSON() ([]byte, error) {
10994	type NoMethod GoogleCloudDialogflowV2IntentMessageText
10995	raw := NoMethod(*s)
10996	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10997}
10998
10999// GoogleCloudDialogflowV2IntentParameter: Represents intent parameters.
11000type GoogleCloudDialogflowV2IntentParameter struct {
11001	// DefaultValue: Optional. The default value to use when the `value`
11002	// yields an empty result. Default values can be extracted from contexts
11003	// by using the following syntax: `#context_name.parameter_name`.
11004	DefaultValue string `json:"defaultValue,omitempty"`
11005
11006	// DisplayName: Required. The name of the parameter.
11007	DisplayName string `json:"displayName,omitempty"`
11008
11009	// EntityTypeDisplayName: Optional. The name of the entity type,
11010	// prefixed with `@`, that describes values of the parameter. If the
11011	// parameter is required, this must be provided.
11012	EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"`
11013
11014	// IsList: Optional. Indicates whether the parameter represents a list
11015	// of values.
11016	IsList bool `json:"isList,omitempty"`
11017
11018	// Mandatory: Optional. Indicates whether the parameter is required.
11019	// That is, whether the intent cannot be completed without collecting
11020	// the parameter value.
11021	Mandatory bool `json:"mandatory,omitempty"`
11022
11023	// Name: The unique identifier of this parameter.
11024	Name string `json:"name,omitempty"`
11025
11026	// Prompts: Optional. The collection of prompts that the agent can
11027	// present to the user in order to collect a value for the parameter.
11028	Prompts []string `json:"prompts,omitempty"`
11029
11030	// Value: Optional. The definition of the parameter value. It can be: -
11031	// a constant string, - a parameter value defined as `$parameter_name`,
11032	// - an original parameter value defined as `$parameter_name.original`,
11033	// - a parameter value from some context defined as
11034	// `#context_name.parameter_name`.
11035	Value string `json:"value,omitempty"`
11036
11037	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
11038	// unconditionally include in API requests. By default, fields with
11039	// empty values are omitted from API requests. However, any non-pointer,
11040	// non-interface field appearing in ForceSendFields will be sent to the
11041	// server regardless of whether the field is empty or not. This may be
11042	// used to include empty fields in Patch requests.
11043	ForceSendFields []string `json:"-"`
11044
11045	// NullFields is a list of field names (e.g. "DefaultValue") to include
11046	// in API requests with the JSON null value. By default, fields with
11047	// empty values are omitted from API requests. However, any field with
11048	// an empty value appearing in NullFields will be sent to the server as
11049	// null. It is an error if a field in this list has a non-empty value.
11050	// This may be used to include null fields in Patch requests.
11051	NullFields []string `json:"-"`
11052}
11053
11054func (s *GoogleCloudDialogflowV2IntentParameter) MarshalJSON() ([]byte, error) {
11055	type NoMethod GoogleCloudDialogflowV2IntentParameter
11056	raw := NoMethod(*s)
11057	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11058}
11059
11060// GoogleCloudDialogflowV2IntentTrainingPhrase: Represents an example
11061// that the agent is trained on.
11062type GoogleCloudDialogflowV2IntentTrainingPhrase struct {
11063	// Name: Output only. The unique identifier of this training phrase.
11064	Name string `json:"name,omitempty"`
11065
11066	// Parts: Required. The ordered list of training phrase parts. The parts
11067	// are concatenated in order to form the training phrase. Note: The API
11068	// does not automatically annotate training phrases like the Dialogflow
11069	// Console does. Note: Do not forget to include whitespace at part
11070	// boundaries, so the training phrase is well formatted when the parts
11071	// are concatenated. If the training phrase does not need to be
11072	// annotated with parameters, you just need a single part with only the
11073	// Part.text field set. If you want to annotate the training phrase, you
11074	// must create multiple parts, where the fields of each part are
11075	// populated in one of two ways: - `Part.text` is set to a part of the
11076	// phrase that has no parameters. - `Part.text` is set to a part of the
11077	// phrase that you want to annotate, and the `entity_type`, `alias`, and
11078	// `user_defined` fields are all set.
11079	Parts []*GoogleCloudDialogflowV2IntentTrainingPhrasePart `json:"parts,omitempty"`
11080
11081	// TimesAddedCount: Optional. Indicates how many times this example was
11082	// added to the intent. Each time a developer adds an existing sample by
11083	// editing an intent or training, this counter is increased.
11084	TimesAddedCount int64 `json:"timesAddedCount,omitempty"`
11085
11086	// Type: Required. The type of the training phrase.
11087	//
11088	// Possible values:
11089	//   "TYPE_UNSPECIFIED" - Not specified. This value should never be
11090	// used.
11091	//   "EXAMPLE" - Examples do not contain @-prefixed entity type names,
11092	// but example parts can be annotated with entity types.
11093	//   "TEMPLATE" - Templates are not annotated with entity types, but
11094	// they can contain @-prefixed entity type names as substrings. Template
11095	// mode has been deprecated. Example mode is the only supported way to
11096	// create new training phrases. If you have existing training phrases
11097	// that you've created in template mode, those will continue to work.
11098	Type string `json:"type,omitempty"`
11099
11100	// ForceSendFields is a list of field names (e.g. "Name") to
11101	// unconditionally include in API requests. By default, fields with
11102	// empty values are omitted from API requests. However, any non-pointer,
11103	// non-interface field appearing in ForceSendFields will be sent to the
11104	// server regardless of whether the field is empty or not. This may be
11105	// used to include empty fields in Patch requests.
11106	ForceSendFields []string `json:"-"`
11107
11108	// NullFields is a list of field names (e.g. "Name") to include in API
11109	// requests with the JSON null value. By default, fields with empty
11110	// values are omitted from API requests. However, any field with an
11111	// empty value appearing in NullFields will be sent to the server as
11112	// null. It is an error if a field in this list has a non-empty value.
11113	// This may be used to include null fields in Patch requests.
11114	NullFields []string `json:"-"`
11115}
11116
11117func (s *GoogleCloudDialogflowV2IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
11118	type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrase
11119	raw := NoMethod(*s)
11120	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11121}
11122
11123// GoogleCloudDialogflowV2IntentTrainingPhrasePart: Represents a part of
11124// a training phrase.
11125type GoogleCloudDialogflowV2IntentTrainingPhrasePart struct {
11126	// Alias: Optional. The parameter name for the value extracted from the
11127	// annotated part of the example. This field is required for annotated
11128	// parts of the training phrase.
11129	Alias string `json:"alias,omitempty"`
11130
11131	// EntityType: Optional. The entity type name prefixed with `@`. This
11132	// field is required for annotated parts of the training phrase.
11133	EntityType string `json:"entityType,omitempty"`
11134
11135	// Text: Required. The text for this part.
11136	Text string `json:"text,omitempty"`
11137
11138	// UserDefined: Optional. Indicates whether the text was manually
11139	// annotated. This field is set to true when the Dialogflow Console is
11140	// used to manually annotate the part. When creating an annotated part
11141	// with the API, you must set this to true.
11142	UserDefined bool `json:"userDefined,omitempty"`
11143
11144	// ForceSendFields is a list of field names (e.g. "Alias") to
11145	// unconditionally include in API requests. By default, fields with
11146	// empty values are omitted from API requests. However, any non-pointer,
11147	// non-interface field appearing in ForceSendFields will be sent to the
11148	// server regardless of whether the field is empty or not. This may be
11149	// used to include empty fields in Patch requests.
11150	ForceSendFields []string `json:"-"`
11151
11152	// NullFields is a list of field names (e.g. "Alias") to include in API
11153	// requests with the JSON null value. By default, fields with empty
11154	// values are omitted from API requests. However, any field with an
11155	// empty value appearing in NullFields will be sent to the server as
11156	// null. It is an error if a field in this list has a non-empty value.
11157	// This may be used to include null fields in Patch requests.
11158	NullFields []string `json:"-"`
11159}
11160
11161func (s *GoogleCloudDialogflowV2IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
11162	type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrasePart
11163	raw := NoMethod(*s)
11164	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11165}
11166
11167// GoogleCloudDialogflowV2KnowledgeBase: A knowledge base represents a
11168// collection of knowledge documents that you provide to Dialogflow.
11169// Your knowledge documents contain information that may be useful
11170// during conversations with end-users. Some Dialogflow features use
11171// knowledge bases when looking for a response to an end-user input. For
11172// more information, see the knowledge base guide
11173// (https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note:
11174// The `projects.agent.knowledgeBases` resource is deprecated; only use
11175// `projects.knowledgeBases`.
11176type GoogleCloudDialogflowV2KnowledgeBase struct {
11177	// DisplayName: Required. The display name of the knowledge base. The
11178	// name must be 1024 bytes or less; otherwise, the creation request
11179	// fails.
11180	DisplayName string `json:"displayName,omitempty"`
11181
11182	// LanguageCode: Language which represents the KnowledgeBase. When the
11183	// KnowledgeBase is created/updated, expect this to be present for non
11184	// en-us languages. When unspecified, the default language code en-us
11185	// applies.
11186	LanguageCode string `json:"languageCode,omitempty"`
11187
11188	// Name: The knowledge base resource name. The name must be empty when
11189	// creating a knowledge base. Format:
11190	// `projects//locations//knowledgeBases/`.
11191	Name string `json:"name,omitempty"`
11192
11193	// ServerResponse contains the HTTP response code and headers from the
11194	// server.
11195	googleapi.ServerResponse `json:"-"`
11196
11197	// ForceSendFields is a list of field names (e.g. "DisplayName") to
11198	// unconditionally include in API requests. By default, fields with
11199	// empty values are omitted from API requests. However, any non-pointer,
11200	// non-interface field appearing in ForceSendFields will be sent to the
11201	// server regardless of whether the field is empty or not. This may be
11202	// used to include empty fields in Patch requests.
11203	ForceSendFields []string `json:"-"`
11204
11205	// NullFields is a list of field names (e.g. "DisplayName") to include
11206	// in API requests with the JSON null value. By default, fields with
11207	// empty values are omitted from API requests. However, any field with
11208	// an empty value appearing in NullFields will be sent to the server as
11209	// null. It is an error if a field in this list has a non-empty value.
11210	// This may be used to include null fields in Patch requests.
11211	NullFields []string `json:"-"`
11212}
11213
11214func (s *GoogleCloudDialogflowV2KnowledgeBase) MarshalJSON() ([]byte, error) {
11215	type NoMethod GoogleCloudDialogflowV2KnowledgeBase
11216	raw := NoMethod(*s)
11217	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11218}
11219
11220// GoogleCloudDialogflowV2KnowledgeOperationMetadata: Metadata in
11221// google::longrunning::Operation for Knowledge operations.
11222type GoogleCloudDialogflowV2KnowledgeOperationMetadata struct {
11223	// State: Output only. The current state of this operation.
11224	//
11225	// Possible values:
11226	//   "STATE_UNSPECIFIED" - State unspecified.
11227	//   "PENDING" - The operation has been created.
11228	//   "RUNNING" - The operation is currently running.
11229	//   "DONE" - The operation is done, either cancelled or completed.
11230	State string `json:"state,omitempty"`
11231
11232	// ForceSendFields is a list of field names (e.g. "State") to
11233	// unconditionally include in API requests. By default, fields with
11234	// empty values are omitted from API requests. However, any non-pointer,
11235	// non-interface field appearing in ForceSendFields will be sent to the
11236	// server regardless of whether the field is empty or not. This may be
11237	// used to include empty fields in Patch requests.
11238	ForceSendFields []string `json:"-"`
11239
11240	// NullFields is a list of field names (e.g. "State") to include in API
11241	// requests with the JSON null value. By default, fields with empty
11242	// values are omitted from API requests. However, any field with an
11243	// empty value appearing in NullFields will be sent to the server as
11244	// null. It is an error if a field in this list has a non-empty value.
11245	// This may be used to include null fields in Patch requests.
11246	NullFields []string `json:"-"`
11247}
11248
11249func (s *GoogleCloudDialogflowV2KnowledgeOperationMetadata) MarshalJSON() ([]byte, error) {
11250	type NoMethod GoogleCloudDialogflowV2KnowledgeOperationMetadata
11251	raw := NoMethod(*s)
11252	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11253}
11254
11255// GoogleCloudDialogflowV2ListAnswerRecordsResponse: Response message
11256// for AnswerRecords.ListAnswerRecords.
11257type GoogleCloudDialogflowV2ListAnswerRecordsResponse struct {
11258	// AnswerRecords: The list of answer records.
11259	AnswerRecords []*GoogleCloudDialogflowV2AnswerRecord `json:"answerRecords,omitempty"`
11260
11261	// NextPageToken: A token to retrieve next page of results. Or empty if
11262	// there are no more results. Pass this value in the
11263	// ListAnswerRecordsRequest.page_token field in the subsequent call to
11264	// `ListAnswerRecords` method to retrieve the next page of results.
11265	NextPageToken string `json:"nextPageToken,omitempty"`
11266
11267	// ServerResponse contains the HTTP response code and headers from the
11268	// server.
11269	googleapi.ServerResponse `json:"-"`
11270
11271	// ForceSendFields is a list of field names (e.g. "AnswerRecords") to
11272	// unconditionally include in API requests. By default, fields with
11273	// empty values are omitted from API requests. However, any non-pointer,
11274	// non-interface field appearing in ForceSendFields will be sent to the
11275	// server regardless of whether the field is empty or not. This may be
11276	// used to include empty fields in Patch requests.
11277	ForceSendFields []string `json:"-"`
11278
11279	// NullFields is a list of field names (e.g. "AnswerRecords") to include
11280	// in API requests with the JSON null value. By default, fields with
11281	// empty values are omitted from API requests. However, any field with
11282	// an empty value appearing in NullFields will be sent to the server as
11283	// null. It is an error if a field in this list has a non-empty value.
11284	// This may be used to include null fields in Patch requests.
11285	NullFields []string `json:"-"`
11286}
11287
11288func (s *GoogleCloudDialogflowV2ListAnswerRecordsResponse) MarshalJSON() ([]byte, error) {
11289	type NoMethod GoogleCloudDialogflowV2ListAnswerRecordsResponse
11290	raw := NoMethod(*s)
11291	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11292}
11293
11294// GoogleCloudDialogflowV2ListContextsResponse: The response message for
11295// Contexts.ListContexts.
11296type GoogleCloudDialogflowV2ListContextsResponse struct {
11297	// Contexts: The list of contexts. There will be a maximum number of
11298	// items returned based on the page_size field in the request.
11299	Contexts []*GoogleCloudDialogflowV2Context `json:"contexts,omitempty"`
11300
11301	// NextPageToken: Token to retrieve the next page of results, or empty
11302	// if there are no more results in the list.
11303	NextPageToken string `json:"nextPageToken,omitempty"`
11304
11305	// ServerResponse contains the HTTP response code and headers from the
11306	// server.
11307	googleapi.ServerResponse `json:"-"`
11308
11309	// ForceSendFields is a list of field names (e.g. "Contexts") to
11310	// unconditionally include in API requests. By default, fields with
11311	// empty values are omitted from API requests. However, any non-pointer,
11312	// non-interface field appearing in ForceSendFields will be sent to the
11313	// server regardless of whether the field is empty or not. This may be
11314	// used to include empty fields in Patch requests.
11315	ForceSendFields []string `json:"-"`
11316
11317	// NullFields is a list of field names (e.g. "Contexts") to include in
11318	// API requests with the JSON null value. By default, fields with empty
11319	// values are omitted from API requests. However, any field with an
11320	// empty value appearing in NullFields will be sent to the server as
11321	// null. It is an error if a field in this list has a non-empty value.
11322	// This may be used to include null fields in Patch requests.
11323	NullFields []string `json:"-"`
11324}
11325
11326func (s *GoogleCloudDialogflowV2ListContextsResponse) MarshalJSON() ([]byte, error) {
11327	type NoMethod GoogleCloudDialogflowV2ListContextsResponse
11328	raw := NoMethod(*s)
11329	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11330}
11331
11332// GoogleCloudDialogflowV2ListConversationProfilesResponse: The response
11333// message for ConversationProfiles.ListConversationProfiles.
11334type GoogleCloudDialogflowV2ListConversationProfilesResponse struct {
11335	// ConversationProfiles: The list of project conversation profiles.
11336	// There is a maximum number of items returned based on the page_size
11337	// field in the request.
11338	ConversationProfiles []*GoogleCloudDialogflowV2ConversationProfile `json:"conversationProfiles,omitempty"`
11339
11340	// NextPageToken: Token to retrieve the next page of results, or empty
11341	// if there are no more results in the list.
11342	NextPageToken string `json:"nextPageToken,omitempty"`
11343
11344	// ServerResponse contains the HTTP response code and headers from the
11345	// server.
11346	googleapi.ServerResponse `json:"-"`
11347
11348	// ForceSendFields is a list of field names (e.g.
11349	// "ConversationProfiles") to unconditionally include in API requests.
11350	// By default, fields with empty values are omitted from API requests.
11351	// However, any non-pointer, non-interface field appearing in
11352	// ForceSendFields will be sent to the server regardless of whether the
11353	// field is empty or not. This may be used to include empty fields in
11354	// Patch requests.
11355	ForceSendFields []string `json:"-"`
11356
11357	// NullFields is a list of field names (e.g. "ConversationProfiles") to
11358	// include in API requests with the JSON null value. By default, fields
11359	// with empty values are omitted from API requests. However, any field
11360	// with an empty value appearing in NullFields will be sent to the
11361	// server as null. It is an error if a field in this list has a
11362	// non-empty value. This may be used to include null fields in Patch
11363	// requests.
11364	NullFields []string `json:"-"`
11365}
11366
11367func (s *GoogleCloudDialogflowV2ListConversationProfilesResponse) MarshalJSON() ([]byte, error) {
11368	type NoMethod GoogleCloudDialogflowV2ListConversationProfilesResponse
11369	raw := NoMethod(*s)
11370	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11371}
11372
11373// GoogleCloudDialogflowV2ListConversationsResponse: The response
11374// message for Conversations.ListConversations.
11375type GoogleCloudDialogflowV2ListConversationsResponse struct {
11376	// Conversations: The list of conversations. There will be a maximum
11377	// number of items returned based on the page_size field in the request.
11378	Conversations []*GoogleCloudDialogflowV2Conversation `json:"conversations,omitempty"`
11379
11380	// NextPageToken: Token to retrieve the next page of results, or empty
11381	// if there are no more results in the list.
11382	NextPageToken string `json:"nextPageToken,omitempty"`
11383
11384	// ServerResponse contains the HTTP response code and headers from the
11385	// server.
11386	googleapi.ServerResponse `json:"-"`
11387
11388	// ForceSendFields is a list of field names (e.g. "Conversations") to
11389	// unconditionally include in API requests. By default, fields with
11390	// empty values are omitted from API requests. However, any non-pointer,
11391	// non-interface field appearing in ForceSendFields will be sent to the
11392	// server regardless of whether the field is empty or not. This may be
11393	// used to include empty fields in Patch requests.
11394	ForceSendFields []string `json:"-"`
11395
11396	// NullFields is a list of field names (e.g. "Conversations") to include
11397	// in API requests with the JSON null value. By default, fields with
11398	// empty values are omitted from API requests. However, any field with
11399	// an empty value appearing in NullFields will be sent to the server as
11400	// null. It is an error if a field in this list has a non-empty value.
11401	// This may be used to include null fields in Patch requests.
11402	NullFields []string `json:"-"`
11403}
11404
11405func (s *GoogleCloudDialogflowV2ListConversationsResponse) MarshalJSON() ([]byte, error) {
11406	type NoMethod GoogleCloudDialogflowV2ListConversationsResponse
11407	raw := NoMethod(*s)
11408	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11409}
11410
11411// GoogleCloudDialogflowV2ListDocumentsResponse: Response message for
11412// Documents.ListDocuments.
11413type GoogleCloudDialogflowV2ListDocumentsResponse struct {
11414	// Documents: The list of documents.
11415	Documents []*GoogleCloudDialogflowV2Document `json:"documents,omitempty"`
11416
11417	// NextPageToken: Token to retrieve the next page of results, or empty
11418	// if there are no more results in the list.
11419	NextPageToken string `json:"nextPageToken,omitempty"`
11420
11421	// ServerResponse contains the HTTP response code and headers from the
11422	// server.
11423	googleapi.ServerResponse `json:"-"`
11424
11425	// ForceSendFields is a list of field names (e.g. "Documents") to
11426	// unconditionally include in API requests. By default, fields with
11427	// empty values are omitted from API requests. However, any non-pointer,
11428	// non-interface field appearing in ForceSendFields will be sent to the
11429	// server regardless of whether the field is empty or not. This may be
11430	// used to include empty fields in Patch requests.
11431	ForceSendFields []string `json:"-"`
11432
11433	// NullFields is a list of field names (e.g. "Documents") to include in
11434	// API requests with the JSON null value. By default, fields with empty
11435	// values are omitted from API requests. However, any field with an
11436	// empty value appearing in NullFields will be sent to the server as
11437	// null. It is an error if a field in this list has a non-empty value.
11438	// This may be used to include null fields in Patch requests.
11439	NullFields []string `json:"-"`
11440}
11441
11442func (s *GoogleCloudDialogflowV2ListDocumentsResponse) MarshalJSON() ([]byte, error) {
11443	type NoMethod GoogleCloudDialogflowV2ListDocumentsResponse
11444	raw := NoMethod(*s)
11445	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11446}
11447
11448// GoogleCloudDialogflowV2ListEntityTypesResponse: The response message
11449// for EntityTypes.ListEntityTypes.
11450type GoogleCloudDialogflowV2ListEntityTypesResponse struct {
11451	// EntityTypes: The list of agent entity types. There will be a maximum
11452	// number of items returned based on the page_size field in the request.
11453	EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"`
11454
11455	// NextPageToken: Token to retrieve the next page of results, or empty
11456	// if there are no more results in the list.
11457	NextPageToken string `json:"nextPageToken,omitempty"`
11458
11459	// ServerResponse contains the HTTP response code and headers from the
11460	// server.
11461	googleapi.ServerResponse `json:"-"`
11462
11463	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
11464	// unconditionally include in API requests. By default, fields with
11465	// empty values are omitted from API requests. However, any non-pointer,
11466	// non-interface field appearing in ForceSendFields will be sent to the
11467	// server regardless of whether the field is empty or not. This may be
11468	// used to include empty fields in Patch requests.
11469	ForceSendFields []string `json:"-"`
11470
11471	// NullFields is a list of field names (e.g. "EntityTypes") to include
11472	// in API requests with the JSON null value. By default, fields with
11473	// empty values are omitted from API requests. However, any field with
11474	// an empty value appearing in NullFields will be sent to the server as
11475	// null. It is an error if a field in this list has a non-empty value.
11476	// This may be used to include null fields in Patch requests.
11477	NullFields []string `json:"-"`
11478}
11479
11480func (s *GoogleCloudDialogflowV2ListEntityTypesResponse) MarshalJSON() ([]byte, error) {
11481	type NoMethod GoogleCloudDialogflowV2ListEntityTypesResponse
11482	raw := NoMethod(*s)
11483	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11484}
11485
11486// GoogleCloudDialogflowV2ListEnvironmentsResponse: The response message
11487// for Environments.ListEnvironments.
11488type GoogleCloudDialogflowV2ListEnvironmentsResponse struct {
11489	// Environments: The list of agent environments. There will be a maximum
11490	// number of items returned based on the page_size field in the request.
11491	Environments []*GoogleCloudDialogflowV2Environment `json:"environments,omitempty"`
11492
11493	// NextPageToken: Token to retrieve the next page of results, or empty
11494	// if there are no more results in the list.
11495	NextPageToken string `json:"nextPageToken,omitempty"`
11496
11497	// ServerResponse contains the HTTP response code and headers from the
11498	// server.
11499	googleapi.ServerResponse `json:"-"`
11500
11501	// ForceSendFields is a list of field names (e.g. "Environments") to
11502	// unconditionally include in API requests. By default, fields with
11503	// empty values are omitted from API requests. However, any non-pointer,
11504	// non-interface field appearing in ForceSendFields will be sent to the
11505	// server regardless of whether the field is empty or not. This may be
11506	// used to include empty fields in Patch requests.
11507	ForceSendFields []string `json:"-"`
11508
11509	// NullFields is a list of field names (e.g. "Environments") to include
11510	// in API requests with the JSON null value. By default, fields with
11511	// empty values are omitted from API requests. However, any field with
11512	// an empty value appearing in NullFields will be sent to the server as
11513	// null. It is an error if a field in this list has a non-empty value.
11514	// This may be used to include null fields in Patch requests.
11515	NullFields []string `json:"-"`
11516}
11517
11518func (s *GoogleCloudDialogflowV2ListEnvironmentsResponse) MarshalJSON() ([]byte, error) {
11519	type NoMethod GoogleCloudDialogflowV2ListEnvironmentsResponse
11520	raw := NoMethod(*s)
11521	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11522}
11523
11524// GoogleCloudDialogflowV2ListIntentsResponse: The response message for
11525// Intents.ListIntents.
11526type GoogleCloudDialogflowV2ListIntentsResponse struct {
11527	// Intents: The list of agent intents. There will be a maximum number of
11528	// items returned based on the page_size field in the request.
11529	Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"`
11530
11531	// NextPageToken: Token to retrieve the next page of results, or empty
11532	// if there are no more results in the list.
11533	NextPageToken string `json:"nextPageToken,omitempty"`
11534
11535	// ServerResponse contains the HTTP response code and headers from the
11536	// server.
11537	googleapi.ServerResponse `json:"-"`
11538
11539	// ForceSendFields is a list of field names (e.g. "Intents") to
11540	// unconditionally include in API requests. By default, fields with
11541	// empty values are omitted from API requests. However, any non-pointer,
11542	// non-interface field appearing in ForceSendFields will be sent to the
11543	// server regardless of whether the field is empty or not. This may be
11544	// used to include empty fields in Patch requests.
11545	ForceSendFields []string `json:"-"`
11546
11547	// NullFields is a list of field names (e.g. "Intents") to include in
11548	// API requests with the JSON null value. By default, fields with empty
11549	// values are omitted from API requests. However, any field with an
11550	// empty value appearing in NullFields will be sent to the server as
11551	// null. It is an error if a field in this list has a non-empty value.
11552	// This may be used to include null fields in Patch requests.
11553	NullFields []string `json:"-"`
11554}
11555
11556func (s *GoogleCloudDialogflowV2ListIntentsResponse) MarshalJSON() ([]byte, error) {
11557	type NoMethod GoogleCloudDialogflowV2ListIntentsResponse
11558	raw := NoMethod(*s)
11559	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11560}
11561
11562// GoogleCloudDialogflowV2ListKnowledgeBasesResponse: Response message
11563// for KnowledgeBases.ListKnowledgeBases.
11564type GoogleCloudDialogflowV2ListKnowledgeBasesResponse struct {
11565	// KnowledgeBases: The list of knowledge bases.
11566	KnowledgeBases []*GoogleCloudDialogflowV2KnowledgeBase `json:"knowledgeBases,omitempty"`
11567
11568	// NextPageToken: Token to retrieve the next page of results, or empty
11569	// if there are no more results in the list.
11570	NextPageToken string `json:"nextPageToken,omitempty"`
11571
11572	// ServerResponse contains the HTTP response code and headers from the
11573	// server.
11574	googleapi.ServerResponse `json:"-"`
11575
11576	// ForceSendFields is a list of field names (e.g. "KnowledgeBases") to
11577	// unconditionally include in API requests. By default, fields with
11578	// empty values are omitted from API requests. However, any non-pointer,
11579	// non-interface field appearing in ForceSendFields will be sent to the
11580	// server regardless of whether the field is empty or not. This may be
11581	// used to include empty fields in Patch requests.
11582	ForceSendFields []string `json:"-"`
11583
11584	// NullFields is a list of field names (e.g. "KnowledgeBases") to
11585	// include in API requests with the JSON null value. By default, fields
11586	// with empty values are omitted from API requests. However, any field
11587	// with an empty value appearing in NullFields will be sent to the
11588	// server as null. It is an error if a field in this list has a
11589	// non-empty value. This may be used to include null fields in Patch
11590	// requests.
11591	NullFields []string `json:"-"`
11592}
11593
11594func (s *GoogleCloudDialogflowV2ListKnowledgeBasesResponse) MarshalJSON() ([]byte, error) {
11595	type NoMethod GoogleCloudDialogflowV2ListKnowledgeBasesResponse
11596	raw := NoMethod(*s)
11597	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11598}
11599
11600// GoogleCloudDialogflowV2ListMessagesResponse: The response message for
11601// Conversations.ListMessages.
11602type GoogleCloudDialogflowV2ListMessagesResponse struct {
11603	// Messages: The list of messages. There will be a maximum number of
11604	// items returned based on the page_size field in the request.
11605	// `messages` is sorted by `create_time` in descending order.
11606	Messages []*GoogleCloudDialogflowV2Message `json:"messages,omitempty"`
11607
11608	// NextPageToken: Token to retrieve the next page of results, or empty
11609	// if there are no more results in the list.
11610	NextPageToken string `json:"nextPageToken,omitempty"`
11611
11612	// ServerResponse contains the HTTP response code and headers from the
11613	// server.
11614	googleapi.ServerResponse `json:"-"`
11615
11616	// ForceSendFields is a list of field names (e.g. "Messages") to
11617	// unconditionally include in API requests. By default, fields with
11618	// empty values are omitted from API requests. However, any non-pointer,
11619	// non-interface field appearing in ForceSendFields will be sent to the
11620	// server regardless of whether the field is empty or not. This may be
11621	// used to include empty fields in Patch requests.
11622	ForceSendFields []string `json:"-"`
11623
11624	// NullFields is a list of field names (e.g. "Messages") to include in
11625	// API requests with the JSON null value. By default, fields with empty
11626	// values are omitted from API requests. However, any field with an
11627	// empty value appearing in NullFields will be sent to the server as
11628	// null. It is an error if a field in this list has a non-empty value.
11629	// This may be used to include null fields in Patch requests.
11630	NullFields []string `json:"-"`
11631}
11632
11633func (s *GoogleCloudDialogflowV2ListMessagesResponse) MarshalJSON() ([]byte, error) {
11634	type NoMethod GoogleCloudDialogflowV2ListMessagesResponse
11635	raw := NoMethod(*s)
11636	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11637}
11638
11639// GoogleCloudDialogflowV2ListParticipantsResponse: The response message
11640// for Participants.ListParticipants.
11641type GoogleCloudDialogflowV2ListParticipantsResponse struct {
11642	// NextPageToken: Token to retrieve the next page of results or empty if
11643	// there are no more results in the list.
11644	NextPageToken string `json:"nextPageToken,omitempty"`
11645
11646	// Participants: The list of participants. There is a maximum number of
11647	// items returned based on the page_size field in the request.
11648	Participants []*GoogleCloudDialogflowV2Participant `json:"participants,omitempty"`
11649
11650	// ServerResponse contains the HTTP response code and headers from the
11651	// server.
11652	googleapi.ServerResponse `json:"-"`
11653
11654	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
11655	// unconditionally include in API requests. By default, fields with
11656	// empty values are omitted from API requests. However, any non-pointer,
11657	// non-interface field appearing in ForceSendFields will be sent to the
11658	// server regardless of whether the field is empty or not. This may be
11659	// used to include empty fields in Patch requests.
11660	ForceSendFields []string `json:"-"`
11661
11662	// NullFields is a list of field names (e.g. "NextPageToken") to include
11663	// in API requests with the JSON null value. By default, fields with
11664	// empty values are omitted from API requests. However, any field with
11665	// an empty value appearing in NullFields will be sent to the server as
11666	// null. It is an error if a field in this list has a non-empty value.
11667	// This may be used to include null fields in Patch requests.
11668	NullFields []string `json:"-"`
11669}
11670
11671func (s *GoogleCloudDialogflowV2ListParticipantsResponse) MarshalJSON() ([]byte, error) {
11672	type NoMethod GoogleCloudDialogflowV2ListParticipantsResponse
11673	raw := NoMethod(*s)
11674	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11675}
11676
11677// GoogleCloudDialogflowV2ListSessionEntityTypesResponse: The response
11678// message for SessionEntityTypes.ListSessionEntityTypes.
11679type GoogleCloudDialogflowV2ListSessionEntityTypesResponse struct {
11680	// NextPageToken: Token to retrieve the next page of results, or empty
11681	// if there are no more results in the list.
11682	NextPageToken string `json:"nextPageToken,omitempty"`
11683
11684	// SessionEntityTypes: The list of session entity types. There will be a
11685	// maximum number of items returned based on the page_size field in the
11686	// request.
11687	SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"`
11688
11689	// ServerResponse contains the HTTP response code and headers from the
11690	// server.
11691	googleapi.ServerResponse `json:"-"`
11692
11693	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
11694	// unconditionally include in API requests. By default, fields with
11695	// empty values are omitted from API requests. However, any non-pointer,
11696	// non-interface field appearing in ForceSendFields will be sent to the
11697	// server regardless of whether the field is empty or not. This may be
11698	// used to include empty fields in Patch requests.
11699	ForceSendFields []string `json:"-"`
11700
11701	// NullFields is a list of field names (e.g. "NextPageToken") to include
11702	// in API requests with the JSON null value. By default, fields with
11703	// empty values are omitted from API requests. However, any field with
11704	// an empty value appearing in NullFields will be sent to the server as
11705	// null. It is an error if a field in this list has a non-empty value.
11706	// This may be used to include null fields in Patch requests.
11707	NullFields []string `json:"-"`
11708}
11709
11710func (s *GoogleCloudDialogflowV2ListSessionEntityTypesResponse) MarshalJSON() ([]byte, error) {
11711	type NoMethod GoogleCloudDialogflowV2ListSessionEntityTypesResponse
11712	raw := NoMethod(*s)
11713	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11714}
11715
11716// GoogleCloudDialogflowV2ListVersionsResponse: The response message for
11717// Versions.ListVersions.
11718type GoogleCloudDialogflowV2ListVersionsResponse struct {
11719	// NextPageToken: Token to retrieve the next page of results, or empty
11720	// if there are no more results in the list.
11721	NextPageToken string `json:"nextPageToken,omitempty"`
11722
11723	// Versions: The list of agent versions. There will be a maximum number
11724	// of items returned based on the page_size field in the request.
11725	Versions []*GoogleCloudDialogflowV2Version `json:"versions,omitempty"`
11726
11727	// ServerResponse contains the HTTP response code and headers from the
11728	// server.
11729	googleapi.ServerResponse `json:"-"`
11730
11731	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
11732	// unconditionally include in API requests. By default, fields with
11733	// empty values are omitted from API requests. However, any non-pointer,
11734	// non-interface field appearing in ForceSendFields will be sent to the
11735	// server regardless of whether the field is empty or not. This may be
11736	// used to include empty fields in Patch requests.
11737	ForceSendFields []string `json:"-"`
11738
11739	// NullFields is a list of field names (e.g. "NextPageToken") to include
11740	// in API requests with the JSON null value. By default, fields with
11741	// empty values are omitted from API requests. However, any field with
11742	// an empty value appearing in NullFields will be sent to the server as
11743	// null. It is an error if a field in this list has a non-empty value.
11744	// This may be used to include null fields in Patch requests.
11745	NullFields []string `json:"-"`
11746}
11747
11748func (s *GoogleCloudDialogflowV2ListVersionsResponse) MarshalJSON() ([]byte, error) {
11749	type NoMethod GoogleCloudDialogflowV2ListVersionsResponse
11750	raw := NoMethod(*s)
11751	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11752}
11753
11754// GoogleCloudDialogflowV2LoggingConfig: Defines logging behavior for
11755// conversation lifecycle events.
11756type GoogleCloudDialogflowV2LoggingConfig struct {
11757	// EnableStackdriverLogging: Whether to log conversation events like
11758	// CONVERSATION_STARTED to Stackdriver in the conversation project as
11759	// JSON format ConversationEvent protos.
11760	EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"`
11761
11762	// ForceSendFields is a list of field names (e.g.
11763	// "EnableStackdriverLogging") to unconditionally include in API
11764	// requests. By default, fields with empty values are omitted from API
11765	// requests. However, any non-pointer, non-interface field appearing in
11766	// ForceSendFields will be sent to the server regardless of whether the
11767	// field is empty or not. This may be used to include empty fields in
11768	// Patch requests.
11769	ForceSendFields []string `json:"-"`
11770
11771	// NullFields is a list of field names (e.g. "EnableStackdriverLogging")
11772	// to include in API requests with the JSON null value. By default,
11773	// fields with empty values are omitted from API requests. However, any
11774	// field with an empty value appearing in NullFields will be sent to the
11775	// server as null. It is an error if a field in this list has a
11776	// non-empty value. This may be used to include null fields in Patch
11777	// requests.
11778	NullFields []string `json:"-"`
11779}
11780
11781func (s *GoogleCloudDialogflowV2LoggingConfig) MarshalJSON() ([]byte, error) {
11782	type NoMethod GoogleCloudDialogflowV2LoggingConfig
11783	raw := NoMethod(*s)
11784	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11785}
11786
11787// GoogleCloudDialogflowV2Message: Represents a message posted into a
11788// conversation.
11789type GoogleCloudDialogflowV2Message struct {
11790	// Content: Required. The message content.
11791	Content string `json:"content,omitempty"`
11792
11793	// CreateTime: Output only. The time when the message was created.
11794	CreateTime string `json:"createTime,omitempty"`
11795
11796	// LanguageCode: Optional. The message language. This should be a BCP-47
11797	// (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example:
11798	// "en-US".
11799	LanguageCode string `json:"languageCode,omitempty"`
11800
11801	// MessageAnnotation: Output only. The annotation for the message.
11802	MessageAnnotation *GoogleCloudDialogflowV2MessageAnnotation `json:"messageAnnotation,omitempty"`
11803
11804	// Name: The unique identifier of the message. Format:
11805	// `projects//locations//conversations//messages/`.
11806	Name string `json:"name,omitempty"`
11807
11808	// Participant: Output only. The participant that sends this message.
11809	Participant string `json:"participant,omitempty"`
11810
11811	// ParticipantRole: Output only. The role of the participant.
11812	//
11813	// Possible values:
11814	//   "ROLE_UNSPECIFIED" - Participant role not set.
11815	//   "HUMAN_AGENT" - Participant is a human agent.
11816	//   "AUTOMATED_AGENT" - Participant is an automated agent, such as a
11817	// Dialogflow agent.
11818	//   "END_USER" - Participant is an end user that has called or chatted
11819	// with Dialogflow services.
11820	ParticipantRole string `json:"participantRole,omitempty"`
11821
11822	// ForceSendFields is a list of field names (e.g. "Content") to
11823	// unconditionally include in API requests. By default, fields with
11824	// empty values are omitted from API requests. However, any non-pointer,
11825	// non-interface field appearing in ForceSendFields will be sent to the
11826	// server regardless of whether the field is empty or not. This may be
11827	// used to include empty fields in Patch requests.
11828	ForceSendFields []string `json:"-"`
11829
11830	// NullFields is a list of field names (e.g. "Content") to include in
11831	// API requests with the JSON null value. By default, fields with empty
11832	// values are omitted from API requests. However, any field with an
11833	// empty value appearing in NullFields will be sent to the server as
11834	// null. It is an error if a field in this list has a non-empty value.
11835	// This may be used to include null fields in Patch requests.
11836	NullFields []string `json:"-"`
11837}
11838
11839func (s *GoogleCloudDialogflowV2Message) MarshalJSON() ([]byte, error) {
11840	type NoMethod GoogleCloudDialogflowV2Message
11841	raw := NoMethod(*s)
11842	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11843}
11844
11845// GoogleCloudDialogflowV2MessageAnnotation: Represents the result of
11846// annotation for the message.
11847type GoogleCloudDialogflowV2MessageAnnotation struct {
11848	// ContainEntities: Indicates whether the text message contains
11849	// entities.
11850	ContainEntities bool `json:"containEntities,omitempty"`
11851
11852	// Parts: The collection of annotated message parts ordered by their
11853	// position in the message. You can recover the annotated message by
11854	// concatenating [AnnotatedMessagePart.text].
11855	Parts []*GoogleCloudDialogflowV2AnnotatedMessagePart `json:"parts,omitempty"`
11856
11857	// ForceSendFields is a list of field names (e.g. "ContainEntities") to
11858	// unconditionally include in API requests. By default, fields with
11859	// empty values are omitted from API requests. However, any non-pointer,
11860	// non-interface field appearing in ForceSendFields will be sent to the
11861	// server regardless of whether the field is empty or not. This may be
11862	// used to include empty fields in Patch requests.
11863	ForceSendFields []string `json:"-"`
11864
11865	// NullFields is a list of field names (e.g. "ContainEntities") to
11866	// include in API requests with the JSON null value. By default, fields
11867	// with empty values are omitted from API requests. However, any field
11868	// with an empty value appearing in NullFields will be sent to the
11869	// server as null. It is an error if a field in this list has a
11870	// non-empty value. This may be used to include null fields in Patch
11871	// requests.
11872	NullFields []string `json:"-"`
11873}
11874
11875func (s *GoogleCloudDialogflowV2MessageAnnotation) MarshalJSON() ([]byte, error) {
11876	type NoMethod GoogleCloudDialogflowV2MessageAnnotation
11877	raw := NoMethod(*s)
11878	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11879}
11880
11881// GoogleCloudDialogflowV2NotificationConfig: Defines notification
11882// behavior.
11883type GoogleCloudDialogflowV2NotificationConfig struct {
11884	// MessageFormat: Format of message.
11885	//
11886	// Possible values:
11887	//   "MESSAGE_FORMAT_UNSPECIFIED" - If it is unspeified, PROTO will be
11888	// used.
11889	//   "PROTO" - Pubsub message will be serialized proto.
11890	//   "JSON" - Pubsub message will be json.
11891	MessageFormat string `json:"messageFormat,omitempty"`
11892
11893	// Topic: Name of the Pub/Sub topic to publish conversation events like
11894	// CONVERSATION_STARTED as serialized ConversationEvent protos.
11895	// Notification works for phone calls, if this topic either is in the
11896	// same project as the conversation or you grant
11897	// `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow
11898	// Service Agent` role in the topic project. Format:
11899	// `projects//locations//topics/`.
11900	Topic string `json:"topic,omitempty"`
11901
11902	// ForceSendFields is a list of field names (e.g. "MessageFormat") to
11903	// unconditionally include in API requests. By default, fields with
11904	// empty values are omitted from API requests. However, any non-pointer,
11905	// non-interface field appearing in ForceSendFields will be sent to the
11906	// server regardless of whether the field is empty or not. This may be
11907	// used to include empty fields in Patch requests.
11908	ForceSendFields []string `json:"-"`
11909
11910	// NullFields is a list of field names (e.g. "MessageFormat") to include
11911	// in API requests with the JSON null value. By default, fields with
11912	// empty values are omitted from API requests. However, any field with
11913	// an empty value appearing in NullFields will be sent to the server as
11914	// null. It is an error if a field in this list has a non-empty value.
11915	// This may be used to include null fields in Patch requests.
11916	NullFields []string `json:"-"`
11917}
11918
11919func (s *GoogleCloudDialogflowV2NotificationConfig) MarshalJSON() ([]byte, error) {
11920	type NoMethod GoogleCloudDialogflowV2NotificationConfig
11921	raw := NoMethod(*s)
11922	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11923}
11924
11925// GoogleCloudDialogflowV2OriginalDetectIntentRequest: Represents the
11926// contents of the original request that was passed to the
11927// `[Streaming]DetectIntent` call.
11928type GoogleCloudDialogflowV2OriginalDetectIntentRequest struct {
11929	// Payload: Optional. This field is set to the value of the
11930	// `QueryParameters.payload` field passed in the request. Some
11931	// integrations that query a Dialogflow agent may provide additional
11932	// information in the payload. In particular, for the Dialogflow Phone
11933	// Gateway integration, this field has the form: { "telephony": {
11934	// "caller_id": "+18558363987" } } Note: The caller ID field
11935	// (`caller_id`) will be redacted for Trial Edition agents and populated
11936	// with the caller ID in E.164 format
11937	// (https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents.
11938	Payload googleapi.RawMessage `json:"payload,omitempty"`
11939
11940	// Source: The source of this request, e.g., `google`, `facebook`,
11941	// `slack`. It is set by Dialogflow-owned servers.
11942	Source string `json:"source,omitempty"`
11943
11944	// Version: Optional. The version of the protocol used for this request.
11945	// This field is AoG-specific.
11946	Version string `json:"version,omitempty"`
11947
11948	// ForceSendFields is a list of field names (e.g. "Payload") to
11949	// unconditionally include in API requests. By default, fields with
11950	// empty values are omitted from API requests. However, any non-pointer,
11951	// non-interface field appearing in ForceSendFields will be sent to the
11952	// server regardless of whether the field is empty or not. This may be
11953	// used to include empty fields in Patch requests.
11954	ForceSendFields []string `json:"-"`
11955
11956	// NullFields is a list of field names (e.g. "Payload") to include in
11957	// API requests with the JSON null value. By default, fields with empty
11958	// values are omitted from API requests. However, any field with an
11959	// empty value appearing in NullFields will be sent to the server as
11960	// null. It is an error if a field in this list has a non-empty value.
11961	// This may be used to include null fields in Patch requests.
11962	NullFields []string `json:"-"`
11963}
11964
11965func (s *GoogleCloudDialogflowV2OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) {
11966	type NoMethod GoogleCloudDialogflowV2OriginalDetectIntentRequest
11967	raw := NoMethod(*s)
11968	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11969}
11970
11971// GoogleCloudDialogflowV2OutputAudio: Represents the natural language
11972// speech audio to be played to the end user.
11973type GoogleCloudDialogflowV2OutputAudio struct {
11974	// Audio: The natural language speech audio.
11975	Audio string `json:"audio,omitempty"`
11976
11977	// Config: Instructs the speech synthesizer how to generate the speech
11978	// audio.
11979	Config *GoogleCloudDialogflowV2OutputAudioConfig `json:"config,omitempty"`
11980
11981	// ForceSendFields is a list of field names (e.g. "Audio") to
11982	// unconditionally include in API requests. By default, fields with
11983	// empty values are omitted from API requests. However, any non-pointer,
11984	// non-interface field appearing in ForceSendFields will be sent to the
11985	// server regardless of whether the field is empty or not. This may be
11986	// used to include empty fields in Patch requests.
11987	ForceSendFields []string `json:"-"`
11988
11989	// NullFields is a list of field names (e.g. "Audio") to include in API
11990	// requests with the JSON null value. By default, fields with empty
11991	// values are omitted from API requests. However, any field with an
11992	// empty value appearing in NullFields will be sent to the server as
11993	// null. It is an error if a field in this list has a non-empty value.
11994	// This may be used to include null fields in Patch requests.
11995	NullFields []string `json:"-"`
11996}
11997
11998func (s *GoogleCloudDialogflowV2OutputAudio) MarshalJSON() ([]byte, error) {
11999	type NoMethod GoogleCloudDialogflowV2OutputAudio
12000	raw := NoMethod(*s)
12001	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12002}
12003
12004// GoogleCloudDialogflowV2OutputAudioConfig: Instructs the speech
12005// synthesizer on how to generate the output audio content. If this
12006// audio config is supplied in a request, it overrides all existing
12007// text-to-speech settings applied to the agent.
12008type GoogleCloudDialogflowV2OutputAudioConfig struct {
12009	// AudioEncoding: Required. Audio encoding of the synthesized audio
12010	// content.
12011	//
12012	// Possible values:
12013	//   "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" - Not specified.
12014	//   "OUTPUT_AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
12015	// little-endian samples (Linear PCM). Audio content returned as
12016	// LINEAR16 also contains a WAV header.
12017	//   "OUTPUT_AUDIO_ENCODING_MP3" - MP3 audio at 32kbps.
12018	//   "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS" - MP3 audio at 64kbps.
12019	//   "OUTPUT_AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio wrapped in an
12020	// ogg container. The result will be a file which can be played natively
12021	// on Android, and in browsers (at least Chrome and Firefox). The
12022	// quality of the encoding is considerably higher than MP3 while using
12023	// approximately the same bitrate.
12024	//   "OUTPUT_AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit
12025	// audio samples using G.711 PCMU/mu-law.
12026	AudioEncoding string `json:"audioEncoding,omitempty"`
12027
12028	// SampleRateHertz: The synthesis sample rate (in hertz) for this audio.
12029	// If not provided, then the synthesizer will use the default sample
12030	// rate based on the audio encoding. If this is different from the
12031	// voice's natural sample rate, then the synthesizer will honor this
12032	// request by converting to the desired sample rate (which might result
12033	// in worse audio quality).
12034	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
12035
12036	// SynthesizeSpeechConfig: Configuration of how speech should be
12037	// synthesized.
12038	SynthesizeSpeechConfig *GoogleCloudDialogflowV2SynthesizeSpeechConfig `json:"synthesizeSpeechConfig,omitempty"`
12039
12040	// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
12041	// unconditionally include in API requests. By default, fields with
12042	// empty values are omitted from API requests. However, any non-pointer,
12043	// non-interface field appearing in ForceSendFields will be sent to the
12044	// server regardless of whether the field is empty or not. This may be
12045	// used to include empty fields in Patch requests.
12046	ForceSendFields []string `json:"-"`
12047
12048	// NullFields is a list of field names (e.g. "AudioEncoding") to include
12049	// in API requests with the JSON null value. By default, fields with
12050	// empty values are omitted from API requests. However, any field with
12051	// an empty value appearing in NullFields will be sent to the server as
12052	// null. It is an error if a field in this list has a non-empty value.
12053	// This may be used to include null fields in Patch requests.
12054	NullFields []string `json:"-"`
12055}
12056
12057func (s *GoogleCloudDialogflowV2OutputAudioConfig) MarshalJSON() ([]byte, error) {
12058	type NoMethod GoogleCloudDialogflowV2OutputAudioConfig
12059	raw := NoMethod(*s)
12060	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12061}
12062
12063// GoogleCloudDialogflowV2Participant: Represents a conversation
12064// participant (human agent, virtual agent, end-user).
12065type GoogleCloudDialogflowV2Participant struct {
12066	// Name: Optional. The unique identifier of this participant. Format:
12067	// `projects//locations//conversations//participants/`.
12068	Name string `json:"name,omitempty"`
12069
12070	// Role: Immutable. The role this participant plays in the conversation.
12071	// This field must be set during participant creation and is then
12072	// immutable.
12073	//
12074	// Possible values:
12075	//   "ROLE_UNSPECIFIED" - Participant role not set.
12076	//   "HUMAN_AGENT" - Participant is a human agent.
12077	//   "AUTOMATED_AGENT" - Participant is an automated agent, such as a
12078	// Dialogflow agent.
12079	//   "END_USER" - Participant is an end user that has called or chatted
12080	// with Dialogflow services.
12081	Role string `json:"role,omitempty"`
12082
12083	// SipRecordingMediaLabel: Optional. Label applied to streams
12084	// representing this participant in SIPREC XML metadata and SDP. This is
12085	// used to assign transcriptions from that media stream to this
12086	// participant. This field can be updated.
12087	SipRecordingMediaLabel string `json:"sipRecordingMediaLabel,omitempty"`
12088
12089	// ServerResponse contains the HTTP response code and headers from the
12090	// server.
12091	googleapi.ServerResponse `json:"-"`
12092
12093	// ForceSendFields is a list of field names (e.g. "Name") to
12094	// unconditionally include in API requests. By default, fields with
12095	// empty values are omitted from API requests. However, any non-pointer,
12096	// non-interface field appearing in ForceSendFields will be sent to the
12097	// server regardless of whether the field is empty or not. This may be
12098	// used to include empty fields in Patch requests.
12099	ForceSendFields []string `json:"-"`
12100
12101	// NullFields is a list of field names (e.g. "Name") to include in API
12102	// requests with the JSON null value. By default, fields with empty
12103	// values are omitted from API requests. However, any field with an
12104	// empty value appearing in NullFields will be sent to the server as
12105	// null. It is an error if a field in this list has a non-empty value.
12106	// This may be used to include null fields in Patch requests.
12107	NullFields []string `json:"-"`
12108}
12109
12110func (s *GoogleCloudDialogflowV2Participant) MarshalJSON() ([]byte, error) {
12111	type NoMethod GoogleCloudDialogflowV2Participant
12112	raw := NoMethod(*s)
12113	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12114}
12115
12116// GoogleCloudDialogflowV2QueryInput: Represents the query input. It can
12117// contain either: 1. An audio config which instructs the speech
12118// recognizer how to process the speech audio. 2. A conversational query
12119// in the form of text,. 3. An event that specifies which intent to
12120// trigger.
12121type GoogleCloudDialogflowV2QueryInput struct {
12122	// AudioConfig: Instructs the speech recognizer how to process the
12123	// speech audio.
12124	AudioConfig *GoogleCloudDialogflowV2InputAudioConfig `json:"audioConfig,omitempty"`
12125
12126	// Event: The event to be processed.
12127	Event *GoogleCloudDialogflowV2EventInput `json:"event,omitempty"`
12128
12129	// Text: The natural language text to be processed.
12130	Text *GoogleCloudDialogflowV2TextInput `json:"text,omitempty"`
12131
12132	// ForceSendFields is a list of field names (e.g. "AudioConfig") to
12133	// unconditionally include in API requests. By default, fields with
12134	// empty values are omitted from API requests. However, any non-pointer,
12135	// non-interface field appearing in ForceSendFields will be sent to the
12136	// server regardless of whether the field is empty or not. This may be
12137	// used to include empty fields in Patch requests.
12138	ForceSendFields []string `json:"-"`
12139
12140	// NullFields is a list of field names (e.g. "AudioConfig") to include
12141	// in API requests with the JSON null value. By default, fields with
12142	// empty values are omitted from API requests. However, any field with
12143	// an empty value appearing in NullFields will be sent to the server as
12144	// null. It is an error if a field in this list has a non-empty value.
12145	// This may be used to include null fields in Patch requests.
12146	NullFields []string `json:"-"`
12147}
12148
12149func (s *GoogleCloudDialogflowV2QueryInput) MarshalJSON() ([]byte, error) {
12150	type NoMethod GoogleCloudDialogflowV2QueryInput
12151	raw := NoMethod(*s)
12152	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12153}
12154
12155// GoogleCloudDialogflowV2QueryParameters: Represents the parameters of
12156// the conversational query.
12157type GoogleCloudDialogflowV2QueryParameters struct {
12158	// Contexts: The collection of contexts to be activated before this
12159	// query is executed.
12160	Contexts []*GoogleCloudDialogflowV2Context `json:"contexts,omitempty"`
12161
12162	// GeoLocation: The geo location of this conversational query.
12163	GeoLocation *GoogleTypeLatLng `json:"geoLocation,omitempty"`
12164
12165	// Payload: This field can be used to pass custom data to your webhook.
12166	// Arbitrary JSON objects are supported. If supplied, the value is used
12167	// to populate the
12168	// `WebhookRequest.original_detect_intent_request.payload` field sent to
12169	// your webhook.
12170	Payload googleapi.RawMessage `json:"payload,omitempty"`
12171
12172	// ResetContexts: Specifies whether to delete all contexts in the
12173	// current session before the new ones are activated.
12174	ResetContexts bool `json:"resetContexts,omitempty"`
12175
12176	// SentimentAnalysisRequestConfig: Configures the type of sentiment
12177	// analysis to perform. If not provided, sentiment analysis is not
12178	// performed.
12179	SentimentAnalysisRequestConfig *GoogleCloudDialogflowV2SentimentAnalysisRequestConfig `json:"sentimentAnalysisRequestConfig,omitempty"`
12180
12181	// SessionEntityTypes: Additional session entity types to replace or
12182	// extend developer entity types with. The entity synonyms apply to all
12183	// languages and persist for the session of this query.
12184	SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"`
12185
12186	// TimeZone: The time zone of this conversational query from the time
12187	// zone database (https://www.iana.org/time-zones), e.g.,
12188	// America/New_York, Europe/Paris. If not provided, the time zone
12189	// specified in agent settings is used.
12190	TimeZone string `json:"timeZone,omitempty"`
12191
12192	// WebhookHeaders: This field can be used to pass HTTP headers for a
12193	// webhook call. These headers will be sent to webhook along with the
12194	// headers that have been configured through the Dialogflow web console.
12195	// The headers defined within this field will overwrite the headers
12196	// configured through the Dialogflow console if there is a conflict.
12197	// Header names are case-insensitive. Google's specified headers are not
12198	// allowed. Including: "Host", "Content-Length", "Connection", "From",
12199	// "User-Agent", "Accept-Encoding", "If-Modified-Since",
12200	// "If-None-Match", "X-Forwarded-For", etc.
12201	WebhookHeaders map[string]string `json:"webhookHeaders,omitempty"`
12202
12203	// ForceSendFields is a list of field names (e.g. "Contexts") to
12204	// unconditionally include in API requests. By default, fields with
12205	// empty values are omitted from API requests. However, any non-pointer,
12206	// non-interface field appearing in ForceSendFields will be sent to the
12207	// server regardless of whether the field is empty or not. This may be
12208	// used to include empty fields in Patch requests.
12209	ForceSendFields []string `json:"-"`
12210
12211	// NullFields is a list of field names (e.g. "Contexts") to include in
12212	// API requests with the JSON null value. By default, fields with empty
12213	// values are omitted from API requests. However, any field with an
12214	// empty value appearing in NullFields will be sent to the server as
12215	// null. It is an error if a field in this list has a non-empty value.
12216	// This may be used to include null fields in Patch requests.
12217	NullFields []string `json:"-"`
12218}
12219
12220func (s *GoogleCloudDialogflowV2QueryParameters) MarshalJSON() ([]byte, error) {
12221	type NoMethod GoogleCloudDialogflowV2QueryParameters
12222	raw := NoMethod(*s)
12223	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12224}
12225
12226// GoogleCloudDialogflowV2QueryResult: Represents the result of
12227// conversational query or event processing.
12228type GoogleCloudDialogflowV2QueryResult struct {
12229	// Action: The action name from the matched intent.
12230	Action string `json:"action,omitempty"`
12231
12232	// AllRequiredParamsPresent: This field is set to: - `false` if the
12233	// matched intent has required parameters and not all of the required
12234	// parameter values have been collected. - `true` if all required
12235	// parameter values have been collected, or if the matched intent
12236	// doesn't contain any required parameters.
12237	AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"`
12238
12239	// CancelsSlotFilling: Indicates whether the conversational query
12240	// triggers a cancellation for slot filling.
12241	CancelsSlotFilling bool `json:"cancelsSlotFilling,omitempty"`
12242
12243	// DiagnosticInfo: Free-form diagnostic information for the associated
12244	// detect intent request. The fields of this data can change without
12245	// notice, so you should not write code that depends on its structure.
12246	// The data may contain: - webhook call latency - webhook errors
12247	DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
12248
12249	// FulfillmentMessages: The collection of rich messages to present to
12250	// the user.
12251	FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"`
12252
12253	// FulfillmentText: The text to be pronounced to the user or shown on
12254	// the screen. Note: This is a legacy field, `fulfillment_messages`
12255	// should be preferred.
12256	FulfillmentText string `json:"fulfillmentText,omitempty"`
12257
12258	// Intent: The intent that matched the conversational query. Some, not
12259	// all fields are filled in this message, including but not limited to:
12260	// `name`, `display_name`, `end_interaction` and `is_fallback`.
12261	Intent *GoogleCloudDialogflowV2Intent `json:"intent,omitempty"`
12262
12263	// IntentDetectionConfidence: The intent detection confidence. Values
12264	// range from 0.0 (completely uncertain) to 1.0 (completely certain).
12265	// This value is for informational purpose only and is only used to help
12266	// match the best intent within the classification threshold. This value
12267	// may change for the same end-user expression at any time due to a
12268	// model retraining or change in implementation. If there are `multiple
12269	// knowledge_answers` messages, this value is set to the greatest
12270	// `knowledgeAnswers.match_confidence` value in the list.
12271	IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"`
12272
12273	// LanguageCode: The language that was triggered during intent
12274	// detection. See Language Support
12275	// (https://cloud.google.com/dialogflow/docs/reference/language) for a
12276	// list of the currently supported language codes.
12277	LanguageCode string `json:"languageCode,omitempty"`
12278
12279	// OutputContexts: The collection of output contexts. If applicable,
12280	// `output_contexts.parameters` contains entries with name `.original`
12281	// containing the original parameter values before the query.
12282	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
12283
12284	// Parameters: The collection of extracted parameters. Depending on your
12285	// protocol or client library language, this is a map, associative
12286	// array, symbol table, dictionary, or JSON object composed of a
12287	// collection of (MapKey, MapValue) pairs: - MapKey type: string -
12288	// MapKey value: parameter name - MapValue type: - If parameter's entity
12289	// type is a composite entity: map - Else: depending on parameter value
12290	// type, could be one of string, number, boolean, null, list or map -
12291	// MapValue value: - If parameter's entity type is a composite entity:
12292	// map from composite entity property names to property values - Else:
12293	// parameter value
12294	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
12295
12296	// QueryText: The original conversational query text: - If natural
12297	// language text was provided as input, `query_text` contains a copy of
12298	// the input. - If natural language speech audio was provided as input,
12299	// `query_text` contains the speech recognition result. If speech
12300	// recognizer produced multiple alternatives, a particular one is
12301	// picked. - If automatic spell correction is enabled, `query_text` will
12302	// contain the corrected user input.
12303	QueryText string `json:"queryText,omitempty"`
12304
12305	// SentimentAnalysisResult: The sentiment analysis result, which depends
12306	// on the `sentiment_analysis_request_config` specified in the request.
12307	SentimentAnalysisResult *GoogleCloudDialogflowV2SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"`
12308
12309	// SpeechRecognitionConfidence: The Speech recognition confidence
12310	// between 0.0 and 1.0. A higher number indicates an estimated greater
12311	// likelihood that the recognized words are correct. The default of 0.0
12312	// is a sentinel value indicating that confidence was not set. This
12313	// field is not guaranteed to be accurate or set. In particular this
12314	// field isn't set for StreamingDetectIntent since the streaming
12315	// endpoint has separate confidence estimates per portion of the audio
12316	// in StreamingRecognitionResult.
12317	SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"`
12318
12319	// WebhookPayload: If the query was fulfilled by a webhook call, this
12320	// field is set to the value of the `payload` field returned in the
12321	// webhook response.
12322	WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"`
12323
12324	// WebhookSource: If the query was fulfilled by a webhook call, this
12325	// field is set to the value of the `source` field returned in the
12326	// webhook response.
12327	WebhookSource string `json:"webhookSource,omitempty"`
12328
12329	// ForceSendFields is a list of field names (e.g. "Action") to
12330	// unconditionally include in API requests. By default, fields with
12331	// empty values are omitted from API requests. However, any non-pointer,
12332	// non-interface field appearing in ForceSendFields will be sent to the
12333	// server regardless of whether the field is empty or not. This may be
12334	// used to include empty fields in Patch requests.
12335	ForceSendFields []string `json:"-"`
12336
12337	// NullFields is a list of field names (e.g. "Action") to include in API
12338	// requests with the JSON null value. By default, fields with empty
12339	// values are omitted from API requests. However, any field with an
12340	// empty value appearing in NullFields will be sent to the server as
12341	// null. It is an error if a field in this list has a non-empty value.
12342	// This may be used to include null fields in Patch requests.
12343	NullFields []string `json:"-"`
12344}
12345
12346func (s *GoogleCloudDialogflowV2QueryResult) MarshalJSON() ([]byte, error) {
12347	type NoMethod GoogleCloudDialogflowV2QueryResult
12348	raw := NoMethod(*s)
12349	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12350}
12351
12352func (s *GoogleCloudDialogflowV2QueryResult) UnmarshalJSON(data []byte) error {
12353	type NoMethod GoogleCloudDialogflowV2QueryResult
12354	var s1 struct {
12355		IntentDetectionConfidence   gensupport.JSONFloat64 `json:"intentDetectionConfidence"`
12356		SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"`
12357		*NoMethod
12358	}
12359	s1.NoMethod = (*NoMethod)(s)
12360	if err := json.Unmarshal(data, &s1); err != nil {
12361		return err
12362	}
12363	s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence)
12364	s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence)
12365	return nil
12366}
12367
12368// GoogleCloudDialogflowV2ReloadDocumentRequest: Request message for
12369// Documents.ReloadDocument.
12370type GoogleCloudDialogflowV2ReloadDocumentRequest struct {
12371	// ContentUri: Optional. The path of gcs source file for reloading
12372	// document content. For now, only gcs uri is supported. For documents
12373	// stored in Google Cloud Storage, these URIs must have the form
12374	// `gs:///`.
12375	ContentUri string `json:"contentUri,omitempty"`
12376
12377	// ForceSendFields is a list of field names (e.g. "ContentUri") to
12378	// unconditionally include in API requests. By default, fields with
12379	// empty values are omitted from API requests. However, any non-pointer,
12380	// non-interface field appearing in ForceSendFields will be sent to the
12381	// server regardless of whether the field is empty or not. This may be
12382	// used to include empty fields in Patch requests.
12383	ForceSendFields []string `json:"-"`
12384
12385	// NullFields is a list of field names (e.g. "ContentUri") to include in
12386	// API requests with the JSON null value. By default, fields with empty
12387	// values are omitted from API requests. However, any field with an
12388	// empty value appearing in NullFields will be sent to the server as
12389	// null. It is an error if a field in this list has a non-empty value.
12390	// This may be used to include null fields in Patch requests.
12391	NullFields []string `json:"-"`
12392}
12393
12394func (s *GoogleCloudDialogflowV2ReloadDocumentRequest) MarshalJSON() ([]byte, error) {
12395	type NoMethod GoogleCloudDialogflowV2ReloadDocumentRequest
12396	raw := NoMethod(*s)
12397	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12398}
12399
12400// GoogleCloudDialogflowV2RestoreAgentRequest: The request message for
12401// Agents.RestoreAgent.
12402type GoogleCloudDialogflowV2RestoreAgentRequest struct {
12403	// AgentContent: Zip compressed raw byte content for agent.
12404	AgentContent string `json:"agentContent,omitempty"`
12405
12406	// AgentUri: The URI to a Google Cloud Storage file containing the agent
12407	// to restore. Note: The URI must start with "gs://".
12408	AgentUri string `json:"agentUri,omitempty"`
12409
12410	// ForceSendFields is a list of field names (e.g. "AgentContent") to
12411	// unconditionally include in API requests. By default, fields with
12412	// empty values are omitted from API requests. However, any non-pointer,
12413	// non-interface field appearing in ForceSendFields will be sent to the
12414	// server regardless of whether the field is empty or not. This may be
12415	// used to include empty fields in Patch requests.
12416	ForceSendFields []string `json:"-"`
12417
12418	// NullFields is a list of field names (e.g. "AgentContent") to include
12419	// in API requests with the JSON null value. By default, fields with
12420	// empty values are omitted from API requests. However, any field with
12421	// an empty value appearing in NullFields will be sent to the server as
12422	// null. It is an error if a field in this list has a non-empty value.
12423	// This may be used to include null fields in Patch requests.
12424	NullFields []string `json:"-"`
12425}
12426
12427func (s *GoogleCloudDialogflowV2RestoreAgentRequest) MarshalJSON() ([]byte, error) {
12428	type NoMethod GoogleCloudDialogflowV2RestoreAgentRequest
12429	raw := NoMethod(*s)
12430	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12431}
12432
12433// GoogleCloudDialogflowV2SearchAgentsResponse: The response message for
12434// Agents.SearchAgents.
12435type GoogleCloudDialogflowV2SearchAgentsResponse struct {
12436	// Agents: The list of agents. There will be a maximum number of items
12437	// returned based on the page_size field in the request.
12438	Agents []*GoogleCloudDialogflowV2Agent `json:"agents,omitempty"`
12439
12440	// NextPageToken: Token to retrieve the next page of results, or empty
12441	// if there are no more results in the list.
12442	NextPageToken string `json:"nextPageToken,omitempty"`
12443
12444	// ServerResponse contains the HTTP response code and headers from the
12445	// server.
12446	googleapi.ServerResponse `json:"-"`
12447
12448	// ForceSendFields is a list of field names (e.g. "Agents") to
12449	// unconditionally include in API requests. By default, fields with
12450	// empty values are omitted from API requests. However, any non-pointer,
12451	// non-interface field appearing in ForceSendFields will be sent to the
12452	// server regardless of whether the field is empty or not. This may be
12453	// used to include empty fields in Patch requests.
12454	ForceSendFields []string `json:"-"`
12455
12456	// NullFields is a list of field names (e.g. "Agents") to include in API
12457	// requests with the JSON null value. By default, fields with empty
12458	// values are omitted from API requests. However, any field with an
12459	// empty value appearing in NullFields will be sent to the server as
12460	// null. It is an error if a field in this list has a non-empty value.
12461	// This may be used to include null fields in Patch requests.
12462	NullFields []string `json:"-"`
12463}
12464
12465func (s *GoogleCloudDialogflowV2SearchAgentsResponse) MarshalJSON() ([]byte, error) {
12466	type NoMethod GoogleCloudDialogflowV2SearchAgentsResponse
12467	raw := NoMethod(*s)
12468	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12469}
12470
12471// GoogleCloudDialogflowV2Sentiment: The sentiment, such as
12472// positive/negative feeling or association, for a unit of analysis,
12473// such as the query text.
12474type GoogleCloudDialogflowV2Sentiment struct {
12475	// Magnitude: A non-negative number in the [0, +inf) range, which
12476	// represents the absolute magnitude of sentiment, regardless of score
12477	// (positive or negative).
12478	Magnitude float64 `json:"magnitude,omitempty"`
12479
12480	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0
12481	// (positive sentiment).
12482	Score float64 `json:"score,omitempty"`
12483
12484	// ForceSendFields is a list of field names (e.g. "Magnitude") to
12485	// unconditionally include in API requests. By default, fields with
12486	// empty values are omitted from API requests. However, any non-pointer,
12487	// non-interface field appearing in ForceSendFields will be sent to the
12488	// server regardless of whether the field is empty or not. This may be
12489	// used to include empty fields in Patch requests.
12490	ForceSendFields []string `json:"-"`
12491
12492	// NullFields is a list of field names (e.g. "Magnitude") to include in
12493	// API requests with the JSON null value. By default, fields with empty
12494	// values are omitted from API requests. However, any field with an
12495	// empty value appearing in NullFields will be sent to the server as
12496	// null. It is an error if a field in this list has a non-empty value.
12497	// This may be used to include null fields in Patch requests.
12498	NullFields []string `json:"-"`
12499}
12500
12501func (s *GoogleCloudDialogflowV2Sentiment) MarshalJSON() ([]byte, error) {
12502	type NoMethod GoogleCloudDialogflowV2Sentiment
12503	raw := NoMethod(*s)
12504	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12505}
12506
12507func (s *GoogleCloudDialogflowV2Sentiment) UnmarshalJSON(data []byte) error {
12508	type NoMethod GoogleCloudDialogflowV2Sentiment
12509	var s1 struct {
12510		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
12511		Score     gensupport.JSONFloat64 `json:"score"`
12512		*NoMethod
12513	}
12514	s1.NoMethod = (*NoMethod)(s)
12515	if err := json.Unmarshal(data, &s1); err != nil {
12516		return err
12517	}
12518	s.Magnitude = float64(s1.Magnitude)
12519	s.Score = float64(s1.Score)
12520	return nil
12521}
12522
12523// GoogleCloudDialogflowV2SentimentAnalysisRequestConfig: Configures the
12524// types of sentiment analysis to perform.
12525type GoogleCloudDialogflowV2SentimentAnalysisRequestConfig struct {
12526	// AnalyzeQueryTextSentiment: Instructs the service to perform sentiment
12527	// analysis on `query_text`. If not provided, sentiment analysis is not
12528	// performed on `query_text`.
12529	AnalyzeQueryTextSentiment bool `json:"analyzeQueryTextSentiment,omitempty"`
12530
12531	// ForceSendFields is a list of field names (e.g.
12532	// "AnalyzeQueryTextSentiment") to unconditionally include in API
12533	// requests. By default, fields with empty values are omitted from API
12534	// requests. However, any non-pointer, non-interface field appearing in
12535	// ForceSendFields will be sent to the server regardless of whether the
12536	// field is empty or not. This may be used to include empty fields in
12537	// Patch requests.
12538	ForceSendFields []string `json:"-"`
12539
12540	// NullFields is a list of field names (e.g.
12541	// "AnalyzeQueryTextSentiment") to include in API requests with the JSON
12542	// null value. By default, fields with empty values are omitted from API
12543	// requests. However, any field with an empty value appearing in
12544	// NullFields will be sent to the server as null. It is an error if a
12545	// field in this list has a non-empty value. This may be used to include
12546	// null fields in Patch requests.
12547	NullFields []string `json:"-"`
12548}
12549
12550func (s *GoogleCloudDialogflowV2SentimentAnalysisRequestConfig) MarshalJSON() ([]byte, error) {
12551	type NoMethod GoogleCloudDialogflowV2SentimentAnalysisRequestConfig
12552	raw := NoMethod(*s)
12553	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12554}
12555
12556// GoogleCloudDialogflowV2SentimentAnalysisResult: The result of
12557// sentiment analysis. Sentiment analysis inspects user input and
12558// identifies the prevailing subjective opinion, especially to determine
12559// a user's attitude as positive, negative, or neutral. For
12560// Participants.DetectIntent, it needs to be configured in
12561// DetectIntentRequest.query_params. For
12562// Participants.StreamingDetectIntent, it needs to be configured in
12563// StreamingDetectIntentRequest.query_params. And for
12564// Participants.AnalyzeContent and Participants.StreamingAnalyzeContent,
12565// it needs to be configured in
12566// ConversationProfile.human_agent_assistant_config
12567type GoogleCloudDialogflowV2SentimentAnalysisResult struct {
12568	// QueryTextSentiment: The sentiment analysis result for `query_text`.
12569	QueryTextSentiment *GoogleCloudDialogflowV2Sentiment `json:"queryTextSentiment,omitempty"`
12570
12571	// ForceSendFields is a list of field names (e.g. "QueryTextSentiment")
12572	// to unconditionally include in API requests. By default, fields with
12573	// empty values are omitted from API requests. However, any non-pointer,
12574	// non-interface field appearing in ForceSendFields will be sent to the
12575	// server regardless of whether the field is empty or not. This may be
12576	// used to include empty fields in Patch requests.
12577	ForceSendFields []string `json:"-"`
12578
12579	// NullFields is a list of field names (e.g. "QueryTextSentiment") to
12580	// include in API requests with the JSON null value. By default, fields
12581	// with empty values are omitted from API requests. However, any field
12582	// with an empty value appearing in NullFields will be sent to the
12583	// server as null. It is an error if a field in this list has a
12584	// non-empty value. This may be used to include null fields in Patch
12585	// requests.
12586	NullFields []string `json:"-"`
12587}
12588
12589func (s *GoogleCloudDialogflowV2SentimentAnalysisResult) MarshalJSON() ([]byte, error) {
12590	type NoMethod GoogleCloudDialogflowV2SentimentAnalysisResult
12591	raw := NoMethod(*s)
12592	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12593}
12594
12595// GoogleCloudDialogflowV2SessionEntityType: A session represents a
12596// conversation between a Dialogflow agent and an end-user. You can
12597// create special entities, called session entities, during a session.
12598// Session entities can extend or replace custom entity types and only
12599// exist during the session that they were created for. All session
12600// data, including session entities, is stored by Dialogflow for 20
12601// minutes. For more information, see the session entity guide
12602// (https://cloud.google.com/dialogflow/docs/entities-session).
12603type GoogleCloudDialogflowV2SessionEntityType struct {
12604	// Entities: Required. The collection of entities associated with this
12605	// session entity type.
12606	Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"`
12607
12608	// EntityOverrideMode: Required. Indicates whether the additional data
12609	// should override or supplement the custom entity type definition.
12610	//
12611	// Possible values:
12612	//   "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value
12613	// should be never used.
12614	//   "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session
12615	// entities overrides the collection of entities in the corresponding
12616	// custom entity type.
12617	//   "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session
12618	// entities extends the collection of entities in the corresponding
12619	// custom entity type. Note: Even in this override mode calls to
12620	// `ListSessionEntityTypes`, `GetSessionEntityType`,
12621	// `CreateSessionEntityType` and `UpdateSessionEntityType` only return
12622	// the additional entities added in this session entity type. If you
12623	// want to get the supplemented list, please call
12624	// EntityTypes.GetEntityType on the custom entity type and merge.
12625	EntityOverrideMode string `json:"entityOverrideMode,omitempty"`
12626
12627	// Name: Required. The unique identifier of this session entity type.
12628	// Format: `projects//agent/sessions//entityTypes/`, or
12629	// `projects//agent/environments//users//sessions//entityTypes/`. If
12630	// `Environment ID` is not specified, we assume default 'draft'
12631	// environment. If `User ID` is not specified, we assume default '-'
12632	// user. `` must be the display name of an existing entity type in the
12633	// same agent that will be overridden or supplemented.
12634	Name string `json:"name,omitempty"`
12635
12636	// ServerResponse contains the HTTP response code and headers from the
12637	// server.
12638	googleapi.ServerResponse `json:"-"`
12639
12640	// ForceSendFields is a list of field names (e.g. "Entities") to
12641	// unconditionally include in API requests. By default, fields with
12642	// empty values are omitted from API requests. However, any non-pointer,
12643	// non-interface field appearing in ForceSendFields will be sent to the
12644	// server regardless of whether the field is empty or not. This may be
12645	// used to include empty fields in Patch requests.
12646	ForceSendFields []string `json:"-"`
12647
12648	// NullFields is a list of field names (e.g. "Entities") to include in
12649	// API requests with the JSON null value. By default, fields with empty
12650	// values are omitted from API requests. However, any field with an
12651	// empty value appearing in NullFields will be sent to the server as
12652	// null. It is an error if a field in this list has a non-empty value.
12653	// This may be used to include null fields in Patch requests.
12654	NullFields []string `json:"-"`
12655}
12656
12657func (s *GoogleCloudDialogflowV2SessionEntityType) MarshalJSON() ([]byte, error) {
12658	type NoMethod GoogleCloudDialogflowV2SessionEntityType
12659	raw := NoMethod(*s)
12660	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12661}
12662
12663// GoogleCloudDialogflowV2SpeechContext: Hints for the speech recognizer
12664// to help with recognition in a specific conversation state.
12665type GoogleCloudDialogflowV2SpeechContext struct {
12666	// Boost: Optional. Boost for this context compared to other contexts: *
12667	// If the boost is positive, Dialogflow will increase the probability
12668	// that the phrases in this context are recognized over similar sounding
12669	// phrases. * If the boost is unspecified or non-positive, Dialogflow
12670	// will not apply any boost. Dialogflow recommends that you use boosts
12671	// in the range (0, 20] and that you find a value that fits your use
12672	// case with binary search.
12673	Boost float64 `json:"boost,omitempty"`
12674
12675	// Phrases: Optional. A list of strings containing words and phrases
12676	// that the speech recognizer should recognize with higher likelihood.
12677	// This list can be used to: * improve accuracy for words and phrases
12678	// you expect the user to say, e.g. typical commands for your Dialogflow
12679	// agent * add additional words to the speech recognizer vocabulary *
12680	// ... See the Cloud Speech documentation
12681	// (https://cloud.google.com/speech-to-text/quotas) for usage limits.
12682	Phrases []string `json:"phrases,omitempty"`
12683
12684	// ForceSendFields is a list of field names (e.g. "Boost") to
12685	// unconditionally include in API requests. By default, fields with
12686	// empty values are omitted from API requests. However, any non-pointer,
12687	// non-interface field appearing in ForceSendFields will be sent to the
12688	// server regardless of whether the field is empty or not. This may be
12689	// used to include empty fields in Patch requests.
12690	ForceSendFields []string `json:"-"`
12691
12692	// NullFields is a list of field names (e.g. "Boost") to include in API
12693	// requests with the JSON null value. By default, fields with empty
12694	// values are omitted from API requests. However, any field with an
12695	// empty value appearing in NullFields will be sent to the server as
12696	// null. It is an error if a field in this list has a non-empty value.
12697	// This may be used to include null fields in Patch requests.
12698	NullFields []string `json:"-"`
12699}
12700
12701func (s *GoogleCloudDialogflowV2SpeechContext) MarshalJSON() ([]byte, error) {
12702	type NoMethod GoogleCloudDialogflowV2SpeechContext
12703	raw := NoMethod(*s)
12704	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12705}
12706
12707func (s *GoogleCloudDialogflowV2SpeechContext) UnmarshalJSON(data []byte) error {
12708	type NoMethod GoogleCloudDialogflowV2SpeechContext
12709	var s1 struct {
12710		Boost gensupport.JSONFloat64 `json:"boost"`
12711		*NoMethod
12712	}
12713	s1.NoMethod = (*NoMethod)(s)
12714	if err := json.Unmarshal(data, &s1); err != nil {
12715		return err
12716	}
12717	s.Boost = float64(s1.Boost)
12718	return nil
12719}
12720
12721// GoogleCloudDialogflowV2SpeechToTextConfig: Configures speech
12722// transcription for ConversationProfile.
12723type GoogleCloudDialogflowV2SpeechToTextConfig struct {
12724	// SpeechModelVariant: Optional. The speech model used in speech to
12725	// text. `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will
12726	// be treated as `USE_ENHANCED`. It can be overridden in
12727	// AnalyzeContentRequest and StreamingAnalyzeContentRequest request.
12728	//
12729	// Possible values:
12730	//   "SPEECH_MODEL_VARIANT_UNSPECIFIED" - No model variant specified. In
12731	// this case Dialogflow defaults to USE_BEST_AVAILABLE.
12732	//   "USE_BEST_AVAILABLE" - Use the best available variant of the Speech
12733	// model that the caller is eligible for. Please see the [Dialogflow
12734	// docs](https://cloud.google.com/dialogflow/docs/data-logging) for how
12735	// to make your project eligible for enhanced models.
12736	//   "USE_STANDARD" - Use standard model variant even if an enhanced
12737	// model is available. See the [Cloud Speech
12738	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
12739	// odels) for details about enhanced models.
12740	//   "USE_ENHANCED" - Use an enhanced model variant: * If an enhanced
12741	// variant does not exist for the given model and request language,
12742	// Dialogflow falls back to the standard variant. The [Cloud Speech
12743	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
12744	// odels) describes which models have enhanced variants. * If the API
12745	// caller isn't eligible for enhanced models, Dialogflow returns an
12746	// error. Please see the [Dialogflow
12747	// docs](https://cloud.google.com/dialogflow/docs/data-logging) for how
12748	// to make your project eligible.
12749	SpeechModelVariant string `json:"speechModelVariant,omitempty"`
12750
12751	// ForceSendFields is a list of field names (e.g. "SpeechModelVariant")
12752	// to unconditionally include in API requests. By default, fields with
12753	// empty values are omitted from API requests. However, any non-pointer,
12754	// non-interface field appearing in ForceSendFields will be sent to the
12755	// server regardless of whether the field is empty or not. This may be
12756	// used to include empty fields in Patch requests.
12757	ForceSendFields []string `json:"-"`
12758
12759	// NullFields is a list of field names (e.g. "SpeechModelVariant") to
12760	// include in API requests with the JSON null value. By default, fields
12761	// with empty values are omitted from API requests. However, any field
12762	// with an empty value appearing in NullFields will be sent to the
12763	// server as null. It is an error if a field in this list has a
12764	// non-empty value. This may be used to include null fields in Patch
12765	// requests.
12766	NullFields []string `json:"-"`
12767}
12768
12769func (s *GoogleCloudDialogflowV2SpeechToTextConfig) MarshalJSON() ([]byte, error) {
12770	type NoMethod GoogleCloudDialogflowV2SpeechToTextConfig
12771	raw := NoMethod(*s)
12772	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12773}
12774
12775// GoogleCloudDialogflowV2SuggestArticlesRequest: The request message
12776// for Participants.SuggestArticles.
12777type GoogleCloudDialogflowV2SuggestArticlesRequest struct {
12778	// ContextSize: Max number of messages prior to and including
12779	// latest_message to use as context when compiling the suggestion. By
12780	// default 20 and at most 50.
12781	ContextSize int64 `json:"contextSize,omitempty"`
12782
12783	// LatestMessage: The name of the latest conversation message to compile
12784	// suggestion for. If empty, it will be the latest message of the
12785	// conversation. Format:
12786	// `projects//locations//conversations//messages/`.
12787	LatestMessage string `json:"latestMessage,omitempty"`
12788
12789	// ForceSendFields is a list of field names (e.g. "ContextSize") to
12790	// unconditionally include in API requests. By default, fields with
12791	// empty values are omitted from API requests. However, any non-pointer,
12792	// non-interface field appearing in ForceSendFields will be sent to the
12793	// server regardless of whether the field is empty or not. This may be
12794	// used to include empty fields in Patch requests.
12795	ForceSendFields []string `json:"-"`
12796
12797	// NullFields is a list of field names (e.g. "ContextSize") to include
12798	// in API requests with the JSON null value. By default, fields with
12799	// empty values are omitted from API requests. However, any field with
12800	// an empty value appearing in NullFields will be sent to the server as
12801	// null. It is an error if a field in this list has a non-empty value.
12802	// This may be used to include null fields in Patch requests.
12803	NullFields []string `json:"-"`
12804}
12805
12806func (s *GoogleCloudDialogflowV2SuggestArticlesRequest) MarshalJSON() ([]byte, error) {
12807	type NoMethod GoogleCloudDialogflowV2SuggestArticlesRequest
12808	raw := NoMethod(*s)
12809	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12810}
12811
12812// GoogleCloudDialogflowV2SuggestArticlesResponse: The response message
12813// for Participants.SuggestArticles.
12814type GoogleCloudDialogflowV2SuggestArticlesResponse struct {
12815	// ArticleAnswers: Articles ordered by score in descending order.
12816	ArticleAnswers []*GoogleCloudDialogflowV2ArticleAnswer `json:"articleAnswers,omitempty"`
12817
12818	// ContextSize: Number of messages prior to and including latest_message
12819	// to compile the suggestion. It may be smaller than the
12820	// SuggestArticlesRequest.context_size field in the request if there
12821	// aren't that many messages in the conversation.
12822	ContextSize int64 `json:"contextSize,omitempty"`
12823
12824	// LatestMessage: The name of the latest conversation message used to
12825	// compile suggestion for. Format:
12826	// `projects//locations//conversations//messages/`.
12827	LatestMessage string `json:"latestMessage,omitempty"`
12828
12829	// ServerResponse contains the HTTP response code and headers from the
12830	// server.
12831	googleapi.ServerResponse `json:"-"`
12832
12833	// ForceSendFields is a list of field names (e.g. "ArticleAnswers") to
12834	// unconditionally include in API requests. By default, fields with
12835	// empty values are omitted from API requests. However, any non-pointer,
12836	// non-interface field appearing in ForceSendFields will be sent to the
12837	// server regardless of whether the field is empty or not. This may be
12838	// used to include empty fields in Patch requests.
12839	ForceSendFields []string `json:"-"`
12840
12841	// NullFields is a list of field names (e.g. "ArticleAnswers") to
12842	// include in API requests with the JSON null value. By default, fields
12843	// with empty values are omitted from API requests. However, any field
12844	// with an empty value appearing in NullFields will be sent to the
12845	// server as null. It is an error if a field in this list has a
12846	// non-empty value. This may be used to include null fields in Patch
12847	// requests.
12848	NullFields []string `json:"-"`
12849}
12850
12851func (s *GoogleCloudDialogflowV2SuggestArticlesResponse) MarshalJSON() ([]byte, error) {
12852	type NoMethod GoogleCloudDialogflowV2SuggestArticlesResponse
12853	raw := NoMethod(*s)
12854	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12855}
12856
12857// GoogleCloudDialogflowV2SuggestFaqAnswersRequest: The request message
12858// for Participants.SuggestFaqAnswers.
12859type GoogleCloudDialogflowV2SuggestFaqAnswersRequest struct {
12860	// ContextSize: Max number of messages prior to and including
12861	// [latest_message] to use as context when compiling the suggestion. By
12862	// default 20 and at most 50.
12863	ContextSize int64 `json:"contextSize,omitempty"`
12864
12865	// LatestMessage: The name of the latest conversation message to compile
12866	// suggestion for. If empty, it will be the latest message of the
12867	// conversation. Format:
12868	// `projects//locations//conversations//messages/`.
12869	LatestMessage string `json:"latestMessage,omitempty"`
12870
12871	// ForceSendFields is a list of field names (e.g. "ContextSize") to
12872	// unconditionally include in API requests. By default, fields with
12873	// empty values are omitted from API requests. However, any non-pointer,
12874	// non-interface field appearing in ForceSendFields will be sent to the
12875	// server regardless of whether the field is empty or not. This may be
12876	// used to include empty fields in Patch requests.
12877	ForceSendFields []string `json:"-"`
12878
12879	// NullFields is a list of field names (e.g. "ContextSize") to include
12880	// in API requests with the JSON null value. By default, fields with
12881	// empty values are omitted from API requests. However, any field with
12882	// an empty value appearing in NullFields will be sent to the server as
12883	// null. It is an error if a field in this list has a non-empty value.
12884	// This may be used to include null fields in Patch requests.
12885	NullFields []string `json:"-"`
12886}
12887
12888func (s *GoogleCloudDialogflowV2SuggestFaqAnswersRequest) MarshalJSON() ([]byte, error) {
12889	type NoMethod GoogleCloudDialogflowV2SuggestFaqAnswersRequest
12890	raw := NoMethod(*s)
12891	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12892}
12893
12894// GoogleCloudDialogflowV2SuggestFaqAnswersResponse: The request message
12895// for Participants.SuggestFaqAnswers.
12896type GoogleCloudDialogflowV2SuggestFaqAnswersResponse struct {
12897	// ContextSize: Number of messages prior to and including latest_message
12898	// to compile the suggestion. It may be smaller than the
12899	// SuggestFaqAnswersRequest.context_size field in the request if there
12900	// aren't that many messages in the conversation.
12901	ContextSize int64 `json:"contextSize,omitempty"`
12902
12903	// FaqAnswers: Answers extracted from FAQ documents.
12904	FaqAnswers []*GoogleCloudDialogflowV2FaqAnswer `json:"faqAnswers,omitempty"`
12905
12906	// LatestMessage: The name of the latest conversation message used to
12907	// compile suggestion for. Format:
12908	// `projects//locations//conversations//messages/`.
12909	LatestMessage string `json:"latestMessage,omitempty"`
12910
12911	// ServerResponse contains the HTTP response code and headers from the
12912	// server.
12913	googleapi.ServerResponse `json:"-"`
12914
12915	// ForceSendFields is a list of field names (e.g. "ContextSize") to
12916	// unconditionally include in API requests. By default, fields with
12917	// empty values are omitted from API requests. However, any non-pointer,
12918	// non-interface field appearing in ForceSendFields will be sent to the
12919	// server regardless of whether the field is empty or not. This may be
12920	// used to include empty fields in Patch requests.
12921	ForceSendFields []string `json:"-"`
12922
12923	// NullFields is a list of field names (e.g. "ContextSize") to include
12924	// in API requests with the JSON null value. By default, fields with
12925	// empty values are omitted from API requests. However, any field with
12926	// an empty value appearing in NullFields will be sent to the server as
12927	// null. It is an error if a field in this list has a non-empty value.
12928	// This may be used to include null fields in Patch requests.
12929	NullFields []string `json:"-"`
12930}
12931
12932func (s *GoogleCloudDialogflowV2SuggestFaqAnswersResponse) MarshalJSON() ([]byte, error) {
12933	type NoMethod GoogleCloudDialogflowV2SuggestFaqAnswersResponse
12934	raw := NoMethod(*s)
12935	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12936}
12937
12938// GoogleCloudDialogflowV2SuggestionFeature: The type of Human Agent
12939// Assistant API suggestion to perform, and the maximum number of
12940// results to return for that type. Multiple `Feature` objects can be
12941// specified in the `features` list.
12942type GoogleCloudDialogflowV2SuggestionFeature struct {
12943	// Type: Type of Human Agent Assistant API feature to request.
12944	//
12945	// Possible values:
12946	//   "TYPE_UNSPECIFIED" - Unspecified feature type.
12947	//   "ARTICLE_SUGGESTION" - Run article suggestion model.
12948	//   "FAQ" - Run FAQ model.
12949	Type string `json:"type,omitempty"`
12950
12951	// ForceSendFields is a list of field names (e.g. "Type") to
12952	// unconditionally include in API requests. By default, fields with
12953	// empty values are omitted from API requests. However, any non-pointer,
12954	// non-interface field appearing in ForceSendFields will be sent to the
12955	// server regardless of whether the field is empty or not. This may be
12956	// used to include empty fields in Patch requests.
12957	ForceSendFields []string `json:"-"`
12958
12959	// NullFields is a list of field names (e.g. "Type") to include in API
12960	// requests with the JSON null value. By default, fields with empty
12961	// values are omitted from API requests. However, any field with an
12962	// empty value appearing in NullFields will be sent to the server as
12963	// null. It is an error if a field in this list has a non-empty value.
12964	// This may be used to include null fields in Patch requests.
12965	NullFields []string `json:"-"`
12966}
12967
12968func (s *GoogleCloudDialogflowV2SuggestionFeature) MarshalJSON() ([]byte, error) {
12969	type NoMethod GoogleCloudDialogflowV2SuggestionFeature
12970	raw := NoMethod(*s)
12971	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12972}
12973
12974// GoogleCloudDialogflowV2SuggestionResult: One response of different
12975// type of suggestion response which is used in the response of
12976// Participants.AnalyzeContent and Participants.AnalyzeContent, as well
12977// as HumanAgentAssistantEvent.
12978type GoogleCloudDialogflowV2SuggestionResult struct {
12979	// Error: Error status if the request failed.
12980	Error *GoogleRpcStatus `json:"error,omitempty"`
12981
12982	// SuggestArticlesResponse: SuggestArticlesResponse if request is for
12983	// ARTICLE_SUGGESTION.
12984	SuggestArticlesResponse *GoogleCloudDialogflowV2SuggestArticlesResponse `json:"suggestArticlesResponse,omitempty"`
12985
12986	// SuggestFaqAnswersResponse: SuggestFaqAnswersResponse if request is
12987	// for FAQ_ANSWER.
12988	SuggestFaqAnswersResponse *GoogleCloudDialogflowV2SuggestFaqAnswersResponse `json:"suggestFaqAnswersResponse,omitempty"`
12989
12990	// ForceSendFields is a list of field names (e.g. "Error") to
12991	// unconditionally include in API requests. By default, fields with
12992	// empty values are omitted from API requests. However, any non-pointer,
12993	// non-interface field appearing in ForceSendFields will be sent to the
12994	// server regardless of whether the field is empty or not. This may be
12995	// used to include empty fields in Patch requests.
12996	ForceSendFields []string `json:"-"`
12997
12998	// NullFields is a list of field names (e.g. "Error") to include in API
12999	// requests with the JSON null value. By default, fields with empty
13000	// values are omitted from API requests. However, any field with an
13001	// empty value appearing in NullFields will be sent to the server as
13002	// null. It is an error if a field in this list has a non-empty value.
13003	// This may be used to include null fields in Patch requests.
13004	NullFields []string `json:"-"`
13005}
13006
13007func (s *GoogleCloudDialogflowV2SuggestionResult) MarshalJSON() ([]byte, error) {
13008	type NoMethod GoogleCloudDialogflowV2SuggestionResult
13009	raw := NoMethod(*s)
13010	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13011}
13012
13013// GoogleCloudDialogflowV2SynthesizeSpeechConfig: Configuration of how
13014// speech should be synthesized.
13015type GoogleCloudDialogflowV2SynthesizeSpeechConfig struct {
13016	// EffectsProfileId: Optional. An identifier which selects 'audio
13017	// effects' profiles that are applied on (post synthesized) text to
13018	// speech. Effects are applied on top of each other in the order they
13019	// are given.
13020	EffectsProfileId []string `json:"effectsProfileId,omitempty"`
13021
13022	// Pitch: Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means
13023	// increase 20 semitones from the original pitch. -20 means decrease 20
13024	// semitones from the original pitch.
13025	Pitch float64 `json:"pitch,omitempty"`
13026
13027	// SpeakingRate: Optional. Speaking rate/speed, in the range [0.25,
13028	// 4.0]. 1.0 is the normal native speed supported by the specific voice.
13029	// 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0),
13030	// defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0
13031	// will return an error.
13032	SpeakingRate float64 `json:"speakingRate,omitempty"`
13033
13034	// Voice: Optional. The desired voice of the synthesized audio.
13035	Voice *GoogleCloudDialogflowV2VoiceSelectionParams `json:"voice,omitempty"`
13036
13037	// VolumeGainDb: Optional. Volume gain (in dB) of the normal native
13038	// volume supported by the specific voice, in the range [-96.0, 16.0].
13039	// If unset, or set to a value of 0.0 (dB), will play at normal native
13040	// signal amplitude. A value of -6.0 (dB) will play at approximately
13041	// half the amplitude of the normal native signal amplitude. A value of
13042	// +6.0 (dB) will play at approximately twice the amplitude of the
13043	// normal native signal amplitude. We strongly recommend not to exceed
13044	// +10 (dB) as there's usually no effective increase in loudness for any
13045	// value greater than that.
13046	VolumeGainDb float64 `json:"volumeGainDb,omitempty"`
13047
13048	// ForceSendFields is a list of field names (e.g. "EffectsProfileId") to
13049	// unconditionally include in API requests. By default, fields with
13050	// empty values are omitted from API requests. However, any non-pointer,
13051	// non-interface field appearing in ForceSendFields will be sent to the
13052	// server regardless of whether the field is empty or not. This may be
13053	// used to include empty fields in Patch requests.
13054	ForceSendFields []string `json:"-"`
13055
13056	// NullFields is a list of field names (e.g. "EffectsProfileId") to
13057	// include in API requests with the JSON null value. By default, fields
13058	// with empty values are omitted from API requests. However, any field
13059	// with an empty value appearing in NullFields will be sent to the
13060	// server as null. It is an error if a field in this list has a
13061	// non-empty value. This may be used to include null fields in Patch
13062	// requests.
13063	NullFields []string `json:"-"`
13064}
13065
13066func (s *GoogleCloudDialogflowV2SynthesizeSpeechConfig) MarshalJSON() ([]byte, error) {
13067	type NoMethod GoogleCloudDialogflowV2SynthesizeSpeechConfig
13068	raw := NoMethod(*s)
13069	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13070}
13071
13072func (s *GoogleCloudDialogflowV2SynthesizeSpeechConfig) UnmarshalJSON(data []byte) error {
13073	type NoMethod GoogleCloudDialogflowV2SynthesizeSpeechConfig
13074	var s1 struct {
13075		Pitch        gensupport.JSONFloat64 `json:"pitch"`
13076		SpeakingRate gensupport.JSONFloat64 `json:"speakingRate"`
13077		VolumeGainDb gensupport.JSONFloat64 `json:"volumeGainDb"`
13078		*NoMethod
13079	}
13080	s1.NoMethod = (*NoMethod)(s)
13081	if err := json.Unmarshal(data, &s1); err != nil {
13082		return err
13083	}
13084	s.Pitch = float64(s1.Pitch)
13085	s.SpeakingRate = float64(s1.SpeakingRate)
13086	s.VolumeGainDb = float64(s1.VolumeGainDb)
13087	return nil
13088}
13089
13090// GoogleCloudDialogflowV2TextInput: Represents the natural language
13091// text to be processed.
13092type GoogleCloudDialogflowV2TextInput struct {
13093	// LanguageCode: Required. The language of this conversational query.
13094	// See Language Support
13095	// (https://cloud.google.com/dialogflow/docs/reference/language) for a
13096	// list of the currently supported language codes. Note that queries in
13097	// the same session do not necessarily need to specify the same
13098	// language.
13099	LanguageCode string `json:"languageCode,omitempty"`
13100
13101	// Text: Required. The UTF-8 encoded natural language text to be
13102	// processed. Text length must not exceed 256 characters.
13103	Text string `json:"text,omitempty"`
13104
13105	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
13106	// unconditionally include in API requests. By default, fields with
13107	// empty values are omitted from API requests. However, any non-pointer,
13108	// non-interface field appearing in ForceSendFields will be sent to the
13109	// server regardless of whether the field is empty or not. This may be
13110	// used to include empty fields in Patch requests.
13111	ForceSendFields []string `json:"-"`
13112
13113	// NullFields is a list of field names (e.g. "LanguageCode") to include
13114	// in API requests with the JSON null value. By default, fields with
13115	// empty values are omitted from API requests. However, any field with
13116	// an empty value appearing in NullFields will be sent to the server as
13117	// null. It is an error if a field in this list has a non-empty value.
13118	// This may be used to include null fields in Patch requests.
13119	NullFields []string `json:"-"`
13120}
13121
13122func (s *GoogleCloudDialogflowV2TextInput) MarshalJSON() ([]byte, error) {
13123	type NoMethod GoogleCloudDialogflowV2TextInput
13124	raw := NoMethod(*s)
13125	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13126}
13127
13128// GoogleCloudDialogflowV2TextToSpeechSettings: Instructs the speech
13129// synthesizer on how to generate the output audio content.
13130type GoogleCloudDialogflowV2TextToSpeechSettings struct {
13131	// EnableTextToSpeech: Optional. Indicates whether text to speech is
13132	// enabled. Even when this field is false, other settings in this proto
13133	// are still retained.
13134	EnableTextToSpeech bool `json:"enableTextToSpeech,omitempty"`
13135
13136	// OutputAudioEncoding: Required. Audio encoding of the synthesized
13137	// audio content.
13138	//
13139	// Possible values:
13140	//   "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" - Not specified.
13141	//   "OUTPUT_AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
13142	// little-endian samples (Linear PCM). Audio content returned as
13143	// LINEAR16 also contains a WAV header.
13144	//   "OUTPUT_AUDIO_ENCODING_MP3" - MP3 audio at 32kbps.
13145	//   "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS" - MP3 audio at 64kbps.
13146	//   "OUTPUT_AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio wrapped in an
13147	// ogg container. The result will be a file which can be played natively
13148	// on Android, and in browsers (at least Chrome and Firefox). The
13149	// quality of the encoding is considerably higher than MP3 while using
13150	// approximately the same bitrate.
13151	//   "OUTPUT_AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit
13152	// audio samples using G.711 PCMU/mu-law.
13153	OutputAudioEncoding string `json:"outputAudioEncoding,omitempty"`
13154
13155	// SampleRateHertz: Optional. The synthesis sample rate (in hertz) for
13156	// this audio. If not provided, then the synthesizer will use the
13157	// default sample rate based on the audio encoding. If this is different
13158	// from the voice's natural sample rate, then the synthesizer will honor
13159	// this request by converting to the desired sample rate (which might
13160	// result in worse audio quality).
13161	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
13162
13163	// SynthesizeSpeechConfigs: Optional. Configuration of how speech should
13164	// be synthesized, mapping from language
13165	// (https://cloud.google.com/dialogflow/docs/reference/language) to
13166	// SynthesizeSpeechConfig.
13167	SynthesizeSpeechConfigs map[string]GoogleCloudDialogflowV2SynthesizeSpeechConfig `json:"synthesizeSpeechConfigs,omitempty"`
13168
13169	// ForceSendFields is a list of field names (e.g. "EnableTextToSpeech")
13170	// to unconditionally include in API requests. By default, fields with
13171	// empty values are omitted from API requests. However, any non-pointer,
13172	// non-interface field appearing in ForceSendFields will be sent to the
13173	// server regardless of whether the field is empty or not. This may be
13174	// used to include empty fields in Patch requests.
13175	ForceSendFields []string `json:"-"`
13176
13177	// NullFields is a list of field names (e.g. "EnableTextToSpeech") to
13178	// include in API requests with the JSON null value. By default, fields
13179	// with empty values are omitted from API requests. However, any field
13180	// with an empty value appearing in NullFields will be sent to the
13181	// server as null. It is an error if a field in this list has a
13182	// non-empty value. This may be used to include null fields in Patch
13183	// requests.
13184	NullFields []string `json:"-"`
13185}
13186
13187func (s *GoogleCloudDialogflowV2TextToSpeechSettings) MarshalJSON() ([]byte, error) {
13188	type NoMethod GoogleCloudDialogflowV2TextToSpeechSettings
13189	raw := NoMethod(*s)
13190	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13191}
13192
13193// GoogleCloudDialogflowV2TrainAgentRequest: The request message for
13194// Agents.TrainAgent.
13195type GoogleCloudDialogflowV2TrainAgentRequest struct {
13196}
13197
13198// GoogleCloudDialogflowV2ValidationError: Represents a single
13199// validation error.
13200type GoogleCloudDialogflowV2ValidationError struct {
13201	// Entries: The names of the entries that the error is associated with.
13202	// Format: - "projects//agent", if the error is associated with the
13203	// entire agent. - "projects//agent/intents/", if the error is
13204	// associated with certain intents. -
13205	// "projects//agent/intents//trainingPhrases/", if the error is
13206	// associated with certain intent training phrases. -
13207	// "projects//agent/intents//parameters/", if the error is associated
13208	// with certain intent parameters. - "projects//agent/entities/", if the
13209	// error is associated with certain entities.
13210	Entries []string `json:"entries,omitempty"`
13211
13212	// ErrorMessage: The detailed error messsage.
13213	ErrorMessage string `json:"errorMessage,omitempty"`
13214
13215	// Severity: The severity of the error.
13216	//
13217	// Possible values:
13218	//   "SEVERITY_UNSPECIFIED" - Not specified. This value should never be
13219	// used.
13220	//   "INFO" - The agent doesn't follow Dialogflow best practices.
13221	//   "WARNING" - The agent may not behave as expected.
13222	//   "ERROR" - The agent may experience partial failures.
13223	//   "CRITICAL" - The agent may completely fail.
13224	Severity string `json:"severity,omitempty"`
13225
13226	// ForceSendFields is a list of field names (e.g. "Entries") to
13227	// unconditionally include in API requests. By default, fields with
13228	// empty values are omitted from API requests. However, any non-pointer,
13229	// non-interface field appearing in ForceSendFields will be sent to the
13230	// server regardless of whether the field is empty or not. This may be
13231	// used to include empty fields in Patch requests.
13232	ForceSendFields []string `json:"-"`
13233
13234	// NullFields is a list of field names (e.g. "Entries") to include in
13235	// API requests with the JSON null value. By default, fields with empty
13236	// values are omitted from API requests. However, any field with an
13237	// empty value appearing in NullFields will be sent to the server as
13238	// null. It is an error if a field in this list has a non-empty value.
13239	// This may be used to include null fields in Patch requests.
13240	NullFields []string `json:"-"`
13241}
13242
13243func (s *GoogleCloudDialogflowV2ValidationError) MarshalJSON() ([]byte, error) {
13244	type NoMethod GoogleCloudDialogflowV2ValidationError
13245	raw := NoMethod(*s)
13246	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13247}
13248
13249// GoogleCloudDialogflowV2ValidationResult: Represents the output of
13250// agent validation.
13251type GoogleCloudDialogflowV2ValidationResult struct {
13252	// ValidationErrors: Contains all validation errors.
13253	ValidationErrors []*GoogleCloudDialogflowV2ValidationError `json:"validationErrors,omitempty"`
13254
13255	// ServerResponse contains the HTTP response code and headers from the
13256	// server.
13257	googleapi.ServerResponse `json:"-"`
13258
13259	// ForceSendFields is a list of field names (e.g. "ValidationErrors") to
13260	// unconditionally include in API requests. By default, fields with
13261	// empty values are omitted from API requests. However, any non-pointer,
13262	// non-interface field appearing in ForceSendFields will be sent to the
13263	// server regardless of whether the field is empty or not. This may be
13264	// used to include empty fields in Patch requests.
13265	ForceSendFields []string `json:"-"`
13266
13267	// NullFields is a list of field names (e.g. "ValidationErrors") to
13268	// include in API requests with the JSON null value. By default, fields
13269	// with empty values are omitted from API requests. However, any field
13270	// with an empty value appearing in NullFields will be sent to the
13271	// server as null. It is an error if a field in this list has a
13272	// non-empty value. This may be used to include null fields in Patch
13273	// requests.
13274	NullFields []string `json:"-"`
13275}
13276
13277func (s *GoogleCloudDialogflowV2ValidationResult) MarshalJSON() ([]byte, error) {
13278	type NoMethod GoogleCloudDialogflowV2ValidationResult
13279	raw := NoMethod(*s)
13280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13281}
13282
13283// GoogleCloudDialogflowV2Version: You can create multiple versions of
13284// your agent and publish them to separate environments. When you edit
13285// an agent, you are editing the draft agent. At any point, you can save
13286// the draft agent as an agent version, which is an immutable snapshot
13287// of your agent. When you save the draft agent, it is published to the
13288// default environment. When you create agent versions, you can publish
13289// them to custom environments. You can create a variety of custom
13290// environments for: - testing - development - production - etc. For
13291// more information, see the versions and environments guide
13292// (https://cloud.google.com/dialogflow/docs/agents-versions).
13293type GoogleCloudDialogflowV2Version struct {
13294	// CreateTime: Output only. The creation time of this version. This
13295	// field is read-only, i.e., it cannot be set by create and update
13296	// methods.
13297	CreateTime string `json:"createTime,omitempty"`
13298
13299	// Description: Optional. The developer-provided description of this
13300	// version.
13301	Description string `json:"description,omitempty"`
13302
13303	// Name: Output only. The unique identifier of this agent version.
13304	// Supported formats: - `projects//agent/versions/` -
13305	// `projects//locations//agent/versions/`
13306	Name string `json:"name,omitempty"`
13307
13308	// Status: Output only. The status of this version. This field is
13309	// read-only and cannot be set by create and update methods.
13310	//
13311	// Possible values:
13312	//   "VERSION_STATUS_UNSPECIFIED" - Not specified. This value is not
13313	// used.
13314	//   "IN_PROGRESS" - Version is not ready to serve (e.g. training is in
13315	// progress).
13316	//   "READY" - Version is ready to serve.
13317	//   "FAILED" - Version training failed.
13318	Status string `json:"status,omitempty"`
13319
13320	// VersionNumber: Output only. The sequential number of this version.
13321	// This field is read-only which means it cannot be set by create and
13322	// update methods.
13323	VersionNumber int64 `json:"versionNumber,omitempty"`
13324
13325	// ServerResponse contains the HTTP response code and headers from the
13326	// server.
13327	googleapi.ServerResponse `json:"-"`
13328
13329	// ForceSendFields is a list of field names (e.g. "CreateTime") to
13330	// unconditionally include in API requests. By default, fields with
13331	// empty values are omitted from API requests. However, any non-pointer,
13332	// non-interface field appearing in ForceSendFields will be sent to the
13333	// server regardless of whether the field is empty or not. This may be
13334	// used to include empty fields in Patch requests.
13335	ForceSendFields []string `json:"-"`
13336
13337	// NullFields is a list of field names (e.g. "CreateTime") to include in
13338	// API requests with the JSON null value. By default, fields with empty
13339	// values are omitted from API requests. However, any field with an
13340	// empty value appearing in NullFields will be sent to the server as
13341	// null. It is an error if a field in this list has a non-empty value.
13342	// This may be used to include null fields in Patch requests.
13343	NullFields []string `json:"-"`
13344}
13345
13346func (s *GoogleCloudDialogflowV2Version) MarshalJSON() ([]byte, error) {
13347	type NoMethod GoogleCloudDialogflowV2Version
13348	raw := NoMethod(*s)
13349	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13350}
13351
13352// GoogleCloudDialogflowV2VoiceSelectionParams: Description of which
13353// voice to use for speech synthesis.
13354type GoogleCloudDialogflowV2VoiceSelectionParams struct {
13355	// Name: Optional. The name of the voice. If not set, the service will
13356	// choose a voice based on the other parameters such as language_code
13357	// and ssml_gender.
13358	Name string `json:"name,omitempty"`
13359
13360	// SsmlGender: Optional. The preferred gender of the voice. If not set,
13361	// the service will choose a voice based on the other parameters such as
13362	// language_code and name. Note that this is only a preference, not
13363	// requirement. If a voice of the appropriate gender is not available,
13364	// the synthesizer should substitute a voice with a different gender
13365	// rather than failing the request.
13366	//
13367	// Possible values:
13368	//   "SSML_VOICE_GENDER_UNSPECIFIED" - An unspecified gender, which
13369	// means that the client doesn't care which gender the selected voice
13370	// will have.
13371	//   "SSML_VOICE_GENDER_MALE" - A male voice.
13372	//   "SSML_VOICE_GENDER_FEMALE" - A female voice.
13373	//   "SSML_VOICE_GENDER_NEUTRAL" - A gender-neutral voice.
13374	SsmlGender string `json:"ssmlGender,omitempty"`
13375
13376	// ForceSendFields is a list of field names (e.g. "Name") to
13377	// unconditionally include in API requests. By default, fields with
13378	// empty values are omitted from API requests. However, any non-pointer,
13379	// non-interface field appearing in ForceSendFields will be sent to the
13380	// server regardless of whether the field is empty or not. This may be
13381	// used to include empty fields in Patch requests.
13382	ForceSendFields []string `json:"-"`
13383
13384	// NullFields is a list of field names (e.g. "Name") to include in API
13385	// requests with the JSON null value. By default, fields with empty
13386	// values are omitted from API requests. However, any field with an
13387	// empty value appearing in NullFields will be sent to the server as
13388	// null. It is an error if a field in this list has a non-empty value.
13389	// This may be used to include null fields in Patch requests.
13390	NullFields []string `json:"-"`
13391}
13392
13393func (s *GoogleCloudDialogflowV2VoiceSelectionParams) MarshalJSON() ([]byte, error) {
13394	type NoMethod GoogleCloudDialogflowV2VoiceSelectionParams
13395	raw := NoMethod(*s)
13396	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13397}
13398
13399// GoogleCloudDialogflowV2WebhookRequest: The request message for a
13400// webhook call.
13401type GoogleCloudDialogflowV2WebhookRequest struct {
13402	// OriginalDetectIntentRequest: Optional. The contents of the original
13403	// request that was passed to `[Streaming]DetectIntent` call.
13404	OriginalDetectIntentRequest *GoogleCloudDialogflowV2OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"`
13405
13406	// QueryResult: The result of the conversational query or event
13407	// processing. Contains the same value as
13408	// `[Streaming]DetectIntentResponse.query_result`.
13409	QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"`
13410
13411	// ResponseId: The unique identifier of the response. Contains the same
13412	// value as `[Streaming]DetectIntentResponse.response_id`.
13413	ResponseId string `json:"responseId,omitempty"`
13414
13415	// Session: The unique identifier of detectIntent request session. Can
13416	// be used to identify end-user inside webhook implementation. Format:
13417	// `projects//agent/sessions/`, or
13418	// `projects//agent/environments//users//sessions/`.
13419	Session string `json:"session,omitempty"`
13420
13421	// ForceSendFields is a list of field names (e.g.
13422	// "OriginalDetectIntentRequest") to unconditionally include in API
13423	// requests. By default, fields with empty values are omitted from API
13424	// requests. However, any non-pointer, non-interface field appearing in
13425	// ForceSendFields will be sent to the server regardless of whether the
13426	// field is empty or not. This may be used to include empty fields in
13427	// Patch requests.
13428	ForceSendFields []string `json:"-"`
13429
13430	// NullFields is a list of field names (e.g.
13431	// "OriginalDetectIntentRequest") to include in API requests with the
13432	// JSON null value. By default, fields with empty values are omitted
13433	// from API requests. However, any field with an empty value appearing
13434	// in NullFields will be sent to the server as null. It is an error if a
13435	// field in this list has a non-empty value. This may be used to include
13436	// null fields in Patch requests.
13437	NullFields []string `json:"-"`
13438}
13439
13440func (s *GoogleCloudDialogflowV2WebhookRequest) MarshalJSON() ([]byte, error) {
13441	type NoMethod GoogleCloudDialogflowV2WebhookRequest
13442	raw := NoMethod(*s)
13443	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13444}
13445
13446// GoogleCloudDialogflowV2WebhookResponse: The response message for a
13447// webhook call. This response is validated by the Dialogflow server. If
13448// validation fails, an error will be returned in the
13449// QueryResult.diagnostic_info field. Setting JSON fields to an empty
13450// value with the wrong type is a common error. To avoid this error: -
13451// Use "" for empty strings - Use `{}` or `null` for empty objects -
13452// Use `[]` or `null` for empty arrays For more information, see the
13453// Protocol Buffers Language Guide
13454// (https://developers.google.com/protocol-buffers/docs/proto3#json).
13455type GoogleCloudDialogflowV2WebhookResponse struct {
13456	// FollowupEventInput: Optional. Invokes the supplied events. When this
13457	// field is set, Dialogflow ignores the `fulfillment_text`,
13458	// `fulfillment_messages`, and `payload` fields.
13459	FollowupEventInput *GoogleCloudDialogflowV2EventInput `json:"followupEventInput,omitempty"`
13460
13461	// FulfillmentMessages: Optional. The rich response messages intended
13462	// for the end-user. When provided, Dialogflow uses this field to
13463	// populate QueryResult.fulfillment_messages sent to the integration or
13464	// API caller.
13465	FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"`
13466
13467	// FulfillmentText: Optional. The text response message intended for the
13468	// end-user. It is recommended to use
13469	// `fulfillment_messages.text.text[0]` instead. When provided,
13470	// Dialogflow uses this field to populate QueryResult.fulfillment_text
13471	// sent to the integration or API caller.
13472	FulfillmentText string `json:"fulfillmentText,omitempty"`
13473
13474	// OutputContexts: Optional. The collection of output contexts that will
13475	// overwrite currently active contexts for the session and reset their
13476	// lifespans. When provided, Dialogflow uses this field to populate
13477	// QueryResult.output_contexts sent to the integration or API caller.
13478	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
13479
13480	// Payload: Optional. This field can be used to pass custom data from
13481	// your webhook to the integration or API caller. Arbitrary JSON objects
13482	// are supported. When provided, Dialogflow uses this field to populate
13483	// QueryResult.webhook_payload sent to the integration or API caller.
13484	// This field is also used by the Google Assistant integration
13485	// (https://cloud.google.com/dialogflow/docs/integrations/aog) for rich
13486	// response messages. See the format definition at Google Assistant
13487	// Dialogflow webhook format
13488	// (https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
13489	Payload googleapi.RawMessage `json:"payload,omitempty"`
13490
13491	// SessionEntityTypes: Optional. Additional session entity types to
13492	// replace or extend developer entity types with. The entity synonyms
13493	// apply to all languages and persist for the session. Setting this data
13494	// from a webhook overwrites the session entity types that have been set
13495	// using `detectIntent`, `streamingDetectIntent` or SessionEntityType
13496	// management methods.
13497	SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"`
13498
13499	// Source: Optional. A custom field used to identify the webhook source.
13500	// Arbitrary strings are supported. When provided, Dialogflow uses this
13501	// field to populate QueryResult.webhook_source sent to the integration
13502	// or API caller.
13503	Source string `json:"source,omitempty"`
13504
13505	// ForceSendFields is a list of field names (e.g. "FollowupEventInput")
13506	// to unconditionally include in API requests. By default, fields with
13507	// empty values are omitted from API requests. However, any non-pointer,
13508	// non-interface field appearing in ForceSendFields will be sent to the
13509	// server regardless of whether the field is empty or not. This may be
13510	// used to include empty fields in Patch requests.
13511	ForceSendFields []string `json:"-"`
13512
13513	// NullFields is a list of field names (e.g. "FollowupEventInput") to
13514	// include in API requests with the JSON null value. By default, fields
13515	// with empty values are omitted from API requests. However, any field
13516	// with an empty value appearing in NullFields will be sent to the
13517	// server as null. It is an error if a field in this list has a
13518	// non-empty value. This may be used to include null fields in Patch
13519	// requests.
13520	NullFields []string `json:"-"`
13521}
13522
13523func (s *GoogleCloudDialogflowV2WebhookResponse) MarshalJSON() ([]byte, error) {
13524	type NoMethod GoogleCloudDialogflowV2WebhookResponse
13525	raw := NoMethod(*s)
13526	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13527}
13528
13529// GoogleCloudDialogflowV2beta1AnnotatedMessagePart: Represents a part
13530// of a message possibly annotated with an entity. The part can be an
13531// entity or purely a part of the message between two entities or
13532// message start/end.
13533type GoogleCloudDialogflowV2beta1AnnotatedMessagePart struct {
13534	// EntityType: Optional. The Dialogflow system entity type
13535	// (https://cloud.google.com/dialogflow/docs/reference/system-entities)
13536	// of this message part. If this is empty, Dialogflow could not annotate
13537	// the phrase part with a system entity.
13538	EntityType string `json:"entityType,omitempty"`
13539
13540	// FormattedValue: Optional. The Dialogflow system entity formatted
13541	// value
13542	// (https://cloud.google.com/dialogflow/docs/reference/system-entities)
13543	// of this message part. For example for a system entity of type
13544	// `@sys.unit-currency`, this may contain: { "amount": 5, "currency":
13545	// "USD" }
13546	FormattedValue interface{} `json:"formattedValue,omitempty"`
13547
13548	// Text: Required. A part of a message possibly annotated with an
13549	// entity.
13550	Text string `json:"text,omitempty"`
13551
13552	// ForceSendFields is a list of field names (e.g. "EntityType") to
13553	// unconditionally include in API requests. By default, fields with
13554	// empty values are omitted from API requests. However, any non-pointer,
13555	// non-interface field appearing in ForceSendFields will be sent to the
13556	// server regardless of whether the field is empty or not. This may be
13557	// used to include empty fields in Patch requests.
13558	ForceSendFields []string `json:"-"`
13559
13560	// NullFields is a list of field names (e.g. "EntityType") to include in
13561	// API requests with the JSON null value. By default, fields with empty
13562	// values are omitted from API requests. However, any field with an
13563	// empty value appearing in NullFields will be sent to the server as
13564	// null. It is an error if a field in this list has a non-empty value.
13565	// This may be used to include null fields in Patch requests.
13566	NullFields []string `json:"-"`
13567}
13568
13569func (s *GoogleCloudDialogflowV2beta1AnnotatedMessagePart) MarshalJSON() ([]byte, error) {
13570	type NoMethod GoogleCloudDialogflowV2beta1AnnotatedMessagePart
13571	raw := NoMethod(*s)
13572	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13573}
13574
13575// GoogleCloudDialogflowV2beta1ArticleAnswer: Represents article answer.
13576type GoogleCloudDialogflowV2beta1ArticleAnswer struct {
13577	// AnswerRecord: The name of answer record, in the format of
13578	// "projects//locations//answerRecords/"
13579	AnswerRecord string `json:"answerRecord,omitempty"`
13580
13581	// Metadata: A map that contains metadata about the answer and the
13582	// document from which it originates.
13583	Metadata map[string]string `json:"metadata,omitempty"`
13584
13585	// Snippets: Output only. Article snippets.
13586	Snippets []string `json:"snippets,omitempty"`
13587
13588	// Title: The article title.
13589	Title string `json:"title,omitempty"`
13590
13591	// Uri: The article URI.
13592	Uri string `json:"uri,omitempty"`
13593
13594	// ForceSendFields is a list of field names (e.g. "AnswerRecord") to
13595	// unconditionally include in API requests. By default, fields with
13596	// empty values are omitted from API requests. However, any non-pointer,
13597	// non-interface field appearing in ForceSendFields will be sent to the
13598	// server regardless of whether the field is empty or not. This may be
13599	// used to include empty fields in Patch requests.
13600	ForceSendFields []string `json:"-"`
13601
13602	// NullFields is a list of field names (e.g. "AnswerRecord") to include
13603	// in API requests with the JSON null value. By default, fields with
13604	// empty values are omitted from API requests. However, any field with
13605	// an empty value appearing in NullFields will be sent to the server as
13606	// null. It is an error if a field in this list has a non-empty value.
13607	// This may be used to include null fields in Patch requests.
13608	NullFields []string `json:"-"`
13609}
13610
13611func (s *GoogleCloudDialogflowV2beta1ArticleAnswer) MarshalJSON() ([]byte, error) {
13612	type NoMethod GoogleCloudDialogflowV2beta1ArticleAnswer
13613	raw := NoMethod(*s)
13614	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13615}
13616
13617// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse: The
13618// response message for EntityTypes.BatchUpdateEntityTypes.
13619type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse struct {
13620	// EntityTypes: The collection of updated or created entity types.
13621	EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
13622
13623	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
13624	// unconditionally include in API requests. By default, fields with
13625	// empty values are omitted from API requests. However, any non-pointer,
13626	// non-interface field appearing in ForceSendFields will be sent to the
13627	// server regardless of whether the field is empty or not. This may be
13628	// used to include empty fields in Patch requests.
13629	ForceSendFields []string `json:"-"`
13630
13631	// NullFields is a list of field names (e.g. "EntityTypes") to include
13632	// in API requests with the JSON null value. By default, fields with
13633	// empty values are omitted from API requests. However, any field with
13634	// an empty value appearing in NullFields will be sent to the server as
13635	// null. It is an error if a field in this list has a non-empty value.
13636	// This may be used to include null fields in Patch requests.
13637	NullFields []string `json:"-"`
13638}
13639
13640func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) {
13641	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
13642	raw := NoMethod(*s)
13643	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13644}
13645
13646// GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse: The response
13647// message for Intents.BatchUpdateIntents.
13648type GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse struct {
13649	// Intents: The collection of updated or created intents.
13650	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
13651
13652	// ForceSendFields is a list of field names (e.g. "Intents") to
13653	// unconditionally include in API requests. By default, fields with
13654	// empty values are omitted from API requests. However, any non-pointer,
13655	// non-interface field appearing in ForceSendFields will be sent to the
13656	// server regardless of whether the field is empty or not. This may be
13657	// used to include empty fields in Patch requests.
13658	ForceSendFields []string `json:"-"`
13659
13660	// NullFields is a list of field names (e.g. "Intents") to include in
13661	// API requests with the JSON null value. By default, fields with empty
13662	// values are omitted from API requests. However, any field with an
13663	// empty value appearing in NullFields will be sent to the server as
13664	// null. It is an error if a field in this list has a non-empty value.
13665	// This may be used to include null fields in Patch requests.
13666	NullFields []string `json:"-"`
13667}
13668
13669func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) {
13670	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
13671	raw := NoMethod(*s)
13672	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13673}
13674
13675// GoogleCloudDialogflowV2beta1Context: Dialogflow contexts are similar
13676// to natural language context. If a person says to you "they are
13677// orange", you need context in order to understand what "they" is
13678// referring to. Similarly, for Dialogflow to handle an end-user
13679// expression like that, it needs to be provided with context in order
13680// to correctly match an intent. Using contexts, you can control the
13681// flow of a conversation. You can configure contexts for an intent by
13682// setting input and output contexts, which are identified by string
13683// names. When an intent is matched, any configured output contexts for
13684// that intent become active. While any contexts are active, Dialogflow
13685// is more likely to match intents that are configured with input
13686// contexts that correspond to the currently active contexts. For more
13687// information about context, see the Contexts guide
13688// (https://cloud.google.com/dialogflow/docs/contexts-overview).
13689type GoogleCloudDialogflowV2beta1Context struct {
13690	// LifespanCount: Optional. The number of conversational query requests
13691	// after which the context expires. The default is `0`. If set to `0`,
13692	// the context expires immediately. Contexts expire automatically after
13693	// 20 minutes if there are no matching queries.
13694	LifespanCount int64 `json:"lifespanCount,omitempty"`
13695
13696	// Name: Required. The unique identifier of the context. Supported
13697	// formats: - `projects//agent/sessions//contexts/`, -
13698	// `projects//locations//agent/sessions//contexts/`, -
13699	// `projects//agent/environments//users//sessions//contexts/`, -
13700	// `projects//locations//agent/environments//users//sessions//contexts/`,
13701	//  The `Context ID` is always converted to lowercase, may only contain
13702	// characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If
13703	// `Environment ID` is not specified, we assume default 'draft'
13704	// environment. If `User ID` is not specified, we assume default '-'
13705	// user. The following context names are reserved for internal use by
13706	// Dialogflow. You should not use these contexts or create contexts with
13707	// these names: * `__system_counters__` * `*_id_dialog_context` *
13708	// `*_dialog_params_size`
13709	Name string `json:"name,omitempty"`
13710
13711	// Parameters: Optional. The collection of parameters associated with
13712	// this context. Depending on your protocol or client library language,
13713	// this is a map, associative array, symbol table, dictionary, or JSON
13714	// object composed of a collection of (MapKey, MapValue) pairs: - MapKey
13715	// type: string - MapKey value: parameter name - MapValue type: - If
13716	// parameter's entity type is a composite entity: map - Else: depending
13717	// on parameter value type, could be one of string, number, boolean,
13718	// null, list or map - MapValue value: - If parameter's entity type is a
13719	// composite entity: map from composite entity property names to
13720	// property values - Else: parameter value
13721	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
13722
13723	// ForceSendFields is a list of field names (e.g. "LifespanCount") to
13724	// unconditionally include in API requests. By default, fields with
13725	// empty values are omitted from API requests. However, any non-pointer,
13726	// non-interface field appearing in ForceSendFields will be sent to the
13727	// server regardless of whether the field is empty or not. This may be
13728	// used to include empty fields in Patch requests.
13729	ForceSendFields []string `json:"-"`
13730
13731	// NullFields is a list of field names (e.g. "LifespanCount") to include
13732	// in API requests with the JSON null value. By default, fields with
13733	// empty values are omitted from API requests. However, any field with
13734	// an empty value appearing in NullFields will be sent to the server as
13735	// null. It is an error if a field in this list has a non-empty value.
13736	// This may be used to include null fields in Patch requests.
13737	NullFields []string `json:"-"`
13738}
13739
13740func (s *GoogleCloudDialogflowV2beta1Context) MarshalJSON() ([]byte, error) {
13741	type NoMethod GoogleCloudDialogflowV2beta1Context
13742	raw := NoMethod(*s)
13743	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13744}
13745
13746// GoogleCloudDialogflowV2beta1ConversationEvent: Represents a
13747// notification sent to Pub/Sub subscribers for conversation lifecycle
13748// events.
13749type GoogleCloudDialogflowV2beta1ConversationEvent struct {
13750	// Conversation: Required. The unique identifier of the conversation
13751	// this notification refers to. Format: `projects//conversations/`.
13752	Conversation string `json:"conversation,omitempty"`
13753
13754	// ErrorStatus: Optional. More detailed information about an error. Only
13755	// set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL.
13756	ErrorStatus *GoogleRpcStatus `json:"errorStatus,omitempty"`
13757
13758	// NewMessagePayload: Payload of NEW_MESSAGE event.
13759	NewMessagePayload *GoogleCloudDialogflowV2beta1Message `json:"newMessagePayload,omitempty"`
13760
13761	// Type: Required. The type of the event that this notification refers
13762	// to.
13763	//
13764	// Possible values:
13765	//   "TYPE_UNSPECIFIED" - Type not set.
13766	//   "CONVERSATION_STARTED" - A new conversation has been opened. This
13767	// is fired when a telephone call is answered, or a conversation is
13768	// created via the API.
13769	//   "CONVERSATION_FINISHED" - An existing conversation has closed. This
13770	// is fired when a telephone call is terminated, or a conversation is
13771	// closed via the API.
13772	//   "NEW_MESSAGE" - An existing conversation has received a new
13773	// message, either from API or telephony. It is configured in
13774	// ConversationProfile.new_message_event_notification_config
13775	//   "UNRECOVERABLE_ERROR" - Unrecoverable error during a telephone
13776	// call. In general non-recoverable errors only occur if something was
13777	// misconfigured in the ConversationProfile corresponding to the call.
13778	// After a non-recoverable error, Dialogflow may stop responding. We
13779	// don't fire this event: * in an API call because we can directly
13780	// return the error, or, * when we can recover from an error.
13781	Type string `json:"type,omitempty"`
13782
13783	// ForceSendFields is a list of field names (e.g. "Conversation") to
13784	// unconditionally include in API requests. By default, fields with
13785	// empty values are omitted from API requests. However, any non-pointer,
13786	// non-interface field appearing in ForceSendFields will be sent to the
13787	// server regardless of whether the field is empty or not. This may be
13788	// used to include empty fields in Patch requests.
13789	ForceSendFields []string `json:"-"`
13790
13791	// NullFields is a list of field names (e.g. "Conversation") to include
13792	// in API requests with the JSON null value. By default, fields with
13793	// empty values are omitted from API requests. However, any field with
13794	// an empty value appearing in NullFields will be sent to the server as
13795	// null. It is an error if a field in this list has a non-empty value.
13796	// This may be used to include null fields in Patch requests.
13797	NullFields []string `json:"-"`
13798}
13799
13800func (s *GoogleCloudDialogflowV2beta1ConversationEvent) MarshalJSON() ([]byte, error) {
13801	type NoMethod GoogleCloudDialogflowV2beta1ConversationEvent
13802	raw := NoMethod(*s)
13803	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13804}
13805
13806// GoogleCloudDialogflowV2beta1EntityType: Each intent parameter has a
13807// type, called the entity type, which dictates exactly how data from an
13808// end-user expression is extracted. Dialogflow provides predefined
13809// system entities that can match many common types of data. For
13810// example, there are system entities for matching dates, times, colors,
13811// email addresses, and so on. You can also create your own custom
13812// entities for matching custom data. For example, you could define a
13813// vegetable entity that can match the types of vegetables available for
13814// purchase with a grocery store agent. For more information, see the
13815// Entity guide
13816// (https://cloud.google.com/dialogflow/docs/entities-overview).
13817type GoogleCloudDialogflowV2beta1EntityType struct {
13818	// AutoExpansionMode: Optional. Indicates whether the entity type can be
13819	// automatically expanded.
13820	//
13821	// Possible values:
13822	//   "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the
13823	// entity.
13824	//   "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values
13825	// that have not been explicitly listed in the entity.
13826	AutoExpansionMode string `json:"autoExpansionMode,omitempty"`
13827
13828	// DisplayName: Required. The name of the entity type.
13829	DisplayName string `json:"displayName,omitempty"`
13830
13831	// EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction
13832	// during classification.
13833	EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"`
13834
13835	// Entities: Optional. The collection of entity entries associated with
13836	// the entity type.
13837	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
13838
13839	// Kind: Required. Indicates the kind of entity type.
13840	//
13841	// Possible values:
13842	//   "KIND_UNSPECIFIED" - Not specified. This value should be never
13843	// used.
13844	//   "KIND_MAP" - Map entity types allow mapping of a group of synonyms
13845	// to a reference value.
13846	//   "KIND_LIST" - List entity types contain a set of entries that do
13847	// not map to reference values. However, list entity types can contain
13848	// references to other entity types (with or without aliases).
13849	//   "KIND_REGEXP" - Regexp entity types allow to specify regular
13850	// expressions in entries values.
13851	Kind string `json:"kind,omitempty"`
13852
13853	// Name: The unique identifier of the entity type. Required for
13854	// EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes
13855	// methods. Supported formats: - `projects//agent/entityTypes/` -
13856	// `projects//locations//agent/entityTypes/`
13857	Name string `json:"name,omitempty"`
13858
13859	// ForceSendFields is a list of field names (e.g. "AutoExpansionMode")
13860	// to unconditionally include in API requests. By default, fields with
13861	// empty values are omitted from API requests. However, any non-pointer,
13862	// non-interface field appearing in ForceSendFields will be sent to the
13863	// server regardless of whether the field is empty or not. This may be
13864	// used to include empty fields in Patch requests.
13865	ForceSendFields []string `json:"-"`
13866
13867	// NullFields is a list of field names (e.g. "AutoExpansionMode") to
13868	// include in API requests with the JSON null value. By default, fields
13869	// with empty values are omitted from API requests. However, any field
13870	// with an empty value appearing in NullFields will be sent to the
13871	// server as null. It is an error if a field in this list has a
13872	// non-empty value. This may be used to include null fields in Patch
13873	// requests.
13874	NullFields []string `json:"-"`
13875}
13876
13877func (s *GoogleCloudDialogflowV2beta1EntityType) MarshalJSON() ([]byte, error) {
13878	type NoMethod GoogleCloudDialogflowV2beta1EntityType
13879	raw := NoMethod(*s)
13880	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13881}
13882
13883// GoogleCloudDialogflowV2beta1EntityTypeEntity: An **entity entry** for
13884// an associated entity type.
13885type GoogleCloudDialogflowV2beta1EntityTypeEntity struct {
13886	// Synonyms: Required. A collection of value synonyms. For example, if
13887	// the entity type is *vegetable*, and `value` is *scallions*, a synonym
13888	// could be *green onions*. For `KIND_LIST` entity types: * This
13889	// collection must contain exactly one synonym equal to `value`.
13890	Synonyms []string `json:"synonyms,omitempty"`
13891
13892	// Value: Required. The primary value associated with this entity entry.
13893	// For example, if the entity type is *vegetable*, the value could be
13894	// *scallions*. For `KIND_MAP` entity types: * A reference value to be
13895	// used in place of synonyms. For `KIND_LIST` entity types: * A string
13896	// that can contain references to other entity types (with or without
13897	// aliases).
13898	Value string `json:"value,omitempty"`
13899
13900	// ForceSendFields is a list of field names (e.g. "Synonyms") to
13901	// unconditionally include in API requests. By default, fields with
13902	// empty values are omitted from API requests. However, any non-pointer,
13903	// non-interface field appearing in ForceSendFields will be sent to the
13904	// server regardless of whether the field is empty or not. This may be
13905	// used to include empty fields in Patch requests.
13906	ForceSendFields []string `json:"-"`
13907
13908	// NullFields is a list of field names (e.g. "Synonyms") to include in
13909	// API requests with the JSON null value. By default, fields with empty
13910	// values are omitted from API requests. However, any field with an
13911	// empty value appearing in NullFields will be sent to the server as
13912	// null. It is an error if a field in this list has a non-empty value.
13913	// This may be used to include null fields in Patch requests.
13914	NullFields []string `json:"-"`
13915}
13916
13917func (s *GoogleCloudDialogflowV2beta1EntityTypeEntity) MarshalJSON() ([]byte, error) {
13918	type NoMethod GoogleCloudDialogflowV2beta1EntityTypeEntity
13919	raw := NoMethod(*s)
13920	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13921}
13922
13923// GoogleCloudDialogflowV2beta1EventInput: Events allow for matching
13924// intents by event name instead of the natural language input. For
13925// instance, input `` can trigger a personalized welcome response. The
13926// parameter `name` may be used by the agent in the response: "Hello
13927// #welcome_event.name! What can I do for you today?".
13928type GoogleCloudDialogflowV2beta1EventInput struct {
13929	// LanguageCode: Required. The language of this query. See Language
13930	// Support (https://cloud.google.com/dialogflow/docs/reference/language)
13931	// for a list of the currently supported language codes. Note that
13932	// queries in the same session do not necessarily need to specify the
13933	// same language.
13934	LanguageCode string `json:"languageCode,omitempty"`
13935
13936	// Name: Required. The unique identifier of the event.
13937	Name string `json:"name,omitempty"`
13938
13939	// Parameters: The collection of parameters associated with the event.
13940	// Depending on your protocol or client library language, this is a map,
13941	// associative array, symbol table, dictionary, or JSON object composed
13942	// of a collection of (MapKey, MapValue) pairs: - MapKey type: string -
13943	// MapKey value: parameter name - MapValue type: - If parameter's entity
13944	// type is a composite entity: map - Else: depending on parameter value
13945	// type, could be one of string, number, boolean, null, list or map -
13946	// MapValue value: - If parameter's entity type is a composite entity:
13947	// map from composite entity property names to property values - Else:
13948	// parameter value
13949	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
13950
13951	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
13952	// unconditionally include in API requests. By default, fields with
13953	// empty values are omitted from API requests. However, any non-pointer,
13954	// non-interface field appearing in ForceSendFields will be sent to the
13955	// server regardless of whether the field is empty or not. This may be
13956	// used to include empty fields in Patch requests.
13957	ForceSendFields []string `json:"-"`
13958
13959	// NullFields is a list of field names (e.g. "LanguageCode") to include
13960	// in API requests with the JSON null value. By default, fields with
13961	// empty values are omitted from API requests. However, any field with
13962	// an empty value appearing in NullFields will be sent to the server as
13963	// null. It is an error if a field in this list has a non-empty value.
13964	// This may be used to include null fields in Patch requests.
13965	NullFields []string `json:"-"`
13966}
13967
13968func (s *GoogleCloudDialogflowV2beta1EventInput) MarshalJSON() ([]byte, error) {
13969	type NoMethod GoogleCloudDialogflowV2beta1EventInput
13970	raw := NoMethod(*s)
13971	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13972}
13973
13974// GoogleCloudDialogflowV2beta1ExportAgentResponse: The response message
13975// for Agents.ExportAgent.
13976type GoogleCloudDialogflowV2beta1ExportAgentResponse struct {
13977	// AgentContent: Zip compressed raw byte content for agent.
13978	AgentContent string `json:"agentContent,omitempty"`
13979
13980	// AgentUri: The URI to a file containing the exported agent. This field
13981	// is populated only if `agent_uri` is specified in
13982	// `ExportAgentRequest`.
13983	AgentUri string `json:"agentUri,omitempty"`
13984
13985	// ForceSendFields is a list of field names (e.g. "AgentContent") to
13986	// unconditionally include in API requests. By default, fields with
13987	// empty values are omitted from API requests. However, any non-pointer,
13988	// non-interface field appearing in ForceSendFields will be sent to the
13989	// server regardless of whether the field is empty or not. This may be
13990	// used to include empty fields in Patch requests.
13991	ForceSendFields []string `json:"-"`
13992
13993	// NullFields is a list of field names (e.g. "AgentContent") to include
13994	// in API requests with the JSON null value. By default, fields with
13995	// empty values are omitted from API requests. However, any field with
13996	// an empty value appearing in NullFields will be sent to the server as
13997	// null. It is an error if a field in this list has a non-empty value.
13998	// This may be used to include null fields in Patch requests.
13999	NullFields []string `json:"-"`
14000}
14001
14002func (s *GoogleCloudDialogflowV2beta1ExportAgentResponse) MarshalJSON() ([]byte, error) {
14003	type NoMethod GoogleCloudDialogflowV2beta1ExportAgentResponse
14004	raw := NoMethod(*s)
14005	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14006}
14007
14008// GoogleCloudDialogflowV2beta1FaqAnswer: Represents answer from
14009// "frequently asked questions".
14010type GoogleCloudDialogflowV2beta1FaqAnswer struct {
14011	// Answer: The piece of text from the `source` knowledge base document.
14012	Answer string `json:"answer,omitempty"`
14013
14014	// AnswerRecord: The name of answer record, in the format of
14015	// "projects//locations//answerRecords/"
14016	AnswerRecord string `json:"answerRecord,omitempty"`
14017
14018	// Confidence: The system's confidence score that this Knowledge answer
14019	// is a good match for this conversational query, range from 0.0
14020	// (completely uncertain) to 1.0 (completely certain).
14021	Confidence float64 `json:"confidence,omitempty"`
14022
14023	// Metadata: A map that contains metadata about the answer and the
14024	// document from which it originates.
14025	Metadata map[string]string `json:"metadata,omitempty"`
14026
14027	// Question: The corresponding FAQ question.
14028	Question string `json:"question,omitempty"`
14029
14030	// Source: Indicates which Knowledge Document this answer was extracted
14031	// from. Format:
14032	// `projects//locations//agent/knowledgeBases//documents/`.
14033	Source string `json:"source,omitempty"`
14034
14035	// ForceSendFields is a list of field names (e.g. "Answer") to
14036	// unconditionally include in API requests. By default, fields with
14037	// empty values are omitted from API requests. However, any non-pointer,
14038	// non-interface field appearing in ForceSendFields will be sent to the
14039	// server regardless of whether the field is empty or not. This may be
14040	// used to include empty fields in Patch requests.
14041	ForceSendFields []string `json:"-"`
14042
14043	// NullFields is a list of field names (e.g. "Answer") to include in API
14044	// requests with the JSON null value. By default, fields with empty
14045	// values are omitted from API requests. However, any field with an
14046	// empty value appearing in NullFields will be sent to the server as
14047	// null. It is an error if a field in this list has a non-empty value.
14048	// This may be used to include null fields in Patch requests.
14049	NullFields []string `json:"-"`
14050}
14051
14052func (s *GoogleCloudDialogflowV2beta1FaqAnswer) MarshalJSON() ([]byte, error) {
14053	type NoMethod GoogleCloudDialogflowV2beta1FaqAnswer
14054	raw := NoMethod(*s)
14055	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14056}
14057
14058func (s *GoogleCloudDialogflowV2beta1FaqAnswer) UnmarshalJSON(data []byte) error {
14059	type NoMethod GoogleCloudDialogflowV2beta1FaqAnswer
14060	var s1 struct {
14061		Confidence gensupport.JSONFloat64 `json:"confidence"`
14062		*NoMethod
14063	}
14064	s1.NoMethod = (*NoMethod)(s)
14065	if err := json.Unmarshal(data, &s1); err != nil {
14066		return err
14067	}
14068	s.Confidence = float64(s1.Confidence)
14069	return nil
14070}
14071
14072// GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent: Output only.
14073// Represents a notification sent to Pub/Sub subscribers for agent
14074// assistant events in a specific conversation.
14075type GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent struct {
14076	// Conversation: The conversation this notification refers to. Format:
14077	// `projects//conversations/`.
14078	Conversation string `json:"conversation,omitempty"`
14079
14080	// Participant: The participant that the suggestion is compiled for. And
14081	// This field is used to call Participants.ListSuggestions API. Format:
14082	// `projects//conversations//participants/`. It will not be set in
14083	// legacy workflow. HumanAgentAssistantConfig.name for more information.
14084	Participant string `json:"participant,omitempty"`
14085
14086	// SuggestionResults: The suggestion results payload that this
14087	// notification refers to. It will only be set when
14088	// HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses
14089	// sets to true.
14090	SuggestionResults []*GoogleCloudDialogflowV2beta1SuggestionResult `json:"suggestionResults,omitempty"`
14091
14092	// ForceSendFields is a list of field names (e.g. "Conversation") to
14093	// unconditionally include in API requests. By default, fields with
14094	// empty values are omitted from API requests. However, any non-pointer,
14095	// non-interface field appearing in ForceSendFields will be sent to the
14096	// server regardless of whether the field is empty or not. This may be
14097	// used to include empty fields in Patch requests.
14098	ForceSendFields []string `json:"-"`
14099
14100	// NullFields is a list of field names (e.g. "Conversation") to include
14101	// in API requests with the JSON null value. By default, fields with
14102	// empty values are omitted from API requests. However, any field with
14103	// an empty value appearing in NullFields will be sent to the server as
14104	// null. It is an error if a field in this list has a non-empty value.
14105	// This may be used to include null fields in Patch requests.
14106	NullFields []string `json:"-"`
14107}
14108
14109func (s *GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent) MarshalJSON() ([]byte, error) {
14110	type NoMethod GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent
14111	raw := NoMethod(*s)
14112	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14113}
14114
14115// GoogleCloudDialogflowV2beta1ImportDocumentsResponse: Response message
14116// for Documents.ImportDocuments.
14117type GoogleCloudDialogflowV2beta1ImportDocumentsResponse struct {
14118	// Warnings: Includes details about skipped documents or any other
14119	// warnings.
14120	Warnings []*GoogleRpcStatus `json:"warnings,omitempty"`
14121
14122	// ForceSendFields is a list of field names (e.g. "Warnings") to
14123	// unconditionally include in API requests. By default, fields with
14124	// empty values are omitted from API requests. However, any non-pointer,
14125	// non-interface field appearing in ForceSendFields will be sent to the
14126	// server regardless of whether the field is empty or not. This may be
14127	// used to include empty fields in Patch requests.
14128	ForceSendFields []string `json:"-"`
14129
14130	// NullFields is a list of field names (e.g. "Warnings") to include in
14131	// API requests with the JSON null value. By default, fields with empty
14132	// values are omitted from API requests. However, any field with an
14133	// empty value appearing in NullFields will be sent to the server as
14134	// null. It is an error if a field in this list has a non-empty value.
14135	// This may be used to include null fields in Patch requests.
14136	NullFields []string `json:"-"`
14137}
14138
14139func (s *GoogleCloudDialogflowV2beta1ImportDocumentsResponse) MarshalJSON() ([]byte, error) {
14140	type NoMethod GoogleCloudDialogflowV2beta1ImportDocumentsResponse
14141	raw := NoMethod(*s)
14142	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14143}
14144
14145// GoogleCloudDialogflowV2beta1Intent: An intent categorizes an
14146// end-user's intention for one conversation turn. For each agent, you
14147// define many intents, where your combined intents can handle a
14148// complete conversation. When an end-user writes or says something,
14149// referred to as an end-user expression or end-user input, Dialogflow
14150// matches the end-user input to the best intent in your agent. Matching
14151// an intent is also known as intent classification. For more
14152// information, see the intent guide
14153// (https://cloud.google.com/dialogflow/docs/intents-overview).
14154type GoogleCloudDialogflowV2beta1Intent struct {
14155	// Action: Optional. The name of the action associated with the intent.
14156	// Note: The action name must not contain whitespaces.
14157	Action string `json:"action,omitempty"`
14158
14159	// DefaultResponsePlatforms: Optional. The list of platforms for which
14160	// the first responses will be copied from the messages in
14161	// PLATFORM_UNSPECIFIED (i.e. default platform).
14162	//
14163	// Possible values:
14164	//   "PLATFORM_UNSPECIFIED" - Not specified.
14165	//   "FACEBOOK" - Facebook.
14166	//   "SLACK" - Slack.
14167	//   "TELEGRAM" - Telegram.
14168	//   "KIK" - Kik.
14169	//   "SKYPE" - Skype.
14170	//   "LINE" - Line.
14171	//   "VIBER" - Viber.
14172	//   "ACTIONS_ON_GOOGLE" - Google Assistant See [Dialogflow webhook
14173	// format](https://developers.google.com/assistant/actions/build/json/dia
14174	// logflow-webhook-json)
14175	//   "TELEPHONY" - Telephony Gateway.
14176	//   "GOOGLE_HANGOUTS" - Google Hangouts.
14177	DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"`
14178
14179	// DisplayName: Required. The name of this intent.
14180	DisplayName string `json:"displayName,omitempty"`
14181
14182	// EndInteraction: Optional. Indicates that this intent ends an
14183	// interaction. Some integrations (e.g., Actions on Google or Dialogflow
14184	// phone gateway) use this information to close interaction with an end
14185	// user. Default is false.
14186	EndInteraction bool `json:"endInteraction,omitempty"`
14187
14188	// Events: Optional. The collection of event names that trigger the
14189	// intent. If the collection of input contexts is not empty, all of the
14190	// contexts must be present in the active user session for an event to
14191	// trigger this intent. Event names are limited to 150 characters.
14192	Events []string `json:"events,omitempty"`
14193
14194	// FollowupIntentInfo: Output only. Information about all followup
14195	// intents that have this intent as a direct or indirect parent. We
14196	// populate this field only in the output.
14197	FollowupIntentInfo []*GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"`
14198
14199	// InputContextNames: Optional. The list of context names required for
14200	// this intent to be triggered. Formats: -
14201	// `projects//agent/sessions/-/contexts/` -
14202	// `projects//locations//agent/sessions/-/contexts/`
14203	InputContextNames []string `json:"inputContextNames,omitempty"`
14204
14205	// IsFallback: Optional. Indicates whether this is a fallback intent.
14206	IsFallback bool `json:"isFallback,omitempty"`
14207
14208	// LiveAgentHandoff: Optional. Indicates that a live agent should be
14209	// brought in to handle the interaction with the user. In most cases,
14210	// when you set this flag to true, you would also want to set
14211	// end_interaction to true as well. Default is false.
14212	LiveAgentHandoff bool `json:"liveAgentHandoff,omitempty"`
14213
14214	// Messages: Optional. The collection of rich messages corresponding to
14215	// the `Response` field in the Dialogflow console.
14216	Messages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"messages,omitempty"`
14217
14218	// MlDisabled: Optional. Indicates whether Machine Learning is disabled
14219	// for the intent. Note: If `ml_disabled` setting is set to true, then
14220	// this intent is not taken into account during inference in `ML ONLY`
14221	// match mode. Also, auto-markup in the UI is turned off.
14222	MlDisabled bool `json:"mlDisabled,omitempty"`
14223
14224	// MlEnabled: Optional. Indicates whether Machine Learning is enabled
14225	// for the intent. Note: If `ml_enabled` setting is set to false, then
14226	// this intent is not taken into account during inference in `ML ONLY`
14227	// match mode. Also, auto-markup in the UI is turned off. DEPRECATED!
14228	// Please use `ml_disabled` field instead. NOTE: If both `ml_enabled`
14229	// and `ml_disabled` are either not set or false, then the default value
14230	// is determined as follows: - Before April 15th, 2018 the default is:
14231	// ml_enabled = false / ml_disabled = true. - After April 15th, 2018 the
14232	// default is: ml_enabled = true / ml_disabled = false.
14233	MlEnabled bool `json:"mlEnabled,omitempty"`
14234
14235	// Name: Optional. The unique identifier of this intent. Required for
14236	// Intents.UpdateIntent and Intents.BatchUpdateIntents methods.
14237	// Supported formats: - `projects//agent/intents/` -
14238	// `projects//locations//agent/intents/`
14239	Name string `json:"name,omitempty"`
14240
14241	// OutputContexts: Optional. The collection of contexts that are
14242	// activated when the intent is matched. Context messages in this
14243	// collection should not set the parameters field. Setting the
14244	// `lifespan_count` to 0 will reset the context when the intent is
14245	// matched. Format: `projects//agent/sessions/-/contexts/`.
14246	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
14247
14248	// Parameters: Optional. The collection of parameters associated with
14249	// the intent.
14250	Parameters []*GoogleCloudDialogflowV2beta1IntentParameter `json:"parameters,omitempty"`
14251
14252	// ParentFollowupIntentName: Optional. The unique identifier of the
14253	// parent intent in the chain of followup intents. You can set this
14254	// field when creating an intent, for example with CreateIntent or
14255	// BatchUpdateIntents, in order to make this intent a followup intent.
14256	// It identifies the parent followup intent. Format:
14257	// `projects//agent/intents/`.
14258	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
14259
14260	// Priority: Optional. The priority of this intent. Higher numbers
14261	// represent higher priorities. - If the supplied value is unspecified
14262	// or 0, the service translates the value to 500,000, which corresponds
14263	// to the `Normal` priority in the console. - If the supplied value is
14264	// negative, the intent is ignored in runtime detect intent requests.
14265	Priority int64 `json:"priority,omitempty"`
14266
14267	// ResetContexts: Optional. Indicates whether to delete all contexts in
14268	// the current session when this intent is matched.
14269	ResetContexts bool `json:"resetContexts,omitempty"`
14270
14271	// RootFollowupIntentName: Output only. The unique identifier of the
14272	// root intent in the chain of followup intents. It identifies the
14273	// correct followup intents chain for this intent. Format:
14274	// `projects//agent/intents/`.
14275	RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"`
14276
14277	// TrainingPhrases: Optional. The collection of examples that the agent
14278	// is trained on.
14279	TrainingPhrases []*GoogleCloudDialogflowV2beta1IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
14280
14281	// WebhookState: Optional. Indicates whether webhooks are enabled for
14282	// the intent.
14283	//
14284	// Possible values:
14285	//   "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and
14286	// in the intent.
14287	//   "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in
14288	// the intent.
14289	//   "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in
14290	// the agent and in the intent. Also, each slot filling prompt is
14291	// forwarded to the webhook.
14292	WebhookState string `json:"webhookState,omitempty"`
14293
14294	// ForceSendFields is a list of field names (e.g. "Action") to
14295	// unconditionally include in API requests. By default, fields with
14296	// empty values are omitted from API requests. However, any non-pointer,
14297	// non-interface field appearing in ForceSendFields will be sent to the
14298	// server regardless of whether the field is empty or not. This may be
14299	// used to include empty fields in Patch requests.
14300	ForceSendFields []string `json:"-"`
14301
14302	// NullFields is a list of field names (e.g. "Action") to include in API
14303	// requests with the JSON null value. By default, fields with empty
14304	// values are omitted from API requests. However, any field with an
14305	// empty value appearing in NullFields will be sent to the server as
14306	// null. It is an error if a field in this list has a non-empty value.
14307	// This may be used to include null fields in Patch requests.
14308	NullFields []string `json:"-"`
14309}
14310
14311func (s *GoogleCloudDialogflowV2beta1Intent) MarshalJSON() ([]byte, error) {
14312	type NoMethod GoogleCloudDialogflowV2beta1Intent
14313	raw := NoMethod(*s)
14314	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14315}
14316
14317// GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo: Represents a
14318// single followup intent in the chain.
14319type GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo struct {
14320	// FollowupIntentName: The unique identifier of the followup intent.
14321	// Format: `projects//agent/intents/`.
14322	FollowupIntentName string `json:"followupIntentName,omitempty"`
14323
14324	// ParentFollowupIntentName: The unique identifier of the followup
14325	// intent's parent. Format: `projects//agent/intents/`.
14326	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
14327
14328	// ForceSendFields is a list of field names (e.g. "FollowupIntentName")
14329	// to unconditionally include in API requests. By default, fields with
14330	// empty values are omitted from API requests. However, any non-pointer,
14331	// non-interface field appearing in ForceSendFields will be sent to the
14332	// server regardless of whether the field is empty or not. This may be
14333	// used to include empty fields in Patch requests.
14334	ForceSendFields []string `json:"-"`
14335
14336	// NullFields is a list of field names (e.g. "FollowupIntentName") to
14337	// include in API requests with the JSON null value. By default, fields
14338	// with empty values are omitted from API requests. However, any field
14339	// with an empty value appearing in NullFields will be sent to the
14340	// server as null. It is an error if a field in this list has a
14341	// non-empty value. This may be used to include null fields in Patch
14342	// requests.
14343	NullFields []string `json:"-"`
14344}
14345
14346func (s *GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) {
14347	type NoMethod GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
14348	raw := NoMethod(*s)
14349	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14350}
14351
14352// GoogleCloudDialogflowV2beta1IntentMessage: Corresponds to the
14353// `Response` field in the Dialogflow console.
14354type GoogleCloudDialogflowV2beta1IntentMessage struct {
14355	// BasicCard: Displays a basic card for Actions on Google.
14356	BasicCard *GoogleCloudDialogflowV2beta1IntentMessageBasicCard `json:"basicCard,omitempty"`
14357
14358	// BrowseCarouselCard: Browse carousel card for Actions on Google.
14359	BrowseCarouselCard *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"`
14360
14361	// Card: Displays a card.
14362	Card *GoogleCloudDialogflowV2beta1IntentMessageCard `json:"card,omitempty"`
14363
14364	// CarouselSelect: Displays a carousel card for Actions on Google.
14365	CarouselSelect *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect `json:"carouselSelect,omitempty"`
14366
14367	// Image: Displays an image.
14368	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
14369
14370	// LinkOutSuggestion: Displays a link out suggestion chip for Actions on
14371	// Google.
14372	LinkOutSuggestion *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"`
14373
14374	// ListSelect: Displays a list card for Actions on Google.
14375	ListSelect *GoogleCloudDialogflowV2beta1IntentMessageListSelect `json:"listSelect,omitempty"`
14376
14377	// MediaContent: The media content card for Actions on Google.
14378	MediaContent *GoogleCloudDialogflowV2beta1IntentMessageMediaContent `json:"mediaContent,omitempty"`
14379
14380	// Payload: A custom platform-specific response.
14381	Payload googleapi.RawMessage `json:"payload,omitempty"`
14382
14383	// Platform: Optional. The platform that this message is intended for.
14384	//
14385	// Possible values:
14386	//   "PLATFORM_UNSPECIFIED" - Not specified.
14387	//   "FACEBOOK" - Facebook.
14388	//   "SLACK" - Slack.
14389	//   "TELEGRAM" - Telegram.
14390	//   "KIK" - Kik.
14391	//   "SKYPE" - Skype.
14392	//   "LINE" - Line.
14393	//   "VIBER" - Viber.
14394	//   "ACTIONS_ON_GOOGLE" - Google Assistant See [Dialogflow webhook
14395	// format](https://developers.google.com/assistant/actions/build/json/dia
14396	// logflow-webhook-json)
14397	//   "TELEPHONY" - Telephony Gateway.
14398	//   "GOOGLE_HANGOUTS" - Google Hangouts.
14399	Platform string `json:"platform,omitempty"`
14400
14401	// QuickReplies: Displays quick replies.
14402	QuickReplies *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies `json:"quickReplies,omitempty"`
14403
14404	// RbmCarouselRichCard: Rich Business Messaging (RBM) carousel rich card
14405	// response.
14406	RbmCarouselRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard `json:"rbmCarouselRichCard,omitempty"`
14407
14408	// RbmStandaloneRichCard: Standalone Rich Business Messaging (RBM) rich
14409	// card response.
14410	RbmStandaloneRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard `json:"rbmStandaloneRichCard,omitempty"`
14411
14412	// RbmText: Rich Business Messaging (RBM) text response. RBM allows
14413	// businesses to send enriched and branded versions of SMS. See
14414	// https://jibe.google.com/business-messaging.
14415	RbmText *GoogleCloudDialogflowV2beta1IntentMessageRbmText `json:"rbmText,omitempty"`
14416
14417	// SimpleResponses: Returns a voice or text-only response for Actions on
14418	// Google.
14419	SimpleResponses *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses `json:"simpleResponses,omitempty"`
14420
14421	// Suggestions: Displays suggestion chips for Actions on Google.
14422	Suggestions *GoogleCloudDialogflowV2beta1IntentMessageSuggestions `json:"suggestions,omitempty"`
14423
14424	// TableCard: Table card for Actions on Google.
14425	TableCard *GoogleCloudDialogflowV2beta1IntentMessageTableCard `json:"tableCard,omitempty"`
14426
14427	// TelephonyPlayAudio: Plays audio from a file in Telephony Gateway.
14428	TelephonyPlayAudio *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio `json:"telephonyPlayAudio,omitempty"`
14429
14430	// TelephonySynthesizeSpeech: Synthesizes speech in Telephony Gateway.
14431	TelephonySynthesizeSpeech *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech `json:"telephonySynthesizeSpeech,omitempty"`
14432
14433	// TelephonyTransferCall: Transfers the call in Telephony Gateway.
14434	TelephonyTransferCall *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall `json:"telephonyTransferCall,omitempty"`
14435
14436	// Text: Returns a text response.
14437	Text *GoogleCloudDialogflowV2beta1IntentMessageText `json:"text,omitempty"`
14438
14439	// ForceSendFields is a list of field names (e.g. "BasicCard") to
14440	// unconditionally include in API requests. By default, fields with
14441	// empty values are omitted from API requests. However, any non-pointer,
14442	// non-interface field appearing in ForceSendFields will be sent to the
14443	// server regardless of whether the field is empty or not. This may be
14444	// used to include empty fields in Patch requests.
14445	ForceSendFields []string `json:"-"`
14446
14447	// NullFields is a list of field names (e.g. "BasicCard") to include in
14448	// API requests with the JSON null value. By default, fields with empty
14449	// values are omitted from API requests. However, any field with an
14450	// empty value appearing in NullFields will be sent to the server as
14451	// null. It is an error if a field in this list has a non-empty value.
14452	// This may be used to include null fields in Patch requests.
14453	NullFields []string `json:"-"`
14454}
14455
14456func (s *GoogleCloudDialogflowV2beta1IntentMessage) MarshalJSON() ([]byte, error) {
14457	type NoMethod GoogleCloudDialogflowV2beta1IntentMessage
14458	raw := NoMethod(*s)
14459	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14460}
14461
14462// GoogleCloudDialogflowV2beta1IntentMessageBasicCard: The basic card
14463// message. Useful for displaying information.
14464type GoogleCloudDialogflowV2beta1IntentMessageBasicCard struct {
14465	// Buttons: Optional. The collection of card buttons.
14466	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"`
14467
14468	// FormattedText: Required, unless image is present. The body text of
14469	// the card.
14470	FormattedText string `json:"formattedText,omitempty"`
14471
14472	// Image: Optional. The image for the card.
14473	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
14474
14475	// Subtitle: Optional. The subtitle of the card.
14476	Subtitle string `json:"subtitle,omitempty"`
14477
14478	// Title: Optional. The title of the card.
14479	Title string `json:"title,omitempty"`
14480
14481	// ForceSendFields is a list of field names (e.g. "Buttons") to
14482	// unconditionally include in API requests. By default, fields with
14483	// empty values are omitted from API requests. However, any non-pointer,
14484	// non-interface field appearing in ForceSendFields will be sent to the
14485	// server regardless of whether the field is empty or not. This may be
14486	// used to include empty fields in Patch requests.
14487	ForceSendFields []string `json:"-"`
14488
14489	// NullFields is a list of field names (e.g. "Buttons") to include in
14490	// API requests with the JSON null value. By default, fields with empty
14491	// values are omitted from API requests. However, any field with an
14492	// empty value appearing in NullFields will be sent to the server as
14493	// null. It is an error if a field in this list has a non-empty value.
14494	// This may be used to include null fields in Patch requests.
14495	NullFields []string `json:"-"`
14496}
14497
14498func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCard) MarshalJSON() ([]byte, error) {
14499	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCard
14500	raw := NoMethod(*s)
14501	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14502}
14503
14504// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton: The button
14505// object that appears at the bottom of a card.
14506type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton struct {
14507	// OpenUriAction: Required. Action to take when a user taps on the
14508	// button.
14509	OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"`
14510
14511	// Title: Required. The title of the button.
14512	Title string `json:"title,omitempty"`
14513
14514	// ForceSendFields is a list of field names (e.g. "OpenUriAction") to
14515	// unconditionally include in API requests. By default, fields with
14516	// empty values are omitted from API requests. However, any non-pointer,
14517	// non-interface field appearing in ForceSendFields will be sent to the
14518	// server regardless of whether the field is empty or not. This may be
14519	// used to include empty fields in Patch requests.
14520	ForceSendFields []string `json:"-"`
14521
14522	// NullFields is a list of field names (e.g. "OpenUriAction") to include
14523	// in API requests with the JSON null value. By default, fields with
14524	// empty values are omitted from API requests. However, any field with
14525	// an empty value appearing in NullFields will be sent to the server as
14526	// null. It is an error if a field in this list has a non-empty value.
14527	// This may be used to include null fields in Patch requests.
14528	NullFields []string `json:"-"`
14529}
14530
14531func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) {
14532	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
14533	raw := NoMethod(*s)
14534	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14535}
14536
14537// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction:
14538//  Opens the given URI.
14539type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction struct {
14540	// Uri: Required. The HTTP or HTTPS scheme URI.
14541	Uri string `json:"uri,omitempty"`
14542
14543	// ForceSendFields is a list of field names (e.g. "Uri") to
14544	// unconditionally include in API requests. By default, fields with
14545	// empty values are omitted from API requests. However, any non-pointer,
14546	// non-interface field appearing in ForceSendFields will be sent to the
14547	// server regardless of whether the field is empty or not. This may be
14548	// used to include empty fields in Patch requests.
14549	ForceSendFields []string `json:"-"`
14550
14551	// NullFields is a list of field names (e.g. "Uri") to include in API
14552	// requests with the JSON null value. By default, fields with empty
14553	// values are omitted from API requests. However, any field with an
14554	// empty value appearing in NullFields will be sent to the server as
14555	// null. It is an error if a field in this list has a non-empty value.
14556	// This may be used to include null fields in Patch requests.
14557	NullFields []string `json:"-"`
14558}
14559
14560func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) {
14561	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
14562	raw := NoMethod(*s)
14563	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14564}
14565
14566// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard: Browse
14567// Carousel Card for Actions on Google.
14568// https://developers.google.com/actions/assistant/responses#browsing_carousel
14569type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard struct {
14570	// ImageDisplayOptions: Optional. Settings for displaying the image.
14571	// Applies to every image in items.
14572	//
14573	// Possible values:
14574	//   "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the
14575	// image and the image container with gray bars.
14576	//   "GRAY" - Fill the gaps between the image and the image container
14577	// with gray bars.
14578	//   "WHITE" - Fill the gaps between the image and the image container
14579	// with white bars.
14580	//   "CROPPED" - Image is scaled such that the image width and height
14581	// match or exceed the container dimensions. This may crop the top and
14582	// bottom of the image if the scaled image height is greater than the
14583	// container height, or crop the left and right of the image if the
14584	// scaled image width is greater than the container width. This is
14585	// similar to "Zoom Mode" on a widescreen TV when playing a 4:3 video.
14586	//   "BLURRED_BACKGROUND" - Pad the gaps between image and image frame
14587	// with a blurred copy of the same image.
14588	ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"`
14589
14590	// Items: Required. List of items in the Browse Carousel Card. Minimum
14591	// of two items, maximum of ten.
14592	Items []*GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"`
14593
14594	// ForceSendFields is a list of field names (e.g. "ImageDisplayOptions")
14595	// to unconditionally include in API requests. By default, fields with
14596	// empty values are omitted from API requests. However, any non-pointer,
14597	// non-interface field appearing in ForceSendFields will be sent to the
14598	// server regardless of whether the field is empty or not. This may be
14599	// used to include empty fields in Patch requests.
14600	ForceSendFields []string `json:"-"`
14601
14602	// NullFields is a list of field names (e.g. "ImageDisplayOptions") to
14603	// include in API requests with the JSON null value. By default, fields
14604	// with empty values are omitted from API requests. However, any field
14605	// with an empty value appearing in NullFields will be sent to the
14606	// server as null. It is an error if a field in this list has a
14607	// non-empty value. This may be used to include null fields in Patch
14608	// requests.
14609	NullFields []string `json:"-"`
14610}
14611
14612func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) {
14613	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
14614	raw := NoMethod(*s)
14615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14616}
14617
14618// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou
14619// selCardItem: Browsing carousel tile
14620type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct {
14621	// Description: Optional. Description of the carousel item. Maximum of
14622	// four lines of text.
14623	Description string `json:"description,omitempty"`
14624
14625	// Footer: Optional. Text that appears at the bottom of the Browse
14626	// Carousel Card. Maximum of one line of text.
14627	Footer string `json:"footer,omitempty"`
14628
14629	// Image: Optional. Hero image for the carousel item.
14630	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
14631
14632	// OpenUriAction: Required. Action to present to the user.
14633	OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"`
14634
14635	// Title: Required. Title of the carousel item. Maximum of two lines of
14636	// text.
14637	Title string `json:"title,omitempty"`
14638
14639	// ForceSendFields is a list of field names (e.g. "Description") to
14640	// unconditionally include in API requests. By default, fields with
14641	// empty values are omitted from API requests. However, any non-pointer,
14642	// non-interface field appearing in ForceSendFields will be sent to the
14643	// server regardless of whether the field is empty or not. This may be
14644	// used to include empty fields in Patch requests.
14645	ForceSendFields []string `json:"-"`
14646
14647	// NullFields is a list of field names (e.g. "Description") to include
14648	// in API requests with the JSON null value. By default, fields with
14649	// empty values are omitted from API requests. However, any field with
14650	// an empty value appearing in NullFields will be sent to the server as
14651	// null. It is an error if a field in this list has a non-empty value.
14652	// This may be used to include null fields in Patch requests.
14653	NullFields []string `json:"-"`
14654}
14655
14656func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) {
14657	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem
14658	raw := NoMethod(*s)
14659	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14660}
14661
14662// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou
14663// selCardItemOpenUrlAction: Actions on Google action to open a given
14664// url.
14665type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct {
14666	// Url: Required. URL
14667	Url string `json:"url,omitempty"`
14668
14669	// UrlTypeHint: Optional. Specifies the type of viewer that is used when
14670	// opening the URL. Defaults to opening via web browser.
14671	//
14672	// Possible values:
14673	//   "URL_TYPE_HINT_UNSPECIFIED" - Unspecified
14674	//   "AMP_ACTION" - Url would be an amp action
14675	//   "AMP_CONTENT" - URL that points directly to AMP content, or to a
14676	// canonical URL which refers to AMP content via .
14677	UrlTypeHint string `json:"urlTypeHint,omitempty"`
14678
14679	// ForceSendFields is a list of field names (e.g. "Url") to
14680	// unconditionally include in API requests. By default, fields with
14681	// empty values are omitted from API requests. However, any non-pointer,
14682	// non-interface field appearing in ForceSendFields will be sent to the
14683	// server regardless of whether the field is empty or not. This may be
14684	// used to include empty fields in Patch requests.
14685	ForceSendFields []string `json:"-"`
14686
14687	// NullFields is a list of field names (e.g. "Url") to include in API
14688	// requests with the JSON null value. By default, fields with empty
14689	// values are omitted from API requests. However, any field with an
14690	// empty value appearing in NullFields will be sent to the server as
14691	// null. It is an error if a field in this list has a non-empty value.
14692	// This may be used to include null fields in Patch requests.
14693	NullFields []string `json:"-"`
14694}
14695
14696func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) {
14697	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
14698	raw := NoMethod(*s)
14699	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14700}
14701
14702// GoogleCloudDialogflowV2beta1IntentMessageCard: The card response
14703// message.
14704type GoogleCloudDialogflowV2beta1IntentMessageCard struct {
14705	// Buttons: Optional. The collection of card buttons.
14706	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageCardButton `json:"buttons,omitempty"`
14707
14708	// ImageUri: Optional. The public URI to an image file for the card.
14709	ImageUri string `json:"imageUri,omitempty"`
14710
14711	// Subtitle: Optional. The subtitle of the card.
14712	Subtitle string `json:"subtitle,omitempty"`
14713
14714	// Title: Optional. The title of the card.
14715	Title string `json:"title,omitempty"`
14716
14717	// ForceSendFields is a list of field names (e.g. "Buttons") to
14718	// unconditionally include in API requests. By default, fields with
14719	// empty values are omitted from API requests. However, any non-pointer,
14720	// non-interface field appearing in ForceSendFields will be sent to the
14721	// server regardless of whether the field is empty or not. This may be
14722	// used to include empty fields in Patch requests.
14723	ForceSendFields []string `json:"-"`
14724
14725	// NullFields is a list of field names (e.g. "Buttons") to include in
14726	// API requests with the JSON null value. By default, fields with empty
14727	// values are omitted from API requests. However, any field with an
14728	// empty value appearing in NullFields will be sent to the server as
14729	// null. It is an error if a field in this list has a non-empty value.
14730	// This may be used to include null fields in Patch requests.
14731	NullFields []string `json:"-"`
14732}
14733
14734func (s *GoogleCloudDialogflowV2beta1IntentMessageCard) MarshalJSON() ([]byte, error) {
14735	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCard
14736	raw := NoMethod(*s)
14737	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14738}
14739
14740// GoogleCloudDialogflowV2beta1IntentMessageCardButton: Optional.
14741// Contains information about a button.
14742type GoogleCloudDialogflowV2beta1IntentMessageCardButton struct {
14743	// Postback: Optional. The text to send back to the Dialogflow API or a
14744	// URI to open.
14745	Postback string `json:"postback,omitempty"`
14746
14747	// Text: Optional. The text to show on the button.
14748	Text string `json:"text,omitempty"`
14749
14750	// ForceSendFields is a list of field names (e.g. "Postback") to
14751	// unconditionally include in API requests. By default, fields with
14752	// empty values are omitted from API requests. However, any non-pointer,
14753	// non-interface field appearing in ForceSendFields will be sent to the
14754	// server regardless of whether the field is empty or not. This may be
14755	// used to include empty fields in Patch requests.
14756	ForceSendFields []string `json:"-"`
14757
14758	// NullFields is a list of field names (e.g. "Postback") to include in
14759	// API requests with the JSON null value. By default, fields with empty
14760	// values are omitted from API requests. However, any field with an
14761	// empty value appearing in NullFields will be sent to the server as
14762	// null. It is an error if a field in this list has a non-empty value.
14763	// This may be used to include null fields in Patch requests.
14764	NullFields []string `json:"-"`
14765}
14766
14767func (s *GoogleCloudDialogflowV2beta1IntentMessageCardButton) MarshalJSON() ([]byte, error) {
14768	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCardButton
14769	raw := NoMethod(*s)
14770	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14771}
14772
14773// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect: The card for
14774// presenting a carousel of options to select from.
14775type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect struct {
14776	// Items: Required. Carousel items.
14777	Items []*GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem `json:"items,omitempty"`
14778
14779	// ForceSendFields is a list of field names (e.g. "Items") to
14780	// unconditionally include in API requests. By default, fields with
14781	// empty values are omitted from API requests. However, any non-pointer,
14782	// non-interface field appearing in ForceSendFields will be sent to the
14783	// server regardless of whether the field is empty or not. This may be
14784	// used to include empty fields in Patch requests.
14785	ForceSendFields []string `json:"-"`
14786
14787	// NullFields is a list of field names (e.g. "Items") to include in API
14788	// requests with the JSON null value. By default, fields with empty
14789	// values are omitted from API requests. However, any field with an
14790	// empty value appearing in NullFields will be sent to the server as
14791	// null. It is an error if a field in this list has a non-empty value.
14792	// This may be used to include null fields in Patch requests.
14793	NullFields []string `json:"-"`
14794}
14795
14796func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) {
14797	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
14798	raw := NoMethod(*s)
14799	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14800}
14801
14802// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem: An item
14803// in the carousel.
14804type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem struct {
14805	// Description: Optional. The body text of the card.
14806	Description string `json:"description,omitempty"`
14807
14808	// Image: Optional. The image to display.
14809	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
14810
14811	// Info: Required. Additional info about the option item.
14812	Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"`
14813
14814	// Title: Required. Title of the carousel item.
14815	Title string `json:"title,omitempty"`
14816
14817	// ForceSendFields is a list of field names (e.g. "Description") to
14818	// unconditionally include in API requests. By default, fields with
14819	// empty values are omitted from API requests. However, any non-pointer,
14820	// non-interface field appearing in ForceSendFields will be sent to the
14821	// server regardless of whether the field is empty or not. This may be
14822	// used to include empty fields in Patch requests.
14823	ForceSendFields []string `json:"-"`
14824
14825	// NullFields is a list of field names (e.g. "Description") to include
14826	// in API requests with the JSON null value. By default, fields with
14827	// empty values are omitted from API requests. However, any field with
14828	// an empty value appearing in NullFields will be sent to the server as
14829	// null. It is an error if a field in this list has a non-empty value.
14830	// This may be used to include null fields in Patch requests.
14831	NullFields []string `json:"-"`
14832}
14833
14834func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) {
14835	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
14836	raw := NoMethod(*s)
14837	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14838}
14839
14840// GoogleCloudDialogflowV2beta1IntentMessageColumnProperties: Column
14841// properties for TableCard.
14842type GoogleCloudDialogflowV2beta1IntentMessageColumnProperties struct {
14843	// Header: Required. Column heading.
14844	Header string `json:"header,omitempty"`
14845
14846	// HorizontalAlignment: Optional. Defines text alignment for all cells
14847	// in this column.
14848	//
14849	// Possible values:
14850	//   "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading
14851	// edge of the column.
14852	//   "LEADING" - Text is aligned to the leading edge of the column.
14853	//   "CENTER" - Text is centered in the column.
14854	//   "TRAILING" - Text is aligned to the trailing edge of the column.
14855	HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
14856
14857	// ForceSendFields is a list of field names (e.g. "Header") to
14858	// unconditionally include in API requests. By default, fields with
14859	// empty values are omitted from API requests. However, any non-pointer,
14860	// non-interface field appearing in ForceSendFields will be sent to the
14861	// server regardless of whether the field is empty or not. This may be
14862	// used to include empty fields in Patch requests.
14863	ForceSendFields []string `json:"-"`
14864
14865	// NullFields is a list of field names (e.g. "Header") to include in API
14866	// requests with the JSON null value. By default, fields with empty
14867	// values are omitted from API requests. However, any field with an
14868	// empty value appearing in NullFields will be sent to the server as
14869	// null. It is an error if a field in this list has a non-empty value.
14870	// This may be used to include null fields in Patch requests.
14871	NullFields []string `json:"-"`
14872}
14873
14874func (s *GoogleCloudDialogflowV2beta1IntentMessageColumnProperties) MarshalJSON() ([]byte, error) {
14875	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageColumnProperties
14876	raw := NoMethod(*s)
14877	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14878}
14879
14880// GoogleCloudDialogflowV2beta1IntentMessageImage: The image response
14881// message.
14882type GoogleCloudDialogflowV2beta1IntentMessageImage struct {
14883	// AccessibilityText: A text description of the image to be used for
14884	// accessibility, e.g., screen readers. Required if image_uri is set for
14885	// CarouselSelect.
14886	AccessibilityText string `json:"accessibilityText,omitempty"`
14887
14888	// ImageUri: Optional. The public URI to an image file.
14889	ImageUri string `json:"imageUri,omitempty"`
14890
14891	// ForceSendFields is a list of field names (e.g. "AccessibilityText")
14892	// to unconditionally include in API requests. By default, fields with
14893	// empty values are omitted from API requests. However, any non-pointer,
14894	// non-interface field appearing in ForceSendFields will be sent to the
14895	// server regardless of whether the field is empty or not. This may be
14896	// used to include empty fields in Patch requests.
14897	ForceSendFields []string `json:"-"`
14898
14899	// NullFields is a list of field names (e.g. "AccessibilityText") to
14900	// include in API requests with the JSON null value. By default, fields
14901	// with empty values are omitted from API requests. However, any field
14902	// with an empty value appearing in NullFields will be sent to the
14903	// server as null. It is an error if a field in this list has a
14904	// non-empty value. This may be used to include null fields in Patch
14905	// requests.
14906	NullFields []string `json:"-"`
14907}
14908
14909func (s *GoogleCloudDialogflowV2beta1IntentMessageImage) MarshalJSON() ([]byte, error) {
14910	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageImage
14911	raw := NoMethod(*s)
14912	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14913}
14914
14915// GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion: The
14916// suggestion chip message that allows the user to jump out to the app
14917// or website associated with this agent.
14918type GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion struct {
14919	// DestinationName: Required. The name of the app or site this chip is
14920	// linking to.
14921	DestinationName string `json:"destinationName,omitempty"`
14922
14923	// Uri: Required. The URI of the app or site to open when the user taps
14924	// the suggestion chip.
14925	Uri string `json:"uri,omitempty"`
14926
14927	// ForceSendFields is a list of field names (e.g. "DestinationName") to
14928	// unconditionally include in API requests. By default, fields with
14929	// empty values are omitted from API requests. However, any non-pointer,
14930	// non-interface field appearing in ForceSendFields will be sent to the
14931	// server regardless of whether the field is empty or not. This may be
14932	// used to include empty fields in Patch requests.
14933	ForceSendFields []string `json:"-"`
14934
14935	// NullFields is a list of field names (e.g. "DestinationName") to
14936	// include in API requests with the JSON null value. By default, fields
14937	// with empty values are omitted from API requests. However, any field
14938	// with an empty value appearing in NullFields will be sent to the
14939	// server as null. It is an error if a field in this list has a
14940	// non-empty value. This may be used to include null fields in Patch
14941	// requests.
14942	NullFields []string `json:"-"`
14943}
14944
14945func (s *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) {
14946	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
14947	raw := NoMethod(*s)
14948	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14949}
14950
14951// GoogleCloudDialogflowV2beta1IntentMessageListSelect: The card for
14952// presenting a list of options to select from.
14953type GoogleCloudDialogflowV2beta1IntentMessageListSelect struct {
14954	// Items: Required. List items.
14955	Items []*GoogleCloudDialogflowV2beta1IntentMessageListSelectItem `json:"items,omitempty"`
14956
14957	// Subtitle: Optional. Subtitle of the list.
14958	Subtitle string `json:"subtitle,omitempty"`
14959
14960	// Title: Optional. The overall title of the list.
14961	Title string `json:"title,omitempty"`
14962
14963	// ForceSendFields is a list of field names (e.g. "Items") to
14964	// unconditionally include in API requests. By default, fields with
14965	// empty values are omitted from API requests. However, any non-pointer,
14966	// non-interface field appearing in ForceSendFields will be sent to the
14967	// server regardless of whether the field is empty or not. This may be
14968	// used to include empty fields in Patch requests.
14969	ForceSendFields []string `json:"-"`
14970
14971	// NullFields is a list of field names (e.g. "Items") to include in API
14972	// requests with the JSON null value. By default, fields with empty
14973	// values are omitted from API requests. However, any field with an
14974	// empty value appearing in NullFields will be sent to the server as
14975	// null. It is an error if a field in this list has a non-empty value.
14976	// This may be used to include null fields in Patch requests.
14977	NullFields []string `json:"-"`
14978}
14979
14980func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelect) MarshalJSON() ([]byte, error) {
14981	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelect
14982	raw := NoMethod(*s)
14983	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14984}
14985
14986// GoogleCloudDialogflowV2beta1IntentMessageListSelectItem: An item in
14987// the list.
14988type GoogleCloudDialogflowV2beta1IntentMessageListSelectItem struct {
14989	// Description: Optional. The main text describing the item.
14990	Description string `json:"description,omitempty"`
14991
14992	// Image: Optional. The image to display.
14993	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
14994
14995	// Info: Required. Additional information about this option.
14996	Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"`
14997
14998	// Title: Required. The title of the list item.
14999	Title string `json:"title,omitempty"`
15000
15001	// ForceSendFields is a list of field names (e.g. "Description") to
15002	// unconditionally include in API requests. By default, fields with
15003	// empty values are omitted from API requests. However, any non-pointer,
15004	// non-interface field appearing in ForceSendFields will be sent to the
15005	// server regardless of whether the field is empty or not. This may be
15006	// used to include empty fields in Patch requests.
15007	ForceSendFields []string `json:"-"`
15008
15009	// NullFields is a list of field names (e.g. "Description") to include
15010	// in API requests with the JSON null value. By default, fields with
15011	// empty values are omitted from API requests. However, any field with
15012	// an empty value appearing in NullFields will be sent to the server as
15013	// null. It is an error if a field in this list has a non-empty value.
15014	// This may be used to include null fields in Patch requests.
15015	NullFields []string `json:"-"`
15016}
15017
15018func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelectItem) MarshalJSON() ([]byte, error) {
15019	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
15020	raw := NoMethod(*s)
15021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15022}
15023
15024// GoogleCloudDialogflowV2beta1IntentMessageMediaContent: The media
15025// content card for Actions on Google.
15026type GoogleCloudDialogflowV2beta1IntentMessageMediaContent struct {
15027	// MediaObjects: Required. List of media objects.
15028	MediaObjects []*GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"`
15029
15030	// MediaType: Optional. What type of media is the content (ie "audio").
15031	//
15032	// Possible values:
15033	//   "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified.
15034	//   "AUDIO" - Response media type is audio.
15035	MediaType string `json:"mediaType,omitempty"`
15036
15037	// ForceSendFields is a list of field names (e.g. "MediaObjects") to
15038	// unconditionally include in API requests. By default, fields with
15039	// empty values are omitted from API requests. However, any non-pointer,
15040	// non-interface field appearing in ForceSendFields will be sent to the
15041	// server regardless of whether the field is empty or not. This may be
15042	// used to include empty fields in Patch requests.
15043	ForceSendFields []string `json:"-"`
15044
15045	// NullFields is a list of field names (e.g. "MediaObjects") to include
15046	// in API requests with the JSON null value. By default, fields with
15047	// empty values are omitted from API requests. However, any field with
15048	// an empty value appearing in NullFields will be sent to the server as
15049	// null. It is an error if a field in this list has a non-empty value.
15050	// This may be used to include null fields in Patch requests.
15051	NullFields []string `json:"-"`
15052}
15053
15054func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContent) MarshalJSON() ([]byte, error) {
15055	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContent
15056	raw := NoMethod(*s)
15057	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15058}
15059
15060// GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObje
15061// ct: Response media object for media content card.
15062type GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject struct {
15063	// ContentUrl: Required. Url where the media is stored.
15064	ContentUrl string `json:"contentUrl,omitempty"`
15065
15066	// Description: Optional. Description of media card.
15067	Description string `json:"description,omitempty"`
15068
15069	// Icon: Optional. Icon to display above media content.
15070	Icon *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"icon,omitempty"`
15071
15072	// LargeImage: Optional. Image to display above media content.
15073	LargeImage *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"largeImage,omitempty"`
15074
15075	// Name: Required. Name of media card.
15076	Name string `json:"name,omitempty"`
15077
15078	// ForceSendFields is a list of field names (e.g. "ContentUrl") to
15079	// unconditionally include in API requests. By default, fields with
15080	// empty values are omitted from API requests. However, any non-pointer,
15081	// non-interface field appearing in ForceSendFields will be sent to the
15082	// server regardless of whether the field is empty or not. This may be
15083	// used to include empty fields in Patch requests.
15084	ForceSendFields []string `json:"-"`
15085
15086	// NullFields is a list of field names (e.g. "ContentUrl") to include in
15087	// API requests with the JSON null value. By default, fields with empty
15088	// values are omitted from API requests. However, any field with an
15089	// empty value appearing in NullFields will be sent to the server as
15090	// null. It is an error if a field in this list has a non-empty value.
15091	// This may be used to include null fields in Patch requests.
15092	NullFields []string `json:"-"`
15093}
15094
15095func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) {
15096	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject
15097	raw := NoMethod(*s)
15098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15099}
15100
15101// GoogleCloudDialogflowV2beta1IntentMessageQuickReplies: The quick
15102// replies response message.
15103type GoogleCloudDialogflowV2beta1IntentMessageQuickReplies struct {
15104	// QuickReplies: Optional. The collection of quick replies.
15105	QuickReplies []string `json:"quickReplies,omitempty"`
15106
15107	// Title: Optional. The title of the collection of quick replies.
15108	Title string `json:"title,omitempty"`
15109
15110	// ForceSendFields is a list of field names (e.g. "QuickReplies") to
15111	// unconditionally include in API requests. By default, fields with
15112	// empty values are omitted from API requests. However, any non-pointer,
15113	// non-interface field appearing in ForceSendFields will be sent to the
15114	// server regardless of whether the field is empty or not. This may be
15115	// used to include empty fields in Patch requests.
15116	ForceSendFields []string `json:"-"`
15117
15118	// NullFields is a list of field names (e.g. "QuickReplies") to include
15119	// in API requests with the JSON null value. By default, fields with
15120	// empty values are omitted from API requests. However, any field with
15121	// an empty value appearing in NullFields will be sent to the server as
15122	// null. It is an error if a field in this list has a non-empty value.
15123	// This may be used to include null fields in Patch requests.
15124	NullFields []string `json:"-"`
15125}
15126
15127func (s *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies) MarshalJSON() ([]byte, error) {
15128	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
15129	raw := NoMethod(*s)
15130	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15131}
15132
15133// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent: Rich
15134// Business Messaging (RBM) Card content
15135type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent struct {
15136	// Description: Optional. Description of the card (at most 2000 bytes).
15137	// At least one of the title, description or media must be set.
15138	Description string `json:"description,omitempty"`
15139
15140	// Media: Optional. However at least one of the title, description or
15141	// media must be set. Media (image, GIF or a video) to include in the
15142	// card.
15143	Media *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia `json:"media,omitempty"`
15144
15145	// Suggestions: Optional. List of suggestions to include in the card.
15146	Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"suggestions,omitempty"`
15147
15148	// Title: Optional. Title of the card (at most 200 bytes). At least one
15149	// of the title, description or media must be set.
15150	Title string `json:"title,omitempty"`
15151
15152	// ForceSendFields is a list of field names (e.g. "Description") to
15153	// unconditionally include in API requests. By default, fields with
15154	// empty values are omitted from API requests. However, any non-pointer,
15155	// non-interface field appearing in ForceSendFields will be sent to the
15156	// server regardless of whether the field is empty or not. This may be
15157	// used to include empty fields in Patch requests.
15158	ForceSendFields []string `json:"-"`
15159
15160	// NullFields is a list of field names (e.g. "Description") to include
15161	// in API requests with the JSON null value. By default, fields with
15162	// empty values are omitted from API requests. However, any field with
15163	// an empty value appearing in NullFields will be sent to the server as
15164	// null. It is an error if a field in this list has a non-empty value.
15165	// This may be used to include null fields in Patch requests.
15166	NullFields []string `json:"-"`
15167}
15168
15169func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent) MarshalJSON() ([]byte, error) {
15170	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
15171	raw := NoMethod(*s)
15172	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15173}
15174
15175// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia: Rich
15176// Business Messaging (RBM) Media displayed in Cards The following
15177// media-types are currently supported: Image Types * image/jpeg *
15178// image/jpg' * image/gif * image/png Video Types * video/h263 *
15179// video/m4v * video/mp4 * video/mpeg * video/mpeg4 * video/webm
15180type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia struct {
15181	// FileUri: Required. Publicly reachable URI of the file. The RBM
15182	// platform determines the MIME type of the file from the content-type
15183	// field in the HTTP headers when the platform fetches the file. The
15184	// content-type field must be present and accurate in the HTTP response
15185	// from the URL.
15186	FileUri string `json:"fileUri,omitempty"`
15187
15188	// Height: Required for cards with vertical orientation. The height of
15189	// the media within a rich card with a vertical layout. For a standalone
15190	// card with horizontal layout, height is not customizable, and this
15191	// field is ignored.
15192	//
15193	// Possible values:
15194	//   "HEIGHT_UNSPECIFIED" - Not specified.
15195	//   "SHORT" - 112 DP.
15196	//   "MEDIUM" - 168 DP.
15197	//   "TALL" - 264 DP. Not available for rich card carousels when the
15198	// card width is set to small.
15199	Height string `json:"height,omitempty"`
15200
15201	// ThumbnailUri: Optional. Publicly reachable URI of the thumbnail.If
15202	// you don't provide a thumbnail URI, the RBM platform displays a blank
15203	// placeholder thumbnail until the user's device downloads the file.
15204	// Depending on the user's setting, the file may not download
15205	// automatically and may require the user to tap a download button.
15206	ThumbnailUri string `json:"thumbnailUri,omitempty"`
15207
15208	// ForceSendFields is a list of field names (e.g. "FileUri") to
15209	// unconditionally include in API requests. By default, fields with
15210	// empty values are omitted from API requests. However, any non-pointer,
15211	// non-interface field appearing in ForceSendFields will be sent to the
15212	// server regardless of whether the field is empty or not. This may be
15213	// used to include empty fields in Patch requests.
15214	ForceSendFields []string `json:"-"`
15215
15216	// NullFields is a list of field names (e.g. "FileUri") to include in
15217	// API requests with the JSON null value. By default, fields with empty
15218	// values are omitted from API requests. However, any field with an
15219	// empty value appearing in NullFields will be sent to the server as
15220	// null. It is an error if a field in this list has a non-empty value.
15221	// This may be used to include null fields in Patch requests.
15222	NullFields []string `json:"-"`
15223}
15224
15225func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia) MarshalJSON() ([]byte, error) {
15226	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
15227	raw := NoMethod(*s)
15228	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15229}
15230
15231// GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard: Carousel
15232// Rich Business Messaging (RBM) rich card. Rich cards allow you to
15233// respond to users with more vivid content, e.g. with media and
15234// suggestions. If you want to show a single card with more control over
15235// the layout, please use RbmStandaloneCard instead.
15236type GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard struct {
15237	// CardContents: Required. The cards in the carousel. A carousel must
15238	// have at least 2 cards and at most 10.
15239	CardContents []*GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContents,omitempty"`
15240
15241	// CardWidth: Required. The width of the cards in the carousel.
15242	//
15243	// Possible values:
15244	//   "CARD_WIDTH_UNSPECIFIED" - Not specified.
15245	//   "SMALL" - 120 DP. Note that tall media cannot be used.
15246	//   "MEDIUM" - 232 DP.
15247	CardWidth string `json:"cardWidth,omitempty"`
15248
15249	// ForceSendFields is a list of field names (e.g. "CardContents") to
15250	// unconditionally include in API requests. By default, fields with
15251	// empty values are omitted from API requests. However, any non-pointer,
15252	// non-interface field appearing in ForceSendFields will be sent to the
15253	// server regardless of whether the field is empty or not. This may be
15254	// used to include empty fields in Patch requests.
15255	ForceSendFields []string `json:"-"`
15256
15257	// NullFields is a list of field names (e.g. "CardContents") to include
15258	// in API requests with the JSON null value. By default, fields with
15259	// empty values are omitted from API requests. However, any field with
15260	// an empty value appearing in NullFields will be sent to the server as
15261	// null. It is an error if a field in this list has a non-empty value.
15262	// This may be used to include null fields in Patch requests.
15263	NullFields []string `json:"-"`
15264}
15265
15266func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard) MarshalJSON() ([]byte, error) {
15267	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
15268	raw := NoMethod(*s)
15269	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15270}
15271
15272// GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard:
15273// Standalone Rich Business Messaging (RBM) rich card. Rich cards allow
15274// you to respond to users with more vivid content, e.g. with media and
15275// suggestions. You can group multiple rich cards into one using
15276// RbmCarouselCard but carousel cards will give you less control over
15277// the card layout.
15278type GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard struct {
15279	// CardContent: Required. Card content.
15280	CardContent *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContent,omitempty"`
15281
15282	// CardOrientation: Required. Orientation of the card.
15283	//
15284	// Possible values:
15285	//   "CARD_ORIENTATION_UNSPECIFIED" - Not specified.
15286	//   "HORIZONTAL" - Horizontal layout.
15287	//   "VERTICAL" - Vertical layout.
15288	CardOrientation string `json:"cardOrientation,omitempty"`
15289
15290	// ThumbnailImageAlignment: Required if orientation is horizontal. Image
15291	// preview alignment for standalone cards with horizontal layout.
15292	//
15293	// Possible values:
15294	//   "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED" - Not specified.
15295	//   "LEFT" - Thumbnail preview is left-aligned.
15296	//   "RIGHT" - Thumbnail preview is right-aligned.
15297	ThumbnailImageAlignment string `json:"thumbnailImageAlignment,omitempty"`
15298
15299	// ForceSendFields is a list of field names (e.g. "CardContent") to
15300	// unconditionally include in API requests. By default, fields with
15301	// empty values are omitted from API requests. However, any non-pointer,
15302	// non-interface field appearing in ForceSendFields will be sent to the
15303	// server regardless of whether the field is empty or not. This may be
15304	// used to include empty fields in Patch requests.
15305	ForceSendFields []string `json:"-"`
15306
15307	// NullFields is a list of field names (e.g. "CardContent") to include
15308	// in API requests with the JSON null value. By default, fields with
15309	// empty values are omitted from API requests. However, any field with
15310	// an empty value appearing in NullFields will be sent to the server as
15311	// null. It is an error if a field in this list has a non-empty value.
15312	// This may be used to include null fields in Patch requests.
15313	NullFields []string `json:"-"`
15314}
15315
15316func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard) MarshalJSON() ([]byte, error) {
15317	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
15318	raw := NoMethod(*s)
15319	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15320}
15321
15322// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction: Rich
15323// Business Messaging (RBM) suggested client-side action that the user
15324// can choose from the card.
15325type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction struct {
15326	// Dial: Suggested client side action: Dial a phone number
15327	Dial *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial `json:"dial,omitempty"`
15328
15329	// OpenUrl: Suggested client side action: Open a URI on device
15330	OpenUrl *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri `json:"openUrl,omitempty"`
15331
15332	// PostbackData: Opaque payload that the Dialogflow receives in a user
15333	// event when the user taps the suggested action. This data will be also
15334	// forwarded to webhook to allow performing custom business logic.
15335	PostbackData string `json:"postbackData,omitempty"`
15336
15337	// ShareLocation: Suggested client side action: Share user location
15338	ShareLocation *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation `json:"shareLocation,omitempty"`
15339
15340	// Text: Text to display alongside the action.
15341	Text string `json:"text,omitempty"`
15342
15343	// ForceSendFields is a list of field names (e.g. "Dial") to
15344	// unconditionally include in API requests. By default, fields with
15345	// empty values are omitted from API requests. However, any non-pointer,
15346	// non-interface field appearing in ForceSendFields will be sent to the
15347	// server regardless of whether the field is empty or not. This may be
15348	// used to include empty fields in Patch requests.
15349	ForceSendFields []string `json:"-"`
15350
15351	// NullFields is a list of field names (e.g. "Dial") to include in API
15352	// requests with the JSON null value. By default, fields with empty
15353	// values are omitted from API requests. However, any field with an
15354	// empty value appearing in NullFields will be sent to the server as
15355	// null. It is an error if a field in this list has a non-empty value.
15356	// This may be used to include null fields in Patch requests.
15357	NullFields []string `json:"-"`
15358}
15359
15360func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction) MarshalJSON() ([]byte, error) {
15361	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
15362	raw := NoMethod(*s)
15363	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15364}
15365
15366// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste
15367// dActionDial: Opens the user's default dialer app with the specified
15368// phone number but does not dial automatically.
15369type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial struct {
15370	// PhoneNumber: Required. The phone number to fill in the default dialer
15371	// app. This field should be in E.164
15372	// (https://en.wikipedia.org/wiki/E.164) format. An example of a
15373	// correctly formatted phone number: +15556767888.
15374	PhoneNumber string `json:"phoneNumber,omitempty"`
15375
15376	// ForceSendFields is a list of field names (e.g. "PhoneNumber") to
15377	// unconditionally include in API requests. By default, fields with
15378	// empty values are omitted from API requests. However, any non-pointer,
15379	// non-interface field appearing in ForceSendFields will be sent to the
15380	// server regardless of whether the field is empty or not. This may be
15381	// used to include empty fields in Patch requests.
15382	ForceSendFields []string `json:"-"`
15383
15384	// NullFields is a list of field names (e.g. "PhoneNumber") to include
15385	// in API requests with the JSON null value. By default, fields with
15386	// empty values are omitted from API requests. However, any field with
15387	// an empty value appearing in NullFields will be sent to the server as
15388	// null. It is an error if a field in this list has a non-empty value.
15389	// This may be used to include null fields in Patch requests.
15390	NullFields []string `json:"-"`
15391}
15392
15393func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial) MarshalJSON() ([]byte, error) {
15394	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
15395	raw := NoMethod(*s)
15396	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15397}
15398
15399// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste
15400// dActionOpenUri: Opens the user's default web browser app to the
15401// specified uri If the user has an app installed that is registered as
15402// the default handler for the URL, then this app will be opened
15403// instead, and its icon will be used in the suggested action UI.
15404type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri struct {
15405	// Uri: Required. The uri to open on the user device
15406	Uri string `json:"uri,omitempty"`
15407
15408	// ForceSendFields is a list of field names (e.g. "Uri") to
15409	// unconditionally include in API requests. By default, fields with
15410	// empty values are omitted from API requests. However, any non-pointer,
15411	// non-interface field appearing in ForceSendFields will be sent to the
15412	// server regardless of whether the field is empty or not. This may be
15413	// used to include empty fields in Patch requests.
15414	ForceSendFields []string `json:"-"`
15415
15416	// NullFields is a list of field names (e.g. "Uri") to include in API
15417	// requests with the JSON null value. By default, fields with empty
15418	// values are omitted from API requests. However, any field with an
15419	// empty value appearing in NullFields will be sent to the server as
15420	// null. It is an error if a field in this list has a non-empty value.
15421	// This may be used to include null fields in Patch requests.
15422	NullFields []string `json:"-"`
15423}
15424
15425func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri) MarshalJSON() ([]byte, error) {
15426	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
15427	raw := NoMethod(*s)
15428	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15429}
15430
15431// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste
15432// dActionShareLocation: Opens the device's location chooser so the user
15433// can pick a location to send back to the agent.
15434type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation struct {
15435}
15436
15437// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply: Rich
15438// Business Messaging (RBM) suggested reply that the user can click
15439// instead of typing in their own response.
15440type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply struct {
15441	// PostbackData: Opaque payload that the Dialogflow receives in a user
15442	// event when the user taps the suggested reply. This data will be also
15443	// forwarded to webhook to allow performing custom business logic.
15444	PostbackData string `json:"postbackData,omitempty"`
15445
15446	// Text: Suggested reply text.
15447	Text string `json:"text,omitempty"`
15448
15449	// ForceSendFields is a list of field names (e.g. "PostbackData") to
15450	// unconditionally include in API requests. By default, fields with
15451	// empty values are omitted from API requests. However, any non-pointer,
15452	// non-interface field appearing in ForceSendFields will be sent to the
15453	// server regardless of whether the field is empty or not. This may be
15454	// used to include empty fields in Patch requests.
15455	ForceSendFields []string `json:"-"`
15456
15457	// NullFields is a list of field names (e.g. "PostbackData") to include
15458	// in API requests with the JSON null value. By default, fields with
15459	// empty values are omitted from API requests. However, any field with
15460	// an empty value appearing in NullFields will be sent to the server as
15461	// null. It is an error if a field in this list has a non-empty value.
15462	// This may be used to include null fields in Patch requests.
15463	NullFields []string `json:"-"`
15464}
15465
15466func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply) MarshalJSON() ([]byte, error) {
15467	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
15468	raw := NoMethod(*s)
15469	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15470}
15471
15472// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion: Rich Business
15473// Messaging (RBM) suggestion. Suggestions allow user to easily
15474// select/click a predefined response or perform an action (like opening
15475// a web uri).
15476type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion struct {
15477	// Action: Predefined client side actions that user can choose
15478	Action *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction `json:"action,omitempty"`
15479
15480	// Reply: Predefined replies for user to select instead of typing
15481	Reply *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply `json:"reply,omitempty"`
15482
15483	// ForceSendFields is a list of field names (e.g. "Action") to
15484	// unconditionally include in API requests. By default, fields with
15485	// empty values are omitted from API requests. However, any non-pointer,
15486	// non-interface field appearing in ForceSendFields will be sent to the
15487	// server regardless of whether the field is empty or not. This may be
15488	// used to include empty fields in Patch requests.
15489	ForceSendFields []string `json:"-"`
15490
15491	// NullFields is a list of field names (e.g. "Action") to include in API
15492	// requests with the JSON null value. By default, fields with empty
15493	// values are omitted from API requests. However, any field with an
15494	// empty value appearing in NullFields will be sent to the server as
15495	// null. It is an error if a field in this list has a non-empty value.
15496	// This may be used to include null fields in Patch requests.
15497	NullFields []string `json:"-"`
15498}
15499
15500func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion) MarshalJSON() ([]byte, error) {
15501	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion
15502	raw := NoMethod(*s)
15503	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15504}
15505
15506// GoogleCloudDialogflowV2beta1IntentMessageRbmText: Rich Business
15507// Messaging (RBM) text response with suggestions.
15508type GoogleCloudDialogflowV2beta1IntentMessageRbmText struct {
15509	// RbmSuggestion: Optional. One or more suggestions to show to the user.
15510	RbmSuggestion []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"rbmSuggestion,omitempty"`
15511
15512	// Text: Required. Text sent and displayed to the user.
15513	Text string `json:"text,omitempty"`
15514
15515	// ForceSendFields is a list of field names (e.g. "RbmSuggestion") to
15516	// unconditionally include in API requests. By default, fields with
15517	// empty values are omitted from API requests. However, any non-pointer,
15518	// non-interface field appearing in ForceSendFields will be sent to the
15519	// server regardless of whether the field is empty or not. This may be
15520	// used to include empty fields in Patch requests.
15521	ForceSendFields []string `json:"-"`
15522
15523	// NullFields is a list of field names (e.g. "RbmSuggestion") to include
15524	// in API requests with the JSON null value. By default, fields with
15525	// empty values are omitted from API requests. However, any field with
15526	// an empty value appearing in NullFields will be sent to the server as
15527	// null. It is an error if a field in this list has a non-empty value.
15528	// This may be used to include null fields in Patch requests.
15529	NullFields []string `json:"-"`
15530}
15531
15532func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmText) MarshalJSON() ([]byte, error) {
15533	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmText
15534	raw := NoMethod(*s)
15535	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15536}
15537
15538// GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo: Additional
15539// info about the select item for when it is triggered in a dialog.
15540type GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo struct {
15541	// Key: Required. A unique key that will be sent back to the agent if
15542	// this response is given.
15543	Key string `json:"key,omitempty"`
15544
15545	// Synonyms: Optional. A list of synonyms that can also be used to
15546	// trigger this item in dialog.
15547	Synonyms []string `json:"synonyms,omitempty"`
15548
15549	// ForceSendFields is a list of field names (e.g. "Key") to
15550	// unconditionally include in API requests. By default, fields with
15551	// empty values are omitted from API requests. However, any non-pointer,
15552	// non-interface field appearing in ForceSendFields will be sent to the
15553	// server regardless of whether the field is empty or not. This may be
15554	// used to include empty fields in Patch requests.
15555	ForceSendFields []string `json:"-"`
15556
15557	// NullFields is a list of field names (e.g. "Key") to include in API
15558	// requests with the JSON null value. By default, fields with empty
15559	// values are omitted from API requests. However, any field with an
15560	// empty value appearing in NullFields will be sent to the server as
15561	// null. It is an error if a field in this list has a non-empty value.
15562	// This may be used to include null fields in Patch requests.
15563	NullFields []string `json:"-"`
15564}
15565
15566func (s *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) {
15567	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
15568	raw := NoMethod(*s)
15569	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15570}
15571
15572// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse: The simple
15573// response message containing speech or text.
15574type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse struct {
15575	// DisplayText: Optional. The text to display.
15576	DisplayText string `json:"displayText,omitempty"`
15577
15578	// Ssml: One of text_to_speech or ssml must be provided. Structured
15579	// spoken response to the user in the SSML format. Mutually exclusive
15580	// with text_to_speech.
15581	Ssml string `json:"ssml,omitempty"`
15582
15583	// TextToSpeech: One of text_to_speech or ssml must be provided. The
15584	// plain text of the speech output. Mutually exclusive with ssml.
15585	TextToSpeech string `json:"textToSpeech,omitempty"`
15586
15587	// ForceSendFields is a list of field names (e.g. "DisplayText") to
15588	// unconditionally include in API requests. By default, fields with
15589	// empty values are omitted from API requests. However, any non-pointer,
15590	// non-interface field appearing in ForceSendFields will be sent to the
15591	// server regardless of whether the field is empty or not. This may be
15592	// used to include empty fields in Patch requests.
15593	ForceSendFields []string `json:"-"`
15594
15595	// NullFields is a list of field names (e.g. "DisplayText") to include
15596	// in API requests with the JSON null value. By default, fields with
15597	// empty values are omitted from API requests. However, any field with
15598	// an empty value appearing in NullFields will be sent to the server as
15599	// null. It is an error if a field in this list has a non-empty value.
15600	// This may be used to include null fields in Patch requests.
15601	NullFields []string `json:"-"`
15602}
15603
15604func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) {
15605	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
15606	raw := NoMethod(*s)
15607	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15608}
15609
15610// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses: The
15611// collection of simple response candidates. This message in
15612// `QueryResult.fulfillment_messages` and
15613// `WebhookResponse.fulfillment_messages` should contain only one
15614// `SimpleResponse`.
15615type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses struct {
15616	// SimpleResponses: Required. The list of simple responses.
15617	SimpleResponses []*GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse `json:"simpleResponses,omitempty"`
15618
15619	// ForceSendFields is a list of field names (e.g. "SimpleResponses") to
15620	// unconditionally include in API requests. By default, fields with
15621	// empty values are omitted from API requests. However, any non-pointer,
15622	// non-interface field appearing in ForceSendFields will be sent to the
15623	// server regardless of whether the field is empty or not. This may be
15624	// used to include empty fields in Patch requests.
15625	ForceSendFields []string `json:"-"`
15626
15627	// NullFields is a list of field names (e.g. "SimpleResponses") to
15628	// include in API requests with the JSON null value. By default, fields
15629	// with empty values are omitted from API requests. However, any field
15630	// with an empty value appearing in NullFields will be sent to the
15631	// server as null. It is an error if a field in this list has a
15632	// non-empty value. This may be used to include null fields in Patch
15633	// requests.
15634	NullFields []string `json:"-"`
15635}
15636
15637func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) {
15638	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
15639	raw := NoMethod(*s)
15640	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15641}
15642
15643// GoogleCloudDialogflowV2beta1IntentMessageSuggestion: The suggestion
15644// chip message that the user can tap to quickly post a reply to the
15645// conversation.
15646type GoogleCloudDialogflowV2beta1IntentMessageSuggestion struct {
15647	// Title: Required. The text shown the in the suggestion chip.
15648	Title string `json:"title,omitempty"`
15649
15650	// ForceSendFields is a list of field names (e.g. "Title") to
15651	// unconditionally include in API requests. By default, fields with
15652	// empty values are omitted from API requests. However, any non-pointer,
15653	// non-interface field appearing in ForceSendFields will be sent to the
15654	// server regardless of whether the field is empty or not. This may be
15655	// used to include empty fields in Patch requests.
15656	ForceSendFields []string `json:"-"`
15657
15658	// NullFields is a list of field names (e.g. "Title") to include in API
15659	// requests with the JSON null value. By default, fields with empty
15660	// values are omitted from API requests. However, any field with an
15661	// empty value appearing in NullFields will be sent to the server as
15662	// null. It is an error if a field in this list has a non-empty value.
15663	// This may be used to include null fields in Patch requests.
15664	NullFields []string `json:"-"`
15665}
15666
15667func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestion) MarshalJSON() ([]byte, error) {
15668	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestion
15669	raw := NoMethod(*s)
15670	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15671}
15672
15673// GoogleCloudDialogflowV2beta1IntentMessageSuggestions: The collection
15674// of suggestions.
15675type GoogleCloudDialogflowV2beta1IntentMessageSuggestions struct {
15676	// Suggestions: Required. The list of suggested replies.
15677	Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageSuggestion `json:"suggestions,omitempty"`
15678
15679	// ForceSendFields is a list of field names (e.g. "Suggestions") to
15680	// unconditionally include in API requests. By default, fields with
15681	// empty values are omitted from API requests. However, any non-pointer,
15682	// non-interface field appearing in ForceSendFields will be sent to the
15683	// server regardless of whether the field is empty or not. This may be
15684	// used to include empty fields in Patch requests.
15685	ForceSendFields []string `json:"-"`
15686
15687	// NullFields is a list of field names (e.g. "Suggestions") to include
15688	// in API requests with the JSON null value. By default, fields with
15689	// empty values are omitted from API requests. However, any field with
15690	// an empty value appearing in NullFields will be sent to the server as
15691	// null. It is an error if a field in this list has a non-empty value.
15692	// This may be used to include null fields in Patch requests.
15693	NullFields []string `json:"-"`
15694}
15695
15696func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestions) MarshalJSON() ([]byte, error) {
15697	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestions
15698	raw := NoMethod(*s)
15699	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15700}
15701
15702// GoogleCloudDialogflowV2beta1IntentMessageTableCard: Table card for
15703// Actions on Google.
15704type GoogleCloudDialogflowV2beta1IntentMessageTableCard struct {
15705	// Buttons: Optional. List of buttons for the card.
15706	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"`
15707
15708	// ColumnProperties: Optional. Display properties for the columns in
15709	// this table.
15710	ColumnProperties []*GoogleCloudDialogflowV2beta1IntentMessageColumnProperties `json:"columnProperties,omitempty"`
15711
15712	// Image: Optional. Image which should be displayed on the card.
15713	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
15714
15715	// Rows: Optional. Rows in this table of data.
15716	Rows []*GoogleCloudDialogflowV2beta1IntentMessageTableCardRow `json:"rows,omitempty"`
15717
15718	// Subtitle: Optional. Subtitle to the title.
15719	Subtitle string `json:"subtitle,omitempty"`
15720
15721	// Title: Required. Title of the card.
15722	Title string `json:"title,omitempty"`
15723
15724	// ForceSendFields is a list of field names (e.g. "Buttons") to
15725	// unconditionally include in API requests. By default, fields with
15726	// empty values are omitted from API requests. However, any non-pointer,
15727	// non-interface field appearing in ForceSendFields will be sent to the
15728	// server regardless of whether the field is empty or not. This may be
15729	// used to include empty fields in Patch requests.
15730	ForceSendFields []string `json:"-"`
15731
15732	// NullFields is a list of field names (e.g. "Buttons") to include in
15733	// API requests with the JSON null value. By default, fields with empty
15734	// values are omitted from API requests. However, any field with an
15735	// empty value appearing in NullFields will be sent to the server as
15736	// null. It is an error if a field in this list has a non-empty value.
15737	// This may be used to include null fields in Patch requests.
15738	NullFields []string `json:"-"`
15739}
15740
15741func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCard) MarshalJSON() ([]byte, error) {
15742	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCard
15743	raw := NoMethod(*s)
15744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15745}
15746
15747// GoogleCloudDialogflowV2beta1IntentMessageTableCardCell: Cell of
15748// TableCardRow.
15749type GoogleCloudDialogflowV2beta1IntentMessageTableCardCell struct {
15750	// Text: Required. Text in this cell.
15751	Text string `json:"text,omitempty"`
15752
15753	// ForceSendFields is a list of field names (e.g. "Text") to
15754	// unconditionally include in API requests. By default, fields with
15755	// empty values are omitted from API requests. However, any non-pointer,
15756	// non-interface field appearing in ForceSendFields will be sent to the
15757	// server regardless of whether the field is empty or not. This may be
15758	// used to include empty fields in Patch requests.
15759	ForceSendFields []string `json:"-"`
15760
15761	// NullFields is a list of field names (e.g. "Text") to include in API
15762	// requests with the JSON null value. By default, fields with empty
15763	// values are omitted from API requests. However, any field with an
15764	// empty value appearing in NullFields will be sent to the server as
15765	// null. It is an error if a field in this list has a non-empty value.
15766	// This may be used to include null fields in Patch requests.
15767	NullFields []string `json:"-"`
15768}
15769
15770func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardCell) MarshalJSON() ([]byte, error) {
15771	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardCell
15772	raw := NoMethod(*s)
15773	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15774}
15775
15776// GoogleCloudDialogflowV2beta1IntentMessageTableCardRow: Row of
15777// TableCard.
15778type GoogleCloudDialogflowV2beta1IntentMessageTableCardRow struct {
15779	// Cells: Optional. List of cells that make up this row.
15780	Cells []*GoogleCloudDialogflowV2beta1IntentMessageTableCardCell `json:"cells,omitempty"`
15781
15782	// DividerAfter: Optional. Whether to add a visual divider after this
15783	// row.
15784	DividerAfter bool `json:"dividerAfter,omitempty"`
15785
15786	// ForceSendFields is a list of field names (e.g. "Cells") to
15787	// unconditionally include in API requests. By default, fields with
15788	// empty values are omitted from API requests. However, any non-pointer,
15789	// non-interface field appearing in ForceSendFields will be sent to the
15790	// server regardless of whether the field is empty or not. This may be
15791	// used to include empty fields in Patch requests.
15792	ForceSendFields []string `json:"-"`
15793
15794	// NullFields is a list of field names (e.g. "Cells") to include in API
15795	// requests with the JSON null value. By default, fields with empty
15796	// values are omitted from API requests. However, any field with an
15797	// empty value appearing in NullFields will be sent to the server as
15798	// null. It is an error if a field in this list has a non-empty value.
15799	// This may be used to include null fields in Patch requests.
15800	NullFields []string `json:"-"`
15801}
15802
15803func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardRow) MarshalJSON() ([]byte, error) {
15804	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardRow
15805	raw := NoMethod(*s)
15806	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15807}
15808
15809// GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio: Plays
15810// audio from a file in Telephony Gateway.
15811type GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio struct {
15812	// AudioUri: Required. URI to a Google Cloud Storage object containing
15813	// the audio to play, e.g., "gs://bucket/object". The object must
15814	// contain a single channel (mono) of linear PCM audio (2 bytes /
15815	// sample) at 8kHz. This object must be readable by the
15816	// `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` service account
15817	// where is the number of the Telephony Gateway project (usually the
15818	// same as the Dialogflow agent project). If the Google Cloud Storage
15819	// bucket is in the Telephony Gateway project, this permission is added
15820	// by default when enabling the Dialogflow V2 API. For audio from other
15821	// sources, consider using the `TelephonySynthesizeSpeech` message with
15822	// SSML.
15823	AudioUri string `json:"audioUri,omitempty"`
15824
15825	// ForceSendFields is a list of field names (e.g. "AudioUri") to
15826	// unconditionally include in API requests. By default, fields with
15827	// empty values are omitted from API requests. However, any non-pointer,
15828	// non-interface field appearing in ForceSendFields will be sent to the
15829	// server regardless of whether the field is empty or not. This may be
15830	// used to include empty fields in Patch requests.
15831	ForceSendFields []string `json:"-"`
15832
15833	// NullFields is a list of field names (e.g. "AudioUri") to include in
15834	// API requests with the JSON null value. By default, fields with empty
15835	// values are omitted from API requests. However, any field with an
15836	// empty value appearing in NullFields will be sent to the server as
15837	// null. It is an error if a field in this list has a non-empty value.
15838	// This may be used to include null fields in Patch requests.
15839	NullFields []string `json:"-"`
15840}
15841
15842func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio) MarshalJSON() ([]byte, error) {
15843	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
15844	raw := NoMethod(*s)
15845	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15846}
15847
15848// GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech:
15849// Synthesizes speech and plays back the synthesized audio to the caller
15850// in Telephony Gateway. Telephony Gateway takes the synthesizer
15851// settings from `DetectIntentResponse.output_audio_config` which can
15852// either be set at request-level or can come from the agent-level
15853// synthesizer config.
15854type GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech struct {
15855	// Ssml: The SSML to be synthesized. For more information, see SSML
15856	// (https://developers.google.com/actions/reference/ssml).
15857	Ssml string `json:"ssml,omitempty"`
15858
15859	// Text: The raw text to be synthesized.
15860	Text string `json:"text,omitempty"`
15861
15862	// ForceSendFields is a list of field names (e.g. "Ssml") to
15863	// unconditionally include in API requests. By default, fields with
15864	// empty values are omitted from API requests. However, any non-pointer,
15865	// non-interface field appearing in ForceSendFields will be sent to the
15866	// server regardless of whether the field is empty or not. This may be
15867	// used to include empty fields in Patch requests.
15868	ForceSendFields []string `json:"-"`
15869
15870	// NullFields is a list of field names (e.g. "Ssml") to include in API
15871	// requests with the JSON null value. By default, fields with empty
15872	// values are omitted from API requests. However, any field with an
15873	// empty value appearing in NullFields will be sent to the server as
15874	// null. It is an error if a field in this list has a non-empty value.
15875	// This may be used to include null fields in Patch requests.
15876	NullFields []string `json:"-"`
15877}
15878
15879func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech) MarshalJSON() ([]byte, error) {
15880	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
15881	raw := NoMethod(*s)
15882	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15883}
15884
15885// GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall:
15886// Transfers the call in Telephony Gateway.
15887type GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall struct {
15888	// PhoneNumber: Required. The phone number to transfer the call to in
15889	// E.164 format (https://en.wikipedia.org/wiki/E.164). We currently only
15890	// allow transferring to US numbers (+1xxxyyyzzzz).
15891	PhoneNumber string `json:"phoneNumber,omitempty"`
15892
15893	// ForceSendFields is a list of field names (e.g. "PhoneNumber") to
15894	// unconditionally include in API requests. By default, fields with
15895	// empty values are omitted from API requests. However, any non-pointer,
15896	// non-interface field appearing in ForceSendFields will be sent to the
15897	// server regardless of whether the field is empty or not. This may be
15898	// used to include empty fields in Patch requests.
15899	ForceSendFields []string `json:"-"`
15900
15901	// NullFields is a list of field names (e.g. "PhoneNumber") to include
15902	// in API requests with the JSON null value. By default, fields with
15903	// empty values are omitted from API requests. However, any field with
15904	// an empty value appearing in NullFields will be sent to the server as
15905	// null. It is an error if a field in this list has a non-empty value.
15906	// This may be used to include null fields in Patch requests.
15907	NullFields []string `json:"-"`
15908}
15909
15910func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall) MarshalJSON() ([]byte, error) {
15911	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
15912	raw := NoMethod(*s)
15913	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15914}
15915
15916// GoogleCloudDialogflowV2beta1IntentMessageText: The text response
15917// message.
15918type GoogleCloudDialogflowV2beta1IntentMessageText struct {
15919	// Text: Optional. The collection of the agent's responses.
15920	Text []string `json:"text,omitempty"`
15921
15922	// ForceSendFields is a list of field names (e.g. "Text") to
15923	// unconditionally include in API requests. By default, fields with
15924	// empty values are omitted from API requests. However, any non-pointer,
15925	// non-interface field appearing in ForceSendFields will be sent to the
15926	// server regardless of whether the field is empty or not. This may be
15927	// used to include empty fields in Patch requests.
15928	ForceSendFields []string `json:"-"`
15929
15930	// NullFields is a list of field names (e.g. "Text") to include in API
15931	// requests with the JSON null value. By default, fields with empty
15932	// values are omitted from API requests. However, any field with an
15933	// empty value appearing in NullFields will be sent to the server as
15934	// null. It is an error if a field in this list has a non-empty value.
15935	// This may be used to include null fields in Patch requests.
15936	NullFields []string `json:"-"`
15937}
15938
15939func (s *GoogleCloudDialogflowV2beta1IntentMessageText) MarshalJSON() ([]byte, error) {
15940	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageText
15941	raw := NoMethod(*s)
15942	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15943}
15944
15945// GoogleCloudDialogflowV2beta1IntentParameter: Represents intent
15946// parameters.
15947type GoogleCloudDialogflowV2beta1IntentParameter struct {
15948	// DefaultValue: Optional. The default value to use when the `value`
15949	// yields an empty result. Default values can be extracted from contexts
15950	// by using the following syntax: `#context_name.parameter_name`.
15951	DefaultValue string `json:"defaultValue,omitempty"`
15952
15953	// DisplayName: Required. The name of the parameter.
15954	DisplayName string `json:"displayName,omitempty"`
15955
15956	// EntityTypeDisplayName: Optional. The name of the entity type,
15957	// prefixed with `@`, that describes values of the parameter. If the
15958	// parameter is required, this must be provided.
15959	EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"`
15960
15961	// IsList: Optional. Indicates whether the parameter represents a list
15962	// of values.
15963	IsList bool `json:"isList,omitempty"`
15964
15965	// Mandatory: Optional. Indicates whether the parameter is required.
15966	// That is, whether the intent cannot be completed without collecting
15967	// the parameter value.
15968	Mandatory bool `json:"mandatory,omitempty"`
15969
15970	// Name: The unique identifier of this parameter.
15971	Name string `json:"name,omitempty"`
15972
15973	// Prompts: Optional. The collection of prompts that the agent can
15974	// present to the user in order to collect a value for the parameter.
15975	Prompts []string `json:"prompts,omitempty"`
15976
15977	// Value: Optional. The definition of the parameter value. It can be: -
15978	// a constant string, - a parameter value defined as `$parameter_name`,
15979	// - an original parameter value defined as `$parameter_name.original`,
15980	// - a parameter value from some context defined as
15981	// `#context_name.parameter_name`.
15982	Value string `json:"value,omitempty"`
15983
15984	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
15985	// unconditionally include in API requests. By default, fields with
15986	// empty values are omitted from API requests. However, any non-pointer,
15987	// non-interface field appearing in ForceSendFields will be sent to the
15988	// server regardless of whether the field is empty or not. This may be
15989	// used to include empty fields in Patch requests.
15990	ForceSendFields []string `json:"-"`
15991
15992	// NullFields is a list of field names (e.g. "DefaultValue") to include
15993	// in API requests with the JSON null value. By default, fields with
15994	// empty values are omitted from API requests. However, any field with
15995	// an empty value appearing in NullFields will be sent to the server as
15996	// null. It is an error if a field in this list has a non-empty value.
15997	// This may be used to include null fields in Patch requests.
15998	NullFields []string `json:"-"`
15999}
16000
16001func (s *GoogleCloudDialogflowV2beta1IntentParameter) MarshalJSON() ([]byte, error) {
16002	type NoMethod GoogleCloudDialogflowV2beta1IntentParameter
16003	raw := NoMethod(*s)
16004	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16005}
16006
16007// GoogleCloudDialogflowV2beta1IntentTrainingPhrase: Represents an
16008// example that the agent is trained on.
16009type GoogleCloudDialogflowV2beta1IntentTrainingPhrase struct {
16010	// Name: Output only. The unique identifier of this training phrase.
16011	Name string `json:"name,omitempty"`
16012
16013	// Parts: Required. The ordered list of training phrase parts. The parts
16014	// are concatenated in order to form the training phrase. Note: The API
16015	// does not automatically annotate training phrases like the Dialogflow
16016	// Console does. Note: Do not forget to include whitespace at part
16017	// boundaries, so the training phrase is well formatted when the parts
16018	// are concatenated. If the training phrase does not need to be
16019	// annotated with parameters, you just need a single part with only the
16020	// Part.text field set. If you want to annotate the training phrase, you
16021	// must create multiple parts, where the fields of each part are
16022	// populated in one of two ways: - `Part.text` is set to a part of the
16023	// phrase that has no parameters. - `Part.text` is set to a part of the
16024	// phrase that you want to annotate, and the `entity_type`, `alias`, and
16025	// `user_defined` fields are all set.
16026	Parts []*GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart `json:"parts,omitempty"`
16027
16028	// TimesAddedCount: Optional. Indicates how many times this example was
16029	// added to the intent. Each time a developer adds an existing sample by
16030	// editing an intent or training, this counter is increased.
16031	TimesAddedCount int64 `json:"timesAddedCount,omitempty"`
16032
16033	// Type: Required. The type of the training phrase.
16034	//
16035	// Possible values:
16036	//   "TYPE_UNSPECIFIED" - Not specified. This value should never be
16037	// used.
16038	//   "EXAMPLE" - Examples do not contain @-prefixed entity type names,
16039	// but example parts can be annotated with entity types.
16040	//   "TEMPLATE" - Templates are not annotated with entity types, but
16041	// they can contain @-prefixed entity type names as substrings. Template
16042	// mode has been deprecated. Example mode is the only supported way to
16043	// create new training phrases. If you have existing training phrases
16044	// that you've created in template mode, those will continue to work.
16045	Type string `json:"type,omitempty"`
16046
16047	// ForceSendFields is a list of field names (e.g. "Name") to
16048	// unconditionally include in API requests. By default, fields with
16049	// empty values are omitted from API requests. However, any non-pointer,
16050	// non-interface field appearing in ForceSendFields will be sent to the
16051	// server regardless of whether the field is empty or not. This may be
16052	// used to include empty fields in Patch requests.
16053	ForceSendFields []string `json:"-"`
16054
16055	// NullFields is a list of field names (e.g. "Name") to include in API
16056	// requests with the JSON null value. By default, fields with empty
16057	// values are omitted from API requests. However, any field with an
16058	// empty value appearing in NullFields will be sent to the server as
16059	// null. It is an error if a field in this list has a non-empty value.
16060	// This may be used to include null fields in Patch requests.
16061	NullFields []string `json:"-"`
16062}
16063
16064func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
16065	type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrase
16066	raw := NoMethod(*s)
16067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16068}
16069
16070// GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart: Represents a
16071// part of a training phrase.
16072type GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart struct {
16073	// Alias: Optional. The parameter name for the value extracted from the
16074	// annotated part of the example. This field is required for annotated
16075	// parts of the training phrase.
16076	Alias string `json:"alias,omitempty"`
16077
16078	// EntityType: Optional. The entity type name prefixed with `@`. This
16079	// field is required for annotated parts of the training phrase.
16080	EntityType string `json:"entityType,omitempty"`
16081
16082	// Text: Required. The text for this part.
16083	Text string `json:"text,omitempty"`
16084
16085	// UserDefined: Optional. Indicates whether the text was manually
16086	// annotated. This field is set to true when the Dialogflow Console is
16087	// used to manually annotate the part. When creating an annotated part
16088	// with the API, you must set this to true.
16089	UserDefined bool `json:"userDefined,omitempty"`
16090
16091	// ForceSendFields is a list of field names (e.g. "Alias") to
16092	// unconditionally include in API requests. By default, fields with
16093	// empty values are omitted from API requests. However, any non-pointer,
16094	// non-interface field appearing in ForceSendFields will be sent to the
16095	// server regardless of whether the field is empty or not. This may be
16096	// used to include empty fields in Patch requests.
16097	ForceSendFields []string `json:"-"`
16098
16099	// NullFields is a list of field names (e.g. "Alias") to include in API
16100	// requests with the JSON null value. By default, fields with empty
16101	// values are omitted from API requests. However, any field with an
16102	// empty value appearing in NullFields will be sent to the server as
16103	// null. It is an error if a field in this list has a non-empty value.
16104	// This may be used to include null fields in Patch requests.
16105	NullFields []string `json:"-"`
16106}
16107
16108func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
16109	type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
16110	raw := NoMethod(*s)
16111	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16112}
16113
16114// GoogleCloudDialogflowV2beta1KnowledgeAnswers: Represents the result
16115// of querying a Knowledge base.
16116type GoogleCloudDialogflowV2beta1KnowledgeAnswers struct {
16117	// Answers: A list of answers from Knowledge Connector.
16118	Answers []*GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer `json:"answers,omitempty"`
16119
16120	// ForceSendFields is a list of field names (e.g. "Answers") to
16121	// unconditionally include in API requests. By default, fields with
16122	// empty values are omitted from API requests. However, any non-pointer,
16123	// non-interface field appearing in ForceSendFields will be sent to the
16124	// server regardless of whether the field is empty or not. This may be
16125	// used to include empty fields in Patch requests.
16126	ForceSendFields []string `json:"-"`
16127
16128	// NullFields is a list of field names (e.g. "Answers") to include in
16129	// API requests with the JSON null value. By default, fields with empty
16130	// values are omitted from API requests. However, any field with an
16131	// empty value appearing in NullFields will be sent to the server as
16132	// null. It is an error if a field in this list has a non-empty value.
16133	// This may be used to include null fields in Patch requests.
16134	NullFields []string `json:"-"`
16135}
16136
16137func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswers) MarshalJSON() ([]byte, error) {
16138	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswers
16139	raw := NoMethod(*s)
16140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16141}
16142
16143// GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer: An answer from
16144// Knowledge Connector.
16145type GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer struct {
16146	// Answer: The piece of text from the `source` knowledge base document
16147	// that answers this conversational query.
16148	Answer string `json:"answer,omitempty"`
16149
16150	// FaqQuestion: The corresponding FAQ question if the answer was
16151	// extracted from a FAQ Document, empty otherwise.
16152	FaqQuestion string `json:"faqQuestion,omitempty"`
16153
16154	// MatchConfidence: The system's confidence score that this Knowledge
16155	// answer is a good match for this conversational query. The range is
16156	// from 0.0 (completely uncertain) to 1.0 (completely certain). Note:
16157	// The confidence score is likely to vary somewhat (possibly even for
16158	// identical requests), as the underlying model is under constant
16159	// improvement. It may be deprecated in the future. We recommend using
16160	// `match_confidence_level` which should be generally more stable.
16161	MatchConfidence float64 `json:"matchConfidence,omitempty"`
16162
16163	// MatchConfidenceLevel: The system's confidence level that this
16164	// knowledge answer is a good match for this conversational query. NOTE:
16165	// The confidence level for a given `` pair may change without notice,
16166	// as it depends on models that are constantly being improved. However,
16167	// it will change less frequently than the confidence score below, and
16168	// should be preferred for referencing the quality of an answer.
16169	//
16170	// Possible values:
16171	//   "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED" - Not specified.
16172	//   "LOW" - Indicates that the confidence is low.
16173	//   "MEDIUM" - Indicates our confidence is medium.
16174	//   "HIGH" - Indicates our confidence is high.
16175	MatchConfidenceLevel string `json:"matchConfidenceLevel,omitempty"`
16176
16177	// Source: Indicates which Knowledge Document this answer was extracted
16178	// from. Format: `projects//knowledgeBases//documents/`.
16179	Source string `json:"source,omitempty"`
16180
16181	// ForceSendFields is a list of field names (e.g. "Answer") to
16182	// unconditionally include in API requests. By default, fields with
16183	// empty values are omitted from API requests. However, any non-pointer,
16184	// non-interface field appearing in ForceSendFields will be sent to the
16185	// server regardless of whether the field is empty or not. This may be
16186	// used to include empty fields in Patch requests.
16187	ForceSendFields []string `json:"-"`
16188
16189	// NullFields is a list of field names (e.g. "Answer") to include in API
16190	// requests with the JSON null value. By default, fields with empty
16191	// values are omitted from API requests. However, any field with an
16192	// empty value appearing in NullFields will be sent to the server as
16193	// null. It is an error if a field in this list has a non-empty value.
16194	// This may be used to include null fields in Patch requests.
16195	NullFields []string `json:"-"`
16196}
16197
16198func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) MarshalJSON() ([]byte, error) {
16199	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
16200	raw := NoMethod(*s)
16201	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16202}
16203
16204func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) UnmarshalJSON(data []byte) error {
16205	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
16206	var s1 struct {
16207		MatchConfidence gensupport.JSONFloat64 `json:"matchConfidence"`
16208		*NoMethod
16209	}
16210	s1.NoMethod = (*NoMethod)(s)
16211	if err := json.Unmarshal(data, &s1); err != nil {
16212		return err
16213	}
16214	s.MatchConfidence = float64(s1.MatchConfidence)
16215	return nil
16216}
16217
16218// GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata: Metadata in
16219// google::longrunning::Operation for Knowledge operations.
16220type GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata struct {
16221	// State: Required. Output only. The current state of this operation.
16222	//
16223	// Possible values:
16224	//   "STATE_UNSPECIFIED" - State unspecified.
16225	//   "PENDING" - The operation has been created.
16226	//   "RUNNING" - The operation is currently running.
16227	//   "DONE" - The operation is done, either cancelled or completed.
16228	State string `json:"state,omitempty"`
16229
16230	// ForceSendFields is a list of field names (e.g. "State") to
16231	// unconditionally include in API requests. By default, fields with
16232	// empty values are omitted from API requests. However, any non-pointer,
16233	// non-interface field appearing in ForceSendFields will be sent to the
16234	// server regardless of whether the field is empty or not. This may be
16235	// used to include empty fields in Patch requests.
16236	ForceSendFields []string `json:"-"`
16237
16238	// NullFields is a list of field names (e.g. "State") to include in API
16239	// requests with the JSON null value. By default, fields with empty
16240	// values are omitted from API requests. However, any field with an
16241	// empty value appearing in NullFields will be sent to the server as
16242	// null. It is an error if a field in this list has a non-empty value.
16243	// This may be used to include null fields in Patch requests.
16244	NullFields []string `json:"-"`
16245}
16246
16247func (s *GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata) MarshalJSON() ([]byte, error) {
16248	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
16249	raw := NoMethod(*s)
16250	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16251}
16252
16253// GoogleCloudDialogflowV2beta1Message: Represents a message posted into
16254// a conversation.
16255type GoogleCloudDialogflowV2beta1Message struct {
16256	// Content: Required. The message content.
16257	Content string `json:"content,omitempty"`
16258
16259	// CreateTime: Output only. The time when the message was created in
16260	// Contact Center AI.
16261	CreateTime string `json:"createTime,omitempty"`
16262
16263	// LanguageCode: Optional. The message language. This should be a BCP-47
16264	// (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example:
16265	// "en-US".
16266	LanguageCode string `json:"languageCode,omitempty"`
16267
16268	// MessageAnnotation: Output only. The annotation for the message.
16269	MessageAnnotation *GoogleCloudDialogflowV2beta1MessageAnnotation `json:"messageAnnotation,omitempty"`
16270
16271	// Name: Optional. The unique identifier of the message. Format:
16272	// `projects//locations//conversations//messages/`.
16273	Name string `json:"name,omitempty"`
16274
16275	// Participant: Output only. The participant that sends this message.
16276	Participant string `json:"participant,omitempty"`
16277
16278	// ParticipantRole: Output only. The role of the participant.
16279	//
16280	// Possible values:
16281	//   "ROLE_UNSPECIFIED" - Participant role not set.
16282	//   "HUMAN_AGENT" - Participant is a human agent.
16283	//   "AUTOMATED_AGENT" - Participant is an automated agent, such as a
16284	// Dialogflow agent.
16285	//   "END_USER" - Participant is an end user that has called or chatted
16286	// with Dialogflow services.
16287	ParticipantRole string `json:"participantRole,omitempty"`
16288
16289	// SendTime: Optional. The time when the message was sent.
16290	SendTime string `json:"sendTime,omitempty"`
16291
16292	// SentimentAnalysis: Output only. The sentiment analysis result for the
16293	// message.
16294	SentimentAnalysis *GoogleCloudDialogflowV2beta1SentimentAnalysisResult `json:"sentimentAnalysis,omitempty"`
16295
16296	// ForceSendFields is a list of field names (e.g. "Content") to
16297	// unconditionally include in API requests. By default, fields with
16298	// empty values are omitted from API requests. However, any non-pointer,
16299	// non-interface field appearing in ForceSendFields will be sent to the
16300	// server regardless of whether the field is empty or not. This may be
16301	// used to include empty fields in Patch requests.
16302	ForceSendFields []string `json:"-"`
16303
16304	// NullFields is a list of field names (e.g. "Content") to include in
16305	// API requests with the JSON null value. By default, fields with empty
16306	// values are omitted from API requests. However, any field with an
16307	// empty value appearing in NullFields will be sent to the server as
16308	// null. It is an error if a field in this list has a non-empty value.
16309	// This may be used to include null fields in Patch requests.
16310	NullFields []string `json:"-"`
16311}
16312
16313func (s *GoogleCloudDialogflowV2beta1Message) MarshalJSON() ([]byte, error) {
16314	type NoMethod GoogleCloudDialogflowV2beta1Message
16315	raw := NoMethod(*s)
16316	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16317}
16318
16319// GoogleCloudDialogflowV2beta1MessageAnnotation: Represents the result
16320// of annotation for the message.
16321type GoogleCloudDialogflowV2beta1MessageAnnotation struct {
16322	// ContainEntities: Required. Indicates whether the text message
16323	// contains entities.
16324	ContainEntities bool `json:"containEntities,omitempty"`
16325
16326	// Parts: Optional. The collection of annotated message parts ordered by
16327	// their position in the message. You can recover the annotated message
16328	// by concatenating [AnnotatedMessagePart.text].
16329	Parts []*GoogleCloudDialogflowV2beta1AnnotatedMessagePart `json:"parts,omitempty"`
16330
16331	// ForceSendFields is a list of field names (e.g. "ContainEntities") to
16332	// unconditionally include in API requests. By default, fields with
16333	// empty values are omitted from API requests. However, any non-pointer,
16334	// non-interface field appearing in ForceSendFields will be sent to the
16335	// server regardless of whether the field is empty or not. This may be
16336	// used to include empty fields in Patch requests.
16337	ForceSendFields []string `json:"-"`
16338
16339	// NullFields is a list of field names (e.g. "ContainEntities") to
16340	// include in API requests with the JSON null value. By default, fields
16341	// with empty values are omitted from API requests. However, any field
16342	// with an empty value appearing in NullFields will be sent to the
16343	// server as null. It is an error if a field in this list has a
16344	// non-empty value. This may be used to include null fields in Patch
16345	// requests.
16346	NullFields []string `json:"-"`
16347}
16348
16349func (s *GoogleCloudDialogflowV2beta1MessageAnnotation) MarshalJSON() ([]byte, error) {
16350	type NoMethod GoogleCloudDialogflowV2beta1MessageAnnotation
16351	raw := NoMethod(*s)
16352	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16353}
16354
16355// GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest: Represents
16356// the contents of the original request that was passed to the
16357// `[Streaming]DetectIntent` call.
16358type GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest struct {
16359	// Payload: Optional. This field is set to the value of the
16360	// `QueryParameters.payload` field passed in the request. Some
16361	// integrations that query a Dialogflow agent may provide additional
16362	// information in the payload. In particular, for the Dialogflow Phone
16363	// Gateway integration, this field has the form: { "telephony": {
16364	// "caller_id": "+18558363987" } } Note: The caller ID field
16365	// (`caller_id`) will be redacted for Trial Edition agents and populated
16366	// with the caller ID in E.164 format
16367	// (https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents.
16368	Payload googleapi.RawMessage `json:"payload,omitempty"`
16369
16370	// Source: The source of this request, e.g., `google`, `facebook`,
16371	// `slack`. It is set by Dialogflow-owned servers.
16372	Source string `json:"source,omitempty"`
16373
16374	// Version: Optional. The version of the protocol used for this request.
16375	// This field is AoG-specific.
16376	Version string `json:"version,omitempty"`
16377
16378	// ForceSendFields is a list of field names (e.g. "Payload") to
16379	// unconditionally include in API requests. By default, fields with
16380	// empty values are omitted from API requests. However, any non-pointer,
16381	// non-interface field appearing in ForceSendFields will be sent to the
16382	// server regardless of whether the field is empty or not. This may be
16383	// used to include empty fields in Patch requests.
16384	ForceSendFields []string `json:"-"`
16385
16386	// NullFields is a list of field names (e.g. "Payload") to include in
16387	// API requests with the JSON null value. By default, fields with empty
16388	// values are omitted from API requests. However, any field with an
16389	// empty value appearing in NullFields will be sent to the server as
16390	// null. It is an error if a field in this list has a non-empty value.
16391	// This may be used to include null fields in Patch requests.
16392	NullFields []string `json:"-"`
16393}
16394
16395func (s *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) {
16396	type NoMethod GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
16397	raw := NoMethod(*s)
16398	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16399}
16400
16401// GoogleCloudDialogflowV2beta1QueryResult: Represents the result of
16402// conversational query or event processing.
16403type GoogleCloudDialogflowV2beta1QueryResult struct {
16404	// Action: The action name from the matched intent.
16405	Action string `json:"action,omitempty"`
16406
16407	// AllRequiredParamsPresent: This field is set to: - `false` if the
16408	// matched intent has required parameters and not all of the required
16409	// parameter values have been collected. - `true` if all required
16410	// parameter values have been collected, or if the matched intent
16411	// doesn't contain any required parameters.
16412	AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"`
16413
16414	// CancelsSlotFilling: Indicates whether the conversational query
16415	// triggers a cancellation for slot filling.
16416	CancelsSlotFilling bool `json:"cancelsSlotFilling,omitempty"`
16417
16418	// DiagnosticInfo: Free-form diagnostic information for the associated
16419	// detect intent request. The fields of this data can change without
16420	// notice, so you should not write code that depends on its structure.
16421	// The data may contain: - webhook call latency - webhook errors
16422	DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
16423
16424	// FulfillmentMessages: The collection of rich messages to present to
16425	// the user.
16426	FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"`
16427
16428	// FulfillmentText: The text to be pronounced to the user or shown on
16429	// the screen. Note: This is a legacy field, `fulfillment_messages`
16430	// should be preferred.
16431	FulfillmentText string `json:"fulfillmentText,omitempty"`
16432
16433	// Intent: The intent that matched the conversational query. Some, not
16434	// all fields are filled in this message, including but not limited to:
16435	// `name`, `display_name`, `end_interaction` and `is_fallback`.
16436	Intent *GoogleCloudDialogflowV2beta1Intent `json:"intent,omitempty"`
16437
16438	// IntentDetectionConfidence: The intent detection confidence. Values
16439	// range from 0.0 (completely uncertain) to 1.0 (completely certain).
16440	// This value is for informational purpose only and is only used to help
16441	// match the best intent within the classification threshold. This value
16442	// may change for the same end-user expression at any time due to a
16443	// model retraining or change in implementation. If there are `multiple
16444	// knowledge_answers` messages, this value is set to the greatest
16445	// `knowledgeAnswers.match_confidence` value in the list.
16446	IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"`
16447
16448	// KnowledgeAnswers: The result from Knowledge Connector (if any),
16449	// ordered by decreasing `KnowledgeAnswers.match_confidence`.
16450	KnowledgeAnswers *GoogleCloudDialogflowV2beta1KnowledgeAnswers `json:"knowledgeAnswers,omitempty"`
16451
16452	// LanguageCode: The language that was triggered during intent
16453	// detection. See Language Support
16454	// (https://cloud.google.com/dialogflow/docs/reference/language) for a
16455	// list of the currently supported language codes.
16456	LanguageCode string `json:"languageCode,omitempty"`
16457
16458	// OutputContexts: The collection of output contexts. If applicable,
16459	// `output_contexts.parameters` contains entries with name `.original`
16460	// containing the original parameter values before the query.
16461	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
16462
16463	// Parameters: The collection of extracted parameters. Depending on your
16464	// protocol or client library language, this is a map, associative
16465	// array, symbol table, dictionary, or JSON object composed of a
16466	// collection of (MapKey, MapValue) pairs: - MapKey type: string -
16467	// MapKey value: parameter name - MapValue type: - If parameter's entity
16468	// type is a composite entity: map - Else: depending on parameter value
16469	// type, could be one of string, number, boolean, null, list or map -
16470	// MapValue value: - If parameter's entity type is a composite entity:
16471	// map from composite entity property names to property values - Else:
16472	// parameter value
16473	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
16474
16475	// QueryText: The original conversational query text: - If natural
16476	// language text was provided as input, `query_text` contains a copy of
16477	// the input. - If natural language speech audio was provided as input,
16478	// `query_text` contains the speech recognition result. If speech
16479	// recognizer produced multiple alternatives, a particular one is
16480	// picked. - If automatic spell correction is enabled, `query_text` will
16481	// contain the corrected user input.
16482	QueryText string `json:"queryText,omitempty"`
16483
16484	// SentimentAnalysisResult: The sentiment analysis result, which depends
16485	// on the `sentiment_analysis_request_config` specified in the request.
16486	SentimentAnalysisResult *GoogleCloudDialogflowV2beta1SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"`
16487
16488	// SpeechRecognitionConfidence: The Speech recognition confidence
16489	// between 0.0 and 1.0. A higher number indicates an estimated greater
16490	// likelihood that the recognized words are correct. The default of 0.0
16491	// is a sentinel value indicating that confidence was not set. This
16492	// field is not guaranteed to be accurate or set. In particular this
16493	// field isn't set for StreamingDetectIntent since the streaming
16494	// endpoint has separate confidence estimates per portion of the audio
16495	// in StreamingRecognitionResult.
16496	SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"`
16497
16498	// WebhookPayload: If the query was fulfilled by a webhook call, this
16499	// field is set to the value of the `payload` field returned in the
16500	// webhook response.
16501	WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"`
16502
16503	// WebhookSource: If the query was fulfilled by a webhook call, this
16504	// field is set to the value of the `source` field returned in the
16505	// webhook response.
16506	WebhookSource string `json:"webhookSource,omitempty"`
16507
16508	// ForceSendFields is a list of field names (e.g. "Action") to
16509	// unconditionally include in API requests. By default, fields with
16510	// empty values are omitted from API requests. However, any non-pointer,
16511	// non-interface field appearing in ForceSendFields will be sent to the
16512	// server regardless of whether the field is empty or not. This may be
16513	// used to include empty fields in Patch requests.
16514	ForceSendFields []string `json:"-"`
16515
16516	// NullFields is a list of field names (e.g. "Action") to include in API
16517	// requests with the JSON null value. By default, fields with empty
16518	// values are omitted from API requests. However, any field with an
16519	// empty value appearing in NullFields will be sent to the server as
16520	// null. It is an error if a field in this list has a non-empty value.
16521	// This may be used to include null fields in Patch requests.
16522	NullFields []string `json:"-"`
16523}
16524
16525func (s *GoogleCloudDialogflowV2beta1QueryResult) MarshalJSON() ([]byte, error) {
16526	type NoMethod GoogleCloudDialogflowV2beta1QueryResult
16527	raw := NoMethod(*s)
16528	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16529}
16530
16531func (s *GoogleCloudDialogflowV2beta1QueryResult) UnmarshalJSON(data []byte) error {
16532	type NoMethod GoogleCloudDialogflowV2beta1QueryResult
16533	var s1 struct {
16534		IntentDetectionConfidence   gensupport.JSONFloat64 `json:"intentDetectionConfidence"`
16535		SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"`
16536		*NoMethod
16537	}
16538	s1.NoMethod = (*NoMethod)(s)
16539	if err := json.Unmarshal(data, &s1); err != nil {
16540		return err
16541	}
16542	s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence)
16543	s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence)
16544	return nil
16545}
16546
16547// GoogleCloudDialogflowV2beta1Sentiment: The sentiment, such as
16548// positive/negative feeling or association, for a unit of analysis,
16549// such as the query text.
16550type GoogleCloudDialogflowV2beta1Sentiment struct {
16551	// Magnitude: A non-negative number in the [0, +inf) range, which
16552	// represents the absolute magnitude of sentiment, regardless of score
16553	// (positive or negative).
16554	Magnitude float64 `json:"magnitude,omitempty"`
16555
16556	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0
16557	// (positive sentiment).
16558	Score float64 `json:"score,omitempty"`
16559
16560	// ForceSendFields is a list of field names (e.g. "Magnitude") to
16561	// unconditionally include in API requests. By default, fields with
16562	// empty values are omitted from API requests. However, any non-pointer,
16563	// non-interface field appearing in ForceSendFields will be sent to the
16564	// server regardless of whether the field is empty or not. This may be
16565	// used to include empty fields in Patch requests.
16566	ForceSendFields []string `json:"-"`
16567
16568	// NullFields is a list of field names (e.g. "Magnitude") to include in
16569	// API requests with the JSON null value. By default, fields with empty
16570	// values are omitted from API requests. However, any field with an
16571	// empty value appearing in NullFields will be sent to the server as
16572	// null. It is an error if a field in this list has a non-empty value.
16573	// This may be used to include null fields in Patch requests.
16574	NullFields []string `json:"-"`
16575}
16576
16577func (s *GoogleCloudDialogflowV2beta1Sentiment) MarshalJSON() ([]byte, error) {
16578	type NoMethod GoogleCloudDialogflowV2beta1Sentiment
16579	raw := NoMethod(*s)
16580	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16581}
16582
16583func (s *GoogleCloudDialogflowV2beta1Sentiment) UnmarshalJSON(data []byte) error {
16584	type NoMethod GoogleCloudDialogflowV2beta1Sentiment
16585	var s1 struct {
16586		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
16587		Score     gensupport.JSONFloat64 `json:"score"`
16588		*NoMethod
16589	}
16590	s1.NoMethod = (*NoMethod)(s)
16591	if err := json.Unmarshal(data, &s1); err != nil {
16592		return err
16593	}
16594	s.Magnitude = float64(s1.Magnitude)
16595	s.Score = float64(s1.Score)
16596	return nil
16597}
16598
16599// GoogleCloudDialogflowV2beta1SentimentAnalysisResult: The result of
16600// sentiment analysis. Sentiment analysis inspects user input and
16601// identifies the prevailing subjective opinion, especially to determine
16602// a user's attitude as positive, negative, or neutral. For
16603// Participants.DetectIntent, it needs to be configured in
16604// DetectIntentRequest.query_params. For
16605// Participants.StreamingDetectIntent, it needs to be configured in
16606// StreamingDetectIntentRequest.query_params. And for
16607// Participants.AnalyzeContent and Participants.StreamingAnalyzeContent,
16608// it needs to be configured in
16609// ConversationProfile.human_agent_assistant_config
16610type GoogleCloudDialogflowV2beta1SentimentAnalysisResult struct {
16611	// QueryTextSentiment: The sentiment analysis result for `query_text`.
16612	QueryTextSentiment *GoogleCloudDialogflowV2beta1Sentiment `json:"queryTextSentiment,omitempty"`
16613
16614	// ForceSendFields is a list of field names (e.g. "QueryTextSentiment")
16615	// to unconditionally include in API requests. By default, fields with
16616	// empty values are omitted from API requests. However, any non-pointer,
16617	// non-interface field appearing in ForceSendFields will be sent to the
16618	// server regardless of whether the field is empty or not. This may be
16619	// used to include empty fields in Patch requests.
16620	ForceSendFields []string `json:"-"`
16621
16622	// NullFields is a list of field names (e.g. "QueryTextSentiment") to
16623	// include in API requests with the JSON null value. By default, fields
16624	// with empty values are omitted from API requests. However, any field
16625	// with an empty value appearing in NullFields will be sent to the
16626	// server as null. It is an error if a field in this list has a
16627	// non-empty value. This may be used to include null fields in Patch
16628	// requests.
16629	NullFields []string `json:"-"`
16630}
16631
16632func (s *GoogleCloudDialogflowV2beta1SentimentAnalysisResult) MarshalJSON() ([]byte, error) {
16633	type NoMethod GoogleCloudDialogflowV2beta1SentimentAnalysisResult
16634	raw := NoMethod(*s)
16635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16636}
16637
16638// GoogleCloudDialogflowV2beta1SessionEntityType: A session represents a
16639// conversation between a Dialogflow agent and an end-user. You can
16640// create special entities, called session entities, during a session.
16641// Session entities can extend or replace custom entity types and only
16642// exist during the session that they were created for. All session
16643// data, including session entities, is stored by Dialogflow for 20
16644// minutes. For more information, see the session entity guide
16645// (https://cloud.google.com/dialogflow/docs/entities-session).
16646type GoogleCloudDialogflowV2beta1SessionEntityType struct {
16647	// Entities: Required. The collection of entities associated with this
16648	// session entity type.
16649	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
16650
16651	// EntityOverrideMode: Required. Indicates whether the additional data
16652	// should override or supplement the custom entity type definition.
16653	//
16654	// Possible values:
16655	//   "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value
16656	// should be never used.
16657	//   "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session
16658	// entities overrides the collection of entities in the corresponding
16659	// custom entity type.
16660	//   "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session
16661	// entities extends the collection of entities in the corresponding
16662	// custom entity type. Note: Even in this override mode calls to
16663	// `ListSessionEntityTypes`, `GetSessionEntityType`,
16664	// `CreateSessionEntityType` and `UpdateSessionEntityType` only return
16665	// the additional entities added in this session entity type. If you
16666	// want to get the supplemented list, please call
16667	// EntityTypes.GetEntityType on the custom entity type and merge.
16668	EntityOverrideMode string `json:"entityOverrideMode,omitempty"`
16669
16670	// Name: Required. The unique identifier of this session entity type.
16671	// Supported formats: - `projects//agent/sessions//entityTypes/` -
16672	// `projects//locations//agent/sessions//entityTypes/` -
16673	// `projects//agent/environments//users//sessions//entityTypes/` -
16674	// `projects//locations//agent/environments/
16675	// /users//sessions//entityTypes/` If `Location ID` is not specified we
16676	// assume default 'us' location. If `Environment ID` is not specified,
16677	// we assume default 'draft' environment. If `User ID` is not specified,
16678	// we assume default '-' user. `` must be the display name of an
16679	// existing entity type in the same agent that will be overridden or
16680	// supplemented.
16681	Name string `json:"name,omitempty"`
16682
16683	// ForceSendFields is a list of field names (e.g. "Entities") to
16684	// unconditionally include in API requests. By default, fields with
16685	// empty values are omitted from API requests. However, any non-pointer,
16686	// non-interface field appearing in ForceSendFields will be sent to the
16687	// server regardless of whether the field is empty or not. This may be
16688	// used to include empty fields in Patch requests.
16689	ForceSendFields []string `json:"-"`
16690
16691	// NullFields is a list of field names (e.g. "Entities") to include in
16692	// API requests with the JSON null value. By default, fields with empty
16693	// values are omitted from API requests. However, any field with an
16694	// empty value appearing in NullFields will be sent to the server as
16695	// null. It is an error if a field in this list has a non-empty value.
16696	// This may be used to include null fields in Patch requests.
16697	NullFields []string `json:"-"`
16698}
16699
16700func (s *GoogleCloudDialogflowV2beta1SessionEntityType) MarshalJSON() ([]byte, error) {
16701	type NoMethod GoogleCloudDialogflowV2beta1SessionEntityType
16702	raw := NoMethod(*s)
16703	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16704}
16705
16706// GoogleCloudDialogflowV2beta1SmartReplyAnswer: Represents a smart
16707// reply answer.
16708type GoogleCloudDialogflowV2beta1SmartReplyAnswer struct {
16709	// AnswerRecord: The name of answer record, in the format of
16710	// "projects//locations//answerRecords/"
16711	AnswerRecord string `json:"answerRecord,omitempty"`
16712
16713	// Confidence: Smart reply confidence. The system's confidence score
16714	// that this reply is a good match for this conversation, as a value
16715	// from 0.0 (completely uncertain) to 1.0 (completely certain).
16716	Confidence float64 `json:"confidence,omitempty"`
16717
16718	// Reply: The content of the reply.
16719	Reply string `json:"reply,omitempty"`
16720
16721	// ForceSendFields is a list of field names (e.g. "AnswerRecord") to
16722	// unconditionally include in API requests. By default, fields with
16723	// empty values are omitted from API requests. However, any non-pointer,
16724	// non-interface field appearing in ForceSendFields will be sent to the
16725	// server regardless of whether the field is empty or not. This may be
16726	// used to include empty fields in Patch requests.
16727	ForceSendFields []string `json:"-"`
16728
16729	// NullFields is a list of field names (e.g. "AnswerRecord") to include
16730	// in API requests with the JSON null value. By default, fields with
16731	// empty values are omitted from API requests. However, any field with
16732	// an empty value appearing in NullFields will be sent to the server as
16733	// null. It is an error if a field in this list has a non-empty value.
16734	// This may be used to include null fields in Patch requests.
16735	NullFields []string `json:"-"`
16736}
16737
16738func (s *GoogleCloudDialogflowV2beta1SmartReplyAnswer) MarshalJSON() ([]byte, error) {
16739	type NoMethod GoogleCloudDialogflowV2beta1SmartReplyAnswer
16740	raw := NoMethod(*s)
16741	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16742}
16743
16744func (s *GoogleCloudDialogflowV2beta1SmartReplyAnswer) UnmarshalJSON(data []byte) error {
16745	type NoMethod GoogleCloudDialogflowV2beta1SmartReplyAnswer
16746	var s1 struct {
16747		Confidence gensupport.JSONFloat64 `json:"confidence"`
16748		*NoMethod
16749	}
16750	s1.NoMethod = (*NoMethod)(s)
16751	if err := json.Unmarshal(data, &s1); err != nil {
16752		return err
16753	}
16754	s.Confidence = float64(s1.Confidence)
16755	return nil
16756}
16757
16758// GoogleCloudDialogflowV2beta1SuggestArticlesResponse: The response
16759// message for Participants.SuggestArticles.
16760type GoogleCloudDialogflowV2beta1SuggestArticlesResponse struct {
16761	// ArticleAnswers: Output only. Articles ordered by score in descending
16762	// order.
16763	ArticleAnswers []*GoogleCloudDialogflowV2beta1ArticleAnswer `json:"articleAnswers,omitempty"`
16764
16765	// ContextSize: Number of messages prior to and including latest_message
16766	// to compile the suggestion. It may be smaller than the
16767	// SuggestArticlesResponse.context_size field in the request if there
16768	// aren't that many messages in the conversation.
16769	ContextSize int64 `json:"contextSize,omitempty"`
16770
16771	// LatestMessage: The name of the latest conversation message used to
16772	// compile suggestion for. Format:
16773	// `projects//locations//conversations//messages/`.
16774	LatestMessage string `json:"latestMessage,omitempty"`
16775
16776	// ForceSendFields is a list of field names (e.g. "ArticleAnswers") to
16777	// unconditionally include in API requests. By default, fields with
16778	// empty values are omitted from API requests. However, any non-pointer,
16779	// non-interface field appearing in ForceSendFields will be sent to the
16780	// server regardless of whether the field is empty or not. This may be
16781	// used to include empty fields in Patch requests.
16782	ForceSendFields []string `json:"-"`
16783
16784	// NullFields is a list of field names (e.g. "ArticleAnswers") to
16785	// include in API requests with the JSON null value. By default, fields
16786	// with empty values are omitted from API requests. However, any field
16787	// with an empty value appearing in NullFields will be sent to the
16788	// server as null. It is an error if a field in this list has a
16789	// non-empty value. This may be used to include null fields in Patch
16790	// requests.
16791	NullFields []string `json:"-"`
16792}
16793
16794func (s *GoogleCloudDialogflowV2beta1SuggestArticlesResponse) MarshalJSON() ([]byte, error) {
16795	type NoMethod GoogleCloudDialogflowV2beta1SuggestArticlesResponse
16796	raw := NoMethod(*s)
16797	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16798}
16799
16800// GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse: The request
16801// message for Participants.SuggestFaqAnswers.
16802type GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse struct {
16803	// ContextSize: Number of messages prior to and including latest_message
16804	// to compile the suggestion. It may be smaller than the
16805	// SuggestFaqAnswersRequest.context_size field in the request if there
16806	// aren't that many messages in the conversation.
16807	ContextSize int64 `json:"contextSize,omitempty"`
16808
16809	// FaqAnswers: Output only. Answers extracted from FAQ documents.
16810	FaqAnswers []*GoogleCloudDialogflowV2beta1FaqAnswer `json:"faqAnswers,omitempty"`
16811
16812	// LatestMessage: The name of the latest conversation message used to
16813	// compile suggestion for. Format:
16814	// `projects//locations//conversations//messages/`.
16815	LatestMessage string `json:"latestMessage,omitempty"`
16816
16817	// ForceSendFields is a list of field names (e.g. "ContextSize") to
16818	// unconditionally include in API requests. By default, fields with
16819	// empty values are omitted from API requests. However, any non-pointer,
16820	// non-interface field appearing in ForceSendFields will be sent to the
16821	// server regardless of whether the field is empty or not. This may be
16822	// used to include empty fields in Patch requests.
16823	ForceSendFields []string `json:"-"`
16824
16825	// NullFields is a list of field names (e.g. "ContextSize") to include
16826	// in API requests with the JSON null value. By default, fields with
16827	// empty values are omitted from API requests. However, any field with
16828	// an empty value appearing in NullFields will be sent to the server as
16829	// null. It is an error if a field in this list has a non-empty value.
16830	// This may be used to include null fields in Patch requests.
16831	NullFields []string `json:"-"`
16832}
16833
16834func (s *GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse) MarshalJSON() ([]byte, error) {
16835	type NoMethod GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse
16836	raw := NoMethod(*s)
16837	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16838}
16839
16840// GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse: The response
16841// message for Participants.SuggestSmartReplies.
16842type GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse struct {
16843	// ContextSize: Number of messages prior to and including latest_message
16844	// to compile the suggestion. It may be smaller than the
16845	// SuggestSmartRepliesRequest.context_size field in the request if there
16846	// aren't that many messages in the conversation.
16847	ContextSize int64 `json:"contextSize,omitempty"`
16848
16849	// LatestMessage: The name of the latest conversation message used to
16850	// compile suggestion for. Format:
16851	// `projects//locations//conversations//messages/`.
16852	LatestMessage string `json:"latestMessage,omitempty"`
16853
16854	// SmartReplyAnswers: Output only. Multiple reply options provided by
16855	// smart reply service. The order is based on the rank of the model
16856	// prediction. The maximum number of the returned replies is set in
16857	// SmartReplyConfig.
16858	SmartReplyAnswers []*GoogleCloudDialogflowV2beta1SmartReplyAnswer `json:"smartReplyAnswers,omitempty"`
16859
16860	// ForceSendFields is a list of field names (e.g. "ContextSize") to
16861	// unconditionally include in API requests. By default, fields with
16862	// empty values are omitted from API requests. However, any non-pointer,
16863	// non-interface field appearing in ForceSendFields will be sent to the
16864	// server regardless of whether the field is empty or not. This may be
16865	// used to include empty fields in Patch requests.
16866	ForceSendFields []string `json:"-"`
16867
16868	// NullFields is a list of field names (e.g. "ContextSize") to include
16869	// in API requests with the JSON null value. By default, fields with
16870	// empty values are omitted from API requests. However, any field with
16871	// an empty value appearing in NullFields will be sent to the server as
16872	// null. It is an error if a field in this list has a non-empty value.
16873	// This may be used to include null fields in Patch requests.
16874	NullFields []string `json:"-"`
16875}
16876
16877func (s *GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse) MarshalJSON() ([]byte, error) {
16878	type NoMethod GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
16879	raw := NoMethod(*s)
16880	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16881}
16882
16883// GoogleCloudDialogflowV2beta1SuggestionResult: One response of
16884// different type of suggestion response which is used in the response
16885// of Participants.AnalyzeContent and Participants.AnalyzeContent, as
16886// well as HumanAgentAssistantEvent.
16887type GoogleCloudDialogflowV2beta1SuggestionResult struct {
16888	// Error: Error status if the request failed.
16889	Error *GoogleRpcStatus `json:"error,omitempty"`
16890
16891	// SuggestArticlesResponse: SuggestArticlesResponse if request is for
16892	// ARTICLE_SUGGESTION.
16893	SuggestArticlesResponse *GoogleCloudDialogflowV2beta1SuggestArticlesResponse `json:"suggestArticlesResponse,omitempty"`
16894
16895	// SuggestFaqAnswersResponse: SuggestFaqAnswersResponse if request is
16896	// for FAQ_ANSWER.
16897	SuggestFaqAnswersResponse *GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse `json:"suggestFaqAnswersResponse,omitempty"`
16898
16899	// SuggestSmartRepliesResponse: SuggestSmartRepliesResponse if request
16900	// is for SMART_REPLY.
16901	SuggestSmartRepliesResponse *GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse `json:"suggestSmartRepliesResponse,omitempty"`
16902
16903	// ForceSendFields is a list of field names (e.g. "Error") to
16904	// unconditionally include in API requests. By default, fields with
16905	// empty values are omitted from API requests. However, any non-pointer,
16906	// non-interface field appearing in ForceSendFields will be sent to the
16907	// server regardless of whether the field is empty or not. This may be
16908	// used to include empty fields in Patch requests.
16909	ForceSendFields []string `json:"-"`
16910
16911	// NullFields is a list of field names (e.g. "Error") to include in API
16912	// requests with the JSON null value. By default, fields with empty
16913	// values are omitted from API requests. However, any field with an
16914	// empty value appearing in NullFields will be sent to the server as
16915	// null. It is an error if a field in this list has a non-empty value.
16916	// This may be used to include null fields in Patch requests.
16917	NullFields []string `json:"-"`
16918}
16919
16920func (s *GoogleCloudDialogflowV2beta1SuggestionResult) MarshalJSON() ([]byte, error) {
16921	type NoMethod GoogleCloudDialogflowV2beta1SuggestionResult
16922	raw := NoMethod(*s)
16923	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16924}
16925
16926// GoogleCloudDialogflowV2beta1WebhookRequest: The request message for a
16927// webhook call.
16928type GoogleCloudDialogflowV2beta1WebhookRequest struct {
16929	// AlternativeQueryResults: Alternative query results from
16930	// KnowledgeService.
16931	AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"`
16932
16933	// OriginalDetectIntentRequest: Optional. The contents of the original
16934	// request that was passed to `[Streaming]DetectIntent` call.
16935	OriginalDetectIntentRequest *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"`
16936
16937	// QueryResult: The result of the conversational query or event
16938	// processing. Contains the same value as
16939	// `[Streaming]DetectIntentResponse.query_result`.
16940	QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"`
16941
16942	// ResponseId: The unique identifier of the response. Contains the same
16943	// value as `[Streaming]DetectIntentResponse.response_id`.
16944	ResponseId string `json:"responseId,omitempty"`
16945
16946	// Session: The unique identifier of detectIntent request session. Can
16947	// be used to identify end-user inside webhook implementation. Supported
16948	// formats: - `projects//agent/sessions/, -
16949	// `projects//locations//agent/sessions/`, -
16950	// `projects//agent/environments//users//sessions/`, -
16951	// `projects//locations//agent/environments//users//sessions/`,
16952	Session string `json:"session,omitempty"`
16953
16954	// ForceSendFields is a list of field names (e.g.
16955	// "AlternativeQueryResults") to unconditionally include in API
16956	// requests. By default, fields with empty values are omitted from API
16957	// requests. However, any non-pointer, non-interface field appearing in
16958	// ForceSendFields will be sent to the server regardless of whether the
16959	// field is empty or not. This may be used to include empty fields in
16960	// Patch requests.
16961	ForceSendFields []string `json:"-"`
16962
16963	// NullFields is a list of field names (e.g. "AlternativeQueryResults")
16964	// to include in API requests with the JSON null value. By default,
16965	// fields with empty values are omitted from API requests. However, any
16966	// field with an empty value appearing in NullFields will be sent to the
16967	// server as null. It is an error if a field in this list has a
16968	// non-empty value. This may be used to include null fields in Patch
16969	// requests.
16970	NullFields []string `json:"-"`
16971}
16972
16973func (s *GoogleCloudDialogflowV2beta1WebhookRequest) MarshalJSON() ([]byte, error) {
16974	type NoMethod GoogleCloudDialogflowV2beta1WebhookRequest
16975	raw := NoMethod(*s)
16976	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16977}
16978
16979// GoogleCloudDialogflowV2beta1WebhookResponse: The response message for
16980// a webhook call. This response is validated by the Dialogflow server.
16981// If validation fails, an error will be returned in the
16982// QueryResult.diagnostic_info field. Setting JSON fields to an empty
16983// value with the wrong type is a common error. To avoid this error: -
16984// Use "" for empty strings - Use `{}` or `null` for empty objects -
16985// Use `[]` or `null` for empty arrays For more information, see the
16986// Protocol Buffers Language Guide
16987// (https://developers.google.com/protocol-buffers/docs/proto3#json).
16988type GoogleCloudDialogflowV2beta1WebhookResponse struct {
16989	// EndInteraction: Optional. Indicates that this intent ends an
16990	// interaction. Some integrations (e.g., Actions on Google or Dialogflow
16991	// phone gateway) use this information to close interaction with an end
16992	// user. Default is false.
16993	EndInteraction bool `json:"endInteraction,omitempty"`
16994
16995	// FollowupEventInput: Optional. Invokes the supplied events. When this
16996	// field is set, Dialogflow ignores the `fulfillment_text`,
16997	// `fulfillment_messages`, and `payload` fields.
16998	FollowupEventInput *GoogleCloudDialogflowV2beta1EventInput `json:"followupEventInput,omitempty"`
16999
17000	// FulfillmentMessages: Optional. The rich response messages intended
17001	// for the end-user. When provided, Dialogflow uses this field to
17002	// populate QueryResult.fulfillment_messages sent to the integration or
17003	// API caller.
17004	FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"`
17005
17006	// FulfillmentText: Optional. The text response message intended for the
17007	// end-user. It is recommended to use
17008	// `fulfillment_messages.text.text[0]` instead. When provided,
17009	// Dialogflow uses this field to populate QueryResult.fulfillment_text
17010	// sent to the integration or API caller.
17011	FulfillmentText string `json:"fulfillmentText,omitempty"`
17012
17013	// LiveAgentHandoff: Indicates that a live agent should be brought in to
17014	// handle the interaction with the user. In most cases, when you set
17015	// this flag to true, you would also want to set end_interaction to true
17016	// as well. Default is false.
17017	LiveAgentHandoff bool `json:"liveAgentHandoff,omitempty"`
17018
17019	// OutputContexts: Optional. The collection of output contexts that will
17020	// overwrite currently active contexts for the session and reset their
17021	// lifespans. When provided, Dialogflow uses this field to populate
17022	// QueryResult.output_contexts sent to the integration or API caller.
17023	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
17024
17025	// Payload: Optional. This field can be used to pass custom data from
17026	// your webhook to the integration or API caller. Arbitrary JSON objects
17027	// are supported. When provided, Dialogflow uses this field to populate
17028	// QueryResult.webhook_payload sent to the integration or API caller.
17029	// This field is also used by the Google Assistant integration
17030	// (https://cloud.google.com/dialogflow/docs/integrations/aog) for rich
17031	// response messages. See the format definition at Google Assistant
17032	// Dialogflow webhook format
17033	// (https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
17034	Payload googleapi.RawMessage `json:"payload,omitempty"`
17035
17036	// SessionEntityTypes: Optional. Additional session entity types to
17037	// replace or extend developer entity types with. The entity synonyms
17038	// apply to all languages and persist for the session. Setting this data
17039	// from a webhook overwrites the session entity types that have been set
17040	// using `detectIntent`, `streamingDetectIntent` or SessionEntityType
17041	// management methods.
17042	SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"`
17043
17044	// Source: Optional. A custom field used to identify the webhook source.
17045	// Arbitrary strings are supported. When provided, Dialogflow uses this
17046	// field to populate QueryResult.webhook_source sent to the integration
17047	// or API caller.
17048	Source string `json:"source,omitempty"`
17049
17050	// ForceSendFields is a list of field names (e.g. "EndInteraction") to
17051	// unconditionally include in API requests. By default, fields with
17052	// empty values are omitted from API requests. However, any non-pointer,
17053	// non-interface field appearing in ForceSendFields will be sent to the
17054	// server regardless of whether the field is empty or not. This may be
17055	// used to include empty fields in Patch requests.
17056	ForceSendFields []string `json:"-"`
17057
17058	// NullFields is a list of field names (e.g. "EndInteraction") to
17059	// include in API requests with the JSON null value. By default, fields
17060	// with empty values are omitted from API requests. However, any field
17061	// with an empty value appearing in NullFields will be sent to the
17062	// server as null. It is an error if a field in this list has a
17063	// non-empty value. This may be used to include null fields in Patch
17064	// requests.
17065	NullFields []string `json:"-"`
17066}
17067
17068func (s *GoogleCloudDialogflowV2beta1WebhookResponse) MarshalJSON() ([]byte, error) {
17069	type NoMethod GoogleCloudDialogflowV2beta1WebhookResponse
17070	raw := NoMethod(*s)
17071	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17072}
17073
17074// GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata:
17075// Metadata for CreateDocument operation.
17076type GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata struct {
17077	// GenericMetadata: The generic information of the operation.
17078	GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
17079
17080	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
17081	// unconditionally include in API requests. By default, fields with
17082	// empty values are omitted from API requests. However, any non-pointer,
17083	// non-interface field appearing in ForceSendFields will be sent to the
17084	// server regardless of whether the field is empty or not. This may be
17085	// used to include empty fields in Patch requests.
17086	ForceSendFields []string `json:"-"`
17087
17088	// NullFields is a list of field names (e.g. "GenericMetadata") to
17089	// include in API requests with the JSON null value. By default, fields
17090	// with empty values are omitted from API requests. However, any field
17091	// with an empty value appearing in NullFields will be sent to the
17092	// server as null. It is an error if a field in this list has a
17093	// non-empty value. This may be used to include null fields in Patch
17094	// requests.
17095	NullFields []string `json:"-"`
17096}
17097
17098func (s *GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
17099	type NoMethod GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata
17100	raw := NoMethod(*s)
17101	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17102}
17103
17104// GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata:
17105// Metadata for DeleteDocument operation.
17106type GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata struct {
17107	// GenericMetadata: The generic information of the operation.
17108	GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
17109
17110	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
17111	// unconditionally include in API requests. By default, fields with
17112	// empty values are omitted from API requests. However, any non-pointer,
17113	// non-interface field appearing in ForceSendFields will be sent to the
17114	// server regardless of whether the field is empty or not. This may be
17115	// used to include empty fields in Patch requests.
17116	ForceSendFields []string `json:"-"`
17117
17118	// NullFields is a list of field names (e.g. "GenericMetadata") to
17119	// include in API requests with the JSON null value. By default, fields
17120	// with empty values are omitted from API requests. However, any field
17121	// with an empty value appearing in NullFields will be sent to the
17122	// server as null. It is an error if a field in this list has a
17123	// non-empty value. This may be used to include null fields in Patch
17124	// requests.
17125	NullFields []string `json:"-"`
17126}
17127
17128func (s *GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
17129	type NoMethod GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata
17130	raw := NoMethod(*s)
17131	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17132}
17133
17134// GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata:
17135// Metadata in google::longrunning::Operation for Knowledge operations.
17136type GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata struct {
17137	// State: Required. Output only. The current state of this operation.
17138	//
17139	// Possible values:
17140	//   "STATE_UNSPECIFIED" - State unspecified.
17141	//   "PENDING" - The operation has been created.
17142	//   "RUNNING" - The operation is currently running.
17143	//   "DONE" - The operation is done, either cancelled or completed.
17144	State string `json:"state,omitempty"`
17145
17146	// ForceSendFields is a list of field names (e.g. "State") to
17147	// unconditionally include in API requests. By default, fields with
17148	// empty values are omitted from API requests. However, any non-pointer,
17149	// non-interface field appearing in ForceSendFields will be sent to the
17150	// server regardless of whether the field is empty or not. This may be
17151	// used to include empty fields in Patch requests.
17152	ForceSendFields []string `json:"-"`
17153
17154	// NullFields is a list of field names (e.g. "State") to include in API
17155	// requests with the JSON null value. By default, fields with empty
17156	// values are omitted from API requests. However, any field with an
17157	// empty value appearing in NullFields will be sent to the server as
17158	// null. It is an error if a field in this list has a non-empty value.
17159	// This may be used to include null fields in Patch requests.
17160	NullFields []string `json:"-"`
17161}
17162
17163func (s *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) {
17164	type NoMethod GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata
17165	raw := NoMethod(*s)
17166	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17167}
17168
17169// GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata:
17170// Metadata for ImportDocuments operation.
17171type GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata struct {
17172	// GenericMetadata: The generic information of the operation.
17173	GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
17174
17175	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
17176	// unconditionally include in API requests. By default, fields with
17177	// empty values are omitted from API requests. However, any non-pointer,
17178	// non-interface field appearing in ForceSendFields will be sent to the
17179	// server regardless of whether the field is empty or not. This may be
17180	// used to include empty fields in Patch requests.
17181	ForceSendFields []string `json:"-"`
17182
17183	// NullFields is a list of field names (e.g. "GenericMetadata") to
17184	// include in API requests with the JSON null value. By default, fields
17185	// with empty values are omitted from API requests. However, any field
17186	// with an empty value appearing in NullFields will be sent to the
17187	// server as null. It is an error if a field in this list has a
17188	// non-empty value. This may be used to include null fields in Patch
17189	// requests.
17190	NullFields []string `json:"-"`
17191}
17192
17193func (s *GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) {
17194	type NoMethod GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata
17195	raw := NoMethod(*s)
17196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17197}
17198
17199// GoogleCloudDialogflowV3alpha1ImportDocumentsResponse: Response
17200// message for Documents.ImportDocuments.
17201type GoogleCloudDialogflowV3alpha1ImportDocumentsResponse struct {
17202	// Warnings: Includes details about skipped documents or any other
17203	// warnings.
17204	Warnings []*GoogleRpcStatus `json:"warnings,omitempty"`
17205
17206	// ForceSendFields is a list of field names (e.g. "Warnings") to
17207	// unconditionally include in API requests. By default, fields with
17208	// empty values are omitted from API requests. However, any non-pointer,
17209	// non-interface field appearing in ForceSendFields will be sent to the
17210	// server regardless of whether the field is empty or not. This may be
17211	// used to include empty fields in Patch requests.
17212	ForceSendFields []string `json:"-"`
17213
17214	// NullFields is a list of field names (e.g. "Warnings") to include in
17215	// API requests with the JSON null value. By default, fields with empty
17216	// values are omitted from API requests. However, any field with an
17217	// empty value appearing in NullFields will be sent to the server as
17218	// null. It is an error if a field in this list has a non-empty value.
17219	// This may be used to include null fields in Patch requests.
17220	NullFields []string `json:"-"`
17221}
17222
17223func (s *GoogleCloudDialogflowV3alpha1ImportDocumentsResponse) MarshalJSON() ([]byte, error) {
17224	type NoMethod GoogleCloudDialogflowV3alpha1ImportDocumentsResponse
17225	raw := NoMethod(*s)
17226	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17227}
17228
17229// GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata:
17230// Metadata for ReloadDocument operation.
17231type GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata struct {
17232	// GenericMetadata: The generic information of the operation.
17233	GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
17234
17235	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
17236	// unconditionally include in API requests. By default, fields with
17237	// empty values are omitted from API requests. However, any non-pointer,
17238	// non-interface field appearing in ForceSendFields will be sent to the
17239	// server regardless of whether the field is empty or not. This may be
17240	// used to include empty fields in Patch requests.
17241	ForceSendFields []string `json:"-"`
17242
17243	// NullFields is a list of field names (e.g. "GenericMetadata") to
17244	// include in API requests with the JSON null value. By default, fields
17245	// with empty values are omitted from API requests. However, any field
17246	// with an empty value appearing in NullFields will be sent to the
17247	// server as null. It is an error if a field in this list has a
17248	// non-empty value. This may be used to include null fields in Patch
17249	// requests.
17250	NullFields []string `json:"-"`
17251}
17252
17253func (s *GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
17254	type NoMethod GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata
17255	raw := NoMethod(*s)
17256	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17257}
17258
17259// GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata:
17260// Metadata for UpdateDocument operation.
17261type GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata struct {
17262	// GenericMetadata: The generic information of the operation.
17263	GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"`
17264
17265	// ForceSendFields is a list of field names (e.g. "GenericMetadata") to
17266	// unconditionally include in API requests. By default, fields with
17267	// empty values are omitted from API requests. However, any non-pointer,
17268	// non-interface field appearing in ForceSendFields will be sent to the
17269	// server regardless of whether the field is empty or not. This may be
17270	// used to include empty fields in Patch requests.
17271	ForceSendFields []string `json:"-"`
17272
17273	// NullFields is a list of field names (e.g. "GenericMetadata") to
17274	// include in API requests with the JSON null value. By default, fields
17275	// with empty values are omitted from API requests. However, any field
17276	// with an empty value appearing in NullFields will be sent to the
17277	// server as null. It is an error if a field in this list has a
17278	// non-empty value. This may be used to include null fields in Patch
17279	// requests.
17280	NullFields []string `json:"-"`
17281}
17282
17283func (s *GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) {
17284	type NoMethod GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata
17285	raw := NoMethod(*s)
17286	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17287}
17288
17289// GoogleLongrunningListOperationsResponse: The response message for
17290// Operations.ListOperations.
17291type GoogleLongrunningListOperationsResponse struct {
17292	// NextPageToken: The standard List next-page token.
17293	NextPageToken string `json:"nextPageToken,omitempty"`
17294
17295	// Operations: A list of operations that matches the specified filter in
17296	// the request.
17297	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
17298
17299	// ServerResponse contains the HTTP response code and headers from the
17300	// server.
17301	googleapi.ServerResponse `json:"-"`
17302
17303	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
17304	// unconditionally include in API requests. By default, fields with
17305	// empty values are omitted from API requests. However, any non-pointer,
17306	// non-interface field appearing in ForceSendFields will be sent to the
17307	// server regardless of whether the field is empty or not. This may be
17308	// used to include empty fields in Patch requests.
17309	ForceSendFields []string `json:"-"`
17310
17311	// NullFields is a list of field names (e.g. "NextPageToken") to include
17312	// in API requests with the JSON null value. By default, fields with
17313	// empty values are omitted from API requests. However, any field with
17314	// an empty value appearing in NullFields will be sent to the server as
17315	// null. It is an error if a field in this list has a non-empty value.
17316	// This may be used to include null fields in Patch requests.
17317	NullFields []string `json:"-"`
17318}
17319
17320func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
17321	type NoMethod GoogleLongrunningListOperationsResponse
17322	raw := NoMethod(*s)
17323	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17324}
17325
17326// GoogleLongrunningOperation: This resource represents a long-running
17327// operation that is the result of a network API call.
17328type GoogleLongrunningOperation struct {
17329	// Done: If the value is `false`, it means the operation is still in
17330	// progress. If `true`, the operation is completed, and either `error`
17331	// or `response` is available.
17332	Done bool `json:"done,omitempty"`
17333
17334	// Error: The error result of the operation in case of failure or
17335	// cancellation.
17336	Error *GoogleRpcStatus `json:"error,omitempty"`
17337
17338	// Metadata: Service-specific metadata associated with the operation. It
17339	// typically contains progress information and common metadata such as
17340	// create time. Some services might not provide such metadata. Any
17341	// method that returns a long-running operation should document the
17342	// metadata type, if any.
17343	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
17344
17345	// Name: The server-assigned name, which is only unique within the same
17346	// service that originally returns it. If you use the default HTTP
17347	// mapping, the `name` should be a resource name ending with
17348	// `operations/{unique_id}`.
17349	Name string `json:"name,omitempty"`
17350
17351	// Response: The normal response of the operation in case of success. If
17352	// the original method returns no data on success, such as `Delete`, the
17353	// response is `google.protobuf.Empty`. If the original method is
17354	// standard `Get`/`Create`/`Update`, the response should be the
17355	// resource. For other methods, the response should have the type
17356	// `XxxResponse`, where `Xxx` is the original method name. For example,
17357	// if the original method name is `TakeSnapshot()`, the inferred
17358	// response type is `TakeSnapshotResponse`.
17359	Response googleapi.RawMessage `json:"response,omitempty"`
17360
17361	// ServerResponse contains the HTTP response code and headers from the
17362	// server.
17363	googleapi.ServerResponse `json:"-"`
17364
17365	// ForceSendFields is a list of field names (e.g. "Done") to
17366	// unconditionally include in API requests. By default, fields with
17367	// empty values are omitted from API requests. However, any non-pointer,
17368	// non-interface field appearing in ForceSendFields will be sent to the
17369	// server regardless of whether the field is empty or not. This may be
17370	// used to include empty fields in Patch requests.
17371	ForceSendFields []string `json:"-"`
17372
17373	// NullFields is a list of field names (e.g. "Done") to include in API
17374	// requests with the JSON null value. By default, fields with empty
17375	// values are omitted from API requests. However, any field with an
17376	// empty value appearing in NullFields will be sent to the server as
17377	// null. It is an error if a field in this list has a non-empty value.
17378	// This may be used to include null fields in Patch requests.
17379	NullFields []string `json:"-"`
17380}
17381
17382func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
17383	type NoMethod GoogleLongrunningOperation
17384	raw := NoMethod(*s)
17385	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17386}
17387
17388// GoogleProtobufEmpty: A generic empty message that you can re-use to
17389// avoid defining duplicated empty messages in your APIs. A typical
17390// example is to use it as the request or the response type of an API
17391// method. For instance: service Foo { rpc Bar(google.protobuf.Empty)
17392// returns (google.protobuf.Empty); } The JSON representation for
17393// `Empty` is empty JSON object `{}`.
17394type GoogleProtobufEmpty struct {
17395	// ServerResponse contains the HTTP response code and headers from the
17396	// server.
17397	googleapi.ServerResponse `json:"-"`
17398}
17399
17400// GoogleRpcStatus: The `Status` type defines a logical error model that
17401// is suitable for different programming environments, including REST
17402// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
17403// `Status` message contains three pieces of data: error code, error
17404// message, and error details. You can find out more about this error
17405// model and how to work with it in the API Design Guide
17406// (https://cloud.google.com/apis/design/errors).
17407type GoogleRpcStatus struct {
17408	// Code: The status code, which should be an enum value of
17409	// google.rpc.Code.
17410	Code int64 `json:"code,omitempty"`
17411
17412	// Details: A list of messages that carry the error details. There is a
17413	// common set of message types for APIs to use.
17414	Details []googleapi.RawMessage `json:"details,omitempty"`
17415
17416	// Message: A developer-facing error message, which should be in
17417	// English. Any user-facing error message should be localized and sent
17418	// in the google.rpc.Status.details field, or localized by the client.
17419	Message string `json:"message,omitempty"`
17420
17421	// ForceSendFields is a list of field names (e.g. "Code") to
17422	// unconditionally include in API requests. By default, fields with
17423	// empty values are omitted from API requests. However, any non-pointer,
17424	// non-interface field appearing in ForceSendFields will be sent to the
17425	// server regardless of whether the field is empty or not. This may be
17426	// used to include empty fields in Patch requests.
17427	ForceSendFields []string `json:"-"`
17428
17429	// NullFields is a list of field names (e.g. "Code") to include in API
17430	// requests with the JSON null value. By default, fields with empty
17431	// values are omitted from API requests. However, any field with an
17432	// empty value appearing in NullFields will be sent to the server as
17433	// null. It is an error if a field in this list has a non-empty value.
17434	// This may be used to include null fields in Patch requests.
17435	NullFields []string `json:"-"`
17436}
17437
17438func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
17439	type NoMethod GoogleRpcStatus
17440	raw := NoMethod(*s)
17441	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17442}
17443
17444// GoogleTypeLatLng: An object that represents a latitude/longitude
17445// pair. This is expressed as a pair of doubles to represent degrees
17446// latitude and degrees longitude. Unless specified otherwise, this
17447// object must conform to the WGS84 standard. Values must be within
17448// normalized ranges.
17449type GoogleTypeLatLng struct {
17450	// Latitude: The latitude in degrees. It must be in the range [-90.0,
17451	// +90.0].
17452	Latitude float64 `json:"latitude,omitempty"`
17453
17454	// Longitude: The longitude in degrees. It must be in the range [-180.0,
17455	// +180.0].
17456	Longitude float64 `json:"longitude,omitempty"`
17457
17458	// ForceSendFields is a list of field names (e.g. "Latitude") to
17459	// unconditionally include in API requests. By default, fields with
17460	// empty values are omitted from API requests. However, any non-pointer,
17461	// non-interface field appearing in ForceSendFields will be sent to the
17462	// server regardless of whether the field is empty or not. This may be
17463	// used to include empty fields in Patch requests.
17464	ForceSendFields []string `json:"-"`
17465
17466	// NullFields is a list of field names (e.g. "Latitude") to include in
17467	// API requests with the JSON null value. By default, fields with empty
17468	// values are omitted from API requests. However, any field with an
17469	// empty value appearing in NullFields will be sent to the server as
17470	// null. It is an error if a field in this list has a non-empty value.
17471	// This may be used to include null fields in Patch requests.
17472	NullFields []string `json:"-"`
17473}
17474
17475func (s *GoogleTypeLatLng) MarshalJSON() ([]byte, error) {
17476	type NoMethod GoogleTypeLatLng
17477	raw := NoMethod(*s)
17478	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17479}
17480
17481func (s *GoogleTypeLatLng) UnmarshalJSON(data []byte) error {
17482	type NoMethod GoogleTypeLatLng
17483	var s1 struct {
17484		Latitude  gensupport.JSONFloat64 `json:"latitude"`
17485		Longitude gensupport.JSONFloat64 `json:"longitude"`
17486		*NoMethod
17487	}
17488	s1.NoMethod = (*NoMethod)(s)
17489	if err := json.Unmarshal(data, &s1); err != nil {
17490		return err
17491	}
17492	s.Latitude = float64(s1.Latitude)
17493	s.Longitude = float64(s1.Longitude)
17494	return nil
17495}
17496
17497// method id "dialogflow.projects.deleteAgent":
17498
17499type ProjectsDeleteAgentCall struct {
17500	s          *Service
17501	parent     string
17502	urlParams_ gensupport.URLParams
17503	ctx_       context.Context
17504	header_    http.Header
17505}
17506
17507// DeleteAgent: Deletes the specified agent.
17508//
17509// - parent: The project that the agent to delete is associated with.
17510//   Format: `projects/`.
17511func (r *ProjectsService) DeleteAgent(parent string) *ProjectsDeleteAgentCall {
17512	c := &ProjectsDeleteAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17513	c.parent = parent
17514	return c
17515}
17516
17517// Fields allows partial responses to be retrieved. See
17518// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17519// for more information.
17520func (c *ProjectsDeleteAgentCall) Fields(s ...googleapi.Field) *ProjectsDeleteAgentCall {
17521	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17522	return c
17523}
17524
17525// Context sets the context to be used in this call's Do method. Any
17526// pending HTTP request will be aborted if the provided context is
17527// canceled.
17528func (c *ProjectsDeleteAgentCall) Context(ctx context.Context) *ProjectsDeleteAgentCall {
17529	c.ctx_ = ctx
17530	return c
17531}
17532
17533// Header returns an http.Header that can be modified by the caller to
17534// add HTTP headers to the request.
17535func (c *ProjectsDeleteAgentCall) Header() http.Header {
17536	if c.header_ == nil {
17537		c.header_ = make(http.Header)
17538	}
17539	return c.header_
17540}
17541
17542func (c *ProjectsDeleteAgentCall) doRequest(alt string) (*http.Response, error) {
17543	reqHeaders := make(http.Header)
17544	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
17545	for k, v := range c.header_ {
17546		reqHeaders[k] = v
17547	}
17548	reqHeaders.Set("User-Agent", c.s.userAgent())
17549	var body io.Reader = nil
17550	c.urlParams_.Set("alt", alt)
17551	c.urlParams_.Set("prettyPrint", "false")
17552	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent")
17553	urls += "?" + c.urlParams_.Encode()
17554	req, err := http.NewRequest("DELETE", urls, body)
17555	if err != nil {
17556		return nil, err
17557	}
17558	req.Header = reqHeaders
17559	googleapi.Expand(req.URL, map[string]string{
17560		"parent": c.parent,
17561	})
17562	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17563}
17564
17565// Do executes the "dialogflow.projects.deleteAgent" call.
17566// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
17567// non-2xx status code is an error. Response headers are in either
17568// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
17569// returned at all) in error.(*googleapi.Error).Header. Use
17570// googleapi.IsNotModified to check whether the returned error was
17571// because http.StatusNotModified was returned.
17572func (c *ProjectsDeleteAgentCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
17573	gensupport.SetOptions(c.urlParams_, opts...)
17574	res, err := c.doRequest("json")
17575	if res != nil && res.StatusCode == http.StatusNotModified {
17576		if res.Body != nil {
17577			res.Body.Close()
17578		}
17579		return nil, &googleapi.Error{
17580			Code:   res.StatusCode,
17581			Header: res.Header,
17582		}
17583	}
17584	if err != nil {
17585		return nil, err
17586	}
17587	defer googleapi.CloseBody(res)
17588	if err := googleapi.CheckResponse(res); err != nil {
17589		return nil, err
17590	}
17591	ret := &GoogleProtobufEmpty{
17592		ServerResponse: googleapi.ServerResponse{
17593			Header:         res.Header,
17594			HTTPStatusCode: res.StatusCode,
17595		},
17596	}
17597	target := &ret
17598	if err := gensupport.DecodeResponse(target, res); err != nil {
17599		return nil, err
17600	}
17601	return ret, nil
17602	// {
17603	//   "description": "Deletes the specified agent.",
17604	//   "flatPath": "v2/projects/{projectsId}/agent",
17605	//   "httpMethod": "DELETE",
17606	//   "id": "dialogflow.projects.deleteAgent",
17607	//   "parameterOrder": [
17608	//     "parent"
17609	//   ],
17610	//   "parameters": {
17611	//     "parent": {
17612	//       "description": "Required. The project that the agent to delete is associated with. Format: `projects/`.",
17613	//       "location": "path",
17614	//       "pattern": "^projects/[^/]+$",
17615	//       "required": true,
17616	//       "type": "string"
17617	//     }
17618	//   },
17619	//   "path": "v2/{+parent}/agent",
17620	//   "response": {
17621	//     "$ref": "GoogleProtobufEmpty"
17622	//   },
17623	//   "scopes": [
17624	//     "https://www.googleapis.com/auth/cloud-platform",
17625	//     "https://www.googleapis.com/auth/dialogflow"
17626	//   ]
17627	// }
17628
17629}
17630
17631// method id "dialogflow.projects.getAgent":
17632
17633type ProjectsGetAgentCall struct {
17634	s            *Service
17635	parent       string
17636	urlParams_   gensupport.URLParams
17637	ifNoneMatch_ string
17638	ctx_         context.Context
17639	header_      http.Header
17640}
17641
17642// GetAgent: Retrieves the specified agent.
17643//
17644// - parent: The project that the agent to fetch is associated with.
17645//   Format: `projects/`.
17646func (r *ProjectsService) GetAgent(parent string) *ProjectsGetAgentCall {
17647	c := &ProjectsGetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17648	c.parent = parent
17649	return c
17650}
17651
17652// Fields allows partial responses to be retrieved. See
17653// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17654// for more information.
17655func (c *ProjectsGetAgentCall) Fields(s ...googleapi.Field) *ProjectsGetAgentCall {
17656	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17657	return c
17658}
17659
17660// IfNoneMatch sets the optional parameter which makes the operation
17661// fail if the object's ETag matches the given value. This is useful for
17662// getting updates only after the object has changed since the last
17663// request. Use googleapi.IsNotModified to check whether the response
17664// error from Do is the result of In-None-Match.
17665func (c *ProjectsGetAgentCall) IfNoneMatch(entityTag string) *ProjectsGetAgentCall {
17666	c.ifNoneMatch_ = entityTag
17667	return c
17668}
17669
17670// Context sets the context to be used in this call's Do method. Any
17671// pending HTTP request will be aborted if the provided context is
17672// canceled.
17673func (c *ProjectsGetAgentCall) Context(ctx context.Context) *ProjectsGetAgentCall {
17674	c.ctx_ = ctx
17675	return c
17676}
17677
17678// Header returns an http.Header that can be modified by the caller to
17679// add HTTP headers to the request.
17680func (c *ProjectsGetAgentCall) Header() http.Header {
17681	if c.header_ == nil {
17682		c.header_ = make(http.Header)
17683	}
17684	return c.header_
17685}
17686
17687func (c *ProjectsGetAgentCall) doRequest(alt string) (*http.Response, error) {
17688	reqHeaders := make(http.Header)
17689	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
17690	for k, v := range c.header_ {
17691		reqHeaders[k] = v
17692	}
17693	reqHeaders.Set("User-Agent", c.s.userAgent())
17694	if c.ifNoneMatch_ != "" {
17695		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17696	}
17697	var body io.Reader = nil
17698	c.urlParams_.Set("alt", alt)
17699	c.urlParams_.Set("prettyPrint", "false")
17700	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent")
17701	urls += "?" + c.urlParams_.Encode()
17702	req, err := http.NewRequest("GET", urls, body)
17703	if err != nil {
17704		return nil, err
17705	}
17706	req.Header = reqHeaders
17707	googleapi.Expand(req.URL, map[string]string{
17708		"parent": c.parent,
17709	})
17710	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17711}
17712
17713// Do executes the "dialogflow.projects.getAgent" call.
17714// Exactly one of *GoogleCloudDialogflowV2Agent or error will be
17715// non-nil. Any non-2xx status code is an error. Response headers are in
17716// either *GoogleCloudDialogflowV2Agent.ServerResponse.Header or (if a
17717// response was returned at all) in error.(*googleapi.Error).Header. Use
17718// googleapi.IsNotModified to check whether the returned error was
17719// because http.StatusNotModified was returned.
17720func (c *ProjectsGetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Agent, error) {
17721	gensupport.SetOptions(c.urlParams_, opts...)
17722	res, err := c.doRequest("json")
17723	if res != nil && res.StatusCode == http.StatusNotModified {
17724		if res.Body != nil {
17725			res.Body.Close()
17726		}
17727		return nil, &googleapi.Error{
17728			Code:   res.StatusCode,
17729			Header: res.Header,
17730		}
17731	}
17732	if err != nil {
17733		return nil, err
17734	}
17735	defer googleapi.CloseBody(res)
17736	if err := googleapi.CheckResponse(res); err != nil {
17737		return nil, err
17738	}
17739	ret := &GoogleCloudDialogflowV2Agent{
17740		ServerResponse: googleapi.ServerResponse{
17741			Header:         res.Header,
17742			HTTPStatusCode: res.StatusCode,
17743		},
17744	}
17745	target := &ret
17746	if err := gensupport.DecodeResponse(target, res); err != nil {
17747		return nil, err
17748	}
17749	return ret, nil
17750	// {
17751	//   "description": "Retrieves the specified agent.",
17752	//   "flatPath": "v2/projects/{projectsId}/agent",
17753	//   "httpMethod": "GET",
17754	//   "id": "dialogflow.projects.getAgent",
17755	//   "parameterOrder": [
17756	//     "parent"
17757	//   ],
17758	//   "parameters": {
17759	//     "parent": {
17760	//       "description": "Required. The project that the agent to fetch is associated with. Format: `projects/`.",
17761	//       "location": "path",
17762	//       "pattern": "^projects/[^/]+$",
17763	//       "required": true,
17764	//       "type": "string"
17765	//     }
17766	//   },
17767	//   "path": "v2/{+parent}/agent",
17768	//   "response": {
17769	//     "$ref": "GoogleCloudDialogflowV2Agent"
17770	//   },
17771	//   "scopes": [
17772	//     "https://www.googleapis.com/auth/cloud-platform",
17773	//     "https://www.googleapis.com/auth/dialogflow"
17774	//   ]
17775	// }
17776
17777}
17778
17779// method id "dialogflow.projects.setAgent":
17780
17781type ProjectsSetAgentCall struct {
17782	s                            *Service
17783	parent                       string
17784	googleclouddialogflowv2agent *GoogleCloudDialogflowV2Agent
17785	urlParams_                   gensupport.URLParams
17786	ctx_                         context.Context
17787	header_                      http.Header
17788}
17789
17790// SetAgent: Creates/updates the specified agent. Note: You should
17791// always train an agent prior to sending it queries. See the training
17792// documentation (https://cloud.google.com/dialogflow/es/docs/training).
17793//
17794// - parent: The project of this agent. Format: `projects/`.
17795func (r *ProjectsService) SetAgent(parent string, googleclouddialogflowv2agent *GoogleCloudDialogflowV2Agent) *ProjectsSetAgentCall {
17796	c := &ProjectsSetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17797	c.parent = parent
17798	c.googleclouddialogflowv2agent = googleclouddialogflowv2agent
17799	return c
17800}
17801
17802// UpdateMask sets the optional parameter "updateMask": The mask to
17803// control which fields get updated.
17804func (c *ProjectsSetAgentCall) UpdateMask(updateMask string) *ProjectsSetAgentCall {
17805	c.urlParams_.Set("updateMask", updateMask)
17806	return c
17807}
17808
17809// Fields allows partial responses to be retrieved. See
17810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17811// for more information.
17812func (c *ProjectsSetAgentCall) Fields(s ...googleapi.Field) *ProjectsSetAgentCall {
17813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17814	return c
17815}
17816
17817// Context sets the context to be used in this call's Do method. Any
17818// pending HTTP request will be aborted if the provided context is
17819// canceled.
17820func (c *ProjectsSetAgentCall) Context(ctx context.Context) *ProjectsSetAgentCall {
17821	c.ctx_ = ctx
17822	return c
17823}
17824
17825// Header returns an http.Header that can be modified by the caller to
17826// add HTTP headers to the request.
17827func (c *ProjectsSetAgentCall) Header() http.Header {
17828	if c.header_ == nil {
17829		c.header_ = make(http.Header)
17830	}
17831	return c.header_
17832}
17833
17834func (c *ProjectsSetAgentCall) doRequest(alt string) (*http.Response, error) {
17835	reqHeaders := make(http.Header)
17836	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
17837	for k, v := range c.header_ {
17838		reqHeaders[k] = v
17839	}
17840	reqHeaders.Set("User-Agent", c.s.userAgent())
17841	var body io.Reader = nil
17842	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2agent)
17843	if err != nil {
17844		return nil, err
17845	}
17846	reqHeaders.Set("Content-Type", "application/json")
17847	c.urlParams_.Set("alt", alt)
17848	c.urlParams_.Set("prettyPrint", "false")
17849	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent")
17850	urls += "?" + c.urlParams_.Encode()
17851	req, err := http.NewRequest("POST", urls, body)
17852	if err != nil {
17853		return nil, err
17854	}
17855	req.Header = reqHeaders
17856	googleapi.Expand(req.URL, map[string]string{
17857		"parent": c.parent,
17858	})
17859	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17860}
17861
17862// Do executes the "dialogflow.projects.setAgent" call.
17863// Exactly one of *GoogleCloudDialogflowV2Agent or error will be
17864// non-nil. Any non-2xx status code is an error. Response headers are in
17865// either *GoogleCloudDialogflowV2Agent.ServerResponse.Header or (if a
17866// response was returned at all) in error.(*googleapi.Error).Header. Use
17867// googleapi.IsNotModified to check whether the returned error was
17868// because http.StatusNotModified was returned.
17869func (c *ProjectsSetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Agent, error) {
17870	gensupport.SetOptions(c.urlParams_, opts...)
17871	res, err := c.doRequest("json")
17872	if res != nil && res.StatusCode == http.StatusNotModified {
17873		if res.Body != nil {
17874			res.Body.Close()
17875		}
17876		return nil, &googleapi.Error{
17877			Code:   res.StatusCode,
17878			Header: res.Header,
17879		}
17880	}
17881	if err != nil {
17882		return nil, err
17883	}
17884	defer googleapi.CloseBody(res)
17885	if err := googleapi.CheckResponse(res); err != nil {
17886		return nil, err
17887	}
17888	ret := &GoogleCloudDialogflowV2Agent{
17889		ServerResponse: googleapi.ServerResponse{
17890			Header:         res.Header,
17891			HTTPStatusCode: res.StatusCode,
17892		},
17893	}
17894	target := &ret
17895	if err := gensupport.DecodeResponse(target, res); err != nil {
17896		return nil, err
17897	}
17898	return ret, nil
17899	// {
17900	//   "description": "Creates/updates the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
17901	//   "flatPath": "v2/projects/{projectsId}/agent",
17902	//   "httpMethod": "POST",
17903	//   "id": "dialogflow.projects.setAgent",
17904	//   "parameterOrder": [
17905	//     "parent"
17906	//   ],
17907	//   "parameters": {
17908	//     "parent": {
17909	//       "description": "Required. The project of this agent. Format: `projects/`.",
17910	//       "location": "path",
17911	//       "pattern": "^projects/[^/]+$",
17912	//       "required": true,
17913	//       "type": "string"
17914	//     },
17915	//     "updateMask": {
17916	//       "description": "Optional. The mask to control which fields get updated.",
17917	//       "format": "google-fieldmask",
17918	//       "location": "query",
17919	//       "type": "string"
17920	//     }
17921	//   },
17922	//   "path": "v2/{+parent}/agent",
17923	//   "request": {
17924	//     "$ref": "GoogleCloudDialogflowV2Agent"
17925	//   },
17926	//   "response": {
17927	//     "$ref": "GoogleCloudDialogflowV2Agent"
17928	//   },
17929	//   "scopes": [
17930	//     "https://www.googleapis.com/auth/cloud-platform",
17931	//     "https://www.googleapis.com/auth/dialogflow"
17932	//   ]
17933	// }
17934
17935}
17936
17937// method id "dialogflow.projects.agent.export":
17938
17939type ProjectsAgentExportCall struct {
17940	s                                         *Service
17941	parent                                    string
17942	googleclouddialogflowv2exportagentrequest *GoogleCloudDialogflowV2ExportAgentRequest
17943	urlParams_                                gensupport.URLParams
17944	ctx_                                      context.Context
17945	header_                                   http.Header
17946}
17947
17948// Export: Exports the specified agent to a ZIP file.
17949//
17950// - parent: The project that the agent to export is associated with.
17951//   Format: `projects/`.
17952func (r *ProjectsAgentService) Export(parent string, googleclouddialogflowv2exportagentrequest *GoogleCloudDialogflowV2ExportAgentRequest) *ProjectsAgentExportCall {
17953	c := &ProjectsAgentExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17954	c.parent = parent
17955	c.googleclouddialogflowv2exportagentrequest = googleclouddialogflowv2exportagentrequest
17956	return c
17957}
17958
17959// Fields allows partial responses to be retrieved. See
17960// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17961// for more information.
17962func (c *ProjectsAgentExportCall) Fields(s ...googleapi.Field) *ProjectsAgentExportCall {
17963	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17964	return c
17965}
17966
17967// Context sets the context to be used in this call's Do method. Any
17968// pending HTTP request will be aborted if the provided context is
17969// canceled.
17970func (c *ProjectsAgentExportCall) Context(ctx context.Context) *ProjectsAgentExportCall {
17971	c.ctx_ = ctx
17972	return c
17973}
17974
17975// Header returns an http.Header that can be modified by the caller to
17976// add HTTP headers to the request.
17977func (c *ProjectsAgentExportCall) Header() http.Header {
17978	if c.header_ == nil {
17979		c.header_ = make(http.Header)
17980	}
17981	return c.header_
17982}
17983
17984func (c *ProjectsAgentExportCall) doRequest(alt string) (*http.Response, error) {
17985	reqHeaders := make(http.Header)
17986	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
17987	for k, v := range c.header_ {
17988		reqHeaders[k] = v
17989	}
17990	reqHeaders.Set("User-Agent", c.s.userAgent())
17991	var body io.Reader = nil
17992	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2exportagentrequest)
17993	if err != nil {
17994		return nil, err
17995	}
17996	reqHeaders.Set("Content-Type", "application/json")
17997	c.urlParams_.Set("alt", alt)
17998	c.urlParams_.Set("prettyPrint", "false")
17999	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:export")
18000	urls += "?" + c.urlParams_.Encode()
18001	req, err := http.NewRequest("POST", urls, body)
18002	if err != nil {
18003		return nil, err
18004	}
18005	req.Header = reqHeaders
18006	googleapi.Expand(req.URL, map[string]string{
18007		"parent": c.parent,
18008	})
18009	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18010}
18011
18012// Do executes the "dialogflow.projects.agent.export" call.
18013// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
18014// Any non-2xx status code is an error. Response headers are in either
18015// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
18016// was returned at all) in error.(*googleapi.Error).Header. Use
18017// googleapi.IsNotModified to check whether the returned error was
18018// because http.StatusNotModified was returned.
18019func (c *ProjectsAgentExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
18020	gensupport.SetOptions(c.urlParams_, opts...)
18021	res, err := c.doRequest("json")
18022	if res != nil && res.StatusCode == http.StatusNotModified {
18023		if res.Body != nil {
18024			res.Body.Close()
18025		}
18026		return nil, &googleapi.Error{
18027			Code:   res.StatusCode,
18028			Header: res.Header,
18029		}
18030	}
18031	if err != nil {
18032		return nil, err
18033	}
18034	defer googleapi.CloseBody(res)
18035	if err := googleapi.CheckResponse(res); err != nil {
18036		return nil, err
18037	}
18038	ret := &GoogleLongrunningOperation{
18039		ServerResponse: googleapi.ServerResponse{
18040			Header:         res.Header,
18041			HTTPStatusCode: res.StatusCode,
18042		},
18043	}
18044	target := &ret
18045	if err := gensupport.DecodeResponse(target, res); err != nil {
18046		return nil, err
18047	}
18048	return ret, nil
18049	// {
18050	//   "description": "Exports the specified agent to a ZIP file.",
18051	//   "flatPath": "v2/projects/{projectsId}/agent:export",
18052	//   "httpMethod": "POST",
18053	//   "id": "dialogflow.projects.agent.export",
18054	//   "parameterOrder": [
18055	//     "parent"
18056	//   ],
18057	//   "parameters": {
18058	//     "parent": {
18059	//       "description": "Required. The project that the agent to export is associated with. Format: `projects/`.",
18060	//       "location": "path",
18061	//       "pattern": "^projects/[^/]+$",
18062	//       "required": true,
18063	//       "type": "string"
18064	//     }
18065	//   },
18066	//   "path": "v2/{+parent}/agent:export",
18067	//   "request": {
18068	//     "$ref": "GoogleCloudDialogflowV2ExportAgentRequest"
18069	//   },
18070	//   "response": {
18071	//     "$ref": "GoogleLongrunningOperation"
18072	//   },
18073	//   "scopes": [
18074	//     "https://www.googleapis.com/auth/cloud-platform",
18075	//     "https://www.googleapis.com/auth/dialogflow"
18076	//   ]
18077	// }
18078
18079}
18080
18081// method id "dialogflow.projects.agent.getFulfillment":
18082
18083type ProjectsAgentGetFulfillmentCall struct {
18084	s            *Service
18085	name         string
18086	urlParams_   gensupport.URLParams
18087	ifNoneMatch_ string
18088	ctx_         context.Context
18089	header_      http.Header
18090}
18091
18092// GetFulfillment: Retrieves the fulfillment.
18093//
18094// - name: The name of the fulfillment. Format:
18095//   `projects//agent/fulfillment`.
18096func (r *ProjectsAgentService) GetFulfillment(name string) *ProjectsAgentGetFulfillmentCall {
18097	c := &ProjectsAgentGetFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18098	c.name = name
18099	return c
18100}
18101
18102// Fields allows partial responses to be retrieved. See
18103// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18104// for more information.
18105func (c *ProjectsAgentGetFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsAgentGetFulfillmentCall {
18106	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18107	return c
18108}
18109
18110// IfNoneMatch sets the optional parameter which makes the operation
18111// fail if the object's ETag matches the given value. This is useful for
18112// getting updates only after the object has changed since the last
18113// request. Use googleapi.IsNotModified to check whether the response
18114// error from Do is the result of In-None-Match.
18115func (c *ProjectsAgentGetFulfillmentCall) IfNoneMatch(entityTag string) *ProjectsAgentGetFulfillmentCall {
18116	c.ifNoneMatch_ = entityTag
18117	return c
18118}
18119
18120// Context sets the context to be used in this call's Do method. Any
18121// pending HTTP request will be aborted if the provided context is
18122// canceled.
18123func (c *ProjectsAgentGetFulfillmentCall) Context(ctx context.Context) *ProjectsAgentGetFulfillmentCall {
18124	c.ctx_ = ctx
18125	return c
18126}
18127
18128// Header returns an http.Header that can be modified by the caller to
18129// add HTTP headers to the request.
18130func (c *ProjectsAgentGetFulfillmentCall) Header() http.Header {
18131	if c.header_ == nil {
18132		c.header_ = make(http.Header)
18133	}
18134	return c.header_
18135}
18136
18137func (c *ProjectsAgentGetFulfillmentCall) doRequest(alt string) (*http.Response, error) {
18138	reqHeaders := make(http.Header)
18139	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
18140	for k, v := range c.header_ {
18141		reqHeaders[k] = v
18142	}
18143	reqHeaders.Set("User-Agent", c.s.userAgent())
18144	if c.ifNoneMatch_ != "" {
18145		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18146	}
18147	var body io.Reader = nil
18148	c.urlParams_.Set("alt", alt)
18149	c.urlParams_.Set("prettyPrint", "false")
18150	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
18151	urls += "?" + c.urlParams_.Encode()
18152	req, err := http.NewRequest("GET", urls, body)
18153	if err != nil {
18154		return nil, err
18155	}
18156	req.Header = reqHeaders
18157	googleapi.Expand(req.URL, map[string]string{
18158		"name": c.name,
18159	})
18160	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18161}
18162
18163// Do executes the "dialogflow.projects.agent.getFulfillment" call.
18164// Exactly one of *GoogleCloudDialogflowV2Fulfillment or error will be
18165// non-nil. Any non-2xx status code is an error. Response headers are in
18166// either *GoogleCloudDialogflowV2Fulfillment.ServerResponse.Header or
18167// (if a response was returned at all) in
18168// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18169// whether the returned error was because http.StatusNotModified was
18170// returned.
18171func (c *ProjectsAgentGetFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Fulfillment, error) {
18172	gensupport.SetOptions(c.urlParams_, opts...)
18173	res, err := c.doRequest("json")
18174	if res != nil && res.StatusCode == http.StatusNotModified {
18175		if res.Body != nil {
18176			res.Body.Close()
18177		}
18178		return nil, &googleapi.Error{
18179			Code:   res.StatusCode,
18180			Header: res.Header,
18181		}
18182	}
18183	if err != nil {
18184		return nil, err
18185	}
18186	defer googleapi.CloseBody(res)
18187	if err := googleapi.CheckResponse(res); err != nil {
18188		return nil, err
18189	}
18190	ret := &GoogleCloudDialogflowV2Fulfillment{
18191		ServerResponse: googleapi.ServerResponse{
18192			Header:         res.Header,
18193			HTTPStatusCode: res.StatusCode,
18194		},
18195	}
18196	target := &ret
18197	if err := gensupport.DecodeResponse(target, res); err != nil {
18198		return nil, err
18199	}
18200	return ret, nil
18201	// {
18202	//   "description": "Retrieves the fulfillment.",
18203	//   "flatPath": "v2/projects/{projectsId}/agent/fulfillment",
18204	//   "httpMethod": "GET",
18205	//   "id": "dialogflow.projects.agent.getFulfillment",
18206	//   "parameterOrder": [
18207	//     "name"
18208	//   ],
18209	//   "parameters": {
18210	//     "name": {
18211	//       "description": "Required. The name of the fulfillment. Format: `projects//agent/fulfillment`.",
18212	//       "location": "path",
18213	//       "pattern": "^projects/[^/]+/agent/fulfillment$",
18214	//       "required": true,
18215	//       "type": "string"
18216	//     }
18217	//   },
18218	//   "path": "v2/{+name}",
18219	//   "response": {
18220	//     "$ref": "GoogleCloudDialogflowV2Fulfillment"
18221	//   },
18222	//   "scopes": [
18223	//     "https://www.googleapis.com/auth/cloud-platform",
18224	//     "https://www.googleapis.com/auth/dialogflow"
18225	//   ]
18226	// }
18227
18228}
18229
18230// method id "dialogflow.projects.agent.getValidationResult":
18231
18232type ProjectsAgentGetValidationResultCall struct {
18233	s            *Service
18234	parent       string
18235	urlParams_   gensupport.URLParams
18236	ifNoneMatch_ string
18237	ctx_         context.Context
18238	header_      http.Header
18239}
18240
18241// GetValidationResult: Gets agent validation result. Agent validation
18242// is performed during training time and is updated automatically when
18243// training is completed.
18244//
18245// - parent: The project that the agent is associated with. Format:
18246//   `projects/`.
18247func (r *ProjectsAgentService) GetValidationResult(parent string) *ProjectsAgentGetValidationResultCall {
18248	c := &ProjectsAgentGetValidationResultCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18249	c.parent = parent
18250	return c
18251}
18252
18253// LanguageCode sets the optional parameter "languageCode": The language
18254// for which you want a validation result. If not specified, the agent's
18255// default language is used. Many languages
18256// (https://cloud.google.com/dialogflow/docs/reference/language) are
18257// supported. Note: languages must be enabled in the agent before they
18258// can be used.
18259func (c *ProjectsAgentGetValidationResultCall) LanguageCode(languageCode string) *ProjectsAgentGetValidationResultCall {
18260	c.urlParams_.Set("languageCode", languageCode)
18261	return c
18262}
18263
18264// Fields allows partial responses to be retrieved. See
18265// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18266// for more information.
18267func (c *ProjectsAgentGetValidationResultCall) Fields(s ...googleapi.Field) *ProjectsAgentGetValidationResultCall {
18268	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18269	return c
18270}
18271
18272// IfNoneMatch sets the optional parameter which makes the operation
18273// fail if the object's ETag matches the given value. This is useful for
18274// getting updates only after the object has changed since the last
18275// request. Use googleapi.IsNotModified to check whether the response
18276// error from Do is the result of In-None-Match.
18277func (c *ProjectsAgentGetValidationResultCall) IfNoneMatch(entityTag string) *ProjectsAgentGetValidationResultCall {
18278	c.ifNoneMatch_ = entityTag
18279	return c
18280}
18281
18282// Context sets the context to be used in this call's Do method. Any
18283// pending HTTP request will be aborted if the provided context is
18284// canceled.
18285func (c *ProjectsAgentGetValidationResultCall) Context(ctx context.Context) *ProjectsAgentGetValidationResultCall {
18286	c.ctx_ = ctx
18287	return c
18288}
18289
18290// Header returns an http.Header that can be modified by the caller to
18291// add HTTP headers to the request.
18292func (c *ProjectsAgentGetValidationResultCall) Header() http.Header {
18293	if c.header_ == nil {
18294		c.header_ = make(http.Header)
18295	}
18296	return c.header_
18297}
18298
18299func (c *ProjectsAgentGetValidationResultCall) doRequest(alt string) (*http.Response, error) {
18300	reqHeaders := make(http.Header)
18301	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
18302	for k, v := range c.header_ {
18303		reqHeaders[k] = v
18304	}
18305	reqHeaders.Set("User-Agent", c.s.userAgent())
18306	if c.ifNoneMatch_ != "" {
18307		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18308	}
18309	var body io.Reader = nil
18310	c.urlParams_.Set("alt", alt)
18311	c.urlParams_.Set("prettyPrint", "false")
18312	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent/validationResult")
18313	urls += "?" + c.urlParams_.Encode()
18314	req, err := http.NewRequest("GET", urls, body)
18315	if err != nil {
18316		return nil, err
18317	}
18318	req.Header = reqHeaders
18319	googleapi.Expand(req.URL, map[string]string{
18320		"parent": c.parent,
18321	})
18322	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18323}
18324
18325// Do executes the "dialogflow.projects.agent.getValidationResult" call.
18326// Exactly one of *GoogleCloudDialogflowV2ValidationResult or error will
18327// be non-nil. Any non-2xx status code is an error. Response headers are
18328// in either
18329// *GoogleCloudDialogflowV2ValidationResult.ServerResponse.Header or (if
18330// a response was returned at all) in error.(*googleapi.Error).Header.
18331// Use googleapi.IsNotModified to check whether the returned error was
18332// because http.StatusNotModified was returned.
18333func (c *ProjectsAgentGetValidationResultCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ValidationResult, error) {
18334	gensupport.SetOptions(c.urlParams_, opts...)
18335	res, err := c.doRequest("json")
18336	if res != nil && res.StatusCode == http.StatusNotModified {
18337		if res.Body != nil {
18338			res.Body.Close()
18339		}
18340		return nil, &googleapi.Error{
18341			Code:   res.StatusCode,
18342			Header: res.Header,
18343		}
18344	}
18345	if err != nil {
18346		return nil, err
18347	}
18348	defer googleapi.CloseBody(res)
18349	if err := googleapi.CheckResponse(res); err != nil {
18350		return nil, err
18351	}
18352	ret := &GoogleCloudDialogflowV2ValidationResult{
18353		ServerResponse: googleapi.ServerResponse{
18354			Header:         res.Header,
18355			HTTPStatusCode: res.StatusCode,
18356		},
18357	}
18358	target := &ret
18359	if err := gensupport.DecodeResponse(target, res); err != nil {
18360		return nil, err
18361	}
18362	return ret, nil
18363	// {
18364	//   "description": "Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed.",
18365	//   "flatPath": "v2/projects/{projectsId}/agent/validationResult",
18366	//   "httpMethod": "GET",
18367	//   "id": "dialogflow.projects.agent.getValidationResult",
18368	//   "parameterOrder": [
18369	//     "parent"
18370	//   ],
18371	//   "parameters": {
18372	//     "languageCode": {
18373	//       "description": "Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.",
18374	//       "location": "query",
18375	//       "type": "string"
18376	//     },
18377	//     "parent": {
18378	//       "description": "Required. The project that the agent is associated with. Format: `projects/`.",
18379	//       "location": "path",
18380	//       "pattern": "^projects/[^/]+$",
18381	//       "required": true,
18382	//       "type": "string"
18383	//     }
18384	//   },
18385	//   "path": "v2/{+parent}/agent/validationResult",
18386	//   "response": {
18387	//     "$ref": "GoogleCloudDialogflowV2ValidationResult"
18388	//   },
18389	//   "scopes": [
18390	//     "https://www.googleapis.com/auth/cloud-platform",
18391	//     "https://www.googleapis.com/auth/dialogflow"
18392	//   ]
18393	// }
18394
18395}
18396
18397// method id "dialogflow.projects.agent.import":
18398
18399type ProjectsAgentImportCall struct {
18400	s                                         *Service
18401	parent                                    string
18402	googleclouddialogflowv2importagentrequest *GoogleCloudDialogflowV2ImportAgentRequest
18403	urlParams_                                gensupport.URLParams
18404	ctx_                                      context.Context
18405	header_                                   http.Header
18406}
18407
18408// Import: Imports the specified agent from a ZIP file. Uploads new
18409// intents and entity types without deleting the existing ones. Intents
18410// and entity types with the same name are replaced with the new
18411// versions from ImportAgentRequest. After the import, the imported
18412// draft agent will be trained automatically (unless disabled in agent
18413// settings). However, once the import is done, training may not be
18414// completed yet. Please call TrainAgent and wait for the operation it
18415// returns in order to train explicitly. An operation which tracks when
18416// importing is complete. It only tracks when the draft agent is updated
18417// not when it is done training. Note: You should always train an agent
18418// prior to sending it queries. See the training documentation
18419// (https://cloud.google.com/dialogflow/es/docs/training).
18420//
18421// - parent: The project that the agent to import is associated with.
18422//   Format: `projects/`.
18423func (r *ProjectsAgentService) Import(parent string, googleclouddialogflowv2importagentrequest *GoogleCloudDialogflowV2ImportAgentRequest) *ProjectsAgentImportCall {
18424	c := &ProjectsAgentImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18425	c.parent = parent
18426	c.googleclouddialogflowv2importagentrequest = googleclouddialogflowv2importagentrequest
18427	return c
18428}
18429
18430// Fields allows partial responses to be retrieved. See
18431// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18432// for more information.
18433func (c *ProjectsAgentImportCall) Fields(s ...googleapi.Field) *ProjectsAgentImportCall {
18434	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18435	return c
18436}
18437
18438// Context sets the context to be used in this call's Do method. Any
18439// pending HTTP request will be aborted if the provided context is
18440// canceled.
18441func (c *ProjectsAgentImportCall) Context(ctx context.Context) *ProjectsAgentImportCall {
18442	c.ctx_ = ctx
18443	return c
18444}
18445
18446// Header returns an http.Header that can be modified by the caller to
18447// add HTTP headers to the request.
18448func (c *ProjectsAgentImportCall) Header() http.Header {
18449	if c.header_ == nil {
18450		c.header_ = make(http.Header)
18451	}
18452	return c.header_
18453}
18454
18455func (c *ProjectsAgentImportCall) doRequest(alt string) (*http.Response, error) {
18456	reqHeaders := make(http.Header)
18457	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
18458	for k, v := range c.header_ {
18459		reqHeaders[k] = v
18460	}
18461	reqHeaders.Set("User-Agent", c.s.userAgent())
18462	var body io.Reader = nil
18463	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2importagentrequest)
18464	if err != nil {
18465		return nil, err
18466	}
18467	reqHeaders.Set("Content-Type", "application/json")
18468	c.urlParams_.Set("alt", alt)
18469	c.urlParams_.Set("prettyPrint", "false")
18470	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:import")
18471	urls += "?" + c.urlParams_.Encode()
18472	req, err := http.NewRequest("POST", urls, body)
18473	if err != nil {
18474		return nil, err
18475	}
18476	req.Header = reqHeaders
18477	googleapi.Expand(req.URL, map[string]string{
18478		"parent": c.parent,
18479	})
18480	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18481}
18482
18483// Do executes the "dialogflow.projects.agent.import" call.
18484// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
18485// Any non-2xx status code is an error. Response headers are in either
18486// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
18487// was returned at all) in error.(*googleapi.Error).Header. Use
18488// googleapi.IsNotModified to check whether the returned error was
18489// because http.StatusNotModified was returned.
18490func (c *ProjectsAgentImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
18491	gensupport.SetOptions(c.urlParams_, opts...)
18492	res, err := c.doRequest("json")
18493	if res != nil && res.StatusCode == http.StatusNotModified {
18494		if res.Body != nil {
18495			res.Body.Close()
18496		}
18497		return nil, &googleapi.Error{
18498			Code:   res.StatusCode,
18499			Header: res.Header,
18500		}
18501	}
18502	if err != nil {
18503		return nil, err
18504	}
18505	defer googleapi.CloseBody(res)
18506	if err := googleapi.CheckResponse(res); err != nil {
18507		return nil, err
18508	}
18509	ret := &GoogleLongrunningOperation{
18510		ServerResponse: googleapi.ServerResponse{
18511			Header:         res.Header,
18512			HTTPStatusCode: res.StatusCode,
18513		},
18514	}
18515	target := &ret
18516	if err := gensupport.DecodeResponse(target, res); err != nil {
18517		return nil, err
18518	}
18519	return ret, nil
18520	// {
18521	//   "description": "Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
18522	//   "flatPath": "v2/projects/{projectsId}/agent:import",
18523	//   "httpMethod": "POST",
18524	//   "id": "dialogflow.projects.agent.import",
18525	//   "parameterOrder": [
18526	//     "parent"
18527	//   ],
18528	//   "parameters": {
18529	//     "parent": {
18530	//       "description": "Required. The project that the agent to import is associated with. Format: `projects/`.",
18531	//       "location": "path",
18532	//       "pattern": "^projects/[^/]+$",
18533	//       "required": true,
18534	//       "type": "string"
18535	//     }
18536	//   },
18537	//   "path": "v2/{+parent}/agent:import",
18538	//   "request": {
18539	//     "$ref": "GoogleCloudDialogflowV2ImportAgentRequest"
18540	//   },
18541	//   "response": {
18542	//     "$ref": "GoogleLongrunningOperation"
18543	//   },
18544	//   "scopes": [
18545	//     "https://www.googleapis.com/auth/cloud-platform",
18546	//     "https://www.googleapis.com/auth/dialogflow"
18547	//   ]
18548	// }
18549
18550}
18551
18552// method id "dialogflow.projects.agent.restore":
18553
18554type ProjectsAgentRestoreCall struct {
18555	s                                          *Service
18556	parent                                     string
18557	googleclouddialogflowv2restoreagentrequest *GoogleCloudDialogflowV2RestoreAgentRequest
18558	urlParams_                                 gensupport.URLParams
18559	ctx_                                       context.Context
18560	header_                                    http.Header
18561}
18562
18563// Restore: Restores the specified agent from a ZIP file. Replaces the
18564// current agent version with a new one. All the intents and entity
18565// types in the older version are deleted. After the restore, the
18566// restored draft agent will be trained automatically (unless disabled
18567// in agent settings). However, once the restore is done, training may
18568// not be completed yet. Please call TrainAgent and wait for the
18569// operation it returns in order to train explicitly. An operation which
18570// tracks when restoring is complete. It only tracks when the draft
18571// agent is updated not when it is done training. Note: You should
18572// always train an agent prior to sending it queries. See the training
18573// documentation (https://cloud.google.com/dialogflow/es/docs/training).
18574//
18575// - parent: The project that the agent to restore is associated with.
18576//   Format: `projects/`.
18577func (r *ProjectsAgentService) Restore(parent string, googleclouddialogflowv2restoreagentrequest *GoogleCloudDialogflowV2RestoreAgentRequest) *ProjectsAgentRestoreCall {
18578	c := &ProjectsAgentRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18579	c.parent = parent
18580	c.googleclouddialogflowv2restoreagentrequest = googleclouddialogflowv2restoreagentrequest
18581	return c
18582}
18583
18584// Fields allows partial responses to be retrieved. See
18585// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18586// for more information.
18587func (c *ProjectsAgentRestoreCall) Fields(s ...googleapi.Field) *ProjectsAgentRestoreCall {
18588	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18589	return c
18590}
18591
18592// Context sets the context to be used in this call's Do method. Any
18593// pending HTTP request will be aborted if the provided context is
18594// canceled.
18595func (c *ProjectsAgentRestoreCall) Context(ctx context.Context) *ProjectsAgentRestoreCall {
18596	c.ctx_ = ctx
18597	return c
18598}
18599
18600// Header returns an http.Header that can be modified by the caller to
18601// add HTTP headers to the request.
18602func (c *ProjectsAgentRestoreCall) Header() http.Header {
18603	if c.header_ == nil {
18604		c.header_ = make(http.Header)
18605	}
18606	return c.header_
18607}
18608
18609func (c *ProjectsAgentRestoreCall) doRequest(alt string) (*http.Response, error) {
18610	reqHeaders := make(http.Header)
18611	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
18612	for k, v := range c.header_ {
18613		reqHeaders[k] = v
18614	}
18615	reqHeaders.Set("User-Agent", c.s.userAgent())
18616	var body io.Reader = nil
18617	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2restoreagentrequest)
18618	if err != nil {
18619		return nil, err
18620	}
18621	reqHeaders.Set("Content-Type", "application/json")
18622	c.urlParams_.Set("alt", alt)
18623	c.urlParams_.Set("prettyPrint", "false")
18624	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:restore")
18625	urls += "?" + c.urlParams_.Encode()
18626	req, err := http.NewRequest("POST", urls, body)
18627	if err != nil {
18628		return nil, err
18629	}
18630	req.Header = reqHeaders
18631	googleapi.Expand(req.URL, map[string]string{
18632		"parent": c.parent,
18633	})
18634	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18635}
18636
18637// Do executes the "dialogflow.projects.agent.restore" call.
18638// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
18639// Any non-2xx status code is an error. Response headers are in either
18640// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
18641// was returned at all) in error.(*googleapi.Error).Header. Use
18642// googleapi.IsNotModified to check whether the returned error was
18643// because http.StatusNotModified was returned.
18644func (c *ProjectsAgentRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
18645	gensupport.SetOptions(c.urlParams_, opts...)
18646	res, err := c.doRequest("json")
18647	if res != nil && res.StatusCode == http.StatusNotModified {
18648		if res.Body != nil {
18649			res.Body.Close()
18650		}
18651		return nil, &googleapi.Error{
18652			Code:   res.StatusCode,
18653			Header: res.Header,
18654		}
18655	}
18656	if err != nil {
18657		return nil, err
18658	}
18659	defer googleapi.CloseBody(res)
18660	if err := googleapi.CheckResponse(res); err != nil {
18661		return nil, err
18662	}
18663	ret := &GoogleLongrunningOperation{
18664		ServerResponse: googleapi.ServerResponse{
18665			Header:         res.Header,
18666			HTTPStatusCode: res.StatusCode,
18667		},
18668	}
18669	target := &ret
18670	if err := gensupport.DecodeResponse(target, res); err != nil {
18671		return nil, err
18672	}
18673	return ret, nil
18674	// {
18675	//   "description": "Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
18676	//   "flatPath": "v2/projects/{projectsId}/agent:restore",
18677	//   "httpMethod": "POST",
18678	//   "id": "dialogflow.projects.agent.restore",
18679	//   "parameterOrder": [
18680	//     "parent"
18681	//   ],
18682	//   "parameters": {
18683	//     "parent": {
18684	//       "description": "Required. The project that the agent to restore is associated with. Format: `projects/`.",
18685	//       "location": "path",
18686	//       "pattern": "^projects/[^/]+$",
18687	//       "required": true,
18688	//       "type": "string"
18689	//     }
18690	//   },
18691	//   "path": "v2/{+parent}/agent:restore",
18692	//   "request": {
18693	//     "$ref": "GoogleCloudDialogflowV2RestoreAgentRequest"
18694	//   },
18695	//   "response": {
18696	//     "$ref": "GoogleLongrunningOperation"
18697	//   },
18698	//   "scopes": [
18699	//     "https://www.googleapis.com/auth/cloud-platform",
18700	//     "https://www.googleapis.com/auth/dialogflow"
18701	//   ]
18702	// }
18703
18704}
18705
18706// method id "dialogflow.projects.agent.search":
18707
18708type ProjectsAgentSearchCall struct {
18709	s            *Service
18710	parent       string
18711	urlParams_   gensupport.URLParams
18712	ifNoneMatch_ string
18713	ctx_         context.Context
18714	header_      http.Header
18715}
18716
18717// Search: Returns the list of agents. Since there is at most one
18718// conversational agent per project, this method is useful primarily for
18719// listing all agents across projects the caller has access to. One can
18720// achieve that with a wildcard project collection id "-". Refer to List
18721// Sub-Collections
18722// (https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
18723//
18724// - parent: The project to list agents from. Format: `projects/`.
18725func (r *ProjectsAgentService) Search(parent string) *ProjectsAgentSearchCall {
18726	c := &ProjectsAgentSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18727	c.parent = parent
18728	return c
18729}
18730
18731// PageSize sets the optional parameter "pageSize": The maximum number
18732// of items to return in a single page. By default 100 and at most 1000.
18733func (c *ProjectsAgentSearchCall) PageSize(pageSize int64) *ProjectsAgentSearchCall {
18734	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18735	return c
18736}
18737
18738// PageToken sets the optional parameter "pageToken": The
18739// next_page_token value returned from a previous list request.
18740func (c *ProjectsAgentSearchCall) PageToken(pageToken string) *ProjectsAgentSearchCall {
18741	c.urlParams_.Set("pageToken", pageToken)
18742	return c
18743}
18744
18745// Fields allows partial responses to be retrieved. See
18746// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18747// for more information.
18748func (c *ProjectsAgentSearchCall) Fields(s ...googleapi.Field) *ProjectsAgentSearchCall {
18749	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18750	return c
18751}
18752
18753// IfNoneMatch sets the optional parameter which makes the operation
18754// fail if the object's ETag matches the given value. This is useful for
18755// getting updates only after the object has changed since the last
18756// request. Use googleapi.IsNotModified to check whether the response
18757// error from Do is the result of In-None-Match.
18758func (c *ProjectsAgentSearchCall) IfNoneMatch(entityTag string) *ProjectsAgentSearchCall {
18759	c.ifNoneMatch_ = entityTag
18760	return c
18761}
18762
18763// Context sets the context to be used in this call's Do method. Any
18764// pending HTTP request will be aborted if the provided context is
18765// canceled.
18766func (c *ProjectsAgentSearchCall) Context(ctx context.Context) *ProjectsAgentSearchCall {
18767	c.ctx_ = ctx
18768	return c
18769}
18770
18771// Header returns an http.Header that can be modified by the caller to
18772// add HTTP headers to the request.
18773func (c *ProjectsAgentSearchCall) Header() http.Header {
18774	if c.header_ == nil {
18775		c.header_ = make(http.Header)
18776	}
18777	return c.header_
18778}
18779
18780func (c *ProjectsAgentSearchCall) doRequest(alt string) (*http.Response, error) {
18781	reqHeaders := make(http.Header)
18782	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
18783	for k, v := range c.header_ {
18784		reqHeaders[k] = v
18785	}
18786	reqHeaders.Set("User-Agent", c.s.userAgent())
18787	if c.ifNoneMatch_ != "" {
18788		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18789	}
18790	var body io.Reader = nil
18791	c.urlParams_.Set("alt", alt)
18792	c.urlParams_.Set("prettyPrint", "false")
18793	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:search")
18794	urls += "?" + c.urlParams_.Encode()
18795	req, err := http.NewRequest("GET", urls, body)
18796	if err != nil {
18797		return nil, err
18798	}
18799	req.Header = reqHeaders
18800	googleapi.Expand(req.URL, map[string]string{
18801		"parent": c.parent,
18802	})
18803	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18804}
18805
18806// Do executes the "dialogflow.projects.agent.search" call.
18807// Exactly one of *GoogleCloudDialogflowV2SearchAgentsResponse or error
18808// will be non-nil. Any non-2xx status code is an error. Response
18809// headers are in either
18810// *GoogleCloudDialogflowV2SearchAgentsResponse.ServerResponse.Header or
18811// (if a response was returned at all) in
18812// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18813// whether the returned error was because http.StatusNotModified was
18814// returned.
18815func (c *ProjectsAgentSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SearchAgentsResponse, error) {
18816	gensupport.SetOptions(c.urlParams_, opts...)
18817	res, err := c.doRequest("json")
18818	if res != nil && res.StatusCode == http.StatusNotModified {
18819		if res.Body != nil {
18820			res.Body.Close()
18821		}
18822		return nil, &googleapi.Error{
18823			Code:   res.StatusCode,
18824			Header: res.Header,
18825		}
18826	}
18827	if err != nil {
18828		return nil, err
18829	}
18830	defer googleapi.CloseBody(res)
18831	if err := googleapi.CheckResponse(res); err != nil {
18832		return nil, err
18833	}
18834	ret := &GoogleCloudDialogflowV2SearchAgentsResponse{
18835		ServerResponse: googleapi.ServerResponse{
18836			Header:         res.Header,
18837			HTTPStatusCode: res.StatusCode,
18838		},
18839	}
18840	target := &ret
18841	if err := gensupport.DecodeResponse(target, res); err != nil {
18842		return nil, err
18843	}
18844	return ret, nil
18845	// {
18846	//   "description": "Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id \"-\". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).",
18847	//   "flatPath": "v2/projects/{projectsId}/agent:search",
18848	//   "httpMethod": "GET",
18849	//   "id": "dialogflow.projects.agent.search",
18850	//   "parameterOrder": [
18851	//     "parent"
18852	//   ],
18853	//   "parameters": {
18854	//     "pageSize": {
18855	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
18856	//       "format": "int32",
18857	//       "location": "query",
18858	//       "type": "integer"
18859	//     },
18860	//     "pageToken": {
18861	//       "description": "The next_page_token value returned from a previous list request.",
18862	//       "location": "query",
18863	//       "type": "string"
18864	//     },
18865	//     "parent": {
18866	//       "description": "Required. The project to list agents from. Format: `projects/`.",
18867	//       "location": "path",
18868	//       "pattern": "^projects/[^/]+$",
18869	//       "required": true,
18870	//       "type": "string"
18871	//     }
18872	//   },
18873	//   "path": "v2/{+parent}/agent:search",
18874	//   "response": {
18875	//     "$ref": "GoogleCloudDialogflowV2SearchAgentsResponse"
18876	//   },
18877	//   "scopes": [
18878	//     "https://www.googleapis.com/auth/cloud-platform",
18879	//     "https://www.googleapis.com/auth/dialogflow"
18880	//   ]
18881	// }
18882
18883}
18884
18885// Pages invokes f for each page of results.
18886// A non-nil error returned from f will halt the iteration.
18887// The provided context supersedes any context provided to the Context method.
18888func (c *ProjectsAgentSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2SearchAgentsResponse) error) error {
18889	c.ctx_ = ctx
18890	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18891	for {
18892		x, err := c.Do()
18893		if err != nil {
18894			return err
18895		}
18896		if err := f(x); err != nil {
18897			return err
18898		}
18899		if x.NextPageToken == "" {
18900			return nil
18901		}
18902		c.PageToken(x.NextPageToken)
18903	}
18904}
18905
18906// method id "dialogflow.projects.agent.train":
18907
18908type ProjectsAgentTrainCall struct {
18909	s                                        *Service
18910	parent                                   string
18911	googleclouddialogflowv2trainagentrequest *GoogleCloudDialogflowV2TrainAgentRequest
18912	urlParams_                               gensupport.URLParams
18913	ctx_                                     context.Context
18914	header_                                  http.Header
18915}
18916
18917// Train: Trains the specified agent. Note: You should always train an
18918// agent prior to sending it queries. See the training documentation
18919// (https://cloud.google.com/dialogflow/es/docs/training).
18920//
18921// - parent: The project that the agent to train is associated with.
18922//   Format: `projects/`.
18923func (r *ProjectsAgentService) Train(parent string, googleclouddialogflowv2trainagentrequest *GoogleCloudDialogflowV2TrainAgentRequest) *ProjectsAgentTrainCall {
18924	c := &ProjectsAgentTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18925	c.parent = parent
18926	c.googleclouddialogflowv2trainagentrequest = googleclouddialogflowv2trainagentrequest
18927	return c
18928}
18929
18930// Fields allows partial responses to be retrieved. See
18931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18932// for more information.
18933func (c *ProjectsAgentTrainCall) Fields(s ...googleapi.Field) *ProjectsAgentTrainCall {
18934	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18935	return c
18936}
18937
18938// Context sets the context to be used in this call's Do method. Any
18939// pending HTTP request will be aborted if the provided context is
18940// canceled.
18941func (c *ProjectsAgentTrainCall) Context(ctx context.Context) *ProjectsAgentTrainCall {
18942	c.ctx_ = ctx
18943	return c
18944}
18945
18946// Header returns an http.Header that can be modified by the caller to
18947// add HTTP headers to the request.
18948func (c *ProjectsAgentTrainCall) Header() http.Header {
18949	if c.header_ == nil {
18950		c.header_ = make(http.Header)
18951	}
18952	return c.header_
18953}
18954
18955func (c *ProjectsAgentTrainCall) doRequest(alt string) (*http.Response, error) {
18956	reqHeaders := make(http.Header)
18957	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
18958	for k, v := range c.header_ {
18959		reqHeaders[k] = v
18960	}
18961	reqHeaders.Set("User-Agent", c.s.userAgent())
18962	var body io.Reader = nil
18963	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2trainagentrequest)
18964	if err != nil {
18965		return nil, err
18966	}
18967	reqHeaders.Set("Content-Type", "application/json")
18968	c.urlParams_.Set("alt", alt)
18969	c.urlParams_.Set("prettyPrint", "false")
18970	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:train")
18971	urls += "?" + c.urlParams_.Encode()
18972	req, err := http.NewRequest("POST", urls, body)
18973	if err != nil {
18974		return nil, err
18975	}
18976	req.Header = reqHeaders
18977	googleapi.Expand(req.URL, map[string]string{
18978		"parent": c.parent,
18979	})
18980	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18981}
18982
18983// Do executes the "dialogflow.projects.agent.train" call.
18984// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
18985// Any non-2xx status code is an error. Response headers are in either
18986// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
18987// was returned at all) in error.(*googleapi.Error).Header. Use
18988// googleapi.IsNotModified to check whether the returned error was
18989// because http.StatusNotModified was returned.
18990func (c *ProjectsAgentTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
18991	gensupport.SetOptions(c.urlParams_, opts...)
18992	res, err := c.doRequest("json")
18993	if res != nil && res.StatusCode == http.StatusNotModified {
18994		if res.Body != nil {
18995			res.Body.Close()
18996		}
18997		return nil, &googleapi.Error{
18998			Code:   res.StatusCode,
18999			Header: res.Header,
19000		}
19001	}
19002	if err != nil {
19003		return nil, err
19004	}
19005	defer googleapi.CloseBody(res)
19006	if err := googleapi.CheckResponse(res); err != nil {
19007		return nil, err
19008	}
19009	ret := &GoogleLongrunningOperation{
19010		ServerResponse: googleapi.ServerResponse{
19011			Header:         res.Header,
19012			HTTPStatusCode: res.StatusCode,
19013		},
19014	}
19015	target := &ret
19016	if err := gensupport.DecodeResponse(target, res); err != nil {
19017		return nil, err
19018	}
19019	return ret, nil
19020	// {
19021	//   "description": "Trains the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
19022	//   "flatPath": "v2/projects/{projectsId}/agent:train",
19023	//   "httpMethod": "POST",
19024	//   "id": "dialogflow.projects.agent.train",
19025	//   "parameterOrder": [
19026	//     "parent"
19027	//   ],
19028	//   "parameters": {
19029	//     "parent": {
19030	//       "description": "Required. The project that the agent to train is associated with. Format: `projects/`.",
19031	//       "location": "path",
19032	//       "pattern": "^projects/[^/]+$",
19033	//       "required": true,
19034	//       "type": "string"
19035	//     }
19036	//   },
19037	//   "path": "v2/{+parent}/agent:train",
19038	//   "request": {
19039	//     "$ref": "GoogleCloudDialogflowV2TrainAgentRequest"
19040	//   },
19041	//   "response": {
19042	//     "$ref": "GoogleLongrunningOperation"
19043	//   },
19044	//   "scopes": [
19045	//     "https://www.googleapis.com/auth/cloud-platform",
19046	//     "https://www.googleapis.com/auth/dialogflow"
19047	//   ]
19048	// }
19049
19050}
19051
19052// method id "dialogflow.projects.agent.updateFulfillment":
19053
19054type ProjectsAgentUpdateFulfillmentCall struct {
19055	s                                  *Service
19056	nameid                             string
19057	googleclouddialogflowv2fulfillment *GoogleCloudDialogflowV2Fulfillment
19058	urlParams_                         gensupport.URLParams
19059	ctx_                               context.Context
19060	header_                            http.Header
19061}
19062
19063// UpdateFulfillment: Updates the fulfillment.
19064//
19065// - name: The unique identifier of the fulfillment. Supported formats:
19066//   - `projects//agent/fulfillment` -
19067//   `projects//locations//agent/fulfillment` This field is not used for
19068//   Fulfillment in an Environment.
19069func (r *ProjectsAgentService) UpdateFulfillment(nameid string, googleclouddialogflowv2fulfillment *GoogleCloudDialogflowV2Fulfillment) *ProjectsAgentUpdateFulfillmentCall {
19070	c := &ProjectsAgentUpdateFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19071	c.nameid = nameid
19072	c.googleclouddialogflowv2fulfillment = googleclouddialogflowv2fulfillment
19073	return c
19074}
19075
19076// UpdateMask sets the optional parameter "updateMask": Required. The
19077// mask to control which fields get updated. If the mask is not present,
19078// all fields will be updated.
19079func (c *ProjectsAgentUpdateFulfillmentCall) UpdateMask(updateMask string) *ProjectsAgentUpdateFulfillmentCall {
19080	c.urlParams_.Set("updateMask", updateMask)
19081	return c
19082}
19083
19084// Fields allows partial responses to be retrieved. See
19085// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19086// for more information.
19087func (c *ProjectsAgentUpdateFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsAgentUpdateFulfillmentCall {
19088	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19089	return c
19090}
19091
19092// Context sets the context to be used in this call's Do method. Any
19093// pending HTTP request will be aborted if the provided context is
19094// canceled.
19095func (c *ProjectsAgentUpdateFulfillmentCall) Context(ctx context.Context) *ProjectsAgentUpdateFulfillmentCall {
19096	c.ctx_ = ctx
19097	return c
19098}
19099
19100// Header returns an http.Header that can be modified by the caller to
19101// add HTTP headers to the request.
19102func (c *ProjectsAgentUpdateFulfillmentCall) Header() http.Header {
19103	if c.header_ == nil {
19104		c.header_ = make(http.Header)
19105	}
19106	return c.header_
19107}
19108
19109func (c *ProjectsAgentUpdateFulfillmentCall) doRequest(alt string) (*http.Response, error) {
19110	reqHeaders := make(http.Header)
19111	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
19112	for k, v := range c.header_ {
19113		reqHeaders[k] = v
19114	}
19115	reqHeaders.Set("User-Agent", c.s.userAgent())
19116	var body io.Reader = nil
19117	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2fulfillment)
19118	if err != nil {
19119		return nil, err
19120	}
19121	reqHeaders.Set("Content-Type", "application/json")
19122	c.urlParams_.Set("alt", alt)
19123	c.urlParams_.Set("prettyPrint", "false")
19124	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
19125	urls += "?" + c.urlParams_.Encode()
19126	req, err := http.NewRequest("PATCH", urls, body)
19127	if err != nil {
19128		return nil, err
19129	}
19130	req.Header = reqHeaders
19131	googleapi.Expand(req.URL, map[string]string{
19132		"name": c.nameid,
19133	})
19134	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19135}
19136
19137// Do executes the "dialogflow.projects.agent.updateFulfillment" call.
19138// Exactly one of *GoogleCloudDialogflowV2Fulfillment or error will be
19139// non-nil. Any non-2xx status code is an error. Response headers are in
19140// either *GoogleCloudDialogflowV2Fulfillment.ServerResponse.Header or
19141// (if a response was returned at all) in
19142// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19143// whether the returned error was because http.StatusNotModified was
19144// returned.
19145func (c *ProjectsAgentUpdateFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Fulfillment, error) {
19146	gensupport.SetOptions(c.urlParams_, opts...)
19147	res, err := c.doRequest("json")
19148	if res != nil && res.StatusCode == http.StatusNotModified {
19149		if res.Body != nil {
19150			res.Body.Close()
19151		}
19152		return nil, &googleapi.Error{
19153			Code:   res.StatusCode,
19154			Header: res.Header,
19155		}
19156	}
19157	if err != nil {
19158		return nil, err
19159	}
19160	defer googleapi.CloseBody(res)
19161	if err := googleapi.CheckResponse(res); err != nil {
19162		return nil, err
19163	}
19164	ret := &GoogleCloudDialogflowV2Fulfillment{
19165		ServerResponse: googleapi.ServerResponse{
19166			Header:         res.Header,
19167			HTTPStatusCode: res.StatusCode,
19168		},
19169	}
19170	target := &ret
19171	if err := gensupport.DecodeResponse(target, res); err != nil {
19172		return nil, err
19173	}
19174	return ret, nil
19175	// {
19176	//   "description": "Updates the fulfillment.",
19177	//   "flatPath": "v2/projects/{projectsId}/agent/fulfillment",
19178	//   "httpMethod": "PATCH",
19179	//   "id": "dialogflow.projects.agent.updateFulfillment",
19180	//   "parameterOrder": [
19181	//     "name"
19182	//   ],
19183	//   "parameters": {
19184	//     "name": {
19185	//       "description": "Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.",
19186	//       "location": "path",
19187	//       "pattern": "^projects/[^/]+/agent/fulfillment$",
19188	//       "required": true,
19189	//       "type": "string"
19190	//     },
19191	//     "updateMask": {
19192	//       "description": "Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated.",
19193	//       "format": "google-fieldmask",
19194	//       "location": "query",
19195	//       "type": "string"
19196	//     }
19197	//   },
19198	//   "path": "v2/{+name}",
19199	//   "request": {
19200	//     "$ref": "GoogleCloudDialogflowV2Fulfillment"
19201	//   },
19202	//   "response": {
19203	//     "$ref": "GoogleCloudDialogflowV2Fulfillment"
19204	//   },
19205	//   "scopes": [
19206	//     "https://www.googleapis.com/auth/cloud-platform",
19207	//     "https://www.googleapis.com/auth/dialogflow"
19208	//   ]
19209	// }
19210
19211}
19212
19213// method id "dialogflow.projects.agent.entityTypes.batchDelete":
19214
19215type ProjectsAgentEntityTypesBatchDeleteCall struct {
19216	s                                                    *Service
19217	parent                                               string
19218	googleclouddialogflowv2batchdeleteentitytypesrequest *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest
19219	urlParams_                                           gensupport.URLParams
19220	ctx_                                                 context.Context
19221	header_                                              http.Header
19222}
19223
19224// BatchDelete: Deletes entity types in the specified agent. Note: You
19225// should always train an agent prior to sending it queries. See the
19226// training documentation
19227// (https://cloud.google.com/dialogflow/es/docs/training).
19228//
19229// - parent: The name of the agent to delete all entities types for.
19230//   Format: `projects//agent`.
19231func (r *ProjectsAgentEntityTypesService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteentitytypesrequest *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest) *ProjectsAgentEntityTypesBatchDeleteCall {
19232	c := &ProjectsAgentEntityTypesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19233	c.parent = parent
19234	c.googleclouddialogflowv2batchdeleteentitytypesrequest = googleclouddialogflowv2batchdeleteentitytypesrequest
19235	return c
19236}
19237
19238// Fields allows partial responses to be retrieved. See
19239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19240// for more information.
19241func (c *ProjectsAgentEntityTypesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchDeleteCall {
19242	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19243	return c
19244}
19245
19246// Context sets the context to be used in this call's Do method. Any
19247// pending HTTP request will be aborted if the provided context is
19248// canceled.
19249func (c *ProjectsAgentEntityTypesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchDeleteCall {
19250	c.ctx_ = ctx
19251	return c
19252}
19253
19254// Header returns an http.Header that can be modified by the caller to
19255// add HTTP headers to the request.
19256func (c *ProjectsAgentEntityTypesBatchDeleteCall) Header() http.Header {
19257	if c.header_ == nil {
19258		c.header_ = make(http.Header)
19259	}
19260	return c.header_
19261}
19262
19263func (c *ProjectsAgentEntityTypesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
19264	reqHeaders := make(http.Header)
19265	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
19266	for k, v := range c.header_ {
19267		reqHeaders[k] = v
19268	}
19269	reqHeaders.Set("User-Agent", c.s.userAgent())
19270	var body io.Reader = nil
19271	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteentitytypesrequest)
19272	if err != nil {
19273		return nil, err
19274	}
19275	reqHeaders.Set("Content-Type", "application/json")
19276	c.urlParams_.Set("alt", alt)
19277	c.urlParams_.Set("prettyPrint", "false")
19278	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes:batchDelete")
19279	urls += "?" + c.urlParams_.Encode()
19280	req, err := http.NewRequest("POST", urls, body)
19281	if err != nil {
19282		return nil, err
19283	}
19284	req.Header = reqHeaders
19285	googleapi.Expand(req.URL, map[string]string{
19286		"parent": c.parent,
19287	})
19288	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19289}
19290
19291// Do executes the "dialogflow.projects.agent.entityTypes.batchDelete" call.
19292// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
19293// Any non-2xx status code is an error. Response headers are in either
19294// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
19295// was returned at all) in error.(*googleapi.Error).Header. Use
19296// googleapi.IsNotModified to check whether the returned error was
19297// because http.StatusNotModified was returned.
19298func (c *ProjectsAgentEntityTypesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
19299	gensupport.SetOptions(c.urlParams_, opts...)
19300	res, err := c.doRequest("json")
19301	if res != nil && res.StatusCode == http.StatusNotModified {
19302		if res.Body != nil {
19303			res.Body.Close()
19304		}
19305		return nil, &googleapi.Error{
19306			Code:   res.StatusCode,
19307			Header: res.Header,
19308		}
19309	}
19310	if err != nil {
19311		return nil, err
19312	}
19313	defer googleapi.CloseBody(res)
19314	if err := googleapi.CheckResponse(res); err != nil {
19315		return nil, err
19316	}
19317	ret := &GoogleLongrunningOperation{
19318		ServerResponse: googleapi.ServerResponse{
19319			Header:         res.Header,
19320			HTTPStatusCode: res.StatusCode,
19321		},
19322	}
19323	target := &ret
19324	if err := gensupport.DecodeResponse(target, res); err != nil {
19325		return nil, err
19326	}
19327	return ret, nil
19328	// {
19329	//   "description": "Deletes entity types in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
19330	//   "flatPath": "v2/projects/{projectsId}/agent/entityTypes:batchDelete",
19331	//   "httpMethod": "POST",
19332	//   "id": "dialogflow.projects.agent.entityTypes.batchDelete",
19333	//   "parameterOrder": [
19334	//     "parent"
19335	//   ],
19336	//   "parameters": {
19337	//     "parent": {
19338	//       "description": "Required. The name of the agent to delete all entities types for. Format: `projects//agent`.",
19339	//       "location": "path",
19340	//       "pattern": "^projects/[^/]+/agent$",
19341	//       "required": true,
19342	//       "type": "string"
19343	//     }
19344	//   },
19345	//   "path": "v2/{+parent}/entityTypes:batchDelete",
19346	//   "request": {
19347	//     "$ref": "GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest"
19348	//   },
19349	//   "response": {
19350	//     "$ref": "GoogleLongrunningOperation"
19351	//   },
19352	//   "scopes": [
19353	//     "https://www.googleapis.com/auth/cloud-platform",
19354	//     "https://www.googleapis.com/auth/dialogflow"
19355	//   ]
19356	// }
19357
19358}
19359
19360// method id "dialogflow.projects.agent.entityTypes.batchUpdate":
19361
19362type ProjectsAgentEntityTypesBatchUpdateCall struct {
19363	s                                                    *Service
19364	parent                                               string
19365	googleclouddialogflowv2batchupdateentitytypesrequest *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest
19366	urlParams_                                           gensupport.URLParams
19367	ctx_                                                 context.Context
19368	header_                                              http.Header
19369}
19370
19371// BatchUpdate: Updates/Creates multiple entity types in the specified
19372// agent. Note: You should always train an agent prior to sending it
19373// queries. See the training documentation
19374// (https://cloud.google.com/dialogflow/es/docs/training).
19375//
19376// - parent: The name of the agent to update or create entity types in.
19377//   Format: `projects//agent`.
19378func (r *ProjectsAgentEntityTypesService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateentitytypesrequest *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest) *ProjectsAgentEntityTypesBatchUpdateCall {
19379	c := &ProjectsAgentEntityTypesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19380	c.parent = parent
19381	c.googleclouddialogflowv2batchupdateentitytypesrequest = googleclouddialogflowv2batchupdateentitytypesrequest
19382	return c
19383}
19384
19385// Fields allows partial responses to be retrieved. See
19386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19387// for more information.
19388func (c *ProjectsAgentEntityTypesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchUpdateCall {
19389	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19390	return c
19391}
19392
19393// Context sets the context to be used in this call's Do method. Any
19394// pending HTTP request will be aborted if the provided context is
19395// canceled.
19396func (c *ProjectsAgentEntityTypesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchUpdateCall {
19397	c.ctx_ = ctx
19398	return c
19399}
19400
19401// Header returns an http.Header that can be modified by the caller to
19402// add HTTP headers to the request.
19403func (c *ProjectsAgentEntityTypesBatchUpdateCall) Header() http.Header {
19404	if c.header_ == nil {
19405		c.header_ = make(http.Header)
19406	}
19407	return c.header_
19408}
19409
19410func (c *ProjectsAgentEntityTypesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
19411	reqHeaders := make(http.Header)
19412	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
19413	for k, v := range c.header_ {
19414		reqHeaders[k] = v
19415	}
19416	reqHeaders.Set("User-Agent", c.s.userAgent())
19417	var body io.Reader = nil
19418	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateentitytypesrequest)
19419	if err != nil {
19420		return nil, err
19421	}
19422	reqHeaders.Set("Content-Type", "application/json")
19423	c.urlParams_.Set("alt", alt)
19424	c.urlParams_.Set("prettyPrint", "false")
19425	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes:batchUpdate")
19426	urls += "?" + c.urlParams_.Encode()
19427	req, err := http.NewRequest("POST", urls, body)
19428	if err != nil {
19429		return nil, err
19430	}
19431	req.Header = reqHeaders
19432	googleapi.Expand(req.URL, map[string]string{
19433		"parent": c.parent,
19434	})
19435	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19436}
19437
19438// Do executes the "dialogflow.projects.agent.entityTypes.batchUpdate" call.
19439// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
19440// Any non-2xx status code is an error. Response headers are in either
19441// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
19442// was returned at all) in error.(*googleapi.Error).Header. Use
19443// googleapi.IsNotModified to check whether the returned error was
19444// because http.StatusNotModified was returned.
19445func (c *ProjectsAgentEntityTypesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
19446	gensupport.SetOptions(c.urlParams_, opts...)
19447	res, err := c.doRequest("json")
19448	if res != nil && res.StatusCode == http.StatusNotModified {
19449		if res.Body != nil {
19450			res.Body.Close()
19451		}
19452		return nil, &googleapi.Error{
19453			Code:   res.StatusCode,
19454			Header: res.Header,
19455		}
19456	}
19457	if err != nil {
19458		return nil, err
19459	}
19460	defer googleapi.CloseBody(res)
19461	if err := googleapi.CheckResponse(res); err != nil {
19462		return nil, err
19463	}
19464	ret := &GoogleLongrunningOperation{
19465		ServerResponse: googleapi.ServerResponse{
19466			Header:         res.Header,
19467			HTTPStatusCode: res.StatusCode,
19468		},
19469	}
19470	target := &ret
19471	if err := gensupport.DecodeResponse(target, res); err != nil {
19472		return nil, err
19473	}
19474	return ret, nil
19475	// {
19476	//   "description": "Updates/Creates multiple entity types in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
19477	//   "flatPath": "v2/projects/{projectsId}/agent/entityTypes:batchUpdate",
19478	//   "httpMethod": "POST",
19479	//   "id": "dialogflow.projects.agent.entityTypes.batchUpdate",
19480	//   "parameterOrder": [
19481	//     "parent"
19482	//   ],
19483	//   "parameters": {
19484	//     "parent": {
19485	//       "description": "Required. The name of the agent to update or create entity types in. Format: `projects//agent`.",
19486	//       "location": "path",
19487	//       "pattern": "^projects/[^/]+/agent$",
19488	//       "required": true,
19489	//       "type": "string"
19490	//     }
19491	//   },
19492	//   "path": "v2/{+parent}/entityTypes:batchUpdate",
19493	//   "request": {
19494	//     "$ref": "GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest"
19495	//   },
19496	//   "response": {
19497	//     "$ref": "GoogleLongrunningOperation"
19498	//   },
19499	//   "scopes": [
19500	//     "https://www.googleapis.com/auth/cloud-platform",
19501	//     "https://www.googleapis.com/auth/dialogflow"
19502	//   ]
19503	// }
19504
19505}
19506
19507// method id "dialogflow.projects.agent.entityTypes.create":
19508
19509type ProjectsAgentEntityTypesCreateCall struct {
19510	s                                 *Service
19511	parent                            string
19512	googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType
19513	urlParams_                        gensupport.URLParams
19514	ctx_                              context.Context
19515	header_                           http.Header
19516}
19517
19518// Create: Creates an entity type in the specified agent. Note: You
19519// should always train an agent prior to sending it queries. See the
19520// training documentation
19521// (https://cloud.google.com/dialogflow/es/docs/training).
19522//
19523// - parent: The agent to create a entity type for. Format:
19524//   `projects//agent`.
19525func (r *ProjectsAgentEntityTypesService) Create(parent string, googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType) *ProjectsAgentEntityTypesCreateCall {
19526	c := &ProjectsAgentEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19527	c.parent = parent
19528	c.googleclouddialogflowv2entitytype = googleclouddialogflowv2entitytype
19529	return c
19530}
19531
19532// LanguageCode sets the optional parameter "languageCode": The language
19533// used to access language-specific data. If not specified, the agent's
19534// default language is used. For more information, see Multilingual
19535// intent and entity data
19536// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
19537func (c *ProjectsAgentEntityTypesCreateCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesCreateCall {
19538	c.urlParams_.Set("languageCode", languageCode)
19539	return c
19540}
19541
19542// Fields allows partial responses to be retrieved. See
19543// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19544// for more information.
19545func (c *ProjectsAgentEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesCreateCall {
19546	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19547	return c
19548}
19549
19550// Context sets the context to be used in this call's Do method. Any
19551// pending HTTP request will be aborted if the provided context is
19552// canceled.
19553func (c *ProjectsAgentEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesCreateCall {
19554	c.ctx_ = ctx
19555	return c
19556}
19557
19558// Header returns an http.Header that can be modified by the caller to
19559// add HTTP headers to the request.
19560func (c *ProjectsAgentEntityTypesCreateCall) Header() http.Header {
19561	if c.header_ == nil {
19562		c.header_ = make(http.Header)
19563	}
19564	return c.header_
19565}
19566
19567func (c *ProjectsAgentEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
19568	reqHeaders := make(http.Header)
19569	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
19570	for k, v := range c.header_ {
19571		reqHeaders[k] = v
19572	}
19573	reqHeaders.Set("User-Agent", c.s.userAgent())
19574	var body io.Reader = nil
19575	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2entitytype)
19576	if err != nil {
19577		return nil, err
19578	}
19579	reqHeaders.Set("Content-Type", "application/json")
19580	c.urlParams_.Set("alt", alt)
19581	c.urlParams_.Set("prettyPrint", "false")
19582	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
19583	urls += "?" + c.urlParams_.Encode()
19584	req, err := http.NewRequest("POST", urls, body)
19585	if err != nil {
19586		return nil, err
19587	}
19588	req.Header = reqHeaders
19589	googleapi.Expand(req.URL, map[string]string{
19590		"parent": c.parent,
19591	})
19592	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19593}
19594
19595// Do executes the "dialogflow.projects.agent.entityTypes.create" call.
19596// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be
19597// non-nil. Any non-2xx status code is an error. Response headers are in
19598// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or
19599// (if a response was returned at all) in
19600// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19601// whether the returned error was because http.StatusNotModified was
19602// returned.
19603func (c *ProjectsAgentEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) {
19604	gensupport.SetOptions(c.urlParams_, opts...)
19605	res, err := c.doRequest("json")
19606	if res != nil && res.StatusCode == http.StatusNotModified {
19607		if res.Body != nil {
19608			res.Body.Close()
19609		}
19610		return nil, &googleapi.Error{
19611			Code:   res.StatusCode,
19612			Header: res.Header,
19613		}
19614	}
19615	if err != nil {
19616		return nil, err
19617	}
19618	defer googleapi.CloseBody(res)
19619	if err := googleapi.CheckResponse(res); err != nil {
19620		return nil, err
19621	}
19622	ret := &GoogleCloudDialogflowV2EntityType{
19623		ServerResponse: googleapi.ServerResponse{
19624			Header:         res.Header,
19625			HTTPStatusCode: res.StatusCode,
19626		},
19627	}
19628	target := &ret
19629	if err := gensupport.DecodeResponse(target, res); err != nil {
19630		return nil, err
19631	}
19632	return ret, nil
19633	// {
19634	//   "description": "Creates an entity type in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
19635	//   "flatPath": "v2/projects/{projectsId}/agent/entityTypes",
19636	//   "httpMethod": "POST",
19637	//   "id": "dialogflow.projects.agent.entityTypes.create",
19638	//   "parameterOrder": [
19639	//     "parent"
19640	//   ],
19641	//   "parameters": {
19642	//     "languageCode": {
19643	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
19644	//       "location": "query",
19645	//       "type": "string"
19646	//     },
19647	//     "parent": {
19648	//       "description": "Required. The agent to create a entity type for. Format: `projects//agent`.",
19649	//       "location": "path",
19650	//       "pattern": "^projects/[^/]+/agent$",
19651	//       "required": true,
19652	//       "type": "string"
19653	//     }
19654	//   },
19655	//   "path": "v2/{+parent}/entityTypes",
19656	//   "request": {
19657	//     "$ref": "GoogleCloudDialogflowV2EntityType"
19658	//   },
19659	//   "response": {
19660	//     "$ref": "GoogleCloudDialogflowV2EntityType"
19661	//   },
19662	//   "scopes": [
19663	//     "https://www.googleapis.com/auth/cloud-platform",
19664	//     "https://www.googleapis.com/auth/dialogflow"
19665	//   ]
19666	// }
19667
19668}
19669
19670// method id "dialogflow.projects.agent.entityTypes.delete":
19671
19672type ProjectsAgentEntityTypesDeleteCall struct {
19673	s          *Service
19674	name       string
19675	urlParams_ gensupport.URLParams
19676	ctx_       context.Context
19677	header_    http.Header
19678}
19679
19680// Delete: Deletes the specified entity type. Note: You should always
19681// train an agent prior to sending it queries. See the training
19682// documentation (https://cloud.google.com/dialogflow/es/docs/training).
19683//
19684// - name: The name of the entity type to delete. Format:
19685//   `projects//agent/entityTypes/`.
19686func (r *ProjectsAgentEntityTypesService) Delete(name string) *ProjectsAgentEntityTypesDeleteCall {
19687	c := &ProjectsAgentEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19688	c.name = name
19689	return c
19690}
19691
19692// Fields allows partial responses to be retrieved. See
19693// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19694// for more information.
19695func (c *ProjectsAgentEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesDeleteCall {
19696	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19697	return c
19698}
19699
19700// Context sets the context to be used in this call's Do method. Any
19701// pending HTTP request will be aborted if the provided context is
19702// canceled.
19703func (c *ProjectsAgentEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesDeleteCall {
19704	c.ctx_ = ctx
19705	return c
19706}
19707
19708// Header returns an http.Header that can be modified by the caller to
19709// add HTTP headers to the request.
19710func (c *ProjectsAgentEntityTypesDeleteCall) Header() http.Header {
19711	if c.header_ == nil {
19712		c.header_ = make(http.Header)
19713	}
19714	return c.header_
19715}
19716
19717func (c *ProjectsAgentEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
19718	reqHeaders := make(http.Header)
19719	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
19720	for k, v := range c.header_ {
19721		reqHeaders[k] = v
19722	}
19723	reqHeaders.Set("User-Agent", c.s.userAgent())
19724	var body io.Reader = nil
19725	c.urlParams_.Set("alt", alt)
19726	c.urlParams_.Set("prettyPrint", "false")
19727	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
19728	urls += "?" + c.urlParams_.Encode()
19729	req, err := http.NewRequest("DELETE", urls, body)
19730	if err != nil {
19731		return nil, err
19732	}
19733	req.Header = reqHeaders
19734	googleapi.Expand(req.URL, map[string]string{
19735		"name": c.name,
19736	})
19737	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19738}
19739
19740// Do executes the "dialogflow.projects.agent.entityTypes.delete" call.
19741// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
19742// non-2xx status code is an error. Response headers are in either
19743// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
19744// returned at all) in error.(*googleapi.Error).Header. Use
19745// googleapi.IsNotModified to check whether the returned error was
19746// because http.StatusNotModified was returned.
19747func (c *ProjectsAgentEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
19748	gensupport.SetOptions(c.urlParams_, opts...)
19749	res, err := c.doRequest("json")
19750	if res != nil && res.StatusCode == http.StatusNotModified {
19751		if res.Body != nil {
19752			res.Body.Close()
19753		}
19754		return nil, &googleapi.Error{
19755			Code:   res.StatusCode,
19756			Header: res.Header,
19757		}
19758	}
19759	if err != nil {
19760		return nil, err
19761	}
19762	defer googleapi.CloseBody(res)
19763	if err := googleapi.CheckResponse(res); err != nil {
19764		return nil, err
19765	}
19766	ret := &GoogleProtobufEmpty{
19767		ServerResponse: googleapi.ServerResponse{
19768			Header:         res.Header,
19769			HTTPStatusCode: res.StatusCode,
19770		},
19771	}
19772	target := &ret
19773	if err := gensupport.DecodeResponse(target, res); err != nil {
19774		return nil, err
19775	}
19776	return ret, nil
19777	// {
19778	//   "description": "Deletes the specified entity type. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
19779	//   "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
19780	//   "httpMethod": "DELETE",
19781	//   "id": "dialogflow.projects.agent.entityTypes.delete",
19782	//   "parameterOrder": [
19783	//     "name"
19784	//   ],
19785	//   "parameters": {
19786	//     "name": {
19787	//       "description": "Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`.",
19788	//       "location": "path",
19789	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
19790	//       "required": true,
19791	//       "type": "string"
19792	//     }
19793	//   },
19794	//   "path": "v2/{+name}",
19795	//   "response": {
19796	//     "$ref": "GoogleProtobufEmpty"
19797	//   },
19798	//   "scopes": [
19799	//     "https://www.googleapis.com/auth/cloud-platform",
19800	//     "https://www.googleapis.com/auth/dialogflow"
19801	//   ]
19802	// }
19803
19804}
19805
19806// method id "dialogflow.projects.agent.entityTypes.get":
19807
19808type ProjectsAgentEntityTypesGetCall struct {
19809	s            *Service
19810	name         string
19811	urlParams_   gensupport.URLParams
19812	ifNoneMatch_ string
19813	ctx_         context.Context
19814	header_      http.Header
19815}
19816
19817// Get: Retrieves the specified entity type.
19818//
19819// - name: The name of the entity type. Format:
19820//   `projects//agent/entityTypes/`.
19821func (r *ProjectsAgentEntityTypesService) Get(name string) *ProjectsAgentEntityTypesGetCall {
19822	c := &ProjectsAgentEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19823	c.name = name
19824	return c
19825}
19826
19827// LanguageCode sets the optional parameter "languageCode": The language
19828// used to access language-specific data. If not specified, the agent's
19829// default language is used. For more information, see Multilingual
19830// intent and entity data
19831// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
19832func (c *ProjectsAgentEntityTypesGetCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesGetCall {
19833	c.urlParams_.Set("languageCode", languageCode)
19834	return c
19835}
19836
19837// Fields allows partial responses to be retrieved. See
19838// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19839// for more information.
19840func (c *ProjectsAgentEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesGetCall {
19841	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19842	return c
19843}
19844
19845// IfNoneMatch sets the optional parameter which makes the operation
19846// fail if the object's ETag matches the given value. This is useful for
19847// getting updates only after the object has changed since the last
19848// request. Use googleapi.IsNotModified to check whether the response
19849// error from Do is the result of In-None-Match.
19850func (c *ProjectsAgentEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesGetCall {
19851	c.ifNoneMatch_ = entityTag
19852	return c
19853}
19854
19855// Context sets the context to be used in this call's Do method. Any
19856// pending HTTP request will be aborted if the provided context is
19857// canceled.
19858func (c *ProjectsAgentEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEntityTypesGetCall {
19859	c.ctx_ = ctx
19860	return c
19861}
19862
19863// Header returns an http.Header that can be modified by the caller to
19864// add HTTP headers to the request.
19865func (c *ProjectsAgentEntityTypesGetCall) Header() http.Header {
19866	if c.header_ == nil {
19867		c.header_ = make(http.Header)
19868	}
19869	return c.header_
19870}
19871
19872func (c *ProjectsAgentEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
19873	reqHeaders := make(http.Header)
19874	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
19875	for k, v := range c.header_ {
19876		reqHeaders[k] = v
19877	}
19878	reqHeaders.Set("User-Agent", c.s.userAgent())
19879	if c.ifNoneMatch_ != "" {
19880		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19881	}
19882	var body io.Reader = nil
19883	c.urlParams_.Set("alt", alt)
19884	c.urlParams_.Set("prettyPrint", "false")
19885	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
19886	urls += "?" + c.urlParams_.Encode()
19887	req, err := http.NewRequest("GET", urls, body)
19888	if err != nil {
19889		return nil, err
19890	}
19891	req.Header = reqHeaders
19892	googleapi.Expand(req.URL, map[string]string{
19893		"name": c.name,
19894	})
19895	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19896}
19897
19898// Do executes the "dialogflow.projects.agent.entityTypes.get" call.
19899// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be
19900// non-nil. Any non-2xx status code is an error. Response headers are in
19901// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or
19902// (if a response was returned at all) in
19903// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19904// whether the returned error was because http.StatusNotModified was
19905// returned.
19906func (c *ProjectsAgentEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) {
19907	gensupport.SetOptions(c.urlParams_, opts...)
19908	res, err := c.doRequest("json")
19909	if res != nil && res.StatusCode == http.StatusNotModified {
19910		if res.Body != nil {
19911			res.Body.Close()
19912		}
19913		return nil, &googleapi.Error{
19914			Code:   res.StatusCode,
19915			Header: res.Header,
19916		}
19917	}
19918	if err != nil {
19919		return nil, err
19920	}
19921	defer googleapi.CloseBody(res)
19922	if err := googleapi.CheckResponse(res); err != nil {
19923		return nil, err
19924	}
19925	ret := &GoogleCloudDialogflowV2EntityType{
19926		ServerResponse: googleapi.ServerResponse{
19927			Header:         res.Header,
19928			HTTPStatusCode: res.StatusCode,
19929		},
19930	}
19931	target := &ret
19932	if err := gensupport.DecodeResponse(target, res); err != nil {
19933		return nil, err
19934	}
19935	return ret, nil
19936	// {
19937	//   "description": "Retrieves the specified entity type.",
19938	//   "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
19939	//   "httpMethod": "GET",
19940	//   "id": "dialogflow.projects.agent.entityTypes.get",
19941	//   "parameterOrder": [
19942	//     "name"
19943	//   ],
19944	//   "parameters": {
19945	//     "languageCode": {
19946	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
19947	//       "location": "query",
19948	//       "type": "string"
19949	//     },
19950	//     "name": {
19951	//       "description": "Required. The name of the entity type. Format: `projects//agent/entityTypes/`.",
19952	//       "location": "path",
19953	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
19954	//       "required": true,
19955	//       "type": "string"
19956	//     }
19957	//   },
19958	//   "path": "v2/{+name}",
19959	//   "response": {
19960	//     "$ref": "GoogleCloudDialogflowV2EntityType"
19961	//   },
19962	//   "scopes": [
19963	//     "https://www.googleapis.com/auth/cloud-platform",
19964	//     "https://www.googleapis.com/auth/dialogflow"
19965	//   ]
19966	// }
19967
19968}
19969
19970// method id "dialogflow.projects.agent.entityTypes.list":
19971
19972type ProjectsAgentEntityTypesListCall struct {
19973	s            *Service
19974	parent       string
19975	urlParams_   gensupport.URLParams
19976	ifNoneMatch_ string
19977	ctx_         context.Context
19978	header_      http.Header
19979}
19980
19981// List: Returns the list of all entity types in the specified agent.
19982//
19983// - parent: The agent to list all entity types from. Format:
19984//   `projects//agent`.
19985func (r *ProjectsAgentEntityTypesService) List(parent string) *ProjectsAgentEntityTypesListCall {
19986	c := &ProjectsAgentEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19987	c.parent = parent
19988	return c
19989}
19990
19991// LanguageCode sets the optional parameter "languageCode": The language
19992// used to access language-specific data. If not specified, the agent's
19993// default language is used. For more information, see Multilingual
19994// intent and entity data
19995// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
19996func (c *ProjectsAgentEntityTypesListCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesListCall {
19997	c.urlParams_.Set("languageCode", languageCode)
19998	return c
19999}
20000
20001// PageSize sets the optional parameter "pageSize": The maximum number
20002// of items to return in a single page. By default 100 and at most 1000.
20003func (c *ProjectsAgentEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEntityTypesListCall {
20004	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
20005	return c
20006}
20007
20008// PageToken sets the optional parameter "pageToken": The
20009// next_page_token value returned from a previous list request.
20010func (c *ProjectsAgentEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEntityTypesListCall {
20011	c.urlParams_.Set("pageToken", pageToken)
20012	return c
20013}
20014
20015// Fields allows partial responses to be retrieved. See
20016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20017// for more information.
20018func (c *ProjectsAgentEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesListCall {
20019	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20020	return c
20021}
20022
20023// IfNoneMatch sets the optional parameter which makes the operation
20024// fail if the object's ETag matches the given value. This is useful for
20025// getting updates only after the object has changed since the last
20026// request. Use googleapi.IsNotModified to check whether the response
20027// error from Do is the result of In-None-Match.
20028func (c *ProjectsAgentEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesListCall {
20029	c.ifNoneMatch_ = entityTag
20030	return c
20031}
20032
20033// Context sets the context to be used in this call's Do method. Any
20034// pending HTTP request will be aborted if the provided context is
20035// canceled.
20036func (c *ProjectsAgentEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEntityTypesListCall {
20037	c.ctx_ = ctx
20038	return c
20039}
20040
20041// Header returns an http.Header that can be modified by the caller to
20042// add HTTP headers to the request.
20043func (c *ProjectsAgentEntityTypesListCall) Header() http.Header {
20044	if c.header_ == nil {
20045		c.header_ = make(http.Header)
20046	}
20047	return c.header_
20048}
20049
20050func (c *ProjectsAgentEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
20051	reqHeaders := make(http.Header)
20052	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
20053	for k, v := range c.header_ {
20054		reqHeaders[k] = v
20055	}
20056	reqHeaders.Set("User-Agent", c.s.userAgent())
20057	if c.ifNoneMatch_ != "" {
20058		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20059	}
20060	var body io.Reader = nil
20061	c.urlParams_.Set("alt", alt)
20062	c.urlParams_.Set("prettyPrint", "false")
20063	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
20064	urls += "?" + c.urlParams_.Encode()
20065	req, err := http.NewRequest("GET", urls, body)
20066	if err != nil {
20067		return nil, err
20068	}
20069	req.Header = reqHeaders
20070	googleapi.Expand(req.URL, map[string]string{
20071		"parent": c.parent,
20072	})
20073	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20074}
20075
20076// Do executes the "dialogflow.projects.agent.entityTypes.list" call.
20077// Exactly one of *GoogleCloudDialogflowV2ListEntityTypesResponse or
20078// error will be non-nil. Any non-2xx status code is an error. Response
20079// headers are in either
20080// *GoogleCloudDialogflowV2ListEntityTypesResponse.ServerResponse.Header
20081// or (if a response was returned at all) in
20082// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20083// whether the returned error was because http.StatusNotModified was
20084// returned.
20085func (c *ProjectsAgentEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListEntityTypesResponse, error) {
20086	gensupport.SetOptions(c.urlParams_, opts...)
20087	res, err := c.doRequest("json")
20088	if res != nil && res.StatusCode == http.StatusNotModified {
20089		if res.Body != nil {
20090			res.Body.Close()
20091		}
20092		return nil, &googleapi.Error{
20093			Code:   res.StatusCode,
20094			Header: res.Header,
20095		}
20096	}
20097	if err != nil {
20098		return nil, err
20099	}
20100	defer googleapi.CloseBody(res)
20101	if err := googleapi.CheckResponse(res); err != nil {
20102		return nil, err
20103	}
20104	ret := &GoogleCloudDialogflowV2ListEntityTypesResponse{
20105		ServerResponse: googleapi.ServerResponse{
20106			Header:         res.Header,
20107			HTTPStatusCode: res.StatusCode,
20108		},
20109	}
20110	target := &ret
20111	if err := gensupport.DecodeResponse(target, res); err != nil {
20112		return nil, err
20113	}
20114	return ret, nil
20115	// {
20116	//   "description": "Returns the list of all entity types in the specified agent.",
20117	//   "flatPath": "v2/projects/{projectsId}/agent/entityTypes",
20118	//   "httpMethod": "GET",
20119	//   "id": "dialogflow.projects.agent.entityTypes.list",
20120	//   "parameterOrder": [
20121	//     "parent"
20122	//   ],
20123	//   "parameters": {
20124	//     "languageCode": {
20125	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
20126	//       "location": "query",
20127	//       "type": "string"
20128	//     },
20129	//     "pageSize": {
20130	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
20131	//       "format": "int32",
20132	//       "location": "query",
20133	//       "type": "integer"
20134	//     },
20135	//     "pageToken": {
20136	//       "description": "Optional. The next_page_token value returned from a previous list request.",
20137	//       "location": "query",
20138	//       "type": "string"
20139	//     },
20140	//     "parent": {
20141	//       "description": "Required. The agent to list all entity types from. Format: `projects//agent`.",
20142	//       "location": "path",
20143	//       "pattern": "^projects/[^/]+/agent$",
20144	//       "required": true,
20145	//       "type": "string"
20146	//     }
20147	//   },
20148	//   "path": "v2/{+parent}/entityTypes",
20149	//   "response": {
20150	//     "$ref": "GoogleCloudDialogflowV2ListEntityTypesResponse"
20151	//   },
20152	//   "scopes": [
20153	//     "https://www.googleapis.com/auth/cloud-platform",
20154	//     "https://www.googleapis.com/auth/dialogflow"
20155	//   ]
20156	// }
20157
20158}
20159
20160// Pages invokes f for each page of results.
20161// A non-nil error returned from f will halt the iteration.
20162// The provided context supersedes any context provided to the Context method.
20163func (c *ProjectsAgentEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListEntityTypesResponse) error) error {
20164	c.ctx_ = ctx
20165	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20166	for {
20167		x, err := c.Do()
20168		if err != nil {
20169			return err
20170		}
20171		if err := f(x); err != nil {
20172			return err
20173		}
20174		if x.NextPageToken == "" {
20175			return nil
20176		}
20177		c.PageToken(x.NextPageToken)
20178	}
20179}
20180
20181// method id "dialogflow.projects.agent.entityTypes.patch":
20182
20183type ProjectsAgentEntityTypesPatchCall struct {
20184	s                                 *Service
20185	nameid                            string
20186	googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType
20187	urlParams_                        gensupport.URLParams
20188	ctx_                              context.Context
20189	header_                           http.Header
20190}
20191
20192// Patch: Updates the specified entity type. Note: You should always
20193// train an agent prior to sending it queries. See the training
20194// documentation (https://cloud.google.com/dialogflow/es/docs/training).
20195//
20196// - name: The unique identifier of the entity type. Required for
20197//   EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes
20198//   methods. Format: `projects//agent/entityTypes/`.
20199func (r *ProjectsAgentEntityTypesService) Patch(nameid string, googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType) *ProjectsAgentEntityTypesPatchCall {
20200	c := &ProjectsAgentEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20201	c.nameid = nameid
20202	c.googleclouddialogflowv2entitytype = googleclouddialogflowv2entitytype
20203	return c
20204}
20205
20206// LanguageCode sets the optional parameter "languageCode": The language
20207// used to access language-specific data. If not specified, the agent's
20208// default language is used. For more information, see Multilingual
20209// intent and entity data
20210// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
20211func (c *ProjectsAgentEntityTypesPatchCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesPatchCall {
20212	c.urlParams_.Set("languageCode", languageCode)
20213	return c
20214}
20215
20216// UpdateMask sets the optional parameter "updateMask": The mask to
20217// control which fields get updated.
20218func (c *ProjectsAgentEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEntityTypesPatchCall {
20219	c.urlParams_.Set("updateMask", updateMask)
20220	return c
20221}
20222
20223// Fields allows partial responses to be retrieved. See
20224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20225// for more information.
20226func (c *ProjectsAgentEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesPatchCall {
20227	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20228	return c
20229}
20230
20231// Context sets the context to be used in this call's Do method. Any
20232// pending HTTP request will be aborted if the provided context is
20233// canceled.
20234func (c *ProjectsAgentEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEntityTypesPatchCall {
20235	c.ctx_ = ctx
20236	return c
20237}
20238
20239// Header returns an http.Header that can be modified by the caller to
20240// add HTTP headers to the request.
20241func (c *ProjectsAgentEntityTypesPatchCall) Header() http.Header {
20242	if c.header_ == nil {
20243		c.header_ = make(http.Header)
20244	}
20245	return c.header_
20246}
20247
20248func (c *ProjectsAgentEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
20249	reqHeaders := make(http.Header)
20250	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
20251	for k, v := range c.header_ {
20252		reqHeaders[k] = v
20253	}
20254	reqHeaders.Set("User-Agent", c.s.userAgent())
20255	var body io.Reader = nil
20256	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2entitytype)
20257	if err != nil {
20258		return nil, err
20259	}
20260	reqHeaders.Set("Content-Type", "application/json")
20261	c.urlParams_.Set("alt", alt)
20262	c.urlParams_.Set("prettyPrint", "false")
20263	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
20264	urls += "?" + c.urlParams_.Encode()
20265	req, err := http.NewRequest("PATCH", urls, body)
20266	if err != nil {
20267		return nil, err
20268	}
20269	req.Header = reqHeaders
20270	googleapi.Expand(req.URL, map[string]string{
20271		"name": c.nameid,
20272	})
20273	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20274}
20275
20276// Do executes the "dialogflow.projects.agent.entityTypes.patch" call.
20277// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be
20278// non-nil. Any non-2xx status code is an error. Response headers are in
20279// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or
20280// (if a response was returned at all) in
20281// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20282// whether the returned error was because http.StatusNotModified was
20283// returned.
20284func (c *ProjectsAgentEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) {
20285	gensupport.SetOptions(c.urlParams_, opts...)
20286	res, err := c.doRequest("json")
20287	if res != nil && res.StatusCode == http.StatusNotModified {
20288		if res.Body != nil {
20289			res.Body.Close()
20290		}
20291		return nil, &googleapi.Error{
20292			Code:   res.StatusCode,
20293			Header: res.Header,
20294		}
20295	}
20296	if err != nil {
20297		return nil, err
20298	}
20299	defer googleapi.CloseBody(res)
20300	if err := googleapi.CheckResponse(res); err != nil {
20301		return nil, err
20302	}
20303	ret := &GoogleCloudDialogflowV2EntityType{
20304		ServerResponse: googleapi.ServerResponse{
20305			Header:         res.Header,
20306			HTTPStatusCode: res.StatusCode,
20307		},
20308	}
20309	target := &ret
20310	if err := gensupport.DecodeResponse(target, res); err != nil {
20311		return nil, err
20312	}
20313	return ret, nil
20314	// {
20315	//   "description": "Updates the specified entity type. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
20316	//   "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
20317	//   "httpMethod": "PATCH",
20318	//   "id": "dialogflow.projects.agent.entityTypes.patch",
20319	//   "parameterOrder": [
20320	//     "name"
20321	//   ],
20322	//   "parameters": {
20323	//     "languageCode": {
20324	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
20325	//       "location": "query",
20326	//       "type": "string"
20327	//     },
20328	//     "name": {
20329	//       "description": "The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`.",
20330	//       "location": "path",
20331	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
20332	//       "required": true,
20333	//       "type": "string"
20334	//     },
20335	//     "updateMask": {
20336	//       "description": "Optional. The mask to control which fields get updated.",
20337	//       "format": "google-fieldmask",
20338	//       "location": "query",
20339	//       "type": "string"
20340	//     }
20341	//   },
20342	//   "path": "v2/{+name}",
20343	//   "request": {
20344	//     "$ref": "GoogleCloudDialogflowV2EntityType"
20345	//   },
20346	//   "response": {
20347	//     "$ref": "GoogleCloudDialogflowV2EntityType"
20348	//   },
20349	//   "scopes": [
20350	//     "https://www.googleapis.com/auth/cloud-platform",
20351	//     "https://www.googleapis.com/auth/dialogflow"
20352	//   ]
20353	// }
20354
20355}
20356
20357// method id "dialogflow.projects.agent.entityTypes.entities.batchCreate":
20358
20359type ProjectsAgentEntityTypesEntitiesBatchCreateCall struct {
20360	s                                                 *Service
20361	parent                                            string
20362	googleclouddialogflowv2batchcreateentitiesrequest *GoogleCloudDialogflowV2BatchCreateEntitiesRequest
20363	urlParams_                                        gensupport.URLParams
20364	ctx_                                              context.Context
20365	header_                                           http.Header
20366}
20367
20368// BatchCreate: Creates multiple new entities in the specified entity
20369// type. Note: You should always train an agent prior to sending it
20370// queries. See the training documentation
20371// (https://cloud.google.com/dialogflow/es/docs/training).
20372//
20373// - parent: The name of the entity type to create entities in. Format:
20374//   `projects//agent/entityTypes/`.
20375func (r *ProjectsAgentEntityTypesEntitiesService) BatchCreate(parent string, googleclouddialogflowv2batchcreateentitiesrequest *GoogleCloudDialogflowV2BatchCreateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
20376	c := &ProjectsAgentEntityTypesEntitiesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20377	c.parent = parent
20378	c.googleclouddialogflowv2batchcreateentitiesrequest = googleclouddialogflowv2batchcreateentitiesrequest
20379	return c
20380}
20381
20382// Fields allows partial responses to be retrieved. See
20383// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20384// for more information.
20385func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
20386	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20387	return c
20388}
20389
20390// Context sets the context to be used in this call's Do method. Any
20391// pending HTTP request will be aborted if the provided context is
20392// canceled.
20393func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
20394	c.ctx_ = ctx
20395	return c
20396}
20397
20398// Header returns an http.Header that can be modified by the caller to
20399// add HTTP headers to the request.
20400func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Header() http.Header {
20401	if c.header_ == nil {
20402		c.header_ = make(http.Header)
20403	}
20404	return c.header_
20405}
20406
20407func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) doRequest(alt string) (*http.Response, error) {
20408	reqHeaders := make(http.Header)
20409	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
20410	for k, v := range c.header_ {
20411		reqHeaders[k] = v
20412	}
20413	reqHeaders.Set("User-Agent", c.s.userAgent())
20414	var body io.Reader = nil
20415	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchcreateentitiesrequest)
20416	if err != nil {
20417		return nil, err
20418	}
20419	reqHeaders.Set("Content-Type", "application/json")
20420	c.urlParams_.Set("alt", alt)
20421	c.urlParams_.Set("prettyPrint", "false")
20422	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchCreate")
20423	urls += "?" + c.urlParams_.Encode()
20424	req, err := http.NewRequest("POST", urls, body)
20425	if err != nil {
20426		return nil, err
20427	}
20428	req.Header = reqHeaders
20429	googleapi.Expand(req.URL, map[string]string{
20430		"parent": c.parent,
20431	})
20432	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20433}
20434
20435// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchCreate" call.
20436// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
20437// Any non-2xx status code is an error. Response headers are in either
20438// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
20439// was returned at all) in error.(*googleapi.Error).Header. Use
20440// googleapi.IsNotModified to check whether the returned error was
20441// because http.StatusNotModified was returned.
20442func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
20443	gensupport.SetOptions(c.urlParams_, opts...)
20444	res, err := c.doRequest("json")
20445	if res != nil && res.StatusCode == http.StatusNotModified {
20446		if res.Body != nil {
20447			res.Body.Close()
20448		}
20449		return nil, &googleapi.Error{
20450			Code:   res.StatusCode,
20451			Header: res.Header,
20452		}
20453	}
20454	if err != nil {
20455		return nil, err
20456	}
20457	defer googleapi.CloseBody(res)
20458	if err := googleapi.CheckResponse(res); err != nil {
20459		return nil, err
20460	}
20461	ret := &GoogleLongrunningOperation{
20462		ServerResponse: googleapi.ServerResponse{
20463			Header:         res.Header,
20464			HTTPStatusCode: res.StatusCode,
20465		},
20466	}
20467	target := &ret
20468	if err := gensupport.DecodeResponse(target, res); err != nil {
20469		return nil, err
20470	}
20471	return ret, nil
20472	// {
20473	//   "description": "Creates multiple new entities in the specified entity type. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
20474	//   "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate",
20475	//   "httpMethod": "POST",
20476	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchCreate",
20477	//   "parameterOrder": [
20478	//     "parent"
20479	//   ],
20480	//   "parameters": {
20481	//     "parent": {
20482	//       "description": "Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`.",
20483	//       "location": "path",
20484	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
20485	//       "required": true,
20486	//       "type": "string"
20487	//     }
20488	//   },
20489	//   "path": "v2/{+parent}/entities:batchCreate",
20490	//   "request": {
20491	//     "$ref": "GoogleCloudDialogflowV2BatchCreateEntitiesRequest"
20492	//   },
20493	//   "response": {
20494	//     "$ref": "GoogleLongrunningOperation"
20495	//   },
20496	//   "scopes": [
20497	//     "https://www.googleapis.com/auth/cloud-platform",
20498	//     "https://www.googleapis.com/auth/dialogflow"
20499	//   ]
20500	// }
20501
20502}
20503
20504// method id "dialogflow.projects.agent.entityTypes.entities.batchDelete":
20505
20506type ProjectsAgentEntityTypesEntitiesBatchDeleteCall struct {
20507	s                                                 *Service
20508	parent                                            string
20509	googleclouddialogflowv2batchdeleteentitiesrequest *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest
20510	urlParams_                                        gensupport.URLParams
20511	ctx_                                              context.Context
20512	header_                                           http.Header
20513}
20514
20515// BatchDelete: Deletes entities in the specified entity type. Note: You
20516// should always train an agent prior to sending it queries. See the
20517// training documentation
20518// (https://cloud.google.com/dialogflow/es/docs/training).
20519//
20520// - parent: The name of the entity type to delete entries for. Format:
20521//   `projects//agent/entityTypes/`.
20522func (r *ProjectsAgentEntityTypesEntitiesService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteentitiesrequest *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
20523	c := &ProjectsAgentEntityTypesEntitiesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20524	c.parent = parent
20525	c.googleclouddialogflowv2batchdeleteentitiesrequest = googleclouddialogflowv2batchdeleteentitiesrequest
20526	return c
20527}
20528
20529// Fields allows partial responses to be retrieved. See
20530// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20531// for more information.
20532func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
20533	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20534	return c
20535}
20536
20537// Context sets the context to be used in this call's Do method. Any
20538// pending HTTP request will be aborted if the provided context is
20539// canceled.
20540func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
20541	c.ctx_ = ctx
20542	return c
20543}
20544
20545// Header returns an http.Header that can be modified by the caller to
20546// add HTTP headers to the request.
20547func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Header() http.Header {
20548	if c.header_ == nil {
20549		c.header_ = make(http.Header)
20550	}
20551	return c.header_
20552}
20553
20554func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
20555	reqHeaders := make(http.Header)
20556	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
20557	for k, v := range c.header_ {
20558		reqHeaders[k] = v
20559	}
20560	reqHeaders.Set("User-Agent", c.s.userAgent())
20561	var body io.Reader = nil
20562	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteentitiesrequest)
20563	if err != nil {
20564		return nil, err
20565	}
20566	reqHeaders.Set("Content-Type", "application/json")
20567	c.urlParams_.Set("alt", alt)
20568	c.urlParams_.Set("prettyPrint", "false")
20569	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchDelete")
20570	urls += "?" + c.urlParams_.Encode()
20571	req, err := http.NewRequest("POST", urls, body)
20572	if err != nil {
20573		return nil, err
20574	}
20575	req.Header = reqHeaders
20576	googleapi.Expand(req.URL, map[string]string{
20577		"parent": c.parent,
20578	})
20579	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20580}
20581
20582// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchDelete" call.
20583// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
20584// Any non-2xx status code is an error. Response headers are in either
20585// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
20586// was returned at all) in error.(*googleapi.Error).Header. Use
20587// googleapi.IsNotModified to check whether the returned error was
20588// because http.StatusNotModified was returned.
20589func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
20590	gensupport.SetOptions(c.urlParams_, opts...)
20591	res, err := c.doRequest("json")
20592	if res != nil && res.StatusCode == http.StatusNotModified {
20593		if res.Body != nil {
20594			res.Body.Close()
20595		}
20596		return nil, &googleapi.Error{
20597			Code:   res.StatusCode,
20598			Header: res.Header,
20599		}
20600	}
20601	if err != nil {
20602		return nil, err
20603	}
20604	defer googleapi.CloseBody(res)
20605	if err := googleapi.CheckResponse(res); err != nil {
20606		return nil, err
20607	}
20608	ret := &GoogleLongrunningOperation{
20609		ServerResponse: googleapi.ServerResponse{
20610			Header:         res.Header,
20611			HTTPStatusCode: res.StatusCode,
20612		},
20613	}
20614	target := &ret
20615	if err := gensupport.DecodeResponse(target, res); err != nil {
20616		return nil, err
20617	}
20618	return ret, nil
20619	// {
20620	//   "description": "Deletes entities in the specified entity type. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
20621	//   "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete",
20622	//   "httpMethod": "POST",
20623	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchDelete",
20624	//   "parameterOrder": [
20625	//     "parent"
20626	//   ],
20627	//   "parameters": {
20628	//     "parent": {
20629	//       "description": "Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`.",
20630	//       "location": "path",
20631	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
20632	//       "required": true,
20633	//       "type": "string"
20634	//     }
20635	//   },
20636	//   "path": "v2/{+parent}/entities:batchDelete",
20637	//   "request": {
20638	//     "$ref": "GoogleCloudDialogflowV2BatchDeleteEntitiesRequest"
20639	//   },
20640	//   "response": {
20641	//     "$ref": "GoogleLongrunningOperation"
20642	//   },
20643	//   "scopes": [
20644	//     "https://www.googleapis.com/auth/cloud-platform",
20645	//     "https://www.googleapis.com/auth/dialogflow"
20646	//   ]
20647	// }
20648
20649}
20650
20651// method id "dialogflow.projects.agent.entityTypes.entities.batchUpdate":
20652
20653type ProjectsAgentEntityTypesEntitiesBatchUpdateCall struct {
20654	s                                                 *Service
20655	parent                                            string
20656	googleclouddialogflowv2batchupdateentitiesrequest *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest
20657	urlParams_                                        gensupport.URLParams
20658	ctx_                                              context.Context
20659	header_                                           http.Header
20660}
20661
20662// BatchUpdate: Updates or creates multiple entities in the specified
20663// entity type. This method does not affect entities in the entity type
20664// that aren't explicitly specified in the request. Note: You should
20665// always train an agent prior to sending it queries. See the training
20666// documentation (https://cloud.google.com/dialogflow/es/docs/training).
20667//
20668// - parent: The name of the entity type to update or create entities
20669//   in. Format: `projects//agent/entityTypes/`.
20670func (r *ProjectsAgentEntityTypesEntitiesService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateentitiesrequest *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
20671	c := &ProjectsAgentEntityTypesEntitiesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20672	c.parent = parent
20673	c.googleclouddialogflowv2batchupdateentitiesrequest = googleclouddialogflowv2batchupdateentitiesrequest
20674	return c
20675}
20676
20677// Fields allows partial responses to be retrieved. See
20678// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20679// for more information.
20680func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
20681	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20682	return c
20683}
20684
20685// Context sets the context to be used in this call's Do method. Any
20686// pending HTTP request will be aborted if the provided context is
20687// canceled.
20688func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
20689	c.ctx_ = ctx
20690	return c
20691}
20692
20693// Header returns an http.Header that can be modified by the caller to
20694// add HTTP headers to the request.
20695func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Header() http.Header {
20696	if c.header_ == nil {
20697		c.header_ = make(http.Header)
20698	}
20699	return c.header_
20700}
20701
20702func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
20703	reqHeaders := make(http.Header)
20704	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
20705	for k, v := range c.header_ {
20706		reqHeaders[k] = v
20707	}
20708	reqHeaders.Set("User-Agent", c.s.userAgent())
20709	var body io.Reader = nil
20710	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateentitiesrequest)
20711	if err != nil {
20712		return nil, err
20713	}
20714	reqHeaders.Set("Content-Type", "application/json")
20715	c.urlParams_.Set("alt", alt)
20716	c.urlParams_.Set("prettyPrint", "false")
20717	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchUpdate")
20718	urls += "?" + c.urlParams_.Encode()
20719	req, err := http.NewRequest("POST", urls, body)
20720	if err != nil {
20721		return nil, err
20722	}
20723	req.Header = reqHeaders
20724	googleapi.Expand(req.URL, map[string]string{
20725		"parent": c.parent,
20726	})
20727	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20728}
20729
20730// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchUpdate" call.
20731// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
20732// Any non-2xx status code is an error. Response headers are in either
20733// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
20734// was returned at all) in error.(*googleapi.Error).Header. Use
20735// googleapi.IsNotModified to check whether the returned error was
20736// because http.StatusNotModified was returned.
20737func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
20738	gensupport.SetOptions(c.urlParams_, opts...)
20739	res, err := c.doRequest("json")
20740	if res != nil && res.StatusCode == http.StatusNotModified {
20741		if res.Body != nil {
20742			res.Body.Close()
20743		}
20744		return nil, &googleapi.Error{
20745			Code:   res.StatusCode,
20746			Header: res.Header,
20747		}
20748	}
20749	if err != nil {
20750		return nil, err
20751	}
20752	defer googleapi.CloseBody(res)
20753	if err := googleapi.CheckResponse(res); err != nil {
20754		return nil, err
20755	}
20756	ret := &GoogleLongrunningOperation{
20757		ServerResponse: googleapi.ServerResponse{
20758			Header:         res.Header,
20759			HTTPStatusCode: res.StatusCode,
20760		},
20761	}
20762	target := &ret
20763	if err := gensupport.DecodeResponse(target, res); err != nil {
20764		return nil, err
20765	}
20766	return ret, nil
20767	// {
20768	//   "description": "Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
20769	//   "flatPath": "v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate",
20770	//   "httpMethod": "POST",
20771	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchUpdate",
20772	//   "parameterOrder": [
20773	//     "parent"
20774	//   ],
20775	//   "parameters": {
20776	//     "parent": {
20777	//       "description": "Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`.",
20778	//       "location": "path",
20779	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
20780	//       "required": true,
20781	//       "type": "string"
20782	//     }
20783	//   },
20784	//   "path": "v2/{+parent}/entities:batchUpdate",
20785	//   "request": {
20786	//     "$ref": "GoogleCloudDialogflowV2BatchUpdateEntitiesRequest"
20787	//   },
20788	//   "response": {
20789	//     "$ref": "GoogleLongrunningOperation"
20790	//   },
20791	//   "scopes": [
20792	//     "https://www.googleapis.com/auth/cloud-platform",
20793	//     "https://www.googleapis.com/auth/dialogflow"
20794	//   ]
20795	// }
20796
20797}
20798
20799// method id "dialogflow.projects.agent.environments.create":
20800
20801type ProjectsAgentEnvironmentsCreateCall struct {
20802	s                                  *Service
20803	parent                             string
20804	googleclouddialogflowv2environment *GoogleCloudDialogflowV2Environment
20805	urlParams_                         gensupport.URLParams
20806	ctx_                               context.Context
20807	header_                            http.Header
20808}
20809
20810// Create: Creates an agent environment.
20811//
20812// - parent: The agent to create an environment for. Supported formats:
20813//   - `projects//agent` - `projects//locations//agent`.
20814func (r *ProjectsAgentEnvironmentsService) Create(parent string, googleclouddialogflowv2environment *GoogleCloudDialogflowV2Environment) *ProjectsAgentEnvironmentsCreateCall {
20815	c := &ProjectsAgentEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20816	c.parent = parent
20817	c.googleclouddialogflowv2environment = googleclouddialogflowv2environment
20818	return c
20819}
20820
20821// EnvironmentId sets the optional parameter "environmentId": Required.
20822// The unique id of the new environment.
20823func (c *ProjectsAgentEnvironmentsCreateCall) EnvironmentId(environmentId string) *ProjectsAgentEnvironmentsCreateCall {
20824	c.urlParams_.Set("environmentId", environmentId)
20825	return c
20826}
20827
20828// Fields allows partial responses to be retrieved. See
20829// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20830// for more information.
20831func (c *ProjectsAgentEnvironmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsCreateCall {
20832	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20833	return c
20834}
20835
20836// Context sets the context to be used in this call's Do method. Any
20837// pending HTTP request will be aborted if the provided context is
20838// canceled.
20839func (c *ProjectsAgentEnvironmentsCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsCreateCall {
20840	c.ctx_ = ctx
20841	return c
20842}
20843
20844// Header returns an http.Header that can be modified by the caller to
20845// add HTTP headers to the request.
20846func (c *ProjectsAgentEnvironmentsCreateCall) Header() http.Header {
20847	if c.header_ == nil {
20848		c.header_ = make(http.Header)
20849	}
20850	return c.header_
20851}
20852
20853func (c *ProjectsAgentEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) {
20854	reqHeaders := make(http.Header)
20855	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
20856	for k, v := range c.header_ {
20857		reqHeaders[k] = v
20858	}
20859	reqHeaders.Set("User-Agent", c.s.userAgent())
20860	var body io.Reader = nil
20861	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2environment)
20862	if err != nil {
20863		return nil, err
20864	}
20865	reqHeaders.Set("Content-Type", "application/json")
20866	c.urlParams_.Set("alt", alt)
20867	c.urlParams_.Set("prettyPrint", "false")
20868	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/environments")
20869	urls += "?" + c.urlParams_.Encode()
20870	req, err := http.NewRequest("POST", urls, body)
20871	if err != nil {
20872		return nil, err
20873	}
20874	req.Header = reqHeaders
20875	googleapi.Expand(req.URL, map[string]string{
20876		"parent": c.parent,
20877	})
20878	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20879}
20880
20881// Do executes the "dialogflow.projects.agent.environments.create" call.
20882// Exactly one of *GoogleCloudDialogflowV2Environment or error will be
20883// non-nil. Any non-2xx status code is an error. Response headers are in
20884// either *GoogleCloudDialogflowV2Environment.ServerResponse.Header or
20885// (if a response was returned at all) in
20886// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20887// whether the returned error was because http.StatusNotModified was
20888// returned.
20889func (c *ProjectsAgentEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Environment, error) {
20890	gensupport.SetOptions(c.urlParams_, opts...)
20891	res, err := c.doRequest("json")
20892	if res != nil && res.StatusCode == http.StatusNotModified {
20893		if res.Body != nil {
20894			res.Body.Close()
20895		}
20896		return nil, &googleapi.Error{
20897			Code:   res.StatusCode,
20898			Header: res.Header,
20899		}
20900	}
20901	if err != nil {
20902		return nil, err
20903	}
20904	defer googleapi.CloseBody(res)
20905	if err := googleapi.CheckResponse(res); err != nil {
20906		return nil, err
20907	}
20908	ret := &GoogleCloudDialogflowV2Environment{
20909		ServerResponse: googleapi.ServerResponse{
20910			Header:         res.Header,
20911			HTTPStatusCode: res.StatusCode,
20912		},
20913	}
20914	target := &ret
20915	if err := gensupport.DecodeResponse(target, res); err != nil {
20916		return nil, err
20917	}
20918	return ret, nil
20919	// {
20920	//   "description": "Creates an agent environment.",
20921	//   "flatPath": "v2/projects/{projectsId}/agent/environments",
20922	//   "httpMethod": "POST",
20923	//   "id": "dialogflow.projects.agent.environments.create",
20924	//   "parameterOrder": [
20925	//     "parent"
20926	//   ],
20927	//   "parameters": {
20928	//     "environmentId": {
20929	//       "description": "Required. The unique id of the new environment.",
20930	//       "location": "query",
20931	//       "type": "string"
20932	//     },
20933	//     "parent": {
20934	//       "description": "Required. The agent to create an environment for. Supported formats: - `projects//agent` - `projects//locations//agent`",
20935	//       "location": "path",
20936	//       "pattern": "^projects/[^/]+/agent$",
20937	//       "required": true,
20938	//       "type": "string"
20939	//     }
20940	//   },
20941	//   "path": "v2/{+parent}/environments",
20942	//   "request": {
20943	//     "$ref": "GoogleCloudDialogflowV2Environment"
20944	//   },
20945	//   "response": {
20946	//     "$ref": "GoogleCloudDialogflowV2Environment"
20947	//   },
20948	//   "scopes": [
20949	//     "https://www.googleapis.com/auth/cloud-platform",
20950	//     "https://www.googleapis.com/auth/dialogflow"
20951	//   ]
20952	// }
20953
20954}
20955
20956// method id "dialogflow.projects.agent.environments.delete":
20957
20958type ProjectsAgentEnvironmentsDeleteCall struct {
20959	s          *Service
20960	name       string
20961	urlParams_ gensupport.URLParams
20962	ctx_       context.Context
20963	header_    http.Header
20964}
20965
20966// Delete: Deletes the specified agent environment.
20967//
20968// - name: The name of the environment to delete. / Format: -
20969//   `projects//agent/environments/` -
20970//   `projects//locations//agent/environments/`.
20971func (r *ProjectsAgentEnvironmentsService) Delete(name string) *ProjectsAgentEnvironmentsDeleteCall {
20972	c := &ProjectsAgentEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20973	c.name = name
20974	return c
20975}
20976
20977// Fields allows partial responses to be retrieved. See
20978// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20979// for more information.
20980func (c *ProjectsAgentEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsDeleteCall {
20981	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20982	return c
20983}
20984
20985// Context sets the context to be used in this call's Do method. Any
20986// pending HTTP request will be aborted if the provided context is
20987// canceled.
20988func (c *ProjectsAgentEnvironmentsDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsDeleteCall {
20989	c.ctx_ = ctx
20990	return c
20991}
20992
20993// Header returns an http.Header that can be modified by the caller to
20994// add HTTP headers to the request.
20995func (c *ProjectsAgentEnvironmentsDeleteCall) Header() http.Header {
20996	if c.header_ == nil {
20997		c.header_ = make(http.Header)
20998	}
20999	return c.header_
21000}
21001
21002func (c *ProjectsAgentEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
21003	reqHeaders := make(http.Header)
21004	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
21005	for k, v := range c.header_ {
21006		reqHeaders[k] = v
21007	}
21008	reqHeaders.Set("User-Agent", c.s.userAgent())
21009	var body io.Reader = nil
21010	c.urlParams_.Set("alt", alt)
21011	c.urlParams_.Set("prettyPrint", "false")
21012	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
21013	urls += "?" + c.urlParams_.Encode()
21014	req, err := http.NewRequest("DELETE", urls, body)
21015	if err != nil {
21016		return nil, err
21017	}
21018	req.Header = reqHeaders
21019	googleapi.Expand(req.URL, map[string]string{
21020		"name": c.name,
21021	})
21022	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21023}
21024
21025// Do executes the "dialogflow.projects.agent.environments.delete" call.
21026// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
21027// non-2xx status code is an error. Response headers are in either
21028// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
21029// returned at all) in error.(*googleapi.Error).Header. Use
21030// googleapi.IsNotModified to check whether the returned error was
21031// because http.StatusNotModified was returned.
21032func (c *ProjectsAgentEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
21033	gensupport.SetOptions(c.urlParams_, opts...)
21034	res, err := c.doRequest("json")
21035	if res != nil && res.StatusCode == http.StatusNotModified {
21036		if res.Body != nil {
21037			res.Body.Close()
21038		}
21039		return nil, &googleapi.Error{
21040			Code:   res.StatusCode,
21041			Header: res.Header,
21042		}
21043	}
21044	if err != nil {
21045		return nil, err
21046	}
21047	defer googleapi.CloseBody(res)
21048	if err := googleapi.CheckResponse(res); err != nil {
21049		return nil, err
21050	}
21051	ret := &GoogleProtobufEmpty{
21052		ServerResponse: googleapi.ServerResponse{
21053			Header:         res.Header,
21054			HTTPStatusCode: res.StatusCode,
21055		},
21056	}
21057	target := &ret
21058	if err := gensupport.DecodeResponse(target, res); err != nil {
21059		return nil, err
21060	}
21061	return ret, nil
21062	// {
21063	//   "description": "Deletes the specified agent environment.",
21064	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}",
21065	//   "httpMethod": "DELETE",
21066	//   "id": "dialogflow.projects.agent.environments.delete",
21067	//   "parameterOrder": [
21068	//     "name"
21069	//   ],
21070	//   "parameters": {
21071	//     "name": {
21072	//       "description": "Required. The name of the environment to delete. / Format: - `projects//agent/environments/` - `projects//locations//agent/environments/`",
21073	//       "location": "path",
21074	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+$",
21075	//       "required": true,
21076	//       "type": "string"
21077	//     }
21078	//   },
21079	//   "path": "v2/{+name}",
21080	//   "response": {
21081	//     "$ref": "GoogleProtobufEmpty"
21082	//   },
21083	//   "scopes": [
21084	//     "https://www.googleapis.com/auth/cloud-platform",
21085	//     "https://www.googleapis.com/auth/dialogflow"
21086	//   ]
21087	// }
21088
21089}
21090
21091// method id "dialogflow.projects.agent.environments.get":
21092
21093type ProjectsAgentEnvironmentsGetCall struct {
21094	s            *Service
21095	name         string
21096	urlParams_   gensupport.URLParams
21097	ifNoneMatch_ string
21098	ctx_         context.Context
21099	header_      http.Header
21100}
21101
21102// Get: Retrieves the specified agent environment.
21103//
21104// - name: The name of the environment. Supported formats: -
21105//   `projects//agent/environments/` -
21106//   `projects//locations//agent/environments/`.
21107func (r *ProjectsAgentEnvironmentsService) Get(name string) *ProjectsAgentEnvironmentsGetCall {
21108	c := &ProjectsAgentEnvironmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21109	c.name = name
21110	return c
21111}
21112
21113// Fields allows partial responses to be retrieved. See
21114// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21115// for more information.
21116func (c *ProjectsAgentEnvironmentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsGetCall {
21117	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21118	return c
21119}
21120
21121// IfNoneMatch sets the optional parameter which makes the operation
21122// fail if the object's ETag matches the given value. This is useful for
21123// getting updates only after the object has changed since the last
21124// request. Use googleapi.IsNotModified to check whether the response
21125// error from Do is the result of In-None-Match.
21126func (c *ProjectsAgentEnvironmentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsGetCall {
21127	c.ifNoneMatch_ = entityTag
21128	return c
21129}
21130
21131// Context sets the context to be used in this call's Do method. Any
21132// pending HTTP request will be aborted if the provided context is
21133// canceled.
21134func (c *ProjectsAgentEnvironmentsGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsGetCall {
21135	c.ctx_ = ctx
21136	return c
21137}
21138
21139// Header returns an http.Header that can be modified by the caller to
21140// add HTTP headers to the request.
21141func (c *ProjectsAgentEnvironmentsGetCall) Header() http.Header {
21142	if c.header_ == nil {
21143		c.header_ = make(http.Header)
21144	}
21145	return c.header_
21146}
21147
21148func (c *ProjectsAgentEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) {
21149	reqHeaders := make(http.Header)
21150	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
21151	for k, v := range c.header_ {
21152		reqHeaders[k] = v
21153	}
21154	reqHeaders.Set("User-Agent", c.s.userAgent())
21155	if c.ifNoneMatch_ != "" {
21156		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21157	}
21158	var body io.Reader = nil
21159	c.urlParams_.Set("alt", alt)
21160	c.urlParams_.Set("prettyPrint", "false")
21161	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
21162	urls += "?" + c.urlParams_.Encode()
21163	req, err := http.NewRequest("GET", urls, body)
21164	if err != nil {
21165		return nil, err
21166	}
21167	req.Header = reqHeaders
21168	googleapi.Expand(req.URL, map[string]string{
21169		"name": c.name,
21170	})
21171	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21172}
21173
21174// Do executes the "dialogflow.projects.agent.environments.get" call.
21175// Exactly one of *GoogleCloudDialogflowV2Environment or error will be
21176// non-nil. Any non-2xx status code is an error. Response headers are in
21177// either *GoogleCloudDialogflowV2Environment.ServerResponse.Header or
21178// (if a response was returned at all) in
21179// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21180// whether the returned error was because http.StatusNotModified was
21181// returned.
21182func (c *ProjectsAgentEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Environment, error) {
21183	gensupport.SetOptions(c.urlParams_, opts...)
21184	res, err := c.doRequest("json")
21185	if res != nil && res.StatusCode == http.StatusNotModified {
21186		if res.Body != nil {
21187			res.Body.Close()
21188		}
21189		return nil, &googleapi.Error{
21190			Code:   res.StatusCode,
21191			Header: res.Header,
21192		}
21193	}
21194	if err != nil {
21195		return nil, err
21196	}
21197	defer googleapi.CloseBody(res)
21198	if err := googleapi.CheckResponse(res); err != nil {
21199		return nil, err
21200	}
21201	ret := &GoogleCloudDialogflowV2Environment{
21202		ServerResponse: googleapi.ServerResponse{
21203			Header:         res.Header,
21204			HTTPStatusCode: res.StatusCode,
21205		},
21206	}
21207	target := &ret
21208	if err := gensupport.DecodeResponse(target, res); err != nil {
21209		return nil, err
21210	}
21211	return ret, nil
21212	// {
21213	//   "description": "Retrieves the specified agent environment.",
21214	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}",
21215	//   "httpMethod": "GET",
21216	//   "id": "dialogflow.projects.agent.environments.get",
21217	//   "parameterOrder": [
21218	//     "name"
21219	//   ],
21220	//   "parameters": {
21221	//     "name": {
21222	//       "description": "Required. The name of the environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`",
21223	//       "location": "path",
21224	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+$",
21225	//       "required": true,
21226	//       "type": "string"
21227	//     }
21228	//   },
21229	//   "path": "v2/{+name}",
21230	//   "response": {
21231	//     "$ref": "GoogleCloudDialogflowV2Environment"
21232	//   },
21233	//   "scopes": [
21234	//     "https://www.googleapis.com/auth/cloud-platform",
21235	//     "https://www.googleapis.com/auth/dialogflow"
21236	//   ]
21237	// }
21238
21239}
21240
21241// method id "dialogflow.projects.agent.environments.getHistory":
21242
21243type ProjectsAgentEnvironmentsGetHistoryCall struct {
21244	s            *Service
21245	parent       string
21246	urlParams_   gensupport.URLParams
21247	ifNoneMatch_ string
21248	ctx_         context.Context
21249	header_      http.Header
21250}
21251
21252// GetHistory: Gets the history of the specified environment.
21253//
21254// - parent: The name of the environment to retrieve history for.
21255//   Supported formats: - `projects//agent/environments/` -
21256//   `projects//locations//agent/environments/`.
21257func (r *ProjectsAgentEnvironmentsService) GetHistory(parent string) *ProjectsAgentEnvironmentsGetHistoryCall {
21258	c := &ProjectsAgentEnvironmentsGetHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21259	c.parent = parent
21260	return c
21261}
21262
21263// PageSize sets the optional parameter "pageSize": The maximum number
21264// of items to return in a single page. By default 100 and at most 1000.
21265func (c *ProjectsAgentEnvironmentsGetHistoryCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsGetHistoryCall {
21266	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
21267	return c
21268}
21269
21270// PageToken sets the optional parameter "pageToken": The
21271// next_page_token value returned from a previous list request.
21272func (c *ProjectsAgentEnvironmentsGetHistoryCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsGetHistoryCall {
21273	c.urlParams_.Set("pageToken", pageToken)
21274	return c
21275}
21276
21277// Fields allows partial responses to be retrieved. See
21278// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21279// for more information.
21280func (c *ProjectsAgentEnvironmentsGetHistoryCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsGetHistoryCall {
21281	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21282	return c
21283}
21284
21285// IfNoneMatch sets the optional parameter which makes the operation
21286// fail if the object's ETag matches the given value. This is useful for
21287// getting updates only after the object has changed since the last
21288// request. Use googleapi.IsNotModified to check whether the response
21289// error from Do is the result of In-None-Match.
21290func (c *ProjectsAgentEnvironmentsGetHistoryCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsGetHistoryCall {
21291	c.ifNoneMatch_ = entityTag
21292	return c
21293}
21294
21295// Context sets the context to be used in this call's Do method. Any
21296// pending HTTP request will be aborted if the provided context is
21297// canceled.
21298func (c *ProjectsAgentEnvironmentsGetHistoryCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsGetHistoryCall {
21299	c.ctx_ = ctx
21300	return c
21301}
21302
21303// Header returns an http.Header that can be modified by the caller to
21304// add HTTP headers to the request.
21305func (c *ProjectsAgentEnvironmentsGetHistoryCall) Header() http.Header {
21306	if c.header_ == nil {
21307		c.header_ = make(http.Header)
21308	}
21309	return c.header_
21310}
21311
21312func (c *ProjectsAgentEnvironmentsGetHistoryCall) doRequest(alt string) (*http.Response, error) {
21313	reqHeaders := make(http.Header)
21314	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
21315	for k, v := range c.header_ {
21316		reqHeaders[k] = v
21317	}
21318	reqHeaders.Set("User-Agent", c.s.userAgent())
21319	if c.ifNoneMatch_ != "" {
21320		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21321	}
21322	var body io.Reader = nil
21323	c.urlParams_.Set("alt", alt)
21324	c.urlParams_.Set("prettyPrint", "false")
21325	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/history")
21326	urls += "?" + c.urlParams_.Encode()
21327	req, err := http.NewRequest("GET", urls, body)
21328	if err != nil {
21329		return nil, err
21330	}
21331	req.Header = reqHeaders
21332	googleapi.Expand(req.URL, map[string]string{
21333		"parent": c.parent,
21334	})
21335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21336}
21337
21338// Do executes the "dialogflow.projects.agent.environments.getHistory" call.
21339// Exactly one of *GoogleCloudDialogflowV2EnvironmentHistory or error
21340// will be non-nil. Any non-2xx status code is an error. Response
21341// headers are in either
21342// *GoogleCloudDialogflowV2EnvironmentHistory.ServerResponse.Header or
21343// (if a response was returned at all) in
21344// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21345// whether the returned error was because http.StatusNotModified was
21346// returned.
21347func (c *ProjectsAgentEnvironmentsGetHistoryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EnvironmentHistory, error) {
21348	gensupport.SetOptions(c.urlParams_, opts...)
21349	res, err := c.doRequest("json")
21350	if res != nil && res.StatusCode == http.StatusNotModified {
21351		if res.Body != nil {
21352			res.Body.Close()
21353		}
21354		return nil, &googleapi.Error{
21355			Code:   res.StatusCode,
21356			Header: res.Header,
21357		}
21358	}
21359	if err != nil {
21360		return nil, err
21361	}
21362	defer googleapi.CloseBody(res)
21363	if err := googleapi.CheckResponse(res); err != nil {
21364		return nil, err
21365	}
21366	ret := &GoogleCloudDialogflowV2EnvironmentHistory{
21367		ServerResponse: googleapi.ServerResponse{
21368			Header:         res.Header,
21369			HTTPStatusCode: res.StatusCode,
21370		},
21371	}
21372	target := &ret
21373	if err := gensupport.DecodeResponse(target, res); err != nil {
21374		return nil, err
21375	}
21376	return ret, nil
21377	// {
21378	//   "description": "Gets the history of the specified environment.",
21379	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/history",
21380	//   "httpMethod": "GET",
21381	//   "id": "dialogflow.projects.agent.environments.getHistory",
21382	//   "parameterOrder": [
21383	//     "parent"
21384	//   ],
21385	//   "parameters": {
21386	//     "pageSize": {
21387	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
21388	//       "format": "int32",
21389	//       "location": "query",
21390	//       "type": "integer"
21391	//     },
21392	//     "pageToken": {
21393	//       "description": "Optional. The next_page_token value returned from a previous list request.",
21394	//       "location": "query",
21395	//       "type": "string"
21396	//     },
21397	//     "parent": {
21398	//       "description": "Required. The name of the environment to retrieve history for. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`",
21399	//       "location": "path",
21400	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+$",
21401	//       "required": true,
21402	//       "type": "string"
21403	//     }
21404	//   },
21405	//   "path": "v2/{+parent}/history",
21406	//   "response": {
21407	//     "$ref": "GoogleCloudDialogflowV2EnvironmentHistory"
21408	//   },
21409	//   "scopes": [
21410	//     "https://www.googleapis.com/auth/cloud-platform",
21411	//     "https://www.googleapis.com/auth/dialogflow"
21412	//   ]
21413	// }
21414
21415}
21416
21417// Pages invokes f for each page of results.
21418// A non-nil error returned from f will halt the iteration.
21419// The provided context supersedes any context provided to the Context method.
21420func (c *ProjectsAgentEnvironmentsGetHistoryCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2EnvironmentHistory) error) error {
21421	c.ctx_ = ctx
21422	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21423	for {
21424		x, err := c.Do()
21425		if err != nil {
21426			return err
21427		}
21428		if err := f(x); err != nil {
21429			return err
21430		}
21431		if x.NextPageToken == "" {
21432			return nil
21433		}
21434		c.PageToken(x.NextPageToken)
21435	}
21436}
21437
21438// method id "dialogflow.projects.agent.environments.list":
21439
21440type ProjectsAgentEnvironmentsListCall struct {
21441	s            *Service
21442	parent       string
21443	urlParams_   gensupport.URLParams
21444	ifNoneMatch_ string
21445	ctx_         context.Context
21446	header_      http.Header
21447}
21448
21449// List: Returns the list of all non-draft environments of the specified
21450// agent.
21451//
21452// - parent: The agent to list all environments from. Format: -
21453//   `projects//agent` - `projects//locations//agent`.
21454func (r *ProjectsAgentEnvironmentsService) List(parent string) *ProjectsAgentEnvironmentsListCall {
21455	c := &ProjectsAgentEnvironmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21456	c.parent = parent
21457	return c
21458}
21459
21460// PageSize sets the optional parameter "pageSize": The maximum number
21461// of items to return in a single page. By default 100 and at most 1000.
21462func (c *ProjectsAgentEnvironmentsListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsListCall {
21463	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
21464	return c
21465}
21466
21467// PageToken sets the optional parameter "pageToken": The
21468// next_page_token value returned from a previous list request.
21469func (c *ProjectsAgentEnvironmentsListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsListCall {
21470	c.urlParams_.Set("pageToken", pageToken)
21471	return c
21472}
21473
21474// Fields allows partial responses to be retrieved. See
21475// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21476// for more information.
21477func (c *ProjectsAgentEnvironmentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsListCall {
21478	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21479	return c
21480}
21481
21482// IfNoneMatch sets the optional parameter which makes the operation
21483// fail if the object's ETag matches the given value. This is useful for
21484// getting updates only after the object has changed since the last
21485// request. Use googleapi.IsNotModified to check whether the response
21486// error from Do is the result of In-None-Match.
21487func (c *ProjectsAgentEnvironmentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsListCall {
21488	c.ifNoneMatch_ = entityTag
21489	return c
21490}
21491
21492// Context sets the context to be used in this call's Do method. Any
21493// pending HTTP request will be aborted if the provided context is
21494// canceled.
21495func (c *ProjectsAgentEnvironmentsListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsListCall {
21496	c.ctx_ = ctx
21497	return c
21498}
21499
21500// Header returns an http.Header that can be modified by the caller to
21501// add HTTP headers to the request.
21502func (c *ProjectsAgentEnvironmentsListCall) Header() http.Header {
21503	if c.header_ == nil {
21504		c.header_ = make(http.Header)
21505	}
21506	return c.header_
21507}
21508
21509func (c *ProjectsAgentEnvironmentsListCall) doRequest(alt string) (*http.Response, error) {
21510	reqHeaders := make(http.Header)
21511	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
21512	for k, v := range c.header_ {
21513		reqHeaders[k] = v
21514	}
21515	reqHeaders.Set("User-Agent", c.s.userAgent())
21516	if c.ifNoneMatch_ != "" {
21517		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21518	}
21519	var body io.Reader = nil
21520	c.urlParams_.Set("alt", alt)
21521	c.urlParams_.Set("prettyPrint", "false")
21522	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/environments")
21523	urls += "?" + c.urlParams_.Encode()
21524	req, err := http.NewRequest("GET", urls, body)
21525	if err != nil {
21526		return nil, err
21527	}
21528	req.Header = reqHeaders
21529	googleapi.Expand(req.URL, map[string]string{
21530		"parent": c.parent,
21531	})
21532	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21533}
21534
21535// Do executes the "dialogflow.projects.agent.environments.list" call.
21536// Exactly one of *GoogleCloudDialogflowV2ListEnvironmentsResponse or
21537// error will be non-nil. Any non-2xx status code is an error. Response
21538// headers are in either
21539// *GoogleCloudDialogflowV2ListEnvironmentsResponse.ServerResponse.Header
21540//  or (if a response was returned at all) in
21541// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21542// whether the returned error was because http.StatusNotModified was
21543// returned.
21544func (c *ProjectsAgentEnvironmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListEnvironmentsResponse, error) {
21545	gensupport.SetOptions(c.urlParams_, opts...)
21546	res, err := c.doRequest("json")
21547	if res != nil && res.StatusCode == http.StatusNotModified {
21548		if res.Body != nil {
21549			res.Body.Close()
21550		}
21551		return nil, &googleapi.Error{
21552			Code:   res.StatusCode,
21553			Header: res.Header,
21554		}
21555	}
21556	if err != nil {
21557		return nil, err
21558	}
21559	defer googleapi.CloseBody(res)
21560	if err := googleapi.CheckResponse(res); err != nil {
21561		return nil, err
21562	}
21563	ret := &GoogleCloudDialogflowV2ListEnvironmentsResponse{
21564		ServerResponse: googleapi.ServerResponse{
21565			Header:         res.Header,
21566			HTTPStatusCode: res.StatusCode,
21567		},
21568	}
21569	target := &ret
21570	if err := gensupport.DecodeResponse(target, res); err != nil {
21571		return nil, err
21572	}
21573	return ret, nil
21574	// {
21575	//   "description": "Returns the list of all non-draft environments of the specified agent.",
21576	//   "flatPath": "v2/projects/{projectsId}/agent/environments",
21577	//   "httpMethod": "GET",
21578	//   "id": "dialogflow.projects.agent.environments.list",
21579	//   "parameterOrder": [
21580	//     "parent"
21581	//   ],
21582	//   "parameters": {
21583	//     "pageSize": {
21584	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
21585	//       "format": "int32",
21586	//       "location": "query",
21587	//       "type": "integer"
21588	//     },
21589	//     "pageToken": {
21590	//       "description": "Optional. The next_page_token value returned from a previous list request.",
21591	//       "location": "query",
21592	//       "type": "string"
21593	//     },
21594	//     "parent": {
21595	//       "description": "Required. The agent to list all environments from. Format: - `projects//agent` - `projects//locations//agent`",
21596	//       "location": "path",
21597	//       "pattern": "^projects/[^/]+/agent$",
21598	//       "required": true,
21599	//       "type": "string"
21600	//     }
21601	//   },
21602	//   "path": "v2/{+parent}/environments",
21603	//   "response": {
21604	//     "$ref": "GoogleCloudDialogflowV2ListEnvironmentsResponse"
21605	//   },
21606	//   "scopes": [
21607	//     "https://www.googleapis.com/auth/cloud-platform",
21608	//     "https://www.googleapis.com/auth/dialogflow"
21609	//   ]
21610	// }
21611
21612}
21613
21614// Pages invokes f for each page of results.
21615// A non-nil error returned from f will halt the iteration.
21616// The provided context supersedes any context provided to the Context method.
21617func (c *ProjectsAgentEnvironmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListEnvironmentsResponse) error) error {
21618	c.ctx_ = ctx
21619	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21620	for {
21621		x, err := c.Do()
21622		if err != nil {
21623			return err
21624		}
21625		if err := f(x); err != nil {
21626			return err
21627		}
21628		if x.NextPageToken == "" {
21629			return nil
21630		}
21631		c.PageToken(x.NextPageToken)
21632	}
21633}
21634
21635// method id "dialogflow.projects.agent.environments.patch":
21636
21637type ProjectsAgentEnvironmentsPatchCall struct {
21638	s                                  *Service
21639	nameid                             string
21640	googleclouddialogflowv2environment *GoogleCloudDialogflowV2Environment
21641	urlParams_                         gensupport.URLParams
21642	ctx_                               context.Context
21643	header_                            http.Header
21644}
21645
21646// Patch: Updates the specified agent environment. This method allows
21647// you to deploy new agent versions into the environment. When an
21648// environment is pointed to a new agent version by setting
21649// `environment.agent_version`, the environment is temporarily set to
21650// the `LOADING` state. During that time, the environment keeps on
21651// serving the previous version of the agent. After the new agent
21652// version is done loading, the environment is set back to the `RUNNING`
21653// state. You can use "-" as Environment ID in environment name to
21654// update version in "draft" environment. WARNING: this will negate all
21655// recent changes to draft and can't be undone. You may want to save the
21656// draft to a version before calling this function.
21657//
21658// - name: Output only. The unique identifier of this agent environment.
21659//   Supported formats: - `projects//agent/environments/` -
21660//   `projects//locations//agent/environments/`.
21661func (r *ProjectsAgentEnvironmentsService) Patch(nameid string, googleclouddialogflowv2environment *GoogleCloudDialogflowV2Environment) *ProjectsAgentEnvironmentsPatchCall {
21662	c := &ProjectsAgentEnvironmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21663	c.nameid = nameid
21664	c.googleclouddialogflowv2environment = googleclouddialogflowv2environment
21665	return c
21666}
21667
21668// AllowLoadToDraftAndDiscardChanges sets the optional parameter
21669// "allowLoadToDraftAndDiscardChanges": This field is used to prevent
21670// accidental overwrite of the draft environment, which is an operation
21671// that cannot be undone. To confirm that the caller desires this
21672// overwrite, this field must be explicitly set to true when updating
21673// the draft environment (environment ID = `-`).
21674func (c *ProjectsAgentEnvironmentsPatchCall) AllowLoadToDraftAndDiscardChanges(allowLoadToDraftAndDiscardChanges bool) *ProjectsAgentEnvironmentsPatchCall {
21675	c.urlParams_.Set("allowLoadToDraftAndDiscardChanges", fmt.Sprint(allowLoadToDraftAndDiscardChanges))
21676	return c
21677}
21678
21679// UpdateMask sets the optional parameter "updateMask": Required. The
21680// mask to control which fields get updated.
21681func (c *ProjectsAgentEnvironmentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsPatchCall {
21682	c.urlParams_.Set("updateMask", updateMask)
21683	return c
21684}
21685
21686// Fields allows partial responses to be retrieved. See
21687// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21688// for more information.
21689func (c *ProjectsAgentEnvironmentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsPatchCall {
21690	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21691	return c
21692}
21693
21694// Context sets the context to be used in this call's Do method. Any
21695// pending HTTP request will be aborted if the provided context is
21696// canceled.
21697func (c *ProjectsAgentEnvironmentsPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsPatchCall {
21698	c.ctx_ = ctx
21699	return c
21700}
21701
21702// Header returns an http.Header that can be modified by the caller to
21703// add HTTP headers to the request.
21704func (c *ProjectsAgentEnvironmentsPatchCall) Header() http.Header {
21705	if c.header_ == nil {
21706		c.header_ = make(http.Header)
21707	}
21708	return c.header_
21709}
21710
21711func (c *ProjectsAgentEnvironmentsPatchCall) doRequest(alt string) (*http.Response, error) {
21712	reqHeaders := make(http.Header)
21713	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
21714	for k, v := range c.header_ {
21715		reqHeaders[k] = v
21716	}
21717	reqHeaders.Set("User-Agent", c.s.userAgent())
21718	var body io.Reader = nil
21719	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2environment)
21720	if err != nil {
21721		return nil, err
21722	}
21723	reqHeaders.Set("Content-Type", "application/json")
21724	c.urlParams_.Set("alt", alt)
21725	c.urlParams_.Set("prettyPrint", "false")
21726	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
21727	urls += "?" + c.urlParams_.Encode()
21728	req, err := http.NewRequest("PATCH", urls, body)
21729	if err != nil {
21730		return nil, err
21731	}
21732	req.Header = reqHeaders
21733	googleapi.Expand(req.URL, map[string]string{
21734		"name": c.nameid,
21735	})
21736	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21737}
21738
21739// Do executes the "dialogflow.projects.agent.environments.patch" call.
21740// Exactly one of *GoogleCloudDialogflowV2Environment or error will be
21741// non-nil. Any non-2xx status code is an error. Response headers are in
21742// either *GoogleCloudDialogflowV2Environment.ServerResponse.Header or
21743// (if a response was returned at all) in
21744// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21745// whether the returned error was because http.StatusNotModified was
21746// returned.
21747func (c *ProjectsAgentEnvironmentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Environment, error) {
21748	gensupport.SetOptions(c.urlParams_, opts...)
21749	res, err := c.doRequest("json")
21750	if res != nil && res.StatusCode == http.StatusNotModified {
21751		if res.Body != nil {
21752			res.Body.Close()
21753		}
21754		return nil, &googleapi.Error{
21755			Code:   res.StatusCode,
21756			Header: res.Header,
21757		}
21758	}
21759	if err != nil {
21760		return nil, err
21761	}
21762	defer googleapi.CloseBody(res)
21763	if err := googleapi.CheckResponse(res); err != nil {
21764		return nil, err
21765	}
21766	ret := &GoogleCloudDialogflowV2Environment{
21767		ServerResponse: googleapi.ServerResponse{
21768			Header:         res.Header,
21769			HTTPStatusCode: res.StatusCode,
21770		},
21771	}
21772	target := &ret
21773	if err := gensupport.DecodeResponse(target, res); err != nil {
21774		return nil, err
21775	}
21776	return ret, nil
21777	// {
21778	//   "description": "Updates the specified agent environment. This method allows you to deploy new agent versions into the environment. When an environment is pointed to a new agent version by setting `environment.agent_version`, the environment is temporarily set to the `LOADING` state. During that time, the environment keeps on serving the previous version of the agent. After the new agent version is done loading, the environment is set back to the `RUNNING` state. You can use \"-\" as Environment ID in environment name to update version in \"draft\" environment. WARNING: this will negate all recent changes to draft and can't be undone. You may want to save the draft to a version before calling this function.",
21779	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}",
21780	//   "httpMethod": "PATCH",
21781	//   "id": "dialogflow.projects.agent.environments.patch",
21782	//   "parameterOrder": [
21783	//     "name"
21784	//   ],
21785	//   "parameters": {
21786	//     "allowLoadToDraftAndDiscardChanges": {
21787	//       "description": "Optional. This field is used to prevent accidental overwrite of the draft environment, which is an operation that cannot be undone. To confirm that the caller desires this overwrite, this field must be explicitly set to true when updating the draft environment (environment ID = `-`).",
21788	//       "location": "query",
21789	//       "type": "boolean"
21790	//     },
21791	//     "name": {
21792	//       "description": "Output only. The unique identifier of this agent environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`",
21793	//       "location": "path",
21794	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+$",
21795	//       "required": true,
21796	//       "type": "string"
21797	//     },
21798	//     "updateMask": {
21799	//       "description": "Required. The mask to control which fields get updated.",
21800	//       "format": "google-fieldmask",
21801	//       "location": "query",
21802	//       "type": "string"
21803	//     }
21804	//   },
21805	//   "path": "v2/{+name}",
21806	//   "request": {
21807	//     "$ref": "GoogleCloudDialogflowV2Environment"
21808	//   },
21809	//   "response": {
21810	//     "$ref": "GoogleCloudDialogflowV2Environment"
21811	//   },
21812	//   "scopes": [
21813	//     "https://www.googleapis.com/auth/cloud-platform",
21814	//     "https://www.googleapis.com/auth/dialogflow"
21815	//   ]
21816	// }
21817
21818}
21819
21820// method id "dialogflow.projects.agent.environments.intents.list":
21821
21822type ProjectsAgentEnvironmentsIntentsListCall struct {
21823	s            *Service
21824	parent       string
21825	urlParams_   gensupport.URLParams
21826	ifNoneMatch_ string
21827	ctx_         context.Context
21828	header_      http.Header
21829}
21830
21831// List: Returns the list of all intents in the specified agent.
21832//
21833// - parent: The agent to list all intents from. Format:
21834//   `projects//agent` or `projects//locations//agent`. Alternatively,
21835//   you can specify the environment to list intents for. Format:
21836//   `projects//agent/environments/` or
21837//   `projects//locations//agent/environments/`. Note: training phrases
21838//   of the intents will not be returned for non-draft environment.
21839func (r *ProjectsAgentEnvironmentsIntentsService) List(parent string) *ProjectsAgentEnvironmentsIntentsListCall {
21840	c := &ProjectsAgentEnvironmentsIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21841	c.parent = parent
21842	return c
21843}
21844
21845// IntentView sets the optional parameter "intentView": The resource
21846// view to apply to the returned intent.
21847//
21848// Possible values:
21849//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
21850// in the response.
21851//   "INTENT_VIEW_FULL" - All fields are populated.
21852func (c *ProjectsAgentEnvironmentsIntentsListCall) IntentView(intentView string) *ProjectsAgentEnvironmentsIntentsListCall {
21853	c.urlParams_.Set("intentView", intentView)
21854	return c
21855}
21856
21857// LanguageCode sets the optional parameter "languageCode": The language
21858// used to access language-specific data. If not specified, the agent's
21859// default language is used. For more information, see Multilingual
21860// intent and entity data
21861// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
21862func (c *ProjectsAgentEnvironmentsIntentsListCall) LanguageCode(languageCode string) *ProjectsAgentEnvironmentsIntentsListCall {
21863	c.urlParams_.Set("languageCode", languageCode)
21864	return c
21865}
21866
21867// PageSize sets the optional parameter "pageSize": The maximum number
21868// of items to return in a single page. By default 100 and at most 1000.
21869func (c *ProjectsAgentEnvironmentsIntentsListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsIntentsListCall {
21870	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
21871	return c
21872}
21873
21874// PageToken sets the optional parameter "pageToken": The
21875// next_page_token value returned from a previous list request.
21876func (c *ProjectsAgentEnvironmentsIntentsListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsIntentsListCall {
21877	c.urlParams_.Set("pageToken", pageToken)
21878	return c
21879}
21880
21881// Fields allows partial responses to be retrieved. See
21882// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21883// for more information.
21884func (c *ProjectsAgentEnvironmentsIntentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsIntentsListCall {
21885	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21886	return c
21887}
21888
21889// IfNoneMatch sets the optional parameter which makes the operation
21890// fail if the object's ETag matches the given value. This is useful for
21891// getting updates only after the object has changed since the last
21892// request. Use googleapi.IsNotModified to check whether the response
21893// error from Do is the result of In-None-Match.
21894func (c *ProjectsAgentEnvironmentsIntentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsIntentsListCall {
21895	c.ifNoneMatch_ = entityTag
21896	return c
21897}
21898
21899// Context sets the context to be used in this call's Do method. Any
21900// pending HTTP request will be aborted if the provided context is
21901// canceled.
21902func (c *ProjectsAgentEnvironmentsIntentsListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsIntentsListCall {
21903	c.ctx_ = ctx
21904	return c
21905}
21906
21907// Header returns an http.Header that can be modified by the caller to
21908// add HTTP headers to the request.
21909func (c *ProjectsAgentEnvironmentsIntentsListCall) Header() http.Header {
21910	if c.header_ == nil {
21911		c.header_ = make(http.Header)
21912	}
21913	return c.header_
21914}
21915
21916func (c *ProjectsAgentEnvironmentsIntentsListCall) doRequest(alt string) (*http.Response, error) {
21917	reqHeaders := make(http.Header)
21918	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
21919	for k, v := range c.header_ {
21920		reqHeaders[k] = v
21921	}
21922	reqHeaders.Set("User-Agent", c.s.userAgent())
21923	if c.ifNoneMatch_ != "" {
21924		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21925	}
21926	var body io.Reader = nil
21927	c.urlParams_.Set("alt", alt)
21928	c.urlParams_.Set("prettyPrint", "false")
21929	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents")
21930	urls += "?" + c.urlParams_.Encode()
21931	req, err := http.NewRequest("GET", urls, body)
21932	if err != nil {
21933		return nil, err
21934	}
21935	req.Header = reqHeaders
21936	googleapi.Expand(req.URL, map[string]string{
21937		"parent": c.parent,
21938	})
21939	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21940}
21941
21942// Do executes the "dialogflow.projects.agent.environments.intents.list" call.
21943// Exactly one of *GoogleCloudDialogflowV2ListIntentsResponse or error
21944// will be non-nil. Any non-2xx status code is an error. Response
21945// headers are in either
21946// *GoogleCloudDialogflowV2ListIntentsResponse.ServerResponse.Header or
21947// (if a response was returned at all) in
21948// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21949// whether the returned error was because http.StatusNotModified was
21950// returned.
21951func (c *ProjectsAgentEnvironmentsIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListIntentsResponse, error) {
21952	gensupport.SetOptions(c.urlParams_, opts...)
21953	res, err := c.doRequest("json")
21954	if res != nil && res.StatusCode == http.StatusNotModified {
21955		if res.Body != nil {
21956			res.Body.Close()
21957		}
21958		return nil, &googleapi.Error{
21959			Code:   res.StatusCode,
21960			Header: res.Header,
21961		}
21962	}
21963	if err != nil {
21964		return nil, err
21965	}
21966	defer googleapi.CloseBody(res)
21967	if err := googleapi.CheckResponse(res); err != nil {
21968		return nil, err
21969	}
21970	ret := &GoogleCloudDialogflowV2ListIntentsResponse{
21971		ServerResponse: googleapi.ServerResponse{
21972			Header:         res.Header,
21973			HTTPStatusCode: res.StatusCode,
21974		},
21975	}
21976	target := &ret
21977	if err := gensupport.DecodeResponse(target, res); err != nil {
21978		return nil, err
21979	}
21980	return ret, nil
21981	// {
21982	//   "description": "Returns the list of all intents in the specified agent.",
21983	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/intents",
21984	//   "httpMethod": "GET",
21985	//   "id": "dialogflow.projects.agent.environments.intents.list",
21986	//   "parameterOrder": [
21987	//     "parent"
21988	//   ],
21989	//   "parameters": {
21990	//     "intentView": {
21991	//       "description": "Optional. The resource view to apply to the returned intent.",
21992	//       "enum": [
21993	//         "INTENT_VIEW_UNSPECIFIED",
21994	//         "INTENT_VIEW_FULL"
21995	//       ],
21996	//       "enumDescriptions": [
21997	//         "Training phrases field is not populated in the response.",
21998	//         "All fields are populated."
21999	//       ],
22000	//       "location": "query",
22001	//       "type": "string"
22002	//     },
22003	//     "languageCode": {
22004	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
22005	//       "location": "query",
22006	//       "type": "string"
22007	//     },
22008	//     "pageSize": {
22009	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
22010	//       "format": "int32",
22011	//       "location": "query",
22012	//       "type": "integer"
22013	//     },
22014	//     "pageToken": {
22015	//       "description": "Optional. The next_page_token value returned from a previous list request.",
22016	//       "location": "query",
22017	//       "type": "string"
22018	//     },
22019	//     "parent": {
22020	//       "description": "Required. The agent to list all intents from. Format: `projects//agent` or `projects//locations//agent`. Alternatively, you can specify the environment to list intents for. Format: `projects//agent/environments/` or `projects//locations//agent/environments/`. Note: training phrases of the intents will not be returned for non-draft environment.",
22021	//       "location": "path",
22022	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+$",
22023	//       "required": true,
22024	//       "type": "string"
22025	//     }
22026	//   },
22027	//   "path": "v2/{+parent}/intents",
22028	//   "response": {
22029	//     "$ref": "GoogleCloudDialogflowV2ListIntentsResponse"
22030	//   },
22031	//   "scopes": [
22032	//     "https://www.googleapis.com/auth/cloud-platform",
22033	//     "https://www.googleapis.com/auth/dialogflow"
22034	//   ]
22035	// }
22036
22037}
22038
22039// Pages invokes f for each page of results.
22040// A non-nil error returned from f will halt the iteration.
22041// The provided context supersedes any context provided to the Context method.
22042func (c *ProjectsAgentEnvironmentsIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListIntentsResponse) error) error {
22043	c.ctx_ = ctx
22044	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22045	for {
22046		x, err := c.Do()
22047		if err != nil {
22048			return err
22049		}
22050		if err := f(x); err != nil {
22051			return err
22052		}
22053		if x.NextPageToken == "" {
22054			return nil
22055		}
22056		c.PageToken(x.NextPageToken)
22057	}
22058}
22059
22060// method id "dialogflow.projects.agent.environments.users.sessions.deleteContexts":
22061
22062type ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall struct {
22063	s          *Service
22064	parent     string
22065	urlParams_ gensupport.URLParams
22066	ctx_       context.Context
22067	header_    http.Header
22068}
22069
22070// DeleteContexts: Deletes all active contexts in the specified session.
22071//
22072// - parent: The name of the session to delete all contexts from.
22073//   Format: `projects//agent/sessions/` or
22074//   `projects//agent/environments//users//sessions/`. If `Environment
22075//   ID` is not specified we assume default 'draft' environment. If
22076//   `User ID` is not specified, we assume default '-' user.
22077func (r *ProjectsAgentEnvironmentsUsersSessionsService) DeleteContexts(parent string) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
22078	c := &ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22079	c.parent = parent
22080	return c
22081}
22082
22083// Fields allows partial responses to be retrieved. See
22084// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22085// for more information.
22086func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
22087	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22088	return c
22089}
22090
22091// Context sets the context to be used in this call's Do method. Any
22092// pending HTTP request will be aborted if the provided context is
22093// canceled.
22094func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
22095	c.ctx_ = ctx
22096	return c
22097}
22098
22099// Header returns an http.Header that can be modified by the caller to
22100// add HTTP headers to the request.
22101func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Header() http.Header {
22102	if c.header_ == nil {
22103		c.header_ = make(http.Header)
22104	}
22105	return c.header_
22106}
22107
22108func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
22109	reqHeaders := make(http.Header)
22110	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
22111	for k, v := range c.header_ {
22112		reqHeaders[k] = v
22113	}
22114	reqHeaders.Set("User-Agent", c.s.userAgent())
22115	var body io.Reader = nil
22116	c.urlParams_.Set("alt", alt)
22117	c.urlParams_.Set("prettyPrint", "false")
22118	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
22119	urls += "?" + c.urlParams_.Encode()
22120	req, err := http.NewRequest("DELETE", urls, body)
22121	if err != nil {
22122		return nil, err
22123	}
22124	req.Header = reqHeaders
22125	googleapi.Expand(req.URL, map[string]string{
22126		"parent": c.parent,
22127	})
22128	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22129}
22130
22131// Do executes the "dialogflow.projects.agent.environments.users.sessions.deleteContexts" call.
22132// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
22133// non-2xx status code is an error. Response headers are in either
22134// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
22135// returned at all) in error.(*googleapi.Error).Header. Use
22136// googleapi.IsNotModified to check whether the returned error was
22137// because http.StatusNotModified was returned.
22138func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
22139	gensupport.SetOptions(c.urlParams_, opts...)
22140	res, err := c.doRequest("json")
22141	if res != nil && res.StatusCode == http.StatusNotModified {
22142		if res.Body != nil {
22143			res.Body.Close()
22144		}
22145		return nil, &googleapi.Error{
22146			Code:   res.StatusCode,
22147			Header: res.Header,
22148		}
22149	}
22150	if err != nil {
22151		return nil, err
22152	}
22153	defer googleapi.CloseBody(res)
22154	if err := googleapi.CheckResponse(res); err != nil {
22155		return nil, err
22156	}
22157	ret := &GoogleProtobufEmpty{
22158		ServerResponse: googleapi.ServerResponse{
22159			Header:         res.Header,
22160			HTTPStatusCode: res.StatusCode,
22161		},
22162	}
22163	target := &ret
22164	if err := gensupport.DecodeResponse(target, res); err != nil {
22165		return nil, err
22166	}
22167	return ret, nil
22168	// {
22169	//   "description": "Deletes all active contexts in the specified session.",
22170	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
22171	//   "httpMethod": "DELETE",
22172	//   "id": "dialogflow.projects.agent.environments.users.sessions.deleteContexts",
22173	//   "parameterOrder": [
22174	//     "parent"
22175	//   ],
22176	//   "parameters": {
22177	//     "parent": {
22178	//       "description": "Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
22179	//       "location": "path",
22180	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
22181	//       "required": true,
22182	//       "type": "string"
22183	//     }
22184	//   },
22185	//   "path": "v2/{+parent}/contexts",
22186	//   "response": {
22187	//     "$ref": "GoogleProtobufEmpty"
22188	//   },
22189	//   "scopes": [
22190	//     "https://www.googleapis.com/auth/cloud-platform",
22191	//     "https://www.googleapis.com/auth/dialogflow"
22192	//   ]
22193	// }
22194
22195}
22196
22197// method id "dialogflow.projects.agent.environments.users.sessions.detectIntent":
22198
22199type ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall struct {
22200	s                                          *Service
22201	sessionid                                  string
22202	googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest
22203	urlParams_                                 gensupport.URLParams
22204	ctx_                                       context.Context
22205	header_                                    http.Header
22206}
22207
22208// DetectIntent: Processes a natural language query and returns
22209// structured, actionable data as a result. This method is not
22210// idempotent, because it may cause contexts and session entity types to
22211// be updated, which in turn might affect results of future queries.
22212// Note: Always use agent versions for production traffic. See Versions
22213// and environments
22214// (https://cloud.google.com/dialogflow/es/docs/agents-versions).
22215//
22216// - session: The name of the session this query is sent to. Format:
22217//   `projects//agent/sessions/`, or
22218//   `projects//agent/environments//users//sessions/`. If `Environment
22219//   ID` is not specified, we assume default 'draft' environment
22220//   (`Environment ID` might be referred to as environment name at some
22221//   places). If `User ID` is not specified, we are using "-". It's up
22222//   to the API caller to choose an appropriate `Session ID` and `User
22223//   Id`. They can be a random number or some type of user and session
22224//   identifiers (preferably hashed). The length of the `Session ID` and
22225//   `User ID` must not exceed 36 characters. For more information, see
22226//   the API interactions guide
22227//   (https://cloud.google.com/dialogflow/docs/api-overview). Note:
22228//   Always use agent versions for production traffic. See Versions and
22229//   environments
22230//   (https://cloud.google.com/dialogflow/es/docs/agents-versions).
22231func (r *ProjectsAgentEnvironmentsUsersSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
22232	c := &ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22233	c.sessionid = sessionid
22234	c.googleclouddialogflowv2detectintentrequest = googleclouddialogflowv2detectintentrequest
22235	return c
22236}
22237
22238// Fields allows partial responses to be retrieved. See
22239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22240// for more information.
22241func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
22242	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22243	return c
22244}
22245
22246// Context sets the context to be used in this call's Do method. Any
22247// pending HTTP request will be aborted if the provided context is
22248// canceled.
22249func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
22250	c.ctx_ = ctx
22251	return c
22252}
22253
22254// Header returns an http.Header that can be modified by the caller to
22255// add HTTP headers to the request.
22256func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Header() http.Header {
22257	if c.header_ == nil {
22258		c.header_ = make(http.Header)
22259	}
22260	return c.header_
22261}
22262
22263func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
22264	reqHeaders := make(http.Header)
22265	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
22266	for k, v := range c.header_ {
22267		reqHeaders[k] = v
22268	}
22269	reqHeaders.Set("User-Agent", c.s.userAgent())
22270	var body io.Reader = nil
22271	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2detectintentrequest)
22272	if err != nil {
22273		return nil, err
22274	}
22275	reqHeaders.Set("Content-Type", "application/json")
22276	c.urlParams_.Set("alt", alt)
22277	c.urlParams_.Set("prettyPrint", "false")
22278	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+session}:detectIntent")
22279	urls += "?" + c.urlParams_.Encode()
22280	req, err := http.NewRequest("POST", urls, body)
22281	if err != nil {
22282		return nil, err
22283	}
22284	req.Header = reqHeaders
22285	googleapi.Expand(req.URL, map[string]string{
22286		"session": c.sessionid,
22287	})
22288	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22289}
22290
22291// Do executes the "dialogflow.projects.agent.environments.users.sessions.detectIntent" call.
22292// Exactly one of *GoogleCloudDialogflowV2DetectIntentResponse or error
22293// will be non-nil. Any non-2xx status code is an error. Response
22294// headers are in either
22295// *GoogleCloudDialogflowV2DetectIntentResponse.ServerResponse.Header or
22296// (if a response was returned at all) in
22297// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22298// whether the returned error was because http.StatusNotModified was
22299// returned.
22300func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2DetectIntentResponse, error) {
22301	gensupport.SetOptions(c.urlParams_, opts...)
22302	res, err := c.doRequest("json")
22303	if res != nil && res.StatusCode == http.StatusNotModified {
22304		if res.Body != nil {
22305			res.Body.Close()
22306		}
22307		return nil, &googleapi.Error{
22308			Code:   res.StatusCode,
22309			Header: res.Header,
22310		}
22311	}
22312	if err != nil {
22313		return nil, err
22314	}
22315	defer googleapi.CloseBody(res)
22316	if err := googleapi.CheckResponse(res); err != nil {
22317		return nil, err
22318	}
22319	ret := &GoogleCloudDialogflowV2DetectIntentResponse{
22320		ServerResponse: googleapi.ServerResponse{
22321			Header:         res.Header,
22322			HTTPStatusCode: res.StatusCode,
22323		},
22324	}
22325	target := &ret
22326	if err := gensupport.DecodeResponse(target, res); err != nil {
22327		return nil, err
22328	}
22329	return ret, nil
22330	// {
22331	//   "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).",
22332	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent",
22333	//   "httpMethod": "POST",
22334	//   "id": "dialogflow.projects.agent.environments.users.sessions.detectIntent",
22335	//   "parameterOrder": [
22336	//     "session"
22337	//   ],
22338	//   "parameters": {
22339	//     "session": {
22340	//       "description": "Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).",
22341	//       "location": "path",
22342	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
22343	//       "required": true,
22344	//       "type": "string"
22345	//     }
22346	//   },
22347	//   "path": "v2/{+session}:detectIntent",
22348	//   "request": {
22349	//     "$ref": "GoogleCloudDialogflowV2DetectIntentRequest"
22350	//   },
22351	//   "response": {
22352	//     "$ref": "GoogleCloudDialogflowV2DetectIntentResponse"
22353	//   },
22354	//   "scopes": [
22355	//     "https://www.googleapis.com/auth/cloud-platform",
22356	//     "https://www.googleapis.com/auth/dialogflow"
22357	//   ]
22358	// }
22359
22360}
22361
22362// method id "dialogflow.projects.agent.environments.users.sessions.contexts.create":
22363
22364type ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall struct {
22365	s                              *Service
22366	parent                         string
22367	googleclouddialogflowv2context *GoogleCloudDialogflowV2Context
22368	urlParams_                     gensupport.URLParams
22369	ctx_                           context.Context
22370	header_                        http.Header
22371}
22372
22373// Create: Creates a context. If the specified context already exists,
22374// overrides the context.
22375//
22376// - parent: The session to create a context for. Format:
22377//   `projects//agent/sessions/` or
22378//   `projects//agent/environments//users//sessions/`. If `Environment
22379//   ID` is not specified, we assume default 'draft' environment. If
22380//   `User ID` is not specified, we assume default '-' user.
22381func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Create(parent string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
22382	c := &ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22383	c.parent = parent
22384	c.googleclouddialogflowv2context = googleclouddialogflowv2context
22385	return c
22386}
22387
22388// Fields allows partial responses to be retrieved. See
22389// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22390// for more information.
22391func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
22392	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22393	return c
22394}
22395
22396// Context sets the context to be used in this call's Do method. Any
22397// pending HTTP request will be aborted if the provided context is
22398// canceled.
22399func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
22400	c.ctx_ = ctx
22401	return c
22402}
22403
22404// Header returns an http.Header that can be modified by the caller to
22405// add HTTP headers to the request.
22406func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Header() http.Header {
22407	if c.header_ == nil {
22408		c.header_ = make(http.Header)
22409	}
22410	return c.header_
22411}
22412
22413func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
22414	reqHeaders := make(http.Header)
22415	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
22416	for k, v := range c.header_ {
22417		reqHeaders[k] = v
22418	}
22419	reqHeaders.Set("User-Agent", c.s.userAgent())
22420	var body io.Reader = nil
22421	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context)
22422	if err != nil {
22423		return nil, err
22424	}
22425	reqHeaders.Set("Content-Type", "application/json")
22426	c.urlParams_.Set("alt", alt)
22427	c.urlParams_.Set("prettyPrint", "false")
22428	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
22429	urls += "?" + c.urlParams_.Encode()
22430	req, err := http.NewRequest("POST", urls, body)
22431	if err != nil {
22432		return nil, err
22433	}
22434	req.Header = reqHeaders
22435	googleapi.Expand(req.URL, map[string]string{
22436		"parent": c.parent,
22437	})
22438	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22439}
22440
22441// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.create" call.
22442// Exactly one of *GoogleCloudDialogflowV2Context or error will be
22443// non-nil. Any non-2xx status code is an error. Response headers are in
22444// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
22445// response was returned at all) in error.(*googleapi.Error).Header. Use
22446// googleapi.IsNotModified to check whether the returned error was
22447// because http.StatusNotModified was returned.
22448func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
22449	gensupport.SetOptions(c.urlParams_, opts...)
22450	res, err := c.doRequest("json")
22451	if res != nil && res.StatusCode == http.StatusNotModified {
22452		if res.Body != nil {
22453			res.Body.Close()
22454		}
22455		return nil, &googleapi.Error{
22456			Code:   res.StatusCode,
22457			Header: res.Header,
22458		}
22459	}
22460	if err != nil {
22461		return nil, err
22462	}
22463	defer googleapi.CloseBody(res)
22464	if err := googleapi.CheckResponse(res); err != nil {
22465		return nil, err
22466	}
22467	ret := &GoogleCloudDialogflowV2Context{
22468		ServerResponse: googleapi.ServerResponse{
22469			Header:         res.Header,
22470			HTTPStatusCode: res.StatusCode,
22471		},
22472	}
22473	target := &ret
22474	if err := gensupport.DecodeResponse(target, res); err != nil {
22475		return nil, err
22476	}
22477	return ret, nil
22478	// {
22479	//   "description": "Creates a context. If the specified context already exists, overrides the context.",
22480	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
22481	//   "httpMethod": "POST",
22482	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.create",
22483	//   "parameterOrder": [
22484	//     "parent"
22485	//   ],
22486	//   "parameters": {
22487	//     "parent": {
22488	//       "description": "Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
22489	//       "location": "path",
22490	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
22491	//       "required": true,
22492	//       "type": "string"
22493	//     }
22494	//   },
22495	//   "path": "v2/{+parent}/contexts",
22496	//   "request": {
22497	//     "$ref": "GoogleCloudDialogflowV2Context"
22498	//   },
22499	//   "response": {
22500	//     "$ref": "GoogleCloudDialogflowV2Context"
22501	//   },
22502	//   "scopes": [
22503	//     "https://www.googleapis.com/auth/cloud-platform",
22504	//     "https://www.googleapis.com/auth/dialogflow"
22505	//   ]
22506	// }
22507
22508}
22509
22510// method id "dialogflow.projects.agent.environments.users.sessions.contexts.delete":
22511
22512type ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall struct {
22513	s          *Service
22514	name       string
22515	urlParams_ gensupport.URLParams
22516	ctx_       context.Context
22517	header_    http.Header
22518}
22519
22520// Delete: Deletes the specified context.
22521//
22522// - name: The name of the context to delete. Format:
22523//   `projects//agent/sessions//contexts/` or
22524//   `projects//agent/environments//users//sessions//contexts/`. If
22525//   `Environment ID` is not specified, we assume default 'draft'
22526//   environment. If `User ID` is not specified, we assume default '-'
22527//   user.
22528func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Delete(name string) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
22529	c := &ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22530	c.name = name
22531	return c
22532}
22533
22534// Fields allows partial responses to be retrieved. See
22535// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22536// for more information.
22537func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
22538	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22539	return c
22540}
22541
22542// Context sets the context to be used in this call's Do method. Any
22543// pending HTTP request will be aborted if the provided context is
22544// canceled.
22545func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
22546	c.ctx_ = ctx
22547	return c
22548}
22549
22550// Header returns an http.Header that can be modified by the caller to
22551// add HTTP headers to the request.
22552func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Header() http.Header {
22553	if c.header_ == nil {
22554		c.header_ = make(http.Header)
22555	}
22556	return c.header_
22557}
22558
22559func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
22560	reqHeaders := make(http.Header)
22561	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
22562	for k, v := range c.header_ {
22563		reqHeaders[k] = v
22564	}
22565	reqHeaders.Set("User-Agent", c.s.userAgent())
22566	var body io.Reader = nil
22567	c.urlParams_.Set("alt", alt)
22568	c.urlParams_.Set("prettyPrint", "false")
22569	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
22570	urls += "?" + c.urlParams_.Encode()
22571	req, err := http.NewRequest("DELETE", urls, body)
22572	if err != nil {
22573		return nil, err
22574	}
22575	req.Header = reqHeaders
22576	googleapi.Expand(req.URL, map[string]string{
22577		"name": c.name,
22578	})
22579	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22580}
22581
22582// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.delete" call.
22583// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
22584// non-2xx status code is an error. Response headers are in either
22585// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
22586// returned at all) in error.(*googleapi.Error).Header. Use
22587// googleapi.IsNotModified to check whether the returned error was
22588// because http.StatusNotModified was returned.
22589func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
22590	gensupport.SetOptions(c.urlParams_, opts...)
22591	res, err := c.doRequest("json")
22592	if res != nil && res.StatusCode == http.StatusNotModified {
22593		if res.Body != nil {
22594			res.Body.Close()
22595		}
22596		return nil, &googleapi.Error{
22597			Code:   res.StatusCode,
22598			Header: res.Header,
22599		}
22600	}
22601	if err != nil {
22602		return nil, err
22603	}
22604	defer googleapi.CloseBody(res)
22605	if err := googleapi.CheckResponse(res); err != nil {
22606		return nil, err
22607	}
22608	ret := &GoogleProtobufEmpty{
22609		ServerResponse: googleapi.ServerResponse{
22610			Header:         res.Header,
22611			HTTPStatusCode: res.StatusCode,
22612		},
22613	}
22614	target := &ret
22615	if err := gensupport.DecodeResponse(target, res); err != nil {
22616		return nil, err
22617	}
22618	return ret, nil
22619	// {
22620	//   "description": "Deletes the specified context.",
22621	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
22622	//   "httpMethod": "DELETE",
22623	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.delete",
22624	//   "parameterOrder": [
22625	//     "name"
22626	//   ],
22627	//   "parameters": {
22628	//     "name": {
22629	//       "description": "Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
22630	//       "location": "path",
22631	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
22632	//       "required": true,
22633	//       "type": "string"
22634	//     }
22635	//   },
22636	//   "path": "v2/{+name}",
22637	//   "response": {
22638	//     "$ref": "GoogleProtobufEmpty"
22639	//   },
22640	//   "scopes": [
22641	//     "https://www.googleapis.com/auth/cloud-platform",
22642	//     "https://www.googleapis.com/auth/dialogflow"
22643	//   ]
22644	// }
22645
22646}
22647
22648// method id "dialogflow.projects.agent.environments.users.sessions.contexts.get":
22649
22650type ProjectsAgentEnvironmentsUsersSessionsContextsGetCall struct {
22651	s            *Service
22652	name         string
22653	urlParams_   gensupport.URLParams
22654	ifNoneMatch_ string
22655	ctx_         context.Context
22656	header_      http.Header
22657}
22658
22659// Get: Retrieves the specified context.
22660//
22661// - name: The name of the context. Format:
22662//   `projects//agent/sessions//contexts/` or
22663//   `projects//agent/environments//users//sessions//contexts/`. If
22664//   `Environment ID` is not specified, we assume default 'draft'
22665//   environment. If `User ID` is not specified, we assume default '-'
22666//   user.
22667func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Get(name string) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
22668	c := &ProjectsAgentEnvironmentsUsersSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22669	c.name = name
22670	return c
22671}
22672
22673// Fields allows partial responses to be retrieved. See
22674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22675// for more information.
22676func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
22677	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22678	return c
22679}
22680
22681// IfNoneMatch sets the optional parameter which makes the operation
22682// fail if the object's ETag matches the given value. This is useful for
22683// getting updates only after the object has changed since the last
22684// request. Use googleapi.IsNotModified to check whether the response
22685// error from Do is the result of In-None-Match.
22686func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
22687	c.ifNoneMatch_ = entityTag
22688	return c
22689}
22690
22691// Context sets the context to be used in this call's Do method. Any
22692// pending HTTP request will be aborted if the provided context is
22693// canceled.
22694func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
22695	c.ctx_ = ctx
22696	return c
22697}
22698
22699// Header returns an http.Header that can be modified by the caller to
22700// add HTTP headers to the request.
22701func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Header() http.Header {
22702	if c.header_ == nil {
22703		c.header_ = make(http.Header)
22704	}
22705	return c.header_
22706}
22707
22708func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
22709	reqHeaders := make(http.Header)
22710	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
22711	for k, v := range c.header_ {
22712		reqHeaders[k] = v
22713	}
22714	reqHeaders.Set("User-Agent", c.s.userAgent())
22715	if c.ifNoneMatch_ != "" {
22716		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22717	}
22718	var body io.Reader = nil
22719	c.urlParams_.Set("alt", alt)
22720	c.urlParams_.Set("prettyPrint", "false")
22721	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
22722	urls += "?" + c.urlParams_.Encode()
22723	req, err := http.NewRequest("GET", urls, body)
22724	if err != nil {
22725		return nil, err
22726	}
22727	req.Header = reqHeaders
22728	googleapi.Expand(req.URL, map[string]string{
22729		"name": c.name,
22730	})
22731	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22732}
22733
22734// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.get" call.
22735// Exactly one of *GoogleCloudDialogflowV2Context or error will be
22736// non-nil. Any non-2xx status code is an error. Response headers are in
22737// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
22738// response was returned at all) in error.(*googleapi.Error).Header. Use
22739// googleapi.IsNotModified to check whether the returned error was
22740// because http.StatusNotModified was returned.
22741func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
22742	gensupport.SetOptions(c.urlParams_, opts...)
22743	res, err := c.doRequest("json")
22744	if res != nil && res.StatusCode == http.StatusNotModified {
22745		if res.Body != nil {
22746			res.Body.Close()
22747		}
22748		return nil, &googleapi.Error{
22749			Code:   res.StatusCode,
22750			Header: res.Header,
22751		}
22752	}
22753	if err != nil {
22754		return nil, err
22755	}
22756	defer googleapi.CloseBody(res)
22757	if err := googleapi.CheckResponse(res); err != nil {
22758		return nil, err
22759	}
22760	ret := &GoogleCloudDialogflowV2Context{
22761		ServerResponse: googleapi.ServerResponse{
22762			Header:         res.Header,
22763			HTTPStatusCode: res.StatusCode,
22764		},
22765	}
22766	target := &ret
22767	if err := gensupport.DecodeResponse(target, res); err != nil {
22768		return nil, err
22769	}
22770	return ret, nil
22771	// {
22772	//   "description": "Retrieves the specified context.",
22773	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
22774	//   "httpMethod": "GET",
22775	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.get",
22776	//   "parameterOrder": [
22777	//     "name"
22778	//   ],
22779	//   "parameters": {
22780	//     "name": {
22781	//       "description": "Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
22782	//       "location": "path",
22783	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
22784	//       "required": true,
22785	//       "type": "string"
22786	//     }
22787	//   },
22788	//   "path": "v2/{+name}",
22789	//   "response": {
22790	//     "$ref": "GoogleCloudDialogflowV2Context"
22791	//   },
22792	//   "scopes": [
22793	//     "https://www.googleapis.com/auth/cloud-platform",
22794	//     "https://www.googleapis.com/auth/dialogflow"
22795	//   ]
22796	// }
22797
22798}
22799
22800// method id "dialogflow.projects.agent.environments.users.sessions.contexts.list":
22801
22802type ProjectsAgentEnvironmentsUsersSessionsContextsListCall struct {
22803	s            *Service
22804	parent       string
22805	urlParams_   gensupport.URLParams
22806	ifNoneMatch_ string
22807	ctx_         context.Context
22808	header_      http.Header
22809}
22810
22811// List: Returns the list of all contexts in the specified session.
22812//
22813// - parent: The session to list all contexts from. Format:
22814//   `projects//agent/sessions/` or
22815//   `projects//agent/environments//users//sessions/`. If `Environment
22816//   ID` is not specified, we assume default 'draft' environment. If
22817//   `User ID` is not specified, we assume default '-' user.
22818func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) List(parent string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
22819	c := &ProjectsAgentEnvironmentsUsersSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22820	c.parent = parent
22821	return c
22822}
22823
22824// PageSize sets the optional parameter "pageSize": The maximum number
22825// of items to return in a single page. By default 100 and at most 1000.
22826func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
22827	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22828	return c
22829}
22830
22831// PageToken sets the optional parameter "pageToken": The
22832// next_page_token value returned from a previous list request.
22833func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
22834	c.urlParams_.Set("pageToken", pageToken)
22835	return c
22836}
22837
22838// Fields allows partial responses to be retrieved. See
22839// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22840// for more information.
22841func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
22842	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22843	return c
22844}
22845
22846// IfNoneMatch sets the optional parameter which makes the operation
22847// fail if the object's ETag matches the given value. This is useful for
22848// getting updates only after the object has changed since the last
22849// request. Use googleapi.IsNotModified to check whether the response
22850// error from Do is the result of In-None-Match.
22851func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
22852	c.ifNoneMatch_ = entityTag
22853	return c
22854}
22855
22856// Context sets the context to be used in this call's Do method. Any
22857// pending HTTP request will be aborted if the provided context is
22858// canceled.
22859func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
22860	c.ctx_ = ctx
22861	return c
22862}
22863
22864// Header returns an http.Header that can be modified by the caller to
22865// add HTTP headers to the request.
22866func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Header() http.Header {
22867	if c.header_ == nil {
22868		c.header_ = make(http.Header)
22869	}
22870	return c.header_
22871}
22872
22873func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
22874	reqHeaders := make(http.Header)
22875	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
22876	for k, v := range c.header_ {
22877		reqHeaders[k] = v
22878	}
22879	reqHeaders.Set("User-Agent", c.s.userAgent())
22880	if c.ifNoneMatch_ != "" {
22881		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22882	}
22883	var body io.Reader = nil
22884	c.urlParams_.Set("alt", alt)
22885	c.urlParams_.Set("prettyPrint", "false")
22886	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
22887	urls += "?" + c.urlParams_.Encode()
22888	req, err := http.NewRequest("GET", urls, body)
22889	if err != nil {
22890		return nil, err
22891	}
22892	req.Header = reqHeaders
22893	googleapi.Expand(req.URL, map[string]string{
22894		"parent": c.parent,
22895	})
22896	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22897}
22898
22899// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.list" call.
22900// Exactly one of *GoogleCloudDialogflowV2ListContextsResponse or error
22901// will be non-nil. Any non-2xx status code is an error. Response
22902// headers are in either
22903// *GoogleCloudDialogflowV2ListContextsResponse.ServerResponse.Header or
22904// (if a response was returned at all) in
22905// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22906// whether the returned error was because http.StatusNotModified was
22907// returned.
22908func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListContextsResponse, error) {
22909	gensupport.SetOptions(c.urlParams_, opts...)
22910	res, err := c.doRequest("json")
22911	if res != nil && res.StatusCode == http.StatusNotModified {
22912		if res.Body != nil {
22913			res.Body.Close()
22914		}
22915		return nil, &googleapi.Error{
22916			Code:   res.StatusCode,
22917			Header: res.Header,
22918		}
22919	}
22920	if err != nil {
22921		return nil, err
22922	}
22923	defer googleapi.CloseBody(res)
22924	if err := googleapi.CheckResponse(res); err != nil {
22925		return nil, err
22926	}
22927	ret := &GoogleCloudDialogflowV2ListContextsResponse{
22928		ServerResponse: googleapi.ServerResponse{
22929			Header:         res.Header,
22930			HTTPStatusCode: res.StatusCode,
22931		},
22932	}
22933	target := &ret
22934	if err := gensupport.DecodeResponse(target, res); err != nil {
22935		return nil, err
22936	}
22937	return ret, nil
22938	// {
22939	//   "description": "Returns the list of all contexts in the specified session.",
22940	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
22941	//   "httpMethod": "GET",
22942	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.list",
22943	//   "parameterOrder": [
22944	//     "parent"
22945	//   ],
22946	//   "parameters": {
22947	//     "pageSize": {
22948	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
22949	//       "format": "int32",
22950	//       "location": "query",
22951	//       "type": "integer"
22952	//     },
22953	//     "pageToken": {
22954	//       "description": "Optional. The next_page_token value returned from a previous list request.",
22955	//       "location": "query",
22956	//       "type": "string"
22957	//     },
22958	//     "parent": {
22959	//       "description": "Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
22960	//       "location": "path",
22961	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
22962	//       "required": true,
22963	//       "type": "string"
22964	//     }
22965	//   },
22966	//   "path": "v2/{+parent}/contexts",
22967	//   "response": {
22968	//     "$ref": "GoogleCloudDialogflowV2ListContextsResponse"
22969	//   },
22970	//   "scopes": [
22971	//     "https://www.googleapis.com/auth/cloud-platform",
22972	//     "https://www.googleapis.com/auth/dialogflow"
22973	//   ]
22974	// }
22975
22976}
22977
22978// Pages invokes f for each page of results.
22979// A non-nil error returned from f will halt the iteration.
22980// The provided context supersedes any context provided to the Context method.
22981func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListContextsResponse) error) error {
22982	c.ctx_ = ctx
22983	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22984	for {
22985		x, err := c.Do()
22986		if err != nil {
22987			return err
22988		}
22989		if err := f(x); err != nil {
22990			return err
22991		}
22992		if x.NextPageToken == "" {
22993			return nil
22994		}
22995		c.PageToken(x.NextPageToken)
22996	}
22997}
22998
22999// method id "dialogflow.projects.agent.environments.users.sessions.contexts.patch":
23000
23001type ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall struct {
23002	s                              *Service
23003	nameid                         string
23004	googleclouddialogflowv2context *GoogleCloudDialogflowV2Context
23005	urlParams_                     gensupport.URLParams
23006	ctx_                           context.Context
23007	header_                        http.Header
23008}
23009
23010// Patch: Updates the specified context.
23011//
23012// - name: The unique identifier of the context. Format:
23013//   `projects//agent/sessions//contexts/`, or
23014//   `projects//agent/environments//users//sessions//contexts/`. The
23015//   `Context ID` is always converted to lowercase, may only contain
23016//   characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If
23017//   `Environment ID` is not specified, we assume default 'draft'
23018//   environment. If `User ID` is not specified, we assume default '-'
23019//   user. The following context names are reserved for internal use by
23020//   Dialogflow. You should not use these contexts or create contexts
23021//   with these names: * `__system_counters__` * `*_id_dialog_context` *
23022//   `*_dialog_params_size`.
23023func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Patch(nameid string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
23024	c := &ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23025	c.nameid = nameid
23026	c.googleclouddialogflowv2context = googleclouddialogflowv2context
23027	return c
23028}
23029
23030// UpdateMask sets the optional parameter "updateMask": The mask to
23031// control which fields get updated.
23032func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
23033	c.urlParams_.Set("updateMask", updateMask)
23034	return c
23035}
23036
23037// Fields allows partial responses to be retrieved. See
23038// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23039// for more information.
23040func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
23041	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23042	return c
23043}
23044
23045// Context sets the context to be used in this call's Do method. Any
23046// pending HTTP request will be aborted if the provided context is
23047// canceled.
23048func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
23049	c.ctx_ = ctx
23050	return c
23051}
23052
23053// Header returns an http.Header that can be modified by the caller to
23054// add HTTP headers to the request.
23055func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Header() http.Header {
23056	if c.header_ == nil {
23057		c.header_ = make(http.Header)
23058	}
23059	return c.header_
23060}
23061
23062func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
23063	reqHeaders := make(http.Header)
23064	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
23065	for k, v := range c.header_ {
23066		reqHeaders[k] = v
23067	}
23068	reqHeaders.Set("User-Agent", c.s.userAgent())
23069	var body io.Reader = nil
23070	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context)
23071	if err != nil {
23072		return nil, err
23073	}
23074	reqHeaders.Set("Content-Type", "application/json")
23075	c.urlParams_.Set("alt", alt)
23076	c.urlParams_.Set("prettyPrint", "false")
23077	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
23078	urls += "?" + c.urlParams_.Encode()
23079	req, err := http.NewRequest("PATCH", urls, body)
23080	if err != nil {
23081		return nil, err
23082	}
23083	req.Header = reqHeaders
23084	googleapi.Expand(req.URL, map[string]string{
23085		"name": c.nameid,
23086	})
23087	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23088}
23089
23090// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.patch" call.
23091// Exactly one of *GoogleCloudDialogflowV2Context or error will be
23092// non-nil. Any non-2xx status code is an error. Response headers are in
23093// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
23094// response was returned at all) in error.(*googleapi.Error).Header. Use
23095// googleapi.IsNotModified to check whether the returned error was
23096// because http.StatusNotModified was returned.
23097func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
23098	gensupport.SetOptions(c.urlParams_, opts...)
23099	res, err := c.doRequest("json")
23100	if res != nil && res.StatusCode == http.StatusNotModified {
23101		if res.Body != nil {
23102			res.Body.Close()
23103		}
23104		return nil, &googleapi.Error{
23105			Code:   res.StatusCode,
23106			Header: res.Header,
23107		}
23108	}
23109	if err != nil {
23110		return nil, err
23111	}
23112	defer googleapi.CloseBody(res)
23113	if err := googleapi.CheckResponse(res); err != nil {
23114		return nil, err
23115	}
23116	ret := &GoogleCloudDialogflowV2Context{
23117		ServerResponse: googleapi.ServerResponse{
23118			Header:         res.Header,
23119			HTTPStatusCode: res.StatusCode,
23120		},
23121	}
23122	target := &ret
23123	if err := gensupport.DecodeResponse(target, res); err != nil {
23124		return nil, err
23125	}
23126	return ret, nil
23127	// {
23128	//   "description": "Updates the specified context.",
23129	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
23130	//   "httpMethod": "PATCH",
23131	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.patch",
23132	//   "parameterOrder": [
23133	//     "name"
23134	//   ],
23135	//   "parameters": {
23136	//     "name": {
23137	//       "description": "Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`",
23138	//       "location": "path",
23139	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
23140	//       "required": true,
23141	//       "type": "string"
23142	//     },
23143	//     "updateMask": {
23144	//       "description": "Optional. The mask to control which fields get updated.",
23145	//       "format": "google-fieldmask",
23146	//       "location": "query",
23147	//       "type": "string"
23148	//     }
23149	//   },
23150	//   "path": "v2/{+name}",
23151	//   "request": {
23152	//     "$ref": "GoogleCloudDialogflowV2Context"
23153	//   },
23154	//   "response": {
23155	//     "$ref": "GoogleCloudDialogflowV2Context"
23156	//   },
23157	//   "scopes": [
23158	//     "https://www.googleapis.com/auth/cloud-platform",
23159	//     "https://www.googleapis.com/auth/dialogflow"
23160	//   ]
23161	// }
23162
23163}
23164
23165// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.create":
23166
23167type ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall struct {
23168	s                                        *Service
23169	parent                                   string
23170	googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType
23171	urlParams_                               gensupport.URLParams
23172	ctx_                                     context.Context
23173	header_                                  http.Header
23174}
23175
23176// Create: Creates a session entity type. If the specified session
23177// entity type already exists, overrides the session entity type. This
23178// method doesn't work with Google Assistant integration. Contact
23179// Dialogflow support if you need to use session entities with Google
23180// Assistant integration.
23181//
23182// - parent: The session to create a session entity type for. Format:
23183//   `projects//agent/sessions/` or
23184//   `projects//agent/environments//users// sessions/`. If `Environment
23185//   ID` is not specified, we assume default 'draft' environment. If
23186//   `User ID` is not specified, we assume default '-' user.
23187func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
23188	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23189	c.parent = parent
23190	c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype
23191	return c
23192}
23193
23194// Fields allows partial responses to be retrieved. See
23195// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23196// for more information.
23197func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
23198	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23199	return c
23200}
23201
23202// Context sets the context to be used in this call's Do method. Any
23203// pending HTTP request will be aborted if the provided context is
23204// canceled.
23205func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
23206	c.ctx_ = ctx
23207	return c
23208}
23209
23210// Header returns an http.Header that can be modified by the caller to
23211// add HTTP headers to the request.
23212func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Header() http.Header {
23213	if c.header_ == nil {
23214		c.header_ = make(http.Header)
23215	}
23216	return c.header_
23217}
23218
23219func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
23220	reqHeaders := make(http.Header)
23221	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
23222	for k, v := range c.header_ {
23223		reqHeaders[k] = v
23224	}
23225	reqHeaders.Set("User-Agent", c.s.userAgent())
23226	var body io.Reader = nil
23227	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype)
23228	if err != nil {
23229		return nil, err
23230	}
23231	reqHeaders.Set("Content-Type", "application/json")
23232	c.urlParams_.Set("alt", alt)
23233	c.urlParams_.Set("prettyPrint", "false")
23234	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
23235	urls += "?" + c.urlParams_.Encode()
23236	req, err := http.NewRequest("POST", urls, body)
23237	if err != nil {
23238		return nil, err
23239	}
23240	req.Header = reqHeaders
23241	googleapi.Expand(req.URL, map[string]string{
23242		"parent": c.parent,
23243	})
23244	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23245}
23246
23247// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.create" call.
23248// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
23249// will be non-nil. Any non-2xx status code is an error. Response
23250// headers are in either
23251// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
23252// (if a response was returned at all) in
23253// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23254// whether the returned error was because http.StatusNotModified was
23255// returned.
23256func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
23257	gensupport.SetOptions(c.urlParams_, opts...)
23258	res, err := c.doRequest("json")
23259	if res != nil && res.StatusCode == http.StatusNotModified {
23260		if res.Body != nil {
23261			res.Body.Close()
23262		}
23263		return nil, &googleapi.Error{
23264			Code:   res.StatusCode,
23265			Header: res.Header,
23266		}
23267	}
23268	if err != nil {
23269		return nil, err
23270	}
23271	defer googleapi.CloseBody(res)
23272	if err := googleapi.CheckResponse(res); err != nil {
23273		return nil, err
23274	}
23275	ret := &GoogleCloudDialogflowV2SessionEntityType{
23276		ServerResponse: googleapi.ServerResponse{
23277			Header:         res.Header,
23278			HTTPStatusCode: res.StatusCode,
23279		},
23280	}
23281	target := &ret
23282	if err := gensupport.DecodeResponse(target, res); err != nil {
23283		return nil, err
23284	}
23285	return ret, nil
23286	// {
23287	//   "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
23288	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
23289	//   "httpMethod": "POST",
23290	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.create",
23291	//   "parameterOrder": [
23292	//     "parent"
23293	//   ],
23294	//   "parameters": {
23295	//     "parent": {
23296	//       "description": "Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
23297	//       "location": "path",
23298	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
23299	//       "required": true,
23300	//       "type": "string"
23301	//     }
23302	//   },
23303	//   "path": "v2/{+parent}/entityTypes",
23304	//   "request": {
23305	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
23306	//   },
23307	//   "response": {
23308	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
23309	//   },
23310	//   "scopes": [
23311	//     "https://www.googleapis.com/auth/cloud-platform",
23312	//     "https://www.googleapis.com/auth/dialogflow"
23313	//   ]
23314	// }
23315
23316}
23317
23318// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete":
23319
23320type ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall struct {
23321	s          *Service
23322	name       string
23323	urlParams_ gensupport.URLParams
23324	ctx_       context.Context
23325	header_    http.Header
23326}
23327
23328// Delete: Deletes the specified session entity type. This method
23329// doesn't work with Google Assistant integration. Contact Dialogflow
23330// support if you need to use session entities with Google Assistant
23331// integration.
23332//
23333// - name: The name of the entity type to delete. Format:
23334//   `projects//agent/sessions//entityTypes/` or
23335//   `projects//agent/environments//users//sessions//entityTypes/`. If
23336//   `Environment ID` is not specified, we assume default 'draft'
23337//   environment. If `User ID` is not specified, we assume default '-'
23338//   user.
23339func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Delete(name string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
23340	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23341	c.name = name
23342	return c
23343}
23344
23345// Fields allows partial responses to be retrieved. See
23346// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23347// for more information.
23348func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
23349	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23350	return c
23351}
23352
23353// Context sets the context to be used in this call's Do method. Any
23354// pending HTTP request will be aborted if the provided context is
23355// canceled.
23356func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
23357	c.ctx_ = ctx
23358	return c
23359}
23360
23361// Header returns an http.Header that can be modified by the caller to
23362// add HTTP headers to the request.
23363func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Header() http.Header {
23364	if c.header_ == nil {
23365		c.header_ = make(http.Header)
23366	}
23367	return c.header_
23368}
23369
23370func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
23371	reqHeaders := make(http.Header)
23372	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
23373	for k, v := range c.header_ {
23374		reqHeaders[k] = v
23375	}
23376	reqHeaders.Set("User-Agent", c.s.userAgent())
23377	var body io.Reader = nil
23378	c.urlParams_.Set("alt", alt)
23379	c.urlParams_.Set("prettyPrint", "false")
23380	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
23381	urls += "?" + c.urlParams_.Encode()
23382	req, err := http.NewRequest("DELETE", urls, body)
23383	if err != nil {
23384		return nil, err
23385	}
23386	req.Header = reqHeaders
23387	googleapi.Expand(req.URL, map[string]string{
23388		"name": c.name,
23389	})
23390	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23391}
23392
23393// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete" call.
23394// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
23395// non-2xx status code is an error. Response headers are in either
23396// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
23397// returned at all) in error.(*googleapi.Error).Header. Use
23398// googleapi.IsNotModified to check whether the returned error was
23399// because http.StatusNotModified was returned.
23400func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
23401	gensupport.SetOptions(c.urlParams_, opts...)
23402	res, err := c.doRequest("json")
23403	if res != nil && res.StatusCode == http.StatusNotModified {
23404		if res.Body != nil {
23405			res.Body.Close()
23406		}
23407		return nil, &googleapi.Error{
23408			Code:   res.StatusCode,
23409			Header: res.Header,
23410		}
23411	}
23412	if err != nil {
23413		return nil, err
23414	}
23415	defer googleapi.CloseBody(res)
23416	if err := googleapi.CheckResponse(res); err != nil {
23417		return nil, err
23418	}
23419	ret := &GoogleProtobufEmpty{
23420		ServerResponse: googleapi.ServerResponse{
23421			Header:         res.Header,
23422			HTTPStatusCode: res.StatusCode,
23423		},
23424	}
23425	target := &ret
23426	if err := gensupport.DecodeResponse(target, res); err != nil {
23427		return nil, err
23428	}
23429	return ret, nil
23430	// {
23431	//   "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
23432	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
23433	//   "httpMethod": "DELETE",
23434	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete",
23435	//   "parameterOrder": [
23436	//     "name"
23437	//   ],
23438	//   "parameters": {
23439	//     "name": {
23440	//       "description": "Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
23441	//       "location": "path",
23442	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
23443	//       "required": true,
23444	//       "type": "string"
23445	//     }
23446	//   },
23447	//   "path": "v2/{+name}",
23448	//   "response": {
23449	//     "$ref": "GoogleProtobufEmpty"
23450	//   },
23451	//   "scopes": [
23452	//     "https://www.googleapis.com/auth/cloud-platform",
23453	//     "https://www.googleapis.com/auth/dialogflow"
23454	//   ]
23455	// }
23456
23457}
23458
23459// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.get":
23460
23461type ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall struct {
23462	s            *Service
23463	name         string
23464	urlParams_   gensupport.URLParams
23465	ifNoneMatch_ string
23466	ctx_         context.Context
23467	header_      http.Header
23468}
23469
23470// Get: Retrieves the specified session entity type. This method doesn't
23471// work with Google Assistant integration. Contact Dialogflow support if
23472// you need to use session entities with Google Assistant integration.
23473//
23474// - name: The name of the session entity type. Format:
23475//   `projects//agent/sessions//entityTypes/` or
23476//   `projects//agent/environments//users//sessions//entityTypes/`. If
23477//   `Environment ID` is not specified, we assume default 'draft'
23478//   environment. If `User ID` is not specified, we assume default '-'
23479//   user.
23480func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Get(name string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
23481	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23482	c.name = name
23483	return c
23484}
23485
23486// Fields allows partial responses to be retrieved. See
23487// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23488// for more information.
23489func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
23490	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23491	return c
23492}
23493
23494// IfNoneMatch sets the optional parameter which makes the operation
23495// fail if the object's ETag matches the given value. This is useful for
23496// getting updates only after the object has changed since the last
23497// request. Use googleapi.IsNotModified to check whether the response
23498// error from Do is the result of In-None-Match.
23499func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
23500	c.ifNoneMatch_ = entityTag
23501	return c
23502}
23503
23504// Context sets the context to be used in this call's Do method. Any
23505// pending HTTP request will be aborted if the provided context is
23506// canceled.
23507func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
23508	c.ctx_ = ctx
23509	return c
23510}
23511
23512// Header returns an http.Header that can be modified by the caller to
23513// add HTTP headers to the request.
23514func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Header() http.Header {
23515	if c.header_ == nil {
23516		c.header_ = make(http.Header)
23517	}
23518	return c.header_
23519}
23520
23521func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
23522	reqHeaders := make(http.Header)
23523	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
23524	for k, v := range c.header_ {
23525		reqHeaders[k] = v
23526	}
23527	reqHeaders.Set("User-Agent", c.s.userAgent())
23528	if c.ifNoneMatch_ != "" {
23529		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23530	}
23531	var body io.Reader = nil
23532	c.urlParams_.Set("alt", alt)
23533	c.urlParams_.Set("prettyPrint", "false")
23534	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
23535	urls += "?" + c.urlParams_.Encode()
23536	req, err := http.NewRequest("GET", urls, body)
23537	if err != nil {
23538		return nil, err
23539	}
23540	req.Header = reqHeaders
23541	googleapi.Expand(req.URL, map[string]string{
23542		"name": c.name,
23543	})
23544	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23545}
23546
23547// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.get" call.
23548// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
23549// will be non-nil. Any non-2xx status code is an error. Response
23550// headers are in either
23551// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
23552// (if a response was returned at all) in
23553// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23554// whether the returned error was because http.StatusNotModified was
23555// returned.
23556func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
23557	gensupport.SetOptions(c.urlParams_, opts...)
23558	res, err := c.doRequest("json")
23559	if res != nil && res.StatusCode == http.StatusNotModified {
23560		if res.Body != nil {
23561			res.Body.Close()
23562		}
23563		return nil, &googleapi.Error{
23564			Code:   res.StatusCode,
23565			Header: res.Header,
23566		}
23567	}
23568	if err != nil {
23569		return nil, err
23570	}
23571	defer googleapi.CloseBody(res)
23572	if err := googleapi.CheckResponse(res); err != nil {
23573		return nil, err
23574	}
23575	ret := &GoogleCloudDialogflowV2SessionEntityType{
23576		ServerResponse: googleapi.ServerResponse{
23577			Header:         res.Header,
23578			HTTPStatusCode: res.StatusCode,
23579		},
23580	}
23581	target := &ret
23582	if err := gensupport.DecodeResponse(target, res); err != nil {
23583		return nil, err
23584	}
23585	return ret, nil
23586	// {
23587	//   "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
23588	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
23589	//   "httpMethod": "GET",
23590	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.get",
23591	//   "parameterOrder": [
23592	//     "name"
23593	//   ],
23594	//   "parameters": {
23595	//     "name": {
23596	//       "description": "Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
23597	//       "location": "path",
23598	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
23599	//       "required": true,
23600	//       "type": "string"
23601	//     }
23602	//   },
23603	//   "path": "v2/{+name}",
23604	//   "response": {
23605	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
23606	//   },
23607	//   "scopes": [
23608	//     "https://www.googleapis.com/auth/cloud-platform",
23609	//     "https://www.googleapis.com/auth/dialogflow"
23610	//   ]
23611	// }
23612
23613}
23614
23615// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.list":
23616
23617type ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall struct {
23618	s            *Service
23619	parent       string
23620	urlParams_   gensupport.URLParams
23621	ifNoneMatch_ string
23622	ctx_         context.Context
23623	header_      http.Header
23624}
23625
23626// List: Returns the list of all session entity types in the specified
23627// session. This method doesn't work with Google Assistant integration.
23628// Contact Dialogflow support if you need to use session entities with
23629// Google Assistant integration.
23630//
23631// - parent: The session to list all session entity types from. Format:
23632//   `projects//agent/sessions/` or
23633//   `projects//agent/environments//users// sessions/`. If `Environment
23634//   ID` is not specified, we assume default 'draft' environment. If
23635//   `User ID` is not specified, we assume default '-' user.
23636func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) List(parent string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
23637	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23638	c.parent = parent
23639	return c
23640}
23641
23642// PageSize sets the optional parameter "pageSize": The maximum number
23643// of items to return in a single page. By default 100 and at most 1000.
23644func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
23645	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23646	return c
23647}
23648
23649// PageToken sets the optional parameter "pageToken": The
23650// next_page_token value returned from a previous list request.
23651func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
23652	c.urlParams_.Set("pageToken", pageToken)
23653	return c
23654}
23655
23656// Fields allows partial responses to be retrieved. See
23657// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23658// for more information.
23659func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
23660	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23661	return c
23662}
23663
23664// IfNoneMatch sets the optional parameter which makes the operation
23665// fail if the object's ETag matches the given value. This is useful for
23666// getting updates only after the object has changed since the last
23667// request. Use googleapi.IsNotModified to check whether the response
23668// error from Do is the result of In-None-Match.
23669func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
23670	c.ifNoneMatch_ = entityTag
23671	return c
23672}
23673
23674// Context sets the context to be used in this call's Do method. Any
23675// pending HTTP request will be aborted if the provided context is
23676// canceled.
23677func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
23678	c.ctx_ = ctx
23679	return c
23680}
23681
23682// Header returns an http.Header that can be modified by the caller to
23683// add HTTP headers to the request.
23684func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Header() http.Header {
23685	if c.header_ == nil {
23686		c.header_ = make(http.Header)
23687	}
23688	return c.header_
23689}
23690
23691func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
23692	reqHeaders := make(http.Header)
23693	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
23694	for k, v := range c.header_ {
23695		reqHeaders[k] = v
23696	}
23697	reqHeaders.Set("User-Agent", c.s.userAgent())
23698	if c.ifNoneMatch_ != "" {
23699		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23700	}
23701	var body io.Reader = nil
23702	c.urlParams_.Set("alt", alt)
23703	c.urlParams_.Set("prettyPrint", "false")
23704	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
23705	urls += "?" + c.urlParams_.Encode()
23706	req, err := http.NewRequest("GET", urls, body)
23707	if err != nil {
23708		return nil, err
23709	}
23710	req.Header = reqHeaders
23711	googleapi.Expand(req.URL, map[string]string{
23712		"parent": c.parent,
23713	})
23714	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23715}
23716
23717// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.list" call.
23718// Exactly one of *GoogleCloudDialogflowV2ListSessionEntityTypesResponse
23719// or error will be non-nil. Any non-2xx status code is an error.
23720// Response headers are in either
23721// *GoogleCloudDialogflowV2ListSessionEntityTypesResponse.ServerResponse.
23722// Header or (if a response was returned at all) in
23723// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23724// whether the returned error was because http.StatusNotModified was
23725// returned.
23726func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListSessionEntityTypesResponse, error) {
23727	gensupport.SetOptions(c.urlParams_, opts...)
23728	res, err := c.doRequest("json")
23729	if res != nil && res.StatusCode == http.StatusNotModified {
23730		if res.Body != nil {
23731			res.Body.Close()
23732		}
23733		return nil, &googleapi.Error{
23734			Code:   res.StatusCode,
23735			Header: res.Header,
23736		}
23737	}
23738	if err != nil {
23739		return nil, err
23740	}
23741	defer googleapi.CloseBody(res)
23742	if err := googleapi.CheckResponse(res); err != nil {
23743		return nil, err
23744	}
23745	ret := &GoogleCloudDialogflowV2ListSessionEntityTypesResponse{
23746		ServerResponse: googleapi.ServerResponse{
23747			Header:         res.Header,
23748			HTTPStatusCode: res.StatusCode,
23749		},
23750	}
23751	target := &ret
23752	if err := gensupport.DecodeResponse(target, res); err != nil {
23753		return nil, err
23754	}
23755	return ret, nil
23756	// {
23757	//   "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
23758	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
23759	//   "httpMethod": "GET",
23760	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.list",
23761	//   "parameterOrder": [
23762	//     "parent"
23763	//   ],
23764	//   "parameters": {
23765	//     "pageSize": {
23766	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
23767	//       "format": "int32",
23768	//       "location": "query",
23769	//       "type": "integer"
23770	//     },
23771	//     "pageToken": {
23772	//       "description": "Optional. The next_page_token value returned from a previous list request.",
23773	//       "location": "query",
23774	//       "type": "string"
23775	//     },
23776	//     "parent": {
23777	//       "description": "Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
23778	//       "location": "path",
23779	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
23780	//       "required": true,
23781	//       "type": "string"
23782	//     }
23783	//   },
23784	//   "path": "v2/{+parent}/entityTypes",
23785	//   "response": {
23786	//     "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse"
23787	//   },
23788	//   "scopes": [
23789	//     "https://www.googleapis.com/auth/cloud-platform",
23790	//     "https://www.googleapis.com/auth/dialogflow"
23791	//   ]
23792	// }
23793
23794}
23795
23796// Pages invokes f for each page of results.
23797// A non-nil error returned from f will halt the iteration.
23798// The provided context supersedes any context provided to the Context method.
23799func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListSessionEntityTypesResponse) error) error {
23800	c.ctx_ = ctx
23801	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23802	for {
23803		x, err := c.Do()
23804		if err != nil {
23805			return err
23806		}
23807		if err := f(x); err != nil {
23808			return err
23809		}
23810		if x.NextPageToken == "" {
23811			return nil
23812		}
23813		c.PageToken(x.NextPageToken)
23814	}
23815}
23816
23817// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch":
23818
23819type ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall struct {
23820	s                                        *Service
23821	nameid                                   string
23822	googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType
23823	urlParams_                               gensupport.URLParams
23824	ctx_                                     context.Context
23825	header_                                  http.Header
23826}
23827
23828// Patch: Updates the specified session entity type. This method doesn't
23829// work with Google Assistant integration. Contact Dialogflow support if
23830// you need to use session entities with Google Assistant integration.
23831//
23832// - name: The unique identifier of this session entity type. Format:
23833//   `projects//agent/sessions//entityTypes/`, or
23834//   `projects//agent/environments//users//sessions//entityTypes/`. If
23835//   `Environment ID` is not specified, we assume default 'draft'
23836//   environment. If `User ID` is not specified, we assume default '-'
23837//   user. `` must be the display name of an existing entity type in the
23838//   same agent that will be overridden or supplemented.
23839func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
23840	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23841	c.nameid = nameid
23842	c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype
23843	return c
23844}
23845
23846// UpdateMask sets the optional parameter "updateMask": The mask to
23847// control which fields get updated.
23848func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
23849	c.urlParams_.Set("updateMask", updateMask)
23850	return c
23851}
23852
23853// Fields allows partial responses to be retrieved. See
23854// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23855// for more information.
23856func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
23857	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23858	return c
23859}
23860
23861// Context sets the context to be used in this call's Do method. Any
23862// pending HTTP request will be aborted if the provided context is
23863// canceled.
23864func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
23865	c.ctx_ = ctx
23866	return c
23867}
23868
23869// Header returns an http.Header that can be modified by the caller to
23870// add HTTP headers to the request.
23871func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Header() http.Header {
23872	if c.header_ == nil {
23873		c.header_ = make(http.Header)
23874	}
23875	return c.header_
23876}
23877
23878func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
23879	reqHeaders := make(http.Header)
23880	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
23881	for k, v := range c.header_ {
23882		reqHeaders[k] = v
23883	}
23884	reqHeaders.Set("User-Agent", c.s.userAgent())
23885	var body io.Reader = nil
23886	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype)
23887	if err != nil {
23888		return nil, err
23889	}
23890	reqHeaders.Set("Content-Type", "application/json")
23891	c.urlParams_.Set("alt", alt)
23892	c.urlParams_.Set("prettyPrint", "false")
23893	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
23894	urls += "?" + c.urlParams_.Encode()
23895	req, err := http.NewRequest("PATCH", urls, body)
23896	if err != nil {
23897		return nil, err
23898	}
23899	req.Header = reqHeaders
23900	googleapi.Expand(req.URL, map[string]string{
23901		"name": c.nameid,
23902	})
23903	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23904}
23905
23906// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch" call.
23907// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
23908// will be non-nil. Any non-2xx status code is an error. Response
23909// headers are in either
23910// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
23911// (if a response was returned at all) in
23912// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23913// whether the returned error was because http.StatusNotModified was
23914// returned.
23915func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
23916	gensupport.SetOptions(c.urlParams_, opts...)
23917	res, err := c.doRequest("json")
23918	if res != nil && res.StatusCode == http.StatusNotModified {
23919		if res.Body != nil {
23920			res.Body.Close()
23921		}
23922		return nil, &googleapi.Error{
23923			Code:   res.StatusCode,
23924			Header: res.Header,
23925		}
23926	}
23927	if err != nil {
23928		return nil, err
23929	}
23930	defer googleapi.CloseBody(res)
23931	if err := googleapi.CheckResponse(res); err != nil {
23932		return nil, err
23933	}
23934	ret := &GoogleCloudDialogflowV2SessionEntityType{
23935		ServerResponse: googleapi.ServerResponse{
23936			Header:         res.Header,
23937			HTTPStatusCode: res.StatusCode,
23938		},
23939	}
23940	target := &ret
23941	if err := gensupport.DecodeResponse(target, res); err != nil {
23942		return nil, err
23943	}
23944	return ret, nil
23945	// {
23946	//   "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
23947	//   "flatPath": "v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
23948	//   "httpMethod": "PATCH",
23949	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch",
23950	//   "parameterOrder": [
23951	//     "name"
23952	//   ],
23953	//   "parameters": {
23954	//     "name": {
23955	//       "description": "Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.",
23956	//       "location": "path",
23957	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
23958	//       "required": true,
23959	//       "type": "string"
23960	//     },
23961	//     "updateMask": {
23962	//       "description": "Optional. The mask to control which fields get updated.",
23963	//       "format": "google-fieldmask",
23964	//       "location": "query",
23965	//       "type": "string"
23966	//     }
23967	//   },
23968	//   "path": "v2/{+name}",
23969	//   "request": {
23970	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
23971	//   },
23972	//   "response": {
23973	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
23974	//   },
23975	//   "scopes": [
23976	//     "https://www.googleapis.com/auth/cloud-platform",
23977	//     "https://www.googleapis.com/auth/dialogflow"
23978	//   ]
23979	// }
23980
23981}
23982
23983// method id "dialogflow.projects.agent.intents.batchDelete":
23984
23985type ProjectsAgentIntentsBatchDeleteCall struct {
23986	s                                                *Service
23987	parent                                           string
23988	googleclouddialogflowv2batchdeleteintentsrequest *GoogleCloudDialogflowV2BatchDeleteIntentsRequest
23989	urlParams_                                       gensupport.URLParams
23990	ctx_                                             context.Context
23991	header_                                          http.Header
23992}
23993
23994// BatchDelete: Deletes intents in the specified agent. Note: You should
23995// always train an agent prior to sending it queries. See the training
23996// documentation (https://cloud.google.com/dialogflow/es/docs/training).
23997//
23998// - parent: The name of the agent to delete all entities types for.
23999//   Format: `projects//agent`.
24000func (r *ProjectsAgentIntentsService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteintentsrequest *GoogleCloudDialogflowV2BatchDeleteIntentsRequest) *ProjectsAgentIntentsBatchDeleteCall {
24001	c := &ProjectsAgentIntentsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24002	c.parent = parent
24003	c.googleclouddialogflowv2batchdeleteintentsrequest = googleclouddialogflowv2batchdeleteintentsrequest
24004	return c
24005}
24006
24007// Fields allows partial responses to be retrieved. See
24008// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24009// for more information.
24010func (c *ProjectsAgentIntentsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchDeleteCall {
24011	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24012	return c
24013}
24014
24015// Context sets the context to be used in this call's Do method. Any
24016// pending HTTP request will be aborted if the provided context is
24017// canceled.
24018func (c *ProjectsAgentIntentsBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchDeleteCall {
24019	c.ctx_ = ctx
24020	return c
24021}
24022
24023// Header returns an http.Header that can be modified by the caller to
24024// add HTTP headers to the request.
24025func (c *ProjectsAgentIntentsBatchDeleteCall) Header() http.Header {
24026	if c.header_ == nil {
24027		c.header_ = make(http.Header)
24028	}
24029	return c.header_
24030}
24031
24032func (c *ProjectsAgentIntentsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
24033	reqHeaders := make(http.Header)
24034	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
24035	for k, v := range c.header_ {
24036		reqHeaders[k] = v
24037	}
24038	reqHeaders.Set("User-Agent", c.s.userAgent())
24039	var body io.Reader = nil
24040	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteintentsrequest)
24041	if err != nil {
24042		return nil, err
24043	}
24044	reqHeaders.Set("Content-Type", "application/json")
24045	c.urlParams_.Set("alt", alt)
24046	c.urlParams_.Set("prettyPrint", "false")
24047	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents:batchDelete")
24048	urls += "?" + c.urlParams_.Encode()
24049	req, err := http.NewRequest("POST", urls, body)
24050	if err != nil {
24051		return nil, err
24052	}
24053	req.Header = reqHeaders
24054	googleapi.Expand(req.URL, map[string]string{
24055		"parent": c.parent,
24056	})
24057	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24058}
24059
24060// Do executes the "dialogflow.projects.agent.intents.batchDelete" call.
24061// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
24062// Any non-2xx status code is an error. Response headers are in either
24063// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
24064// was returned at all) in error.(*googleapi.Error).Header. Use
24065// googleapi.IsNotModified to check whether the returned error was
24066// because http.StatusNotModified was returned.
24067func (c *ProjectsAgentIntentsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
24068	gensupport.SetOptions(c.urlParams_, opts...)
24069	res, err := c.doRequest("json")
24070	if res != nil && res.StatusCode == http.StatusNotModified {
24071		if res.Body != nil {
24072			res.Body.Close()
24073		}
24074		return nil, &googleapi.Error{
24075			Code:   res.StatusCode,
24076			Header: res.Header,
24077		}
24078	}
24079	if err != nil {
24080		return nil, err
24081	}
24082	defer googleapi.CloseBody(res)
24083	if err := googleapi.CheckResponse(res); err != nil {
24084		return nil, err
24085	}
24086	ret := &GoogleLongrunningOperation{
24087		ServerResponse: googleapi.ServerResponse{
24088			Header:         res.Header,
24089			HTTPStatusCode: res.StatusCode,
24090		},
24091	}
24092	target := &ret
24093	if err := gensupport.DecodeResponse(target, res); err != nil {
24094		return nil, err
24095	}
24096	return ret, nil
24097	// {
24098	//   "description": "Deletes intents in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
24099	//   "flatPath": "v2/projects/{projectsId}/agent/intents:batchDelete",
24100	//   "httpMethod": "POST",
24101	//   "id": "dialogflow.projects.agent.intents.batchDelete",
24102	//   "parameterOrder": [
24103	//     "parent"
24104	//   ],
24105	//   "parameters": {
24106	//     "parent": {
24107	//       "description": "Required. The name of the agent to delete all entities types for. Format: `projects//agent`.",
24108	//       "location": "path",
24109	//       "pattern": "^projects/[^/]+/agent$",
24110	//       "required": true,
24111	//       "type": "string"
24112	//     }
24113	//   },
24114	//   "path": "v2/{+parent}/intents:batchDelete",
24115	//   "request": {
24116	//     "$ref": "GoogleCloudDialogflowV2BatchDeleteIntentsRequest"
24117	//   },
24118	//   "response": {
24119	//     "$ref": "GoogleLongrunningOperation"
24120	//   },
24121	//   "scopes": [
24122	//     "https://www.googleapis.com/auth/cloud-platform",
24123	//     "https://www.googleapis.com/auth/dialogflow"
24124	//   ]
24125	// }
24126
24127}
24128
24129// method id "dialogflow.projects.agent.intents.batchUpdate":
24130
24131type ProjectsAgentIntentsBatchUpdateCall struct {
24132	s                                                *Service
24133	parent                                           string
24134	googleclouddialogflowv2batchupdateintentsrequest *GoogleCloudDialogflowV2BatchUpdateIntentsRequest
24135	urlParams_                                       gensupport.URLParams
24136	ctx_                                             context.Context
24137	header_                                          http.Header
24138}
24139
24140// BatchUpdate: Updates/Creates multiple intents in the specified agent.
24141// Note: You should always train an agent prior to sending it queries.
24142// See the training documentation
24143// (https://cloud.google.com/dialogflow/es/docs/training).
24144//
24145// - parent: The name of the agent to update or create intents in.
24146//   Format: `projects//agent`.
24147func (r *ProjectsAgentIntentsService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateintentsrequest *GoogleCloudDialogflowV2BatchUpdateIntentsRequest) *ProjectsAgentIntentsBatchUpdateCall {
24148	c := &ProjectsAgentIntentsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24149	c.parent = parent
24150	c.googleclouddialogflowv2batchupdateintentsrequest = googleclouddialogflowv2batchupdateintentsrequest
24151	return c
24152}
24153
24154// Fields allows partial responses to be retrieved. See
24155// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24156// for more information.
24157func (c *ProjectsAgentIntentsBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchUpdateCall {
24158	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24159	return c
24160}
24161
24162// Context sets the context to be used in this call's Do method. Any
24163// pending HTTP request will be aborted if the provided context is
24164// canceled.
24165func (c *ProjectsAgentIntentsBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchUpdateCall {
24166	c.ctx_ = ctx
24167	return c
24168}
24169
24170// Header returns an http.Header that can be modified by the caller to
24171// add HTTP headers to the request.
24172func (c *ProjectsAgentIntentsBatchUpdateCall) Header() http.Header {
24173	if c.header_ == nil {
24174		c.header_ = make(http.Header)
24175	}
24176	return c.header_
24177}
24178
24179func (c *ProjectsAgentIntentsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
24180	reqHeaders := make(http.Header)
24181	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
24182	for k, v := range c.header_ {
24183		reqHeaders[k] = v
24184	}
24185	reqHeaders.Set("User-Agent", c.s.userAgent())
24186	var body io.Reader = nil
24187	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateintentsrequest)
24188	if err != nil {
24189		return nil, err
24190	}
24191	reqHeaders.Set("Content-Type", "application/json")
24192	c.urlParams_.Set("alt", alt)
24193	c.urlParams_.Set("prettyPrint", "false")
24194	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents:batchUpdate")
24195	urls += "?" + c.urlParams_.Encode()
24196	req, err := http.NewRequest("POST", urls, body)
24197	if err != nil {
24198		return nil, err
24199	}
24200	req.Header = reqHeaders
24201	googleapi.Expand(req.URL, map[string]string{
24202		"parent": c.parent,
24203	})
24204	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24205}
24206
24207// Do executes the "dialogflow.projects.agent.intents.batchUpdate" call.
24208// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
24209// Any non-2xx status code is an error. Response headers are in either
24210// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
24211// was returned at all) in error.(*googleapi.Error).Header. Use
24212// googleapi.IsNotModified to check whether the returned error was
24213// because http.StatusNotModified was returned.
24214func (c *ProjectsAgentIntentsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
24215	gensupport.SetOptions(c.urlParams_, opts...)
24216	res, err := c.doRequest("json")
24217	if res != nil && res.StatusCode == http.StatusNotModified {
24218		if res.Body != nil {
24219			res.Body.Close()
24220		}
24221		return nil, &googleapi.Error{
24222			Code:   res.StatusCode,
24223			Header: res.Header,
24224		}
24225	}
24226	if err != nil {
24227		return nil, err
24228	}
24229	defer googleapi.CloseBody(res)
24230	if err := googleapi.CheckResponse(res); err != nil {
24231		return nil, err
24232	}
24233	ret := &GoogleLongrunningOperation{
24234		ServerResponse: googleapi.ServerResponse{
24235			Header:         res.Header,
24236			HTTPStatusCode: res.StatusCode,
24237		},
24238	}
24239	target := &ret
24240	if err := gensupport.DecodeResponse(target, res); err != nil {
24241		return nil, err
24242	}
24243	return ret, nil
24244	// {
24245	//   "description": "Updates/Creates multiple intents in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
24246	//   "flatPath": "v2/projects/{projectsId}/agent/intents:batchUpdate",
24247	//   "httpMethod": "POST",
24248	//   "id": "dialogflow.projects.agent.intents.batchUpdate",
24249	//   "parameterOrder": [
24250	//     "parent"
24251	//   ],
24252	//   "parameters": {
24253	//     "parent": {
24254	//       "description": "Required. The name of the agent to update or create intents in. Format: `projects//agent`.",
24255	//       "location": "path",
24256	//       "pattern": "^projects/[^/]+/agent$",
24257	//       "required": true,
24258	//       "type": "string"
24259	//     }
24260	//   },
24261	//   "path": "v2/{+parent}/intents:batchUpdate",
24262	//   "request": {
24263	//     "$ref": "GoogleCloudDialogflowV2BatchUpdateIntentsRequest"
24264	//   },
24265	//   "response": {
24266	//     "$ref": "GoogleLongrunningOperation"
24267	//   },
24268	//   "scopes": [
24269	//     "https://www.googleapis.com/auth/cloud-platform",
24270	//     "https://www.googleapis.com/auth/dialogflow"
24271	//   ]
24272	// }
24273
24274}
24275
24276// method id "dialogflow.projects.agent.intents.create":
24277
24278type ProjectsAgentIntentsCreateCall struct {
24279	s                             *Service
24280	parent                        string
24281	googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent
24282	urlParams_                    gensupport.URLParams
24283	ctx_                          context.Context
24284	header_                       http.Header
24285}
24286
24287// Create: Creates an intent in the specified agent. Note: You should
24288// always train an agent prior to sending it queries. See the training
24289// documentation (https://cloud.google.com/dialogflow/es/docs/training).
24290//
24291// - parent: The agent to create a intent for. Format:
24292//   `projects//agent`.
24293func (r *ProjectsAgentIntentsService) Create(parent string, googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent) *ProjectsAgentIntentsCreateCall {
24294	c := &ProjectsAgentIntentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24295	c.parent = parent
24296	c.googleclouddialogflowv2intent = googleclouddialogflowv2intent
24297	return c
24298}
24299
24300// IntentView sets the optional parameter "intentView": The resource
24301// view to apply to the returned intent.
24302//
24303// Possible values:
24304//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
24305// in the response.
24306//   "INTENT_VIEW_FULL" - All fields are populated.
24307func (c *ProjectsAgentIntentsCreateCall) IntentView(intentView string) *ProjectsAgentIntentsCreateCall {
24308	c.urlParams_.Set("intentView", intentView)
24309	return c
24310}
24311
24312// LanguageCode sets the optional parameter "languageCode": The language
24313// used to access language-specific data. If not specified, the agent's
24314// default language is used. For more information, see Multilingual
24315// intent and entity data
24316// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
24317func (c *ProjectsAgentIntentsCreateCall) LanguageCode(languageCode string) *ProjectsAgentIntentsCreateCall {
24318	c.urlParams_.Set("languageCode", languageCode)
24319	return c
24320}
24321
24322// Fields allows partial responses to be retrieved. See
24323// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24324// for more information.
24325func (c *ProjectsAgentIntentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsCreateCall {
24326	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24327	return c
24328}
24329
24330// Context sets the context to be used in this call's Do method. Any
24331// pending HTTP request will be aborted if the provided context is
24332// canceled.
24333func (c *ProjectsAgentIntentsCreateCall) Context(ctx context.Context) *ProjectsAgentIntentsCreateCall {
24334	c.ctx_ = ctx
24335	return c
24336}
24337
24338// Header returns an http.Header that can be modified by the caller to
24339// add HTTP headers to the request.
24340func (c *ProjectsAgentIntentsCreateCall) Header() http.Header {
24341	if c.header_ == nil {
24342		c.header_ = make(http.Header)
24343	}
24344	return c.header_
24345}
24346
24347func (c *ProjectsAgentIntentsCreateCall) doRequest(alt string) (*http.Response, error) {
24348	reqHeaders := make(http.Header)
24349	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
24350	for k, v := range c.header_ {
24351		reqHeaders[k] = v
24352	}
24353	reqHeaders.Set("User-Agent", c.s.userAgent())
24354	var body io.Reader = nil
24355	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2intent)
24356	if err != nil {
24357		return nil, err
24358	}
24359	reqHeaders.Set("Content-Type", "application/json")
24360	c.urlParams_.Set("alt", alt)
24361	c.urlParams_.Set("prettyPrint", "false")
24362	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents")
24363	urls += "?" + c.urlParams_.Encode()
24364	req, err := http.NewRequest("POST", urls, body)
24365	if err != nil {
24366		return nil, err
24367	}
24368	req.Header = reqHeaders
24369	googleapi.Expand(req.URL, map[string]string{
24370		"parent": c.parent,
24371	})
24372	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24373}
24374
24375// Do executes the "dialogflow.projects.agent.intents.create" call.
24376// Exactly one of *GoogleCloudDialogflowV2Intent or error will be
24377// non-nil. Any non-2xx status code is an error. Response headers are in
24378// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a
24379// response was returned at all) in error.(*googleapi.Error).Header. Use
24380// googleapi.IsNotModified to check whether the returned error was
24381// because http.StatusNotModified was returned.
24382func (c *ProjectsAgentIntentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) {
24383	gensupport.SetOptions(c.urlParams_, opts...)
24384	res, err := c.doRequest("json")
24385	if res != nil && res.StatusCode == http.StatusNotModified {
24386		if res.Body != nil {
24387			res.Body.Close()
24388		}
24389		return nil, &googleapi.Error{
24390			Code:   res.StatusCode,
24391			Header: res.Header,
24392		}
24393	}
24394	if err != nil {
24395		return nil, err
24396	}
24397	defer googleapi.CloseBody(res)
24398	if err := googleapi.CheckResponse(res); err != nil {
24399		return nil, err
24400	}
24401	ret := &GoogleCloudDialogflowV2Intent{
24402		ServerResponse: googleapi.ServerResponse{
24403			Header:         res.Header,
24404			HTTPStatusCode: res.StatusCode,
24405		},
24406	}
24407	target := &ret
24408	if err := gensupport.DecodeResponse(target, res); err != nil {
24409		return nil, err
24410	}
24411	return ret, nil
24412	// {
24413	//   "description": "Creates an intent in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
24414	//   "flatPath": "v2/projects/{projectsId}/agent/intents",
24415	//   "httpMethod": "POST",
24416	//   "id": "dialogflow.projects.agent.intents.create",
24417	//   "parameterOrder": [
24418	//     "parent"
24419	//   ],
24420	//   "parameters": {
24421	//     "intentView": {
24422	//       "description": "Optional. The resource view to apply to the returned intent.",
24423	//       "enum": [
24424	//         "INTENT_VIEW_UNSPECIFIED",
24425	//         "INTENT_VIEW_FULL"
24426	//       ],
24427	//       "enumDescriptions": [
24428	//         "Training phrases field is not populated in the response.",
24429	//         "All fields are populated."
24430	//       ],
24431	//       "location": "query",
24432	//       "type": "string"
24433	//     },
24434	//     "languageCode": {
24435	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
24436	//       "location": "query",
24437	//       "type": "string"
24438	//     },
24439	//     "parent": {
24440	//       "description": "Required. The agent to create a intent for. Format: `projects//agent`.",
24441	//       "location": "path",
24442	//       "pattern": "^projects/[^/]+/agent$",
24443	//       "required": true,
24444	//       "type": "string"
24445	//     }
24446	//   },
24447	//   "path": "v2/{+parent}/intents",
24448	//   "request": {
24449	//     "$ref": "GoogleCloudDialogflowV2Intent"
24450	//   },
24451	//   "response": {
24452	//     "$ref": "GoogleCloudDialogflowV2Intent"
24453	//   },
24454	//   "scopes": [
24455	//     "https://www.googleapis.com/auth/cloud-platform",
24456	//     "https://www.googleapis.com/auth/dialogflow"
24457	//   ]
24458	// }
24459
24460}
24461
24462// method id "dialogflow.projects.agent.intents.delete":
24463
24464type ProjectsAgentIntentsDeleteCall struct {
24465	s          *Service
24466	name       string
24467	urlParams_ gensupport.URLParams
24468	ctx_       context.Context
24469	header_    http.Header
24470}
24471
24472// Delete: Deletes the specified intent and its direct or indirect
24473// followup intents. Note: You should always train an agent prior to
24474// sending it queries. See the training documentation
24475// (https://cloud.google.com/dialogflow/es/docs/training).
24476//
24477// - name: The name of the intent to delete. If this intent has direct
24478//   or indirect followup intents, we also delete them. Format:
24479//   `projects//agent/intents/`.
24480func (r *ProjectsAgentIntentsService) Delete(name string) *ProjectsAgentIntentsDeleteCall {
24481	c := &ProjectsAgentIntentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24482	c.name = name
24483	return c
24484}
24485
24486// Fields allows partial responses to be retrieved. See
24487// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24488// for more information.
24489func (c *ProjectsAgentIntentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsDeleteCall {
24490	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24491	return c
24492}
24493
24494// Context sets the context to be used in this call's Do method. Any
24495// pending HTTP request will be aborted if the provided context is
24496// canceled.
24497func (c *ProjectsAgentIntentsDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsDeleteCall {
24498	c.ctx_ = ctx
24499	return c
24500}
24501
24502// Header returns an http.Header that can be modified by the caller to
24503// add HTTP headers to the request.
24504func (c *ProjectsAgentIntentsDeleteCall) Header() http.Header {
24505	if c.header_ == nil {
24506		c.header_ = make(http.Header)
24507	}
24508	return c.header_
24509}
24510
24511func (c *ProjectsAgentIntentsDeleteCall) doRequest(alt string) (*http.Response, error) {
24512	reqHeaders := make(http.Header)
24513	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
24514	for k, v := range c.header_ {
24515		reqHeaders[k] = v
24516	}
24517	reqHeaders.Set("User-Agent", c.s.userAgent())
24518	var body io.Reader = nil
24519	c.urlParams_.Set("alt", alt)
24520	c.urlParams_.Set("prettyPrint", "false")
24521	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
24522	urls += "?" + c.urlParams_.Encode()
24523	req, err := http.NewRequest("DELETE", urls, body)
24524	if err != nil {
24525		return nil, err
24526	}
24527	req.Header = reqHeaders
24528	googleapi.Expand(req.URL, map[string]string{
24529		"name": c.name,
24530	})
24531	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24532}
24533
24534// Do executes the "dialogflow.projects.agent.intents.delete" call.
24535// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
24536// non-2xx status code is an error. Response headers are in either
24537// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
24538// returned at all) in error.(*googleapi.Error).Header. Use
24539// googleapi.IsNotModified to check whether the returned error was
24540// because http.StatusNotModified was returned.
24541func (c *ProjectsAgentIntentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
24542	gensupport.SetOptions(c.urlParams_, opts...)
24543	res, err := c.doRequest("json")
24544	if res != nil && res.StatusCode == http.StatusNotModified {
24545		if res.Body != nil {
24546			res.Body.Close()
24547		}
24548		return nil, &googleapi.Error{
24549			Code:   res.StatusCode,
24550			Header: res.Header,
24551		}
24552	}
24553	if err != nil {
24554		return nil, err
24555	}
24556	defer googleapi.CloseBody(res)
24557	if err := googleapi.CheckResponse(res); err != nil {
24558		return nil, err
24559	}
24560	ret := &GoogleProtobufEmpty{
24561		ServerResponse: googleapi.ServerResponse{
24562			Header:         res.Header,
24563			HTTPStatusCode: res.StatusCode,
24564		},
24565	}
24566	target := &ret
24567	if err := gensupport.DecodeResponse(target, res); err != nil {
24568		return nil, err
24569	}
24570	return ret, nil
24571	// {
24572	//   "description": "Deletes the specified intent and its direct or indirect followup intents. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
24573	//   "flatPath": "v2/projects/{projectsId}/agent/intents/{intentsId}",
24574	//   "httpMethod": "DELETE",
24575	//   "id": "dialogflow.projects.agent.intents.delete",
24576	//   "parameterOrder": [
24577	//     "name"
24578	//   ],
24579	//   "parameters": {
24580	//     "name": {
24581	//       "description": "Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`.",
24582	//       "location": "path",
24583	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
24584	//       "required": true,
24585	//       "type": "string"
24586	//     }
24587	//   },
24588	//   "path": "v2/{+name}",
24589	//   "response": {
24590	//     "$ref": "GoogleProtobufEmpty"
24591	//   },
24592	//   "scopes": [
24593	//     "https://www.googleapis.com/auth/cloud-platform",
24594	//     "https://www.googleapis.com/auth/dialogflow"
24595	//   ]
24596	// }
24597
24598}
24599
24600// method id "dialogflow.projects.agent.intents.get":
24601
24602type ProjectsAgentIntentsGetCall struct {
24603	s            *Service
24604	name         string
24605	urlParams_   gensupport.URLParams
24606	ifNoneMatch_ string
24607	ctx_         context.Context
24608	header_      http.Header
24609}
24610
24611// Get: Retrieves the specified intent.
24612//
24613// - name: The name of the intent. Format: `projects//agent/intents/`.
24614func (r *ProjectsAgentIntentsService) Get(name string) *ProjectsAgentIntentsGetCall {
24615	c := &ProjectsAgentIntentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24616	c.name = name
24617	return c
24618}
24619
24620// IntentView sets the optional parameter "intentView": The resource
24621// view to apply to the returned intent.
24622//
24623// Possible values:
24624//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
24625// in the response.
24626//   "INTENT_VIEW_FULL" - All fields are populated.
24627func (c *ProjectsAgentIntentsGetCall) IntentView(intentView string) *ProjectsAgentIntentsGetCall {
24628	c.urlParams_.Set("intentView", intentView)
24629	return c
24630}
24631
24632// LanguageCode sets the optional parameter "languageCode": The language
24633// used to access language-specific data. If not specified, the agent's
24634// default language is used. For more information, see Multilingual
24635// intent and entity data
24636// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
24637func (c *ProjectsAgentIntentsGetCall) LanguageCode(languageCode string) *ProjectsAgentIntentsGetCall {
24638	c.urlParams_.Set("languageCode", languageCode)
24639	return c
24640}
24641
24642// Fields allows partial responses to be retrieved. See
24643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24644// for more information.
24645func (c *ProjectsAgentIntentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsGetCall {
24646	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24647	return c
24648}
24649
24650// IfNoneMatch sets the optional parameter which makes the operation
24651// fail if the object's ETag matches the given value. This is useful for
24652// getting updates only after the object has changed since the last
24653// request. Use googleapi.IsNotModified to check whether the response
24654// error from Do is the result of In-None-Match.
24655func (c *ProjectsAgentIntentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsGetCall {
24656	c.ifNoneMatch_ = entityTag
24657	return c
24658}
24659
24660// Context sets the context to be used in this call's Do method. Any
24661// pending HTTP request will be aborted if the provided context is
24662// canceled.
24663func (c *ProjectsAgentIntentsGetCall) Context(ctx context.Context) *ProjectsAgentIntentsGetCall {
24664	c.ctx_ = ctx
24665	return c
24666}
24667
24668// Header returns an http.Header that can be modified by the caller to
24669// add HTTP headers to the request.
24670func (c *ProjectsAgentIntentsGetCall) Header() http.Header {
24671	if c.header_ == nil {
24672		c.header_ = make(http.Header)
24673	}
24674	return c.header_
24675}
24676
24677func (c *ProjectsAgentIntentsGetCall) doRequest(alt string) (*http.Response, error) {
24678	reqHeaders := make(http.Header)
24679	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
24680	for k, v := range c.header_ {
24681		reqHeaders[k] = v
24682	}
24683	reqHeaders.Set("User-Agent", c.s.userAgent())
24684	if c.ifNoneMatch_ != "" {
24685		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24686	}
24687	var body io.Reader = nil
24688	c.urlParams_.Set("alt", alt)
24689	c.urlParams_.Set("prettyPrint", "false")
24690	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
24691	urls += "?" + c.urlParams_.Encode()
24692	req, err := http.NewRequest("GET", urls, body)
24693	if err != nil {
24694		return nil, err
24695	}
24696	req.Header = reqHeaders
24697	googleapi.Expand(req.URL, map[string]string{
24698		"name": c.name,
24699	})
24700	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24701}
24702
24703// Do executes the "dialogflow.projects.agent.intents.get" call.
24704// Exactly one of *GoogleCloudDialogflowV2Intent or error will be
24705// non-nil. Any non-2xx status code is an error. Response headers are in
24706// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a
24707// response was returned at all) in error.(*googleapi.Error).Header. Use
24708// googleapi.IsNotModified to check whether the returned error was
24709// because http.StatusNotModified was returned.
24710func (c *ProjectsAgentIntentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) {
24711	gensupport.SetOptions(c.urlParams_, opts...)
24712	res, err := c.doRequest("json")
24713	if res != nil && res.StatusCode == http.StatusNotModified {
24714		if res.Body != nil {
24715			res.Body.Close()
24716		}
24717		return nil, &googleapi.Error{
24718			Code:   res.StatusCode,
24719			Header: res.Header,
24720		}
24721	}
24722	if err != nil {
24723		return nil, err
24724	}
24725	defer googleapi.CloseBody(res)
24726	if err := googleapi.CheckResponse(res); err != nil {
24727		return nil, err
24728	}
24729	ret := &GoogleCloudDialogflowV2Intent{
24730		ServerResponse: googleapi.ServerResponse{
24731			Header:         res.Header,
24732			HTTPStatusCode: res.StatusCode,
24733		},
24734	}
24735	target := &ret
24736	if err := gensupport.DecodeResponse(target, res); err != nil {
24737		return nil, err
24738	}
24739	return ret, nil
24740	// {
24741	//   "description": "Retrieves the specified intent.",
24742	//   "flatPath": "v2/projects/{projectsId}/agent/intents/{intentsId}",
24743	//   "httpMethod": "GET",
24744	//   "id": "dialogflow.projects.agent.intents.get",
24745	//   "parameterOrder": [
24746	//     "name"
24747	//   ],
24748	//   "parameters": {
24749	//     "intentView": {
24750	//       "description": "Optional. The resource view to apply to the returned intent.",
24751	//       "enum": [
24752	//         "INTENT_VIEW_UNSPECIFIED",
24753	//         "INTENT_VIEW_FULL"
24754	//       ],
24755	//       "enumDescriptions": [
24756	//         "Training phrases field is not populated in the response.",
24757	//         "All fields are populated."
24758	//       ],
24759	//       "location": "query",
24760	//       "type": "string"
24761	//     },
24762	//     "languageCode": {
24763	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
24764	//       "location": "query",
24765	//       "type": "string"
24766	//     },
24767	//     "name": {
24768	//       "description": "Required. The name of the intent. Format: `projects//agent/intents/`.",
24769	//       "location": "path",
24770	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
24771	//       "required": true,
24772	//       "type": "string"
24773	//     }
24774	//   },
24775	//   "path": "v2/{+name}",
24776	//   "response": {
24777	//     "$ref": "GoogleCloudDialogflowV2Intent"
24778	//   },
24779	//   "scopes": [
24780	//     "https://www.googleapis.com/auth/cloud-platform",
24781	//     "https://www.googleapis.com/auth/dialogflow"
24782	//   ]
24783	// }
24784
24785}
24786
24787// method id "dialogflow.projects.agent.intents.list":
24788
24789type ProjectsAgentIntentsListCall struct {
24790	s            *Service
24791	parent       string
24792	urlParams_   gensupport.URLParams
24793	ifNoneMatch_ string
24794	ctx_         context.Context
24795	header_      http.Header
24796}
24797
24798// List: Returns the list of all intents in the specified agent.
24799//
24800// - parent: The agent to list all intents from. Format:
24801//   `projects//agent` or `projects//locations//agent`. Alternatively,
24802//   you can specify the environment to list intents for. Format:
24803//   `projects//agent/environments/` or
24804//   `projects//locations//agent/environments/`. Note: training phrases
24805//   of the intents will not be returned for non-draft environment.
24806func (r *ProjectsAgentIntentsService) List(parent string) *ProjectsAgentIntentsListCall {
24807	c := &ProjectsAgentIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24808	c.parent = parent
24809	return c
24810}
24811
24812// IntentView sets the optional parameter "intentView": The resource
24813// view to apply to the returned intent.
24814//
24815// Possible values:
24816//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
24817// in the response.
24818//   "INTENT_VIEW_FULL" - All fields are populated.
24819func (c *ProjectsAgentIntentsListCall) IntentView(intentView string) *ProjectsAgentIntentsListCall {
24820	c.urlParams_.Set("intentView", intentView)
24821	return c
24822}
24823
24824// LanguageCode sets the optional parameter "languageCode": The language
24825// used to access language-specific data. If not specified, the agent's
24826// default language is used. For more information, see Multilingual
24827// intent and entity data
24828// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
24829func (c *ProjectsAgentIntentsListCall) LanguageCode(languageCode string) *ProjectsAgentIntentsListCall {
24830	c.urlParams_.Set("languageCode", languageCode)
24831	return c
24832}
24833
24834// PageSize sets the optional parameter "pageSize": The maximum number
24835// of items to return in a single page. By default 100 and at most 1000.
24836func (c *ProjectsAgentIntentsListCall) PageSize(pageSize int64) *ProjectsAgentIntentsListCall {
24837	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24838	return c
24839}
24840
24841// PageToken sets the optional parameter "pageToken": The
24842// next_page_token value returned from a previous list request.
24843func (c *ProjectsAgentIntentsListCall) PageToken(pageToken string) *ProjectsAgentIntentsListCall {
24844	c.urlParams_.Set("pageToken", pageToken)
24845	return c
24846}
24847
24848// Fields allows partial responses to be retrieved. See
24849// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24850// for more information.
24851func (c *ProjectsAgentIntentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsListCall {
24852	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24853	return c
24854}
24855
24856// IfNoneMatch sets the optional parameter which makes the operation
24857// fail if the object's ETag matches the given value. This is useful for
24858// getting updates only after the object has changed since the last
24859// request. Use googleapi.IsNotModified to check whether the response
24860// error from Do is the result of In-None-Match.
24861func (c *ProjectsAgentIntentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsListCall {
24862	c.ifNoneMatch_ = entityTag
24863	return c
24864}
24865
24866// Context sets the context to be used in this call's Do method. Any
24867// pending HTTP request will be aborted if the provided context is
24868// canceled.
24869func (c *ProjectsAgentIntentsListCall) Context(ctx context.Context) *ProjectsAgentIntentsListCall {
24870	c.ctx_ = ctx
24871	return c
24872}
24873
24874// Header returns an http.Header that can be modified by the caller to
24875// add HTTP headers to the request.
24876func (c *ProjectsAgentIntentsListCall) Header() http.Header {
24877	if c.header_ == nil {
24878		c.header_ = make(http.Header)
24879	}
24880	return c.header_
24881}
24882
24883func (c *ProjectsAgentIntentsListCall) doRequest(alt string) (*http.Response, error) {
24884	reqHeaders := make(http.Header)
24885	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
24886	for k, v := range c.header_ {
24887		reqHeaders[k] = v
24888	}
24889	reqHeaders.Set("User-Agent", c.s.userAgent())
24890	if c.ifNoneMatch_ != "" {
24891		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24892	}
24893	var body io.Reader = nil
24894	c.urlParams_.Set("alt", alt)
24895	c.urlParams_.Set("prettyPrint", "false")
24896	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents")
24897	urls += "?" + c.urlParams_.Encode()
24898	req, err := http.NewRequest("GET", urls, body)
24899	if err != nil {
24900		return nil, err
24901	}
24902	req.Header = reqHeaders
24903	googleapi.Expand(req.URL, map[string]string{
24904		"parent": c.parent,
24905	})
24906	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24907}
24908
24909// Do executes the "dialogflow.projects.agent.intents.list" call.
24910// Exactly one of *GoogleCloudDialogflowV2ListIntentsResponse or error
24911// will be non-nil. Any non-2xx status code is an error. Response
24912// headers are in either
24913// *GoogleCloudDialogflowV2ListIntentsResponse.ServerResponse.Header or
24914// (if a response was returned at all) in
24915// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24916// whether the returned error was because http.StatusNotModified was
24917// returned.
24918func (c *ProjectsAgentIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListIntentsResponse, error) {
24919	gensupport.SetOptions(c.urlParams_, opts...)
24920	res, err := c.doRequest("json")
24921	if res != nil && res.StatusCode == http.StatusNotModified {
24922		if res.Body != nil {
24923			res.Body.Close()
24924		}
24925		return nil, &googleapi.Error{
24926			Code:   res.StatusCode,
24927			Header: res.Header,
24928		}
24929	}
24930	if err != nil {
24931		return nil, err
24932	}
24933	defer googleapi.CloseBody(res)
24934	if err := googleapi.CheckResponse(res); err != nil {
24935		return nil, err
24936	}
24937	ret := &GoogleCloudDialogflowV2ListIntentsResponse{
24938		ServerResponse: googleapi.ServerResponse{
24939			Header:         res.Header,
24940			HTTPStatusCode: res.StatusCode,
24941		},
24942	}
24943	target := &ret
24944	if err := gensupport.DecodeResponse(target, res); err != nil {
24945		return nil, err
24946	}
24947	return ret, nil
24948	// {
24949	//   "description": "Returns the list of all intents in the specified agent.",
24950	//   "flatPath": "v2/projects/{projectsId}/agent/intents",
24951	//   "httpMethod": "GET",
24952	//   "id": "dialogflow.projects.agent.intents.list",
24953	//   "parameterOrder": [
24954	//     "parent"
24955	//   ],
24956	//   "parameters": {
24957	//     "intentView": {
24958	//       "description": "Optional. The resource view to apply to the returned intent.",
24959	//       "enum": [
24960	//         "INTENT_VIEW_UNSPECIFIED",
24961	//         "INTENT_VIEW_FULL"
24962	//       ],
24963	//       "enumDescriptions": [
24964	//         "Training phrases field is not populated in the response.",
24965	//         "All fields are populated."
24966	//       ],
24967	//       "location": "query",
24968	//       "type": "string"
24969	//     },
24970	//     "languageCode": {
24971	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
24972	//       "location": "query",
24973	//       "type": "string"
24974	//     },
24975	//     "pageSize": {
24976	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
24977	//       "format": "int32",
24978	//       "location": "query",
24979	//       "type": "integer"
24980	//     },
24981	//     "pageToken": {
24982	//       "description": "Optional. The next_page_token value returned from a previous list request.",
24983	//       "location": "query",
24984	//       "type": "string"
24985	//     },
24986	//     "parent": {
24987	//       "description": "Required. The agent to list all intents from. Format: `projects//agent` or `projects//locations//agent`. Alternatively, you can specify the environment to list intents for. Format: `projects//agent/environments/` or `projects//locations//agent/environments/`. Note: training phrases of the intents will not be returned for non-draft environment.",
24988	//       "location": "path",
24989	//       "pattern": "^projects/[^/]+/agent$",
24990	//       "required": true,
24991	//       "type": "string"
24992	//     }
24993	//   },
24994	//   "path": "v2/{+parent}/intents",
24995	//   "response": {
24996	//     "$ref": "GoogleCloudDialogflowV2ListIntentsResponse"
24997	//   },
24998	//   "scopes": [
24999	//     "https://www.googleapis.com/auth/cloud-platform",
25000	//     "https://www.googleapis.com/auth/dialogflow"
25001	//   ]
25002	// }
25003
25004}
25005
25006// Pages invokes f for each page of results.
25007// A non-nil error returned from f will halt the iteration.
25008// The provided context supersedes any context provided to the Context method.
25009func (c *ProjectsAgentIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListIntentsResponse) error) error {
25010	c.ctx_ = ctx
25011	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25012	for {
25013		x, err := c.Do()
25014		if err != nil {
25015			return err
25016		}
25017		if err := f(x); err != nil {
25018			return err
25019		}
25020		if x.NextPageToken == "" {
25021			return nil
25022		}
25023		c.PageToken(x.NextPageToken)
25024	}
25025}
25026
25027// method id "dialogflow.projects.agent.intents.patch":
25028
25029type ProjectsAgentIntentsPatchCall struct {
25030	s                             *Service
25031	nameid                        string
25032	googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent
25033	urlParams_                    gensupport.URLParams
25034	ctx_                          context.Context
25035	header_                       http.Header
25036}
25037
25038// Patch: Updates the specified intent. Note: You should always train an
25039// agent prior to sending it queries. See the training documentation
25040// (https://cloud.google.com/dialogflow/es/docs/training).
25041//
25042// - name: Optional. The unique identifier of this intent. Required for
25043//   Intents.UpdateIntent and Intents.BatchUpdateIntents methods.
25044//   Format: `projects//agent/intents/`.
25045func (r *ProjectsAgentIntentsService) Patch(nameid string, googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent) *ProjectsAgentIntentsPatchCall {
25046	c := &ProjectsAgentIntentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25047	c.nameid = nameid
25048	c.googleclouddialogflowv2intent = googleclouddialogflowv2intent
25049	return c
25050}
25051
25052// IntentView sets the optional parameter "intentView": The resource
25053// view to apply to the returned intent.
25054//
25055// Possible values:
25056//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
25057// in the response.
25058//   "INTENT_VIEW_FULL" - All fields are populated.
25059func (c *ProjectsAgentIntentsPatchCall) IntentView(intentView string) *ProjectsAgentIntentsPatchCall {
25060	c.urlParams_.Set("intentView", intentView)
25061	return c
25062}
25063
25064// LanguageCode sets the optional parameter "languageCode": The language
25065// used to access language-specific data. If not specified, the agent's
25066// default language is used. For more information, see Multilingual
25067// intent and entity data
25068// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
25069func (c *ProjectsAgentIntentsPatchCall) LanguageCode(languageCode string) *ProjectsAgentIntentsPatchCall {
25070	c.urlParams_.Set("languageCode", languageCode)
25071	return c
25072}
25073
25074// UpdateMask sets the optional parameter "updateMask": The mask to
25075// control which fields get updated.
25076func (c *ProjectsAgentIntentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentIntentsPatchCall {
25077	c.urlParams_.Set("updateMask", updateMask)
25078	return c
25079}
25080
25081// Fields allows partial responses to be retrieved. See
25082// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25083// for more information.
25084func (c *ProjectsAgentIntentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsPatchCall {
25085	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25086	return c
25087}
25088
25089// Context sets the context to be used in this call's Do method. Any
25090// pending HTTP request will be aborted if the provided context is
25091// canceled.
25092func (c *ProjectsAgentIntentsPatchCall) Context(ctx context.Context) *ProjectsAgentIntentsPatchCall {
25093	c.ctx_ = ctx
25094	return c
25095}
25096
25097// Header returns an http.Header that can be modified by the caller to
25098// add HTTP headers to the request.
25099func (c *ProjectsAgentIntentsPatchCall) Header() http.Header {
25100	if c.header_ == nil {
25101		c.header_ = make(http.Header)
25102	}
25103	return c.header_
25104}
25105
25106func (c *ProjectsAgentIntentsPatchCall) doRequest(alt string) (*http.Response, error) {
25107	reqHeaders := make(http.Header)
25108	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
25109	for k, v := range c.header_ {
25110		reqHeaders[k] = v
25111	}
25112	reqHeaders.Set("User-Agent", c.s.userAgent())
25113	var body io.Reader = nil
25114	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2intent)
25115	if err != nil {
25116		return nil, err
25117	}
25118	reqHeaders.Set("Content-Type", "application/json")
25119	c.urlParams_.Set("alt", alt)
25120	c.urlParams_.Set("prettyPrint", "false")
25121	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
25122	urls += "?" + c.urlParams_.Encode()
25123	req, err := http.NewRequest("PATCH", urls, body)
25124	if err != nil {
25125		return nil, err
25126	}
25127	req.Header = reqHeaders
25128	googleapi.Expand(req.URL, map[string]string{
25129		"name": c.nameid,
25130	})
25131	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25132}
25133
25134// Do executes the "dialogflow.projects.agent.intents.patch" call.
25135// Exactly one of *GoogleCloudDialogflowV2Intent or error will be
25136// non-nil. Any non-2xx status code is an error. Response headers are in
25137// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a
25138// response was returned at all) in error.(*googleapi.Error).Header. Use
25139// googleapi.IsNotModified to check whether the returned error was
25140// because http.StatusNotModified was returned.
25141func (c *ProjectsAgentIntentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) {
25142	gensupport.SetOptions(c.urlParams_, opts...)
25143	res, err := c.doRequest("json")
25144	if res != nil && res.StatusCode == http.StatusNotModified {
25145		if res.Body != nil {
25146			res.Body.Close()
25147		}
25148		return nil, &googleapi.Error{
25149			Code:   res.StatusCode,
25150			Header: res.Header,
25151		}
25152	}
25153	if err != nil {
25154		return nil, err
25155	}
25156	defer googleapi.CloseBody(res)
25157	if err := googleapi.CheckResponse(res); err != nil {
25158		return nil, err
25159	}
25160	ret := &GoogleCloudDialogflowV2Intent{
25161		ServerResponse: googleapi.ServerResponse{
25162			Header:         res.Header,
25163			HTTPStatusCode: res.StatusCode,
25164		},
25165	}
25166	target := &ret
25167	if err := gensupport.DecodeResponse(target, res); err != nil {
25168		return nil, err
25169	}
25170	return ret, nil
25171	// {
25172	//   "description": "Updates the specified intent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
25173	//   "flatPath": "v2/projects/{projectsId}/agent/intents/{intentsId}",
25174	//   "httpMethod": "PATCH",
25175	//   "id": "dialogflow.projects.agent.intents.patch",
25176	//   "parameterOrder": [
25177	//     "name"
25178	//   ],
25179	//   "parameters": {
25180	//     "intentView": {
25181	//       "description": "Optional. The resource view to apply to the returned intent.",
25182	//       "enum": [
25183	//         "INTENT_VIEW_UNSPECIFIED",
25184	//         "INTENT_VIEW_FULL"
25185	//       ],
25186	//       "enumDescriptions": [
25187	//         "Training phrases field is not populated in the response.",
25188	//         "All fields are populated."
25189	//       ],
25190	//       "location": "query",
25191	//       "type": "string"
25192	//     },
25193	//     "languageCode": {
25194	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
25195	//       "location": "query",
25196	//       "type": "string"
25197	//     },
25198	//     "name": {
25199	//       "description": "Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`.",
25200	//       "location": "path",
25201	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
25202	//       "required": true,
25203	//       "type": "string"
25204	//     },
25205	//     "updateMask": {
25206	//       "description": "Optional. The mask to control which fields get updated.",
25207	//       "format": "google-fieldmask",
25208	//       "location": "query",
25209	//       "type": "string"
25210	//     }
25211	//   },
25212	//   "path": "v2/{+name}",
25213	//   "request": {
25214	//     "$ref": "GoogleCloudDialogflowV2Intent"
25215	//   },
25216	//   "response": {
25217	//     "$ref": "GoogleCloudDialogflowV2Intent"
25218	//   },
25219	//   "scopes": [
25220	//     "https://www.googleapis.com/auth/cloud-platform",
25221	//     "https://www.googleapis.com/auth/dialogflow"
25222	//   ]
25223	// }
25224
25225}
25226
25227// method id "dialogflow.projects.agent.knowledgeBases.create":
25228
25229type ProjectsAgentKnowledgeBasesCreateCall struct {
25230	s                                    *Service
25231	parent                               string
25232	googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase
25233	urlParams_                           gensupport.URLParams
25234	ctx_                                 context.Context
25235	header_                              http.Header
25236}
25237
25238// Create: Creates a knowledge base.
25239//
25240// - parent: The project to create a knowledge base for. Format:
25241//   `projects//locations/`.
25242func (r *ProjectsAgentKnowledgeBasesService) Create(parent string, googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase) *ProjectsAgentKnowledgeBasesCreateCall {
25243	c := &ProjectsAgentKnowledgeBasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25244	c.parent = parent
25245	c.googleclouddialogflowv2knowledgebase = googleclouddialogflowv2knowledgebase
25246	return c
25247}
25248
25249// Fields allows partial responses to be retrieved. See
25250// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25251// for more information.
25252func (c *ProjectsAgentKnowledgeBasesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesCreateCall {
25253	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25254	return c
25255}
25256
25257// Context sets the context to be used in this call's Do method. Any
25258// pending HTTP request will be aborted if the provided context is
25259// canceled.
25260func (c *ProjectsAgentKnowledgeBasesCreateCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesCreateCall {
25261	c.ctx_ = ctx
25262	return c
25263}
25264
25265// Header returns an http.Header that can be modified by the caller to
25266// add HTTP headers to the request.
25267func (c *ProjectsAgentKnowledgeBasesCreateCall) Header() http.Header {
25268	if c.header_ == nil {
25269		c.header_ = make(http.Header)
25270	}
25271	return c.header_
25272}
25273
25274func (c *ProjectsAgentKnowledgeBasesCreateCall) doRequest(alt string) (*http.Response, error) {
25275	reqHeaders := make(http.Header)
25276	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
25277	for k, v := range c.header_ {
25278		reqHeaders[k] = v
25279	}
25280	reqHeaders.Set("User-Agent", c.s.userAgent())
25281	var body io.Reader = nil
25282	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2knowledgebase)
25283	if err != nil {
25284		return nil, err
25285	}
25286	reqHeaders.Set("Content-Type", "application/json")
25287	c.urlParams_.Set("alt", alt)
25288	c.urlParams_.Set("prettyPrint", "false")
25289	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/knowledgeBases")
25290	urls += "?" + c.urlParams_.Encode()
25291	req, err := http.NewRequest("POST", urls, body)
25292	if err != nil {
25293		return nil, err
25294	}
25295	req.Header = reqHeaders
25296	googleapi.Expand(req.URL, map[string]string{
25297		"parent": c.parent,
25298	})
25299	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25300}
25301
25302// Do executes the "dialogflow.projects.agent.knowledgeBases.create" call.
25303// Exactly one of *GoogleCloudDialogflowV2KnowledgeBase or error will be
25304// non-nil. Any non-2xx status code is an error. Response headers are in
25305// either *GoogleCloudDialogflowV2KnowledgeBase.ServerResponse.Header or
25306// (if a response was returned at all) in
25307// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25308// whether the returned error was because http.StatusNotModified was
25309// returned.
25310func (c *ProjectsAgentKnowledgeBasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2KnowledgeBase, error) {
25311	gensupport.SetOptions(c.urlParams_, opts...)
25312	res, err := c.doRequest("json")
25313	if res != nil && res.StatusCode == http.StatusNotModified {
25314		if res.Body != nil {
25315			res.Body.Close()
25316		}
25317		return nil, &googleapi.Error{
25318			Code:   res.StatusCode,
25319			Header: res.Header,
25320		}
25321	}
25322	if err != nil {
25323		return nil, err
25324	}
25325	defer googleapi.CloseBody(res)
25326	if err := googleapi.CheckResponse(res); err != nil {
25327		return nil, err
25328	}
25329	ret := &GoogleCloudDialogflowV2KnowledgeBase{
25330		ServerResponse: googleapi.ServerResponse{
25331			Header:         res.Header,
25332			HTTPStatusCode: res.StatusCode,
25333		},
25334	}
25335	target := &ret
25336	if err := gensupport.DecodeResponse(target, res); err != nil {
25337		return nil, err
25338	}
25339	return ret, nil
25340	// {
25341	//   "description": "Creates a knowledge base.",
25342	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases",
25343	//   "httpMethod": "POST",
25344	//   "id": "dialogflow.projects.agent.knowledgeBases.create",
25345	//   "parameterOrder": [
25346	//     "parent"
25347	//   ],
25348	//   "parameters": {
25349	//     "parent": {
25350	//       "description": "Required. The project to create a knowledge base for. Format: `projects//locations/`.",
25351	//       "location": "path",
25352	//       "pattern": "^projects/[^/]+/agent$",
25353	//       "required": true,
25354	//       "type": "string"
25355	//     }
25356	//   },
25357	//   "path": "v2/{+parent}/knowledgeBases",
25358	//   "request": {
25359	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
25360	//   },
25361	//   "response": {
25362	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
25363	//   },
25364	//   "scopes": [
25365	//     "https://www.googleapis.com/auth/cloud-platform",
25366	//     "https://www.googleapis.com/auth/dialogflow"
25367	//   ]
25368	// }
25369
25370}
25371
25372// method id "dialogflow.projects.agent.knowledgeBases.delete":
25373
25374type ProjectsAgentKnowledgeBasesDeleteCall struct {
25375	s          *Service
25376	name       string
25377	urlParams_ gensupport.URLParams
25378	ctx_       context.Context
25379	header_    http.Header
25380}
25381
25382// Delete: Deletes the specified knowledge base.
25383//
25384// - name: The name of the knowledge base to delete. Format:
25385//   `projects//locations//knowledgeBases/`.
25386func (r *ProjectsAgentKnowledgeBasesService) Delete(name string) *ProjectsAgentKnowledgeBasesDeleteCall {
25387	c := &ProjectsAgentKnowledgeBasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25388	c.name = name
25389	return c
25390}
25391
25392// Force sets the optional parameter "force": Force deletes the
25393// knowledge base. When set to true, any documents in the knowledge base
25394// are also deleted.
25395func (c *ProjectsAgentKnowledgeBasesDeleteCall) Force(force bool) *ProjectsAgentKnowledgeBasesDeleteCall {
25396	c.urlParams_.Set("force", fmt.Sprint(force))
25397	return c
25398}
25399
25400// Fields allows partial responses to be retrieved. See
25401// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25402// for more information.
25403func (c *ProjectsAgentKnowledgeBasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDeleteCall {
25404	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25405	return c
25406}
25407
25408// Context sets the context to be used in this call's Do method. Any
25409// pending HTTP request will be aborted if the provided context is
25410// canceled.
25411func (c *ProjectsAgentKnowledgeBasesDeleteCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDeleteCall {
25412	c.ctx_ = ctx
25413	return c
25414}
25415
25416// Header returns an http.Header that can be modified by the caller to
25417// add HTTP headers to the request.
25418func (c *ProjectsAgentKnowledgeBasesDeleteCall) Header() http.Header {
25419	if c.header_ == nil {
25420		c.header_ = make(http.Header)
25421	}
25422	return c.header_
25423}
25424
25425func (c *ProjectsAgentKnowledgeBasesDeleteCall) doRequest(alt string) (*http.Response, error) {
25426	reqHeaders := make(http.Header)
25427	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
25428	for k, v := range c.header_ {
25429		reqHeaders[k] = v
25430	}
25431	reqHeaders.Set("User-Agent", c.s.userAgent())
25432	var body io.Reader = nil
25433	c.urlParams_.Set("alt", alt)
25434	c.urlParams_.Set("prettyPrint", "false")
25435	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
25436	urls += "?" + c.urlParams_.Encode()
25437	req, err := http.NewRequest("DELETE", urls, body)
25438	if err != nil {
25439		return nil, err
25440	}
25441	req.Header = reqHeaders
25442	googleapi.Expand(req.URL, map[string]string{
25443		"name": c.name,
25444	})
25445	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25446}
25447
25448// Do executes the "dialogflow.projects.agent.knowledgeBases.delete" call.
25449// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
25450// non-2xx status code is an error. Response headers are in either
25451// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
25452// returned at all) in error.(*googleapi.Error).Header. Use
25453// googleapi.IsNotModified to check whether the returned error was
25454// because http.StatusNotModified was returned.
25455func (c *ProjectsAgentKnowledgeBasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
25456	gensupport.SetOptions(c.urlParams_, opts...)
25457	res, err := c.doRequest("json")
25458	if res != nil && res.StatusCode == http.StatusNotModified {
25459		if res.Body != nil {
25460			res.Body.Close()
25461		}
25462		return nil, &googleapi.Error{
25463			Code:   res.StatusCode,
25464			Header: res.Header,
25465		}
25466	}
25467	if err != nil {
25468		return nil, err
25469	}
25470	defer googleapi.CloseBody(res)
25471	if err := googleapi.CheckResponse(res); err != nil {
25472		return nil, err
25473	}
25474	ret := &GoogleProtobufEmpty{
25475		ServerResponse: googleapi.ServerResponse{
25476			Header:         res.Header,
25477			HTTPStatusCode: res.StatusCode,
25478		},
25479	}
25480	target := &ret
25481	if err := gensupport.DecodeResponse(target, res); err != nil {
25482		return nil, err
25483	}
25484	return ret, nil
25485	// {
25486	//   "description": "Deletes the specified knowledge base.",
25487	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
25488	//   "httpMethod": "DELETE",
25489	//   "id": "dialogflow.projects.agent.knowledgeBases.delete",
25490	//   "parameterOrder": [
25491	//     "name"
25492	//   ],
25493	//   "parameters": {
25494	//     "force": {
25495	//       "description": "Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted.",
25496	//       "location": "query",
25497	//       "type": "boolean"
25498	//     },
25499	//     "name": {
25500	//       "description": "Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`.",
25501	//       "location": "path",
25502	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
25503	//       "required": true,
25504	//       "type": "string"
25505	//     }
25506	//   },
25507	//   "path": "v2/{+name}",
25508	//   "response": {
25509	//     "$ref": "GoogleProtobufEmpty"
25510	//   },
25511	//   "scopes": [
25512	//     "https://www.googleapis.com/auth/cloud-platform",
25513	//     "https://www.googleapis.com/auth/dialogflow"
25514	//   ]
25515	// }
25516
25517}
25518
25519// method id "dialogflow.projects.agent.knowledgeBases.get":
25520
25521type ProjectsAgentKnowledgeBasesGetCall struct {
25522	s            *Service
25523	name         string
25524	urlParams_   gensupport.URLParams
25525	ifNoneMatch_ string
25526	ctx_         context.Context
25527	header_      http.Header
25528}
25529
25530// Get: Retrieves the specified knowledge base.
25531//
25532// - name: The name of the knowledge base to retrieve. Format
25533//   `projects//locations//knowledgeBases/`.
25534func (r *ProjectsAgentKnowledgeBasesService) Get(name string) *ProjectsAgentKnowledgeBasesGetCall {
25535	c := &ProjectsAgentKnowledgeBasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25536	c.name = name
25537	return c
25538}
25539
25540// Fields allows partial responses to be retrieved. See
25541// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25542// for more information.
25543func (c *ProjectsAgentKnowledgeBasesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesGetCall {
25544	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25545	return c
25546}
25547
25548// IfNoneMatch sets the optional parameter which makes the operation
25549// fail if the object's ETag matches the given value. This is useful for
25550// getting updates only after the object has changed since the last
25551// request. Use googleapi.IsNotModified to check whether the response
25552// error from Do is the result of In-None-Match.
25553func (c *ProjectsAgentKnowledgeBasesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesGetCall {
25554	c.ifNoneMatch_ = entityTag
25555	return c
25556}
25557
25558// Context sets the context to be used in this call's Do method. Any
25559// pending HTTP request will be aborted if the provided context is
25560// canceled.
25561func (c *ProjectsAgentKnowledgeBasesGetCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesGetCall {
25562	c.ctx_ = ctx
25563	return c
25564}
25565
25566// Header returns an http.Header that can be modified by the caller to
25567// add HTTP headers to the request.
25568func (c *ProjectsAgentKnowledgeBasesGetCall) Header() http.Header {
25569	if c.header_ == nil {
25570		c.header_ = make(http.Header)
25571	}
25572	return c.header_
25573}
25574
25575func (c *ProjectsAgentKnowledgeBasesGetCall) doRequest(alt string) (*http.Response, error) {
25576	reqHeaders := make(http.Header)
25577	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
25578	for k, v := range c.header_ {
25579		reqHeaders[k] = v
25580	}
25581	reqHeaders.Set("User-Agent", c.s.userAgent())
25582	if c.ifNoneMatch_ != "" {
25583		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25584	}
25585	var body io.Reader = nil
25586	c.urlParams_.Set("alt", alt)
25587	c.urlParams_.Set("prettyPrint", "false")
25588	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
25589	urls += "?" + c.urlParams_.Encode()
25590	req, err := http.NewRequest("GET", urls, body)
25591	if err != nil {
25592		return nil, err
25593	}
25594	req.Header = reqHeaders
25595	googleapi.Expand(req.URL, map[string]string{
25596		"name": c.name,
25597	})
25598	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25599}
25600
25601// Do executes the "dialogflow.projects.agent.knowledgeBases.get" call.
25602// Exactly one of *GoogleCloudDialogflowV2KnowledgeBase or error will be
25603// non-nil. Any non-2xx status code is an error. Response headers are in
25604// either *GoogleCloudDialogflowV2KnowledgeBase.ServerResponse.Header or
25605// (if a response was returned at all) in
25606// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25607// whether the returned error was because http.StatusNotModified was
25608// returned.
25609func (c *ProjectsAgentKnowledgeBasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2KnowledgeBase, error) {
25610	gensupport.SetOptions(c.urlParams_, opts...)
25611	res, err := c.doRequest("json")
25612	if res != nil && res.StatusCode == http.StatusNotModified {
25613		if res.Body != nil {
25614			res.Body.Close()
25615		}
25616		return nil, &googleapi.Error{
25617			Code:   res.StatusCode,
25618			Header: res.Header,
25619		}
25620	}
25621	if err != nil {
25622		return nil, err
25623	}
25624	defer googleapi.CloseBody(res)
25625	if err := googleapi.CheckResponse(res); err != nil {
25626		return nil, err
25627	}
25628	ret := &GoogleCloudDialogflowV2KnowledgeBase{
25629		ServerResponse: googleapi.ServerResponse{
25630			Header:         res.Header,
25631			HTTPStatusCode: res.StatusCode,
25632		},
25633	}
25634	target := &ret
25635	if err := gensupport.DecodeResponse(target, res); err != nil {
25636		return nil, err
25637	}
25638	return ret, nil
25639	// {
25640	//   "description": "Retrieves the specified knowledge base.",
25641	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
25642	//   "httpMethod": "GET",
25643	//   "id": "dialogflow.projects.agent.knowledgeBases.get",
25644	//   "parameterOrder": [
25645	//     "name"
25646	//   ],
25647	//   "parameters": {
25648	//     "name": {
25649	//       "description": "Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`.",
25650	//       "location": "path",
25651	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
25652	//       "required": true,
25653	//       "type": "string"
25654	//     }
25655	//   },
25656	//   "path": "v2/{+name}",
25657	//   "response": {
25658	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
25659	//   },
25660	//   "scopes": [
25661	//     "https://www.googleapis.com/auth/cloud-platform",
25662	//     "https://www.googleapis.com/auth/dialogflow"
25663	//   ]
25664	// }
25665
25666}
25667
25668// method id "dialogflow.projects.agent.knowledgeBases.list":
25669
25670type ProjectsAgentKnowledgeBasesListCall struct {
25671	s            *Service
25672	parent       string
25673	urlParams_   gensupport.URLParams
25674	ifNoneMatch_ string
25675	ctx_         context.Context
25676	header_      http.Header
25677}
25678
25679// List: Returns the list of all knowledge bases of the specified agent.
25680//
25681// - parent: The project to list of knowledge bases for. Format:
25682//   `projects//locations/`.
25683func (r *ProjectsAgentKnowledgeBasesService) List(parent string) *ProjectsAgentKnowledgeBasesListCall {
25684	c := &ProjectsAgentKnowledgeBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25685	c.parent = parent
25686	return c
25687}
25688
25689// PageSize sets the optional parameter "pageSize": The maximum number
25690// of items to return in a single page. By default 10 and at most 100.
25691func (c *ProjectsAgentKnowledgeBasesListCall) PageSize(pageSize int64) *ProjectsAgentKnowledgeBasesListCall {
25692	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
25693	return c
25694}
25695
25696// PageToken sets the optional parameter "pageToken": The
25697// next_page_token value returned from a previous list request.
25698func (c *ProjectsAgentKnowledgeBasesListCall) PageToken(pageToken string) *ProjectsAgentKnowledgeBasesListCall {
25699	c.urlParams_.Set("pageToken", pageToken)
25700	return c
25701}
25702
25703// Fields allows partial responses to be retrieved. See
25704// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25705// for more information.
25706func (c *ProjectsAgentKnowledgeBasesListCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesListCall {
25707	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25708	return c
25709}
25710
25711// IfNoneMatch sets the optional parameter which makes the operation
25712// fail if the object's ETag matches the given value. This is useful for
25713// getting updates only after the object has changed since the last
25714// request. Use googleapi.IsNotModified to check whether the response
25715// error from Do is the result of In-None-Match.
25716func (c *ProjectsAgentKnowledgeBasesListCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesListCall {
25717	c.ifNoneMatch_ = entityTag
25718	return c
25719}
25720
25721// Context sets the context to be used in this call's Do method. Any
25722// pending HTTP request will be aborted if the provided context is
25723// canceled.
25724func (c *ProjectsAgentKnowledgeBasesListCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesListCall {
25725	c.ctx_ = ctx
25726	return c
25727}
25728
25729// Header returns an http.Header that can be modified by the caller to
25730// add HTTP headers to the request.
25731func (c *ProjectsAgentKnowledgeBasesListCall) Header() http.Header {
25732	if c.header_ == nil {
25733		c.header_ = make(http.Header)
25734	}
25735	return c.header_
25736}
25737
25738func (c *ProjectsAgentKnowledgeBasesListCall) doRequest(alt string) (*http.Response, error) {
25739	reqHeaders := make(http.Header)
25740	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
25741	for k, v := range c.header_ {
25742		reqHeaders[k] = v
25743	}
25744	reqHeaders.Set("User-Agent", c.s.userAgent())
25745	if c.ifNoneMatch_ != "" {
25746		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25747	}
25748	var body io.Reader = nil
25749	c.urlParams_.Set("alt", alt)
25750	c.urlParams_.Set("prettyPrint", "false")
25751	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/knowledgeBases")
25752	urls += "?" + c.urlParams_.Encode()
25753	req, err := http.NewRequest("GET", urls, body)
25754	if err != nil {
25755		return nil, err
25756	}
25757	req.Header = reqHeaders
25758	googleapi.Expand(req.URL, map[string]string{
25759		"parent": c.parent,
25760	})
25761	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25762}
25763
25764// Do executes the "dialogflow.projects.agent.knowledgeBases.list" call.
25765// Exactly one of *GoogleCloudDialogflowV2ListKnowledgeBasesResponse or
25766// error will be non-nil. Any non-2xx status code is an error. Response
25767// headers are in either
25768// *GoogleCloudDialogflowV2ListKnowledgeBasesResponse.ServerResponse.Head
25769// er or (if a response was returned at all) in
25770// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25771// whether the returned error was because http.StatusNotModified was
25772// returned.
25773func (c *ProjectsAgentKnowledgeBasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListKnowledgeBasesResponse, error) {
25774	gensupport.SetOptions(c.urlParams_, opts...)
25775	res, err := c.doRequest("json")
25776	if res != nil && res.StatusCode == http.StatusNotModified {
25777		if res.Body != nil {
25778			res.Body.Close()
25779		}
25780		return nil, &googleapi.Error{
25781			Code:   res.StatusCode,
25782			Header: res.Header,
25783		}
25784	}
25785	if err != nil {
25786		return nil, err
25787	}
25788	defer googleapi.CloseBody(res)
25789	if err := googleapi.CheckResponse(res); err != nil {
25790		return nil, err
25791	}
25792	ret := &GoogleCloudDialogflowV2ListKnowledgeBasesResponse{
25793		ServerResponse: googleapi.ServerResponse{
25794			Header:         res.Header,
25795			HTTPStatusCode: res.StatusCode,
25796		},
25797	}
25798	target := &ret
25799	if err := gensupport.DecodeResponse(target, res); err != nil {
25800		return nil, err
25801	}
25802	return ret, nil
25803	// {
25804	//   "description": "Returns the list of all knowledge bases of the specified agent.",
25805	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases",
25806	//   "httpMethod": "GET",
25807	//   "id": "dialogflow.projects.agent.knowledgeBases.list",
25808	//   "parameterOrder": [
25809	//     "parent"
25810	//   ],
25811	//   "parameters": {
25812	//     "pageSize": {
25813	//       "description": "The maximum number of items to return in a single page. By default 10 and at most 100.",
25814	//       "format": "int32",
25815	//       "location": "query",
25816	//       "type": "integer"
25817	//     },
25818	//     "pageToken": {
25819	//       "description": "The next_page_token value returned from a previous list request.",
25820	//       "location": "query",
25821	//       "type": "string"
25822	//     },
25823	//     "parent": {
25824	//       "description": "Required. The project to list of knowledge bases for. Format: `projects//locations/`.",
25825	//       "location": "path",
25826	//       "pattern": "^projects/[^/]+/agent$",
25827	//       "required": true,
25828	//       "type": "string"
25829	//     }
25830	//   },
25831	//   "path": "v2/{+parent}/knowledgeBases",
25832	//   "response": {
25833	//     "$ref": "GoogleCloudDialogflowV2ListKnowledgeBasesResponse"
25834	//   },
25835	//   "scopes": [
25836	//     "https://www.googleapis.com/auth/cloud-platform",
25837	//     "https://www.googleapis.com/auth/dialogflow"
25838	//   ]
25839	// }
25840
25841}
25842
25843// Pages invokes f for each page of results.
25844// A non-nil error returned from f will halt the iteration.
25845// The provided context supersedes any context provided to the Context method.
25846func (c *ProjectsAgentKnowledgeBasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListKnowledgeBasesResponse) error) error {
25847	c.ctx_ = ctx
25848	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25849	for {
25850		x, err := c.Do()
25851		if err != nil {
25852			return err
25853		}
25854		if err := f(x); err != nil {
25855			return err
25856		}
25857		if x.NextPageToken == "" {
25858			return nil
25859		}
25860		c.PageToken(x.NextPageToken)
25861	}
25862}
25863
25864// method id "dialogflow.projects.agent.knowledgeBases.patch":
25865
25866type ProjectsAgentKnowledgeBasesPatchCall struct {
25867	s                                    *Service
25868	name                                 string
25869	googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase
25870	urlParams_                           gensupport.URLParams
25871	ctx_                                 context.Context
25872	header_                              http.Header
25873}
25874
25875// Patch: Updates the specified knowledge base.
25876//
25877// - name: The knowledge base resource name. The name must be empty when
25878//   creating a knowledge base. Format:
25879//   `projects//locations//knowledgeBases/`.
25880func (r *ProjectsAgentKnowledgeBasesService) Patch(name string, googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase) *ProjectsAgentKnowledgeBasesPatchCall {
25881	c := &ProjectsAgentKnowledgeBasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25882	c.name = name
25883	c.googleclouddialogflowv2knowledgebase = googleclouddialogflowv2knowledgebase
25884	return c
25885}
25886
25887// UpdateMask sets the optional parameter "updateMask": Not specified
25888// means `update all`. Currently, only `display_name` can be updated, an
25889// InvalidArgument will be returned for attempting to update other
25890// fields.
25891func (c *ProjectsAgentKnowledgeBasesPatchCall) UpdateMask(updateMask string) *ProjectsAgentKnowledgeBasesPatchCall {
25892	c.urlParams_.Set("updateMask", updateMask)
25893	return c
25894}
25895
25896// Fields allows partial responses to be retrieved. See
25897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25898// for more information.
25899func (c *ProjectsAgentKnowledgeBasesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesPatchCall {
25900	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25901	return c
25902}
25903
25904// Context sets the context to be used in this call's Do method. Any
25905// pending HTTP request will be aborted if the provided context is
25906// canceled.
25907func (c *ProjectsAgentKnowledgeBasesPatchCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesPatchCall {
25908	c.ctx_ = ctx
25909	return c
25910}
25911
25912// Header returns an http.Header that can be modified by the caller to
25913// add HTTP headers to the request.
25914func (c *ProjectsAgentKnowledgeBasesPatchCall) Header() http.Header {
25915	if c.header_ == nil {
25916		c.header_ = make(http.Header)
25917	}
25918	return c.header_
25919}
25920
25921func (c *ProjectsAgentKnowledgeBasesPatchCall) doRequest(alt string) (*http.Response, error) {
25922	reqHeaders := make(http.Header)
25923	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
25924	for k, v := range c.header_ {
25925		reqHeaders[k] = v
25926	}
25927	reqHeaders.Set("User-Agent", c.s.userAgent())
25928	var body io.Reader = nil
25929	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2knowledgebase)
25930	if err != nil {
25931		return nil, err
25932	}
25933	reqHeaders.Set("Content-Type", "application/json")
25934	c.urlParams_.Set("alt", alt)
25935	c.urlParams_.Set("prettyPrint", "false")
25936	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
25937	urls += "?" + c.urlParams_.Encode()
25938	req, err := http.NewRequest("PATCH", urls, body)
25939	if err != nil {
25940		return nil, err
25941	}
25942	req.Header = reqHeaders
25943	googleapi.Expand(req.URL, map[string]string{
25944		"name": c.name,
25945	})
25946	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25947}
25948
25949// Do executes the "dialogflow.projects.agent.knowledgeBases.patch" call.
25950// Exactly one of *GoogleCloudDialogflowV2KnowledgeBase or error will be
25951// non-nil. Any non-2xx status code is an error. Response headers are in
25952// either *GoogleCloudDialogflowV2KnowledgeBase.ServerResponse.Header or
25953// (if a response was returned at all) in
25954// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25955// whether the returned error was because http.StatusNotModified was
25956// returned.
25957func (c *ProjectsAgentKnowledgeBasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2KnowledgeBase, error) {
25958	gensupport.SetOptions(c.urlParams_, opts...)
25959	res, err := c.doRequest("json")
25960	if res != nil && res.StatusCode == http.StatusNotModified {
25961		if res.Body != nil {
25962			res.Body.Close()
25963		}
25964		return nil, &googleapi.Error{
25965			Code:   res.StatusCode,
25966			Header: res.Header,
25967		}
25968	}
25969	if err != nil {
25970		return nil, err
25971	}
25972	defer googleapi.CloseBody(res)
25973	if err := googleapi.CheckResponse(res); err != nil {
25974		return nil, err
25975	}
25976	ret := &GoogleCloudDialogflowV2KnowledgeBase{
25977		ServerResponse: googleapi.ServerResponse{
25978			Header:         res.Header,
25979			HTTPStatusCode: res.StatusCode,
25980		},
25981	}
25982	target := &ret
25983	if err := gensupport.DecodeResponse(target, res); err != nil {
25984		return nil, err
25985	}
25986	return ret, nil
25987	// {
25988	//   "description": "Updates the specified knowledge base.",
25989	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
25990	//   "httpMethod": "PATCH",
25991	//   "id": "dialogflow.projects.agent.knowledgeBases.patch",
25992	//   "parameterOrder": [
25993	//     "name"
25994	//   ],
25995	//   "parameters": {
25996	//     "name": {
25997	//       "description": "The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`.",
25998	//       "location": "path",
25999	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
26000	//       "required": true,
26001	//       "type": "string"
26002	//     },
26003	//     "updateMask": {
26004	//       "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.",
26005	//       "format": "google-fieldmask",
26006	//       "location": "query",
26007	//       "type": "string"
26008	//     }
26009	//   },
26010	//   "path": "v2/{+name}",
26011	//   "request": {
26012	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
26013	//   },
26014	//   "response": {
26015	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
26016	//   },
26017	//   "scopes": [
26018	//     "https://www.googleapis.com/auth/cloud-platform",
26019	//     "https://www.googleapis.com/auth/dialogflow"
26020	//   ]
26021	// }
26022
26023}
26024
26025// method id "dialogflow.projects.agent.knowledgeBases.documents.create":
26026
26027type ProjectsAgentKnowledgeBasesDocumentsCreateCall struct {
26028	s                               *Service
26029	parent                          string
26030	googleclouddialogflowv2document *GoogleCloudDialogflowV2Document
26031	urlParams_                      gensupport.URLParams
26032	ctx_                            context.Context
26033	header_                         http.Header
26034}
26035
26036// Create: Creates a new document. Operation
26037//
26038// - parent: The knowledge base to create a document for. Format:
26039//   `projects//locations//knowledgeBases/`.
26040func (r *ProjectsAgentKnowledgeBasesDocumentsService) Create(parent string, googleclouddialogflowv2document *GoogleCloudDialogflowV2Document) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
26041	c := &ProjectsAgentKnowledgeBasesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26042	c.parent = parent
26043	c.googleclouddialogflowv2document = googleclouddialogflowv2document
26044	return c
26045}
26046
26047// Fields allows partial responses to be retrieved. See
26048// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26049// for more information.
26050func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
26051	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26052	return c
26053}
26054
26055// Context sets the context to be used in this call's Do method. Any
26056// pending HTTP request will be aborted if the provided context is
26057// canceled.
26058func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
26059	c.ctx_ = ctx
26060	return c
26061}
26062
26063// Header returns an http.Header that can be modified by the caller to
26064// add HTTP headers to the request.
26065func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Header() http.Header {
26066	if c.header_ == nil {
26067		c.header_ = make(http.Header)
26068	}
26069	return c.header_
26070}
26071
26072func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) {
26073	reqHeaders := make(http.Header)
26074	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
26075	for k, v := range c.header_ {
26076		reqHeaders[k] = v
26077	}
26078	reqHeaders.Set("User-Agent", c.s.userAgent())
26079	var body io.Reader = nil
26080	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2document)
26081	if err != nil {
26082		return nil, err
26083	}
26084	reqHeaders.Set("Content-Type", "application/json")
26085	c.urlParams_.Set("alt", alt)
26086	c.urlParams_.Set("prettyPrint", "false")
26087	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/documents")
26088	urls += "?" + c.urlParams_.Encode()
26089	req, err := http.NewRequest("POST", urls, body)
26090	if err != nil {
26091		return nil, err
26092	}
26093	req.Header = reqHeaders
26094	googleapi.Expand(req.URL, map[string]string{
26095		"parent": c.parent,
26096	})
26097	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26098}
26099
26100// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.create" call.
26101// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
26102// Any non-2xx status code is an error. Response headers are in either
26103// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
26104// was returned at all) in error.(*googleapi.Error).Header. Use
26105// googleapi.IsNotModified to check whether the returned error was
26106// because http.StatusNotModified was returned.
26107func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
26108	gensupport.SetOptions(c.urlParams_, opts...)
26109	res, err := c.doRequest("json")
26110	if res != nil && res.StatusCode == http.StatusNotModified {
26111		if res.Body != nil {
26112			res.Body.Close()
26113		}
26114		return nil, &googleapi.Error{
26115			Code:   res.StatusCode,
26116			Header: res.Header,
26117		}
26118	}
26119	if err != nil {
26120		return nil, err
26121	}
26122	defer googleapi.CloseBody(res)
26123	if err := googleapi.CheckResponse(res); err != nil {
26124		return nil, err
26125	}
26126	ret := &GoogleLongrunningOperation{
26127		ServerResponse: googleapi.ServerResponse{
26128			Header:         res.Header,
26129			HTTPStatusCode: res.StatusCode,
26130		},
26131	}
26132	target := &ret
26133	if err := gensupport.DecodeResponse(target, res); err != nil {
26134		return nil, err
26135	}
26136	return ret, nil
26137	// {
26138	//   "description": "Creates a new document. Operation ",
26139	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents",
26140	//   "httpMethod": "POST",
26141	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.create",
26142	//   "parameterOrder": [
26143	//     "parent"
26144	//   ],
26145	//   "parameters": {
26146	//     "parent": {
26147	//       "description": "Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`.",
26148	//       "location": "path",
26149	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
26150	//       "required": true,
26151	//       "type": "string"
26152	//     }
26153	//   },
26154	//   "path": "v2/{+parent}/documents",
26155	//   "request": {
26156	//     "$ref": "GoogleCloudDialogflowV2Document"
26157	//   },
26158	//   "response": {
26159	//     "$ref": "GoogleLongrunningOperation"
26160	//   },
26161	//   "scopes": [
26162	//     "https://www.googleapis.com/auth/cloud-platform",
26163	//     "https://www.googleapis.com/auth/dialogflow"
26164	//   ]
26165	// }
26166
26167}
26168
26169// method id "dialogflow.projects.agent.knowledgeBases.documents.delete":
26170
26171type ProjectsAgentKnowledgeBasesDocumentsDeleteCall struct {
26172	s          *Service
26173	name       string
26174	urlParams_ gensupport.URLParams
26175	ctx_       context.Context
26176	header_    http.Header
26177}
26178
26179// Delete: Deletes the specified document. Operation
26180//
26181// - name: The name of the document to delete. Format:
26182//   `projects//locations//knowledgeBases//documents/`.
26183func (r *ProjectsAgentKnowledgeBasesDocumentsService) Delete(name string) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
26184	c := &ProjectsAgentKnowledgeBasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26185	c.name = name
26186	return c
26187}
26188
26189// Fields allows partial responses to be retrieved. See
26190// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26191// for more information.
26192func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
26193	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26194	return c
26195}
26196
26197// Context sets the context to be used in this call's Do method. Any
26198// pending HTTP request will be aborted if the provided context is
26199// canceled.
26200func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
26201	c.ctx_ = ctx
26202	return c
26203}
26204
26205// Header returns an http.Header that can be modified by the caller to
26206// add HTTP headers to the request.
26207func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Header() http.Header {
26208	if c.header_ == nil {
26209		c.header_ = make(http.Header)
26210	}
26211	return c.header_
26212}
26213
26214func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
26215	reqHeaders := make(http.Header)
26216	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
26217	for k, v := range c.header_ {
26218		reqHeaders[k] = v
26219	}
26220	reqHeaders.Set("User-Agent", c.s.userAgent())
26221	var body io.Reader = nil
26222	c.urlParams_.Set("alt", alt)
26223	c.urlParams_.Set("prettyPrint", "false")
26224	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
26225	urls += "?" + c.urlParams_.Encode()
26226	req, err := http.NewRequest("DELETE", urls, body)
26227	if err != nil {
26228		return nil, err
26229	}
26230	req.Header = reqHeaders
26231	googleapi.Expand(req.URL, map[string]string{
26232		"name": c.name,
26233	})
26234	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26235}
26236
26237// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.delete" call.
26238// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
26239// Any non-2xx status code is an error. Response headers are in either
26240// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
26241// was returned at all) in error.(*googleapi.Error).Header. Use
26242// googleapi.IsNotModified to check whether the returned error was
26243// because http.StatusNotModified was returned.
26244func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
26245	gensupport.SetOptions(c.urlParams_, opts...)
26246	res, err := c.doRequest("json")
26247	if res != nil && res.StatusCode == http.StatusNotModified {
26248		if res.Body != nil {
26249			res.Body.Close()
26250		}
26251		return nil, &googleapi.Error{
26252			Code:   res.StatusCode,
26253			Header: res.Header,
26254		}
26255	}
26256	if err != nil {
26257		return nil, err
26258	}
26259	defer googleapi.CloseBody(res)
26260	if err := googleapi.CheckResponse(res); err != nil {
26261		return nil, err
26262	}
26263	ret := &GoogleLongrunningOperation{
26264		ServerResponse: googleapi.ServerResponse{
26265			Header:         res.Header,
26266			HTTPStatusCode: res.StatusCode,
26267		},
26268	}
26269	target := &ret
26270	if err := gensupport.DecodeResponse(target, res); err != nil {
26271		return nil, err
26272	}
26273	return ret, nil
26274	// {
26275	//   "description": "Deletes the specified document. Operation ",
26276	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
26277	//   "httpMethod": "DELETE",
26278	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.delete",
26279	//   "parameterOrder": [
26280	//     "name"
26281	//   ],
26282	//   "parameters": {
26283	//     "name": {
26284	//       "description": "Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`.",
26285	//       "location": "path",
26286	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
26287	//       "required": true,
26288	//       "type": "string"
26289	//     }
26290	//   },
26291	//   "path": "v2/{+name}",
26292	//   "response": {
26293	//     "$ref": "GoogleLongrunningOperation"
26294	//   },
26295	//   "scopes": [
26296	//     "https://www.googleapis.com/auth/cloud-platform",
26297	//     "https://www.googleapis.com/auth/dialogflow"
26298	//   ]
26299	// }
26300
26301}
26302
26303// method id "dialogflow.projects.agent.knowledgeBases.documents.get":
26304
26305type ProjectsAgentKnowledgeBasesDocumentsGetCall struct {
26306	s            *Service
26307	name         string
26308	urlParams_   gensupport.URLParams
26309	ifNoneMatch_ string
26310	ctx_         context.Context
26311	header_      http.Header
26312}
26313
26314// Get: Retrieves the specified document.
26315//
26316// - name: The name of the document to retrieve. Format
26317//   `projects//locations//knowledgeBases//documents/`.
26318func (r *ProjectsAgentKnowledgeBasesDocumentsService) Get(name string) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
26319	c := &ProjectsAgentKnowledgeBasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26320	c.name = name
26321	return c
26322}
26323
26324// Fields allows partial responses to be retrieved. See
26325// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26326// for more information.
26327func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
26328	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26329	return c
26330}
26331
26332// IfNoneMatch sets the optional parameter which makes the operation
26333// fail if the object's ETag matches the given value. This is useful for
26334// getting updates only after the object has changed since the last
26335// request. Use googleapi.IsNotModified to check whether the response
26336// error from Do is the result of In-None-Match.
26337func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
26338	c.ifNoneMatch_ = entityTag
26339	return c
26340}
26341
26342// Context sets the context to be used in this call's Do method. Any
26343// pending HTTP request will be aborted if the provided context is
26344// canceled.
26345func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
26346	c.ctx_ = ctx
26347	return c
26348}
26349
26350// Header returns an http.Header that can be modified by the caller to
26351// add HTTP headers to the request.
26352func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Header() http.Header {
26353	if c.header_ == nil {
26354		c.header_ = make(http.Header)
26355	}
26356	return c.header_
26357}
26358
26359func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
26360	reqHeaders := make(http.Header)
26361	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
26362	for k, v := range c.header_ {
26363		reqHeaders[k] = v
26364	}
26365	reqHeaders.Set("User-Agent", c.s.userAgent())
26366	if c.ifNoneMatch_ != "" {
26367		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26368	}
26369	var body io.Reader = nil
26370	c.urlParams_.Set("alt", alt)
26371	c.urlParams_.Set("prettyPrint", "false")
26372	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
26373	urls += "?" + c.urlParams_.Encode()
26374	req, err := http.NewRequest("GET", urls, body)
26375	if err != nil {
26376		return nil, err
26377	}
26378	req.Header = reqHeaders
26379	googleapi.Expand(req.URL, map[string]string{
26380		"name": c.name,
26381	})
26382	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26383}
26384
26385// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.get" call.
26386// Exactly one of *GoogleCloudDialogflowV2Document or error will be
26387// non-nil. Any non-2xx status code is an error. Response headers are in
26388// either *GoogleCloudDialogflowV2Document.ServerResponse.Header or (if
26389// a response was returned at all) in error.(*googleapi.Error).Header.
26390// Use googleapi.IsNotModified to check whether the returned error was
26391// because http.StatusNotModified was returned.
26392func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Document, error) {
26393	gensupport.SetOptions(c.urlParams_, opts...)
26394	res, err := c.doRequest("json")
26395	if res != nil && res.StatusCode == http.StatusNotModified {
26396		if res.Body != nil {
26397			res.Body.Close()
26398		}
26399		return nil, &googleapi.Error{
26400			Code:   res.StatusCode,
26401			Header: res.Header,
26402		}
26403	}
26404	if err != nil {
26405		return nil, err
26406	}
26407	defer googleapi.CloseBody(res)
26408	if err := googleapi.CheckResponse(res); err != nil {
26409		return nil, err
26410	}
26411	ret := &GoogleCloudDialogflowV2Document{
26412		ServerResponse: googleapi.ServerResponse{
26413			Header:         res.Header,
26414			HTTPStatusCode: res.StatusCode,
26415		},
26416	}
26417	target := &ret
26418	if err := gensupport.DecodeResponse(target, res); err != nil {
26419		return nil, err
26420	}
26421	return ret, nil
26422	// {
26423	//   "description": "Retrieves the specified document.",
26424	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
26425	//   "httpMethod": "GET",
26426	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.get",
26427	//   "parameterOrder": [
26428	//     "name"
26429	//   ],
26430	//   "parameters": {
26431	//     "name": {
26432	//       "description": "Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`.",
26433	//       "location": "path",
26434	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
26435	//       "required": true,
26436	//       "type": "string"
26437	//     }
26438	//   },
26439	//   "path": "v2/{+name}",
26440	//   "response": {
26441	//     "$ref": "GoogleCloudDialogflowV2Document"
26442	//   },
26443	//   "scopes": [
26444	//     "https://www.googleapis.com/auth/cloud-platform",
26445	//     "https://www.googleapis.com/auth/dialogflow"
26446	//   ]
26447	// }
26448
26449}
26450
26451// method id "dialogflow.projects.agent.knowledgeBases.documents.list":
26452
26453type ProjectsAgentKnowledgeBasesDocumentsListCall struct {
26454	s            *Service
26455	parent       string
26456	urlParams_   gensupport.URLParams
26457	ifNoneMatch_ string
26458	ctx_         context.Context
26459	header_      http.Header
26460}
26461
26462// List: Returns the list of all documents of the knowledge base.
26463//
26464// - parent: The knowledge base to list all documents for. Format:
26465//   `projects//locations//knowledgeBases/`.
26466func (r *ProjectsAgentKnowledgeBasesDocumentsService) List(parent string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
26467	c := &ProjectsAgentKnowledgeBasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26468	c.parent = parent
26469	return c
26470}
26471
26472// PageSize sets the optional parameter "pageSize": The maximum number
26473// of items to return in a single page. By default 10 and at most 100.
26474func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) PageSize(pageSize int64) *ProjectsAgentKnowledgeBasesDocumentsListCall {
26475	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26476	return c
26477}
26478
26479// PageToken sets the optional parameter "pageToken": The
26480// next_page_token value returned from a previous list request.
26481func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) PageToken(pageToken string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
26482	c.urlParams_.Set("pageToken", pageToken)
26483	return c
26484}
26485
26486// Fields allows partial responses to be retrieved. See
26487// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26488// for more information.
26489func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsListCall {
26490	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26491	return c
26492}
26493
26494// IfNoneMatch sets the optional parameter which makes the operation
26495// fail if the object's ETag matches the given value. This is useful for
26496// getting updates only after the object has changed since the last
26497// request. Use googleapi.IsNotModified to check whether the response
26498// error from Do is the result of In-None-Match.
26499func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
26500	c.ifNoneMatch_ = entityTag
26501	return c
26502}
26503
26504// Context sets the context to be used in this call's Do method. Any
26505// pending HTTP request will be aborted if the provided context is
26506// canceled.
26507func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsListCall {
26508	c.ctx_ = ctx
26509	return c
26510}
26511
26512// Header returns an http.Header that can be modified by the caller to
26513// add HTTP headers to the request.
26514func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Header() http.Header {
26515	if c.header_ == nil {
26516		c.header_ = make(http.Header)
26517	}
26518	return c.header_
26519}
26520
26521func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
26522	reqHeaders := make(http.Header)
26523	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
26524	for k, v := range c.header_ {
26525		reqHeaders[k] = v
26526	}
26527	reqHeaders.Set("User-Agent", c.s.userAgent())
26528	if c.ifNoneMatch_ != "" {
26529		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26530	}
26531	var body io.Reader = nil
26532	c.urlParams_.Set("alt", alt)
26533	c.urlParams_.Set("prettyPrint", "false")
26534	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/documents")
26535	urls += "?" + c.urlParams_.Encode()
26536	req, err := http.NewRequest("GET", urls, body)
26537	if err != nil {
26538		return nil, err
26539	}
26540	req.Header = reqHeaders
26541	googleapi.Expand(req.URL, map[string]string{
26542		"parent": c.parent,
26543	})
26544	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26545}
26546
26547// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.list" call.
26548// Exactly one of *GoogleCloudDialogflowV2ListDocumentsResponse or error
26549// will be non-nil. Any non-2xx status code is an error. Response
26550// headers are in either
26551// *GoogleCloudDialogflowV2ListDocumentsResponse.ServerResponse.Header
26552// or (if a response was returned at all) in
26553// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26554// whether the returned error was because http.StatusNotModified was
26555// returned.
26556func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListDocumentsResponse, error) {
26557	gensupport.SetOptions(c.urlParams_, opts...)
26558	res, err := c.doRequest("json")
26559	if res != nil && res.StatusCode == http.StatusNotModified {
26560		if res.Body != nil {
26561			res.Body.Close()
26562		}
26563		return nil, &googleapi.Error{
26564			Code:   res.StatusCode,
26565			Header: res.Header,
26566		}
26567	}
26568	if err != nil {
26569		return nil, err
26570	}
26571	defer googleapi.CloseBody(res)
26572	if err := googleapi.CheckResponse(res); err != nil {
26573		return nil, err
26574	}
26575	ret := &GoogleCloudDialogflowV2ListDocumentsResponse{
26576		ServerResponse: googleapi.ServerResponse{
26577			Header:         res.Header,
26578			HTTPStatusCode: res.StatusCode,
26579		},
26580	}
26581	target := &ret
26582	if err := gensupport.DecodeResponse(target, res); err != nil {
26583		return nil, err
26584	}
26585	return ret, nil
26586	// {
26587	//   "description": "Returns the list of all documents of the knowledge base.",
26588	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents",
26589	//   "httpMethod": "GET",
26590	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.list",
26591	//   "parameterOrder": [
26592	//     "parent"
26593	//   ],
26594	//   "parameters": {
26595	//     "pageSize": {
26596	//       "description": "The maximum number of items to return in a single page. By default 10 and at most 100.",
26597	//       "format": "int32",
26598	//       "location": "query",
26599	//       "type": "integer"
26600	//     },
26601	//     "pageToken": {
26602	//       "description": "The next_page_token value returned from a previous list request.",
26603	//       "location": "query",
26604	//       "type": "string"
26605	//     },
26606	//     "parent": {
26607	//       "description": "Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`.",
26608	//       "location": "path",
26609	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
26610	//       "required": true,
26611	//       "type": "string"
26612	//     }
26613	//   },
26614	//   "path": "v2/{+parent}/documents",
26615	//   "response": {
26616	//     "$ref": "GoogleCloudDialogflowV2ListDocumentsResponse"
26617	//   },
26618	//   "scopes": [
26619	//     "https://www.googleapis.com/auth/cloud-platform",
26620	//     "https://www.googleapis.com/auth/dialogflow"
26621	//   ]
26622	// }
26623
26624}
26625
26626// Pages invokes f for each page of results.
26627// A non-nil error returned from f will halt the iteration.
26628// The provided context supersedes any context provided to the Context method.
26629func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListDocumentsResponse) error) error {
26630	c.ctx_ = ctx
26631	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26632	for {
26633		x, err := c.Do()
26634		if err != nil {
26635			return err
26636		}
26637		if err := f(x); err != nil {
26638			return err
26639		}
26640		if x.NextPageToken == "" {
26641			return nil
26642		}
26643		c.PageToken(x.NextPageToken)
26644	}
26645}
26646
26647// method id "dialogflow.projects.agent.knowledgeBases.documents.patch":
26648
26649type ProjectsAgentKnowledgeBasesDocumentsPatchCall struct {
26650	s                               *Service
26651	name                            string
26652	googleclouddialogflowv2document *GoogleCloudDialogflowV2Document
26653	urlParams_                      gensupport.URLParams
26654	ctx_                            context.Context
26655	header_                         http.Header
26656}
26657
26658// Patch: Updates the specified document. Operation
26659//
26660// - name: Optional. The document resource name. The name must be empty
26661//   when creating a document. Format:
26662//   `projects//locations//knowledgeBases//documents/`.
26663func (r *ProjectsAgentKnowledgeBasesDocumentsService) Patch(name string, googleclouddialogflowv2document *GoogleCloudDialogflowV2Document) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
26664	c := &ProjectsAgentKnowledgeBasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26665	c.name = name
26666	c.googleclouddialogflowv2document = googleclouddialogflowv2document
26667	return c
26668}
26669
26670// UpdateMask sets the optional parameter "updateMask": Not specified
26671// means `update all`. Currently, only `display_name` can be updated, an
26672// InvalidArgument will be returned for attempting to update other
26673// fields.
26674func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
26675	c.urlParams_.Set("updateMask", updateMask)
26676	return c
26677}
26678
26679// Fields allows partial responses to be retrieved. See
26680// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26681// for more information.
26682func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
26683	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26684	return c
26685}
26686
26687// Context sets the context to be used in this call's Do method. Any
26688// pending HTTP request will be aborted if the provided context is
26689// canceled.
26690func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
26691	c.ctx_ = ctx
26692	return c
26693}
26694
26695// Header returns an http.Header that can be modified by the caller to
26696// add HTTP headers to the request.
26697func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Header() http.Header {
26698	if c.header_ == nil {
26699		c.header_ = make(http.Header)
26700	}
26701	return c.header_
26702}
26703
26704func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
26705	reqHeaders := make(http.Header)
26706	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
26707	for k, v := range c.header_ {
26708		reqHeaders[k] = v
26709	}
26710	reqHeaders.Set("User-Agent", c.s.userAgent())
26711	var body io.Reader = nil
26712	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2document)
26713	if err != nil {
26714		return nil, err
26715	}
26716	reqHeaders.Set("Content-Type", "application/json")
26717	c.urlParams_.Set("alt", alt)
26718	c.urlParams_.Set("prettyPrint", "false")
26719	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
26720	urls += "?" + c.urlParams_.Encode()
26721	req, err := http.NewRequest("PATCH", urls, body)
26722	if err != nil {
26723		return nil, err
26724	}
26725	req.Header = reqHeaders
26726	googleapi.Expand(req.URL, map[string]string{
26727		"name": c.name,
26728	})
26729	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26730}
26731
26732// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.patch" call.
26733// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
26734// Any non-2xx status code is an error. Response headers are in either
26735// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
26736// was returned at all) in error.(*googleapi.Error).Header. Use
26737// googleapi.IsNotModified to check whether the returned error was
26738// because http.StatusNotModified was returned.
26739func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
26740	gensupport.SetOptions(c.urlParams_, opts...)
26741	res, err := c.doRequest("json")
26742	if res != nil && res.StatusCode == http.StatusNotModified {
26743		if res.Body != nil {
26744			res.Body.Close()
26745		}
26746		return nil, &googleapi.Error{
26747			Code:   res.StatusCode,
26748			Header: res.Header,
26749		}
26750	}
26751	if err != nil {
26752		return nil, err
26753	}
26754	defer googleapi.CloseBody(res)
26755	if err := googleapi.CheckResponse(res); err != nil {
26756		return nil, err
26757	}
26758	ret := &GoogleLongrunningOperation{
26759		ServerResponse: googleapi.ServerResponse{
26760			Header:         res.Header,
26761			HTTPStatusCode: res.StatusCode,
26762		},
26763	}
26764	target := &ret
26765	if err := gensupport.DecodeResponse(target, res); err != nil {
26766		return nil, err
26767	}
26768	return ret, nil
26769	// {
26770	//   "description": "Updates the specified document. Operation ",
26771	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
26772	//   "httpMethod": "PATCH",
26773	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.patch",
26774	//   "parameterOrder": [
26775	//     "name"
26776	//   ],
26777	//   "parameters": {
26778	//     "name": {
26779	//       "description": "Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`.",
26780	//       "location": "path",
26781	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
26782	//       "required": true,
26783	//       "type": "string"
26784	//     },
26785	//     "updateMask": {
26786	//       "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.",
26787	//       "format": "google-fieldmask",
26788	//       "location": "query",
26789	//       "type": "string"
26790	//     }
26791	//   },
26792	//   "path": "v2/{+name}",
26793	//   "request": {
26794	//     "$ref": "GoogleCloudDialogflowV2Document"
26795	//   },
26796	//   "response": {
26797	//     "$ref": "GoogleLongrunningOperation"
26798	//   },
26799	//   "scopes": [
26800	//     "https://www.googleapis.com/auth/cloud-platform",
26801	//     "https://www.googleapis.com/auth/dialogflow"
26802	//   ]
26803	// }
26804
26805}
26806
26807// method id "dialogflow.projects.agent.knowledgeBases.documents.reload":
26808
26809type ProjectsAgentKnowledgeBasesDocumentsReloadCall struct {
26810	s                                            *Service
26811	name                                         string
26812	googleclouddialogflowv2reloaddocumentrequest *GoogleCloudDialogflowV2ReloadDocumentRequest
26813	urlParams_                                   gensupport.URLParams
26814	ctx_                                         context.Context
26815	header_                                      http.Header
26816}
26817
26818// Reload: Reloads the specified document from its specified source,
26819// content_uri or content. The previously loaded content of the document
26820// will be deleted. Note: Even when the content of the document has not
26821// changed, there still may be side effects because of internal
26822// implementation changes. Note: The
26823// `projects.agent.knowledgeBases.documents` resource is deprecated;
26824// only use `projects.knowledgeBases.documents`. Operation
26825//
26826// - name: The name of the document to reload. Format:
26827//   `projects//locations//knowledgeBases//documents/`.
26828func (r *ProjectsAgentKnowledgeBasesDocumentsService) Reload(name string, googleclouddialogflowv2reloaddocumentrequest *GoogleCloudDialogflowV2ReloadDocumentRequest) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
26829	c := &ProjectsAgentKnowledgeBasesDocumentsReloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26830	c.name = name
26831	c.googleclouddialogflowv2reloaddocumentrequest = googleclouddialogflowv2reloaddocumentrequest
26832	return c
26833}
26834
26835// Fields allows partial responses to be retrieved. See
26836// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26837// for more information.
26838func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
26839	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26840	return c
26841}
26842
26843// Context sets the context to be used in this call's Do method. Any
26844// pending HTTP request will be aborted if the provided context is
26845// canceled.
26846func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
26847	c.ctx_ = ctx
26848	return c
26849}
26850
26851// Header returns an http.Header that can be modified by the caller to
26852// add HTTP headers to the request.
26853func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Header() http.Header {
26854	if c.header_ == nil {
26855		c.header_ = make(http.Header)
26856	}
26857	return c.header_
26858}
26859
26860func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) doRequest(alt string) (*http.Response, error) {
26861	reqHeaders := make(http.Header)
26862	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
26863	for k, v := range c.header_ {
26864		reqHeaders[k] = v
26865	}
26866	reqHeaders.Set("User-Agent", c.s.userAgent())
26867	var body io.Reader = nil
26868	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2reloaddocumentrequest)
26869	if err != nil {
26870		return nil, err
26871	}
26872	reqHeaders.Set("Content-Type", "application/json")
26873	c.urlParams_.Set("alt", alt)
26874	c.urlParams_.Set("prettyPrint", "false")
26875	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:reload")
26876	urls += "?" + c.urlParams_.Encode()
26877	req, err := http.NewRequest("POST", urls, body)
26878	if err != nil {
26879		return nil, err
26880	}
26881	req.Header = reqHeaders
26882	googleapi.Expand(req.URL, map[string]string{
26883		"name": c.name,
26884	})
26885	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26886}
26887
26888// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.reload" call.
26889// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
26890// Any non-2xx status code is an error. Response headers are in either
26891// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
26892// was returned at all) in error.(*googleapi.Error).Header. Use
26893// googleapi.IsNotModified to check whether the returned error was
26894// because http.StatusNotModified was returned.
26895func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
26896	gensupport.SetOptions(c.urlParams_, opts...)
26897	res, err := c.doRequest("json")
26898	if res != nil && res.StatusCode == http.StatusNotModified {
26899		if res.Body != nil {
26900			res.Body.Close()
26901		}
26902		return nil, &googleapi.Error{
26903			Code:   res.StatusCode,
26904			Header: res.Header,
26905		}
26906	}
26907	if err != nil {
26908		return nil, err
26909	}
26910	defer googleapi.CloseBody(res)
26911	if err := googleapi.CheckResponse(res); err != nil {
26912		return nil, err
26913	}
26914	ret := &GoogleLongrunningOperation{
26915		ServerResponse: googleapi.ServerResponse{
26916			Header:         res.Header,
26917			HTTPStatusCode: res.StatusCode,
26918		},
26919	}
26920	target := &ret
26921	if err := gensupport.DecodeResponse(target, res); err != nil {
26922		return nil, err
26923	}
26924	return ret, nil
26925	// {
26926	//   "description": "Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. Operation ",
26927	//   "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload",
26928	//   "httpMethod": "POST",
26929	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.reload",
26930	//   "parameterOrder": [
26931	//     "name"
26932	//   ],
26933	//   "parameters": {
26934	//     "name": {
26935	//       "description": "Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/`",
26936	//       "location": "path",
26937	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
26938	//       "required": true,
26939	//       "type": "string"
26940	//     }
26941	//   },
26942	//   "path": "v2/{+name}:reload",
26943	//   "request": {
26944	//     "$ref": "GoogleCloudDialogflowV2ReloadDocumentRequest"
26945	//   },
26946	//   "response": {
26947	//     "$ref": "GoogleLongrunningOperation"
26948	//   },
26949	//   "scopes": [
26950	//     "https://www.googleapis.com/auth/cloud-platform",
26951	//     "https://www.googleapis.com/auth/dialogflow"
26952	//   ]
26953	// }
26954
26955}
26956
26957// method id "dialogflow.projects.agent.sessions.deleteContexts":
26958
26959type ProjectsAgentSessionsDeleteContextsCall struct {
26960	s          *Service
26961	parent     string
26962	urlParams_ gensupport.URLParams
26963	ctx_       context.Context
26964	header_    http.Header
26965}
26966
26967// DeleteContexts: Deletes all active contexts in the specified session.
26968//
26969// - parent: The name of the session to delete all contexts from.
26970//   Format: `projects//agent/sessions/` or
26971//   `projects//agent/environments//users//sessions/`. If `Environment
26972//   ID` is not specified we assume default 'draft' environment. If
26973//   `User ID` is not specified, we assume default '-' user.
26974func (r *ProjectsAgentSessionsService) DeleteContexts(parent string) *ProjectsAgentSessionsDeleteContextsCall {
26975	c := &ProjectsAgentSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26976	c.parent = parent
26977	return c
26978}
26979
26980// Fields allows partial responses to be retrieved. See
26981// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26982// for more information.
26983func (c *ProjectsAgentSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDeleteContextsCall {
26984	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26985	return c
26986}
26987
26988// Context sets the context to be used in this call's Do method. Any
26989// pending HTTP request will be aborted if the provided context is
26990// canceled.
26991func (c *ProjectsAgentSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentSessionsDeleteContextsCall {
26992	c.ctx_ = ctx
26993	return c
26994}
26995
26996// Header returns an http.Header that can be modified by the caller to
26997// add HTTP headers to the request.
26998func (c *ProjectsAgentSessionsDeleteContextsCall) Header() http.Header {
26999	if c.header_ == nil {
27000		c.header_ = make(http.Header)
27001	}
27002	return c.header_
27003}
27004
27005func (c *ProjectsAgentSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
27006	reqHeaders := make(http.Header)
27007	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
27008	for k, v := range c.header_ {
27009		reqHeaders[k] = v
27010	}
27011	reqHeaders.Set("User-Agent", c.s.userAgent())
27012	var body io.Reader = nil
27013	c.urlParams_.Set("alt", alt)
27014	c.urlParams_.Set("prettyPrint", "false")
27015	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
27016	urls += "?" + c.urlParams_.Encode()
27017	req, err := http.NewRequest("DELETE", urls, body)
27018	if err != nil {
27019		return nil, err
27020	}
27021	req.Header = reqHeaders
27022	googleapi.Expand(req.URL, map[string]string{
27023		"parent": c.parent,
27024	})
27025	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27026}
27027
27028// Do executes the "dialogflow.projects.agent.sessions.deleteContexts" call.
27029// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
27030// non-2xx status code is an error. Response headers are in either
27031// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
27032// returned at all) in error.(*googleapi.Error).Header. Use
27033// googleapi.IsNotModified to check whether the returned error was
27034// because http.StatusNotModified was returned.
27035func (c *ProjectsAgentSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
27036	gensupport.SetOptions(c.urlParams_, opts...)
27037	res, err := c.doRequest("json")
27038	if res != nil && res.StatusCode == http.StatusNotModified {
27039		if res.Body != nil {
27040			res.Body.Close()
27041		}
27042		return nil, &googleapi.Error{
27043			Code:   res.StatusCode,
27044			Header: res.Header,
27045		}
27046	}
27047	if err != nil {
27048		return nil, err
27049	}
27050	defer googleapi.CloseBody(res)
27051	if err := googleapi.CheckResponse(res); err != nil {
27052		return nil, err
27053	}
27054	ret := &GoogleProtobufEmpty{
27055		ServerResponse: googleapi.ServerResponse{
27056			Header:         res.Header,
27057			HTTPStatusCode: res.StatusCode,
27058		},
27059	}
27060	target := &ret
27061	if err := gensupport.DecodeResponse(target, res); err != nil {
27062		return nil, err
27063	}
27064	return ret, nil
27065	// {
27066	//   "description": "Deletes all active contexts in the specified session.",
27067	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
27068	//   "httpMethod": "DELETE",
27069	//   "id": "dialogflow.projects.agent.sessions.deleteContexts",
27070	//   "parameterOrder": [
27071	//     "parent"
27072	//   ],
27073	//   "parameters": {
27074	//     "parent": {
27075	//       "description": "Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
27076	//       "location": "path",
27077	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
27078	//       "required": true,
27079	//       "type": "string"
27080	//     }
27081	//   },
27082	//   "path": "v2/{+parent}/contexts",
27083	//   "response": {
27084	//     "$ref": "GoogleProtobufEmpty"
27085	//   },
27086	//   "scopes": [
27087	//     "https://www.googleapis.com/auth/cloud-platform",
27088	//     "https://www.googleapis.com/auth/dialogflow"
27089	//   ]
27090	// }
27091
27092}
27093
27094// method id "dialogflow.projects.agent.sessions.detectIntent":
27095
27096type ProjectsAgentSessionsDetectIntentCall struct {
27097	s                                          *Service
27098	sessionid                                  string
27099	googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest
27100	urlParams_                                 gensupport.URLParams
27101	ctx_                                       context.Context
27102	header_                                    http.Header
27103}
27104
27105// DetectIntent: Processes a natural language query and returns
27106// structured, actionable data as a result. This method is not
27107// idempotent, because it may cause contexts and session entity types to
27108// be updated, which in turn might affect results of future queries.
27109// Note: Always use agent versions for production traffic. See Versions
27110// and environments
27111// (https://cloud.google.com/dialogflow/es/docs/agents-versions).
27112//
27113// - session: The name of the session this query is sent to. Format:
27114//   `projects//agent/sessions/`, or
27115//   `projects//agent/environments//users//sessions/`. If `Environment
27116//   ID` is not specified, we assume default 'draft' environment
27117//   (`Environment ID` might be referred to as environment name at some
27118//   places). If `User ID` is not specified, we are using "-". It's up
27119//   to the API caller to choose an appropriate `Session ID` and `User
27120//   Id`. They can be a random number or some type of user and session
27121//   identifiers (preferably hashed). The length of the `Session ID` and
27122//   `User ID` must not exceed 36 characters. For more information, see
27123//   the API interactions guide
27124//   (https://cloud.google.com/dialogflow/docs/api-overview). Note:
27125//   Always use agent versions for production traffic. See Versions and
27126//   environments
27127//   (https://cloud.google.com/dialogflow/es/docs/agents-versions).
27128func (r *ProjectsAgentSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest) *ProjectsAgentSessionsDetectIntentCall {
27129	c := &ProjectsAgentSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27130	c.sessionid = sessionid
27131	c.googleclouddialogflowv2detectintentrequest = googleclouddialogflowv2detectintentrequest
27132	return c
27133}
27134
27135// Fields allows partial responses to be retrieved. See
27136// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27137// for more information.
27138func (c *ProjectsAgentSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDetectIntentCall {
27139	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27140	return c
27141}
27142
27143// Context sets the context to be used in this call's Do method. Any
27144// pending HTTP request will be aborted if the provided context is
27145// canceled.
27146func (c *ProjectsAgentSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentSessionsDetectIntentCall {
27147	c.ctx_ = ctx
27148	return c
27149}
27150
27151// Header returns an http.Header that can be modified by the caller to
27152// add HTTP headers to the request.
27153func (c *ProjectsAgentSessionsDetectIntentCall) Header() http.Header {
27154	if c.header_ == nil {
27155		c.header_ = make(http.Header)
27156	}
27157	return c.header_
27158}
27159
27160func (c *ProjectsAgentSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
27161	reqHeaders := make(http.Header)
27162	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
27163	for k, v := range c.header_ {
27164		reqHeaders[k] = v
27165	}
27166	reqHeaders.Set("User-Agent", c.s.userAgent())
27167	var body io.Reader = nil
27168	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2detectintentrequest)
27169	if err != nil {
27170		return nil, err
27171	}
27172	reqHeaders.Set("Content-Type", "application/json")
27173	c.urlParams_.Set("alt", alt)
27174	c.urlParams_.Set("prettyPrint", "false")
27175	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+session}:detectIntent")
27176	urls += "?" + c.urlParams_.Encode()
27177	req, err := http.NewRequest("POST", urls, body)
27178	if err != nil {
27179		return nil, err
27180	}
27181	req.Header = reqHeaders
27182	googleapi.Expand(req.URL, map[string]string{
27183		"session": c.sessionid,
27184	})
27185	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27186}
27187
27188// Do executes the "dialogflow.projects.agent.sessions.detectIntent" call.
27189// Exactly one of *GoogleCloudDialogflowV2DetectIntentResponse or error
27190// will be non-nil. Any non-2xx status code is an error. Response
27191// headers are in either
27192// *GoogleCloudDialogflowV2DetectIntentResponse.ServerResponse.Header or
27193// (if a response was returned at all) in
27194// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27195// whether the returned error was because http.StatusNotModified was
27196// returned.
27197func (c *ProjectsAgentSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2DetectIntentResponse, error) {
27198	gensupport.SetOptions(c.urlParams_, opts...)
27199	res, err := c.doRequest("json")
27200	if res != nil && res.StatusCode == http.StatusNotModified {
27201		if res.Body != nil {
27202			res.Body.Close()
27203		}
27204		return nil, &googleapi.Error{
27205			Code:   res.StatusCode,
27206			Header: res.Header,
27207		}
27208	}
27209	if err != nil {
27210		return nil, err
27211	}
27212	defer googleapi.CloseBody(res)
27213	if err := googleapi.CheckResponse(res); err != nil {
27214		return nil, err
27215	}
27216	ret := &GoogleCloudDialogflowV2DetectIntentResponse{
27217		ServerResponse: googleapi.ServerResponse{
27218			Header:         res.Header,
27219			HTTPStatusCode: res.StatusCode,
27220		},
27221	}
27222	target := &ret
27223	if err := gensupport.DecodeResponse(target, res); err != nil {
27224		return nil, err
27225	}
27226	return ret, nil
27227	// {
27228	//   "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).",
27229	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}:detectIntent",
27230	//   "httpMethod": "POST",
27231	//   "id": "dialogflow.projects.agent.sessions.detectIntent",
27232	//   "parameterOrder": [
27233	//     "session"
27234	//   ],
27235	//   "parameters": {
27236	//     "session": {
27237	//       "description": "Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).",
27238	//       "location": "path",
27239	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
27240	//       "required": true,
27241	//       "type": "string"
27242	//     }
27243	//   },
27244	//   "path": "v2/{+session}:detectIntent",
27245	//   "request": {
27246	//     "$ref": "GoogleCloudDialogflowV2DetectIntentRequest"
27247	//   },
27248	//   "response": {
27249	//     "$ref": "GoogleCloudDialogflowV2DetectIntentResponse"
27250	//   },
27251	//   "scopes": [
27252	//     "https://www.googleapis.com/auth/cloud-platform",
27253	//     "https://www.googleapis.com/auth/dialogflow"
27254	//   ]
27255	// }
27256
27257}
27258
27259// method id "dialogflow.projects.agent.sessions.contexts.create":
27260
27261type ProjectsAgentSessionsContextsCreateCall struct {
27262	s                              *Service
27263	parent                         string
27264	googleclouddialogflowv2context *GoogleCloudDialogflowV2Context
27265	urlParams_                     gensupport.URLParams
27266	ctx_                           context.Context
27267	header_                        http.Header
27268}
27269
27270// Create: Creates a context. If the specified context already exists,
27271// overrides the context.
27272//
27273// - parent: The session to create a context for. Format:
27274//   `projects//agent/sessions/` or
27275//   `projects//agent/environments//users//sessions/`. If `Environment
27276//   ID` is not specified, we assume default 'draft' environment. If
27277//   `User ID` is not specified, we assume default '-' user.
27278func (r *ProjectsAgentSessionsContextsService) Create(parent string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsAgentSessionsContextsCreateCall {
27279	c := &ProjectsAgentSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27280	c.parent = parent
27281	c.googleclouddialogflowv2context = googleclouddialogflowv2context
27282	return c
27283}
27284
27285// Fields allows partial responses to be retrieved. See
27286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27287// for more information.
27288func (c *ProjectsAgentSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsCreateCall {
27289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27290	return c
27291}
27292
27293// Context sets the context to be used in this call's Do method. Any
27294// pending HTTP request will be aborted if the provided context is
27295// canceled.
27296func (c *ProjectsAgentSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsCreateCall {
27297	c.ctx_ = ctx
27298	return c
27299}
27300
27301// Header returns an http.Header that can be modified by the caller to
27302// add HTTP headers to the request.
27303func (c *ProjectsAgentSessionsContextsCreateCall) Header() http.Header {
27304	if c.header_ == nil {
27305		c.header_ = make(http.Header)
27306	}
27307	return c.header_
27308}
27309
27310func (c *ProjectsAgentSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
27311	reqHeaders := make(http.Header)
27312	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
27313	for k, v := range c.header_ {
27314		reqHeaders[k] = v
27315	}
27316	reqHeaders.Set("User-Agent", c.s.userAgent())
27317	var body io.Reader = nil
27318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context)
27319	if err != nil {
27320		return nil, err
27321	}
27322	reqHeaders.Set("Content-Type", "application/json")
27323	c.urlParams_.Set("alt", alt)
27324	c.urlParams_.Set("prettyPrint", "false")
27325	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
27326	urls += "?" + c.urlParams_.Encode()
27327	req, err := http.NewRequest("POST", urls, body)
27328	if err != nil {
27329		return nil, err
27330	}
27331	req.Header = reqHeaders
27332	googleapi.Expand(req.URL, map[string]string{
27333		"parent": c.parent,
27334	})
27335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27336}
27337
27338// Do executes the "dialogflow.projects.agent.sessions.contexts.create" call.
27339// Exactly one of *GoogleCloudDialogflowV2Context or error will be
27340// non-nil. Any non-2xx status code is an error. Response headers are in
27341// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
27342// response was returned at all) in error.(*googleapi.Error).Header. Use
27343// googleapi.IsNotModified to check whether the returned error was
27344// because http.StatusNotModified was returned.
27345func (c *ProjectsAgentSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
27346	gensupport.SetOptions(c.urlParams_, opts...)
27347	res, err := c.doRequest("json")
27348	if res != nil && res.StatusCode == http.StatusNotModified {
27349		if res.Body != nil {
27350			res.Body.Close()
27351		}
27352		return nil, &googleapi.Error{
27353			Code:   res.StatusCode,
27354			Header: res.Header,
27355		}
27356	}
27357	if err != nil {
27358		return nil, err
27359	}
27360	defer googleapi.CloseBody(res)
27361	if err := googleapi.CheckResponse(res); err != nil {
27362		return nil, err
27363	}
27364	ret := &GoogleCloudDialogflowV2Context{
27365		ServerResponse: googleapi.ServerResponse{
27366			Header:         res.Header,
27367			HTTPStatusCode: res.StatusCode,
27368		},
27369	}
27370	target := &ret
27371	if err := gensupport.DecodeResponse(target, res); err != nil {
27372		return nil, err
27373	}
27374	return ret, nil
27375	// {
27376	//   "description": "Creates a context. If the specified context already exists, overrides the context.",
27377	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
27378	//   "httpMethod": "POST",
27379	//   "id": "dialogflow.projects.agent.sessions.contexts.create",
27380	//   "parameterOrder": [
27381	//     "parent"
27382	//   ],
27383	//   "parameters": {
27384	//     "parent": {
27385	//       "description": "Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
27386	//       "location": "path",
27387	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
27388	//       "required": true,
27389	//       "type": "string"
27390	//     }
27391	//   },
27392	//   "path": "v2/{+parent}/contexts",
27393	//   "request": {
27394	//     "$ref": "GoogleCloudDialogflowV2Context"
27395	//   },
27396	//   "response": {
27397	//     "$ref": "GoogleCloudDialogflowV2Context"
27398	//   },
27399	//   "scopes": [
27400	//     "https://www.googleapis.com/auth/cloud-platform",
27401	//     "https://www.googleapis.com/auth/dialogflow"
27402	//   ]
27403	// }
27404
27405}
27406
27407// method id "dialogflow.projects.agent.sessions.contexts.delete":
27408
27409type ProjectsAgentSessionsContextsDeleteCall struct {
27410	s          *Service
27411	name       string
27412	urlParams_ gensupport.URLParams
27413	ctx_       context.Context
27414	header_    http.Header
27415}
27416
27417// Delete: Deletes the specified context.
27418//
27419// - name: The name of the context to delete. Format:
27420//   `projects//agent/sessions//contexts/` or
27421//   `projects//agent/environments//users//sessions//contexts/`. If
27422//   `Environment ID` is not specified, we assume default 'draft'
27423//   environment. If `User ID` is not specified, we assume default '-'
27424//   user.
27425func (r *ProjectsAgentSessionsContextsService) Delete(name string) *ProjectsAgentSessionsContextsDeleteCall {
27426	c := &ProjectsAgentSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27427	c.name = name
27428	return c
27429}
27430
27431// Fields allows partial responses to be retrieved. See
27432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27433// for more information.
27434func (c *ProjectsAgentSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsDeleteCall {
27435	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27436	return c
27437}
27438
27439// Context sets the context to be used in this call's Do method. Any
27440// pending HTTP request will be aborted if the provided context is
27441// canceled.
27442func (c *ProjectsAgentSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsDeleteCall {
27443	c.ctx_ = ctx
27444	return c
27445}
27446
27447// Header returns an http.Header that can be modified by the caller to
27448// add HTTP headers to the request.
27449func (c *ProjectsAgentSessionsContextsDeleteCall) Header() http.Header {
27450	if c.header_ == nil {
27451		c.header_ = make(http.Header)
27452	}
27453	return c.header_
27454}
27455
27456func (c *ProjectsAgentSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
27457	reqHeaders := make(http.Header)
27458	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
27459	for k, v := range c.header_ {
27460		reqHeaders[k] = v
27461	}
27462	reqHeaders.Set("User-Agent", c.s.userAgent())
27463	var body io.Reader = nil
27464	c.urlParams_.Set("alt", alt)
27465	c.urlParams_.Set("prettyPrint", "false")
27466	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
27467	urls += "?" + c.urlParams_.Encode()
27468	req, err := http.NewRequest("DELETE", urls, body)
27469	if err != nil {
27470		return nil, err
27471	}
27472	req.Header = reqHeaders
27473	googleapi.Expand(req.URL, map[string]string{
27474		"name": c.name,
27475	})
27476	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27477}
27478
27479// Do executes the "dialogflow.projects.agent.sessions.contexts.delete" call.
27480// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
27481// non-2xx status code is an error. Response headers are in either
27482// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
27483// returned at all) in error.(*googleapi.Error).Header. Use
27484// googleapi.IsNotModified to check whether the returned error was
27485// because http.StatusNotModified was returned.
27486func (c *ProjectsAgentSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
27487	gensupport.SetOptions(c.urlParams_, opts...)
27488	res, err := c.doRequest("json")
27489	if res != nil && res.StatusCode == http.StatusNotModified {
27490		if res.Body != nil {
27491			res.Body.Close()
27492		}
27493		return nil, &googleapi.Error{
27494			Code:   res.StatusCode,
27495			Header: res.Header,
27496		}
27497	}
27498	if err != nil {
27499		return nil, err
27500	}
27501	defer googleapi.CloseBody(res)
27502	if err := googleapi.CheckResponse(res); err != nil {
27503		return nil, err
27504	}
27505	ret := &GoogleProtobufEmpty{
27506		ServerResponse: googleapi.ServerResponse{
27507			Header:         res.Header,
27508			HTTPStatusCode: res.StatusCode,
27509		},
27510	}
27511	target := &ret
27512	if err := gensupport.DecodeResponse(target, res); err != nil {
27513		return nil, err
27514	}
27515	return ret, nil
27516	// {
27517	//   "description": "Deletes the specified context.",
27518	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
27519	//   "httpMethod": "DELETE",
27520	//   "id": "dialogflow.projects.agent.sessions.contexts.delete",
27521	//   "parameterOrder": [
27522	//     "name"
27523	//   ],
27524	//   "parameters": {
27525	//     "name": {
27526	//       "description": "Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
27527	//       "location": "path",
27528	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
27529	//       "required": true,
27530	//       "type": "string"
27531	//     }
27532	//   },
27533	//   "path": "v2/{+name}",
27534	//   "response": {
27535	//     "$ref": "GoogleProtobufEmpty"
27536	//   },
27537	//   "scopes": [
27538	//     "https://www.googleapis.com/auth/cloud-platform",
27539	//     "https://www.googleapis.com/auth/dialogflow"
27540	//   ]
27541	// }
27542
27543}
27544
27545// method id "dialogflow.projects.agent.sessions.contexts.get":
27546
27547type ProjectsAgentSessionsContextsGetCall struct {
27548	s            *Service
27549	name         string
27550	urlParams_   gensupport.URLParams
27551	ifNoneMatch_ string
27552	ctx_         context.Context
27553	header_      http.Header
27554}
27555
27556// Get: Retrieves the specified context.
27557//
27558// - name: The name of the context. Format:
27559//   `projects//agent/sessions//contexts/` or
27560//   `projects//agent/environments//users//sessions//contexts/`. If
27561//   `Environment ID` is not specified, we assume default 'draft'
27562//   environment. If `User ID` is not specified, we assume default '-'
27563//   user.
27564func (r *ProjectsAgentSessionsContextsService) Get(name string) *ProjectsAgentSessionsContextsGetCall {
27565	c := &ProjectsAgentSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27566	c.name = name
27567	return c
27568}
27569
27570// Fields allows partial responses to be retrieved. See
27571// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27572// for more information.
27573func (c *ProjectsAgentSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsGetCall {
27574	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27575	return c
27576}
27577
27578// IfNoneMatch sets the optional parameter which makes the operation
27579// fail if the object's ETag matches the given value. This is useful for
27580// getting updates only after the object has changed since the last
27581// request. Use googleapi.IsNotModified to check whether the response
27582// error from Do is the result of In-None-Match.
27583func (c *ProjectsAgentSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsGetCall {
27584	c.ifNoneMatch_ = entityTag
27585	return c
27586}
27587
27588// Context sets the context to be used in this call's Do method. Any
27589// pending HTTP request will be aborted if the provided context is
27590// canceled.
27591func (c *ProjectsAgentSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsGetCall {
27592	c.ctx_ = ctx
27593	return c
27594}
27595
27596// Header returns an http.Header that can be modified by the caller to
27597// add HTTP headers to the request.
27598func (c *ProjectsAgentSessionsContextsGetCall) Header() http.Header {
27599	if c.header_ == nil {
27600		c.header_ = make(http.Header)
27601	}
27602	return c.header_
27603}
27604
27605func (c *ProjectsAgentSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
27606	reqHeaders := make(http.Header)
27607	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
27608	for k, v := range c.header_ {
27609		reqHeaders[k] = v
27610	}
27611	reqHeaders.Set("User-Agent", c.s.userAgent())
27612	if c.ifNoneMatch_ != "" {
27613		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27614	}
27615	var body io.Reader = nil
27616	c.urlParams_.Set("alt", alt)
27617	c.urlParams_.Set("prettyPrint", "false")
27618	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
27619	urls += "?" + c.urlParams_.Encode()
27620	req, err := http.NewRequest("GET", urls, body)
27621	if err != nil {
27622		return nil, err
27623	}
27624	req.Header = reqHeaders
27625	googleapi.Expand(req.URL, map[string]string{
27626		"name": c.name,
27627	})
27628	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27629}
27630
27631// Do executes the "dialogflow.projects.agent.sessions.contexts.get" call.
27632// Exactly one of *GoogleCloudDialogflowV2Context or error will be
27633// non-nil. Any non-2xx status code is an error. Response headers are in
27634// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
27635// response was returned at all) in error.(*googleapi.Error).Header. Use
27636// googleapi.IsNotModified to check whether the returned error was
27637// because http.StatusNotModified was returned.
27638func (c *ProjectsAgentSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
27639	gensupport.SetOptions(c.urlParams_, opts...)
27640	res, err := c.doRequest("json")
27641	if res != nil && res.StatusCode == http.StatusNotModified {
27642		if res.Body != nil {
27643			res.Body.Close()
27644		}
27645		return nil, &googleapi.Error{
27646			Code:   res.StatusCode,
27647			Header: res.Header,
27648		}
27649	}
27650	if err != nil {
27651		return nil, err
27652	}
27653	defer googleapi.CloseBody(res)
27654	if err := googleapi.CheckResponse(res); err != nil {
27655		return nil, err
27656	}
27657	ret := &GoogleCloudDialogflowV2Context{
27658		ServerResponse: googleapi.ServerResponse{
27659			Header:         res.Header,
27660			HTTPStatusCode: res.StatusCode,
27661		},
27662	}
27663	target := &ret
27664	if err := gensupport.DecodeResponse(target, res); err != nil {
27665		return nil, err
27666	}
27667	return ret, nil
27668	// {
27669	//   "description": "Retrieves the specified context.",
27670	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
27671	//   "httpMethod": "GET",
27672	//   "id": "dialogflow.projects.agent.sessions.contexts.get",
27673	//   "parameterOrder": [
27674	//     "name"
27675	//   ],
27676	//   "parameters": {
27677	//     "name": {
27678	//       "description": "Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
27679	//       "location": "path",
27680	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
27681	//       "required": true,
27682	//       "type": "string"
27683	//     }
27684	//   },
27685	//   "path": "v2/{+name}",
27686	//   "response": {
27687	//     "$ref": "GoogleCloudDialogflowV2Context"
27688	//   },
27689	//   "scopes": [
27690	//     "https://www.googleapis.com/auth/cloud-platform",
27691	//     "https://www.googleapis.com/auth/dialogflow"
27692	//   ]
27693	// }
27694
27695}
27696
27697// method id "dialogflow.projects.agent.sessions.contexts.list":
27698
27699type ProjectsAgentSessionsContextsListCall struct {
27700	s            *Service
27701	parent       string
27702	urlParams_   gensupport.URLParams
27703	ifNoneMatch_ string
27704	ctx_         context.Context
27705	header_      http.Header
27706}
27707
27708// List: Returns the list of all contexts in the specified session.
27709//
27710// - parent: The session to list all contexts from. Format:
27711//   `projects//agent/sessions/` or
27712//   `projects//agent/environments//users//sessions/`. If `Environment
27713//   ID` is not specified, we assume default 'draft' environment. If
27714//   `User ID` is not specified, we assume default '-' user.
27715func (r *ProjectsAgentSessionsContextsService) List(parent string) *ProjectsAgentSessionsContextsListCall {
27716	c := &ProjectsAgentSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27717	c.parent = parent
27718	return c
27719}
27720
27721// PageSize sets the optional parameter "pageSize": The maximum number
27722// of items to return in a single page. By default 100 and at most 1000.
27723func (c *ProjectsAgentSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentSessionsContextsListCall {
27724	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27725	return c
27726}
27727
27728// PageToken sets the optional parameter "pageToken": The
27729// next_page_token value returned from a previous list request.
27730func (c *ProjectsAgentSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentSessionsContextsListCall {
27731	c.urlParams_.Set("pageToken", pageToken)
27732	return c
27733}
27734
27735// Fields allows partial responses to be retrieved. See
27736// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27737// for more information.
27738func (c *ProjectsAgentSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsListCall {
27739	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27740	return c
27741}
27742
27743// IfNoneMatch sets the optional parameter which makes the operation
27744// fail if the object's ETag matches the given value. This is useful for
27745// getting updates only after the object has changed since the last
27746// request. Use googleapi.IsNotModified to check whether the response
27747// error from Do is the result of In-None-Match.
27748func (c *ProjectsAgentSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsListCall {
27749	c.ifNoneMatch_ = entityTag
27750	return c
27751}
27752
27753// Context sets the context to be used in this call's Do method. Any
27754// pending HTTP request will be aborted if the provided context is
27755// canceled.
27756func (c *ProjectsAgentSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsListCall {
27757	c.ctx_ = ctx
27758	return c
27759}
27760
27761// Header returns an http.Header that can be modified by the caller to
27762// add HTTP headers to the request.
27763func (c *ProjectsAgentSessionsContextsListCall) Header() http.Header {
27764	if c.header_ == nil {
27765		c.header_ = make(http.Header)
27766	}
27767	return c.header_
27768}
27769
27770func (c *ProjectsAgentSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
27771	reqHeaders := make(http.Header)
27772	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
27773	for k, v := range c.header_ {
27774		reqHeaders[k] = v
27775	}
27776	reqHeaders.Set("User-Agent", c.s.userAgent())
27777	if c.ifNoneMatch_ != "" {
27778		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27779	}
27780	var body io.Reader = nil
27781	c.urlParams_.Set("alt", alt)
27782	c.urlParams_.Set("prettyPrint", "false")
27783	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
27784	urls += "?" + c.urlParams_.Encode()
27785	req, err := http.NewRequest("GET", urls, body)
27786	if err != nil {
27787		return nil, err
27788	}
27789	req.Header = reqHeaders
27790	googleapi.Expand(req.URL, map[string]string{
27791		"parent": c.parent,
27792	})
27793	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27794}
27795
27796// Do executes the "dialogflow.projects.agent.sessions.contexts.list" call.
27797// Exactly one of *GoogleCloudDialogflowV2ListContextsResponse or error
27798// will be non-nil. Any non-2xx status code is an error. Response
27799// headers are in either
27800// *GoogleCloudDialogflowV2ListContextsResponse.ServerResponse.Header or
27801// (if a response was returned at all) in
27802// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27803// whether the returned error was because http.StatusNotModified was
27804// returned.
27805func (c *ProjectsAgentSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListContextsResponse, error) {
27806	gensupport.SetOptions(c.urlParams_, opts...)
27807	res, err := c.doRequest("json")
27808	if res != nil && res.StatusCode == http.StatusNotModified {
27809		if res.Body != nil {
27810			res.Body.Close()
27811		}
27812		return nil, &googleapi.Error{
27813			Code:   res.StatusCode,
27814			Header: res.Header,
27815		}
27816	}
27817	if err != nil {
27818		return nil, err
27819	}
27820	defer googleapi.CloseBody(res)
27821	if err := googleapi.CheckResponse(res); err != nil {
27822		return nil, err
27823	}
27824	ret := &GoogleCloudDialogflowV2ListContextsResponse{
27825		ServerResponse: googleapi.ServerResponse{
27826			Header:         res.Header,
27827			HTTPStatusCode: res.StatusCode,
27828		},
27829	}
27830	target := &ret
27831	if err := gensupport.DecodeResponse(target, res); err != nil {
27832		return nil, err
27833	}
27834	return ret, nil
27835	// {
27836	//   "description": "Returns the list of all contexts in the specified session.",
27837	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
27838	//   "httpMethod": "GET",
27839	//   "id": "dialogflow.projects.agent.sessions.contexts.list",
27840	//   "parameterOrder": [
27841	//     "parent"
27842	//   ],
27843	//   "parameters": {
27844	//     "pageSize": {
27845	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
27846	//       "format": "int32",
27847	//       "location": "query",
27848	//       "type": "integer"
27849	//     },
27850	//     "pageToken": {
27851	//       "description": "Optional. The next_page_token value returned from a previous list request.",
27852	//       "location": "query",
27853	//       "type": "string"
27854	//     },
27855	//     "parent": {
27856	//       "description": "Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
27857	//       "location": "path",
27858	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
27859	//       "required": true,
27860	//       "type": "string"
27861	//     }
27862	//   },
27863	//   "path": "v2/{+parent}/contexts",
27864	//   "response": {
27865	//     "$ref": "GoogleCloudDialogflowV2ListContextsResponse"
27866	//   },
27867	//   "scopes": [
27868	//     "https://www.googleapis.com/auth/cloud-platform",
27869	//     "https://www.googleapis.com/auth/dialogflow"
27870	//   ]
27871	// }
27872
27873}
27874
27875// Pages invokes f for each page of results.
27876// A non-nil error returned from f will halt the iteration.
27877// The provided context supersedes any context provided to the Context method.
27878func (c *ProjectsAgentSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListContextsResponse) error) error {
27879	c.ctx_ = ctx
27880	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27881	for {
27882		x, err := c.Do()
27883		if err != nil {
27884			return err
27885		}
27886		if err := f(x); err != nil {
27887			return err
27888		}
27889		if x.NextPageToken == "" {
27890			return nil
27891		}
27892		c.PageToken(x.NextPageToken)
27893	}
27894}
27895
27896// method id "dialogflow.projects.agent.sessions.contexts.patch":
27897
27898type ProjectsAgentSessionsContextsPatchCall struct {
27899	s                              *Service
27900	nameid                         string
27901	googleclouddialogflowv2context *GoogleCloudDialogflowV2Context
27902	urlParams_                     gensupport.URLParams
27903	ctx_                           context.Context
27904	header_                        http.Header
27905}
27906
27907// Patch: Updates the specified context.
27908//
27909// - name: The unique identifier of the context. Format:
27910//   `projects//agent/sessions//contexts/`, or
27911//   `projects//agent/environments//users//sessions//contexts/`. The
27912//   `Context ID` is always converted to lowercase, may only contain
27913//   characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If
27914//   `Environment ID` is not specified, we assume default 'draft'
27915//   environment. If `User ID` is not specified, we assume default '-'
27916//   user. The following context names are reserved for internal use by
27917//   Dialogflow. You should not use these contexts or create contexts
27918//   with these names: * `__system_counters__` * `*_id_dialog_context` *
27919//   `*_dialog_params_size`.
27920func (r *ProjectsAgentSessionsContextsService) Patch(nameid string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsAgentSessionsContextsPatchCall {
27921	c := &ProjectsAgentSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27922	c.nameid = nameid
27923	c.googleclouddialogflowv2context = googleclouddialogflowv2context
27924	return c
27925}
27926
27927// UpdateMask sets the optional parameter "updateMask": The mask to
27928// control which fields get updated.
27929func (c *ProjectsAgentSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsContextsPatchCall {
27930	c.urlParams_.Set("updateMask", updateMask)
27931	return c
27932}
27933
27934// Fields allows partial responses to be retrieved. See
27935// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27936// for more information.
27937func (c *ProjectsAgentSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsPatchCall {
27938	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27939	return c
27940}
27941
27942// Context sets the context to be used in this call's Do method. Any
27943// pending HTTP request will be aborted if the provided context is
27944// canceled.
27945func (c *ProjectsAgentSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsPatchCall {
27946	c.ctx_ = ctx
27947	return c
27948}
27949
27950// Header returns an http.Header that can be modified by the caller to
27951// add HTTP headers to the request.
27952func (c *ProjectsAgentSessionsContextsPatchCall) Header() http.Header {
27953	if c.header_ == nil {
27954		c.header_ = make(http.Header)
27955	}
27956	return c.header_
27957}
27958
27959func (c *ProjectsAgentSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
27960	reqHeaders := make(http.Header)
27961	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
27962	for k, v := range c.header_ {
27963		reqHeaders[k] = v
27964	}
27965	reqHeaders.Set("User-Agent", c.s.userAgent())
27966	var body io.Reader = nil
27967	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context)
27968	if err != nil {
27969		return nil, err
27970	}
27971	reqHeaders.Set("Content-Type", "application/json")
27972	c.urlParams_.Set("alt", alt)
27973	c.urlParams_.Set("prettyPrint", "false")
27974	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
27975	urls += "?" + c.urlParams_.Encode()
27976	req, err := http.NewRequest("PATCH", urls, body)
27977	if err != nil {
27978		return nil, err
27979	}
27980	req.Header = reqHeaders
27981	googleapi.Expand(req.URL, map[string]string{
27982		"name": c.nameid,
27983	})
27984	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27985}
27986
27987// Do executes the "dialogflow.projects.agent.sessions.contexts.patch" call.
27988// Exactly one of *GoogleCloudDialogflowV2Context or error will be
27989// non-nil. Any non-2xx status code is an error. Response headers are in
27990// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
27991// response was returned at all) in error.(*googleapi.Error).Header. Use
27992// googleapi.IsNotModified to check whether the returned error was
27993// because http.StatusNotModified was returned.
27994func (c *ProjectsAgentSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
27995	gensupport.SetOptions(c.urlParams_, opts...)
27996	res, err := c.doRequest("json")
27997	if res != nil && res.StatusCode == http.StatusNotModified {
27998		if res.Body != nil {
27999			res.Body.Close()
28000		}
28001		return nil, &googleapi.Error{
28002			Code:   res.StatusCode,
28003			Header: res.Header,
28004		}
28005	}
28006	if err != nil {
28007		return nil, err
28008	}
28009	defer googleapi.CloseBody(res)
28010	if err := googleapi.CheckResponse(res); err != nil {
28011		return nil, err
28012	}
28013	ret := &GoogleCloudDialogflowV2Context{
28014		ServerResponse: googleapi.ServerResponse{
28015			Header:         res.Header,
28016			HTTPStatusCode: res.StatusCode,
28017		},
28018	}
28019	target := &ret
28020	if err := gensupport.DecodeResponse(target, res); err != nil {
28021		return nil, err
28022	}
28023	return ret, nil
28024	// {
28025	//   "description": "Updates the specified context.",
28026	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
28027	//   "httpMethod": "PATCH",
28028	//   "id": "dialogflow.projects.agent.sessions.contexts.patch",
28029	//   "parameterOrder": [
28030	//     "name"
28031	//   ],
28032	//   "parameters": {
28033	//     "name": {
28034	//       "description": "Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`",
28035	//       "location": "path",
28036	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
28037	//       "required": true,
28038	//       "type": "string"
28039	//     },
28040	//     "updateMask": {
28041	//       "description": "Optional. The mask to control which fields get updated.",
28042	//       "format": "google-fieldmask",
28043	//       "location": "query",
28044	//       "type": "string"
28045	//     }
28046	//   },
28047	//   "path": "v2/{+name}",
28048	//   "request": {
28049	//     "$ref": "GoogleCloudDialogflowV2Context"
28050	//   },
28051	//   "response": {
28052	//     "$ref": "GoogleCloudDialogflowV2Context"
28053	//   },
28054	//   "scopes": [
28055	//     "https://www.googleapis.com/auth/cloud-platform",
28056	//     "https://www.googleapis.com/auth/dialogflow"
28057	//   ]
28058	// }
28059
28060}
28061
28062// method id "dialogflow.projects.agent.sessions.entityTypes.create":
28063
28064type ProjectsAgentSessionsEntityTypesCreateCall struct {
28065	s                                        *Service
28066	parent                                   string
28067	googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType
28068	urlParams_                               gensupport.URLParams
28069	ctx_                                     context.Context
28070	header_                                  http.Header
28071}
28072
28073// Create: Creates a session entity type. If the specified session
28074// entity type already exists, overrides the session entity type. This
28075// method doesn't work with Google Assistant integration. Contact
28076// Dialogflow support if you need to use session entities with Google
28077// Assistant integration.
28078//
28079// - parent: The session to create a session entity type for. Format:
28080//   `projects//agent/sessions/` or
28081//   `projects//agent/environments//users// sessions/`. If `Environment
28082//   ID` is not specified, we assume default 'draft' environment. If
28083//   `User ID` is not specified, we assume default '-' user.
28084func (r *ProjectsAgentSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsAgentSessionsEntityTypesCreateCall {
28085	c := &ProjectsAgentSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28086	c.parent = parent
28087	c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype
28088	return c
28089}
28090
28091// Fields allows partial responses to be retrieved. See
28092// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28093// for more information.
28094func (c *ProjectsAgentSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesCreateCall {
28095	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28096	return c
28097}
28098
28099// Context sets the context to be used in this call's Do method. Any
28100// pending HTTP request will be aborted if the provided context is
28101// canceled.
28102func (c *ProjectsAgentSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesCreateCall {
28103	c.ctx_ = ctx
28104	return c
28105}
28106
28107// Header returns an http.Header that can be modified by the caller to
28108// add HTTP headers to the request.
28109func (c *ProjectsAgentSessionsEntityTypesCreateCall) Header() http.Header {
28110	if c.header_ == nil {
28111		c.header_ = make(http.Header)
28112	}
28113	return c.header_
28114}
28115
28116func (c *ProjectsAgentSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
28117	reqHeaders := make(http.Header)
28118	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
28119	for k, v := range c.header_ {
28120		reqHeaders[k] = v
28121	}
28122	reqHeaders.Set("User-Agent", c.s.userAgent())
28123	var body io.Reader = nil
28124	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype)
28125	if err != nil {
28126		return nil, err
28127	}
28128	reqHeaders.Set("Content-Type", "application/json")
28129	c.urlParams_.Set("alt", alt)
28130	c.urlParams_.Set("prettyPrint", "false")
28131	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
28132	urls += "?" + c.urlParams_.Encode()
28133	req, err := http.NewRequest("POST", urls, body)
28134	if err != nil {
28135		return nil, err
28136	}
28137	req.Header = reqHeaders
28138	googleapi.Expand(req.URL, map[string]string{
28139		"parent": c.parent,
28140	})
28141	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28142}
28143
28144// Do executes the "dialogflow.projects.agent.sessions.entityTypes.create" call.
28145// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
28146// will be non-nil. Any non-2xx status code is an error. Response
28147// headers are in either
28148// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
28149// (if a response was returned at all) in
28150// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
28151// whether the returned error was because http.StatusNotModified was
28152// returned.
28153func (c *ProjectsAgentSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
28154	gensupport.SetOptions(c.urlParams_, opts...)
28155	res, err := c.doRequest("json")
28156	if res != nil && res.StatusCode == http.StatusNotModified {
28157		if res.Body != nil {
28158			res.Body.Close()
28159		}
28160		return nil, &googleapi.Error{
28161			Code:   res.StatusCode,
28162			Header: res.Header,
28163		}
28164	}
28165	if err != nil {
28166		return nil, err
28167	}
28168	defer googleapi.CloseBody(res)
28169	if err := googleapi.CheckResponse(res); err != nil {
28170		return nil, err
28171	}
28172	ret := &GoogleCloudDialogflowV2SessionEntityType{
28173		ServerResponse: googleapi.ServerResponse{
28174			Header:         res.Header,
28175			HTTPStatusCode: res.StatusCode,
28176		},
28177	}
28178	target := &ret
28179	if err := gensupport.DecodeResponse(target, res); err != nil {
28180		return nil, err
28181	}
28182	return ret, nil
28183	// {
28184	//   "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
28185	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes",
28186	//   "httpMethod": "POST",
28187	//   "id": "dialogflow.projects.agent.sessions.entityTypes.create",
28188	//   "parameterOrder": [
28189	//     "parent"
28190	//   ],
28191	//   "parameters": {
28192	//     "parent": {
28193	//       "description": "Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
28194	//       "location": "path",
28195	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
28196	//       "required": true,
28197	//       "type": "string"
28198	//     }
28199	//   },
28200	//   "path": "v2/{+parent}/entityTypes",
28201	//   "request": {
28202	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
28203	//   },
28204	//   "response": {
28205	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
28206	//   },
28207	//   "scopes": [
28208	//     "https://www.googleapis.com/auth/cloud-platform",
28209	//     "https://www.googleapis.com/auth/dialogflow"
28210	//   ]
28211	// }
28212
28213}
28214
28215// method id "dialogflow.projects.agent.sessions.entityTypes.delete":
28216
28217type ProjectsAgentSessionsEntityTypesDeleteCall struct {
28218	s          *Service
28219	name       string
28220	urlParams_ gensupport.URLParams
28221	ctx_       context.Context
28222	header_    http.Header
28223}
28224
28225// Delete: Deletes the specified session entity type. This method
28226// doesn't work with Google Assistant integration. Contact Dialogflow
28227// support if you need to use session entities with Google Assistant
28228// integration.
28229//
28230// - name: The name of the entity type to delete. Format:
28231//   `projects//agent/sessions//entityTypes/` or
28232//   `projects//agent/environments//users//sessions//entityTypes/`. If
28233//   `Environment ID` is not specified, we assume default 'draft'
28234//   environment. If `User ID` is not specified, we assume default '-'
28235//   user.
28236func (r *ProjectsAgentSessionsEntityTypesService) Delete(name string) *ProjectsAgentSessionsEntityTypesDeleteCall {
28237	c := &ProjectsAgentSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28238	c.name = name
28239	return c
28240}
28241
28242// Fields allows partial responses to be retrieved. See
28243// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28244// for more information.
28245func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesDeleteCall {
28246	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28247	return c
28248}
28249
28250// Context sets the context to be used in this call's Do method. Any
28251// pending HTTP request will be aborted if the provided context is
28252// canceled.
28253func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesDeleteCall {
28254	c.ctx_ = ctx
28255	return c
28256}
28257
28258// Header returns an http.Header that can be modified by the caller to
28259// add HTTP headers to the request.
28260func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Header() http.Header {
28261	if c.header_ == nil {
28262		c.header_ = make(http.Header)
28263	}
28264	return c.header_
28265}
28266
28267func (c *ProjectsAgentSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
28268	reqHeaders := make(http.Header)
28269	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
28270	for k, v := range c.header_ {
28271		reqHeaders[k] = v
28272	}
28273	reqHeaders.Set("User-Agent", c.s.userAgent())
28274	var body io.Reader = nil
28275	c.urlParams_.Set("alt", alt)
28276	c.urlParams_.Set("prettyPrint", "false")
28277	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
28278	urls += "?" + c.urlParams_.Encode()
28279	req, err := http.NewRequest("DELETE", urls, body)
28280	if err != nil {
28281		return nil, err
28282	}
28283	req.Header = reqHeaders
28284	googleapi.Expand(req.URL, map[string]string{
28285		"name": c.name,
28286	})
28287	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28288}
28289
28290// Do executes the "dialogflow.projects.agent.sessions.entityTypes.delete" call.
28291// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
28292// non-2xx status code is an error. Response headers are in either
28293// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
28294// returned at all) in error.(*googleapi.Error).Header. Use
28295// googleapi.IsNotModified to check whether the returned error was
28296// because http.StatusNotModified was returned.
28297func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
28298	gensupport.SetOptions(c.urlParams_, opts...)
28299	res, err := c.doRequest("json")
28300	if res != nil && res.StatusCode == http.StatusNotModified {
28301		if res.Body != nil {
28302			res.Body.Close()
28303		}
28304		return nil, &googleapi.Error{
28305			Code:   res.StatusCode,
28306			Header: res.Header,
28307		}
28308	}
28309	if err != nil {
28310		return nil, err
28311	}
28312	defer googleapi.CloseBody(res)
28313	if err := googleapi.CheckResponse(res); err != nil {
28314		return nil, err
28315	}
28316	ret := &GoogleProtobufEmpty{
28317		ServerResponse: googleapi.ServerResponse{
28318			Header:         res.Header,
28319			HTTPStatusCode: res.StatusCode,
28320		},
28321	}
28322	target := &ret
28323	if err := gensupport.DecodeResponse(target, res); err != nil {
28324		return nil, err
28325	}
28326	return ret, nil
28327	// {
28328	//   "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
28329	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
28330	//   "httpMethod": "DELETE",
28331	//   "id": "dialogflow.projects.agent.sessions.entityTypes.delete",
28332	//   "parameterOrder": [
28333	//     "name"
28334	//   ],
28335	//   "parameters": {
28336	//     "name": {
28337	//       "description": "Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
28338	//       "location": "path",
28339	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
28340	//       "required": true,
28341	//       "type": "string"
28342	//     }
28343	//   },
28344	//   "path": "v2/{+name}",
28345	//   "response": {
28346	//     "$ref": "GoogleProtobufEmpty"
28347	//   },
28348	//   "scopes": [
28349	//     "https://www.googleapis.com/auth/cloud-platform",
28350	//     "https://www.googleapis.com/auth/dialogflow"
28351	//   ]
28352	// }
28353
28354}
28355
28356// method id "dialogflow.projects.agent.sessions.entityTypes.get":
28357
28358type ProjectsAgentSessionsEntityTypesGetCall struct {
28359	s            *Service
28360	name         string
28361	urlParams_   gensupport.URLParams
28362	ifNoneMatch_ string
28363	ctx_         context.Context
28364	header_      http.Header
28365}
28366
28367// Get: Retrieves the specified session entity type. This method doesn't
28368// work with Google Assistant integration. Contact Dialogflow support if
28369// you need to use session entities with Google Assistant integration.
28370//
28371// - name: The name of the session entity type. Format:
28372//   `projects//agent/sessions//entityTypes/` or
28373//   `projects//agent/environments//users//sessions//entityTypes/`. If
28374//   `Environment ID` is not specified, we assume default 'draft'
28375//   environment. If `User ID` is not specified, we assume default '-'
28376//   user.
28377func (r *ProjectsAgentSessionsEntityTypesService) Get(name string) *ProjectsAgentSessionsEntityTypesGetCall {
28378	c := &ProjectsAgentSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28379	c.name = name
28380	return c
28381}
28382
28383// Fields allows partial responses to be retrieved. See
28384// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28385// for more information.
28386func (c *ProjectsAgentSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesGetCall {
28387	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28388	return c
28389}
28390
28391// IfNoneMatch sets the optional parameter which makes the operation
28392// fail if the object's ETag matches the given value. This is useful for
28393// getting updates only after the object has changed since the last
28394// request. Use googleapi.IsNotModified to check whether the response
28395// error from Do is the result of In-None-Match.
28396func (c *ProjectsAgentSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesGetCall {
28397	c.ifNoneMatch_ = entityTag
28398	return c
28399}
28400
28401// Context sets the context to be used in this call's Do method. Any
28402// pending HTTP request will be aborted if the provided context is
28403// canceled.
28404func (c *ProjectsAgentSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesGetCall {
28405	c.ctx_ = ctx
28406	return c
28407}
28408
28409// Header returns an http.Header that can be modified by the caller to
28410// add HTTP headers to the request.
28411func (c *ProjectsAgentSessionsEntityTypesGetCall) Header() http.Header {
28412	if c.header_ == nil {
28413		c.header_ = make(http.Header)
28414	}
28415	return c.header_
28416}
28417
28418func (c *ProjectsAgentSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
28419	reqHeaders := make(http.Header)
28420	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
28421	for k, v := range c.header_ {
28422		reqHeaders[k] = v
28423	}
28424	reqHeaders.Set("User-Agent", c.s.userAgent())
28425	if c.ifNoneMatch_ != "" {
28426		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28427	}
28428	var body io.Reader = nil
28429	c.urlParams_.Set("alt", alt)
28430	c.urlParams_.Set("prettyPrint", "false")
28431	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
28432	urls += "?" + c.urlParams_.Encode()
28433	req, err := http.NewRequest("GET", urls, body)
28434	if err != nil {
28435		return nil, err
28436	}
28437	req.Header = reqHeaders
28438	googleapi.Expand(req.URL, map[string]string{
28439		"name": c.name,
28440	})
28441	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28442}
28443
28444// Do executes the "dialogflow.projects.agent.sessions.entityTypes.get" call.
28445// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
28446// will be non-nil. Any non-2xx status code is an error. Response
28447// headers are in either
28448// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
28449// (if a response was returned at all) in
28450// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
28451// whether the returned error was because http.StatusNotModified was
28452// returned.
28453func (c *ProjectsAgentSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
28454	gensupport.SetOptions(c.urlParams_, opts...)
28455	res, err := c.doRequest("json")
28456	if res != nil && res.StatusCode == http.StatusNotModified {
28457		if res.Body != nil {
28458			res.Body.Close()
28459		}
28460		return nil, &googleapi.Error{
28461			Code:   res.StatusCode,
28462			Header: res.Header,
28463		}
28464	}
28465	if err != nil {
28466		return nil, err
28467	}
28468	defer googleapi.CloseBody(res)
28469	if err := googleapi.CheckResponse(res); err != nil {
28470		return nil, err
28471	}
28472	ret := &GoogleCloudDialogflowV2SessionEntityType{
28473		ServerResponse: googleapi.ServerResponse{
28474			Header:         res.Header,
28475			HTTPStatusCode: res.StatusCode,
28476		},
28477	}
28478	target := &ret
28479	if err := gensupport.DecodeResponse(target, res); err != nil {
28480		return nil, err
28481	}
28482	return ret, nil
28483	// {
28484	//   "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
28485	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
28486	//   "httpMethod": "GET",
28487	//   "id": "dialogflow.projects.agent.sessions.entityTypes.get",
28488	//   "parameterOrder": [
28489	//     "name"
28490	//   ],
28491	//   "parameters": {
28492	//     "name": {
28493	//       "description": "Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
28494	//       "location": "path",
28495	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
28496	//       "required": true,
28497	//       "type": "string"
28498	//     }
28499	//   },
28500	//   "path": "v2/{+name}",
28501	//   "response": {
28502	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
28503	//   },
28504	//   "scopes": [
28505	//     "https://www.googleapis.com/auth/cloud-platform",
28506	//     "https://www.googleapis.com/auth/dialogflow"
28507	//   ]
28508	// }
28509
28510}
28511
28512// method id "dialogflow.projects.agent.sessions.entityTypes.list":
28513
28514type ProjectsAgentSessionsEntityTypesListCall struct {
28515	s            *Service
28516	parent       string
28517	urlParams_   gensupport.URLParams
28518	ifNoneMatch_ string
28519	ctx_         context.Context
28520	header_      http.Header
28521}
28522
28523// List: Returns the list of all session entity types in the specified
28524// session. This method doesn't work with Google Assistant integration.
28525// Contact Dialogflow support if you need to use session entities with
28526// Google Assistant integration.
28527//
28528// - parent: The session to list all session entity types from. Format:
28529//   `projects//agent/sessions/` or
28530//   `projects//agent/environments//users// sessions/`. If `Environment
28531//   ID` is not specified, we assume default 'draft' environment. If
28532//   `User ID` is not specified, we assume default '-' user.
28533func (r *ProjectsAgentSessionsEntityTypesService) List(parent string) *ProjectsAgentSessionsEntityTypesListCall {
28534	c := &ProjectsAgentSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28535	c.parent = parent
28536	return c
28537}
28538
28539// PageSize sets the optional parameter "pageSize": The maximum number
28540// of items to return in a single page. By default 100 and at most 1000.
28541func (c *ProjectsAgentSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentSessionsEntityTypesListCall {
28542	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28543	return c
28544}
28545
28546// PageToken sets the optional parameter "pageToken": The
28547// next_page_token value returned from a previous list request.
28548func (c *ProjectsAgentSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentSessionsEntityTypesListCall {
28549	c.urlParams_.Set("pageToken", pageToken)
28550	return c
28551}
28552
28553// Fields allows partial responses to be retrieved. See
28554// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28555// for more information.
28556func (c *ProjectsAgentSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesListCall {
28557	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28558	return c
28559}
28560
28561// IfNoneMatch sets the optional parameter which makes the operation
28562// fail if the object's ETag matches the given value. This is useful for
28563// getting updates only after the object has changed since the last
28564// request. Use googleapi.IsNotModified to check whether the response
28565// error from Do is the result of In-None-Match.
28566func (c *ProjectsAgentSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesListCall {
28567	c.ifNoneMatch_ = entityTag
28568	return c
28569}
28570
28571// Context sets the context to be used in this call's Do method. Any
28572// pending HTTP request will be aborted if the provided context is
28573// canceled.
28574func (c *ProjectsAgentSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesListCall {
28575	c.ctx_ = ctx
28576	return c
28577}
28578
28579// Header returns an http.Header that can be modified by the caller to
28580// add HTTP headers to the request.
28581func (c *ProjectsAgentSessionsEntityTypesListCall) Header() http.Header {
28582	if c.header_ == nil {
28583		c.header_ = make(http.Header)
28584	}
28585	return c.header_
28586}
28587
28588func (c *ProjectsAgentSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
28589	reqHeaders := make(http.Header)
28590	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
28591	for k, v := range c.header_ {
28592		reqHeaders[k] = v
28593	}
28594	reqHeaders.Set("User-Agent", c.s.userAgent())
28595	if c.ifNoneMatch_ != "" {
28596		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28597	}
28598	var body io.Reader = nil
28599	c.urlParams_.Set("alt", alt)
28600	c.urlParams_.Set("prettyPrint", "false")
28601	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
28602	urls += "?" + c.urlParams_.Encode()
28603	req, err := http.NewRequest("GET", urls, body)
28604	if err != nil {
28605		return nil, err
28606	}
28607	req.Header = reqHeaders
28608	googleapi.Expand(req.URL, map[string]string{
28609		"parent": c.parent,
28610	})
28611	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28612}
28613
28614// Do executes the "dialogflow.projects.agent.sessions.entityTypes.list" call.
28615// Exactly one of *GoogleCloudDialogflowV2ListSessionEntityTypesResponse
28616// or error will be non-nil. Any non-2xx status code is an error.
28617// Response headers are in either
28618// *GoogleCloudDialogflowV2ListSessionEntityTypesResponse.ServerResponse.
28619// Header or (if a response was returned at all) in
28620// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
28621// whether the returned error was because http.StatusNotModified was
28622// returned.
28623func (c *ProjectsAgentSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListSessionEntityTypesResponse, error) {
28624	gensupport.SetOptions(c.urlParams_, opts...)
28625	res, err := c.doRequest("json")
28626	if res != nil && res.StatusCode == http.StatusNotModified {
28627		if res.Body != nil {
28628			res.Body.Close()
28629		}
28630		return nil, &googleapi.Error{
28631			Code:   res.StatusCode,
28632			Header: res.Header,
28633		}
28634	}
28635	if err != nil {
28636		return nil, err
28637	}
28638	defer googleapi.CloseBody(res)
28639	if err := googleapi.CheckResponse(res); err != nil {
28640		return nil, err
28641	}
28642	ret := &GoogleCloudDialogflowV2ListSessionEntityTypesResponse{
28643		ServerResponse: googleapi.ServerResponse{
28644			Header:         res.Header,
28645			HTTPStatusCode: res.StatusCode,
28646		},
28647	}
28648	target := &ret
28649	if err := gensupport.DecodeResponse(target, res); err != nil {
28650		return nil, err
28651	}
28652	return ret, nil
28653	// {
28654	//   "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
28655	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes",
28656	//   "httpMethod": "GET",
28657	//   "id": "dialogflow.projects.agent.sessions.entityTypes.list",
28658	//   "parameterOrder": [
28659	//     "parent"
28660	//   ],
28661	//   "parameters": {
28662	//     "pageSize": {
28663	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
28664	//       "format": "int32",
28665	//       "location": "query",
28666	//       "type": "integer"
28667	//     },
28668	//     "pageToken": {
28669	//       "description": "Optional. The next_page_token value returned from a previous list request.",
28670	//       "location": "query",
28671	//       "type": "string"
28672	//     },
28673	//     "parent": {
28674	//       "description": "Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
28675	//       "location": "path",
28676	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
28677	//       "required": true,
28678	//       "type": "string"
28679	//     }
28680	//   },
28681	//   "path": "v2/{+parent}/entityTypes",
28682	//   "response": {
28683	//     "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse"
28684	//   },
28685	//   "scopes": [
28686	//     "https://www.googleapis.com/auth/cloud-platform",
28687	//     "https://www.googleapis.com/auth/dialogflow"
28688	//   ]
28689	// }
28690
28691}
28692
28693// Pages invokes f for each page of results.
28694// A non-nil error returned from f will halt the iteration.
28695// The provided context supersedes any context provided to the Context method.
28696func (c *ProjectsAgentSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListSessionEntityTypesResponse) error) error {
28697	c.ctx_ = ctx
28698	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28699	for {
28700		x, err := c.Do()
28701		if err != nil {
28702			return err
28703		}
28704		if err := f(x); err != nil {
28705			return err
28706		}
28707		if x.NextPageToken == "" {
28708			return nil
28709		}
28710		c.PageToken(x.NextPageToken)
28711	}
28712}
28713
28714// method id "dialogflow.projects.agent.sessions.entityTypes.patch":
28715
28716type ProjectsAgentSessionsEntityTypesPatchCall struct {
28717	s                                        *Service
28718	nameid                                   string
28719	googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType
28720	urlParams_                               gensupport.URLParams
28721	ctx_                                     context.Context
28722	header_                                  http.Header
28723}
28724
28725// Patch: Updates the specified session entity type. This method doesn't
28726// work with Google Assistant integration. Contact Dialogflow support if
28727// you need to use session entities with Google Assistant integration.
28728//
28729// - name: The unique identifier of this session entity type. Format:
28730//   `projects//agent/sessions//entityTypes/`, or
28731//   `projects//agent/environments//users//sessions//entityTypes/`. If
28732//   `Environment ID` is not specified, we assume default 'draft'
28733//   environment. If `User ID` is not specified, we assume default '-'
28734//   user. `` must be the display name of an existing entity type in the
28735//   same agent that will be overridden or supplemented.
28736func (r *ProjectsAgentSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsAgentSessionsEntityTypesPatchCall {
28737	c := &ProjectsAgentSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28738	c.nameid = nameid
28739	c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype
28740	return c
28741}
28742
28743// UpdateMask sets the optional parameter "updateMask": The mask to
28744// control which fields get updated.
28745func (c *ProjectsAgentSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsEntityTypesPatchCall {
28746	c.urlParams_.Set("updateMask", updateMask)
28747	return c
28748}
28749
28750// Fields allows partial responses to be retrieved. See
28751// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28752// for more information.
28753func (c *ProjectsAgentSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesPatchCall {
28754	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28755	return c
28756}
28757
28758// Context sets the context to be used in this call's Do method. Any
28759// pending HTTP request will be aborted if the provided context is
28760// canceled.
28761func (c *ProjectsAgentSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesPatchCall {
28762	c.ctx_ = ctx
28763	return c
28764}
28765
28766// Header returns an http.Header that can be modified by the caller to
28767// add HTTP headers to the request.
28768func (c *ProjectsAgentSessionsEntityTypesPatchCall) Header() http.Header {
28769	if c.header_ == nil {
28770		c.header_ = make(http.Header)
28771	}
28772	return c.header_
28773}
28774
28775func (c *ProjectsAgentSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
28776	reqHeaders := make(http.Header)
28777	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
28778	for k, v := range c.header_ {
28779		reqHeaders[k] = v
28780	}
28781	reqHeaders.Set("User-Agent", c.s.userAgent())
28782	var body io.Reader = nil
28783	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype)
28784	if err != nil {
28785		return nil, err
28786	}
28787	reqHeaders.Set("Content-Type", "application/json")
28788	c.urlParams_.Set("alt", alt)
28789	c.urlParams_.Set("prettyPrint", "false")
28790	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
28791	urls += "?" + c.urlParams_.Encode()
28792	req, err := http.NewRequest("PATCH", urls, body)
28793	if err != nil {
28794		return nil, err
28795	}
28796	req.Header = reqHeaders
28797	googleapi.Expand(req.URL, map[string]string{
28798		"name": c.nameid,
28799	})
28800	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28801}
28802
28803// Do executes the "dialogflow.projects.agent.sessions.entityTypes.patch" call.
28804// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
28805// will be non-nil. Any non-2xx status code is an error. Response
28806// headers are in either
28807// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
28808// (if a response was returned at all) in
28809// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
28810// whether the returned error was because http.StatusNotModified was
28811// returned.
28812func (c *ProjectsAgentSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
28813	gensupport.SetOptions(c.urlParams_, opts...)
28814	res, err := c.doRequest("json")
28815	if res != nil && res.StatusCode == http.StatusNotModified {
28816		if res.Body != nil {
28817			res.Body.Close()
28818		}
28819		return nil, &googleapi.Error{
28820			Code:   res.StatusCode,
28821			Header: res.Header,
28822		}
28823	}
28824	if err != nil {
28825		return nil, err
28826	}
28827	defer googleapi.CloseBody(res)
28828	if err := googleapi.CheckResponse(res); err != nil {
28829		return nil, err
28830	}
28831	ret := &GoogleCloudDialogflowV2SessionEntityType{
28832		ServerResponse: googleapi.ServerResponse{
28833			Header:         res.Header,
28834			HTTPStatusCode: res.StatusCode,
28835		},
28836	}
28837	target := &ret
28838	if err := gensupport.DecodeResponse(target, res); err != nil {
28839		return nil, err
28840	}
28841	return ret, nil
28842	// {
28843	//   "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
28844	//   "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
28845	//   "httpMethod": "PATCH",
28846	//   "id": "dialogflow.projects.agent.sessions.entityTypes.patch",
28847	//   "parameterOrder": [
28848	//     "name"
28849	//   ],
28850	//   "parameters": {
28851	//     "name": {
28852	//       "description": "Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.",
28853	//       "location": "path",
28854	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
28855	//       "required": true,
28856	//       "type": "string"
28857	//     },
28858	//     "updateMask": {
28859	//       "description": "Optional. The mask to control which fields get updated.",
28860	//       "format": "google-fieldmask",
28861	//       "location": "query",
28862	//       "type": "string"
28863	//     }
28864	//   },
28865	//   "path": "v2/{+name}",
28866	//   "request": {
28867	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
28868	//   },
28869	//   "response": {
28870	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
28871	//   },
28872	//   "scopes": [
28873	//     "https://www.googleapis.com/auth/cloud-platform",
28874	//     "https://www.googleapis.com/auth/dialogflow"
28875	//   ]
28876	// }
28877
28878}
28879
28880// method id "dialogflow.projects.agent.versions.create":
28881
28882type ProjectsAgentVersionsCreateCall struct {
28883	s                              *Service
28884	parent                         string
28885	googleclouddialogflowv2version *GoogleCloudDialogflowV2Version
28886	urlParams_                     gensupport.URLParams
28887	ctx_                           context.Context
28888	header_                        http.Header
28889}
28890
28891// Create: Creates an agent version. The new version points to the agent
28892// instance in the "default" environment.
28893//
28894// - parent: The agent to create a version for. Supported formats: -
28895//   `projects//agent` - `projects//locations//agent`.
28896func (r *ProjectsAgentVersionsService) Create(parent string, googleclouddialogflowv2version *GoogleCloudDialogflowV2Version) *ProjectsAgentVersionsCreateCall {
28897	c := &ProjectsAgentVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28898	c.parent = parent
28899	c.googleclouddialogflowv2version = googleclouddialogflowv2version
28900	return c
28901}
28902
28903// Fields allows partial responses to be retrieved. See
28904// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28905// for more information.
28906func (c *ProjectsAgentVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentVersionsCreateCall {
28907	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28908	return c
28909}
28910
28911// Context sets the context to be used in this call's Do method. Any
28912// pending HTTP request will be aborted if the provided context is
28913// canceled.
28914func (c *ProjectsAgentVersionsCreateCall) Context(ctx context.Context) *ProjectsAgentVersionsCreateCall {
28915	c.ctx_ = ctx
28916	return c
28917}
28918
28919// Header returns an http.Header that can be modified by the caller to
28920// add HTTP headers to the request.
28921func (c *ProjectsAgentVersionsCreateCall) Header() http.Header {
28922	if c.header_ == nil {
28923		c.header_ = make(http.Header)
28924	}
28925	return c.header_
28926}
28927
28928func (c *ProjectsAgentVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
28929	reqHeaders := make(http.Header)
28930	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
28931	for k, v := range c.header_ {
28932		reqHeaders[k] = v
28933	}
28934	reqHeaders.Set("User-Agent", c.s.userAgent())
28935	var body io.Reader = nil
28936	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2version)
28937	if err != nil {
28938		return nil, err
28939	}
28940	reqHeaders.Set("Content-Type", "application/json")
28941	c.urlParams_.Set("alt", alt)
28942	c.urlParams_.Set("prettyPrint", "false")
28943	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/versions")
28944	urls += "?" + c.urlParams_.Encode()
28945	req, err := http.NewRequest("POST", urls, body)
28946	if err != nil {
28947		return nil, err
28948	}
28949	req.Header = reqHeaders
28950	googleapi.Expand(req.URL, map[string]string{
28951		"parent": c.parent,
28952	})
28953	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28954}
28955
28956// Do executes the "dialogflow.projects.agent.versions.create" call.
28957// Exactly one of *GoogleCloudDialogflowV2Version or error will be
28958// non-nil. Any non-2xx status code is an error. Response headers are in
28959// either *GoogleCloudDialogflowV2Version.ServerResponse.Header or (if a
28960// response was returned at all) in error.(*googleapi.Error).Header. Use
28961// googleapi.IsNotModified to check whether the returned error was
28962// because http.StatusNotModified was returned.
28963func (c *ProjectsAgentVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Version, error) {
28964	gensupport.SetOptions(c.urlParams_, opts...)
28965	res, err := c.doRequest("json")
28966	if res != nil && res.StatusCode == http.StatusNotModified {
28967		if res.Body != nil {
28968			res.Body.Close()
28969		}
28970		return nil, &googleapi.Error{
28971			Code:   res.StatusCode,
28972			Header: res.Header,
28973		}
28974	}
28975	if err != nil {
28976		return nil, err
28977	}
28978	defer googleapi.CloseBody(res)
28979	if err := googleapi.CheckResponse(res); err != nil {
28980		return nil, err
28981	}
28982	ret := &GoogleCloudDialogflowV2Version{
28983		ServerResponse: googleapi.ServerResponse{
28984			Header:         res.Header,
28985			HTTPStatusCode: res.StatusCode,
28986		},
28987	}
28988	target := &ret
28989	if err := gensupport.DecodeResponse(target, res); err != nil {
28990		return nil, err
28991	}
28992	return ret, nil
28993	// {
28994	//   "description": "Creates an agent version. The new version points to the agent instance in the \"default\" environment.",
28995	//   "flatPath": "v2/projects/{projectsId}/agent/versions",
28996	//   "httpMethod": "POST",
28997	//   "id": "dialogflow.projects.agent.versions.create",
28998	//   "parameterOrder": [
28999	//     "parent"
29000	//   ],
29001	//   "parameters": {
29002	//     "parent": {
29003	//       "description": "Required. The agent to create a version for. Supported formats: - `projects//agent` - `projects//locations//agent`",
29004	//       "location": "path",
29005	//       "pattern": "^projects/[^/]+/agent$",
29006	//       "required": true,
29007	//       "type": "string"
29008	//     }
29009	//   },
29010	//   "path": "v2/{+parent}/versions",
29011	//   "request": {
29012	//     "$ref": "GoogleCloudDialogflowV2Version"
29013	//   },
29014	//   "response": {
29015	//     "$ref": "GoogleCloudDialogflowV2Version"
29016	//   },
29017	//   "scopes": [
29018	//     "https://www.googleapis.com/auth/cloud-platform",
29019	//     "https://www.googleapis.com/auth/dialogflow"
29020	//   ]
29021	// }
29022
29023}
29024
29025// method id "dialogflow.projects.agent.versions.delete":
29026
29027type ProjectsAgentVersionsDeleteCall struct {
29028	s          *Service
29029	name       string
29030	urlParams_ gensupport.URLParams
29031	ctx_       context.Context
29032	header_    http.Header
29033}
29034
29035// Delete: Delete the specified agent version.
29036//
29037// - name: The name of the version to delete. Supported formats: -
29038//   `projects//agent/versions/` -
29039//   `projects//locations//agent/versions/`.
29040func (r *ProjectsAgentVersionsService) Delete(name string) *ProjectsAgentVersionsDeleteCall {
29041	c := &ProjectsAgentVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29042	c.name = name
29043	return c
29044}
29045
29046// Fields allows partial responses to be retrieved. See
29047// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29048// for more information.
29049func (c *ProjectsAgentVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentVersionsDeleteCall {
29050	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29051	return c
29052}
29053
29054// Context sets the context to be used in this call's Do method. Any
29055// pending HTTP request will be aborted if the provided context is
29056// canceled.
29057func (c *ProjectsAgentVersionsDeleteCall) Context(ctx context.Context) *ProjectsAgentVersionsDeleteCall {
29058	c.ctx_ = ctx
29059	return c
29060}
29061
29062// Header returns an http.Header that can be modified by the caller to
29063// add HTTP headers to the request.
29064func (c *ProjectsAgentVersionsDeleteCall) Header() http.Header {
29065	if c.header_ == nil {
29066		c.header_ = make(http.Header)
29067	}
29068	return c.header_
29069}
29070
29071func (c *ProjectsAgentVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
29072	reqHeaders := make(http.Header)
29073	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
29074	for k, v := range c.header_ {
29075		reqHeaders[k] = v
29076	}
29077	reqHeaders.Set("User-Agent", c.s.userAgent())
29078	var body io.Reader = nil
29079	c.urlParams_.Set("alt", alt)
29080	c.urlParams_.Set("prettyPrint", "false")
29081	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
29082	urls += "?" + c.urlParams_.Encode()
29083	req, err := http.NewRequest("DELETE", urls, body)
29084	if err != nil {
29085		return nil, err
29086	}
29087	req.Header = reqHeaders
29088	googleapi.Expand(req.URL, map[string]string{
29089		"name": c.name,
29090	})
29091	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29092}
29093
29094// Do executes the "dialogflow.projects.agent.versions.delete" call.
29095// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
29096// non-2xx status code is an error. Response headers are in either
29097// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
29098// returned at all) in error.(*googleapi.Error).Header. Use
29099// googleapi.IsNotModified to check whether the returned error was
29100// because http.StatusNotModified was returned.
29101func (c *ProjectsAgentVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
29102	gensupport.SetOptions(c.urlParams_, opts...)
29103	res, err := c.doRequest("json")
29104	if res != nil && res.StatusCode == http.StatusNotModified {
29105		if res.Body != nil {
29106			res.Body.Close()
29107		}
29108		return nil, &googleapi.Error{
29109			Code:   res.StatusCode,
29110			Header: res.Header,
29111		}
29112	}
29113	if err != nil {
29114		return nil, err
29115	}
29116	defer googleapi.CloseBody(res)
29117	if err := googleapi.CheckResponse(res); err != nil {
29118		return nil, err
29119	}
29120	ret := &GoogleProtobufEmpty{
29121		ServerResponse: googleapi.ServerResponse{
29122			Header:         res.Header,
29123			HTTPStatusCode: res.StatusCode,
29124		},
29125	}
29126	target := &ret
29127	if err := gensupport.DecodeResponse(target, res); err != nil {
29128		return nil, err
29129	}
29130	return ret, nil
29131	// {
29132	//   "description": "Delete the specified agent version.",
29133	//   "flatPath": "v2/projects/{projectsId}/agent/versions/{versionsId}",
29134	//   "httpMethod": "DELETE",
29135	//   "id": "dialogflow.projects.agent.versions.delete",
29136	//   "parameterOrder": [
29137	//     "name"
29138	//   ],
29139	//   "parameters": {
29140	//     "name": {
29141	//       "description": "Required. The name of the version to delete. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`",
29142	//       "location": "path",
29143	//       "pattern": "^projects/[^/]+/agent/versions/[^/]+$",
29144	//       "required": true,
29145	//       "type": "string"
29146	//     }
29147	//   },
29148	//   "path": "v2/{+name}",
29149	//   "response": {
29150	//     "$ref": "GoogleProtobufEmpty"
29151	//   },
29152	//   "scopes": [
29153	//     "https://www.googleapis.com/auth/cloud-platform",
29154	//     "https://www.googleapis.com/auth/dialogflow"
29155	//   ]
29156	// }
29157
29158}
29159
29160// method id "dialogflow.projects.agent.versions.get":
29161
29162type ProjectsAgentVersionsGetCall struct {
29163	s            *Service
29164	name         string
29165	urlParams_   gensupport.URLParams
29166	ifNoneMatch_ string
29167	ctx_         context.Context
29168	header_      http.Header
29169}
29170
29171// Get: Retrieves the specified agent version.
29172//
29173// - name: The name of the version. Supported formats: -
29174//   `projects//agent/versions/` -
29175//   `projects//locations//agent/versions/`.
29176func (r *ProjectsAgentVersionsService) Get(name string) *ProjectsAgentVersionsGetCall {
29177	c := &ProjectsAgentVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29178	c.name = name
29179	return c
29180}
29181
29182// Fields allows partial responses to be retrieved. See
29183// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29184// for more information.
29185func (c *ProjectsAgentVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentVersionsGetCall {
29186	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29187	return c
29188}
29189
29190// IfNoneMatch sets the optional parameter which makes the operation
29191// fail if the object's ETag matches the given value. This is useful for
29192// getting updates only after the object has changed since the last
29193// request. Use googleapi.IsNotModified to check whether the response
29194// error from Do is the result of In-None-Match.
29195func (c *ProjectsAgentVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentVersionsGetCall {
29196	c.ifNoneMatch_ = entityTag
29197	return c
29198}
29199
29200// Context sets the context to be used in this call's Do method. Any
29201// pending HTTP request will be aborted if the provided context is
29202// canceled.
29203func (c *ProjectsAgentVersionsGetCall) Context(ctx context.Context) *ProjectsAgentVersionsGetCall {
29204	c.ctx_ = ctx
29205	return c
29206}
29207
29208// Header returns an http.Header that can be modified by the caller to
29209// add HTTP headers to the request.
29210func (c *ProjectsAgentVersionsGetCall) Header() http.Header {
29211	if c.header_ == nil {
29212		c.header_ = make(http.Header)
29213	}
29214	return c.header_
29215}
29216
29217func (c *ProjectsAgentVersionsGetCall) doRequest(alt string) (*http.Response, error) {
29218	reqHeaders := make(http.Header)
29219	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
29220	for k, v := range c.header_ {
29221		reqHeaders[k] = v
29222	}
29223	reqHeaders.Set("User-Agent", c.s.userAgent())
29224	if c.ifNoneMatch_ != "" {
29225		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29226	}
29227	var body io.Reader = nil
29228	c.urlParams_.Set("alt", alt)
29229	c.urlParams_.Set("prettyPrint", "false")
29230	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
29231	urls += "?" + c.urlParams_.Encode()
29232	req, err := http.NewRequest("GET", urls, body)
29233	if err != nil {
29234		return nil, err
29235	}
29236	req.Header = reqHeaders
29237	googleapi.Expand(req.URL, map[string]string{
29238		"name": c.name,
29239	})
29240	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29241}
29242
29243// Do executes the "dialogflow.projects.agent.versions.get" call.
29244// Exactly one of *GoogleCloudDialogflowV2Version or error will be
29245// non-nil. Any non-2xx status code is an error. Response headers are in
29246// either *GoogleCloudDialogflowV2Version.ServerResponse.Header or (if a
29247// response was returned at all) in error.(*googleapi.Error).Header. Use
29248// googleapi.IsNotModified to check whether the returned error was
29249// because http.StatusNotModified was returned.
29250func (c *ProjectsAgentVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Version, error) {
29251	gensupport.SetOptions(c.urlParams_, opts...)
29252	res, err := c.doRequest("json")
29253	if res != nil && res.StatusCode == http.StatusNotModified {
29254		if res.Body != nil {
29255			res.Body.Close()
29256		}
29257		return nil, &googleapi.Error{
29258			Code:   res.StatusCode,
29259			Header: res.Header,
29260		}
29261	}
29262	if err != nil {
29263		return nil, err
29264	}
29265	defer googleapi.CloseBody(res)
29266	if err := googleapi.CheckResponse(res); err != nil {
29267		return nil, err
29268	}
29269	ret := &GoogleCloudDialogflowV2Version{
29270		ServerResponse: googleapi.ServerResponse{
29271			Header:         res.Header,
29272			HTTPStatusCode: res.StatusCode,
29273		},
29274	}
29275	target := &ret
29276	if err := gensupport.DecodeResponse(target, res); err != nil {
29277		return nil, err
29278	}
29279	return ret, nil
29280	// {
29281	//   "description": "Retrieves the specified agent version.",
29282	//   "flatPath": "v2/projects/{projectsId}/agent/versions/{versionsId}",
29283	//   "httpMethod": "GET",
29284	//   "id": "dialogflow.projects.agent.versions.get",
29285	//   "parameterOrder": [
29286	//     "name"
29287	//   ],
29288	//   "parameters": {
29289	//     "name": {
29290	//       "description": "Required. The name of the version. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`",
29291	//       "location": "path",
29292	//       "pattern": "^projects/[^/]+/agent/versions/[^/]+$",
29293	//       "required": true,
29294	//       "type": "string"
29295	//     }
29296	//   },
29297	//   "path": "v2/{+name}",
29298	//   "response": {
29299	//     "$ref": "GoogleCloudDialogflowV2Version"
29300	//   },
29301	//   "scopes": [
29302	//     "https://www.googleapis.com/auth/cloud-platform",
29303	//     "https://www.googleapis.com/auth/dialogflow"
29304	//   ]
29305	// }
29306
29307}
29308
29309// method id "dialogflow.projects.agent.versions.list":
29310
29311type ProjectsAgentVersionsListCall struct {
29312	s            *Service
29313	parent       string
29314	urlParams_   gensupport.URLParams
29315	ifNoneMatch_ string
29316	ctx_         context.Context
29317	header_      http.Header
29318}
29319
29320// List: Returns the list of all versions of the specified agent.
29321//
29322// - parent: The agent to list all versions from. Supported formats: -
29323//   `projects//agent` - `projects//locations//agent`.
29324func (r *ProjectsAgentVersionsService) List(parent string) *ProjectsAgentVersionsListCall {
29325	c := &ProjectsAgentVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29326	c.parent = parent
29327	return c
29328}
29329
29330// PageSize sets the optional parameter "pageSize": The maximum number
29331// of items to return in a single page. By default 100 and at most 1000.
29332func (c *ProjectsAgentVersionsListCall) PageSize(pageSize int64) *ProjectsAgentVersionsListCall {
29333	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29334	return c
29335}
29336
29337// PageToken sets the optional parameter "pageToken": The
29338// next_page_token value returned from a previous list request.
29339func (c *ProjectsAgentVersionsListCall) PageToken(pageToken string) *ProjectsAgentVersionsListCall {
29340	c.urlParams_.Set("pageToken", pageToken)
29341	return c
29342}
29343
29344// Fields allows partial responses to be retrieved. See
29345// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29346// for more information.
29347func (c *ProjectsAgentVersionsListCall) Fields(s ...googleapi.Field) *ProjectsAgentVersionsListCall {
29348	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29349	return c
29350}
29351
29352// IfNoneMatch sets the optional parameter which makes the operation
29353// fail if the object's ETag matches the given value. This is useful for
29354// getting updates only after the object has changed since the last
29355// request. Use googleapi.IsNotModified to check whether the response
29356// error from Do is the result of In-None-Match.
29357func (c *ProjectsAgentVersionsListCall) IfNoneMatch(entityTag string) *ProjectsAgentVersionsListCall {
29358	c.ifNoneMatch_ = entityTag
29359	return c
29360}
29361
29362// Context sets the context to be used in this call's Do method. Any
29363// pending HTTP request will be aborted if the provided context is
29364// canceled.
29365func (c *ProjectsAgentVersionsListCall) Context(ctx context.Context) *ProjectsAgentVersionsListCall {
29366	c.ctx_ = ctx
29367	return c
29368}
29369
29370// Header returns an http.Header that can be modified by the caller to
29371// add HTTP headers to the request.
29372func (c *ProjectsAgentVersionsListCall) Header() http.Header {
29373	if c.header_ == nil {
29374		c.header_ = make(http.Header)
29375	}
29376	return c.header_
29377}
29378
29379func (c *ProjectsAgentVersionsListCall) doRequest(alt string) (*http.Response, error) {
29380	reqHeaders := make(http.Header)
29381	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
29382	for k, v := range c.header_ {
29383		reqHeaders[k] = v
29384	}
29385	reqHeaders.Set("User-Agent", c.s.userAgent())
29386	if c.ifNoneMatch_ != "" {
29387		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29388	}
29389	var body io.Reader = nil
29390	c.urlParams_.Set("alt", alt)
29391	c.urlParams_.Set("prettyPrint", "false")
29392	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/versions")
29393	urls += "?" + c.urlParams_.Encode()
29394	req, err := http.NewRequest("GET", urls, body)
29395	if err != nil {
29396		return nil, err
29397	}
29398	req.Header = reqHeaders
29399	googleapi.Expand(req.URL, map[string]string{
29400		"parent": c.parent,
29401	})
29402	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29403}
29404
29405// Do executes the "dialogflow.projects.agent.versions.list" call.
29406// Exactly one of *GoogleCloudDialogflowV2ListVersionsResponse or error
29407// will be non-nil. Any non-2xx status code is an error. Response
29408// headers are in either
29409// *GoogleCloudDialogflowV2ListVersionsResponse.ServerResponse.Header or
29410// (if a response was returned at all) in
29411// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
29412// whether the returned error was because http.StatusNotModified was
29413// returned.
29414func (c *ProjectsAgentVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListVersionsResponse, error) {
29415	gensupport.SetOptions(c.urlParams_, opts...)
29416	res, err := c.doRequest("json")
29417	if res != nil && res.StatusCode == http.StatusNotModified {
29418		if res.Body != nil {
29419			res.Body.Close()
29420		}
29421		return nil, &googleapi.Error{
29422			Code:   res.StatusCode,
29423			Header: res.Header,
29424		}
29425	}
29426	if err != nil {
29427		return nil, err
29428	}
29429	defer googleapi.CloseBody(res)
29430	if err := googleapi.CheckResponse(res); err != nil {
29431		return nil, err
29432	}
29433	ret := &GoogleCloudDialogflowV2ListVersionsResponse{
29434		ServerResponse: googleapi.ServerResponse{
29435			Header:         res.Header,
29436			HTTPStatusCode: res.StatusCode,
29437		},
29438	}
29439	target := &ret
29440	if err := gensupport.DecodeResponse(target, res); err != nil {
29441		return nil, err
29442	}
29443	return ret, nil
29444	// {
29445	//   "description": "Returns the list of all versions of the specified agent.",
29446	//   "flatPath": "v2/projects/{projectsId}/agent/versions",
29447	//   "httpMethod": "GET",
29448	//   "id": "dialogflow.projects.agent.versions.list",
29449	//   "parameterOrder": [
29450	//     "parent"
29451	//   ],
29452	//   "parameters": {
29453	//     "pageSize": {
29454	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
29455	//       "format": "int32",
29456	//       "location": "query",
29457	//       "type": "integer"
29458	//     },
29459	//     "pageToken": {
29460	//       "description": "Optional. The next_page_token value returned from a previous list request.",
29461	//       "location": "query",
29462	//       "type": "string"
29463	//     },
29464	//     "parent": {
29465	//       "description": "Required. The agent to list all versions from. Supported formats: - `projects//agent` - `projects//locations//agent`",
29466	//       "location": "path",
29467	//       "pattern": "^projects/[^/]+/agent$",
29468	//       "required": true,
29469	//       "type": "string"
29470	//     }
29471	//   },
29472	//   "path": "v2/{+parent}/versions",
29473	//   "response": {
29474	//     "$ref": "GoogleCloudDialogflowV2ListVersionsResponse"
29475	//   },
29476	//   "scopes": [
29477	//     "https://www.googleapis.com/auth/cloud-platform",
29478	//     "https://www.googleapis.com/auth/dialogflow"
29479	//   ]
29480	// }
29481
29482}
29483
29484// Pages invokes f for each page of results.
29485// A non-nil error returned from f will halt the iteration.
29486// The provided context supersedes any context provided to the Context method.
29487func (c *ProjectsAgentVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListVersionsResponse) error) error {
29488	c.ctx_ = ctx
29489	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29490	for {
29491		x, err := c.Do()
29492		if err != nil {
29493			return err
29494		}
29495		if err := f(x); err != nil {
29496			return err
29497		}
29498		if x.NextPageToken == "" {
29499			return nil
29500		}
29501		c.PageToken(x.NextPageToken)
29502	}
29503}
29504
29505// method id "dialogflow.projects.agent.versions.patch":
29506
29507type ProjectsAgentVersionsPatchCall struct {
29508	s                              *Service
29509	nameid                         string
29510	googleclouddialogflowv2version *GoogleCloudDialogflowV2Version
29511	urlParams_                     gensupport.URLParams
29512	ctx_                           context.Context
29513	header_                        http.Header
29514}
29515
29516// Patch: Updates the specified agent version. Note that this method
29517// does not allow you to update the state of the agent the given version
29518// points to. It allows you to update only mutable properties of the
29519// version resource.
29520//
29521// - name: Output only. The unique identifier of this agent version.
29522//   Supported formats: - `projects//agent/versions/` -
29523//   `projects//locations//agent/versions/`.
29524func (r *ProjectsAgentVersionsService) Patch(nameid string, googleclouddialogflowv2version *GoogleCloudDialogflowV2Version) *ProjectsAgentVersionsPatchCall {
29525	c := &ProjectsAgentVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29526	c.nameid = nameid
29527	c.googleclouddialogflowv2version = googleclouddialogflowv2version
29528	return c
29529}
29530
29531// UpdateMask sets the optional parameter "updateMask": Required. The
29532// mask to control which fields get updated.
29533func (c *ProjectsAgentVersionsPatchCall) UpdateMask(updateMask string) *ProjectsAgentVersionsPatchCall {
29534	c.urlParams_.Set("updateMask", updateMask)
29535	return c
29536}
29537
29538// Fields allows partial responses to be retrieved. See
29539// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29540// for more information.
29541func (c *ProjectsAgentVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentVersionsPatchCall {
29542	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29543	return c
29544}
29545
29546// Context sets the context to be used in this call's Do method. Any
29547// pending HTTP request will be aborted if the provided context is
29548// canceled.
29549func (c *ProjectsAgentVersionsPatchCall) Context(ctx context.Context) *ProjectsAgentVersionsPatchCall {
29550	c.ctx_ = ctx
29551	return c
29552}
29553
29554// Header returns an http.Header that can be modified by the caller to
29555// add HTTP headers to the request.
29556func (c *ProjectsAgentVersionsPatchCall) Header() http.Header {
29557	if c.header_ == nil {
29558		c.header_ = make(http.Header)
29559	}
29560	return c.header_
29561}
29562
29563func (c *ProjectsAgentVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
29564	reqHeaders := make(http.Header)
29565	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
29566	for k, v := range c.header_ {
29567		reqHeaders[k] = v
29568	}
29569	reqHeaders.Set("User-Agent", c.s.userAgent())
29570	var body io.Reader = nil
29571	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2version)
29572	if err != nil {
29573		return nil, err
29574	}
29575	reqHeaders.Set("Content-Type", "application/json")
29576	c.urlParams_.Set("alt", alt)
29577	c.urlParams_.Set("prettyPrint", "false")
29578	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
29579	urls += "?" + c.urlParams_.Encode()
29580	req, err := http.NewRequest("PATCH", urls, body)
29581	if err != nil {
29582		return nil, err
29583	}
29584	req.Header = reqHeaders
29585	googleapi.Expand(req.URL, map[string]string{
29586		"name": c.nameid,
29587	})
29588	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29589}
29590
29591// Do executes the "dialogflow.projects.agent.versions.patch" call.
29592// Exactly one of *GoogleCloudDialogflowV2Version or error will be
29593// non-nil. Any non-2xx status code is an error. Response headers are in
29594// either *GoogleCloudDialogflowV2Version.ServerResponse.Header or (if a
29595// response was returned at all) in error.(*googleapi.Error).Header. Use
29596// googleapi.IsNotModified to check whether the returned error was
29597// because http.StatusNotModified was returned.
29598func (c *ProjectsAgentVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Version, error) {
29599	gensupport.SetOptions(c.urlParams_, opts...)
29600	res, err := c.doRequest("json")
29601	if res != nil && res.StatusCode == http.StatusNotModified {
29602		if res.Body != nil {
29603			res.Body.Close()
29604		}
29605		return nil, &googleapi.Error{
29606			Code:   res.StatusCode,
29607			Header: res.Header,
29608		}
29609	}
29610	if err != nil {
29611		return nil, err
29612	}
29613	defer googleapi.CloseBody(res)
29614	if err := googleapi.CheckResponse(res); err != nil {
29615		return nil, err
29616	}
29617	ret := &GoogleCloudDialogflowV2Version{
29618		ServerResponse: googleapi.ServerResponse{
29619			Header:         res.Header,
29620			HTTPStatusCode: res.StatusCode,
29621		},
29622	}
29623	target := &ret
29624	if err := gensupport.DecodeResponse(target, res); err != nil {
29625		return nil, err
29626	}
29627	return ret, nil
29628	// {
29629	//   "description": "Updates the specified agent version. Note that this method does not allow you to update the state of the agent the given version points to. It allows you to update only mutable properties of the version resource.",
29630	//   "flatPath": "v2/projects/{projectsId}/agent/versions/{versionsId}",
29631	//   "httpMethod": "PATCH",
29632	//   "id": "dialogflow.projects.agent.versions.patch",
29633	//   "parameterOrder": [
29634	//     "name"
29635	//   ],
29636	//   "parameters": {
29637	//     "name": {
29638	//       "description": "Output only. The unique identifier of this agent version. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`",
29639	//       "location": "path",
29640	//       "pattern": "^projects/[^/]+/agent/versions/[^/]+$",
29641	//       "required": true,
29642	//       "type": "string"
29643	//     },
29644	//     "updateMask": {
29645	//       "description": "Required. The mask to control which fields get updated.",
29646	//       "format": "google-fieldmask",
29647	//       "location": "query",
29648	//       "type": "string"
29649	//     }
29650	//   },
29651	//   "path": "v2/{+name}",
29652	//   "request": {
29653	//     "$ref": "GoogleCloudDialogflowV2Version"
29654	//   },
29655	//   "response": {
29656	//     "$ref": "GoogleCloudDialogflowV2Version"
29657	//   },
29658	//   "scopes": [
29659	//     "https://www.googleapis.com/auth/cloud-platform",
29660	//     "https://www.googleapis.com/auth/dialogflow"
29661	//   ]
29662	// }
29663
29664}
29665
29666// method id "dialogflow.projects.answerRecords.list":
29667
29668type ProjectsAnswerRecordsListCall struct {
29669	s            *Service
29670	parent       string
29671	urlParams_   gensupport.URLParams
29672	ifNoneMatch_ string
29673	ctx_         context.Context
29674	header_      http.Header
29675}
29676
29677// List: Returns the list of all answer records in the specified project
29678// in reverse chronological order.
29679//
29680// - parent: The project to list all answer records for in reverse
29681//   chronological order. Format: `projects//locations/`.
29682func (r *ProjectsAnswerRecordsService) List(parent string) *ProjectsAnswerRecordsListCall {
29683	c := &ProjectsAnswerRecordsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29684	c.parent = parent
29685	return c
29686}
29687
29688// Filter sets the optional parameter "filter": Required. Filters to
29689// restrict results to specific answer records. Filter on answer record
29690// type. Currently predicates on `type` is supported, valid values are
29691// `ARTICLE_ANSWER`, `FAQ_ANSWER`. For more information about filtering,
29692// see API Filtering (https://aip.dev/160).
29693func (c *ProjectsAnswerRecordsListCall) Filter(filter string) *ProjectsAnswerRecordsListCall {
29694	c.urlParams_.Set("filter", filter)
29695	return c
29696}
29697
29698// PageSize sets the optional parameter "pageSize": The maximum number
29699// of records to return in a single page. The server may return fewer
29700// records than this. If unspecified, we use 10. The maximum is 100.
29701func (c *ProjectsAnswerRecordsListCall) PageSize(pageSize int64) *ProjectsAnswerRecordsListCall {
29702	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29703	return c
29704}
29705
29706// PageToken sets the optional parameter "pageToken": The
29707// ListAnswerRecordsResponse.next_page_token value returned from a
29708// previous list request used to continue listing on the next page.
29709func (c *ProjectsAnswerRecordsListCall) PageToken(pageToken string) *ProjectsAnswerRecordsListCall {
29710	c.urlParams_.Set("pageToken", pageToken)
29711	return c
29712}
29713
29714// Fields allows partial responses to be retrieved. See
29715// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29716// for more information.
29717func (c *ProjectsAnswerRecordsListCall) Fields(s ...googleapi.Field) *ProjectsAnswerRecordsListCall {
29718	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29719	return c
29720}
29721
29722// IfNoneMatch sets the optional parameter which makes the operation
29723// fail if the object's ETag matches the given value. This is useful for
29724// getting updates only after the object has changed since the last
29725// request. Use googleapi.IsNotModified to check whether the response
29726// error from Do is the result of In-None-Match.
29727func (c *ProjectsAnswerRecordsListCall) IfNoneMatch(entityTag string) *ProjectsAnswerRecordsListCall {
29728	c.ifNoneMatch_ = entityTag
29729	return c
29730}
29731
29732// Context sets the context to be used in this call's Do method. Any
29733// pending HTTP request will be aborted if the provided context is
29734// canceled.
29735func (c *ProjectsAnswerRecordsListCall) Context(ctx context.Context) *ProjectsAnswerRecordsListCall {
29736	c.ctx_ = ctx
29737	return c
29738}
29739
29740// Header returns an http.Header that can be modified by the caller to
29741// add HTTP headers to the request.
29742func (c *ProjectsAnswerRecordsListCall) Header() http.Header {
29743	if c.header_ == nil {
29744		c.header_ = make(http.Header)
29745	}
29746	return c.header_
29747}
29748
29749func (c *ProjectsAnswerRecordsListCall) doRequest(alt string) (*http.Response, error) {
29750	reqHeaders := make(http.Header)
29751	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
29752	for k, v := range c.header_ {
29753		reqHeaders[k] = v
29754	}
29755	reqHeaders.Set("User-Agent", c.s.userAgent())
29756	if c.ifNoneMatch_ != "" {
29757		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29758	}
29759	var body io.Reader = nil
29760	c.urlParams_.Set("alt", alt)
29761	c.urlParams_.Set("prettyPrint", "false")
29762	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/answerRecords")
29763	urls += "?" + c.urlParams_.Encode()
29764	req, err := http.NewRequest("GET", urls, body)
29765	if err != nil {
29766		return nil, err
29767	}
29768	req.Header = reqHeaders
29769	googleapi.Expand(req.URL, map[string]string{
29770		"parent": c.parent,
29771	})
29772	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29773}
29774
29775// Do executes the "dialogflow.projects.answerRecords.list" call.
29776// Exactly one of *GoogleCloudDialogflowV2ListAnswerRecordsResponse or
29777// error will be non-nil. Any non-2xx status code is an error. Response
29778// headers are in either
29779// *GoogleCloudDialogflowV2ListAnswerRecordsResponse.ServerResponse.Heade
29780// r or (if a response was returned at all) in
29781// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
29782// whether the returned error was because http.StatusNotModified was
29783// returned.
29784func (c *ProjectsAnswerRecordsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListAnswerRecordsResponse, error) {
29785	gensupport.SetOptions(c.urlParams_, opts...)
29786	res, err := c.doRequest("json")
29787	if res != nil && res.StatusCode == http.StatusNotModified {
29788		if res.Body != nil {
29789			res.Body.Close()
29790		}
29791		return nil, &googleapi.Error{
29792			Code:   res.StatusCode,
29793			Header: res.Header,
29794		}
29795	}
29796	if err != nil {
29797		return nil, err
29798	}
29799	defer googleapi.CloseBody(res)
29800	if err := googleapi.CheckResponse(res); err != nil {
29801		return nil, err
29802	}
29803	ret := &GoogleCloudDialogflowV2ListAnswerRecordsResponse{
29804		ServerResponse: googleapi.ServerResponse{
29805			Header:         res.Header,
29806			HTTPStatusCode: res.StatusCode,
29807		},
29808	}
29809	target := &ret
29810	if err := gensupport.DecodeResponse(target, res); err != nil {
29811		return nil, err
29812	}
29813	return ret, nil
29814	// {
29815	//   "description": "Returns the list of all answer records in the specified project in reverse chronological order.",
29816	//   "flatPath": "v2/projects/{projectsId}/answerRecords",
29817	//   "httpMethod": "GET",
29818	//   "id": "dialogflow.projects.answerRecords.list",
29819	//   "parameterOrder": [
29820	//     "parent"
29821	//   ],
29822	//   "parameters": {
29823	//     "filter": {
29824	//       "description": "Required. Filters to restrict results to specific answer records. Filter on answer record type. Currently predicates on `type` is supported, valid values are `ARTICLE_ANSWER`, `FAQ_ANSWER`. For more information about filtering, see [API Filtering](https://aip.dev/160).",
29825	//       "location": "query",
29826	//       "type": "string"
29827	//     },
29828	//     "pageSize": {
29829	//       "description": "Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100.",
29830	//       "format": "int32",
29831	//       "location": "query",
29832	//       "type": "integer"
29833	//     },
29834	//     "pageToken": {
29835	//       "description": "Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page.",
29836	//       "location": "query",
29837	//       "type": "string"
29838	//     },
29839	//     "parent": {
29840	//       "description": "Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`.",
29841	//       "location": "path",
29842	//       "pattern": "^projects/[^/]+$",
29843	//       "required": true,
29844	//       "type": "string"
29845	//     }
29846	//   },
29847	//   "path": "v2/{+parent}/answerRecords",
29848	//   "response": {
29849	//     "$ref": "GoogleCloudDialogflowV2ListAnswerRecordsResponse"
29850	//   },
29851	//   "scopes": [
29852	//     "https://www.googleapis.com/auth/cloud-platform",
29853	//     "https://www.googleapis.com/auth/dialogflow"
29854	//   ]
29855	// }
29856
29857}
29858
29859// Pages invokes f for each page of results.
29860// A non-nil error returned from f will halt the iteration.
29861// The provided context supersedes any context provided to the Context method.
29862func (c *ProjectsAnswerRecordsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListAnswerRecordsResponse) error) error {
29863	c.ctx_ = ctx
29864	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29865	for {
29866		x, err := c.Do()
29867		if err != nil {
29868			return err
29869		}
29870		if err := f(x); err != nil {
29871			return err
29872		}
29873		if x.NextPageToken == "" {
29874			return nil
29875		}
29876		c.PageToken(x.NextPageToken)
29877	}
29878}
29879
29880// method id "dialogflow.projects.answerRecords.patch":
29881
29882type ProjectsAnswerRecordsPatchCall struct {
29883	s                                   *Service
29884	nameid                              string
29885	googleclouddialogflowv2answerrecord *GoogleCloudDialogflowV2AnswerRecord
29886	urlParams_                          gensupport.URLParams
29887	ctx_                                context.Context
29888	header_                             http.Header
29889}
29890
29891// Patch: Updates the specified answer record.
29892//
29893// - name: The unique identifier of this answer record. Format:
29894//   `projects//locations//answerRecords/`.
29895func (r *ProjectsAnswerRecordsService) Patch(nameid string, googleclouddialogflowv2answerrecord *GoogleCloudDialogflowV2AnswerRecord) *ProjectsAnswerRecordsPatchCall {
29896	c := &ProjectsAnswerRecordsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29897	c.nameid = nameid
29898	c.googleclouddialogflowv2answerrecord = googleclouddialogflowv2answerrecord
29899	return c
29900}
29901
29902// UpdateMask sets the optional parameter "updateMask": Required. The
29903// mask to control which fields get updated.
29904func (c *ProjectsAnswerRecordsPatchCall) UpdateMask(updateMask string) *ProjectsAnswerRecordsPatchCall {
29905	c.urlParams_.Set("updateMask", updateMask)
29906	return c
29907}
29908
29909// Fields allows partial responses to be retrieved. See
29910// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29911// for more information.
29912func (c *ProjectsAnswerRecordsPatchCall) Fields(s ...googleapi.Field) *ProjectsAnswerRecordsPatchCall {
29913	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29914	return c
29915}
29916
29917// Context sets the context to be used in this call's Do method. Any
29918// pending HTTP request will be aborted if the provided context is
29919// canceled.
29920func (c *ProjectsAnswerRecordsPatchCall) Context(ctx context.Context) *ProjectsAnswerRecordsPatchCall {
29921	c.ctx_ = ctx
29922	return c
29923}
29924
29925// Header returns an http.Header that can be modified by the caller to
29926// add HTTP headers to the request.
29927func (c *ProjectsAnswerRecordsPatchCall) Header() http.Header {
29928	if c.header_ == nil {
29929		c.header_ = make(http.Header)
29930	}
29931	return c.header_
29932}
29933
29934func (c *ProjectsAnswerRecordsPatchCall) doRequest(alt string) (*http.Response, error) {
29935	reqHeaders := make(http.Header)
29936	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
29937	for k, v := range c.header_ {
29938		reqHeaders[k] = v
29939	}
29940	reqHeaders.Set("User-Agent", c.s.userAgent())
29941	var body io.Reader = nil
29942	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2answerrecord)
29943	if err != nil {
29944		return nil, err
29945	}
29946	reqHeaders.Set("Content-Type", "application/json")
29947	c.urlParams_.Set("alt", alt)
29948	c.urlParams_.Set("prettyPrint", "false")
29949	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
29950	urls += "?" + c.urlParams_.Encode()
29951	req, err := http.NewRequest("PATCH", urls, body)
29952	if err != nil {
29953		return nil, err
29954	}
29955	req.Header = reqHeaders
29956	googleapi.Expand(req.URL, map[string]string{
29957		"name": c.nameid,
29958	})
29959	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29960}
29961
29962// Do executes the "dialogflow.projects.answerRecords.patch" call.
29963// Exactly one of *GoogleCloudDialogflowV2AnswerRecord or error will be
29964// non-nil. Any non-2xx status code is an error. Response headers are in
29965// either *GoogleCloudDialogflowV2AnswerRecord.ServerResponse.Header or
29966// (if a response was returned at all) in
29967// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
29968// whether the returned error was because http.StatusNotModified was
29969// returned.
29970func (c *ProjectsAnswerRecordsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2AnswerRecord, error) {
29971	gensupport.SetOptions(c.urlParams_, opts...)
29972	res, err := c.doRequest("json")
29973	if res != nil && res.StatusCode == http.StatusNotModified {
29974		if res.Body != nil {
29975			res.Body.Close()
29976		}
29977		return nil, &googleapi.Error{
29978			Code:   res.StatusCode,
29979			Header: res.Header,
29980		}
29981	}
29982	if err != nil {
29983		return nil, err
29984	}
29985	defer googleapi.CloseBody(res)
29986	if err := googleapi.CheckResponse(res); err != nil {
29987		return nil, err
29988	}
29989	ret := &GoogleCloudDialogflowV2AnswerRecord{
29990		ServerResponse: googleapi.ServerResponse{
29991			Header:         res.Header,
29992			HTTPStatusCode: res.StatusCode,
29993		},
29994	}
29995	target := &ret
29996	if err := gensupport.DecodeResponse(target, res); err != nil {
29997		return nil, err
29998	}
29999	return ret, nil
30000	// {
30001	//   "description": "Updates the specified answer record.",
30002	//   "flatPath": "v2/projects/{projectsId}/answerRecords/{answerRecordsId}",
30003	//   "httpMethod": "PATCH",
30004	//   "id": "dialogflow.projects.answerRecords.patch",
30005	//   "parameterOrder": [
30006	//     "name"
30007	//   ],
30008	//   "parameters": {
30009	//     "name": {
30010	//       "description": "The unique identifier of this answer record. Format: `projects//locations//answerRecords/`.",
30011	//       "location": "path",
30012	//       "pattern": "^projects/[^/]+/answerRecords/[^/]+$",
30013	//       "required": true,
30014	//       "type": "string"
30015	//     },
30016	//     "updateMask": {
30017	//       "description": "Required. The mask to control which fields get updated.",
30018	//       "format": "google-fieldmask",
30019	//       "location": "query",
30020	//       "type": "string"
30021	//     }
30022	//   },
30023	//   "path": "v2/{+name}",
30024	//   "request": {
30025	//     "$ref": "GoogleCloudDialogflowV2AnswerRecord"
30026	//   },
30027	//   "response": {
30028	//     "$ref": "GoogleCloudDialogflowV2AnswerRecord"
30029	//   },
30030	//   "scopes": [
30031	//     "https://www.googleapis.com/auth/cloud-platform",
30032	//     "https://www.googleapis.com/auth/dialogflow"
30033	//   ]
30034	// }
30035
30036}
30037
30038// method id "dialogflow.projects.conversationProfiles.create":
30039
30040type ProjectsConversationProfilesCreateCall struct {
30041	s                                          *Service
30042	parent                                     string
30043	googleclouddialogflowv2conversationprofile *GoogleCloudDialogflowV2ConversationProfile
30044	urlParams_                                 gensupport.URLParams
30045	ctx_                                       context.Context
30046	header_                                    http.Header
30047}
30048
30049// Create: Creates a conversation profile in the specified project.
30050// ConversationProfile.CreateTime and ConversationProfile.UpdateTime
30051// aren't populated in the response. You can retrieve them via
30052// GetConversationProfile API.
30053//
30054// - parent: The project to create a conversation profile for. Format:
30055//   `projects//locations/`.
30056func (r *ProjectsConversationProfilesService) Create(parent string, googleclouddialogflowv2conversationprofile *GoogleCloudDialogflowV2ConversationProfile) *ProjectsConversationProfilesCreateCall {
30057	c := &ProjectsConversationProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30058	c.parent = parent
30059	c.googleclouddialogflowv2conversationprofile = googleclouddialogflowv2conversationprofile
30060	return c
30061}
30062
30063// Fields allows partial responses to be retrieved. See
30064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30065// for more information.
30066func (c *ProjectsConversationProfilesCreateCall) Fields(s ...googleapi.Field) *ProjectsConversationProfilesCreateCall {
30067	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30068	return c
30069}
30070
30071// Context sets the context to be used in this call's Do method. Any
30072// pending HTTP request will be aborted if the provided context is
30073// canceled.
30074func (c *ProjectsConversationProfilesCreateCall) Context(ctx context.Context) *ProjectsConversationProfilesCreateCall {
30075	c.ctx_ = ctx
30076	return c
30077}
30078
30079// Header returns an http.Header that can be modified by the caller to
30080// add HTTP headers to the request.
30081func (c *ProjectsConversationProfilesCreateCall) Header() http.Header {
30082	if c.header_ == nil {
30083		c.header_ = make(http.Header)
30084	}
30085	return c.header_
30086}
30087
30088func (c *ProjectsConversationProfilesCreateCall) doRequest(alt string) (*http.Response, error) {
30089	reqHeaders := make(http.Header)
30090	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
30091	for k, v := range c.header_ {
30092		reqHeaders[k] = v
30093	}
30094	reqHeaders.Set("User-Agent", c.s.userAgent())
30095	var body io.Reader = nil
30096	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2conversationprofile)
30097	if err != nil {
30098		return nil, err
30099	}
30100	reqHeaders.Set("Content-Type", "application/json")
30101	c.urlParams_.Set("alt", alt)
30102	c.urlParams_.Set("prettyPrint", "false")
30103	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/conversationProfiles")
30104	urls += "?" + c.urlParams_.Encode()
30105	req, err := http.NewRequest("POST", urls, body)
30106	if err != nil {
30107		return nil, err
30108	}
30109	req.Header = reqHeaders
30110	googleapi.Expand(req.URL, map[string]string{
30111		"parent": c.parent,
30112	})
30113	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30114}
30115
30116// Do executes the "dialogflow.projects.conversationProfiles.create" call.
30117// Exactly one of *GoogleCloudDialogflowV2ConversationProfile or error
30118// will be non-nil. Any non-2xx status code is an error. Response
30119// headers are in either
30120// *GoogleCloudDialogflowV2ConversationProfile.ServerResponse.Header or
30121// (if a response was returned at all) in
30122// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
30123// whether the returned error was because http.StatusNotModified was
30124// returned.
30125func (c *ProjectsConversationProfilesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ConversationProfile, error) {
30126	gensupport.SetOptions(c.urlParams_, opts...)
30127	res, err := c.doRequest("json")
30128	if res != nil && res.StatusCode == http.StatusNotModified {
30129		if res.Body != nil {
30130			res.Body.Close()
30131		}
30132		return nil, &googleapi.Error{
30133			Code:   res.StatusCode,
30134			Header: res.Header,
30135		}
30136	}
30137	if err != nil {
30138		return nil, err
30139	}
30140	defer googleapi.CloseBody(res)
30141	if err := googleapi.CheckResponse(res); err != nil {
30142		return nil, err
30143	}
30144	ret := &GoogleCloudDialogflowV2ConversationProfile{
30145		ServerResponse: googleapi.ServerResponse{
30146			Header:         res.Header,
30147			HTTPStatusCode: res.StatusCode,
30148		},
30149	}
30150	target := &ret
30151	if err := gensupport.DecodeResponse(target, res); err != nil {
30152		return nil, err
30153	}
30154	return ret, nil
30155	// {
30156	//   "description": "Creates a conversation profile in the specified project. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.",
30157	//   "flatPath": "v2/projects/{projectsId}/conversationProfiles",
30158	//   "httpMethod": "POST",
30159	//   "id": "dialogflow.projects.conversationProfiles.create",
30160	//   "parameterOrder": [
30161	//     "parent"
30162	//   ],
30163	//   "parameters": {
30164	//     "parent": {
30165	//       "description": "Required. The project to create a conversation profile for. Format: `projects//locations/`.",
30166	//       "location": "path",
30167	//       "pattern": "^projects/[^/]+$",
30168	//       "required": true,
30169	//       "type": "string"
30170	//     }
30171	//   },
30172	//   "path": "v2/{+parent}/conversationProfiles",
30173	//   "request": {
30174	//     "$ref": "GoogleCloudDialogflowV2ConversationProfile"
30175	//   },
30176	//   "response": {
30177	//     "$ref": "GoogleCloudDialogflowV2ConversationProfile"
30178	//   },
30179	//   "scopes": [
30180	//     "https://www.googleapis.com/auth/cloud-platform",
30181	//     "https://www.googleapis.com/auth/dialogflow"
30182	//   ]
30183	// }
30184
30185}
30186
30187// method id "dialogflow.projects.conversationProfiles.delete":
30188
30189type ProjectsConversationProfilesDeleteCall struct {
30190	s          *Service
30191	name       string
30192	urlParams_ gensupport.URLParams
30193	ctx_       context.Context
30194	header_    http.Header
30195}
30196
30197// Delete: Deletes the specified conversation profile.
30198//
30199// - name: The name of the conversation profile to delete. Format:
30200//   `projects//locations//conversationProfiles/`.
30201func (r *ProjectsConversationProfilesService) Delete(name string) *ProjectsConversationProfilesDeleteCall {
30202	c := &ProjectsConversationProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30203	c.name = name
30204	return c
30205}
30206
30207// Fields allows partial responses to be retrieved. See
30208// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30209// for more information.
30210func (c *ProjectsConversationProfilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsConversationProfilesDeleteCall {
30211	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30212	return c
30213}
30214
30215// Context sets the context to be used in this call's Do method. Any
30216// pending HTTP request will be aborted if the provided context is
30217// canceled.
30218func (c *ProjectsConversationProfilesDeleteCall) Context(ctx context.Context) *ProjectsConversationProfilesDeleteCall {
30219	c.ctx_ = ctx
30220	return c
30221}
30222
30223// Header returns an http.Header that can be modified by the caller to
30224// add HTTP headers to the request.
30225func (c *ProjectsConversationProfilesDeleteCall) Header() http.Header {
30226	if c.header_ == nil {
30227		c.header_ = make(http.Header)
30228	}
30229	return c.header_
30230}
30231
30232func (c *ProjectsConversationProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
30233	reqHeaders := make(http.Header)
30234	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
30235	for k, v := range c.header_ {
30236		reqHeaders[k] = v
30237	}
30238	reqHeaders.Set("User-Agent", c.s.userAgent())
30239	var body io.Reader = nil
30240	c.urlParams_.Set("alt", alt)
30241	c.urlParams_.Set("prettyPrint", "false")
30242	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
30243	urls += "?" + c.urlParams_.Encode()
30244	req, err := http.NewRequest("DELETE", urls, body)
30245	if err != nil {
30246		return nil, err
30247	}
30248	req.Header = reqHeaders
30249	googleapi.Expand(req.URL, map[string]string{
30250		"name": c.name,
30251	})
30252	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30253}
30254
30255// Do executes the "dialogflow.projects.conversationProfiles.delete" call.
30256// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
30257// non-2xx status code is an error. Response headers are in either
30258// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
30259// returned at all) in error.(*googleapi.Error).Header. Use
30260// googleapi.IsNotModified to check whether the returned error was
30261// because http.StatusNotModified was returned.
30262func (c *ProjectsConversationProfilesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
30263	gensupport.SetOptions(c.urlParams_, opts...)
30264	res, err := c.doRequest("json")
30265	if res != nil && res.StatusCode == http.StatusNotModified {
30266		if res.Body != nil {
30267			res.Body.Close()
30268		}
30269		return nil, &googleapi.Error{
30270			Code:   res.StatusCode,
30271			Header: res.Header,
30272		}
30273	}
30274	if err != nil {
30275		return nil, err
30276	}
30277	defer googleapi.CloseBody(res)
30278	if err := googleapi.CheckResponse(res); err != nil {
30279		return nil, err
30280	}
30281	ret := &GoogleProtobufEmpty{
30282		ServerResponse: googleapi.ServerResponse{
30283			Header:         res.Header,
30284			HTTPStatusCode: res.StatusCode,
30285		},
30286	}
30287	target := &ret
30288	if err := gensupport.DecodeResponse(target, res); err != nil {
30289		return nil, err
30290	}
30291	return ret, nil
30292	// {
30293	//   "description": "Deletes the specified conversation profile.",
30294	//   "flatPath": "v2/projects/{projectsId}/conversationProfiles/{conversationProfilesId}",
30295	//   "httpMethod": "DELETE",
30296	//   "id": "dialogflow.projects.conversationProfiles.delete",
30297	//   "parameterOrder": [
30298	//     "name"
30299	//   ],
30300	//   "parameters": {
30301	//     "name": {
30302	//       "description": "Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`.",
30303	//       "location": "path",
30304	//       "pattern": "^projects/[^/]+/conversationProfiles/[^/]+$",
30305	//       "required": true,
30306	//       "type": "string"
30307	//     }
30308	//   },
30309	//   "path": "v2/{+name}",
30310	//   "response": {
30311	//     "$ref": "GoogleProtobufEmpty"
30312	//   },
30313	//   "scopes": [
30314	//     "https://www.googleapis.com/auth/cloud-platform",
30315	//     "https://www.googleapis.com/auth/dialogflow"
30316	//   ]
30317	// }
30318
30319}
30320
30321// method id "dialogflow.projects.conversationProfiles.get":
30322
30323type ProjectsConversationProfilesGetCall struct {
30324	s            *Service
30325	name         string
30326	urlParams_   gensupport.URLParams
30327	ifNoneMatch_ string
30328	ctx_         context.Context
30329	header_      http.Header
30330}
30331
30332// Get: Retrieves the specified conversation profile.
30333//
30334// - name: The resource name of the conversation profile. Format:
30335//   `projects//locations//conversationProfiles/`.
30336func (r *ProjectsConversationProfilesService) Get(name string) *ProjectsConversationProfilesGetCall {
30337	c := &ProjectsConversationProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30338	c.name = name
30339	return c
30340}
30341
30342// Fields allows partial responses to be retrieved. See
30343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30344// for more information.
30345func (c *ProjectsConversationProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsConversationProfilesGetCall {
30346	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30347	return c
30348}
30349
30350// IfNoneMatch sets the optional parameter which makes the operation
30351// fail if the object's ETag matches the given value. This is useful for
30352// getting updates only after the object has changed since the last
30353// request. Use googleapi.IsNotModified to check whether the response
30354// error from Do is the result of In-None-Match.
30355func (c *ProjectsConversationProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsConversationProfilesGetCall {
30356	c.ifNoneMatch_ = entityTag
30357	return c
30358}
30359
30360// Context sets the context to be used in this call's Do method. Any
30361// pending HTTP request will be aborted if the provided context is
30362// canceled.
30363func (c *ProjectsConversationProfilesGetCall) Context(ctx context.Context) *ProjectsConversationProfilesGetCall {
30364	c.ctx_ = ctx
30365	return c
30366}
30367
30368// Header returns an http.Header that can be modified by the caller to
30369// add HTTP headers to the request.
30370func (c *ProjectsConversationProfilesGetCall) Header() http.Header {
30371	if c.header_ == nil {
30372		c.header_ = make(http.Header)
30373	}
30374	return c.header_
30375}
30376
30377func (c *ProjectsConversationProfilesGetCall) doRequest(alt string) (*http.Response, error) {
30378	reqHeaders := make(http.Header)
30379	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
30380	for k, v := range c.header_ {
30381		reqHeaders[k] = v
30382	}
30383	reqHeaders.Set("User-Agent", c.s.userAgent())
30384	if c.ifNoneMatch_ != "" {
30385		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30386	}
30387	var body io.Reader = nil
30388	c.urlParams_.Set("alt", alt)
30389	c.urlParams_.Set("prettyPrint", "false")
30390	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
30391	urls += "?" + c.urlParams_.Encode()
30392	req, err := http.NewRequest("GET", urls, body)
30393	if err != nil {
30394		return nil, err
30395	}
30396	req.Header = reqHeaders
30397	googleapi.Expand(req.URL, map[string]string{
30398		"name": c.name,
30399	})
30400	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30401}
30402
30403// Do executes the "dialogflow.projects.conversationProfiles.get" call.
30404// Exactly one of *GoogleCloudDialogflowV2ConversationProfile or error
30405// will be non-nil. Any non-2xx status code is an error. Response
30406// headers are in either
30407// *GoogleCloudDialogflowV2ConversationProfile.ServerResponse.Header or
30408// (if a response was returned at all) in
30409// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
30410// whether the returned error was because http.StatusNotModified was
30411// returned.
30412func (c *ProjectsConversationProfilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ConversationProfile, error) {
30413	gensupport.SetOptions(c.urlParams_, opts...)
30414	res, err := c.doRequest("json")
30415	if res != nil && res.StatusCode == http.StatusNotModified {
30416		if res.Body != nil {
30417			res.Body.Close()
30418		}
30419		return nil, &googleapi.Error{
30420			Code:   res.StatusCode,
30421			Header: res.Header,
30422		}
30423	}
30424	if err != nil {
30425		return nil, err
30426	}
30427	defer googleapi.CloseBody(res)
30428	if err := googleapi.CheckResponse(res); err != nil {
30429		return nil, err
30430	}
30431	ret := &GoogleCloudDialogflowV2ConversationProfile{
30432		ServerResponse: googleapi.ServerResponse{
30433			Header:         res.Header,
30434			HTTPStatusCode: res.StatusCode,
30435		},
30436	}
30437	target := &ret
30438	if err := gensupport.DecodeResponse(target, res); err != nil {
30439		return nil, err
30440	}
30441	return ret, nil
30442	// {
30443	//   "description": "Retrieves the specified conversation profile.",
30444	//   "flatPath": "v2/projects/{projectsId}/conversationProfiles/{conversationProfilesId}",
30445	//   "httpMethod": "GET",
30446	//   "id": "dialogflow.projects.conversationProfiles.get",
30447	//   "parameterOrder": [
30448	//     "name"
30449	//   ],
30450	//   "parameters": {
30451	//     "name": {
30452	//       "description": "Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`.",
30453	//       "location": "path",
30454	//       "pattern": "^projects/[^/]+/conversationProfiles/[^/]+$",
30455	//       "required": true,
30456	//       "type": "string"
30457	//     }
30458	//   },
30459	//   "path": "v2/{+name}",
30460	//   "response": {
30461	//     "$ref": "GoogleCloudDialogflowV2ConversationProfile"
30462	//   },
30463	//   "scopes": [
30464	//     "https://www.googleapis.com/auth/cloud-platform",
30465	//     "https://www.googleapis.com/auth/dialogflow"
30466	//   ]
30467	// }
30468
30469}
30470
30471// method id "dialogflow.projects.conversationProfiles.list":
30472
30473type ProjectsConversationProfilesListCall struct {
30474	s            *Service
30475	parent       string
30476	urlParams_   gensupport.URLParams
30477	ifNoneMatch_ string
30478	ctx_         context.Context
30479	header_      http.Header
30480}
30481
30482// List: Returns the list of all conversation profiles in the specified
30483// project.
30484//
30485// - parent: The project to list all conversation profiles from. Format:
30486//   `projects//locations/`.
30487func (r *ProjectsConversationProfilesService) List(parent string) *ProjectsConversationProfilesListCall {
30488	c := &ProjectsConversationProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30489	c.parent = parent
30490	return c
30491}
30492
30493// PageSize sets the optional parameter "pageSize": The maximum number
30494// of items to return in a single page. By default 100 and at most 1000.
30495func (c *ProjectsConversationProfilesListCall) PageSize(pageSize int64) *ProjectsConversationProfilesListCall {
30496	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
30497	return c
30498}
30499
30500// PageToken sets the optional parameter "pageToken": The
30501// next_page_token value returned from a previous list request.
30502func (c *ProjectsConversationProfilesListCall) PageToken(pageToken string) *ProjectsConversationProfilesListCall {
30503	c.urlParams_.Set("pageToken", pageToken)
30504	return c
30505}
30506
30507// Fields allows partial responses to be retrieved. See
30508// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30509// for more information.
30510func (c *ProjectsConversationProfilesListCall) Fields(s ...googleapi.Field) *ProjectsConversationProfilesListCall {
30511	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30512	return c
30513}
30514
30515// IfNoneMatch sets the optional parameter which makes the operation
30516// fail if the object's ETag matches the given value. This is useful for
30517// getting updates only after the object has changed since the last
30518// request. Use googleapi.IsNotModified to check whether the response
30519// error from Do is the result of In-None-Match.
30520func (c *ProjectsConversationProfilesListCall) IfNoneMatch(entityTag string) *ProjectsConversationProfilesListCall {
30521	c.ifNoneMatch_ = entityTag
30522	return c
30523}
30524
30525// Context sets the context to be used in this call's Do method. Any
30526// pending HTTP request will be aborted if the provided context is
30527// canceled.
30528func (c *ProjectsConversationProfilesListCall) Context(ctx context.Context) *ProjectsConversationProfilesListCall {
30529	c.ctx_ = ctx
30530	return c
30531}
30532
30533// Header returns an http.Header that can be modified by the caller to
30534// add HTTP headers to the request.
30535func (c *ProjectsConversationProfilesListCall) Header() http.Header {
30536	if c.header_ == nil {
30537		c.header_ = make(http.Header)
30538	}
30539	return c.header_
30540}
30541
30542func (c *ProjectsConversationProfilesListCall) doRequest(alt string) (*http.Response, error) {
30543	reqHeaders := make(http.Header)
30544	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
30545	for k, v := range c.header_ {
30546		reqHeaders[k] = v
30547	}
30548	reqHeaders.Set("User-Agent", c.s.userAgent())
30549	if c.ifNoneMatch_ != "" {
30550		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30551	}
30552	var body io.Reader = nil
30553	c.urlParams_.Set("alt", alt)
30554	c.urlParams_.Set("prettyPrint", "false")
30555	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/conversationProfiles")
30556	urls += "?" + c.urlParams_.Encode()
30557	req, err := http.NewRequest("GET", urls, body)
30558	if err != nil {
30559		return nil, err
30560	}
30561	req.Header = reqHeaders
30562	googleapi.Expand(req.URL, map[string]string{
30563		"parent": c.parent,
30564	})
30565	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30566}
30567
30568// Do executes the "dialogflow.projects.conversationProfiles.list" call.
30569// Exactly one of
30570// *GoogleCloudDialogflowV2ListConversationProfilesResponse or error
30571// will be non-nil. Any non-2xx status code is an error. Response
30572// headers are in either
30573// *GoogleCloudDialogflowV2ListConversationProfilesResponse.ServerRespons
30574// e.Header or (if a response was returned at all) in
30575// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
30576// whether the returned error was because http.StatusNotModified was
30577// returned.
30578func (c *ProjectsConversationProfilesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListConversationProfilesResponse, error) {
30579	gensupport.SetOptions(c.urlParams_, opts...)
30580	res, err := c.doRequest("json")
30581	if res != nil && res.StatusCode == http.StatusNotModified {
30582		if res.Body != nil {
30583			res.Body.Close()
30584		}
30585		return nil, &googleapi.Error{
30586			Code:   res.StatusCode,
30587			Header: res.Header,
30588		}
30589	}
30590	if err != nil {
30591		return nil, err
30592	}
30593	defer googleapi.CloseBody(res)
30594	if err := googleapi.CheckResponse(res); err != nil {
30595		return nil, err
30596	}
30597	ret := &GoogleCloudDialogflowV2ListConversationProfilesResponse{
30598		ServerResponse: googleapi.ServerResponse{
30599			Header:         res.Header,
30600			HTTPStatusCode: res.StatusCode,
30601		},
30602	}
30603	target := &ret
30604	if err := gensupport.DecodeResponse(target, res); err != nil {
30605		return nil, err
30606	}
30607	return ret, nil
30608	// {
30609	//   "description": "Returns the list of all conversation profiles in the specified project.",
30610	//   "flatPath": "v2/projects/{projectsId}/conversationProfiles",
30611	//   "httpMethod": "GET",
30612	//   "id": "dialogflow.projects.conversationProfiles.list",
30613	//   "parameterOrder": [
30614	//     "parent"
30615	//   ],
30616	//   "parameters": {
30617	//     "pageSize": {
30618	//       "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.",
30619	//       "format": "int32",
30620	//       "location": "query",
30621	//       "type": "integer"
30622	//     },
30623	//     "pageToken": {
30624	//       "description": "The next_page_token value returned from a previous list request.",
30625	//       "location": "query",
30626	//       "type": "string"
30627	//     },
30628	//     "parent": {
30629	//       "description": "Required. The project to list all conversation profiles from. Format: `projects//locations/`.",
30630	//       "location": "path",
30631	//       "pattern": "^projects/[^/]+$",
30632	//       "required": true,
30633	//       "type": "string"
30634	//     }
30635	//   },
30636	//   "path": "v2/{+parent}/conversationProfiles",
30637	//   "response": {
30638	//     "$ref": "GoogleCloudDialogflowV2ListConversationProfilesResponse"
30639	//   },
30640	//   "scopes": [
30641	//     "https://www.googleapis.com/auth/cloud-platform",
30642	//     "https://www.googleapis.com/auth/dialogflow"
30643	//   ]
30644	// }
30645
30646}
30647
30648// Pages invokes f for each page of results.
30649// A non-nil error returned from f will halt the iteration.
30650// The provided context supersedes any context provided to the Context method.
30651func (c *ProjectsConversationProfilesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListConversationProfilesResponse) error) error {
30652	c.ctx_ = ctx
30653	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
30654	for {
30655		x, err := c.Do()
30656		if err != nil {
30657			return err
30658		}
30659		if err := f(x); err != nil {
30660			return err
30661		}
30662		if x.NextPageToken == "" {
30663			return nil
30664		}
30665		c.PageToken(x.NextPageToken)
30666	}
30667}
30668
30669// method id "dialogflow.projects.conversationProfiles.patch":
30670
30671type ProjectsConversationProfilesPatchCall struct {
30672	s                                          *Service
30673	nameid                                     string
30674	googleclouddialogflowv2conversationprofile *GoogleCloudDialogflowV2ConversationProfile
30675	urlParams_                                 gensupport.URLParams
30676	ctx_                                       context.Context
30677	header_                                    http.Header
30678}
30679
30680// Patch: Updates the specified conversation profile.
30681// ConversationProfile.CreateTime and ConversationProfile.UpdateTime
30682// aren't populated in the response. You can retrieve them via
30683// GetConversationProfile API.
30684//
30685// - name: The unique identifier of this conversation profile. Format:
30686//   `projects//locations//conversationProfiles/`.
30687func (r *ProjectsConversationProfilesService) Patch(nameid string, googleclouddialogflowv2conversationprofile *GoogleCloudDialogflowV2ConversationProfile) *ProjectsConversationProfilesPatchCall {
30688	c := &ProjectsConversationProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30689	c.nameid = nameid
30690	c.googleclouddialogflowv2conversationprofile = googleclouddialogflowv2conversationprofile
30691	return c
30692}
30693
30694// UpdateMask sets the optional parameter "updateMask": Required. The
30695// mask to control which fields to update.
30696func (c *ProjectsConversationProfilesPatchCall) UpdateMask(updateMask string) *ProjectsConversationProfilesPatchCall {
30697	c.urlParams_.Set("updateMask", updateMask)
30698	return c
30699}
30700
30701// Fields allows partial responses to be retrieved. See
30702// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30703// for more information.
30704func (c *ProjectsConversationProfilesPatchCall) Fields(s ...googleapi.Field) *ProjectsConversationProfilesPatchCall {
30705	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30706	return c
30707}
30708
30709// Context sets the context to be used in this call's Do method. Any
30710// pending HTTP request will be aborted if the provided context is
30711// canceled.
30712func (c *ProjectsConversationProfilesPatchCall) Context(ctx context.Context) *ProjectsConversationProfilesPatchCall {
30713	c.ctx_ = ctx
30714	return c
30715}
30716
30717// Header returns an http.Header that can be modified by the caller to
30718// add HTTP headers to the request.
30719func (c *ProjectsConversationProfilesPatchCall) Header() http.Header {
30720	if c.header_ == nil {
30721		c.header_ = make(http.Header)
30722	}
30723	return c.header_
30724}
30725
30726func (c *ProjectsConversationProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
30727	reqHeaders := make(http.Header)
30728	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
30729	for k, v := range c.header_ {
30730		reqHeaders[k] = v
30731	}
30732	reqHeaders.Set("User-Agent", c.s.userAgent())
30733	var body io.Reader = nil
30734	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2conversationprofile)
30735	if err != nil {
30736		return nil, err
30737	}
30738	reqHeaders.Set("Content-Type", "application/json")
30739	c.urlParams_.Set("alt", alt)
30740	c.urlParams_.Set("prettyPrint", "false")
30741	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
30742	urls += "?" + c.urlParams_.Encode()
30743	req, err := http.NewRequest("PATCH", urls, body)
30744	if err != nil {
30745		return nil, err
30746	}
30747	req.Header = reqHeaders
30748	googleapi.Expand(req.URL, map[string]string{
30749		"name": c.nameid,
30750	})
30751	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30752}
30753
30754// Do executes the "dialogflow.projects.conversationProfiles.patch" call.
30755// Exactly one of *GoogleCloudDialogflowV2ConversationProfile or error
30756// will be non-nil. Any non-2xx status code is an error. Response
30757// headers are in either
30758// *GoogleCloudDialogflowV2ConversationProfile.ServerResponse.Header or
30759// (if a response was returned at all) in
30760// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
30761// whether the returned error was because http.StatusNotModified was
30762// returned.
30763func (c *ProjectsConversationProfilesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ConversationProfile, error) {
30764	gensupport.SetOptions(c.urlParams_, opts...)
30765	res, err := c.doRequest("json")
30766	if res != nil && res.StatusCode == http.StatusNotModified {
30767		if res.Body != nil {
30768			res.Body.Close()
30769		}
30770		return nil, &googleapi.Error{
30771			Code:   res.StatusCode,
30772			Header: res.Header,
30773		}
30774	}
30775	if err != nil {
30776		return nil, err
30777	}
30778	defer googleapi.CloseBody(res)
30779	if err := googleapi.CheckResponse(res); err != nil {
30780		return nil, err
30781	}
30782	ret := &GoogleCloudDialogflowV2ConversationProfile{
30783		ServerResponse: googleapi.ServerResponse{
30784			Header:         res.Header,
30785			HTTPStatusCode: res.StatusCode,
30786		},
30787	}
30788	target := &ret
30789	if err := gensupport.DecodeResponse(target, res); err != nil {
30790		return nil, err
30791	}
30792	return ret, nil
30793	// {
30794	//   "description": "Updates the specified conversation profile. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.",
30795	//   "flatPath": "v2/projects/{projectsId}/conversationProfiles/{conversationProfilesId}",
30796	//   "httpMethod": "PATCH",
30797	//   "id": "dialogflow.projects.conversationProfiles.patch",
30798	//   "parameterOrder": [
30799	//     "name"
30800	//   ],
30801	//   "parameters": {
30802	//     "name": {
30803	//       "description": "The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`.",
30804	//       "location": "path",
30805	//       "pattern": "^projects/[^/]+/conversationProfiles/[^/]+$",
30806	//       "required": true,
30807	//       "type": "string"
30808	//     },
30809	//     "updateMask": {
30810	//       "description": "Required. The mask to control which fields to update.",
30811	//       "format": "google-fieldmask",
30812	//       "location": "query",
30813	//       "type": "string"
30814	//     }
30815	//   },
30816	//   "path": "v2/{+name}",
30817	//   "request": {
30818	//     "$ref": "GoogleCloudDialogflowV2ConversationProfile"
30819	//   },
30820	//   "response": {
30821	//     "$ref": "GoogleCloudDialogflowV2ConversationProfile"
30822	//   },
30823	//   "scopes": [
30824	//     "https://www.googleapis.com/auth/cloud-platform",
30825	//     "https://www.googleapis.com/auth/dialogflow"
30826	//   ]
30827	// }
30828
30829}
30830
30831// method id "dialogflow.projects.conversations.complete":
30832
30833type ProjectsConversationsCompleteCall struct {
30834	s                                                  *Service
30835	nameid                                             string
30836	googleclouddialogflowv2completeconversationrequest *GoogleCloudDialogflowV2CompleteConversationRequest
30837	urlParams_                                         gensupport.URLParams
30838	ctx_                                               context.Context
30839	header_                                            http.Header
30840}
30841
30842// Complete: Completes the specified conversation. Finished
30843// conversations are purged from the database after 30 days.
30844//
30845// - name: Resource identifier of the conversation to close. Format:
30846//   `projects//locations//conversations/`.
30847func (r *ProjectsConversationsService) Complete(nameid string, googleclouddialogflowv2completeconversationrequest *GoogleCloudDialogflowV2CompleteConversationRequest) *ProjectsConversationsCompleteCall {
30848	c := &ProjectsConversationsCompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30849	c.nameid = nameid
30850	c.googleclouddialogflowv2completeconversationrequest = googleclouddialogflowv2completeconversationrequest
30851	return c
30852}
30853
30854// Fields allows partial responses to be retrieved. See
30855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30856// for more information.
30857func (c *ProjectsConversationsCompleteCall) Fields(s ...googleapi.Field) *ProjectsConversationsCompleteCall {
30858	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30859	return c
30860}
30861
30862// Context sets the context to be used in this call's Do method. Any
30863// pending HTTP request will be aborted if the provided context is
30864// canceled.
30865func (c *ProjectsConversationsCompleteCall) Context(ctx context.Context) *ProjectsConversationsCompleteCall {
30866	c.ctx_ = ctx
30867	return c
30868}
30869
30870// Header returns an http.Header that can be modified by the caller to
30871// add HTTP headers to the request.
30872func (c *ProjectsConversationsCompleteCall) Header() http.Header {
30873	if c.header_ == nil {
30874		c.header_ = make(http.Header)
30875	}
30876	return c.header_
30877}
30878
30879func (c *ProjectsConversationsCompleteCall) doRequest(alt string) (*http.Response, error) {
30880	reqHeaders := make(http.Header)
30881	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
30882	for k, v := range c.header_ {
30883		reqHeaders[k] = v
30884	}
30885	reqHeaders.Set("User-Agent", c.s.userAgent())
30886	var body io.Reader = nil
30887	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2completeconversationrequest)
30888	if err != nil {
30889		return nil, err
30890	}
30891	reqHeaders.Set("Content-Type", "application/json")
30892	c.urlParams_.Set("alt", alt)
30893	c.urlParams_.Set("prettyPrint", "false")
30894	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:complete")
30895	urls += "?" + c.urlParams_.Encode()
30896	req, err := http.NewRequest("POST", urls, body)
30897	if err != nil {
30898		return nil, err
30899	}
30900	req.Header = reqHeaders
30901	googleapi.Expand(req.URL, map[string]string{
30902		"name": c.nameid,
30903	})
30904	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30905}
30906
30907// Do executes the "dialogflow.projects.conversations.complete" call.
30908// Exactly one of *GoogleCloudDialogflowV2Conversation or error will be
30909// non-nil. Any non-2xx status code is an error. Response headers are in
30910// either *GoogleCloudDialogflowV2Conversation.ServerResponse.Header or
30911// (if a response was returned at all) in
30912// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
30913// whether the returned error was because http.StatusNotModified was
30914// returned.
30915func (c *ProjectsConversationsCompleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Conversation, error) {
30916	gensupport.SetOptions(c.urlParams_, opts...)
30917	res, err := c.doRequest("json")
30918	if res != nil && res.StatusCode == http.StatusNotModified {
30919		if res.Body != nil {
30920			res.Body.Close()
30921		}
30922		return nil, &googleapi.Error{
30923			Code:   res.StatusCode,
30924			Header: res.Header,
30925		}
30926	}
30927	if err != nil {
30928		return nil, err
30929	}
30930	defer googleapi.CloseBody(res)
30931	if err := googleapi.CheckResponse(res); err != nil {
30932		return nil, err
30933	}
30934	ret := &GoogleCloudDialogflowV2Conversation{
30935		ServerResponse: googleapi.ServerResponse{
30936			Header:         res.Header,
30937			HTTPStatusCode: res.StatusCode,
30938		},
30939	}
30940	target := &ret
30941	if err := gensupport.DecodeResponse(target, res); err != nil {
30942		return nil, err
30943	}
30944	return ret, nil
30945	// {
30946	//   "description": "Completes the specified conversation. Finished conversations are purged from the database after 30 days.",
30947	//   "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}:complete",
30948	//   "httpMethod": "POST",
30949	//   "id": "dialogflow.projects.conversations.complete",
30950	//   "parameterOrder": [
30951	//     "name"
30952	//   ],
30953	//   "parameters": {
30954	//     "name": {
30955	//       "description": "Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`.",
30956	//       "location": "path",
30957	//       "pattern": "^projects/[^/]+/conversations/[^/]+$",
30958	//       "required": true,
30959	//       "type": "string"
30960	//     }
30961	//   },
30962	//   "path": "v2/{+name}:complete",
30963	//   "request": {
30964	//     "$ref": "GoogleCloudDialogflowV2CompleteConversationRequest"
30965	//   },
30966	//   "response": {
30967	//     "$ref": "GoogleCloudDialogflowV2Conversation"
30968	//   },
30969	//   "scopes": [
30970	//     "https://www.googleapis.com/auth/cloud-platform",
30971	//     "https://www.googleapis.com/auth/dialogflow"
30972	//   ]
30973	// }
30974
30975}
30976
30977// method id "dialogflow.projects.conversations.create":
30978
30979type ProjectsConversationsCreateCall struct {
30980	s                                   *Service
30981	parentid                            string
30982	googleclouddialogflowv2conversation *GoogleCloudDialogflowV2Conversation
30983	urlParams_                          gensupport.URLParams
30984	ctx_                                context.Context
30985	header_                             http.Header
30986}
30987
30988// Create: Creates a new conversation. Conversations are auto-completed
30989// after 24 hours. Conversation Lifecycle: There are two stages during a
30990// conversation: Automated Agent Stage and Assist Stage. For Automated
30991// Agent Stage, there will be a dialogflow agent responding to user
30992// queries. For Assist Stage, there's no dialogflow agent responding to
30993// user queries. But we will provide suggestions which are generated
30994// from conversation. If Conversation.conversation_profile is configured
30995// for a dialogflow agent, conversation will start from `Automated Agent
30996// Stage`, otherwise, it will start from `Assist Stage`. And during
30997// `Automated Agent Stage`, once an Intent with
30998// Intent.live_agent_handoff is triggered, conversation will transfer to
30999// Assist Stage.
31000//
31001// - parent: Resource identifier of the project creating the
31002//   conversation. Format: `projects//locations/`.
31003func (r *ProjectsConversationsService) Create(parentid string, googleclouddialogflowv2conversation *GoogleCloudDialogflowV2Conversation) *ProjectsConversationsCreateCall {
31004	c := &ProjectsConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31005	c.parentid = parentid
31006	c.googleclouddialogflowv2conversation = googleclouddialogflowv2conversation
31007	return c
31008}
31009
31010// ConversationId sets the optional parameter "conversationId":
31011// Identifier of the conversation. Generally it's auto generated by
31012// Google. Only set it if you cannot wait for the response to return a
31013// auto-generated one to you. The conversation ID must be compliant with
31014// the regression fomula "a-zA-Z*" with the characters length in range
31015// of [3,64]. If the field is provided, the caller is resposible for 1.
31016// the uniqueness of the ID, otherwise the request will be rejected. 2.
31017// the consistency for whether to use custom ID or not under a project
31018// to better ensure uniqueness.
31019func (c *ProjectsConversationsCreateCall) ConversationId(conversationId string) *ProjectsConversationsCreateCall {
31020	c.urlParams_.Set("conversationId", conversationId)
31021	return c
31022}
31023
31024// Fields allows partial responses to be retrieved. See
31025// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31026// for more information.
31027func (c *ProjectsConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsConversationsCreateCall {
31028	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31029	return c
31030}
31031
31032// Context sets the context to be used in this call's Do method. Any
31033// pending HTTP request will be aborted if the provided context is
31034// canceled.
31035func (c *ProjectsConversationsCreateCall) Context(ctx context.Context) *ProjectsConversationsCreateCall {
31036	c.ctx_ = ctx
31037	return c
31038}
31039
31040// Header returns an http.Header that can be modified by the caller to
31041// add HTTP headers to the request.
31042func (c *ProjectsConversationsCreateCall) Header() http.Header {
31043	if c.header_ == nil {
31044		c.header_ = make(http.Header)
31045	}
31046	return c.header_
31047}
31048
31049func (c *ProjectsConversationsCreateCall) doRequest(alt string) (*http.Response, error) {
31050	reqHeaders := make(http.Header)
31051	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
31052	for k, v := range c.header_ {
31053		reqHeaders[k] = v
31054	}
31055	reqHeaders.Set("User-Agent", c.s.userAgent())
31056	var body io.Reader = nil
31057	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2conversation)
31058	if err != nil {
31059		return nil, err
31060	}
31061	reqHeaders.Set("Content-Type", "application/json")
31062	c.urlParams_.Set("alt", alt)
31063	c.urlParams_.Set("prettyPrint", "false")
31064	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/conversations")
31065	urls += "?" + c.urlParams_.Encode()
31066	req, err := http.NewRequest("POST", urls, body)
31067	if err != nil {
31068		return nil, err
31069	}
31070	req.Header = reqHeaders
31071	googleapi.Expand(req.URL, map[string]string{
31072		"parent": c.parentid,
31073	})
31074	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31075}
31076
31077// Do executes the "dialogflow.projects.conversations.create" call.
31078// Exactly one of *GoogleCloudDialogflowV2Conversation or error will be
31079// non-nil. Any non-2xx status code is an error. Response headers are in
31080// either *GoogleCloudDialogflowV2Conversation.ServerResponse.Header or
31081// (if a response was returned at all) in
31082// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31083// whether the returned error was because http.StatusNotModified was
31084// returned.
31085func (c *ProjectsConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Conversation, error) {
31086	gensupport.SetOptions(c.urlParams_, opts...)
31087	res, err := c.doRequest("json")
31088	if res != nil && res.StatusCode == http.StatusNotModified {
31089		if res.Body != nil {
31090			res.Body.Close()
31091		}
31092		return nil, &googleapi.Error{
31093			Code:   res.StatusCode,
31094			Header: res.Header,
31095		}
31096	}
31097	if err != nil {
31098		return nil, err
31099	}
31100	defer googleapi.CloseBody(res)
31101	if err := googleapi.CheckResponse(res); err != nil {
31102		return nil, err
31103	}
31104	ret := &GoogleCloudDialogflowV2Conversation{
31105		ServerResponse: googleapi.ServerResponse{
31106			Header:         res.Header,
31107			HTTPStatusCode: res.StatusCode,
31108		},
31109	}
31110	target := &ret
31111	if err := gensupport.DecodeResponse(target, res); err != nil {
31112		return nil, err
31113	}
31114	return ret, nil
31115	// {
31116	//   "description": "Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage.",
31117	//   "flatPath": "v2/projects/{projectsId}/conversations",
31118	//   "httpMethod": "POST",
31119	//   "id": "dialogflow.projects.conversations.create",
31120	//   "parameterOrder": [
31121	//     "parent"
31122	//   ],
31123	//   "parameters": {
31124	//     "conversationId": {
31125	//       "description": "Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula \"a-zA-Z*\" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness.",
31126	//       "location": "query",
31127	//       "type": "string"
31128	//     },
31129	//     "parent": {
31130	//       "description": "Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`.",
31131	//       "location": "path",
31132	//       "pattern": "^projects/[^/]+$",
31133	//       "required": true,
31134	//       "type": "string"
31135	//     }
31136	//   },
31137	//   "path": "v2/{+parent}/conversations",
31138	//   "request": {
31139	//     "$ref": "GoogleCloudDialogflowV2Conversation"
31140	//   },
31141	//   "response": {
31142	//     "$ref": "GoogleCloudDialogflowV2Conversation"
31143	//   },
31144	//   "scopes": [
31145	//     "https://www.googleapis.com/auth/cloud-platform",
31146	//     "https://www.googleapis.com/auth/dialogflow"
31147	//   ]
31148	// }
31149
31150}
31151
31152// method id "dialogflow.projects.conversations.get":
31153
31154type ProjectsConversationsGetCall struct {
31155	s            *Service
31156	name         string
31157	urlParams_   gensupport.URLParams
31158	ifNoneMatch_ string
31159	ctx_         context.Context
31160	header_      http.Header
31161}
31162
31163// Get: Retrieves the specific conversation.
31164//
31165// - name: The name of the conversation. Format:
31166//   `projects//locations//conversations/`.
31167func (r *ProjectsConversationsService) Get(name string) *ProjectsConversationsGetCall {
31168	c := &ProjectsConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31169	c.name = name
31170	return c
31171}
31172
31173// Fields allows partial responses to be retrieved. See
31174// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31175// for more information.
31176func (c *ProjectsConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsConversationsGetCall {
31177	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31178	return c
31179}
31180
31181// IfNoneMatch sets the optional parameter which makes the operation
31182// fail if the object's ETag matches the given value. This is useful for
31183// getting updates only after the object has changed since the last
31184// request. Use googleapi.IsNotModified to check whether the response
31185// error from Do is the result of In-None-Match.
31186func (c *ProjectsConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsConversationsGetCall {
31187	c.ifNoneMatch_ = entityTag
31188	return c
31189}
31190
31191// Context sets the context to be used in this call's Do method. Any
31192// pending HTTP request will be aborted if the provided context is
31193// canceled.
31194func (c *ProjectsConversationsGetCall) Context(ctx context.Context) *ProjectsConversationsGetCall {
31195	c.ctx_ = ctx
31196	return c
31197}
31198
31199// Header returns an http.Header that can be modified by the caller to
31200// add HTTP headers to the request.
31201func (c *ProjectsConversationsGetCall) Header() http.Header {
31202	if c.header_ == nil {
31203		c.header_ = make(http.Header)
31204	}
31205	return c.header_
31206}
31207
31208func (c *ProjectsConversationsGetCall) doRequest(alt string) (*http.Response, error) {
31209	reqHeaders := make(http.Header)
31210	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
31211	for k, v := range c.header_ {
31212		reqHeaders[k] = v
31213	}
31214	reqHeaders.Set("User-Agent", c.s.userAgent())
31215	if c.ifNoneMatch_ != "" {
31216		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31217	}
31218	var body io.Reader = nil
31219	c.urlParams_.Set("alt", alt)
31220	c.urlParams_.Set("prettyPrint", "false")
31221	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
31222	urls += "?" + c.urlParams_.Encode()
31223	req, err := http.NewRequest("GET", urls, body)
31224	if err != nil {
31225		return nil, err
31226	}
31227	req.Header = reqHeaders
31228	googleapi.Expand(req.URL, map[string]string{
31229		"name": c.name,
31230	})
31231	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31232}
31233
31234// Do executes the "dialogflow.projects.conversations.get" call.
31235// Exactly one of *GoogleCloudDialogflowV2Conversation or error will be
31236// non-nil. Any non-2xx status code is an error. Response headers are in
31237// either *GoogleCloudDialogflowV2Conversation.ServerResponse.Header or
31238// (if a response was returned at all) in
31239// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31240// whether the returned error was because http.StatusNotModified was
31241// returned.
31242func (c *ProjectsConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Conversation, error) {
31243	gensupport.SetOptions(c.urlParams_, opts...)
31244	res, err := c.doRequest("json")
31245	if res != nil && res.StatusCode == http.StatusNotModified {
31246		if res.Body != nil {
31247			res.Body.Close()
31248		}
31249		return nil, &googleapi.Error{
31250			Code:   res.StatusCode,
31251			Header: res.Header,
31252		}
31253	}
31254	if err != nil {
31255		return nil, err
31256	}
31257	defer googleapi.CloseBody(res)
31258	if err := googleapi.CheckResponse(res); err != nil {
31259		return nil, err
31260	}
31261	ret := &GoogleCloudDialogflowV2Conversation{
31262		ServerResponse: googleapi.ServerResponse{
31263			Header:         res.Header,
31264			HTTPStatusCode: res.StatusCode,
31265		},
31266	}
31267	target := &ret
31268	if err := gensupport.DecodeResponse(target, res); err != nil {
31269		return nil, err
31270	}
31271	return ret, nil
31272	// {
31273	//   "description": "Retrieves the specific conversation.",
31274	//   "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}",
31275	//   "httpMethod": "GET",
31276	//   "id": "dialogflow.projects.conversations.get",
31277	//   "parameterOrder": [
31278	//     "name"
31279	//   ],
31280	//   "parameters": {
31281	//     "name": {
31282	//       "description": "Required. The name of the conversation. Format: `projects//locations//conversations/`.",
31283	//       "location": "path",
31284	//       "pattern": "^projects/[^/]+/conversations/[^/]+$",
31285	//       "required": true,
31286	//       "type": "string"
31287	//     }
31288	//   },
31289	//   "path": "v2/{+name}",
31290	//   "response": {
31291	//     "$ref": "GoogleCloudDialogflowV2Conversation"
31292	//   },
31293	//   "scopes": [
31294	//     "https://www.googleapis.com/auth/cloud-platform",
31295	//     "https://www.googleapis.com/auth/dialogflow"
31296	//   ]
31297	// }
31298
31299}
31300
31301// method id "dialogflow.projects.conversations.list":
31302
31303type ProjectsConversationsListCall struct {
31304	s            *Service
31305	parent       string
31306	urlParams_   gensupport.URLParams
31307	ifNoneMatch_ string
31308	ctx_         context.Context
31309	header_      http.Header
31310}
31311
31312// List: Returns the list of all conversations in the specified project.
31313//
31314// - parent: The project from which to list all conversation. Format:
31315//   `projects//locations/`.
31316func (r *ProjectsConversationsService) List(parent string) *ProjectsConversationsListCall {
31317	c := &ProjectsConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31318	c.parent = parent
31319	return c
31320}
31321
31322// Filter sets the optional parameter "filter": A filter expression that
31323// filters conversations listed in the response. In general, the
31324// expression must specify the field name, a comparison operator, and
31325// the value to use for filtering: - The value must be a string, a
31326// number, or a boolean. - The comparison operator must be either
31327// `=`,`!=`, `>`, or `<`. - To filter on multiple expressions, separate
31328// the expressions with `AND` or `OR` (omitting both implies `AND`). -
31329// For clarity, expressions can be enclosed in parentheses. Only
31330// `lifecycle_state` can be filtered on in this way. For example, the
31331// following expression only returns `COMPLETED` conversations:
31332// `lifecycle_state = "COMPLETED" For more information about filtering,
31333// see API Filtering (https://aip.dev/160).
31334func (c *ProjectsConversationsListCall) Filter(filter string) *ProjectsConversationsListCall {
31335	c.urlParams_.Set("filter", filter)
31336	return c
31337}
31338
31339// PageSize sets the optional parameter "pageSize": The maximum number
31340// of items to return in a single page. By default 100 and at most 1000.
31341func (c *ProjectsConversationsListCall) PageSize(pageSize int64) *ProjectsConversationsListCall {
31342	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
31343	return c
31344}
31345
31346// PageToken sets the optional parameter "pageToken": The
31347// next_page_token value returned from a previous list request.
31348func (c *ProjectsConversationsListCall) PageToken(pageToken string) *ProjectsConversationsListCall {
31349	c.urlParams_.Set("pageToken", pageToken)
31350	return c
31351}
31352
31353// Fields allows partial responses to be retrieved. See
31354// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31355// for more information.
31356func (c *ProjectsConversationsListCall) Fields(s ...googleapi.Field) *ProjectsConversationsListCall {
31357	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31358	return c
31359}
31360
31361// IfNoneMatch sets the optional parameter which makes the operation
31362// fail if the object's ETag matches the given value. This is useful for
31363// getting updates only after the object has changed since the last
31364// request. Use googleapi.IsNotModified to check whether the response
31365// error from Do is the result of In-None-Match.
31366func (c *ProjectsConversationsListCall) IfNoneMatch(entityTag string) *ProjectsConversationsListCall {
31367	c.ifNoneMatch_ = entityTag
31368	return c
31369}
31370
31371// Context sets the context to be used in this call's Do method. Any
31372// pending HTTP request will be aborted if the provided context is
31373// canceled.
31374func (c *ProjectsConversationsListCall) Context(ctx context.Context) *ProjectsConversationsListCall {
31375	c.ctx_ = ctx
31376	return c
31377}
31378
31379// Header returns an http.Header that can be modified by the caller to
31380// add HTTP headers to the request.
31381func (c *ProjectsConversationsListCall) Header() http.Header {
31382	if c.header_ == nil {
31383		c.header_ = make(http.Header)
31384	}
31385	return c.header_
31386}
31387
31388func (c *ProjectsConversationsListCall) doRequest(alt string) (*http.Response, error) {
31389	reqHeaders := make(http.Header)
31390	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
31391	for k, v := range c.header_ {
31392		reqHeaders[k] = v
31393	}
31394	reqHeaders.Set("User-Agent", c.s.userAgent())
31395	if c.ifNoneMatch_ != "" {
31396		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31397	}
31398	var body io.Reader = nil
31399	c.urlParams_.Set("alt", alt)
31400	c.urlParams_.Set("prettyPrint", "false")
31401	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/conversations")
31402	urls += "?" + c.urlParams_.Encode()
31403	req, err := http.NewRequest("GET", urls, body)
31404	if err != nil {
31405		return nil, err
31406	}
31407	req.Header = reqHeaders
31408	googleapi.Expand(req.URL, map[string]string{
31409		"parent": c.parent,
31410	})
31411	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31412}
31413
31414// Do executes the "dialogflow.projects.conversations.list" call.
31415// Exactly one of *GoogleCloudDialogflowV2ListConversationsResponse or
31416// error will be non-nil. Any non-2xx status code is an error. Response
31417// headers are in either
31418// *GoogleCloudDialogflowV2ListConversationsResponse.ServerResponse.Heade
31419// r or (if a response was returned at all) in
31420// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31421// whether the returned error was because http.StatusNotModified was
31422// returned.
31423func (c *ProjectsConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListConversationsResponse, error) {
31424	gensupport.SetOptions(c.urlParams_, opts...)
31425	res, err := c.doRequest("json")
31426	if res != nil && res.StatusCode == http.StatusNotModified {
31427		if res.Body != nil {
31428			res.Body.Close()
31429		}
31430		return nil, &googleapi.Error{
31431			Code:   res.StatusCode,
31432			Header: res.Header,
31433		}
31434	}
31435	if err != nil {
31436		return nil, err
31437	}
31438	defer googleapi.CloseBody(res)
31439	if err := googleapi.CheckResponse(res); err != nil {
31440		return nil, err
31441	}
31442	ret := &GoogleCloudDialogflowV2ListConversationsResponse{
31443		ServerResponse: googleapi.ServerResponse{
31444			Header:         res.Header,
31445			HTTPStatusCode: res.StatusCode,
31446		},
31447	}
31448	target := &ret
31449	if err := gensupport.DecodeResponse(target, res); err != nil {
31450		return nil, err
31451	}
31452	return ret, nil
31453	// {
31454	//   "description": "Returns the list of all conversations in the specified project.",
31455	//   "flatPath": "v2/projects/{projectsId}/conversations",
31456	//   "httpMethod": "GET",
31457	//   "id": "dialogflow.projects.conversations.list",
31458	//   "parameterOrder": [
31459	//     "parent"
31460	//   ],
31461	//   "parameters": {
31462	//     "filter": {
31463	//       "description": "A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `\u003e`, or `\u003c`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = \"COMPLETED\"` For more information about filtering, see [API Filtering](https://aip.dev/160).",
31464	//       "location": "query",
31465	//       "type": "string"
31466	//     },
31467	//     "pageSize": {
31468	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
31469	//       "format": "int32",
31470	//       "location": "query",
31471	//       "type": "integer"
31472	//     },
31473	//     "pageToken": {
31474	//       "description": "Optional. The next_page_token value returned from a previous list request.",
31475	//       "location": "query",
31476	//       "type": "string"
31477	//     },
31478	//     "parent": {
31479	//       "description": "Required. The project from which to list all conversation. Format: `projects//locations/`.",
31480	//       "location": "path",
31481	//       "pattern": "^projects/[^/]+$",
31482	//       "required": true,
31483	//       "type": "string"
31484	//     }
31485	//   },
31486	//   "path": "v2/{+parent}/conversations",
31487	//   "response": {
31488	//     "$ref": "GoogleCloudDialogflowV2ListConversationsResponse"
31489	//   },
31490	//   "scopes": [
31491	//     "https://www.googleapis.com/auth/cloud-platform",
31492	//     "https://www.googleapis.com/auth/dialogflow"
31493	//   ]
31494	// }
31495
31496}
31497
31498// Pages invokes f for each page of results.
31499// A non-nil error returned from f will halt the iteration.
31500// The provided context supersedes any context provided to the Context method.
31501func (c *ProjectsConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListConversationsResponse) error) error {
31502	c.ctx_ = ctx
31503	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31504	for {
31505		x, err := c.Do()
31506		if err != nil {
31507			return err
31508		}
31509		if err := f(x); err != nil {
31510			return err
31511		}
31512		if x.NextPageToken == "" {
31513			return nil
31514		}
31515		c.PageToken(x.NextPageToken)
31516	}
31517}
31518
31519// method id "dialogflow.projects.conversations.messages.list":
31520
31521type ProjectsConversationsMessagesListCall struct {
31522	s            *Service
31523	parent       string
31524	urlParams_   gensupport.URLParams
31525	ifNoneMatch_ string
31526	ctx_         context.Context
31527	header_      http.Header
31528}
31529
31530// List: Lists messages that belong to a given conversation. `messages`
31531// are ordered by `create_time` in descending order. To fetch updates
31532// without duplication, send request with filter
31533// `create_time_epoch_microseconds > [first item's create_time of
31534// previous request]` and empty page_token.
31535//
31536// - parent: The name of the conversation to list messages for. Format:
31537//   `projects//locations//conversations/`.
31538func (r *ProjectsConversationsMessagesService) List(parent string) *ProjectsConversationsMessagesListCall {
31539	c := &ProjectsConversationsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31540	c.parent = parent
31541	return c
31542}
31543
31544// Filter sets the optional parameter "filter": Filter on message
31545// fields. Currently predicates on `create_time` and
31546// `create_time_epoch_microseconds` are supported. `create_time` only
31547// support milliseconds accuracy. E.g., `create_time_epoch_microseconds
31548// > 1551790877964485` or `create_time > 2017-01-15T01:30:15.01Z`. For
31549// more information about filtering, see API Filtering
31550// (https://aip.dev/160).
31551func (c *ProjectsConversationsMessagesListCall) Filter(filter string) *ProjectsConversationsMessagesListCall {
31552	c.urlParams_.Set("filter", filter)
31553	return c
31554}
31555
31556// PageSize sets the optional parameter "pageSize": The maximum number
31557// of items to return in a single page. By default 100 and at most 1000.
31558func (c *ProjectsConversationsMessagesListCall) PageSize(pageSize int64) *ProjectsConversationsMessagesListCall {
31559	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
31560	return c
31561}
31562
31563// PageToken sets the optional parameter "pageToken": The
31564// next_page_token value returned from a previous list request.
31565func (c *ProjectsConversationsMessagesListCall) PageToken(pageToken string) *ProjectsConversationsMessagesListCall {
31566	c.urlParams_.Set("pageToken", pageToken)
31567	return c
31568}
31569
31570// Fields allows partial responses to be retrieved. See
31571// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31572// for more information.
31573func (c *ProjectsConversationsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsConversationsMessagesListCall {
31574	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31575	return c
31576}
31577
31578// IfNoneMatch sets the optional parameter which makes the operation
31579// fail if the object's ETag matches the given value. This is useful for
31580// getting updates only after the object has changed since the last
31581// request. Use googleapi.IsNotModified to check whether the response
31582// error from Do is the result of In-None-Match.
31583func (c *ProjectsConversationsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsConversationsMessagesListCall {
31584	c.ifNoneMatch_ = entityTag
31585	return c
31586}
31587
31588// Context sets the context to be used in this call's Do method. Any
31589// pending HTTP request will be aborted if the provided context is
31590// canceled.
31591func (c *ProjectsConversationsMessagesListCall) Context(ctx context.Context) *ProjectsConversationsMessagesListCall {
31592	c.ctx_ = ctx
31593	return c
31594}
31595
31596// Header returns an http.Header that can be modified by the caller to
31597// add HTTP headers to the request.
31598func (c *ProjectsConversationsMessagesListCall) Header() http.Header {
31599	if c.header_ == nil {
31600		c.header_ = make(http.Header)
31601	}
31602	return c.header_
31603}
31604
31605func (c *ProjectsConversationsMessagesListCall) doRequest(alt string) (*http.Response, error) {
31606	reqHeaders := make(http.Header)
31607	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
31608	for k, v := range c.header_ {
31609		reqHeaders[k] = v
31610	}
31611	reqHeaders.Set("User-Agent", c.s.userAgent())
31612	if c.ifNoneMatch_ != "" {
31613		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31614	}
31615	var body io.Reader = nil
31616	c.urlParams_.Set("alt", alt)
31617	c.urlParams_.Set("prettyPrint", "false")
31618	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/messages")
31619	urls += "?" + c.urlParams_.Encode()
31620	req, err := http.NewRequest("GET", urls, body)
31621	if err != nil {
31622		return nil, err
31623	}
31624	req.Header = reqHeaders
31625	googleapi.Expand(req.URL, map[string]string{
31626		"parent": c.parent,
31627	})
31628	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31629}
31630
31631// Do executes the "dialogflow.projects.conversations.messages.list" call.
31632// Exactly one of *GoogleCloudDialogflowV2ListMessagesResponse or error
31633// will be non-nil. Any non-2xx status code is an error. Response
31634// headers are in either
31635// *GoogleCloudDialogflowV2ListMessagesResponse.ServerResponse.Header or
31636// (if a response was returned at all) in
31637// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31638// whether the returned error was because http.StatusNotModified was
31639// returned.
31640func (c *ProjectsConversationsMessagesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListMessagesResponse, error) {
31641	gensupport.SetOptions(c.urlParams_, opts...)
31642	res, err := c.doRequest("json")
31643	if res != nil && res.StatusCode == http.StatusNotModified {
31644		if res.Body != nil {
31645			res.Body.Close()
31646		}
31647		return nil, &googleapi.Error{
31648			Code:   res.StatusCode,
31649			Header: res.Header,
31650		}
31651	}
31652	if err != nil {
31653		return nil, err
31654	}
31655	defer googleapi.CloseBody(res)
31656	if err := googleapi.CheckResponse(res); err != nil {
31657		return nil, err
31658	}
31659	ret := &GoogleCloudDialogflowV2ListMessagesResponse{
31660		ServerResponse: googleapi.ServerResponse{
31661			Header:         res.Header,
31662			HTTPStatusCode: res.StatusCode,
31663		},
31664	}
31665	target := &ret
31666	if err := gensupport.DecodeResponse(target, res); err != nil {
31667		return nil, err
31668	}
31669	return ret, nil
31670	// {
31671	//   "description": "Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds \u003e [first item's create_time of previous request]` and empty page_token.",
31672	//   "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/messages",
31673	//   "httpMethod": "GET",
31674	//   "id": "dialogflow.projects.conversations.messages.list",
31675	//   "parameterOrder": [
31676	//     "parent"
31677	//   ],
31678	//   "parameters": {
31679	//     "filter": {
31680	//       "description": "Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \u003e 1551790877964485` or `create_time \u003e 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160).",
31681	//       "location": "query",
31682	//       "type": "string"
31683	//     },
31684	//     "pageSize": {
31685	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
31686	//       "format": "int32",
31687	//       "location": "query",
31688	//       "type": "integer"
31689	//     },
31690	//     "pageToken": {
31691	//       "description": "Optional. The next_page_token value returned from a previous list request.",
31692	//       "location": "query",
31693	//       "type": "string"
31694	//     },
31695	//     "parent": {
31696	//       "description": "Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/`",
31697	//       "location": "path",
31698	//       "pattern": "^projects/[^/]+/conversations/[^/]+$",
31699	//       "required": true,
31700	//       "type": "string"
31701	//     }
31702	//   },
31703	//   "path": "v2/{+parent}/messages",
31704	//   "response": {
31705	//     "$ref": "GoogleCloudDialogflowV2ListMessagesResponse"
31706	//   },
31707	//   "scopes": [
31708	//     "https://www.googleapis.com/auth/cloud-platform",
31709	//     "https://www.googleapis.com/auth/dialogflow"
31710	//   ]
31711	// }
31712
31713}
31714
31715// Pages invokes f for each page of results.
31716// A non-nil error returned from f will halt the iteration.
31717// The provided context supersedes any context provided to the Context method.
31718func (c *ProjectsConversationsMessagesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListMessagesResponse) error) error {
31719	c.ctx_ = ctx
31720	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31721	for {
31722		x, err := c.Do()
31723		if err != nil {
31724			return err
31725		}
31726		if err := f(x); err != nil {
31727			return err
31728		}
31729		if x.NextPageToken == "" {
31730			return nil
31731		}
31732		c.PageToken(x.NextPageToken)
31733	}
31734}
31735
31736// method id "dialogflow.projects.conversations.participants.analyzeContent":
31737
31738type ProjectsConversationsParticipantsAnalyzeContentCall struct {
31739	s                                            *Service
31740	participant                                  string
31741	googleclouddialogflowv2analyzecontentrequest *GoogleCloudDialogflowV2AnalyzeContentRequest
31742	urlParams_                                   gensupport.URLParams
31743	ctx_                                         context.Context
31744	header_                                      http.Header
31745}
31746
31747// AnalyzeContent: Adds a text (chat, for example), or audio (phone
31748// recording, for example) message from a participant into the
31749// conversation. Note: Always use agent versions for production traffic
31750// sent to virtual agents. See Versions and environments
31751// (https://cloud.google.com/dialogflow/es/docs/agents-versions).
31752//
31753// - participant: The name of the participant this text comes from.
31754//   Format: `projects//locations//conversations//participants/`.
31755func (r *ProjectsConversationsParticipantsService) AnalyzeContent(participant string, googleclouddialogflowv2analyzecontentrequest *GoogleCloudDialogflowV2AnalyzeContentRequest) *ProjectsConversationsParticipantsAnalyzeContentCall {
31756	c := &ProjectsConversationsParticipantsAnalyzeContentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31757	c.participant = participant
31758	c.googleclouddialogflowv2analyzecontentrequest = googleclouddialogflowv2analyzecontentrequest
31759	return c
31760}
31761
31762// Fields allows partial responses to be retrieved. See
31763// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31764// for more information.
31765func (c *ProjectsConversationsParticipantsAnalyzeContentCall) Fields(s ...googleapi.Field) *ProjectsConversationsParticipantsAnalyzeContentCall {
31766	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31767	return c
31768}
31769
31770// Context sets the context to be used in this call's Do method. Any
31771// pending HTTP request will be aborted if the provided context is
31772// canceled.
31773func (c *ProjectsConversationsParticipantsAnalyzeContentCall) Context(ctx context.Context) *ProjectsConversationsParticipantsAnalyzeContentCall {
31774	c.ctx_ = ctx
31775	return c
31776}
31777
31778// Header returns an http.Header that can be modified by the caller to
31779// add HTTP headers to the request.
31780func (c *ProjectsConversationsParticipantsAnalyzeContentCall) Header() http.Header {
31781	if c.header_ == nil {
31782		c.header_ = make(http.Header)
31783	}
31784	return c.header_
31785}
31786
31787func (c *ProjectsConversationsParticipantsAnalyzeContentCall) doRequest(alt string) (*http.Response, error) {
31788	reqHeaders := make(http.Header)
31789	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
31790	for k, v := range c.header_ {
31791		reqHeaders[k] = v
31792	}
31793	reqHeaders.Set("User-Agent", c.s.userAgent())
31794	var body io.Reader = nil
31795	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2analyzecontentrequest)
31796	if err != nil {
31797		return nil, err
31798	}
31799	reqHeaders.Set("Content-Type", "application/json")
31800	c.urlParams_.Set("alt", alt)
31801	c.urlParams_.Set("prettyPrint", "false")
31802	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+participant}:analyzeContent")
31803	urls += "?" + c.urlParams_.Encode()
31804	req, err := http.NewRequest("POST", urls, body)
31805	if err != nil {
31806		return nil, err
31807	}
31808	req.Header = reqHeaders
31809	googleapi.Expand(req.URL, map[string]string{
31810		"participant": c.participant,
31811	})
31812	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31813}
31814
31815// Do executes the "dialogflow.projects.conversations.participants.analyzeContent" call.
31816// Exactly one of *GoogleCloudDialogflowV2AnalyzeContentResponse or
31817// error will be non-nil. Any non-2xx status code is an error. Response
31818// headers are in either
31819// *GoogleCloudDialogflowV2AnalyzeContentResponse.ServerResponse.Header
31820// or (if a response was returned at all) in
31821// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31822// whether the returned error was because http.StatusNotModified was
31823// returned.
31824func (c *ProjectsConversationsParticipantsAnalyzeContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2AnalyzeContentResponse, error) {
31825	gensupport.SetOptions(c.urlParams_, opts...)
31826	res, err := c.doRequest("json")
31827	if res != nil && res.StatusCode == http.StatusNotModified {
31828		if res.Body != nil {
31829			res.Body.Close()
31830		}
31831		return nil, &googleapi.Error{
31832			Code:   res.StatusCode,
31833			Header: res.Header,
31834		}
31835	}
31836	if err != nil {
31837		return nil, err
31838	}
31839	defer googleapi.CloseBody(res)
31840	if err := googleapi.CheckResponse(res); err != nil {
31841		return nil, err
31842	}
31843	ret := &GoogleCloudDialogflowV2AnalyzeContentResponse{
31844		ServerResponse: googleapi.ServerResponse{
31845			Header:         res.Header,
31846			HTTPStatusCode: res.StatusCode,
31847		},
31848	}
31849	target := &ret
31850	if err := gensupport.DecodeResponse(target, res); err != nil {
31851		return nil, err
31852	}
31853	return ret, nil
31854	// {
31855	//   "description": "Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: Always use agent versions for production traffic sent to virtual agents. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).",
31856	//   "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}:analyzeContent",
31857	//   "httpMethod": "POST",
31858	//   "id": "dialogflow.projects.conversations.participants.analyzeContent",
31859	//   "parameterOrder": [
31860	//     "participant"
31861	//   ],
31862	//   "parameters": {
31863	//     "participant": {
31864	//       "description": "Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`.",
31865	//       "location": "path",
31866	//       "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$",
31867	//       "required": true,
31868	//       "type": "string"
31869	//     }
31870	//   },
31871	//   "path": "v2/{+participant}:analyzeContent",
31872	//   "request": {
31873	//     "$ref": "GoogleCloudDialogflowV2AnalyzeContentRequest"
31874	//   },
31875	//   "response": {
31876	//     "$ref": "GoogleCloudDialogflowV2AnalyzeContentResponse"
31877	//   },
31878	//   "scopes": [
31879	//     "https://www.googleapis.com/auth/cloud-platform",
31880	//     "https://www.googleapis.com/auth/dialogflow"
31881	//   ]
31882	// }
31883
31884}
31885
31886// method id "dialogflow.projects.conversations.participants.create":
31887
31888type ProjectsConversationsParticipantsCreateCall struct {
31889	s                                  *Service
31890	parentid                           string
31891	googleclouddialogflowv2participant *GoogleCloudDialogflowV2Participant
31892	urlParams_                         gensupport.URLParams
31893	ctx_                               context.Context
31894	header_                            http.Header
31895}
31896
31897// Create: Creates a new participant in a conversation.
31898//
31899// - parent: Resource identifier of the conversation adding the
31900//   participant. Format: `projects//locations//conversations/`.
31901func (r *ProjectsConversationsParticipantsService) Create(parentid string, googleclouddialogflowv2participant *GoogleCloudDialogflowV2Participant) *ProjectsConversationsParticipantsCreateCall {
31902	c := &ProjectsConversationsParticipantsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31903	c.parentid = parentid
31904	c.googleclouddialogflowv2participant = googleclouddialogflowv2participant
31905	return c
31906}
31907
31908// Fields allows partial responses to be retrieved. See
31909// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31910// for more information.
31911func (c *ProjectsConversationsParticipantsCreateCall) Fields(s ...googleapi.Field) *ProjectsConversationsParticipantsCreateCall {
31912	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31913	return c
31914}
31915
31916// Context sets the context to be used in this call's Do method. Any
31917// pending HTTP request will be aborted if the provided context is
31918// canceled.
31919func (c *ProjectsConversationsParticipantsCreateCall) Context(ctx context.Context) *ProjectsConversationsParticipantsCreateCall {
31920	c.ctx_ = ctx
31921	return c
31922}
31923
31924// Header returns an http.Header that can be modified by the caller to
31925// add HTTP headers to the request.
31926func (c *ProjectsConversationsParticipantsCreateCall) Header() http.Header {
31927	if c.header_ == nil {
31928		c.header_ = make(http.Header)
31929	}
31930	return c.header_
31931}
31932
31933func (c *ProjectsConversationsParticipantsCreateCall) doRequest(alt string) (*http.Response, error) {
31934	reqHeaders := make(http.Header)
31935	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
31936	for k, v := range c.header_ {
31937		reqHeaders[k] = v
31938	}
31939	reqHeaders.Set("User-Agent", c.s.userAgent())
31940	var body io.Reader = nil
31941	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2participant)
31942	if err != nil {
31943		return nil, err
31944	}
31945	reqHeaders.Set("Content-Type", "application/json")
31946	c.urlParams_.Set("alt", alt)
31947	c.urlParams_.Set("prettyPrint", "false")
31948	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/participants")
31949	urls += "?" + c.urlParams_.Encode()
31950	req, err := http.NewRequest("POST", urls, body)
31951	if err != nil {
31952		return nil, err
31953	}
31954	req.Header = reqHeaders
31955	googleapi.Expand(req.URL, map[string]string{
31956		"parent": c.parentid,
31957	})
31958	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31959}
31960
31961// Do executes the "dialogflow.projects.conversations.participants.create" call.
31962// Exactly one of *GoogleCloudDialogflowV2Participant or error will be
31963// non-nil. Any non-2xx status code is an error. Response headers are in
31964// either *GoogleCloudDialogflowV2Participant.ServerResponse.Header or
31965// (if a response was returned at all) in
31966// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31967// whether the returned error was because http.StatusNotModified was
31968// returned.
31969func (c *ProjectsConversationsParticipantsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Participant, error) {
31970	gensupport.SetOptions(c.urlParams_, opts...)
31971	res, err := c.doRequest("json")
31972	if res != nil && res.StatusCode == http.StatusNotModified {
31973		if res.Body != nil {
31974			res.Body.Close()
31975		}
31976		return nil, &googleapi.Error{
31977			Code:   res.StatusCode,
31978			Header: res.Header,
31979		}
31980	}
31981	if err != nil {
31982		return nil, err
31983	}
31984	defer googleapi.CloseBody(res)
31985	if err := googleapi.CheckResponse(res); err != nil {
31986		return nil, err
31987	}
31988	ret := &GoogleCloudDialogflowV2Participant{
31989		ServerResponse: googleapi.ServerResponse{
31990			Header:         res.Header,
31991			HTTPStatusCode: res.StatusCode,
31992		},
31993	}
31994	target := &ret
31995	if err := gensupport.DecodeResponse(target, res); err != nil {
31996		return nil, err
31997	}
31998	return ret, nil
31999	// {
32000	//   "description": "Creates a new participant in a conversation.",
32001	//   "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants",
32002	//   "httpMethod": "POST",
32003	//   "id": "dialogflow.projects.conversations.participants.create",
32004	//   "parameterOrder": [
32005	//     "parent"
32006	//   ],
32007	//   "parameters": {
32008	//     "parent": {
32009	//       "description": "Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`.",
32010	//       "location": "path",
32011	//       "pattern": "^projects/[^/]+/conversations/[^/]+$",
32012	//       "required": true,
32013	//       "type": "string"
32014	//     }
32015	//   },
32016	//   "path": "v2/{+parent}/participants",
32017	//   "request": {
32018	//     "$ref": "GoogleCloudDialogflowV2Participant"
32019	//   },
32020	//   "response": {
32021	//     "$ref": "GoogleCloudDialogflowV2Participant"
32022	//   },
32023	//   "scopes": [
32024	//     "https://www.googleapis.com/auth/cloud-platform",
32025	//     "https://www.googleapis.com/auth/dialogflow"
32026	//   ]
32027	// }
32028
32029}
32030
32031// method id "dialogflow.projects.conversations.participants.get":
32032
32033type ProjectsConversationsParticipantsGetCall struct {
32034	s            *Service
32035	name         string
32036	urlParams_   gensupport.URLParams
32037	ifNoneMatch_ string
32038	ctx_         context.Context
32039	header_      http.Header
32040}
32041
32042// Get: Retrieves a conversation participant.
32043//
32044// - name: The name of the participant. Format:
32045//   `projects//locations//conversations//participants/`.
32046func (r *ProjectsConversationsParticipantsService) Get(name string) *ProjectsConversationsParticipantsGetCall {
32047	c := &ProjectsConversationsParticipantsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32048	c.name = name
32049	return c
32050}
32051
32052// Fields allows partial responses to be retrieved. See
32053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32054// for more information.
32055func (c *ProjectsConversationsParticipantsGetCall) Fields(s ...googleapi.Field) *ProjectsConversationsParticipantsGetCall {
32056	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32057	return c
32058}
32059
32060// IfNoneMatch sets the optional parameter which makes the operation
32061// fail if the object's ETag matches the given value. This is useful for
32062// getting updates only after the object has changed since the last
32063// request. Use googleapi.IsNotModified to check whether the response
32064// error from Do is the result of In-None-Match.
32065func (c *ProjectsConversationsParticipantsGetCall) IfNoneMatch(entityTag string) *ProjectsConversationsParticipantsGetCall {
32066	c.ifNoneMatch_ = entityTag
32067	return c
32068}
32069
32070// Context sets the context to be used in this call's Do method. Any
32071// pending HTTP request will be aborted if the provided context is
32072// canceled.
32073func (c *ProjectsConversationsParticipantsGetCall) Context(ctx context.Context) *ProjectsConversationsParticipantsGetCall {
32074	c.ctx_ = ctx
32075	return c
32076}
32077
32078// Header returns an http.Header that can be modified by the caller to
32079// add HTTP headers to the request.
32080func (c *ProjectsConversationsParticipantsGetCall) Header() http.Header {
32081	if c.header_ == nil {
32082		c.header_ = make(http.Header)
32083	}
32084	return c.header_
32085}
32086
32087func (c *ProjectsConversationsParticipantsGetCall) doRequest(alt string) (*http.Response, error) {
32088	reqHeaders := make(http.Header)
32089	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
32090	for k, v := range c.header_ {
32091		reqHeaders[k] = v
32092	}
32093	reqHeaders.Set("User-Agent", c.s.userAgent())
32094	if c.ifNoneMatch_ != "" {
32095		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32096	}
32097	var body io.Reader = nil
32098	c.urlParams_.Set("alt", alt)
32099	c.urlParams_.Set("prettyPrint", "false")
32100	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
32101	urls += "?" + c.urlParams_.Encode()
32102	req, err := http.NewRequest("GET", urls, body)
32103	if err != nil {
32104		return nil, err
32105	}
32106	req.Header = reqHeaders
32107	googleapi.Expand(req.URL, map[string]string{
32108		"name": c.name,
32109	})
32110	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32111}
32112
32113// Do executes the "dialogflow.projects.conversations.participants.get" call.
32114// Exactly one of *GoogleCloudDialogflowV2Participant or error will be
32115// non-nil. Any non-2xx status code is an error. Response headers are in
32116// either *GoogleCloudDialogflowV2Participant.ServerResponse.Header or
32117// (if a response was returned at all) in
32118// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
32119// whether the returned error was because http.StatusNotModified was
32120// returned.
32121func (c *ProjectsConversationsParticipantsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Participant, error) {
32122	gensupport.SetOptions(c.urlParams_, opts...)
32123	res, err := c.doRequest("json")
32124	if res != nil && res.StatusCode == http.StatusNotModified {
32125		if res.Body != nil {
32126			res.Body.Close()
32127		}
32128		return nil, &googleapi.Error{
32129			Code:   res.StatusCode,
32130			Header: res.Header,
32131		}
32132	}
32133	if err != nil {
32134		return nil, err
32135	}
32136	defer googleapi.CloseBody(res)
32137	if err := googleapi.CheckResponse(res); err != nil {
32138		return nil, err
32139	}
32140	ret := &GoogleCloudDialogflowV2Participant{
32141		ServerResponse: googleapi.ServerResponse{
32142			Header:         res.Header,
32143			HTTPStatusCode: res.StatusCode,
32144		},
32145	}
32146	target := &ret
32147	if err := gensupport.DecodeResponse(target, res); err != nil {
32148		return nil, err
32149	}
32150	return ret, nil
32151	// {
32152	//   "description": "Retrieves a conversation participant.",
32153	//   "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}",
32154	//   "httpMethod": "GET",
32155	//   "id": "dialogflow.projects.conversations.participants.get",
32156	//   "parameterOrder": [
32157	//     "name"
32158	//   ],
32159	//   "parameters": {
32160	//     "name": {
32161	//       "description": "Required. The name of the participant. Format: `projects//locations//conversations//participants/`.",
32162	//       "location": "path",
32163	//       "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$",
32164	//       "required": true,
32165	//       "type": "string"
32166	//     }
32167	//   },
32168	//   "path": "v2/{+name}",
32169	//   "response": {
32170	//     "$ref": "GoogleCloudDialogflowV2Participant"
32171	//   },
32172	//   "scopes": [
32173	//     "https://www.googleapis.com/auth/cloud-platform",
32174	//     "https://www.googleapis.com/auth/dialogflow"
32175	//   ]
32176	// }
32177
32178}
32179
32180// method id "dialogflow.projects.conversations.participants.list":
32181
32182type ProjectsConversationsParticipantsListCall struct {
32183	s            *Service
32184	parent       string
32185	urlParams_   gensupport.URLParams
32186	ifNoneMatch_ string
32187	ctx_         context.Context
32188	header_      http.Header
32189}
32190
32191// List: Returns the list of all participants in the specified
32192// conversation.
32193//
32194// - parent: The conversation to list all participants from. Format:
32195//   `projects//locations//conversations/`.
32196func (r *ProjectsConversationsParticipantsService) List(parent string) *ProjectsConversationsParticipantsListCall {
32197	c := &ProjectsConversationsParticipantsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32198	c.parent = parent
32199	return c
32200}
32201
32202// PageSize sets the optional parameter "pageSize": The maximum number
32203// of items to return in a single page. By default 100 and at most 1000.
32204func (c *ProjectsConversationsParticipantsListCall) PageSize(pageSize int64) *ProjectsConversationsParticipantsListCall {
32205	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
32206	return c
32207}
32208
32209// PageToken sets the optional parameter "pageToken": The
32210// next_page_token value returned from a previous list request.
32211func (c *ProjectsConversationsParticipantsListCall) PageToken(pageToken string) *ProjectsConversationsParticipantsListCall {
32212	c.urlParams_.Set("pageToken", pageToken)
32213	return c
32214}
32215
32216// Fields allows partial responses to be retrieved. See
32217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32218// for more information.
32219func (c *ProjectsConversationsParticipantsListCall) Fields(s ...googleapi.Field) *ProjectsConversationsParticipantsListCall {
32220	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32221	return c
32222}
32223
32224// IfNoneMatch sets the optional parameter which makes the operation
32225// fail if the object's ETag matches the given value. This is useful for
32226// getting updates only after the object has changed since the last
32227// request. Use googleapi.IsNotModified to check whether the response
32228// error from Do is the result of In-None-Match.
32229func (c *ProjectsConversationsParticipantsListCall) IfNoneMatch(entityTag string) *ProjectsConversationsParticipantsListCall {
32230	c.ifNoneMatch_ = entityTag
32231	return c
32232}
32233
32234// Context sets the context to be used in this call's Do method. Any
32235// pending HTTP request will be aborted if the provided context is
32236// canceled.
32237func (c *ProjectsConversationsParticipantsListCall) Context(ctx context.Context) *ProjectsConversationsParticipantsListCall {
32238	c.ctx_ = ctx
32239	return c
32240}
32241
32242// Header returns an http.Header that can be modified by the caller to
32243// add HTTP headers to the request.
32244func (c *ProjectsConversationsParticipantsListCall) Header() http.Header {
32245	if c.header_ == nil {
32246		c.header_ = make(http.Header)
32247	}
32248	return c.header_
32249}
32250
32251func (c *ProjectsConversationsParticipantsListCall) doRequest(alt string) (*http.Response, error) {
32252	reqHeaders := make(http.Header)
32253	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
32254	for k, v := range c.header_ {
32255		reqHeaders[k] = v
32256	}
32257	reqHeaders.Set("User-Agent", c.s.userAgent())
32258	if c.ifNoneMatch_ != "" {
32259		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32260	}
32261	var body io.Reader = nil
32262	c.urlParams_.Set("alt", alt)
32263	c.urlParams_.Set("prettyPrint", "false")
32264	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/participants")
32265	urls += "?" + c.urlParams_.Encode()
32266	req, err := http.NewRequest("GET", urls, body)
32267	if err != nil {
32268		return nil, err
32269	}
32270	req.Header = reqHeaders
32271	googleapi.Expand(req.URL, map[string]string{
32272		"parent": c.parent,
32273	})
32274	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32275}
32276
32277// Do executes the "dialogflow.projects.conversations.participants.list" call.
32278// Exactly one of *GoogleCloudDialogflowV2ListParticipantsResponse or
32279// error will be non-nil. Any non-2xx status code is an error. Response
32280// headers are in either
32281// *GoogleCloudDialogflowV2ListParticipantsResponse.ServerResponse.Header
32282//  or (if a response was returned at all) in
32283// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
32284// whether the returned error was because http.StatusNotModified was
32285// returned.
32286func (c *ProjectsConversationsParticipantsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListParticipantsResponse, error) {
32287	gensupport.SetOptions(c.urlParams_, opts...)
32288	res, err := c.doRequest("json")
32289	if res != nil && res.StatusCode == http.StatusNotModified {
32290		if res.Body != nil {
32291			res.Body.Close()
32292		}
32293		return nil, &googleapi.Error{
32294			Code:   res.StatusCode,
32295			Header: res.Header,
32296		}
32297	}
32298	if err != nil {
32299		return nil, err
32300	}
32301	defer googleapi.CloseBody(res)
32302	if err := googleapi.CheckResponse(res); err != nil {
32303		return nil, err
32304	}
32305	ret := &GoogleCloudDialogflowV2ListParticipantsResponse{
32306		ServerResponse: googleapi.ServerResponse{
32307			Header:         res.Header,
32308			HTTPStatusCode: res.StatusCode,
32309		},
32310	}
32311	target := &ret
32312	if err := gensupport.DecodeResponse(target, res); err != nil {
32313		return nil, err
32314	}
32315	return ret, nil
32316	// {
32317	//   "description": "Returns the list of all participants in the specified conversation.",
32318	//   "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants",
32319	//   "httpMethod": "GET",
32320	//   "id": "dialogflow.projects.conversations.participants.list",
32321	//   "parameterOrder": [
32322	//     "parent"
32323	//   ],
32324	//   "parameters": {
32325	//     "pageSize": {
32326	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
32327	//       "format": "int32",
32328	//       "location": "query",
32329	//       "type": "integer"
32330	//     },
32331	//     "pageToken": {
32332	//       "description": "Optional. The next_page_token value returned from a previous list request.",
32333	//       "location": "query",
32334	//       "type": "string"
32335	//     },
32336	//     "parent": {
32337	//       "description": "Required. The conversation to list all participants from. Format: `projects//locations//conversations/`.",
32338	//       "location": "path",
32339	//       "pattern": "^projects/[^/]+/conversations/[^/]+$",
32340	//       "required": true,
32341	//       "type": "string"
32342	//     }
32343	//   },
32344	//   "path": "v2/{+parent}/participants",
32345	//   "response": {
32346	//     "$ref": "GoogleCloudDialogflowV2ListParticipantsResponse"
32347	//   },
32348	//   "scopes": [
32349	//     "https://www.googleapis.com/auth/cloud-platform",
32350	//     "https://www.googleapis.com/auth/dialogflow"
32351	//   ]
32352	// }
32353
32354}
32355
32356// Pages invokes f for each page of results.
32357// A non-nil error returned from f will halt the iteration.
32358// The provided context supersedes any context provided to the Context method.
32359func (c *ProjectsConversationsParticipantsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListParticipantsResponse) error) error {
32360	c.ctx_ = ctx
32361	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32362	for {
32363		x, err := c.Do()
32364		if err != nil {
32365			return err
32366		}
32367		if err := f(x); err != nil {
32368			return err
32369		}
32370		if x.NextPageToken == "" {
32371			return nil
32372		}
32373		c.PageToken(x.NextPageToken)
32374	}
32375}
32376
32377// method id "dialogflow.projects.conversations.participants.patch":
32378
32379type ProjectsConversationsParticipantsPatchCall struct {
32380	s                                  *Service
32381	nameid                             string
32382	googleclouddialogflowv2participant *GoogleCloudDialogflowV2Participant
32383	urlParams_                         gensupport.URLParams
32384	ctx_                               context.Context
32385	header_                            http.Header
32386}
32387
32388// Patch: Updates the specified participant.
32389//
32390// - name: Optional. The unique identifier of this participant. Format:
32391//   `projects//locations//conversations//participants/`.
32392func (r *ProjectsConversationsParticipantsService) Patch(nameid string, googleclouddialogflowv2participant *GoogleCloudDialogflowV2Participant) *ProjectsConversationsParticipantsPatchCall {
32393	c := &ProjectsConversationsParticipantsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32394	c.nameid = nameid
32395	c.googleclouddialogflowv2participant = googleclouddialogflowv2participant
32396	return c
32397}
32398
32399// UpdateMask sets the optional parameter "updateMask": Required. The
32400// mask to specify which fields to update.
32401func (c *ProjectsConversationsParticipantsPatchCall) UpdateMask(updateMask string) *ProjectsConversationsParticipantsPatchCall {
32402	c.urlParams_.Set("updateMask", updateMask)
32403	return c
32404}
32405
32406// Fields allows partial responses to be retrieved. See
32407// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32408// for more information.
32409func (c *ProjectsConversationsParticipantsPatchCall) Fields(s ...googleapi.Field) *ProjectsConversationsParticipantsPatchCall {
32410	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32411	return c
32412}
32413
32414// Context sets the context to be used in this call's Do method. Any
32415// pending HTTP request will be aborted if the provided context is
32416// canceled.
32417func (c *ProjectsConversationsParticipantsPatchCall) Context(ctx context.Context) *ProjectsConversationsParticipantsPatchCall {
32418	c.ctx_ = ctx
32419	return c
32420}
32421
32422// Header returns an http.Header that can be modified by the caller to
32423// add HTTP headers to the request.
32424func (c *ProjectsConversationsParticipantsPatchCall) Header() http.Header {
32425	if c.header_ == nil {
32426		c.header_ = make(http.Header)
32427	}
32428	return c.header_
32429}
32430
32431func (c *ProjectsConversationsParticipantsPatchCall) doRequest(alt string) (*http.Response, error) {
32432	reqHeaders := make(http.Header)
32433	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
32434	for k, v := range c.header_ {
32435		reqHeaders[k] = v
32436	}
32437	reqHeaders.Set("User-Agent", c.s.userAgent())
32438	var body io.Reader = nil
32439	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2participant)
32440	if err != nil {
32441		return nil, err
32442	}
32443	reqHeaders.Set("Content-Type", "application/json")
32444	c.urlParams_.Set("alt", alt)
32445	c.urlParams_.Set("prettyPrint", "false")
32446	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
32447	urls += "?" + c.urlParams_.Encode()
32448	req, err := http.NewRequest("PATCH", urls, body)
32449	if err != nil {
32450		return nil, err
32451	}
32452	req.Header = reqHeaders
32453	googleapi.Expand(req.URL, map[string]string{
32454		"name": c.nameid,
32455	})
32456	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32457}
32458
32459// Do executes the "dialogflow.projects.conversations.participants.patch" call.
32460// Exactly one of *GoogleCloudDialogflowV2Participant or error will be
32461// non-nil. Any non-2xx status code is an error. Response headers are in
32462// either *GoogleCloudDialogflowV2Participant.ServerResponse.Header or
32463// (if a response was returned at all) in
32464// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
32465// whether the returned error was because http.StatusNotModified was
32466// returned.
32467func (c *ProjectsConversationsParticipantsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Participant, error) {
32468	gensupport.SetOptions(c.urlParams_, opts...)
32469	res, err := c.doRequest("json")
32470	if res != nil && res.StatusCode == http.StatusNotModified {
32471		if res.Body != nil {
32472			res.Body.Close()
32473		}
32474		return nil, &googleapi.Error{
32475			Code:   res.StatusCode,
32476			Header: res.Header,
32477		}
32478	}
32479	if err != nil {
32480		return nil, err
32481	}
32482	defer googleapi.CloseBody(res)
32483	if err := googleapi.CheckResponse(res); err != nil {
32484		return nil, err
32485	}
32486	ret := &GoogleCloudDialogflowV2Participant{
32487		ServerResponse: googleapi.ServerResponse{
32488			Header:         res.Header,
32489			HTTPStatusCode: res.StatusCode,
32490		},
32491	}
32492	target := &ret
32493	if err := gensupport.DecodeResponse(target, res); err != nil {
32494		return nil, err
32495	}
32496	return ret, nil
32497	// {
32498	//   "description": "Updates the specified participant.",
32499	//   "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}",
32500	//   "httpMethod": "PATCH",
32501	//   "id": "dialogflow.projects.conversations.participants.patch",
32502	//   "parameterOrder": [
32503	//     "name"
32504	//   ],
32505	//   "parameters": {
32506	//     "name": {
32507	//       "description": "Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`.",
32508	//       "location": "path",
32509	//       "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$",
32510	//       "required": true,
32511	//       "type": "string"
32512	//     },
32513	//     "updateMask": {
32514	//       "description": "Required. The mask to specify which fields to update.",
32515	//       "format": "google-fieldmask",
32516	//       "location": "query",
32517	//       "type": "string"
32518	//     }
32519	//   },
32520	//   "path": "v2/{+name}",
32521	//   "request": {
32522	//     "$ref": "GoogleCloudDialogflowV2Participant"
32523	//   },
32524	//   "response": {
32525	//     "$ref": "GoogleCloudDialogflowV2Participant"
32526	//   },
32527	//   "scopes": [
32528	//     "https://www.googleapis.com/auth/cloud-platform",
32529	//     "https://www.googleapis.com/auth/dialogflow"
32530	//   ]
32531	// }
32532
32533}
32534
32535// method id "dialogflow.projects.conversations.participants.suggestions.suggestArticles":
32536
32537type ProjectsConversationsParticipantsSuggestionsSuggestArticlesCall struct {
32538	s                                             *Service
32539	parent                                        string
32540	googleclouddialogflowv2suggestarticlesrequest *GoogleCloudDialogflowV2SuggestArticlesRequest
32541	urlParams_                                    gensupport.URLParams
32542	ctx_                                          context.Context
32543	header_                                       http.Header
32544}
32545
32546// SuggestArticles: Gets suggested articles for a participant based on
32547// specific historical messages.
32548//
32549// - parent: The name of the participant to fetch suggestion for.
32550//   Format: `projects//locations//conversations//participants/`.
32551func (r *ProjectsConversationsParticipantsSuggestionsService) SuggestArticles(parent string, googleclouddialogflowv2suggestarticlesrequest *GoogleCloudDialogflowV2SuggestArticlesRequest) *ProjectsConversationsParticipantsSuggestionsSuggestArticlesCall {
32552	c := &ProjectsConversationsParticipantsSuggestionsSuggestArticlesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32553	c.parent = parent
32554	c.googleclouddialogflowv2suggestarticlesrequest = googleclouddialogflowv2suggestarticlesrequest
32555	return c
32556}
32557
32558// Fields allows partial responses to be retrieved. See
32559// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32560// for more information.
32561func (c *ProjectsConversationsParticipantsSuggestionsSuggestArticlesCall) Fields(s ...googleapi.Field) *ProjectsConversationsParticipantsSuggestionsSuggestArticlesCall {
32562	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32563	return c
32564}
32565
32566// Context sets the context to be used in this call's Do method. Any
32567// pending HTTP request will be aborted if the provided context is
32568// canceled.
32569func (c *ProjectsConversationsParticipantsSuggestionsSuggestArticlesCall) Context(ctx context.Context) *ProjectsConversationsParticipantsSuggestionsSuggestArticlesCall {
32570	c.ctx_ = ctx
32571	return c
32572}
32573
32574// Header returns an http.Header that can be modified by the caller to
32575// add HTTP headers to the request.
32576func (c *ProjectsConversationsParticipantsSuggestionsSuggestArticlesCall) Header() http.Header {
32577	if c.header_ == nil {
32578		c.header_ = make(http.Header)
32579	}
32580	return c.header_
32581}
32582
32583func (c *ProjectsConversationsParticipantsSuggestionsSuggestArticlesCall) doRequest(alt string) (*http.Response, error) {
32584	reqHeaders := make(http.Header)
32585	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
32586	for k, v := range c.header_ {
32587		reqHeaders[k] = v
32588	}
32589	reqHeaders.Set("User-Agent", c.s.userAgent())
32590	var body io.Reader = nil
32591	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2suggestarticlesrequest)
32592	if err != nil {
32593		return nil, err
32594	}
32595	reqHeaders.Set("Content-Type", "application/json")
32596	c.urlParams_.Set("alt", alt)
32597	c.urlParams_.Set("prettyPrint", "false")
32598	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/suggestions:suggestArticles")
32599	urls += "?" + c.urlParams_.Encode()
32600	req, err := http.NewRequest("POST", urls, body)
32601	if err != nil {
32602		return nil, err
32603	}
32604	req.Header = reqHeaders
32605	googleapi.Expand(req.URL, map[string]string{
32606		"parent": c.parent,
32607	})
32608	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32609}
32610
32611// Do executes the "dialogflow.projects.conversations.participants.suggestions.suggestArticles" call.
32612// Exactly one of *GoogleCloudDialogflowV2SuggestArticlesResponse or
32613// error will be non-nil. Any non-2xx status code is an error. Response
32614// headers are in either
32615// *GoogleCloudDialogflowV2SuggestArticlesResponse.ServerResponse.Header
32616// or (if a response was returned at all) in
32617// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
32618// whether the returned error was because http.StatusNotModified was
32619// returned.
32620func (c *ProjectsConversationsParticipantsSuggestionsSuggestArticlesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SuggestArticlesResponse, error) {
32621	gensupport.SetOptions(c.urlParams_, opts...)
32622	res, err := c.doRequest("json")
32623	if res != nil && res.StatusCode == http.StatusNotModified {
32624		if res.Body != nil {
32625			res.Body.Close()
32626		}
32627		return nil, &googleapi.Error{
32628			Code:   res.StatusCode,
32629			Header: res.Header,
32630		}
32631	}
32632	if err != nil {
32633		return nil, err
32634	}
32635	defer googleapi.CloseBody(res)
32636	if err := googleapi.CheckResponse(res); err != nil {
32637		return nil, err
32638	}
32639	ret := &GoogleCloudDialogflowV2SuggestArticlesResponse{
32640		ServerResponse: googleapi.ServerResponse{
32641			Header:         res.Header,
32642			HTTPStatusCode: res.StatusCode,
32643		},
32644	}
32645	target := &ret
32646	if err := gensupport.DecodeResponse(target, res); err != nil {
32647		return nil, err
32648	}
32649	return ret, nil
32650	// {
32651	//   "description": "Gets suggested articles for a participant based on specific historical messages.",
32652	//   "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestArticles",
32653	//   "httpMethod": "POST",
32654	//   "id": "dialogflow.projects.conversations.participants.suggestions.suggestArticles",
32655	//   "parameterOrder": [
32656	//     "parent"
32657	//   ],
32658	//   "parameters": {
32659	//     "parent": {
32660	//       "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.",
32661	//       "location": "path",
32662	//       "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$",
32663	//       "required": true,
32664	//       "type": "string"
32665	//     }
32666	//   },
32667	//   "path": "v2/{+parent}/suggestions:suggestArticles",
32668	//   "request": {
32669	//     "$ref": "GoogleCloudDialogflowV2SuggestArticlesRequest"
32670	//   },
32671	//   "response": {
32672	//     "$ref": "GoogleCloudDialogflowV2SuggestArticlesResponse"
32673	//   },
32674	//   "scopes": [
32675	//     "https://www.googleapis.com/auth/cloud-platform",
32676	//     "https://www.googleapis.com/auth/dialogflow"
32677	//   ]
32678	// }
32679
32680}
32681
32682// method id "dialogflow.projects.conversations.participants.suggestions.suggestFaqAnswers":
32683
32684type ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall struct {
32685	s                                               *Service
32686	parent                                          string
32687	googleclouddialogflowv2suggestfaqanswersrequest *GoogleCloudDialogflowV2SuggestFaqAnswersRequest
32688	urlParams_                                      gensupport.URLParams
32689	ctx_                                            context.Context
32690	header_                                         http.Header
32691}
32692
32693// SuggestFaqAnswers: Gets suggested faq answers for a participant based
32694// on specific historical messages.
32695//
32696// - parent: The name of the participant to fetch suggestion for.
32697//   Format: `projects//locations//conversations//participants/`.
32698func (r *ProjectsConversationsParticipantsSuggestionsService) SuggestFaqAnswers(parent string, googleclouddialogflowv2suggestfaqanswersrequest *GoogleCloudDialogflowV2SuggestFaqAnswersRequest) *ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall {
32699	c := &ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32700	c.parent = parent
32701	c.googleclouddialogflowv2suggestfaqanswersrequest = googleclouddialogflowv2suggestfaqanswersrequest
32702	return c
32703}
32704
32705// Fields allows partial responses to be retrieved. See
32706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32707// for more information.
32708func (c *ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) Fields(s ...googleapi.Field) *ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall {
32709	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32710	return c
32711}
32712
32713// Context sets the context to be used in this call's Do method. Any
32714// pending HTTP request will be aborted if the provided context is
32715// canceled.
32716func (c *ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) Context(ctx context.Context) *ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall {
32717	c.ctx_ = ctx
32718	return c
32719}
32720
32721// Header returns an http.Header that can be modified by the caller to
32722// add HTTP headers to the request.
32723func (c *ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) Header() http.Header {
32724	if c.header_ == nil {
32725		c.header_ = make(http.Header)
32726	}
32727	return c.header_
32728}
32729
32730func (c *ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) doRequest(alt string) (*http.Response, error) {
32731	reqHeaders := make(http.Header)
32732	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
32733	for k, v := range c.header_ {
32734		reqHeaders[k] = v
32735	}
32736	reqHeaders.Set("User-Agent", c.s.userAgent())
32737	var body io.Reader = nil
32738	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2suggestfaqanswersrequest)
32739	if err != nil {
32740		return nil, err
32741	}
32742	reqHeaders.Set("Content-Type", "application/json")
32743	c.urlParams_.Set("alt", alt)
32744	c.urlParams_.Set("prettyPrint", "false")
32745	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/suggestions:suggestFaqAnswers")
32746	urls += "?" + c.urlParams_.Encode()
32747	req, err := http.NewRequest("POST", urls, body)
32748	if err != nil {
32749		return nil, err
32750	}
32751	req.Header = reqHeaders
32752	googleapi.Expand(req.URL, map[string]string{
32753		"parent": c.parent,
32754	})
32755	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32756}
32757
32758// Do executes the "dialogflow.projects.conversations.participants.suggestions.suggestFaqAnswers" call.
32759// Exactly one of *GoogleCloudDialogflowV2SuggestFaqAnswersResponse or
32760// error will be non-nil. Any non-2xx status code is an error. Response
32761// headers are in either
32762// *GoogleCloudDialogflowV2SuggestFaqAnswersResponse.ServerResponse.Heade
32763// r or (if a response was returned at all) in
32764// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
32765// whether the returned error was because http.StatusNotModified was
32766// returned.
32767func (c *ProjectsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SuggestFaqAnswersResponse, error) {
32768	gensupport.SetOptions(c.urlParams_, opts...)
32769	res, err := c.doRequest("json")
32770	if res != nil && res.StatusCode == http.StatusNotModified {
32771		if res.Body != nil {
32772			res.Body.Close()
32773		}
32774		return nil, &googleapi.Error{
32775			Code:   res.StatusCode,
32776			Header: res.Header,
32777		}
32778	}
32779	if err != nil {
32780		return nil, err
32781	}
32782	defer googleapi.CloseBody(res)
32783	if err := googleapi.CheckResponse(res); err != nil {
32784		return nil, err
32785	}
32786	ret := &GoogleCloudDialogflowV2SuggestFaqAnswersResponse{
32787		ServerResponse: googleapi.ServerResponse{
32788			Header:         res.Header,
32789			HTTPStatusCode: res.StatusCode,
32790		},
32791	}
32792	target := &ret
32793	if err := gensupport.DecodeResponse(target, res); err != nil {
32794		return nil, err
32795	}
32796	return ret, nil
32797	// {
32798	//   "description": "Gets suggested faq answers for a participant based on specific historical messages.",
32799	//   "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestFaqAnswers",
32800	//   "httpMethod": "POST",
32801	//   "id": "dialogflow.projects.conversations.participants.suggestions.suggestFaqAnswers",
32802	//   "parameterOrder": [
32803	//     "parent"
32804	//   ],
32805	//   "parameters": {
32806	//     "parent": {
32807	//       "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.",
32808	//       "location": "path",
32809	//       "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$",
32810	//       "required": true,
32811	//       "type": "string"
32812	//     }
32813	//   },
32814	//   "path": "v2/{+parent}/suggestions:suggestFaqAnswers",
32815	//   "request": {
32816	//     "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersRequest"
32817	//   },
32818	//   "response": {
32819	//     "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse"
32820	//   },
32821	//   "scopes": [
32822	//     "https://www.googleapis.com/auth/cloud-platform",
32823	//     "https://www.googleapis.com/auth/dialogflow"
32824	//   ]
32825	// }
32826
32827}
32828
32829// method id "dialogflow.projects.knowledgeBases.create":
32830
32831type ProjectsKnowledgeBasesCreateCall struct {
32832	s                                    *Service
32833	parent                               string
32834	googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase
32835	urlParams_                           gensupport.URLParams
32836	ctx_                                 context.Context
32837	header_                              http.Header
32838}
32839
32840// Create: Creates a knowledge base.
32841//
32842// - parent: The project to create a knowledge base for. Format:
32843//   `projects//locations/`.
32844func (r *ProjectsKnowledgeBasesService) Create(parent string, googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase) *ProjectsKnowledgeBasesCreateCall {
32845	c := &ProjectsKnowledgeBasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32846	c.parent = parent
32847	c.googleclouddialogflowv2knowledgebase = googleclouddialogflowv2knowledgebase
32848	return c
32849}
32850
32851// Fields allows partial responses to be retrieved. See
32852// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32853// for more information.
32854func (c *ProjectsKnowledgeBasesCreateCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesCreateCall {
32855	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32856	return c
32857}
32858
32859// Context sets the context to be used in this call's Do method. Any
32860// pending HTTP request will be aborted if the provided context is
32861// canceled.
32862func (c *ProjectsKnowledgeBasesCreateCall) Context(ctx context.Context) *ProjectsKnowledgeBasesCreateCall {
32863	c.ctx_ = ctx
32864	return c
32865}
32866
32867// Header returns an http.Header that can be modified by the caller to
32868// add HTTP headers to the request.
32869func (c *ProjectsKnowledgeBasesCreateCall) Header() http.Header {
32870	if c.header_ == nil {
32871		c.header_ = make(http.Header)
32872	}
32873	return c.header_
32874}
32875
32876func (c *ProjectsKnowledgeBasesCreateCall) doRequest(alt string) (*http.Response, error) {
32877	reqHeaders := make(http.Header)
32878	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
32879	for k, v := range c.header_ {
32880		reqHeaders[k] = v
32881	}
32882	reqHeaders.Set("User-Agent", c.s.userAgent())
32883	var body io.Reader = nil
32884	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2knowledgebase)
32885	if err != nil {
32886		return nil, err
32887	}
32888	reqHeaders.Set("Content-Type", "application/json")
32889	c.urlParams_.Set("alt", alt)
32890	c.urlParams_.Set("prettyPrint", "false")
32891	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/knowledgeBases")
32892	urls += "?" + c.urlParams_.Encode()
32893	req, err := http.NewRequest("POST", urls, body)
32894	if err != nil {
32895		return nil, err
32896	}
32897	req.Header = reqHeaders
32898	googleapi.Expand(req.URL, map[string]string{
32899		"parent": c.parent,
32900	})
32901	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32902}
32903
32904// Do executes the "dialogflow.projects.knowledgeBases.create" call.
32905// Exactly one of *GoogleCloudDialogflowV2KnowledgeBase or error will be
32906// non-nil. Any non-2xx status code is an error. Response headers are in
32907// either *GoogleCloudDialogflowV2KnowledgeBase.ServerResponse.Header or
32908// (if a response was returned at all) in
32909// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
32910// whether the returned error was because http.StatusNotModified was
32911// returned.
32912func (c *ProjectsKnowledgeBasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2KnowledgeBase, error) {
32913	gensupport.SetOptions(c.urlParams_, opts...)
32914	res, err := c.doRequest("json")
32915	if res != nil && res.StatusCode == http.StatusNotModified {
32916		if res.Body != nil {
32917			res.Body.Close()
32918		}
32919		return nil, &googleapi.Error{
32920			Code:   res.StatusCode,
32921			Header: res.Header,
32922		}
32923	}
32924	if err != nil {
32925		return nil, err
32926	}
32927	defer googleapi.CloseBody(res)
32928	if err := googleapi.CheckResponse(res); err != nil {
32929		return nil, err
32930	}
32931	ret := &GoogleCloudDialogflowV2KnowledgeBase{
32932		ServerResponse: googleapi.ServerResponse{
32933			Header:         res.Header,
32934			HTTPStatusCode: res.StatusCode,
32935		},
32936	}
32937	target := &ret
32938	if err := gensupport.DecodeResponse(target, res); err != nil {
32939		return nil, err
32940	}
32941	return ret, nil
32942	// {
32943	//   "description": "Creates a knowledge base.",
32944	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases",
32945	//   "httpMethod": "POST",
32946	//   "id": "dialogflow.projects.knowledgeBases.create",
32947	//   "parameterOrder": [
32948	//     "parent"
32949	//   ],
32950	//   "parameters": {
32951	//     "parent": {
32952	//       "description": "Required. The project to create a knowledge base for. Format: `projects//locations/`.",
32953	//       "location": "path",
32954	//       "pattern": "^projects/[^/]+$",
32955	//       "required": true,
32956	//       "type": "string"
32957	//     }
32958	//   },
32959	//   "path": "v2/{+parent}/knowledgeBases",
32960	//   "request": {
32961	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
32962	//   },
32963	//   "response": {
32964	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
32965	//   },
32966	//   "scopes": [
32967	//     "https://www.googleapis.com/auth/cloud-platform",
32968	//     "https://www.googleapis.com/auth/dialogflow"
32969	//   ]
32970	// }
32971
32972}
32973
32974// method id "dialogflow.projects.knowledgeBases.delete":
32975
32976type ProjectsKnowledgeBasesDeleteCall struct {
32977	s          *Service
32978	name       string
32979	urlParams_ gensupport.URLParams
32980	ctx_       context.Context
32981	header_    http.Header
32982}
32983
32984// Delete: Deletes the specified knowledge base.
32985//
32986// - name: The name of the knowledge base to delete. Format:
32987//   `projects//locations//knowledgeBases/`.
32988func (r *ProjectsKnowledgeBasesService) Delete(name string) *ProjectsKnowledgeBasesDeleteCall {
32989	c := &ProjectsKnowledgeBasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32990	c.name = name
32991	return c
32992}
32993
32994// Force sets the optional parameter "force": Force deletes the
32995// knowledge base. When set to true, any documents in the knowledge base
32996// are also deleted.
32997func (c *ProjectsKnowledgeBasesDeleteCall) Force(force bool) *ProjectsKnowledgeBasesDeleteCall {
32998	c.urlParams_.Set("force", fmt.Sprint(force))
32999	return c
33000}
33001
33002// Fields allows partial responses to be retrieved. See
33003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33004// for more information.
33005func (c *ProjectsKnowledgeBasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDeleteCall {
33006	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33007	return c
33008}
33009
33010// Context sets the context to be used in this call's Do method. Any
33011// pending HTTP request will be aborted if the provided context is
33012// canceled.
33013func (c *ProjectsKnowledgeBasesDeleteCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDeleteCall {
33014	c.ctx_ = ctx
33015	return c
33016}
33017
33018// Header returns an http.Header that can be modified by the caller to
33019// add HTTP headers to the request.
33020func (c *ProjectsKnowledgeBasesDeleteCall) Header() http.Header {
33021	if c.header_ == nil {
33022		c.header_ = make(http.Header)
33023	}
33024	return c.header_
33025}
33026
33027func (c *ProjectsKnowledgeBasesDeleteCall) doRequest(alt string) (*http.Response, error) {
33028	reqHeaders := make(http.Header)
33029	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
33030	for k, v := range c.header_ {
33031		reqHeaders[k] = v
33032	}
33033	reqHeaders.Set("User-Agent", c.s.userAgent())
33034	var body io.Reader = nil
33035	c.urlParams_.Set("alt", alt)
33036	c.urlParams_.Set("prettyPrint", "false")
33037	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
33038	urls += "?" + c.urlParams_.Encode()
33039	req, err := http.NewRequest("DELETE", urls, body)
33040	if err != nil {
33041		return nil, err
33042	}
33043	req.Header = reqHeaders
33044	googleapi.Expand(req.URL, map[string]string{
33045		"name": c.name,
33046	})
33047	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33048}
33049
33050// Do executes the "dialogflow.projects.knowledgeBases.delete" call.
33051// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
33052// non-2xx status code is an error. Response headers are in either
33053// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
33054// returned at all) in error.(*googleapi.Error).Header. Use
33055// googleapi.IsNotModified to check whether the returned error was
33056// because http.StatusNotModified was returned.
33057func (c *ProjectsKnowledgeBasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
33058	gensupport.SetOptions(c.urlParams_, opts...)
33059	res, err := c.doRequest("json")
33060	if res != nil && res.StatusCode == http.StatusNotModified {
33061		if res.Body != nil {
33062			res.Body.Close()
33063		}
33064		return nil, &googleapi.Error{
33065			Code:   res.StatusCode,
33066			Header: res.Header,
33067		}
33068	}
33069	if err != nil {
33070		return nil, err
33071	}
33072	defer googleapi.CloseBody(res)
33073	if err := googleapi.CheckResponse(res); err != nil {
33074		return nil, err
33075	}
33076	ret := &GoogleProtobufEmpty{
33077		ServerResponse: googleapi.ServerResponse{
33078			Header:         res.Header,
33079			HTTPStatusCode: res.StatusCode,
33080		},
33081	}
33082	target := &ret
33083	if err := gensupport.DecodeResponse(target, res); err != nil {
33084		return nil, err
33085	}
33086	return ret, nil
33087	// {
33088	//   "description": "Deletes the specified knowledge base.",
33089	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
33090	//   "httpMethod": "DELETE",
33091	//   "id": "dialogflow.projects.knowledgeBases.delete",
33092	//   "parameterOrder": [
33093	//     "name"
33094	//   ],
33095	//   "parameters": {
33096	//     "force": {
33097	//       "description": "Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted.",
33098	//       "location": "query",
33099	//       "type": "boolean"
33100	//     },
33101	//     "name": {
33102	//       "description": "Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`.",
33103	//       "location": "path",
33104	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
33105	//       "required": true,
33106	//       "type": "string"
33107	//     }
33108	//   },
33109	//   "path": "v2/{+name}",
33110	//   "response": {
33111	//     "$ref": "GoogleProtobufEmpty"
33112	//   },
33113	//   "scopes": [
33114	//     "https://www.googleapis.com/auth/cloud-platform",
33115	//     "https://www.googleapis.com/auth/dialogflow"
33116	//   ]
33117	// }
33118
33119}
33120
33121// method id "dialogflow.projects.knowledgeBases.get":
33122
33123type ProjectsKnowledgeBasesGetCall struct {
33124	s            *Service
33125	name         string
33126	urlParams_   gensupport.URLParams
33127	ifNoneMatch_ string
33128	ctx_         context.Context
33129	header_      http.Header
33130}
33131
33132// Get: Retrieves the specified knowledge base.
33133//
33134// - name: The name of the knowledge base to retrieve. Format
33135//   `projects//locations//knowledgeBases/`.
33136func (r *ProjectsKnowledgeBasesService) Get(name string) *ProjectsKnowledgeBasesGetCall {
33137	c := &ProjectsKnowledgeBasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33138	c.name = name
33139	return c
33140}
33141
33142// Fields allows partial responses to be retrieved. See
33143// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33144// for more information.
33145func (c *ProjectsKnowledgeBasesGetCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesGetCall {
33146	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33147	return c
33148}
33149
33150// IfNoneMatch sets the optional parameter which makes the operation
33151// fail if the object's ETag matches the given value. This is useful for
33152// getting updates only after the object has changed since the last
33153// request. Use googleapi.IsNotModified to check whether the response
33154// error from Do is the result of In-None-Match.
33155func (c *ProjectsKnowledgeBasesGetCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesGetCall {
33156	c.ifNoneMatch_ = entityTag
33157	return c
33158}
33159
33160// Context sets the context to be used in this call's Do method. Any
33161// pending HTTP request will be aborted if the provided context is
33162// canceled.
33163func (c *ProjectsKnowledgeBasesGetCall) Context(ctx context.Context) *ProjectsKnowledgeBasesGetCall {
33164	c.ctx_ = ctx
33165	return c
33166}
33167
33168// Header returns an http.Header that can be modified by the caller to
33169// add HTTP headers to the request.
33170func (c *ProjectsKnowledgeBasesGetCall) Header() http.Header {
33171	if c.header_ == nil {
33172		c.header_ = make(http.Header)
33173	}
33174	return c.header_
33175}
33176
33177func (c *ProjectsKnowledgeBasesGetCall) doRequest(alt string) (*http.Response, error) {
33178	reqHeaders := make(http.Header)
33179	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
33180	for k, v := range c.header_ {
33181		reqHeaders[k] = v
33182	}
33183	reqHeaders.Set("User-Agent", c.s.userAgent())
33184	if c.ifNoneMatch_ != "" {
33185		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33186	}
33187	var body io.Reader = nil
33188	c.urlParams_.Set("alt", alt)
33189	c.urlParams_.Set("prettyPrint", "false")
33190	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
33191	urls += "?" + c.urlParams_.Encode()
33192	req, err := http.NewRequest("GET", urls, body)
33193	if err != nil {
33194		return nil, err
33195	}
33196	req.Header = reqHeaders
33197	googleapi.Expand(req.URL, map[string]string{
33198		"name": c.name,
33199	})
33200	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33201}
33202
33203// Do executes the "dialogflow.projects.knowledgeBases.get" call.
33204// Exactly one of *GoogleCloudDialogflowV2KnowledgeBase or error will be
33205// non-nil. Any non-2xx status code is an error. Response headers are in
33206// either *GoogleCloudDialogflowV2KnowledgeBase.ServerResponse.Header or
33207// (if a response was returned at all) in
33208// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
33209// whether the returned error was because http.StatusNotModified was
33210// returned.
33211func (c *ProjectsKnowledgeBasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2KnowledgeBase, error) {
33212	gensupport.SetOptions(c.urlParams_, opts...)
33213	res, err := c.doRequest("json")
33214	if res != nil && res.StatusCode == http.StatusNotModified {
33215		if res.Body != nil {
33216			res.Body.Close()
33217		}
33218		return nil, &googleapi.Error{
33219			Code:   res.StatusCode,
33220			Header: res.Header,
33221		}
33222	}
33223	if err != nil {
33224		return nil, err
33225	}
33226	defer googleapi.CloseBody(res)
33227	if err := googleapi.CheckResponse(res); err != nil {
33228		return nil, err
33229	}
33230	ret := &GoogleCloudDialogflowV2KnowledgeBase{
33231		ServerResponse: googleapi.ServerResponse{
33232			Header:         res.Header,
33233			HTTPStatusCode: res.StatusCode,
33234		},
33235	}
33236	target := &ret
33237	if err := gensupport.DecodeResponse(target, res); err != nil {
33238		return nil, err
33239	}
33240	return ret, nil
33241	// {
33242	//   "description": "Retrieves the specified knowledge base.",
33243	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
33244	//   "httpMethod": "GET",
33245	//   "id": "dialogflow.projects.knowledgeBases.get",
33246	//   "parameterOrder": [
33247	//     "name"
33248	//   ],
33249	//   "parameters": {
33250	//     "name": {
33251	//       "description": "Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`.",
33252	//       "location": "path",
33253	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
33254	//       "required": true,
33255	//       "type": "string"
33256	//     }
33257	//   },
33258	//   "path": "v2/{+name}",
33259	//   "response": {
33260	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
33261	//   },
33262	//   "scopes": [
33263	//     "https://www.googleapis.com/auth/cloud-platform",
33264	//     "https://www.googleapis.com/auth/dialogflow"
33265	//   ]
33266	// }
33267
33268}
33269
33270// method id "dialogflow.projects.knowledgeBases.list":
33271
33272type ProjectsKnowledgeBasesListCall struct {
33273	s            *Service
33274	parent       string
33275	urlParams_   gensupport.URLParams
33276	ifNoneMatch_ string
33277	ctx_         context.Context
33278	header_      http.Header
33279}
33280
33281// List: Returns the list of all knowledge bases of the specified agent.
33282//
33283// - parent: The project to list of knowledge bases for. Format:
33284//   `projects//locations/`.
33285func (r *ProjectsKnowledgeBasesService) List(parent string) *ProjectsKnowledgeBasesListCall {
33286	c := &ProjectsKnowledgeBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33287	c.parent = parent
33288	return c
33289}
33290
33291// PageSize sets the optional parameter "pageSize": The maximum number
33292// of items to return in a single page. By default 10 and at most 100.
33293func (c *ProjectsKnowledgeBasesListCall) PageSize(pageSize int64) *ProjectsKnowledgeBasesListCall {
33294	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
33295	return c
33296}
33297
33298// PageToken sets the optional parameter "pageToken": The
33299// next_page_token value returned from a previous list request.
33300func (c *ProjectsKnowledgeBasesListCall) PageToken(pageToken string) *ProjectsKnowledgeBasesListCall {
33301	c.urlParams_.Set("pageToken", pageToken)
33302	return c
33303}
33304
33305// Fields allows partial responses to be retrieved. See
33306// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33307// for more information.
33308func (c *ProjectsKnowledgeBasesListCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesListCall {
33309	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33310	return c
33311}
33312
33313// IfNoneMatch sets the optional parameter which makes the operation
33314// fail if the object's ETag matches the given value. This is useful for
33315// getting updates only after the object has changed since the last
33316// request. Use googleapi.IsNotModified to check whether the response
33317// error from Do is the result of In-None-Match.
33318func (c *ProjectsKnowledgeBasesListCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesListCall {
33319	c.ifNoneMatch_ = entityTag
33320	return c
33321}
33322
33323// Context sets the context to be used in this call's Do method. Any
33324// pending HTTP request will be aborted if the provided context is
33325// canceled.
33326func (c *ProjectsKnowledgeBasesListCall) Context(ctx context.Context) *ProjectsKnowledgeBasesListCall {
33327	c.ctx_ = ctx
33328	return c
33329}
33330
33331// Header returns an http.Header that can be modified by the caller to
33332// add HTTP headers to the request.
33333func (c *ProjectsKnowledgeBasesListCall) Header() http.Header {
33334	if c.header_ == nil {
33335		c.header_ = make(http.Header)
33336	}
33337	return c.header_
33338}
33339
33340func (c *ProjectsKnowledgeBasesListCall) doRequest(alt string) (*http.Response, error) {
33341	reqHeaders := make(http.Header)
33342	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
33343	for k, v := range c.header_ {
33344		reqHeaders[k] = v
33345	}
33346	reqHeaders.Set("User-Agent", c.s.userAgent())
33347	if c.ifNoneMatch_ != "" {
33348		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33349	}
33350	var body io.Reader = nil
33351	c.urlParams_.Set("alt", alt)
33352	c.urlParams_.Set("prettyPrint", "false")
33353	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/knowledgeBases")
33354	urls += "?" + c.urlParams_.Encode()
33355	req, err := http.NewRequest("GET", urls, body)
33356	if err != nil {
33357		return nil, err
33358	}
33359	req.Header = reqHeaders
33360	googleapi.Expand(req.URL, map[string]string{
33361		"parent": c.parent,
33362	})
33363	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33364}
33365
33366// Do executes the "dialogflow.projects.knowledgeBases.list" call.
33367// Exactly one of *GoogleCloudDialogflowV2ListKnowledgeBasesResponse or
33368// error will be non-nil. Any non-2xx status code is an error. Response
33369// headers are in either
33370// *GoogleCloudDialogflowV2ListKnowledgeBasesResponse.ServerResponse.Head
33371// er or (if a response was returned at all) in
33372// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
33373// whether the returned error was because http.StatusNotModified was
33374// returned.
33375func (c *ProjectsKnowledgeBasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListKnowledgeBasesResponse, error) {
33376	gensupport.SetOptions(c.urlParams_, opts...)
33377	res, err := c.doRequest("json")
33378	if res != nil && res.StatusCode == http.StatusNotModified {
33379		if res.Body != nil {
33380			res.Body.Close()
33381		}
33382		return nil, &googleapi.Error{
33383			Code:   res.StatusCode,
33384			Header: res.Header,
33385		}
33386	}
33387	if err != nil {
33388		return nil, err
33389	}
33390	defer googleapi.CloseBody(res)
33391	if err := googleapi.CheckResponse(res); err != nil {
33392		return nil, err
33393	}
33394	ret := &GoogleCloudDialogflowV2ListKnowledgeBasesResponse{
33395		ServerResponse: googleapi.ServerResponse{
33396			Header:         res.Header,
33397			HTTPStatusCode: res.StatusCode,
33398		},
33399	}
33400	target := &ret
33401	if err := gensupport.DecodeResponse(target, res); err != nil {
33402		return nil, err
33403	}
33404	return ret, nil
33405	// {
33406	//   "description": "Returns the list of all knowledge bases of the specified agent.",
33407	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases",
33408	//   "httpMethod": "GET",
33409	//   "id": "dialogflow.projects.knowledgeBases.list",
33410	//   "parameterOrder": [
33411	//     "parent"
33412	//   ],
33413	//   "parameters": {
33414	//     "pageSize": {
33415	//       "description": "The maximum number of items to return in a single page. By default 10 and at most 100.",
33416	//       "format": "int32",
33417	//       "location": "query",
33418	//       "type": "integer"
33419	//     },
33420	//     "pageToken": {
33421	//       "description": "The next_page_token value returned from a previous list request.",
33422	//       "location": "query",
33423	//       "type": "string"
33424	//     },
33425	//     "parent": {
33426	//       "description": "Required. The project to list of knowledge bases for. Format: `projects//locations/`.",
33427	//       "location": "path",
33428	//       "pattern": "^projects/[^/]+$",
33429	//       "required": true,
33430	//       "type": "string"
33431	//     }
33432	//   },
33433	//   "path": "v2/{+parent}/knowledgeBases",
33434	//   "response": {
33435	//     "$ref": "GoogleCloudDialogflowV2ListKnowledgeBasesResponse"
33436	//   },
33437	//   "scopes": [
33438	//     "https://www.googleapis.com/auth/cloud-platform",
33439	//     "https://www.googleapis.com/auth/dialogflow"
33440	//   ]
33441	// }
33442
33443}
33444
33445// Pages invokes f for each page of results.
33446// A non-nil error returned from f will halt the iteration.
33447// The provided context supersedes any context provided to the Context method.
33448func (c *ProjectsKnowledgeBasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListKnowledgeBasesResponse) error) error {
33449	c.ctx_ = ctx
33450	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33451	for {
33452		x, err := c.Do()
33453		if err != nil {
33454			return err
33455		}
33456		if err := f(x); err != nil {
33457			return err
33458		}
33459		if x.NextPageToken == "" {
33460			return nil
33461		}
33462		c.PageToken(x.NextPageToken)
33463	}
33464}
33465
33466// method id "dialogflow.projects.knowledgeBases.patch":
33467
33468type ProjectsKnowledgeBasesPatchCall struct {
33469	s                                    *Service
33470	name                                 string
33471	googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase
33472	urlParams_                           gensupport.URLParams
33473	ctx_                                 context.Context
33474	header_                              http.Header
33475}
33476
33477// Patch: Updates the specified knowledge base.
33478//
33479// - name: The knowledge base resource name. The name must be empty when
33480//   creating a knowledge base. Format:
33481//   `projects//locations//knowledgeBases/`.
33482func (r *ProjectsKnowledgeBasesService) Patch(name string, googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase) *ProjectsKnowledgeBasesPatchCall {
33483	c := &ProjectsKnowledgeBasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33484	c.name = name
33485	c.googleclouddialogflowv2knowledgebase = googleclouddialogflowv2knowledgebase
33486	return c
33487}
33488
33489// UpdateMask sets the optional parameter "updateMask": Not specified
33490// means `update all`. Currently, only `display_name` can be updated, an
33491// InvalidArgument will be returned for attempting to update other
33492// fields.
33493func (c *ProjectsKnowledgeBasesPatchCall) UpdateMask(updateMask string) *ProjectsKnowledgeBasesPatchCall {
33494	c.urlParams_.Set("updateMask", updateMask)
33495	return c
33496}
33497
33498// Fields allows partial responses to be retrieved. See
33499// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33500// for more information.
33501func (c *ProjectsKnowledgeBasesPatchCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesPatchCall {
33502	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33503	return c
33504}
33505
33506// Context sets the context to be used in this call's Do method. Any
33507// pending HTTP request will be aborted if the provided context is
33508// canceled.
33509func (c *ProjectsKnowledgeBasesPatchCall) Context(ctx context.Context) *ProjectsKnowledgeBasesPatchCall {
33510	c.ctx_ = ctx
33511	return c
33512}
33513
33514// Header returns an http.Header that can be modified by the caller to
33515// add HTTP headers to the request.
33516func (c *ProjectsKnowledgeBasesPatchCall) Header() http.Header {
33517	if c.header_ == nil {
33518		c.header_ = make(http.Header)
33519	}
33520	return c.header_
33521}
33522
33523func (c *ProjectsKnowledgeBasesPatchCall) doRequest(alt string) (*http.Response, error) {
33524	reqHeaders := make(http.Header)
33525	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
33526	for k, v := range c.header_ {
33527		reqHeaders[k] = v
33528	}
33529	reqHeaders.Set("User-Agent", c.s.userAgent())
33530	var body io.Reader = nil
33531	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2knowledgebase)
33532	if err != nil {
33533		return nil, err
33534	}
33535	reqHeaders.Set("Content-Type", "application/json")
33536	c.urlParams_.Set("alt", alt)
33537	c.urlParams_.Set("prettyPrint", "false")
33538	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
33539	urls += "?" + c.urlParams_.Encode()
33540	req, err := http.NewRequest("PATCH", urls, body)
33541	if err != nil {
33542		return nil, err
33543	}
33544	req.Header = reqHeaders
33545	googleapi.Expand(req.URL, map[string]string{
33546		"name": c.name,
33547	})
33548	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33549}
33550
33551// Do executes the "dialogflow.projects.knowledgeBases.patch" call.
33552// Exactly one of *GoogleCloudDialogflowV2KnowledgeBase or error will be
33553// non-nil. Any non-2xx status code is an error. Response headers are in
33554// either *GoogleCloudDialogflowV2KnowledgeBase.ServerResponse.Header or
33555// (if a response was returned at all) in
33556// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
33557// whether the returned error was because http.StatusNotModified was
33558// returned.
33559func (c *ProjectsKnowledgeBasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2KnowledgeBase, error) {
33560	gensupport.SetOptions(c.urlParams_, opts...)
33561	res, err := c.doRequest("json")
33562	if res != nil && res.StatusCode == http.StatusNotModified {
33563		if res.Body != nil {
33564			res.Body.Close()
33565		}
33566		return nil, &googleapi.Error{
33567			Code:   res.StatusCode,
33568			Header: res.Header,
33569		}
33570	}
33571	if err != nil {
33572		return nil, err
33573	}
33574	defer googleapi.CloseBody(res)
33575	if err := googleapi.CheckResponse(res); err != nil {
33576		return nil, err
33577	}
33578	ret := &GoogleCloudDialogflowV2KnowledgeBase{
33579		ServerResponse: googleapi.ServerResponse{
33580			Header:         res.Header,
33581			HTTPStatusCode: res.StatusCode,
33582		},
33583	}
33584	target := &ret
33585	if err := gensupport.DecodeResponse(target, res); err != nil {
33586		return nil, err
33587	}
33588	return ret, nil
33589	// {
33590	//   "description": "Updates the specified knowledge base.",
33591	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
33592	//   "httpMethod": "PATCH",
33593	//   "id": "dialogflow.projects.knowledgeBases.patch",
33594	//   "parameterOrder": [
33595	//     "name"
33596	//   ],
33597	//   "parameters": {
33598	//     "name": {
33599	//       "description": "The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`.",
33600	//       "location": "path",
33601	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
33602	//       "required": true,
33603	//       "type": "string"
33604	//     },
33605	//     "updateMask": {
33606	//       "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.",
33607	//       "format": "google-fieldmask",
33608	//       "location": "query",
33609	//       "type": "string"
33610	//     }
33611	//   },
33612	//   "path": "v2/{+name}",
33613	//   "request": {
33614	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
33615	//   },
33616	//   "response": {
33617	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
33618	//   },
33619	//   "scopes": [
33620	//     "https://www.googleapis.com/auth/cloud-platform",
33621	//     "https://www.googleapis.com/auth/dialogflow"
33622	//   ]
33623	// }
33624
33625}
33626
33627// method id "dialogflow.projects.knowledgeBases.documents.create":
33628
33629type ProjectsKnowledgeBasesDocumentsCreateCall struct {
33630	s                               *Service
33631	parent                          string
33632	googleclouddialogflowv2document *GoogleCloudDialogflowV2Document
33633	urlParams_                      gensupport.URLParams
33634	ctx_                            context.Context
33635	header_                         http.Header
33636}
33637
33638// Create: Creates a new document. Operation
33639//
33640// - parent: The knowledge base to create a document for. Format:
33641//   `projects//locations//knowledgeBases/`.
33642func (r *ProjectsKnowledgeBasesDocumentsService) Create(parent string, googleclouddialogflowv2document *GoogleCloudDialogflowV2Document) *ProjectsKnowledgeBasesDocumentsCreateCall {
33643	c := &ProjectsKnowledgeBasesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33644	c.parent = parent
33645	c.googleclouddialogflowv2document = googleclouddialogflowv2document
33646	return c
33647}
33648
33649// Fields allows partial responses to be retrieved. See
33650// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33651// for more information.
33652func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsCreateCall {
33653	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33654	return c
33655}
33656
33657// Context sets the context to be used in this call's Do method. Any
33658// pending HTTP request will be aborted if the provided context is
33659// canceled.
33660func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsCreateCall {
33661	c.ctx_ = ctx
33662	return c
33663}
33664
33665// Header returns an http.Header that can be modified by the caller to
33666// add HTTP headers to the request.
33667func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Header() http.Header {
33668	if c.header_ == nil {
33669		c.header_ = make(http.Header)
33670	}
33671	return c.header_
33672}
33673
33674func (c *ProjectsKnowledgeBasesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) {
33675	reqHeaders := make(http.Header)
33676	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
33677	for k, v := range c.header_ {
33678		reqHeaders[k] = v
33679	}
33680	reqHeaders.Set("User-Agent", c.s.userAgent())
33681	var body io.Reader = nil
33682	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2document)
33683	if err != nil {
33684		return nil, err
33685	}
33686	reqHeaders.Set("Content-Type", "application/json")
33687	c.urlParams_.Set("alt", alt)
33688	c.urlParams_.Set("prettyPrint", "false")
33689	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/documents")
33690	urls += "?" + c.urlParams_.Encode()
33691	req, err := http.NewRequest("POST", urls, body)
33692	if err != nil {
33693		return nil, err
33694	}
33695	req.Header = reqHeaders
33696	googleapi.Expand(req.URL, map[string]string{
33697		"parent": c.parent,
33698	})
33699	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33700}
33701
33702// Do executes the "dialogflow.projects.knowledgeBases.documents.create" call.
33703// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
33704// Any non-2xx status code is an error. Response headers are in either
33705// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
33706// was returned at all) in error.(*googleapi.Error).Header. Use
33707// googleapi.IsNotModified to check whether the returned error was
33708// because http.StatusNotModified was returned.
33709func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
33710	gensupport.SetOptions(c.urlParams_, opts...)
33711	res, err := c.doRequest("json")
33712	if res != nil && res.StatusCode == http.StatusNotModified {
33713		if res.Body != nil {
33714			res.Body.Close()
33715		}
33716		return nil, &googleapi.Error{
33717			Code:   res.StatusCode,
33718			Header: res.Header,
33719		}
33720	}
33721	if err != nil {
33722		return nil, err
33723	}
33724	defer googleapi.CloseBody(res)
33725	if err := googleapi.CheckResponse(res); err != nil {
33726		return nil, err
33727	}
33728	ret := &GoogleLongrunningOperation{
33729		ServerResponse: googleapi.ServerResponse{
33730			Header:         res.Header,
33731			HTTPStatusCode: res.StatusCode,
33732		},
33733	}
33734	target := &ret
33735	if err := gensupport.DecodeResponse(target, res); err != nil {
33736		return nil, err
33737	}
33738	return ret, nil
33739	// {
33740	//   "description": "Creates a new document. Operation ",
33741	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents",
33742	//   "httpMethod": "POST",
33743	//   "id": "dialogflow.projects.knowledgeBases.documents.create",
33744	//   "parameterOrder": [
33745	//     "parent"
33746	//   ],
33747	//   "parameters": {
33748	//     "parent": {
33749	//       "description": "Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`.",
33750	//       "location": "path",
33751	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
33752	//       "required": true,
33753	//       "type": "string"
33754	//     }
33755	//   },
33756	//   "path": "v2/{+parent}/documents",
33757	//   "request": {
33758	//     "$ref": "GoogleCloudDialogflowV2Document"
33759	//   },
33760	//   "response": {
33761	//     "$ref": "GoogleLongrunningOperation"
33762	//   },
33763	//   "scopes": [
33764	//     "https://www.googleapis.com/auth/cloud-platform",
33765	//     "https://www.googleapis.com/auth/dialogflow"
33766	//   ]
33767	// }
33768
33769}
33770
33771// method id "dialogflow.projects.knowledgeBases.documents.delete":
33772
33773type ProjectsKnowledgeBasesDocumentsDeleteCall struct {
33774	s          *Service
33775	name       string
33776	urlParams_ gensupport.URLParams
33777	ctx_       context.Context
33778	header_    http.Header
33779}
33780
33781// Delete: Deletes the specified document. Operation
33782//
33783// - name: The name of the document to delete. Format:
33784//   `projects//locations//knowledgeBases//documents/`.
33785func (r *ProjectsKnowledgeBasesDocumentsService) Delete(name string) *ProjectsKnowledgeBasesDocumentsDeleteCall {
33786	c := &ProjectsKnowledgeBasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33787	c.name = name
33788	return c
33789}
33790
33791// Fields allows partial responses to be retrieved. See
33792// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33793// for more information.
33794func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsDeleteCall {
33795	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33796	return c
33797}
33798
33799// Context sets the context to be used in this call's Do method. Any
33800// pending HTTP request will be aborted if the provided context is
33801// canceled.
33802func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsDeleteCall {
33803	c.ctx_ = ctx
33804	return c
33805}
33806
33807// Header returns an http.Header that can be modified by the caller to
33808// add HTTP headers to the request.
33809func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Header() http.Header {
33810	if c.header_ == nil {
33811		c.header_ = make(http.Header)
33812	}
33813	return c.header_
33814}
33815
33816func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
33817	reqHeaders := make(http.Header)
33818	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
33819	for k, v := range c.header_ {
33820		reqHeaders[k] = v
33821	}
33822	reqHeaders.Set("User-Agent", c.s.userAgent())
33823	var body io.Reader = nil
33824	c.urlParams_.Set("alt", alt)
33825	c.urlParams_.Set("prettyPrint", "false")
33826	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
33827	urls += "?" + c.urlParams_.Encode()
33828	req, err := http.NewRequest("DELETE", urls, body)
33829	if err != nil {
33830		return nil, err
33831	}
33832	req.Header = reqHeaders
33833	googleapi.Expand(req.URL, map[string]string{
33834		"name": c.name,
33835	})
33836	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33837}
33838
33839// Do executes the "dialogflow.projects.knowledgeBases.documents.delete" call.
33840// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
33841// Any non-2xx status code is an error. Response headers are in either
33842// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
33843// was returned at all) in error.(*googleapi.Error).Header. Use
33844// googleapi.IsNotModified to check whether the returned error was
33845// because http.StatusNotModified was returned.
33846func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
33847	gensupport.SetOptions(c.urlParams_, opts...)
33848	res, err := c.doRequest("json")
33849	if res != nil && res.StatusCode == http.StatusNotModified {
33850		if res.Body != nil {
33851			res.Body.Close()
33852		}
33853		return nil, &googleapi.Error{
33854			Code:   res.StatusCode,
33855			Header: res.Header,
33856		}
33857	}
33858	if err != nil {
33859		return nil, err
33860	}
33861	defer googleapi.CloseBody(res)
33862	if err := googleapi.CheckResponse(res); err != nil {
33863		return nil, err
33864	}
33865	ret := &GoogleLongrunningOperation{
33866		ServerResponse: googleapi.ServerResponse{
33867			Header:         res.Header,
33868			HTTPStatusCode: res.StatusCode,
33869		},
33870	}
33871	target := &ret
33872	if err := gensupport.DecodeResponse(target, res); err != nil {
33873		return nil, err
33874	}
33875	return ret, nil
33876	// {
33877	//   "description": "Deletes the specified document. Operation ",
33878	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
33879	//   "httpMethod": "DELETE",
33880	//   "id": "dialogflow.projects.knowledgeBases.documents.delete",
33881	//   "parameterOrder": [
33882	//     "name"
33883	//   ],
33884	//   "parameters": {
33885	//     "name": {
33886	//       "description": "Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`.",
33887	//       "location": "path",
33888	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
33889	//       "required": true,
33890	//       "type": "string"
33891	//     }
33892	//   },
33893	//   "path": "v2/{+name}",
33894	//   "response": {
33895	//     "$ref": "GoogleLongrunningOperation"
33896	//   },
33897	//   "scopes": [
33898	//     "https://www.googleapis.com/auth/cloud-platform",
33899	//     "https://www.googleapis.com/auth/dialogflow"
33900	//   ]
33901	// }
33902
33903}
33904
33905// method id "dialogflow.projects.knowledgeBases.documents.get":
33906
33907type ProjectsKnowledgeBasesDocumentsGetCall struct {
33908	s            *Service
33909	name         string
33910	urlParams_   gensupport.URLParams
33911	ifNoneMatch_ string
33912	ctx_         context.Context
33913	header_      http.Header
33914}
33915
33916// Get: Retrieves the specified document.
33917//
33918// - name: The name of the document to retrieve. Format
33919//   `projects//locations//knowledgeBases//documents/`.
33920func (r *ProjectsKnowledgeBasesDocumentsService) Get(name string) *ProjectsKnowledgeBasesDocumentsGetCall {
33921	c := &ProjectsKnowledgeBasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33922	c.name = name
33923	return c
33924}
33925
33926// Fields allows partial responses to be retrieved. See
33927// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33928// for more information.
33929func (c *ProjectsKnowledgeBasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsGetCall {
33930	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33931	return c
33932}
33933
33934// IfNoneMatch sets the optional parameter which makes the operation
33935// fail if the object's ETag matches the given value. This is useful for
33936// getting updates only after the object has changed since the last
33937// request. Use googleapi.IsNotModified to check whether the response
33938// error from Do is the result of In-None-Match.
33939func (c *ProjectsKnowledgeBasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesDocumentsGetCall {
33940	c.ifNoneMatch_ = entityTag
33941	return c
33942}
33943
33944// Context sets the context to be used in this call's Do method. Any
33945// pending HTTP request will be aborted if the provided context is
33946// canceled.
33947func (c *ProjectsKnowledgeBasesDocumentsGetCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsGetCall {
33948	c.ctx_ = ctx
33949	return c
33950}
33951
33952// Header returns an http.Header that can be modified by the caller to
33953// add HTTP headers to the request.
33954func (c *ProjectsKnowledgeBasesDocumentsGetCall) Header() http.Header {
33955	if c.header_ == nil {
33956		c.header_ = make(http.Header)
33957	}
33958	return c.header_
33959}
33960
33961func (c *ProjectsKnowledgeBasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
33962	reqHeaders := make(http.Header)
33963	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
33964	for k, v := range c.header_ {
33965		reqHeaders[k] = v
33966	}
33967	reqHeaders.Set("User-Agent", c.s.userAgent())
33968	if c.ifNoneMatch_ != "" {
33969		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33970	}
33971	var body io.Reader = nil
33972	c.urlParams_.Set("alt", alt)
33973	c.urlParams_.Set("prettyPrint", "false")
33974	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
33975	urls += "?" + c.urlParams_.Encode()
33976	req, err := http.NewRequest("GET", urls, body)
33977	if err != nil {
33978		return nil, err
33979	}
33980	req.Header = reqHeaders
33981	googleapi.Expand(req.URL, map[string]string{
33982		"name": c.name,
33983	})
33984	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33985}
33986
33987// Do executes the "dialogflow.projects.knowledgeBases.documents.get" call.
33988// Exactly one of *GoogleCloudDialogflowV2Document or error will be
33989// non-nil. Any non-2xx status code is an error. Response headers are in
33990// either *GoogleCloudDialogflowV2Document.ServerResponse.Header or (if
33991// a response was returned at all) in error.(*googleapi.Error).Header.
33992// Use googleapi.IsNotModified to check whether the returned error was
33993// because http.StatusNotModified was returned.
33994func (c *ProjectsKnowledgeBasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Document, error) {
33995	gensupport.SetOptions(c.urlParams_, opts...)
33996	res, err := c.doRequest("json")
33997	if res != nil && res.StatusCode == http.StatusNotModified {
33998		if res.Body != nil {
33999			res.Body.Close()
34000		}
34001		return nil, &googleapi.Error{
34002			Code:   res.StatusCode,
34003			Header: res.Header,
34004		}
34005	}
34006	if err != nil {
34007		return nil, err
34008	}
34009	defer googleapi.CloseBody(res)
34010	if err := googleapi.CheckResponse(res); err != nil {
34011		return nil, err
34012	}
34013	ret := &GoogleCloudDialogflowV2Document{
34014		ServerResponse: googleapi.ServerResponse{
34015			Header:         res.Header,
34016			HTTPStatusCode: res.StatusCode,
34017		},
34018	}
34019	target := &ret
34020	if err := gensupport.DecodeResponse(target, res); err != nil {
34021		return nil, err
34022	}
34023	return ret, nil
34024	// {
34025	//   "description": "Retrieves the specified document.",
34026	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
34027	//   "httpMethod": "GET",
34028	//   "id": "dialogflow.projects.knowledgeBases.documents.get",
34029	//   "parameterOrder": [
34030	//     "name"
34031	//   ],
34032	//   "parameters": {
34033	//     "name": {
34034	//       "description": "Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`.",
34035	//       "location": "path",
34036	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
34037	//       "required": true,
34038	//       "type": "string"
34039	//     }
34040	//   },
34041	//   "path": "v2/{+name}",
34042	//   "response": {
34043	//     "$ref": "GoogleCloudDialogflowV2Document"
34044	//   },
34045	//   "scopes": [
34046	//     "https://www.googleapis.com/auth/cloud-platform",
34047	//     "https://www.googleapis.com/auth/dialogflow"
34048	//   ]
34049	// }
34050
34051}
34052
34053// method id "dialogflow.projects.knowledgeBases.documents.list":
34054
34055type ProjectsKnowledgeBasesDocumentsListCall struct {
34056	s            *Service
34057	parent       string
34058	urlParams_   gensupport.URLParams
34059	ifNoneMatch_ string
34060	ctx_         context.Context
34061	header_      http.Header
34062}
34063
34064// List: Returns the list of all documents of the knowledge base.
34065//
34066// - parent: The knowledge base to list all documents for. Format:
34067//   `projects//locations//knowledgeBases/`.
34068func (r *ProjectsKnowledgeBasesDocumentsService) List(parent string) *ProjectsKnowledgeBasesDocumentsListCall {
34069	c := &ProjectsKnowledgeBasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34070	c.parent = parent
34071	return c
34072}
34073
34074// PageSize sets the optional parameter "pageSize": The maximum number
34075// of items to return in a single page. By default 10 and at most 100.
34076func (c *ProjectsKnowledgeBasesDocumentsListCall) PageSize(pageSize int64) *ProjectsKnowledgeBasesDocumentsListCall {
34077	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
34078	return c
34079}
34080
34081// PageToken sets the optional parameter "pageToken": The
34082// next_page_token value returned from a previous list request.
34083func (c *ProjectsKnowledgeBasesDocumentsListCall) PageToken(pageToken string) *ProjectsKnowledgeBasesDocumentsListCall {
34084	c.urlParams_.Set("pageToken", pageToken)
34085	return c
34086}
34087
34088// Fields allows partial responses to be retrieved. See
34089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34090// for more information.
34091func (c *ProjectsKnowledgeBasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsListCall {
34092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34093	return c
34094}
34095
34096// IfNoneMatch sets the optional parameter which makes the operation
34097// fail if the object's ETag matches the given value. This is useful for
34098// getting updates only after the object has changed since the last
34099// request. Use googleapi.IsNotModified to check whether the response
34100// error from Do is the result of In-None-Match.
34101func (c *ProjectsKnowledgeBasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesDocumentsListCall {
34102	c.ifNoneMatch_ = entityTag
34103	return c
34104}
34105
34106// Context sets the context to be used in this call's Do method. Any
34107// pending HTTP request will be aborted if the provided context is
34108// canceled.
34109func (c *ProjectsKnowledgeBasesDocumentsListCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsListCall {
34110	c.ctx_ = ctx
34111	return c
34112}
34113
34114// Header returns an http.Header that can be modified by the caller to
34115// add HTTP headers to the request.
34116func (c *ProjectsKnowledgeBasesDocumentsListCall) Header() http.Header {
34117	if c.header_ == nil {
34118		c.header_ = make(http.Header)
34119	}
34120	return c.header_
34121}
34122
34123func (c *ProjectsKnowledgeBasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
34124	reqHeaders := make(http.Header)
34125	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
34126	for k, v := range c.header_ {
34127		reqHeaders[k] = v
34128	}
34129	reqHeaders.Set("User-Agent", c.s.userAgent())
34130	if c.ifNoneMatch_ != "" {
34131		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34132	}
34133	var body io.Reader = nil
34134	c.urlParams_.Set("alt", alt)
34135	c.urlParams_.Set("prettyPrint", "false")
34136	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/documents")
34137	urls += "?" + c.urlParams_.Encode()
34138	req, err := http.NewRequest("GET", urls, body)
34139	if err != nil {
34140		return nil, err
34141	}
34142	req.Header = reqHeaders
34143	googleapi.Expand(req.URL, map[string]string{
34144		"parent": c.parent,
34145	})
34146	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34147}
34148
34149// Do executes the "dialogflow.projects.knowledgeBases.documents.list" call.
34150// Exactly one of *GoogleCloudDialogflowV2ListDocumentsResponse or error
34151// will be non-nil. Any non-2xx status code is an error. Response
34152// headers are in either
34153// *GoogleCloudDialogflowV2ListDocumentsResponse.ServerResponse.Header
34154// or (if a response was returned at all) in
34155// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
34156// whether the returned error was because http.StatusNotModified was
34157// returned.
34158func (c *ProjectsKnowledgeBasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListDocumentsResponse, error) {
34159	gensupport.SetOptions(c.urlParams_, opts...)
34160	res, err := c.doRequest("json")
34161	if res != nil && res.StatusCode == http.StatusNotModified {
34162		if res.Body != nil {
34163			res.Body.Close()
34164		}
34165		return nil, &googleapi.Error{
34166			Code:   res.StatusCode,
34167			Header: res.Header,
34168		}
34169	}
34170	if err != nil {
34171		return nil, err
34172	}
34173	defer googleapi.CloseBody(res)
34174	if err := googleapi.CheckResponse(res); err != nil {
34175		return nil, err
34176	}
34177	ret := &GoogleCloudDialogflowV2ListDocumentsResponse{
34178		ServerResponse: googleapi.ServerResponse{
34179			Header:         res.Header,
34180			HTTPStatusCode: res.StatusCode,
34181		},
34182	}
34183	target := &ret
34184	if err := gensupport.DecodeResponse(target, res); err != nil {
34185		return nil, err
34186	}
34187	return ret, nil
34188	// {
34189	//   "description": "Returns the list of all documents of the knowledge base.",
34190	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents",
34191	//   "httpMethod": "GET",
34192	//   "id": "dialogflow.projects.knowledgeBases.documents.list",
34193	//   "parameterOrder": [
34194	//     "parent"
34195	//   ],
34196	//   "parameters": {
34197	//     "pageSize": {
34198	//       "description": "The maximum number of items to return in a single page. By default 10 and at most 100.",
34199	//       "format": "int32",
34200	//       "location": "query",
34201	//       "type": "integer"
34202	//     },
34203	//     "pageToken": {
34204	//       "description": "The next_page_token value returned from a previous list request.",
34205	//       "location": "query",
34206	//       "type": "string"
34207	//     },
34208	//     "parent": {
34209	//       "description": "Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`.",
34210	//       "location": "path",
34211	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
34212	//       "required": true,
34213	//       "type": "string"
34214	//     }
34215	//   },
34216	//   "path": "v2/{+parent}/documents",
34217	//   "response": {
34218	//     "$ref": "GoogleCloudDialogflowV2ListDocumentsResponse"
34219	//   },
34220	//   "scopes": [
34221	//     "https://www.googleapis.com/auth/cloud-platform",
34222	//     "https://www.googleapis.com/auth/dialogflow"
34223	//   ]
34224	// }
34225
34226}
34227
34228// Pages invokes f for each page of results.
34229// A non-nil error returned from f will halt the iteration.
34230// The provided context supersedes any context provided to the Context method.
34231func (c *ProjectsKnowledgeBasesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListDocumentsResponse) error) error {
34232	c.ctx_ = ctx
34233	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
34234	for {
34235		x, err := c.Do()
34236		if err != nil {
34237			return err
34238		}
34239		if err := f(x); err != nil {
34240			return err
34241		}
34242		if x.NextPageToken == "" {
34243			return nil
34244		}
34245		c.PageToken(x.NextPageToken)
34246	}
34247}
34248
34249// method id "dialogflow.projects.knowledgeBases.documents.patch":
34250
34251type ProjectsKnowledgeBasesDocumentsPatchCall struct {
34252	s                               *Service
34253	name                            string
34254	googleclouddialogflowv2document *GoogleCloudDialogflowV2Document
34255	urlParams_                      gensupport.URLParams
34256	ctx_                            context.Context
34257	header_                         http.Header
34258}
34259
34260// Patch: Updates the specified document. Operation
34261//
34262// - name: Optional. The document resource name. The name must be empty
34263//   when creating a document. Format:
34264//   `projects//locations//knowledgeBases//documents/`.
34265func (r *ProjectsKnowledgeBasesDocumentsService) Patch(name string, googleclouddialogflowv2document *GoogleCloudDialogflowV2Document) *ProjectsKnowledgeBasesDocumentsPatchCall {
34266	c := &ProjectsKnowledgeBasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34267	c.name = name
34268	c.googleclouddialogflowv2document = googleclouddialogflowv2document
34269	return c
34270}
34271
34272// UpdateMask sets the optional parameter "updateMask": Not specified
34273// means `update all`. Currently, only `display_name` can be updated, an
34274// InvalidArgument will be returned for attempting to update other
34275// fields.
34276func (c *ProjectsKnowledgeBasesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsKnowledgeBasesDocumentsPatchCall {
34277	c.urlParams_.Set("updateMask", updateMask)
34278	return c
34279}
34280
34281// Fields allows partial responses to be retrieved. See
34282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34283// for more information.
34284func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsPatchCall {
34285	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34286	return c
34287}
34288
34289// Context sets the context to be used in this call's Do method. Any
34290// pending HTTP request will be aborted if the provided context is
34291// canceled.
34292func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsPatchCall {
34293	c.ctx_ = ctx
34294	return c
34295}
34296
34297// Header returns an http.Header that can be modified by the caller to
34298// add HTTP headers to the request.
34299func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Header() http.Header {
34300	if c.header_ == nil {
34301		c.header_ = make(http.Header)
34302	}
34303	return c.header_
34304}
34305
34306func (c *ProjectsKnowledgeBasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
34307	reqHeaders := make(http.Header)
34308	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
34309	for k, v := range c.header_ {
34310		reqHeaders[k] = v
34311	}
34312	reqHeaders.Set("User-Agent", c.s.userAgent())
34313	var body io.Reader = nil
34314	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2document)
34315	if err != nil {
34316		return nil, err
34317	}
34318	reqHeaders.Set("Content-Type", "application/json")
34319	c.urlParams_.Set("alt", alt)
34320	c.urlParams_.Set("prettyPrint", "false")
34321	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
34322	urls += "?" + c.urlParams_.Encode()
34323	req, err := http.NewRequest("PATCH", urls, body)
34324	if err != nil {
34325		return nil, err
34326	}
34327	req.Header = reqHeaders
34328	googleapi.Expand(req.URL, map[string]string{
34329		"name": c.name,
34330	})
34331	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34332}
34333
34334// Do executes the "dialogflow.projects.knowledgeBases.documents.patch" call.
34335// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
34336// Any non-2xx status code is an error. Response headers are in either
34337// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
34338// was returned at all) in error.(*googleapi.Error).Header. Use
34339// googleapi.IsNotModified to check whether the returned error was
34340// because http.StatusNotModified was returned.
34341func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
34342	gensupport.SetOptions(c.urlParams_, opts...)
34343	res, err := c.doRequest("json")
34344	if res != nil && res.StatusCode == http.StatusNotModified {
34345		if res.Body != nil {
34346			res.Body.Close()
34347		}
34348		return nil, &googleapi.Error{
34349			Code:   res.StatusCode,
34350			Header: res.Header,
34351		}
34352	}
34353	if err != nil {
34354		return nil, err
34355	}
34356	defer googleapi.CloseBody(res)
34357	if err := googleapi.CheckResponse(res); err != nil {
34358		return nil, err
34359	}
34360	ret := &GoogleLongrunningOperation{
34361		ServerResponse: googleapi.ServerResponse{
34362			Header:         res.Header,
34363			HTTPStatusCode: res.StatusCode,
34364		},
34365	}
34366	target := &ret
34367	if err := gensupport.DecodeResponse(target, res); err != nil {
34368		return nil, err
34369	}
34370	return ret, nil
34371	// {
34372	//   "description": "Updates the specified document. Operation ",
34373	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
34374	//   "httpMethod": "PATCH",
34375	//   "id": "dialogflow.projects.knowledgeBases.documents.patch",
34376	//   "parameterOrder": [
34377	//     "name"
34378	//   ],
34379	//   "parameters": {
34380	//     "name": {
34381	//       "description": "Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`.",
34382	//       "location": "path",
34383	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
34384	//       "required": true,
34385	//       "type": "string"
34386	//     },
34387	//     "updateMask": {
34388	//       "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.",
34389	//       "format": "google-fieldmask",
34390	//       "location": "query",
34391	//       "type": "string"
34392	//     }
34393	//   },
34394	//   "path": "v2/{+name}",
34395	//   "request": {
34396	//     "$ref": "GoogleCloudDialogflowV2Document"
34397	//   },
34398	//   "response": {
34399	//     "$ref": "GoogleLongrunningOperation"
34400	//   },
34401	//   "scopes": [
34402	//     "https://www.googleapis.com/auth/cloud-platform",
34403	//     "https://www.googleapis.com/auth/dialogflow"
34404	//   ]
34405	// }
34406
34407}
34408
34409// method id "dialogflow.projects.knowledgeBases.documents.reload":
34410
34411type ProjectsKnowledgeBasesDocumentsReloadCall struct {
34412	s                                            *Service
34413	name                                         string
34414	googleclouddialogflowv2reloaddocumentrequest *GoogleCloudDialogflowV2ReloadDocumentRequest
34415	urlParams_                                   gensupport.URLParams
34416	ctx_                                         context.Context
34417	header_                                      http.Header
34418}
34419
34420// Reload: Reloads the specified document from its specified source,
34421// content_uri or content. The previously loaded content of the document
34422// will be deleted. Note: Even when the content of the document has not
34423// changed, there still may be side effects because of internal
34424// implementation changes. Note: The
34425// `projects.agent.knowledgeBases.documents` resource is deprecated;
34426// only use `projects.knowledgeBases.documents`. Operation
34427//
34428// - name: The name of the document to reload. Format:
34429//   `projects//locations//knowledgeBases//documents/`.
34430func (r *ProjectsKnowledgeBasesDocumentsService) Reload(name string, googleclouddialogflowv2reloaddocumentrequest *GoogleCloudDialogflowV2ReloadDocumentRequest) *ProjectsKnowledgeBasesDocumentsReloadCall {
34431	c := &ProjectsKnowledgeBasesDocumentsReloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34432	c.name = name
34433	c.googleclouddialogflowv2reloaddocumentrequest = googleclouddialogflowv2reloaddocumentrequest
34434	return c
34435}
34436
34437// Fields allows partial responses to be retrieved. See
34438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34439// for more information.
34440func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsReloadCall {
34441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34442	return c
34443}
34444
34445// Context sets the context to be used in this call's Do method. Any
34446// pending HTTP request will be aborted if the provided context is
34447// canceled.
34448func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsReloadCall {
34449	c.ctx_ = ctx
34450	return c
34451}
34452
34453// Header returns an http.Header that can be modified by the caller to
34454// add HTTP headers to the request.
34455func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Header() http.Header {
34456	if c.header_ == nil {
34457		c.header_ = make(http.Header)
34458	}
34459	return c.header_
34460}
34461
34462func (c *ProjectsKnowledgeBasesDocumentsReloadCall) doRequest(alt string) (*http.Response, error) {
34463	reqHeaders := make(http.Header)
34464	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
34465	for k, v := range c.header_ {
34466		reqHeaders[k] = v
34467	}
34468	reqHeaders.Set("User-Agent", c.s.userAgent())
34469	var body io.Reader = nil
34470	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2reloaddocumentrequest)
34471	if err != nil {
34472		return nil, err
34473	}
34474	reqHeaders.Set("Content-Type", "application/json")
34475	c.urlParams_.Set("alt", alt)
34476	c.urlParams_.Set("prettyPrint", "false")
34477	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:reload")
34478	urls += "?" + c.urlParams_.Encode()
34479	req, err := http.NewRequest("POST", urls, body)
34480	if err != nil {
34481		return nil, err
34482	}
34483	req.Header = reqHeaders
34484	googleapi.Expand(req.URL, map[string]string{
34485		"name": c.name,
34486	})
34487	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34488}
34489
34490// Do executes the "dialogflow.projects.knowledgeBases.documents.reload" call.
34491// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
34492// Any non-2xx status code is an error. Response headers are in either
34493// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
34494// was returned at all) in error.(*googleapi.Error).Header. Use
34495// googleapi.IsNotModified to check whether the returned error was
34496// because http.StatusNotModified was returned.
34497func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
34498	gensupport.SetOptions(c.urlParams_, opts...)
34499	res, err := c.doRequest("json")
34500	if res != nil && res.StatusCode == http.StatusNotModified {
34501		if res.Body != nil {
34502			res.Body.Close()
34503		}
34504		return nil, &googleapi.Error{
34505			Code:   res.StatusCode,
34506			Header: res.Header,
34507		}
34508	}
34509	if err != nil {
34510		return nil, err
34511	}
34512	defer googleapi.CloseBody(res)
34513	if err := googleapi.CheckResponse(res); err != nil {
34514		return nil, err
34515	}
34516	ret := &GoogleLongrunningOperation{
34517		ServerResponse: googleapi.ServerResponse{
34518			Header:         res.Header,
34519			HTTPStatusCode: res.StatusCode,
34520		},
34521	}
34522	target := &ret
34523	if err := gensupport.DecodeResponse(target, res); err != nil {
34524		return nil, err
34525	}
34526	return ret, nil
34527	// {
34528	//   "description": "Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. Operation ",
34529	//   "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload",
34530	//   "httpMethod": "POST",
34531	//   "id": "dialogflow.projects.knowledgeBases.documents.reload",
34532	//   "parameterOrder": [
34533	//     "name"
34534	//   ],
34535	//   "parameters": {
34536	//     "name": {
34537	//       "description": "Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/`",
34538	//       "location": "path",
34539	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
34540	//       "required": true,
34541	//       "type": "string"
34542	//     }
34543	//   },
34544	//   "path": "v2/{+name}:reload",
34545	//   "request": {
34546	//     "$ref": "GoogleCloudDialogflowV2ReloadDocumentRequest"
34547	//   },
34548	//   "response": {
34549	//     "$ref": "GoogleLongrunningOperation"
34550	//   },
34551	//   "scopes": [
34552	//     "https://www.googleapis.com/auth/cloud-platform",
34553	//     "https://www.googleapis.com/auth/dialogflow"
34554	//   ]
34555	// }
34556
34557}
34558
34559// method id "dialogflow.projects.locations.deleteAgent":
34560
34561type ProjectsLocationsDeleteAgentCall struct {
34562	s          *Service
34563	parent     string
34564	urlParams_ gensupport.URLParams
34565	ctx_       context.Context
34566	header_    http.Header
34567}
34568
34569// DeleteAgent: Deletes the specified agent.
34570//
34571// - parent: The project that the agent to delete is associated with.
34572//   Format: `projects/`.
34573func (r *ProjectsLocationsService) DeleteAgent(parent string) *ProjectsLocationsDeleteAgentCall {
34574	c := &ProjectsLocationsDeleteAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34575	c.parent = parent
34576	return c
34577}
34578
34579// Fields allows partial responses to be retrieved. See
34580// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34581// for more information.
34582func (c *ProjectsLocationsDeleteAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeleteAgentCall {
34583	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34584	return c
34585}
34586
34587// Context sets the context to be used in this call's Do method. Any
34588// pending HTTP request will be aborted if the provided context is
34589// canceled.
34590func (c *ProjectsLocationsDeleteAgentCall) Context(ctx context.Context) *ProjectsLocationsDeleteAgentCall {
34591	c.ctx_ = ctx
34592	return c
34593}
34594
34595// Header returns an http.Header that can be modified by the caller to
34596// add HTTP headers to the request.
34597func (c *ProjectsLocationsDeleteAgentCall) Header() http.Header {
34598	if c.header_ == nil {
34599		c.header_ = make(http.Header)
34600	}
34601	return c.header_
34602}
34603
34604func (c *ProjectsLocationsDeleteAgentCall) doRequest(alt string) (*http.Response, error) {
34605	reqHeaders := make(http.Header)
34606	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
34607	for k, v := range c.header_ {
34608		reqHeaders[k] = v
34609	}
34610	reqHeaders.Set("User-Agent", c.s.userAgent())
34611	var body io.Reader = nil
34612	c.urlParams_.Set("alt", alt)
34613	c.urlParams_.Set("prettyPrint", "false")
34614	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent")
34615	urls += "?" + c.urlParams_.Encode()
34616	req, err := http.NewRequest("DELETE", urls, body)
34617	if err != nil {
34618		return nil, err
34619	}
34620	req.Header = reqHeaders
34621	googleapi.Expand(req.URL, map[string]string{
34622		"parent": c.parent,
34623	})
34624	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34625}
34626
34627// Do executes the "dialogflow.projects.locations.deleteAgent" call.
34628// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
34629// non-2xx status code is an error. Response headers are in either
34630// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
34631// returned at all) in error.(*googleapi.Error).Header. Use
34632// googleapi.IsNotModified to check whether the returned error was
34633// because http.StatusNotModified was returned.
34634func (c *ProjectsLocationsDeleteAgentCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
34635	gensupport.SetOptions(c.urlParams_, opts...)
34636	res, err := c.doRequest("json")
34637	if res != nil && res.StatusCode == http.StatusNotModified {
34638		if res.Body != nil {
34639			res.Body.Close()
34640		}
34641		return nil, &googleapi.Error{
34642			Code:   res.StatusCode,
34643			Header: res.Header,
34644		}
34645	}
34646	if err != nil {
34647		return nil, err
34648	}
34649	defer googleapi.CloseBody(res)
34650	if err := googleapi.CheckResponse(res); err != nil {
34651		return nil, err
34652	}
34653	ret := &GoogleProtobufEmpty{
34654		ServerResponse: googleapi.ServerResponse{
34655			Header:         res.Header,
34656			HTTPStatusCode: res.StatusCode,
34657		},
34658	}
34659	target := &ret
34660	if err := gensupport.DecodeResponse(target, res); err != nil {
34661		return nil, err
34662	}
34663	return ret, nil
34664	// {
34665	//   "description": "Deletes the specified agent.",
34666	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent",
34667	//   "httpMethod": "DELETE",
34668	//   "id": "dialogflow.projects.locations.deleteAgent",
34669	//   "parameterOrder": [
34670	//     "parent"
34671	//   ],
34672	//   "parameters": {
34673	//     "parent": {
34674	//       "description": "Required. The project that the agent to delete is associated with. Format: `projects/`.",
34675	//       "location": "path",
34676	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
34677	//       "required": true,
34678	//       "type": "string"
34679	//     }
34680	//   },
34681	//   "path": "v2/{+parent}/agent",
34682	//   "response": {
34683	//     "$ref": "GoogleProtobufEmpty"
34684	//   },
34685	//   "scopes": [
34686	//     "https://www.googleapis.com/auth/cloud-platform",
34687	//     "https://www.googleapis.com/auth/dialogflow"
34688	//   ]
34689	// }
34690
34691}
34692
34693// method id "dialogflow.projects.locations.getAgent":
34694
34695type ProjectsLocationsGetAgentCall struct {
34696	s            *Service
34697	parent       string
34698	urlParams_   gensupport.URLParams
34699	ifNoneMatch_ string
34700	ctx_         context.Context
34701	header_      http.Header
34702}
34703
34704// GetAgent: Retrieves the specified agent.
34705//
34706// - parent: The project that the agent to fetch is associated with.
34707//   Format: `projects/`.
34708func (r *ProjectsLocationsService) GetAgent(parent string) *ProjectsLocationsGetAgentCall {
34709	c := &ProjectsLocationsGetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34710	c.parent = parent
34711	return c
34712}
34713
34714// Fields allows partial responses to be retrieved. See
34715// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34716// for more information.
34717func (c *ProjectsLocationsGetAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetAgentCall {
34718	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34719	return c
34720}
34721
34722// IfNoneMatch sets the optional parameter which makes the operation
34723// fail if the object's ETag matches the given value. This is useful for
34724// getting updates only after the object has changed since the last
34725// request. Use googleapi.IsNotModified to check whether the response
34726// error from Do is the result of In-None-Match.
34727func (c *ProjectsLocationsGetAgentCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetAgentCall {
34728	c.ifNoneMatch_ = entityTag
34729	return c
34730}
34731
34732// Context sets the context to be used in this call's Do method. Any
34733// pending HTTP request will be aborted if the provided context is
34734// canceled.
34735func (c *ProjectsLocationsGetAgentCall) Context(ctx context.Context) *ProjectsLocationsGetAgentCall {
34736	c.ctx_ = ctx
34737	return c
34738}
34739
34740// Header returns an http.Header that can be modified by the caller to
34741// add HTTP headers to the request.
34742func (c *ProjectsLocationsGetAgentCall) Header() http.Header {
34743	if c.header_ == nil {
34744		c.header_ = make(http.Header)
34745	}
34746	return c.header_
34747}
34748
34749func (c *ProjectsLocationsGetAgentCall) doRequest(alt string) (*http.Response, error) {
34750	reqHeaders := make(http.Header)
34751	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
34752	for k, v := range c.header_ {
34753		reqHeaders[k] = v
34754	}
34755	reqHeaders.Set("User-Agent", c.s.userAgent())
34756	if c.ifNoneMatch_ != "" {
34757		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34758	}
34759	var body io.Reader = nil
34760	c.urlParams_.Set("alt", alt)
34761	c.urlParams_.Set("prettyPrint", "false")
34762	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent")
34763	urls += "?" + c.urlParams_.Encode()
34764	req, err := http.NewRequest("GET", urls, body)
34765	if err != nil {
34766		return nil, err
34767	}
34768	req.Header = reqHeaders
34769	googleapi.Expand(req.URL, map[string]string{
34770		"parent": c.parent,
34771	})
34772	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34773}
34774
34775// Do executes the "dialogflow.projects.locations.getAgent" call.
34776// Exactly one of *GoogleCloudDialogflowV2Agent or error will be
34777// non-nil. Any non-2xx status code is an error. Response headers are in
34778// either *GoogleCloudDialogflowV2Agent.ServerResponse.Header or (if a
34779// response was returned at all) in error.(*googleapi.Error).Header. Use
34780// googleapi.IsNotModified to check whether the returned error was
34781// because http.StatusNotModified was returned.
34782func (c *ProjectsLocationsGetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Agent, error) {
34783	gensupport.SetOptions(c.urlParams_, opts...)
34784	res, err := c.doRequest("json")
34785	if res != nil && res.StatusCode == http.StatusNotModified {
34786		if res.Body != nil {
34787			res.Body.Close()
34788		}
34789		return nil, &googleapi.Error{
34790			Code:   res.StatusCode,
34791			Header: res.Header,
34792		}
34793	}
34794	if err != nil {
34795		return nil, err
34796	}
34797	defer googleapi.CloseBody(res)
34798	if err := googleapi.CheckResponse(res); err != nil {
34799		return nil, err
34800	}
34801	ret := &GoogleCloudDialogflowV2Agent{
34802		ServerResponse: googleapi.ServerResponse{
34803			Header:         res.Header,
34804			HTTPStatusCode: res.StatusCode,
34805		},
34806	}
34807	target := &ret
34808	if err := gensupport.DecodeResponse(target, res); err != nil {
34809		return nil, err
34810	}
34811	return ret, nil
34812	// {
34813	//   "description": "Retrieves the specified agent.",
34814	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent",
34815	//   "httpMethod": "GET",
34816	//   "id": "dialogflow.projects.locations.getAgent",
34817	//   "parameterOrder": [
34818	//     "parent"
34819	//   ],
34820	//   "parameters": {
34821	//     "parent": {
34822	//       "description": "Required. The project that the agent to fetch is associated with. Format: `projects/`.",
34823	//       "location": "path",
34824	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
34825	//       "required": true,
34826	//       "type": "string"
34827	//     }
34828	//   },
34829	//   "path": "v2/{+parent}/agent",
34830	//   "response": {
34831	//     "$ref": "GoogleCloudDialogflowV2Agent"
34832	//   },
34833	//   "scopes": [
34834	//     "https://www.googleapis.com/auth/cloud-platform",
34835	//     "https://www.googleapis.com/auth/dialogflow"
34836	//   ]
34837	// }
34838
34839}
34840
34841// method id "dialogflow.projects.locations.setAgent":
34842
34843type ProjectsLocationsSetAgentCall struct {
34844	s                            *Service
34845	parent                       string
34846	googleclouddialogflowv2agent *GoogleCloudDialogflowV2Agent
34847	urlParams_                   gensupport.URLParams
34848	ctx_                         context.Context
34849	header_                      http.Header
34850}
34851
34852// SetAgent: Creates/updates the specified agent. Note: You should
34853// always train an agent prior to sending it queries. See the training
34854// documentation (https://cloud.google.com/dialogflow/es/docs/training).
34855//
34856// - parent: The project of this agent. Format: `projects/`.
34857func (r *ProjectsLocationsService) SetAgent(parent string, googleclouddialogflowv2agent *GoogleCloudDialogflowV2Agent) *ProjectsLocationsSetAgentCall {
34858	c := &ProjectsLocationsSetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34859	c.parent = parent
34860	c.googleclouddialogflowv2agent = googleclouddialogflowv2agent
34861	return c
34862}
34863
34864// UpdateMask sets the optional parameter "updateMask": The mask to
34865// control which fields get updated.
34866func (c *ProjectsLocationsSetAgentCall) UpdateMask(updateMask string) *ProjectsLocationsSetAgentCall {
34867	c.urlParams_.Set("updateMask", updateMask)
34868	return c
34869}
34870
34871// Fields allows partial responses to be retrieved. See
34872// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34873// for more information.
34874func (c *ProjectsLocationsSetAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsSetAgentCall {
34875	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34876	return c
34877}
34878
34879// Context sets the context to be used in this call's Do method. Any
34880// pending HTTP request will be aborted if the provided context is
34881// canceled.
34882func (c *ProjectsLocationsSetAgentCall) Context(ctx context.Context) *ProjectsLocationsSetAgentCall {
34883	c.ctx_ = ctx
34884	return c
34885}
34886
34887// Header returns an http.Header that can be modified by the caller to
34888// add HTTP headers to the request.
34889func (c *ProjectsLocationsSetAgentCall) Header() http.Header {
34890	if c.header_ == nil {
34891		c.header_ = make(http.Header)
34892	}
34893	return c.header_
34894}
34895
34896func (c *ProjectsLocationsSetAgentCall) doRequest(alt string) (*http.Response, error) {
34897	reqHeaders := make(http.Header)
34898	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
34899	for k, v := range c.header_ {
34900		reqHeaders[k] = v
34901	}
34902	reqHeaders.Set("User-Agent", c.s.userAgent())
34903	var body io.Reader = nil
34904	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2agent)
34905	if err != nil {
34906		return nil, err
34907	}
34908	reqHeaders.Set("Content-Type", "application/json")
34909	c.urlParams_.Set("alt", alt)
34910	c.urlParams_.Set("prettyPrint", "false")
34911	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent")
34912	urls += "?" + c.urlParams_.Encode()
34913	req, err := http.NewRequest("POST", urls, body)
34914	if err != nil {
34915		return nil, err
34916	}
34917	req.Header = reqHeaders
34918	googleapi.Expand(req.URL, map[string]string{
34919		"parent": c.parent,
34920	})
34921	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34922}
34923
34924// Do executes the "dialogflow.projects.locations.setAgent" call.
34925// Exactly one of *GoogleCloudDialogflowV2Agent or error will be
34926// non-nil. Any non-2xx status code is an error. Response headers are in
34927// either *GoogleCloudDialogflowV2Agent.ServerResponse.Header or (if a
34928// response was returned at all) in error.(*googleapi.Error).Header. Use
34929// googleapi.IsNotModified to check whether the returned error was
34930// because http.StatusNotModified was returned.
34931func (c *ProjectsLocationsSetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Agent, error) {
34932	gensupport.SetOptions(c.urlParams_, opts...)
34933	res, err := c.doRequest("json")
34934	if res != nil && res.StatusCode == http.StatusNotModified {
34935		if res.Body != nil {
34936			res.Body.Close()
34937		}
34938		return nil, &googleapi.Error{
34939			Code:   res.StatusCode,
34940			Header: res.Header,
34941		}
34942	}
34943	if err != nil {
34944		return nil, err
34945	}
34946	defer googleapi.CloseBody(res)
34947	if err := googleapi.CheckResponse(res); err != nil {
34948		return nil, err
34949	}
34950	ret := &GoogleCloudDialogflowV2Agent{
34951		ServerResponse: googleapi.ServerResponse{
34952			Header:         res.Header,
34953			HTTPStatusCode: res.StatusCode,
34954		},
34955	}
34956	target := &ret
34957	if err := gensupport.DecodeResponse(target, res); err != nil {
34958		return nil, err
34959	}
34960	return ret, nil
34961	// {
34962	//   "description": "Creates/updates the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
34963	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent",
34964	//   "httpMethod": "POST",
34965	//   "id": "dialogflow.projects.locations.setAgent",
34966	//   "parameterOrder": [
34967	//     "parent"
34968	//   ],
34969	//   "parameters": {
34970	//     "parent": {
34971	//       "description": "Required. The project of this agent. Format: `projects/`.",
34972	//       "location": "path",
34973	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
34974	//       "required": true,
34975	//       "type": "string"
34976	//     },
34977	//     "updateMask": {
34978	//       "description": "Optional. The mask to control which fields get updated.",
34979	//       "format": "google-fieldmask",
34980	//       "location": "query",
34981	//       "type": "string"
34982	//     }
34983	//   },
34984	//   "path": "v2/{+parent}/agent",
34985	//   "request": {
34986	//     "$ref": "GoogleCloudDialogflowV2Agent"
34987	//   },
34988	//   "response": {
34989	//     "$ref": "GoogleCloudDialogflowV2Agent"
34990	//   },
34991	//   "scopes": [
34992	//     "https://www.googleapis.com/auth/cloud-platform",
34993	//     "https://www.googleapis.com/auth/dialogflow"
34994	//   ]
34995	// }
34996
34997}
34998
34999// method id "dialogflow.projects.locations.agent.export":
35000
35001type ProjectsLocationsAgentExportCall struct {
35002	s                                         *Service
35003	parent                                    string
35004	googleclouddialogflowv2exportagentrequest *GoogleCloudDialogflowV2ExportAgentRequest
35005	urlParams_                                gensupport.URLParams
35006	ctx_                                      context.Context
35007	header_                                   http.Header
35008}
35009
35010// Export: Exports the specified agent to a ZIP file.
35011//
35012// - parent: The project that the agent to export is associated with.
35013//   Format: `projects/`.
35014func (r *ProjectsLocationsAgentService) Export(parent string, googleclouddialogflowv2exportagentrequest *GoogleCloudDialogflowV2ExportAgentRequest) *ProjectsLocationsAgentExportCall {
35015	c := &ProjectsLocationsAgentExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35016	c.parent = parent
35017	c.googleclouddialogflowv2exportagentrequest = googleclouddialogflowv2exportagentrequest
35018	return c
35019}
35020
35021// Fields allows partial responses to be retrieved. See
35022// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35023// for more information.
35024func (c *ProjectsLocationsAgentExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentExportCall {
35025	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35026	return c
35027}
35028
35029// Context sets the context to be used in this call's Do method. Any
35030// pending HTTP request will be aborted if the provided context is
35031// canceled.
35032func (c *ProjectsLocationsAgentExportCall) Context(ctx context.Context) *ProjectsLocationsAgentExportCall {
35033	c.ctx_ = ctx
35034	return c
35035}
35036
35037// Header returns an http.Header that can be modified by the caller to
35038// add HTTP headers to the request.
35039func (c *ProjectsLocationsAgentExportCall) Header() http.Header {
35040	if c.header_ == nil {
35041		c.header_ = make(http.Header)
35042	}
35043	return c.header_
35044}
35045
35046func (c *ProjectsLocationsAgentExportCall) doRequest(alt string) (*http.Response, error) {
35047	reqHeaders := make(http.Header)
35048	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
35049	for k, v := range c.header_ {
35050		reqHeaders[k] = v
35051	}
35052	reqHeaders.Set("User-Agent", c.s.userAgent())
35053	var body io.Reader = nil
35054	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2exportagentrequest)
35055	if err != nil {
35056		return nil, err
35057	}
35058	reqHeaders.Set("Content-Type", "application/json")
35059	c.urlParams_.Set("alt", alt)
35060	c.urlParams_.Set("prettyPrint", "false")
35061	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:export")
35062	urls += "?" + c.urlParams_.Encode()
35063	req, err := http.NewRequest("POST", urls, body)
35064	if err != nil {
35065		return nil, err
35066	}
35067	req.Header = reqHeaders
35068	googleapi.Expand(req.URL, map[string]string{
35069		"parent": c.parent,
35070	})
35071	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35072}
35073
35074// Do executes the "dialogflow.projects.locations.agent.export" call.
35075// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
35076// Any non-2xx status code is an error. Response headers are in either
35077// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
35078// was returned at all) in error.(*googleapi.Error).Header. Use
35079// googleapi.IsNotModified to check whether the returned error was
35080// because http.StatusNotModified was returned.
35081func (c *ProjectsLocationsAgentExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
35082	gensupport.SetOptions(c.urlParams_, opts...)
35083	res, err := c.doRequest("json")
35084	if res != nil && res.StatusCode == http.StatusNotModified {
35085		if res.Body != nil {
35086			res.Body.Close()
35087		}
35088		return nil, &googleapi.Error{
35089			Code:   res.StatusCode,
35090			Header: res.Header,
35091		}
35092	}
35093	if err != nil {
35094		return nil, err
35095	}
35096	defer googleapi.CloseBody(res)
35097	if err := googleapi.CheckResponse(res); err != nil {
35098		return nil, err
35099	}
35100	ret := &GoogleLongrunningOperation{
35101		ServerResponse: googleapi.ServerResponse{
35102			Header:         res.Header,
35103			HTTPStatusCode: res.StatusCode,
35104		},
35105	}
35106	target := &ret
35107	if err := gensupport.DecodeResponse(target, res); err != nil {
35108		return nil, err
35109	}
35110	return ret, nil
35111	// {
35112	//   "description": "Exports the specified agent to a ZIP file.",
35113	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent:export",
35114	//   "httpMethod": "POST",
35115	//   "id": "dialogflow.projects.locations.agent.export",
35116	//   "parameterOrder": [
35117	//     "parent"
35118	//   ],
35119	//   "parameters": {
35120	//     "parent": {
35121	//       "description": "Required. The project that the agent to export is associated with. Format: `projects/`.",
35122	//       "location": "path",
35123	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
35124	//       "required": true,
35125	//       "type": "string"
35126	//     }
35127	//   },
35128	//   "path": "v2/{+parent}/agent:export",
35129	//   "request": {
35130	//     "$ref": "GoogleCloudDialogflowV2ExportAgentRequest"
35131	//   },
35132	//   "response": {
35133	//     "$ref": "GoogleLongrunningOperation"
35134	//   },
35135	//   "scopes": [
35136	//     "https://www.googleapis.com/auth/cloud-platform",
35137	//     "https://www.googleapis.com/auth/dialogflow"
35138	//   ]
35139	// }
35140
35141}
35142
35143// method id "dialogflow.projects.locations.agent.getFulfillment":
35144
35145type ProjectsLocationsAgentGetFulfillmentCall struct {
35146	s            *Service
35147	name         string
35148	urlParams_   gensupport.URLParams
35149	ifNoneMatch_ string
35150	ctx_         context.Context
35151	header_      http.Header
35152}
35153
35154// GetFulfillment: Retrieves the fulfillment.
35155//
35156// - name: The name of the fulfillment. Format:
35157//   `projects//agent/fulfillment`.
35158func (r *ProjectsLocationsAgentService) GetFulfillment(name string) *ProjectsLocationsAgentGetFulfillmentCall {
35159	c := &ProjectsLocationsAgentGetFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35160	c.name = name
35161	return c
35162}
35163
35164// Fields allows partial responses to be retrieved. See
35165// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35166// for more information.
35167func (c *ProjectsLocationsAgentGetFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentGetFulfillmentCall {
35168	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35169	return c
35170}
35171
35172// IfNoneMatch sets the optional parameter which makes the operation
35173// fail if the object's ETag matches the given value. This is useful for
35174// getting updates only after the object has changed since the last
35175// request. Use googleapi.IsNotModified to check whether the response
35176// error from Do is the result of In-None-Match.
35177func (c *ProjectsLocationsAgentGetFulfillmentCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentGetFulfillmentCall {
35178	c.ifNoneMatch_ = entityTag
35179	return c
35180}
35181
35182// Context sets the context to be used in this call's Do method. Any
35183// pending HTTP request will be aborted if the provided context is
35184// canceled.
35185func (c *ProjectsLocationsAgentGetFulfillmentCall) Context(ctx context.Context) *ProjectsLocationsAgentGetFulfillmentCall {
35186	c.ctx_ = ctx
35187	return c
35188}
35189
35190// Header returns an http.Header that can be modified by the caller to
35191// add HTTP headers to the request.
35192func (c *ProjectsLocationsAgentGetFulfillmentCall) Header() http.Header {
35193	if c.header_ == nil {
35194		c.header_ = make(http.Header)
35195	}
35196	return c.header_
35197}
35198
35199func (c *ProjectsLocationsAgentGetFulfillmentCall) doRequest(alt string) (*http.Response, error) {
35200	reqHeaders := make(http.Header)
35201	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
35202	for k, v := range c.header_ {
35203		reqHeaders[k] = v
35204	}
35205	reqHeaders.Set("User-Agent", c.s.userAgent())
35206	if c.ifNoneMatch_ != "" {
35207		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35208	}
35209	var body io.Reader = nil
35210	c.urlParams_.Set("alt", alt)
35211	c.urlParams_.Set("prettyPrint", "false")
35212	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
35213	urls += "?" + c.urlParams_.Encode()
35214	req, err := http.NewRequest("GET", urls, body)
35215	if err != nil {
35216		return nil, err
35217	}
35218	req.Header = reqHeaders
35219	googleapi.Expand(req.URL, map[string]string{
35220		"name": c.name,
35221	})
35222	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35223}
35224
35225// Do executes the "dialogflow.projects.locations.agent.getFulfillment" call.
35226// Exactly one of *GoogleCloudDialogflowV2Fulfillment or error will be
35227// non-nil. Any non-2xx status code is an error. Response headers are in
35228// either *GoogleCloudDialogflowV2Fulfillment.ServerResponse.Header or
35229// (if a response was returned at all) in
35230// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
35231// whether the returned error was because http.StatusNotModified was
35232// returned.
35233func (c *ProjectsLocationsAgentGetFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Fulfillment, error) {
35234	gensupport.SetOptions(c.urlParams_, opts...)
35235	res, err := c.doRequest("json")
35236	if res != nil && res.StatusCode == http.StatusNotModified {
35237		if res.Body != nil {
35238			res.Body.Close()
35239		}
35240		return nil, &googleapi.Error{
35241			Code:   res.StatusCode,
35242			Header: res.Header,
35243		}
35244	}
35245	if err != nil {
35246		return nil, err
35247	}
35248	defer googleapi.CloseBody(res)
35249	if err := googleapi.CheckResponse(res); err != nil {
35250		return nil, err
35251	}
35252	ret := &GoogleCloudDialogflowV2Fulfillment{
35253		ServerResponse: googleapi.ServerResponse{
35254			Header:         res.Header,
35255			HTTPStatusCode: res.StatusCode,
35256		},
35257	}
35258	target := &ret
35259	if err := gensupport.DecodeResponse(target, res); err != nil {
35260		return nil, err
35261	}
35262	return ret, nil
35263	// {
35264	//   "description": "Retrieves the fulfillment.",
35265	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/fulfillment",
35266	//   "httpMethod": "GET",
35267	//   "id": "dialogflow.projects.locations.agent.getFulfillment",
35268	//   "parameterOrder": [
35269	//     "name"
35270	//   ],
35271	//   "parameters": {
35272	//     "name": {
35273	//       "description": "Required. The name of the fulfillment. Format: `projects//agent/fulfillment`.",
35274	//       "location": "path",
35275	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/fulfillment$",
35276	//       "required": true,
35277	//       "type": "string"
35278	//     }
35279	//   },
35280	//   "path": "v2/{+name}",
35281	//   "response": {
35282	//     "$ref": "GoogleCloudDialogflowV2Fulfillment"
35283	//   },
35284	//   "scopes": [
35285	//     "https://www.googleapis.com/auth/cloud-platform",
35286	//     "https://www.googleapis.com/auth/dialogflow"
35287	//   ]
35288	// }
35289
35290}
35291
35292// method id "dialogflow.projects.locations.agent.getValidationResult":
35293
35294type ProjectsLocationsAgentGetValidationResultCall struct {
35295	s            *Service
35296	parent       string
35297	urlParams_   gensupport.URLParams
35298	ifNoneMatch_ string
35299	ctx_         context.Context
35300	header_      http.Header
35301}
35302
35303// GetValidationResult: Gets agent validation result. Agent validation
35304// is performed during training time and is updated automatically when
35305// training is completed.
35306//
35307// - parent: The project that the agent is associated with. Format:
35308//   `projects/`.
35309func (r *ProjectsLocationsAgentService) GetValidationResult(parent string) *ProjectsLocationsAgentGetValidationResultCall {
35310	c := &ProjectsLocationsAgentGetValidationResultCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35311	c.parent = parent
35312	return c
35313}
35314
35315// LanguageCode sets the optional parameter "languageCode": The language
35316// for which you want a validation result. If not specified, the agent's
35317// default language is used. Many languages
35318// (https://cloud.google.com/dialogflow/docs/reference/language) are
35319// supported. Note: languages must be enabled in the agent before they
35320// can be used.
35321func (c *ProjectsLocationsAgentGetValidationResultCall) LanguageCode(languageCode string) *ProjectsLocationsAgentGetValidationResultCall {
35322	c.urlParams_.Set("languageCode", languageCode)
35323	return c
35324}
35325
35326// Fields allows partial responses to be retrieved. See
35327// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35328// for more information.
35329func (c *ProjectsLocationsAgentGetValidationResultCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentGetValidationResultCall {
35330	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35331	return c
35332}
35333
35334// IfNoneMatch sets the optional parameter which makes the operation
35335// fail if the object's ETag matches the given value. This is useful for
35336// getting updates only after the object has changed since the last
35337// request. Use googleapi.IsNotModified to check whether the response
35338// error from Do is the result of In-None-Match.
35339func (c *ProjectsLocationsAgentGetValidationResultCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentGetValidationResultCall {
35340	c.ifNoneMatch_ = entityTag
35341	return c
35342}
35343
35344// Context sets the context to be used in this call's Do method. Any
35345// pending HTTP request will be aborted if the provided context is
35346// canceled.
35347func (c *ProjectsLocationsAgentGetValidationResultCall) Context(ctx context.Context) *ProjectsLocationsAgentGetValidationResultCall {
35348	c.ctx_ = ctx
35349	return c
35350}
35351
35352// Header returns an http.Header that can be modified by the caller to
35353// add HTTP headers to the request.
35354func (c *ProjectsLocationsAgentGetValidationResultCall) Header() http.Header {
35355	if c.header_ == nil {
35356		c.header_ = make(http.Header)
35357	}
35358	return c.header_
35359}
35360
35361func (c *ProjectsLocationsAgentGetValidationResultCall) doRequest(alt string) (*http.Response, error) {
35362	reqHeaders := make(http.Header)
35363	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
35364	for k, v := range c.header_ {
35365		reqHeaders[k] = v
35366	}
35367	reqHeaders.Set("User-Agent", c.s.userAgent())
35368	if c.ifNoneMatch_ != "" {
35369		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35370	}
35371	var body io.Reader = nil
35372	c.urlParams_.Set("alt", alt)
35373	c.urlParams_.Set("prettyPrint", "false")
35374	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent/validationResult")
35375	urls += "?" + c.urlParams_.Encode()
35376	req, err := http.NewRequest("GET", urls, body)
35377	if err != nil {
35378		return nil, err
35379	}
35380	req.Header = reqHeaders
35381	googleapi.Expand(req.URL, map[string]string{
35382		"parent": c.parent,
35383	})
35384	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35385}
35386
35387// Do executes the "dialogflow.projects.locations.agent.getValidationResult" call.
35388// Exactly one of *GoogleCloudDialogflowV2ValidationResult or error will
35389// be non-nil. Any non-2xx status code is an error. Response headers are
35390// in either
35391// *GoogleCloudDialogflowV2ValidationResult.ServerResponse.Header or (if
35392// a response was returned at all) in error.(*googleapi.Error).Header.
35393// Use googleapi.IsNotModified to check whether the returned error was
35394// because http.StatusNotModified was returned.
35395func (c *ProjectsLocationsAgentGetValidationResultCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ValidationResult, error) {
35396	gensupport.SetOptions(c.urlParams_, opts...)
35397	res, err := c.doRequest("json")
35398	if res != nil && res.StatusCode == http.StatusNotModified {
35399		if res.Body != nil {
35400			res.Body.Close()
35401		}
35402		return nil, &googleapi.Error{
35403			Code:   res.StatusCode,
35404			Header: res.Header,
35405		}
35406	}
35407	if err != nil {
35408		return nil, err
35409	}
35410	defer googleapi.CloseBody(res)
35411	if err := googleapi.CheckResponse(res); err != nil {
35412		return nil, err
35413	}
35414	ret := &GoogleCloudDialogflowV2ValidationResult{
35415		ServerResponse: googleapi.ServerResponse{
35416			Header:         res.Header,
35417			HTTPStatusCode: res.StatusCode,
35418		},
35419	}
35420	target := &ret
35421	if err := gensupport.DecodeResponse(target, res); err != nil {
35422		return nil, err
35423	}
35424	return ret, nil
35425	// {
35426	//   "description": "Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed.",
35427	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/validationResult",
35428	//   "httpMethod": "GET",
35429	//   "id": "dialogflow.projects.locations.agent.getValidationResult",
35430	//   "parameterOrder": [
35431	//     "parent"
35432	//   ],
35433	//   "parameters": {
35434	//     "languageCode": {
35435	//       "description": "Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.",
35436	//       "location": "query",
35437	//       "type": "string"
35438	//     },
35439	//     "parent": {
35440	//       "description": "Required. The project that the agent is associated with. Format: `projects/`.",
35441	//       "location": "path",
35442	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
35443	//       "required": true,
35444	//       "type": "string"
35445	//     }
35446	//   },
35447	//   "path": "v2/{+parent}/agent/validationResult",
35448	//   "response": {
35449	//     "$ref": "GoogleCloudDialogflowV2ValidationResult"
35450	//   },
35451	//   "scopes": [
35452	//     "https://www.googleapis.com/auth/cloud-platform",
35453	//     "https://www.googleapis.com/auth/dialogflow"
35454	//   ]
35455	// }
35456
35457}
35458
35459// method id "dialogflow.projects.locations.agent.import":
35460
35461type ProjectsLocationsAgentImportCall struct {
35462	s                                         *Service
35463	parent                                    string
35464	googleclouddialogflowv2importagentrequest *GoogleCloudDialogflowV2ImportAgentRequest
35465	urlParams_                                gensupport.URLParams
35466	ctx_                                      context.Context
35467	header_                                   http.Header
35468}
35469
35470// Import: Imports the specified agent from a ZIP file. Uploads new
35471// intents and entity types without deleting the existing ones. Intents
35472// and entity types with the same name are replaced with the new
35473// versions from ImportAgentRequest. After the import, the imported
35474// draft agent will be trained automatically (unless disabled in agent
35475// settings). However, once the import is done, training may not be
35476// completed yet. Please call TrainAgent and wait for the operation it
35477// returns in order to train explicitly. An operation which tracks when
35478// importing is complete. It only tracks when the draft agent is updated
35479// not when it is done training. Note: You should always train an agent
35480// prior to sending it queries. See the training documentation
35481// (https://cloud.google.com/dialogflow/es/docs/training).
35482//
35483// - parent: The project that the agent to import is associated with.
35484//   Format: `projects/`.
35485func (r *ProjectsLocationsAgentService) Import(parent string, googleclouddialogflowv2importagentrequest *GoogleCloudDialogflowV2ImportAgentRequest) *ProjectsLocationsAgentImportCall {
35486	c := &ProjectsLocationsAgentImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35487	c.parent = parent
35488	c.googleclouddialogflowv2importagentrequest = googleclouddialogflowv2importagentrequest
35489	return c
35490}
35491
35492// Fields allows partial responses to be retrieved. See
35493// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35494// for more information.
35495func (c *ProjectsLocationsAgentImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentImportCall {
35496	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35497	return c
35498}
35499
35500// Context sets the context to be used in this call's Do method. Any
35501// pending HTTP request will be aborted if the provided context is
35502// canceled.
35503func (c *ProjectsLocationsAgentImportCall) Context(ctx context.Context) *ProjectsLocationsAgentImportCall {
35504	c.ctx_ = ctx
35505	return c
35506}
35507
35508// Header returns an http.Header that can be modified by the caller to
35509// add HTTP headers to the request.
35510func (c *ProjectsLocationsAgentImportCall) Header() http.Header {
35511	if c.header_ == nil {
35512		c.header_ = make(http.Header)
35513	}
35514	return c.header_
35515}
35516
35517func (c *ProjectsLocationsAgentImportCall) doRequest(alt string) (*http.Response, error) {
35518	reqHeaders := make(http.Header)
35519	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
35520	for k, v := range c.header_ {
35521		reqHeaders[k] = v
35522	}
35523	reqHeaders.Set("User-Agent", c.s.userAgent())
35524	var body io.Reader = nil
35525	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2importagentrequest)
35526	if err != nil {
35527		return nil, err
35528	}
35529	reqHeaders.Set("Content-Type", "application/json")
35530	c.urlParams_.Set("alt", alt)
35531	c.urlParams_.Set("prettyPrint", "false")
35532	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:import")
35533	urls += "?" + c.urlParams_.Encode()
35534	req, err := http.NewRequest("POST", urls, body)
35535	if err != nil {
35536		return nil, err
35537	}
35538	req.Header = reqHeaders
35539	googleapi.Expand(req.URL, map[string]string{
35540		"parent": c.parent,
35541	})
35542	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35543}
35544
35545// Do executes the "dialogflow.projects.locations.agent.import" call.
35546// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
35547// Any non-2xx status code is an error. Response headers are in either
35548// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
35549// was returned at all) in error.(*googleapi.Error).Header. Use
35550// googleapi.IsNotModified to check whether the returned error was
35551// because http.StatusNotModified was returned.
35552func (c *ProjectsLocationsAgentImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
35553	gensupport.SetOptions(c.urlParams_, opts...)
35554	res, err := c.doRequest("json")
35555	if res != nil && res.StatusCode == http.StatusNotModified {
35556		if res.Body != nil {
35557			res.Body.Close()
35558		}
35559		return nil, &googleapi.Error{
35560			Code:   res.StatusCode,
35561			Header: res.Header,
35562		}
35563	}
35564	if err != nil {
35565		return nil, err
35566	}
35567	defer googleapi.CloseBody(res)
35568	if err := googleapi.CheckResponse(res); err != nil {
35569		return nil, err
35570	}
35571	ret := &GoogleLongrunningOperation{
35572		ServerResponse: googleapi.ServerResponse{
35573			Header:         res.Header,
35574			HTTPStatusCode: res.StatusCode,
35575		},
35576	}
35577	target := &ret
35578	if err := gensupport.DecodeResponse(target, res); err != nil {
35579		return nil, err
35580	}
35581	return ret, nil
35582	// {
35583	//   "description": "Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
35584	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent:import",
35585	//   "httpMethod": "POST",
35586	//   "id": "dialogflow.projects.locations.agent.import",
35587	//   "parameterOrder": [
35588	//     "parent"
35589	//   ],
35590	//   "parameters": {
35591	//     "parent": {
35592	//       "description": "Required. The project that the agent to import is associated with. Format: `projects/`.",
35593	//       "location": "path",
35594	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
35595	//       "required": true,
35596	//       "type": "string"
35597	//     }
35598	//   },
35599	//   "path": "v2/{+parent}/agent:import",
35600	//   "request": {
35601	//     "$ref": "GoogleCloudDialogflowV2ImportAgentRequest"
35602	//   },
35603	//   "response": {
35604	//     "$ref": "GoogleLongrunningOperation"
35605	//   },
35606	//   "scopes": [
35607	//     "https://www.googleapis.com/auth/cloud-platform",
35608	//     "https://www.googleapis.com/auth/dialogflow"
35609	//   ]
35610	// }
35611
35612}
35613
35614// method id "dialogflow.projects.locations.agent.restore":
35615
35616type ProjectsLocationsAgentRestoreCall struct {
35617	s                                          *Service
35618	parent                                     string
35619	googleclouddialogflowv2restoreagentrequest *GoogleCloudDialogflowV2RestoreAgentRequest
35620	urlParams_                                 gensupport.URLParams
35621	ctx_                                       context.Context
35622	header_                                    http.Header
35623}
35624
35625// Restore: Restores the specified agent from a ZIP file. Replaces the
35626// current agent version with a new one. All the intents and entity
35627// types in the older version are deleted. After the restore, the
35628// restored draft agent will be trained automatically (unless disabled
35629// in agent settings). However, once the restore is done, training may
35630// not be completed yet. Please call TrainAgent and wait for the
35631// operation it returns in order to train explicitly. An operation which
35632// tracks when restoring is complete. It only tracks when the draft
35633// agent is updated not when it is done training. Note: You should
35634// always train an agent prior to sending it queries. See the training
35635// documentation (https://cloud.google.com/dialogflow/es/docs/training).
35636//
35637// - parent: The project that the agent to restore is associated with.
35638//   Format: `projects/`.
35639func (r *ProjectsLocationsAgentService) Restore(parent string, googleclouddialogflowv2restoreagentrequest *GoogleCloudDialogflowV2RestoreAgentRequest) *ProjectsLocationsAgentRestoreCall {
35640	c := &ProjectsLocationsAgentRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35641	c.parent = parent
35642	c.googleclouddialogflowv2restoreagentrequest = googleclouddialogflowv2restoreagentrequest
35643	return c
35644}
35645
35646// Fields allows partial responses to be retrieved. See
35647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35648// for more information.
35649func (c *ProjectsLocationsAgentRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentRestoreCall {
35650	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35651	return c
35652}
35653
35654// Context sets the context to be used in this call's Do method. Any
35655// pending HTTP request will be aborted if the provided context is
35656// canceled.
35657func (c *ProjectsLocationsAgentRestoreCall) Context(ctx context.Context) *ProjectsLocationsAgentRestoreCall {
35658	c.ctx_ = ctx
35659	return c
35660}
35661
35662// Header returns an http.Header that can be modified by the caller to
35663// add HTTP headers to the request.
35664func (c *ProjectsLocationsAgentRestoreCall) Header() http.Header {
35665	if c.header_ == nil {
35666		c.header_ = make(http.Header)
35667	}
35668	return c.header_
35669}
35670
35671func (c *ProjectsLocationsAgentRestoreCall) doRequest(alt string) (*http.Response, error) {
35672	reqHeaders := make(http.Header)
35673	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
35674	for k, v := range c.header_ {
35675		reqHeaders[k] = v
35676	}
35677	reqHeaders.Set("User-Agent", c.s.userAgent())
35678	var body io.Reader = nil
35679	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2restoreagentrequest)
35680	if err != nil {
35681		return nil, err
35682	}
35683	reqHeaders.Set("Content-Type", "application/json")
35684	c.urlParams_.Set("alt", alt)
35685	c.urlParams_.Set("prettyPrint", "false")
35686	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:restore")
35687	urls += "?" + c.urlParams_.Encode()
35688	req, err := http.NewRequest("POST", urls, body)
35689	if err != nil {
35690		return nil, err
35691	}
35692	req.Header = reqHeaders
35693	googleapi.Expand(req.URL, map[string]string{
35694		"parent": c.parent,
35695	})
35696	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35697}
35698
35699// Do executes the "dialogflow.projects.locations.agent.restore" call.
35700// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
35701// Any non-2xx status code is an error. Response headers are in either
35702// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
35703// was returned at all) in error.(*googleapi.Error).Header. Use
35704// googleapi.IsNotModified to check whether the returned error was
35705// because http.StatusNotModified was returned.
35706func (c *ProjectsLocationsAgentRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
35707	gensupport.SetOptions(c.urlParams_, opts...)
35708	res, err := c.doRequest("json")
35709	if res != nil && res.StatusCode == http.StatusNotModified {
35710		if res.Body != nil {
35711			res.Body.Close()
35712		}
35713		return nil, &googleapi.Error{
35714			Code:   res.StatusCode,
35715			Header: res.Header,
35716		}
35717	}
35718	if err != nil {
35719		return nil, err
35720	}
35721	defer googleapi.CloseBody(res)
35722	if err := googleapi.CheckResponse(res); err != nil {
35723		return nil, err
35724	}
35725	ret := &GoogleLongrunningOperation{
35726		ServerResponse: googleapi.ServerResponse{
35727			Header:         res.Header,
35728			HTTPStatusCode: res.StatusCode,
35729		},
35730	}
35731	target := &ret
35732	if err := gensupport.DecodeResponse(target, res); err != nil {
35733		return nil, err
35734	}
35735	return ret, nil
35736	// {
35737	//   "description": "Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
35738	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent:restore",
35739	//   "httpMethod": "POST",
35740	//   "id": "dialogflow.projects.locations.agent.restore",
35741	//   "parameterOrder": [
35742	//     "parent"
35743	//   ],
35744	//   "parameters": {
35745	//     "parent": {
35746	//       "description": "Required. The project that the agent to restore is associated with. Format: `projects/`.",
35747	//       "location": "path",
35748	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
35749	//       "required": true,
35750	//       "type": "string"
35751	//     }
35752	//   },
35753	//   "path": "v2/{+parent}/agent:restore",
35754	//   "request": {
35755	//     "$ref": "GoogleCloudDialogflowV2RestoreAgentRequest"
35756	//   },
35757	//   "response": {
35758	//     "$ref": "GoogleLongrunningOperation"
35759	//   },
35760	//   "scopes": [
35761	//     "https://www.googleapis.com/auth/cloud-platform",
35762	//     "https://www.googleapis.com/auth/dialogflow"
35763	//   ]
35764	// }
35765
35766}
35767
35768// method id "dialogflow.projects.locations.agent.search":
35769
35770type ProjectsLocationsAgentSearchCall struct {
35771	s            *Service
35772	parent       string
35773	urlParams_   gensupport.URLParams
35774	ifNoneMatch_ string
35775	ctx_         context.Context
35776	header_      http.Header
35777}
35778
35779// Search: Returns the list of agents. Since there is at most one
35780// conversational agent per project, this method is useful primarily for
35781// listing all agents across projects the caller has access to. One can
35782// achieve that with a wildcard project collection id "-". Refer to List
35783// Sub-Collections
35784// (https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
35785//
35786// - parent: The project to list agents from. Format: `projects/`.
35787func (r *ProjectsLocationsAgentService) Search(parent string) *ProjectsLocationsAgentSearchCall {
35788	c := &ProjectsLocationsAgentSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35789	c.parent = parent
35790	return c
35791}
35792
35793// PageSize sets the optional parameter "pageSize": The maximum number
35794// of items to return in a single page. By default 100 and at most 1000.
35795func (c *ProjectsLocationsAgentSearchCall) PageSize(pageSize int64) *ProjectsLocationsAgentSearchCall {
35796	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
35797	return c
35798}
35799
35800// PageToken sets the optional parameter "pageToken": The
35801// next_page_token value returned from a previous list request.
35802func (c *ProjectsLocationsAgentSearchCall) PageToken(pageToken string) *ProjectsLocationsAgentSearchCall {
35803	c.urlParams_.Set("pageToken", pageToken)
35804	return c
35805}
35806
35807// Fields allows partial responses to be retrieved. See
35808// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35809// for more information.
35810func (c *ProjectsLocationsAgentSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSearchCall {
35811	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35812	return c
35813}
35814
35815// IfNoneMatch sets the optional parameter which makes the operation
35816// fail if the object's ETag matches the given value. This is useful for
35817// getting updates only after the object has changed since the last
35818// request. Use googleapi.IsNotModified to check whether the response
35819// error from Do is the result of In-None-Match.
35820func (c *ProjectsLocationsAgentSearchCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSearchCall {
35821	c.ifNoneMatch_ = entityTag
35822	return c
35823}
35824
35825// Context sets the context to be used in this call's Do method. Any
35826// pending HTTP request will be aborted if the provided context is
35827// canceled.
35828func (c *ProjectsLocationsAgentSearchCall) Context(ctx context.Context) *ProjectsLocationsAgentSearchCall {
35829	c.ctx_ = ctx
35830	return c
35831}
35832
35833// Header returns an http.Header that can be modified by the caller to
35834// add HTTP headers to the request.
35835func (c *ProjectsLocationsAgentSearchCall) Header() http.Header {
35836	if c.header_ == nil {
35837		c.header_ = make(http.Header)
35838	}
35839	return c.header_
35840}
35841
35842func (c *ProjectsLocationsAgentSearchCall) doRequest(alt string) (*http.Response, error) {
35843	reqHeaders := make(http.Header)
35844	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
35845	for k, v := range c.header_ {
35846		reqHeaders[k] = v
35847	}
35848	reqHeaders.Set("User-Agent", c.s.userAgent())
35849	if c.ifNoneMatch_ != "" {
35850		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35851	}
35852	var body io.Reader = nil
35853	c.urlParams_.Set("alt", alt)
35854	c.urlParams_.Set("prettyPrint", "false")
35855	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:search")
35856	urls += "?" + c.urlParams_.Encode()
35857	req, err := http.NewRequest("GET", urls, body)
35858	if err != nil {
35859		return nil, err
35860	}
35861	req.Header = reqHeaders
35862	googleapi.Expand(req.URL, map[string]string{
35863		"parent": c.parent,
35864	})
35865	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35866}
35867
35868// Do executes the "dialogflow.projects.locations.agent.search" call.
35869// Exactly one of *GoogleCloudDialogflowV2SearchAgentsResponse or error
35870// will be non-nil. Any non-2xx status code is an error. Response
35871// headers are in either
35872// *GoogleCloudDialogflowV2SearchAgentsResponse.ServerResponse.Header or
35873// (if a response was returned at all) in
35874// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
35875// whether the returned error was because http.StatusNotModified was
35876// returned.
35877func (c *ProjectsLocationsAgentSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SearchAgentsResponse, error) {
35878	gensupport.SetOptions(c.urlParams_, opts...)
35879	res, err := c.doRequest("json")
35880	if res != nil && res.StatusCode == http.StatusNotModified {
35881		if res.Body != nil {
35882			res.Body.Close()
35883		}
35884		return nil, &googleapi.Error{
35885			Code:   res.StatusCode,
35886			Header: res.Header,
35887		}
35888	}
35889	if err != nil {
35890		return nil, err
35891	}
35892	defer googleapi.CloseBody(res)
35893	if err := googleapi.CheckResponse(res); err != nil {
35894		return nil, err
35895	}
35896	ret := &GoogleCloudDialogflowV2SearchAgentsResponse{
35897		ServerResponse: googleapi.ServerResponse{
35898			Header:         res.Header,
35899			HTTPStatusCode: res.StatusCode,
35900		},
35901	}
35902	target := &ret
35903	if err := gensupport.DecodeResponse(target, res); err != nil {
35904		return nil, err
35905	}
35906	return ret, nil
35907	// {
35908	//   "description": "Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id \"-\". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).",
35909	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent:search",
35910	//   "httpMethod": "GET",
35911	//   "id": "dialogflow.projects.locations.agent.search",
35912	//   "parameterOrder": [
35913	//     "parent"
35914	//   ],
35915	//   "parameters": {
35916	//     "pageSize": {
35917	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
35918	//       "format": "int32",
35919	//       "location": "query",
35920	//       "type": "integer"
35921	//     },
35922	//     "pageToken": {
35923	//       "description": "The next_page_token value returned from a previous list request.",
35924	//       "location": "query",
35925	//       "type": "string"
35926	//     },
35927	//     "parent": {
35928	//       "description": "Required. The project to list agents from. Format: `projects/`.",
35929	//       "location": "path",
35930	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
35931	//       "required": true,
35932	//       "type": "string"
35933	//     }
35934	//   },
35935	//   "path": "v2/{+parent}/agent:search",
35936	//   "response": {
35937	//     "$ref": "GoogleCloudDialogflowV2SearchAgentsResponse"
35938	//   },
35939	//   "scopes": [
35940	//     "https://www.googleapis.com/auth/cloud-platform",
35941	//     "https://www.googleapis.com/auth/dialogflow"
35942	//   ]
35943	// }
35944
35945}
35946
35947// Pages invokes f for each page of results.
35948// A non-nil error returned from f will halt the iteration.
35949// The provided context supersedes any context provided to the Context method.
35950func (c *ProjectsLocationsAgentSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2SearchAgentsResponse) error) error {
35951	c.ctx_ = ctx
35952	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35953	for {
35954		x, err := c.Do()
35955		if err != nil {
35956			return err
35957		}
35958		if err := f(x); err != nil {
35959			return err
35960		}
35961		if x.NextPageToken == "" {
35962			return nil
35963		}
35964		c.PageToken(x.NextPageToken)
35965	}
35966}
35967
35968// method id "dialogflow.projects.locations.agent.train":
35969
35970type ProjectsLocationsAgentTrainCall struct {
35971	s                                        *Service
35972	parent                                   string
35973	googleclouddialogflowv2trainagentrequest *GoogleCloudDialogflowV2TrainAgentRequest
35974	urlParams_                               gensupport.URLParams
35975	ctx_                                     context.Context
35976	header_                                  http.Header
35977}
35978
35979// Train: Trains the specified agent. Note: You should always train an
35980// agent prior to sending it queries. See the training documentation
35981// (https://cloud.google.com/dialogflow/es/docs/training).
35982//
35983// - parent: The project that the agent to train is associated with.
35984//   Format: `projects/`.
35985func (r *ProjectsLocationsAgentService) Train(parent string, googleclouddialogflowv2trainagentrequest *GoogleCloudDialogflowV2TrainAgentRequest) *ProjectsLocationsAgentTrainCall {
35986	c := &ProjectsLocationsAgentTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35987	c.parent = parent
35988	c.googleclouddialogflowv2trainagentrequest = googleclouddialogflowv2trainagentrequest
35989	return c
35990}
35991
35992// Fields allows partial responses to be retrieved. See
35993// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35994// for more information.
35995func (c *ProjectsLocationsAgentTrainCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentTrainCall {
35996	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35997	return c
35998}
35999
36000// Context sets the context to be used in this call's Do method. Any
36001// pending HTTP request will be aborted if the provided context is
36002// canceled.
36003func (c *ProjectsLocationsAgentTrainCall) Context(ctx context.Context) *ProjectsLocationsAgentTrainCall {
36004	c.ctx_ = ctx
36005	return c
36006}
36007
36008// Header returns an http.Header that can be modified by the caller to
36009// add HTTP headers to the request.
36010func (c *ProjectsLocationsAgentTrainCall) Header() http.Header {
36011	if c.header_ == nil {
36012		c.header_ = make(http.Header)
36013	}
36014	return c.header_
36015}
36016
36017func (c *ProjectsLocationsAgentTrainCall) doRequest(alt string) (*http.Response, error) {
36018	reqHeaders := make(http.Header)
36019	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
36020	for k, v := range c.header_ {
36021		reqHeaders[k] = v
36022	}
36023	reqHeaders.Set("User-Agent", c.s.userAgent())
36024	var body io.Reader = nil
36025	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2trainagentrequest)
36026	if err != nil {
36027		return nil, err
36028	}
36029	reqHeaders.Set("Content-Type", "application/json")
36030	c.urlParams_.Set("alt", alt)
36031	c.urlParams_.Set("prettyPrint", "false")
36032	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/agent:train")
36033	urls += "?" + c.urlParams_.Encode()
36034	req, err := http.NewRequest("POST", urls, body)
36035	if err != nil {
36036		return nil, err
36037	}
36038	req.Header = reqHeaders
36039	googleapi.Expand(req.URL, map[string]string{
36040		"parent": c.parent,
36041	})
36042	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36043}
36044
36045// Do executes the "dialogflow.projects.locations.agent.train" call.
36046// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
36047// Any non-2xx status code is an error. Response headers are in either
36048// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
36049// was returned at all) in error.(*googleapi.Error).Header. Use
36050// googleapi.IsNotModified to check whether the returned error was
36051// because http.StatusNotModified was returned.
36052func (c *ProjectsLocationsAgentTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
36053	gensupport.SetOptions(c.urlParams_, opts...)
36054	res, err := c.doRequest("json")
36055	if res != nil && res.StatusCode == http.StatusNotModified {
36056		if res.Body != nil {
36057			res.Body.Close()
36058		}
36059		return nil, &googleapi.Error{
36060			Code:   res.StatusCode,
36061			Header: res.Header,
36062		}
36063	}
36064	if err != nil {
36065		return nil, err
36066	}
36067	defer googleapi.CloseBody(res)
36068	if err := googleapi.CheckResponse(res); err != nil {
36069		return nil, err
36070	}
36071	ret := &GoogleLongrunningOperation{
36072		ServerResponse: googleapi.ServerResponse{
36073			Header:         res.Header,
36074			HTTPStatusCode: res.StatusCode,
36075		},
36076	}
36077	target := &ret
36078	if err := gensupport.DecodeResponse(target, res); err != nil {
36079		return nil, err
36080	}
36081	return ret, nil
36082	// {
36083	//   "description": "Trains the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
36084	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent:train",
36085	//   "httpMethod": "POST",
36086	//   "id": "dialogflow.projects.locations.agent.train",
36087	//   "parameterOrder": [
36088	//     "parent"
36089	//   ],
36090	//   "parameters": {
36091	//     "parent": {
36092	//       "description": "Required. The project that the agent to train is associated with. Format: `projects/`.",
36093	//       "location": "path",
36094	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
36095	//       "required": true,
36096	//       "type": "string"
36097	//     }
36098	//   },
36099	//   "path": "v2/{+parent}/agent:train",
36100	//   "request": {
36101	//     "$ref": "GoogleCloudDialogflowV2TrainAgentRequest"
36102	//   },
36103	//   "response": {
36104	//     "$ref": "GoogleLongrunningOperation"
36105	//   },
36106	//   "scopes": [
36107	//     "https://www.googleapis.com/auth/cloud-platform",
36108	//     "https://www.googleapis.com/auth/dialogflow"
36109	//   ]
36110	// }
36111
36112}
36113
36114// method id "dialogflow.projects.locations.agent.updateFulfillment":
36115
36116type ProjectsLocationsAgentUpdateFulfillmentCall struct {
36117	s                                  *Service
36118	nameid                             string
36119	googleclouddialogflowv2fulfillment *GoogleCloudDialogflowV2Fulfillment
36120	urlParams_                         gensupport.URLParams
36121	ctx_                               context.Context
36122	header_                            http.Header
36123}
36124
36125// UpdateFulfillment: Updates the fulfillment.
36126//
36127// - name: The unique identifier of the fulfillment. Supported formats:
36128//   - `projects//agent/fulfillment` -
36129//   `projects//locations//agent/fulfillment` This field is not used for
36130//   Fulfillment in an Environment.
36131func (r *ProjectsLocationsAgentService) UpdateFulfillment(nameid string, googleclouddialogflowv2fulfillment *GoogleCloudDialogflowV2Fulfillment) *ProjectsLocationsAgentUpdateFulfillmentCall {
36132	c := &ProjectsLocationsAgentUpdateFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36133	c.nameid = nameid
36134	c.googleclouddialogflowv2fulfillment = googleclouddialogflowv2fulfillment
36135	return c
36136}
36137
36138// UpdateMask sets the optional parameter "updateMask": Required. The
36139// mask to control which fields get updated. If the mask is not present,
36140// all fields will be updated.
36141func (c *ProjectsLocationsAgentUpdateFulfillmentCall) UpdateMask(updateMask string) *ProjectsLocationsAgentUpdateFulfillmentCall {
36142	c.urlParams_.Set("updateMask", updateMask)
36143	return c
36144}
36145
36146// Fields allows partial responses to be retrieved. See
36147// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36148// for more information.
36149func (c *ProjectsLocationsAgentUpdateFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentUpdateFulfillmentCall {
36150	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36151	return c
36152}
36153
36154// Context sets the context to be used in this call's Do method. Any
36155// pending HTTP request will be aborted if the provided context is
36156// canceled.
36157func (c *ProjectsLocationsAgentUpdateFulfillmentCall) Context(ctx context.Context) *ProjectsLocationsAgentUpdateFulfillmentCall {
36158	c.ctx_ = ctx
36159	return c
36160}
36161
36162// Header returns an http.Header that can be modified by the caller to
36163// add HTTP headers to the request.
36164func (c *ProjectsLocationsAgentUpdateFulfillmentCall) Header() http.Header {
36165	if c.header_ == nil {
36166		c.header_ = make(http.Header)
36167	}
36168	return c.header_
36169}
36170
36171func (c *ProjectsLocationsAgentUpdateFulfillmentCall) doRequest(alt string) (*http.Response, error) {
36172	reqHeaders := make(http.Header)
36173	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
36174	for k, v := range c.header_ {
36175		reqHeaders[k] = v
36176	}
36177	reqHeaders.Set("User-Agent", c.s.userAgent())
36178	var body io.Reader = nil
36179	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2fulfillment)
36180	if err != nil {
36181		return nil, err
36182	}
36183	reqHeaders.Set("Content-Type", "application/json")
36184	c.urlParams_.Set("alt", alt)
36185	c.urlParams_.Set("prettyPrint", "false")
36186	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
36187	urls += "?" + c.urlParams_.Encode()
36188	req, err := http.NewRequest("PATCH", urls, body)
36189	if err != nil {
36190		return nil, err
36191	}
36192	req.Header = reqHeaders
36193	googleapi.Expand(req.URL, map[string]string{
36194		"name": c.nameid,
36195	})
36196	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36197}
36198
36199// Do executes the "dialogflow.projects.locations.agent.updateFulfillment" call.
36200// Exactly one of *GoogleCloudDialogflowV2Fulfillment or error will be
36201// non-nil. Any non-2xx status code is an error. Response headers are in
36202// either *GoogleCloudDialogflowV2Fulfillment.ServerResponse.Header or
36203// (if a response was returned at all) in
36204// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
36205// whether the returned error was because http.StatusNotModified was
36206// returned.
36207func (c *ProjectsLocationsAgentUpdateFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Fulfillment, error) {
36208	gensupport.SetOptions(c.urlParams_, opts...)
36209	res, err := c.doRequest("json")
36210	if res != nil && res.StatusCode == http.StatusNotModified {
36211		if res.Body != nil {
36212			res.Body.Close()
36213		}
36214		return nil, &googleapi.Error{
36215			Code:   res.StatusCode,
36216			Header: res.Header,
36217		}
36218	}
36219	if err != nil {
36220		return nil, err
36221	}
36222	defer googleapi.CloseBody(res)
36223	if err := googleapi.CheckResponse(res); err != nil {
36224		return nil, err
36225	}
36226	ret := &GoogleCloudDialogflowV2Fulfillment{
36227		ServerResponse: googleapi.ServerResponse{
36228			Header:         res.Header,
36229			HTTPStatusCode: res.StatusCode,
36230		},
36231	}
36232	target := &ret
36233	if err := gensupport.DecodeResponse(target, res); err != nil {
36234		return nil, err
36235	}
36236	return ret, nil
36237	// {
36238	//   "description": "Updates the fulfillment.",
36239	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/fulfillment",
36240	//   "httpMethod": "PATCH",
36241	//   "id": "dialogflow.projects.locations.agent.updateFulfillment",
36242	//   "parameterOrder": [
36243	//     "name"
36244	//   ],
36245	//   "parameters": {
36246	//     "name": {
36247	//       "description": "Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.",
36248	//       "location": "path",
36249	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/fulfillment$",
36250	//       "required": true,
36251	//       "type": "string"
36252	//     },
36253	//     "updateMask": {
36254	//       "description": "Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated.",
36255	//       "format": "google-fieldmask",
36256	//       "location": "query",
36257	//       "type": "string"
36258	//     }
36259	//   },
36260	//   "path": "v2/{+name}",
36261	//   "request": {
36262	//     "$ref": "GoogleCloudDialogflowV2Fulfillment"
36263	//   },
36264	//   "response": {
36265	//     "$ref": "GoogleCloudDialogflowV2Fulfillment"
36266	//   },
36267	//   "scopes": [
36268	//     "https://www.googleapis.com/auth/cloud-platform",
36269	//     "https://www.googleapis.com/auth/dialogflow"
36270	//   ]
36271	// }
36272
36273}
36274
36275// method id "dialogflow.projects.locations.agent.entityTypes.batchDelete":
36276
36277type ProjectsLocationsAgentEntityTypesBatchDeleteCall struct {
36278	s                                                    *Service
36279	parent                                               string
36280	googleclouddialogflowv2batchdeleteentitytypesrequest *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest
36281	urlParams_                                           gensupport.URLParams
36282	ctx_                                                 context.Context
36283	header_                                              http.Header
36284}
36285
36286// BatchDelete: Deletes entity types in the specified agent. Note: You
36287// should always train an agent prior to sending it queries. See the
36288// training documentation
36289// (https://cloud.google.com/dialogflow/es/docs/training).
36290//
36291// - parent: The name of the agent to delete all entities types for.
36292//   Format: `projects//agent`.
36293func (r *ProjectsLocationsAgentEntityTypesService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteentitytypesrequest *GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest) *ProjectsLocationsAgentEntityTypesBatchDeleteCall {
36294	c := &ProjectsLocationsAgentEntityTypesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36295	c.parent = parent
36296	c.googleclouddialogflowv2batchdeleteentitytypesrequest = googleclouddialogflowv2batchdeleteentitytypesrequest
36297	return c
36298}
36299
36300// Fields allows partial responses to be retrieved. See
36301// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36302// for more information.
36303func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesBatchDeleteCall {
36304	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36305	return c
36306}
36307
36308// Context sets the context to be used in this call's Do method. Any
36309// pending HTTP request will be aborted if the provided context is
36310// canceled.
36311func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesBatchDeleteCall {
36312	c.ctx_ = ctx
36313	return c
36314}
36315
36316// Header returns an http.Header that can be modified by the caller to
36317// add HTTP headers to the request.
36318func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Header() http.Header {
36319	if c.header_ == nil {
36320		c.header_ = make(http.Header)
36321	}
36322	return c.header_
36323}
36324
36325func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
36326	reqHeaders := make(http.Header)
36327	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
36328	for k, v := range c.header_ {
36329		reqHeaders[k] = v
36330	}
36331	reqHeaders.Set("User-Agent", c.s.userAgent())
36332	var body io.Reader = nil
36333	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteentitytypesrequest)
36334	if err != nil {
36335		return nil, err
36336	}
36337	reqHeaders.Set("Content-Type", "application/json")
36338	c.urlParams_.Set("alt", alt)
36339	c.urlParams_.Set("prettyPrint", "false")
36340	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes:batchDelete")
36341	urls += "?" + c.urlParams_.Encode()
36342	req, err := http.NewRequest("POST", urls, body)
36343	if err != nil {
36344		return nil, err
36345	}
36346	req.Header = reqHeaders
36347	googleapi.Expand(req.URL, map[string]string{
36348		"parent": c.parent,
36349	})
36350	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36351}
36352
36353// Do executes the "dialogflow.projects.locations.agent.entityTypes.batchDelete" call.
36354// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
36355// Any non-2xx status code is an error. Response headers are in either
36356// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
36357// was returned at all) in error.(*googleapi.Error).Header. Use
36358// googleapi.IsNotModified to check whether the returned error was
36359// because http.StatusNotModified was returned.
36360func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
36361	gensupport.SetOptions(c.urlParams_, opts...)
36362	res, err := c.doRequest("json")
36363	if res != nil && res.StatusCode == http.StatusNotModified {
36364		if res.Body != nil {
36365			res.Body.Close()
36366		}
36367		return nil, &googleapi.Error{
36368			Code:   res.StatusCode,
36369			Header: res.Header,
36370		}
36371	}
36372	if err != nil {
36373		return nil, err
36374	}
36375	defer googleapi.CloseBody(res)
36376	if err := googleapi.CheckResponse(res); err != nil {
36377		return nil, err
36378	}
36379	ret := &GoogleLongrunningOperation{
36380		ServerResponse: googleapi.ServerResponse{
36381			Header:         res.Header,
36382			HTTPStatusCode: res.StatusCode,
36383		},
36384	}
36385	target := &ret
36386	if err := gensupport.DecodeResponse(target, res); err != nil {
36387		return nil, err
36388	}
36389	return ret, nil
36390	// {
36391	//   "description": "Deletes entity types in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
36392	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchDelete",
36393	//   "httpMethod": "POST",
36394	//   "id": "dialogflow.projects.locations.agent.entityTypes.batchDelete",
36395	//   "parameterOrder": [
36396	//     "parent"
36397	//   ],
36398	//   "parameters": {
36399	//     "parent": {
36400	//       "description": "Required. The name of the agent to delete all entities types for. Format: `projects//agent`.",
36401	//       "location": "path",
36402	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
36403	//       "required": true,
36404	//       "type": "string"
36405	//     }
36406	//   },
36407	//   "path": "v2/{+parent}/entityTypes:batchDelete",
36408	//   "request": {
36409	//     "$ref": "GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest"
36410	//   },
36411	//   "response": {
36412	//     "$ref": "GoogleLongrunningOperation"
36413	//   },
36414	//   "scopes": [
36415	//     "https://www.googleapis.com/auth/cloud-platform",
36416	//     "https://www.googleapis.com/auth/dialogflow"
36417	//   ]
36418	// }
36419
36420}
36421
36422// method id "dialogflow.projects.locations.agent.entityTypes.batchUpdate":
36423
36424type ProjectsLocationsAgentEntityTypesBatchUpdateCall struct {
36425	s                                                    *Service
36426	parent                                               string
36427	googleclouddialogflowv2batchupdateentitytypesrequest *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest
36428	urlParams_                                           gensupport.URLParams
36429	ctx_                                                 context.Context
36430	header_                                              http.Header
36431}
36432
36433// BatchUpdate: Updates/Creates multiple entity types in the specified
36434// agent. Note: You should always train an agent prior to sending it
36435// queries. See the training documentation
36436// (https://cloud.google.com/dialogflow/es/docs/training).
36437//
36438// - parent: The name of the agent to update or create entity types in.
36439//   Format: `projects//agent`.
36440func (r *ProjectsLocationsAgentEntityTypesService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateentitytypesrequest *GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest) *ProjectsLocationsAgentEntityTypesBatchUpdateCall {
36441	c := &ProjectsLocationsAgentEntityTypesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36442	c.parent = parent
36443	c.googleclouddialogflowv2batchupdateentitytypesrequest = googleclouddialogflowv2batchupdateentitytypesrequest
36444	return c
36445}
36446
36447// Fields allows partial responses to be retrieved. See
36448// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36449// for more information.
36450func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesBatchUpdateCall {
36451	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36452	return c
36453}
36454
36455// Context sets the context to be used in this call's Do method. Any
36456// pending HTTP request will be aborted if the provided context is
36457// canceled.
36458func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesBatchUpdateCall {
36459	c.ctx_ = ctx
36460	return c
36461}
36462
36463// Header returns an http.Header that can be modified by the caller to
36464// add HTTP headers to the request.
36465func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Header() http.Header {
36466	if c.header_ == nil {
36467		c.header_ = make(http.Header)
36468	}
36469	return c.header_
36470}
36471
36472func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
36473	reqHeaders := make(http.Header)
36474	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
36475	for k, v := range c.header_ {
36476		reqHeaders[k] = v
36477	}
36478	reqHeaders.Set("User-Agent", c.s.userAgent())
36479	var body io.Reader = nil
36480	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateentitytypesrequest)
36481	if err != nil {
36482		return nil, err
36483	}
36484	reqHeaders.Set("Content-Type", "application/json")
36485	c.urlParams_.Set("alt", alt)
36486	c.urlParams_.Set("prettyPrint", "false")
36487	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes:batchUpdate")
36488	urls += "?" + c.urlParams_.Encode()
36489	req, err := http.NewRequest("POST", urls, body)
36490	if err != nil {
36491		return nil, err
36492	}
36493	req.Header = reqHeaders
36494	googleapi.Expand(req.URL, map[string]string{
36495		"parent": c.parent,
36496	})
36497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36498}
36499
36500// Do executes the "dialogflow.projects.locations.agent.entityTypes.batchUpdate" call.
36501// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
36502// Any non-2xx status code is an error. Response headers are in either
36503// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
36504// was returned at all) in error.(*googleapi.Error).Header. Use
36505// googleapi.IsNotModified to check whether the returned error was
36506// because http.StatusNotModified was returned.
36507func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
36508	gensupport.SetOptions(c.urlParams_, opts...)
36509	res, err := c.doRequest("json")
36510	if res != nil && res.StatusCode == http.StatusNotModified {
36511		if res.Body != nil {
36512			res.Body.Close()
36513		}
36514		return nil, &googleapi.Error{
36515			Code:   res.StatusCode,
36516			Header: res.Header,
36517		}
36518	}
36519	if err != nil {
36520		return nil, err
36521	}
36522	defer googleapi.CloseBody(res)
36523	if err := googleapi.CheckResponse(res); err != nil {
36524		return nil, err
36525	}
36526	ret := &GoogleLongrunningOperation{
36527		ServerResponse: googleapi.ServerResponse{
36528			Header:         res.Header,
36529			HTTPStatusCode: res.StatusCode,
36530		},
36531	}
36532	target := &ret
36533	if err := gensupport.DecodeResponse(target, res); err != nil {
36534		return nil, err
36535	}
36536	return ret, nil
36537	// {
36538	//   "description": "Updates/Creates multiple entity types in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
36539	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchUpdate",
36540	//   "httpMethod": "POST",
36541	//   "id": "dialogflow.projects.locations.agent.entityTypes.batchUpdate",
36542	//   "parameterOrder": [
36543	//     "parent"
36544	//   ],
36545	//   "parameters": {
36546	//     "parent": {
36547	//       "description": "Required. The name of the agent to update or create entity types in. Format: `projects//agent`.",
36548	//       "location": "path",
36549	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
36550	//       "required": true,
36551	//       "type": "string"
36552	//     }
36553	//   },
36554	//   "path": "v2/{+parent}/entityTypes:batchUpdate",
36555	//   "request": {
36556	//     "$ref": "GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest"
36557	//   },
36558	//   "response": {
36559	//     "$ref": "GoogleLongrunningOperation"
36560	//   },
36561	//   "scopes": [
36562	//     "https://www.googleapis.com/auth/cloud-platform",
36563	//     "https://www.googleapis.com/auth/dialogflow"
36564	//   ]
36565	// }
36566
36567}
36568
36569// method id "dialogflow.projects.locations.agent.entityTypes.create":
36570
36571type ProjectsLocationsAgentEntityTypesCreateCall struct {
36572	s                                 *Service
36573	parent                            string
36574	googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType
36575	urlParams_                        gensupport.URLParams
36576	ctx_                              context.Context
36577	header_                           http.Header
36578}
36579
36580// Create: Creates an entity type in the specified agent. Note: You
36581// should always train an agent prior to sending it queries. See the
36582// training documentation
36583// (https://cloud.google.com/dialogflow/es/docs/training).
36584//
36585// - parent: The agent to create a entity type for. Format:
36586//   `projects//agent`.
36587func (r *ProjectsLocationsAgentEntityTypesService) Create(parent string, googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType) *ProjectsLocationsAgentEntityTypesCreateCall {
36588	c := &ProjectsLocationsAgentEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36589	c.parent = parent
36590	c.googleclouddialogflowv2entitytype = googleclouddialogflowv2entitytype
36591	return c
36592}
36593
36594// LanguageCode sets the optional parameter "languageCode": The language
36595// used to access language-specific data. If not specified, the agent's
36596// default language is used. For more information, see Multilingual
36597// intent and entity data
36598// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
36599func (c *ProjectsLocationsAgentEntityTypesCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesCreateCall {
36600	c.urlParams_.Set("languageCode", languageCode)
36601	return c
36602}
36603
36604// Fields allows partial responses to be retrieved. See
36605// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36606// for more information.
36607func (c *ProjectsLocationsAgentEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesCreateCall {
36608	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36609	return c
36610}
36611
36612// Context sets the context to be used in this call's Do method. Any
36613// pending HTTP request will be aborted if the provided context is
36614// canceled.
36615func (c *ProjectsLocationsAgentEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesCreateCall {
36616	c.ctx_ = ctx
36617	return c
36618}
36619
36620// Header returns an http.Header that can be modified by the caller to
36621// add HTTP headers to the request.
36622func (c *ProjectsLocationsAgentEntityTypesCreateCall) Header() http.Header {
36623	if c.header_ == nil {
36624		c.header_ = make(http.Header)
36625	}
36626	return c.header_
36627}
36628
36629func (c *ProjectsLocationsAgentEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
36630	reqHeaders := make(http.Header)
36631	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
36632	for k, v := range c.header_ {
36633		reqHeaders[k] = v
36634	}
36635	reqHeaders.Set("User-Agent", c.s.userAgent())
36636	var body io.Reader = nil
36637	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2entitytype)
36638	if err != nil {
36639		return nil, err
36640	}
36641	reqHeaders.Set("Content-Type", "application/json")
36642	c.urlParams_.Set("alt", alt)
36643	c.urlParams_.Set("prettyPrint", "false")
36644	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
36645	urls += "?" + c.urlParams_.Encode()
36646	req, err := http.NewRequest("POST", urls, body)
36647	if err != nil {
36648		return nil, err
36649	}
36650	req.Header = reqHeaders
36651	googleapi.Expand(req.URL, map[string]string{
36652		"parent": c.parent,
36653	})
36654	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36655}
36656
36657// Do executes the "dialogflow.projects.locations.agent.entityTypes.create" call.
36658// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be
36659// non-nil. Any non-2xx status code is an error. Response headers are in
36660// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or
36661// (if a response was returned at all) in
36662// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
36663// whether the returned error was because http.StatusNotModified was
36664// returned.
36665func (c *ProjectsLocationsAgentEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) {
36666	gensupport.SetOptions(c.urlParams_, opts...)
36667	res, err := c.doRequest("json")
36668	if res != nil && res.StatusCode == http.StatusNotModified {
36669		if res.Body != nil {
36670			res.Body.Close()
36671		}
36672		return nil, &googleapi.Error{
36673			Code:   res.StatusCode,
36674			Header: res.Header,
36675		}
36676	}
36677	if err != nil {
36678		return nil, err
36679	}
36680	defer googleapi.CloseBody(res)
36681	if err := googleapi.CheckResponse(res); err != nil {
36682		return nil, err
36683	}
36684	ret := &GoogleCloudDialogflowV2EntityType{
36685		ServerResponse: googleapi.ServerResponse{
36686			Header:         res.Header,
36687			HTTPStatusCode: res.StatusCode,
36688		},
36689	}
36690	target := &ret
36691	if err := gensupport.DecodeResponse(target, res); err != nil {
36692		return nil, err
36693	}
36694	return ret, nil
36695	// {
36696	//   "description": "Creates an entity type in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
36697	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes",
36698	//   "httpMethod": "POST",
36699	//   "id": "dialogflow.projects.locations.agent.entityTypes.create",
36700	//   "parameterOrder": [
36701	//     "parent"
36702	//   ],
36703	//   "parameters": {
36704	//     "languageCode": {
36705	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
36706	//       "location": "query",
36707	//       "type": "string"
36708	//     },
36709	//     "parent": {
36710	//       "description": "Required. The agent to create a entity type for. Format: `projects//agent`.",
36711	//       "location": "path",
36712	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
36713	//       "required": true,
36714	//       "type": "string"
36715	//     }
36716	//   },
36717	//   "path": "v2/{+parent}/entityTypes",
36718	//   "request": {
36719	//     "$ref": "GoogleCloudDialogflowV2EntityType"
36720	//   },
36721	//   "response": {
36722	//     "$ref": "GoogleCloudDialogflowV2EntityType"
36723	//   },
36724	//   "scopes": [
36725	//     "https://www.googleapis.com/auth/cloud-platform",
36726	//     "https://www.googleapis.com/auth/dialogflow"
36727	//   ]
36728	// }
36729
36730}
36731
36732// method id "dialogflow.projects.locations.agent.entityTypes.delete":
36733
36734type ProjectsLocationsAgentEntityTypesDeleteCall struct {
36735	s          *Service
36736	name       string
36737	urlParams_ gensupport.URLParams
36738	ctx_       context.Context
36739	header_    http.Header
36740}
36741
36742// Delete: Deletes the specified entity type. Note: You should always
36743// train an agent prior to sending it queries. See the training
36744// documentation (https://cloud.google.com/dialogflow/es/docs/training).
36745//
36746// - name: The name of the entity type to delete. Format:
36747//   `projects//agent/entityTypes/`.
36748func (r *ProjectsLocationsAgentEntityTypesService) Delete(name string) *ProjectsLocationsAgentEntityTypesDeleteCall {
36749	c := &ProjectsLocationsAgentEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36750	c.name = name
36751	return c
36752}
36753
36754// Fields allows partial responses to be retrieved. See
36755// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36756// for more information.
36757func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesDeleteCall {
36758	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36759	return c
36760}
36761
36762// Context sets the context to be used in this call's Do method. Any
36763// pending HTTP request will be aborted if the provided context is
36764// canceled.
36765func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesDeleteCall {
36766	c.ctx_ = ctx
36767	return c
36768}
36769
36770// Header returns an http.Header that can be modified by the caller to
36771// add HTTP headers to the request.
36772func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Header() http.Header {
36773	if c.header_ == nil {
36774		c.header_ = make(http.Header)
36775	}
36776	return c.header_
36777}
36778
36779func (c *ProjectsLocationsAgentEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
36780	reqHeaders := make(http.Header)
36781	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
36782	for k, v := range c.header_ {
36783		reqHeaders[k] = v
36784	}
36785	reqHeaders.Set("User-Agent", c.s.userAgent())
36786	var body io.Reader = nil
36787	c.urlParams_.Set("alt", alt)
36788	c.urlParams_.Set("prettyPrint", "false")
36789	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
36790	urls += "?" + c.urlParams_.Encode()
36791	req, err := http.NewRequest("DELETE", urls, body)
36792	if err != nil {
36793		return nil, err
36794	}
36795	req.Header = reqHeaders
36796	googleapi.Expand(req.URL, map[string]string{
36797		"name": c.name,
36798	})
36799	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36800}
36801
36802// Do executes the "dialogflow.projects.locations.agent.entityTypes.delete" call.
36803// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
36804// non-2xx status code is an error. Response headers are in either
36805// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
36806// returned at all) in error.(*googleapi.Error).Header. Use
36807// googleapi.IsNotModified to check whether the returned error was
36808// because http.StatusNotModified was returned.
36809func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
36810	gensupport.SetOptions(c.urlParams_, opts...)
36811	res, err := c.doRequest("json")
36812	if res != nil && res.StatusCode == http.StatusNotModified {
36813		if res.Body != nil {
36814			res.Body.Close()
36815		}
36816		return nil, &googleapi.Error{
36817			Code:   res.StatusCode,
36818			Header: res.Header,
36819		}
36820	}
36821	if err != nil {
36822		return nil, err
36823	}
36824	defer googleapi.CloseBody(res)
36825	if err := googleapi.CheckResponse(res); err != nil {
36826		return nil, err
36827	}
36828	ret := &GoogleProtobufEmpty{
36829		ServerResponse: googleapi.ServerResponse{
36830			Header:         res.Header,
36831			HTTPStatusCode: res.StatusCode,
36832		},
36833	}
36834	target := &ret
36835	if err := gensupport.DecodeResponse(target, res); err != nil {
36836		return nil, err
36837	}
36838	return ret, nil
36839	// {
36840	//   "description": "Deletes the specified entity type. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
36841	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}",
36842	//   "httpMethod": "DELETE",
36843	//   "id": "dialogflow.projects.locations.agent.entityTypes.delete",
36844	//   "parameterOrder": [
36845	//     "name"
36846	//   ],
36847	//   "parameters": {
36848	//     "name": {
36849	//       "description": "Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`.",
36850	//       "location": "path",
36851	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
36852	//       "required": true,
36853	//       "type": "string"
36854	//     }
36855	//   },
36856	//   "path": "v2/{+name}",
36857	//   "response": {
36858	//     "$ref": "GoogleProtobufEmpty"
36859	//   },
36860	//   "scopes": [
36861	//     "https://www.googleapis.com/auth/cloud-platform",
36862	//     "https://www.googleapis.com/auth/dialogflow"
36863	//   ]
36864	// }
36865
36866}
36867
36868// method id "dialogflow.projects.locations.agent.entityTypes.get":
36869
36870type ProjectsLocationsAgentEntityTypesGetCall struct {
36871	s            *Service
36872	name         string
36873	urlParams_   gensupport.URLParams
36874	ifNoneMatch_ string
36875	ctx_         context.Context
36876	header_      http.Header
36877}
36878
36879// Get: Retrieves the specified entity type.
36880//
36881// - name: The name of the entity type. Format:
36882//   `projects//agent/entityTypes/`.
36883func (r *ProjectsLocationsAgentEntityTypesService) Get(name string) *ProjectsLocationsAgentEntityTypesGetCall {
36884	c := &ProjectsLocationsAgentEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36885	c.name = name
36886	return c
36887}
36888
36889// LanguageCode sets the optional parameter "languageCode": The language
36890// used to access language-specific data. If not specified, the agent's
36891// default language is used. For more information, see Multilingual
36892// intent and entity data
36893// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
36894func (c *ProjectsLocationsAgentEntityTypesGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesGetCall {
36895	c.urlParams_.Set("languageCode", languageCode)
36896	return c
36897}
36898
36899// Fields allows partial responses to be retrieved. See
36900// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36901// for more information.
36902func (c *ProjectsLocationsAgentEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesGetCall {
36903	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36904	return c
36905}
36906
36907// IfNoneMatch sets the optional parameter which makes the operation
36908// fail if the object's ETag matches the given value. This is useful for
36909// getting updates only after the object has changed since the last
36910// request. Use googleapi.IsNotModified to check whether the response
36911// error from Do is the result of In-None-Match.
36912func (c *ProjectsLocationsAgentEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEntityTypesGetCall {
36913	c.ifNoneMatch_ = entityTag
36914	return c
36915}
36916
36917// Context sets the context to be used in this call's Do method. Any
36918// pending HTTP request will be aborted if the provided context is
36919// canceled.
36920func (c *ProjectsLocationsAgentEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesGetCall {
36921	c.ctx_ = ctx
36922	return c
36923}
36924
36925// Header returns an http.Header that can be modified by the caller to
36926// add HTTP headers to the request.
36927func (c *ProjectsLocationsAgentEntityTypesGetCall) Header() http.Header {
36928	if c.header_ == nil {
36929		c.header_ = make(http.Header)
36930	}
36931	return c.header_
36932}
36933
36934func (c *ProjectsLocationsAgentEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
36935	reqHeaders := make(http.Header)
36936	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
36937	for k, v := range c.header_ {
36938		reqHeaders[k] = v
36939	}
36940	reqHeaders.Set("User-Agent", c.s.userAgent())
36941	if c.ifNoneMatch_ != "" {
36942		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36943	}
36944	var body io.Reader = nil
36945	c.urlParams_.Set("alt", alt)
36946	c.urlParams_.Set("prettyPrint", "false")
36947	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
36948	urls += "?" + c.urlParams_.Encode()
36949	req, err := http.NewRequest("GET", urls, body)
36950	if err != nil {
36951		return nil, err
36952	}
36953	req.Header = reqHeaders
36954	googleapi.Expand(req.URL, map[string]string{
36955		"name": c.name,
36956	})
36957	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36958}
36959
36960// Do executes the "dialogflow.projects.locations.agent.entityTypes.get" call.
36961// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be
36962// non-nil. Any non-2xx status code is an error. Response headers are in
36963// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or
36964// (if a response was returned at all) in
36965// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
36966// whether the returned error was because http.StatusNotModified was
36967// returned.
36968func (c *ProjectsLocationsAgentEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) {
36969	gensupport.SetOptions(c.urlParams_, opts...)
36970	res, err := c.doRequest("json")
36971	if res != nil && res.StatusCode == http.StatusNotModified {
36972		if res.Body != nil {
36973			res.Body.Close()
36974		}
36975		return nil, &googleapi.Error{
36976			Code:   res.StatusCode,
36977			Header: res.Header,
36978		}
36979	}
36980	if err != nil {
36981		return nil, err
36982	}
36983	defer googleapi.CloseBody(res)
36984	if err := googleapi.CheckResponse(res); err != nil {
36985		return nil, err
36986	}
36987	ret := &GoogleCloudDialogflowV2EntityType{
36988		ServerResponse: googleapi.ServerResponse{
36989			Header:         res.Header,
36990			HTTPStatusCode: res.StatusCode,
36991		},
36992	}
36993	target := &ret
36994	if err := gensupport.DecodeResponse(target, res); err != nil {
36995		return nil, err
36996	}
36997	return ret, nil
36998	// {
36999	//   "description": "Retrieves the specified entity type.",
37000	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}",
37001	//   "httpMethod": "GET",
37002	//   "id": "dialogflow.projects.locations.agent.entityTypes.get",
37003	//   "parameterOrder": [
37004	//     "name"
37005	//   ],
37006	//   "parameters": {
37007	//     "languageCode": {
37008	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
37009	//       "location": "query",
37010	//       "type": "string"
37011	//     },
37012	//     "name": {
37013	//       "description": "Required. The name of the entity type. Format: `projects//agent/entityTypes/`.",
37014	//       "location": "path",
37015	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
37016	//       "required": true,
37017	//       "type": "string"
37018	//     }
37019	//   },
37020	//   "path": "v2/{+name}",
37021	//   "response": {
37022	//     "$ref": "GoogleCloudDialogflowV2EntityType"
37023	//   },
37024	//   "scopes": [
37025	//     "https://www.googleapis.com/auth/cloud-platform",
37026	//     "https://www.googleapis.com/auth/dialogflow"
37027	//   ]
37028	// }
37029
37030}
37031
37032// method id "dialogflow.projects.locations.agent.entityTypes.list":
37033
37034type ProjectsLocationsAgentEntityTypesListCall struct {
37035	s            *Service
37036	parent       string
37037	urlParams_   gensupport.URLParams
37038	ifNoneMatch_ string
37039	ctx_         context.Context
37040	header_      http.Header
37041}
37042
37043// List: Returns the list of all entity types in the specified agent.
37044//
37045// - parent: The agent to list all entity types from. Format:
37046//   `projects//agent`.
37047func (r *ProjectsLocationsAgentEntityTypesService) List(parent string) *ProjectsLocationsAgentEntityTypesListCall {
37048	c := &ProjectsLocationsAgentEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37049	c.parent = parent
37050	return c
37051}
37052
37053// LanguageCode sets the optional parameter "languageCode": The language
37054// used to access language-specific data. If not specified, the agent's
37055// default language is used. For more information, see Multilingual
37056// intent and entity data
37057// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
37058func (c *ProjectsLocationsAgentEntityTypesListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesListCall {
37059	c.urlParams_.Set("languageCode", languageCode)
37060	return c
37061}
37062
37063// PageSize sets the optional parameter "pageSize": The maximum number
37064// of items to return in a single page. By default 100 and at most 1000.
37065func (c *ProjectsLocationsAgentEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEntityTypesListCall {
37066	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
37067	return c
37068}
37069
37070// PageToken sets the optional parameter "pageToken": The
37071// next_page_token value returned from a previous list request.
37072func (c *ProjectsLocationsAgentEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentEntityTypesListCall {
37073	c.urlParams_.Set("pageToken", pageToken)
37074	return c
37075}
37076
37077// Fields allows partial responses to be retrieved. See
37078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37079// for more information.
37080func (c *ProjectsLocationsAgentEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesListCall {
37081	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37082	return c
37083}
37084
37085// IfNoneMatch sets the optional parameter which makes the operation
37086// fail if the object's ETag matches the given value. This is useful for
37087// getting updates only after the object has changed since the last
37088// request. Use googleapi.IsNotModified to check whether the response
37089// error from Do is the result of In-None-Match.
37090func (c *ProjectsLocationsAgentEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEntityTypesListCall {
37091	c.ifNoneMatch_ = entityTag
37092	return c
37093}
37094
37095// Context sets the context to be used in this call's Do method. Any
37096// pending HTTP request will be aborted if the provided context is
37097// canceled.
37098func (c *ProjectsLocationsAgentEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesListCall {
37099	c.ctx_ = ctx
37100	return c
37101}
37102
37103// Header returns an http.Header that can be modified by the caller to
37104// add HTTP headers to the request.
37105func (c *ProjectsLocationsAgentEntityTypesListCall) Header() http.Header {
37106	if c.header_ == nil {
37107		c.header_ = make(http.Header)
37108	}
37109	return c.header_
37110}
37111
37112func (c *ProjectsLocationsAgentEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
37113	reqHeaders := make(http.Header)
37114	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
37115	for k, v := range c.header_ {
37116		reqHeaders[k] = v
37117	}
37118	reqHeaders.Set("User-Agent", c.s.userAgent())
37119	if c.ifNoneMatch_ != "" {
37120		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37121	}
37122	var body io.Reader = nil
37123	c.urlParams_.Set("alt", alt)
37124	c.urlParams_.Set("prettyPrint", "false")
37125	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
37126	urls += "?" + c.urlParams_.Encode()
37127	req, err := http.NewRequest("GET", urls, body)
37128	if err != nil {
37129		return nil, err
37130	}
37131	req.Header = reqHeaders
37132	googleapi.Expand(req.URL, map[string]string{
37133		"parent": c.parent,
37134	})
37135	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37136}
37137
37138// Do executes the "dialogflow.projects.locations.agent.entityTypes.list" call.
37139// Exactly one of *GoogleCloudDialogflowV2ListEntityTypesResponse or
37140// error will be non-nil. Any non-2xx status code is an error. Response
37141// headers are in either
37142// *GoogleCloudDialogflowV2ListEntityTypesResponse.ServerResponse.Header
37143// or (if a response was returned at all) in
37144// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
37145// whether the returned error was because http.StatusNotModified was
37146// returned.
37147func (c *ProjectsLocationsAgentEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListEntityTypesResponse, error) {
37148	gensupport.SetOptions(c.urlParams_, opts...)
37149	res, err := c.doRequest("json")
37150	if res != nil && res.StatusCode == http.StatusNotModified {
37151		if res.Body != nil {
37152			res.Body.Close()
37153		}
37154		return nil, &googleapi.Error{
37155			Code:   res.StatusCode,
37156			Header: res.Header,
37157		}
37158	}
37159	if err != nil {
37160		return nil, err
37161	}
37162	defer googleapi.CloseBody(res)
37163	if err := googleapi.CheckResponse(res); err != nil {
37164		return nil, err
37165	}
37166	ret := &GoogleCloudDialogflowV2ListEntityTypesResponse{
37167		ServerResponse: googleapi.ServerResponse{
37168			Header:         res.Header,
37169			HTTPStatusCode: res.StatusCode,
37170		},
37171	}
37172	target := &ret
37173	if err := gensupport.DecodeResponse(target, res); err != nil {
37174		return nil, err
37175	}
37176	return ret, nil
37177	// {
37178	//   "description": "Returns the list of all entity types in the specified agent.",
37179	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes",
37180	//   "httpMethod": "GET",
37181	//   "id": "dialogflow.projects.locations.agent.entityTypes.list",
37182	//   "parameterOrder": [
37183	//     "parent"
37184	//   ],
37185	//   "parameters": {
37186	//     "languageCode": {
37187	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
37188	//       "location": "query",
37189	//       "type": "string"
37190	//     },
37191	//     "pageSize": {
37192	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
37193	//       "format": "int32",
37194	//       "location": "query",
37195	//       "type": "integer"
37196	//     },
37197	//     "pageToken": {
37198	//       "description": "Optional. The next_page_token value returned from a previous list request.",
37199	//       "location": "query",
37200	//       "type": "string"
37201	//     },
37202	//     "parent": {
37203	//       "description": "Required. The agent to list all entity types from. Format: `projects//agent`.",
37204	//       "location": "path",
37205	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
37206	//       "required": true,
37207	//       "type": "string"
37208	//     }
37209	//   },
37210	//   "path": "v2/{+parent}/entityTypes",
37211	//   "response": {
37212	//     "$ref": "GoogleCloudDialogflowV2ListEntityTypesResponse"
37213	//   },
37214	//   "scopes": [
37215	//     "https://www.googleapis.com/auth/cloud-platform",
37216	//     "https://www.googleapis.com/auth/dialogflow"
37217	//   ]
37218	// }
37219
37220}
37221
37222// Pages invokes f for each page of results.
37223// A non-nil error returned from f will halt the iteration.
37224// The provided context supersedes any context provided to the Context method.
37225func (c *ProjectsLocationsAgentEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListEntityTypesResponse) error) error {
37226	c.ctx_ = ctx
37227	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37228	for {
37229		x, err := c.Do()
37230		if err != nil {
37231			return err
37232		}
37233		if err := f(x); err != nil {
37234			return err
37235		}
37236		if x.NextPageToken == "" {
37237			return nil
37238		}
37239		c.PageToken(x.NextPageToken)
37240	}
37241}
37242
37243// method id "dialogflow.projects.locations.agent.entityTypes.patch":
37244
37245type ProjectsLocationsAgentEntityTypesPatchCall struct {
37246	s                                 *Service
37247	nameid                            string
37248	googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType
37249	urlParams_                        gensupport.URLParams
37250	ctx_                              context.Context
37251	header_                           http.Header
37252}
37253
37254// Patch: Updates the specified entity type. Note: You should always
37255// train an agent prior to sending it queries. See the training
37256// documentation (https://cloud.google.com/dialogflow/es/docs/training).
37257//
37258// - name: The unique identifier of the entity type. Required for
37259//   EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes
37260//   methods. Format: `projects//agent/entityTypes/`.
37261func (r *ProjectsLocationsAgentEntityTypesService) Patch(nameid string, googleclouddialogflowv2entitytype *GoogleCloudDialogflowV2EntityType) *ProjectsLocationsAgentEntityTypesPatchCall {
37262	c := &ProjectsLocationsAgentEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37263	c.nameid = nameid
37264	c.googleclouddialogflowv2entitytype = googleclouddialogflowv2entitytype
37265	return c
37266}
37267
37268// LanguageCode sets the optional parameter "languageCode": The language
37269// used to access language-specific data. If not specified, the agent's
37270// default language is used. For more information, see Multilingual
37271// intent and entity data
37272// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
37273func (c *ProjectsLocationsAgentEntityTypesPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesPatchCall {
37274	c.urlParams_.Set("languageCode", languageCode)
37275	return c
37276}
37277
37278// UpdateMask sets the optional parameter "updateMask": The mask to
37279// control which fields get updated.
37280func (c *ProjectsLocationsAgentEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentEntityTypesPatchCall {
37281	c.urlParams_.Set("updateMask", updateMask)
37282	return c
37283}
37284
37285// Fields allows partial responses to be retrieved. See
37286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37287// for more information.
37288func (c *ProjectsLocationsAgentEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesPatchCall {
37289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37290	return c
37291}
37292
37293// Context sets the context to be used in this call's Do method. Any
37294// pending HTTP request will be aborted if the provided context is
37295// canceled.
37296func (c *ProjectsLocationsAgentEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesPatchCall {
37297	c.ctx_ = ctx
37298	return c
37299}
37300
37301// Header returns an http.Header that can be modified by the caller to
37302// add HTTP headers to the request.
37303func (c *ProjectsLocationsAgentEntityTypesPatchCall) Header() http.Header {
37304	if c.header_ == nil {
37305		c.header_ = make(http.Header)
37306	}
37307	return c.header_
37308}
37309
37310func (c *ProjectsLocationsAgentEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
37311	reqHeaders := make(http.Header)
37312	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
37313	for k, v := range c.header_ {
37314		reqHeaders[k] = v
37315	}
37316	reqHeaders.Set("User-Agent", c.s.userAgent())
37317	var body io.Reader = nil
37318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2entitytype)
37319	if err != nil {
37320		return nil, err
37321	}
37322	reqHeaders.Set("Content-Type", "application/json")
37323	c.urlParams_.Set("alt", alt)
37324	c.urlParams_.Set("prettyPrint", "false")
37325	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
37326	urls += "?" + c.urlParams_.Encode()
37327	req, err := http.NewRequest("PATCH", urls, body)
37328	if err != nil {
37329		return nil, err
37330	}
37331	req.Header = reqHeaders
37332	googleapi.Expand(req.URL, map[string]string{
37333		"name": c.nameid,
37334	})
37335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37336}
37337
37338// Do executes the "dialogflow.projects.locations.agent.entityTypes.patch" call.
37339// Exactly one of *GoogleCloudDialogflowV2EntityType or error will be
37340// non-nil. Any non-2xx status code is an error. Response headers are in
37341// either *GoogleCloudDialogflowV2EntityType.ServerResponse.Header or
37342// (if a response was returned at all) in
37343// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
37344// whether the returned error was because http.StatusNotModified was
37345// returned.
37346func (c *ProjectsLocationsAgentEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EntityType, error) {
37347	gensupport.SetOptions(c.urlParams_, opts...)
37348	res, err := c.doRequest("json")
37349	if res != nil && res.StatusCode == http.StatusNotModified {
37350		if res.Body != nil {
37351			res.Body.Close()
37352		}
37353		return nil, &googleapi.Error{
37354			Code:   res.StatusCode,
37355			Header: res.Header,
37356		}
37357	}
37358	if err != nil {
37359		return nil, err
37360	}
37361	defer googleapi.CloseBody(res)
37362	if err := googleapi.CheckResponse(res); err != nil {
37363		return nil, err
37364	}
37365	ret := &GoogleCloudDialogflowV2EntityType{
37366		ServerResponse: googleapi.ServerResponse{
37367			Header:         res.Header,
37368			HTTPStatusCode: res.StatusCode,
37369		},
37370	}
37371	target := &ret
37372	if err := gensupport.DecodeResponse(target, res); err != nil {
37373		return nil, err
37374	}
37375	return ret, nil
37376	// {
37377	//   "description": "Updates the specified entity type. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
37378	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}",
37379	//   "httpMethod": "PATCH",
37380	//   "id": "dialogflow.projects.locations.agent.entityTypes.patch",
37381	//   "parameterOrder": [
37382	//     "name"
37383	//   ],
37384	//   "parameters": {
37385	//     "languageCode": {
37386	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
37387	//       "location": "query",
37388	//       "type": "string"
37389	//     },
37390	//     "name": {
37391	//       "description": "The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`.",
37392	//       "location": "path",
37393	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
37394	//       "required": true,
37395	//       "type": "string"
37396	//     },
37397	//     "updateMask": {
37398	//       "description": "Optional. The mask to control which fields get updated.",
37399	//       "format": "google-fieldmask",
37400	//       "location": "query",
37401	//       "type": "string"
37402	//     }
37403	//   },
37404	//   "path": "v2/{+name}",
37405	//   "request": {
37406	//     "$ref": "GoogleCloudDialogflowV2EntityType"
37407	//   },
37408	//   "response": {
37409	//     "$ref": "GoogleCloudDialogflowV2EntityType"
37410	//   },
37411	//   "scopes": [
37412	//     "https://www.googleapis.com/auth/cloud-platform",
37413	//     "https://www.googleapis.com/auth/dialogflow"
37414	//   ]
37415	// }
37416
37417}
37418
37419// method id "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate":
37420
37421type ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall struct {
37422	s                                                 *Service
37423	parent                                            string
37424	googleclouddialogflowv2batchcreateentitiesrequest *GoogleCloudDialogflowV2BatchCreateEntitiesRequest
37425	urlParams_                                        gensupport.URLParams
37426	ctx_                                              context.Context
37427	header_                                           http.Header
37428}
37429
37430// BatchCreate: Creates multiple new entities in the specified entity
37431// type. Note: You should always train an agent prior to sending it
37432// queries. See the training documentation
37433// (https://cloud.google.com/dialogflow/es/docs/training).
37434//
37435// - parent: The name of the entity type to create entities in. Format:
37436//   `projects//agent/entityTypes/`.
37437func (r *ProjectsLocationsAgentEntityTypesEntitiesService) BatchCreate(parent string, googleclouddialogflowv2batchcreateentitiesrequest *GoogleCloudDialogflowV2BatchCreateEntitiesRequest) *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall {
37438	c := &ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37439	c.parent = parent
37440	c.googleclouddialogflowv2batchcreateentitiesrequest = googleclouddialogflowv2batchcreateentitiesrequest
37441	return c
37442}
37443
37444// Fields allows partial responses to be retrieved. See
37445// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37446// for more information.
37447func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall {
37448	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37449	return c
37450}
37451
37452// Context sets the context to be used in this call's Do method. Any
37453// pending HTTP request will be aborted if the provided context is
37454// canceled.
37455func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall {
37456	c.ctx_ = ctx
37457	return c
37458}
37459
37460// Header returns an http.Header that can be modified by the caller to
37461// add HTTP headers to the request.
37462func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Header() http.Header {
37463	if c.header_ == nil {
37464		c.header_ = make(http.Header)
37465	}
37466	return c.header_
37467}
37468
37469func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) doRequest(alt string) (*http.Response, error) {
37470	reqHeaders := make(http.Header)
37471	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
37472	for k, v := range c.header_ {
37473		reqHeaders[k] = v
37474	}
37475	reqHeaders.Set("User-Agent", c.s.userAgent())
37476	var body io.Reader = nil
37477	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchcreateentitiesrequest)
37478	if err != nil {
37479		return nil, err
37480	}
37481	reqHeaders.Set("Content-Type", "application/json")
37482	c.urlParams_.Set("alt", alt)
37483	c.urlParams_.Set("prettyPrint", "false")
37484	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchCreate")
37485	urls += "?" + c.urlParams_.Encode()
37486	req, err := http.NewRequest("POST", urls, body)
37487	if err != nil {
37488		return nil, err
37489	}
37490	req.Header = reqHeaders
37491	googleapi.Expand(req.URL, map[string]string{
37492		"parent": c.parent,
37493	})
37494	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37495}
37496
37497// Do executes the "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate" call.
37498// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
37499// Any non-2xx status code is an error. Response headers are in either
37500// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
37501// was returned at all) in error.(*googleapi.Error).Header. Use
37502// googleapi.IsNotModified to check whether the returned error was
37503// because http.StatusNotModified was returned.
37504func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
37505	gensupport.SetOptions(c.urlParams_, opts...)
37506	res, err := c.doRequest("json")
37507	if res != nil && res.StatusCode == http.StatusNotModified {
37508		if res.Body != nil {
37509			res.Body.Close()
37510		}
37511		return nil, &googleapi.Error{
37512			Code:   res.StatusCode,
37513			Header: res.Header,
37514		}
37515	}
37516	if err != nil {
37517		return nil, err
37518	}
37519	defer googleapi.CloseBody(res)
37520	if err := googleapi.CheckResponse(res); err != nil {
37521		return nil, err
37522	}
37523	ret := &GoogleLongrunningOperation{
37524		ServerResponse: googleapi.ServerResponse{
37525			Header:         res.Header,
37526			HTTPStatusCode: res.StatusCode,
37527		},
37528	}
37529	target := &ret
37530	if err := gensupport.DecodeResponse(target, res); err != nil {
37531		return nil, err
37532	}
37533	return ret, nil
37534	// {
37535	//   "description": "Creates multiple new entities in the specified entity type. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
37536	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate",
37537	//   "httpMethod": "POST",
37538	//   "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate",
37539	//   "parameterOrder": [
37540	//     "parent"
37541	//   ],
37542	//   "parameters": {
37543	//     "parent": {
37544	//       "description": "Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`.",
37545	//       "location": "path",
37546	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
37547	//       "required": true,
37548	//       "type": "string"
37549	//     }
37550	//   },
37551	//   "path": "v2/{+parent}/entities:batchCreate",
37552	//   "request": {
37553	//     "$ref": "GoogleCloudDialogflowV2BatchCreateEntitiesRequest"
37554	//   },
37555	//   "response": {
37556	//     "$ref": "GoogleLongrunningOperation"
37557	//   },
37558	//   "scopes": [
37559	//     "https://www.googleapis.com/auth/cloud-platform",
37560	//     "https://www.googleapis.com/auth/dialogflow"
37561	//   ]
37562	// }
37563
37564}
37565
37566// method id "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete":
37567
37568type ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall struct {
37569	s                                                 *Service
37570	parent                                            string
37571	googleclouddialogflowv2batchdeleteentitiesrequest *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest
37572	urlParams_                                        gensupport.URLParams
37573	ctx_                                              context.Context
37574	header_                                           http.Header
37575}
37576
37577// BatchDelete: Deletes entities in the specified entity type. Note: You
37578// should always train an agent prior to sending it queries. See the
37579// training documentation
37580// (https://cloud.google.com/dialogflow/es/docs/training).
37581//
37582// - parent: The name of the entity type to delete entries for. Format:
37583//   `projects//agent/entityTypes/`.
37584func (r *ProjectsLocationsAgentEntityTypesEntitiesService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteentitiesrequest *GoogleCloudDialogflowV2BatchDeleteEntitiesRequest) *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall {
37585	c := &ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37586	c.parent = parent
37587	c.googleclouddialogflowv2batchdeleteentitiesrequest = googleclouddialogflowv2batchdeleteentitiesrequest
37588	return c
37589}
37590
37591// Fields allows partial responses to be retrieved. See
37592// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37593// for more information.
37594func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall {
37595	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37596	return c
37597}
37598
37599// Context sets the context to be used in this call's Do method. Any
37600// pending HTTP request will be aborted if the provided context is
37601// canceled.
37602func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall {
37603	c.ctx_ = ctx
37604	return c
37605}
37606
37607// Header returns an http.Header that can be modified by the caller to
37608// add HTTP headers to the request.
37609func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Header() http.Header {
37610	if c.header_ == nil {
37611		c.header_ = make(http.Header)
37612	}
37613	return c.header_
37614}
37615
37616func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
37617	reqHeaders := make(http.Header)
37618	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
37619	for k, v := range c.header_ {
37620		reqHeaders[k] = v
37621	}
37622	reqHeaders.Set("User-Agent", c.s.userAgent())
37623	var body io.Reader = nil
37624	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteentitiesrequest)
37625	if err != nil {
37626		return nil, err
37627	}
37628	reqHeaders.Set("Content-Type", "application/json")
37629	c.urlParams_.Set("alt", alt)
37630	c.urlParams_.Set("prettyPrint", "false")
37631	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchDelete")
37632	urls += "?" + c.urlParams_.Encode()
37633	req, err := http.NewRequest("POST", urls, body)
37634	if err != nil {
37635		return nil, err
37636	}
37637	req.Header = reqHeaders
37638	googleapi.Expand(req.URL, map[string]string{
37639		"parent": c.parent,
37640	})
37641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37642}
37643
37644// Do executes the "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete" call.
37645// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
37646// Any non-2xx status code is an error. Response headers are in either
37647// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
37648// was returned at all) in error.(*googleapi.Error).Header. Use
37649// googleapi.IsNotModified to check whether the returned error was
37650// because http.StatusNotModified was returned.
37651func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
37652	gensupport.SetOptions(c.urlParams_, opts...)
37653	res, err := c.doRequest("json")
37654	if res != nil && res.StatusCode == http.StatusNotModified {
37655		if res.Body != nil {
37656			res.Body.Close()
37657		}
37658		return nil, &googleapi.Error{
37659			Code:   res.StatusCode,
37660			Header: res.Header,
37661		}
37662	}
37663	if err != nil {
37664		return nil, err
37665	}
37666	defer googleapi.CloseBody(res)
37667	if err := googleapi.CheckResponse(res); err != nil {
37668		return nil, err
37669	}
37670	ret := &GoogleLongrunningOperation{
37671		ServerResponse: googleapi.ServerResponse{
37672			Header:         res.Header,
37673			HTTPStatusCode: res.StatusCode,
37674		},
37675	}
37676	target := &ret
37677	if err := gensupport.DecodeResponse(target, res); err != nil {
37678		return nil, err
37679	}
37680	return ret, nil
37681	// {
37682	//   "description": "Deletes entities in the specified entity type. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
37683	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete",
37684	//   "httpMethod": "POST",
37685	//   "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete",
37686	//   "parameterOrder": [
37687	//     "parent"
37688	//   ],
37689	//   "parameters": {
37690	//     "parent": {
37691	//       "description": "Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`.",
37692	//       "location": "path",
37693	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
37694	//       "required": true,
37695	//       "type": "string"
37696	//     }
37697	//   },
37698	//   "path": "v2/{+parent}/entities:batchDelete",
37699	//   "request": {
37700	//     "$ref": "GoogleCloudDialogflowV2BatchDeleteEntitiesRequest"
37701	//   },
37702	//   "response": {
37703	//     "$ref": "GoogleLongrunningOperation"
37704	//   },
37705	//   "scopes": [
37706	//     "https://www.googleapis.com/auth/cloud-platform",
37707	//     "https://www.googleapis.com/auth/dialogflow"
37708	//   ]
37709	// }
37710
37711}
37712
37713// method id "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate":
37714
37715type ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall struct {
37716	s                                                 *Service
37717	parent                                            string
37718	googleclouddialogflowv2batchupdateentitiesrequest *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest
37719	urlParams_                                        gensupport.URLParams
37720	ctx_                                              context.Context
37721	header_                                           http.Header
37722}
37723
37724// BatchUpdate: Updates or creates multiple entities in the specified
37725// entity type. This method does not affect entities in the entity type
37726// that aren't explicitly specified in the request. Note: You should
37727// always train an agent prior to sending it queries. See the training
37728// documentation (https://cloud.google.com/dialogflow/es/docs/training).
37729//
37730// - parent: The name of the entity type to update or create entities
37731//   in. Format: `projects//agent/entityTypes/`.
37732func (r *ProjectsLocationsAgentEntityTypesEntitiesService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateentitiesrequest *GoogleCloudDialogflowV2BatchUpdateEntitiesRequest) *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall {
37733	c := &ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37734	c.parent = parent
37735	c.googleclouddialogflowv2batchupdateentitiesrequest = googleclouddialogflowv2batchupdateentitiesrequest
37736	return c
37737}
37738
37739// Fields allows partial responses to be retrieved. See
37740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37741// for more information.
37742func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall {
37743	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37744	return c
37745}
37746
37747// Context sets the context to be used in this call's Do method. Any
37748// pending HTTP request will be aborted if the provided context is
37749// canceled.
37750func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall {
37751	c.ctx_ = ctx
37752	return c
37753}
37754
37755// Header returns an http.Header that can be modified by the caller to
37756// add HTTP headers to the request.
37757func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Header() http.Header {
37758	if c.header_ == nil {
37759		c.header_ = make(http.Header)
37760	}
37761	return c.header_
37762}
37763
37764func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
37765	reqHeaders := make(http.Header)
37766	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
37767	for k, v := range c.header_ {
37768		reqHeaders[k] = v
37769	}
37770	reqHeaders.Set("User-Agent", c.s.userAgent())
37771	var body io.Reader = nil
37772	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateentitiesrequest)
37773	if err != nil {
37774		return nil, err
37775	}
37776	reqHeaders.Set("Content-Type", "application/json")
37777	c.urlParams_.Set("alt", alt)
37778	c.urlParams_.Set("prettyPrint", "false")
37779	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entities:batchUpdate")
37780	urls += "?" + c.urlParams_.Encode()
37781	req, err := http.NewRequest("POST", urls, body)
37782	if err != nil {
37783		return nil, err
37784	}
37785	req.Header = reqHeaders
37786	googleapi.Expand(req.URL, map[string]string{
37787		"parent": c.parent,
37788	})
37789	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37790}
37791
37792// Do executes the "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate" call.
37793// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
37794// Any non-2xx status code is an error. Response headers are in either
37795// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
37796// was returned at all) in error.(*googleapi.Error).Header. Use
37797// googleapi.IsNotModified to check whether the returned error was
37798// because http.StatusNotModified was returned.
37799func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
37800	gensupport.SetOptions(c.urlParams_, opts...)
37801	res, err := c.doRequest("json")
37802	if res != nil && res.StatusCode == http.StatusNotModified {
37803		if res.Body != nil {
37804			res.Body.Close()
37805		}
37806		return nil, &googleapi.Error{
37807			Code:   res.StatusCode,
37808			Header: res.Header,
37809		}
37810	}
37811	if err != nil {
37812		return nil, err
37813	}
37814	defer googleapi.CloseBody(res)
37815	if err := googleapi.CheckResponse(res); err != nil {
37816		return nil, err
37817	}
37818	ret := &GoogleLongrunningOperation{
37819		ServerResponse: googleapi.ServerResponse{
37820			Header:         res.Header,
37821			HTTPStatusCode: res.StatusCode,
37822		},
37823	}
37824	target := &ret
37825	if err := gensupport.DecodeResponse(target, res); err != nil {
37826		return nil, err
37827	}
37828	return ret, nil
37829	// {
37830	//   "description": "Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
37831	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate",
37832	//   "httpMethod": "POST",
37833	//   "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate",
37834	//   "parameterOrder": [
37835	//     "parent"
37836	//   ],
37837	//   "parameters": {
37838	//     "parent": {
37839	//       "description": "Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`.",
37840	//       "location": "path",
37841	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
37842	//       "required": true,
37843	//       "type": "string"
37844	//     }
37845	//   },
37846	//   "path": "v2/{+parent}/entities:batchUpdate",
37847	//   "request": {
37848	//     "$ref": "GoogleCloudDialogflowV2BatchUpdateEntitiesRequest"
37849	//   },
37850	//   "response": {
37851	//     "$ref": "GoogleLongrunningOperation"
37852	//   },
37853	//   "scopes": [
37854	//     "https://www.googleapis.com/auth/cloud-platform",
37855	//     "https://www.googleapis.com/auth/dialogflow"
37856	//   ]
37857	// }
37858
37859}
37860
37861// method id "dialogflow.projects.locations.agent.environments.create":
37862
37863type ProjectsLocationsAgentEnvironmentsCreateCall struct {
37864	s                                  *Service
37865	parent                             string
37866	googleclouddialogflowv2environment *GoogleCloudDialogflowV2Environment
37867	urlParams_                         gensupport.URLParams
37868	ctx_                               context.Context
37869	header_                            http.Header
37870}
37871
37872// Create: Creates an agent environment.
37873//
37874// - parent: The agent to create an environment for. Supported formats:
37875//   - `projects//agent` - `projects//locations//agent`.
37876func (r *ProjectsLocationsAgentEnvironmentsService) Create(parent string, googleclouddialogflowv2environment *GoogleCloudDialogflowV2Environment) *ProjectsLocationsAgentEnvironmentsCreateCall {
37877	c := &ProjectsLocationsAgentEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37878	c.parent = parent
37879	c.googleclouddialogflowv2environment = googleclouddialogflowv2environment
37880	return c
37881}
37882
37883// EnvironmentId sets the optional parameter "environmentId": Required.
37884// The unique id of the new environment.
37885func (c *ProjectsLocationsAgentEnvironmentsCreateCall) EnvironmentId(environmentId string) *ProjectsLocationsAgentEnvironmentsCreateCall {
37886	c.urlParams_.Set("environmentId", environmentId)
37887	return c
37888}
37889
37890// Fields allows partial responses to be retrieved. See
37891// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37892// for more information.
37893func (c *ProjectsLocationsAgentEnvironmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsCreateCall {
37894	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37895	return c
37896}
37897
37898// Context sets the context to be used in this call's Do method. Any
37899// pending HTTP request will be aborted if the provided context is
37900// canceled.
37901func (c *ProjectsLocationsAgentEnvironmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsCreateCall {
37902	c.ctx_ = ctx
37903	return c
37904}
37905
37906// Header returns an http.Header that can be modified by the caller to
37907// add HTTP headers to the request.
37908func (c *ProjectsLocationsAgentEnvironmentsCreateCall) Header() http.Header {
37909	if c.header_ == nil {
37910		c.header_ = make(http.Header)
37911	}
37912	return c.header_
37913}
37914
37915func (c *ProjectsLocationsAgentEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) {
37916	reqHeaders := make(http.Header)
37917	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
37918	for k, v := range c.header_ {
37919		reqHeaders[k] = v
37920	}
37921	reqHeaders.Set("User-Agent", c.s.userAgent())
37922	var body io.Reader = nil
37923	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2environment)
37924	if err != nil {
37925		return nil, err
37926	}
37927	reqHeaders.Set("Content-Type", "application/json")
37928	c.urlParams_.Set("alt", alt)
37929	c.urlParams_.Set("prettyPrint", "false")
37930	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/environments")
37931	urls += "?" + c.urlParams_.Encode()
37932	req, err := http.NewRequest("POST", urls, body)
37933	if err != nil {
37934		return nil, err
37935	}
37936	req.Header = reqHeaders
37937	googleapi.Expand(req.URL, map[string]string{
37938		"parent": c.parent,
37939	})
37940	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37941}
37942
37943// Do executes the "dialogflow.projects.locations.agent.environments.create" call.
37944// Exactly one of *GoogleCloudDialogflowV2Environment or error will be
37945// non-nil. Any non-2xx status code is an error. Response headers are in
37946// either *GoogleCloudDialogflowV2Environment.ServerResponse.Header or
37947// (if a response was returned at all) in
37948// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
37949// whether the returned error was because http.StatusNotModified was
37950// returned.
37951func (c *ProjectsLocationsAgentEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Environment, error) {
37952	gensupport.SetOptions(c.urlParams_, opts...)
37953	res, err := c.doRequest("json")
37954	if res != nil && res.StatusCode == http.StatusNotModified {
37955		if res.Body != nil {
37956			res.Body.Close()
37957		}
37958		return nil, &googleapi.Error{
37959			Code:   res.StatusCode,
37960			Header: res.Header,
37961		}
37962	}
37963	if err != nil {
37964		return nil, err
37965	}
37966	defer googleapi.CloseBody(res)
37967	if err := googleapi.CheckResponse(res); err != nil {
37968		return nil, err
37969	}
37970	ret := &GoogleCloudDialogflowV2Environment{
37971		ServerResponse: googleapi.ServerResponse{
37972			Header:         res.Header,
37973			HTTPStatusCode: res.StatusCode,
37974		},
37975	}
37976	target := &ret
37977	if err := gensupport.DecodeResponse(target, res); err != nil {
37978		return nil, err
37979	}
37980	return ret, nil
37981	// {
37982	//   "description": "Creates an agent environment.",
37983	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments",
37984	//   "httpMethod": "POST",
37985	//   "id": "dialogflow.projects.locations.agent.environments.create",
37986	//   "parameterOrder": [
37987	//     "parent"
37988	//   ],
37989	//   "parameters": {
37990	//     "environmentId": {
37991	//       "description": "Required. The unique id of the new environment.",
37992	//       "location": "query",
37993	//       "type": "string"
37994	//     },
37995	//     "parent": {
37996	//       "description": "Required. The agent to create an environment for. Supported formats: - `projects//agent` - `projects//locations//agent`",
37997	//       "location": "path",
37998	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
37999	//       "required": true,
38000	//       "type": "string"
38001	//     }
38002	//   },
38003	//   "path": "v2/{+parent}/environments",
38004	//   "request": {
38005	//     "$ref": "GoogleCloudDialogflowV2Environment"
38006	//   },
38007	//   "response": {
38008	//     "$ref": "GoogleCloudDialogflowV2Environment"
38009	//   },
38010	//   "scopes": [
38011	//     "https://www.googleapis.com/auth/cloud-platform",
38012	//     "https://www.googleapis.com/auth/dialogflow"
38013	//   ]
38014	// }
38015
38016}
38017
38018// method id "dialogflow.projects.locations.agent.environments.delete":
38019
38020type ProjectsLocationsAgentEnvironmentsDeleteCall struct {
38021	s          *Service
38022	name       string
38023	urlParams_ gensupport.URLParams
38024	ctx_       context.Context
38025	header_    http.Header
38026}
38027
38028// Delete: Deletes the specified agent environment.
38029//
38030// - name: The name of the environment to delete. / Format: -
38031//   `projects//agent/environments/` -
38032//   `projects//locations//agent/environments/`.
38033func (r *ProjectsLocationsAgentEnvironmentsService) Delete(name string) *ProjectsLocationsAgentEnvironmentsDeleteCall {
38034	c := &ProjectsLocationsAgentEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38035	c.name = name
38036	return c
38037}
38038
38039// Fields allows partial responses to be retrieved. See
38040// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38041// for more information.
38042func (c *ProjectsLocationsAgentEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsDeleteCall {
38043	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38044	return c
38045}
38046
38047// Context sets the context to be used in this call's Do method. Any
38048// pending HTTP request will be aborted if the provided context is
38049// canceled.
38050func (c *ProjectsLocationsAgentEnvironmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsDeleteCall {
38051	c.ctx_ = ctx
38052	return c
38053}
38054
38055// Header returns an http.Header that can be modified by the caller to
38056// add HTTP headers to the request.
38057func (c *ProjectsLocationsAgentEnvironmentsDeleteCall) Header() http.Header {
38058	if c.header_ == nil {
38059		c.header_ = make(http.Header)
38060	}
38061	return c.header_
38062}
38063
38064func (c *ProjectsLocationsAgentEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
38065	reqHeaders := make(http.Header)
38066	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
38067	for k, v := range c.header_ {
38068		reqHeaders[k] = v
38069	}
38070	reqHeaders.Set("User-Agent", c.s.userAgent())
38071	var body io.Reader = nil
38072	c.urlParams_.Set("alt", alt)
38073	c.urlParams_.Set("prettyPrint", "false")
38074	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
38075	urls += "?" + c.urlParams_.Encode()
38076	req, err := http.NewRequest("DELETE", urls, body)
38077	if err != nil {
38078		return nil, err
38079	}
38080	req.Header = reqHeaders
38081	googleapi.Expand(req.URL, map[string]string{
38082		"name": c.name,
38083	})
38084	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38085}
38086
38087// Do executes the "dialogflow.projects.locations.agent.environments.delete" call.
38088// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
38089// non-2xx status code is an error. Response headers are in either
38090// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
38091// returned at all) in error.(*googleapi.Error).Header. Use
38092// googleapi.IsNotModified to check whether the returned error was
38093// because http.StatusNotModified was returned.
38094func (c *ProjectsLocationsAgentEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
38095	gensupport.SetOptions(c.urlParams_, opts...)
38096	res, err := c.doRequest("json")
38097	if res != nil && res.StatusCode == http.StatusNotModified {
38098		if res.Body != nil {
38099			res.Body.Close()
38100		}
38101		return nil, &googleapi.Error{
38102			Code:   res.StatusCode,
38103			Header: res.Header,
38104		}
38105	}
38106	if err != nil {
38107		return nil, err
38108	}
38109	defer googleapi.CloseBody(res)
38110	if err := googleapi.CheckResponse(res); err != nil {
38111		return nil, err
38112	}
38113	ret := &GoogleProtobufEmpty{
38114		ServerResponse: googleapi.ServerResponse{
38115			Header:         res.Header,
38116			HTTPStatusCode: res.StatusCode,
38117		},
38118	}
38119	target := &ret
38120	if err := gensupport.DecodeResponse(target, res); err != nil {
38121		return nil, err
38122	}
38123	return ret, nil
38124	// {
38125	//   "description": "Deletes the specified agent environment.",
38126	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}",
38127	//   "httpMethod": "DELETE",
38128	//   "id": "dialogflow.projects.locations.agent.environments.delete",
38129	//   "parameterOrder": [
38130	//     "name"
38131	//   ],
38132	//   "parameters": {
38133	//     "name": {
38134	//       "description": "Required. The name of the environment to delete. / Format: - `projects//agent/environments/` - `projects//locations//agent/environments/`",
38135	//       "location": "path",
38136	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+$",
38137	//       "required": true,
38138	//       "type": "string"
38139	//     }
38140	//   },
38141	//   "path": "v2/{+name}",
38142	//   "response": {
38143	//     "$ref": "GoogleProtobufEmpty"
38144	//   },
38145	//   "scopes": [
38146	//     "https://www.googleapis.com/auth/cloud-platform",
38147	//     "https://www.googleapis.com/auth/dialogflow"
38148	//   ]
38149	// }
38150
38151}
38152
38153// method id "dialogflow.projects.locations.agent.environments.get":
38154
38155type ProjectsLocationsAgentEnvironmentsGetCall struct {
38156	s            *Service
38157	name         string
38158	urlParams_   gensupport.URLParams
38159	ifNoneMatch_ string
38160	ctx_         context.Context
38161	header_      http.Header
38162}
38163
38164// Get: Retrieves the specified agent environment.
38165//
38166// - name: The name of the environment. Supported formats: -
38167//   `projects//agent/environments/` -
38168//   `projects//locations//agent/environments/`.
38169func (r *ProjectsLocationsAgentEnvironmentsService) Get(name string) *ProjectsLocationsAgentEnvironmentsGetCall {
38170	c := &ProjectsLocationsAgentEnvironmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38171	c.name = name
38172	return c
38173}
38174
38175// Fields allows partial responses to be retrieved. See
38176// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38177// for more information.
38178func (c *ProjectsLocationsAgentEnvironmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsGetCall {
38179	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38180	return c
38181}
38182
38183// IfNoneMatch sets the optional parameter which makes the operation
38184// fail if the object's ETag matches the given value. This is useful for
38185// getting updates only after the object has changed since the last
38186// request. Use googleapi.IsNotModified to check whether the response
38187// error from Do is the result of In-None-Match.
38188func (c *ProjectsLocationsAgentEnvironmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsGetCall {
38189	c.ifNoneMatch_ = entityTag
38190	return c
38191}
38192
38193// Context sets the context to be used in this call's Do method. Any
38194// pending HTTP request will be aborted if the provided context is
38195// canceled.
38196func (c *ProjectsLocationsAgentEnvironmentsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsGetCall {
38197	c.ctx_ = ctx
38198	return c
38199}
38200
38201// Header returns an http.Header that can be modified by the caller to
38202// add HTTP headers to the request.
38203func (c *ProjectsLocationsAgentEnvironmentsGetCall) Header() http.Header {
38204	if c.header_ == nil {
38205		c.header_ = make(http.Header)
38206	}
38207	return c.header_
38208}
38209
38210func (c *ProjectsLocationsAgentEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) {
38211	reqHeaders := make(http.Header)
38212	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
38213	for k, v := range c.header_ {
38214		reqHeaders[k] = v
38215	}
38216	reqHeaders.Set("User-Agent", c.s.userAgent())
38217	if c.ifNoneMatch_ != "" {
38218		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38219	}
38220	var body io.Reader = nil
38221	c.urlParams_.Set("alt", alt)
38222	c.urlParams_.Set("prettyPrint", "false")
38223	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
38224	urls += "?" + c.urlParams_.Encode()
38225	req, err := http.NewRequest("GET", urls, body)
38226	if err != nil {
38227		return nil, err
38228	}
38229	req.Header = reqHeaders
38230	googleapi.Expand(req.URL, map[string]string{
38231		"name": c.name,
38232	})
38233	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38234}
38235
38236// Do executes the "dialogflow.projects.locations.agent.environments.get" call.
38237// Exactly one of *GoogleCloudDialogflowV2Environment or error will be
38238// non-nil. Any non-2xx status code is an error. Response headers are in
38239// either *GoogleCloudDialogflowV2Environment.ServerResponse.Header or
38240// (if a response was returned at all) in
38241// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
38242// whether the returned error was because http.StatusNotModified was
38243// returned.
38244func (c *ProjectsLocationsAgentEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Environment, error) {
38245	gensupport.SetOptions(c.urlParams_, opts...)
38246	res, err := c.doRequest("json")
38247	if res != nil && res.StatusCode == http.StatusNotModified {
38248		if res.Body != nil {
38249			res.Body.Close()
38250		}
38251		return nil, &googleapi.Error{
38252			Code:   res.StatusCode,
38253			Header: res.Header,
38254		}
38255	}
38256	if err != nil {
38257		return nil, err
38258	}
38259	defer googleapi.CloseBody(res)
38260	if err := googleapi.CheckResponse(res); err != nil {
38261		return nil, err
38262	}
38263	ret := &GoogleCloudDialogflowV2Environment{
38264		ServerResponse: googleapi.ServerResponse{
38265			Header:         res.Header,
38266			HTTPStatusCode: res.StatusCode,
38267		},
38268	}
38269	target := &ret
38270	if err := gensupport.DecodeResponse(target, res); err != nil {
38271		return nil, err
38272	}
38273	return ret, nil
38274	// {
38275	//   "description": "Retrieves the specified agent environment.",
38276	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}",
38277	//   "httpMethod": "GET",
38278	//   "id": "dialogflow.projects.locations.agent.environments.get",
38279	//   "parameterOrder": [
38280	//     "name"
38281	//   ],
38282	//   "parameters": {
38283	//     "name": {
38284	//       "description": "Required. The name of the environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`",
38285	//       "location": "path",
38286	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+$",
38287	//       "required": true,
38288	//       "type": "string"
38289	//     }
38290	//   },
38291	//   "path": "v2/{+name}",
38292	//   "response": {
38293	//     "$ref": "GoogleCloudDialogflowV2Environment"
38294	//   },
38295	//   "scopes": [
38296	//     "https://www.googleapis.com/auth/cloud-platform",
38297	//     "https://www.googleapis.com/auth/dialogflow"
38298	//   ]
38299	// }
38300
38301}
38302
38303// method id "dialogflow.projects.locations.agent.environments.getHistory":
38304
38305type ProjectsLocationsAgentEnvironmentsGetHistoryCall struct {
38306	s            *Service
38307	parent       string
38308	urlParams_   gensupport.URLParams
38309	ifNoneMatch_ string
38310	ctx_         context.Context
38311	header_      http.Header
38312}
38313
38314// GetHistory: Gets the history of the specified environment.
38315//
38316// - parent: The name of the environment to retrieve history for.
38317//   Supported formats: - `projects//agent/environments/` -
38318//   `projects//locations//agent/environments/`.
38319func (r *ProjectsLocationsAgentEnvironmentsService) GetHistory(parent string) *ProjectsLocationsAgentEnvironmentsGetHistoryCall {
38320	c := &ProjectsLocationsAgentEnvironmentsGetHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38321	c.parent = parent
38322	return c
38323}
38324
38325// PageSize sets the optional parameter "pageSize": The maximum number
38326// of items to return in a single page. By default 100 and at most 1000.
38327func (c *ProjectsLocationsAgentEnvironmentsGetHistoryCall) PageSize(pageSize int64) *ProjectsLocationsAgentEnvironmentsGetHistoryCall {
38328	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
38329	return c
38330}
38331
38332// PageToken sets the optional parameter "pageToken": The
38333// next_page_token value returned from a previous list request.
38334func (c *ProjectsLocationsAgentEnvironmentsGetHistoryCall) PageToken(pageToken string) *ProjectsLocationsAgentEnvironmentsGetHistoryCall {
38335	c.urlParams_.Set("pageToken", pageToken)
38336	return c
38337}
38338
38339// Fields allows partial responses to be retrieved. See
38340// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38341// for more information.
38342func (c *ProjectsLocationsAgentEnvironmentsGetHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsGetHistoryCall {
38343	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38344	return c
38345}
38346
38347// IfNoneMatch sets the optional parameter which makes the operation
38348// fail if the object's ETag matches the given value. This is useful for
38349// getting updates only after the object has changed since the last
38350// request. Use googleapi.IsNotModified to check whether the response
38351// error from Do is the result of In-None-Match.
38352func (c *ProjectsLocationsAgentEnvironmentsGetHistoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsGetHistoryCall {
38353	c.ifNoneMatch_ = entityTag
38354	return c
38355}
38356
38357// Context sets the context to be used in this call's Do method. Any
38358// pending HTTP request will be aborted if the provided context is
38359// canceled.
38360func (c *ProjectsLocationsAgentEnvironmentsGetHistoryCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsGetHistoryCall {
38361	c.ctx_ = ctx
38362	return c
38363}
38364
38365// Header returns an http.Header that can be modified by the caller to
38366// add HTTP headers to the request.
38367func (c *ProjectsLocationsAgentEnvironmentsGetHistoryCall) Header() http.Header {
38368	if c.header_ == nil {
38369		c.header_ = make(http.Header)
38370	}
38371	return c.header_
38372}
38373
38374func (c *ProjectsLocationsAgentEnvironmentsGetHistoryCall) doRequest(alt string) (*http.Response, error) {
38375	reqHeaders := make(http.Header)
38376	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
38377	for k, v := range c.header_ {
38378		reqHeaders[k] = v
38379	}
38380	reqHeaders.Set("User-Agent", c.s.userAgent())
38381	if c.ifNoneMatch_ != "" {
38382		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38383	}
38384	var body io.Reader = nil
38385	c.urlParams_.Set("alt", alt)
38386	c.urlParams_.Set("prettyPrint", "false")
38387	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/history")
38388	urls += "?" + c.urlParams_.Encode()
38389	req, err := http.NewRequest("GET", urls, body)
38390	if err != nil {
38391		return nil, err
38392	}
38393	req.Header = reqHeaders
38394	googleapi.Expand(req.URL, map[string]string{
38395		"parent": c.parent,
38396	})
38397	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38398}
38399
38400// Do executes the "dialogflow.projects.locations.agent.environments.getHistory" call.
38401// Exactly one of *GoogleCloudDialogflowV2EnvironmentHistory or error
38402// will be non-nil. Any non-2xx status code is an error. Response
38403// headers are in either
38404// *GoogleCloudDialogflowV2EnvironmentHistory.ServerResponse.Header or
38405// (if a response was returned at all) in
38406// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
38407// whether the returned error was because http.StatusNotModified was
38408// returned.
38409func (c *ProjectsLocationsAgentEnvironmentsGetHistoryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2EnvironmentHistory, error) {
38410	gensupport.SetOptions(c.urlParams_, opts...)
38411	res, err := c.doRequest("json")
38412	if res != nil && res.StatusCode == http.StatusNotModified {
38413		if res.Body != nil {
38414			res.Body.Close()
38415		}
38416		return nil, &googleapi.Error{
38417			Code:   res.StatusCode,
38418			Header: res.Header,
38419		}
38420	}
38421	if err != nil {
38422		return nil, err
38423	}
38424	defer googleapi.CloseBody(res)
38425	if err := googleapi.CheckResponse(res); err != nil {
38426		return nil, err
38427	}
38428	ret := &GoogleCloudDialogflowV2EnvironmentHistory{
38429		ServerResponse: googleapi.ServerResponse{
38430			Header:         res.Header,
38431			HTTPStatusCode: res.StatusCode,
38432		},
38433	}
38434	target := &ret
38435	if err := gensupport.DecodeResponse(target, res); err != nil {
38436		return nil, err
38437	}
38438	return ret, nil
38439	// {
38440	//   "description": "Gets the history of the specified environment.",
38441	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/history",
38442	//   "httpMethod": "GET",
38443	//   "id": "dialogflow.projects.locations.agent.environments.getHistory",
38444	//   "parameterOrder": [
38445	//     "parent"
38446	//   ],
38447	//   "parameters": {
38448	//     "pageSize": {
38449	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
38450	//       "format": "int32",
38451	//       "location": "query",
38452	//       "type": "integer"
38453	//     },
38454	//     "pageToken": {
38455	//       "description": "Optional. The next_page_token value returned from a previous list request.",
38456	//       "location": "query",
38457	//       "type": "string"
38458	//     },
38459	//     "parent": {
38460	//       "description": "Required. The name of the environment to retrieve history for. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`",
38461	//       "location": "path",
38462	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+$",
38463	//       "required": true,
38464	//       "type": "string"
38465	//     }
38466	//   },
38467	//   "path": "v2/{+parent}/history",
38468	//   "response": {
38469	//     "$ref": "GoogleCloudDialogflowV2EnvironmentHistory"
38470	//   },
38471	//   "scopes": [
38472	//     "https://www.googleapis.com/auth/cloud-platform",
38473	//     "https://www.googleapis.com/auth/dialogflow"
38474	//   ]
38475	// }
38476
38477}
38478
38479// Pages invokes f for each page of results.
38480// A non-nil error returned from f will halt the iteration.
38481// The provided context supersedes any context provided to the Context method.
38482func (c *ProjectsLocationsAgentEnvironmentsGetHistoryCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2EnvironmentHistory) error) error {
38483	c.ctx_ = ctx
38484	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38485	for {
38486		x, err := c.Do()
38487		if err != nil {
38488			return err
38489		}
38490		if err := f(x); err != nil {
38491			return err
38492		}
38493		if x.NextPageToken == "" {
38494			return nil
38495		}
38496		c.PageToken(x.NextPageToken)
38497	}
38498}
38499
38500// method id "dialogflow.projects.locations.agent.environments.list":
38501
38502type ProjectsLocationsAgentEnvironmentsListCall struct {
38503	s            *Service
38504	parent       string
38505	urlParams_   gensupport.URLParams
38506	ifNoneMatch_ string
38507	ctx_         context.Context
38508	header_      http.Header
38509}
38510
38511// List: Returns the list of all non-draft environments of the specified
38512// agent.
38513//
38514// - parent: The agent to list all environments from. Format: -
38515//   `projects//agent` - `projects//locations//agent`.
38516func (r *ProjectsLocationsAgentEnvironmentsService) List(parent string) *ProjectsLocationsAgentEnvironmentsListCall {
38517	c := &ProjectsLocationsAgentEnvironmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38518	c.parent = parent
38519	return c
38520}
38521
38522// PageSize sets the optional parameter "pageSize": The maximum number
38523// of items to return in a single page. By default 100 and at most 1000.
38524func (c *ProjectsLocationsAgentEnvironmentsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEnvironmentsListCall {
38525	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
38526	return c
38527}
38528
38529// PageToken sets the optional parameter "pageToken": The
38530// next_page_token value returned from a previous list request.
38531func (c *ProjectsLocationsAgentEnvironmentsListCall) PageToken(pageToken string) *ProjectsLocationsAgentEnvironmentsListCall {
38532	c.urlParams_.Set("pageToken", pageToken)
38533	return c
38534}
38535
38536// Fields allows partial responses to be retrieved. See
38537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38538// for more information.
38539func (c *ProjectsLocationsAgentEnvironmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsListCall {
38540	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38541	return c
38542}
38543
38544// IfNoneMatch sets the optional parameter which makes the operation
38545// fail if the object's ETag matches the given value. This is useful for
38546// getting updates only after the object has changed since the last
38547// request. Use googleapi.IsNotModified to check whether the response
38548// error from Do is the result of In-None-Match.
38549func (c *ProjectsLocationsAgentEnvironmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsListCall {
38550	c.ifNoneMatch_ = entityTag
38551	return c
38552}
38553
38554// Context sets the context to be used in this call's Do method. Any
38555// pending HTTP request will be aborted if the provided context is
38556// canceled.
38557func (c *ProjectsLocationsAgentEnvironmentsListCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsListCall {
38558	c.ctx_ = ctx
38559	return c
38560}
38561
38562// Header returns an http.Header that can be modified by the caller to
38563// add HTTP headers to the request.
38564func (c *ProjectsLocationsAgentEnvironmentsListCall) Header() http.Header {
38565	if c.header_ == nil {
38566		c.header_ = make(http.Header)
38567	}
38568	return c.header_
38569}
38570
38571func (c *ProjectsLocationsAgentEnvironmentsListCall) doRequest(alt string) (*http.Response, error) {
38572	reqHeaders := make(http.Header)
38573	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
38574	for k, v := range c.header_ {
38575		reqHeaders[k] = v
38576	}
38577	reqHeaders.Set("User-Agent", c.s.userAgent())
38578	if c.ifNoneMatch_ != "" {
38579		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38580	}
38581	var body io.Reader = nil
38582	c.urlParams_.Set("alt", alt)
38583	c.urlParams_.Set("prettyPrint", "false")
38584	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/environments")
38585	urls += "?" + c.urlParams_.Encode()
38586	req, err := http.NewRequest("GET", urls, body)
38587	if err != nil {
38588		return nil, err
38589	}
38590	req.Header = reqHeaders
38591	googleapi.Expand(req.URL, map[string]string{
38592		"parent": c.parent,
38593	})
38594	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38595}
38596
38597// Do executes the "dialogflow.projects.locations.agent.environments.list" call.
38598// Exactly one of *GoogleCloudDialogflowV2ListEnvironmentsResponse or
38599// error will be non-nil. Any non-2xx status code is an error. Response
38600// headers are in either
38601// *GoogleCloudDialogflowV2ListEnvironmentsResponse.ServerResponse.Header
38602//  or (if a response was returned at all) in
38603// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
38604// whether the returned error was because http.StatusNotModified was
38605// returned.
38606func (c *ProjectsLocationsAgentEnvironmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListEnvironmentsResponse, error) {
38607	gensupport.SetOptions(c.urlParams_, opts...)
38608	res, err := c.doRequest("json")
38609	if res != nil && res.StatusCode == http.StatusNotModified {
38610		if res.Body != nil {
38611			res.Body.Close()
38612		}
38613		return nil, &googleapi.Error{
38614			Code:   res.StatusCode,
38615			Header: res.Header,
38616		}
38617	}
38618	if err != nil {
38619		return nil, err
38620	}
38621	defer googleapi.CloseBody(res)
38622	if err := googleapi.CheckResponse(res); err != nil {
38623		return nil, err
38624	}
38625	ret := &GoogleCloudDialogflowV2ListEnvironmentsResponse{
38626		ServerResponse: googleapi.ServerResponse{
38627			Header:         res.Header,
38628			HTTPStatusCode: res.StatusCode,
38629		},
38630	}
38631	target := &ret
38632	if err := gensupport.DecodeResponse(target, res); err != nil {
38633		return nil, err
38634	}
38635	return ret, nil
38636	// {
38637	//   "description": "Returns the list of all non-draft environments of the specified agent.",
38638	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments",
38639	//   "httpMethod": "GET",
38640	//   "id": "dialogflow.projects.locations.agent.environments.list",
38641	//   "parameterOrder": [
38642	//     "parent"
38643	//   ],
38644	//   "parameters": {
38645	//     "pageSize": {
38646	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
38647	//       "format": "int32",
38648	//       "location": "query",
38649	//       "type": "integer"
38650	//     },
38651	//     "pageToken": {
38652	//       "description": "Optional. The next_page_token value returned from a previous list request.",
38653	//       "location": "query",
38654	//       "type": "string"
38655	//     },
38656	//     "parent": {
38657	//       "description": "Required. The agent to list all environments from. Format: - `projects//agent` - `projects//locations//agent`",
38658	//       "location": "path",
38659	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
38660	//       "required": true,
38661	//       "type": "string"
38662	//     }
38663	//   },
38664	//   "path": "v2/{+parent}/environments",
38665	//   "response": {
38666	//     "$ref": "GoogleCloudDialogflowV2ListEnvironmentsResponse"
38667	//   },
38668	//   "scopes": [
38669	//     "https://www.googleapis.com/auth/cloud-platform",
38670	//     "https://www.googleapis.com/auth/dialogflow"
38671	//   ]
38672	// }
38673
38674}
38675
38676// Pages invokes f for each page of results.
38677// A non-nil error returned from f will halt the iteration.
38678// The provided context supersedes any context provided to the Context method.
38679func (c *ProjectsLocationsAgentEnvironmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListEnvironmentsResponse) error) error {
38680	c.ctx_ = ctx
38681	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38682	for {
38683		x, err := c.Do()
38684		if err != nil {
38685			return err
38686		}
38687		if err := f(x); err != nil {
38688			return err
38689		}
38690		if x.NextPageToken == "" {
38691			return nil
38692		}
38693		c.PageToken(x.NextPageToken)
38694	}
38695}
38696
38697// method id "dialogflow.projects.locations.agent.environments.patch":
38698
38699type ProjectsLocationsAgentEnvironmentsPatchCall struct {
38700	s                                  *Service
38701	nameid                             string
38702	googleclouddialogflowv2environment *GoogleCloudDialogflowV2Environment
38703	urlParams_                         gensupport.URLParams
38704	ctx_                               context.Context
38705	header_                            http.Header
38706}
38707
38708// Patch: Updates the specified agent environment. This method allows
38709// you to deploy new agent versions into the environment. When an
38710// environment is pointed to a new agent version by setting
38711// `environment.agent_version`, the environment is temporarily set to
38712// the `LOADING` state. During that time, the environment keeps on
38713// serving the previous version of the agent. After the new agent
38714// version is done loading, the environment is set back to the `RUNNING`
38715// state. You can use "-" as Environment ID in environment name to
38716// update version in "draft" environment. WARNING: this will negate all
38717// recent changes to draft and can't be undone. You may want to save the
38718// draft to a version before calling this function.
38719//
38720// - name: Output only. The unique identifier of this agent environment.
38721//   Supported formats: - `projects//agent/environments/` -
38722//   `projects//locations//agent/environments/`.
38723func (r *ProjectsLocationsAgentEnvironmentsService) Patch(nameid string, googleclouddialogflowv2environment *GoogleCloudDialogflowV2Environment) *ProjectsLocationsAgentEnvironmentsPatchCall {
38724	c := &ProjectsLocationsAgentEnvironmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38725	c.nameid = nameid
38726	c.googleclouddialogflowv2environment = googleclouddialogflowv2environment
38727	return c
38728}
38729
38730// AllowLoadToDraftAndDiscardChanges sets the optional parameter
38731// "allowLoadToDraftAndDiscardChanges": This field is used to prevent
38732// accidental overwrite of the draft environment, which is an operation
38733// that cannot be undone. To confirm that the caller desires this
38734// overwrite, this field must be explicitly set to true when updating
38735// the draft environment (environment ID = `-`).
38736func (c *ProjectsLocationsAgentEnvironmentsPatchCall) AllowLoadToDraftAndDiscardChanges(allowLoadToDraftAndDiscardChanges bool) *ProjectsLocationsAgentEnvironmentsPatchCall {
38737	c.urlParams_.Set("allowLoadToDraftAndDiscardChanges", fmt.Sprint(allowLoadToDraftAndDiscardChanges))
38738	return c
38739}
38740
38741// UpdateMask sets the optional parameter "updateMask": Required. The
38742// mask to control which fields get updated.
38743func (c *ProjectsLocationsAgentEnvironmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentEnvironmentsPatchCall {
38744	c.urlParams_.Set("updateMask", updateMask)
38745	return c
38746}
38747
38748// Fields allows partial responses to be retrieved. See
38749// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38750// for more information.
38751func (c *ProjectsLocationsAgentEnvironmentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsPatchCall {
38752	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38753	return c
38754}
38755
38756// Context sets the context to be used in this call's Do method. Any
38757// pending HTTP request will be aborted if the provided context is
38758// canceled.
38759func (c *ProjectsLocationsAgentEnvironmentsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsPatchCall {
38760	c.ctx_ = ctx
38761	return c
38762}
38763
38764// Header returns an http.Header that can be modified by the caller to
38765// add HTTP headers to the request.
38766func (c *ProjectsLocationsAgentEnvironmentsPatchCall) Header() http.Header {
38767	if c.header_ == nil {
38768		c.header_ = make(http.Header)
38769	}
38770	return c.header_
38771}
38772
38773func (c *ProjectsLocationsAgentEnvironmentsPatchCall) doRequest(alt string) (*http.Response, error) {
38774	reqHeaders := make(http.Header)
38775	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
38776	for k, v := range c.header_ {
38777		reqHeaders[k] = v
38778	}
38779	reqHeaders.Set("User-Agent", c.s.userAgent())
38780	var body io.Reader = nil
38781	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2environment)
38782	if err != nil {
38783		return nil, err
38784	}
38785	reqHeaders.Set("Content-Type", "application/json")
38786	c.urlParams_.Set("alt", alt)
38787	c.urlParams_.Set("prettyPrint", "false")
38788	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
38789	urls += "?" + c.urlParams_.Encode()
38790	req, err := http.NewRequest("PATCH", urls, body)
38791	if err != nil {
38792		return nil, err
38793	}
38794	req.Header = reqHeaders
38795	googleapi.Expand(req.URL, map[string]string{
38796		"name": c.nameid,
38797	})
38798	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38799}
38800
38801// Do executes the "dialogflow.projects.locations.agent.environments.patch" call.
38802// Exactly one of *GoogleCloudDialogflowV2Environment or error will be
38803// non-nil. Any non-2xx status code is an error. Response headers are in
38804// either *GoogleCloudDialogflowV2Environment.ServerResponse.Header or
38805// (if a response was returned at all) in
38806// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
38807// whether the returned error was because http.StatusNotModified was
38808// returned.
38809func (c *ProjectsLocationsAgentEnvironmentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Environment, error) {
38810	gensupport.SetOptions(c.urlParams_, opts...)
38811	res, err := c.doRequest("json")
38812	if res != nil && res.StatusCode == http.StatusNotModified {
38813		if res.Body != nil {
38814			res.Body.Close()
38815		}
38816		return nil, &googleapi.Error{
38817			Code:   res.StatusCode,
38818			Header: res.Header,
38819		}
38820	}
38821	if err != nil {
38822		return nil, err
38823	}
38824	defer googleapi.CloseBody(res)
38825	if err := googleapi.CheckResponse(res); err != nil {
38826		return nil, err
38827	}
38828	ret := &GoogleCloudDialogflowV2Environment{
38829		ServerResponse: googleapi.ServerResponse{
38830			Header:         res.Header,
38831			HTTPStatusCode: res.StatusCode,
38832		},
38833	}
38834	target := &ret
38835	if err := gensupport.DecodeResponse(target, res); err != nil {
38836		return nil, err
38837	}
38838	return ret, nil
38839	// {
38840	//   "description": "Updates the specified agent environment. This method allows you to deploy new agent versions into the environment. When an environment is pointed to a new agent version by setting `environment.agent_version`, the environment is temporarily set to the `LOADING` state. During that time, the environment keeps on serving the previous version of the agent. After the new agent version is done loading, the environment is set back to the `RUNNING` state. You can use \"-\" as Environment ID in environment name to update version in \"draft\" environment. WARNING: this will negate all recent changes to draft and can't be undone. You may want to save the draft to a version before calling this function.",
38841	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}",
38842	//   "httpMethod": "PATCH",
38843	//   "id": "dialogflow.projects.locations.agent.environments.patch",
38844	//   "parameterOrder": [
38845	//     "name"
38846	//   ],
38847	//   "parameters": {
38848	//     "allowLoadToDraftAndDiscardChanges": {
38849	//       "description": "Optional. This field is used to prevent accidental overwrite of the draft environment, which is an operation that cannot be undone. To confirm that the caller desires this overwrite, this field must be explicitly set to true when updating the draft environment (environment ID = `-`).",
38850	//       "location": "query",
38851	//       "type": "boolean"
38852	//     },
38853	//     "name": {
38854	//       "description": "Output only. The unique identifier of this agent environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`",
38855	//       "location": "path",
38856	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+$",
38857	//       "required": true,
38858	//       "type": "string"
38859	//     },
38860	//     "updateMask": {
38861	//       "description": "Required. The mask to control which fields get updated.",
38862	//       "format": "google-fieldmask",
38863	//       "location": "query",
38864	//       "type": "string"
38865	//     }
38866	//   },
38867	//   "path": "v2/{+name}",
38868	//   "request": {
38869	//     "$ref": "GoogleCloudDialogflowV2Environment"
38870	//   },
38871	//   "response": {
38872	//     "$ref": "GoogleCloudDialogflowV2Environment"
38873	//   },
38874	//   "scopes": [
38875	//     "https://www.googleapis.com/auth/cloud-platform",
38876	//     "https://www.googleapis.com/auth/dialogflow"
38877	//   ]
38878	// }
38879
38880}
38881
38882// method id "dialogflow.projects.locations.agent.environments.intents.list":
38883
38884type ProjectsLocationsAgentEnvironmentsIntentsListCall struct {
38885	s            *Service
38886	parent       string
38887	urlParams_   gensupport.URLParams
38888	ifNoneMatch_ string
38889	ctx_         context.Context
38890	header_      http.Header
38891}
38892
38893// List: Returns the list of all intents in the specified agent.
38894//
38895// - parent: The agent to list all intents from. Format:
38896//   `projects//agent` or `projects//locations//agent`. Alternatively,
38897//   you can specify the environment to list intents for. Format:
38898//   `projects//agent/environments/` or
38899//   `projects//locations//agent/environments/`. Note: training phrases
38900//   of the intents will not be returned for non-draft environment.
38901func (r *ProjectsLocationsAgentEnvironmentsIntentsService) List(parent string) *ProjectsLocationsAgentEnvironmentsIntentsListCall {
38902	c := &ProjectsLocationsAgentEnvironmentsIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38903	c.parent = parent
38904	return c
38905}
38906
38907// IntentView sets the optional parameter "intentView": The resource
38908// view to apply to the returned intent.
38909//
38910// Possible values:
38911//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
38912// in the response.
38913//   "INTENT_VIEW_FULL" - All fields are populated.
38914func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) IntentView(intentView string) *ProjectsLocationsAgentEnvironmentsIntentsListCall {
38915	c.urlParams_.Set("intentView", intentView)
38916	return c
38917}
38918
38919// LanguageCode sets the optional parameter "languageCode": The language
38920// used to access language-specific data. If not specified, the agent's
38921// default language is used. For more information, see Multilingual
38922// intent and entity data
38923// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
38924func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEnvironmentsIntentsListCall {
38925	c.urlParams_.Set("languageCode", languageCode)
38926	return c
38927}
38928
38929// PageSize sets the optional parameter "pageSize": The maximum number
38930// of items to return in a single page. By default 100 and at most 1000.
38931func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEnvironmentsIntentsListCall {
38932	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
38933	return c
38934}
38935
38936// PageToken sets the optional parameter "pageToken": The
38937// next_page_token value returned from a previous list request.
38938func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) PageToken(pageToken string) *ProjectsLocationsAgentEnvironmentsIntentsListCall {
38939	c.urlParams_.Set("pageToken", pageToken)
38940	return c
38941}
38942
38943// Fields allows partial responses to be retrieved. See
38944// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38945// for more information.
38946func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsIntentsListCall {
38947	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38948	return c
38949}
38950
38951// IfNoneMatch sets the optional parameter which makes the operation
38952// fail if the object's ETag matches the given value. This is useful for
38953// getting updates only after the object has changed since the last
38954// request. Use googleapi.IsNotModified to check whether the response
38955// error from Do is the result of In-None-Match.
38956func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsIntentsListCall {
38957	c.ifNoneMatch_ = entityTag
38958	return c
38959}
38960
38961// Context sets the context to be used in this call's Do method. Any
38962// pending HTTP request will be aborted if the provided context is
38963// canceled.
38964func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsIntentsListCall {
38965	c.ctx_ = ctx
38966	return c
38967}
38968
38969// Header returns an http.Header that can be modified by the caller to
38970// add HTTP headers to the request.
38971func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) Header() http.Header {
38972	if c.header_ == nil {
38973		c.header_ = make(http.Header)
38974	}
38975	return c.header_
38976}
38977
38978func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) doRequest(alt string) (*http.Response, error) {
38979	reqHeaders := make(http.Header)
38980	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
38981	for k, v := range c.header_ {
38982		reqHeaders[k] = v
38983	}
38984	reqHeaders.Set("User-Agent", c.s.userAgent())
38985	if c.ifNoneMatch_ != "" {
38986		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38987	}
38988	var body io.Reader = nil
38989	c.urlParams_.Set("alt", alt)
38990	c.urlParams_.Set("prettyPrint", "false")
38991	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents")
38992	urls += "?" + c.urlParams_.Encode()
38993	req, err := http.NewRequest("GET", urls, body)
38994	if err != nil {
38995		return nil, err
38996	}
38997	req.Header = reqHeaders
38998	googleapi.Expand(req.URL, map[string]string{
38999		"parent": c.parent,
39000	})
39001	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39002}
39003
39004// Do executes the "dialogflow.projects.locations.agent.environments.intents.list" call.
39005// Exactly one of *GoogleCloudDialogflowV2ListIntentsResponse or error
39006// will be non-nil. Any non-2xx status code is an error. Response
39007// headers are in either
39008// *GoogleCloudDialogflowV2ListIntentsResponse.ServerResponse.Header or
39009// (if a response was returned at all) in
39010// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
39011// whether the returned error was because http.StatusNotModified was
39012// returned.
39013func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListIntentsResponse, error) {
39014	gensupport.SetOptions(c.urlParams_, opts...)
39015	res, err := c.doRequest("json")
39016	if res != nil && res.StatusCode == http.StatusNotModified {
39017		if res.Body != nil {
39018			res.Body.Close()
39019		}
39020		return nil, &googleapi.Error{
39021			Code:   res.StatusCode,
39022			Header: res.Header,
39023		}
39024	}
39025	if err != nil {
39026		return nil, err
39027	}
39028	defer googleapi.CloseBody(res)
39029	if err := googleapi.CheckResponse(res); err != nil {
39030		return nil, err
39031	}
39032	ret := &GoogleCloudDialogflowV2ListIntentsResponse{
39033		ServerResponse: googleapi.ServerResponse{
39034			Header:         res.Header,
39035			HTTPStatusCode: res.StatusCode,
39036		},
39037	}
39038	target := &ret
39039	if err := gensupport.DecodeResponse(target, res); err != nil {
39040		return nil, err
39041	}
39042	return ret, nil
39043	// {
39044	//   "description": "Returns the list of all intents in the specified agent.",
39045	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/intents",
39046	//   "httpMethod": "GET",
39047	//   "id": "dialogflow.projects.locations.agent.environments.intents.list",
39048	//   "parameterOrder": [
39049	//     "parent"
39050	//   ],
39051	//   "parameters": {
39052	//     "intentView": {
39053	//       "description": "Optional. The resource view to apply to the returned intent.",
39054	//       "enum": [
39055	//         "INTENT_VIEW_UNSPECIFIED",
39056	//         "INTENT_VIEW_FULL"
39057	//       ],
39058	//       "enumDescriptions": [
39059	//         "Training phrases field is not populated in the response.",
39060	//         "All fields are populated."
39061	//       ],
39062	//       "location": "query",
39063	//       "type": "string"
39064	//     },
39065	//     "languageCode": {
39066	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
39067	//       "location": "query",
39068	//       "type": "string"
39069	//     },
39070	//     "pageSize": {
39071	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
39072	//       "format": "int32",
39073	//       "location": "query",
39074	//       "type": "integer"
39075	//     },
39076	//     "pageToken": {
39077	//       "description": "Optional. The next_page_token value returned from a previous list request.",
39078	//       "location": "query",
39079	//       "type": "string"
39080	//     },
39081	//     "parent": {
39082	//       "description": "Required. The agent to list all intents from. Format: `projects//agent` or `projects//locations//agent`. Alternatively, you can specify the environment to list intents for. Format: `projects//agent/environments/` or `projects//locations//agent/environments/`. Note: training phrases of the intents will not be returned for non-draft environment.",
39083	//       "location": "path",
39084	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+$",
39085	//       "required": true,
39086	//       "type": "string"
39087	//     }
39088	//   },
39089	//   "path": "v2/{+parent}/intents",
39090	//   "response": {
39091	//     "$ref": "GoogleCloudDialogflowV2ListIntentsResponse"
39092	//   },
39093	//   "scopes": [
39094	//     "https://www.googleapis.com/auth/cloud-platform",
39095	//     "https://www.googleapis.com/auth/dialogflow"
39096	//   ]
39097	// }
39098
39099}
39100
39101// Pages invokes f for each page of results.
39102// A non-nil error returned from f will halt the iteration.
39103// The provided context supersedes any context provided to the Context method.
39104func (c *ProjectsLocationsAgentEnvironmentsIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListIntentsResponse) error) error {
39105	c.ctx_ = ctx
39106	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39107	for {
39108		x, err := c.Do()
39109		if err != nil {
39110			return err
39111		}
39112		if err := f(x); err != nil {
39113			return err
39114		}
39115		if x.NextPageToken == "" {
39116			return nil
39117		}
39118		c.PageToken(x.NextPageToken)
39119	}
39120}
39121
39122// method id "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts":
39123
39124type ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall struct {
39125	s          *Service
39126	parent     string
39127	urlParams_ gensupport.URLParams
39128	ctx_       context.Context
39129	header_    http.Header
39130}
39131
39132// DeleteContexts: Deletes all active contexts in the specified session.
39133//
39134// - parent: The name of the session to delete all contexts from.
39135//   Format: `projects//agent/sessions/` or
39136//   `projects//agent/environments//users//sessions/`. If `Environment
39137//   ID` is not specified we assume default 'draft' environment. If
39138//   `User ID` is not specified, we assume default '-' user.
39139func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsService) DeleteContexts(parent string) *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall {
39140	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39141	c.parent = parent
39142	return c
39143}
39144
39145// Fields allows partial responses to be retrieved. See
39146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39147// for more information.
39148func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall {
39149	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39150	return c
39151}
39152
39153// Context sets the context to be used in this call's Do method. Any
39154// pending HTTP request will be aborted if the provided context is
39155// canceled.
39156func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall {
39157	c.ctx_ = ctx
39158	return c
39159}
39160
39161// Header returns an http.Header that can be modified by the caller to
39162// add HTTP headers to the request.
39163func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Header() http.Header {
39164	if c.header_ == nil {
39165		c.header_ = make(http.Header)
39166	}
39167	return c.header_
39168}
39169
39170func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
39171	reqHeaders := make(http.Header)
39172	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
39173	for k, v := range c.header_ {
39174		reqHeaders[k] = v
39175	}
39176	reqHeaders.Set("User-Agent", c.s.userAgent())
39177	var body io.Reader = nil
39178	c.urlParams_.Set("alt", alt)
39179	c.urlParams_.Set("prettyPrint", "false")
39180	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
39181	urls += "?" + c.urlParams_.Encode()
39182	req, err := http.NewRequest("DELETE", urls, body)
39183	if err != nil {
39184		return nil, err
39185	}
39186	req.Header = reqHeaders
39187	googleapi.Expand(req.URL, map[string]string{
39188		"parent": c.parent,
39189	})
39190	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39191}
39192
39193// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts" call.
39194// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
39195// non-2xx status code is an error. Response headers are in either
39196// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
39197// returned at all) in error.(*googleapi.Error).Header. Use
39198// googleapi.IsNotModified to check whether the returned error was
39199// because http.StatusNotModified was returned.
39200func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
39201	gensupport.SetOptions(c.urlParams_, opts...)
39202	res, err := c.doRequest("json")
39203	if res != nil && res.StatusCode == http.StatusNotModified {
39204		if res.Body != nil {
39205			res.Body.Close()
39206		}
39207		return nil, &googleapi.Error{
39208			Code:   res.StatusCode,
39209			Header: res.Header,
39210		}
39211	}
39212	if err != nil {
39213		return nil, err
39214	}
39215	defer googleapi.CloseBody(res)
39216	if err := googleapi.CheckResponse(res); err != nil {
39217		return nil, err
39218	}
39219	ret := &GoogleProtobufEmpty{
39220		ServerResponse: googleapi.ServerResponse{
39221			Header:         res.Header,
39222			HTTPStatusCode: res.StatusCode,
39223		},
39224	}
39225	target := &ret
39226	if err := gensupport.DecodeResponse(target, res); err != nil {
39227		return nil, err
39228	}
39229	return ret, nil
39230	// {
39231	//   "description": "Deletes all active contexts in the specified session.",
39232	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
39233	//   "httpMethod": "DELETE",
39234	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts",
39235	//   "parameterOrder": [
39236	//     "parent"
39237	//   ],
39238	//   "parameters": {
39239	//     "parent": {
39240	//       "description": "Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
39241	//       "location": "path",
39242	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
39243	//       "required": true,
39244	//       "type": "string"
39245	//     }
39246	//   },
39247	//   "path": "v2/{+parent}/contexts",
39248	//   "response": {
39249	//     "$ref": "GoogleProtobufEmpty"
39250	//   },
39251	//   "scopes": [
39252	//     "https://www.googleapis.com/auth/cloud-platform",
39253	//     "https://www.googleapis.com/auth/dialogflow"
39254	//   ]
39255	// }
39256
39257}
39258
39259// method id "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent":
39260
39261type ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall struct {
39262	s                                          *Service
39263	sessionid                                  string
39264	googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest
39265	urlParams_                                 gensupport.URLParams
39266	ctx_                                       context.Context
39267	header_                                    http.Header
39268}
39269
39270// DetectIntent: Processes a natural language query and returns
39271// structured, actionable data as a result. This method is not
39272// idempotent, because it may cause contexts and session entity types to
39273// be updated, which in turn might affect results of future queries.
39274// Note: Always use agent versions for production traffic. See Versions
39275// and environments
39276// (https://cloud.google.com/dialogflow/es/docs/agents-versions).
39277//
39278// - session: The name of the session this query is sent to. Format:
39279//   `projects//agent/sessions/`, or
39280//   `projects//agent/environments//users//sessions/`. If `Environment
39281//   ID` is not specified, we assume default 'draft' environment
39282//   (`Environment ID` might be referred to as environment name at some
39283//   places). If `User ID` is not specified, we are using "-". It's up
39284//   to the API caller to choose an appropriate `Session ID` and `User
39285//   Id`. They can be a random number or some type of user and session
39286//   identifiers (preferably hashed). The length of the `Session ID` and
39287//   `User ID` must not exceed 36 characters. For more information, see
39288//   the API interactions guide
39289//   (https://cloud.google.com/dialogflow/docs/api-overview). Note:
39290//   Always use agent versions for production traffic. See Versions and
39291//   environments
39292//   (https://cloud.google.com/dialogflow/es/docs/agents-versions).
39293func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest) *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall {
39294	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39295	c.sessionid = sessionid
39296	c.googleclouddialogflowv2detectintentrequest = googleclouddialogflowv2detectintentrequest
39297	return c
39298}
39299
39300// Fields allows partial responses to be retrieved. See
39301// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39302// for more information.
39303func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall {
39304	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39305	return c
39306}
39307
39308// Context sets the context to be used in this call's Do method. Any
39309// pending HTTP request will be aborted if the provided context is
39310// canceled.
39311func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall {
39312	c.ctx_ = ctx
39313	return c
39314}
39315
39316// Header returns an http.Header that can be modified by the caller to
39317// add HTTP headers to the request.
39318func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Header() http.Header {
39319	if c.header_ == nil {
39320		c.header_ = make(http.Header)
39321	}
39322	return c.header_
39323}
39324
39325func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
39326	reqHeaders := make(http.Header)
39327	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
39328	for k, v := range c.header_ {
39329		reqHeaders[k] = v
39330	}
39331	reqHeaders.Set("User-Agent", c.s.userAgent())
39332	var body io.Reader = nil
39333	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2detectintentrequest)
39334	if err != nil {
39335		return nil, err
39336	}
39337	reqHeaders.Set("Content-Type", "application/json")
39338	c.urlParams_.Set("alt", alt)
39339	c.urlParams_.Set("prettyPrint", "false")
39340	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+session}:detectIntent")
39341	urls += "?" + c.urlParams_.Encode()
39342	req, err := http.NewRequest("POST", urls, body)
39343	if err != nil {
39344		return nil, err
39345	}
39346	req.Header = reqHeaders
39347	googleapi.Expand(req.URL, map[string]string{
39348		"session": c.sessionid,
39349	})
39350	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39351}
39352
39353// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent" call.
39354// Exactly one of *GoogleCloudDialogflowV2DetectIntentResponse or error
39355// will be non-nil. Any non-2xx status code is an error. Response
39356// headers are in either
39357// *GoogleCloudDialogflowV2DetectIntentResponse.ServerResponse.Header or
39358// (if a response was returned at all) in
39359// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
39360// whether the returned error was because http.StatusNotModified was
39361// returned.
39362func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2DetectIntentResponse, error) {
39363	gensupport.SetOptions(c.urlParams_, opts...)
39364	res, err := c.doRequest("json")
39365	if res != nil && res.StatusCode == http.StatusNotModified {
39366		if res.Body != nil {
39367			res.Body.Close()
39368		}
39369		return nil, &googleapi.Error{
39370			Code:   res.StatusCode,
39371			Header: res.Header,
39372		}
39373	}
39374	if err != nil {
39375		return nil, err
39376	}
39377	defer googleapi.CloseBody(res)
39378	if err := googleapi.CheckResponse(res); err != nil {
39379		return nil, err
39380	}
39381	ret := &GoogleCloudDialogflowV2DetectIntentResponse{
39382		ServerResponse: googleapi.ServerResponse{
39383			Header:         res.Header,
39384			HTTPStatusCode: res.StatusCode,
39385		},
39386	}
39387	target := &ret
39388	if err := gensupport.DecodeResponse(target, res); err != nil {
39389		return nil, err
39390	}
39391	return ret, nil
39392	// {
39393	//   "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).",
39394	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent",
39395	//   "httpMethod": "POST",
39396	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent",
39397	//   "parameterOrder": [
39398	//     "session"
39399	//   ],
39400	//   "parameters": {
39401	//     "session": {
39402	//       "description": "Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).",
39403	//       "location": "path",
39404	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
39405	//       "required": true,
39406	//       "type": "string"
39407	//     }
39408	//   },
39409	//   "path": "v2/{+session}:detectIntent",
39410	//   "request": {
39411	//     "$ref": "GoogleCloudDialogflowV2DetectIntentRequest"
39412	//   },
39413	//   "response": {
39414	//     "$ref": "GoogleCloudDialogflowV2DetectIntentResponse"
39415	//   },
39416	//   "scopes": [
39417	//     "https://www.googleapis.com/auth/cloud-platform",
39418	//     "https://www.googleapis.com/auth/dialogflow"
39419	//   ]
39420	// }
39421
39422}
39423
39424// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create":
39425
39426type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall struct {
39427	s                              *Service
39428	parent                         string
39429	googleclouddialogflowv2context *GoogleCloudDialogflowV2Context
39430	urlParams_                     gensupport.URLParams
39431	ctx_                           context.Context
39432	header_                        http.Header
39433}
39434
39435// Create: Creates a context. If the specified context already exists,
39436// overrides the context.
39437//
39438// - parent: The session to create a context for. Format:
39439//   `projects//agent/sessions/` or
39440//   `projects//agent/environments//users//sessions/`. If `Environment
39441//   ID` is not specified, we assume default 'draft' environment. If
39442//   `User ID` is not specified, we assume default '-' user.
39443func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Create(parent string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall {
39444	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39445	c.parent = parent
39446	c.googleclouddialogflowv2context = googleclouddialogflowv2context
39447	return c
39448}
39449
39450// Fields allows partial responses to be retrieved. See
39451// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39452// for more information.
39453func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall {
39454	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39455	return c
39456}
39457
39458// Context sets the context to be used in this call's Do method. Any
39459// pending HTTP request will be aborted if the provided context is
39460// canceled.
39461func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall {
39462	c.ctx_ = ctx
39463	return c
39464}
39465
39466// Header returns an http.Header that can be modified by the caller to
39467// add HTTP headers to the request.
39468func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Header() http.Header {
39469	if c.header_ == nil {
39470		c.header_ = make(http.Header)
39471	}
39472	return c.header_
39473}
39474
39475func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
39476	reqHeaders := make(http.Header)
39477	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
39478	for k, v := range c.header_ {
39479		reqHeaders[k] = v
39480	}
39481	reqHeaders.Set("User-Agent", c.s.userAgent())
39482	var body io.Reader = nil
39483	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context)
39484	if err != nil {
39485		return nil, err
39486	}
39487	reqHeaders.Set("Content-Type", "application/json")
39488	c.urlParams_.Set("alt", alt)
39489	c.urlParams_.Set("prettyPrint", "false")
39490	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
39491	urls += "?" + c.urlParams_.Encode()
39492	req, err := http.NewRequest("POST", urls, body)
39493	if err != nil {
39494		return nil, err
39495	}
39496	req.Header = reqHeaders
39497	googleapi.Expand(req.URL, map[string]string{
39498		"parent": c.parent,
39499	})
39500	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39501}
39502
39503// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create" call.
39504// Exactly one of *GoogleCloudDialogflowV2Context or error will be
39505// non-nil. Any non-2xx status code is an error. Response headers are in
39506// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
39507// response was returned at all) in error.(*googleapi.Error).Header. Use
39508// googleapi.IsNotModified to check whether the returned error was
39509// because http.StatusNotModified was returned.
39510func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
39511	gensupport.SetOptions(c.urlParams_, opts...)
39512	res, err := c.doRequest("json")
39513	if res != nil && res.StatusCode == http.StatusNotModified {
39514		if res.Body != nil {
39515			res.Body.Close()
39516		}
39517		return nil, &googleapi.Error{
39518			Code:   res.StatusCode,
39519			Header: res.Header,
39520		}
39521	}
39522	if err != nil {
39523		return nil, err
39524	}
39525	defer googleapi.CloseBody(res)
39526	if err := googleapi.CheckResponse(res); err != nil {
39527		return nil, err
39528	}
39529	ret := &GoogleCloudDialogflowV2Context{
39530		ServerResponse: googleapi.ServerResponse{
39531			Header:         res.Header,
39532			HTTPStatusCode: res.StatusCode,
39533		},
39534	}
39535	target := &ret
39536	if err := gensupport.DecodeResponse(target, res); err != nil {
39537		return nil, err
39538	}
39539	return ret, nil
39540	// {
39541	//   "description": "Creates a context. If the specified context already exists, overrides the context.",
39542	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
39543	//   "httpMethod": "POST",
39544	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create",
39545	//   "parameterOrder": [
39546	//     "parent"
39547	//   ],
39548	//   "parameters": {
39549	//     "parent": {
39550	//       "description": "Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
39551	//       "location": "path",
39552	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
39553	//       "required": true,
39554	//       "type": "string"
39555	//     }
39556	//   },
39557	//   "path": "v2/{+parent}/contexts",
39558	//   "request": {
39559	//     "$ref": "GoogleCloudDialogflowV2Context"
39560	//   },
39561	//   "response": {
39562	//     "$ref": "GoogleCloudDialogflowV2Context"
39563	//   },
39564	//   "scopes": [
39565	//     "https://www.googleapis.com/auth/cloud-platform",
39566	//     "https://www.googleapis.com/auth/dialogflow"
39567	//   ]
39568	// }
39569
39570}
39571
39572// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete":
39573
39574type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall struct {
39575	s          *Service
39576	name       string
39577	urlParams_ gensupport.URLParams
39578	ctx_       context.Context
39579	header_    http.Header
39580}
39581
39582// Delete: Deletes the specified context.
39583//
39584// - name: The name of the context to delete. Format:
39585//   `projects//agent/sessions//contexts/` or
39586//   `projects//agent/environments//users//sessions//contexts/`. If
39587//   `Environment ID` is not specified, we assume default 'draft'
39588//   environment. If `User ID` is not specified, we assume default '-'
39589//   user.
39590func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Delete(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall {
39591	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39592	c.name = name
39593	return c
39594}
39595
39596// Fields allows partial responses to be retrieved. See
39597// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39598// for more information.
39599func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall {
39600	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39601	return c
39602}
39603
39604// Context sets the context to be used in this call's Do method. Any
39605// pending HTTP request will be aborted if the provided context is
39606// canceled.
39607func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall {
39608	c.ctx_ = ctx
39609	return c
39610}
39611
39612// Header returns an http.Header that can be modified by the caller to
39613// add HTTP headers to the request.
39614func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Header() http.Header {
39615	if c.header_ == nil {
39616		c.header_ = make(http.Header)
39617	}
39618	return c.header_
39619}
39620
39621func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
39622	reqHeaders := make(http.Header)
39623	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
39624	for k, v := range c.header_ {
39625		reqHeaders[k] = v
39626	}
39627	reqHeaders.Set("User-Agent", c.s.userAgent())
39628	var body io.Reader = nil
39629	c.urlParams_.Set("alt", alt)
39630	c.urlParams_.Set("prettyPrint", "false")
39631	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
39632	urls += "?" + c.urlParams_.Encode()
39633	req, err := http.NewRequest("DELETE", urls, body)
39634	if err != nil {
39635		return nil, err
39636	}
39637	req.Header = reqHeaders
39638	googleapi.Expand(req.URL, map[string]string{
39639		"name": c.name,
39640	})
39641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39642}
39643
39644// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete" call.
39645// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
39646// non-2xx status code is an error. Response headers are in either
39647// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
39648// returned at all) in error.(*googleapi.Error).Header. Use
39649// googleapi.IsNotModified to check whether the returned error was
39650// because http.StatusNotModified was returned.
39651func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
39652	gensupport.SetOptions(c.urlParams_, opts...)
39653	res, err := c.doRequest("json")
39654	if res != nil && res.StatusCode == http.StatusNotModified {
39655		if res.Body != nil {
39656			res.Body.Close()
39657		}
39658		return nil, &googleapi.Error{
39659			Code:   res.StatusCode,
39660			Header: res.Header,
39661		}
39662	}
39663	if err != nil {
39664		return nil, err
39665	}
39666	defer googleapi.CloseBody(res)
39667	if err := googleapi.CheckResponse(res); err != nil {
39668		return nil, err
39669	}
39670	ret := &GoogleProtobufEmpty{
39671		ServerResponse: googleapi.ServerResponse{
39672			Header:         res.Header,
39673			HTTPStatusCode: res.StatusCode,
39674		},
39675	}
39676	target := &ret
39677	if err := gensupport.DecodeResponse(target, res); err != nil {
39678		return nil, err
39679	}
39680	return ret, nil
39681	// {
39682	//   "description": "Deletes the specified context.",
39683	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
39684	//   "httpMethod": "DELETE",
39685	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete",
39686	//   "parameterOrder": [
39687	//     "name"
39688	//   ],
39689	//   "parameters": {
39690	//     "name": {
39691	//       "description": "Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
39692	//       "location": "path",
39693	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
39694	//       "required": true,
39695	//       "type": "string"
39696	//     }
39697	//   },
39698	//   "path": "v2/{+name}",
39699	//   "response": {
39700	//     "$ref": "GoogleProtobufEmpty"
39701	//   },
39702	//   "scopes": [
39703	//     "https://www.googleapis.com/auth/cloud-platform",
39704	//     "https://www.googleapis.com/auth/dialogflow"
39705	//   ]
39706	// }
39707
39708}
39709
39710// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get":
39711
39712type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall struct {
39713	s            *Service
39714	name         string
39715	urlParams_   gensupport.URLParams
39716	ifNoneMatch_ string
39717	ctx_         context.Context
39718	header_      http.Header
39719}
39720
39721// Get: Retrieves the specified context.
39722//
39723// - name: The name of the context. Format:
39724//   `projects//agent/sessions//contexts/` or
39725//   `projects//agent/environments//users//sessions//contexts/`. If
39726//   `Environment ID` is not specified, we assume default 'draft'
39727//   environment. If `User ID` is not specified, we assume default '-'
39728//   user.
39729func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Get(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
39730	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39731	c.name = name
39732	return c
39733}
39734
39735// Fields allows partial responses to be retrieved. See
39736// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39737// for more information.
39738func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
39739	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39740	return c
39741}
39742
39743// IfNoneMatch sets the optional parameter which makes the operation
39744// fail if the object's ETag matches the given value. This is useful for
39745// getting updates only after the object has changed since the last
39746// request. Use googleapi.IsNotModified to check whether the response
39747// error from Do is the result of In-None-Match.
39748func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
39749	c.ifNoneMatch_ = entityTag
39750	return c
39751}
39752
39753// Context sets the context to be used in this call's Do method. Any
39754// pending HTTP request will be aborted if the provided context is
39755// canceled.
39756func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
39757	c.ctx_ = ctx
39758	return c
39759}
39760
39761// Header returns an http.Header that can be modified by the caller to
39762// add HTTP headers to the request.
39763func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Header() http.Header {
39764	if c.header_ == nil {
39765		c.header_ = make(http.Header)
39766	}
39767	return c.header_
39768}
39769
39770func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
39771	reqHeaders := make(http.Header)
39772	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
39773	for k, v := range c.header_ {
39774		reqHeaders[k] = v
39775	}
39776	reqHeaders.Set("User-Agent", c.s.userAgent())
39777	if c.ifNoneMatch_ != "" {
39778		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39779	}
39780	var body io.Reader = nil
39781	c.urlParams_.Set("alt", alt)
39782	c.urlParams_.Set("prettyPrint", "false")
39783	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
39784	urls += "?" + c.urlParams_.Encode()
39785	req, err := http.NewRequest("GET", urls, body)
39786	if err != nil {
39787		return nil, err
39788	}
39789	req.Header = reqHeaders
39790	googleapi.Expand(req.URL, map[string]string{
39791		"name": c.name,
39792	})
39793	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39794}
39795
39796// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get" call.
39797// Exactly one of *GoogleCloudDialogflowV2Context or error will be
39798// non-nil. Any non-2xx status code is an error. Response headers are in
39799// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
39800// response was returned at all) in error.(*googleapi.Error).Header. Use
39801// googleapi.IsNotModified to check whether the returned error was
39802// because http.StatusNotModified was returned.
39803func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
39804	gensupport.SetOptions(c.urlParams_, opts...)
39805	res, err := c.doRequest("json")
39806	if res != nil && res.StatusCode == http.StatusNotModified {
39807		if res.Body != nil {
39808			res.Body.Close()
39809		}
39810		return nil, &googleapi.Error{
39811			Code:   res.StatusCode,
39812			Header: res.Header,
39813		}
39814	}
39815	if err != nil {
39816		return nil, err
39817	}
39818	defer googleapi.CloseBody(res)
39819	if err := googleapi.CheckResponse(res); err != nil {
39820		return nil, err
39821	}
39822	ret := &GoogleCloudDialogflowV2Context{
39823		ServerResponse: googleapi.ServerResponse{
39824			Header:         res.Header,
39825			HTTPStatusCode: res.StatusCode,
39826		},
39827	}
39828	target := &ret
39829	if err := gensupport.DecodeResponse(target, res); err != nil {
39830		return nil, err
39831	}
39832	return ret, nil
39833	// {
39834	//   "description": "Retrieves the specified context.",
39835	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
39836	//   "httpMethod": "GET",
39837	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get",
39838	//   "parameterOrder": [
39839	//     "name"
39840	//   ],
39841	//   "parameters": {
39842	//     "name": {
39843	//       "description": "Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
39844	//       "location": "path",
39845	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
39846	//       "required": true,
39847	//       "type": "string"
39848	//     }
39849	//   },
39850	//   "path": "v2/{+name}",
39851	//   "response": {
39852	//     "$ref": "GoogleCloudDialogflowV2Context"
39853	//   },
39854	//   "scopes": [
39855	//     "https://www.googleapis.com/auth/cloud-platform",
39856	//     "https://www.googleapis.com/auth/dialogflow"
39857	//   ]
39858	// }
39859
39860}
39861
39862// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list":
39863
39864type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall struct {
39865	s            *Service
39866	parent       string
39867	urlParams_   gensupport.URLParams
39868	ifNoneMatch_ string
39869	ctx_         context.Context
39870	header_      http.Header
39871}
39872
39873// List: Returns the list of all contexts in the specified session.
39874//
39875// - parent: The session to list all contexts from. Format:
39876//   `projects//agent/sessions/` or
39877//   `projects//agent/environments//users//sessions/`. If `Environment
39878//   ID` is not specified, we assume default 'draft' environment. If
39879//   `User ID` is not specified, we assume default '-' user.
39880func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) List(parent string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
39881	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39882	c.parent = parent
39883	return c
39884}
39885
39886// PageSize sets the optional parameter "pageSize": The maximum number
39887// of items to return in a single page. By default 100 and at most 1000.
39888func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
39889	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
39890	return c
39891}
39892
39893// PageToken sets the optional parameter "pageToken": The
39894// next_page_token value returned from a previous list request.
39895func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) PageToken(pageToken string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
39896	c.urlParams_.Set("pageToken", pageToken)
39897	return c
39898}
39899
39900// Fields allows partial responses to be retrieved. See
39901// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39902// for more information.
39903func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
39904	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39905	return c
39906}
39907
39908// IfNoneMatch sets the optional parameter which makes the operation
39909// fail if the object's ETag matches the given value. This is useful for
39910// getting updates only after the object has changed since the last
39911// request. Use googleapi.IsNotModified to check whether the response
39912// error from Do is the result of In-None-Match.
39913func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
39914	c.ifNoneMatch_ = entityTag
39915	return c
39916}
39917
39918// Context sets the context to be used in this call's Do method. Any
39919// pending HTTP request will be aborted if the provided context is
39920// canceled.
39921func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
39922	c.ctx_ = ctx
39923	return c
39924}
39925
39926// Header returns an http.Header that can be modified by the caller to
39927// add HTTP headers to the request.
39928func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Header() http.Header {
39929	if c.header_ == nil {
39930		c.header_ = make(http.Header)
39931	}
39932	return c.header_
39933}
39934
39935func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
39936	reqHeaders := make(http.Header)
39937	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
39938	for k, v := range c.header_ {
39939		reqHeaders[k] = v
39940	}
39941	reqHeaders.Set("User-Agent", c.s.userAgent())
39942	if c.ifNoneMatch_ != "" {
39943		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39944	}
39945	var body io.Reader = nil
39946	c.urlParams_.Set("alt", alt)
39947	c.urlParams_.Set("prettyPrint", "false")
39948	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
39949	urls += "?" + c.urlParams_.Encode()
39950	req, err := http.NewRequest("GET", urls, body)
39951	if err != nil {
39952		return nil, err
39953	}
39954	req.Header = reqHeaders
39955	googleapi.Expand(req.URL, map[string]string{
39956		"parent": c.parent,
39957	})
39958	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39959}
39960
39961// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list" call.
39962// Exactly one of *GoogleCloudDialogflowV2ListContextsResponse or error
39963// will be non-nil. Any non-2xx status code is an error. Response
39964// headers are in either
39965// *GoogleCloudDialogflowV2ListContextsResponse.ServerResponse.Header or
39966// (if a response was returned at all) in
39967// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
39968// whether the returned error was because http.StatusNotModified was
39969// returned.
39970func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListContextsResponse, error) {
39971	gensupport.SetOptions(c.urlParams_, opts...)
39972	res, err := c.doRequest("json")
39973	if res != nil && res.StatusCode == http.StatusNotModified {
39974		if res.Body != nil {
39975			res.Body.Close()
39976		}
39977		return nil, &googleapi.Error{
39978			Code:   res.StatusCode,
39979			Header: res.Header,
39980		}
39981	}
39982	if err != nil {
39983		return nil, err
39984	}
39985	defer googleapi.CloseBody(res)
39986	if err := googleapi.CheckResponse(res); err != nil {
39987		return nil, err
39988	}
39989	ret := &GoogleCloudDialogflowV2ListContextsResponse{
39990		ServerResponse: googleapi.ServerResponse{
39991			Header:         res.Header,
39992			HTTPStatusCode: res.StatusCode,
39993		},
39994	}
39995	target := &ret
39996	if err := gensupport.DecodeResponse(target, res); err != nil {
39997		return nil, err
39998	}
39999	return ret, nil
40000	// {
40001	//   "description": "Returns the list of all contexts in the specified session.",
40002	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
40003	//   "httpMethod": "GET",
40004	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list",
40005	//   "parameterOrder": [
40006	//     "parent"
40007	//   ],
40008	//   "parameters": {
40009	//     "pageSize": {
40010	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
40011	//       "format": "int32",
40012	//       "location": "query",
40013	//       "type": "integer"
40014	//     },
40015	//     "pageToken": {
40016	//       "description": "Optional. The next_page_token value returned from a previous list request.",
40017	//       "location": "query",
40018	//       "type": "string"
40019	//     },
40020	//     "parent": {
40021	//       "description": "Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
40022	//       "location": "path",
40023	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
40024	//       "required": true,
40025	//       "type": "string"
40026	//     }
40027	//   },
40028	//   "path": "v2/{+parent}/contexts",
40029	//   "response": {
40030	//     "$ref": "GoogleCloudDialogflowV2ListContextsResponse"
40031	//   },
40032	//   "scopes": [
40033	//     "https://www.googleapis.com/auth/cloud-platform",
40034	//     "https://www.googleapis.com/auth/dialogflow"
40035	//   ]
40036	// }
40037
40038}
40039
40040// Pages invokes f for each page of results.
40041// A non-nil error returned from f will halt the iteration.
40042// The provided context supersedes any context provided to the Context method.
40043func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListContextsResponse) error) error {
40044	c.ctx_ = ctx
40045	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
40046	for {
40047		x, err := c.Do()
40048		if err != nil {
40049			return err
40050		}
40051		if err := f(x); err != nil {
40052			return err
40053		}
40054		if x.NextPageToken == "" {
40055			return nil
40056		}
40057		c.PageToken(x.NextPageToken)
40058	}
40059}
40060
40061// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch":
40062
40063type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall struct {
40064	s                              *Service
40065	nameid                         string
40066	googleclouddialogflowv2context *GoogleCloudDialogflowV2Context
40067	urlParams_                     gensupport.URLParams
40068	ctx_                           context.Context
40069	header_                        http.Header
40070}
40071
40072// Patch: Updates the specified context.
40073//
40074// - name: The unique identifier of the context. Format:
40075//   `projects//agent/sessions//contexts/`, or
40076//   `projects//agent/environments//users//sessions//contexts/`. The
40077//   `Context ID` is always converted to lowercase, may only contain
40078//   characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If
40079//   `Environment ID` is not specified, we assume default 'draft'
40080//   environment. If `User ID` is not specified, we assume default '-'
40081//   user. The following context names are reserved for internal use by
40082//   Dialogflow. You should not use these contexts or create contexts
40083//   with these names: * `__system_counters__` * `*_id_dialog_context` *
40084//   `*_dialog_params_size`.
40085func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Patch(nameid string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
40086	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40087	c.nameid = nameid
40088	c.googleclouddialogflowv2context = googleclouddialogflowv2context
40089	return c
40090}
40091
40092// UpdateMask sets the optional parameter "updateMask": The mask to
40093// control which fields get updated.
40094func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
40095	c.urlParams_.Set("updateMask", updateMask)
40096	return c
40097}
40098
40099// Fields allows partial responses to be retrieved. See
40100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40101// for more information.
40102func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
40103	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40104	return c
40105}
40106
40107// Context sets the context to be used in this call's Do method. Any
40108// pending HTTP request will be aborted if the provided context is
40109// canceled.
40110func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
40111	c.ctx_ = ctx
40112	return c
40113}
40114
40115// Header returns an http.Header that can be modified by the caller to
40116// add HTTP headers to the request.
40117func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Header() http.Header {
40118	if c.header_ == nil {
40119		c.header_ = make(http.Header)
40120	}
40121	return c.header_
40122}
40123
40124func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
40125	reqHeaders := make(http.Header)
40126	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
40127	for k, v := range c.header_ {
40128		reqHeaders[k] = v
40129	}
40130	reqHeaders.Set("User-Agent", c.s.userAgent())
40131	var body io.Reader = nil
40132	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context)
40133	if err != nil {
40134		return nil, err
40135	}
40136	reqHeaders.Set("Content-Type", "application/json")
40137	c.urlParams_.Set("alt", alt)
40138	c.urlParams_.Set("prettyPrint", "false")
40139	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
40140	urls += "?" + c.urlParams_.Encode()
40141	req, err := http.NewRequest("PATCH", urls, body)
40142	if err != nil {
40143		return nil, err
40144	}
40145	req.Header = reqHeaders
40146	googleapi.Expand(req.URL, map[string]string{
40147		"name": c.nameid,
40148	})
40149	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40150}
40151
40152// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch" call.
40153// Exactly one of *GoogleCloudDialogflowV2Context or error will be
40154// non-nil. Any non-2xx status code is an error. Response headers are in
40155// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
40156// response was returned at all) in error.(*googleapi.Error).Header. Use
40157// googleapi.IsNotModified to check whether the returned error was
40158// because http.StatusNotModified was returned.
40159func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
40160	gensupport.SetOptions(c.urlParams_, opts...)
40161	res, err := c.doRequest("json")
40162	if res != nil && res.StatusCode == http.StatusNotModified {
40163		if res.Body != nil {
40164			res.Body.Close()
40165		}
40166		return nil, &googleapi.Error{
40167			Code:   res.StatusCode,
40168			Header: res.Header,
40169		}
40170	}
40171	if err != nil {
40172		return nil, err
40173	}
40174	defer googleapi.CloseBody(res)
40175	if err := googleapi.CheckResponse(res); err != nil {
40176		return nil, err
40177	}
40178	ret := &GoogleCloudDialogflowV2Context{
40179		ServerResponse: googleapi.ServerResponse{
40180			Header:         res.Header,
40181			HTTPStatusCode: res.StatusCode,
40182		},
40183	}
40184	target := &ret
40185	if err := gensupport.DecodeResponse(target, res); err != nil {
40186		return nil, err
40187	}
40188	return ret, nil
40189	// {
40190	//   "description": "Updates the specified context.",
40191	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
40192	//   "httpMethod": "PATCH",
40193	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch",
40194	//   "parameterOrder": [
40195	//     "name"
40196	//   ],
40197	//   "parameters": {
40198	//     "name": {
40199	//       "description": "Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`",
40200	//       "location": "path",
40201	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
40202	//       "required": true,
40203	//       "type": "string"
40204	//     },
40205	//     "updateMask": {
40206	//       "description": "Optional. The mask to control which fields get updated.",
40207	//       "format": "google-fieldmask",
40208	//       "location": "query",
40209	//       "type": "string"
40210	//     }
40211	//   },
40212	//   "path": "v2/{+name}",
40213	//   "request": {
40214	//     "$ref": "GoogleCloudDialogflowV2Context"
40215	//   },
40216	//   "response": {
40217	//     "$ref": "GoogleCloudDialogflowV2Context"
40218	//   },
40219	//   "scopes": [
40220	//     "https://www.googleapis.com/auth/cloud-platform",
40221	//     "https://www.googleapis.com/auth/dialogflow"
40222	//   ]
40223	// }
40224
40225}
40226
40227// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create":
40228
40229type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall struct {
40230	s                                        *Service
40231	parent                                   string
40232	googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType
40233	urlParams_                               gensupport.URLParams
40234	ctx_                                     context.Context
40235	header_                                  http.Header
40236}
40237
40238// Create: Creates a session entity type. If the specified session
40239// entity type already exists, overrides the session entity type. This
40240// method doesn't work with Google Assistant integration. Contact
40241// Dialogflow support if you need to use session entities with Google
40242// Assistant integration.
40243//
40244// - parent: The session to create a session entity type for. Format:
40245//   `projects//agent/sessions/` or
40246//   `projects//agent/environments//users// sessions/`. If `Environment
40247//   ID` is not specified, we assume default 'draft' environment. If
40248//   `User ID` is not specified, we assume default '-' user.
40249func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
40250	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40251	c.parent = parent
40252	c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype
40253	return c
40254}
40255
40256// Fields allows partial responses to be retrieved. See
40257// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40258// for more information.
40259func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
40260	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40261	return c
40262}
40263
40264// Context sets the context to be used in this call's Do method. Any
40265// pending HTTP request will be aborted if the provided context is
40266// canceled.
40267func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
40268	c.ctx_ = ctx
40269	return c
40270}
40271
40272// Header returns an http.Header that can be modified by the caller to
40273// add HTTP headers to the request.
40274func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Header() http.Header {
40275	if c.header_ == nil {
40276		c.header_ = make(http.Header)
40277	}
40278	return c.header_
40279}
40280
40281func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
40282	reqHeaders := make(http.Header)
40283	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
40284	for k, v := range c.header_ {
40285		reqHeaders[k] = v
40286	}
40287	reqHeaders.Set("User-Agent", c.s.userAgent())
40288	var body io.Reader = nil
40289	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype)
40290	if err != nil {
40291		return nil, err
40292	}
40293	reqHeaders.Set("Content-Type", "application/json")
40294	c.urlParams_.Set("alt", alt)
40295	c.urlParams_.Set("prettyPrint", "false")
40296	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
40297	urls += "?" + c.urlParams_.Encode()
40298	req, err := http.NewRequest("POST", urls, body)
40299	if err != nil {
40300		return nil, err
40301	}
40302	req.Header = reqHeaders
40303	googleapi.Expand(req.URL, map[string]string{
40304		"parent": c.parent,
40305	})
40306	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40307}
40308
40309// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create" call.
40310// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
40311// will be non-nil. Any non-2xx status code is an error. Response
40312// headers are in either
40313// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
40314// (if a response was returned at all) in
40315// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
40316// whether the returned error was because http.StatusNotModified was
40317// returned.
40318func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
40319	gensupport.SetOptions(c.urlParams_, opts...)
40320	res, err := c.doRequest("json")
40321	if res != nil && res.StatusCode == http.StatusNotModified {
40322		if res.Body != nil {
40323			res.Body.Close()
40324		}
40325		return nil, &googleapi.Error{
40326			Code:   res.StatusCode,
40327			Header: res.Header,
40328		}
40329	}
40330	if err != nil {
40331		return nil, err
40332	}
40333	defer googleapi.CloseBody(res)
40334	if err := googleapi.CheckResponse(res); err != nil {
40335		return nil, err
40336	}
40337	ret := &GoogleCloudDialogflowV2SessionEntityType{
40338		ServerResponse: googleapi.ServerResponse{
40339			Header:         res.Header,
40340			HTTPStatusCode: res.StatusCode,
40341		},
40342	}
40343	target := &ret
40344	if err := gensupport.DecodeResponse(target, res); err != nil {
40345		return nil, err
40346	}
40347	return ret, nil
40348	// {
40349	//   "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
40350	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
40351	//   "httpMethod": "POST",
40352	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create",
40353	//   "parameterOrder": [
40354	//     "parent"
40355	//   ],
40356	//   "parameters": {
40357	//     "parent": {
40358	//       "description": "Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
40359	//       "location": "path",
40360	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
40361	//       "required": true,
40362	//       "type": "string"
40363	//     }
40364	//   },
40365	//   "path": "v2/{+parent}/entityTypes",
40366	//   "request": {
40367	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
40368	//   },
40369	//   "response": {
40370	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
40371	//   },
40372	//   "scopes": [
40373	//     "https://www.googleapis.com/auth/cloud-platform",
40374	//     "https://www.googleapis.com/auth/dialogflow"
40375	//   ]
40376	// }
40377
40378}
40379
40380// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete":
40381
40382type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall struct {
40383	s          *Service
40384	name       string
40385	urlParams_ gensupport.URLParams
40386	ctx_       context.Context
40387	header_    http.Header
40388}
40389
40390// Delete: Deletes the specified session entity type. This method
40391// doesn't work with Google Assistant integration. Contact Dialogflow
40392// support if you need to use session entities with Google Assistant
40393// integration.
40394//
40395// - name: The name of the entity type to delete. Format:
40396//   `projects//agent/sessions//entityTypes/` or
40397//   `projects//agent/environments//users//sessions//entityTypes/`. If
40398//   `Environment ID` is not specified, we assume default 'draft'
40399//   environment. If `User ID` is not specified, we assume default '-'
40400//   user.
40401func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Delete(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
40402	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40403	c.name = name
40404	return c
40405}
40406
40407// Fields allows partial responses to be retrieved. See
40408// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40409// for more information.
40410func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
40411	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40412	return c
40413}
40414
40415// Context sets the context to be used in this call's Do method. Any
40416// pending HTTP request will be aborted if the provided context is
40417// canceled.
40418func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
40419	c.ctx_ = ctx
40420	return c
40421}
40422
40423// Header returns an http.Header that can be modified by the caller to
40424// add HTTP headers to the request.
40425func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Header() http.Header {
40426	if c.header_ == nil {
40427		c.header_ = make(http.Header)
40428	}
40429	return c.header_
40430}
40431
40432func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
40433	reqHeaders := make(http.Header)
40434	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
40435	for k, v := range c.header_ {
40436		reqHeaders[k] = v
40437	}
40438	reqHeaders.Set("User-Agent", c.s.userAgent())
40439	var body io.Reader = nil
40440	c.urlParams_.Set("alt", alt)
40441	c.urlParams_.Set("prettyPrint", "false")
40442	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
40443	urls += "?" + c.urlParams_.Encode()
40444	req, err := http.NewRequest("DELETE", urls, body)
40445	if err != nil {
40446		return nil, err
40447	}
40448	req.Header = reqHeaders
40449	googleapi.Expand(req.URL, map[string]string{
40450		"name": c.name,
40451	})
40452	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40453}
40454
40455// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete" call.
40456// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
40457// non-2xx status code is an error. Response headers are in either
40458// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
40459// returned at all) in error.(*googleapi.Error).Header. Use
40460// googleapi.IsNotModified to check whether the returned error was
40461// because http.StatusNotModified was returned.
40462func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
40463	gensupport.SetOptions(c.urlParams_, opts...)
40464	res, err := c.doRequest("json")
40465	if res != nil && res.StatusCode == http.StatusNotModified {
40466		if res.Body != nil {
40467			res.Body.Close()
40468		}
40469		return nil, &googleapi.Error{
40470			Code:   res.StatusCode,
40471			Header: res.Header,
40472		}
40473	}
40474	if err != nil {
40475		return nil, err
40476	}
40477	defer googleapi.CloseBody(res)
40478	if err := googleapi.CheckResponse(res); err != nil {
40479		return nil, err
40480	}
40481	ret := &GoogleProtobufEmpty{
40482		ServerResponse: googleapi.ServerResponse{
40483			Header:         res.Header,
40484			HTTPStatusCode: res.StatusCode,
40485		},
40486	}
40487	target := &ret
40488	if err := gensupport.DecodeResponse(target, res); err != nil {
40489		return nil, err
40490	}
40491	return ret, nil
40492	// {
40493	//   "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
40494	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
40495	//   "httpMethod": "DELETE",
40496	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete",
40497	//   "parameterOrder": [
40498	//     "name"
40499	//   ],
40500	//   "parameters": {
40501	//     "name": {
40502	//       "description": "Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
40503	//       "location": "path",
40504	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
40505	//       "required": true,
40506	//       "type": "string"
40507	//     }
40508	//   },
40509	//   "path": "v2/{+name}",
40510	//   "response": {
40511	//     "$ref": "GoogleProtobufEmpty"
40512	//   },
40513	//   "scopes": [
40514	//     "https://www.googleapis.com/auth/cloud-platform",
40515	//     "https://www.googleapis.com/auth/dialogflow"
40516	//   ]
40517	// }
40518
40519}
40520
40521// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get":
40522
40523type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall struct {
40524	s            *Service
40525	name         string
40526	urlParams_   gensupport.URLParams
40527	ifNoneMatch_ string
40528	ctx_         context.Context
40529	header_      http.Header
40530}
40531
40532// Get: Retrieves the specified session entity type. This method doesn't
40533// work with Google Assistant integration. Contact Dialogflow support if
40534// you need to use session entities with Google Assistant integration.
40535//
40536// - name: The name of the session entity type. Format:
40537//   `projects//agent/sessions//entityTypes/` or
40538//   `projects//agent/environments//users//sessions//entityTypes/`. If
40539//   `Environment ID` is not specified, we assume default 'draft'
40540//   environment. If `User ID` is not specified, we assume default '-'
40541//   user.
40542func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Get(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
40543	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40544	c.name = name
40545	return c
40546}
40547
40548// Fields allows partial responses to be retrieved. See
40549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40550// for more information.
40551func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
40552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40553	return c
40554}
40555
40556// IfNoneMatch sets the optional parameter which makes the operation
40557// fail if the object's ETag matches the given value. This is useful for
40558// getting updates only after the object has changed since the last
40559// request. Use googleapi.IsNotModified to check whether the response
40560// error from Do is the result of In-None-Match.
40561func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
40562	c.ifNoneMatch_ = entityTag
40563	return c
40564}
40565
40566// Context sets the context to be used in this call's Do method. Any
40567// pending HTTP request will be aborted if the provided context is
40568// canceled.
40569func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
40570	c.ctx_ = ctx
40571	return c
40572}
40573
40574// Header returns an http.Header that can be modified by the caller to
40575// add HTTP headers to the request.
40576func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Header() http.Header {
40577	if c.header_ == nil {
40578		c.header_ = make(http.Header)
40579	}
40580	return c.header_
40581}
40582
40583func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
40584	reqHeaders := make(http.Header)
40585	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
40586	for k, v := range c.header_ {
40587		reqHeaders[k] = v
40588	}
40589	reqHeaders.Set("User-Agent", c.s.userAgent())
40590	if c.ifNoneMatch_ != "" {
40591		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40592	}
40593	var body io.Reader = nil
40594	c.urlParams_.Set("alt", alt)
40595	c.urlParams_.Set("prettyPrint", "false")
40596	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
40597	urls += "?" + c.urlParams_.Encode()
40598	req, err := http.NewRequest("GET", urls, body)
40599	if err != nil {
40600		return nil, err
40601	}
40602	req.Header = reqHeaders
40603	googleapi.Expand(req.URL, map[string]string{
40604		"name": c.name,
40605	})
40606	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40607}
40608
40609// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get" call.
40610// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
40611// will be non-nil. Any non-2xx status code is an error. Response
40612// headers are in either
40613// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
40614// (if a response was returned at all) in
40615// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
40616// whether the returned error was because http.StatusNotModified was
40617// returned.
40618func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
40619	gensupport.SetOptions(c.urlParams_, opts...)
40620	res, err := c.doRequest("json")
40621	if res != nil && res.StatusCode == http.StatusNotModified {
40622		if res.Body != nil {
40623			res.Body.Close()
40624		}
40625		return nil, &googleapi.Error{
40626			Code:   res.StatusCode,
40627			Header: res.Header,
40628		}
40629	}
40630	if err != nil {
40631		return nil, err
40632	}
40633	defer googleapi.CloseBody(res)
40634	if err := googleapi.CheckResponse(res); err != nil {
40635		return nil, err
40636	}
40637	ret := &GoogleCloudDialogflowV2SessionEntityType{
40638		ServerResponse: googleapi.ServerResponse{
40639			Header:         res.Header,
40640			HTTPStatusCode: res.StatusCode,
40641		},
40642	}
40643	target := &ret
40644	if err := gensupport.DecodeResponse(target, res); err != nil {
40645		return nil, err
40646	}
40647	return ret, nil
40648	// {
40649	//   "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
40650	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
40651	//   "httpMethod": "GET",
40652	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get",
40653	//   "parameterOrder": [
40654	//     "name"
40655	//   ],
40656	//   "parameters": {
40657	//     "name": {
40658	//       "description": "Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
40659	//       "location": "path",
40660	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
40661	//       "required": true,
40662	//       "type": "string"
40663	//     }
40664	//   },
40665	//   "path": "v2/{+name}",
40666	//   "response": {
40667	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
40668	//   },
40669	//   "scopes": [
40670	//     "https://www.googleapis.com/auth/cloud-platform",
40671	//     "https://www.googleapis.com/auth/dialogflow"
40672	//   ]
40673	// }
40674
40675}
40676
40677// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list":
40678
40679type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall struct {
40680	s            *Service
40681	parent       string
40682	urlParams_   gensupport.URLParams
40683	ifNoneMatch_ string
40684	ctx_         context.Context
40685	header_      http.Header
40686}
40687
40688// List: Returns the list of all session entity types in the specified
40689// session. This method doesn't work with Google Assistant integration.
40690// Contact Dialogflow support if you need to use session entities with
40691// Google Assistant integration.
40692//
40693// - parent: The session to list all session entity types from. Format:
40694//   `projects//agent/sessions/` or
40695//   `projects//agent/environments//users// sessions/`. If `Environment
40696//   ID` is not specified, we assume default 'draft' environment. If
40697//   `User ID` is not specified, we assume default '-' user.
40698func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) List(parent string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
40699	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40700	c.parent = parent
40701	return c
40702}
40703
40704// PageSize sets the optional parameter "pageSize": The maximum number
40705// of items to return in a single page. By default 100 and at most 1000.
40706func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
40707	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
40708	return c
40709}
40710
40711// PageToken sets the optional parameter "pageToken": The
40712// next_page_token value returned from a previous list request.
40713func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
40714	c.urlParams_.Set("pageToken", pageToken)
40715	return c
40716}
40717
40718// Fields allows partial responses to be retrieved. See
40719// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40720// for more information.
40721func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
40722	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40723	return c
40724}
40725
40726// IfNoneMatch sets the optional parameter which makes the operation
40727// fail if the object's ETag matches the given value. This is useful for
40728// getting updates only after the object has changed since the last
40729// request. Use googleapi.IsNotModified to check whether the response
40730// error from Do is the result of In-None-Match.
40731func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
40732	c.ifNoneMatch_ = entityTag
40733	return c
40734}
40735
40736// Context sets the context to be used in this call's Do method. Any
40737// pending HTTP request will be aborted if the provided context is
40738// canceled.
40739func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
40740	c.ctx_ = ctx
40741	return c
40742}
40743
40744// Header returns an http.Header that can be modified by the caller to
40745// add HTTP headers to the request.
40746func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Header() http.Header {
40747	if c.header_ == nil {
40748		c.header_ = make(http.Header)
40749	}
40750	return c.header_
40751}
40752
40753func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
40754	reqHeaders := make(http.Header)
40755	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
40756	for k, v := range c.header_ {
40757		reqHeaders[k] = v
40758	}
40759	reqHeaders.Set("User-Agent", c.s.userAgent())
40760	if c.ifNoneMatch_ != "" {
40761		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40762	}
40763	var body io.Reader = nil
40764	c.urlParams_.Set("alt", alt)
40765	c.urlParams_.Set("prettyPrint", "false")
40766	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
40767	urls += "?" + c.urlParams_.Encode()
40768	req, err := http.NewRequest("GET", urls, body)
40769	if err != nil {
40770		return nil, err
40771	}
40772	req.Header = reqHeaders
40773	googleapi.Expand(req.URL, map[string]string{
40774		"parent": c.parent,
40775	})
40776	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40777}
40778
40779// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list" call.
40780// Exactly one of *GoogleCloudDialogflowV2ListSessionEntityTypesResponse
40781// or error will be non-nil. Any non-2xx status code is an error.
40782// Response headers are in either
40783// *GoogleCloudDialogflowV2ListSessionEntityTypesResponse.ServerResponse.
40784// Header or (if a response was returned at all) in
40785// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
40786// whether the returned error was because http.StatusNotModified was
40787// returned.
40788func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListSessionEntityTypesResponse, error) {
40789	gensupport.SetOptions(c.urlParams_, opts...)
40790	res, err := c.doRequest("json")
40791	if res != nil && res.StatusCode == http.StatusNotModified {
40792		if res.Body != nil {
40793			res.Body.Close()
40794		}
40795		return nil, &googleapi.Error{
40796			Code:   res.StatusCode,
40797			Header: res.Header,
40798		}
40799	}
40800	if err != nil {
40801		return nil, err
40802	}
40803	defer googleapi.CloseBody(res)
40804	if err := googleapi.CheckResponse(res); err != nil {
40805		return nil, err
40806	}
40807	ret := &GoogleCloudDialogflowV2ListSessionEntityTypesResponse{
40808		ServerResponse: googleapi.ServerResponse{
40809			Header:         res.Header,
40810			HTTPStatusCode: res.StatusCode,
40811		},
40812	}
40813	target := &ret
40814	if err := gensupport.DecodeResponse(target, res); err != nil {
40815		return nil, err
40816	}
40817	return ret, nil
40818	// {
40819	//   "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
40820	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
40821	//   "httpMethod": "GET",
40822	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list",
40823	//   "parameterOrder": [
40824	//     "parent"
40825	//   ],
40826	//   "parameters": {
40827	//     "pageSize": {
40828	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
40829	//       "format": "int32",
40830	//       "location": "query",
40831	//       "type": "integer"
40832	//     },
40833	//     "pageToken": {
40834	//       "description": "Optional. The next_page_token value returned from a previous list request.",
40835	//       "location": "query",
40836	//       "type": "string"
40837	//     },
40838	//     "parent": {
40839	//       "description": "Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
40840	//       "location": "path",
40841	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
40842	//       "required": true,
40843	//       "type": "string"
40844	//     }
40845	//   },
40846	//   "path": "v2/{+parent}/entityTypes",
40847	//   "response": {
40848	//     "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse"
40849	//   },
40850	//   "scopes": [
40851	//     "https://www.googleapis.com/auth/cloud-platform",
40852	//     "https://www.googleapis.com/auth/dialogflow"
40853	//   ]
40854	// }
40855
40856}
40857
40858// Pages invokes f for each page of results.
40859// A non-nil error returned from f will halt the iteration.
40860// The provided context supersedes any context provided to the Context method.
40861func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListSessionEntityTypesResponse) error) error {
40862	c.ctx_ = ctx
40863	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
40864	for {
40865		x, err := c.Do()
40866		if err != nil {
40867			return err
40868		}
40869		if err := f(x); err != nil {
40870			return err
40871		}
40872		if x.NextPageToken == "" {
40873			return nil
40874		}
40875		c.PageToken(x.NextPageToken)
40876	}
40877}
40878
40879// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch":
40880
40881type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall struct {
40882	s                                        *Service
40883	nameid                                   string
40884	googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType
40885	urlParams_                               gensupport.URLParams
40886	ctx_                                     context.Context
40887	header_                                  http.Header
40888}
40889
40890// Patch: Updates the specified session entity type. This method doesn't
40891// work with Google Assistant integration. Contact Dialogflow support if
40892// you need to use session entities with Google Assistant integration.
40893//
40894// - name: The unique identifier of this session entity type. Format:
40895//   `projects//agent/sessions//entityTypes/`, or
40896//   `projects//agent/environments//users//sessions//entityTypes/`. If
40897//   `Environment ID` is not specified, we assume default 'draft'
40898//   environment. If `User ID` is not specified, we assume default '-'
40899//   user. `` must be the display name of an existing entity type in the
40900//   same agent that will be overridden or supplemented.
40901func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
40902	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40903	c.nameid = nameid
40904	c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype
40905	return c
40906}
40907
40908// UpdateMask sets the optional parameter "updateMask": The mask to
40909// control which fields get updated.
40910func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
40911	c.urlParams_.Set("updateMask", updateMask)
40912	return c
40913}
40914
40915// Fields allows partial responses to be retrieved. See
40916// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40917// for more information.
40918func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
40919	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40920	return c
40921}
40922
40923// Context sets the context to be used in this call's Do method. Any
40924// pending HTTP request will be aborted if the provided context is
40925// canceled.
40926func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
40927	c.ctx_ = ctx
40928	return c
40929}
40930
40931// Header returns an http.Header that can be modified by the caller to
40932// add HTTP headers to the request.
40933func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Header() http.Header {
40934	if c.header_ == nil {
40935		c.header_ = make(http.Header)
40936	}
40937	return c.header_
40938}
40939
40940func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
40941	reqHeaders := make(http.Header)
40942	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
40943	for k, v := range c.header_ {
40944		reqHeaders[k] = v
40945	}
40946	reqHeaders.Set("User-Agent", c.s.userAgent())
40947	var body io.Reader = nil
40948	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype)
40949	if err != nil {
40950		return nil, err
40951	}
40952	reqHeaders.Set("Content-Type", "application/json")
40953	c.urlParams_.Set("alt", alt)
40954	c.urlParams_.Set("prettyPrint", "false")
40955	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
40956	urls += "?" + c.urlParams_.Encode()
40957	req, err := http.NewRequest("PATCH", urls, body)
40958	if err != nil {
40959		return nil, err
40960	}
40961	req.Header = reqHeaders
40962	googleapi.Expand(req.URL, map[string]string{
40963		"name": c.nameid,
40964	})
40965	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40966}
40967
40968// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch" call.
40969// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
40970// will be non-nil. Any non-2xx status code is an error. Response
40971// headers are in either
40972// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
40973// (if a response was returned at all) in
40974// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
40975// whether the returned error was because http.StatusNotModified was
40976// returned.
40977func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
40978	gensupport.SetOptions(c.urlParams_, opts...)
40979	res, err := c.doRequest("json")
40980	if res != nil && res.StatusCode == http.StatusNotModified {
40981		if res.Body != nil {
40982			res.Body.Close()
40983		}
40984		return nil, &googleapi.Error{
40985			Code:   res.StatusCode,
40986			Header: res.Header,
40987		}
40988	}
40989	if err != nil {
40990		return nil, err
40991	}
40992	defer googleapi.CloseBody(res)
40993	if err := googleapi.CheckResponse(res); err != nil {
40994		return nil, err
40995	}
40996	ret := &GoogleCloudDialogflowV2SessionEntityType{
40997		ServerResponse: googleapi.ServerResponse{
40998			Header:         res.Header,
40999			HTTPStatusCode: res.StatusCode,
41000		},
41001	}
41002	target := &ret
41003	if err := gensupport.DecodeResponse(target, res); err != nil {
41004		return nil, err
41005	}
41006	return ret, nil
41007	// {
41008	//   "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
41009	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
41010	//   "httpMethod": "PATCH",
41011	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch",
41012	//   "parameterOrder": [
41013	//     "name"
41014	//   ],
41015	//   "parameters": {
41016	//     "name": {
41017	//       "description": "Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.",
41018	//       "location": "path",
41019	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
41020	//       "required": true,
41021	//       "type": "string"
41022	//     },
41023	//     "updateMask": {
41024	//       "description": "Optional. The mask to control which fields get updated.",
41025	//       "format": "google-fieldmask",
41026	//       "location": "query",
41027	//       "type": "string"
41028	//     }
41029	//   },
41030	//   "path": "v2/{+name}",
41031	//   "request": {
41032	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
41033	//   },
41034	//   "response": {
41035	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
41036	//   },
41037	//   "scopes": [
41038	//     "https://www.googleapis.com/auth/cloud-platform",
41039	//     "https://www.googleapis.com/auth/dialogflow"
41040	//   ]
41041	// }
41042
41043}
41044
41045// method id "dialogflow.projects.locations.agent.intents.batchDelete":
41046
41047type ProjectsLocationsAgentIntentsBatchDeleteCall struct {
41048	s                                                *Service
41049	parent                                           string
41050	googleclouddialogflowv2batchdeleteintentsrequest *GoogleCloudDialogflowV2BatchDeleteIntentsRequest
41051	urlParams_                                       gensupport.URLParams
41052	ctx_                                             context.Context
41053	header_                                          http.Header
41054}
41055
41056// BatchDelete: Deletes intents in the specified agent. Note: You should
41057// always train an agent prior to sending it queries. See the training
41058// documentation (https://cloud.google.com/dialogflow/es/docs/training).
41059//
41060// - parent: The name of the agent to delete all entities types for.
41061//   Format: `projects//agent`.
41062func (r *ProjectsLocationsAgentIntentsService) BatchDelete(parent string, googleclouddialogflowv2batchdeleteintentsrequest *GoogleCloudDialogflowV2BatchDeleteIntentsRequest) *ProjectsLocationsAgentIntentsBatchDeleteCall {
41063	c := &ProjectsLocationsAgentIntentsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41064	c.parent = parent
41065	c.googleclouddialogflowv2batchdeleteintentsrequest = googleclouddialogflowv2batchdeleteintentsrequest
41066	return c
41067}
41068
41069// Fields allows partial responses to be retrieved. See
41070// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41071// for more information.
41072func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsBatchDeleteCall {
41073	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41074	return c
41075}
41076
41077// Context sets the context to be used in this call's Do method. Any
41078// pending HTTP request will be aborted if the provided context is
41079// canceled.
41080func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsBatchDeleteCall {
41081	c.ctx_ = ctx
41082	return c
41083}
41084
41085// Header returns an http.Header that can be modified by the caller to
41086// add HTTP headers to the request.
41087func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Header() http.Header {
41088	if c.header_ == nil {
41089		c.header_ = make(http.Header)
41090	}
41091	return c.header_
41092}
41093
41094func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
41095	reqHeaders := make(http.Header)
41096	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
41097	for k, v := range c.header_ {
41098		reqHeaders[k] = v
41099	}
41100	reqHeaders.Set("User-Agent", c.s.userAgent())
41101	var body io.Reader = nil
41102	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchdeleteintentsrequest)
41103	if err != nil {
41104		return nil, err
41105	}
41106	reqHeaders.Set("Content-Type", "application/json")
41107	c.urlParams_.Set("alt", alt)
41108	c.urlParams_.Set("prettyPrint", "false")
41109	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents:batchDelete")
41110	urls += "?" + c.urlParams_.Encode()
41111	req, err := http.NewRequest("POST", urls, body)
41112	if err != nil {
41113		return nil, err
41114	}
41115	req.Header = reqHeaders
41116	googleapi.Expand(req.URL, map[string]string{
41117		"parent": c.parent,
41118	})
41119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41120}
41121
41122// Do executes the "dialogflow.projects.locations.agent.intents.batchDelete" call.
41123// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
41124// Any non-2xx status code is an error. Response headers are in either
41125// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
41126// was returned at all) in error.(*googleapi.Error).Header. Use
41127// googleapi.IsNotModified to check whether the returned error was
41128// because http.StatusNotModified was returned.
41129func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
41130	gensupport.SetOptions(c.urlParams_, opts...)
41131	res, err := c.doRequest("json")
41132	if res != nil && res.StatusCode == http.StatusNotModified {
41133		if res.Body != nil {
41134			res.Body.Close()
41135		}
41136		return nil, &googleapi.Error{
41137			Code:   res.StatusCode,
41138			Header: res.Header,
41139		}
41140	}
41141	if err != nil {
41142		return nil, err
41143	}
41144	defer googleapi.CloseBody(res)
41145	if err := googleapi.CheckResponse(res); err != nil {
41146		return nil, err
41147	}
41148	ret := &GoogleLongrunningOperation{
41149		ServerResponse: googleapi.ServerResponse{
41150			Header:         res.Header,
41151			HTTPStatusCode: res.StatusCode,
41152		},
41153	}
41154	target := &ret
41155	if err := gensupport.DecodeResponse(target, res); err != nil {
41156		return nil, err
41157	}
41158	return ret, nil
41159	// {
41160	//   "description": "Deletes intents in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
41161	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents:batchDelete",
41162	//   "httpMethod": "POST",
41163	//   "id": "dialogflow.projects.locations.agent.intents.batchDelete",
41164	//   "parameterOrder": [
41165	//     "parent"
41166	//   ],
41167	//   "parameters": {
41168	//     "parent": {
41169	//       "description": "Required. The name of the agent to delete all entities types for. Format: `projects//agent`.",
41170	//       "location": "path",
41171	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
41172	//       "required": true,
41173	//       "type": "string"
41174	//     }
41175	//   },
41176	//   "path": "v2/{+parent}/intents:batchDelete",
41177	//   "request": {
41178	//     "$ref": "GoogleCloudDialogflowV2BatchDeleteIntentsRequest"
41179	//   },
41180	//   "response": {
41181	//     "$ref": "GoogleLongrunningOperation"
41182	//   },
41183	//   "scopes": [
41184	//     "https://www.googleapis.com/auth/cloud-platform",
41185	//     "https://www.googleapis.com/auth/dialogflow"
41186	//   ]
41187	// }
41188
41189}
41190
41191// method id "dialogflow.projects.locations.agent.intents.batchUpdate":
41192
41193type ProjectsLocationsAgentIntentsBatchUpdateCall struct {
41194	s                                                *Service
41195	parent                                           string
41196	googleclouddialogflowv2batchupdateintentsrequest *GoogleCloudDialogflowV2BatchUpdateIntentsRequest
41197	urlParams_                                       gensupport.URLParams
41198	ctx_                                             context.Context
41199	header_                                          http.Header
41200}
41201
41202// BatchUpdate: Updates/Creates multiple intents in the specified agent.
41203// Note: You should always train an agent prior to sending it queries.
41204// See the training documentation
41205// (https://cloud.google.com/dialogflow/es/docs/training).
41206//
41207// - parent: The name of the agent to update or create intents in.
41208//   Format: `projects//agent`.
41209func (r *ProjectsLocationsAgentIntentsService) BatchUpdate(parent string, googleclouddialogflowv2batchupdateintentsrequest *GoogleCloudDialogflowV2BatchUpdateIntentsRequest) *ProjectsLocationsAgentIntentsBatchUpdateCall {
41210	c := &ProjectsLocationsAgentIntentsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41211	c.parent = parent
41212	c.googleclouddialogflowv2batchupdateintentsrequest = googleclouddialogflowv2batchupdateintentsrequest
41213	return c
41214}
41215
41216// Fields allows partial responses to be retrieved. See
41217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41218// for more information.
41219func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsBatchUpdateCall {
41220	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41221	return c
41222}
41223
41224// Context sets the context to be used in this call's Do method. Any
41225// pending HTTP request will be aborted if the provided context is
41226// canceled.
41227func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsBatchUpdateCall {
41228	c.ctx_ = ctx
41229	return c
41230}
41231
41232// Header returns an http.Header that can be modified by the caller to
41233// add HTTP headers to the request.
41234func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Header() http.Header {
41235	if c.header_ == nil {
41236		c.header_ = make(http.Header)
41237	}
41238	return c.header_
41239}
41240
41241func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
41242	reqHeaders := make(http.Header)
41243	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
41244	for k, v := range c.header_ {
41245		reqHeaders[k] = v
41246	}
41247	reqHeaders.Set("User-Agent", c.s.userAgent())
41248	var body io.Reader = nil
41249	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2batchupdateintentsrequest)
41250	if err != nil {
41251		return nil, err
41252	}
41253	reqHeaders.Set("Content-Type", "application/json")
41254	c.urlParams_.Set("alt", alt)
41255	c.urlParams_.Set("prettyPrint", "false")
41256	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents:batchUpdate")
41257	urls += "?" + c.urlParams_.Encode()
41258	req, err := http.NewRequest("POST", urls, body)
41259	if err != nil {
41260		return nil, err
41261	}
41262	req.Header = reqHeaders
41263	googleapi.Expand(req.URL, map[string]string{
41264		"parent": c.parent,
41265	})
41266	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41267}
41268
41269// Do executes the "dialogflow.projects.locations.agent.intents.batchUpdate" call.
41270// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
41271// Any non-2xx status code is an error. Response headers are in either
41272// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
41273// was returned at all) in error.(*googleapi.Error).Header. Use
41274// googleapi.IsNotModified to check whether the returned error was
41275// because http.StatusNotModified was returned.
41276func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
41277	gensupport.SetOptions(c.urlParams_, opts...)
41278	res, err := c.doRequest("json")
41279	if res != nil && res.StatusCode == http.StatusNotModified {
41280		if res.Body != nil {
41281			res.Body.Close()
41282		}
41283		return nil, &googleapi.Error{
41284			Code:   res.StatusCode,
41285			Header: res.Header,
41286		}
41287	}
41288	if err != nil {
41289		return nil, err
41290	}
41291	defer googleapi.CloseBody(res)
41292	if err := googleapi.CheckResponse(res); err != nil {
41293		return nil, err
41294	}
41295	ret := &GoogleLongrunningOperation{
41296		ServerResponse: googleapi.ServerResponse{
41297			Header:         res.Header,
41298			HTTPStatusCode: res.StatusCode,
41299		},
41300	}
41301	target := &ret
41302	if err := gensupport.DecodeResponse(target, res); err != nil {
41303		return nil, err
41304	}
41305	return ret, nil
41306	// {
41307	//   "description": "Updates/Creates multiple intents in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
41308	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents:batchUpdate",
41309	//   "httpMethod": "POST",
41310	//   "id": "dialogflow.projects.locations.agent.intents.batchUpdate",
41311	//   "parameterOrder": [
41312	//     "parent"
41313	//   ],
41314	//   "parameters": {
41315	//     "parent": {
41316	//       "description": "Required. The name of the agent to update or create intents in. Format: `projects//agent`.",
41317	//       "location": "path",
41318	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
41319	//       "required": true,
41320	//       "type": "string"
41321	//     }
41322	//   },
41323	//   "path": "v2/{+parent}/intents:batchUpdate",
41324	//   "request": {
41325	//     "$ref": "GoogleCloudDialogflowV2BatchUpdateIntentsRequest"
41326	//   },
41327	//   "response": {
41328	//     "$ref": "GoogleLongrunningOperation"
41329	//   },
41330	//   "scopes": [
41331	//     "https://www.googleapis.com/auth/cloud-platform",
41332	//     "https://www.googleapis.com/auth/dialogflow"
41333	//   ]
41334	// }
41335
41336}
41337
41338// method id "dialogflow.projects.locations.agent.intents.create":
41339
41340type ProjectsLocationsAgentIntentsCreateCall struct {
41341	s                             *Service
41342	parent                        string
41343	googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent
41344	urlParams_                    gensupport.URLParams
41345	ctx_                          context.Context
41346	header_                       http.Header
41347}
41348
41349// Create: Creates an intent in the specified agent. Note: You should
41350// always train an agent prior to sending it queries. See the training
41351// documentation (https://cloud.google.com/dialogflow/es/docs/training).
41352//
41353// - parent: The agent to create a intent for. Format:
41354//   `projects//agent`.
41355func (r *ProjectsLocationsAgentIntentsService) Create(parent string, googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent) *ProjectsLocationsAgentIntentsCreateCall {
41356	c := &ProjectsLocationsAgentIntentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41357	c.parent = parent
41358	c.googleclouddialogflowv2intent = googleclouddialogflowv2intent
41359	return c
41360}
41361
41362// IntentView sets the optional parameter "intentView": The resource
41363// view to apply to the returned intent.
41364//
41365// Possible values:
41366//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
41367// in the response.
41368//   "INTENT_VIEW_FULL" - All fields are populated.
41369func (c *ProjectsLocationsAgentIntentsCreateCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsCreateCall {
41370	c.urlParams_.Set("intentView", intentView)
41371	return c
41372}
41373
41374// LanguageCode sets the optional parameter "languageCode": The language
41375// used to access language-specific data. If not specified, the agent's
41376// default language is used. For more information, see Multilingual
41377// intent and entity data
41378// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
41379func (c *ProjectsLocationsAgentIntentsCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsCreateCall {
41380	c.urlParams_.Set("languageCode", languageCode)
41381	return c
41382}
41383
41384// Fields allows partial responses to be retrieved. See
41385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41386// for more information.
41387func (c *ProjectsLocationsAgentIntentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsCreateCall {
41388	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41389	return c
41390}
41391
41392// Context sets the context to be used in this call's Do method. Any
41393// pending HTTP request will be aborted if the provided context is
41394// canceled.
41395func (c *ProjectsLocationsAgentIntentsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsCreateCall {
41396	c.ctx_ = ctx
41397	return c
41398}
41399
41400// Header returns an http.Header that can be modified by the caller to
41401// add HTTP headers to the request.
41402func (c *ProjectsLocationsAgentIntentsCreateCall) Header() http.Header {
41403	if c.header_ == nil {
41404		c.header_ = make(http.Header)
41405	}
41406	return c.header_
41407}
41408
41409func (c *ProjectsLocationsAgentIntentsCreateCall) doRequest(alt string) (*http.Response, error) {
41410	reqHeaders := make(http.Header)
41411	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
41412	for k, v := range c.header_ {
41413		reqHeaders[k] = v
41414	}
41415	reqHeaders.Set("User-Agent", c.s.userAgent())
41416	var body io.Reader = nil
41417	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2intent)
41418	if err != nil {
41419		return nil, err
41420	}
41421	reqHeaders.Set("Content-Type", "application/json")
41422	c.urlParams_.Set("alt", alt)
41423	c.urlParams_.Set("prettyPrint", "false")
41424	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents")
41425	urls += "?" + c.urlParams_.Encode()
41426	req, err := http.NewRequest("POST", urls, body)
41427	if err != nil {
41428		return nil, err
41429	}
41430	req.Header = reqHeaders
41431	googleapi.Expand(req.URL, map[string]string{
41432		"parent": c.parent,
41433	})
41434	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41435}
41436
41437// Do executes the "dialogflow.projects.locations.agent.intents.create" call.
41438// Exactly one of *GoogleCloudDialogflowV2Intent or error will be
41439// non-nil. Any non-2xx status code is an error. Response headers are in
41440// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a
41441// response was returned at all) in error.(*googleapi.Error).Header. Use
41442// googleapi.IsNotModified to check whether the returned error was
41443// because http.StatusNotModified was returned.
41444func (c *ProjectsLocationsAgentIntentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) {
41445	gensupport.SetOptions(c.urlParams_, opts...)
41446	res, err := c.doRequest("json")
41447	if res != nil && res.StatusCode == http.StatusNotModified {
41448		if res.Body != nil {
41449			res.Body.Close()
41450		}
41451		return nil, &googleapi.Error{
41452			Code:   res.StatusCode,
41453			Header: res.Header,
41454		}
41455	}
41456	if err != nil {
41457		return nil, err
41458	}
41459	defer googleapi.CloseBody(res)
41460	if err := googleapi.CheckResponse(res); err != nil {
41461		return nil, err
41462	}
41463	ret := &GoogleCloudDialogflowV2Intent{
41464		ServerResponse: googleapi.ServerResponse{
41465			Header:         res.Header,
41466			HTTPStatusCode: res.StatusCode,
41467		},
41468	}
41469	target := &ret
41470	if err := gensupport.DecodeResponse(target, res); err != nil {
41471		return nil, err
41472	}
41473	return ret, nil
41474	// {
41475	//   "description": "Creates an intent in the specified agent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
41476	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents",
41477	//   "httpMethod": "POST",
41478	//   "id": "dialogflow.projects.locations.agent.intents.create",
41479	//   "parameterOrder": [
41480	//     "parent"
41481	//   ],
41482	//   "parameters": {
41483	//     "intentView": {
41484	//       "description": "Optional. The resource view to apply to the returned intent.",
41485	//       "enum": [
41486	//         "INTENT_VIEW_UNSPECIFIED",
41487	//         "INTENT_VIEW_FULL"
41488	//       ],
41489	//       "enumDescriptions": [
41490	//         "Training phrases field is not populated in the response.",
41491	//         "All fields are populated."
41492	//       ],
41493	//       "location": "query",
41494	//       "type": "string"
41495	//     },
41496	//     "languageCode": {
41497	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
41498	//       "location": "query",
41499	//       "type": "string"
41500	//     },
41501	//     "parent": {
41502	//       "description": "Required. The agent to create a intent for. Format: `projects//agent`.",
41503	//       "location": "path",
41504	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
41505	//       "required": true,
41506	//       "type": "string"
41507	//     }
41508	//   },
41509	//   "path": "v2/{+parent}/intents",
41510	//   "request": {
41511	//     "$ref": "GoogleCloudDialogflowV2Intent"
41512	//   },
41513	//   "response": {
41514	//     "$ref": "GoogleCloudDialogflowV2Intent"
41515	//   },
41516	//   "scopes": [
41517	//     "https://www.googleapis.com/auth/cloud-platform",
41518	//     "https://www.googleapis.com/auth/dialogflow"
41519	//   ]
41520	// }
41521
41522}
41523
41524// method id "dialogflow.projects.locations.agent.intents.delete":
41525
41526type ProjectsLocationsAgentIntentsDeleteCall struct {
41527	s          *Service
41528	name       string
41529	urlParams_ gensupport.URLParams
41530	ctx_       context.Context
41531	header_    http.Header
41532}
41533
41534// Delete: Deletes the specified intent and its direct or indirect
41535// followup intents. Note: You should always train an agent prior to
41536// sending it queries. See the training documentation
41537// (https://cloud.google.com/dialogflow/es/docs/training).
41538//
41539// - name: The name of the intent to delete. If this intent has direct
41540//   or indirect followup intents, we also delete them. Format:
41541//   `projects//agent/intents/`.
41542func (r *ProjectsLocationsAgentIntentsService) Delete(name string) *ProjectsLocationsAgentIntentsDeleteCall {
41543	c := &ProjectsLocationsAgentIntentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41544	c.name = name
41545	return c
41546}
41547
41548// Fields allows partial responses to be retrieved. See
41549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41550// for more information.
41551func (c *ProjectsLocationsAgentIntentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsDeleteCall {
41552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41553	return c
41554}
41555
41556// Context sets the context to be used in this call's Do method. Any
41557// pending HTTP request will be aborted if the provided context is
41558// canceled.
41559func (c *ProjectsLocationsAgentIntentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsDeleteCall {
41560	c.ctx_ = ctx
41561	return c
41562}
41563
41564// Header returns an http.Header that can be modified by the caller to
41565// add HTTP headers to the request.
41566func (c *ProjectsLocationsAgentIntentsDeleteCall) Header() http.Header {
41567	if c.header_ == nil {
41568		c.header_ = make(http.Header)
41569	}
41570	return c.header_
41571}
41572
41573func (c *ProjectsLocationsAgentIntentsDeleteCall) doRequest(alt string) (*http.Response, error) {
41574	reqHeaders := make(http.Header)
41575	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
41576	for k, v := range c.header_ {
41577		reqHeaders[k] = v
41578	}
41579	reqHeaders.Set("User-Agent", c.s.userAgent())
41580	var body io.Reader = nil
41581	c.urlParams_.Set("alt", alt)
41582	c.urlParams_.Set("prettyPrint", "false")
41583	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
41584	urls += "?" + c.urlParams_.Encode()
41585	req, err := http.NewRequest("DELETE", urls, body)
41586	if err != nil {
41587		return nil, err
41588	}
41589	req.Header = reqHeaders
41590	googleapi.Expand(req.URL, map[string]string{
41591		"name": c.name,
41592	})
41593	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41594}
41595
41596// Do executes the "dialogflow.projects.locations.agent.intents.delete" call.
41597// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
41598// non-2xx status code is an error. Response headers are in either
41599// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
41600// returned at all) in error.(*googleapi.Error).Header. Use
41601// googleapi.IsNotModified to check whether the returned error was
41602// because http.StatusNotModified was returned.
41603func (c *ProjectsLocationsAgentIntentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
41604	gensupport.SetOptions(c.urlParams_, opts...)
41605	res, err := c.doRequest("json")
41606	if res != nil && res.StatusCode == http.StatusNotModified {
41607		if res.Body != nil {
41608			res.Body.Close()
41609		}
41610		return nil, &googleapi.Error{
41611			Code:   res.StatusCode,
41612			Header: res.Header,
41613		}
41614	}
41615	if err != nil {
41616		return nil, err
41617	}
41618	defer googleapi.CloseBody(res)
41619	if err := googleapi.CheckResponse(res); err != nil {
41620		return nil, err
41621	}
41622	ret := &GoogleProtobufEmpty{
41623		ServerResponse: googleapi.ServerResponse{
41624			Header:         res.Header,
41625			HTTPStatusCode: res.StatusCode,
41626		},
41627	}
41628	target := &ret
41629	if err := gensupport.DecodeResponse(target, res); err != nil {
41630		return nil, err
41631	}
41632	return ret, nil
41633	// {
41634	//   "description": "Deletes the specified intent and its direct or indirect followup intents. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
41635	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}",
41636	//   "httpMethod": "DELETE",
41637	//   "id": "dialogflow.projects.locations.agent.intents.delete",
41638	//   "parameterOrder": [
41639	//     "name"
41640	//   ],
41641	//   "parameters": {
41642	//     "name": {
41643	//       "description": "Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`.",
41644	//       "location": "path",
41645	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$",
41646	//       "required": true,
41647	//       "type": "string"
41648	//     }
41649	//   },
41650	//   "path": "v2/{+name}",
41651	//   "response": {
41652	//     "$ref": "GoogleProtobufEmpty"
41653	//   },
41654	//   "scopes": [
41655	//     "https://www.googleapis.com/auth/cloud-platform",
41656	//     "https://www.googleapis.com/auth/dialogflow"
41657	//   ]
41658	// }
41659
41660}
41661
41662// method id "dialogflow.projects.locations.agent.intents.get":
41663
41664type ProjectsLocationsAgentIntentsGetCall struct {
41665	s            *Service
41666	name         string
41667	urlParams_   gensupport.URLParams
41668	ifNoneMatch_ string
41669	ctx_         context.Context
41670	header_      http.Header
41671}
41672
41673// Get: Retrieves the specified intent.
41674//
41675// - name: The name of the intent. Format: `projects//agent/intents/`.
41676func (r *ProjectsLocationsAgentIntentsService) Get(name string) *ProjectsLocationsAgentIntentsGetCall {
41677	c := &ProjectsLocationsAgentIntentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41678	c.name = name
41679	return c
41680}
41681
41682// IntentView sets the optional parameter "intentView": The resource
41683// view to apply to the returned intent.
41684//
41685// Possible values:
41686//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
41687// in the response.
41688//   "INTENT_VIEW_FULL" - All fields are populated.
41689func (c *ProjectsLocationsAgentIntentsGetCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsGetCall {
41690	c.urlParams_.Set("intentView", intentView)
41691	return c
41692}
41693
41694// LanguageCode sets the optional parameter "languageCode": The language
41695// used to access language-specific data. If not specified, the agent's
41696// default language is used. For more information, see Multilingual
41697// intent and entity data
41698// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
41699func (c *ProjectsLocationsAgentIntentsGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsGetCall {
41700	c.urlParams_.Set("languageCode", languageCode)
41701	return c
41702}
41703
41704// Fields allows partial responses to be retrieved. See
41705// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41706// for more information.
41707func (c *ProjectsLocationsAgentIntentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsGetCall {
41708	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41709	return c
41710}
41711
41712// IfNoneMatch sets the optional parameter which makes the operation
41713// fail if the object's ETag matches the given value. This is useful for
41714// getting updates only after the object has changed since the last
41715// request. Use googleapi.IsNotModified to check whether the response
41716// error from Do is the result of In-None-Match.
41717func (c *ProjectsLocationsAgentIntentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentIntentsGetCall {
41718	c.ifNoneMatch_ = entityTag
41719	return c
41720}
41721
41722// Context sets the context to be used in this call's Do method. Any
41723// pending HTTP request will be aborted if the provided context is
41724// canceled.
41725func (c *ProjectsLocationsAgentIntentsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsGetCall {
41726	c.ctx_ = ctx
41727	return c
41728}
41729
41730// Header returns an http.Header that can be modified by the caller to
41731// add HTTP headers to the request.
41732func (c *ProjectsLocationsAgentIntentsGetCall) Header() http.Header {
41733	if c.header_ == nil {
41734		c.header_ = make(http.Header)
41735	}
41736	return c.header_
41737}
41738
41739func (c *ProjectsLocationsAgentIntentsGetCall) doRequest(alt string) (*http.Response, error) {
41740	reqHeaders := make(http.Header)
41741	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
41742	for k, v := range c.header_ {
41743		reqHeaders[k] = v
41744	}
41745	reqHeaders.Set("User-Agent", c.s.userAgent())
41746	if c.ifNoneMatch_ != "" {
41747		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41748	}
41749	var body io.Reader = nil
41750	c.urlParams_.Set("alt", alt)
41751	c.urlParams_.Set("prettyPrint", "false")
41752	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
41753	urls += "?" + c.urlParams_.Encode()
41754	req, err := http.NewRequest("GET", urls, body)
41755	if err != nil {
41756		return nil, err
41757	}
41758	req.Header = reqHeaders
41759	googleapi.Expand(req.URL, map[string]string{
41760		"name": c.name,
41761	})
41762	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41763}
41764
41765// Do executes the "dialogflow.projects.locations.agent.intents.get" call.
41766// Exactly one of *GoogleCloudDialogflowV2Intent or error will be
41767// non-nil. Any non-2xx status code is an error. Response headers are in
41768// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a
41769// response was returned at all) in error.(*googleapi.Error).Header. Use
41770// googleapi.IsNotModified to check whether the returned error was
41771// because http.StatusNotModified was returned.
41772func (c *ProjectsLocationsAgentIntentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) {
41773	gensupport.SetOptions(c.urlParams_, opts...)
41774	res, err := c.doRequest("json")
41775	if res != nil && res.StatusCode == http.StatusNotModified {
41776		if res.Body != nil {
41777			res.Body.Close()
41778		}
41779		return nil, &googleapi.Error{
41780			Code:   res.StatusCode,
41781			Header: res.Header,
41782		}
41783	}
41784	if err != nil {
41785		return nil, err
41786	}
41787	defer googleapi.CloseBody(res)
41788	if err := googleapi.CheckResponse(res); err != nil {
41789		return nil, err
41790	}
41791	ret := &GoogleCloudDialogflowV2Intent{
41792		ServerResponse: googleapi.ServerResponse{
41793			Header:         res.Header,
41794			HTTPStatusCode: res.StatusCode,
41795		},
41796	}
41797	target := &ret
41798	if err := gensupport.DecodeResponse(target, res); err != nil {
41799		return nil, err
41800	}
41801	return ret, nil
41802	// {
41803	//   "description": "Retrieves the specified intent.",
41804	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}",
41805	//   "httpMethod": "GET",
41806	//   "id": "dialogflow.projects.locations.agent.intents.get",
41807	//   "parameterOrder": [
41808	//     "name"
41809	//   ],
41810	//   "parameters": {
41811	//     "intentView": {
41812	//       "description": "Optional. The resource view to apply to the returned intent.",
41813	//       "enum": [
41814	//         "INTENT_VIEW_UNSPECIFIED",
41815	//         "INTENT_VIEW_FULL"
41816	//       ],
41817	//       "enumDescriptions": [
41818	//         "Training phrases field is not populated in the response.",
41819	//         "All fields are populated."
41820	//       ],
41821	//       "location": "query",
41822	//       "type": "string"
41823	//     },
41824	//     "languageCode": {
41825	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
41826	//       "location": "query",
41827	//       "type": "string"
41828	//     },
41829	//     "name": {
41830	//       "description": "Required. The name of the intent. Format: `projects//agent/intents/`.",
41831	//       "location": "path",
41832	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$",
41833	//       "required": true,
41834	//       "type": "string"
41835	//     }
41836	//   },
41837	//   "path": "v2/{+name}",
41838	//   "response": {
41839	//     "$ref": "GoogleCloudDialogflowV2Intent"
41840	//   },
41841	//   "scopes": [
41842	//     "https://www.googleapis.com/auth/cloud-platform",
41843	//     "https://www.googleapis.com/auth/dialogflow"
41844	//   ]
41845	// }
41846
41847}
41848
41849// method id "dialogflow.projects.locations.agent.intents.list":
41850
41851type ProjectsLocationsAgentIntentsListCall struct {
41852	s            *Service
41853	parent       string
41854	urlParams_   gensupport.URLParams
41855	ifNoneMatch_ string
41856	ctx_         context.Context
41857	header_      http.Header
41858}
41859
41860// List: Returns the list of all intents in the specified agent.
41861//
41862// - parent: The agent to list all intents from. Format:
41863//   `projects//agent` or `projects//locations//agent`. Alternatively,
41864//   you can specify the environment to list intents for. Format:
41865//   `projects//agent/environments/` or
41866//   `projects//locations//agent/environments/`. Note: training phrases
41867//   of the intents will not be returned for non-draft environment.
41868func (r *ProjectsLocationsAgentIntentsService) List(parent string) *ProjectsLocationsAgentIntentsListCall {
41869	c := &ProjectsLocationsAgentIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41870	c.parent = parent
41871	return c
41872}
41873
41874// IntentView sets the optional parameter "intentView": The resource
41875// view to apply to the returned intent.
41876//
41877// Possible values:
41878//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
41879// in the response.
41880//   "INTENT_VIEW_FULL" - All fields are populated.
41881func (c *ProjectsLocationsAgentIntentsListCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsListCall {
41882	c.urlParams_.Set("intentView", intentView)
41883	return c
41884}
41885
41886// LanguageCode sets the optional parameter "languageCode": The language
41887// used to access language-specific data. If not specified, the agent's
41888// default language is used. For more information, see Multilingual
41889// intent and entity data
41890// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
41891func (c *ProjectsLocationsAgentIntentsListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsListCall {
41892	c.urlParams_.Set("languageCode", languageCode)
41893	return c
41894}
41895
41896// PageSize sets the optional parameter "pageSize": The maximum number
41897// of items to return in a single page. By default 100 and at most 1000.
41898func (c *ProjectsLocationsAgentIntentsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentIntentsListCall {
41899	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
41900	return c
41901}
41902
41903// PageToken sets the optional parameter "pageToken": The
41904// next_page_token value returned from a previous list request.
41905func (c *ProjectsLocationsAgentIntentsListCall) PageToken(pageToken string) *ProjectsLocationsAgentIntentsListCall {
41906	c.urlParams_.Set("pageToken", pageToken)
41907	return c
41908}
41909
41910// Fields allows partial responses to be retrieved. See
41911// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41912// for more information.
41913func (c *ProjectsLocationsAgentIntentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsListCall {
41914	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41915	return c
41916}
41917
41918// IfNoneMatch sets the optional parameter which makes the operation
41919// fail if the object's ETag matches the given value. This is useful for
41920// getting updates only after the object has changed since the last
41921// request. Use googleapi.IsNotModified to check whether the response
41922// error from Do is the result of In-None-Match.
41923func (c *ProjectsLocationsAgentIntentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentIntentsListCall {
41924	c.ifNoneMatch_ = entityTag
41925	return c
41926}
41927
41928// Context sets the context to be used in this call's Do method. Any
41929// pending HTTP request will be aborted if the provided context is
41930// canceled.
41931func (c *ProjectsLocationsAgentIntentsListCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsListCall {
41932	c.ctx_ = ctx
41933	return c
41934}
41935
41936// Header returns an http.Header that can be modified by the caller to
41937// add HTTP headers to the request.
41938func (c *ProjectsLocationsAgentIntentsListCall) Header() http.Header {
41939	if c.header_ == nil {
41940		c.header_ = make(http.Header)
41941	}
41942	return c.header_
41943}
41944
41945func (c *ProjectsLocationsAgentIntentsListCall) doRequest(alt string) (*http.Response, error) {
41946	reqHeaders := make(http.Header)
41947	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
41948	for k, v := range c.header_ {
41949		reqHeaders[k] = v
41950	}
41951	reqHeaders.Set("User-Agent", c.s.userAgent())
41952	if c.ifNoneMatch_ != "" {
41953		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41954	}
41955	var body io.Reader = nil
41956	c.urlParams_.Set("alt", alt)
41957	c.urlParams_.Set("prettyPrint", "false")
41958	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/intents")
41959	urls += "?" + c.urlParams_.Encode()
41960	req, err := http.NewRequest("GET", urls, body)
41961	if err != nil {
41962		return nil, err
41963	}
41964	req.Header = reqHeaders
41965	googleapi.Expand(req.URL, map[string]string{
41966		"parent": c.parent,
41967	})
41968	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41969}
41970
41971// Do executes the "dialogflow.projects.locations.agent.intents.list" call.
41972// Exactly one of *GoogleCloudDialogflowV2ListIntentsResponse or error
41973// will be non-nil. Any non-2xx status code is an error. Response
41974// headers are in either
41975// *GoogleCloudDialogflowV2ListIntentsResponse.ServerResponse.Header or
41976// (if a response was returned at all) in
41977// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
41978// whether the returned error was because http.StatusNotModified was
41979// returned.
41980func (c *ProjectsLocationsAgentIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListIntentsResponse, error) {
41981	gensupport.SetOptions(c.urlParams_, opts...)
41982	res, err := c.doRequest("json")
41983	if res != nil && res.StatusCode == http.StatusNotModified {
41984		if res.Body != nil {
41985			res.Body.Close()
41986		}
41987		return nil, &googleapi.Error{
41988			Code:   res.StatusCode,
41989			Header: res.Header,
41990		}
41991	}
41992	if err != nil {
41993		return nil, err
41994	}
41995	defer googleapi.CloseBody(res)
41996	if err := googleapi.CheckResponse(res); err != nil {
41997		return nil, err
41998	}
41999	ret := &GoogleCloudDialogflowV2ListIntentsResponse{
42000		ServerResponse: googleapi.ServerResponse{
42001			Header:         res.Header,
42002			HTTPStatusCode: res.StatusCode,
42003		},
42004	}
42005	target := &ret
42006	if err := gensupport.DecodeResponse(target, res); err != nil {
42007		return nil, err
42008	}
42009	return ret, nil
42010	// {
42011	//   "description": "Returns the list of all intents in the specified agent.",
42012	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents",
42013	//   "httpMethod": "GET",
42014	//   "id": "dialogflow.projects.locations.agent.intents.list",
42015	//   "parameterOrder": [
42016	//     "parent"
42017	//   ],
42018	//   "parameters": {
42019	//     "intentView": {
42020	//       "description": "Optional. The resource view to apply to the returned intent.",
42021	//       "enum": [
42022	//         "INTENT_VIEW_UNSPECIFIED",
42023	//         "INTENT_VIEW_FULL"
42024	//       ],
42025	//       "enumDescriptions": [
42026	//         "Training phrases field is not populated in the response.",
42027	//         "All fields are populated."
42028	//       ],
42029	//       "location": "query",
42030	//       "type": "string"
42031	//     },
42032	//     "languageCode": {
42033	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
42034	//       "location": "query",
42035	//       "type": "string"
42036	//     },
42037	//     "pageSize": {
42038	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
42039	//       "format": "int32",
42040	//       "location": "query",
42041	//       "type": "integer"
42042	//     },
42043	//     "pageToken": {
42044	//       "description": "Optional. The next_page_token value returned from a previous list request.",
42045	//       "location": "query",
42046	//       "type": "string"
42047	//     },
42048	//     "parent": {
42049	//       "description": "Required. The agent to list all intents from. Format: `projects//agent` or `projects//locations//agent`. Alternatively, you can specify the environment to list intents for. Format: `projects//agent/environments/` or `projects//locations//agent/environments/`. Note: training phrases of the intents will not be returned for non-draft environment.",
42050	//       "location": "path",
42051	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
42052	//       "required": true,
42053	//       "type": "string"
42054	//     }
42055	//   },
42056	//   "path": "v2/{+parent}/intents",
42057	//   "response": {
42058	//     "$ref": "GoogleCloudDialogflowV2ListIntentsResponse"
42059	//   },
42060	//   "scopes": [
42061	//     "https://www.googleapis.com/auth/cloud-platform",
42062	//     "https://www.googleapis.com/auth/dialogflow"
42063	//   ]
42064	// }
42065
42066}
42067
42068// Pages invokes f for each page of results.
42069// A non-nil error returned from f will halt the iteration.
42070// The provided context supersedes any context provided to the Context method.
42071func (c *ProjectsLocationsAgentIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListIntentsResponse) error) error {
42072	c.ctx_ = ctx
42073	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
42074	for {
42075		x, err := c.Do()
42076		if err != nil {
42077			return err
42078		}
42079		if err := f(x); err != nil {
42080			return err
42081		}
42082		if x.NextPageToken == "" {
42083			return nil
42084		}
42085		c.PageToken(x.NextPageToken)
42086	}
42087}
42088
42089// method id "dialogflow.projects.locations.agent.intents.patch":
42090
42091type ProjectsLocationsAgentIntentsPatchCall struct {
42092	s                             *Service
42093	nameid                        string
42094	googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent
42095	urlParams_                    gensupport.URLParams
42096	ctx_                          context.Context
42097	header_                       http.Header
42098}
42099
42100// Patch: Updates the specified intent. Note: You should always train an
42101// agent prior to sending it queries. See the training documentation
42102// (https://cloud.google.com/dialogflow/es/docs/training).
42103//
42104// - name: Optional. The unique identifier of this intent. Required for
42105//   Intents.UpdateIntent and Intents.BatchUpdateIntents methods.
42106//   Format: `projects//agent/intents/`.
42107func (r *ProjectsLocationsAgentIntentsService) Patch(nameid string, googleclouddialogflowv2intent *GoogleCloudDialogflowV2Intent) *ProjectsLocationsAgentIntentsPatchCall {
42108	c := &ProjectsLocationsAgentIntentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42109	c.nameid = nameid
42110	c.googleclouddialogflowv2intent = googleclouddialogflowv2intent
42111	return c
42112}
42113
42114// IntentView sets the optional parameter "intentView": The resource
42115// view to apply to the returned intent.
42116//
42117// Possible values:
42118//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
42119// in the response.
42120//   "INTENT_VIEW_FULL" - All fields are populated.
42121func (c *ProjectsLocationsAgentIntentsPatchCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsPatchCall {
42122	c.urlParams_.Set("intentView", intentView)
42123	return c
42124}
42125
42126// LanguageCode sets the optional parameter "languageCode": The language
42127// used to access language-specific data. If not specified, the agent's
42128// default language is used. For more information, see Multilingual
42129// intent and entity data
42130// (https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
42131func (c *ProjectsLocationsAgentIntentsPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsPatchCall {
42132	c.urlParams_.Set("languageCode", languageCode)
42133	return c
42134}
42135
42136// UpdateMask sets the optional parameter "updateMask": The mask to
42137// control which fields get updated.
42138func (c *ProjectsLocationsAgentIntentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentIntentsPatchCall {
42139	c.urlParams_.Set("updateMask", updateMask)
42140	return c
42141}
42142
42143// Fields allows partial responses to be retrieved. See
42144// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42145// for more information.
42146func (c *ProjectsLocationsAgentIntentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsPatchCall {
42147	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42148	return c
42149}
42150
42151// Context sets the context to be used in this call's Do method. Any
42152// pending HTTP request will be aborted if the provided context is
42153// canceled.
42154func (c *ProjectsLocationsAgentIntentsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsPatchCall {
42155	c.ctx_ = ctx
42156	return c
42157}
42158
42159// Header returns an http.Header that can be modified by the caller to
42160// add HTTP headers to the request.
42161func (c *ProjectsLocationsAgentIntentsPatchCall) Header() http.Header {
42162	if c.header_ == nil {
42163		c.header_ = make(http.Header)
42164	}
42165	return c.header_
42166}
42167
42168func (c *ProjectsLocationsAgentIntentsPatchCall) doRequest(alt string) (*http.Response, error) {
42169	reqHeaders := make(http.Header)
42170	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
42171	for k, v := range c.header_ {
42172		reqHeaders[k] = v
42173	}
42174	reqHeaders.Set("User-Agent", c.s.userAgent())
42175	var body io.Reader = nil
42176	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2intent)
42177	if err != nil {
42178		return nil, err
42179	}
42180	reqHeaders.Set("Content-Type", "application/json")
42181	c.urlParams_.Set("alt", alt)
42182	c.urlParams_.Set("prettyPrint", "false")
42183	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
42184	urls += "?" + c.urlParams_.Encode()
42185	req, err := http.NewRequest("PATCH", urls, body)
42186	if err != nil {
42187		return nil, err
42188	}
42189	req.Header = reqHeaders
42190	googleapi.Expand(req.URL, map[string]string{
42191		"name": c.nameid,
42192	})
42193	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42194}
42195
42196// Do executes the "dialogflow.projects.locations.agent.intents.patch" call.
42197// Exactly one of *GoogleCloudDialogflowV2Intent or error will be
42198// non-nil. Any non-2xx status code is an error. Response headers are in
42199// either *GoogleCloudDialogflowV2Intent.ServerResponse.Header or (if a
42200// response was returned at all) in error.(*googleapi.Error).Header. Use
42201// googleapi.IsNotModified to check whether the returned error was
42202// because http.StatusNotModified was returned.
42203func (c *ProjectsLocationsAgentIntentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Intent, error) {
42204	gensupport.SetOptions(c.urlParams_, opts...)
42205	res, err := c.doRequest("json")
42206	if res != nil && res.StatusCode == http.StatusNotModified {
42207		if res.Body != nil {
42208			res.Body.Close()
42209		}
42210		return nil, &googleapi.Error{
42211			Code:   res.StatusCode,
42212			Header: res.Header,
42213		}
42214	}
42215	if err != nil {
42216		return nil, err
42217	}
42218	defer googleapi.CloseBody(res)
42219	if err := googleapi.CheckResponse(res); err != nil {
42220		return nil, err
42221	}
42222	ret := &GoogleCloudDialogflowV2Intent{
42223		ServerResponse: googleapi.ServerResponse{
42224			Header:         res.Header,
42225			HTTPStatusCode: res.StatusCode,
42226		},
42227	}
42228	target := &ret
42229	if err := gensupport.DecodeResponse(target, res); err != nil {
42230		return nil, err
42231	}
42232	return ret, nil
42233	// {
42234	//   "description": "Updates the specified intent. Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).",
42235	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}",
42236	//   "httpMethod": "PATCH",
42237	//   "id": "dialogflow.projects.locations.agent.intents.patch",
42238	//   "parameterOrder": [
42239	//     "name"
42240	//   ],
42241	//   "parameters": {
42242	//     "intentView": {
42243	//       "description": "Optional. The resource view to apply to the returned intent.",
42244	//       "enum": [
42245	//         "INTENT_VIEW_UNSPECIFIED",
42246	//         "INTENT_VIEW_FULL"
42247	//       ],
42248	//       "enumDescriptions": [
42249	//         "Training phrases field is not populated in the response.",
42250	//         "All fields are populated."
42251	//       ],
42252	//       "location": "query",
42253	//       "type": "string"
42254	//     },
42255	//     "languageCode": {
42256	//       "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).",
42257	//       "location": "query",
42258	//       "type": "string"
42259	//     },
42260	//     "name": {
42261	//       "description": "Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`.",
42262	//       "location": "path",
42263	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$",
42264	//       "required": true,
42265	//       "type": "string"
42266	//     },
42267	//     "updateMask": {
42268	//       "description": "Optional. The mask to control which fields get updated.",
42269	//       "format": "google-fieldmask",
42270	//       "location": "query",
42271	//       "type": "string"
42272	//     }
42273	//   },
42274	//   "path": "v2/{+name}",
42275	//   "request": {
42276	//     "$ref": "GoogleCloudDialogflowV2Intent"
42277	//   },
42278	//   "response": {
42279	//     "$ref": "GoogleCloudDialogflowV2Intent"
42280	//   },
42281	//   "scopes": [
42282	//     "https://www.googleapis.com/auth/cloud-platform",
42283	//     "https://www.googleapis.com/auth/dialogflow"
42284	//   ]
42285	// }
42286
42287}
42288
42289// method id "dialogflow.projects.locations.agent.sessions.deleteContexts":
42290
42291type ProjectsLocationsAgentSessionsDeleteContextsCall struct {
42292	s          *Service
42293	parent     string
42294	urlParams_ gensupport.URLParams
42295	ctx_       context.Context
42296	header_    http.Header
42297}
42298
42299// DeleteContexts: Deletes all active contexts in the specified session.
42300//
42301// - parent: The name of the session to delete all contexts from.
42302//   Format: `projects//agent/sessions/` or
42303//   `projects//agent/environments//users//sessions/`. If `Environment
42304//   ID` is not specified we assume default 'draft' environment. If
42305//   `User ID` is not specified, we assume default '-' user.
42306func (r *ProjectsLocationsAgentSessionsService) DeleteContexts(parent string) *ProjectsLocationsAgentSessionsDeleteContextsCall {
42307	c := &ProjectsLocationsAgentSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42308	c.parent = parent
42309	return c
42310}
42311
42312// Fields allows partial responses to be retrieved. See
42313// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42314// for more information.
42315func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsDeleteContextsCall {
42316	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42317	return c
42318}
42319
42320// Context sets the context to be used in this call's Do method. Any
42321// pending HTTP request will be aborted if the provided context is
42322// canceled.
42323func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsDeleteContextsCall {
42324	c.ctx_ = ctx
42325	return c
42326}
42327
42328// Header returns an http.Header that can be modified by the caller to
42329// add HTTP headers to the request.
42330func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Header() http.Header {
42331	if c.header_ == nil {
42332		c.header_ = make(http.Header)
42333	}
42334	return c.header_
42335}
42336
42337func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
42338	reqHeaders := make(http.Header)
42339	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
42340	for k, v := range c.header_ {
42341		reqHeaders[k] = v
42342	}
42343	reqHeaders.Set("User-Agent", c.s.userAgent())
42344	var body io.Reader = nil
42345	c.urlParams_.Set("alt", alt)
42346	c.urlParams_.Set("prettyPrint", "false")
42347	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
42348	urls += "?" + c.urlParams_.Encode()
42349	req, err := http.NewRequest("DELETE", urls, body)
42350	if err != nil {
42351		return nil, err
42352	}
42353	req.Header = reqHeaders
42354	googleapi.Expand(req.URL, map[string]string{
42355		"parent": c.parent,
42356	})
42357	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42358}
42359
42360// Do executes the "dialogflow.projects.locations.agent.sessions.deleteContexts" call.
42361// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
42362// non-2xx status code is an error. Response headers are in either
42363// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
42364// returned at all) in error.(*googleapi.Error).Header. Use
42365// googleapi.IsNotModified to check whether the returned error was
42366// because http.StatusNotModified was returned.
42367func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
42368	gensupport.SetOptions(c.urlParams_, opts...)
42369	res, err := c.doRequest("json")
42370	if res != nil && res.StatusCode == http.StatusNotModified {
42371		if res.Body != nil {
42372			res.Body.Close()
42373		}
42374		return nil, &googleapi.Error{
42375			Code:   res.StatusCode,
42376			Header: res.Header,
42377		}
42378	}
42379	if err != nil {
42380		return nil, err
42381	}
42382	defer googleapi.CloseBody(res)
42383	if err := googleapi.CheckResponse(res); err != nil {
42384		return nil, err
42385	}
42386	ret := &GoogleProtobufEmpty{
42387		ServerResponse: googleapi.ServerResponse{
42388			Header:         res.Header,
42389			HTTPStatusCode: res.StatusCode,
42390		},
42391	}
42392	target := &ret
42393	if err := gensupport.DecodeResponse(target, res); err != nil {
42394		return nil, err
42395	}
42396	return ret, nil
42397	// {
42398	//   "description": "Deletes all active contexts in the specified session.",
42399	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts",
42400	//   "httpMethod": "DELETE",
42401	//   "id": "dialogflow.projects.locations.agent.sessions.deleteContexts",
42402	//   "parameterOrder": [
42403	//     "parent"
42404	//   ],
42405	//   "parameters": {
42406	//     "parent": {
42407	//       "description": "Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
42408	//       "location": "path",
42409	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
42410	//       "required": true,
42411	//       "type": "string"
42412	//     }
42413	//   },
42414	//   "path": "v2/{+parent}/contexts",
42415	//   "response": {
42416	//     "$ref": "GoogleProtobufEmpty"
42417	//   },
42418	//   "scopes": [
42419	//     "https://www.googleapis.com/auth/cloud-platform",
42420	//     "https://www.googleapis.com/auth/dialogflow"
42421	//   ]
42422	// }
42423
42424}
42425
42426// method id "dialogflow.projects.locations.agent.sessions.detectIntent":
42427
42428type ProjectsLocationsAgentSessionsDetectIntentCall struct {
42429	s                                          *Service
42430	sessionid                                  string
42431	googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest
42432	urlParams_                                 gensupport.URLParams
42433	ctx_                                       context.Context
42434	header_                                    http.Header
42435}
42436
42437// DetectIntent: Processes a natural language query and returns
42438// structured, actionable data as a result. This method is not
42439// idempotent, because it may cause contexts and session entity types to
42440// be updated, which in turn might affect results of future queries.
42441// Note: Always use agent versions for production traffic. See Versions
42442// and environments
42443// (https://cloud.google.com/dialogflow/es/docs/agents-versions).
42444//
42445// - session: The name of the session this query is sent to. Format:
42446//   `projects//agent/sessions/`, or
42447//   `projects//agent/environments//users//sessions/`. If `Environment
42448//   ID` is not specified, we assume default 'draft' environment
42449//   (`Environment ID` might be referred to as environment name at some
42450//   places). If `User ID` is not specified, we are using "-". It's up
42451//   to the API caller to choose an appropriate `Session ID` and `User
42452//   Id`. They can be a random number or some type of user and session
42453//   identifiers (preferably hashed). The length of the `Session ID` and
42454//   `User ID` must not exceed 36 characters. For more information, see
42455//   the API interactions guide
42456//   (https://cloud.google.com/dialogflow/docs/api-overview). Note:
42457//   Always use agent versions for production traffic. See Versions and
42458//   environments
42459//   (https://cloud.google.com/dialogflow/es/docs/agents-versions).
42460func (r *ProjectsLocationsAgentSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2detectintentrequest *GoogleCloudDialogflowV2DetectIntentRequest) *ProjectsLocationsAgentSessionsDetectIntentCall {
42461	c := &ProjectsLocationsAgentSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42462	c.sessionid = sessionid
42463	c.googleclouddialogflowv2detectintentrequest = googleclouddialogflowv2detectintentrequest
42464	return c
42465}
42466
42467// Fields allows partial responses to be retrieved. See
42468// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42469// for more information.
42470func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsDetectIntentCall {
42471	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42472	return c
42473}
42474
42475// Context sets the context to be used in this call's Do method. Any
42476// pending HTTP request will be aborted if the provided context is
42477// canceled.
42478func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsDetectIntentCall {
42479	c.ctx_ = ctx
42480	return c
42481}
42482
42483// Header returns an http.Header that can be modified by the caller to
42484// add HTTP headers to the request.
42485func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Header() http.Header {
42486	if c.header_ == nil {
42487		c.header_ = make(http.Header)
42488	}
42489	return c.header_
42490}
42491
42492func (c *ProjectsLocationsAgentSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
42493	reqHeaders := make(http.Header)
42494	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
42495	for k, v := range c.header_ {
42496		reqHeaders[k] = v
42497	}
42498	reqHeaders.Set("User-Agent", c.s.userAgent())
42499	var body io.Reader = nil
42500	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2detectintentrequest)
42501	if err != nil {
42502		return nil, err
42503	}
42504	reqHeaders.Set("Content-Type", "application/json")
42505	c.urlParams_.Set("alt", alt)
42506	c.urlParams_.Set("prettyPrint", "false")
42507	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+session}:detectIntent")
42508	urls += "?" + c.urlParams_.Encode()
42509	req, err := http.NewRequest("POST", urls, body)
42510	if err != nil {
42511		return nil, err
42512	}
42513	req.Header = reqHeaders
42514	googleapi.Expand(req.URL, map[string]string{
42515		"session": c.sessionid,
42516	})
42517	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42518}
42519
42520// Do executes the "dialogflow.projects.locations.agent.sessions.detectIntent" call.
42521// Exactly one of *GoogleCloudDialogflowV2DetectIntentResponse or error
42522// will be non-nil. Any non-2xx status code is an error. Response
42523// headers are in either
42524// *GoogleCloudDialogflowV2DetectIntentResponse.ServerResponse.Header or
42525// (if a response was returned at all) in
42526// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
42527// whether the returned error was because http.StatusNotModified was
42528// returned.
42529func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2DetectIntentResponse, error) {
42530	gensupport.SetOptions(c.urlParams_, opts...)
42531	res, err := c.doRequest("json")
42532	if res != nil && res.StatusCode == http.StatusNotModified {
42533		if res.Body != nil {
42534			res.Body.Close()
42535		}
42536		return nil, &googleapi.Error{
42537			Code:   res.StatusCode,
42538			Header: res.Header,
42539		}
42540	}
42541	if err != nil {
42542		return nil, err
42543	}
42544	defer googleapi.CloseBody(res)
42545	if err := googleapi.CheckResponse(res); err != nil {
42546		return nil, err
42547	}
42548	ret := &GoogleCloudDialogflowV2DetectIntentResponse{
42549		ServerResponse: googleapi.ServerResponse{
42550			Header:         res.Header,
42551			HTTPStatusCode: res.StatusCode,
42552		},
42553	}
42554	target := &ret
42555	if err := gensupport.DecodeResponse(target, res); err != nil {
42556		return nil, err
42557	}
42558	return ret, nil
42559	// {
42560	//   "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).",
42561	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}:detectIntent",
42562	//   "httpMethod": "POST",
42563	//   "id": "dialogflow.projects.locations.agent.sessions.detectIntent",
42564	//   "parameterOrder": [
42565	//     "session"
42566	//   ],
42567	//   "parameters": {
42568	//     "session": {
42569	//       "description": "Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).",
42570	//       "location": "path",
42571	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
42572	//       "required": true,
42573	//       "type": "string"
42574	//     }
42575	//   },
42576	//   "path": "v2/{+session}:detectIntent",
42577	//   "request": {
42578	//     "$ref": "GoogleCloudDialogflowV2DetectIntentRequest"
42579	//   },
42580	//   "response": {
42581	//     "$ref": "GoogleCloudDialogflowV2DetectIntentResponse"
42582	//   },
42583	//   "scopes": [
42584	//     "https://www.googleapis.com/auth/cloud-platform",
42585	//     "https://www.googleapis.com/auth/dialogflow"
42586	//   ]
42587	// }
42588
42589}
42590
42591// method id "dialogflow.projects.locations.agent.sessions.contexts.create":
42592
42593type ProjectsLocationsAgentSessionsContextsCreateCall struct {
42594	s                              *Service
42595	parent                         string
42596	googleclouddialogflowv2context *GoogleCloudDialogflowV2Context
42597	urlParams_                     gensupport.URLParams
42598	ctx_                           context.Context
42599	header_                        http.Header
42600}
42601
42602// Create: Creates a context. If the specified context already exists,
42603// overrides the context.
42604//
42605// - parent: The session to create a context for. Format:
42606//   `projects//agent/sessions/` or
42607//   `projects//agent/environments//users//sessions/`. If `Environment
42608//   ID` is not specified, we assume default 'draft' environment. If
42609//   `User ID` is not specified, we assume default '-' user.
42610func (r *ProjectsLocationsAgentSessionsContextsService) Create(parent string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsLocationsAgentSessionsContextsCreateCall {
42611	c := &ProjectsLocationsAgentSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42612	c.parent = parent
42613	c.googleclouddialogflowv2context = googleclouddialogflowv2context
42614	return c
42615}
42616
42617// Fields allows partial responses to be retrieved. See
42618// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42619// for more information.
42620func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsCreateCall {
42621	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42622	return c
42623}
42624
42625// Context sets the context to be used in this call's Do method. Any
42626// pending HTTP request will be aborted if the provided context is
42627// canceled.
42628func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsCreateCall {
42629	c.ctx_ = ctx
42630	return c
42631}
42632
42633// Header returns an http.Header that can be modified by the caller to
42634// add HTTP headers to the request.
42635func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Header() http.Header {
42636	if c.header_ == nil {
42637		c.header_ = make(http.Header)
42638	}
42639	return c.header_
42640}
42641
42642func (c *ProjectsLocationsAgentSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
42643	reqHeaders := make(http.Header)
42644	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
42645	for k, v := range c.header_ {
42646		reqHeaders[k] = v
42647	}
42648	reqHeaders.Set("User-Agent", c.s.userAgent())
42649	var body io.Reader = nil
42650	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context)
42651	if err != nil {
42652		return nil, err
42653	}
42654	reqHeaders.Set("Content-Type", "application/json")
42655	c.urlParams_.Set("alt", alt)
42656	c.urlParams_.Set("prettyPrint", "false")
42657	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
42658	urls += "?" + c.urlParams_.Encode()
42659	req, err := http.NewRequest("POST", urls, body)
42660	if err != nil {
42661		return nil, err
42662	}
42663	req.Header = reqHeaders
42664	googleapi.Expand(req.URL, map[string]string{
42665		"parent": c.parent,
42666	})
42667	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42668}
42669
42670// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.create" call.
42671// Exactly one of *GoogleCloudDialogflowV2Context or error will be
42672// non-nil. Any non-2xx status code is an error. Response headers are in
42673// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
42674// response was returned at all) in error.(*googleapi.Error).Header. Use
42675// googleapi.IsNotModified to check whether the returned error was
42676// because http.StatusNotModified was returned.
42677func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
42678	gensupport.SetOptions(c.urlParams_, opts...)
42679	res, err := c.doRequest("json")
42680	if res != nil && res.StatusCode == http.StatusNotModified {
42681		if res.Body != nil {
42682			res.Body.Close()
42683		}
42684		return nil, &googleapi.Error{
42685			Code:   res.StatusCode,
42686			Header: res.Header,
42687		}
42688	}
42689	if err != nil {
42690		return nil, err
42691	}
42692	defer googleapi.CloseBody(res)
42693	if err := googleapi.CheckResponse(res); err != nil {
42694		return nil, err
42695	}
42696	ret := &GoogleCloudDialogflowV2Context{
42697		ServerResponse: googleapi.ServerResponse{
42698			Header:         res.Header,
42699			HTTPStatusCode: res.StatusCode,
42700		},
42701	}
42702	target := &ret
42703	if err := gensupport.DecodeResponse(target, res); err != nil {
42704		return nil, err
42705	}
42706	return ret, nil
42707	// {
42708	//   "description": "Creates a context. If the specified context already exists, overrides the context.",
42709	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts",
42710	//   "httpMethod": "POST",
42711	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.create",
42712	//   "parameterOrder": [
42713	//     "parent"
42714	//   ],
42715	//   "parameters": {
42716	//     "parent": {
42717	//       "description": "Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
42718	//       "location": "path",
42719	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
42720	//       "required": true,
42721	//       "type": "string"
42722	//     }
42723	//   },
42724	//   "path": "v2/{+parent}/contexts",
42725	//   "request": {
42726	//     "$ref": "GoogleCloudDialogflowV2Context"
42727	//   },
42728	//   "response": {
42729	//     "$ref": "GoogleCloudDialogflowV2Context"
42730	//   },
42731	//   "scopes": [
42732	//     "https://www.googleapis.com/auth/cloud-platform",
42733	//     "https://www.googleapis.com/auth/dialogflow"
42734	//   ]
42735	// }
42736
42737}
42738
42739// method id "dialogflow.projects.locations.agent.sessions.contexts.delete":
42740
42741type ProjectsLocationsAgentSessionsContextsDeleteCall struct {
42742	s          *Service
42743	name       string
42744	urlParams_ gensupport.URLParams
42745	ctx_       context.Context
42746	header_    http.Header
42747}
42748
42749// Delete: Deletes the specified context.
42750//
42751// - name: The name of the context to delete. Format:
42752//   `projects//agent/sessions//contexts/` or
42753//   `projects//agent/environments//users//sessions//contexts/`. If
42754//   `Environment ID` is not specified, we assume default 'draft'
42755//   environment. If `User ID` is not specified, we assume default '-'
42756//   user.
42757func (r *ProjectsLocationsAgentSessionsContextsService) Delete(name string) *ProjectsLocationsAgentSessionsContextsDeleteCall {
42758	c := &ProjectsLocationsAgentSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42759	c.name = name
42760	return c
42761}
42762
42763// Fields allows partial responses to be retrieved. See
42764// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42765// for more information.
42766func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsDeleteCall {
42767	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42768	return c
42769}
42770
42771// Context sets the context to be used in this call's Do method. Any
42772// pending HTTP request will be aborted if the provided context is
42773// canceled.
42774func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsDeleteCall {
42775	c.ctx_ = ctx
42776	return c
42777}
42778
42779// Header returns an http.Header that can be modified by the caller to
42780// add HTTP headers to the request.
42781func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Header() http.Header {
42782	if c.header_ == nil {
42783		c.header_ = make(http.Header)
42784	}
42785	return c.header_
42786}
42787
42788func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
42789	reqHeaders := make(http.Header)
42790	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
42791	for k, v := range c.header_ {
42792		reqHeaders[k] = v
42793	}
42794	reqHeaders.Set("User-Agent", c.s.userAgent())
42795	var body io.Reader = nil
42796	c.urlParams_.Set("alt", alt)
42797	c.urlParams_.Set("prettyPrint", "false")
42798	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
42799	urls += "?" + c.urlParams_.Encode()
42800	req, err := http.NewRequest("DELETE", urls, body)
42801	if err != nil {
42802		return nil, err
42803	}
42804	req.Header = reqHeaders
42805	googleapi.Expand(req.URL, map[string]string{
42806		"name": c.name,
42807	})
42808	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42809}
42810
42811// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.delete" call.
42812// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
42813// non-2xx status code is an error. Response headers are in either
42814// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
42815// returned at all) in error.(*googleapi.Error).Header. Use
42816// googleapi.IsNotModified to check whether the returned error was
42817// because http.StatusNotModified was returned.
42818func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
42819	gensupport.SetOptions(c.urlParams_, opts...)
42820	res, err := c.doRequest("json")
42821	if res != nil && res.StatusCode == http.StatusNotModified {
42822		if res.Body != nil {
42823			res.Body.Close()
42824		}
42825		return nil, &googleapi.Error{
42826			Code:   res.StatusCode,
42827			Header: res.Header,
42828		}
42829	}
42830	if err != nil {
42831		return nil, err
42832	}
42833	defer googleapi.CloseBody(res)
42834	if err := googleapi.CheckResponse(res); err != nil {
42835		return nil, err
42836	}
42837	ret := &GoogleProtobufEmpty{
42838		ServerResponse: googleapi.ServerResponse{
42839			Header:         res.Header,
42840			HTTPStatusCode: res.StatusCode,
42841		},
42842	}
42843	target := &ret
42844	if err := gensupport.DecodeResponse(target, res); err != nil {
42845		return nil, err
42846	}
42847	return ret, nil
42848	// {
42849	//   "description": "Deletes the specified context.",
42850	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
42851	//   "httpMethod": "DELETE",
42852	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.delete",
42853	//   "parameterOrder": [
42854	//     "name"
42855	//   ],
42856	//   "parameters": {
42857	//     "name": {
42858	//       "description": "Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
42859	//       "location": "path",
42860	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
42861	//       "required": true,
42862	//       "type": "string"
42863	//     }
42864	//   },
42865	//   "path": "v2/{+name}",
42866	//   "response": {
42867	//     "$ref": "GoogleProtobufEmpty"
42868	//   },
42869	//   "scopes": [
42870	//     "https://www.googleapis.com/auth/cloud-platform",
42871	//     "https://www.googleapis.com/auth/dialogflow"
42872	//   ]
42873	// }
42874
42875}
42876
42877// method id "dialogflow.projects.locations.agent.sessions.contexts.get":
42878
42879type ProjectsLocationsAgentSessionsContextsGetCall struct {
42880	s            *Service
42881	name         string
42882	urlParams_   gensupport.URLParams
42883	ifNoneMatch_ string
42884	ctx_         context.Context
42885	header_      http.Header
42886}
42887
42888// Get: Retrieves the specified context.
42889//
42890// - name: The name of the context. Format:
42891//   `projects//agent/sessions//contexts/` or
42892//   `projects//agent/environments//users//sessions//contexts/`. If
42893//   `Environment ID` is not specified, we assume default 'draft'
42894//   environment. If `User ID` is not specified, we assume default '-'
42895//   user.
42896func (r *ProjectsLocationsAgentSessionsContextsService) Get(name string) *ProjectsLocationsAgentSessionsContextsGetCall {
42897	c := &ProjectsLocationsAgentSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42898	c.name = name
42899	return c
42900}
42901
42902// Fields allows partial responses to be retrieved. See
42903// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42904// for more information.
42905func (c *ProjectsLocationsAgentSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsGetCall {
42906	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42907	return c
42908}
42909
42910// IfNoneMatch sets the optional parameter which makes the operation
42911// fail if the object's ETag matches the given value. This is useful for
42912// getting updates only after the object has changed since the last
42913// request. Use googleapi.IsNotModified to check whether the response
42914// error from Do is the result of In-None-Match.
42915func (c *ProjectsLocationsAgentSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsContextsGetCall {
42916	c.ifNoneMatch_ = entityTag
42917	return c
42918}
42919
42920// Context sets the context to be used in this call's Do method. Any
42921// pending HTTP request will be aborted if the provided context is
42922// canceled.
42923func (c *ProjectsLocationsAgentSessionsContextsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsGetCall {
42924	c.ctx_ = ctx
42925	return c
42926}
42927
42928// Header returns an http.Header that can be modified by the caller to
42929// add HTTP headers to the request.
42930func (c *ProjectsLocationsAgentSessionsContextsGetCall) Header() http.Header {
42931	if c.header_ == nil {
42932		c.header_ = make(http.Header)
42933	}
42934	return c.header_
42935}
42936
42937func (c *ProjectsLocationsAgentSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
42938	reqHeaders := make(http.Header)
42939	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
42940	for k, v := range c.header_ {
42941		reqHeaders[k] = v
42942	}
42943	reqHeaders.Set("User-Agent", c.s.userAgent())
42944	if c.ifNoneMatch_ != "" {
42945		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42946	}
42947	var body io.Reader = nil
42948	c.urlParams_.Set("alt", alt)
42949	c.urlParams_.Set("prettyPrint", "false")
42950	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
42951	urls += "?" + c.urlParams_.Encode()
42952	req, err := http.NewRequest("GET", urls, body)
42953	if err != nil {
42954		return nil, err
42955	}
42956	req.Header = reqHeaders
42957	googleapi.Expand(req.URL, map[string]string{
42958		"name": c.name,
42959	})
42960	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42961}
42962
42963// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.get" call.
42964// Exactly one of *GoogleCloudDialogflowV2Context or error will be
42965// non-nil. Any non-2xx status code is an error. Response headers are in
42966// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
42967// response was returned at all) in error.(*googleapi.Error).Header. Use
42968// googleapi.IsNotModified to check whether the returned error was
42969// because http.StatusNotModified was returned.
42970func (c *ProjectsLocationsAgentSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
42971	gensupport.SetOptions(c.urlParams_, opts...)
42972	res, err := c.doRequest("json")
42973	if res != nil && res.StatusCode == http.StatusNotModified {
42974		if res.Body != nil {
42975			res.Body.Close()
42976		}
42977		return nil, &googleapi.Error{
42978			Code:   res.StatusCode,
42979			Header: res.Header,
42980		}
42981	}
42982	if err != nil {
42983		return nil, err
42984	}
42985	defer googleapi.CloseBody(res)
42986	if err := googleapi.CheckResponse(res); err != nil {
42987		return nil, err
42988	}
42989	ret := &GoogleCloudDialogflowV2Context{
42990		ServerResponse: googleapi.ServerResponse{
42991			Header:         res.Header,
42992			HTTPStatusCode: res.StatusCode,
42993		},
42994	}
42995	target := &ret
42996	if err := gensupport.DecodeResponse(target, res); err != nil {
42997		return nil, err
42998	}
42999	return ret, nil
43000	// {
43001	//   "description": "Retrieves the specified context.",
43002	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
43003	//   "httpMethod": "GET",
43004	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.get",
43005	//   "parameterOrder": [
43006	//     "name"
43007	//   ],
43008	//   "parameters": {
43009	//     "name": {
43010	//       "description": "Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
43011	//       "location": "path",
43012	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
43013	//       "required": true,
43014	//       "type": "string"
43015	//     }
43016	//   },
43017	//   "path": "v2/{+name}",
43018	//   "response": {
43019	//     "$ref": "GoogleCloudDialogflowV2Context"
43020	//   },
43021	//   "scopes": [
43022	//     "https://www.googleapis.com/auth/cloud-platform",
43023	//     "https://www.googleapis.com/auth/dialogflow"
43024	//   ]
43025	// }
43026
43027}
43028
43029// method id "dialogflow.projects.locations.agent.sessions.contexts.list":
43030
43031type ProjectsLocationsAgentSessionsContextsListCall struct {
43032	s            *Service
43033	parent       string
43034	urlParams_   gensupport.URLParams
43035	ifNoneMatch_ string
43036	ctx_         context.Context
43037	header_      http.Header
43038}
43039
43040// List: Returns the list of all contexts in the specified session.
43041//
43042// - parent: The session to list all contexts from. Format:
43043//   `projects//agent/sessions/` or
43044//   `projects//agent/environments//users//sessions/`. If `Environment
43045//   ID` is not specified, we assume default 'draft' environment. If
43046//   `User ID` is not specified, we assume default '-' user.
43047func (r *ProjectsLocationsAgentSessionsContextsService) List(parent string) *ProjectsLocationsAgentSessionsContextsListCall {
43048	c := &ProjectsLocationsAgentSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43049	c.parent = parent
43050	return c
43051}
43052
43053// PageSize sets the optional parameter "pageSize": The maximum number
43054// of items to return in a single page. By default 100 and at most 1000.
43055func (c *ProjectsLocationsAgentSessionsContextsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentSessionsContextsListCall {
43056	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
43057	return c
43058}
43059
43060// PageToken sets the optional parameter "pageToken": The
43061// next_page_token value returned from a previous list request.
43062func (c *ProjectsLocationsAgentSessionsContextsListCall) PageToken(pageToken string) *ProjectsLocationsAgentSessionsContextsListCall {
43063	c.urlParams_.Set("pageToken", pageToken)
43064	return c
43065}
43066
43067// Fields allows partial responses to be retrieved. See
43068// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43069// for more information.
43070func (c *ProjectsLocationsAgentSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsListCall {
43071	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43072	return c
43073}
43074
43075// IfNoneMatch sets the optional parameter which makes the operation
43076// fail if the object's ETag matches the given value. This is useful for
43077// getting updates only after the object has changed since the last
43078// request. Use googleapi.IsNotModified to check whether the response
43079// error from Do is the result of In-None-Match.
43080func (c *ProjectsLocationsAgentSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsContextsListCall {
43081	c.ifNoneMatch_ = entityTag
43082	return c
43083}
43084
43085// Context sets the context to be used in this call's Do method. Any
43086// pending HTTP request will be aborted if the provided context is
43087// canceled.
43088func (c *ProjectsLocationsAgentSessionsContextsListCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsListCall {
43089	c.ctx_ = ctx
43090	return c
43091}
43092
43093// Header returns an http.Header that can be modified by the caller to
43094// add HTTP headers to the request.
43095func (c *ProjectsLocationsAgentSessionsContextsListCall) Header() http.Header {
43096	if c.header_ == nil {
43097		c.header_ = make(http.Header)
43098	}
43099	return c.header_
43100}
43101
43102func (c *ProjectsLocationsAgentSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
43103	reqHeaders := make(http.Header)
43104	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
43105	for k, v := range c.header_ {
43106		reqHeaders[k] = v
43107	}
43108	reqHeaders.Set("User-Agent", c.s.userAgent())
43109	if c.ifNoneMatch_ != "" {
43110		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43111	}
43112	var body io.Reader = nil
43113	c.urlParams_.Set("alt", alt)
43114	c.urlParams_.Set("prettyPrint", "false")
43115	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/contexts")
43116	urls += "?" + c.urlParams_.Encode()
43117	req, err := http.NewRequest("GET", urls, body)
43118	if err != nil {
43119		return nil, err
43120	}
43121	req.Header = reqHeaders
43122	googleapi.Expand(req.URL, map[string]string{
43123		"parent": c.parent,
43124	})
43125	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43126}
43127
43128// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.list" call.
43129// Exactly one of *GoogleCloudDialogflowV2ListContextsResponse or error
43130// will be non-nil. Any non-2xx status code is an error. Response
43131// headers are in either
43132// *GoogleCloudDialogflowV2ListContextsResponse.ServerResponse.Header or
43133// (if a response was returned at all) in
43134// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
43135// whether the returned error was because http.StatusNotModified was
43136// returned.
43137func (c *ProjectsLocationsAgentSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListContextsResponse, error) {
43138	gensupport.SetOptions(c.urlParams_, opts...)
43139	res, err := c.doRequest("json")
43140	if res != nil && res.StatusCode == http.StatusNotModified {
43141		if res.Body != nil {
43142			res.Body.Close()
43143		}
43144		return nil, &googleapi.Error{
43145			Code:   res.StatusCode,
43146			Header: res.Header,
43147		}
43148	}
43149	if err != nil {
43150		return nil, err
43151	}
43152	defer googleapi.CloseBody(res)
43153	if err := googleapi.CheckResponse(res); err != nil {
43154		return nil, err
43155	}
43156	ret := &GoogleCloudDialogflowV2ListContextsResponse{
43157		ServerResponse: googleapi.ServerResponse{
43158			Header:         res.Header,
43159			HTTPStatusCode: res.StatusCode,
43160		},
43161	}
43162	target := &ret
43163	if err := gensupport.DecodeResponse(target, res); err != nil {
43164		return nil, err
43165	}
43166	return ret, nil
43167	// {
43168	//   "description": "Returns the list of all contexts in the specified session.",
43169	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts",
43170	//   "httpMethod": "GET",
43171	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.list",
43172	//   "parameterOrder": [
43173	//     "parent"
43174	//   ],
43175	//   "parameters": {
43176	//     "pageSize": {
43177	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
43178	//       "format": "int32",
43179	//       "location": "query",
43180	//       "type": "integer"
43181	//     },
43182	//     "pageToken": {
43183	//       "description": "Optional. The next_page_token value returned from a previous list request.",
43184	//       "location": "query",
43185	//       "type": "string"
43186	//     },
43187	//     "parent": {
43188	//       "description": "Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
43189	//       "location": "path",
43190	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
43191	//       "required": true,
43192	//       "type": "string"
43193	//     }
43194	//   },
43195	//   "path": "v2/{+parent}/contexts",
43196	//   "response": {
43197	//     "$ref": "GoogleCloudDialogflowV2ListContextsResponse"
43198	//   },
43199	//   "scopes": [
43200	//     "https://www.googleapis.com/auth/cloud-platform",
43201	//     "https://www.googleapis.com/auth/dialogflow"
43202	//   ]
43203	// }
43204
43205}
43206
43207// Pages invokes f for each page of results.
43208// A non-nil error returned from f will halt the iteration.
43209// The provided context supersedes any context provided to the Context method.
43210func (c *ProjectsLocationsAgentSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListContextsResponse) error) error {
43211	c.ctx_ = ctx
43212	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
43213	for {
43214		x, err := c.Do()
43215		if err != nil {
43216			return err
43217		}
43218		if err := f(x); err != nil {
43219			return err
43220		}
43221		if x.NextPageToken == "" {
43222			return nil
43223		}
43224		c.PageToken(x.NextPageToken)
43225	}
43226}
43227
43228// method id "dialogflow.projects.locations.agent.sessions.contexts.patch":
43229
43230type ProjectsLocationsAgentSessionsContextsPatchCall struct {
43231	s                              *Service
43232	nameid                         string
43233	googleclouddialogflowv2context *GoogleCloudDialogflowV2Context
43234	urlParams_                     gensupport.URLParams
43235	ctx_                           context.Context
43236	header_                        http.Header
43237}
43238
43239// Patch: Updates the specified context.
43240//
43241// - name: The unique identifier of the context. Format:
43242//   `projects//agent/sessions//contexts/`, or
43243//   `projects//agent/environments//users//sessions//contexts/`. The
43244//   `Context ID` is always converted to lowercase, may only contain
43245//   characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If
43246//   `Environment ID` is not specified, we assume default 'draft'
43247//   environment. If `User ID` is not specified, we assume default '-'
43248//   user. The following context names are reserved for internal use by
43249//   Dialogflow. You should not use these contexts or create contexts
43250//   with these names: * `__system_counters__` * `*_id_dialog_context` *
43251//   `*_dialog_params_size`.
43252func (r *ProjectsLocationsAgentSessionsContextsService) Patch(nameid string, googleclouddialogflowv2context *GoogleCloudDialogflowV2Context) *ProjectsLocationsAgentSessionsContextsPatchCall {
43253	c := &ProjectsLocationsAgentSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43254	c.nameid = nameid
43255	c.googleclouddialogflowv2context = googleclouddialogflowv2context
43256	return c
43257}
43258
43259// UpdateMask sets the optional parameter "updateMask": The mask to
43260// control which fields get updated.
43261func (c *ProjectsLocationsAgentSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentSessionsContextsPatchCall {
43262	c.urlParams_.Set("updateMask", updateMask)
43263	return c
43264}
43265
43266// Fields allows partial responses to be retrieved. See
43267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43268// for more information.
43269func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsPatchCall {
43270	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43271	return c
43272}
43273
43274// Context sets the context to be used in this call's Do method. Any
43275// pending HTTP request will be aborted if the provided context is
43276// canceled.
43277func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsPatchCall {
43278	c.ctx_ = ctx
43279	return c
43280}
43281
43282// Header returns an http.Header that can be modified by the caller to
43283// add HTTP headers to the request.
43284func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Header() http.Header {
43285	if c.header_ == nil {
43286		c.header_ = make(http.Header)
43287	}
43288	return c.header_
43289}
43290
43291func (c *ProjectsLocationsAgentSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
43292	reqHeaders := make(http.Header)
43293	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
43294	for k, v := range c.header_ {
43295		reqHeaders[k] = v
43296	}
43297	reqHeaders.Set("User-Agent", c.s.userAgent())
43298	var body io.Reader = nil
43299	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2context)
43300	if err != nil {
43301		return nil, err
43302	}
43303	reqHeaders.Set("Content-Type", "application/json")
43304	c.urlParams_.Set("alt", alt)
43305	c.urlParams_.Set("prettyPrint", "false")
43306	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
43307	urls += "?" + c.urlParams_.Encode()
43308	req, err := http.NewRequest("PATCH", urls, body)
43309	if err != nil {
43310		return nil, err
43311	}
43312	req.Header = reqHeaders
43313	googleapi.Expand(req.URL, map[string]string{
43314		"name": c.nameid,
43315	})
43316	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43317}
43318
43319// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.patch" call.
43320// Exactly one of *GoogleCloudDialogflowV2Context or error will be
43321// non-nil. Any non-2xx status code is an error. Response headers are in
43322// either *GoogleCloudDialogflowV2Context.ServerResponse.Header or (if a
43323// response was returned at all) in error.(*googleapi.Error).Header. Use
43324// googleapi.IsNotModified to check whether the returned error was
43325// because http.StatusNotModified was returned.
43326func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Context, error) {
43327	gensupport.SetOptions(c.urlParams_, opts...)
43328	res, err := c.doRequest("json")
43329	if res != nil && res.StatusCode == http.StatusNotModified {
43330		if res.Body != nil {
43331			res.Body.Close()
43332		}
43333		return nil, &googleapi.Error{
43334			Code:   res.StatusCode,
43335			Header: res.Header,
43336		}
43337	}
43338	if err != nil {
43339		return nil, err
43340	}
43341	defer googleapi.CloseBody(res)
43342	if err := googleapi.CheckResponse(res); err != nil {
43343		return nil, err
43344	}
43345	ret := &GoogleCloudDialogflowV2Context{
43346		ServerResponse: googleapi.ServerResponse{
43347			Header:         res.Header,
43348			HTTPStatusCode: res.StatusCode,
43349		},
43350	}
43351	target := &ret
43352	if err := gensupport.DecodeResponse(target, res); err != nil {
43353		return nil, err
43354	}
43355	return ret, nil
43356	// {
43357	//   "description": "Updates the specified context.",
43358	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
43359	//   "httpMethod": "PATCH",
43360	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.patch",
43361	//   "parameterOrder": [
43362	//     "name"
43363	//   ],
43364	//   "parameters": {
43365	//     "name": {
43366	//       "description": "Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`",
43367	//       "location": "path",
43368	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
43369	//       "required": true,
43370	//       "type": "string"
43371	//     },
43372	//     "updateMask": {
43373	//       "description": "Optional. The mask to control which fields get updated.",
43374	//       "format": "google-fieldmask",
43375	//       "location": "query",
43376	//       "type": "string"
43377	//     }
43378	//   },
43379	//   "path": "v2/{+name}",
43380	//   "request": {
43381	//     "$ref": "GoogleCloudDialogflowV2Context"
43382	//   },
43383	//   "response": {
43384	//     "$ref": "GoogleCloudDialogflowV2Context"
43385	//   },
43386	//   "scopes": [
43387	//     "https://www.googleapis.com/auth/cloud-platform",
43388	//     "https://www.googleapis.com/auth/dialogflow"
43389	//   ]
43390	// }
43391
43392}
43393
43394// method id "dialogflow.projects.locations.agent.sessions.entityTypes.create":
43395
43396type ProjectsLocationsAgentSessionsEntityTypesCreateCall struct {
43397	s                                        *Service
43398	parent                                   string
43399	googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType
43400	urlParams_                               gensupport.URLParams
43401	ctx_                                     context.Context
43402	header_                                  http.Header
43403}
43404
43405// Create: Creates a session entity type. If the specified session
43406// entity type already exists, overrides the session entity type. This
43407// method doesn't work with Google Assistant integration. Contact
43408// Dialogflow support if you need to use session entities with Google
43409// Assistant integration.
43410//
43411// - parent: The session to create a session entity type for. Format:
43412//   `projects//agent/sessions/` or
43413//   `projects//agent/environments//users// sessions/`. If `Environment
43414//   ID` is not specified, we assume default 'draft' environment. If
43415//   `User ID` is not specified, we assume default '-' user.
43416func (r *ProjectsLocationsAgentSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsLocationsAgentSessionsEntityTypesCreateCall {
43417	c := &ProjectsLocationsAgentSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43418	c.parent = parent
43419	c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype
43420	return c
43421}
43422
43423// Fields allows partial responses to be retrieved. See
43424// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43425// for more information.
43426func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesCreateCall {
43427	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43428	return c
43429}
43430
43431// Context sets the context to be used in this call's Do method. Any
43432// pending HTTP request will be aborted if the provided context is
43433// canceled.
43434func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesCreateCall {
43435	c.ctx_ = ctx
43436	return c
43437}
43438
43439// Header returns an http.Header that can be modified by the caller to
43440// add HTTP headers to the request.
43441func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Header() http.Header {
43442	if c.header_ == nil {
43443		c.header_ = make(http.Header)
43444	}
43445	return c.header_
43446}
43447
43448func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
43449	reqHeaders := make(http.Header)
43450	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
43451	for k, v := range c.header_ {
43452		reqHeaders[k] = v
43453	}
43454	reqHeaders.Set("User-Agent", c.s.userAgent())
43455	var body io.Reader = nil
43456	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype)
43457	if err != nil {
43458		return nil, err
43459	}
43460	reqHeaders.Set("Content-Type", "application/json")
43461	c.urlParams_.Set("alt", alt)
43462	c.urlParams_.Set("prettyPrint", "false")
43463	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
43464	urls += "?" + c.urlParams_.Encode()
43465	req, err := http.NewRequest("POST", urls, body)
43466	if err != nil {
43467		return nil, err
43468	}
43469	req.Header = reqHeaders
43470	googleapi.Expand(req.URL, map[string]string{
43471		"parent": c.parent,
43472	})
43473	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43474}
43475
43476// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.create" call.
43477// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
43478// will be non-nil. Any non-2xx status code is an error. Response
43479// headers are in either
43480// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
43481// (if a response was returned at all) in
43482// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
43483// whether the returned error was because http.StatusNotModified was
43484// returned.
43485func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
43486	gensupport.SetOptions(c.urlParams_, opts...)
43487	res, err := c.doRequest("json")
43488	if res != nil && res.StatusCode == http.StatusNotModified {
43489		if res.Body != nil {
43490			res.Body.Close()
43491		}
43492		return nil, &googleapi.Error{
43493			Code:   res.StatusCode,
43494			Header: res.Header,
43495		}
43496	}
43497	if err != nil {
43498		return nil, err
43499	}
43500	defer googleapi.CloseBody(res)
43501	if err := googleapi.CheckResponse(res); err != nil {
43502		return nil, err
43503	}
43504	ret := &GoogleCloudDialogflowV2SessionEntityType{
43505		ServerResponse: googleapi.ServerResponse{
43506			Header:         res.Header,
43507			HTTPStatusCode: res.StatusCode,
43508		},
43509	}
43510	target := &ret
43511	if err := gensupport.DecodeResponse(target, res); err != nil {
43512		return nil, err
43513	}
43514	return ret, nil
43515	// {
43516	//   "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
43517	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes",
43518	//   "httpMethod": "POST",
43519	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.create",
43520	//   "parameterOrder": [
43521	//     "parent"
43522	//   ],
43523	//   "parameters": {
43524	//     "parent": {
43525	//       "description": "Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
43526	//       "location": "path",
43527	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
43528	//       "required": true,
43529	//       "type": "string"
43530	//     }
43531	//   },
43532	//   "path": "v2/{+parent}/entityTypes",
43533	//   "request": {
43534	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
43535	//   },
43536	//   "response": {
43537	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
43538	//   },
43539	//   "scopes": [
43540	//     "https://www.googleapis.com/auth/cloud-platform",
43541	//     "https://www.googleapis.com/auth/dialogflow"
43542	//   ]
43543	// }
43544
43545}
43546
43547// method id "dialogflow.projects.locations.agent.sessions.entityTypes.delete":
43548
43549type ProjectsLocationsAgentSessionsEntityTypesDeleteCall struct {
43550	s          *Service
43551	name       string
43552	urlParams_ gensupport.URLParams
43553	ctx_       context.Context
43554	header_    http.Header
43555}
43556
43557// Delete: Deletes the specified session entity type. This method
43558// doesn't work with Google Assistant integration. Contact Dialogflow
43559// support if you need to use session entities with Google Assistant
43560// integration.
43561//
43562// - name: The name of the entity type to delete. Format:
43563//   `projects//agent/sessions//entityTypes/` or
43564//   `projects//agent/environments//users//sessions//entityTypes/`. If
43565//   `Environment ID` is not specified, we assume default 'draft'
43566//   environment. If `User ID` is not specified, we assume default '-'
43567//   user.
43568func (r *ProjectsLocationsAgentSessionsEntityTypesService) Delete(name string) *ProjectsLocationsAgentSessionsEntityTypesDeleteCall {
43569	c := &ProjectsLocationsAgentSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43570	c.name = name
43571	return c
43572}
43573
43574// Fields allows partial responses to be retrieved. See
43575// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43576// for more information.
43577func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesDeleteCall {
43578	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43579	return c
43580}
43581
43582// Context sets the context to be used in this call's Do method. Any
43583// pending HTTP request will be aborted if the provided context is
43584// canceled.
43585func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesDeleteCall {
43586	c.ctx_ = ctx
43587	return c
43588}
43589
43590// Header returns an http.Header that can be modified by the caller to
43591// add HTTP headers to the request.
43592func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Header() http.Header {
43593	if c.header_ == nil {
43594		c.header_ = make(http.Header)
43595	}
43596	return c.header_
43597}
43598
43599func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
43600	reqHeaders := make(http.Header)
43601	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
43602	for k, v := range c.header_ {
43603		reqHeaders[k] = v
43604	}
43605	reqHeaders.Set("User-Agent", c.s.userAgent())
43606	var body io.Reader = nil
43607	c.urlParams_.Set("alt", alt)
43608	c.urlParams_.Set("prettyPrint", "false")
43609	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
43610	urls += "?" + c.urlParams_.Encode()
43611	req, err := http.NewRequest("DELETE", urls, body)
43612	if err != nil {
43613		return nil, err
43614	}
43615	req.Header = reqHeaders
43616	googleapi.Expand(req.URL, map[string]string{
43617		"name": c.name,
43618	})
43619	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43620}
43621
43622// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.delete" call.
43623// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
43624// non-2xx status code is an error. Response headers are in either
43625// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
43626// returned at all) in error.(*googleapi.Error).Header. Use
43627// googleapi.IsNotModified to check whether the returned error was
43628// because http.StatusNotModified was returned.
43629func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
43630	gensupport.SetOptions(c.urlParams_, opts...)
43631	res, err := c.doRequest("json")
43632	if res != nil && res.StatusCode == http.StatusNotModified {
43633		if res.Body != nil {
43634			res.Body.Close()
43635		}
43636		return nil, &googleapi.Error{
43637			Code:   res.StatusCode,
43638			Header: res.Header,
43639		}
43640	}
43641	if err != nil {
43642		return nil, err
43643	}
43644	defer googleapi.CloseBody(res)
43645	if err := googleapi.CheckResponse(res); err != nil {
43646		return nil, err
43647	}
43648	ret := &GoogleProtobufEmpty{
43649		ServerResponse: googleapi.ServerResponse{
43650			Header:         res.Header,
43651			HTTPStatusCode: res.StatusCode,
43652		},
43653	}
43654	target := &ret
43655	if err := gensupport.DecodeResponse(target, res); err != nil {
43656		return nil, err
43657	}
43658	return ret, nil
43659	// {
43660	//   "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
43661	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
43662	//   "httpMethod": "DELETE",
43663	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.delete",
43664	//   "parameterOrder": [
43665	//     "name"
43666	//   ],
43667	//   "parameters": {
43668	//     "name": {
43669	//       "description": "Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
43670	//       "location": "path",
43671	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
43672	//       "required": true,
43673	//       "type": "string"
43674	//     }
43675	//   },
43676	//   "path": "v2/{+name}",
43677	//   "response": {
43678	//     "$ref": "GoogleProtobufEmpty"
43679	//   },
43680	//   "scopes": [
43681	//     "https://www.googleapis.com/auth/cloud-platform",
43682	//     "https://www.googleapis.com/auth/dialogflow"
43683	//   ]
43684	// }
43685
43686}
43687
43688// method id "dialogflow.projects.locations.agent.sessions.entityTypes.get":
43689
43690type ProjectsLocationsAgentSessionsEntityTypesGetCall struct {
43691	s            *Service
43692	name         string
43693	urlParams_   gensupport.URLParams
43694	ifNoneMatch_ string
43695	ctx_         context.Context
43696	header_      http.Header
43697}
43698
43699// Get: Retrieves the specified session entity type. This method doesn't
43700// work with Google Assistant integration. Contact Dialogflow support if
43701// you need to use session entities with Google Assistant integration.
43702//
43703// - name: The name of the session entity type. Format:
43704//   `projects//agent/sessions//entityTypes/` or
43705//   `projects//agent/environments//users//sessions//entityTypes/`. If
43706//   `Environment ID` is not specified, we assume default 'draft'
43707//   environment. If `User ID` is not specified, we assume default '-'
43708//   user.
43709func (r *ProjectsLocationsAgentSessionsEntityTypesService) Get(name string) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
43710	c := &ProjectsLocationsAgentSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43711	c.name = name
43712	return c
43713}
43714
43715// Fields allows partial responses to be retrieved. See
43716// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43717// for more information.
43718func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
43719	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43720	return c
43721}
43722
43723// IfNoneMatch sets the optional parameter which makes the operation
43724// fail if the object's ETag matches the given value. This is useful for
43725// getting updates only after the object has changed since the last
43726// request. Use googleapi.IsNotModified to check whether the response
43727// error from Do is the result of In-None-Match.
43728func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
43729	c.ifNoneMatch_ = entityTag
43730	return c
43731}
43732
43733// Context sets the context to be used in this call's Do method. Any
43734// pending HTTP request will be aborted if the provided context is
43735// canceled.
43736func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
43737	c.ctx_ = ctx
43738	return c
43739}
43740
43741// Header returns an http.Header that can be modified by the caller to
43742// add HTTP headers to the request.
43743func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Header() http.Header {
43744	if c.header_ == nil {
43745		c.header_ = make(http.Header)
43746	}
43747	return c.header_
43748}
43749
43750func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
43751	reqHeaders := make(http.Header)
43752	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
43753	for k, v := range c.header_ {
43754		reqHeaders[k] = v
43755	}
43756	reqHeaders.Set("User-Agent", c.s.userAgent())
43757	if c.ifNoneMatch_ != "" {
43758		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43759	}
43760	var body io.Reader = nil
43761	c.urlParams_.Set("alt", alt)
43762	c.urlParams_.Set("prettyPrint", "false")
43763	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
43764	urls += "?" + c.urlParams_.Encode()
43765	req, err := http.NewRequest("GET", urls, body)
43766	if err != nil {
43767		return nil, err
43768	}
43769	req.Header = reqHeaders
43770	googleapi.Expand(req.URL, map[string]string{
43771		"name": c.name,
43772	})
43773	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43774}
43775
43776// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.get" call.
43777// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
43778// will be non-nil. Any non-2xx status code is an error. Response
43779// headers are in either
43780// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
43781// (if a response was returned at all) in
43782// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
43783// whether the returned error was because http.StatusNotModified was
43784// returned.
43785func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
43786	gensupport.SetOptions(c.urlParams_, opts...)
43787	res, err := c.doRequest("json")
43788	if res != nil && res.StatusCode == http.StatusNotModified {
43789		if res.Body != nil {
43790			res.Body.Close()
43791		}
43792		return nil, &googleapi.Error{
43793			Code:   res.StatusCode,
43794			Header: res.Header,
43795		}
43796	}
43797	if err != nil {
43798		return nil, err
43799	}
43800	defer googleapi.CloseBody(res)
43801	if err := googleapi.CheckResponse(res); err != nil {
43802		return nil, err
43803	}
43804	ret := &GoogleCloudDialogflowV2SessionEntityType{
43805		ServerResponse: googleapi.ServerResponse{
43806			Header:         res.Header,
43807			HTTPStatusCode: res.StatusCode,
43808		},
43809	}
43810	target := &ret
43811	if err := gensupport.DecodeResponse(target, res); err != nil {
43812		return nil, err
43813	}
43814	return ret, nil
43815	// {
43816	//   "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
43817	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
43818	//   "httpMethod": "GET",
43819	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.get",
43820	//   "parameterOrder": [
43821	//     "name"
43822	//   ],
43823	//   "parameters": {
43824	//     "name": {
43825	//       "description": "Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
43826	//       "location": "path",
43827	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
43828	//       "required": true,
43829	//       "type": "string"
43830	//     }
43831	//   },
43832	//   "path": "v2/{+name}",
43833	//   "response": {
43834	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
43835	//   },
43836	//   "scopes": [
43837	//     "https://www.googleapis.com/auth/cloud-platform",
43838	//     "https://www.googleapis.com/auth/dialogflow"
43839	//   ]
43840	// }
43841
43842}
43843
43844// method id "dialogflow.projects.locations.agent.sessions.entityTypes.list":
43845
43846type ProjectsLocationsAgentSessionsEntityTypesListCall struct {
43847	s            *Service
43848	parent       string
43849	urlParams_   gensupport.URLParams
43850	ifNoneMatch_ string
43851	ctx_         context.Context
43852	header_      http.Header
43853}
43854
43855// List: Returns the list of all session entity types in the specified
43856// session. This method doesn't work with Google Assistant integration.
43857// Contact Dialogflow support if you need to use session entities with
43858// Google Assistant integration.
43859//
43860// - parent: The session to list all session entity types from. Format:
43861//   `projects//agent/sessions/` or
43862//   `projects//agent/environments//users// sessions/`. If `Environment
43863//   ID` is not specified, we assume default 'draft' environment. If
43864//   `User ID` is not specified, we assume default '-' user.
43865func (r *ProjectsLocationsAgentSessionsEntityTypesService) List(parent string) *ProjectsLocationsAgentSessionsEntityTypesListCall {
43866	c := &ProjectsLocationsAgentSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43867	c.parent = parent
43868	return c
43869}
43870
43871// PageSize sets the optional parameter "pageSize": The maximum number
43872// of items to return in a single page. By default 100 and at most 1000.
43873func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentSessionsEntityTypesListCall {
43874	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
43875	return c
43876}
43877
43878// PageToken sets the optional parameter "pageToken": The
43879// next_page_token value returned from a previous list request.
43880func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentSessionsEntityTypesListCall {
43881	c.urlParams_.Set("pageToken", pageToken)
43882	return c
43883}
43884
43885// Fields allows partial responses to be retrieved. See
43886// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43887// for more information.
43888func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesListCall {
43889	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43890	return c
43891}
43892
43893// IfNoneMatch sets the optional parameter which makes the operation
43894// fail if the object's ETag matches the given value. This is useful for
43895// getting updates only after the object has changed since the last
43896// request. Use googleapi.IsNotModified to check whether the response
43897// error from Do is the result of In-None-Match.
43898func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsEntityTypesListCall {
43899	c.ifNoneMatch_ = entityTag
43900	return c
43901}
43902
43903// Context sets the context to be used in this call's Do method. Any
43904// pending HTTP request will be aborted if the provided context is
43905// canceled.
43906func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesListCall {
43907	c.ctx_ = ctx
43908	return c
43909}
43910
43911// Header returns an http.Header that can be modified by the caller to
43912// add HTTP headers to the request.
43913func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Header() http.Header {
43914	if c.header_ == nil {
43915		c.header_ = make(http.Header)
43916	}
43917	return c.header_
43918}
43919
43920func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
43921	reqHeaders := make(http.Header)
43922	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
43923	for k, v := range c.header_ {
43924		reqHeaders[k] = v
43925	}
43926	reqHeaders.Set("User-Agent", c.s.userAgent())
43927	if c.ifNoneMatch_ != "" {
43928		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43929	}
43930	var body io.Reader = nil
43931	c.urlParams_.Set("alt", alt)
43932	c.urlParams_.Set("prettyPrint", "false")
43933	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/entityTypes")
43934	urls += "?" + c.urlParams_.Encode()
43935	req, err := http.NewRequest("GET", urls, body)
43936	if err != nil {
43937		return nil, err
43938	}
43939	req.Header = reqHeaders
43940	googleapi.Expand(req.URL, map[string]string{
43941		"parent": c.parent,
43942	})
43943	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43944}
43945
43946// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.list" call.
43947// Exactly one of *GoogleCloudDialogflowV2ListSessionEntityTypesResponse
43948// or error will be non-nil. Any non-2xx status code is an error.
43949// Response headers are in either
43950// *GoogleCloudDialogflowV2ListSessionEntityTypesResponse.ServerResponse.
43951// Header or (if a response was returned at all) in
43952// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
43953// whether the returned error was because http.StatusNotModified was
43954// returned.
43955func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListSessionEntityTypesResponse, error) {
43956	gensupport.SetOptions(c.urlParams_, opts...)
43957	res, err := c.doRequest("json")
43958	if res != nil && res.StatusCode == http.StatusNotModified {
43959		if res.Body != nil {
43960			res.Body.Close()
43961		}
43962		return nil, &googleapi.Error{
43963			Code:   res.StatusCode,
43964			Header: res.Header,
43965		}
43966	}
43967	if err != nil {
43968		return nil, err
43969	}
43970	defer googleapi.CloseBody(res)
43971	if err := googleapi.CheckResponse(res); err != nil {
43972		return nil, err
43973	}
43974	ret := &GoogleCloudDialogflowV2ListSessionEntityTypesResponse{
43975		ServerResponse: googleapi.ServerResponse{
43976			Header:         res.Header,
43977			HTTPStatusCode: res.StatusCode,
43978		},
43979	}
43980	target := &ret
43981	if err := gensupport.DecodeResponse(target, res); err != nil {
43982		return nil, err
43983	}
43984	return ret, nil
43985	// {
43986	//   "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
43987	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes",
43988	//   "httpMethod": "GET",
43989	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.list",
43990	//   "parameterOrder": [
43991	//     "parent"
43992	//   ],
43993	//   "parameters": {
43994	//     "pageSize": {
43995	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
43996	//       "format": "int32",
43997	//       "location": "query",
43998	//       "type": "integer"
43999	//     },
44000	//     "pageToken": {
44001	//       "description": "Optional. The next_page_token value returned from a previous list request.",
44002	//       "location": "query",
44003	//       "type": "string"
44004	//     },
44005	//     "parent": {
44006	//       "description": "Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.",
44007	//       "location": "path",
44008	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
44009	//       "required": true,
44010	//       "type": "string"
44011	//     }
44012	//   },
44013	//   "path": "v2/{+parent}/entityTypes",
44014	//   "response": {
44015	//     "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse"
44016	//   },
44017	//   "scopes": [
44018	//     "https://www.googleapis.com/auth/cloud-platform",
44019	//     "https://www.googleapis.com/auth/dialogflow"
44020	//   ]
44021	// }
44022
44023}
44024
44025// Pages invokes f for each page of results.
44026// A non-nil error returned from f will halt the iteration.
44027// The provided context supersedes any context provided to the Context method.
44028func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListSessionEntityTypesResponse) error) error {
44029	c.ctx_ = ctx
44030	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44031	for {
44032		x, err := c.Do()
44033		if err != nil {
44034			return err
44035		}
44036		if err := f(x); err != nil {
44037			return err
44038		}
44039		if x.NextPageToken == "" {
44040			return nil
44041		}
44042		c.PageToken(x.NextPageToken)
44043	}
44044}
44045
44046// method id "dialogflow.projects.locations.agent.sessions.entityTypes.patch":
44047
44048type ProjectsLocationsAgentSessionsEntityTypesPatchCall struct {
44049	s                                        *Service
44050	nameid                                   string
44051	googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType
44052	urlParams_                               gensupport.URLParams
44053	ctx_                                     context.Context
44054	header_                                  http.Header
44055}
44056
44057// Patch: Updates the specified session entity type. This method doesn't
44058// work with Google Assistant integration. Contact Dialogflow support if
44059// you need to use session entities with Google Assistant integration.
44060//
44061// - name: The unique identifier of this session entity type. Format:
44062//   `projects//agent/sessions//entityTypes/`, or
44063//   `projects//agent/environments//users//sessions//entityTypes/`. If
44064//   `Environment ID` is not specified, we assume default 'draft'
44065//   environment. If `User ID` is not specified, we assume default '-'
44066//   user. `` must be the display name of an existing entity type in the
44067//   same agent that will be overridden or supplemented.
44068func (r *ProjectsLocationsAgentSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2sessionentitytype *GoogleCloudDialogflowV2SessionEntityType) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
44069	c := &ProjectsLocationsAgentSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44070	c.nameid = nameid
44071	c.googleclouddialogflowv2sessionentitytype = googleclouddialogflowv2sessionentitytype
44072	return c
44073}
44074
44075// UpdateMask sets the optional parameter "updateMask": The mask to
44076// control which fields get updated.
44077func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
44078	c.urlParams_.Set("updateMask", updateMask)
44079	return c
44080}
44081
44082// Fields allows partial responses to be retrieved. See
44083// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44084// for more information.
44085func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
44086	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44087	return c
44088}
44089
44090// Context sets the context to be used in this call's Do method. Any
44091// pending HTTP request will be aborted if the provided context is
44092// canceled.
44093func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
44094	c.ctx_ = ctx
44095	return c
44096}
44097
44098// Header returns an http.Header that can be modified by the caller to
44099// add HTTP headers to the request.
44100func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Header() http.Header {
44101	if c.header_ == nil {
44102		c.header_ = make(http.Header)
44103	}
44104	return c.header_
44105}
44106
44107func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
44108	reqHeaders := make(http.Header)
44109	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
44110	for k, v := range c.header_ {
44111		reqHeaders[k] = v
44112	}
44113	reqHeaders.Set("User-Agent", c.s.userAgent())
44114	var body io.Reader = nil
44115	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2sessionentitytype)
44116	if err != nil {
44117		return nil, err
44118	}
44119	reqHeaders.Set("Content-Type", "application/json")
44120	c.urlParams_.Set("alt", alt)
44121	c.urlParams_.Set("prettyPrint", "false")
44122	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
44123	urls += "?" + c.urlParams_.Encode()
44124	req, err := http.NewRequest("PATCH", urls, body)
44125	if err != nil {
44126		return nil, err
44127	}
44128	req.Header = reqHeaders
44129	googleapi.Expand(req.URL, map[string]string{
44130		"name": c.nameid,
44131	})
44132	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44133}
44134
44135// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.patch" call.
44136// Exactly one of *GoogleCloudDialogflowV2SessionEntityType or error
44137// will be non-nil. Any non-2xx status code is an error. Response
44138// headers are in either
44139// *GoogleCloudDialogflowV2SessionEntityType.ServerResponse.Header or
44140// (if a response was returned at all) in
44141// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44142// whether the returned error was because http.StatusNotModified was
44143// returned.
44144func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SessionEntityType, error) {
44145	gensupport.SetOptions(c.urlParams_, opts...)
44146	res, err := c.doRequest("json")
44147	if res != nil && res.StatusCode == http.StatusNotModified {
44148		if res.Body != nil {
44149			res.Body.Close()
44150		}
44151		return nil, &googleapi.Error{
44152			Code:   res.StatusCode,
44153			Header: res.Header,
44154		}
44155	}
44156	if err != nil {
44157		return nil, err
44158	}
44159	defer googleapi.CloseBody(res)
44160	if err := googleapi.CheckResponse(res); err != nil {
44161		return nil, err
44162	}
44163	ret := &GoogleCloudDialogflowV2SessionEntityType{
44164		ServerResponse: googleapi.ServerResponse{
44165			Header:         res.Header,
44166			HTTPStatusCode: res.StatusCode,
44167		},
44168	}
44169	target := &ret
44170	if err := gensupport.DecodeResponse(target, res); err != nil {
44171		return nil, err
44172	}
44173	return ret, nil
44174	// {
44175	//   "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.",
44176	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
44177	//   "httpMethod": "PATCH",
44178	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.patch",
44179	//   "parameterOrder": [
44180	//     "name"
44181	//   ],
44182	//   "parameters": {
44183	//     "name": {
44184	//       "description": "Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.",
44185	//       "location": "path",
44186	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
44187	//       "required": true,
44188	//       "type": "string"
44189	//     },
44190	//     "updateMask": {
44191	//       "description": "Optional. The mask to control which fields get updated.",
44192	//       "format": "google-fieldmask",
44193	//       "location": "query",
44194	//       "type": "string"
44195	//     }
44196	//   },
44197	//   "path": "v2/{+name}",
44198	//   "request": {
44199	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
44200	//   },
44201	//   "response": {
44202	//     "$ref": "GoogleCloudDialogflowV2SessionEntityType"
44203	//   },
44204	//   "scopes": [
44205	//     "https://www.googleapis.com/auth/cloud-platform",
44206	//     "https://www.googleapis.com/auth/dialogflow"
44207	//   ]
44208	// }
44209
44210}
44211
44212// method id "dialogflow.projects.locations.agent.versions.create":
44213
44214type ProjectsLocationsAgentVersionsCreateCall struct {
44215	s                              *Service
44216	parent                         string
44217	googleclouddialogflowv2version *GoogleCloudDialogflowV2Version
44218	urlParams_                     gensupport.URLParams
44219	ctx_                           context.Context
44220	header_                        http.Header
44221}
44222
44223// Create: Creates an agent version. The new version points to the agent
44224// instance in the "default" environment.
44225//
44226// - parent: The agent to create a version for. Supported formats: -
44227//   `projects//agent` - `projects//locations//agent`.
44228func (r *ProjectsLocationsAgentVersionsService) Create(parent string, googleclouddialogflowv2version *GoogleCloudDialogflowV2Version) *ProjectsLocationsAgentVersionsCreateCall {
44229	c := &ProjectsLocationsAgentVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44230	c.parent = parent
44231	c.googleclouddialogflowv2version = googleclouddialogflowv2version
44232	return c
44233}
44234
44235// Fields allows partial responses to be retrieved. See
44236// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44237// for more information.
44238func (c *ProjectsLocationsAgentVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentVersionsCreateCall {
44239	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44240	return c
44241}
44242
44243// Context sets the context to be used in this call's Do method. Any
44244// pending HTTP request will be aborted if the provided context is
44245// canceled.
44246func (c *ProjectsLocationsAgentVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentVersionsCreateCall {
44247	c.ctx_ = ctx
44248	return c
44249}
44250
44251// Header returns an http.Header that can be modified by the caller to
44252// add HTTP headers to the request.
44253func (c *ProjectsLocationsAgentVersionsCreateCall) Header() http.Header {
44254	if c.header_ == nil {
44255		c.header_ = make(http.Header)
44256	}
44257	return c.header_
44258}
44259
44260func (c *ProjectsLocationsAgentVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
44261	reqHeaders := make(http.Header)
44262	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
44263	for k, v := range c.header_ {
44264		reqHeaders[k] = v
44265	}
44266	reqHeaders.Set("User-Agent", c.s.userAgent())
44267	var body io.Reader = nil
44268	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2version)
44269	if err != nil {
44270		return nil, err
44271	}
44272	reqHeaders.Set("Content-Type", "application/json")
44273	c.urlParams_.Set("alt", alt)
44274	c.urlParams_.Set("prettyPrint", "false")
44275	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/versions")
44276	urls += "?" + c.urlParams_.Encode()
44277	req, err := http.NewRequest("POST", urls, body)
44278	if err != nil {
44279		return nil, err
44280	}
44281	req.Header = reqHeaders
44282	googleapi.Expand(req.URL, map[string]string{
44283		"parent": c.parent,
44284	})
44285	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44286}
44287
44288// Do executes the "dialogflow.projects.locations.agent.versions.create" call.
44289// Exactly one of *GoogleCloudDialogflowV2Version or error will be
44290// non-nil. Any non-2xx status code is an error. Response headers are in
44291// either *GoogleCloudDialogflowV2Version.ServerResponse.Header or (if a
44292// response was returned at all) in error.(*googleapi.Error).Header. Use
44293// googleapi.IsNotModified to check whether the returned error was
44294// because http.StatusNotModified was returned.
44295func (c *ProjectsLocationsAgentVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Version, error) {
44296	gensupport.SetOptions(c.urlParams_, opts...)
44297	res, err := c.doRequest("json")
44298	if res != nil && res.StatusCode == http.StatusNotModified {
44299		if res.Body != nil {
44300			res.Body.Close()
44301		}
44302		return nil, &googleapi.Error{
44303			Code:   res.StatusCode,
44304			Header: res.Header,
44305		}
44306	}
44307	if err != nil {
44308		return nil, err
44309	}
44310	defer googleapi.CloseBody(res)
44311	if err := googleapi.CheckResponse(res); err != nil {
44312		return nil, err
44313	}
44314	ret := &GoogleCloudDialogflowV2Version{
44315		ServerResponse: googleapi.ServerResponse{
44316			Header:         res.Header,
44317			HTTPStatusCode: res.StatusCode,
44318		},
44319	}
44320	target := &ret
44321	if err := gensupport.DecodeResponse(target, res); err != nil {
44322		return nil, err
44323	}
44324	return ret, nil
44325	// {
44326	//   "description": "Creates an agent version. The new version points to the agent instance in the \"default\" environment.",
44327	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/versions",
44328	//   "httpMethod": "POST",
44329	//   "id": "dialogflow.projects.locations.agent.versions.create",
44330	//   "parameterOrder": [
44331	//     "parent"
44332	//   ],
44333	//   "parameters": {
44334	//     "parent": {
44335	//       "description": "Required. The agent to create a version for. Supported formats: - `projects//agent` - `projects//locations//agent`",
44336	//       "location": "path",
44337	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
44338	//       "required": true,
44339	//       "type": "string"
44340	//     }
44341	//   },
44342	//   "path": "v2/{+parent}/versions",
44343	//   "request": {
44344	//     "$ref": "GoogleCloudDialogflowV2Version"
44345	//   },
44346	//   "response": {
44347	//     "$ref": "GoogleCloudDialogflowV2Version"
44348	//   },
44349	//   "scopes": [
44350	//     "https://www.googleapis.com/auth/cloud-platform",
44351	//     "https://www.googleapis.com/auth/dialogflow"
44352	//   ]
44353	// }
44354
44355}
44356
44357// method id "dialogflow.projects.locations.agent.versions.delete":
44358
44359type ProjectsLocationsAgentVersionsDeleteCall struct {
44360	s          *Service
44361	name       string
44362	urlParams_ gensupport.URLParams
44363	ctx_       context.Context
44364	header_    http.Header
44365}
44366
44367// Delete: Delete the specified agent version.
44368//
44369// - name: The name of the version to delete. Supported formats: -
44370//   `projects//agent/versions/` -
44371//   `projects//locations//agent/versions/`.
44372func (r *ProjectsLocationsAgentVersionsService) Delete(name string) *ProjectsLocationsAgentVersionsDeleteCall {
44373	c := &ProjectsLocationsAgentVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44374	c.name = name
44375	return c
44376}
44377
44378// Fields allows partial responses to be retrieved. See
44379// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44380// for more information.
44381func (c *ProjectsLocationsAgentVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentVersionsDeleteCall {
44382	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44383	return c
44384}
44385
44386// Context sets the context to be used in this call's Do method. Any
44387// pending HTTP request will be aborted if the provided context is
44388// canceled.
44389func (c *ProjectsLocationsAgentVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentVersionsDeleteCall {
44390	c.ctx_ = ctx
44391	return c
44392}
44393
44394// Header returns an http.Header that can be modified by the caller to
44395// add HTTP headers to the request.
44396func (c *ProjectsLocationsAgentVersionsDeleteCall) Header() http.Header {
44397	if c.header_ == nil {
44398		c.header_ = make(http.Header)
44399	}
44400	return c.header_
44401}
44402
44403func (c *ProjectsLocationsAgentVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
44404	reqHeaders := make(http.Header)
44405	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
44406	for k, v := range c.header_ {
44407		reqHeaders[k] = v
44408	}
44409	reqHeaders.Set("User-Agent", c.s.userAgent())
44410	var body io.Reader = nil
44411	c.urlParams_.Set("alt", alt)
44412	c.urlParams_.Set("prettyPrint", "false")
44413	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
44414	urls += "?" + c.urlParams_.Encode()
44415	req, err := http.NewRequest("DELETE", urls, body)
44416	if err != nil {
44417		return nil, err
44418	}
44419	req.Header = reqHeaders
44420	googleapi.Expand(req.URL, map[string]string{
44421		"name": c.name,
44422	})
44423	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44424}
44425
44426// Do executes the "dialogflow.projects.locations.agent.versions.delete" call.
44427// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
44428// non-2xx status code is an error. Response headers are in either
44429// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
44430// returned at all) in error.(*googleapi.Error).Header. Use
44431// googleapi.IsNotModified to check whether the returned error was
44432// because http.StatusNotModified was returned.
44433func (c *ProjectsLocationsAgentVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
44434	gensupport.SetOptions(c.urlParams_, opts...)
44435	res, err := c.doRequest("json")
44436	if res != nil && res.StatusCode == http.StatusNotModified {
44437		if res.Body != nil {
44438			res.Body.Close()
44439		}
44440		return nil, &googleapi.Error{
44441			Code:   res.StatusCode,
44442			Header: res.Header,
44443		}
44444	}
44445	if err != nil {
44446		return nil, err
44447	}
44448	defer googleapi.CloseBody(res)
44449	if err := googleapi.CheckResponse(res); err != nil {
44450		return nil, err
44451	}
44452	ret := &GoogleProtobufEmpty{
44453		ServerResponse: googleapi.ServerResponse{
44454			Header:         res.Header,
44455			HTTPStatusCode: res.StatusCode,
44456		},
44457	}
44458	target := &ret
44459	if err := gensupport.DecodeResponse(target, res); err != nil {
44460		return nil, err
44461	}
44462	return ret, nil
44463	// {
44464	//   "description": "Delete the specified agent version.",
44465	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/versions/{versionsId}",
44466	//   "httpMethod": "DELETE",
44467	//   "id": "dialogflow.projects.locations.agent.versions.delete",
44468	//   "parameterOrder": [
44469	//     "name"
44470	//   ],
44471	//   "parameters": {
44472	//     "name": {
44473	//       "description": "Required. The name of the version to delete. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`",
44474	//       "location": "path",
44475	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/versions/[^/]+$",
44476	//       "required": true,
44477	//       "type": "string"
44478	//     }
44479	//   },
44480	//   "path": "v2/{+name}",
44481	//   "response": {
44482	//     "$ref": "GoogleProtobufEmpty"
44483	//   },
44484	//   "scopes": [
44485	//     "https://www.googleapis.com/auth/cloud-platform",
44486	//     "https://www.googleapis.com/auth/dialogflow"
44487	//   ]
44488	// }
44489
44490}
44491
44492// method id "dialogflow.projects.locations.agent.versions.get":
44493
44494type ProjectsLocationsAgentVersionsGetCall struct {
44495	s            *Service
44496	name         string
44497	urlParams_   gensupport.URLParams
44498	ifNoneMatch_ string
44499	ctx_         context.Context
44500	header_      http.Header
44501}
44502
44503// Get: Retrieves the specified agent version.
44504//
44505// - name: The name of the version. Supported formats: -
44506//   `projects//agent/versions/` -
44507//   `projects//locations//agent/versions/`.
44508func (r *ProjectsLocationsAgentVersionsService) Get(name string) *ProjectsLocationsAgentVersionsGetCall {
44509	c := &ProjectsLocationsAgentVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44510	c.name = name
44511	return c
44512}
44513
44514// Fields allows partial responses to be retrieved. See
44515// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44516// for more information.
44517func (c *ProjectsLocationsAgentVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentVersionsGetCall {
44518	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44519	return c
44520}
44521
44522// IfNoneMatch sets the optional parameter which makes the operation
44523// fail if the object's ETag matches the given value. This is useful for
44524// getting updates only after the object has changed since the last
44525// request. Use googleapi.IsNotModified to check whether the response
44526// error from Do is the result of In-None-Match.
44527func (c *ProjectsLocationsAgentVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentVersionsGetCall {
44528	c.ifNoneMatch_ = entityTag
44529	return c
44530}
44531
44532// Context sets the context to be used in this call's Do method. Any
44533// pending HTTP request will be aborted if the provided context is
44534// canceled.
44535func (c *ProjectsLocationsAgentVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentVersionsGetCall {
44536	c.ctx_ = ctx
44537	return c
44538}
44539
44540// Header returns an http.Header that can be modified by the caller to
44541// add HTTP headers to the request.
44542func (c *ProjectsLocationsAgentVersionsGetCall) Header() http.Header {
44543	if c.header_ == nil {
44544		c.header_ = make(http.Header)
44545	}
44546	return c.header_
44547}
44548
44549func (c *ProjectsLocationsAgentVersionsGetCall) doRequest(alt string) (*http.Response, error) {
44550	reqHeaders := make(http.Header)
44551	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
44552	for k, v := range c.header_ {
44553		reqHeaders[k] = v
44554	}
44555	reqHeaders.Set("User-Agent", c.s.userAgent())
44556	if c.ifNoneMatch_ != "" {
44557		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44558	}
44559	var body io.Reader = nil
44560	c.urlParams_.Set("alt", alt)
44561	c.urlParams_.Set("prettyPrint", "false")
44562	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
44563	urls += "?" + c.urlParams_.Encode()
44564	req, err := http.NewRequest("GET", urls, body)
44565	if err != nil {
44566		return nil, err
44567	}
44568	req.Header = reqHeaders
44569	googleapi.Expand(req.URL, map[string]string{
44570		"name": c.name,
44571	})
44572	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44573}
44574
44575// Do executes the "dialogflow.projects.locations.agent.versions.get" call.
44576// Exactly one of *GoogleCloudDialogflowV2Version or error will be
44577// non-nil. Any non-2xx status code is an error. Response headers are in
44578// either *GoogleCloudDialogflowV2Version.ServerResponse.Header or (if a
44579// response was returned at all) in error.(*googleapi.Error).Header. Use
44580// googleapi.IsNotModified to check whether the returned error was
44581// because http.StatusNotModified was returned.
44582func (c *ProjectsLocationsAgentVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Version, error) {
44583	gensupport.SetOptions(c.urlParams_, opts...)
44584	res, err := c.doRequest("json")
44585	if res != nil && res.StatusCode == http.StatusNotModified {
44586		if res.Body != nil {
44587			res.Body.Close()
44588		}
44589		return nil, &googleapi.Error{
44590			Code:   res.StatusCode,
44591			Header: res.Header,
44592		}
44593	}
44594	if err != nil {
44595		return nil, err
44596	}
44597	defer googleapi.CloseBody(res)
44598	if err := googleapi.CheckResponse(res); err != nil {
44599		return nil, err
44600	}
44601	ret := &GoogleCloudDialogflowV2Version{
44602		ServerResponse: googleapi.ServerResponse{
44603			Header:         res.Header,
44604			HTTPStatusCode: res.StatusCode,
44605		},
44606	}
44607	target := &ret
44608	if err := gensupport.DecodeResponse(target, res); err != nil {
44609		return nil, err
44610	}
44611	return ret, nil
44612	// {
44613	//   "description": "Retrieves the specified agent version.",
44614	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/versions/{versionsId}",
44615	//   "httpMethod": "GET",
44616	//   "id": "dialogflow.projects.locations.agent.versions.get",
44617	//   "parameterOrder": [
44618	//     "name"
44619	//   ],
44620	//   "parameters": {
44621	//     "name": {
44622	//       "description": "Required. The name of the version. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`",
44623	//       "location": "path",
44624	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/versions/[^/]+$",
44625	//       "required": true,
44626	//       "type": "string"
44627	//     }
44628	//   },
44629	//   "path": "v2/{+name}",
44630	//   "response": {
44631	//     "$ref": "GoogleCloudDialogflowV2Version"
44632	//   },
44633	//   "scopes": [
44634	//     "https://www.googleapis.com/auth/cloud-platform",
44635	//     "https://www.googleapis.com/auth/dialogflow"
44636	//   ]
44637	// }
44638
44639}
44640
44641// method id "dialogflow.projects.locations.agent.versions.list":
44642
44643type ProjectsLocationsAgentVersionsListCall struct {
44644	s            *Service
44645	parent       string
44646	urlParams_   gensupport.URLParams
44647	ifNoneMatch_ string
44648	ctx_         context.Context
44649	header_      http.Header
44650}
44651
44652// List: Returns the list of all versions of the specified agent.
44653//
44654// - parent: The agent to list all versions from. Supported formats: -
44655//   `projects//agent` - `projects//locations//agent`.
44656func (r *ProjectsLocationsAgentVersionsService) List(parent string) *ProjectsLocationsAgentVersionsListCall {
44657	c := &ProjectsLocationsAgentVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44658	c.parent = parent
44659	return c
44660}
44661
44662// PageSize sets the optional parameter "pageSize": The maximum number
44663// of items to return in a single page. By default 100 and at most 1000.
44664func (c *ProjectsLocationsAgentVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentVersionsListCall {
44665	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
44666	return c
44667}
44668
44669// PageToken sets the optional parameter "pageToken": The
44670// next_page_token value returned from a previous list request.
44671func (c *ProjectsLocationsAgentVersionsListCall) PageToken(pageToken string) *ProjectsLocationsAgentVersionsListCall {
44672	c.urlParams_.Set("pageToken", pageToken)
44673	return c
44674}
44675
44676// Fields allows partial responses to be retrieved. See
44677// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44678// for more information.
44679func (c *ProjectsLocationsAgentVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentVersionsListCall {
44680	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44681	return c
44682}
44683
44684// IfNoneMatch sets the optional parameter which makes the operation
44685// fail if the object's ETag matches the given value. This is useful for
44686// getting updates only after the object has changed since the last
44687// request. Use googleapi.IsNotModified to check whether the response
44688// error from Do is the result of In-None-Match.
44689func (c *ProjectsLocationsAgentVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentVersionsListCall {
44690	c.ifNoneMatch_ = entityTag
44691	return c
44692}
44693
44694// Context sets the context to be used in this call's Do method. Any
44695// pending HTTP request will be aborted if the provided context is
44696// canceled.
44697func (c *ProjectsLocationsAgentVersionsListCall) Context(ctx context.Context) *ProjectsLocationsAgentVersionsListCall {
44698	c.ctx_ = ctx
44699	return c
44700}
44701
44702// Header returns an http.Header that can be modified by the caller to
44703// add HTTP headers to the request.
44704func (c *ProjectsLocationsAgentVersionsListCall) Header() http.Header {
44705	if c.header_ == nil {
44706		c.header_ = make(http.Header)
44707	}
44708	return c.header_
44709}
44710
44711func (c *ProjectsLocationsAgentVersionsListCall) doRequest(alt string) (*http.Response, error) {
44712	reqHeaders := make(http.Header)
44713	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
44714	for k, v := range c.header_ {
44715		reqHeaders[k] = v
44716	}
44717	reqHeaders.Set("User-Agent", c.s.userAgent())
44718	if c.ifNoneMatch_ != "" {
44719		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44720	}
44721	var body io.Reader = nil
44722	c.urlParams_.Set("alt", alt)
44723	c.urlParams_.Set("prettyPrint", "false")
44724	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/versions")
44725	urls += "?" + c.urlParams_.Encode()
44726	req, err := http.NewRequest("GET", urls, body)
44727	if err != nil {
44728		return nil, err
44729	}
44730	req.Header = reqHeaders
44731	googleapi.Expand(req.URL, map[string]string{
44732		"parent": c.parent,
44733	})
44734	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44735}
44736
44737// Do executes the "dialogflow.projects.locations.agent.versions.list" call.
44738// Exactly one of *GoogleCloudDialogflowV2ListVersionsResponse or error
44739// will be non-nil. Any non-2xx status code is an error. Response
44740// headers are in either
44741// *GoogleCloudDialogflowV2ListVersionsResponse.ServerResponse.Header or
44742// (if a response was returned at all) in
44743// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44744// whether the returned error was because http.StatusNotModified was
44745// returned.
44746func (c *ProjectsLocationsAgentVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListVersionsResponse, error) {
44747	gensupport.SetOptions(c.urlParams_, opts...)
44748	res, err := c.doRequest("json")
44749	if res != nil && res.StatusCode == http.StatusNotModified {
44750		if res.Body != nil {
44751			res.Body.Close()
44752		}
44753		return nil, &googleapi.Error{
44754			Code:   res.StatusCode,
44755			Header: res.Header,
44756		}
44757	}
44758	if err != nil {
44759		return nil, err
44760	}
44761	defer googleapi.CloseBody(res)
44762	if err := googleapi.CheckResponse(res); err != nil {
44763		return nil, err
44764	}
44765	ret := &GoogleCloudDialogflowV2ListVersionsResponse{
44766		ServerResponse: googleapi.ServerResponse{
44767			Header:         res.Header,
44768			HTTPStatusCode: res.StatusCode,
44769		},
44770	}
44771	target := &ret
44772	if err := gensupport.DecodeResponse(target, res); err != nil {
44773		return nil, err
44774	}
44775	return ret, nil
44776	// {
44777	//   "description": "Returns the list of all versions of the specified agent.",
44778	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/versions",
44779	//   "httpMethod": "GET",
44780	//   "id": "dialogflow.projects.locations.agent.versions.list",
44781	//   "parameterOrder": [
44782	//     "parent"
44783	//   ],
44784	//   "parameters": {
44785	//     "pageSize": {
44786	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
44787	//       "format": "int32",
44788	//       "location": "query",
44789	//       "type": "integer"
44790	//     },
44791	//     "pageToken": {
44792	//       "description": "Optional. The next_page_token value returned from a previous list request.",
44793	//       "location": "query",
44794	//       "type": "string"
44795	//     },
44796	//     "parent": {
44797	//       "description": "Required. The agent to list all versions from. Supported formats: - `projects//agent` - `projects//locations//agent`",
44798	//       "location": "path",
44799	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
44800	//       "required": true,
44801	//       "type": "string"
44802	//     }
44803	//   },
44804	//   "path": "v2/{+parent}/versions",
44805	//   "response": {
44806	//     "$ref": "GoogleCloudDialogflowV2ListVersionsResponse"
44807	//   },
44808	//   "scopes": [
44809	//     "https://www.googleapis.com/auth/cloud-platform",
44810	//     "https://www.googleapis.com/auth/dialogflow"
44811	//   ]
44812	// }
44813
44814}
44815
44816// Pages invokes f for each page of results.
44817// A non-nil error returned from f will halt the iteration.
44818// The provided context supersedes any context provided to the Context method.
44819func (c *ProjectsLocationsAgentVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListVersionsResponse) error) error {
44820	c.ctx_ = ctx
44821	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44822	for {
44823		x, err := c.Do()
44824		if err != nil {
44825			return err
44826		}
44827		if err := f(x); err != nil {
44828			return err
44829		}
44830		if x.NextPageToken == "" {
44831			return nil
44832		}
44833		c.PageToken(x.NextPageToken)
44834	}
44835}
44836
44837// method id "dialogflow.projects.locations.agent.versions.patch":
44838
44839type ProjectsLocationsAgentVersionsPatchCall struct {
44840	s                              *Service
44841	nameid                         string
44842	googleclouddialogflowv2version *GoogleCloudDialogflowV2Version
44843	urlParams_                     gensupport.URLParams
44844	ctx_                           context.Context
44845	header_                        http.Header
44846}
44847
44848// Patch: Updates the specified agent version. Note that this method
44849// does not allow you to update the state of the agent the given version
44850// points to. It allows you to update only mutable properties of the
44851// version resource.
44852//
44853// - name: Output only. The unique identifier of this agent version.
44854//   Supported formats: - `projects//agent/versions/` -
44855//   `projects//locations//agent/versions/`.
44856func (r *ProjectsLocationsAgentVersionsService) Patch(nameid string, googleclouddialogflowv2version *GoogleCloudDialogflowV2Version) *ProjectsLocationsAgentVersionsPatchCall {
44857	c := &ProjectsLocationsAgentVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44858	c.nameid = nameid
44859	c.googleclouddialogflowv2version = googleclouddialogflowv2version
44860	return c
44861}
44862
44863// UpdateMask sets the optional parameter "updateMask": Required. The
44864// mask to control which fields get updated.
44865func (c *ProjectsLocationsAgentVersionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentVersionsPatchCall {
44866	c.urlParams_.Set("updateMask", updateMask)
44867	return c
44868}
44869
44870// Fields allows partial responses to be retrieved. See
44871// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44872// for more information.
44873func (c *ProjectsLocationsAgentVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentVersionsPatchCall {
44874	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44875	return c
44876}
44877
44878// Context sets the context to be used in this call's Do method. Any
44879// pending HTTP request will be aborted if the provided context is
44880// canceled.
44881func (c *ProjectsLocationsAgentVersionsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentVersionsPatchCall {
44882	c.ctx_ = ctx
44883	return c
44884}
44885
44886// Header returns an http.Header that can be modified by the caller to
44887// add HTTP headers to the request.
44888func (c *ProjectsLocationsAgentVersionsPatchCall) Header() http.Header {
44889	if c.header_ == nil {
44890		c.header_ = make(http.Header)
44891	}
44892	return c.header_
44893}
44894
44895func (c *ProjectsLocationsAgentVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
44896	reqHeaders := make(http.Header)
44897	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
44898	for k, v := range c.header_ {
44899		reqHeaders[k] = v
44900	}
44901	reqHeaders.Set("User-Agent", c.s.userAgent())
44902	var body io.Reader = nil
44903	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2version)
44904	if err != nil {
44905		return nil, err
44906	}
44907	reqHeaders.Set("Content-Type", "application/json")
44908	c.urlParams_.Set("alt", alt)
44909	c.urlParams_.Set("prettyPrint", "false")
44910	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
44911	urls += "?" + c.urlParams_.Encode()
44912	req, err := http.NewRequest("PATCH", urls, body)
44913	if err != nil {
44914		return nil, err
44915	}
44916	req.Header = reqHeaders
44917	googleapi.Expand(req.URL, map[string]string{
44918		"name": c.nameid,
44919	})
44920	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44921}
44922
44923// Do executes the "dialogflow.projects.locations.agent.versions.patch" call.
44924// Exactly one of *GoogleCloudDialogflowV2Version or error will be
44925// non-nil. Any non-2xx status code is an error. Response headers are in
44926// either *GoogleCloudDialogflowV2Version.ServerResponse.Header or (if a
44927// response was returned at all) in error.(*googleapi.Error).Header. Use
44928// googleapi.IsNotModified to check whether the returned error was
44929// because http.StatusNotModified was returned.
44930func (c *ProjectsLocationsAgentVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Version, error) {
44931	gensupport.SetOptions(c.urlParams_, opts...)
44932	res, err := c.doRequest("json")
44933	if res != nil && res.StatusCode == http.StatusNotModified {
44934		if res.Body != nil {
44935			res.Body.Close()
44936		}
44937		return nil, &googleapi.Error{
44938			Code:   res.StatusCode,
44939			Header: res.Header,
44940		}
44941	}
44942	if err != nil {
44943		return nil, err
44944	}
44945	defer googleapi.CloseBody(res)
44946	if err := googleapi.CheckResponse(res); err != nil {
44947		return nil, err
44948	}
44949	ret := &GoogleCloudDialogflowV2Version{
44950		ServerResponse: googleapi.ServerResponse{
44951			Header:         res.Header,
44952			HTTPStatusCode: res.StatusCode,
44953		},
44954	}
44955	target := &ret
44956	if err := gensupport.DecodeResponse(target, res); err != nil {
44957		return nil, err
44958	}
44959	return ret, nil
44960	// {
44961	//   "description": "Updates the specified agent version. Note that this method does not allow you to update the state of the agent the given version points to. It allows you to update only mutable properties of the version resource.",
44962	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/versions/{versionsId}",
44963	//   "httpMethod": "PATCH",
44964	//   "id": "dialogflow.projects.locations.agent.versions.patch",
44965	//   "parameterOrder": [
44966	//     "name"
44967	//   ],
44968	//   "parameters": {
44969	//     "name": {
44970	//       "description": "Output only. The unique identifier of this agent version. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`",
44971	//       "location": "path",
44972	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/versions/[^/]+$",
44973	//       "required": true,
44974	//       "type": "string"
44975	//     },
44976	//     "updateMask": {
44977	//       "description": "Required. The mask to control which fields get updated.",
44978	//       "format": "google-fieldmask",
44979	//       "location": "query",
44980	//       "type": "string"
44981	//     }
44982	//   },
44983	//   "path": "v2/{+name}",
44984	//   "request": {
44985	//     "$ref": "GoogleCloudDialogflowV2Version"
44986	//   },
44987	//   "response": {
44988	//     "$ref": "GoogleCloudDialogflowV2Version"
44989	//   },
44990	//   "scopes": [
44991	//     "https://www.googleapis.com/auth/cloud-platform",
44992	//     "https://www.googleapis.com/auth/dialogflow"
44993	//   ]
44994	// }
44995
44996}
44997
44998// method id "dialogflow.projects.locations.answerRecords.list":
44999
45000type ProjectsLocationsAnswerRecordsListCall struct {
45001	s            *Service
45002	parent       string
45003	urlParams_   gensupport.URLParams
45004	ifNoneMatch_ string
45005	ctx_         context.Context
45006	header_      http.Header
45007}
45008
45009// List: Returns the list of all answer records in the specified project
45010// in reverse chronological order.
45011//
45012// - parent: The project to list all answer records for in reverse
45013//   chronological order. Format: `projects//locations/`.
45014func (r *ProjectsLocationsAnswerRecordsService) List(parent string) *ProjectsLocationsAnswerRecordsListCall {
45015	c := &ProjectsLocationsAnswerRecordsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45016	c.parent = parent
45017	return c
45018}
45019
45020// Filter sets the optional parameter "filter": Required. Filters to
45021// restrict results to specific answer records. Filter on answer record
45022// type. Currently predicates on `type` is supported, valid values are
45023// `ARTICLE_ANSWER`, `FAQ_ANSWER`. For more information about filtering,
45024// see API Filtering (https://aip.dev/160).
45025func (c *ProjectsLocationsAnswerRecordsListCall) Filter(filter string) *ProjectsLocationsAnswerRecordsListCall {
45026	c.urlParams_.Set("filter", filter)
45027	return c
45028}
45029
45030// PageSize sets the optional parameter "pageSize": The maximum number
45031// of records to return in a single page. The server may return fewer
45032// records than this. If unspecified, we use 10. The maximum is 100.
45033func (c *ProjectsLocationsAnswerRecordsListCall) PageSize(pageSize int64) *ProjectsLocationsAnswerRecordsListCall {
45034	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
45035	return c
45036}
45037
45038// PageToken sets the optional parameter "pageToken": The
45039// ListAnswerRecordsResponse.next_page_token value returned from a
45040// previous list request used to continue listing on the next page.
45041func (c *ProjectsLocationsAnswerRecordsListCall) PageToken(pageToken string) *ProjectsLocationsAnswerRecordsListCall {
45042	c.urlParams_.Set("pageToken", pageToken)
45043	return c
45044}
45045
45046// Fields allows partial responses to be retrieved. See
45047// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45048// for more information.
45049func (c *ProjectsLocationsAnswerRecordsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAnswerRecordsListCall {
45050	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45051	return c
45052}
45053
45054// IfNoneMatch sets the optional parameter which makes the operation
45055// fail if the object's ETag matches the given value. This is useful for
45056// getting updates only after the object has changed since the last
45057// request. Use googleapi.IsNotModified to check whether the response
45058// error from Do is the result of In-None-Match.
45059func (c *ProjectsLocationsAnswerRecordsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAnswerRecordsListCall {
45060	c.ifNoneMatch_ = entityTag
45061	return c
45062}
45063
45064// Context sets the context to be used in this call's Do method. Any
45065// pending HTTP request will be aborted if the provided context is
45066// canceled.
45067func (c *ProjectsLocationsAnswerRecordsListCall) Context(ctx context.Context) *ProjectsLocationsAnswerRecordsListCall {
45068	c.ctx_ = ctx
45069	return c
45070}
45071
45072// Header returns an http.Header that can be modified by the caller to
45073// add HTTP headers to the request.
45074func (c *ProjectsLocationsAnswerRecordsListCall) Header() http.Header {
45075	if c.header_ == nil {
45076		c.header_ = make(http.Header)
45077	}
45078	return c.header_
45079}
45080
45081func (c *ProjectsLocationsAnswerRecordsListCall) doRequest(alt string) (*http.Response, error) {
45082	reqHeaders := make(http.Header)
45083	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
45084	for k, v := range c.header_ {
45085		reqHeaders[k] = v
45086	}
45087	reqHeaders.Set("User-Agent", c.s.userAgent())
45088	if c.ifNoneMatch_ != "" {
45089		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45090	}
45091	var body io.Reader = nil
45092	c.urlParams_.Set("alt", alt)
45093	c.urlParams_.Set("prettyPrint", "false")
45094	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/answerRecords")
45095	urls += "?" + c.urlParams_.Encode()
45096	req, err := http.NewRequest("GET", urls, body)
45097	if err != nil {
45098		return nil, err
45099	}
45100	req.Header = reqHeaders
45101	googleapi.Expand(req.URL, map[string]string{
45102		"parent": c.parent,
45103	})
45104	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45105}
45106
45107// Do executes the "dialogflow.projects.locations.answerRecords.list" call.
45108// Exactly one of *GoogleCloudDialogflowV2ListAnswerRecordsResponse or
45109// error will be non-nil. Any non-2xx status code is an error. Response
45110// headers are in either
45111// *GoogleCloudDialogflowV2ListAnswerRecordsResponse.ServerResponse.Heade
45112// r or (if a response was returned at all) in
45113// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45114// whether the returned error was because http.StatusNotModified was
45115// returned.
45116func (c *ProjectsLocationsAnswerRecordsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListAnswerRecordsResponse, error) {
45117	gensupport.SetOptions(c.urlParams_, opts...)
45118	res, err := c.doRequest("json")
45119	if res != nil && res.StatusCode == http.StatusNotModified {
45120		if res.Body != nil {
45121			res.Body.Close()
45122		}
45123		return nil, &googleapi.Error{
45124			Code:   res.StatusCode,
45125			Header: res.Header,
45126		}
45127	}
45128	if err != nil {
45129		return nil, err
45130	}
45131	defer googleapi.CloseBody(res)
45132	if err := googleapi.CheckResponse(res); err != nil {
45133		return nil, err
45134	}
45135	ret := &GoogleCloudDialogflowV2ListAnswerRecordsResponse{
45136		ServerResponse: googleapi.ServerResponse{
45137			Header:         res.Header,
45138			HTTPStatusCode: res.StatusCode,
45139		},
45140	}
45141	target := &ret
45142	if err := gensupport.DecodeResponse(target, res); err != nil {
45143		return nil, err
45144	}
45145	return ret, nil
45146	// {
45147	//   "description": "Returns the list of all answer records in the specified project in reverse chronological order.",
45148	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/answerRecords",
45149	//   "httpMethod": "GET",
45150	//   "id": "dialogflow.projects.locations.answerRecords.list",
45151	//   "parameterOrder": [
45152	//     "parent"
45153	//   ],
45154	//   "parameters": {
45155	//     "filter": {
45156	//       "description": "Required. Filters to restrict results to specific answer records. Filter on answer record type. Currently predicates on `type` is supported, valid values are `ARTICLE_ANSWER`, `FAQ_ANSWER`. For more information about filtering, see [API Filtering](https://aip.dev/160).",
45157	//       "location": "query",
45158	//       "type": "string"
45159	//     },
45160	//     "pageSize": {
45161	//       "description": "Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100.",
45162	//       "format": "int32",
45163	//       "location": "query",
45164	//       "type": "integer"
45165	//     },
45166	//     "pageToken": {
45167	//       "description": "Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page.",
45168	//       "location": "query",
45169	//       "type": "string"
45170	//     },
45171	//     "parent": {
45172	//       "description": "Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`.",
45173	//       "location": "path",
45174	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
45175	//       "required": true,
45176	//       "type": "string"
45177	//     }
45178	//   },
45179	//   "path": "v2/{+parent}/answerRecords",
45180	//   "response": {
45181	//     "$ref": "GoogleCloudDialogflowV2ListAnswerRecordsResponse"
45182	//   },
45183	//   "scopes": [
45184	//     "https://www.googleapis.com/auth/cloud-platform",
45185	//     "https://www.googleapis.com/auth/dialogflow"
45186	//   ]
45187	// }
45188
45189}
45190
45191// Pages invokes f for each page of results.
45192// A non-nil error returned from f will halt the iteration.
45193// The provided context supersedes any context provided to the Context method.
45194func (c *ProjectsLocationsAnswerRecordsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListAnswerRecordsResponse) error) error {
45195	c.ctx_ = ctx
45196	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45197	for {
45198		x, err := c.Do()
45199		if err != nil {
45200			return err
45201		}
45202		if err := f(x); err != nil {
45203			return err
45204		}
45205		if x.NextPageToken == "" {
45206			return nil
45207		}
45208		c.PageToken(x.NextPageToken)
45209	}
45210}
45211
45212// method id "dialogflow.projects.locations.answerRecords.patch":
45213
45214type ProjectsLocationsAnswerRecordsPatchCall struct {
45215	s                                   *Service
45216	nameid                              string
45217	googleclouddialogflowv2answerrecord *GoogleCloudDialogflowV2AnswerRecord
45218	urlParams_                          gensupport.URLParams
45219	ctx_                                context.Context
45220	header_                             http.Header
45221}
45222
45223// Patch: Updates the specified answer record.
45224//
45225// - name: The unique identifier of this answer record. Format:
45226//   `projects//locations//answerRecords/`.
45227func (r *ProjectsLocationsAnswerRecordsService) Patch(nameid string, googleclouddialogflowv2answerrecord *GoogleCloudDialogflowV2AnswerRecord) *ProjectsLocationsAnswerRecordsPatchCall {
45228	c := &ProjectsLocationsAnswerRecordsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45229	c.nameid = nameid
45230	c.googleclouddialogflowv2answerrecord = googleclouddialogflowv2answerrecord
45231	return c
45232}
45233
45234// UpdateMask sets the optional parameter "updateMask": Required. The
45235// mask to control which fields get updated.
45236func (c *ProjectsLocationsAnswerRecordsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAnswerRecordsPatchCall {
45237	c.urlParams_.Set("updateMask", updateMask)
45238	return c
45239}
45240
45241// Fields allows partial responses to be retrieved. See
45242// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45243// for more information.
45244func (c *ProjectsLocationsAnswerRecordsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAnswerRecordsPatchCall {
45245	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45246	return c
45247}
45248
45249// Context sets the context to be used in this call's Do method. Any
45250// pending HTTP request will be aborted if the provided context is
45251// canceled.
45252func (c *ProjectsLocationsAnswerRecordsPatchCall) Context(ctx context.Context) *ProjectsLocationsAnswerRecordsPatchCall {
45253	c.ctx_ = ctx
45254	return c
45255}
45256
45257// Header returns an http.Header that can be modified by the caller to
45258// add HTTP headers to the request.
45259func (c *ProjectsLocationsAnswerRecordsPatchCall) Header() http.Header {
45260	if c.header_ == nil {
45261		c.header_ = make(http.Header)
45262	}
45263	return c.header_
45264}
45265
45266func (c *ProjectsLocationsAnswerRecordsPatchCall) doRequest(alt string) (*http.Response, error) {
45267	reqHeaders := make(http.Header)
45268	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
45269	for k, v := range c.header_ {
45270		reqHeaders[k] = v
45271	}
45272	reqHeaders.Set("User-Agent", c.s.userAgent())
45273	var body io.Reader = nil
45274	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2answerrecord)
45275	if err != nil {
45276		return nil, err
45277	}
45278	reqHeaders.Set("Content-Type", "application/json")
45279	c.urlParams_.Set("alt", alt)
45280	c.urlParams_.Set("prettyPrint", "false")
45281	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
45282	urls += "?" + c.urlParams_.Encode()
45283	req, err := http.NewRequest("PATCH", urls, body)
45284	if err != nil {
45285		return nil, err
45286	}
45287	req.Header = reqHeaders
45288	googleapi.Expand(req.URL, map[string]string{
45289		"name": c.nameid,
45290	})
45291	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45292}
45293
45294// Do executes the "dialogflow.projects.locations.answerRecords.patch" call.
45295// Exactly one of *GoogleCloudDialogflowV2AnswerRecord or error will be
45296// non-nil. Any non-2xx status code is an error. Response headers are in
45297// either *GoogleCloudDialogflowV2AnswerRecord.ServerResponse.Header or
45298// (if a response was returned at all) in
45299// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45300// whether the returned error was because http.StatusNotModified was
45301// returned.
45302func (c *ProjectsLocationsAnswerRecordsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2AnswerRecord, error) {
45303	gensupport.SetOptions(c.urlParams_, opts...)
45304	res, err := c.doRequest("json")
45305	if res != nil && res.StatusCode == http.StatusNotModified {
45306		if res.Body != nil {
45307			res.Body.Close()
45308		}
45309		return nil, &googleapi.Error{
45310			Code:   res.StatusCode,
45311			Header: res.Header,
45312		}
45313	}
45314	if err != nil {
45315		return nil, err
45316	}
45317	defer googleapi.CloseBody(res)
45318	if err := googleapi.CheckResponse(res); err != nil {
45319		return nil, err
45320	}
45321	ret := &GoogleCloudDialogflowV2AnswerRecord{
45322		ServerResponse: googleapi.ServerResponse{
45323			Header:         res.Header,
45324			HTTPStatusCode: res.StatusCode,
45325		},
45326	}
45327	target := &ret
45328	if err := gensupport.DecodeResponse(target, res); err != nil {
45329		return nil, err
45330	}
45331	return ret, nil
45332	// {
45333	//   "description": "Updates the specified answer record.",
45334	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/answerRecords/{answerRecordsId}",
45335	//   "httpMethod": "PATCH",
45336	//   "id": "dialogflow.projects.locations.answerRecords.patch",
45337	//   "parameterOrder": [
45338	//     "name"
45339	//   ],
45340	//   "parameters": {
45341	//     "name": {
45342	//       "description": "The unique identifier of this answer record. Format: `projects//locations//answerRecords/`.",
45343	//       "location": "path",
45344	//       "pattern": "^projects/[^/]+/locations/[^/]+/answerRecords/[^/]+$",
45345	//       "required": true,
45346	//       "type": "string"
45347	//     },
45348	//     "updateMask": {
45349	//       "description": "Required. The mask to control which fields get updated.",
45350	//       "format": "google-fieldmask",
45351	//       "location": "query",
45352	//       "type": "string"
45353	//     }
45354	//   },
45355	//   "path": "v2/{+name}",
45356	//   "request": {
45357	//     "$ref": "GoogleCloudDialogflowV2AnswerRecord"
45358	//   },
45359	//   "response": {
45360	//     "$ref": "GoogleCloudDialogflowV2AnswerRecord"
45361	//   },
45362	//   "scopes": [
45363	//     "https://www.googleapis.com/auth/cloud-platform",
45364	//     "https://www.googleapis.com/auth/dialogflow"
45365	//   ]
45366	// }
45367
45368}
45369
45370// method id "dialogflow.projects.locations.conversationProfiles.create":
45371
45372type ProjectsLocationsConversationProfilesCreateCall struct {
45373	s                                          *Service
45374	parent                                     string
45375	googleclouddialogflowv2conversationprofile *GoogleCloudDialogflowV2ConversationProfile
45376	urlParams_                                 gensupport.URLParams
45377	ctx_                                       context.Context
45378	header_                                    http.Header
45379}
45380
45381// Create: Creates a conversation profile in the specified project.
45382// ConversationProfile.CreateTime and ConversationProfile.UpdateTime
45383// aren't populated in the response. You can retrieve them via
45384// GetConversationProfile API.
45385//
45386// - parent: The project to create a conversation profile for. Format:
45387//   `projects//locations/`.
45388func (r *ProjectsLocationsConversationProfilesService) Create(parent string, googleclouddialogflowv2conversationprofile *GoogleCloudDialogflowV2ConversationProfile) *ProjectsLocationsConversationProfilesCreateCall {
45389	c := &ProjectsLocationsConversationProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45390	c.parent = parent
45391	c.googleclouddialogflowv2conversationprofile = googleclouddialogflowv2conversationprofile
45392	return c
45393}
45394
45395// Fields allows partial responses to be retrieved. See
45396// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45397// for more information.
45398func (c *ProjectsLocationsConversationProfilesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationProfilesCreateCall {
45399	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45400	return c
45401}
45402
45403// Context sets the context to be used in this call's Do method. Any
45404// pending HTTP request will be aborted if the provided context is
45405// canceled.
45406func (c *ProjectsLocationsConversationProfilesCreateCall) Context(ctx context.Context) *ProjectsLocationsConversationProfilesCreateCall {
45407	c.ctx_ = ctx
45408	return c
45409}
45410
45411// Header returns an http.Header that can be modified by the caller to
45412// add HTTP headers to the request.
45413func (c *ProjectsLocationsConversationProfilesCreateCall) Header() http.Header {
45414	if c.header_ == nil {
45415		c.header_ = make(http.Header)
45416	}
45417	return c.header_
45418}
45419
45420func (c *ProjectsLocationsConversationProfilesCreateCall) doRequest(alt string) (*http.Response, error) {
45421	reqHeaders := make(http.Header)
45422	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
45423	for k, v := range c.header_ {
45424		reqHeaders[k] = v
45425	}
45426	reqHeaders.Set("User-Agent", c.s.userAgent())
45427	var body io.Reader = nil
45428	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2conversationprofile)
45429	if err != nil {
45430		return nil, err
45431	}
45432	reqHeaders.Set("Content-Type", "application/json")
45433	c.urlParams_.Set("alt", alt)
45434	c.urlParams_.Set("prettyPrint", "false")
45435	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/conversationProfiles")
45436	urls += "?" + c.urlParams_.Encode()
45437	req, err := http.NewRequest("POST", urls, body)
45438	if err != nil {
45439		return nil, err
45440	}
45441	req.Header = reqHeaders
45442	googleapi.Expand(req.URL, map[string]string{
45443		"parent": c.parent,
45444	})
45445	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45446}
45447
45448// Do executes the "dialogflow.projects.locations.conversationProfiles.create" call.
45449// Exactly one of *GoogleCloudDialogflowV2ConversationProfile or error
45450// will be non-nil. Any non-2xx status code is an error. Response
45451// headers are in either
45452// *GoogleCloudDialogflowV2ConversationProfile.ServerResponse.Header or
45453// (if a response was returned at all) in
45454// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45455// whether the returned error was because http.StatusNotModified was
45456// returned.
45457func (c *ProjectsLocationsConversationProfilesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ConversationProfile, error) {
45458	gensupport.SetOptions(c.urlParams_, opts...)
45459	res, err := c.doRequest("json")
45460	if res != nil && res.StatusCode == http.StatusNotModified {
45461		if res.Body != nil {
45462			res.Body.Close()
45463		}
45464		return nil, &googleapi.Error{
45465			Code:   res.StatusCode,
45466			Header: res.Header,
45467		}
45468	}
45469	if err != nil {
45470		return nil, err
45471	}
45472	defer googleapi.CloseBody(res)
45473	if err := googleapi.CheckResponse(res); err != nil {
45474		return nil, err
45475	}
45476	ret := &GoogleCloudDialogflowV2ConversationProfile{
45477		ServerResponse: googleapi.ServerResponse{
45478			Header:         res.Header,
45479			HTTPStatusCode: res.StatusCode,
45480		},
45481	}
45482	target := &ret
45483	if err := gensupport.DecodeResponse(target, res); err != nil {
45484		return nil, err
45485	}
45486	return ret, nil
45487	// {
45488	//   "description": "Creates a conversation profile in the specified project. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.",
45489	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversationProfiles",
45490	//   "httpMethod": "POST",
45491	//   "id": "dialogflow.projects.locations.conversationProfiles.create",
45492	//   "parameterOrder": [
45493	//     "parent"
45494	//   ],
45495	//   "parameters": {
45496	//     "parent": {
45497	//       "description": "Required. The project to create a conversation profile for. Format: `projects//locations/`.",
45498	//       "location": "path",
45499	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
45500	//       "required": true,
45501	//       "type": "string"
45502	//     }
45503	//   },
45504	//   "path": "v2/{+parent}/conversationProfiles",
45505	//   "request": {
45506	//     "$ref": "GoogleCloudDialogflowV2ConversationProfile"
45507	//   },
45508	//   "response": {
45509	//     "$ref": "GoogleCloudDialogflowV2ConversationProfile"
45510	//   },
45511	//   "scopes": [
45512	//     "https://www.googleapis.com/auth/cloud-platform",
45513	//     "https://www.googleapis.com/auth/dialogflow"
45514	//   ]
45515	// }
45516
45517}
45518
45519// method id "dialogflow.projects.locations.conversationProfiles.delete":
45520
45521type ProjectsLocationsConversationProfilesDeleteCall struct {
45522	s          *Service
45523	name       string
45524	urlParams_ gensupport.URLParams
45525	ctx_       context.Context
45526	header_    http.Header
45527}
45528
45529// Delete: Deletes the specified conversation profile.
45530//
45531// - name: The name of the conversation profile to delete. Format:
45532//   `projects//locations//conversationProfiles/`.
45533func (r *ProjectsLocationsConversationProfilesService) Delete(name string) *ProjectsLocationsConversationProfilesDeleteCall {
45534	c := &ProjectsLocationsConversationProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45535	c.name = name
45536	return c
45537}
45538
45539// Fields allows partial responses to be retrieved. See
45540// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45541// for more information.
45542func (c *ProjectsLocationsConversationProfilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationProfilesDeleteCall {
45543	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45544	return c
45545}
45546
45547// Context sets the context to be used in this call's Do method. Any
45548// pending HTTP request will be aborted if the provided context is
45549// canceled.
45550func (c *ProjectsLocationsConversationProfilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsConversationProfilesDeleteCall {
45551	c.ctx_ = ctx
45552	return c
45553}
45554
45555// Header returns an http.Header that can be modified by the caller to
45556// add HTTP headers to the request.
45557func (c *ProjectsLocationsConversationProfilesDeleteCall) Header() http.Header {
45558	if c.header_ == nil {
45559		c.header_ = make(http.Header)
45560	}
45561	return c.header_
45562}
45563
45564func (c *ProjectsLocationsConversationProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
45565	reqHeaders := make(http.Header)
45566	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
45567	for k, v := range c.header_ {
45568		reqHeaders[k] = v
45569	}
45570	reqHeaders.Set("User-Agent", c.s.userAgent())
45571	var body io.Reader = nil
45572	c.urlParams_.Set("alt", alt)
45573	c.urlParams_.Set("prettyPrint", "false")
45574	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
45575	urls += "?" + c.urlParams_.Encode()
45576	req, err := http.NewRequest("DELETE", urls, body)
45577	if err != nil {
45578		return nil, err
45579	}
45580	req.Header = reqHeaders
45581	googleapi.Expand(req.URL, map[string]string{
45582		"name": c.name,
45583	})
45584	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45585}
45586
45587// Do executes the "dialogflow.projects.locations.conversationProfiles.delete" call.
45588// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
45589// non-2xx status code is an error. Response headers are in either
45590// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
45591// returned at all) in error.(*googleapi.Error).Header. Use
45592// googleapi.IsNotModified to check whether the returned error was
45593// because http.StatusNotModified was returned.
45594func (c *ProjectsLocationsConversationProfilesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
45595	gensupport.SetOptions(c.urlParams_, opts...)
45596	res, err := c.doRequest("json")
45597	if res != nil && res.StatusCode == http.StatusNotModified {
45598		if res.Body != nil {
45599			res.Body.Close()
45600		}
45601		return nil, &googleapi.Error{
45602			Code:   res.StatusCode,
45603			Header: res.Header,
45604		}
45605	}
45606	if err != nil {
45607		return nil, err
45608	}
45609	defer googleapi.CloseBody(res)
45610	if err := googleapi.CheckResponse(res); err != nil {
45611		return nil, err
45612	}
45613	ret := &GoogleProtobufEmpty{
45614		ServerResponse: googleapi.ServerResponse{
45615			Header:         res.Header,
45616			HTTPStatusCode: res.StatusCode,
45617		},
45618	}
45619	target := &ret
45620	if err := gensupport.DecodeResponse(target, res); err != nil {
45621		return nil, err
45622	}
45623	return ret, nil
45624	// {
45625	//   "description": "Deletes the specified conversation profile.",
45626	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversationProfiles/{conversationProfilesId}",
45627	//   "httpMethod": "DELETE",
45628	//   "id": "dialogflow.projects.locations.conversationProfiles.delete",
45629	//   "parameterOrder": [
45630	//     "name"
45631	//   ],
45632	//   "parameters": {
45633	//     "name": {
45634	//       "description": "Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`.",
45635	//       "location": "path",
45636	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversationProfiles/[^/]+$",
45637	//       "required": true,
45638	//       "type": "string"
45639	//     }
45640	//   },
45641	//   "path": "v2/{+name}",
45642	//   "response": {
45643	//     "$ref": "GoogleProtobufEmpty"
45644	//   },
45645	//   "scopes": [
45646	//     "https://www.googleapis.com/auth/cloud-platform",
45647	//     "https://www.googleapis.com/auth/dialogflow"
45648	//   ]
45649	// }
45650
45651}
45652
45653// method id "dialogflow.projects.locations.conversationProfiles.get":
45654
45655type ProjectsLocationsConversationProfilesGetCall struct {
45656	s            *Service
45657	name         string
45658	urlParams_   gensupport.URLParams
45659	ifNoneMatch_ string
45660	ctx_         context.Context
45661	header_      http.Header
45662}
45663
45664// Get: Retrieves the specified conversation profile.
45665//
45666// - name: The resource name of the conversation profile. Format:
45667//   `projects//locations//conversationProfiles/`.
45668func (r *ProjectsLocationsConversationProfilesService) Get(name string) *ProjectsLocationsConversationProfilesGetCall {
45669	c := &ProjectsLocationsConversationProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45670	c.name = name
45671	return c
45672}
45673
45674// Fields allows partial responses to be retrieved. See
45675// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45676// for more information.
45677func (c *ProjectsLocationsConversationProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationProfilesGetCall {
45678	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45679	return c
45680}
45681
45682// IfNoneMatch sets the optional parameter which makes the operation
45683// fail if the object's ETag matches the given value. This is useful for
45684// getting updates only after the object has changed since the last
45685// request. Use googleapi.IsNotModified to check whether the response
45686// error from Do is the result of In-None-Match.
45687func (c *ProjectsLocationsConversationProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversationProfilesGetCall {
45688	c.ifNoneMatch_ = entityTag
45689	return c
45690}
45691
45692// Context sets the context to be used in this call's Do method. Any
45693// pending HTTP request will be aborted if the provided context is
45694// canceled.
45695func (c *ProjectsLocationsConversationProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsConversationProfilesGetCall {
45696	c.ctx_ = ctx
45697	return c
45698}
45699
45700// Header returns an http.Header that can be modified by the caller to
45701// add HTTP headers to the request.
45702func (c *ProjectsLocationsConversationProfilesGetCall) Header() http.Header {
45703	if c.header_ == nil {
45704		c.header_ = make(http.Header)
45705	}
45706	return c.header_
45707}
45708
45709func (c *ProjectsLocationsConversationProfilesGetCall) doRequest(alt string) (*http.Response, error) {
45710	reqHeaders := make(http.Header)
45711	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
45712	for k, v := range c.header_ {
45713		reqHeaders[k] = v
45714	}
45715	reqHeaders.Set("User-Agent", c.s.userAgent())
45716	if c.ifNoneMatch_ != "" {
45717		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45718	}
45719	var body io.Reader = nil
45720	c.urlParams_.Set("alt", alt)
45721	c.urlParams_.Set("prettyPrint", "false")
45722	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
45723	urls += "?" + c.urlParams_.Encode()
45724	req, err := http.NewRequest("GET", urls, body)
45725	if err != nil {
45726		return nil, err
45727	}
45728	req.Header = reqHeaders
45729	googleapi.Expand(req.URL, map[string]string{
45730		"name": c.name,
45731	})
45732	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45733}
45734
45735// Do executes the "dialogflow.projects.locations.conversationProfiles.get" call.
45736// Exactly one of *GoogleCloudDialogflowV2ConversationProfile or error
45737// will be non-nil. Any non-2xx status code is an error. Response
45738// headers are in either
45739// *GoogleCloudDialogflowV2ConversationProfile.ServerResponse.Header or
45740// (if a response was returned at all) in
45741// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45742// whether the returned error was because http.StatusNotModified was
45743// returned.
45744func (c *ProjectsLocationsConversationProfilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ConversationProfile, error) {
45745	gensupport.SetOptions(c.urlParams_, opts...)
45746	res, err := c.doRequest("json")
45747	if res != nil && res.StatusCode == http.StatusNotModified {
45748		if res.Body != nil {
45749			res.Body.Close()
45750		}
45751		return nil, &googleapi.Error{
45752			Code:   res.StatusCode,
45753			Header: res.Header,
45754		}
45755	}
45756	if err != nil {
45757		return nil, err
45758	}
45759	defer googleapi.CloseBody(res)
45760	if err := googleapi.CheckResponse(res); err != nil {
45761		return nil, err
45762	}
45763	ret := &GoogleCloudDialogflowV2ConversationProfile{
45764		ServerResponse: googleapi.ServerResponse{
45765			Header:         res.Header,
45766			HTTPStatusCode: res.StatusCode,
45767		},
45768	}
45769	target := &ret
45770	if err := gensupport.DecodeResponse(target, res); err != nil {
45771		return nil, err
45772	}
45773	return ret, nil
45774	// {
45775	//   "description": "Retrieves the specified conversation profile.",
45776	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversationProfiles/{conversationProfilesId}",
45777	//   "httpMethod": "GET",
45778	//   "id": "dialogflow.projects.locations.conversationProfiles.get",
45779	//   "parameterOrder": [
45780	//     "name"
45781	//   ],
45782	//   "parameters": {
45783	//     "name": {
45784	//       "description": "Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`.",
45785	//       "location": "path",
45786	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversationProfiles/[^/]+$",
45787	//       "required": true,
45788	//       "type": "string"
45789	//     }
45790	//   },
45791	//   "path": "v2/{+name}",
45792	//   "response": {
45793	//     "$ref": "GoogleCloudDialogflowV2ConversationProfile"
45794	//   },
45795	//   "scopes": [
45796	//     "https://www.googleapis.com/auth/cloud-platform",
45797	//     "https://www.googleapis.com/auth/dialogflow"
45798	//   ]
45799	// }
45800
45801}
45802
45803// method id "dialogflow.projects.locations.conversationProfiles.list":
45804
45805type ProjectsLocationsConversationProfilesListCall struct {
45806	s            *Service
45807	parent       string
45808	urlParams_   gensupport.URLParams
45809	ifNoneMatch_ string
45810	ctx_         context.Context
45811	header_      http.Header
45812}
45813
45814// List: Returns the list of all conversation profiles in the specified
45815// project.
45816//
45817// - parent: The project to list all conversation profiles from. Format:
45818//   `projects//locations/`.
45819func (r *ProjectsLocationsConversationProfilesService) List(parent string) *ProjectsLocationsConversationProfilesListCall {
45820	c := &ProjectsLocationsConversationProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45821	c.parent = parent
45822	return c
45823}
45824
45825// PageSize sets the optional parameter "pageSize": The maximum number
45826// of items to return in a single page. By default 100 and at most 1000.
45827func (c *ProjectsLocationsConversationProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsConversationProfilesListCall {
45828	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
45829	return c
45830}
45831
45832// PageToken sets the optional parameter "pageToken": The
45833// next_page_token value returned from a previous list request.
45834func (c *ProjectsLocationsConversationProfilesListCall) PageToken(pageToken string) *ProjectsLocationsConversationProfilesListCall {
45835	c.urlParams_.Set("pageToken", pageToken)
45836	return c
45837}
45838
45839// Fields allows partial responses to be retrieved. See
45840// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45841// for more information.
45842func (c *ProjectsLocationsConversationProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationProfilesListCall {
45843	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45844	return c
45845}
45846
45847// IfNoneMatch sets the optional parameter which makes the operation
45848// fail if the object's ETag matches the given value. This is useful for
45849// getting updates only after the object has changed since the last
45850// request. Use googleapi.IsNotModified to check whether the response
45851// error from Do is the result of In-None-Match.
45852func (c *ProjectsLocationsConversationProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversationProfilesListCall {
45853	c.ifNoneMatch_ = entityTag
45854	return c
45855}
45856
45857// Context sets the context to be used in this call's Do method. Any
45858// pending HTTP request will be aborted if the provided context is
45859// canceled.
45860func (c *ProjectsLocationsConversationProfilesListCall) Context(ctx context.Context) *ProjectsLocationsConversationProfilesListCall {
45861	c.ctx_ = ctx
45862	return c
45863}
45864
45865// Header returns an http.Header that can be modified by the caller to
45866// add HTTP headers to the request.
45867func (c *ProjectsLocationsConversationProfilesListCall) Header() http.Header {
45868	if c.header_ == nil {
45869		c.header_ = make(http.Header)
45870	}
45871	return c.header_
45872}
45873
45874func (c *ProjectsLocationsConversationProfilesListCall) doRequest(alt string) (*http.Response, error) {
45875	reqHeaders := make(http.Header)
45876	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
45877	for k, v := range c.header_ {
45878		reqHeaders[k] = v
45879	}
45880	reqHeaders.Set("User-Agent", c.s.userAgent())
45881	if c.ifNoneMatch_ != "" {
45882		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45883	}
45884	var body io.Reader = nil
45885	c.urlParams_.Set("alt", alt)
45886	c.urlParams_.Set("prettyPrint", "false")
45887	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/conversationProfiles")
45888	urls += "?" + c.urlParams_.Encode()
45889	req, err := http.NewRequest("GET", urls, body)
45890	if err != nil {
45891		return nil, err
45892	}
45893	req.Header = reqHeaders
45894	googleapi.Expand(req.URL, map[string]string{
45895		"parent": c.parent,
45896	})
45897	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45898}
45899
45900// Do executes the "dialogflow.projects.locations.conversationProfiles.list" call.
45901// Exactly one of
45902// *GoogleCloudDialogflowV2ListConversationProfilesResponse or error
45903// will be non-nil. Any non-2xx status code is an error. Response
45904// headers are in either
45905// *GoogleCloudDialogflowV2ListConversationProfilesResponse.ServerRespons
45906// e.Header or (if a response was returned at all) in
45907// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45908// whether the returned error was because http.StatusNotModified was
45909// returned.
45910func (c *ProjectsLocationsConversationProfilesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListConversationProfilesResponse, error) {
45911	gensupport.SetOptions(c.urlParams_, opts...)
45912	res, err := c.doRequest("json")
45913	if res != nil && res.StatusCode == http.StatusNotModified {
45914		if res.Body != nil {
45915			res.Body.Close()
45916		}
45917		return nil, &googleapi.Error{
45918			Code:   res.StatusCode,
45919			Header: res.Header,
45920		}
45921	}
45922	if err != nil {
45923		return nil, err
45924	}
45925	defer googleapi.CloseBody(res)
45926	if err := googleapi.CheckResponse(res); err != nil {
45927		return nil, err
45928	}
45929	ret := &GoogleCloudDialogflowV2ListConversationProfilesResponse{
45930		ServerResponse: googleapi.ServerResponse{
45931			Header:         res.Header,
45932			HTTPStatusCode: res.StatusCode,
45933		},
45934	}
45935	target := &ret
45936	if err := gensupport.DecodeResponse(target, res); err != nil {
45937		return nil, err
45938	}
45939	return ret, nil
45940	// {
45941	//   "description": "Returns the list of all conversation profiles in the specified project.",
45942	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversationProfiles",
45943	//   "httpMethod": "GET",
45944	//   "id": "dialogflow.projects.locations.conversationProfiles.list",
45945	//   "parameterOrder": [
45946	//     "parent"
45947	//   ],
45948	//   "parameters": {
45949	//     "pageSize": {
45950	//       "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.",
45951	//       "format": "int32",
45952	//       "location": "query",
45953	//       "type": "integer"
45954	//     },
45955	//     "pageToken": {
45956	//       "description": "The next_page_token value returned from a previous list request.",
45957	//       "location": "query",
45958	//       "type": "string"
45959	//     },
45960	//     "parent": {
45961	//       "description": "Required. The project to list all conversation profiles from. Format: `projects//locations/`.",
45962	//       "location": "path",
45963	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
45964	//       "required": true,
45965	//       "type": "string"
45966	//     }
45967	//   },
45968	//   "path": "v2/{+parent}/conversationProfiles",
45969	//   "response": {
45970	//     "$ref": "GoogleCloudDialogflowV2ListConversationProfilesResponse"
45971	//   },
45972	//   "scopes": [
45973	//     "https://www.googleapis.com/auth/cloud-platform",
45974	//     "https://www.googleapis.com/auth/dialogflow"
45975	//   ]
45976	// }
45977
45978}
45979
45980// Pages invokes f for each page of results.
45981// A non-nil error returned from f will halt the iteration.
45982// The provided context supersedes any context provided to the Context method.
45983func (c *ProjectsLocationsConversationProfilesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListConversationProfilesResponse) error) error {
45984	c.ctx_ = ctx
45985	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45986	for {
45987		x, err := c.Do()
45988		if err != nil {
45989			return err
45990		}
45991		if err := f(x); err != nil {
45992			return err
45993		}
45994		if x.NextPageToken == "" {
45995			return nil
45996		}
45997		c.PageToken(x.NextPageToken)
45998	}
45999}
46000
46001// method id "dialogflow.projects.locations.conversationProfiles.patch":
46002
46003type ProjectsLocationsConversationProfilesPatchCall struct {
46004	s                                          *Service
46005	nameid                                     string
46006	googleclouddialogflowv2conversationprofile *GoogleCloudDialogflowV2ConversationProfile
46007	urlParams_                                 gensupport.URLParams
46008	ctx_                                       context.Context
46009	header_                                    http.Header
46010}
46011
46012// Patch: Updates the specified conversation profile.
46013// ConversationProfile.CreateTime and ConversationProfile.UpdateTime
46014// aren't populated in the response. You can retrieve them via
46015// GetConversationProfile API.
46016//
46017// - name: The unique identifier of this conversation profile. Format:
46018//   `projects//locations//conversationProfiles/`.
46019func (r *ProjectsLocationsConversationProfilesService) Patch(nameid string, googleclouddialogflowv2conversationprofile *GoogleCloudDialogflowV2ConversationProfile) *ProjectsLocationsConversationProfilesPatchCall {
46020	c := &ProjectsLocationsConversationProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46021	c.nameid = nameid
46022	c.googleclouddialogflowv2conversationprofile = googleclouddialogflowv2conversationprofile
46023	return c
46024}
46025
46026// UpdateMask sets the optional parameter "updateMask": Required. The
46027// mask to control which fields to update.
46028func (c *ProjectsLocationsConversationProfilesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConversationProfilesPatchCall {
46029	c.urlParams_.Set("updateMask", updateMask)
46030	return c
46031}
46032
46033// Fields allows partial responses to be retrieved. See
46034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46035// for more information.
46036func (c *ProjectsLocationsConversationProfilesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationProfilesPatchCall {
46037	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46038	return c
46039}
46040
46041// Context sets the context to be used in this call's Do method. Any
46042// pending HTTP request will be aborted if the provided context is
46043// canceled.
46044func (c *ProjectsLocationsConversationProfilesPatchCall) Context(ctx context.Context) *ProjectsLocationsConversationProfilesPatchCall {
46045	c.ctx_ = ctx
46046	return c
46047}
46048
46049// Header returns an http.Header that can be modified by the caller to
46050// add HTTP headers to the request.
46051func (c *ProjectsLocationsConversationProfilesPatchCall) Header() http.Header {
46052	if c.header_ == nil {
46053		c.header_ = make(http.Header)
46054	}
46055	return c.header_
46056}
46057
46058func (c *ProjectsLocationsConversationProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
46059	reqHeaders := make(http.Header)
46060	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
46061	for k, v := range c.header_ {
46062		reqHeaders[k] = v
46063	}
46064	reqHeaders.Set("User-Agent", c.s.userAgent())
46065	var body io.Reader = nil
46066	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2conversationprofile)
46067	if err != nil {
46068		return nil, err
46069	}
46070	reqHeaders.Set("Content-Type", "application/json")
46071	c.urlParams_.Set("alt", alt)
46072	c.urlParams_.Set("prettyPrint", "false")
46073	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
46074	urls += "?" + c.urlParams_.Encode()
46075	req, err := http.NewRequest("PATCH", urls, body)
46076	if err != nil {
46077		return nil, err
46078	}
46079	req.Header = reqHeaders
46080	googleapi.Expand(req.URL, map[string]string{
46081		"name": c.nameid,
46082	})
46083	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46084}
46085
46086// Do executes the "dialogflow.projects.locations.conversationProfiles.patch" call.
46087// Exactly one of *GoogleCloudDialogflowV2ConversationProfile or error
46088// will be non-nil. Any non-2xx status code is an error. Response
46089// headers are in either
46090// *GoogleCloudDialogflowV2ConversationProfile.ServerResponse.Header or
46091// (if a response was returned at all) in
46092// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46093// whether the returned error was because http.StatusNotModified was
46094// returned.
46095func (c *ProjectsLocationsConversationProfilesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ConversationProfile, error) {
46096	gensupport.SetOptions(c.urlParams_, opts...)
46097	res, err := c.doRequest("json")
46098	if res != nil && res.StatusCode == http.StatusNotModified {
46099		if res.Body != nil {
46100			res.Body.Close()
46101		}
46102		return nil, &googleapi.Error{
46103			Code:   res.StatusCode,
46104			Header: res.Header,
46105		}
46106	}
46107	if err != nil {
46108		return nil, err
46109	}
46110	defer googleapi.CloseBody(res)
46111	if err := googleapi.CheckResponse(res); err != nil {
46112		return nil, err
46113	}
46114	ret := &GoogleCloudDialogflowV2ConversationProfile{
46115		ServerResponse: googleapi.ServerResponse{
46116			Header:         res.Header,
46117			HTTPStatusCode: res.StatusCode,
46118		},
46119	}
46120	target := &ret
46121	if err := gensupport.DecodeResponse(target, res); err != nil {
46122		return nil, err
46123	}
46124	return ret, nil
46125	// {
46126	//   "description": "Updates the specified conversation profile. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.",
46127	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversationProfiles/{conversationProfilesId}",
46128	//   "httpMethod": "PATCH",
46129	//   "id": "dialogflow.projects.locations.conversationProfiles.patch",
46130	//   "parameterOrder": [
46131	//     "name"
46132	//   ],
46133	//   "parameters": {
46134	//     "name": {
46135	//       "description": "The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`.",
46136	//       "location": "path",
46137	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversationProfiles/[^/]+$",
46138	//       "required": true,
46139	//       "type": "string"
46140	//     },
46141	//     "updateMask": {
46142	//       "description": "Required. The mask to control which fields to update.",
46143	//       "format": "google-fieldmask",
46144	//       "location": "query",
46145	//       "type": "string"
46146	//     }
46147	//   },
46148	//   "path": "v2/{+name}",
46149	//   "request": {
46150	//     "$ref": "GoogleCloudDialogflowV2ConversationProfile"
46151	//   },
46152	//   "response": {
46153	//     "$ref": "GoogleCloudDialogflowV2ConversationProfile"
46154	//   },
46155	//   "scopes": [
46156	//     "https://www.googleapis.com/auth/cloud-platform",
46157	//     "https://www.googleapis.com/auth/dialogflow"
46158	//   ]
46159	// }
46160
46161}
46162
46163// method id "dialogflow.projects.locations.conversations.complete":
46164
46165type ProjectsLocationsConversationsCompleteCall struct {
46166	s                                                  *Service
46167	nameid                                             string
46168	googleclouddialogflowv2completeconversationrequest *GoogleCloudDialogflowV2CompleteConversationRequest
46169	urlParams_                                         gensupport.URLParams
46170	ctx_                                               context.Context
46171	header_                                            http.Header
46172}
46173
46174// Complete: Completes the specified conversation. Finished
46175// conversations are purged from the database after 30 days.
46176//
46177// - name: Resource identifier of the conversation to close. Format:
46178//   `projects//locations//conversations/`.
46179func (r *ProjectsLocationsConversationsService) Complete(nameid string, googleclouddialogflowv2completeconversationrequest *GoogleCloudDialogflowV2CompleteConversationRequest) *ProjectsLocationsConversationsCompleteCall {
46180	c := &ProjectsLocationsConversationsCompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46181	c.nameid = nameid
46182	c.googleclouddialogflowv2completeconversationrequest = googleclouddialogflowv2completeconversationrequest
46183	return c
46184}
46185
46186// Fields allows partial responses to be retrieved. See
46187// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46188// for more information.
46189func (c *ProjectsLocationsConversationsCompleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsCompleteCall {
46190	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46191	return c
46192}
46193
46194// Context sets the context to be used in this call's Do method. Any
46195// pending HTTP request will be aborted if the provided context is
46196// canceled.
46197func (c *ProjectsLocationsConversationsCompleteCall) Context(ctx context.Context) *ProjectsLocationsConversationsCompleteCall {
46198	c.ctx_ = ctx
46199	return c
46200}
46201
46202// Header returns an http.Header that can be modified by the caller to
46203// add HTTP headers to the request.
46204func (c *ProjectsLocationsConversationsCompleteCall) Header() http.Header {
46205	if c.header_ == nil {
46206		c.header_ = make(http.Header)
46207	}
46208	return c.header_
46209}
46210
46211func (c *ProjectsLocationsConversationsCompleteCall) doRequest(alt string) (*http.Response, error) {
46212	reqHeaders := make(http.Header)
46213	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
46214	for k, v := range c.header_ {
46215		reqHeaders[k] = v
46216	}
46217	reqHeaders.Set("User-Agent", c.s.userAgent())
46218	var body io.Reader = nil
46219	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2completeconversationrequest)
46220	if err != nil {
46221		return nil, err
46222	}
46223	reqHeaders.Set("Content-Type", "application/json")
46224	c.urlParams_.Set("alt", alt)
46225	c.urlParams_.Set("prettyPrint", "false")
46226	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:complete")
46227	urls += "?" + c.urlParams_.Encode()
46228	req, err := http.NewRequest("POST", urls, body)
46229	if err != nil {
46230		return nil, err
46231	}
46232	req.Header = reqHeaders
46233	googleapi.Expand(req.URL, map[string]string{
46234		"name": c.nameid,
46235	})
46236	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46237}
46238
46239// Do executes the "dialogflow.projects.locations.conversations.complete" call.
46240// Exactly one of *GoogleCloudDialogflowV2Conversation or error will be
46241// non-nil. Any non-2xx status code is an error. Response headers are in
46242// either *GoogleCloudDialogflowV2Conversation.ServerResponse.Header or
46243// (if a response was returned at all) in
46244// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46245// whether the returned error was because http.StatusNotModified was
46246// returned.
46247func (c *ProjectsLocationsConversationsCompleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Conversation, error) {
46248	gensupport.SetOptions(c.urlParams_, opts...)
46249	res, err := c.doRequest("json")
46250	if res != nil && res.StatusCode == http.StatusNotModified {
46251		if res.Body != nil {
46252			res.Body.Close()
46253		}
46254		return nil, &googleapi.Error{
46255			Code:   res.StatusCode,
46256			Header: res.Header,
46257		}
46258	}
46259	if err != nil {
46260		return nil, err
46261	}
46262	defer googleapi.CloseBody(res)
46263	if err := googleapi.CheckResponse(res); err != nil {
46264		return nil, err
46265	}
46266	ret := &GoogleCloudDialogflowV2Conversation{
46267		ServerResponse: googleapi.ServerResponse{
46268			Header:         res.Header,
46269			HTTPStatusCode: res.StatusCode,
46270		},
46271	}
46272	target := &ret
46273	if err := gensupport.DecodeResponse(target, res); err != nil {
46274		return nil, err
46275	}
46276	return ret, nil
46277	// {
46278	//   "description": "Completes the specified conversation. Finished conversations are purged from the database after 30 days.",
46279	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}:complete",
46280	//   "httpMethod": "POST",
46281	//   "id": "dialogflow.projects.locations.conversations.complete",
46282	//   "parameterOrder": [
46283	//     "name"
46284	//   ],
46285	//   "parameters": {
46286	//     "name": {
46287	//       "description": "Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`.",
46288	//       "location": "path",
46289	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$",
46290	//       "required": true,
46291	//       "type": "string"
46292	//     }
46293	//   },
46294	//   "path": "v2/{+name}:complete",
46295	//   "request": {
46296	//     "$ref": "GoogleCloudDialogflowV2CompleteConversationRequest"
46297	//   },
46298	//   "response": {
46299	//     "$ref": "GoogleCloudDialogflowV2Conversation"
46300	//   },
46301	//   "scopes": [
46302	//     "https://www.googleapis.com/auth/cloud-platform",
46303	//     "https://www.googleapis.com/auth/dialogflow"
46304	//   ]
46305	// }
46306
46307}
46308
46309// method id "dialogflow.projects.locations.conversations.create":
46310
46311type ProjectsLocationsConversationsCreateCall struct {
46312	s                                   *Service
46313	parentid                            string
46314	googleclouddialogflowv2conversation *GoogleCloudDialogflowV2Conversation
46315	urlParams_                          gensupport.URLParams
46316	ctx_                                context.Context
46317	header_                             http.Header
46318}
46319
46320// Create: Creates a new conversation. Conversations are auto-completed
46321// after 24 hours. Conversation Lifecycle: There are two stages during a
46322// conversation: Automated Agent Stage and Assist Stage. For Automated
46323// Agent Stage, there will be a dialogflow agent responding to user
46324// queries. For Assist Stage, there's no dialogflow agent responding to
46325// user queries. But we will provide suggestions which are generated
46326// from conversation. If Conversation.conversation_profile is configured
46327// for a dialogflow agent, conversation will start from `Automated Agent
46328// Stage`, otherwise, it will start from `Assist Stage`. And during
46329// `Automated Agent Stage`, once an Intent with
46330// Intent.live_agent_handoff is triggered, conversation will transfer to
46331// Assist Stage.
46332//
46333// - parent: Resource identifier of the project creating the
46334//   conversation. Format: `projects//locations/`.
46335func (r *ProjectsLocationsConversationsService) Create(parentid string, googleclouddialogflowv2conversation *GoogleCloudDialogflowV2Conversation) *ProjectsLocationsConversationsCreateCall {
46336	c := &ProjectsLocationsConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46337	c.parentid = parentid
46338	c.googleclouddialogflowv2conversation = googleclouddialogflowv2conversation
46339	return c
46340}
46341
46342// ConversationId sets the optional parameter "conversationId":
46343// Identifier of the conversation. Generally it's auto generated by
46344// Google. Only set it if you cannot wait for the response to return a
46345// auto-generated one to you. The conversation ID must be compliant with
46346// the regression fomula "a-zA-Z*" with the characters length in range
46347// of [3,64]. If the field is provided, the caller is resposible for 1.
46348// the uniqueness of the ID, otherwise the request will be rejected. 2.
46349// the consistency for whether to use custom ID or not under a project
46350// to better ensure uniqueness.
46351func (c *ProjectsLocationsConversationsCreateCall) ConversationId(conversationId string) *ProjectsLocationsConversationsCreateCall {
46352	c.urlParams_.Set("conversationId", conversationId)
46353	return c
46354}
46355
46356// Fields allows partial responses to be retrieved. See
46357// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46358// for more information.
46359func (c *ProjectsLocationsConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsCreateCall {
46360	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46361	return c
46362}
46363
46364// Context sets the context to be used in this call's Do method. Any
46365// pending HTTP request will be aborted if the provided context is
46366// canceled.
46367func (c *ProjectsLocationsConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsConversationsCreateCall {
46368	c.ctx_ = ctx
46369	return c
46370}
46371
46372// Header returns an http.Header that can be modified by the caller to
46373// add HTTP headers to the request.
46374func (c *ProjectsLocationsConversationsCreateCall) Header() http.Header {
46375	if c.header_ == nil {
46376		c.header_ = make(http.Header)
46377	}
46378	return c.header_
46379}
46380
46381func (c *ProjectsLocationsConversationsCreateCall) doRequest(alt string) (*http.Response, error) {
46382	reqHeaders := make(http.Header)
46383	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
46384	for k, v := range c.header_ {
46385		reqHeaders[k] = v
46386	}
46387	reqHeaders.Set("User-Agent", c.s.userAgent())
46388	var body io.Reader = nil
46389	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2conversation)
46390	if err != nil {
46391		return nil, err
46392	}
46393	reqHeaders.Set("Content-Type", "application/json")
46394	c.urlParams_.Set("alt", alt)
46395	c.urlParams_.Set("prettyPrint", "false")
46396	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/conversations")
46397	urls += "?" + c.urlParams_.Encode()
46398	req, err := http.NewRequest("POST", urls, body)
46399	if err != nil {
46400		return nil, err
46401	}
46402	req.Header = reqHeaders
46403	googleapi.Expand(req.URL, map[string]string{
46404		"parent": c.parentid,
46405	})
46406	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46407}
46408
46409// Do executes the "dialogflow.projects.locations.conversations.create" call.
46410// Exactly one of *GoogleCloudDialogflowV2Conversation or error will be
46411// non-nil. Any non-2xx status code is an error. Response headers are in
46412// either *GoogleCloudDialogflowV2Conversation.ServerResponse.Header or
46413// (if a response was returned at all) in
46414// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46415// whether the returned error was because http.StatusNotModified was
46416// returned.
46417func (c *ProjectsLocationsConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Conversation, error) {
46418	gensupport.SetOptions(c.urlParams_, opts...)
46419	res, err := c.doRequest("json")
46420	if res != nil && res.StatusCode == http.StatusNotModified {
46421		if res.Body != nil {
46422			res.Body.Close()
46423		}
46424		return nil, &googleapi.Error{
46425			Code:   res.StatusCode,
46426			Header: res.Header,
46427		}
46428	}
46429	if err != nil {
46430		return nil, err
46431	}
46432	defer googleapi.CloseBody(res)
46433	if err := googleapi.CheckResponse(res); err != nil {
46434		return nil, err
46435	}
46436	ret := &GoogleCloudDialogflowV2Conversation{
46437		ServerResponse: googleapi.ServerResponse{
46438			Header:         res.Header,
46439			HTTPStatusCode: res.StatusCode,
46440		},
46441	}
46442	target := &ret
46443	if err := gensupport.DecodeResponse(target, res); err != nil {
46444		return nil, err
46445	}
46446	return ret, nil
46447	// {
46448	//   "description": "Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage.",
46449	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations",
46450	//   "httpMethod": "POST",
46451	//   "id": "dialogflow.projects.locations.conversations.create",
46452	//   "parameterOrder": [
46453	//     "parent"
46454	//   ],
46455	//   "parameters": {
46456	//     "conversationId": {
46457	//       "description": "Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula \"a-zA-Z*\" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness.",
46458	//       "location": "query",
46459	//       "type": "string"
46460	//     },
46461	//     "parent": {
46462	//       "description": "Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`.",
46463	//       "location": "path",
46464	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
46465	//       "required": true,
46466	//       "type": "string"
46467	//     }
46468	//   },
46469	//   "path": "v2/{+parent}/conversations",
46470	//   "request": {
46471	//     "$ref": "GoogleCloudDialogflowV2Conversation"
46472	//   },
46473	//   "response": {
46474	//     "$ref": "GoogleCloudDialogflowV2Conversation"
46475	//   },
46476	//   "scopes": [
46477	//     "https://www.googleapis.com/auth/cloud-platform",
46478	//     "https://www.googleapis.com/auth/dialogflow"
46479	//   ]
46480	// }
46481
46482}
46483
46484// method id "dialogflow.projects.locations.conversations.get":
46485
46486type ProjectsLocationsConversationsGetCall struct {
46487	s            *Service
46488	name         string
46489	urlParams_   gensupport.URLParams
46490	ifNoneMatch_ string
46491	ctx_         context.Context
46492	header_      http.Header
46493}
46494
46495// Get: Retrieves the specific conversation.
46496//
46497// - name: The name of the conversation. Format:
46498//   `projects//locations//conversations/`.
46499func (r *ProjectsLocationsConversationsService) Get(name string) *ProjectsLocationsConversationsGetCall {
46500	c := &ProjectsLocationsConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46501	c.name = name
46502	return c
46503}
46504
46505// Fields allows partial responses to be retrieved. See
46506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46507// for more information.
46508func (c *ProjectsLocationsConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsGetCall {
46509	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46510	return c
46511}
46512
46513// IfNoneMatch sets the optional parameter which makes the operation
46514// fail if the object's ETag matches the given value. This is useful for
46515// getting updates only after the object has changed since the last
46516// request. Use googleapi.IsNotModified to check whether the response
46517// error from Do is the result of In-None-Match.
46518func (c *ProjectsLocationsConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversationsGetCall {
46519	c.ifNoneMatch_ = entityTag
46520	return c
46521}
46522
46523// Context sets the context to be used in this call's Do method. Any
46524// pending HTTP request will be aborted if the provided context is
46525// canceled.
46526func (c *ProjectsLocationsConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsConversationsGetCall {
46527	c.ctx_ = ctx
46528	return c
46529}
46530
46531// Header returns an http.Header that can be modified by the caller to
46532// add HTTP headers to the request.
46533func (c *ProjectsLocationsConversationsGetCall) Header() http.Header {
46534	if c.header_ == nil {
46535		c.header_ = make(http.Header)
46536	}
46537	return c.header_
46538}
46539
46540func (c *ProjectsLocationsConversationsGetCall) doRequest(alt string) (*http.Response, error) {
46541	reqHeaders := make(http.Header)
46542	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
46543	for k, v := range c.header_ {
46544		reqHeaders[k] = v
46545	}
46546	reqHeaders.Set("User-Agent", c.s.userAgent())
46547	if c.ifNoneMatch_ != "" {
46548		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46549	}
46550	var body io.Reader = nil
46551	c.urlParams_.Set("alt", alt)
46552	c.urlParams_.Set("prettyPrint", "false")
46553	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
46554	urls += "?" + c.urlParams_.Encode()
46555	req, err := http.NewRequest("GET", urls, body)
46556	if err != nil {
46557		return nil, err
46558	}
46559	req.Header = reqHeaders
46560	googleapi.Expand(req.URL, map[string]string{
46561		"name": c.name,
46562	})
46563	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46564}
46565
46566// Do executes the "dialogflow.projects.locations.conversations.get" call.
46567// Exactly one of *GoogleCloudDialogflowV2Conversation or error will be
46568// non-nil. Any non-2xx status code is an error. Response headers are in
46569// either *GoogleCloudDialogflowV2Conversation.ServerResponse.Header or
46570// (if a response was returned at all) in
46571// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46572// whether the returned error was because http.StatusNotModified was
46573// returned.
46574func (c *ProjectsLocationsConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Conversation, error) {
46575	gensupport.SetOptions(c.urlParams_, opts...)
46576	res, err := c.doRequest("json")
46577	if res != nil && res.StatusCode == http.StatusNotModified {
46578		if res.Body != nil {
46579			res.Body.Close()
46580		}
46581		return nil, &googleapi.Error{
46582			Code:   res.StatusCode,
46583			Header: res.Header,
46584		}
46585	}
46586	if err != nil {
46587		return nil, err
46588	}
46589	defer googleapi.CloseBody(res)
46590	if err := googleapi.CheckResponse(res); err != nil {
46591		return nil, err
46592	}
46593	ret := &GoogleCloudDialogflowV2Conversation{
46594		ServerResponse: googleapi.ServerResponse{
46595			Header:         res.Header,
46596			HTTPStatusCode: res.StatusCode,
46597		},
46598	}
46599	target := &ret
46600	if err := gensupport.DecodeResponse(target, res); err != nil {
46601		return nil, err
46602	}
46603	return ret, nil
46604	// {
46605	//   "description": "Retrieves the specific conversation.",
46606	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}",
46607	//   "httpMethod": "GET",
46608	//   "id": "dialogflow.projects.locations.conversations.get",
46609	//   "parameterOrder": [
46610	//     "name"
46611	//   ],
46612	//   "parameters": {
46613	//     "name": {
46614	//       "description": "Required. The name of the conversation. Format: `projects//locations//conversations/`.",
46615	//       "location": "path",
46616	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$",
46617	//       "required": true,
46618	//       "type": "string"
46619	//     }
46620	//   },
46621	//   "path": "v2/{+name}",
46622	//   "response": {
46623	//     "$ref": "GoogleCloudDialogflowV2Conversation"
46624	//   },
46625	//   "scopes": [
46626	//     "https://www.googleapis.com/auth/cloud-platform",
46627	//     "https://www.googleapis.com/auth/dialogflow"
46628	//   ]
46629	// }
46630
46631}
46632
46633// method id "dialogflow.projects.locations.conversations.list":
46634
46635type ProjectsLocationsConversationsListCall struct {
46636	s            *Service
46637	parent       string
46638	urlParams_   gensupport.URLParams
46639	ifNoneMatch_ string
46640	ctx_         context.Context
46641	header_      http.Header
46642}
46643
46644// List: Returns the list of all conversations in the specified project.
46645//
46646// - parent: The project from which to list all conversation. Format:
46647//   `projects//locations/`.
46648func (r *ProjectsLocationsConversationsService) List(parent string) *ProjectsLocationsConversationsListCall {
46649	c := &ProjectsLocationsConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46650	c.parent = parent
46651	return c
46652}
46653
46654// Filter sets the optional parameter "filter": A filter expression that
46655// filters conversations listed in the response. In general, the
46656// expression must specify the field name, a comparison operator, and
46657// the value to use for filtering: - The value must be a string, a
46658// number, or a boolean. - The comparison operator must be either
46659// `=`,`!=`, `>`, or `<`. - To filter on multiple expressions, separate
46660// the expressions with `AND` or `OR` (omitting both implies `AND`). -
46661// For clarity, expressions can be enclosed in parentheses. Only
46662// `lifecycle_state` can be filtered on in this way. For example, the
46663// following expression only returns `COMPLETED` conversations:
46664// `lifecycle_state = "COMPLETED" For more information about filtering,
46665// see API Filtering (https://aip.dev/160).
46666func (c *ProjectsLocationsConversationsListCall) Filter(filter string) *ProjectsLocationsConversationsListCall {
46667	c.urlParams_.Set("filter", filter)
46668	return c
46669}
46670
46671// PageSize sets the optional parameter "pageSize": The maximum number
46672// of items to return in a single page. By default 100 and at most 1000.
46673func (c *ProjectsLocationsConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsConversationsListCall {
46674	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
46675	return c
46676}
46677
46678// PageToken sets the optional parameter "pageToken": The
46679// next_page_token value returned from a previous list request.
46680func (c *ProjectsLocationsConversationsListCall) PageToken(pageToken string) *ProjectsLocationsConversationsListCall {
46681	c.urlParams_.Set("pageToken", pageToken)
46682	return c
46683}
46684
46685// Fields allows partial responses to be retrieved. See
46686// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46687// for more information.
46688func (c *ProjectsLocationsConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsListCall {
46689	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46690	return c
46691}
46692
46693// IfNoneMatch sets the optional parameter which makes the operation
46694// fail if the object's ETag matches the given value. This is useful for
46695// getting updates only after the object has changed since the last
46696// request. Use googleapi.IsNotModified to check whether the response
46697// error from Do is the result of In-None-Match.
46698func (c *ProjectsLocationsConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversationsListCall {
46699	c.ifNoneMatch_ = entityTag
46700	return c
46701}
46702
46703// Context sets the context to be used in this call's Do method. Any
46704// pending HTTP request will be aborted if the provided context is
46705// canceled.
46706func (c *ProjectsLocationsConversationsListCall) Context(ctx context.Context) *ProjectsLocationsConversationsListCall {
46707	c.ctx_ = ctx
46708	return c
46709}
46710
46711// Header returns an http.Header that can be modified by the caller to
46712// add HTTP headers to the request.
46713func (c *ProjectsLocationsConversationsListCall) Header() http.Header {
46714	if c.header_ == nil {
46715		c.header_ = make(http.Header)
46716	}
46717	return c.header_
46718}
46719
46720func (c *ProjectsLocationsConversationsListCall) doRequest(alt string) (*http.Response, error) {
46721	reqHeaders := make(http.Header)
46722	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
46723	for k, v := range c.header_ {
46724		reqHeaders[k] = v
46725	}
46726	reqHeaders.Set("User-Agent", c.s.userAgent())
46727	if c.ifNoneMatch_ != "" {
46728		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46729	}
46730	var body io.Reader = nil
46731	c.urlParams_.Set("alt", alt)
46732	c.urlParams_.Set("prettyPrint", "false")
46733	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/conversations")
46734	urls += "?" + c.urlParams_.Encode()
46735	req, err := http.NewRequest("GET", urls, body)
46736	if err != nil {
46737		return nil, err
46738	}
46739	req.Header = reqHeaders
46740	googleapi.Expand(req.URL, map[string]string{
46741		"parent": c.parent,
46742	})
46743	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46744}
46745
46746// Do executes the "dialogflow.projects.locations.conversations.list" call.
46747// Exactly one of *GoogleCloudDialogflowV2ListConversationsResponse or
46748// error will be non-nil. Any non-2xx status code is an error. Response
46749// headers are in either
46750// *GoogleCloudDialogflowV2ListConversationsResponse.ServerResponse.Heade
46751// r or (if a response was returned at all) in
46752// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46753// whether the returned error was because http.StatusNotModified was
46754// returned.
46755func (c *ProjectsLocationsConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListConversationsResponse, error) {
46756	gensupport.SetOptions(c.urlParams_, opts...)
46757	res, err := c.doRequest("json")
46758	if res != nil && res.StatusCode == http.StatusNotModified {
46759		if res.Body != nil {
46760			res.Body.Close()
46761		}
46762		return nil, &googleapi.Error{
46763			Code:   res.StatusCode,
46764			Header: res.Header,
46765		}
46766	}
46767	if err != nil {
46768		return nil, err
46769	}
46770	defer googleapi.CloseBody(res)
46771	if err := googleapi.CheckResponse(res); err != nil {
46772		return nil, err
46773	}
46774	ret := &GoogleCloudDialogflowV2ListConversationsResponse{
46775		ServerResponse: googleapi.ServerResponse{
46776			Header:         res.Header,
46777			HTTPStatusCode: res.StatusCode,
46778		},
46779	}
46780	target := &ret
46781	if err := gensupport.DecodeResponse(target, res); err != nil {
46782		return nil, err
46783	}
46784	return ret, nil
46785	// {
46786	//   "description": "Returns the list of all conversations in the specified project.",
46787	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations",
46788	//   "httpMethod": "GET",
46789	//   "id": "dialogflow.projects.locations.conversations.list",
46790	//   "parameterOrder": [
46791	//     "parent"
46792	//   ],
46793	//   "parameters": {
46794	//     "filter": {
46795	//       "description": "A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `\u003e`, or `\u003c`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = \"COMPLETED\"` For more information about filtering, see [API Filtering](https://aip.dev/160).",
46796	//       "location": "query",
46797	//       "type": "string"
46798	//     },
46799	//     "pageSize": {
46800	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
46801	//       "format": "int32",
46802	//       "location": "query",
46803	//       "type": "integer"
46804	//     },
46805	//     "pageToken": {
46806	//       "description": "Optional. The next_page_token value returned from a previous list request.",
46807	//       "location": "query",
46808	//       "type": "string"
46809	//     },
46810	//     "parent": {
46811	//       "description": "Required. The project from which to list all conversation. Format: `projects//locations/`.",
46812	//       "location": "path",
46813	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
46814	//       "required": true,
46815	//       "type": "string"
46816	//     }
46817	//   },
46818	//   "path": "v2/{+parent}/conversations",
46819	//   "response": {
46820	//     "$ref": "GoogleCloudDialogflowV2ListConversationsResponse"
46821	//   },
46822	//   "scopes": [
46823	//     "https://www.googleapis.com/auth/cloud-platform",
46824	//     "https://www.googleapis.com/auth/dialogflow"
46825	//   ]
46826	// }
46827
46828}
46829
46830// Pages invokes f for each page of results.
46831// A non-nil error returned from f will halt the iteration.
46832// The provided context supersedes any context provided to the Context method.
46833func (c *ProjectsLocationsConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListConversationsResponse) error) error {
46834	c.ctx_ = ctx
46835	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
46836	for {
46837		x, err := c.Do()
46838		if err != nil {
46839			return err
46840		}
46841		if err := f(x); err != nil {
46842			return err
46843		}
46844		if x.NextPageToken == "" {
46845			return nil
46846		}
46847		c.PageToken(x.NextPageToken)
46848	}
46849}
46850
46851// method id "dialogflow.projects.locations.conversations.messages.list":
46852
46853type ProjectsLocationsConversationsMessagesListCall struct {
46854	s            *Service
46855	parent       string
46856	urlParams_   gensupport.URLParams
46857	ifNoneMatch_ string
46858	ctx_         context.Context
46859	header_      http.Header
46860}
46861
46862// List: Lists messages that belong to a given conversation. `messages`
46863// are ordered by `create_time` in descending order. To fetch updates
46864// without duplication, send request with filter
46865// `create_time_epoch_microseconds > [first item's create_time of
46866// previous request]` and empty page_token.
46867//
46868// - parent: The name of the conversation to list messages for. Format:
46869//   `projects//locations//conversations/`.
46870func (r *ProjectsLocationsConversationsMessagesService) List(parent string) *ProjectsLocationsConversationsMessagesListCall {
46871	c := &ProjectsLocationsConversationsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46872	c.parent = parent
46873	return c
46874}
46875
46876// Filter sets the optional parameter "filter": Filter on message
46877// fields. Currently predicates on `create_time` and
46878// `create_time_epoch_microseconds` are supported. `create_time` only
46879// support milliseconds accuracy. E.g., `create_time_epoch_microseconds
46880// > 1551790877964485` or `create_time > 2017-01-15T01:30:15.01Z`. For
46881// more information about filtering, see API Filtering
46882// (https://aip.dev/160).
46883func (c *ProjectsLocationsConversationsMessagesListCall) Filter(filter string) *ProjectsLocationsConversationsMessagesListCall {
46884	c.urlParams_.Set("filter", filter)
46885	return c
46886}
46887
46888// PageSize sets the optional parameter "pageSize": The maximum number
46889// of items to return in a single page. By default 100 and at most 1000.
46890func (c *ProjectsLocationsConversationsMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsConversationsMessagesListCall {
46891	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
46892	return c
46893}
46894
46895// PageToken sets the optional parameter "pageToken": The
46896// next_page_token value returned from a previous list request.
46897func (c *ProjectsLocationsConversationsMessagesListCall) PageToken(pageToken string) *ProjectsLocationsConversationsMessagesListCall {
46898	c.urlParams_.Set("pageToken", pageToken)
46899	return c
46900}
46901
46902// Fields allows partial responses to be retrieved. See
46903// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46904// for more information.
46905func (c *ProjectsLocationsConversationsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsMessagesListCall {
46906	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46907	return c
46908}
46909
46910// IfNoneMatch sets the optional parameter which makes the operation
46911// fail if the object's ETag matches the given value. This is useful for
46912// getting updates only after the object has changed since the last
46913// request. Use googleapi.IsNotModified to check whether the response
46914// error from Do is the result of In-None-Match.
46915func (c *ProjectsLocationsConversationsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversationsMessagesListCall {
46916	c.ifNoneMatch_ = entityTag
46917	return c
46918}
46919
46920// Context sets the context to be used in this call's Do method. Any
46921// pending HTTP request will be aborted if the provided context is
46922// canceled.
46923func (c *ProjectsLocationsConversationsMessagesListCall) Context(ctx context.Context) *ProjectsLocationsConversationsMessagesListCall {
46924	c.ctx_ = ctx
46925	return c
46926}
46927
46928// Header returns an http.Header that can be modified by the caller to
46929// add HTTP headers to the request.
46930func (c *ProjectsLocationsConversationsMessagesListCall) Header() http.Header {
46931	if c.header_ == nil {
46932		c.header_ = make(http.Header)
46933	}
46934	return c.header_
46935}
46936
46937func (c *ProjectsLocationsConversationsMessagesListCall) doRequest(alt string) (*http.Response, error) {
46938	reqHeaders := make(http.Header)
46939	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
46940	for k, v := range c.header_ {
46941		reqHeaders[k] = v
46942	}
46943	reqHeaders.Set("User-Agent", c.s.userAgent())
46944	if c.ifNoneMatch_ != "" {
46945		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46946	}
46947	var body io.Reader = nil
46948	c.urlParams_.Set("alt", alt)
46949	c.urlParams_.Set("prettyPrint", "false")
46950	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/messages")
46951	urls += "?" + c.urlParams_.Encode()
46952	req, err := http.NewRequest("GET", urls, body)
46953	if err != nil {
46954		return nil, err
46955	}
46956	req.Header = reqHeaders
46957	googleapi.Expand(req.URL, map[string]string{
46958		"parent": c.parent,
46959	})
46960	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46961}
46962
46963// Do executes the "dialogflow.projects.locations.conversations.messages.list" call.
46964// Exactly one of *GoogleCloudDialogflowV2ListMessagesResponse or error
46965// will be non-nil. Any non-2xx status code is an error. Response
46966// headers are in either
46967// *GoogleCloudDialogflowV2ListMessagesResponse.ServerResponse.Header or
46968// (if a response was returned at all) in
46969// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46970// whether the returned error was because http.StatusNotModified was
46971// returned.
46972func (c *ProjectsLocationsConversationsMessagesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListMessagesResponse, error) {
46973	gensupport.SetOptions(c.urlParams_, opts...)
46974	res, err := c.doRequest("json")
46975	if res != nil && res.StatusCode == http.StatusNotModified {
46976		if res.Body != nil {
46977			res.Body.Close()
46978		}
46979		return nil, &googleapi.Error{
46980			Code:   res.StatusCode,
46981			Header: res.Header,
46982		}
46983	}
46984	if err != nil {
46985		return nil, err
46986	}
46987	defer googleapi.CloseBody(res)
46988	if err := googleapi.CheckResponse(res); err != nil {
46989		return nil, err
46990	}
46991	ret := &GoogleCloudDialogflowV2ListMessagesResponse{
46992		ServerResponse: googleapi.ServerResponse{
46993			Header:         res.Header,
46994			HTTPStatusCode: res.StatusCode,
46995		},
46996	}
46997	target := &ret
46998	if err := gensupport.DecodeResponse(target, res); err != nil {
46999		return nil, err
47000	}
47001	return ret, nil
47002	// {
47003	//   "description": "Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds \u003e [first item's create_time of previous request]` and empty page_token.",
47004	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/messages",
47005	//   "httpMethod": "GET",
47006	//   "id": "dialogflow.projects.locations.conversations.messages.list",
47007	//   "parameterOrder": [
47008	//     "parent"
47009	//   ],
47010	//   "parameters": {
47011	//     "filter": {
47012	//       "description": "Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \u003e 1551790877964485` or `create_time \u003e 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160).",
47013	//       "location": "query",
47014	//       "type": "string"
47015	//     },
47016	//     "pageSize": {
47017	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
47018	//       "format": "int32",
47019	//       "location": "query",
47020	//       "type": "integer"
47021	//     },
47022	//     "pageToken": {
47023	//       "description": "Optional. The next_page_token value returned from a previous list request.",
47024	//       "location": "query",
47025	//       "type": "string"
47026	//     },
47027	//     "parent": {
47028	//       "description": "Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/`",
47029	//       "location": "path",
47030	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$",
47031	//       "required": true,
47032	//       "type": "string"
47033	//     }
47034	//   },
47035	//   "path": "v2/{+parent}/messages",
47036	//   "response": {
47037	//     "$ref": "GoogleCloudDialogflowV2ListMessagesResponse"
47038	//   },
47039	//   "scopes": [
47040	//     "https://www.googleapis.com/auth/cloud-platform",
47041	//     "https://www.googleapis.com/auth/dialogflow"
47042	//   ]
47043	// }
47044
47045}
47046
47047// Pages invokes f for each page of results.
47048// A non-nil error returned from f will halt the iteration.
47049// The provided context supersedes any context provided to the Context method.
47050func (c *ProjectsLocationsConversationsMessagesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListMessagesResponse) error) error {
47051	c.ctx_ = ctx
47052	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47053	for {
47054		x, err := c.Do()
47055		if err != nil {
47056			return err
47057		}
47058		if err := f(x); err != nil {
47059			return err
47060		}
47061		if x.NextPageToken == "" {
47062			return nil
47063		}
47064		c.PageToken(x.NextPageToken)
47065	}
47066}
47067
47068// method id "dialogflow.projects.locations.conversations.participants.analyzeContent":
47069
47070type ProjectsLocationsConversationsParticipantsAnalyzeContentCall struct {
47071	s                                            *Service
47072	participant                                  string
47073	googleclouddialogflowv2analyzecontentrequest *GoogleCloudDialogflowV2AnalyzeContentRequest
47074	urlParams_                                   gensupport.URLParams
47075	ctx_                                         context.Context
47076	header_                                      http.Header
47077}
47078
47079// AnalyzeContent: Adds a text (chat, for example), or audio (phone
47080// recording, for example) message from a participant into the
47081// conversation. Note: Always use agent versions for production traffic
47082// sent to virtual agents. See Versions and environments
47083// (https://cloud.google.com/dialogflow/es/docs/agents-versions).
47084//
47085// - participant: The name of the participant this text comes from.
47086//   Format: `projects//locations//conversations//participants/`.
47087func (r *ProjectsLocationsConversationsParticipantsService) AnalyzeContent(participant string, googleclouddialogflowv2analyzecontentrequest *GoogleCloudDialogflowV2AnalyzeContentRequest) *ProjectsLocationsConversationsParticipantsAnalyzeContentCall {
47088	c := &ProjectsLocationsConversationsParticipantsAnalyzeContentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47089	c.participant = participant
47090	c.googleclouddialogflowv2analyzecontentrequest = googleclouddialogflowv2analyzecontentrequest
47091	return c
47092}
47093
47094// Fields allows partial responses to be retrieved. See
47095// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47096// for more information.
47097func (c *ProjectsLocationsConversationsParticipantsAnalyzeContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsParticipantsAnalyzeContentCall {
47098	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47099	return c
47100}
47101
47102// Context sets the context to be used in this call's Do method. Any
47103// pending HTTP request will be aborted if the provided context is
47104// canceled.
47105func (c *ProjectsLocationsConversationsParticipantsAnalyzeContentCall) Context(ctx context.Context) *ProjectsLocationsConversationsParticipantsAnalyzeContentCall {
47106	c.ctx_ = ctx
47107	return c
47108}
47109
47110// Header returns an http.Header that can be modified by the caller to
47111// add HTTP headers to the request.
47112func (c *ProjectsLocationsConversationsParticipantsAnalyzeContentCall) Header() http.Header {
47113	if c.header_ == nil {
47114		c.header_ = make(http.Header)
47115	}
47116	return c.header_
47117}
47118
47119func (c *ProjectsLocationsConversationsParticipantsAnalyzeContentCall) doRequest(alt string) (*http.Response, error) {
47120	reqHeaders := make(http.Header)
47121	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
47122	for k, v := range c.header_ {
47123		reqHeaders[k] = v
47124	}
47125	reqHeaders.Set("User-Agent", c.s.userAgent())
47126	var body io.Reader = nil
47127	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2analyzecontentrequest)
47128	if err != nil {
47129		return nil, err
47130	}
47131	reqHeaders.Set("Content-Type", "application/json")
47132	c.urlParams_.Set("alt", alt)
47133	c.urlParams_.Set("prettyPrint", "false")
47134	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+participant}:analyzeContent")
47135	urls += "?" + c.urlParams_.Encode()
47136	req, err := http.NewRequest("POST", urls, body)
47137	if err != nil {
47138		return nil, err
47139	}
47140	req.Header = reqHeaders
47141	googleapi.Expand(req.URL, map[string]string{
47142		"participant": c.participant,
47143	})
47144	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47145}
47146
47147// Do executes the "dialogflow.projects.locations.conversations.participants.analyzeContent" call.
47148// Exactly one of *GoogleCloudDialogflowV2AnalyzeContentResponse or
47149// error will be non-nil. Any non-2xx status code is an error. Response
47150// headers are in either
47151// *GoogleCloudDialogflowV2AnalyzeContentResponse.ServerResponse.Header
47152// or (if a response was returned at all) in
47153// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47154// whether the returned error was because http.StatusNotModified was
47155// returned.
47156func (c *ProjectsLocationsConversationsParticipantsAnalyzeContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2AnalyzeContentResponse, error) {
47157	gensupport.SetOptions(c.urlParams_, opts...)
47158	res, err := c.doRequest("json")
47159	if res != nil && res.StatusCode == http.StatusNotModified {
47160		if res.Body != nil {
47161			res.Body.Close()
47162		}
47163		return nil, &googleapi.Error{
47164			Code:   res.StatusCode,
47165			Header: res.Header,
47166		}
47167	}
47168	if err != nil {
47169		return nil, err
47170	}
47171	defer googleapi.CloseBody(res)
47172	if err := googleapi.CheckResponse(res); err != nil {
47173		return nil, err
47174	}
47175	ret := &GoogleCloudDialogflowV2AnalyzeContentResponse{
47176		ServerResponse: googleapi.ServerResponse{
47177			Header:         res.Header,
47178			HTTPStatusCode: res.StatusCode,
47179		},
47180	}
47181	target := &ret
47182	if err := gensupport.DecodeResponse(target, res); err != nil {
47183		return nil, err
47184	}
47185	return ret, nil
47186	// {
47187	//   "description": "Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: Always use agent versions for production traffic sent to virtual agents. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).",
47188	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}:analyzeContent",
47189	//   "httpMethod": "POST",
47190	//   "id": "dialogflow.projects.locations.conversations.participants.analyzeContent",
47191	//   "parameterOrder": [
47192	//     "participant"
47193	//   ],
47194	//   "parameters": {
47195	//     "participant": {
47196	//       "description": "Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`.",
47197	//       "location": "path",
47198	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$",
47199	//       "required": true,
47200	//       "type": "string"
47201	//     }
47202	//   },
47203	//   "path": "v2/{+participant}:analyzeContent",
47204	//   "request": {
47205	//     "$ref": "GoogleCloudDialogflowV2AnalyzeContentRequest"
47206	//   },
47207	//   "response": {
47208	//     "$ref": "GoogleCloudDialogflowV2AnalyzeContentResponse"
47209	//   },
47210	//   "scopes": [
47211	//     "https://www.googleapis.com/auth/cloud-platform",
47212	//     "https://www.googleapis.com/auth/dialogflow"
47213	//   ]
47214	// }
47215
47216}
47217
47218// method id "dialogflow.projects.locations.conversations.participants.create":
47219
47220type ProjectsLocationsConversationsParticipantsCreateCall struct {
47221	s                                  *Service
47222	parentid                           string
47223	googleclouddialogflowv2participant *GoogleCloudDialogflowV2Participant
47224	urlParams_                         gensupport.URLParams
47225	ctx_                               context.Context
47226	header_                            http.Header
47227}
47228
47229// Create: Creates a new participant in a conversation.
47230//
47231// - parent: Resource identifier of the conversation adding the
47232//   participant. Format: `projects//locations//conversations/`.
47233func (r *ProjectsLocationsConversationsParticipantsService) Create(parentid string, googleclouddialogflowv2participant *GoogleCloudDialogflowV2Participant) *ProjectsLocationsConversationsParticipantsCreateCall {
47234	c := &ProjectsLocationsConversationsParticipantsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47235	c.parentid = parentid
47236	c.googleclouddialogflowv2participant = googleclouddialogflowv2participant
47237	return c
47238}
47239
47240// Fields allows partial responses to be retrieved. See
47241// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47242// for more information.
47243func (c *ProjectsLocationsConversationsParticipantsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsParticipantsCreateCall {
47244	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47245	return c
47246}
47247
47248// Context sets the context to be used in this call's Do method. Any
47249// pending HTTP request will be aborted if the provided context is
47250// canceled.
47251func (c *ProjectsLocationsConversationsParticipantsCreateCall) Context(ctx context.Context) *ProjectsLocationsConversationsParticipantsCreateCall {
47252	c.ctx_ = ctx
47253	return c
47254}
47255
47256// Header returns an http.Header that can be modified by the caller to
47257// add HTTP headers to the request.
47258func (c *ProjectsLocationsConversationsParticipantsCreateCall) Header() http.Header {
47259	if c.header_ == nil {
47260		c.header_ = make(http.Header)
47261	}
47262	return c.header_
47263}
47264
47265func (c *ProjectsLocationsConversationsParticipantsCreateCall) doRequest(alt string) (*http.Response, error) {
47266	reqHeaders := make(http.Header)
47267	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
47268	for k, v := range c.header_ {
47269		reqHeaders[k] = v
47270	}
47271	reqHeaders.Set("User-Agent", c.s.userAgent())
47272	var body io.Reader = nil
47273	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2participant)
47274	if err != nil {
47275		return nil, err
47276	}
47277	reqHeaders.Set("Content-Type", "application/json")
47278	c.urlParams_.Set("alt", alt)
47279	c.urlParams_.Set("prettyPrint", "false")
47280	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/participants")
47281	urls += "?" + c.urlParams_.Encode()
47282	req, err := http.NewRequest("POST", urls, body)
47283	if err != nil {
47284		return nil, err
47285	}
47286	req.Header = reqHeaders
47287	googleapi.Expand(req.URL, map[string]string{
47288		"parent": c.parentid,
47289	})
47290	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47291}
47292
47293// Do executes the "dialogflow.projects.locations.conversations.participants.create" call.
47294// Exactly one of *GoogleCloudDialogflowV2Participant or error will be
47295// non-nil. Any non-2xx status code is an error. Response headers are in
47296// either *GoogleCloudDialogflowV2Participant.ServerResponse.Header or
47297// (if a response was returned at all) in
47298// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47299// whether the returned error was because http.StatusNotModified was
47300// returned.
47301func (c *ProjectsLocationsConversationsParticipantsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Participant, error) {
47302	gensupport.SetOptions(c.urlParams_, opts...)
47303	res, err := c.doRequest("json")
47304	if res != nil && res.StatusCode == http.StatusNotModified {
47305		if res.Body != nil {
47306			res.Body.Close()
47307		}
47308		return nil, &googleapi.Error{
47309			Code:   res.StatusCode,
47310			Header: res.Header,
47311		}
47312	}
47313	if err != nil {
47314		return nil, err
47315	}
47316	defer googleapi.CloseBody(res)
47317	if err := googleapi.CheckResponse(res); err != nil {
47318		return nil, err
47319	}
47320	ret := &GoogleCloudDialogflowV2Participant{
47321		ServerResponse: googleapi.ServerResponse{
47322			Header:         res.Header,
47323			HTTPStatusCode: res.StatusCode,
47324		},
47325	}
47326	target := &ret
47327	if err := gensupport.DecodeResponse(target, res); err != nil {
47328		return nil, err
47329	}
47330	return ret, nil
47331	// {
47332	//   "description": "Creates a new participant in a conversation.",
47333	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants",
47334	//   "httpMethod": "POST",
47335	//   "id": "dialogflow.projects.locations.conversations.participants.create",
47336	//   "parameterOrder": [
47337	//     "parent"
47338	//   ],
47339	//   "parameters": {
47340	//     "parent": {
47341	//       "description": "Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`.",
47342	//       "location": "path",
47343	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$",
47344	//       "required": true,
47345	//       "type": "string"
47346	//     }
47347	//   },
47348	//   "path": "v2/{+parent}/participants",
47349	//   "request": {
47350	//     "$ref": "GoogleCloudDialogflowV2Participant"
47351	//   },
47352	//   "response": {
47353	//     "$ref": "GoogleCloudDialogflowV2Participant"
47354	//   },
47355	//   "scopes": [
47356	//     "https://www.googleapis.com/auth/cloud-platform",
47357	//     "https://www.googleapis.com/auth/dialogflow"
47358	//   ]
47359	// }
47360
47361}
47362
47363// method id "dialogflow.projects.locations.conversations.participants.get":
47364
47365type ProjectsLocationsConversationsParticipantsGetCall struct {
47366	s            *Service
47367	name         string
47368	urlParams_   gensupport.URLParams
47369	ifNoneMatch_ string
47370	ctx_         context.Context
47371	header_      http.Header
47372}
47373
47374// Get: Retrieves a conversation participant.
47375//
47376// - name: The name of the participant. Format:
47377//   `projects//locations//conversations//participants/`.
47378func (r *ProjectsLocationsConversationsParticipantsService) Get(name string) *ProjectsLocationsConversationsParticipantsGetCall {
47379	c := &ProjectsLocationsConversationsParticipantsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47380	c.name = name
47381	return c
47382}
47383
47384// Fields allows partial responses to be retrieved. See
47385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47386// for more information.
47387func (c *ProjectsLocationsConversationsParticipantsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsParticipantsGetCall {
47388	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47389	return c
47390}
47391
47392// IfNoneMatch sets the optional parameter which makes the operation
47393// fail if the object's ETag matches the given value. This is useful for
47394// getting updates only after the object has changed since the last
47395// request. Use googleapi.IsNotModified to check whether the response
47396// error from Do is the result of In-None-Match.
47397func (c *ProjectsLocationsConversationsParticipantsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversationsParticipantsGetCall {
47398	c.ifNoneMatch_ = entityTag
47399	return c
47400}
47401
47402// Context sets the context to be used in this call's Do method. Any
47403// pending HTTP request will be aborted if the provided context is
47404// canceled.
47405func (c *ProjectsLocationsConversationsParticipantsGetCall) Context(ctx context.Context) *ProjectsLocationsConversationsParticipantsGetCall {
47406	c.ctx_ = ctx
47407	return c
47408}
47409
47410// Header returns an http.Header that can be modified by the caller to
47411// add HTTP headers to the request.
47412func (c *ProjectsLocationsConversationsParticipantsGetCall) Header() http.Header {
47413	if c.header_ == nil {
47414		c.header_ = make(http.Header)
47415	}
47416	return c.header_
47417}
47418
47419func (c *ProjectsLocationsConversationsParticipantsGetCall) doRequest(alt string) (*http.Response, error) {
47420	reqHeaders := make(http.Header)
47421	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
47422	for k, v := range c.header_ {
47423		reqHeaders[k] = v
47424	}
47425	reqHeaders.Set("User-Agent", c.s.userAgent())
47426	if c.ifNoneMatch_ != "" {
47427		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47428	}
47429	var body io.Reader = nil
47430	c.urlParams_.Set("alt", alt)
47431	c.urlParams_.Set("prettyPrint", "false")
47432	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
47433	urls += "?" + c.urlParams_.Encode()
47434	req, err := http.NewRequest("GET", urls, body)
47435	if err != nil {
47436		return nil, err
47437	}
47438	req.Header = reqHeaders
47439	googleapi.Expand(req.URL, map[string]string{
47440		"name": c.name,
47441	})
47442	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47443}
47444
47445// Do executes the "dialogflow.projects.locations.conversations.participants.get" call.
47446// Exactly one of *GoogleCloudDialogflowV2Participant or error will be
47447// non-nil. Any non-2xx status code is an error. Response headers are in
47448// either *GoogleCloudDialogflowV2Participant.ServerResponse.Header or
47449// (if a response was returned at all) in
47450// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47451// whether the returned error was because http.StatusNotModified was
47452// returned.
47453func (c *ProjectsLocationsConversationsParticipantsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Participant, error) {
47454	gensupport.SetOptions(c.urlParams_, opts...)
47455	res, err := c.doRequest("json")
47456	if res != nil && res.StatusCode == http.StatusNotModified {
47457		if res.Body != nil {
47458			res.Body.Close()
47459		}
47460		return nil, &googleapi.Error{
47461			Code:   res.StatusCode,
47462			Header: res.Header,
47463		}
47464	}
47465	if err != nil {
47466		return nil, err
47467	}
47468	defer googleapi.CloseBody(res)
47469	if err := googleapi.CheckResponse(res); err != nil {
47470		return nil, err
47471	}
47472	ret := &GoogleCloudDialogflowV2Participant{
47473		ServerResponse: googleapi.ServerResponse{
47474			Header:         res.Header,
47475			HTTPStatusCode: res.StatusCode,
47476		},
47477	}
47478	target := &ret
47479	if err := gensupport.DecodeResponse(target, res); err != nil {
47480		return nil, err
47481	}
47482	return ret, nil
47483	// {
47484	//   "description": "Retrieves a conversation participant.",
47485	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}",
47486	//   "httpMethod": "GET",
47487	//   "id": "dialogflow.projects.locations.conversations.participants.get",
47488	//   "parameterOrder": [
47489	//     "name"
47490	//   ],
47491	//   "parameters": {
47492	//     "name": {
47493	//       "description": "Required. The name of the participant. Format: `projects//locations//conversations//participants/`.",
47494	//       "location": "path",
47495	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$",
47496	//       "required": true,
47497	//       "type": "string"
47498	//     }
47499	//   },
47500	//   "path": "v2/{+name}",
47501	//   "response": {
47502	//     "$ref": "GoogleCloudDialogflowV2Participant"
47503	//   },
47504	//   "scopes": [
47505	//     "https://www.googleapis.com/auth/cloud-platform",
47506	//     "https://www.googleapis.com/auth/dialogflow"
47507	//   ]
47508	// }
47509
47510}
47511
47512// method id "dialogflow.projects.locations.conversations.participants.list":
47513
47514type ProjectsLocationsConversationsParticipantsListCall struct {
47515	s            *Service
47516	parent       string
47517	urlParams_   gensupport.URLParams
47518	ifNoneMatch_ string
47519	ctx_         context.Context
47520	header_      http.Header
47521}
47522
47523// List: Returns the list of all participants in the specified
47524// conversation.
47525//
47526// - parent: The conversation to list all participants from. Format:
47527//   `projects//locations//conversations/`.
47528func (r *ProjectsLocationsConversationsParticipantsService) List(parent string) *ProjectsLocationsConversationsParticipantsListCall {
47529	c := &ProjectsLocationsConversationsParticipantsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47530	c.parent = parent
47531	return c
47532}
47533
47534// PageSize sets the optional parameter "pageSize": The maximum number
47535// of items to return in a single page. By default 100 and at most 1000.
47536func (c *ProjectsLocationsConversationsParticipantsListCall) PageSize(pageSize int64) *ProjectsLocationsConversationsParticipantsListCall {
47537	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
47538	return c
47539}
47540
47541// PageToken sets the optional parameter "pageToken": The
47542// next_page_token value returned from a previous list request.
47543func (c *ProjectsLocationsConversationsParticipantsListCall) PageToken(pageToken string) *ProjectsLocationsConversationsParticipantsListCall {
47544	c.urlParams_.Set("pageToken", pageToken)
47545	return c
47546}
47547
47548// Fields allows partial responses to be retrieved. See
47549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47550// for more information.
47551func (c *ProjectsLocationsConversationsParticipantsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsParticipantsListCall {
47552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47553	return c
47554}
47555
47556// IfNoneMatch sets the optional parameter which makes the operation
47557// fail if the object's ETag matches the given value. This is useful for
47558// getting updates only after the object has changed since the last
47559// request. Use googleapi.IsNotModified to check whether the response
47560// error from Do is the result of In-None-Match.
47561func (c *ProjectsLocationsConversationsParticipantsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversationsParticipantsListCall {
47562	c.ifNoneMatch_ = entityTag
47563	return c
47564}
47565
47566// Context sets the context to be used in this call's Do method. Any
47567// pending HTTP request will be aborted if the provided context is
47568// canceled.
47569func (c *ProjectsLocationsConversationsParticipantsListCall) Context(ctx context.Context) *ProjectsLocationsConversationsParticipantsListCall {
47570	c.ctx_ = ctx
47571	return c
47572}
47573
47574// Header returns an http.Header that can be modified by the caller to
47575// add HTTP headers to the request.
47576func (c *ProjectsLocationsConversationsParticipantsListCall) Header() http.Header {
47577	if c.header_ == nil {
47578		c.header_ = make(http.Header)
47579	}
47580	return c.header_
47581}
47582
47583func (c *ProjectsLocationsConversationsParticipantsListCall) doRequest(alt string) (*http.Response, error) {
47584	reqHeaders := make(http.Header)
47585	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
47586	for k, v := range c.header_ {
47587		reqHeaders[k] = v
47588	}
47589	reqHeaders.Set("User-Agent", c.s.userAgent())
47590	if c.ifNoneMatch_ != "" {
47591		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47592	}
47593	var body io.Reader = nil
47594	c.urlParams_.Set("alt", alt)
47595	c.urlParams_.Set("prettyPrint", "false")
47596	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/participants")
47597	urls += "?" + c.urlParams_.Encode()
47598	req, err := http.NewRequest("GET", urls, body)
47599	if err != nil {
47600		return nil, err
47601	}
47602	req.Header = reqHeaders
47603	googleapi.Expand(req.URL, map[string]string{
47604		"parent": c.parent,
47605	})
47606	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47607}
47608
47609// Do executes the "dialogflow.projects.locations.conversations.participants.list" call.
47610// Exactly one of *GoogleCloudDialogflowV2ListParticipantsResponse or
47611// error will be non-nil. Any non-2xx status code is an error. Response
47612// headers are in either
47613// *GoogleCloudDialogflowV2ListParticipantsResponse.ServerResponse.Header
47614//  or (if a response was returned at all) in
47615// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47616// whether the returned error was because http.StatusNotModified was
47617// returned.
47618func (c *ProjectsLocationsConversationsParticipantsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListParticipantsResponse, error) {
47619	gensupport.SetOptions(c.urlParams_, opts...)
47620	res, err := c.doRequest("json")
47621	if res != nil && res.StatusCode == http.StatusNotModified {
47622		if res.Body != nil {
47623			res.Body.Close()
47624		}
47625		return nil, &googleapi.Error{
47626			Code:   res.StatusCode,
47627			Header: res.Header,
47628		}
47629	}
47630	if err != nil {
47631		return nil, err
47632	}
47633	defer googleapi.CloseBody(res)
47634	if err := googleapi.CheckResponse(res); err != nil {
47635		return nil, err
47636	}
47637	ret := &GoogleCloudDialogflowV2ListParticipantsResponse{
47638		ServerResponse: googleapi.ServerResponse{
47639			Header:         res.Header,
47640			HTTPStatusCode: res.StatusCode,
47641		},
47642	}
47643	target := &ret
47644	if err := gensupport.DecodeResponse(target, res); err != nil {
47645		return nil, err
47646	}
47647	return ret, nil
47648	// {
47649	//   "description": "Returns the list of all participants in the specified conversation.",
47650	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants",
47651	//   "httpMethod": "GET",
47652	//   "id": "dialogflow.projects.locations.conversations.participants.list",
47653	//   "parameterOrder": [
47654	//     "parent"
47655	//   ],
47656	//   "parameters": {
47657	//     "pageSize": {
47658	//       "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.",
47659	//       "format": "int32",
47660	//       "location": "query",
47661	//       "type": "integer"
47662	//     },
47663	//     "pageToken": {
47664	//       "description": "Optional. The next_page_token value returned from a previous list request.",
47665	//       "location": "query",
47666	//       "type": "string"
47667	//     },
47668	//     "parent": {
47669	//       "description": "Required. The conversation to list all participants from. Format: `projects//locations//conversations/`.",
47670	//       "location": "path",
47671	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$",
47672	//       "required": true,
47673	//       "type": "string"
47674	//     }
47675	//   },
47676	//   "path": "v2/{+parent}/participants",
47677	//   "response": {
47678	//     "$ref": "GoogleCloudDialogflowV2ListParticipantsResponse"
47679	//   },
47680	//   "scopes": [
47681	//     "https://www.googleapis.com/auth/cloud-platform",
47682	//     "https://www.googleapis.com/auth/dialogflow"
47683	//   ]
47684	// }
47685
47686}
47687
47688// Pages invokes f for each page of results.
47689// A non-nil error returned from f will halt the iteration.
47690// The provided context supersedes any context provided to the Context method.
47691func (c *ProjectsLocationsConversationsParticipantsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListParticipantsResponse) error) error {
47692	c.ctx_ = ctx
47693	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47694	for {
47695		x, err := c.Do()
47696		if err != nil {
47697			return err
47698		}
47699		if err := f(x); err != nil {
47700			return err
47701		}
47702		if x.NextPageToken == "" {
47703			return nil
47704		}
47705		c.PageToken(x.NextPageToken)
47706	}
47707}
47708
47709// method id "dialogflow.projects.locations.conversations.participants.patch":
47710
47711type ProjectsLocationsConversationsParticipantsPatchCall struct {
47712	s                                  *Service
47713	nameid                             string
47714	googleclouddialogflowv2participant *GoogleCloudDialogflowV2Participant
47715	urlParams_                         gensupport.URLParams
47716	ctx_                               context.Context
47717	header_                            http.Header
47718}
47719
47720// Patch: Updates the specified participant.
47721//
47722// - name: Optional. The unique identifier of this participant. Format:
47723//   `projects//locations//conversations//participants/`.
47724func (r *ProjectsLocationsConversationsParticipantsService) Patch(nameid string, googleclouddialogflowv2participant *GoogleCloudDialogflowV2Participant) *ProjectsLocationsConversationsParticipantsPatchCall {
47725	c := &ProjectsLocationsConversationsParticipantsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47726	c.nameid = nameid
47727	c.googleclouddialogflowv2participant = googleclouddialogflowv2participant
47728	return c
47729}
47730
47731// UpdateMask sets the optional parameter "updateMask": Required. The
47732// mask to specify which fields to update.
47733func (c *ProjectsLocationsConversationsParticipantsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConversationsParticipantsPatchCall {
47734	c.urlParams_.Set("updateMask", updateMask)
47735	return c
47736}
47737
47738// Fields allows partial responses to be retrieved. See
47739// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47740// for more information.
47741func (c *ProjectsLocationsConversationsParticipantsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsParticipantsPatchCall {
47742	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47743	return c
47744}
47745
47746// Context sets the context to be used in this call's Do method. Any
47747// pending HTTP request will be aborted if the provided context is
47748// canceled.
47749func (c *ProjectsLocationsConversationsParticipantsPatchCall) Context(ctx context.Context) *ProjectsLocationsConversationsParticipantsPatchCall {
47750	c.ctx_ = ctx
47751	return c
47752}
47753
47754// Header returns an http.Header that can be modified by the caller to
47755// add HTTP headers to the request.
47756func (c *ProjectsLocationsConversationsParticipantsPatchCall) Header() http.Header {
47757	if c.header_ == nil {
47758		c.header_ = make(http.Header)
47759	}
47760	return c.header_
47761}
47762
47763func (c *ProjectsLocationsConversationsParticipantsPatchCall) doRequest(alt string) (*http.Response, error) {
47764	reqHeaders := make(http.Header)
47765	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
47766	for k, v := range c.header_ {
47767		reqHeaders[k] = v
47768	}
47769	reqHeaders.Set("User-Agent", c.s.userAgent())
47770	var body io.Reader = nil
47771	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2participant)
47772	if err != nil {
47773		return nil, err
47774	}
47775	reqHeaders.Set("Content-Type", "application/json")
47776	c.urlParams_.Set("alt", alt)
47777	c.urlParams_.Set("prettyPrint", "false")
47778	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
47779	urls += "?" + c.urlParams_.Encode()
47780	req, err := http.NewRequest("PATCH", urls, body)
47781	if err != nil {
47782		return nil, err
47783	}
47784	req.Header = reqHeaders
47785	googleapi.Expand(req.URL, map[string]string{
47786		"name": c.nameid,
47787	})
47788	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47789}
47790
47791// Do executes the "dialogflow.projects.locations.conversations.participants.patch" call.
47792// Exactly one of *GoogleCloudDialogflowV2Participant or error will be
47793// non-nil. Any non-2xx status code is an error. Response headers are in
47794// either *GoogleCloudDialogflowV2Participant.ServerResponse.Header or
47795// (if a response was returned at all) in
47796// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47797// whether the returned error was because http.StatusNotModified was
47798// returned.
47799func (c *ProjectsLocationsConversationsParticipantsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Participant, error) {
47800	gensupport.SetOptions(c.urlParams_, opts...)
47801	res, err := c.doRequest("json")
47802	if res != nil && res.StatusCode == http.StatusNotModified {
47803		if res.Body != nil {
47804			res.Body.Close()
47805		}
47806		return nil, &googleapi.Error{
47807			Code:   res.StatusCode,
47808			Header: res.Header,
47809		}
47810	}
47811	if err != nil {
47812		return nil, err
47813	}
47814	defer googleapi.CloseBody(res)
47815	if err := googleapi.CheckResponse(res); err != nil {
47816		return nil, err
47817	}
47818	ret := &GoogleCloudDialogflowV2Participant{
47819		ServerResponse: googleapi.ServerResponse{
47820			Header:         res.Header,
47821			HTTPStatusCode: res.StatusCode,
47822		},
47823	}
47824	target := &ret
47825	if err := gensupport.DecodeResponse(target, res); err != nil {
47826		return nil, err
47827	}
47828	return ret, nil
47829	// {
47830	//   "description": "Updates the specified participant.",
47831	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}",
47832	//   "httpMethod": "PATCH",
47833	//   "id": "dialogflow.projects.locations.conversations.participants.patch",
47834	//   "parameterOrder": [
47835	//     "name"
47836	//   ],
47837	//   "parameters": {
47838	//     "name": {
47839	//       "description": "Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`.",
47840	//       "location": "path",
47841	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$",
47842	//       "required": true,
47843	//       "type": "string"
47844	//     },
47845	//     "updateMask": {
47846	//       "description": "Required. The mask to specify which fields to update.",
47847	//       "format": "google-fieldmask",
47848	//       "location": "query",
47849	//       "type": "string"
47850	//     }
47851	//   },
47852	//   "path": "v2/{+name}",
47853	//   "request": {
47854	//     "$ref": "GoogleCloudDialogflowV2Participant"
47855	//   },
47856	//   "response": {
47857	//     "$ref": "GoogleCloudDialogflowV2Participant"
47858	//   },
47859	//   "scopes": [
47860	//     "https://www.googleapis.com/auth/cloud-platform",
47861	//     "https://www.googleapis.com/auth/dialogflow"
47862	//   ]
47863	// }
47864
47865}
47866
47867// method id "dialogflow.projects.locations.conversations.participants.suggestions.suggestArticles":
47868
47869type ProjectsLocationsConversationsParticipantsSuggestionsSuggestArticlesCall struct {
47870	s                                             *Service
47871	parent                                        string
47872	googleclouddialogflowv2suggestarticlesrequest *GoogleCloudDialogflowV2SuggestArticlesRequest
47873	urlParams_                                    gensupport.URLParams
47874	ctx_                                          context.Context
47875	header_                                       http.Header
47876}
47877
47878// SuggestArticles: Gets suggested articles for a participant based on
47879// specific historical messages.
47880//
47881// - parent: The name of the participant to fetch suggestion for.
47882//   Format: `projects//locations//conversations//participants/`.
47883func (r *ProjectsLocationsConversationsParticipantsSuggestionsService) SuggestArticles(parent string, googleclouddialogflowv2suggestarticlesrequest *GoogleCloudDialogflowV2SuggestArticlesRequest) *ProjectsLocationsConversationsParticipantsSuggestionsSuggestArticlesCall {
47884	c := &ProjectsLocationsConversationsParticipantsSuggestionsSuggestArticlesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47885	c.parent = parent
47886	c.googleclouddialogflowv2suggestarticlesrequest = googleclouddialogflowv2suggestarticlesrequest
47887	return c
47888}
47889
47890// Fields allows partial responses to be retrieved. See
47891// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47892// for more information.
47893func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestArticlesCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsParticipantsSuggestionsSuggestArticlesCall {
47894	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47895	return c
47896}
47897
47898// Context sets the context to be used in this call's Do method. Any
47899// pending HTTP request will be aborted if the provided context is
47900// canceled.
47901func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestArticlesCall) Context(ctx context.Context) *ProjectsLocationsConversationsParticipantsSuggestionsSuggestArticlesCall {
47902	c.ctx_ = ctx
47903	return c
47904}
47905
47906// Header returns an http.Header that can be modified by the caller to
47907// add HTTP headers to the request.
47908func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestArticlesCall) Header() http.Header {
47909	if c.header_ == nil {
47910		c.header_ = make(http.Header)
47911	}
47912	return c.header_
47913}
47914
47915func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestArticlesCall) doRequest(alt string) (*http.Response, error) {
47916	reqHeaders := make(http.Header)
47917	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
47918	for k, v := range c.header_ {
47919		reqHeaders[k] = v
47920	}
47921	reqHeaders.Set("User-Agent", c.s.userAgent())
47922	var body io.Reader = nil
47923	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2suggestarticlesrequest)
47924	if err != nil {
47925		return nil, err
47926	}
47927	reqHeaders.Set("Content-Type", "application/json")
47928	c.urlParams_.Set("alt", alt)
47929	c.urlParams_.Set("prettyPrint", "false")
47930	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/suggestions:suggestArticles")
47931	urls += "?" + c.urlParams_.Encode()
47932	req, err := http.NewRequest("POST", urls, body)
47933	if err != nil {
47934		return nil, err
47935	}
47936	req.Header = reqHeaders
47937	googleapi.Expand(req.URL, map[string]string{
47938		"parent": c.parent,
47939	})
47940	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47941}
47942
47943// Do executes the "dialogflow.projects.locations.conversations.participants.suggestions.suggestArticles" call.
47944// Exactly one of *GoogleCloudDialogflowV2SuggestArticlesResponse or
47945// error will be non-nil. Any non-2xx status code is an error. Response
47946// headers are in either
47947// *GoogleCloudDialogflowV2SuggestArticlesResponse.ServerResponse.Header
47948// or (if a response was returned at all) in
47949// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47950// whether the returned error was because http.StatusNotModified was
47951// returned.
47952func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestArticlesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SuggestArticlesResponse, error) {
47953	gensupport.SetOptions(c.urlParams_, opts...)
47954	res, err := c.doRequest("json")
47955	if res != nil && res.StatusCode == http.StatusNotModified {
47956		if res.Body != nil {
47957			res.Body.Close()
47958		}
47959		return nil, &googleapi.Error{
47960			Code:   res.StatusCode,
47961			Header: res.Header,
47962		}
47963	}
47964	if err != nil {
47965		return nil, err
47966	}
47967	defer googleapi.CloseBody(res)
47968	if err := googleapi.CheckResponse(res); err != nil {
47969		return nil, err
47970	}
47971	ret := &GoogleCloudDialogflowV2SuggestArticlesResponse{
47972		ServerResponse: googleapi.ServerResponse{
47973			Header:         res.Header,
47974			HTTPStatusCode: res.StatusCode,
47975		},
47976	}
47977	target := &ret
47978	if err := gensupport.DecodeResponse(target, res); err != nil {
47979		return nil, err
47980	}
47981	return ret, nil
47982	// {
47983	//   "description": "Gets suggested articles for a participant based on specific historical messages.",
47984	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestArticles",
47985	//   "httpMethod": "POST",
47986	//   "id": "dialogflow.projects.locations.conversations.participants.suggestions.suggestArticles",
47987	//   "parameterOrder": [
47988	//     "parent"
47989	//   ],
47990	//   "parameters": {
47991	//     "parent": {
47992	//       "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.",
47993	//       "location": "path",
47994	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$",
47995	//       "required": true,
47996	//       "type": "string"
47997	//     }
47998	//   },
47999	//   "path": "v2/{+parent}/suggestions:suggestArticles",
48000	//   "request": {
48001	//     "$ref": "GoogleCloudDialogflowV2SuggestArticlesRequest"
48002	//   },
48003	//   "response": {
48004	//     "$ref": "GoogleCloudDialogflowV2SuggestArticlesResponse"
48005	//   },
48006	//   "scopes": [
48007	//     "https://www.googleapis.com/auth/cloud-platform",
48008	//     "https://www.googleapis.com/auth/dialogflow"
48009	//   ]
48010	// }
48011
48012}
48013
48014// method id "dialogflow.projects.locations.conversations.participants.suggestions.suggestFaqAnswers":
48015
48016type ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersCall struct {
48017	s                                               *Service
48018	parent                                          string
48019	googleclouddialogflowv2suggestfaqanswersrequest *GoogleCloudDialogflowV2SuggestFaqAnswersRequest
48020	urlParams_                                      gensupport.URLParams
48021	ctx_                                            context.Context
48022	header_                                         http.Header
48023}
48024
48025// SuggestFaqAnswers: Gets suggested faq answers for a participant based
48026// on specific historical messages.
48027//
48028// - parent: The name of the participant to fetch suggestion for.
48029//   Format: `projects//locations//conversations//participants/`.
48030func (r *ProjectsLocationsConversationsParticipantsSuggestionsService) SuggestFaqAnswers(parent string, googleclouddialogflowv2suggestfaqanswersrequest *GoogleCloudDialogflowV2SuggestFaqAnswersRequest) *ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersCall {
48031	c := &ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48032	c.parent = parent
48033	c.googleclouddialogflowv2suggestfaqanswersrequest = googleclouddialogflowv2suggestfaqanswersrequest
48034	return c
48035}
48036
48037// Fields allows partial responses to be retrieved. See
48038// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48039// for more information.
48040func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersCall {
48041	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48042	return c
48043}
48044
48045// Context sets the context to be used in this call's Do method. Any
48046// pending HTTP request will be aborted if the provided context is
48047// canceled.
48048func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) Context(ctx context.Context) *ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersCall {
48049	c.ctx_ = ctx
48050	return c
48051}
48052
48053// Header returns an http.Header that can be modified by the caller to
48054// add HTTP headers to the request.
48055func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) Header() http.Header {
48056	if c.header_ == nil {
48057		c.header_ = make(http.Header)
48058	}
48059	return c.header_
48060}
48061
48062func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) doRequest(alt string) (*http.Response, error) {
48063	reqHeaders := make(http.Header)
48064	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
48065	for k, v := range c.header_ {
48066		reqHeaders[k] = v
48067	}
48068	reqHeaders.Set("User-Agent", c.s.userAgent())
48069	var body io.Reader = nil
48070	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2suggestfaqanswersrequest)
48071	if err != nil {
48072		return nil, err
48073	}
48074	reqHeaders.Set("Content-Type", "application/json")
48075	c.urlParams_.Set("alt", alt)
48076	c.urlParams_.Set("prettyPrint", "false")
48077	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/suggestions:suggestFaqAnswers")
48078	urls += "?" + c.urlParams_.Encode()
48079	req, err := http.NewRequest("POST", urls, body)
48080	if err != nil {
48081		return nil, err
48082	}
48083	req.Header = reqHeaders
48084	googleapi.Expand(req.URL, map[string]string{
48085		"parent": c.parent,
48086	})
48087	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48088}
48089
48090// Do executes the "dialogflow.projects.locations.conversations.participants.suggestions.suggestFaqAnswers" call.
48091// Exactly one of *GoogleCloudDialogflowV2SuggestFaqAnswersResponse or
48092// error will be non-nil. Any non-2xx status code is an error. Response
48093// headers are in either
48094// *GoogleCloudDialogflowV2SuggestFaqAnswersResponse.ServerResponse.Heade
48095// r or (if a response was returned at all) in
48096// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
48097// whether the returned error was because http.StatusNotModified was
48098// returned.
48099func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestFaqAnswersCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SuggestFaqAnswersResponse, error) {
48100	gensupport.SetOptions(c.urlParams_, opts...)
48101	res, err := c.doRequest("json")
48102	if res != nil && res.StatusCode == http.StatusNotModified {
48103		if res.Body != nil {
48104			res.Body.Close()
48105		}
48106		return nil, &googleapi.Error{
48107			Code:   res.StatusCode,
48108			Header: res.Header,
48109		}
48110	}
48111	if err != nil {
48112		return nil, err
48113	}
48114	defer googleapi.CloseBody(res)
48115	if err := googleapi.CheckResponse(res); err != nil {
48116		return nil, err
48117	}
48118	ret := &GoogleCloudDialogflowV2SuggestFaqAnswersResponse{
48119		ServerResponse: googleapi.ServerResponse{
48120			Header:         res.Header,
48121			HTTPStatusCode: res.StatusCode,
48122		},
48123	}
48124	target := &ret
48125	if err := gensupport.DecodeResponse(target, res); err != nil {
48126		return nil, err
48127	}
48128	return ret, nil
48129	// {
48130	//   "description": "Gets suggested faq answers for a participant based on specific historical messages.",
48131	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestFaqAnswers",
48132	//   "httpMethod": "POST",
48133	//   "id": "dialogflow.projects.locations.conversations.participants.suggestions.suggestFaqAnswers",
48134	//   "parameterOrder": [
48135	//     "parent"
48136	//   ],
48137	//   "parameters": {
48138	//     "parent": {
48139	//       "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.",
48140	//       "location": "path",
48141	//       "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$",
48142	//       "required": true,
48143	//       "type": "string"
48144	//     }
48145	//   },
48146	//   "path": "v2/{+parent}/suggestions:suggestFaqAnswers",
48147	//   "request": {
48148	//     "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersRequest"
48149	//   },
48150	//   "response": {
48151	//     "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse"
48152	//   },
48153	//   "scopes": [
48154	//     "https://www.googleapis.com/auth/cloud-platform",
48155	//     "https://www.googleapis.com/auth/dialogflow"
48156	//   ]
48157	// }
48158
48159}
48160
48161// method id "dialogflow.projects.locations.knowledgeBases.create":
48162
48163type ProjectsLocationsKnowledgeBasesCreateCall struct {
48164	s                                    *Service
48165	parent                               string
48166	googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase
48167	urlParams_                           gensupport.URLParams
48168	ctx_                                 context.Context
48169	header_                              http.Header
48170}
48171
48172// Create: Creates a knowledge base.
48173//
48174// - parent: The project to create a knowledge base for. Format:
48175//   `projects//locations/`.
48176func (r *ProjectsLocationsKnowledgeBasesService) Create(parent string, googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase) *ProjectsLocationsKnowledgeBasesCreateCall {
48177	c := &ProjectsLocationsKnowledgeBasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48178	c.parent = parent
48179	c.googleclouddialogflowv2knowledgebase = googleclouddialogflowv2knowledgebase
48180	return c
48181}
48182
48183// Fields allows partial responses to be retrieved. See
48184// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48185// for more information.
48186func (c *ProjectsLocationsKnowledgeBasesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesCreateCall {
48187	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48188	return c
48189}
48190
48191// Context sets the context to be used in this call's Do method. Any
48192// pending HTTP request will be aborted if the provided context is
48193// canceled.
48194func (c *ProjectsLocationsKnowledgeBasesCreateCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesCreateCall {
48195	c.ctx_ = ctx
48196	return c
48197}
48198
48199// Header returns an http.Header that can be modified by the caller to
48200// add HTTP headers to the request.
48201func (c *ProjectsLocationsKnowledgeBasesCreateCall) Header() http.Header {
48202	if c.header_ == nil {
48203		c.header_ = make(http.Header)
48204	}
48205	return c.header_
48206}
48207
48208func (c *ProjectsLocationsKnowledgeBasesCreateCall) doRequest(alt string) (*http.Response, error) {
48209	reqHeaders := make(http.Header)
48210	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
48211	for k, v := range c.header_ {
48212		reqHeaders[k] = v
48213	}
48214	reqHeaders.Set("User-Agent", c.s.userAgent())
48215	var body io.Reader = nil
48216	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2knowledgebase)
48217	if err != nil {
48218		return nil, err
48219	}
48220	reqHeaders.Set("Content-Type", "application/json")
48221	c.urlParams_.Set("alt", alt)
48222	c.urlParams_.Set("prettyPrint", "false")
48223	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/knowledgeBases")
48224	urls += "?" + c.urlParams_.Encode()
48225	req, err := http.NewRequest("POST", urls, body)
48226	if err != nil {
48227		return nil, err
48228	}
48229	req.Header = reqHeaders
48230	googleapi.Expand(req.URL, map[string]string{
48231		"parent": c.parent,
48232	})
48233	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48234}
48235
48236// Do executes the "dialogflow.projects.locations.knowledgeBases.create" call.
48237// Exactly one of *GoogleCloudDialogflowV2KnowledgeBase or error will be
48238// non-nil. Any non-2xx status code is an error. Response headers are in
48239// either *GoogleCloudDialogflowV2KnowledgeBase.ServerResponse.Header or
48240// (if a response was returned at all) in
48241// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
48242// whether the returned error was because http.StatusNotModified was
48243// returned.
48244func (c *ProjectsLocationsKnowledgeBasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2KnowledgeBase, error) {
48245	gensupport.SetOptions(c.urlParams_, opts...)
48246	res, err := c.doRequest("json")
48247	if res != nil && res.StatusCode == http.StatusNotModified {
48248		if res.Body != nil {
48249			res.Body.Close()
48250		}
48251		return nil, &googleapi.Error{
48252			Code:   res.StatusCode,
48253			Header: res.Header,
48254		}
48255	}
48256	if err != nil {
48257		return nil, err
48258	}
48259	defer googleapi.CloseBody(res)
48260	if err := googleapi.CheckResponse(res); err != nil {
48261		return nil, err
48262	}
48263	ret := &GoogleCloudDialogflowV2KnowledgeBase{
48264		ServerResponse: googleapi.ServerResponse{
48265			Header:         res.Header,
48266			HTTPStatusCode: res.StatusCode,
48267		},
48268	}
48269	target := &ret
48270	if err := gensupport.DecodeResponse(target, res); err != nil {
48271		return nil, err
48272	}
48273	return ret, nil
48274	// {
48275	//   "description": "Creates a knowledge base.",
48276	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases",
48277	//   "httpMethod": "POST",
48278	//   "id": "dialogflow.projects.locations.knowledgeBases.create",
48279	//   "parameterOrder": [
48280	//     "parent"
48281	//   ],
48282	//   "parameters": {
48283	//     "parent": {
48284	//       "description": "Required. The project to create a knowledge base for. Format: `projects//locations/`.",
48285	//       "location": "path",
48286	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
48287	//       "required": true,
48288	//       "type": "string"
48289	//     }
48290	//   },
48291	//   "path": "v2/{+parent}/knowledgeBases",
48292	//   "request": {
48293	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
48294	//   },
48295	//   "response": {
48296	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
48297	//   },
48298	//   "scopes": [
48299	//     "https://www.googleapis.com/auth/cloud-platform",
48300	//     "https://www.googleapis.com/auth/dialogflow"
48301	//   ]
48302	// }
48303
48304}
48305
48306// method id "dialogflow.projects.locations.knowledgeBases.delete":
48307
48308type ProjectsLocationsKnowledgeBasesDeleteCall struct {
48309	s          *Service
48310	name       string
48311	urlParams_ gensupport.URLParams
48312	ctx_       context.Context
48313	header_    http.Header
48314}
48315
48316// Delete: Deletes the specified knowledge base.
48317//
48318// - name: The name of the knowledge base to delete. Format:
48319//   `projects//locations//knowledgeBases/`.
48320func (r *ProjectsLocationsKnowledgeBasesService) Delete(name string) *ProjectsLocationsKnowledgeBasesDeleteCall {
48321	c := &ProjectsLocationsKnowledgeBasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48322	c.name = name
48323	return c
48324}
48325
48326// Force sets the optional parameter "force": Force deletes the
48327// knowledge base. When set to true, any documents in the knowledge base
48328// are also deleted.
48329func (c *ProjectsLocationsKnowledgeBasesDeleteCall) Force(force bool) *ProjectsLocationsKnowledgeBasesDeleteCall {
48330	c.urlParams_.Set("force", fmt.Sprint(force))
48331	return c
48332}
48333
48334// Fields allows partial responses to be retrieved. See
48335// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48336// for more information.
48337func (c *ProjectsLocationsKnowledgeBasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesDeleteCall {
48338	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48339	return c
48340}
48341
48342// Context sets the context to be used in this call's Do method. Any
48343// pending HTTP request will be aborted if the provided context is
48344// canceled.
48345func (c *ProjectsLocationsKnowledgeBasesDeleteCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesDeleteCall {
48346	c.ctx_ = ctx
48347	return c
48348}
48349
48350// Header returns an http.Header that can be modified by the caller to
48351// add HTTP headers to the request.
48352func (c *ProjectsLocationsKnowledgeBasesDeleteCall) Header() http.Header {
48353	if c.header_ == nil {
48354		c.header_ = make(http.Header)
48355	}
48356	return c.header_
48357}
48358
48359func (c *ProjectsLocationsKnowledgeBasesDeleteCall) doRequest(alt string) (*http.Response, error) {
48360	reqHeaders := make(http.Header)
48361	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
48362	for k, v := range c.header_ {
48363		reqHeaders[k] = v
48364	}
48365	reqHeaders.Set("User-Agent", c.s.userAgent())
48366	var body io.Reader = nil
48367	c.urlParams_.Set("alt", alt)
48368	c.urlParams_.Set("prettyPrint", "false")
48369	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
48370	urls += "?" + c.urlParams_.Encode()
48371	req, err := http.NewRequest("DELETE", urls, body)
48372	if err != nil {
48373		return nil, err
48374	}
48375	req.Header = reqHeaders
48376	googleapi.Expand(req.URL, map[string]string{
48377		"name": c.name,
48378	})
48379	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48380}
48381
48382// Do executes the "dialogflow.projects.locations.knowledgeBases.delete" call.
48383// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
48384// non-2xx status code is an error. Response headers are in either
48385// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
48386// returned at all) in error.(*googleapi.Error).Header. Use
48387// googleapi.IsNotModified to check whether the returned error was
48388// because http.StatusNotModified was returned.
48389func (c *ProjectsLocationsKnowledgeBasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
48390	gensupport.SetOptions(c.urlParams_, opts...)
48391	res, err := c.doRequest("json")
48392	if res != nil && res.StatusCode == http.StatusNotModified {
48393		if res.Body != nil {
48394			res.Body.Close()
48395		}
48396		return nil, &googleapi.Error{
48397			Code:   res.StatusCode,
48398			Header: res.Header,
48399		}
48400	}
48401	if err != nil {
48402		return nil, err
48403	}
48404	defer googleapi.CloseBody(res)
48405	if err := googleapi.CheckResponse(res); err != nil {
48406		return nil, err
48407	}
48408	ret := &GoogleProtobufEmpty{
48409		ServerResponse: googleapi.ServerResponse{
48410			Header:         res.Header,
48411			HTTPStatusCode: res.StatusCode,
48412		},
48413	}
48414	target := &ret
48415	if err := gensupport.DecodeResponse(target, res); err != nil {
48416		return nil, err
48417	}
48418	return ret, nil
48419	// {
48420	//   "description": "Deletes the specified knowledge base.",
48421	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}",
48422	//   "httpMethod": "DELETE",
48423	//   "id": "dialogflow.projects.locations.knowledgeBases.delete",
48424	//   "parameterOrder": [
48425	//     "name"
48426	//   ],
48427	//   "parameters": {
48428	//     "force": {
48429	//       "description": "Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted.",
48430	//       "location": "query",
48431	//       "type": "boolean"
48432	//     },
48433	//     "name": {
48434	//       "description": "Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`.",
48435	//       "location": "path",
48436	//       "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$",
48437	//       "required": true,
48438	//       "type": "string"
48439	//     }
48440	//   },
48441	//   "path": "v2/{+name}",
48442	//   "response": {
48443	//     "$ref": "GoogleProtobufEmpty"
48444	//   },
48445	//   "scopes": [
48446	//     "https://www.googleapis.com/auth/cloud-platform",
48447	//     "https://www.googleapis.com/auth/dialogflow"
48448	//   ]
48449	// }
48450
48451}
48452
48453// method id "dialogflow.projects.locations.knowledgeBases.get":
48454
48455type ProjectsLocationsKnowledgeBasesGetCall struct {
48456	s            *Service
48457	name         string
48458	urlParams_   gensupport.URLParams
48459	ifNoneMatch_ string
48460	ctx_         context.Context
48461	header_      http.Header
48462}
48463
48464// Get: Retrieves the specified knowledge base.
48465//
48466// - name: The name of the knowledge base to retrieve. Format
48467//   `projects//locations//knowledgeBases/`.
48468func (r *ProjectsLocationsKnowledgeBasesService) Get(name string) *ProjectsLocationsKnowledgeBasesGetCall {
48469	c := &ProjectsLocationsKnowledgeBasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48470	c.name = name
48471	return c
48472}
48473
48474// Fields allows partial responses to be retrieved. See
48475// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48476// for more information.
48477func (c *ProjectsLocationsKnowledgeBasesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesGetCall {
48478	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48479	return c
48480}
48481
48482// IfNoneMatch sets the optional parameter which makes the operation
48483// fail if the object's ETag matches the given value. This is useful for
48484// getting updates only after the object has changed since the last
48485// request. Use googleapi.IsNotModified to check whether the response
48486// error from Do is the result of In-None-Match.
48487func (c *ProjectsLocationsKnowledgeBasesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsKnowledgeBasesGetCall {
48488	c.ifNoneMatch_ = entityTag
48489	return c
48490}
48491
48492// Context sets the context to be used in this call's Do method. Any
48493// pending HTTP request will be aborted if the provided context is
48494// canceled.
48495func (c *ProjectsLocationsKnowledgeBasesGetCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesGetCall {
48496	c.ctx_ = ctx
48497	return c
48498}
48499
48500// Header returns an http.Header that can be modified by the caller to
48501// add HTTP headers to the request.
48502func (c *ProjectsLocationsKnowledgeBasesGetCall) Header() http.Header {
48503	if c.header_ == nil {
48504		c.header_ = make(http.Header)
48505	}
48506	return c.header_
48507}
48508
48509func (c *ProjectsLocationsKnowledgeBasesGetCall) doRequest(alt string) (*http.Response, error) {
48510	reqHeaders := make(http.Header)
48511	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
48512	for k, v := range c.header_ {
48513		reqHeaders[k] = v
48514	}
48515	reqHeaders.Set("User-Agent", c.s.userAgent())
48516	if c.ifNoneMatch_ != "" {
48517		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48518	}
48519	var body io.Reader = nil
48520	c.urlParams_.Set("alt", alt)
48521	c.urlParams_.Set("prettyPrint", "false")
48522	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
48523	urls += "?" + c.urlParams_.Encode()
48524	req, err := http.NewRequest("GET", urls, body)
48525	if err != nil {
48526		return nil, err
48527	}
48528	req.Header = reqHeaders
48529	googleapi.Expand(req.URL, map[string]string{
48530		"name": c.name,
48531	})
48532	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48533}
48534
48535// Do executes the "dialogflow.projects.locations.knowledgeBases.get" call.
48536// Exactly one of *GoogleCloudDialogflowV2KnowledgeBase or error will be
48537// non-nil. Any non-2xx status code is an error. Response headers are in
48538// either *GoogleCloudDialogflowV2KnowledgeBase.ServerResponse.Header or
48539// (if a response was returned at all) in
48540// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
48541// whether the returned error was because http.StatusNotModified was
48542// returned.
48543func (c *ProjectsLocationsKnowledgeBasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2KnowledgeBase, error) {
48544	gensupport.SetOptions(c.urlParams_, opts...)
48545	res, err := c.doRequest("json")
48546	if res != nil && res.StatusCode == http.StatusNotModified {
48547		if res.Body != nil {
48548			res.Body.Close()
48549		}
48550		return nil, &googleapi.Error{
48551			Code:   res.StatusCode,
48552			Header: res.Header,
48553		}
48554	}
48555	if err != nil {
48556		return nil, err
48557	}
48558	defer googleapi.CloseBody(res)
48559	if err := googleapi.CheckResponse(res); err != nil {
48560		return nil, err
48561	}
48562	ret := &GoogleCloudDialogflowV2KnowledgeBase{
48563		ServerResponse: googleapi.ServerResponse{
48564			Header:         res.Header,
48565			HTTPStatusCode: res.StatusCode,
48566		},
48567	}
48568	target := &ret
48569	if err := gensupport.DecodeResponse(target, res); err != nil {
48570		return nil, err
48571	}
48572	return ret, nil
48573	// {
48574	//   "description": "Retrieves the specified knowledge base.",
48575	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}",
48576	//   "httpMethod": "GET",
48577	//   "id": "dialogflow.projects.locations.knowledgeBases.get",
48578	//   "parameterOrder": [
48579	//     "name"
48580	//   ],
48581	//   "parameters": {
48582	//     "name": {
48583	//       "description": "Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`.",
48584	//       "location": "path",
48585	//       "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$",
48586	//       "required": true,
48587	//       "type": "string"
48588	//     }
48589	//   },
48590	//   "path": "v2/{+name}",
48591	//   "response": {
48592	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
48593	//   },
48594	//   "scopes": [
48595	//     "https://www.googleapis.com/auth/cloud-platform",
48596	//     "https://www.googleapis.com/auth/dialogflow"
48597	//   ]
48598	// }
48599
48600}
48601
48602// method id "dialogflow.projects.locations.knowledgeBases.list":
48603
48604type ProjectsLocationsKnowledgeBasesListCall struct {
48605	s            *Service
48606	parent       string
48607	urlParams_   gensupport.URLParams
48608	ifNoneMatch_ string
48609	ctx_         context.Context
48610	header_      http.Header
48611}
48612
48613// List: Returns the list of all knowledge bases of the specified agent.
48614//
48615// - parent: The project to list of knowledge bases for. Format:
48616//   `projects//locations/`.
48617func (r *ProjectsLocationsKnowledgeBasesService) List(parent string) *ProjectsLocationsKnowledgeBasesListCall {
48618	c := &ProjectsLocationsKnowledgeBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48619	c.parent = parent
48620	return c
48621}
48622
48623// PageSize sets the optional parameter "pageSize": The maximum number
48624// of items to return in a single page. By default 10 and at most 100.
48625func (c *ProjectsLocationsKnowledgeBasesListCall) PageSize(pageSize int64) *ProjectsLocationsKnowledgeBasesListCall {
48626	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
48627	return c
48628}
48629
48630// PageToken sets the optional parameter "pageToken": The
48631// next_page_token value returned from a previous list request.
48632func (c *ProjectsLocationsKnowledgeBasesListCall) PageToken(pageToken string) *ProjectsLocationsKnowledgeBasesListCall {
48633	c.urlParams_.Set("pageToken", pageToken)
48634	return c
48635}
48636
48637// Fields allows partial responses to be retrieved. See
48638// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48639// for more information.
48640func (c *ProjectsLocationsKnowledgeBasesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesListCall {
48641	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48642	return c
48643}
48644
48645// IfNoneMatch sets the optional parameter which makes the operation
48646// fail if the object's ETag matches the given value. This is useful for
48647// getting updates only after the object has changed since the last
48648// request. Use googleapi.IsNotModified to check whether the response
48649// error from Do is the result of In-None-Match.
48650func (c *ProjectsLocationsKnowledgeBasesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsKnowledgeBasesListCall {
48651	c.ifNoneMatch_ = entityTag
48652	return c
48653}
48654
48655// Context sets the context to be used in this call's Do method. Any
48656// pending HTTP request will be aborted if the provided context is
48657// canceled.
48658func (c *ProjectsLocationsKnowledgeBasesListCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesListCall {
48659	c.ctx_ = ctx
48660	return c
48661}
48662
48663// Header returns an http.Header that can be modified by the caller to
48664// add HTTP headers to the request.
48665func (c *ProjectsLocationsKnowledgeBasesListCall) Header() http.Header {
48666	if c.header_ == nil {
48667		c.header_ = make(http.Header)
48668	}
48669	return c.header_
48670}
48671
48672func (c *ProjectsLocationsKnowledgeBasesListCall) doRequest(alt string) (*http.Response, error) {
48673	reqHeaders := make(http.Header)
48674	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
48675	for k, v := range c.header_ {
48676		reqHeaders[k] = v
48677	}
48678	reqHeaders.Set("User-Agent", c.s.userAgent())
48679	if c.ifNoneMatch_ != "" {
48680		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48681	}
48682	var body io.Reader = nil
48683	c.urlParams_.Set("alt", alt)
48684	c.urlParams_.Set("prettyPrint", "false")
48685	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/knowledgeBases")
48686	urls += "?" + c.urlParams_.Encode()
48687	req, err := http.NewRequest("GET", urls, body)
48688	if err != nil {
48689		return nil, err
48690	}
48691	req.Header = reqHeaders
48692	googleapi.Expand(req.URL, map[string]string{
48693		"parent": c.parent,
48694	})
48695	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48696}
48697
48698// Do executes the "dialogflow.projects.locations.knowledgeBases.list" call.
48699// Exactly one of *GoogleCloudDialogflowV2ListKnowledgeBasesResponse or
48700// error will be non-nil. Any non-2xx status code is an error. Response
48701// headers are in either
48702// *GoogleCloudDialogflowV2ListKnowledgeBasesResponse.ServerResponse.Head
48703// er or (if a response was returned at all) in
48704// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
48705// whether the returned error was because http.StatusNotModified was
48706// returned.
48707func (c *ProjectsLocationsKnowledgeBasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListKnowledgeBasesResponse, error) {
48708	gensupport.SetOptions(c.urlParams_, opts...)
48709	res, err := c.doRequest("json")
48710	if res != nil && res.StatusCode == http.StatusNotModified {
48711		if res.Body != nil {
48712			res.Body.Close()
48713		}
48714		return nil, &googleapi.Error{
48715			Code:   res.StatusCode,
48716			Header: res.Header,
48717		}
48718	}
48719	if err != nil {
48720		return nil, err
48721	}
48722	defer googleapi.CloseBody(res)
48723	if err := googleapi.CheckResponse(res); err != nil {
48724		return nil, err
48725	}
48726	ret := &GoogleCloudDialogflowV2ListKnowledgeBasesResponse{
48727		ServerResponse: googleapi.ServerResponse{
48728			Header:         res.Header,
48729			HTTPStatusCode: res.StatusCode,
48730		},
48731	}
48732	target := &ret
48733	if err := gensupport.DecodeResponse(target, res); err != nil {
48734		return nil, err
48735	}
48736	return ret, nil
48737	// {
48738	//   "description": "Returns the list of all knowledge bases of the specified agent.",
48739	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases",
48740	//   "httpMethod": "GET",
48741	//   "id": "dialogflow.projects.locations.knowledgeBases.list",
48742	//   "parameterOrder": [
48743	//     "parent"
48744	//   ],
48745	//   "parameters": {
48746	//     "pageSize": {
48747	//       "description": "The maximum number of items to return in a single page. By default 10 and at most 100.",
48748	//       "format": "int32",
48749	//       "location": "query",
48750	//       "type": "integer"
48751	//     },
48752	//     "pageToken": {
48753	//       "description": "The next_page_token value returned from a previous list request.",
48754	//       "location": "query",
48755	//       "type": "string"
48756	//     },
48757	//     "parent": {
48758	//       "description": "Required. The project to list of knowledge bases for. Format: `projects//locations/`.",
48759	//       "location": "path",
48760	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
48761	//       "required": true,
48762	//       "type": "string"
48763	//     }
48764	//   },
48765	//   "path": "v2/{+parent}/knowledgeBases",
48766	//   "response": {
48767	//     "$ref": "GoogleCloudDialogflowV2ListKnowledgeBasesResponse"
48768	//   },
48769	//   "scopes": [
48770	//     "https://www.googleapis.com/auth/cloud-platform",
48771	//     "https://www.googleapis.com/auth/dialogflow"
48772	//   ]
48773	// }
48774
48775}
48776
48777// Pages invokes f for each page of results.
48778// A non-nil error returned from f will halt the iteration.
48779// The provided context supersedes any context provided to the Context method.
48780func (c *ProjectsLocationsKnowledgeBasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListKnowledgeBasesResponse) error) error {
48781	c.ctx_ = ctx
48782	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48783	for {
48784		x, err := c.Do()
48785		if err != nil {
48786			return err
48787		}
48788		if err := f(x); err != nil {
48789			return err
48790		}
48791		if x.NextPageToken == "" {
48792			return nil
48793		}
48794		c.PageToken(x.NextPageToken)
48795	}
48796}
48797
48798// method id "dialogflow.projects.locations.knowledgeBases.patch":
48799
48800type ProjectsLocationsKnowledgeBasesPatchCall struct {
48801	s                                    *Service
48802	name                                 string
48803	googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase
48804	urlParams_                           gensupport.URLParams
48805	ctx_                                 context.Context
48806	header_                              http.Header
48807}
48808
48809// Patch: Updates the specified knowledge base.
48810//
48811// - name: The knowledge base resource name. The name must be empty when
48812//   creating a knowledge base. Format:
48813//   `projects//locations//knowledgeBases/`.
48814func (r *ProjectsLocationsKnowledgeBasesService) Patch(name string, googleclouddialogflowv2knowledgebase *GoogleCloudDialogflowV2KnowledgeBase) *ProjectsLocationsKnowledgeBasesPatchCall {
48815	c := &ProjectsLocationsKnowledgeBasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48816	c.name = name
48817	c.googleclouddialogflowv2knowledgebase = googleclouddialogflowv2knowledgebase
48818	return c
48819}
48820
48821// UpdateMask sets the optional parameter "updateMask": Not specified
48822// means `update all`. Currently, only `display_name` can be updated, an
48823// InvalidArgument will be returned for attempting to update other
48824// fields.
48825func (c *ProjectsLocationsKnowledgeBasesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsKnowledgeBasesPatchCall {
48826	c.urlParams_.Set("updateMask", updateMask)
48827	return c
48828}
48829
48830// Fields allows partial responses to be retrieved. See
48831// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48832// for more information.
48833func (c *ProjectsLocationsKnowledgeBasesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesPatchCall {
48834	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48835	return c
48836}
48837
48838// Context sets the context to be used in this call's Do method. Any
48839// pending HTTP request will be aborted if the provided context is
48840// canceled.
48841func (c *ProjectsLocationsKnowledgeBasesPatchCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesPatchCall {
48842	c.ctx_ = ctx
48843	return c
48844}
48845
48846// Header returns an http.Header that can be modified by the caller to
48847// add HTTP headers to the request.
48848func (c *ProjectsLocationsKnowledgeBasesPatchCall) Header() http.Header {
48849	if c.header_ == nil {
48850		c.header_ = make(http.Header)
48851	}
48852	return c.header_
48853}
48854
48855func (c *ProjectsLocationsKnowledgeBasesPatchCall) doRequest(alt string) (*http.Response, error) {
48856	reqHeaders := make(http.Header)
48857	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
48858	for k, v := range c.header_ {
48859		reqHeaders[k] = v
48860	}
48861	reqHeaders.Set("User-Agent", c.s.userAgent())
48862	var body io.Reader = nil
48863	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2knowledgebase)
48864	if err != nil {
48865		return nil, err
48866	}
48867	reqHeaders.Set("Content-Type", "application/json")
48868	c.urlParams_.Set("alt", alt)
48869	c.urlParams_.Set("prettyPrint", "false")
48870	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
48871	urls += "?" + c.urlParams_.Encode()
48872	req, err := http.NewRequest("PATCH", urls, body)
48873	if err != nil {
48874		return nil, err
48875	}
48876	req.Header = reqHeaders
48877	googleapi.Expand(req.URL, map[string]string{
48878		"name": c.name,
48879	})
48880	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48881}
48882
48883// Do executes the "dialogflow.projects.locations.knowledgeBases.patch" call.
48884// Exactly one of *GoogleCloudDialogflowV2KnowledgeBase or error will be
48885// non-nil. Any non-2xx status code is an error. Response headers are in
48886// either *GoogleCloudDialogflowV2KnowledgeBase.ServerResponse.Header or
48887// (if a response was returned at all) in
48888// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
48889// whether the returned error was because http.StatusNotModified was
48890// returned.
48891func (c *ProjectsLocationsKnowledgeBasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2KnowledgeBase, error) {
48892	gensupport.SetOptions(c.urlParams_, opts...)
48893	res, err := c.doRequest("json")
48894	if res != nil && res.StatusCode == http.StatusNotModified {
48895		if res.Body != nil {
48896			res.Body.Close()
48897		}
48898		return nil, &googleapi.Error{
48899			Code:   res.StatusCode,
48900			Header: res.Header,
48901		}
48902	}
48903	if err != nil {
48904		return nil, err
48905	}
48906	defer googleapi.CloseBody(res)
48907	if err := googleapi.CheckResponse(res); err != nil {
48908		return nil, err
48909	}
48910	ret := &GoogleCloudDialogflowV2KnowledgeBase{
48911		ServerResponse: googleapi.ServerResponse{
48912			Header:         res.Header,
48913			HTTPStatusCode: res.StatusCode,
48914		},
48915	}
48916	target := &ret
48917	if err := gensupport.DecodeResponse(target, res); err != nil {
48918		return nil, err
48919	}
48920	return ret, nil
48921	// {
48922	//   "description": "Updates the specified knowledge base.",
48923	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}",
48924	//   "httpMethod": "PATCH",
48925	//   "id": "dialogflow.projects.locations.knowledgeBases.patch",
48926	//   "parameterOrder": [
48927	//     "name"
48928	//   ],
48929	//   "parameters": {
48930	//     "name": {
48931	//       "description": "The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`.",
48932	//       "location": "path",
48933	//       "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$",
48934	//       "required": true,
48935	//       "type": "string"
48936	//     },
48937	//     "updateMask": {
48938	//       "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.",
48939	//       "format": "google-fieldmask",
48940	//       "location": "query",
48941	//       "type": "string"
48942	//     }
48943	//   },
48944	//   "path": "v2/{+name}",
48945	//   "request": {
48946	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
48947	//   },
48948	//   "response": {
48949	//     "$ref": "GoogleCloudDialogflowV2KnowledgeBase"
48950	//   },
48951	//   "scopes": [
48952	//     "https://www.googleapis.com/auth/cloud-platform",
48953	//     "https://www.googleapis.com/auth/dialogflow"
48954	//   ]
48955	// }
48956
48957}
48958
48959// method id "dialogflow.projects.locations.knowledgeBases.documents.create":
48960
48961type ProjectsLocationsKnowledgeBasesDocumentsCreateCall struct {
48962	s                               *Service
48963	parent                          string
48964	googleclouddialogflowv2document *GoogleCloudDialogflowV2Document
48965	urlParams_                      gensupport.URLParams
48966	ctx_                            context.Context
48967	header_                         http.Header
48968}
48969
48970// Create: Creates a new document. Operation
48971//
48972// - parent: The knowledge base to create a document for. Format:
48973//   `projects//locations//knowledgeBases/`.
48974func (r *ProjectsLocationsKnowledgeBasesDocumentsService) Create(parent string, googleclouddialogflowv2document *GoogleCloudDialogflowV2Document) *ProjectsLocationsKnowledgeBasesDocumentsCreateCall {
48975	c := &ProjectsLocationsKnowledgeBasesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48976	c.parent = parent
48977	c.googleclouddialogflowv2document = googleclouddialogflowv2document
48978	return c
48979}
48980
48981// Fields allows partial responses to be retrieved. See
48982// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48983// for more information.
48984func (c *ProjectsLocationsKnowledgeBasesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesDocumentsCreateCall {
48985	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48986	return c
48987}
48988
48989// Context sets the context to be used in this call's Do method. Any
48990// pending HTTP request will be aborted if the provided context is
48991// canceled.
48992func (c *ProjectsLocationsKnowledgeBasesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesDocumentsCreateCall {
48993	c.ctx_ = ctx
48994	return c
48995}
48996
48997// Header returns an http.Header that can be modified by the caller to
48998// add HTTP headers to the request.
48999func (c *ProjectsLocationsKnowledgeBasesDocumentsCreateCall) Header() http.Header {
49000	if c.header_ == nil {
49001		c.header_ = make(http.Header)
49002	}
49003	return c.header_
49004}
49005
49006func (c *ProjectsLocationsKnowledgeBasesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) {
49007	reqHeaders := make(http.Header)
49008	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
49009	for k, v := range c.header_ {
49010		reqHeaders[k] = v
49011	}
49012	reqHeaders.Set("User-Agent", c.s.userAgent())
49013	var body io.Reader = nil
49014	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2document)
49015	if err != nil {
49016		return nil, err
49017	}
49018	reqHeaders.Set("Content-Type", "application/json")
49019	c.urlParams_.Set("alt", alt)
49020	c.urlParams_.Set("prettyPrint", "false")
49021	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/documents")
49022	urls += "?" + c.urlParams_.Encode()
49023	req, err := http.NewRequest("POST", urls, body)
49024	if err != nil {
49025		return nil, err
49026	}
49027	req.Header = reqHeaders
49028	googleapi.Expand(req.URL, map[string]string{
49029		"parent": c.parent,
49030	})
49031	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49032}
49033
49034// Do executes the "dialogflow.projects.locations.knowledgeBases.documents.create" call.
49035// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
49036// Any non-2xx status code is an error. Response headers are in either
49037// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
49038// was returned at all) in error.(*googleapi.Error).Header. Use
49039// googleapi.IsNotModified to check whether the returned error was
49040// because http.StatusNotModified was returned.
49041func (c *ProjectsLocationsKnowledgeBasesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
49042	gensupport.SetOptions(c.urlParams_, opts...)
49043	res, err := c.doRequest("json")
49044	if res != nil && res.StatusCode == http.StatusNotModified {
49045		if res.Body != nil {
49046			res.Body.Close()
49047		}
49048		return nil, &googleapi.Error{
49049			Code:   res.StatusCode,
49050			Header: res.Header,
49051		}
49052	}
49053	if err != nil {
49054		return nil, err
49055	}
49056	defer googleapi.CloseBody(res)
49057	if err := googleapi.CheckResponse(res); err != nil {
49058		return nil, err
49059	}
49060	ret := &GoogleLongrunningOperation{
49061		ServerResponse: googleapi.ServerResponse{
49062			Header:         res.Header,
49063			HTTPStatusCode: res.StatusCode,
49064		},
49065	}
49066	target := &ret
49067	if err := gensupport.DecodeResponse(target, res); err != nil {
49068		return nil, err
49069	}
49070	return ret, nil
49071	// {
49072	//   "description": "Creates a new document. Operation ",
49073	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents",
49074	//   "httpMethod": "POST",
49075	//   "id": "dialogflow.projects.locations.knowledgeBases.documents.create",
49076	//   "parameterOrder": [
49077	//     "parent"
49078	//   ],
49079	//   "parameters": {
49080	//     "parent": {
49081	//       "description": "Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`.",
49082	//       "location": "path",
49083	//       "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$",
49084	//       "required": true,
49085	//       "type": "string"
49086	//     }
49087	//   },
49088	//   "path": "v2/{+parent}/documents",
49089	//   "request": {
49090	//     "$ref": "GoogleCloudDialogflowV2Document"
49091	//   },
49092	//   "response": {
49093	//     "$ref": "GoogleLongrunningOperation"
49094	//   },
49095	//   "scopes": [
49096	//     "https://www.googleapis.com/auth/cloud-platform",
49097	//     "https://www.googleapis.com/auth/dialogflow"
49098	//   ]
49099	// }
49100
49101}
49102
49103// method id "dialogflow.projects.locations.knowledgeBases.documents.delete":
49104
49105type ProjectsLocationsKnowledgeBasesDocumentsDeleteCall struct {
49106	s          *Service
49107	name       string
49108	urlParams_ gensupport.URLParams
49109	ctx_       context.Context
49110	header_    http.Header
49111}
49112
49113// Delete: Deletes the specified document. Operation
49114//
49115// - name: The name of the document to delete. Format:
49116//   `projects//locations//knowledgeBases//documents/`.
49117func (r *ProjectsLocationsKnowledgeBasesDocumentsService) Delete(name string) *ProjectsLocationsKnowledgeBasesDocumentsDeleteCall {
49118	c := &ProjectsLocationsKnowledgeBasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49119	c.name = name
49120	return c
49121}
49122
49123// Fields allows partial responses to be retrieved. See
49124// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49125// for more information.
49126func (c *ProjectsLocationsKnowledgeBasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesDocumentsDeleteCall {
49127	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49128	return c
49129}
49130
49131// Context sets the context to be used in this call's Do method. Any
49132// pending HTTP request will be aborted if the provided context is
49133// canceled.
49134func (c *ProjectsLocationsKnowledgeBasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesDocumentsDeleteCall {
49135	c.ctx_ = ctx
49136	return c
49137}
49138
49139// Header returns an http.Header that can be modified by the caller to
49140// add HTTP headers to the request.
49141func (c *ProjectsLocationsKnowledgeBasesDocumentsDeleteCall) Header() http.Header {
49142	if c.header_ == nil {
49143		c.header_ = make(http.Header)
49144	}
49145	return c.header_
49146}
49147
49148func (c *ProjectsLocationsKnowledgeBasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
49149	reqHeaders := make(http.Header)
49150	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
49151	for k, v := range c.header_ {
49152		reqHeaders[k] = v
49153	}
49154	reqHeaders.Set("User-Agent", c.s.userAgent())
49155	var body io.Reader = nil
49156	c.urlParams_.Set("alt", alt)
49157	c.urlParams_.Set("prettyPrint", "false")
49158	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
49159	urls += "?" + c.urlParams_.Encode()
49160	req, err := http.NewRequest("DELETE", urls, body)
49161	if err != nil {
49162		return nil, err
49163	}
49164	req.Header = reqHeaders
49165	googleapi.Expand(req.URL, map[string]string{
49166		"name": c.name,
49167	})
49168	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49169}
49170
49171// Do executes the "dialogflow.projects.locations.knowledgeBases.documents.delete" call.
49172// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
49173// Any non-2xx status code is an error. Response headers are in either
49174// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
49175// was returned at all) in error.(*googleapi.Error).Header. Use
49176// googleapi.IsNotModified to check whether the returned error was
49177// because http.StatusNotModified was returned.
49178func (c *ProjectsLocationsKnowledgeBasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
49179	gensupport.SetOptions(c.urlParams_, opts...)
49180	res, err := c.doRequest("json")
49181	if res != nil && res.StatusCode == http.StatusNotModified {
49182		if res.Body != nil {
49183			res.Body.Close()
49184		}
49185		return nil, &googleapi.Error{
49186			Code:   res.StatusCode,
49187			Header: res.Header,
49188		}
49189	}
49190	if err != nil {
49191		return nil, err
49192	}
49193	defer googleapi.CloseBody(res)
49194	if err := googleapi.CheckResponse(res); err != nil {
49195		return nil, err
49196	}
49197	ret := &GoogleLongrunningOperation{
49198		ServerResponse: googleapi.ServerResponse{
49199			Header:         res.Header,
49200			HTTPStatusCode: res.StatusCode,
49201		},
49202	}
49203	target := &ret
49204	if err := gensupport.DecodeResponse(target, res); err != nil {
49205		return nil, err
49206	}
49207	return ret, nil
49208	// {
49209	//   "description": "Deletes the specified document. Operation ",
49210	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
49211	//   "httpMethod": "DELETE",
49212	//   "id": "dialogflow.projects.locations.knowledgeBases.documents.delete",
49213	//   "parameterOrder": [
49214	//     "name"
49215	//   ],
49216	//   "parameters": {
49217	//     "name": {
49218	//       "description": "Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`.",
49219	//       "location": "path",
49220	//       "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
49221	//       "required": true,
49222	//       "type": "string"
49223	//     }
49224	//   },
49225	//   "path": "v2/{+name}",
49226	//   "response": {
49227	//     "$ref": "GoogleLongrunningOperation"
49228	//   },
49229	//   "scopes": [
49230	//     "https://www.googleapis.com/auth/cloud-platform",
49231	//     "https://www.googleapis.com/auth/dialogflow"
49232	//   ]
49233	// }
49234
49235}
49236
49237// method id "dialogflow.projects.locations.knowledgeBases.documents.get":
49238
49239type ProjectsLocationsKnowledgeBasesDocumentsGetCall struct {
49240	s            *Service
49241	name         string
49242	urlParams_   gensupport.URLParams
49243	ifNoneMatch_ string
49244	ctx_         context.Context
49245	header_      http.Header
49246}
49247
49248// Get: Retrieves the specified document.
49249//
49250// - name: The name of the document to retrieve. Format
49251//   `projects//locations//knowledgeBases//documents/`.
49252func (r *ProjectsLocationsKnowledgeBasesDocumentsService) Get(name string) *ProjectsLocationsKnowledgeBasesDocumentsGetCall {
49253	c := &ProjectsLocationsKnowledgeBasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49254	c.name = name
49255	return c
49256}
49257
49258// Fields allows partial responses to be retrieved. See
49259// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49260// for more information.
49261func (c *ProjectsLocationsKnowledgeBasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesDocumentsGetCall {
49262	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49263	return c
49264}
49265
49266// IfNoneMatch sets the optional parameter which makes the operation
49267// fail if the object's ETag matches the given value. This is useful for
49268// getting updates only after the object has changed since the last
49269// request. Use googleapi.IsNotModified to check whether the response
49270// error from Do is the result of In-None-Match.
49271func (c *ProjectsLocationsKnowledgeBasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsKnowledgeBasesDocumentsGetCall {
49272	c.ifNoneMatch_ = entityTag
49273	return c
49274}
49275
49276// Context sets the context to be used in this call's Do method. Any
49277// pending HTTP request will be aborted if the provided context is
49278// canceled.
49279func (c *ProjectsLocationsKnowledgeBasesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesDocumentsGetCall {
49280	c.ctx_ = ctx
49281	return c
49282}
49283
49284// Header returns an http.Header that can be modified by the caller to
49285// add HTTP headers to the request.
49286func (c *ProjectsLocationsKnowledgeBasesDocumentsGetCall) Header() http.Header {
49287	if c.header_ == nil {
49288		c.header_ = make(http.Header)
49289	}
49290	return c.header_
49291}
49292
49293func (c *ProjectsLocationsKnowledgeBasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
49294	reqHeaders := make(http.Header)
49295	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
49296	for k, v := range c.header_ {
49297		reqHeaders[k] = v
49298	}
49299	reqHeaders.Set("User-Agent", c.s.userAgent())
49300	if c.ifNoneMatch_ != "" {
49301		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49302	}
49303	var body io.Reader = nil
49304	c.urlParams_.Set("alt", alt)
49305	c.urlParams_.Set("prettyPrint", "false")
49306	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
49307	urls += "?" + c.urlParams_.Encode()
49308	req, err := http.NewRequest("GET", urls, body)
49309	if err != nil {
49310		return nil, err
49311	}
49312	req.Header = reqHeaders
49313	googleapi.Expand(req.URL, map[string]string{
49314		"name": c.name,
49315	})
49316	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49317}
49318
49319// Do executes the "dialogflow.projects.locations.knowledgeBases.documents.get" call.
49320// Exactly one of *GoogleCloudDialogflowV2Document or error will be
49321// non-nil. Any non-2xx status code is an error. Response headers are in
49322// either *GoogleCloudDialogflowV2Document.ServerResponse.Header or (if
49323// a response was returned at all) in error.(*googleapi.Error).Header.
49324// Use googleapi.IsNotModified to check whether the returned error was
49325// because http.StatusNotModified was returned.
49326func (c *ProjectsLocationsKnowledgeBasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2Document, error) {
49327	gensupport.SetOptions(c.urlParams_, opts...)
49328	res, err := c.doRequest("json")
49329	if res != nil && res.StatusCode == http.StatusNotModified {
49330		if res.Body != nil {
49331			res.Body.Close()
49332		}
49333		return nil, &googleapi.Error{
49334			Code:   res.StatusCode,
49335			Header: res.Header,
49336		}
49337	}
49338	if err != nil {
49339		return nil, err
49340	}
49341	defer googleapi.CloseBody(res)
49342	if err := googleapi.CheckResponse(res); err != nil {
49343		return nil, err
49344	}
49345	ret := &GoogleCloudDialogflowV2Document{
49346		ServerResponse: googleapi.ServerResponse{
49347			Header:         res.Header,
49348			HTTPStatusCode: res.StatusCode,
49349		},
49350	}
49351	target := &ret
49352	if err := gensupport.DecodeResponse(target, res); err != nil {
49353		return nil, err
49354	}
49355	return ret, nil
49356	// {
49357	//   "description": "Retrieves the specified document.",
49358	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
49359	//   "httpMethod": "GET",
49360	//   "id": "dialogflow.projects.locations.knowledgeBases.documents.get",
49361	//   "parameterOrder": [
49362	//     "name"
49363	//   ],
49364	//   "parameters": {
49365	//     "name": {
49366	//       "description": "Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`.",
49367	//       "location": "path",
49368	//       "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
49369	//       "required": true,
49370	//       "type": "string"
49371	//     }
49372	//   },
49373	//   "path": "v2/{+name}",
49374	//   "response": {
49375	//     "$ref": "GoogleCloudDialogflowV2Document"
49376	//   },
49377	//   "scopes": [
49378	//     "https://www.googleapis.com/auth/cloud-platform",
49379	//     "https://www.googleapis.com/auth/dialogflow"
49380	//   ]
49381	// }
49382
49383}
49384
49385// method id "dialogflow.projects.locations.knowledgeBases.documents.list":
49386
49387type ProjectsLocationsKnowledgeBasesDocumentsListCall struct {
49388	s            *Service
49389	parent       string
49390	urlParams_   gensupport.URLParams
49391	ifNoneMatch_ string
49392	ctx_         context.Context
49393	header_      http.Header
49394}
49395
49396// List: Returns the list of all documents of the knowledge base.
49397//
49398// - parent: The knowledge base to list all documents for. Format:
49399//   `projects//locations//knowledgeBases/`.
49400func (r *ProjectsLocationsKnowledgeBasesDocumentsService) List(parent string) *ProjectsLocationsKnowledgeBasesDocumentsListCall {
49401	c := &ProjectsLocationsKnowledgeBasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49402	c.parent = parent
49403	return c
49404}
49405
49406// PageSize sets the optional parameter "pageSize": The maximum number
49407// of items to return in a single page. By default 10 and at most 100.
49408func (c *ProjectsLocationsKnowledgeBasesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsKnowledgeBasesDocumentsListCall {
49409	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
49410	return c
49411}
49412
49413// PageToken sets the optional parameter "pageToken": The
49414// next_page_token value returned from a previous list request.
49415func (c *ProjectsLocationsKnowledgeBasesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsKnowledgeBasesDocumentsListCall {
49416	c.urlParams_.Set("pageToken", pageToken)
49417	return c
49418}
49419
49420// Fields allows partial responses to be retrieved. See
49421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49422// for more information.
49423func (c *ProjectsLocationsKnowledgeBasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesDocumentsListCall {
49424	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49425	return c
49426}
49427
49428// IfNoneMatch sets the optional parameter which makes the operation
49429// fail if the object's ETag matches the given value. This is useful for
49430// getting updates only after the object has changed since the last
49431// request. Use googleapi.IsNotModified to check whether the response
49432// error from Do is the result of In-None-Match.
49433func (c *ProjectsLocationsKnowledgeBasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsKnowledgeBasesDocumentsListCall {
49434	c.ifNoneMatch_ = entityTag
49435	return c
49436}
49437
49438// Context sets the context to be used in this call's Do method. Any
49439// pending HTTP request will be aborted if the provided context is
49440// canceled.
49441func (c *ProjectsLocationsKnowledgeBasesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesDocumentsListCall {
49442	c.ctx_ = ctx
49443	return c
49444}
49445
49446// Header returns an http.Header that can be modified by the caller to
49447// add HTTP headers to the request.
49448func (c *ProjectsLocationsKnowledgeBasesDocumentsListCall) Header() http.Header {
49449	if c.header_ == nil {
49450		c.header_ = make(http.Header)
49451	}
49452	return c.header_
49453}
49454
49455func (c *ProjectsLocationsKnowledgeBasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
49456	reqHeaders := make(http.Header)
49457	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
49458	for k, v := range c.header_ {
49459		reqHeaders[k] = v
49460	}
49461	reqHeaders.Set("User-Agent", c.s.userAgent())
49462	if c.ifNoneMatch_ != "" {
49463		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49464	}
49465	var body io.Reader = nil
49466	c.urlParams_.Set("alt", alt)
49467	c.urlParams_.Set("prettyPrint", "false")
49468	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/documents")
49469	urls += "?" + c.urlParams_.Encode()
49470	req, err := http.NewRequest("GET", urls, body)
49471	if err != nil {
49472		return nil, err
49473	}
49474	req.Header = reqHeaders
49475	googleapi.Expand(req.URL, map[string]string{
49476		"parent": c.parent,
49477	})
49478	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49479}
49480
49481// Do executes the "dialogflow.projects.locations.knowledgeBases.documents.list" call.
49482// Exactly one of *GoogleCloudDialogflowV2ListDocumentsResponse or error
49483// will be non-nil. Any non-2xx status code is an error. Response
49484// headers are in either
49485// *GoogleCloudDialogflowV2ListDocumentsResponse.ServerResponse.Header
49486// or (if a response was returned at all) in
49487// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
49488// whether the returned error was because http.StatusNotModified was
49489// returned.
49490func (c *ProjectsLocationsKnowledgeBasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2ListDocumentsResponse, error) {
49491	gensupport.SetOptions(c.urlParams_, opts...)
49492	res, err := c.doRequest("json")
49493	if res != nil && res.StatusCode == http.StatusNotModified {
49494		if res.Body != nil {
49495			res.Body.Close()
49496		}
49497		return nil, &googleapi.Error{
49498			Code:   res.StatusCode,
49499			Header: res.Header,
49500		}
49501	}
49502	if err != nil {
49503		return nil, err
49504	}
49505	defer googleapi.CloseBody(res)
49506	if err := googleapi.CheckResponse(res); err != nil {
49507		return nil, err
49508	}
49509	ret := &GoogleCloudDialogflowV2ListDocumentsResponse{
49510		ServerResponse: googleapi.ServerResponse{
49511			Header:         res.Header,
49512			HTTPStatusCode: res.StatusCode,
49513		},
49514	}
49515	target := &ret
49516	if err := gensupport.DecodeResponse(target, res); err != nil {
49517		return nil, err
49518	}
49519	return ret, nil
49520	// {
49521	//   "description": "Returns the list of all documents of the knowledge base.",
49522	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents",
49523	//   "httpMethod": "GET",
49524	//   "id": "dialogflow.projects.locations.knowledgeBases.documents.list",
49525	//   "parameterOrder": [
49526	//     "parent"
49527	//   ],
49528	//   "parameters": {
49529	//     "pageSize": {
49530	//       "description": "The maximum number of items to return in a single page. By default 10 and at most 100.",
49531	//       "format": "int32",
49532	//       "location": "query",
49533	//       "type": "integer"
49534	//     },
49535	//     "pageToken": {
49536	//       "description": "The next_page_token value returned from a previous list request.",
49537	//       "location": "query",
49538	//       "type": "string"
49539	//     },
49540	//     "parent": {
49541	//       "description": "Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`.",
49542	//       "location": "path",
49543	//       "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$",
49544	//       "required": true,
49545	//       "type": "string"
49546	//     }
49547	//   },
49548	//   "path": "v2/{+parent}/documents",
49549	//   "response": {
49550	//     "$ref": "GoogleCloudDialogflowV2ListDocumentsResponse"
49551	//   },
49552	//   "scopes": [
49553	//     "https://www.googleapis.com/auth/cloud-platform",
49554	//     "https://www.googleapis.com/auth/dialogflow"
49555	//   ]
49556	// }
49557
49558}
49559
49560// Pages invokes f for each page of results.
49561// A non-nil error returned from f will halt the iteration.
49562// The provided context supersedes any context provided to the Context method.
49563func (c *ProjectsLocationsKnowledgeBasesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2ListDocumentsResponse) error) error {
49564	c.ctx_ = ctx
49565	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
49566	for {
49567		x, err := c.Do()
49568		if err != nil {
49569			return err
49570		}
49571		if err := f(x); err != nil {
49572			return err
49573		}
49574		if x.NextPageToken == "" {
49575			return nil
49576		}
49577		c.PageToken(x.NextPageToken)
49578	}
49579}
49580
49581// method id "dialogflow.projects.locations.knowledgeBases.documents.patch":
49582
49583type ProjectsLocationsKnowledgeBasesDocumentsPatchCall struct {
49584	s                               *Service
49585	name                            string
49586	googleclouddialogflowv2document *GoogleCloudDialogflowV2Document
49587	urlParams_                      gensupport.URLParams
49588	ctx_                            context.Context
49589	header_                         http.Header
49590}
49591
49592// Patch: Updates the specified document. Operation
49593//
49594// - name: Optional. The document resource name. The name must be empty
49595//   when creating a document. Format:
49596//   `projects//locations//knowledgeBases//documents/`.
49597func (r *ProjectsLocationsKnowledgeBasesDocumentsService) Patch(name string, googleclouddialogflowv2document *GoogleCloudDialogflowV2Document) *ProjectsLocationsKnowledgeBasesDocumentsPatchCall {
49598	c := &ProjectsLocationsKnowledgeBasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49599	c.name = name
49600	c.googleclouddialogflowv2document = googleclouddialogflowv2document
49601	return c
49602}
49603
49604// UpdateMask sets the optional parameter "updateMask": Not specified
49605// means `update all`. Currently, only `display_name` can be updated, an
49606// InvalidArgument will be returned for attempting to update other
49607// fields.
49608func (c *ProjectsLocationsKnowledgeBasesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsKnowledgeBasesDocumentsPatchCall {
49609	c.urlParams_.Set("updateMask", updateMask)
49610	return c
49611}
49612
49613// Fields allows partial responses to be retrieved. See
49614// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49615// for more information.
49616func (c *ProjectsLocationsKnowledgeBasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesDocumentsPatchCall {
49617	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49618	return c
49619}
49620
49621// Context sets the context to be used in this call's Do method. Any
49622// pending HTTP request will be aborted if the provided context is
49623// canceled.
49624func (c *ProjectsLocationsKnowledgeBasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesDocumentsPatchCall {
49625	c.ctx_ = ctx
49626	return c
49627}
49628
49629// Header returns an http.Header that can be modified by the caller to
49630// add HTTP headers to the request.
49631func (c *ProjectsLocationsKnowledgeBasesDocumentsPatchCall) Header() http.Header {
49632	if c.header_ == nil {
49633		c.header_ = make(http.Header)
49634	}
49635	return c.header_
49636}
49637
49638func (c *ProjectsLocationsKnowledgeBasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
49639	reqHeaders := make(http.Header)
49640	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
49641	for k, v := range c.header_ {
49642		reqHeaders[k] = v
49643	}
49644	reqHeaders.Set("User-Agent", c.s.userAgent())
49645	var body io.Reader = nil
49646	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2document)
49647	if err != nil {
49648		return nil, err
49649	}
49650	reqHeaders.Set("Content-Type", "application/json")
49651	c.urlParams_.Set("alt", alt)
49652	c.urlParams_.Set("prettyPrint", "false")
49653	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
49654	urls += "?" + c.urlParams_.Encode()
49655	req, err := http.NewRequest("PATCH", urls, body)
49656	if err != nil {
49657		return nil, err
49658	}
49659	req.Header = reqHeaders
49660	googleapi.Expand(req.URL, map[string]string{
49661		"name": c.name,
49662	})
49663	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49664}
49665
49666// Do executes the "dialogflow.projects.locations.knowledgeBases.documents.patch" call.
49667// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
49668// Any non-2xx status code is an error. Response headers are in either
49669// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
49670// was returned at all) in error.(*googleapi.Error).Header. Use
49671// googleapi.IsNotModified to check whether the returned error was
49672// because http.StatusNotModified was returned.
49673func (c *ProjectsLocationsKnowledgeBasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
49674	gensupport.SetOptions(c.urlParams_, opts...)
49675	res, err := c.doRequest("json")
49676	if res != nil && res.StatusCode == http.StatusNotModified {
49677		if res.Body != nil {
49678			res.Body.Close()
49679		}
49680		return nil, &googleapi.Error{
49681			Code:   res.StatusCode,
49682			Header: res.Header,
49683		}
49684	}
49685	if err != nil {
49686		return nil, err
49687	}
49688	defer googleapi.CloseBody(res)
49689	if err := googleapi.CheckResponse(res); err != nil {
49690		return nil, err
49691	}
49692	ret := &GoogleLongrunningOperation{
49693		ServerResponse: googleapi.ServerResponse{
49694			Header:         res.Header,
49695			HTTPStatusCode: res.StatusCode,
49696		},
49697	}
49698	target := &ret
49699	if err := gensupport.DecodeResponse(target, res); err != nil {
49700		return nil, err
49701	}
49702	return ret, nil
49703	// {
49704	//   "description": "Updates the specified document. Operation ",
49705	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
49706	//   "httpMethod": "PATCH",
49707	//   "id": "dialogflow.projects.locations.knowledgeBases.documents.patch",
49708	//   "parameterOrder": [
49709	//     "name"
49710	//   ],
49711	//   "parameters": {
49712	//     "name": {
49713	//       "description": "Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`.",
49714	//       "location": "path",
49715	//       "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
49716	//       "required": true,
49717	//       "type": "string"
49718	//     },
49719	//     "updateMask": {
49720	//       "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.",
49721	//       "format": "google-fieldmask",
49722	//       "location": "query",
49723	//       "type": "string"
49724	//     }
49725	//   },
49726	//   "path": "v2/{+name}",
49727	//   "request": {
49728	//     "$ref": "GoogleCloudDialogflowV2Document"
49729	//   },
49730	//   "response": {
49731	//     "$ref": "GoogleLongrunningOperation"
49732	//   },
49733	//   "scopes": [
49734	//     "https://www.googleapis.com/auth/cloud-platform",
49735	//     "https://www.googleapis.com/auth/dialogflow"
49736	//   ]
49737	// }
49738
49739}
49740
49741// method id "dialogflow.projects.locations.knowledgeBases.documents.reload":
49742
49743type ProjectsLocationsKnowledgeBasesDocumentsReloadCall struct {
49744	s                                            *Service
49745	name                                         string
49746	googleclouddialogflowv2reloaddocumentrequest *GoogleCloudDialogflowV2ReloadDocumentRequest
49747	urlParams_                                   gensupport.URLParams
49748	ctx_                                         context.Context
49749	header_                                      http.Header
49750}
49751
49752// Reload: Reloads the specified document from its specified source,
49753// content_uri or content. The previously loaded content of the document
49754// will be deleted. Note: Even when the content of the document has not
49755// changed, there still may be side effects because of internal
49756// implementation changes. Note: The
49757// `projects.agent.knowledgeBases.documents` resource is deprecated;
49758// only use `projects.knowledgeBases.documents`. Operation
49759//
49760// - name: The name of the document to reload. Format:
49761//   `projects//locations//knowledgeBases//documents/`.
49762func (r *ProjectsLocationsKnowledgeBasesDocumentsService) Reload(name string, googleclouddialogflowv2reloaddocumentrequest *GoogleCloudDialogflowV2ReloadDocumentRequest) *ProjectsLocationsKnowledgeBasesDocumentsReloadCall {
49763	c := &ProjectsLocationsKnowledgeBasesDocumentsReloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49764	c.name = name
49765	c.googleclouddialogflowv2reloaddocumentrequest = googleclouddialogflowv2reloaddocumentrequest
49766	return c
49767}
49768
49769// Fields allows partial responses to be retrieved. See
49770// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49771// for more information.
49772func (c *ProjectsLocationsKnowledgeBasesDocumentsReloadCall) Fields(s ...googleapi.Field) *ProjectsLocationsKnowledgeBasesDocumentsReloadCall {
49773	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49774	return c
49775}
49776
49777// Context sets the context to be used in this call's Do method. Any
49778// pending HTTP request will be aborted if the provided context is
49779// canceled.
49780func (c *ProjectsLocationsKnowledgeBasesDocumentsReloadCall) Context(ctx context.Context) *ProjectsLocationsKnowledgeBasesDocumentsReloadCall {
49781	c.ctx_ = ctx
49782	return c
49783}
49784
49785// Header returns an http.Header that can be modified by the caller to
49786// add HTTP headers to the request.
49787func (c *ProjectsLocationsKnowledgeBasesDocumentsReloadCall) Header() http.Header {
49788	if c.header_ == nil {
49789		c.header_ = make(http.Header)
49790	}
49791	return c.header_
49792}
49793
49794func (c *ProjectsLocationsKnowledgeBasesDocumentsReloadCall) doRequest(alt string) (*http.Response, error) {
49795	reqHeaders := make(http.Header)
49796	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
49797	for k, v := range c.header_ {
49798		reqHeaders[k] = v
49799	}
49800	reqHeaders.Set("User-Agent", c.s.userAgent())
49801	var body io.Reader = nil
49802	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2reloaddocumentrequest)
49803	if err != nil {
49804		return nil, err
49805	}
49806	reqHeaders.Set("Content-Type", "application/json")
49807	c.urlParams_.Set("alt", alt)
49808	c.urlParams_.Set("prettyPrint", "false")
49809	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:reload")
49810	urls += "?" + c.urlParams_.Encode()
49811	req, err := http.NewRequest("POST", urls, body)
49812	if err != nil {
49813		return nil, err
49814	}
49815	req.Header = reqHeaders
49816	googleapi.Expand(req.URL, map[string]string{
49817		"name": c.name,
49818	})
49819	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49820}
49821
49822// Do executes the "dialogflow.projects.locations.knowledgeBases.documents.reload" call.
49823// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
49824// Any non-2xx status code is an error. Response headers are in either
49825// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
49826// was returned at all) in error.(*googleapi.Error).Header. Use
49827// googleapi.IsNotModified to check whether the returned error was
49828// because http.StatusNotModified was returned.
49829func (c *ProjectsLocationsKnowledgeBasesDocumentsReloadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
49830	gensupport.SetOptions(c.urlParams_, opts...)
49831	res, err := c.doRequest("json")
49832	if res != nil && res.StatusCode == http.StatusNotModified {
49833		if res.Body != nil {
49834			res.Body.Close()
49835		}
49836		return nil, &googleapi.Error{
49837			Code:   res.StatusCode,
49838			Header: res.Header,
49839		}
49840	}
49841	if err != nil {
49842		return nil, err
49843	}
49844	defer googleapi.CloseBody(res)
49845	if err := googleapi.CheckResponse(res); err != nil {
49846		return nil, err
49847	}
49848	ret := &GoogleLongrunningOperation{
49849		ServerResponse: googleapi.ServerResponse{
49850			Header:         res.Header,
49851			HTTPStatusCode: res.StatusCode,
49852		},
49853	}
49854	target := &ret
49855	if err := gensupport.DecodeResponse(target, res); err != nil {
49856		return nil, err
49857	}
49858	return ret, nil
49859	// {
49860	//   "description": "Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. Operation ",
49861	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload",
49862	//   "httpMethod": "POST",
49863	//   "id": "dialogflow.projects.locations.knowledgeBases.documents.reload",
49864	//   "parameterOrder": [
49865	//     "name"
49866	//   ],
49867	//   "parameters": {
49868	//     "name": {
49869	//       "description": "Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/`",
49870	//       "location": "path",
49871	//       "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
49872	//       "required": true,
49873	//       "type": "string"
49874	//     }
49875	//   },
49876	//   "path": "v2/{+name}:reload",
49877	//   "request": {
49878	//     "$ref": "GoogleCloudDialogflowV2ReloadDocumentRequest"
49879	//   },
49880	//   "response": {
49881	//     "$ref": "GoogleLongrunningOperation"
49882	//   },
49883	//   "scopes": [
49884	//     "https://www.googleapis.com/auth/cloud-platform",
49885	//     "https://www.googleapis.com/auth/dialogflow"
49886	//   ]
49887	// }
49888
49889}
49890
49891// method id "dialogflow.projects.locations.operations.cancel":
49892
49893type ProjectsLocationsOperationsCancelCall struct {
49894	s          *Service
49895	name       string
49896	urlParams_ gensupport.URLParams
49897	ctx_       context.Context
49898	header_    http.Header
49899}
49900
49901// Cancel: Starts asynchronous cancellation on a long-running operation.
49902// The server makes a best effort to cancel the operation, but success
49903// is not guaranteed. If the server doesn't support this method, it
49904// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
49905// Operations.GetOperation or other methods to check whether the
49906// cancellation succeeded or whether the operation completed despite
49907// cancellation. On successful cancellation, the operation is not
49908// deleted; instead, it becomes an operation with an Operation.error
49909// value with a google.rpc.Status.code of 1, corresponding to
49910// `Code.CANCELLED`.
49911//
49912// - name: The name of the operation resource to be cancelled.
49913func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall {
49914	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49915	c.name = name
49916	return c
49917}
49918
49919// Fields allows partial responses to be retrieved. See
49920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49921// for more information.
49922func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
49923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49924	return c
49925}
49926
49927// Context sets the context to be used in this call's Do method. Any
49928// pending HTTP request will be aborted if the provided context is
49929// canceled.
49930func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
49931	c.ctx_ = ctx
49932	return c
49933}
49934
49935// Header returns an http.Header that can be modified by the caller to
49936// add HTTP headers to the request.
49937func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
49938	if c.header_ == nil {
49939		c.header_ = make(http.Header)
49940	}
49941	return c.header_
49942}
49943
49944func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
49945	reqHeaders := make(http.Header)
49946	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
49947	for k, v := range c.header_ {
49948		reqHeaders[k] = v
49949	}
49950	reqHeaders.Set("User-Agent", c.s.userAgent())
49951	var body io.Reader = nil
49952	c.urlParams_.Set("alt", alt)
49953	c.urlParams_.Set("prettyPrint", "false")
49954	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
49955	urls += "?" + c.urlParams_.Encode()
49956	req, err := http.NewRequest("POST", urls, body)
49957	if err != nil {
49958		return nil, err
49959	}
49960	req.Header = reqHeaders
49961	googleapi.Expand(req.URL, map[string]string{
49962		"name": c.name,
49963	})
49964	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49965}
49966
49967// Do executes the "dialogflow.projects.locations.operations.cancel" call.
49968// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
49969// non-2xx status code is an error. Response headers are in either
49970// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
49971// returned at all) in error.(*googleapi.Error).Header. Use
49972// googleapi.IsNotModified to check whether the returned error was
49973// because http.StatusNotModified was returned.
49974func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
49975	gensupport.SetOptions(c.urlParams_, opts...)
49976	res, err := c.doRequest("json")
49977	if res != nil && res.StatusCode == http.StatusNotModified {
49978		if res.Body != nil {
49979			res.Body.Close()
49980		}
49981		return nil, &googleapi.Error{
49982			Code:   res.StatusCode,
49983			Header: res.Header,
49984		}
49985	}
49986	if err != nil {
49987		return nil, err
49988	}
49989	defer googleapi.CloseBody(res)
49990	if err := googleapi.CheckResponse(res); err != nil {
49991		return nil, err
49992	}
49993	ret := &GoogleProtobufEmpty{
49994		ServerResponse: googleapi.ServerResponse{
49995			Header:         res.Header,
49996			HTTPStatusCode: res.StatusCode,
49997		},
49998	}
49999	target := &ret
50000	if err := gensupport.DecodeResponse(target, res); err != nil {
50001		return nil, err
50002	}
50003	return ret, nil
50004	// {
50005	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
50006	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
50007	//   "httpMethod": "POST",
50008	//   "id": "dialogflow.projects.locations.operations.cancel",
50009	//   "parameterOrder": [
50010	//     "name"
50011	//   ],
50012	//   "parameters": {
50013	//     "name": {
50014	//       "description": "The name of the operation resource to be cancelled.",
50015	//       "location": "path",
50016	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
50017	//       "required": true,
50018	//       "type": "string"
50019	//     }
50020	//   },
50021	//   "path": "v2/{+name}:cancel",
50022	//   "response": {
50023	//     "$ref": "GoogleProtobufEmpty"
50024	//   },
50025	//   "scopes": [
50026	//     "https://www.googleapis.com/auth/cloud-platform",
50027	//     "https://www.googleapis.com/auth/dialogflow"
50028	//   ]
50029	// }
50030
50031}
50032
50033// method id "dialogflow.projects.locations.operations.get":
50034
50035type ProjectsLocationsOperationsGetCall struct {
50036	s            *Service
50037	name         string
50038	urlParams_   gensupport.URLParams
50039	ifNoneMatch_ string
50040	ctx_         context.Context
50041	header_      http.Header
50042}
50043
50044// Get: Gets the latest state of a long-running operation. Clients can
50045// use this method to poll the operation result at intervals as
50046// recommended by the API service.
50047//
50048// - name: The name of the operation resource.
50049func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
50050	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50051	c.name = name
50052	return c
50053}
50054
50055// Fields allows partial responses to be retrieved. See
50056// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50057// for more information.
50058func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
50059	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50060	return c
50061}
50062
50063// IfNoneMatch sets the optional parameter which makes the operation
50064// fail if the object's ETag matches the given value. This is useful for
50065// getting updates only after the object has changed since the last
50066// request. Use googleapi.IsNotModified to check whether the response
50067// error from Do is the result of In-None-Match.
50068func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
50069	c.ifNoneMatch_ = entityTag
50070	return c
50071}
50072
50073// Context sets the context to be used in this call's Do method. Any
50074// pending HTTP request will be aborted if the provided context is
50075// canceled.
50076func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
50077	c.ctx_ = ctx
50078	return c
50079}
50080
50081// Header returns an http.Header that can be modified by the caller to
50082// add HTTP headers to the request.
50083func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
50084	if c.header_ == nil {
50085		c.header_ = make(http.Header)
50086	}
50087	return c.header_
50088}
50089
50090func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
50091	reqHeaders := make(http.Header)
50092	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
50093	for k, v := range c.header_ {
50094		reqHeaders[k] = v
50095	}
50096	reqHeaders.Set("User-Agent", c.s.userAgent())
50097	if c.ifNoneMatch_ != "" {
50098		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50099	}
50100	var body io.Reader = nil
50101	c.urlParams_.Set("alt", alt)
50102	c.urlParams_.Set("prettyPrint", "false")
50103	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
50104	urls += "?" + c.urlParams_.Encode()
50105	req, err := http.NewRequest("GET", urls, body)
50106	if err != nil {
50107		return nil, err
50108	}
50109	req.Header = reqHeaders
50110	googleapi.Expand(req.URL, map[string]string{
50111		"name": c.name,
50112	})
50113	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50114}
50115
50116// Do executes the "dialogflow.projects.locations.operations.get" call.
50117// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
50118// Any non-2xx status code is an error. Response headers are in either
50119// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
50120// was returned at all) in error.(*googleapi.Error).Header. Use
50121// googleapi.IsNotModified to check whether the returned error was
50122// because http.StatusNotModified was returned.
50123func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
50124	gensupport.SetOptions(c.urlParams_, opts...)
50125	res, err := c.doRequest("json")
50126	if res != nil && res.StatusCode == http.StatusNotModified {
50127		if res.Body != nil {
50128			res.Body.Close()
50129		}
50130		return nil, &googleapi.Error{
50131			Code:   res.StatusCode,
50132			Header: res.Header,
50133		}
50134	}
50135	if err != nil {
50136		return nil, err
50137	}
50138	defer googleapi.CloseBody(res)
50139	if err := googleapi.CheckResponse(res); err != nil {
50140		return nil, err
50141	}
50142	ret := &GoogleLongrunningOperation{
50143		ServerResponse: googleapi.ServerResponse{
50144			Header:         res.Header,
50145			HTTPStatusCode: res.StatusCode,
50146		},
50147	}
50148	target := &ret
50149	if err := gensupport.DecodeResponse(target, res); err != nil {
50150		return nil, err
50151	}
50152	return ret, nil
50153	// {
50154	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
50155	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
50156	//   "httpMethod": "GET",
50157	//   "id": "dialogflow.projects.locations.operations.get",
50158	//   "parameterOrder": [
50159	//     "name"
50160	//   ],
50161	//   "parameters": {
50162	//     "name": {
50163	//       "description": "The name of the operation resource.",
50164	//       "location": "path",
50165	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
50166	//       "required": true,
50167	//       "type": "string"
50168	//     }
50169	//   },
50170	//   "path": "v2/{+name}",
50171	//   "response": {
50172	//     "$ref": "GoogleLongrunningOperation"
50173	//   },
50174	//   "scopes": [
50175	//     "https://www.googleapis.com/auth/cloud-platform",
50176	//     "https://www.googleapis.com/auth/dialogflow"
50177	//   ]
50178	// }
50179
50180}
50181
50182// method id "dialogflow.projects.locations.operations.list":
50183
50184type ProjectsLocationsOperationsListCall struct {
50185	s            *Service
50186	name         string
50187	urlParams_   gensupport.URLParams
50188	ifNoneMatch_ string
50189	ctx_         context.Context
50190	header_      http.Header
50191}
50192
50193// List: Lists operations that match the specified filter in the
50194// request. If the server doesn't support this method, it returns
50195// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
50196// override the binding to use different resource name schemes, such as
50197// `users/*/operations`. To override the binding, API services can add a
50198// binding such as "/v1/{name=users/*}/operations" to their service
50199// configuration. For backwards compatibility, the default name includes
50200// the operations collection id, however overriding users must ensure
50201// the name binding is the parent resource, without the operations
50202// collection id.
50203//
50204// - name: The name of the operation's parent resource.
50205func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
50206	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50207	c.name = name
50208	return c
50209}
50210
50211// Filter sets the optional parameter "filter": The standard list
50212// filter.
50213func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
50214	c.urlParams_.Set("filter", filter)
50215	return c
50216}
50217
50218// PageSize sets the optional parameter "pageSize": The standard list
50219// page size.
50220func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
50221	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
50222	return c
50223}
50224
50225// PageToken sets the optional parameter "pageToken": The standard list
50226// page token.
50227func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
50228	c.urlParams_.Set("pageToken", pageToken)
50229	return c
50230}
50231
50232// Fields allows partial responses to be retrieved. See
50233// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50234// for more information.
50235func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
50236	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50237	return c
50238}
50239
50240// IfNoneMatch sets the optional parameter which makes the operation
50241// fail if the object's ETag matches the given value. This is useful for
50242// getting updates only after the object has changed since the last
50243// request. Use googleapi.IsNotModified to check whether the response
50244// error from Do is the result of In-None-Match.
50245func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
50246	c.ifNoneMatch_ = entityTag
50247	return c
50248}
50249
50250// Context sets the context to be used in this call's Do method. Any
50251// pending HTTP request will be aborted if the provided context is
50252// canceled.
50253func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
50254	c.ctx_ = ctx
50255	return c
50256}
50257
50258// Header returns an http.Header that can be modified by the caller to
50259// add HTTP headers to the request.
50260func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
50261	if c.header_ == nil {
50262		c.header_ = make(http.Header)
50263	}
50264	return c.header_
50265}
50266
50267func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
50268	reqHeaders := make(http.Header)
50269	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
50270	for k, v := range c.header_ {
50271		reqHeaders[k] = v
50272	}
50273	reqHeaders.Set("User-Agent", c.s.userAgent())
50274	if c.ifNoneMatch_ != "" {
50275		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50276	}
50277	var body io.Reader = nil
50278	c.urlParams_.Set("alt", alt)
50279	c.urlParams_.Set("prettyPrint", "false")
50280	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
50281	urls += "?" + c.urlParams_.Encode()
50282	req, err := http.NewRequest("GET", urls, body)
50283	if err != nil {
50284		return nil, err
50285	}
50286	req.Header = reqHeaders
50287	googleapi.Expand(req.URL, map[string]string{
50288		"name": c.name,
50289	})
50290	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50291}
50292
50293// Do executes the "dialogflow.projects.locations.operations.list" call.
50294// Exactly one of *GoogleLongrunningListOperationsResponse or error will
50295// be non-nil. Any non-2xx status code is an error. Response headers are
50296// in either
50297// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
50298// a response was returned at all) in error.(*googleapi.Error).Header.
50299// Use googleapi.IsNotModified to check whether the returned error was
50300// because http.StatusNotModified was returned.
50301func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
50302	gensupport.SetOptions(c.urlParams_, opts...)
50303	res, err := c.doRequest("json")
50304	if res != nil && res.StatusCode == http.StatusNotModified {
50305		if res.Body != nil {
50306			res.Body.Close()
50307		}
50308		return nil, &googleapi.Error{
50309			Code:   res.StatusCode,
50310			Header: res.Header,
50311		}
50312	}
50313	if err != nil {
50314		return nil, err
50315	}
50316	defer googleapi.CloseBody(res)
50317	if err := googleapi.CheckResponse(res); err != nil {
50318		return nil, err
50319	}
50320	ret := &GoogleLongrunningListOperationsResponse{
50321		ServerResponse: googleapi.ServerResponse{
50322			Header:         res.Header,
50323			HTTPStatusCode: res.StatusCode,
50324		},
50325	}
50326	target := &ret
50327	if err := gensupport.DecodeResponse(target, res); err != nil {
50328		return nil, err
50329	}
50330	return ret, nil
50331	// {
50332	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
50333	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations",
50334	//   "httpMethod": "GET",
50335	//   "id": "dialogflow.projects.locations.operations.list",
50336	//   "parameterOrder": [
50337	//     "name"
50338	//   ],
50339	//   "parameters": {
50340	//     "filter": {
50341	//       "description": "The standard list filter.",
50342	//       "location": "query",
50343	//       "type": "string"
50344	//     },
50345	//     "name": {
50346	//       "description": "The name of the operation's parent resource.",
50347	//       "location": "path",
50348	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
50349	//       "required": true,
50350	//       "type": "string"
50351	//     },
50352	//     "pageSize": {
50353	//       "description": "The standard list page size.",
50354	//       "format": "int32",
50355	//       "location": "query",
50356	//       "type": "integer"
50357	//     },
50358	//     "pageToken": {
50359	//       "description": "The standard list page token.",
50360	//       "location": "query",
50361	//       "type": "string"
50362	//     }
50363	//   },
50364	//   "path": "v2/{+name}/operations",
50365	//   "response": {
50366	//     "$ref": "GoogleLongrunningListOperationsResponse"
50367	//   },
50368	//   "scopes": [
50369	//     "https://www.googleapis.com/auth/cloud-platform",
50370	//     "https://www.googleapis.com/auth/dialogflow"
50371	//   ]
50372	// }
50373
50374}
50375
50376// Pages invokes f for each page of results.
50377// A non-nil error returned from f will halt the iteration.
50378// The provided context supersedes any context provided to the Context method.
50379func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
50380	c.ctx_ = ctx
50381	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
50382	for {
50383		x, err := c.Do()
50384		if err != nil {
50385			return err
50386		}
50387		if err := f(x); err != nil {
50388			return err
50389		}
50390		if x.NextPageToken == "" {
50391			return nil
50392		}
50393		c.PageToken(x.NextPageToken)
50394	}
50395}
50396
50397// method id "dialogflow.projects.operations.cancel":
50398
50399type ProjectsOperationsCancelCall struct {
50400	s          *Service
50401	name       string
50402	urlParams_ gensupport.URLParams
50403	ctx_       context.Context
50404	header_    http.Header
50405}
50406
50407// Cancel: Starts asynchronous cancellation on a long-running operation.
50408// The server makes a best effort to cancel the operation, but success
50409// is not guaranteed. If the server doesn't support this method, it
50410// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
50411// Operations.GetOperation or other methods to check whether the
50412// cancellation succeeded or whether the operation completed despite
50413// cancellation. On successful cancellation, the operation is not
50414// deleted; instead, it becomes an operation with an Operation.error
50415// value with a google.rpc.Status.code of 1, corresponding to
50416// `Code.CANCELLED`.
50417//
50418// - name: The name of the operation resource to be cancelled.
50419func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall {
50420	c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50421	c.name = name
50422	return c
50423}
50424
50425// Fields allows partial responses to be retrieved. See
50426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50427// for more information.
50428func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall {
50429	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50430	return c
50431}
50432
50433// Context sets the context to be used in this call's Do method. Any
50434// pending HTTP request will be aborted if the provided context is
50435// canceled.
50436func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall {
50437	c.ctx_ = ctx
50438	return c
50439}
50440
50441// Header returns an http.Header that can be modified by the caller to
50442// add HTTP headers to the request.
50443func (c *ProjectsOperationsCancelCall) Header() http.Header {
50444	if c.header_ == nil {
50445		c.header_ = make(http.Header)
50446	}
50447	return c.header_
50448}
50449
50450func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
50451	reqHeaders := make(http.Header)
50452	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
50453	for k, v := range c.header_ {
50454		reqHeaders[k] = v
50455	}
50456	reqHeaders.Set("User-Agent", c.s.userAgent())
50457	var body io.Reader = nil
50458	c.urlParams_.Set("alt", alt)
50459	c.urlParams_.Set("prettyPrint", "false")
50460	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
50461	urls += "?" + c.urlParams_.Encode()
50462	req, err := http.NewRequest("POST", urls, body)
50463	if err != nil {
50464		return nil, err
50465	}
50466	req.Header = reqHeaders
50467	googleapi.Expand(req.URL, map[string]string{
50468		"name": c.name,
50469	})
50470	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50471}
50472
50473// Do executes the "dialogflow.projects.operations.cancel" call.
50474// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
50475// non-2xx status code is an error. Response headers are in either
50476// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
50477// returned at all) in error.(*googleapi.Error).Header. Use
50478// googleapi.IsNotModified to check whether the returned error was
50479// because http.StatusNotModified was returned.
50480func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
50481	gensupport.SetOptions(c.urlParams_, opts...)
50482	res, err := c.doRequest("json")
50483	if res != nil && res.StatusCode == http.StatusNotModified {
50484		if res.Body != nil {
50485			res.Body.Close()
50486		}
50487		return nil, &googleapi.Error{
50488			Code:   res.StatusCode,
50489			Header: res.Header,
50490		}
50491	}
50492	if err != nil {
50493		return nil, err
50494	}
50495	defer googleapi.CloseBody(res)
50496	if err := googleapi.CheckResponse(res); err != nil {
50497		return nil, err
50498	}
50499	ret := &GoogleProtobufEmpty{
50500		ServerResponse: googleapi.ServerResponse{
50501			Header:         res.Header,
50502			HTTPStatusCode: res.StatusCode,
50503		},
50504	}
50505	target := &ret
50506	if err := gensupport.DecodeResponse(target, res); err != nil {
50507		return nil, err
50508	}
50509	return ret, nil
50510	// {
50511	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
50512	//   "flatPath": "v2/projects/{projectsId}/operations/{operationsId}:cancel",
50513	//   "httpMethod": "POST",
50514	//   "id": "dialogflow.projects.operations.cancel",
50515	//   "parameterOrder": [
50516	//     "name"
50517	//   ],
50518	//   "parameters": {
50519	//     "name": {
50520	//       "description": "The name of the operation resource to be cancelled.",
50521	//       "location": "path",
50522	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
50523	//       "required": true,
50524	//       "type": "string"
50525	//     }
50526	//   },
50527	//   "path": "v2/{+name}:cancel",
50528	//   "response": {
50529	//     "$ref": "GoogleProtobufEmpty"
50530	//   },
50531	//   "scopes": [
50532	//     "https://www.googleapis.com/auth/cloud-platform",
50533	//     "https://www.googleapis.com/auth/dialogflow"
50534	//   ]
50535	// }
50536
50537}
50538
50539// method id "dialogflow.projects.operations.get":
50540
50541type ProjectsOperationsGetCall struct {
50542	s            *Service
50543	name         string
50544	urlParams_   gensupport.URLParams
50545	ifNoneMatch_ string
50546	ctx_         context.Context
50547	header_      http.Header
50548}
50549
50550// Get: Gets the latest state of a long-running operation. Clients can
50551// use this method to poll the operation result at intervals as
50552// recommended by the API service.
50553//
50554// - name: The name of the operation resource.
50555func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
50556	c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50557	c.name = name
50558	return c
50559}
50560
50561// Fields allows partial responses to be retrieved. See
50562// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50563// for more information.
50564func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
50565	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50566	return c
50567}
50568
50569// IfNoneMatch sets the optional parameter which makes the operation
50570// fail if the object's ETag matches the given value. This is useful for
50571// getting updates only after the object has changed since the last
50572// request. Use googleapi.IsNotModified to check whether the response
50573// error from Do is the result of In-None-Match.
50574func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
50575	c.ifNoneMatch_ = entityTag
50576	return c
50577}
50578
50579// Context sets the context to be used in this call's Do method. Any
50580// pending HTTP request will be aborted if the provided context is
50581// canceled.
50582func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
50583	c.ctx_ = ctx
50584	return c
50585}
50586
50587// Header returns an http.Header that can be modified by the caller to
50588// add HTTP headers to the request.
50589func (c *ProjectsOperationsGetCall) Header() http.Header {
50590	if c.header_ == nil {
50591		c.header_ = make(http.Header)
50592	}
50593	return c.header_
50594}
50595
50596func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
50597	reqHeaders := make(http.Header)
50598	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
50599	for k, v := range c.header_ {
50600		reqHeaders[k] = v
50601	}
50602	reqHeaders.Set("User-Agent", c.s.userAgent())
50603	if c.ifNoneMatch_ != "" {
50604		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50605	}
50606	var body io.Reader = nil
50607	c.urlParams_.Set("alt", alt)
50608	c.urlParams_.Set("prettyPrint", "false")
50609	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
50610	urls += "?" + c.urlParams_.Encode()
50611	req, err := http.NewRequest("GET", urls, body)
50612	if err != nil {
50613		return nil, err
50614	}
50615	req.Header = reqHeaders
50616	googleapi.Expand(req.URL, map[string]string{
50617		"name": c.name,
50618	})
50619	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50620}
50621
50622// Do executes the "dialogflow.projects.operations.get" call.
50623// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
50624// Any non-2xx status code is an error. Response headers are in either
50625// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
50626// was returned at all) in error.(*googleapi.Error).Header. Use
50627// googleapi.IsNotModified to check whether the returned error was
50628// because http.StatusNotModified was returned.
50629func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
50630	gensupport.SetOptions(c.urlParams_, opts...)
50631	res, err := c.doRequest("json")
50632	if res != nil && res.StatusCode == http.StatusNotModified {
50633		if res.Body != nil {
50634			res.Body.Close()
50635		}
50636		return nil, &googleapi.Error{
50637			Code:   res.StatusCode,
50638			Header: res.Header,
50639		}
50640	}
50641	if err != nil {
50642		return nil, err
50643	}
50644	defer googleapi.CloseBody(res)
50645	if err := googleapi.CheckResponse(res); err != nil {
50646		return nil, err
50647	}
50648	ret := &GoogleLongrunningOperation{
50649		ServerResponse: googleapi.ServerResponse{
50650			Header:         res.Header,
50651			HTTPStatusCode: res.StatusCode,
50652		},
50653	}
50654	target := &ret
50655	if err := gensupport.DecodeResponse(target, res); err != nil {
50656		return nil, err
50657	}
50658	return ret, nil
50659	// {
50660	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
50661	//   "flatPath": "v2/projects/{projectsId}/operations/{operationsId}",
50662	//   "httpMethod": "GET",
50663	//   "id": "dialogflow.projects.operations.get",
50664	//   "parameterOrder": [
50665	//     "name"
50666	//   ],
50667	//   "parameters": {
50668	//     "name": {
50669	//       "description": "The name of the operation resource.",
50670	//       "location": "path",
50671	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
50672	//       "required": true,
50673	//       "type": "string"
50674	//     }
50675	//   },
50676	//   "path": "v2/{+name}",
50677	//   "response": {
50678	//     "$ref": "GoogleLongrunningOperation"
50679	//   },
50680	//   "scopes": [
50681	//     "https://www.googleapis.com/auth/cloud-platform",
50682	//     "https://www.googleapis.com/auth/dialogflow"
50683	//   ]
50684	// }
50685
50686}
50687
50688// method id "dialogflow.projects.operations.list":
50689
50690type ProjectsOperationsListCall struct {
50691	s            *Service
50692	name         string
50693	urlParams_   gensupport.URLParams
50694	ifNoneMatch_ string
50695	ctx_         context.Context
50696	header_      http.Header
50697}
50698
50699// List: Lists operations that match the specified filter in the
50700// request. If the server doesn't support this method, it returns
50701// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
50702// override the binding to use different resource name schemes, such as
50703// `users/*/operations`. To override the binding, API services can add a
50704// binding such as "/v1/{name=users/*}/operations" to their service
50705// configuration. For backwards compatibility, the default name includes
50706// the operations collection id, however overriding users must ensure
50707// the name binding is the parent resource, without the operations
50708// collection id.
50709//
50710// - name: The name of the operation's parent resource.
50711func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall {
50712	c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50713	c.name = name
50714	return c
50715}
50716
50717// Filter sets the optional parameter "filter": The standard list
50718// filter.
50719func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall {
50720	c.urlParams_.Set("filter", filter)
50721	return c
50722}
50723
50724// PageSize sets the optional parameter "pageSize": The standard list
50725// page size.
50726func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall {
50727	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
50728	return c
50729}
50730
50731// PageToken sets the optional parameter "pageToken": The standard list
50732// page token.
50733func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall {
50734	c.urlParams_.Set("pageToken", pageToken)
50735	return c
50736}
50737
50738// Fields allows partial responses to be retrieved. See
50739// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50740// for more information.
50741func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall {
50742	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50743	return c
50744}
50745
50746// IfNoneMatch sets the optional parameter which makes the operation
50747// fail if the object's ETag matches the given value. This is useful for
50748// getting updates only after the object has changed since the last
50749// request. Use googleapi.IsNotModified to check whether the response
50750// error from Do is the result of In-None-Match.
50751func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall {
50752	c.ifNoneMatch_ = entityTag
50753	return c
50754}
50755
50756// Context sets the context to be used in this call's Do method. Any
50757// pending HTTP request will be aborted if the provided context is
50758// canceled.
50759func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall {
50760	c.ctx_ = ctx
50761	return c
50762}
50763
50764// Header returns an http.Header that can be modified by the caller to
50765// add HTTP headers to the request.
50766func (c *ProjectsOperationsListCall) Header() http.Header {
50767	if c.header_ == nil {
50768		c.header_ = make(http.Header)
50769	}
50770	return c.header_
50771}
50772
50773func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
50774	reqHeaders := make(http.Header)
50775	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
50776	for k, v := range c.header_ {
50777		reqHeaders[k] = v
50778	}
50779	reqHeaders.Set("User-Agent", c.s.userAgent())
50780	if c.ifNoneMatch_ != "" {
50781		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50782	}
50783	var body io.Reader = nil
50784	c.urlParams_.Set("alt", alt)
50785	c.urlParams_.Set("prettyPrint", "false")
50786	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
50787	urls += "?" + c.urlParams_.Encode()
50788	req, err := http.NewRequest("GET", urls, body)
50789	if err != nil {
50790		return nil, err
50791	}
50792	req.Header = reqHeaders
50793	googleapi.Expand(req.URL, map[string]string{
50794		"name": c.name,
50795	})
50796	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50797}
50798
50799// Do executes the "dialogflow.projects.operations.list" call.
50800// Exactly one of *GoogleLongrunningListOperationsResponse or error will
50801// be non-nil. Any non-2xx status code is an error. Response headers are
50802// in either
50803// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
50804// a response was returned at all) in error.(*googleapi.Error).Header.
50805// Use googleapi.IsNotModified to check whether the returned error was
50806// because http.StatusNotModified was returned.
50807func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
50808	gensupport.SetOptions(c.urlParams_, opts...)
50809	res, err := c.doRequest("json")
50810	if res != nil && res.StatusCode == http.StatusNotModified {
50811		if res.Body != nil {
50812			res.Body.Close()
50813		}
50814		return nil, &googleapi.Error{
50815			Code:   res.StatusCode,
50816			Header: res.Header,
50817		}
50818	}
50819	if err != nil {
50820		return nil, err
50821	}
50822	defer googleapi.CloseBody(res)
50823	if err := googleapi.CheckResponse(res); err != nil {
50824		return nil, err
50825	}
50826	ret := &GoogleLongrunningListOperationsResponse{
50827		ServerResponse: googleapi.ServerResponse{
50828			Header:         res.Header,
50829			HTTPStatusCode: res.StatusCode,
50830		},
50831	}
50832	target := &ret
50833	if err := gensupport.DecodeResponse(target, res); err != nil {
50834		return nil, err
50835	}
50836	return ret, nil
50837	// {
50838	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
50839	//   "flatPath": "v2/projects/{projectsId}/operations",
50840	//   "httpMethod": "GET",
50841	//   "id": "dialogflow.projects.operations.list",
50842	//   "parameterOrder": [
50843	//     "name"
50844	//   ],
50845	//   "parameters": {
50846	//     "filter": {
50847	//       "description": "The standard list filter.",
50848	//       "location": "query",
50849	//       "type": "string"
50850	//     },
50851	//     "name": {
50852	//       "description": "The name of the operation's parent resource.",
50853	//       "location": "path",
50854	//       "pattern": "^projects/[^/]+$",
50855	//       "required": true,
50856	//       "type": "string"
50857	//     },
50858	//     "pageSize": {
50859	//       "description": "The standard list page size.",
50860	//       "format": "int32",
50861	//       "location": "query",
50862	//       "type": "integer"
50863	//     },
50864	//     "pageToken": {
50865	//       "description": "The standard list page token.",
50866	//       "location": "query",
50867	//       "type": "string"
50868	//     }
50869	//   },
50870	//   "path": "v2/{+name}/operations",
50871	//   "response": {
50872	//     "$ref": "GoogleLongrunningListOperationsResponse"
50873	//   },
50874	//   "scopes": [
50875	//     "https://www.googleapis.com/auth/cloud-platform",
50876	//     "https://www.googleapis.com/auth/dialogflow"
50877	//   ]
50878	// }
50879
50880}
50881
50882// Pages invokes f for each page of results.
50883// A non-nil error returned from f will halt the iteration.
50884// The provided context supersedes any context provided to the Context method.
50885func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
50886	c.ctx_ = ctx
50887	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
50888	for {
50889		x, err := c.Do()
50890		if err != nil {
50891			return err
50892		}
50893		if err := f(x); err != nil {
50894			return err
50895		}
50896		if x.NextPageToken == "" {
50897			return nil
50898		}
50899		c.PageToken(x.NextPageToken)
50900	}
50901}
50902