1// Copyright 2019 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/v2beta1"
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/v2beta1"
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	htransport "google.golang.org/api/transport/http"
62)
63
64// Always reference these packages, just in case the auto-generated code
65// below doesn't.
66var _ = bytes.NewBuffer
67var _ = strconv.Itoa
68var _ = fmt.Sprintf
69var _ = json.NewDecoder
70var _ = io.Copy
71var _ = url.Parse
72var _ = gensupport.MarshalJSON
73var _ = googleapi.Version
74var _ = errors.New
75var _ = strings.Replace
76var _ = context.Canceled
77
78const apiId = "dialogflow:v2beta1"
79const apiName = "dialogflow"
80const apiVersion = "v2beta1"
81const basePath = "https://dialogflow.googleapis.com/"
82
83// OAuth2 scopes used by this API.
84const (
85	// View and manage your data across Google Cloud Platform services
86	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
87
88	// View, manage and query your Dialogflow agents
89	DialogflowScope = "https://www.googleapis.com/auth/dialogflow"
90)
91
92// NewService creates a new Service.
93func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
94	scopesOption := option.WithScopes(
95		"https://www.googleapis.com/auth/cloud-platform",
96		"https://www.googleapis.com/auth/dialogflow",
97	)
98	// NOTE: prepend, so we don't override user-specified scopes.
99	opts = append([]option.ClientOption{scopesOption}, opts...)
100	client, endpoint, err := htransport.NewClient(ctx, opts...)
101	if err != nil {
102		return nil, err
103	}
104	s, err := New(client)
105	if err != nil {
106		return nil, err
107	}
108	if endpoint != "" {
109		s.BasePath = endpoint
110	}
111	return s, nil
112}
113
114// New creates a new Service. It uses the provided http.Client for requests.
115//
116// Deprecated: please use NewService instead.
117// To provide a custom HTTP client, use option.WithHTTPClient.
118// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
119func New(client *http.Client) (*Service, error) {
120	if client == nil {
121		return nil, errors.New("client is nil")
122	}
123	s := &Service{client: client, BasePath: basePath}
124	s.Projects = NewProjectsService(s)
125	return s, nil
126}
127
128type Service struct {
129	client    *http.Client
130	BasePath  string // API endpoint base URL
131	UserAgent string // optional additional User-Agent fragment
132
133	Projects *ProjectsService
134}
135
136func (s *Service) userAgent() string {
137	if s.UserAgent == "" {
138		return googleapi.UserAgent
139	}
140	return googleapi.UserAgent + " " + s.UserAgent
141}
142
143func NewProjectsService(s *Service) *ProjectsService {
144	rs := &ProjectsService{s: s}
145	rs.Agent_ = NewProjectsAgentService(s)
146	rs.KnowledgeBases = NewProjectsKnowledgeBasesService(s)
147	rs.Locations = NewProjectsLocationsService(s)
148	rs.Operations = NewProjectsOperationsService(s)
149	return rs
150}
151
152type ProjectsService struct {
153	s *Service
154
155	Agent_ *ProjectsAgentService
156
157	KnowledgeBases *ProjectsKnowledgeBasesService
158
159	Locations *ProjectsLocationsService
160
161	Operations *ProjectsOperationsService
162}
163
164func NewProjectsAgentService(s *Service) *ProjectsAgentService {
165	rs := &ProjectsAgentService{s: s}
166	rs.EntityTypes = NewProjectsAgentEntityTypesService(s)
167	rs.Environments = NewProjectsAgentEnvironmentsService(s)
168	rs.Intents = NewProjectsAgentIntentsService(s)
169	rs.KnowledgeBases = NewProjectsAgentKnowledgeBasesService(s)
170	rs.Sessions = NewProjectsAgentSessionsService(s)
171	return rs
172}
173
174type ProjectsAgentService struct {
175	s *Service
176
177	EntityTypes *ProjectsAgentEntityTypesService
178
179	Environments *ProjectsAgentEnvironmentsService
180
181	Intents *ProjectsAgentIntentsService
182
183	KnowledgeBases *ProjectsAgentKnowledgeBasesService
184
185	Sessions *ProjectsAgentSessionsService
186}
187
188func NewProjectsAgentEntityTypesService(s *Service) *ProjectsAgentEntityTypesService {
189	rs := &ProjectsAgentEntityTypesService{s: s}
190	rs.Entities = NewProjectsAgentEntityTypesEntitiesService(s)
191	return rs
192}
193
194type ProjectsAgentEntityTypesService struct {
195	s *Service
196
197	Entities *ProjectsAgentEntityTypesEntitiesService
198}
199
200func NewProjectsAgentEntityTypesEntitiesService(s *Service) *ProjectsAgentEntityTypesEntitiesService {
201	rs := &ProjectsAgentEntityTypesEntitiesService{s: s}
202	return rs
203}
204
205type ProjectsAgentEntityTypesEntitiesService struct {
206	s *Service
207}
208
209func NewProjectsAgentEnvironmentsService(s *Service) *ProjectsAgentEnvironmentsService {
210	rs := &ProjectsAgentEnvironmentsService{s: s}
211	rs.Users = NewProjectsAgentEnvironmentsUsersService(s)
212	return rs
213}
214
215type ProjectsAgentEnvironmentsService struct {
216	s *Service
217
218	Users *ProjectsAgentEnvironmentsUsersService
219}
220
221func NewProjectsAgentEnvironmentsUsersService(s *Service) *ProjectsAgentEnvironmentsUsersService {
222	rs := &ProjectsAgentEnvironmentsUsersService{s: s}
223	rs.Sessions = NewProjectsAgentEnvironmentsUsersSessionsService(s)
224	return rs
225}
226
227type ProjectsAgentEnvironmentsUsersService struct {
228	s *Service
229
230	Sessions *ProjectsAgentEnvironmentsUsersSessionsService
231}
232
233func NewProjectsAgentEnvironmentsUsersSessionsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsService {
234	rs := &ProjectsAgentEnvironmentsUsersSessionsService{s: s}
235	rs.Contexts = NewProjectsAgentEnvironmentsUsersSessionsContextsService(s)
236	rs.EntityTypes = NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s)
237	return rs
238}
239
240type ProjectsAgentEnvironmentsUsersSessionsService struct {
241	s *Service
242
243	Contexts *ProjectsAgentEnvironmentsUsersSessionsContextsService
244
245	EntityTypes *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService
246}
247
248func NewProjectsAgentEnvironmentsUsersSessionsContextsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsContextsService {
249	rs := &ProjectsAgentEnvironmentsUsersSessionsContextsService{s: s}
250	return rs
251}
252
253type ProjectsAgentEnvironmentsUsersSessionsContextsService struct {
254	s *Service
255}
256
257func NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService {
258	rs := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesService{s: s}
259	return rs
260}
261
262type ProjectsAgentEnvironmentsUsersSessionsEntityTypesService struct {
263	s *Service
264}
265
266func NewProjectsAgentIntentsService(s *Service) *ProjectsAgentIntentsService {
267	rs := &ProjectsAgentIntentsService{s: s}
268	return rs
269}
270
271type ProjectsAgentIntentsService struct {
272	s *Service
273}
274
275func NewProjectsAgentKnowledgeBasesService(s *Service) *ProjectsAgentKnowledgeBasesService {
276	rs := &ProjectsAgentKnowledgeBasesService{s: s}
277	rs.Documents = NewProjectsAgentKnowledgeBasesDocumentsService(s)
278	return rs
279}
280
281type ProjectsAgentKnowledgeBasesService struct {
282	s *Service
283
284	Documents *ProjectsAgentKnowledgeBasesDocumentsService
285}
286
287func NewProjectsAgentKnowledgeBasesDocumentsService(s *Service) *ProjectsAgentKnowledgeBasesDocumentsService {
288	rs := &ProjectsAgentKnowledgeBasesDocumentsService{s: s}
289	return rs
290}
291
292type ProjectsAgentKnowledgeBasesDocumentsService struct {
293	s *Service
294}
295
296func NewProjectsAgentSessionsService(s *Service) *ProjectsAgentSessionsService {
297	rs := &ProjectsAgentSessionsService{s: s}
298	rs.Contexts = NewProjectsAgentSessionsContextsService(s)
299	rs.EntityTypes = NewProjectsAgentSessionsEntityTypesService(s)
300	return rs
301}
302
303type ProjectsAgentSessionsService struct {
304	s *Service
305
306	Contexts *ProjectsAgentSessionsContextsService
307
308	EntityTypes *ProjectsAgentSessionsEntityTypesService
309}
310
311func NewProjectsAgentSessionsContextsService(s *Service) *ProjectsAgentSessionsContextsService {
312	rs := &ProjectsAgentSessionsContextsService{s: s}
313	return rs
314}
315
316type ProjectsAgentSessionsContextsService struct {
317	s *Service
318}
319
320func NewProjectsAgentSessionsEntityTypesService(s *Service) *ProjectsAgentSessionsEntityTypesService {
321	rs := &ProjectsAgentSessionsEntityTypesService{s: s}
322	return rs
323}
324
325type ProjectsAgentSessionsEntityTypesService struct {
326	s *Service
327}
328
329func NewProjectsKnowledgeBasesService(s *Service) *ProjectsKnowledgeBasesService {
330	rs := &ProjectsKnowledgeBasesService{s: s}
331	rs.Documents = NewProjectsKnowledgeBasesDocumentsService(s)
332	return rs
333}
334
335type ProjectsKnowledgeBasesService struct {
336	s *Service
337
338	Documents *ProjectsKnowledgeBasesDocumentsService
339}
340
341func NewProjectsKnowledgeBasesDocumentsService(s *Service) *ProjectsKnowledgeBasesDocumentsService {
342	rs := &ProjectsKnowledgeBasesDocumentsService{s: s}
343	return rs
344}
345
346type ProjectsKnowledgeBasesDocumentsService struct {
347	s *Service
348}
349
350func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
351	rs := &ProjectsLocationsService{s: s}
352	rs.Agent_ = NewProjectsLocationsAgentService(s)
353	rs.Operations = NewProjectsLocationsOperationsService(s)
354	return rs
355}
356
357type ProjectsLocationsService struct {
358	s *Service
359
360	Agent_ *ProjectsLocationsAgentService
361
362	Operations *ProjectsLocationsOperationsService
363}
364
365func NewProjectsLocationsAgentService(s *Service) *ProjectsLocationsAgentService {
366	rs := &ProjectsLocationsAgentService{s: s}
367	rs.EntityTypes = NewProjectsLocationsAgentEntityTypesService(s)
368	rs.Environments = NewProjectsLocationsAgentEnvironmentsService(s)
369	rs.Intents = NewProjectsLocationsAgentIntentsService(s)
370	rs.Sessions = NewProjectsLocationsAgentSessionsService(s)
371	return rs
372}
373
374type ProjectsLocationsAgentService struct {
375	s *Service
376
377	EntityTypes *ProjectsLocationsAgentEntityTypesService
378
379	Environments *ProjectsLocationsAgentEnvironmentsService
380
381	Intents *ProjectsLocationsAgentIntentsService
382
383	Sessions *ProjectsLocationsAgentSessionsService
384}
385
386func NewProjectsLocationsAgentEntityTypesService(s *Service) *ProjectsLocationsAgentEntityTypesService {
387	rs := &ProjectsLocationsAgentEntityTypesService{s: s}
388	rs.Entities = NewProjectsLocationsAgentEntityTypesEntitiesService(s)
389	return rs
390}
391
392type ProjectsLocationsAgentEntityTypesService struct {
393	s *Service
394
395	Entities *ProjectsLocationsAgentEntityTypesEntitiesService
396}
397
398func NewProjectsLocationsAgentEntityTypesEntitiesService(s *Service) *ProjectsLocationsAgentEntityTypesEntitiesService {
399	rs := &ProjectsLocationsAgentEntityTypesEntitiesService{s: s}
400	return rs
401}
402
403type ProjectsLocationsAgentEntityTypesEntitiesService struct {
404	s *Service
405}
406
407func NewProjectsLocationsAgentEnvironmentsService(s *Service) *ProjectsLocationsAgentEnvironmentsService {
408	rs := &ProjectsLocationsAgentEnvironmentsService{s: s}
409	rs.Users = NewProjectsLocationsAgentEnvironmentsUsersService(s)
410	return rs
411}
412
413type ProjectsLocationsAgentEnvironmentsService struct {
414	s *Service
415
416	Users *ProjectsLocationsAgentEnvironmentsUsersService
417}
418
419func NewProjectsLocationsAgentEnvironmentsUsersService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersService {
420	rs := &ProjectsLocationsAgentEnvironmentsUsersService{s: s}
421	rs.Sessions = NewProjectsLocationsAgentEnvironmentsUsersSessionsService(s)
422	return rs
423}
424
425type ProjectsLocationsAgentEnvironmentsUsersService struct {
426	s *Service
427
428	Sessions *ProjectsLocationsAgentEnvironmentsUsersSessionsService
429}
430
431func NewProjectsLocationsAgentEnvironmentsUsersSessionsService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersSessionsService {
432	rs := &ProjectsLocationsAgentEnvironmentsUsersSessionsService{s: s}
433	rs.Contexts = NewProjectsLocationsAgentEnvironmentsUsersSessionsContextsService(s)
434	rs.EntityTypes = NewProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService(s)
435	return rs
436}
437
438type ProjectsLocationsAgentEnvironmentsUsersSessionsService struct {
439	s *Service
440
441	Contexts *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService
442
443	EntityTypes *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService
444}
445
446func NewProjectsLocationsAgentEnvironmentsUsersSessionsContextsService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService {
447	rs := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService{s: s}
448	return rs
449}
450
451type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService struct {
452	s *Service
453}
454
455func NewProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService {
456	rs := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService{s: s}
457	return rs
458}
459
460type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService struct {
461	s *Service
462}
463
464func NewProjectsLocationsAgentIntentsService(s *Service) *ProjectsLocationsAgentIntentsService {
465	rs := &ProjectsLocationsAgentIntentsService{s: s}
466	return rs
467}
468
469type ProjectsLocationsAgentIntentsService struct {
470	s *Service
471}
472
473func NewProjectsLocationsAgentSessionsService(s *Service) *ProjectsLocationsAgentSessionsService {
474	rs := &ProjectsLocationsAgentSessionsService{s: s}
475	rs.Contexts = NewProjectsLocationsAgentSessionsContextsService(s)
476	rs.EntityTypes = NewProjectsLocationsAgentSessionsEntityTypesService(s)
477	return rs
478}
479
480type ProjectsLocationsAgentSessionsService struct {
481	s *Service
482
483	Contexts *ProjectsLocationsAgentSessionsContextsService
484
485	EntityTypes *ProjectsLocationsAgentSessionsEntityTypesService
486}
487
488func NewProjectsLocationsAgentSessionsContextsService(s *Service) *ProjectsLocationsAgentSessionsContextsService {
489	rs := &ProjectsLocationsAgentSessionsContextsService{s: s}
490	return rs
491}
492
493type ProjectsLocationsAgentSessionsContextsService struct {
494	s *Service
495}
496
497func NewProjectsLocationsAgentSessionsEntityTypesService(s *Service) *ProjectsLocationsAgentSessionsEntityTypesService {
498	rs := &ProjectsLocationsAgentSessionsEntityTypesService{s: s}
499	return rs
500}
501
502type ProjectsLocationsAgentSessionsEntityTypesService struct {
503	s *Service
504}
505
506func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
507	rs := &ProjectsLocationsOperationsService{s: s}
508	return rs
509}
510
511type ProjectsLocationsOperationsService struct {
512	s *Service
513}
514
515func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
516	rs := &ProjectsOperationsService{s: s}
517	return rs
518}
519
520type ProjectsOperationsService struct {
521	s *Service
522}
523
524// GoogleCloudDialogflowV2AnnotatedMessagePart: Represents a part of a
525// message possibly annotated with an entity. The part
526// can be an entity or purely a part of the message between two entities
527// or
528// message start/end.
529type GoogleCloudDialogflowV2AnnotatedMessagePart struct {
530	// EntityType: The [Dialogflow system
531	// entity
532	// type](https://cloud.google.com/dialogflow/docs/reference/system
533	// -entities)
534	// of this message part. If this is empty, Dialogflow could not annotate
535	// the
536	// phrase part with a system entity.
537	EntityType string `json:"entityType,omitempty"`
538
539	// FormattedValue: The [Dialogflow system entity formatted
540	// value
541	// ](https://cloud.google.com/dialogflow/docs/reference/system-enti
542	// ties) of
543	// this message part. For example for a system entity of
544	// type
545	// `@sys.unit-currency`, this may contain:
546	// <pre>
547	// {
548	//   "amount": 5,
549	//   "currency": "USD"
550	// }
551	// </pre>
552	FormattedValue interface{} `json:"formattedValue,omitempty"`
553
554	// Text: A part of a message possibly annotated with an entity.
555	Text string `json:"text,omitempty"`
556
557	// ForceSendFields is a list of field names (e.g. "EntityType") to
558	// unconditionally include in API requests. By default, fields with
559	// empty values are omitted from API requests. However, any non-pointer,
560	// non-interface field appearing in ForceSendFields will be sent to the
561	// server regardless of whether the field is empty or not. This may be
562	// used to include empty fields in Patch requests.
563	ForceSendFields []string `json:"-"`
564
565	// NullFields is a list of field names (e.g. "EntityType") to include in
566	// API requests with the JSON null value. By default, fields with empty
567	// values are omitted from API requests. However, any field with an
568	// empty value appearing in NullFields will be sent to the server as
569	// null. It is an error if a field in this list has a non-empty value.
570	// This may be used to include null fields in Patch requests.
571	NullFields []string `json:"-"`
572}
573
574func (s *GoogleCloudDialogflowV2AnnotatedMessagePart) MarshalJSON() ([]byte, error) {
575	type NoMethod GoogleCloudDialogflowV2AnnotatedMessagePart
576	raw := NoMethod(*s)
577	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
578}
579
580// GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse: The response
581// message for EntityTypes.BatchUpdateEntityTypes.
582type GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse struct {
583	// EntityTypes: The collection of updated or created entity types.
584	EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"`
585
586	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
587	// unconditionally include in API requests. By default, fields with
588	// empty values are omitted from API requests. However, any non-pointer,
589	// non-interface field appearing in ForceSendFields will be sent to the
590	// server regardless of whether the field is empty or not. This may be
591	// used to include empty fields in Patch requests.
592	ForceSendFields []string `json:"-"`
593
594	// NullFields is a list of field names (e.g. "EntityTypes") to include
595	// in API requests with the JSON null value. By default, fields with
596	// empty values are omitted from API requests. However, any field with
597	// an empty value appearing in NullFields will be sent to the server as
598	// null. It is an error if a field in this list has a non-empty value.
599	// This may be used to include null fields in Patch requests.
600	NullFields []string `json:"-"`
601}
602
603func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) {
604	type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
605	raw := NoMethod(*s)
606	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
607}
608
609// GoogleCloudDialogflowV2BatchUpdateIntentsResponse: The response
610// message for Intents.BatchUpdateIntents.
611type GoogleCloudDialogflowV2BatchUpdateIntentsResponse struct {
612	// Intents: The collection of updated or created intents.
613	Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"`
614
615	// ForceSendFields is a list of field names (e.g. "Intents") to
616	// unconditionally include in API requests. By default, fields with
617	// empty values are omitted from API requests. However, any non-pointer,
618	// non-interface field appearing in ForceSendFields will be sent to the
619	// server regardless of whether the field is empty or not. This may be
620	// used to include empty fields in Patch requests.
621	ForceSendFields []string `json:"-"`
622
623	// NullFields is a list of field names (e.g. "Intents") to include in
624	// API requests with the JSON null value. By default, fields with empty
625	// values are omitted from API requests. However, any field with an
626	// empty value appearing in NullFields will be sent to the server as
627	// null. It is an error if a field in this list has a non-empty value.
628	// This may be used to include null fields in Patch requests.
629	NullFields []string `json:"-"`
630}
631
632func (s *GoogleCloudDialogflowV2BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) {
633	type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsResponse
634	raw := NoMethod(*s)
635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
636}
637
638// GoogleCloudDialogflowV2Context: Represents a context.
639type GoogleCloudDialogflowV2Context struct {
640	// LifespanCount: Optional. The number of conversational query requests
641	// after which the
642	// context expires. If set to `0` (the default) the context
643	// expires
644	// immediately. Contexts expire automatically after 20 minutes if
645	// there
646	// are no matching queries.
647	LifespanCount int64 `json:"lifespanCount,omitempty"`
648
649	// Name: Required. The unique identifier of the context.
650	// Format:
651	// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context
652	// ID>`.
653	//
654	// The `Context ID` is always converted to lowercase, may only
655	// contain
656	// characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
657	Name string `json:"name,omitempty"`
658
659	// Parameters: Optional. The collection of parameters associated with
660	// this context.
661	// Refer to
662	// [this
663	// doc](https://cloud.google.com/dialogflow/docs/intents-actions-pa
664	// rameters)
665	// for syntax.
666	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
667
668	// ForceSendFields is a list of field names (e.g. "LifespanCount") to
669	// unconditionally include in API requests. By default, fields with
670	// empty values are omitted from API requests. However, any non-pointer,
671	// non-interface field appearing in ForceSendFields will be sent to the
672	// server regardless of whether the field is empty or not. This may be
673	// used to include empty fields in Patch requests.
674	ForceSendFields []string `json:"-"`
675
676	// NullFields is a list of field names (e.g. "LifespanCount") to include
677	// in API requests with the JSON null value. By default, fields with
678	// empty values are omitted from API requests. However, any field with
679	// an empty value appearing in NullFields will be sent to the server as
680	// null. It is an error if a field in this list has a non-empty value.
681	// This may be used to include null fields in Patch requests.
682	NullFields []string `json:"-"`
683}
684
685func (s *GoogleCloudDialogflowV2Context) MarshalJSON() ([]byte, error) {
686	type NoMethod GoogleCloudDialogflowV2Context
687	raw := NoMethod(*s)
688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
689}
690
691// GoogleCloudDialogflowV2ConversationEvent: Represents a notification
692// sent to Cloud Pub/Sub subscribers for conversation
693// lifecycle events.
694type GoogleCloudDialogflowV2ConversationEvent struct {
695	// Conversation: The unique identifier of the conversation this
696	// notification
697	// refers to.
698	// Format: `projects/<Project ID>/conversations/<Conversation ID>`.
699	Conversation string `json:"conversation,omitempty"`
700
701	// ErrorStatus: More detailed information about an error. Only set for
702	// type
703	// UNRECOVERABLE_ERROR_IN_PHONE_CALL.
704	ErrorStatus *GoogleRpcStatus `json:"errorStatus,omitempty"`
705
706	// NewMessagePayload: Payload of NEW_MESSAGE event.
707	NewMessagePayload *GoogleCloudDialogflowV2Message `json:"newMessagePayload,omitempty"`
708
709	// Type: The type of the event that this notification refers to.
710	//
711	// Possible values:
712	//   "TYPE_UNSPECIFIED" - Type not set.
713	//   "CONVERSATION_STARTED" - A new conversation has been opened. This
714	// is fired when a telephone call
715	// is answered, or a conversation is created via the API.
716	//   "CONVERSATION_FINISHED" - An existing conversation has closed. This
717	// is fired when a telephone call
718	// is terminated, or a conversation is closed via the API.
719	//   "HUMAN_INTERVENTION_NEEDED" - An existing conversation has received
720	// notification from Dialogflow that
721	// human intervention is required.
722	//   "NEW_MESSAGE" - An existing conversation has received a new
723	// message, either from API or
724	// telephony. It is configured
725	// in
726	// ConversationProfile.new_message_event_notification_config
727	//   "UNRECOVERABLE_ERROR" - Unrecoverable error during a telephone
728	// call.
729	//
730	// In general non-recoverable errors only occur if something
731	// was
732	// misconfigured in the ConversationProfile corresponding to the call.
733	// After
734	// a non-recoverable error, Dialogflow may stop responding.
735	//
736	// We don't fire this event:
737	// * in an API call because we can directly return the error, or,
738	// * when we can recover from an error.
739	Type string `json:"type,omitempty"`
740
741	// ForceSendFields is a list of field names (e.g. "Conversation") to
742	// unconditionally include in API requests. By default, fields with
743	// empty values are omitted from API requests. However, any non-pointer,
744	// non-interface field appearing in ForceSendFields will be sent to the
745	// server regardless of whether the field is empty or not. This may be
746	// used to include empty fields in Patch requests.
747	ForceSendFields []string `json:"-"`
748
749	// NullFields is a list of field names (e.g. "Conversation") to include
750	// in API requests with the JSON null value. By default, fields with
751	// empty values are omitted from API requests. However, any field with
752	// an empty value appearing in NullFields will be sent to the server as
753	// null. It is an error if a field in this list has a non-empty value.
754	// This may be used to include null fields in Patch requests.
755	NullFields []string `json:"-"`
756}
757
758func (s *GoogleCloudDialogflowV2ConversationEvent) MarshalJSON() ([]byte, error) {
759	type NoMethod GoogleCloudDialogflowV2ConversationEvent
760	raw := NoMethod(*s)
761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
762}
763
764// GoogleCloudDialogflowV2EntityType: Represents an entity type.
765// Entity types serve as a tool for extracting parameter values from
766// natural
767// language queries.
768type GoogleCloudDialogflowV2EntityType struct {
769	// AutoExpansionMode: Optional. Indicates whether the entity type can be
770	// automatically
771	// expanded.
772	//
773	// Possible values:
774	//   "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the
775	// entity.
776	//   "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values
777	// that have not been explicitly
778	// listed in the entity.
779	AutoExpansionMode string `json:"autoExpansionMode,omitempty"`
780
781	// DisplayName: Required. The name of the entity type.
782	DisplayName string `json:"displayName,omitempty"`
783
784	// EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction
785	// during classification.
786	EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"`
787
788	// Entities: Optional. The collection of entity entries associated with
789	// the entity type.
790	Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"`
791
792	// Kind: Required. Indicates the kind of entity type.
793	//
794	// Possible values:
795	//   "KIND_UNSPECIFIED" - Not specified. This value should be never
796	// used.
797	//   "KIND_MAP" - Map entity types allow mapping of a group of synonyms
798	// to a canonical
799	// value.
800	//   "KIND_LIST" - List entity types contain a set of entries that do
801	// not map to canonical
802	// values. However, list entity types can contain references to other
803	// entity
804	// types (with or without aliases).
805	//   "KIND_REGEXP" - Regexp entity types allow to specify regular
806	// expressions in entries
807	// values.
808	Kind string `json:"kind,omitempty"`
809
810	// Name: The unique identifier of the entity type.
811	// Required for EntityTypes.UpdateEntityType
812	// and
813	// EntityTypes.BatchUpdateEntityTypes methods.
814	// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
815	Name string `json:"name,omitempty"`
816
817	// ForceSendFields is a list of field names (e.g. "AutoExpansionMode")
818	// to unconditionally include in API requests. By default, fields with
819	// empty values are omitted from API requests. However, any non-pointer,
820	// non-interface field appearing in ForceSendFields will be sent to the
821	// server regardless of whether the field is empty or not. This may be
822	// used to include empty fields in Patch requests.
823	ForceSendFields []string `json:"-"`
824
825	// NullFields is a list of field names (e.g. "AutoExpansionMode") to
826	// include in API requests with the JSON null value. By default, fields
827	// with empty values are omitted from API requests. However, any field
828	// with an empty value appearing in NullFields will be sent to the
829	// server as null. It is an error if a field in this list has a
830	// non-empty value. This may be used to include null fields in Patch
831	// requests.
832	NullFields []string `json:"-"`
833}
834
835func (s *GoogleCloudDialogflowV2EntityType) MarshalJSON() ([]byte, error) {
836	type NoMethod GoogleCloudDialogflowV2EntityType
837	raw := NoMethod(*s)
838	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
839}
840
841// GoogleCloudDialogflowV2EntityTypeEntity: An **entity entry** for an
842// associated entity type.
843type GoogleCloudDialogflowV2EntityTypeEntity struct {
844	// Synonyms: Required. A collection of value synonyms. For example, if
845	// the entity type
846	// is *vegetable*, and `value` is *scallions*, a synonym could be
847	// *green
848	// onions*.
849	//
850	// For `KIND_LIST` entity types:
851	//
852	// *   This collection must contain exactly one synonym equal to
853	// `value`.
854	Synonyms []string `json:"synonyms,omitempty"`
855
856	// Value: Required. The primary value associated with this entity
857	// entry.
858	// For example, if the entity type is *vegetable*, the value could
859	// be
860	// *scallions*.
861	//
862	// For `KIND_MAP` entity types:
863	//
864	// *   A canonical value to be used in place of synonyms.
865	//
866	// For `KIND_LIST` entity types:
867	//
868	// *   A string that can contain references to other entity types (with
869	// or
870	//     without aliases).
871	Value string `json:"value,omitempty"`
872
873	// ForceSendFields is a list of field names (e.g. "Synonyms") to
874	// unconditionally include in API requests. By default, fields with
875	// empty values are omitted from API requests. However, any non-pointer,
876	// non-interface field appearing in ForceSendFields will be sent to the
877	// server regardless of whether the field is empty or not. This may be
878	// used to include empty fields in Patch requests.
879	ForceSendFields []string `json:"-"`
880
881	// NullFields is a list of field names (e.g. "Synonyms") to include in
882	// API requests with the JSON null value. By default, fields with empty
883	// values are omitted from API requests. However, any field with an
884	// empty value appearing in NullFields will be sent to the server as
885	// null. It is an error if a field in this list has a non-empty value.
886	// This may be used to include null fields in Patch requests.
887	NullFields []string `json:"-"`
888}
889
890func (s *GoogleCloudDialogflowV2EntityTypeEntity) MarshalJSON() ([]byte, error) {
891	type NoMethod GoogleCloudDialogflowV2EntityTypeEntity
892	raw := NoMethod(*s)
893	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
894}
895
896// GoogleCloudDialogflowV2EventInput: Events allow for matching intents
897// by event name instead of the natural
898// language input. For instance, input `<event: { name:
899// "welcome_event",
900// parameters: { name: "Sam" } }>` can trigger a personalized welcome
901// response.
902// The parameter `name` may be used by the agent in the
903// response:
904// "Hello #welcome_event.name! What can I do for you today?".
905type GoogleCloudDialogflowV2EventInput struct {
906	// LanguageCode: Required. The language of this query. See
907	// [Language
908	// Support](https://cloud.google.com/dialogflow/docs/reference/
909	// language)
910	// for a list of the currently supported language codes. Note that
911	// queries in
912	// the same session do not necessarily need to specify the same
913	// language.
914	LanguageCode string `json:"languageCode,omitempty"`
915
916	// Name: Required. The unique identifier of the event.
917	Name string `json:"name,omitempty"`
918
919	// Parameters: Optional. The collection of parameters associated with
920	// the event.
921	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
922
923	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
924	// unconditionally include in API requests. By default, fields with
925	// empty values are omitted from API requests. However, any non-pointer,
926	// non-interface field appearing in ForceSendFields will be sent to the
927	// server regardless of whether the field is empty or not. This may be
928	// used to include empty fields in Patch requests.
929	ForceSendFields []string `json:"-"`
930
931	// NullFields is a list of field names (e.g. "LanguageCode") to include
932	// in API requests with the JSON null value. By default, fields with
933	// empty values are omitted from API requests. However, any field with
934	// an empty value appearing in NullFields will be sent to the server as
935	// null. It is an error if a field in this list has a non-empty value.
936	// This may be used to include null fields in Patch requests.
937	NullFields []string `json:"-"`
938}
939
940func (s *GoogleCloudDialogflowV2EventInput) MarshalJSON() ([]byte, error) {
941	type NoMethod GoogleCloudDialogflowV2EventInput
942	raw := NoMethod(*s)
943	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
944}
945
946// GoogleCloudDialogflowV2ExportAgentResponse: The response message for
947// Agents.ExportAgent.
948type GoogleCloudDialogflowV2ExportAgentResponse struct {
949	// AgentContent: Zip compressed raw byte content for agent.
950	AgentContent string `json:"agentContent,omitempty"`
951
952	// AgentUri: The URI to a file containing the exported agent. This field
953	// is populated
954	// only if `agent_uri` is specified in `ExportAgentRequest`.
955	AgentUri string `json:"agentUri,omitempty"`
956
957	// ForceSendFields is a list of field names (e.g. "AgentContent") to
958	// unconditionally include in API requests. By default, fields with
959	// empty values are omitted from API requests. However, any non-pointer,
960	// non-interface field appearing in ForceSendFields will be sent to the
961	// server regardless of whether the field is empty or not. This may be
962	// used to include empty fields in Patch requests.
963	ForceSendFields []string `json:"-"`
964
965	// NullFields is a list of field names (e.g. "AgentContent") to include
966	// in API requests with the JSON null value. By default, fields with
967	// empty values are omitted from API requests. However, any field with
968	// an empty value appearing in NullFields will be sent to the server as
969	// null. It is an error if a field in this list has a non-empty value.
970	// This may be used to include null fields in Patch requests.
971	NullFields []string `json:"-"`
972}
973
974func (s *GoogleCloudDialogflowV2ExportAgentResponse) MarshalJSON() ([]byte, error) {
975	type NoMethod GoogleCloudDialogflowV2ExportAgentResponse
976	raw := NoMethod(*s)
977	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
978}
979
980// GoogleCloudDialogflowV2Intent: Represents an intent.
981// Intents convert a number of user expressions or patterns into an
982// action. An
983// action is an extraction of a user command or sentence semantics.
984type GoogleCloudDialogflowV2Intent struct {
985	// Action: Optional. The name of the action associated with the
986	// intent.
987	// Note: The action name must not contain whitespaces.
988	Action string `json:"action,omitempty"`
989
990	// DefaultResponsePlatforms: Optional. The list of platforms for which
991	// the first responses will be
992	// copied from the messages in PLATFORM_UNSPECIFIED (i.e. default
993	// platform).
994	//
995	// Possible values:
996	//   "PLATFORM_UNSPECIFIED" - Not specified.
997	//   "FACEBOOK" - Facebook.
998	//   "SLACK" - Slack.
999	//   "TELEGRAM" - Telegram.
1000	//   "KIK" - Kik.
1001	//   "SKYPE" - Skype.
1002	//   "LINE" - Line.
1003	//   "VIBER" - Viber.
1004	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
1005	// When using Actions on Google, you can choose one of the
1006	// specific
1007	// Intent.Message types that mention support for Actions on Google,
1008	// or you can use the advanced Intent.Message.payload field.
1009	// The payload field provides access to AoG features not available in
1010	// the
1011	// specific message types.
1012	// If using the Intent.Message.payload field, it should have a
1013	// structure
1014	// similar to the JSON message shown here. For more information,
1015	// see
1016	// [Actions on Google
1017	// Webhook
1018	// Format](https://developers.google.com/actions/dialogflow/webho
1019	// ok)
1020	// <pre>{
1021	//   "expectUserResponse": true,
1022	//   "isSsml": false,
1023	//   "noInputPrompts": [],
1024	//   "richResponse": {
1025	//     "items": [
1026	//       {
1027	//         "simpleResponse": {
1028	//           "displayText": "hi",
1029	//           "textToSpeech": "hello"
1030	//         }
1031	//       }
1032	//     ],
1033	//     "suggestions": [
1034	//       {
1035	//         "title": "Say this"
1036	//       },
1037	//       {
1038	//         "title": "or this"
1039	//       }
1040	//     ]
1041	//   },
1042	//   "systemIntent": {
1043	//     "data": {
1044	//       "@type":
1045	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
1046	//       "listSelect": {
1047	//         "items": [
1048	//           {
1049	//             "optionInfo": {
1050	//               "key": "key1",
1051	//               "synonyms": [
1052	//                 "key one"
1053	//               ]
1054	//             },
1055	//             "title": "must not be empty, but unique"
1056	//           },
1057	//           {
1058	//             "optionInfo": {
1059	//               "key": "key2",
1060	//               "synonyms": [
1061	//                 "key two"
1062	//               ]
1063	//             },
1064	//             "title": "must not be empty, but unique"
1065	//           }
1066	//         ]
1067	//       }
1068	//     },
1069	//     "intent": "actions.intent.OPTION"
1070	//   }
1071	// }</pre>
1072	//   "GOOGLE_HANGOUTS" - Google Hangouts.
1073	DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"`
1074
1075	// DisplayName: Required. The name of this intent.
1076	DisplayName string `json:"displayName,omitempty"`
1077
1078	// Events: Optional. The collection of event names that trigger the
1079	// intent.
1080	// If the collection of input contexts is not empty, all of the contexts
1081	// must
1082	// be present in the active user session for an event to trigger this
1083	// intent.
1084	Events []string `json:"events,omitempty"`
1085
1086	// FollowupIntentInfo: Read-only. Information about all followup intents
1087	// that have this intent as
1088	// a direct or indirect parent. We populate this field only in the
1089	// output.
1090	FollowupIntentInfo []*GoogleCloudDialogflowV2IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"`
1091
1092	// InputContextNames: Optional. The list of context names required for
1093	// this intent to be
1094	// triggered.
1095	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
1096	// ID>`.
1097	InputContextNames []string `json:"inputContextNames,omitempty"`
1098
1099	// IsFallback: Optional. Indicates whether this is a fallback intent.
1100	IsFallback bool `json:"isFallback,omitempty"`
1101
1102	// Messages: Optional. The collection of rich messages corresponding to
1103	// the
1104	// `Response` field in the Dialogflow console.
1105	Messages []*GoogleCloudDialogflowV2IntentMessage `json:"messages,omitempty"`
1106
1107	// MlDisabled: Optional. Indicates whether Machine Learning is disabled
1108	// for the intent.
1109	// Note: If `ml_disabled` setting is set to true, then this intent is
1110	// not
1111	// taken into account during inference in `ML ONLY` match mode.
1112	// Also,
1113	// auto-markup in the UI is turned off.
1114	MlDisabled bool `json:"mlDisabled,omitempty"`
1115
1116	// Name: The unique identifier of this intent.
1117	// Required for Intents.UpdateIntent and
1118	// Intents.BatchUpdateIntents
1119	// methods.
1120	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
1121	Name string `json:"name,omitempty"`
1122
1123	// OutputContexts: Optional. The collection of contexts that are
1124	// activated when the intent
1125	// is matched. Context messages in this collection should not set
1126	// the
1127	// parameters field. Setting the `lifespan_count` to 0 will reset the
1128	// context
1129	// when the intent is matched.
1130	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
1131	// ID>`.
1132	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
1133
1134	// Parameters: Optional. The collection of parameters associated with
1135	// the intent.
1136	Parameters []*GoogleCloudDialogflowV2IntentParameter `json:"parameters,omitempty"`
1137
1138	// ParentFollowupIntentName: Read-only after creation. The unique
1139	// identifier of the parent intent in the
1140	// chain of followup intents. You can set this field when creating an
1141	// intent,
1142	// for example with CreateIntent or BatchUpdateIntents, in order to
1143	// make this intent a followup intent.
1144	//
1145	// It identifies the parent followup intent.
1146	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
1147	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
1148
1149	// Priority: Optional. The priority of this intent. Higher numbers
1150	// represent higher
1151	// priorities.
1152	//
1153	// - If the supplied value is unspecified or 0, the service
1154	//   translates the value to 500,000, which corresponds to the
1155	//   `Normal` priority in the console.
1156	// - If the supplied value is negative, the intent is ignored
1157	//   in runtime detect intent requests.
1158	Priority int64 `json:"priority,omitempty"`
1159
1160	// ResetContexts: Optional. Indicates whether to delete all contexts in
1161	// the current
1162	// session when this intent is matched.
1163	ResetContexts bool `json:"resetContexts,omitempty"`
1164
1165	// RootFollowupIntentName: Read-only. The unique identifier of the root
1166	// intent in the chain of
1167	// followup intents. It identifies the correct followup intents chain
1168	// for
1169	// this intent. We populate this field only in the output.
1170	//
1171	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
1172	RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"`
1173
1174	// TrainingPhrases: Optional. The collection of examples that the agent
1175	// is
1176	// trained on.
1177	TrainingPhrases []*GoogleCloudDialogflowV2IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
1178
1179	// WebhookState: Optional. Indicates whether webhooks are enabled for
1180	// the intent.
1181	//
1182	// Possible values:
1183	//   "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and
1184	// in the intent.
1185	//   "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in
1186	// the intent.
1187	//   "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in
1188	// the agent and in the intent. Also, each slot
1189	// filling prompt is forwarded to the webhook.
1190	WebhookState string `json:"webhookState,omitempty"`
1191
1192	// ForceSendFields is a list of field names (e.g. "Action") to
1193	// unconditionally include in API requests. By default, fields with
1194	// empty values are omitted from API requests. However, any non-pointer,
1195	// non-interface field appearing in ForceSendFields will be sent to the
1196	// server regardless of whether the field is empty or not. This may be
1197	// used to include empty fields in Patch requests.
1198	ForceSendFields []string `json:"-"`
1199
1200	// NullFields is a list of field names (e.g. "Action") to include in API
1201	// requests with the JSON null value. By default, fields with empty
1202	// values are omitted from API requests. However, any field with an
1203	// empty value appearing in NullFields will be sent to the server as
1204	// null. It is an error if a field in this list has a non-empty value.
1205	// This may be used to include null fields in Patch requests.
1206	NullFields []string `json:"-"`
1207}
1208
1209func (s *GoogleCloudDialogflowV2Intent) MarshalJSON() ([]byte, error) {
1210	type NoMethod GoogleCloudDialogflowV2Intent
1211	raw := NoMethod(*s)
1212	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1213}
1214
1215// GoogleCloudDialogflowV2IntentFollowupIntentInfo: Represents a single
1216// followup intent in the chain.
1217type GoogleCloudDialogflowV2IntentFollowupIntentInfo struct {
1218	// FollowupIntentName: The unique identifier of the followup
1219	// intent.
1220	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
1221	FollowupIntentName string `json:"followupIntentName,omitempty"`
1222
1223	// ParentFollowupIntentName: The unique identifier of the followup
1224	// intent's parent.
1225	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
1226	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
1227
1228	// ForceSendFields is a list of field names (e.g. "FollowupIntentName")
1229	// to unconditionally include in API requests. By default, fields with
1230	// empty values are omitted from API requests. However, any non-pointer,
1231	// non-interface field appearing in ForceSendFields will be sent to the
1232	// server regardless of whether the field is empty or not. This may be
1233	// used to include empty fields in Patch requests.
1234	ForceSendFields []string `json:"-"`
1235
1236	// NullFields is a list of field names (e.g. "FollowupIntentName") to
1237	// include in API requests with the JSON null value. By default, fields
1238	// with empty values are omitted from API requests. However, any field
1239	// with an empty value appearing in NullFields will be sent to the
1240	// server as null. It is an error if a field in this list has a
1241	// non-empty value. This may be used to include null fields in Patch
1242	// requests.
1243	NullFields []string `json:"-"`
1244}
1245
1246func (s *GoogleCloudDialogflowV2IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) {
1247	type NoMethod GoogleCloudDialogflowV2IntentFollowupIntentInfo
1248	raw := NoMethod(*s)
1249	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1250}
1251
1252// GoogleCloudDialogflowV2IntentMessage: Corresponds to the `Response`
1253// field in the Dialogflow console.
1254type GoogleCloudDialogflowV2IntentMessage struct {
1255	// BasicCard: The basic card response for Actions on Google.
1256	BasicCard *GoogleCloudDialogflowV2IntentMessageBasicCard `json:"basicCard,omitempty"`
1257
1258	// BrowseCarouselCard: Browse carousel card for Actions on Google.
1259	BrowseCarouselCard *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"`
1260
1261	// Card: The card response.
1262	Card *GoogleCloudDialogflowV2IntentMessageCard `json:"card,omitempty"`
1263
1264	// CarouselSelect: The carousel card response for Actions on Google.
1265	CarouselSelect *GoogleCloudDialogflowV2IntentMessageCarouselSelect `json:"carouselSelect,omitempty"`
1266
1267	// Image: The image response.
1268	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1269
1270	// LinkOutSuggestion: The link out suggestion chip for Actions on
1271	// Google.
1272	LinkOutSuggestion *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"`
1273
1274	// ListSelect: The list card response for Actions on Google.
1275	ListSelect *GoogleCloudDialogflowV2IntentMessageListSelect `json:"listSelect,omitempty"`
1276
1277	// MediaContent: The media content card for Actions on Google.
1278	MediaContent *GoogleCloudDialogflowV2IntentMessageMediaContent `json:"mediaContent,omitempty"`
1279
1280	// Payload: Returns a response containing a custom, platform-specific
1281	// payload.
1282	// See the Intent.Message.Platform type for a description of
1283	// the
1284	// structure that may be required for your platform.
1285	Payload googleapi.RawMessage `json:"payload,omitempty"`
1286
1287	// Platform: Optional. The platform that this message is intended for.
1288	//
1289	// Possible values:
1290	//   "PLATFORM_UNSPECIFIED" - Not specified.
1291	//   "FACEBOOK" - Facebook.
1292	//   "SLACK" - Slack.
1293	//   "TELEGRAM" - Telegram.
1294	//   "KIK" - Kik.
1295	//   "SKYPE" - Skype.
1296	//   "LINE" - Line.
1297	//   "VIBER" - Viber.
1298	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
1299	// When using Actions on Google, you can choose one of the
1300	// specific
1301	// Intent.Message types that mention support for Actions on Google,
1302	// or you can use the advanced Intent.Message.payload field.
1303	// The payload field provides access to AoG features not available in
1304	// the
1305	// specific message types.
1306	// If using the Intent.Message.payload field, it should have a
1307	// structure
1308	// similar to the JSON message shown here. For more information,
1309	// see
1310	// [Actions on Google
1311	// Webhook
1312	// Format](https://developers.google.com/actions/dialogflow/webho
1313	// ok)
1314	// <pre>{
1315	//   "expectUserResponse": true,
1316	//   "isSsml": false,
1317	//   "noInputPrompts": [],
1318	//   "richResponse": {
1319	//     "items": [
1320	//       {
1321	//         "simpleResponse": {
1322	//           "displayText": "hi",
1323	//           "textToSpeech": "hello"
1324	//         }
1325	//       }
1326	//     ],
1327	//     "suggestions": [
1328	//       {
1329	//         "title": "Say this"
1330	//       },
1331	//       {
1332	//         "title": "or this"
1333	//       }
1334	//     ]
1335	//   },
1336	//   "systemIntent": {
1337	//     "data": {
1338	//       "@type":
1339	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
1340	//       "listSelect": {
1341	//         "items": [
1342	//           {
1343	//             "optionInfo": {
1344	//               "key": "key1",
1345	//               "synonyms": [
1346	//                 "key one"
1347	//               ]
1348	//             },
1349	//             "title": "must not be empty, but unique"
1350	//           },
1351	//           {
1352	//             "optionInfo": {
1353	//               "key": "key2",
1354	//               "synonyms": [
1355	//                 "key two"
1356	//               ]
1357	//             },
1358	//             "title": "must not be empty, but unique"
1359	//           }
1360	//         ]
1361	//       }
1362	//     },
1363	//     "intent": "actions.intent.OPTION"
1364	//   }
1365	// }</pre>
1366	//   "GOOGLE_HANGOUTS" - Google Hangouts.
1367	Platform string `json:"platform,omitempty"`
1368
1369	// QuickReplies: The quick replies response.
1370	QuickReplies *GoogleCloudDialogflowV2IntentMessageQuickReplies `json:"quickReplies,omitempty"`
1371
1372	// SimpleResponses: The voice and text-only responses for Actions on
1373	// Google.
1374	SimpleResponses *GoogleCloudDialogflowV2IntentMessageSimpleResponses `json:"simpleResponses,omitempty"`
1375
1376	// Suggestions: The suggestion chips for Actions on Google.
1377	Suggestions *GoogleCloudDialogflowV2IntentMessageSuggestions `json:"suggestions,omitempty"`
1378
1379	// TableCard: Table card for Actions on Google.
1380	TableCard *GoogleCloudDialogflowV2IntentMessageTableCard `json:"tableCard,omitempty"`
1381
1382	// Text: The text response.
1383	Text *GoogleCloudDialogflowV2IntentMessageText `json:"text,omitempty"`
1384
1385	// ForceSendFields is a list of field names (e.g. "BasicCard") to
1386	// unconditionally include in API requests. By default, fields with
1387	// empty values are omitted from API requests. However, any non-pointer,
1388	// non-interface field appearing in ForceSendFields will be sent to the
1389	// server regardless of whether the field is empty or not. This may be
1390	// used to include empty fields in Patch requests.
1391	ForceSendFields []string `json:"-"`
1392
1393	// NullFields is a list of field names (e.g. "BasicCard") to include in
1394	// API requests with the JSON null value. By default, fields with empty
1395	// values are omitted from API requests. However, any field with an
1396	// empty value appearing in NullFields will be sent to the server as
1397	// null. It is an error if a field in this list has a non-empty value.
1398	// This may be used to include null fields in Patch requests.
1399	NullFields []string `json:"-"`
1400}
1401
1402func (s *GoogleCloudDialogflowV2IntentMessage) MarshalJSON() ([]byte, error) {
1403	type NoMethod GoogleCloudDialogflowV2IntentMessage
1404	raw := NoMethod(*s)
1405	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1406}
1407
1408// GoogleCloudDialogflowV2IntentMessageBasicCard: The basic card
1409// message. Useful for displaying information.
1410type GoogleCloudDialogflowV2IntentMessageBasicCard struct {
1411	// Buttons: Optional. The collection of card buttons.
1412	Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"`
1413
1414	// FormattedText: Required, unless image is present. The body text of
1415	// the card.
1416	FormattedText string `json:"formattedText,omitempty"`
1417
1418	// Image: Optional. The image for the card.
1419	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1420
1421	// Subtitle: Optional. The subtitle of the card.
1422	Subtitle string `json:"subtitle,omitempty"`
1423
1424	// Title: Optional. The title of the card.
1425	Title string `json:"title,omitempty"`
1426
1427	// ForceSendFields is a list of field names (e.g. "Buttons") to
1428	// unconditionally include in API requests. By default, fields with
1429	// empty values are omitted from API requests. However, any non-pointer,
1430	// non-interface field appearing in ForceSendFields will be sent to the
1431	// server regardless of whether the field is empty or not. This may be
1432	// used to include empty fields in Patch requests.
1433	ForceSendFields []string `json:"-"`
1434
1435	// NullFields is a list of field names (e.g. "Buttons") to include in
1436	// API requests with the JSON null value. By default, fields with empty
1437	// values are omitted from API requests. However, any field with an
1438	// empty value appearing in NullFields will be sent to the server as
1439	// null. It is an error if a field in this list has a non-empty value.
1440	// This may be used to include null fields in Patch requests.
1441	NullFields []string `json:"-"`
1442}
1443
1444func (s *GoogleCloudDialogflowV2IntentMessageBasicCard) MarshalJSON() ([]byte, error) {
1445	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCard
1446	raw := NoMethod(*s)
1447	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1448}
1449
1450// GoogleCloudDialogflowV2IntentMessageBasicCardButton: The button
1451// object that appears at the bottom of a card.
1452type GoogleCloudDialogflowV2IntentMessageBasicCardButton struct {
1453	// OpenUriAction: Required. Action to take when a user taps on the
1454	// button.
1455	OpenUriAction *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"`
1456
1457	// Title: Required. The title of the button.
1458	Title string `json:"title,omitempty"`
1459
1460	// ForceSendFields is a list of field names (e.g. "OpenUriAction") to
1461	// unconditionally include in API requests. By default, fields with
1462	// empty values are omitted from API requests. However, any non-pointer,
1463	// non-interface field appearing in ForceSendFields will be sent to the
1464	// server regardless of whether the field is empty or not. This may be
1465	// used to include empty fields in Patch requests.
1466	ForceSendFields []string `json:"-"`
1467
1468	// NullFields is a list of field names (e.g. "OpenUriAction") to include
1469	// in API requests with the JSON null value. By default, fields with
1470	// empty values are omitted from API requests. However, any field with
1471	// an empty value appearing in NullFields will be sent to the server as
1472	// null. It is an error if a field in this list has a non-empty value.
1473	// This may be used to include null fields in Patch requests.
1474	NullFields []string `json:"-"`
1475}
1476
1477func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) {
1478	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButton
1479	raw := NoMethod(*s)
1480	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1481}
1482
1483// GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction:
1484// Opens the given URI.
1485type GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction struct {
1486	// Uri: Required. The HTTP or HTTPS scheme URI.
1487	Uri string `json:"uri,omitempty"`
1488
1489	// ForceSendFields is a list of field names (e.g. "Uri") to
1490	// unconditionally include in API requests. By default, fields with
1491	// empty values are omitted from API requests. However, any non-pointer,
1492	// non-interface field appearing in ForceSendFields will be sent to the
1493	// server regardless of whether the field is empty or not. This may be
1494	// used to include empty fields in Patch requests.
1495	ForceSendFields []string `json:"-"`
1496
1497	// NullFields is a list of field names (e.g. "Uri") to include in API
1498	// requests with the JSON null value. By default, fields with empty
1499	// values are omitted from API requests. However, any field with an
1500	// empty value appearing in NullFields will be sent to the server as
1501	// null. It is an error if a field in this list has a non-empty value.
1502	// This may be used to include null fields in Patch requests.
1503	NullFields []string `json:"-"`
1504}
1505
1506func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) {
1507	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
1508	raw := NoMethod(*s)
1509	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1510}
1511
1512// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard: Browse
1513// Carousel Card for Actions on
1514// Google.
1515// https://developers.google.com/actions/assistant/responses#brow
1516// sing_carousel
1517type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard struct {
1518	// ImageDisplayOptions: Optional. Settings for displaying the image.
1519	// Applies to every image in
1520	// items.
1521	//
1522	// Possible values:
1523	//   "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the
1524	// image and the image container with gray
1525	// bars.
1526	//   "GRAY" - Fill the gaps between the image and the image container
1527	// with gray
1528	// bars.
1529	//   "WHITE" - Fill the gaps between the image and the image container
1530	// with white
1531	// bars.
1532	//   "CROPPED" - Image is scaled such that the image width and height
1533	// match or exceed
1534	// the container dimensions. This may crop the top and bottom of
1535	// the
1536	// image if the scaled image height is greater than the
1537	// container
1538	// height, or crop the left and right of the image if the scaled
1539	// image
1540	// width is greater than the container width. This is similar to
1541	// "Zoom
1542	// Mode" on a widescreen TV when playing a 4:3 video.
1543	//   "BLURRED_BACKGROUND" - Pad the gaps between image and image frame
1544	// with a blurred copy of the
1545	// same image.
1546	ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"`
1547
1548	// Items: Required. List of items in the Browse Carousel Card. Minimum
1549	// of two
1550	// items, maximum of ten.
1551	Items []*GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"`
1552
1553	// ForceSendFields is a list of field names (e.g. "ImageDisplayOptions")
1554	// to unconditionally include in API requests. By default, fields with
1555	// empty values are omitted from API requests. However, any non-pointer,
1556	// non-interface field appearing in ForceSendFields will be sent to the
1557	// server regardless of whether the field is empty or not. This may be
1558	// used to include empty fields in Patch requests.
1559	ForceSendFields []string `json:"-"`
1560
1561	// NullFields is a list of field names (e.g. "ImageDisplayOptions") to
1562	// include in API requests with the JSON null value. By default, fields
1563	// with empty values are omitted from API requests. However, any field
1564	// with an empty value appearing in NullFields will be sent to the
1565	// server as null. It is an error if a field in this list has a
1566	// non-empty value. This may be used to include null fields in Patch
1567	// requests.
1568	NullFields []string `json:"-"`
1569}
1570
1571func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) {
1572	type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard
1573	raw := NoMethod(*s)
1574	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1575}
1576
1577// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa
1578// rdItem: Browsing carousel tile
1579type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct {
1580	// Description: Optional. Description of the carousel item. Maximum of
1581	// four lines of
1582	// text.
1583	Description string `json:"description,omitempty"`
1584
1585	// Footer: Optional. Text that appears at the bottom of the Browse
1586	// Carousel
1587	// Card. Maximum of one line of text.
1588	Footer string `json:"footer,omitempty"`
1589
1590	// Image: Optional. Hero image for the carousel item.
1591	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1592
1593	// OpenUriAction: Required. Action to present to the user.
1594	OpenUriAction *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"`
1595
1596	// Title: Required. Title of the carousel item. Maximum of two lines of
1597	// text.
1598	Title string `json:"title,omitempty"`
1599
1600	// ForceSendFields is a list of field names (e.g. "Description") to
1601	// unconditionally include in API requests. By default, fields with
1602	// empty values are omitted from API requests. However, any non-pointer,
1603	// non-interface field appearing in ForceSendFields will be sent to the
1604	// server regardless of whether the field is empty or not. This may be
1605	// used to include empty fields in Patch requests.
1606	ForceSendFields []string `json:"-"`
1607
1608	// NullFields is a list of field names (e.g. "Description") to include
1609	// in API requests with the JSON null value. By default, fields with
1610	// empty values are omitted from API requests. However, any field with
1611	// an empty value appearing in NullFields will be sent to the server as
1612	// null. It is an error if a field in this list has a non-empty value.
1613	// This may be used to include null fields in Patch requests.
1614	NullFields []string `json:"-"`
1615}
1616
1617func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) {
1618	type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem
1619	raw := NoMethod(*s)
1620	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1621}
1622
1623// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa
1624// rdItemOpenUrlAction: Actions on Google action to open a given url.
1625type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct {
1626	// Url: Required. URL
1627	Url string `json:"url,omitempty"`
1628
1629	// UrlTypeHint: Optional. Specifies the type of viewer that is used when
1630	// opening
1631	// the URL. Defaults to opening via web browser.
1632	//
1633	// Possible values:
1634	//   "URL_TYPE_HINT_UNSPECIFIED" - Unspecified
1635	//   "AMP_ACTION" - Url would be an amp action
1636	//   "AMP_CONTENT" - URL that points directly to AMP content, or to a
1637	// canonical URL
1638	// which refers to AMP content via <link rel="amphtml">.
1639	UrlTypeHint string `json:"urlTypeHint,omitempty"`
1640
1641	// ForceSendFields is a list of field names (e.g. "Url") to
1642	// unconditionally include in API requests. By default, fields with
1643	// empty values are omitted from API requests. However, any non-pointer,
1644	// non-interface field appearing in ForceSendFields will be sent to the
1645	// server regardless of whether the field is empty or not. This may be
1646	// used to include empty fields in Patch requests.
1647	ForceSendFields []string `json:"-"`
1648
1649	// NullFields is a list of field names (e.g. "Url") to include in API
1650	// requests with the JSON null value. By default, fields with empty
1651	// values are omitted from API requests. However, any field with an
1652	// empty value appearing in NullFields will be sent to the server as
1653	// null. It is an error if a field in this list has a non-empty value.
1654	// This may be used to include null fields in Patch requests.
1655	NullFields []string `json:"-"`
1656}
1657
1658func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) {
1659	type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
1660	raw := NoMethod(*s)
1661	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1662}
1663
1664// GoogleCloudDialogflowV2IntentMessageCard: The card response message.
1665type GoogleCloudDialogflowV2IntentMessageCard struct {
1666	// Buttons: Optional. The collection of card buttons.
1667	Buttons []*GoogleCloudDialogflowV2IntentMessageCardButton `json:"buttons,omitempty"`
1668
1669	// ImageUri: Optional. The public URI to an image file for the card.
1670	ImageUri string `json:"imageUri,omitempty"`
1671
1672	// Subtitle: Optional. The subtitle of the card.
1673	Subtitle string `json:"subtitle,omitempty"`
1674
1675	// Title: Optional. The title of the card.
1676	Title string `json:"title,omitempty"`
1677
1678	// ForceSendFields is a list of field names (e.g. "Buttons") to
1679	// unconditionally include in API requests. By default, fields with
1680	// empty values are omitted from API requests. However, any non-pointer,
1681	// non-interface field appearing in ForceSendFields will be sent to the
1682	// server regardless of whether the field is empty or not. This may be
1683	// used to include empty fields in Patch requests.
1684	ForceSendFields []string `json:"-"`
1685
1686	// NullFields is a list of field names (e.g. "Buttons") to include in
1687	// API requests with the JSON null value. By default, fields with empty
1688	// values are omitted from API requests. However, any field with an
1689	// empty value appearing in NullFields will be sent to the server as
1690	// null. It is an error if a field in this list has a non-empty value.
1691	// This may be used to include null fields in Patch requests.
1692	NullFields []string `json:"-"`
1693}
1694
1695func (s *GoogleCloudDialogflowV2IntentMessageCard) MarshalJSON() ([]byte, error) {
1696	type NoMethod GoogleCloudDialogflowV2IntentMessageCard
1697	raw := NoMethod(*s)
1698	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1699}
1700
1701// GoogleCloudDialogflowV2IntentMessageCardButton: Contains information
1702// about a button.
1703type GoogleCloudDialogflowV2IntentMessageCardButton struct {
1704	// Postback: Optional. The text to send back to the Dialogflow API or a
1705	// URI to
1706	// open.
1707	Postback string `json:"postback,omitempty"`
1708
1709	// Text: Optional. The text to show on the button.
1710	Text string `json:"text,omitempty"`
1711
1712	// ForceSendFields is a list of field names (e.g. "Postback") to
1713	// unconditionally include in API requests. By default, fields with
1714	// empty values are omitted from API requests. However, any non-pointer,
1715	// non-interface field appearing in ForceSendFields will be sent to the
1716	// server regardless of whether the field is empty or not. This may be
1717	// used to include empty fields in Patch requests.
1718	ForceSendFields []string `json:"-"`
1719
1720	// NullFields is a list of field names (e.g. "Postback") to include in
1721	// API requests with the JSON null value. By default, fields with empty
1722	// values are omitted from API requests. However, any field with an
1723	// empty value appearing in NullFields will be sent to the server as
1724	// null. It is an error if a field in this list has a non-empty value.
1725	// This may be used to include null fields in Patch requests.
1726	NullFields []string `json:"-"`
1727}
1728
1729func (s *GoogleCloudDialogflowV2IntentMessageCardButton) MarshalJSON() ([]byte, error) {
1730	type NoMethod GoogleCloudDialogflowV2IntentMessageCardButton
1731	raw := NoMethod(*s)
1732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1733}
1734
1735// GoogleCloudDialogflowV2IntentMessageCarouselSelect: The card for
1736// presenting a carousel of options to select from.
1737type GoogleCloudDialogflowV2IntentMessageCarouselSelect struct {
1738	// Items: Required. Carousel items.
1739	Items []*GoogleCloudDialogflowV2IntentMessageCarouselSelectItem `json:"items,omitempty"`
1740
1741	// ForceSendFields is a list of field names (e.g. "Items") to
1742	// unconditionally include in API requests. By default, fields with
1743	// empty values are omitted from API requests. However, any non-pointer,
1744	// non-interface field appearing in ForceSendFields will be sent to the
1745	// server regardless of whether the field is empty or not. This may be
1746	// used to include empty fields in Patch requests.
1747	ForceSendFields []string `json:"-"`
1748
1749	// NullFields is a list of field names (e.g. "Items") to include in API
1750	// requests with the JSON null value. By default, fields with empty
1751	// values are omitted from API requests. However, any field with an
1752	// empty value appearing in NullFields will be sent to the server as
1753	// null. It is an error if a field in this list has a non-empty value.
1754	// This may be used to include null fields in Patch requests.
1755	NullFields []string `json:"-"`
1756}
1757
1758func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) {
1759	type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelect
1760	raw := NoMethod(*s)
1761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1762}
1763
1764// GoogleCloudDialogflowV2IntentMessageCarouselSelectItem: An item in
1765// the carousel.
1766type GoogleCloudDialogflowV2IntentMessageCarouselSelectItem struct {
1767	// Description: Optional. The body text of the card.
1768	Description string `json:"description,omitempty"`
1769
1770	// Image: Optional. The image to display.
1771	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1772
1773	// Info: Required. Additional info about the option item.
1774	Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"`
1775
1776	// Title: Required. Title of the carousel item.
1777	Title string `json:"title,omitempty"`
1778
1779	// ForceSendFields is a list of field names (e.g. "Description") to
1780	// unconditionally include in API requests. By default, fields with
1781	// empty values are omitted from API requests. However, any non-pointer,
1782	// non-interface field appearing in ForceSendFields will be sent to the
1783	// server regardless of whether the field is empty or not. This may be
1784	// used to include empty fields in Patch requests.
1785	ForceSendFields []string `json:"-"`
1786
1787	// NullFields is a list of field names (e.g. "Description") to include
1788	// in API requests with the JSON null value. By default, fields with
1789	// empty values are omitted from API requests. However, any field with
1790	// an empty value appearing in NullFields will be sent to the server as
1791	// null. It is an error if a field in this list has a non-empty value.
1792	// This may be used to include null fields in Patch requests.
1793	NullFields []string `json:"-"`
1794}
1795
1796func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) {
1797	type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
1798	raw := NoMethod(*s)
1799	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1800}
1801
1802// GoogleCloudDialogflowV2IntentMessageColumnProperties: Column
1803// properties for TableCard.
1804type GoogleCloudDialogflowV2IntentMessageColumnProperties struct {
1805	// Header: Required. Column heading.
1806	Header string `json:"header,omitempty"`
1807
1808	// HorizontalAlignment: Optional. Defines text alignment for all cells
1809	// in this column.
1810	//
1811	// Possible values:
1812	//   "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading
1813	// edge of the column.
1814	//   "LEADING" - Text is aligned to the leading edge of the column.
1815	//   "CENTER" - Text is centered in the column.
1816	//   "TRAILING" - Text is aligned to the trailing edge of the column.
1817	HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
1818
1819	// ForceSendFields is a list of field names (e.g. "Header") to
1820	// unconditionally include in API requests. By default, fields with
1821	// empty values are omitted from API requests. However, any non-pointer,
1822	// non-interface field appearing in ForceSendFields will be sent to the
1823	// server regardless of whether the field is empty or not. This may be
1824	// used to include empty fields in Patch requests.
1825	ForceSendFields []string `json:"-"`
1826
1827	// NullFields is a list of field names (e.g. "Header") to include in API
1828	// requests with the JSON null value. By default, fields with empty
1829	// values are omitted from API requests. However, any field with an
1830	// empty value appearing in NullFields will be sent to the server as
1831	// null. It is an error if a field in this list has a non-empty value.
1832	// This may be used to include null fields in Patch requests.
1833	NullFields []string `json:"-"`
1834}
1835
1836func (s *GoogleCloudDialogflowV2IntentMessageColumnProperties) MarshalJSON() ([]byte, error) {
1837	type NoMethod GoogleCloudDialogflowV2IntentMessageColumnProperties
1838	raw := NoMethod(*s)
1839	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1840}
1841
1842// GoogleCloudDialogflowV2IntentMessageImage: The image response
1843// message.
1844type GoogleCloudDialogflowV2IntentMessageImage struct {
1845	// AccessibilityText: Optional. A text description of the image to be
1846	// used for accessibility,
1847	// e.g., screen readers.
1848	AccessibilityText string `json:"accessibilityText,omitempty"`
1849
1850	// ImageUri: Optional. The public URI to an image file.
1851	ImageUri string `json:"imageUri,omitempty"`
1852
1853	// ForceSendFields is a list of field names (e.g. "AccessibilityText")
1854	// to unconditionally include in API requests. By default, fields with
1855	// empty values are omitted from API requests. However, any non-pointer,
1856	// non-interface field appearing in ForceSendFields will be sent to the
1857	// server regardless of whether the field is empty or not. This may be
1858	// used to include empty fields in Patch requests.
1859	ForceSendFields []string `json:"-"`
1860
1861	// NullFields is a list of field names (e.g. "AccessibilityText") to
1862	// include in API requests with the JSON null value. By default, fields
1863	// with empty values are omitted from API requests. However, any field
1864	// with an empty value appearing in NullFields will be sent to the
1865	// server as null. It is an error if a field in this list has a
1866	// non-empty value. This may be used to include null fields in Patch
1867	// requests.
1868	NullFields []string `json:"-"`
1869}
1870
1871func (s *GoogleCloudDialogflowV2IntentMessageImage) MarshalJSON() ([]byte, error) {
1872	type NoMethod GoogleCloudDialogflowV2IntentMessageImage
1873	raw := NoMethod(*s)
1874	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1875}
1876
1877// GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion: The suggestion
1878// chip message that allows the user to jump out to the app
1879// or website associated with this agent.
1880type GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion struct {
1881	// DestinationName: Required. The name of the app or site this chip is
1882	// linking to.
1883	DestinationName string `json:"destinationName,omitempty"`
1884
1885	// Uri: Required. The URI of the app or site to open when the user taps
1886	// the
1887	// suggestion chip.
1888	Uri string `json:"uri,omitempty"`
1889
1890	// ForceSendFields is a list of field names (e.g. "DestinationName") to
1891	// unconditionally include in API requests. By default, fields with
1892	// empty values are omitted from API requests. However, any non-pointer,
1893	// non-interface field appearing in ForceSendFields will be sent to the
1894	// server regardless of whether the field is empty or not. This may be
1895	// used to include empty fields in Patch requests.
1896	ForceSendFields []string `json:"-"`
1897
1898	// NullFields is a list of field names (e.g. "DestinationName") to
1899	// include in API requests with the JSON null value. By default, fields
1900	// with empty values are omitted from API requests. However, any field
1901	// with an empty value appearing in NullFields will be sent to the
1902	// server as null. It is an error if a field in this list has a
1903	// non-empty value. This may be used to include null fields in Patch
1904	// requests.
1905	NullFields []string `json:"-"`
1906}
1907
1908func (s *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) {
1909	type NoMethod GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
1910	raw := NoMethod(*s)
1911	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1912}
1913
1914// GoogleCloudDialogflowV2IntentMessageListSelect: The card for
1915// presenting a list of options to select from.
1916type GoogleCloudDialogflowV2IntentMessageListSelect struct {
1917	// Items: Required. List items.
1918	Items []*GoogleCloudDialogflowV2IntentMessageListSelectItem `json:"items,omitempty"`
1919
1920	// Subtitle: Optional. Subtitle of the list.
1921	Subtitle string `json:"subtitle,omitempty"`
1922
1923	// Title: Optional. The overall title of the list.
1924	Title string `json:"title,omitempty"`
1925
1926	// ForceSendFields is a list of field names (e.g. "Items") to
1927	// unconditionally include in API requests. By default, fields with
1928	// empty values are omitted from API requests. However, any non-pointer,
1929	// non-interface field appearing in ForceSendFields will be sent to the
1930	// server regardless of whether the field is empty or not. This may be
1931	// used to include empty fields in Patch requests.
1932	ForceSendFields []string `json:"-"`
1933
1934	// NullFields is a list of field names (e.g. "Items") to include in API
1935	// requests with the JSON null value. By default, fields with empty
1936	// values are omitted from API requests. However, any field with an
1937	// empty value appearing in NullFields will be sent to the server as
1938	// null. It is an error if a field in this list has a non-empty value.
1939	// This may be used to include null fields in Patch requests.
1940	NullFields []string `json:"-"`
1941}
1942
1943func (s *GoogleCloudDialogflowV2IntentMessageListSelect) MarshalJSON() ([]byte, error) {
1944	type NoMethod GoogleCloudDialogflowV2IntentMessageListSelect
1945	raw := NoMethod(*s)
1946	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1947}
1948
1949// GoogleCloudDialogflowV2IntentMessageListSelectItem: An item in the
1950// list.
1951type GoogleCloudDialogflowV2IntentMessageListSelectItem struct {
1952	// Description: Optional. The main text describing the item.
1953	Description string `json:"description,omitempty"`
1954
1955	// Image: Optional. The image to display.
1956	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1957
1958	// Info: Required. Additional information about this option.
1959	Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"`
1960
1961	// Title: Required. The title of the list item.
1962	Title string `json:"title,omitempty"`
1963
1964	// ForceSendFields is a list of field names (e.g. "Description") to
1965	// unconditionally include in API requests. By default, fields with
1966	// empty values are omitted from API requests. However, any non-pointer,
1967	// non-interface field appearing in ForceSendFields will be sent to the
1968	// server regardless of whether the field is empty or not. This may be
1969	// used to include empty fields in Patch requests.
1970	ForceSendFields []string `json:"-"`
1971
1972	// NullFields is a list of field names (e.g. "Description") to include
1973	// in API requests with the JSON null value. By default, fields with
1974	// empty values are omitted from API requests. However, any field with
1975	// an empty value appearing in NullFields will be sent to the server as
1976	// null. It is an error if a field in this list has a non-empty value.
1977	// This may be used to include null fields in Patch requests.
1978	NullFields []string `json:"-"`
1979}
1980
1981func (s *GoogleCloudDialogflowV2IntentMessageListSelectItem) MarshalJSON() ([]byte, error) {
1982	type NoMethod GoogleCloudDialogflowV2IntentMessageListSelectItem
1983	raw := NoMethod(*s)
1984	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1985}
1986
1987// GoogleCloudDialogflowV2IntentMessageMediaContent: The media content
1988// card for Actions on Google.
1989type GoogleCloudDialogflowV2IntentMessageMediaContent struct {
1990	// MediaObjects: Required. List of media objects.
1991	MediaObjects []*GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"`
1992
1993	// MediaType: Optional. What type of media is the content (ie "audio").
1994	//
1995	// Possible values:
1996	//   "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified.
1997	//   "AUDIO" - Response media type is audio.
1998	MediaType string `json:"mediaType,omitempty"`
1999
2000	// ForceSendFields is a list of field names (e.g. "MediaObjects") to
2001	// unconditionally include in API requests. By default, fields with
2002	// empty values are omitted from API requests. However, any non-pointer,
2003	// non-interface field appearing in ForceSendFields will be sent to the
2004	// server regardless of whether the field is empty or not. This may be
2005	// used to include empty fields in Patch requests.
2006	ForceSendFields []string `json:"-"`
2007
2008	// NullFields is a list of field names (e.g. "MediaObjects") to include
2009	// in API requests with the JSON null value. By default, fields with
2010	// empty values are omitted from API requests. However, any field with
2011	// an empty value appearing in NullFields will be sent to the server as
2012	// null. It is an error if a field in this list has a non-empty value.
2013	// This may be used to include null fields in Patch requests.
2014	NullFields []string `json:"-"`
2015}
2016
2017func (s *GoogleCloudDialogflowV2IntentMessageMediaContent) MarshalJSON() ([]byte, error) {
2018	type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContent
2019	raw := NoMethod(*s)
2020	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2021}
2022
2023// GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject:
2024// Response media object for media content card.
2025type GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject struct {
2026	// ContentUrl: Required. Url where the media is stored.
2027	ContentUrl string `json:"contentUrl,omitempty"`
2028
2029	// Description: Optional. Description of media card.
2030	Description string `json:"description,omitempty"`
2031
2032	// Icon: Optional. Icon to display above media content.
2033	Icon *GoogleCloudDialogflowV2IntentMessageImage `json:"icon,omitempty"`
2034
2035	// LargeImage: Optional. Image to display above media content.
2036	LargeImage *GoogleCloudDialogflowV2IntentMessageImage `json:"largeImage,omitempty"`
2037
2038	// Name: Required. Name of media card.
2039	Name string `json:"name,omitempty"`
2040
2041	// ForceSendFields is a list of field names (e.g. "ContentUrl") 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. "ContentUrl") to include in
2050	// API requests with the JSON null value. By default, fields with empty
2051	// values are omitted from API requests. However, any field with an
2052	// 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 *GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) {
2059	type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject
2060	raw := NoMethod(*s)
2061	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2062}
2063
2064// GoogleCloudDialogflowV2IntentMessageQuickReplies: The quick replies
2065// response message.
2066type GoogleCloudDialogflowV2IntentMessageQuickReplies struct {
2067	// QuickReplies: Optional. The collection of quick replies.
2068	QuickReplies []string `json:"quickReplies,omitempty"`
2069
2070	// Title: Optional. The title of the collection of quick replies.
2071	Title string `json:"title,omitempty"`
2072
2073	// ForceSendFields is a list of field names (e.g. "QuickReplies") to
2074	// unconditionally include in API requests. By default, fields with
2075	// empty values are omitted from API requests. However, any non-pointer,
2076	// non-interface field appearing in ForceSendFields will be sent to the
2077	// server regardless of whether the field is empty or not. This may be
2078	// used to include empty fields in Patch requests.
2079	ForceSendFields []string `json:"-"`
2080
2081	// NullFields is a list of field names (e.g. "QuickReplies") to include
2082	// in API requests with the JSON null value. By default, fields with
2083	// empty values are omitted from API requests. However, any field with
2084	// an empty value appearing in NullFields will be sent to the server as
2085	// null. It is an error if a field in this list has a non-empty value.
2086	// This may be used to include null fields in Patch requests.
2087	NullFields []string `json:"-"`
2088}
2089
2090func (s *GoogleCloudDialogflowV2IntentMessageQuickReplies) MarshalJSON() ([]byte, error) {
2091	type NoMethod GoogleCloudDialogflowV2IntentMessageQuickReplies
2092	raw := NoMethod(*s)
2093	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2094}
2095
2096// GoogleCloudDialogflowV2IntentMessageSelectItemInfo: Additional info
2097// about the select item for when it is triggered in a
2098// dialog.
2099type GoogleCloudDialogflowV2IntentMessageSelectItemInfo struct {
2100	// Key: Required. A unique key that will be sent back to the agent if
2101	// this
2102	// response is given.
2103	Key string `json:"key,omitempty"`
2104
2105	// Synonyms: Optional. A list of synonyms that can also be used to
2106	// trigger this
2107	// item in dialog.
2108	Synonyms []string `json:"synonyms,omitempty"`
2109
2110	// ForceSendFields is a list of field names (e.g. "Key") to
2111	// unconditionally include in API requests. By default, fields with
2112	// empty values are omitted from API requests. However, any non-pointer,
2113	// non-interface field appearing in ForceSendFields will be sent to the
2114	// server regardless of whether the field is empty or not. This may be
2115	// used to include empty fields in Patch requests.
2116	ForceSendFields []string `json:"-"`
2117
2118	// NullFields is a list of field names (e.g. "Key") to include in API
2119	// requests with the JSON null value. By default, fields with empty
2120	// values are omitted from API requests. However, any field with an
2121	// empty value appearing in NullFields will be sent to the server as
2122	// null. It is an error if a field in this list has a non-empty value.
2123	// This may be used to include null fields in Patch requests.
2124	NullFields []string `json:"-"`
2125}
2126
2127func (s *GoogleCloudDialogflowV2IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) {
2128	type NoMethod GoogleCloudDialogflowV2IntentMessageSelectItemInfo
2129	raw := NoMethod(*s)
2130	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2131}
2132
2133// GoogleCloudDialogflowV2IntentMessageSimpleResponse: The simple
2134// response message containing speech or text.
2135type GoogleCloudDialogflowV2IntentMessageSimpleResponse struct {
2136	// DisplayText: Optional. The text to display.
2137	DisplayText string `json:"displayText,omitempty"`
2138
2139	// Ssml: One of text_to_speech or ssml must be provided. Structured
2140	// spoken
2141	// response to the user in the SSML format. Mutually exclusive
2142	// with
2143	// text_to_speech.
2144	Ssml string `json:"ssml,omitempty"`
2145
2146	// TextToSpeech: One of text_to_speech or ssml must be provided. The
2147	// plain text of the
2148	// speech output. Mutually exclusive with ssml.
2149	TextToSpeech string `json:"textToSpeech,omitempty"`
2150
2151	// ForceSendFields is a list of field names (e.g. "DisplayText") to
2152	// unconditionally include in API requests. By default, fields with
2153	// empty values are omitted from API requests. However, any non-pointer,
2154	// non-interface field appearing in ForceSendFields will be sent to the
2155	// server regardless of whether the field is empty or not. This may be
2156	// used to include empty fields in Patch requests.
2157	ForceSendFields []string `json:"-"`
2158
2159	// NullFields is a list of field names (e.g. "DisplayText") to include
2160	// in API requests with the JSON null value. By default, fields with
2161	// empty values are omitted from API requests. However, any field with
2162	// an empty value appearing in NullFields will be sent to the server as
2163	// null. It is an error if a field in this list has a non-empty value.
2164	// This may be used to include null fields in Patch requests.
2165	NullFields []string `json:"-"`
2166}
2167
2168func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) {
2169	type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponse
2170	raw := NoMethod(*s)
2171	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2172}
2173
2174// GoogleCloudDialogflowV2IntentMessageSimpleResponses: The collection
2175// of simple response candidates.
2176// This message in `QueryResult.fulfillment_messages`
2177// and
2178// `WebhookResponse.fulfillment_messages` should contain only
2179// one
2180// `SimpleResponse`.
2181type GoogleCloudDialogflowV2IntentMessageSimpleResponses struct {
2182	// SimpleResponses: Required. The list of simple responses.
2183	SimpleResponses []*GoogleCloudDialogflowV2IntentMessageSimpleResponse `json:"simpleResponses,omitempty"`
2184
2185	// ForceSendFields is a list of field names (e.g. "SimpleResponses") to
2186	// unconditionally include in API requests. By default, fields with
2187	// empty values are omitted from API requests. However, any non-pointer,
2188	// non-interface field appearing in ForceSendFields will be sent to the
2189	// server regardless of whether the field is empty or not. This may be
2190	// used to include empty fields in Patch requests.
2191	ForceSendFields []string `json:"-"`
2192
2193	// NullFields is a list of field names (e.g. "SimpleResponses") to
2194	// include in API requests with the JSON null value. By default, fields
2195	// with empty values are omitted from API requests. However, any field
2196	// with an empty value appearing in NullFields will be sent to the
2197	// server as null. It is an error if a field in this list has a
2198	// non-empty value. This may be used to include null fields in Patch
2199	// requests.
2200	NullFields []string `json:"-"`
2201}
2202
2203func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) {
2204	type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponses
2205	raw := NoMethod(*s)
2206	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2207}
2208
2209// GoogleCloudDialogflowV2IntentMessageSuggestion: The suggestion chip
2210// message that the user can tap to quickly post a reply
2211// to the conversation.
2212type GoogleCloudDialogflowV2IntentMessageSuggestion struct {
2213	// Title: Required. The text shown the in the suggestion chip.
2214	Title string `json:"title,omitempty"`
2215
2216	// ForceSendFields is a list of field names (e.g. "Title") to
2217	// unconditionally include in API requests. By default, fields with
2218	// empty values are omitted from API requests. However, any non-pointer,
2219	// non-interface field appearing in ForceSendFields will be sent to the
2220	// server regardless of whether the field is empty or not. This may be
2221	// used to include empty fields in Patch requests.
2222	ForceSendFields []string `json:"-"`
2223
2224	// NullFields is a list of field names (e.g. "Title") to include in API
2225	// requests with the JSON null value. By default, fields with empty
2226	// values are omitted from API requests. However, any field with an
2227	// empty value appearing in NullFields will be sent to the server as
2228	// null. It is an error if a field in this list has a non-empty value.
2229	// This may be used to include null fields in Patch requests.
2230	NullFields []string `json:"-"`
2231}
2232
2233func (s *GoogleCloudDialogflowV2IntentMessageSuggestion) MarshalJSON() ([]byte, error) {
2234	type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestion
2235	raw := NoMethod(*s)
2236	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2237}
2238
2239// GoogleCloudDialogflowV2IntentMessageSuggestions: The collection of
2240// suggestions.
2241type GoogleCloudDialogflowV2IntentMessageSuggestions struct {
2242	// Suggestions: Required. The list of suggested replies.
2243	Suggestions []*GoogleCloudDialogflowV2IntentMessageSuggestion `json:"suggestions,omitempty"`
2244
2245	// ForceSendFields is a list of field names (e.g. "Suggestions") to
2246	// unconditionally include in API requests. By default, fields with
2247	// empty values are omitted from API requests. However, any non-pointer,
2248	// non-interface field appearing in ForceSendFields will be sent to the
2249	// server regardless of whether the field is empty or not. This may be
2250	// used to include empty fields in Patch requests.
2251	ForceSendFields []string `json:"-"`
2252
2253	// NullFields is a list of field names (e.g. "Suggestions") to include
2254	// in API requests with the JSON null value. By default, fields with
2255	// empty values are omitted from API requests. However, any field with
2256	// an empty value appearing in NullFields will be sent to the server as
2257	// null. It is an error if a field in this list has a non-empty value.
2258	// This may be used to include null fields in Patch requests.
2259	NullFields []string `json:"-"`
2260}
2261
2262func (s *GoogleCloudDialogflowV2IntentMessageSuggestions) MarshalJSON() ([]byte, error) {
2263	type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestions
2264	raw := NoMethod(*s)
2265	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2266}
2267
2268// GoogleCloudDialogflowV2IntentMessageTableCard: Table card for Actions
2269// on Google.
2270type GoogleCloudDialogflowV2IntentMessageTableCard struct {
2271	// Buttons: Optional. List of buttons for the card.
2272	Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"`
2273
2274	// ColumnProperties: Optional. Display properties for the columns in
2275	// this table.
2276	ColumnProperties []*GoogleCloudDialogflowV2IntentMessageColumnProperties `json:"columnProperties,omitempty"`
2277
2278	// Image: Optional. Image which should be displayed on the card.
2279	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
2280
2281	// Rows: Optional. Rows in this table of data.
2282	Rows []*GoogleCloudDialogflowV2IntentMessageTableCardRow `json:"rows,omitempty"`
2283
2284	// Subtitle: Optional. Subtitle to the title.
2285	Subtitle string `json:"subtitle,omitempty"`
2286
2287	// Title: Required. Title of the card.
2288	Title string `json:"title,omitempty"`
2289
2290	// ForceSendFields is a list of field names (e.g. "Buttons") to
2291	// unconditionally include in API requests. By default, fields with
2292	// empty values are omitted from API requests. However, any non-pointer,
2293	// non-interface field appearing in ForceSendFields will be sent to the
2294	// server regardless of whether the field is empty or not. This may be
2295	// used to include empty fields in Patch requests.
2296	ForceSendFields []string `json:"-"`
2297
2298	// NullFields is a list of field names (e.g. "Buttons") to include in
2299	// API requests with the JSON null value. By default, fields with empty
2300	// values are omitted from API requests. However, any field with an
2301	// empty value appearing in NullFields will be sent to the server as
2302	// null. It is an error if a field in this list has a non-empty value.
2303	// This may be used to include null fields in Patch requests.
2304	NullFields []string `json:"-"`
2305}
2306
2307func (s *GoogleCloudDialogflowV2IntentMessageTableCard) MarshalJSON() ([]byte, error) {
2308	type NoMethod GoogleCloudDialogflowV2IntentMessageTableCard
2309	raw := NoMethod(*s)
2310	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2311}
2312
2313// GoogleCloudDialogflowV2IntentMessageTableCardCell: Cell of
2314// TableCardRow.
2315type GoogleCloudDialogflowV2IntentMessageTableCardCell struct {
2316	// Text: Required. Text in this cell.
2317	Text string `json:"text,omitempty"`
2318
2319	// ForceSendFields is a list of field names (e.g. "Text") to
2320	// unconditionally include in API requests. By default, fields with
2321	// empty values are omitted from API requests. However, any non-pointer,
2322	// non-interface field appearing in ForceSendFields will be sent to the
2323	// server regardless of whether the field is empty or not. This may be
2324	// used to include empty fields in Patch requests.
2325	ForceSendFields []string `json:"-"`
2326
2327	// NullFields is a list of field names (e.g. "Text") to include in API
2328	// requests with the JSON null value. By default, fields with empty
2329	// values are omitted from API requests. However, any field with an
2330	// empty value appearing in NullFields will be sent to the server as
2331	// null. It is an error if a field in this list has a non-empty value.
2332	// This may be used to include null fields in Patch requests.
2333	NullFields []string `json:"-"`
2334}
2335
2336func (s *GoogleCloudDialogflowV2IntentMessageTableCardCell) MarshalJSON() ([]byte, error) {
2337	type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardCell
2338	raw := NoMethod(*s)
2339	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2340}
2341
2342// GoogleCloudDialogflowV2IntentMessageTableCardRow: Row of TableCard.
2343type GoogleCloudDialogflowV2IntentMessageTableCardRow struct {
2344	// Cells: Optional. List of cells that make up this row.
2345	Cells []*GoogleCloudDialogflowV2IntentMessageTableCardCell `json:"cells,omitempty"`
2346
2347	// DividerAfter: Optional. Whether to add a visual divider after this
2348	// row.
2349	DividerAfter bool `json:"dividerAfter,omitempty"`
2350
2351	// ForceSendFields is a list of field names (e.g. "Cells") 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. "Cells") to include in API
2360	// requests with the JSON null value. By default, fields with empty
2361	// values are omitted from API requests. However, any field with an
2362	// 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 *GoogleCloudDialogflowV2IntentMessageTableCardRow) MarshalJSON() ([]byte, error) {
2369	type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardRow
2370	raw := NoMethod(*s)
2371	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2372}
2373
2374// GoogleCloudDialogflowV2IntentMessageText: The text response message.
2375type GoogleCloudDialogflowV2IntentMessageText struct {
2376	// Text: Optional. The collection of the agent's responses.
2377	Text []string `json:"text,omitempty"`
2378
2379	// ForceSendFields is a list of field names (e.g. "Text") to
2380	// unconditionally include in API requests. By default, fields with
2381	// empty values are omitted from API requests. However, any non-pointer,
2382	// non-interface field appearing in ForceSendFields will be sent to the
2383	// server regardless of whether the field is empty or not. This may be
2384	// used to include empty fields in Patch requests.
2385	ForceSendFields []string `json:"-"`
2386
2387	// NullFields is a list of field names (e.g. "Text") to include in API
2388	// requests with the JSON null value. By default, fields with empty
2389	// values are omitted from API requests. However, any field with an
2390	// empty value appearing in NullFields will be sent to the server as
2391	// null. It is an error if a field in this list has a non-empty value.
2392	// This may be used to include null fields in Patch requests.
2393	NullFields []string `json:"-"`
2394}
2395
2396func (s *GoogleCloudDialogflowV2IntentMessageText) MarshalJSON() ([]byte, error) {
2397	type NoMethod GoogleCloudDialogflowV2IntentMessageText
2398	raw := NoMethod(*s)
2399	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2400}
2401
2402// GoogleCloudDialogflowV2IntentParameter: Represents intent parameters.
2403type GoogleCloudDialogflowV2IntentParameter struct {
2404	// DefaultValue: Optional. The default value to use when the `value`
2405	// yields an empty
2406	// result.
2407	// Default values can be extracted from contexts by using the
2408	// following
2409	// syntax: `#context_name.parameter_name`.
2410	DefaultValue string `json:"defaultValue,omitempty"`
2411
2412	// DisplayName: Required. The name of the parameter.
2413	DisplayName string `json:"displayName,omitempty"`
2414
2415	// EntityTypeDisplayName: Optional. The name of the entity type,
2416	// prefixed with `@`, that
2417	// describes values of the parameter. If the parameter is
2418	// required, this must be provided.
2419	EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"`
2420
2421	// IsList: Optional. Indicates whether the parameter represents a list
2422	// of values.
2423	IsList bool `json:"isList,omitempty"`
2424
2425	// Mandatory: Optional. Indicates whether the parameter is required.
2426	// That is,
2427	// whether the intent cannot be completed without collecting the
2428	// parameter
2429	// value.
2430	Mandatory bool `json:"mandatory,omitempty"`
2431
2432	// Name: The unique identifier of this parameter.
2433	Name string `json:"name,omitempty"`
2434
2435	// Prompts: Optional. The collection of prompts that the agent can
2436	// present to the
2437	// user in order to collect a value for the parameter.
2438	Prompts []string `json:"prompts,omitempty"`
2439
2440	// Value: Optional. The definition of the parameter value. It can be:
2441	// - a constant string,
2442	// - a parameter value defined as `$parameter_name`,
2443	// - an original parameter value defined as
2444	// `$parameter_name.original`,
2445	// - a parameter value from some context defined as
2446	//   `#context_name.parameter_name`.
2447	Value string `json:"value,omitempty"`
2448
2449	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
2450	// unconditionally include in API requests. By default, fields with
2451	// empty values are omitted from API requests. However, any non-pointer,
2452	// non-interface field appearing in ForceSendFields will be sent to the
2453	// server regardless of whether the field is empty or not. This may be
2454	// used to include empty fields in Patch requests.
2455	ForceSendFields []string `json:"-"`
2456
2457	// NullFields is a list of field names (e.g. "DefaultValue") to include
2458	// in API requests with the JSON null value. By default, fields with
2459	// empty values are omitted from API requests. However, any field with
2460	// an empty value appearing in NullFields will be sent to the server as
2461	// null. It is an error if a field in this list has a non-empty value.
2462	// This may be used to include null fields in Patch requests.
2463	NullFields []string `json:"-"`
2464}
2465
2466func (s *GoogleCloudDialogflowV2IntentParameter) MarshalJSON() ([]byte, error) {
2467	type NoMethod GoogleCloudDialogflowV2IntentParameter
2468	raw := NoMethod(*s)
2469	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2470}
2471
2472// GoogleCloudDialogflowV2IntentTrainingPhrase: Represents an example
2473// that the agent is trained on.
2474type GoogleCloudDialogflowV2IntentTrainingPhrase struct {
2475	// Name: Output only. The unique identifier of this training phrase.
2476	Name string `json:"name,omitempty"`
2477
2478	// Parts: Required. The ordered list of training phrase parts.
2479	// The parts are concatenated in order to form the training
2480	// phrase.
2481	//
2482	// Note: The API does not automatically annotate training phrases like
2483	// the
2484	// Dialogflow Console does.
2485	//
2486	// Note: Do not forget to include whitespace at part boundaries,
2487	// so the training phrase is well formatted when the parts are
2488	// concatenated.
2489	//
2490	// If the training phrase does not need to be annotated with
2491	// parameters,
2492	// you just need a single part with only the Part.text field set.
2493	//
2494	// If you want to annotate the training phrase, you must create
2495	// multiple
2496	// parts, where the fields of each part are populated in one of two
2497	// ways:
2498	//
2499	// -   `Part.text` is set to a part of the phrase that has no
2500	// parameters.
2501	// -   `Part.text` is set to a part of the phrase that you want to
2502	// annotate,
2503	//     and the `entity_type`, `alias`, and `user_defined` fields are
2504	// all
2505	//     set.
2506	Parts []*GoogleCloudDialogflowV2IntentTrainingPhrasePart `json:"parts,omitempty"`
2507
2508	// TimesAddedCount: Optional. Indicates how many times this example was
2509	// added to
2510	// the intent. Each time a developer adds an existing sample by editing
2511	// an
2512	// intent or training, this counter is increased.
2513	TimesAddedCount int64 `json:"timesAddedCount,omitempty"`
2514
2515	// Type: Required. The type of the training phrase.
2516	//
2517	// Possible values:
2518	//   "TYPE_UNSPECIFIED" - Not specified. This value should never be
2519	// used.
2520	//   "EXAMPLE" - Examples do not contain @-prefixed entity type names,
2521	// but example parts
2522	// can be annotated with entity types.
2523	//   "TEMPLATE" - Templates are not annotated with entity types, but
2524	// they can contain
2525	// @-prefixed entity type names as substrings.
2526	// Template mode has been deprecated. Example mode is the only
2527	// supported
2528	// way to create new training phrases. If you have existing
2529	// training
2530	// phrases that you've created in template mode, those will continue
2531	// to
2532	// work.
2533	Type string `json:"type,omitempty"`
2534
2535	// ForceSendFields is a list of field names (e.g. "Name") to
2536	// unconditionally include in API requests. By default, fields with
2537	// empty values are omitted from API requests. However, any non-pointer,
2538	// non-interface field appearing in ForceSendFields will be sent to the
2539	// server regardless of whether the field is empty or not. This may be
2540	// used to include empty fields in Patch requests.
2541	ForceSendFields []string `json:"-"`
2542
2543	// NullFields is a list of field names (e.g. "Name") to include in API
2544	// requests with the JSON null value. By default, fields with empty
2545	// values are omitted from API requests. However, any field with an
2546	// empty value appearing in NullFields will be sent to the server as
2547	// null. It is an error if a field in this list has a non-empty value.
2548	// This may be used to include null fields in Patch requests.
2549	NullFields []string `json:"-"`
2550}
2551
2552func (s *GoogleCloudDialogflowV2IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
2553	type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrase
2554	raw := NoMethod(*s)
2555	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2556}
2557
2558// GoogleCloudDialogflowV2IntentTrainingPhrasePart: Represents a part of
2559// a training phrase.
2560type GoogleCloudDialogflowV2IntentTrainingPhrasePart struct {
2561	// Alias: Optional. The parameter name for the value extracted from
2562	// the
2563	// annotated part of the example.
2564	// This field is required for annotated parts of the training phrase.
2565	Alias string `json:"alias,omitempty"`
2566
2567	// EntityType: Optional. The entity type name prefixed with `@`.
2568	// This field is required for annotated parts of the training phrase.
2569	EntityType string `json:"entityType,omitempty"`
2570
2571	// Text: Required. The text for this part.
2572	Text string `json:"text,omitempty"`
2573
2574	// UserDefined: Optional. Indicates whether the text was manually
2575	// annotated.
2576	// This field is set to true when the Dialogflow Console is used
2577	// to
2578	// manually annotate the part. When creating an annotated part with
2579	// the
2580	// API, you must set this to true.
2581	UserDefined bool `json:"userDefined,omitempty"`
2582
2583	// ForceSendFields is a list of field names (e.g. "Alias") to
2584	// unconditionally include in API requests. By default, fields with
2585	// empty values are omitted from API requests. However, any non-pointer,
2586	// non-interface field appearing in ForceSendFields will be sent to the
2587	// server regardless of whether the field is empty or not. This may be
2588	// used to include empty fields in Patch requests.
2589	ForceSendFields []string `json:"-"`
2590
2591	// NullFields is a list of field names (e.g. "Alias") to include in API
2592	// requests with the JSON null value. By default, fields with empty
2593	// values are omitted from API requests. However, any field with an
2594	// empty value appearing in NullFields will be sent to the server as
2595	// null. It is an error if a field in this list has a non-empty value.
2596	// This may be used to include null fields in Patch requests.
2597	NullFields []string `json:"-"`
2598}
2599
2600func (s *GoogleCloudDialogflowV2IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
2601	type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrasePart
2602	raw := NoMethod(*s)
2603	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2604}
2605
2606// GoogleCloudDialogflowV2Message: Represents a message posted into a
2607// conversation.
2608type GoogleCloudDialogflowV2Message struct {
2609	// Content: Required. The message content.
2610	Content string `json:"content,omitempty"`
2611
2612	// CreateTime: Output only. The time when the message was created.
2613	CreateTime string `json:"createTime,omitempty"`
2614
2615	// LanguageCode: Optional. The message language.
2616	// This should be a
2617	// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
2618	// language tag. Example: "en-US".
2619	LanguageCode string `json:"languageCode,omitempty"`
2620
2621	// MessageAnnotation: Output only. The annotation for the message.
2622	MessageAnnotation *GoogleCloudDialogflowV2MessageAnnotation `json:"messageAnnotation,omitempty"`
2623
2624	// Name: The unique identifier of the message.
2625	// Format: `projects/<Project
2626	// ID>/conversations/<Conversation
2627	// ID>/messages/<Message ID>`.
2628	Name string `json:"name,omitempty"`
2629
2630	// Participant: Output only. The participant that sends this message.
2631	Participant string `json:"participant,omitempty"`
2632
2633	// ParticipantRole: Output only. The role of the participant.
2634	//
2635	// Possible values:
2636	//   "ROLE_UNSPECIFIED" - Participant role not set.
2637	//   "HUMAN_AGENT" - Participant is a human agent.
2638	//   "AUTOMATED_AGENT" - Participant is an automated agent, such as a
2639	// Dialogflow agent.
2640	//   "END_USER" - Participant is an end user that has called or chatted
2641	// with
2642	// Dialogflow services.
2643	ParticipantRole string `json:"participantRole,omitempty"`
2644
2645	// ForceSendFields is a list of field names (e.g. "Content") to
2646	// unconditionally include in API requests. By default, fields with
2647	// empty values are omitted from API requests. However, any non-pointer,
2648	// non-interface field appearing in ForceSendFields will be sent to the
2649	// server regardless of whether the field is empty or not. This may be
2650	// used to include empty fields in Patch requests.
2651	ForceSendFields []string `json:"-"`
2652
2653	// NullFields is a list of field names (e.g. "Content") to include in
2654	// API requests with the JSON null value. By default, fields with empty
2655	// values are omitted from API requests. However, any field with an
2656	// empty value appearing in NullFields will be sent to the server as
2657	// null. It is an error if a field in this list has a non-empty value.
2658	// This may be used to include null fields in Patch requests.
2659	NullFields []string `json:"-"`
2660}
2661
2662func (s *GoogleCloudDialogflowV2Message) MarshalJSON() ([]byte, error) {
2663	type NoMethod GoogleCloudDialogflowV2Message
2664	raw := NoMethod(*s)
2665	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2666}
2667
2668// GoogleCloudDialogflowV2MessageAnnotation: Represents the result of
2669// annotation for the message.
2670type GoogleCloudDialogflowV2MessageAnnotation struct {
2671	// ContainEntities: Indicates whether the text message contains
2672	// entities.
2673	ContainEntities bool `json:"containEntities,omitempty"`
2674
2675	// Parts: The collection of annotated message parts ordered by
2676	// their
2677	// position in the message. You can recover the annotated message
2678	// by
2679	// concatenating [AnnotatedMessagePart.text].
2680	Parts []*GoogleCloudDialogflowV2AnnotatedMessagePart `json:"parts,omitempty"`
2681
2682	// ForceSendFields is a list of field names (e.g. "ContainEntities") to
2683	// unconditionally include in API requests. By default, fields with
2684	// empty values are omitted from API requests. However, any non-pointer,
2685	// non-interface field appearing in ForceSendFields will be sent to the
2686	// server regardless of whether the field is empty or not. This may be
2687	// used to include empty fields in Patch requests.
2688	ForceSendFields []string `json:"-"`
2689
2690	// NullFields is a list of field names (e.g. "ContainEntities") to
2691	// include in API requests with the JSON null value. By default, fields
2692	// with empty values are omitted from API requests. However, any field
2693	// with an empty value appearing in NullFields will be sent to the
2694	// server as null. It is an error if a field in this list has a
2695	// non-empty value. This may be used to include null fields in Patch
2696	// requests.
2697	NullFields []string `json:"-"`
2698}
2699
2700func (s *GoogleCloudDialogflowV2MessageAnnotation) MarshalJSON() ([]byte, error) {
2701	type NoMethod GoogleCloudDialogflowV2MessageAnnotation
2702	raw := NoMethod(*s)
2703	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2704}
2705
2706// GoogleCloudDialogflowV2OriginalDetectIntentRequest: Represents the
2707// contents of the original request that was passed to
2708// the `[Streaming]DetectIntent` call.
2709type GoogleCloudDialogflowV2OriginalDetectIntentRequest struct {
2710	// Payload: Optional. This field is set to the value of the
2711	// `QueryParameters.payload`
2712	// field passed in the request. Some integrations that query a
2713	// Dialogflow
2714	// agent may provide additional information in the payload.
2715	//
2716	// In particular for the Telephony Gateway this field has the
2717	// form:
2718	// <pre>{
2719	//  "telephony": {
2720	//    "caller_id": "+18558363987"
2721	//  }
2722	// }</pre>
2723	// Note: The caller ID field (`caller_id`) will be redacted for
2724	// Standard
2725	// Edition agents and populated with the caller ID in
2726	// [E.164
2727	// format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition
2728	// agents.
2729	Payload googleapi.RawMessage `json:"payload,omitempty"`
2730
2731	// Source: The source of this request, e.g., `google`, `facebook`,
2732	// `slack`. It is set
2733	// by Dialogflow-owned servers.
2734	Source string `json:"source,omitempty"`
2735
2736	// Version: Optional. The version of the protocol used for this
2737	// request.
2738	// This field is AoG-specific.
2739	Version string `json:"version,omitempty"`
2740
2741	// ForceSendFields is a list of field names (e.g. "Payload") to
2742	// unconditionally include in API requests. By default, fields with
2743	// empty values are omitted from API requests. However, any non-pointer,
2744	// non-interface field appearing in ForceSendFields will be sent to the
2745	// server regardless of whether the field is empty or not. This may be
2746	// used to include empty fields in Patch requests.
2747	ForceSendFields []string `json:"-"`
2748
2749	// NullFields is a list of field names (e.g. "Payload") to include in
2750	// API requests with the JSON null value. By default, fields with empty
2751	// values are omitted from API requests. However, any field with an
2752	// empty value appearing in NullFields will be sent to the server as
2753	// null. It is an error if a field in this list has a non-empty value.
2754	// This may be used to include null fields in Patch requests.
2755	NullFields []string `json:"-"`
2756}
2757
2758func (s *GoogleCloudDialogflowV2OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) {
2759	type NoMethod GoogleCloudDialogflowV2OriginalDetectIntentRequest
2760	raw := NoMethod(*s)
2761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2762}
2763
2764// GoogleCloudDialogflowV2QueryResult: Represents the result of
2765// conversational query or event processing.
2766type GoogleCloudDialogflowV2QueryResult struct {
2767	// Action: The action name from the matched intent.
2768	Action string `json:"action,omitempty"`
2769
2770	// AllRequiredParamsPresent: This field is set to:
2771	//
2772	// - `false` if the matched intent has required parameters and not all
2773	// of
2774	//    the required parameter values have been collected.
2775	// - `true` if all required parameter values have been collected, or if
2776	// the
2777	//    matched intent doesn't contain any required parameters.
2778	AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"`
2779
2780	// DiagnosticInfo: The free-form diagnostic info. For example, this
2781	// field could contain
2782	// webhook call latency. The string keys of the Struct's fields map can
2783	// change
2784	// without notice.
2785	DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
2786
2787	// FulfillmentMessages: The collection of rich messages to present to
2788	// the user.
2789	FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"`
2790
2791	// FulfillmentText: The text to be pronounced to the user or shown on
2792	// the screen.
2793	// Note: This is a legacy field, `fulfillment_messages` should be
2794	// preferred.
2795	FulfillmentText string `json:"fulfillmentText,omitempty"`
2796
2797	// Intent: The intent that matched the conversational query. Some,
2798	// not
2799	// all fields are filled in this message, including but not limited
2800	// to:
2801	// `name`, `display_name`, `end_interaction` and `is_fallback`.
2802	Intent *GoogleCloudDialogflowV2Intent `json:"intent,omitempty"`
2803
2804	// IntentDetectionConfidence: The intent detection confidence. Values
2805	// range from 0.0
2806	// (completely uncertain) to 1.0 (completely certain).
2807	// This value is for informational purpose only and is only used to
2808	// help match the best intent within the classification threshold.
2809	// This value may change for the same end-user expression at any time
2810	// due to a
2811	// model retraining or change in implementation.
2812	// If there are `multiple knowledge_answers` messages, this value is set
2813	// to
2814	// the greatest `knowledgeAnswers.match_confidence` value in the list.
2815	IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"`
2816
2817	// LanguageCode: The language that was triggered during intent
2818	// detection.
2819	// See
2820	// [Language
2821	// Support](https://cloud.google.com/dialogflow/docs/reference/
2822	// language)
2823	// for a list of the currently supported language codes.
2824	LanguageCode string `json:"languageCode,omitempty"`
2825
2826	// OutputContexts: The collection of output contexts. If
2827	// applicable,
2828	// `output_contexts.parameters` contains entries with name
2829	// `<parameter name>.original` containing the original parameter
2830	// values
2831	// before the query.
2832	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
2833
2834	// Parameters: The collection of extracted parameters.
2835	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
2836
2837	// QueryText: The original conversational query text:
2838	//
2839	// - If natural language text was provided as input, `query_text`
2840	// contains
2841	//   a copy of the input.
2842	// - If natural language speech audio was provided as input,
2843	// `query_text`
2844	//   contains the speech recognition result. If speech recognizer
2845	// produced
2846	//   multiple alternatives, a particular one is picked.
2847	// - If automatic spell correction is enabled, `query_text` will contain
2848	// the
2849	//   corrected user input.
2850	QueryText string `json:"queryText,omitempty"`
2851
2852	// SentimentAnalysisResult: The sentiment analysis result, which depends
2853	// on the
2854	// `sentiment_analysis_request_config` specified in the request.
2855	SentimentAnalysisResult *GoogleCloudDialogflowV2SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"`
2856
2857	// SpeechRecognitionConfidence: The Speech recognition confidence
2858	// between 0.0 and 1.0. A higher number
2859	// indicates an estimated greater likelihood that the recognized words
2860	// are
2861	// correct. The default of 0.0 is a sentinel value indicating that
2862	// confidence
2863	// was not set.
2864	//
2865	// This field is not guaranteed to be accurate or set. In particular
2866	// this
2867	// field isn't set for StreamingDetectIntent since the streaming
2868	// endpoint has
2869	// separate confidence estimates per portion of the audio
2870	// in
2871	// StreamingRecognitionResult.
2872	SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"`
2873
2874	// WebhookPayload: If the query was fulfilled by a webhook call, this
2875	// field is set to the
2876	// value of the `payload` field returned in the webhook response.
2877	WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"`
2878
2879	// WebhookSource: If the query was fulfilled by a webhook call, this
2880	// field is set to the
2881	// value of the `source` field returned in the webhook response.
2882	WebhookSource string `json:"webhookSource,omitempty"`
2883
2884	// ForceSendFields is a list of field names (e.g. "Action") to
2885	// unconditionally include in API requests. By default, fields with
2886	// empty values are omitted from API requests. However, any non-pointer,
2887	// non-interface field appearing in ForceSendFields will be sent to the
2888	// server regardless of whether the field is empty or not. This may be
2889	// used to include empty fields in Patch requests.
2890	ForceSendFields []string `json:"-"`
2891
2892	// NullFields is a list of field names (e.g. "Action") to include in API
2893	// requests with the JSON null value. By default, fields with empty
2894	// values are omitted from API requests. However, any field with an
2895	// empty value appearing in NullFields will be sent to the server as
2896	// null. It is an error if a field in this list has a non-empty value.
2897	// This may be used to include null fields in Patch requests.
2898	NullFields []string `json:"-"`
2899}
2900
2901func (s *GoogleCloudDialogflowV2QueryResult) MarshalJSON() ([]byte, error) {
2902	type NoMethod GoogleCloudDialogflowV2QueryResult
2903	raw := NoMethod(*s)
2904	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2905}
2906
2907func (s *GoogleCloudDialogflowV2QueryResult) UnmarshalJSON(data []byte) error {
2908	type NoMethod GoogleCloudDialogflowV2QueryResult
2909	var s1 struct {
2910		IntentDetectionConfidence   gensupport.JSONFloat64 `json:"intentDetectionConfidence"`
2911		SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"`
2912		*NoMethod
2913	}
2914	s1.NoMethod = (*NoMethod)(s)
2915	if err := json.Unmarshal(data, &s1); err != nil {
2916		return err
2917	}
2918	s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence)
2919	s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence)
2920	return nil
2921}
2922
2923// GoogleCloudDialogflowV2Sentiment: The sentiment, such as
2924// positive/negative feeling or association, for a unit
2925// of analysis, such as the query text.
2926type GoogleCloudDialogflowV2Sentiment struct {
2927	// Magnitude: A non-negative number in the [0, +inf) range, which
2928	// represents the absolute
2929	// magnitude of sentiment, regardless of score (positive or negative).
2930	Magnitude float64 `json:"magnitude,omitempty"`
2931
2932	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0
2933	// (positive
2934	// sentiment).
2935	Score float64 `json:"score,omitempty"`
2936
2937	// ForceSendFields is a list of field names (e.g. "Magnitude") to
2938	// unconditionally include in API requests. By default, fields with
2939	// empty values are omitted from API requests. However, any non-pointer,
2940	// non-interface field appearing in ForceSendFields will be sent to the
2941	// server regardless of whether the field is empty or not. This may be
2942	// used to include empty fields in Patch requests.
2943	ForceSendFields []string `json:"-"`
2944
2945	// NullFields is a list of field names (e.g. "Magnitude") to include in
2946	// API requests with the JSON null value. By default, fields with empty
2947	// values are omitted from API requests. However, any field with an
2948	// empty value appearing in NullFields will be sent to the server as
2949	// null. It is an error if a field in this list has a non-empty value.
2950	// This may be used to include null fields in Patch requests.
2951	NullFields []string `json:"-"`
2952}
2953
2954func (s *GoogleCloudDialogflowV2Sentiment) MarshalJSON() ([]byte, error) {
2955	type NoMethod GoogleCloudDialogflowV2Sentiment
2956	raw := NoMethod(*s)
2957	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2958}
2959
2960func (s *GoogleCloudDialogflowV2Sentiment) UnmarshalJSON(data []byte) error {
2961	type NoMethod GoogleCloudDialogflowV2Sentiment
2962	var s1 struct {
2963		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
2964		Score     gensupport.JSONFloat64 `json:"score"`
2965		*NoMethod
2966	}
2967	s1.NoMethod = (*NoMethod)(s)
2968	if err := json.Unmarshal(data, &s1); err != nil {
2969		return err
2970	}
2971	s.Magnitude = float64(s1.Magnitude)
2972	s.Score = float64(s1.Score)
2973	return nil
2974}
2975
2976// GoogleCloudDialogflowV2SentimentAnalysisResult: The result of
2977// sentiment analysis as configured
2978// by
2979// `sentiment_analysis_request_config`.
2980type GoogleCloudDialogflowV2SentimentAnalysisResult struct {
2981	// QueryTextSentiment: The sentiment analysis result for `query_text`.
2982	QueryTextSentiment *GoogleCloudDialogflowV2Sentiment `json:"queryTextSentiment,omitempty"`
2983
2984	// ForceSendFields is a list of field names (e.g. "QueryTextSentiment")
2985	// to unconditionally include in API requests. By default, fields with
2986	// empty values are omitted from API requests. However, any non-pointer,
2987	// non-interface field appearing in ForceSendFields will be sent to the
2988	// server regardless of whether the field is empty or not. This may be
2989	// used to include empty fields in Patch requests.
2990	ForceSendFields []string `json:"-"`
2991
2992	// NullFields is a list of field names (e.g. "QueryTextSentiment") to
2993	// include in API requests with the JSON null value. By default, fields
2994	// with empty values are omitted from API requests. However, any field
2995	// with an empty value appearing in NullFields will be sent to the
2996	// server as null. It is an error if a field in this list has a
2997	// non-empty value. This may be used to include null fields in Patch
2998	// requests.
2999	NullFields []string `json:"-"`
3000}
3001
3002func (s *GoogleCloudDialogflowV2SentimentAnalysisResult) MarshalJSON() ([]byte, error) {
3003	type NoMethod GoogleCloudDialogflowV2SentimentAnalysisResult
3004	raw := NoMethod(*s)
3005	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3006}
3007
3008// GoogleCloudDialogflowV2SessionEntityType: Represents a session entity
3009// type.
3010//
3011// Extends or replaces a developer entity type at the user session level
3012// (we
3013// refer to the entity types defined at the agent level as "developer
3014// entity
3015// types").
3016//
3017// Note: session entity types apply to all queries, regardless of the
3018// language.
3019type GoogleCloudDialogflowV2SessionEntityType struct {
3020	// Entities: Required. The collection of entities associated with this
3021	// session entity
3022	// type.
3023	Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"`
3024
3025	// EntityOverrideMode: Required. Indicates whether the additional data
3026	// should override or
3027	// supplement the developer entity type definition.
3028	//
3029	// Possible values:
3030	//   "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value
3031	// should be never used.
3032	//   "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session
3033	// entities overrides the collection of entities
3034	// in the corresponding developer entity type.
3035	//   "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session
3036	// entities extends the collection of entities in
3037	// the corresponding developer entity type.
3038	//
3039	// Note: Even in this override mode calls to
3040	// `ListSessionEntityTypes`,
3041	// `GetSessionEntityType`, `CreateSessionEntityType`
3042	// and
3043	// `UpdateSessionEntityType` only return the additional entities added
3044	// in
3045	// this session entity type. If you want to get the supplemented
3046	// list,
3047	// please call EntityTypes.GetEntityType on the developer entity
3048	// type
3049	// and merge.
3050	EntityOverrideMode string `json:"entityOverrideMode,omitempty"`
3051
3052	// Name: Required. The unique identifier of this session entity type.
3053	// Format:
3054	// `projects/<Project ID>/agent/sessions/<Session
3055	// ID>/entityTypes/<Entity Type
3056	// Display Name>`.
3057	//
3058	// `<Entity Type Display Name>` must be the display name of an existing
3059	// entity
3060	// type in the same agent that will be overridden or supplemented.
3061	Name string `json:"name,omitempty"`
3062
3063	// ForceSendFields is a list of field names (e.g. "Entities") to
3064	// unconditionally include in API requests. By default, fields with
3065	// empty values are omitted from API requests. However, any non-pointer,
3066	// non-interface field appearing in ForceSendFields will be sent to the
3067	// server regardless of whether the field is empty or not. This may be
3068	// used to include empty fields in Patch requests.
3069	ForceSendFields []string `json:"-"`
3070
3071	// NullFields is a list of field names (e.g. "Entities") to include in
3072	// API requests with the JSON null value. By default, fields with empty
3073	// values are omitted from API requests. However, any field with an
3074	// empty value appearing in NullFields will be sent to the server as
3075	// null. It is an error if a field in this list has a non-empty value.
3076	// This may be used to include null fields in Patch requests.
3077	NullFields []string `json:"-"`
3078}
3079
3080func (s *GoogleCloudDialogflowV2SessionEntityType) MarshalJSON() ([]byte, error) {
3081	type NoMethod GoogleCloudDialogflowV2SessionEntityType
3082	raw := NoMethod(*s)
3083	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3084}
3085
3086// GoogleCloudDialogflowV2WebhookRequest: The request message for a
3087// webhook call.
3088type GoogleCloudDialogflowV2WebhookRequest struct {
3089	// OriginalDetectIntentRequest: Optional. The contents of the original
3090	// request that was passed to
3091	// `[Streaming]DetectIntent` call.
3092	OriginalDetectIntentRequest *GoogleCloudDialogflowV2OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"`
3093
3094	// QueryResult: The result of the conversational query or event
3095	// processing. Contains the
3096	// same value as `[Streaming]DetectIntentResponse.query_result`.
3097	QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"`
3098
3099	// ResponseId: The unique identifier of the response. Contains the same
3100	// value as
3101	// `[Streaming]DetectIntentResponse.response_id`.
3102	ResponseId string `json:"responseId,omitempty"`
3103
3104	// Session: The unique identifier of detectIntent request session.
3105	// Can be used to identify end-user inside webhook
3106	// implementation.
3107	// Format: `projects/<Project ID>/agent/sessions/<Session ID>`,
3108	// or
3109	// `projects/<Project ID>/agent/environments/<Environment
3110	// ID>/users/<User
3111	// ID>/sessions/<Session ID>`.
3112	Session string `json:"session,omitempty"`
3113
3114	// ForceSendFields is a list of field names (e.g.
3115	// "OriginalDetectIntentRequest") to unconditionally include in API
3116	// requests. By default, fields with empty values are omitted from API
3117	// requests. However, any non-pointer, non-interface field appearing in
3118	// ForceSendFields will be sent to the server regardless of whether the
3119	// field is empty or not. This may be used to include empty fields in
3120	// Patch requests.
3121	ForceSendFields []string `json:"-"`
3122
3123	// NullFields is a list of field names (e.g.
3124	// "OriginalDetectIntentRequest") to include in API requests with the
3125	// JSON null value. By default, fields with empty values are omitted
3126	// from API requests. However, any field with an empty value appearing
3127	// in NullFields will be sent to the server as null. It is an error if a
3128	// field in this list has a non-empty value. This may be used to include
3129	// null fields in Patch requests.
3130	NullFields []string `json:"-"`
3131}
3132
3133func (s *GoogleCloudDialogflowV2WebhookRequest) MarshalJSON() ([]byte, error) {
3134	type NoMethod GoogleCloudDialogflowV2WebhookRequest
3135	raw := NoMethod(*s)
3136	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3137}
3138
3139// GoogleCloudDialogflowV2WebhookResponse: The response message for a
3140// webhook call.
3141type GoogleCloudDialogflowV2WebhookResponse struct {
3142	// FollowupEventInput: Optional. Makes the platform immediately invoke
3143	// another `DetectIntent` call
3144	// internally with the specified event as input.
3145	// When this field is set, Dialogflow ignores the
3146	// `fulfillment_text`,
3147	// `fulfillment_messages`, and `payload` fields.
3148	FollowupEventInput *GoogleCloudDialogflowV2EventInput `json:"followupEventInput,omitempty"`
3149
3150	// FulfillmentMessages: Optional. The collection of rich messages to
3151	// present to the user. This
3152	// value is passed directly to `QueryResult.fulfillment_messages`.
3153	FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"`
3154
3155	// FulfillmentText: Optional. The text to be shown on the screen. This
3156	// value is passed directly
3157	// to `QueryResult.fulfillment_text`.
3158	FulfillmentText string `json:"fulfillmentText,omitempty"`
3159
3160	// OutputContexts: Optional. The collection of output contexts. This
3161	// value is passed directly
3162	// to `QueryResult.output_contexts`.
3163	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
3164
3165	// Payload: Optional. This value is passed directly to
3166	// `QueryResult.webhook_payload`.
3167	// See the related `fulfillment_messages[i].payload field`, which may be
3168	// used
3169	// as an alternative to this field.
3170	//
3171	// This field can be used for Actions on Google responses.
3172	// It should have a structure similar to the JSON message shown here.
3173	// For more
3174	// information, see
3175	// [Actions on Google
3176	// Webhook
3177	// Format](https://developers.google.com/actions/dialogflow/webho
3178	// ok)
3179	// <pre>{
3180	//   "google": {
3181	//     "expectUserResponse": true,
3182	//     "richResponse": {
3183	//       "items": [
3184	//         {
3185	//           "simpleResponse": {
3186	//             "textToSpeech": "this is a simple response"
3187	//           }
3188	//         }
3189	//       ]
3190	//     }
3191	//   }
3192	// }</pre>
3193	Payload googleapi.RawMessage `json:"payload,omitempty"`
3194
3195	// SessionEntityTypes: Optional. Additional session entity types to
3196	// replace or extend developer
3197	// entity types with. The entity synonyms apply to all languages and
3198	// persist
3199	// for the session of this query. Setting the session entity types
3200	// inside
3201	// webhook overwrites the session entity types that have been set
3202	// through
3203	// `DetectIntentRequest.query_params.session_entity_types`.
3204	SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"`
3205
3206	// Source: Optional. This value is passed directly to
3207	// `QueryResult.webhook_source`.
3208	Source string `json:"source,omitempty"`
3209
3210	// ForceSendFields is a list of field names (e.g. "FollowupEventInput")
3211	// to unconditionally include in API requests. By default, fields with
3212	// empty values are omitted from API requests. However, any non-pointer,
3213	// non-interface field appearing in ForceSendFields will be sent to the
3214	// server regardless of whether the field is empty or not. This may be
3215	// used to include empty fields in Patch requests.
3216	ForceSendFields []string `json:"-"`
3217
3218	// NullFields is a list of field names (e.g. "FollowupEventInput") to
3219	// include in API requests with the JSON null value. By default, fields
3220	// with empty values are omitted from API requests. However, any field
3221	// with an empty value appearing in NullFields will be sent to the
3222	// server as null. It is an error if a field in this list has a
3223	// non-empty value. This may be used to include null fields in Patch
3224	// requests.
3225	NullFields []string `json:"-"`
3226}
3227
3228func (s *GoogleCloudDialogflowV2WebhookResponse) MarshalJSON() ([]byte, error) {
3229	type NoMethod GoogleCloudDialogflowV2WebhookResponse
3230	raw := NoMethod(*s)
3231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3232}
3233
3234// GoogleCloudDialogflowV2beta1Agent: Represents a conversational agent.
3235type GoogleCloudDialogflowV2beta1Agent struct {
3236	// ApiVersion: Optional. API version displayed in Dialogflow console. If
3237	// not specified,
3238	// V2 API is assumed. Clients are free to query different service
3239	// endpoints
3240	// for different API versions. However, bots connectors and webhook
3241	// calls will
3242	// follow the specified API version.
3243	//
3244	// Possible values:
3245	//   "API_VERSION_UNSPECIFIED" - Not specified.
3246	//   "API_VERSION_V1" - Legacy V1 API.
3247	//   "API_VERSION_V2" - V2 API.
3248	//   "API_VERSION_V2_BETA_1" - V2beta1 API.
3249	ApiVersion string `json:"apiVersion,omitempty"`
3250
3251	// AvatarUri: Optional. The URI of the agent's avatar.
3252	// Avatars are used throughout the Dialogflow console and in the
3253	// self-hosted
3254	// [Web
3255	// Demo](https://cloud.google.com/dialogflow/docs/integr
3256	// ations/web-demo)
3257	// integration.
3258	AvatarUri string `json:"avatarUri,omitempty"`
3259
3260	// ClassificationThreshold: Optional. To filter out false positive
3261	// results and still get variety in
3262	// matched natural language inputs for your agent, you can tune the
3263	// machine
3264	// learning classification threshold. If the returned score value is
3265	// less than
3266	// the threshold value, then a fallback intent will be triggered or, if
3267	// there
3268	// are no fallback intents defined, no intent will be triggered. The
3269	// score
3270	// values range from 0.0 (completely uncertain) to 1.0 (completely
3271	// certain).
3272	// If set to 0.0, the default of 0.3 is used.
3273	ClassificationThreshold float64 `json:"classificationThreshold,omitempty"`
3274
3275	// DefaultLanguageCode: Required. The default language of the agent as a
3276	// language tag.
3277	// See
3278	// [Language
3279	// Support](https://cloud.google.com/dialogflow/docs/refere
3280	// nce/language)
3281	// for a list of the currently supported language codes. This field
3282	// cannot be
3283	// set by the `Update` method.
3284	DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"`
3285
3286	// Description: Optional. The description of this agent.
3287	// The maximum length is 500 characters. If exceeded, the request is
3288	// rejected.
3289	Description string `json:"description,omitempty"`
3290
3291	// DisplayName: Required. The name of this agent.
3292	DisplayName string `json:"displayName,omitempty"`
3293
3294	// EnableLogging: Optional. Determines whether this agent should log
3295	// conversation queries.
3296	EnableLogging bool `json:"enableLogging,omitempty"`
3297
3298	// MatchMode: Optional. Determines how intents are detected from user
3299	// queries.
3300	//
3301	// Possible values:
3302	//   "MATCH_MODE_UNSPECIFIED" - Not specified.
3303	//   "MATCH_MODE_HYBRID" - Best for agents with a small number of
3304	// examples in intents and/or wide
3305	// use of templates syntax and composite entities.
3306	//   "MATCH_MODE_ML_ONLY" - Can be used for agents with a large number
3307	// of examples in intents,
3308	// especially the ones using @sys.any or very large developer entities.
3309	MatchMode string `json:"matchMode,omitempty"`
3310
3311	// Parent: Required. The project of this agent.
3312	// Format: `projects/<Project ID>`.
3313	Parent string `json:"parent,omitempty"`
3314
3315	// SupportedLanguageCodes: Optional. The list of all languages supported
3316	// by this agent (except for the
3317	// `default_language_code`).
3318	SupportedLanguageCodes []string `json:"supportedLanguageCodes,omitempty"`
3319
3320	// Tier: Optional. The agent tier. If not specified, TIER_STANDARD is
3321	// assumed.
3322	//
3323	// Possible values:
3324	//   "TIER_UNSPECIFIED" - Not specified. This value should never be
3325	// used.
3326	//   "TIER_STANDARD" - Standard tier.
3327	//   "TIER_ENTERPRISE" - Enterprise tier (Essentials).
3328	//   "TIER_ENTERPRISE_PLUS" - Enterprise tier (Plus).
3329	Tier string `json:"tier,omitempty"`
3330
3331	// TimeZone: Required. The time zone of this agent from the
3332	// [time zone database](https://www.iana.org/time-zones),
3333	// e.g.,
3334	// America/New_York, Europe/Paris.
3335	TimeZone string `json:"timeZone,omitempty"`
3336
3337	// ServerResponse contains the HTTP response code and headers from the
3338	// server.
3339	googleapi.ServerResponse `json:"-"`
3340
3341	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
3342	// unconditionally include in API requests. By default, fields with
3343	// empty values are omitted from API requests. However, any non-pointer,
3344	// non-interface field appearing in ForceSendFields will be sent to the
3345	// server regardless of whether the field is empty or not. This may be
3346	// used to include empty fields in Patch requests.
3347	ForceSendFields []string `json:"-"`
3348
3349	// NullFields is a list of field names (e.g. "ApiVersion") to include in
3350	// API requests with the JSON null value. By default, fields with empty
3351	// values are omitted from API requests. However, any field with an
3352	// empty value appearing in NullFields will be sent to the server as
3353	// null. It is an error if a field in this list has a non-empty value.
3354	// This may be used to include null fields in Patch requests.
3355	NullFields []string `json:"-"`
3356}
3357
3358func (s *GoogleCloudDialogflowV2beta1Agent) MarshalJSON() ([]byte, error) {
3359	type NoMethod GoogleCloudDialogflowV2beta1Agent
3360	raw := NoMethod(*s)
3361	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3362}
3363
3364func (s *GoogleCloudDialogflowV2beta1Agent) UnmarshalJSON(data []byte) error {
3365	type NoMethod GoogleCloudDialogflowV2beta1Agent
3366	var s1 struct {
3367		ClassificationThreshold gensupport.JSONFloat64 `json:"classificationThreshold"`
3368		*NoMethod
3369	}
3370	s1.NoMethod = (*NoMethod)(s)
3371	if err := json.Unmarshal(data, &s1); err != nil {
3372		return err
3373	}
3374	s.ClassificationThreshold = float64(s1.ClassificationThreshold)
3375	return nil
3376}
3377
3378// GoogleCloudDialogflowV2beta1AnnotatedConversationDataset: Represents
3379// an annotated conversation dataset.
3380// ConversationDataset can have multiple AnnotatedConversationDataset,
3381// each of
3382// them represents one result from one annotation
3383// task.
3384// AnnotatedConversationDataset can only be generated from annotation
3385// task,
3386// which will be triggered by LabelConversation.
3387type GoogleCloudDialogflowV2beta1AnnotatedConversationDataset struct {
3388	// CompletedExampleCount: Output only. Number of examples that have
3389	// annotations in the annotated
3390	// conversation dataset.
3391	CompletedExampleCount int64 `json:"completedExampleCount,omitempty,string"`
3392
3393	// CreateTime: Output only. Creation time of this annotated conversation
3394	// dataset.
3395	CreateTime string `json:"createTime,omitempty"`
3396
3397	// Description: Optional. The description of the annotated conversation
3398	// dataset.
3399	// Maximum of 10000 bytes.
3400	Description string `json:"description,omitempty"`
3401
3402	// DisplayName: Required. The display name of the annotated conversation
3403	// dataset.
3404	// It's specified when user starts an annotation task. Maximum of 64
3405	// bytes.
3406	DisplayName string `json:"displayName,omitempty"`
3407
3408	// ExampleCount: Output only. Number of examples in the annotated
3409	// conversation dataset.
3410	ExampleCount int64 `json:"exampleCount,omitempty,string"`
3411
3412	// Name: Output only. AnnotatedConversationDataset resource name.
3413	// Format:
3414	// `projects/<Project ID>/conversationDatasets/<Conversation
3415	// Dataset
3416	// ID>/annotatedConversationDatasets/<Annotated Conversation Dataset
3417	// ID>`
3418	Name string `json:"name,omitempty"`
3419
3420	// QuestionTypeName: Output only. Question type name that identifies a
3421	// labeling task.
3422	// A question is a single task that a worker answers. A question type is
3423	// set
3424	// of related questions. Each question belongs to a particular question
3425	// type.
3426	// It can be used in CrowdCompute UI to filter and manage labeling
3427	// tasks.
3428	QuestionTypeName string `json:"questionTypeName,omitempty"`
3429
3430	// ForceSendFields is a list of field names (e.g.
3431	// "CompletedExampleCount") to unconditionally include in API requests.
3432	// By default, fields with empty values are omitted from API requests.
3433	// However, any non-pointer, non-interface field appearing in
3434	// ForceSendFields will be sent to the server regardless of whether the
3435	// field is empty or not. This may be used to include empty fields in
3436	// Patch requests.
3437	ForceSendFields []string `json:"-"`
3438
3439	// NullFields is a list of field names (e.g. "CompletedExampleCount") to
3440	// include in API requests with the JSON null value. By default, fields
3441	// with empty values are omitted from API requests. However, any field
3442	// with an empty value appearing in NullFields will be sent to the
3443	// server as null. It is an error if a field in this list has a
3444	// non-empty value. This may be used to include null fields in Patch
3445	// requests.
3446	NullFields []string `json:"-"`
3447}
3448
3449func (s *GoogleCloudDialogflowV2beta1AnnotatedConversationDataset) MarshalJSON() ([]byte, error) {
3450	type NoMethod GoogleCloudDialogflowV2beta1AnnotatedConversationDataset
3451	raw := NoMethod(*s)
3452	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3453}
3454
3455// GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest: The request
3456// message for EntityTypes.BatchCreateEntities.
3457type GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest struct {
3458	// Entities: Required. The entities to create.
3459	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
3460
3461	// LanguageCode: Optional. The language of entity synonyms defined in
3462	// `entities`. If not
3463	// specified, the agent's default language is
3464	// used.
3465	// [Many
3466	// languages](https://cloud.google.com/dialogflow/docs/refere
3467	// nce/language)
3468	// are supported. Note: languages must be enabled in the agent before
3469	// they can
3470	// be used.
3471	LanguageCode string `json:"languageCode,omitempty"`
3472
3473	// ForceSendFields is a list of field names (e.g. "Entities") to
3474	// unconditionally include in API requests. By default, fields with
3475	// empty values are omitted from API requests. However, any non-pointer,
3476	// non-interface field appearing in ForceSendFields will be sent to the
3477	// server regardless of whether the field is empty or not. This may be
3478	// used to include empty fields in Patch requests.
3479	ForceSendFields []string `json:"-"`
3480
3481	// NullFields is a list of field names (e.g. "Entities") to include in
3482	// API requests with the JSON null value. By default, fields with empty
3483	// values are omitted from API requests. However, any field with an
3484	// empty value appearing in NullFields will be sent to the server as
3485	// null. It is an error if a field in this list has a non-empty value.
3486	// This may be used to include null fields in Patch requests.
3487	NullFields []string `json:"-"`
3488}
3489
3490func (s *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest) MarshalJSON() ([]byte, error) {
3491	type NoMethod GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest
3492	raw := NoMethod(*s)
3493	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3494}
3495
3496// GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest: The request
3497// message for EntityTypes.BatchDeleteEntities.
3498type GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest struct {
3499	// EntityValues: Required. The canonical `values` of the entities to
3500	// delete. Note that
3501	// these are not fully-qualified names, i.e. they don't start
3502	// with
3503	// `projects/<Project ID>`.
3504	EntityValues []string `json:"entityValues,omitempty"`
3505
3506	// LanguageCode: Optional. The language of entity synonyms defined in
3507	// `entities`. If not
3508	// specified, the agent's default language is
3509	// used.
3510	// [Many
3511	// languages](https://cloud.google.com/dialogflow/docs/refere
3512	// nce/language)
3513	// are supported. Note: languages must be enabled in the agent before
3514	// they can
3515	// be used.
3516	LanguageCode string `json:"languageCode,omitempty"`
3517
3518	// ForceSendFields is a list of field names (e.g. "EntityValues") to
3519	// unconditionally include in API requests. By default, fields with
3520	// empty values are omitted from API requests. However, any non-pointer,
3521	// non-interface field appearing in ForceSendFields will be sent to the
3522	// server regardless of whether the field is empty or not. This may be
3523	// used to include empty fields in Patch requests.
3524	ForceSendFields []string `json:"-"`
3525
3526	// NullFields is a list of field names (e.g. "EntityValues") to include
3527	// in API requests with the JSON null value. By default, fields with
3528	// empty values are omitted from API requests. However, any field with
3529	// an empty value appearing in NullFields will be sent to the server as
3530	// null. It is an error if a field in this list has a non-empty value.
3531	// This may be used to include null fields in Patch requests.
3532	NullFields []string `json:"-"`
3533}
3534
3535func (s *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest) MarshalJSON() ([]byte, error) {
3536	type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest
3537	raw := NoMethod(*s)
3538	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3539}
3540
3541// GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest: The
3542// request message for EntityTypes.BatchDeleteEntityTypes.
3543type GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest struct {
3544	// EntityTypeNames: Required. The names entity types to delete. All
3545	// names must point to the
3546	// same agent as `parent`.
3547	EntityTypeNames []string `json:"entityTypeNames,omitempty"`
3548
3549	// ForceSendFields is a list of field names (e.g. "EntityTypeNames") to
3550	// unconditionally include in API requests. By default, fields with
3551	// empty values are omitted from API requests. However, any non-pointer,
3552	// non-interface field appearing in ForceSendFields will be sent to the
3553	// server regardless of whether the field is empty or not. This may be
3554	// used to include empty fields in Patch requests.
3555	ForceSendFields []string `json:"-"`
3556
3557	// NullFields is a list of field names (e.g. "EntityTypeNames") to
3558	// include in API requests with the JSON null value. By default, fields
3559	// with empty values are omitted from API requests. However, any field
3560	// with an empty value appearing in NullFields will be sent to the
3561	// server as null. It is an error if a field in this list has a
3562	// non-empty value. This may be used to include null fields in Patch
3563	// requests.
3564	NullFields []string `json:"-"`
3565}
3566
3567func (s *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest) MarshalJSON() ([]byte, error) {
3568	type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest
3569	raw := NoMethod(*s)
3570	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3571}
3572
3573// GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest: The request
3574// message for Intents.BatchDeleteIntents.
3575type GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest struct {
3576	// Intents: Required. The collection of intents to delete. Only intent
3577	// `name` must be
3578	// filled in.
3579	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
3580
3581	// ForceSendFields is a list of field names (e.g. "Intents") to
3582	// unconditionally include in API requests. By default, fields with
3583	// empty values are omitted from API requests. However, any non-pointer,
3584	// non-interface field appearing in ForceSendFields will be sent to the
3585	// server regardless of whether the field is empty or not. This may be
3586	// used to include empty fields in Patch requests.
3587	ForceSendFields []string `json:"-"`
3588
3589	// NullFields is a list of field names (e.g. "Intents") to include in
3590	// API requests with the JSON null value. By default, fields with empty
3591	// values are omitted from API requests. However, any field with an
3592	// empty value appearing in NullFields will be sent to the server as
3593	// null. It is an error if a field in this list has a non-empty value.
3594	// This may be used to include null fields in Patch requests.
3595	NullFields []string `json:"-"`
3596}
3597
3598func (s *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest) MarshalJSON() ([]byte, error) {
3599	type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest
3600	raw := NoMethod(*s)
3601	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3602}
3603
3604// GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest: The request
3605// message for EntityTypes.BatchUpdateEntities.
3606type GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest struct {
3607	// Entities: Required. The entities to update or create.
3608	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
3609
3610	// LanguageCode: Optional. The language of entity synonyms defined in
3611	// `entities`. If not
3612	// specified, the agent's default language is
3613	// used.
3614	// [Many
3615	// languages](https://cloud.google.com/dialogflow/docs/refere
3616	// nce/language)
3617	// are supported. Note: languages must be enabled in the agent before
3618	// they can
3619	// be used.
3620	LanguageCode string `json:"languageCode,omitempty"`
3621
3622	// UpdateMask: Optional. The mask to control which fields get updated.
3623	UpdateMask string `json:"updateMask,omitempty"`
3624
3625	// ForceSendFields is a list of field names (e.g. "Entities") to
3626	// unconditionally include in API requests. By default, fields with
3627	// empty values are omitted from API requests. However, any non-pointer,
3628	// non-interface field appearing in ForceSendFields will be sent to the
3629	// server regardless of whether the field is empty or not. This may be
3630	// used to include empty fields in Patch requests.
3631	ForceSendFields []string `json:"-"`
3632
3633	// NullFields is a list of field names (e.g. "Entities") to include in
3634	// API requests with the JSON null value. By default, fields with empty
3635	// values are omitted from API requests. However, any field with an
3636	// empty value appearing in NullFields will be sent to the server as
3637	// null. It is an error if a field in this list has a non-empty value.
3638	// This may be used to include null fields in Patch requests.
3639	NullFields []string `json:"-"`
3640}
3641
3642func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest) MarshalJSON() ([]byte, error) {
3643	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest
3644	raw := NoMethod(*s)
3645	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3646}
3647
3648// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest: The
3649// request message for EntityTypes.BatchUpdateEntityTypes.
3650type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest struct {
3651	// EntityTypeBatchInline: The collection of entity types to update or
3652	// create.
3653	EntityTypeBatchInline *GoogleCloudDialogflowV2beta1EntityTypeBatch `json:"entityTypeBatchInline,omitempty"`
3654
3655	// EntityTypeBatchUri: The URI to a Google Cloud Storage file containing
3656	// entity types to update
3657	// or create. The file format can either be a serialized proto
3658	// (of
3659	// EntityBatch type) or a JSON object. Note: The URI must start
3660	// with
3661	// "gs://".
3662	EntityTypeBatchUri string `json:"entityTypeBatchUri,omitempty"`
3663
3664	// LanguageCode: Optional. The language of entity synonyms defined in
3665	// `entity_types`. If not
3666	// specified, the agent's default language is
3667	// used.
3668	// [Many
3669	// languages](https://cloud.google.com/dialogflow/docs/refere
3670	// nce/language)
3671	// are supported. Note: languages must be enabled in the agent before
3672	// they can
3673	// be used.
3674	LanguageCode string `json:"languageCode,omitempty"`
3675
3676	// UpdateMask: Optional. The mask to control which fields get updated.
3677	UpdateMask string `json:"updateMask,omitempty"`
3678
3679	// ForceSendFields is a list of field names (e.g.
3680	// "EntityTypeBatchInline") to unconditionally include in API requests.
3681	// By default, fields with empty values are omitted from API requests.
3682	// However, any non-pointer, non-interface field appearing in
3683	// ForceSendFields will be sent to the server regardless of whether the
3684	// field is empty or not. This may be used to include empty fields in
3685	// Patch requests.
3686	ForceSendFields []string `json:"-"`
3687
3688	// NullFields is a list of field names (e.g. "EntityTypeBatchInline") to
3689	// include in API requests with the JSON null value. By default, fields
3690	// with empty values are omitted from API requests. However, any field
3691	// with an empty value appearing in NullFields will be sent to the
3692	// server as null. It is an error if a field in this list has a
3693	// non-empty value. This may be used to include null fields in Patch
3694	// requests.
3695	NullFields []string `json:"-"`
3696}
3697
3698func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest) MarshalJSON() ([]byte, error) {
3699	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest
3700	raw := NoMethod(*s)
3701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3702}
3703
3704// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse: The
3705// response message for EntityTypes.BatchUpdateEntityTypes.
3706type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse struct {
3707	// EntityTypes: The collection of updated or created entity types.
3708	EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
3709
3710	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
3711	// unconditionally include in API requests. By default, fields with
3712	// empty values are omitted from API requests. However, any non-pointer,
3713	// non-interface field appearing in ForceSendFields will be sent to the
3714	// server regardless of whether the field is empty or not. This may be
3715	// used to include empty fields in Patch requests.
3716	ForceSendFields []string `json:"-"`
3717
3718	// NullFields is a list of field names (e.g. "EntityTypes") to include
3719	// in API requests with the JSON null value. By default, fields with
3720	// empty values are omitted from API requests. However, any field with
3721	// an empty value appearing in NullFields will be sent to the server as
3722	// null. It is an error if a field in this list has a non-empty value.
3723	// This may be used to include null fields in Patch requests.
3724	NullFields []string `json:"-"`
3725}
3726
3727func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) {
3728	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
3729	raw := NoMethod(*s)
3730	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3731}
3732
3733// GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest: The request
3734// message for Intents.BatchUpdateIntents.
3735type GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest struct {
3736	// IntentBatchInline: The collection of intents to update or create.
3737	IntentBatchInline *GoogleCloudDialogflowV2beta1IntentBatch `json:"intentBatchInline,omitempty"`
3738
3739	// IntentBatchUri: The URI to a Google Cloud Storage file containing
3740	// intents to update or
3741	// create. The file format can either be a serialized proto (of
3742	// IntentBatch
3743	// type) or JSON object. Note: The URI must start with "gs://".
3744	IntentBatchUri string `json:"intentBatchUri,omitempty"`
3745
3746	// IntentView: Optional. The resource view to apply to the returned
3747	// intent.
3748	//
3749	// Possible values:
3750	//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
3751	// in the response.
3752	//   "INTENT_VIEW_FULL" - All fields are populated.
3753	IntentView string `json:"intentView,omitempty"`
3754
3755	// LanguageCode: Optional. The language of training phrases, parameters
3756	// and rich messages
3757	// defined in `intents`. If not specified, the agent's default language
3758	// is
3759	// used.
3760	// [Many
3761	// languages](https://cloud.google.com/dialogflow/docs/reference/la
3762	// nguage)
3763	// are supported. Note: languages must be enabled in the agent before
3764	// they can
3765	// be used.
3766	LanguageCode string `json:"languageCode,omitempty"`
3767
3768	// UpdateMask: Optional. The mask to control which fields get updated.
3769	UpdateMask string `json:"updateMask,omitempty"`
3770
3771	// ForceSendFields is a list of field names (e.g. "IntentBatchInline")
3772	// to unconditionally include in API requests. By default, fields with
3773	// empty values are omitted from API requests. However, any non-pointer,
3774	// non-interface field appearing in ForceSendFields will be sent to the
3775	// server regardless of whether the field is empty or not. This may be
3776	// used to include empty fields in Patch requests.
3777	ForceSendFields []string `json:"-"`
3778
3779	// NullFields is a list of field names (e.g. "IntentBatchInline") to
3780	// include in API requests with the JSON null value. By default, fields
3781	// with empty values are omitted from API requests. However, any field
3782	// with an empty value appearing in NullFields will be sent to the
3783	// server as null. It is an error if a field in this list has a
3784	// non-empty value. This may be used to include null fields in Patch
3785	// requests.
3786	NullFields []string `json:"-"`
3787}
3788
3789func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest) MarshalJSON() ([]byte, error) {
3790	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest
3791	raw := NoMethod(*s)
3792	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3793}
3794
3795// GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse: The response
3796// message for Intents.BatchUpdateIntents.
3797type GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse struct {
3798	// Intents: The collection of updated or created intents.
3799	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
3800
3801	// ForceSendFields is a list of field names (e.g. "Intents") to
3802	// unconditionally include in API requests. By default, fields with
3803	// empty values are omitted from API requests. However, any non-pointer,
3804	// non-interface field appearing in ForceSendFields will be sent to the
3805	// server regardless of whether the field is empty or not. This may be
3806	// used to include empty fields in Patch requests.
3807	ForceSendFields []string `json:"-"`
3808
3809	// NullFields is a list of field names (e.g. "Intents") to include in
3810	// API requests with the JSON null value. By default, fields with empty
3811	// values are omitted from API requests. However, any field with an
3812	// empty value appearing in NullFields will be sent to the server as
3813	// null. It is an error if a field in this list has a non-empty value.
3814	// This may be used to include null fields in Patch requests.
3815	NullFields []string `json:"-"`
3816}
3817
3818func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) {
3819	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
3820	raw := NoMethod(*s)
3821	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3822}
3823
3824// GoogleCloudDialogflowV2beta1Context: Represents a context.
3825type GoogleCloudDialogflowV2beta1Context struct {
3826	// LifespanCount: Optional. The number of conversational query requests
3827	// after which the
3828	// context expires. If set to `0` (the default) the context
3829	// expires
3830	// immediately. Contexts expire automatically after 20 minutes if
3831	// there
3832	// are no matching queries.
3833	LifespanCount int64 `json:"lifespanCount,omitempty"`
3834
3835	// Name: Required. The unique identifier of the context.
3836	// Format:
3837	// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context
3838	// ID>`,
3839	// or `projects/<Project ID>/agent/environments/<Environment
3840	// ID>/users/<User
3841	// ID>/sessions/<Session ID>/contexts/<Context ID>`.
3842	//
3843	// The `Context ID` is always converted to lowercase, may only
3844	// contain
3845	// characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
3846	//
3847	// If `Environment ID` is not specified, we assume default
3848	// 'draft'
3849	// environment. If `User ID` is not specified, we assume default '-'
3850	// user.
3851	Name string `json:"name,omitempty"`
3852
3853	// Parameters: Optional. The collection of parameters associated with
3854	// this context.
3855	// Refer to
3856	// [this
3857	// doc](https://cloud.google.com/dialogflow/docs/intents-actions-pa
3858	// rameters)
3859	// for syntax.
3860	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
3861
3862	// ServerResponse contains the HTTP response code and headers from the
3863	// server.
3864	googleapi.ServerResponse `json:"-"`
3865
3866	// ForceSendFields is a list of field names (e.g. "LifespanCount") to
3867	// unconditionally include in API requests. By default, fields with
3868	// empty values are omitted from API requests. However, any non-pointer,
3869	// non-interface field appearing in ForceSendFields will be sent to the
3870	// server regardless of whether the field is empty or not. This may be
3871	// used to include empty fields in Patch requests.
3872	ForceSendFields []string `json:"-"`
3873
3874	// NullFields is a list of field names (e.g. "LifespanCount") to include
3875	// in API requests with the JSON null value. By default, fields with
3876	// empty values are omitted from API requests. However, any field with
3877	// an empty value appearing in NullFields will be sent to the server as
3878	// null. It is an error if a field in this list has a non-empty value.
3879	// This may be used to include null fields in Patch requests.
3880	NullFields []string `json:"-"`
3881}
3882
3883func (s *GoogleCloudDialogflowV2beta1Context) MarshalJSON() ([]byte, error) {
3884	type NoMethod GoogleCloudDialogflowV2beta1Context
3885	raw := NoMethod(*s)
3886	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3887}
3888
3889// GoogleCloudDialogflowV2beta1DetectIntentRequest: The request to
3890// detect user's intent.
3891type GoogleCloudDialogflowV2beta1DetectIntentRequest struct {
3892	// InputAudio: Optional. The natural language speech audio to be
3893	// processed. This field
3894	// should be populated iff `query_input` is set to an input audio
3895	// config.
3896	// A single request can contain up to 1 minute of speech audio data.
3897	InputAudio string `json:"inputAudio,omitempty"`
3898
3899	// OutputAudioConfig: Optional. Instructs the speech synthesizer how to
3900	// generate the output
3901	// audio. If this field is not set and agent-level speech synthesizer is
3902	// not
3903	// configured, no output audio is generated.
3904	OutputAudioConfig *GoogleCloudDialogflowV2beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"`
3905
3906	// QueryInput: Required. The input specification. It can be set to:
3907	//
3908	// 1.  an audio config
3909	//     which instructs the speech recognizer how to process the speech
3910	// audio,
3911	//
3912	// 2.  a conversational query in the form of text, or
3913	//
3914	// 3.  an event that specifies which intent to trigger.
3915	QueryInput *GoogleCloudDialogflowV2beta1QueryInput `json:"queryInput,omitempty"`
3916
3917	// QueryParams: Optional. The parameters of this query.
3918	QueryParams *GoogleCloudDialogflowV2beta1QueryParameters `json:"queryParams,omitempty"`
3919
3920	// ForceSendFields is a list of field names (e.g. "InputAudio") to
3921	// unconditionally include in API requests. By default, fields with
3922	// empty values are omitted from API requests. However, any non-pointer,
3923	// non-interface field appearing in ForceSendFields will be sent to the
3924	// server regardless of whether the field is empty or not. This may be
3925	// used to include empty fields in Patch requests.
3926	ForceSendFields []string `json:"-"`
3927
3928	// NullFields is a list of field names (e.g. "InputAudio") to include in
3929	// API requests with the JSON null value. By default, fields with empty
3930	// values are omitted from API requests. However, any field with an
3931	// empty value appearing in NullFields will be sent to the server as
3932	// null. It is an error if a field in this list has a non-empty value.
3933	// This may be used to include null fields in Patch requests.
3934	NullFields []string `json:"-"`
3935}
3936
3937func (s *GoogleCloudDialogflowV2beta1DetectIntentRequest) MarshalJSON() ([]byte, error) {
3938	type NoMethod GoogleCloudDialogflowV2beta1DetectIntentRequest
3939	raw := NoMethod(*s)
3940	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3941}
3942
3943// GoogleCloudDialogflowV2beta1DetectIntentResponse: The message
3944// returned from the DetectIntent method.
3945type GoogleCloudDialogflowV2beta1DetectIntentResponse struct {
3946	// AlternativeQueryResults: If Knowledge Connectors are enabled, there
3947	// could be more than one result
3948	// returned for a given query or event, and this field will contain
3949	// all
3950	// results except for the top one, which is captured in query_result.
3951	// The
3952	// alternative results are ordered by
3953	// decreasing
3954	// `QueryResult.intent_detection_confidence`. If Knowledge Connectors
3955	// are
3956	// disabled, this field will be empty until multiple responses for
3957	// regular
3958	// intents are supported, at which point those additional results will
3959	// be
3960	// surfaced here.
3961	AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"`
3962
3963	// OutputAudio: The audio data bytes encoded as specified in the
3964	// request.
3965	// Note: The output audio is generated based on the values of default
3966	// platform
3967	// text responses found in the `query_result.fulfillment_messages`
3968	// field. If
3969	// multiple default text responses exist, they will be concatenated
3970	// when
3971	// generating audio. If no default platform text responses exist,
3972	// the
3973	// generated audio content will be empty.
3974	OutputAudio string `json:"outputAudio,omitempty"`
3975
3976	// OutputAudioConfig: The config used by the speech synthesizer to
3977	// generate the output audio.
3978	OutputAudioConfig *GoogleCloudDialogflowV2beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"`
3979
3980	// QueryResult: The selected results of the conversational query or
3981	// event processing.
3982	// See `alternative_query_results` for additional potential results.
3983	QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"`
3984
3985	// ResponseId: The unique identifier of the response. It can be used
3986	// to
3987	// locate a response in the training example set or for reporting
3988	// issues.
3989	ResponseId string `json:"responseId,omitempty"`
3990
3991	// WebhookStatus: Specifies the status of the webhook request.
3992	WebhookStatus *GoogleRpcStatus `json:"webhookStatus,omitempty"`
3993
3994	// ServerResponse contains the HTTP response code and headers from the
3995	// server.
3996	googleapi.ServerResponse `json:"-"`
3997
3998	// ForceSendFields is a list of field names (e.g.
3999	// "AlternativeQueryResults") to unconditionally include in API
4000	// requests. By default, fields with empty values are omitted from API
4001	// requests. However, any non-pointer, non-interface field appearing in
4002	// ForceSendFields will be sent to the server regardless of whether the
4003	// field is empty or not. This may be used to include empty fields in
4004	// Patch requests.
4005	ForceSendFields []string `json:"-"`
4006
4007	// NullFields is a list of field names (e.g. "AlternativeQueryResults")
4008	// to include in API requests with the JSON null value. By default,
4009	// fields with empty values are omitted from API requests. However, any
4010	// field with an empty value appearing in NullFields will be sent to the
4011	// server as null. It is an error if a field in this list has a
4012	// non-empty value. This may be used to include null fields in Patch
4013	// requests.
4014	NullFields []string `json:"-"`
4015}
4016
4017func (s *GoogleCloudDialogflowV2beta1DetectIntentResponse) MarshalJSON() ([]byte, error) {
4018	type NoMethod GoogleCloudDialogflowV2beta1DetectIntentResponse
4019	raw := NoMethod(*s)
4020	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4021}
4022
4023// GoogleCloudDialogflowV2beta1Document: A document resource.
4024//
4025// Note: The `projects.agent.knowledgeBases.documents` resource is
4026// deprecated;
4027// only use `projects.knowledgeBases.documents`.
4028type GoogleCloudDialogflowV2beta1Document struct {
4029	// Content: The raw content of the document. This field is only
4030	// permitted for
4031	// EXTRACTIVE_QA and FAQ knowledge types.
4032	// Note: This field is in the process of being deprecated, please
4033	// use
4034	// raw_content instead.
4035	Content string `json:"content,omitempty"`
4036
4037	// ContentUri: The URI where the file content is located.
4038	//
4039	// For documents stored in Google Cloud Storage, these URIs must
4040	// have
4041	// the form `gs://<bucket-name>/<object-name>`.
4042	//
4043	// NOTE: External URLs must correspond to public webpages, i.e., they
4044	// must
4045	// be indexed by Google Search. In particular, URLs for showing
4046	// documents in
4047	// Google Cloud Storage (i.e. the URL in your browser) are not
4048	// supported.
4049	// Instead use the `gs://` format URI described above.
4050	ContentUri string `json:"contentUri,omitempty"`
4051
4052	// DisplayName: Required. The display name of the document. The name
4053	// must be 1024 bytes or
4054	// less; otherwise, the creation request fails.
4055	DisplayName string `json:"displayName,omitempty"`
4056
4057	// KnowledgeTypes: Required. The knowledge type of document content.
4058	//
4059	// Possible values:
4060	//   "KNOWLEDGE_TYPE_UNSPECIFIED" - The type is unspecified or
4061	// arbitrary.
4062	//   "FAQ" - The document content contains question and answer pairs as
4063	// either HTML or
4064	// CSV. Typical FAQ HTML formats are parsed accurately, but unusual
4065	// formats
4066	// may fail to be parsed.
4067	//
4068	// CSV must have questions in the first column and answers in the
4069	// second,
4070	// with no header. Because of this explicit format, they are always
4071	// parsed
4072	// accurately.
4073	//   "EXTRACTIVE_QA" - Documents for which unstructured text is
4074	// extracted and used for
4075	// question answering.
4076	KnowledgeTypes []string `json:"knowledgeTypes,omitempty"`
4077
4078	// MimeType: Required. The MIME type of this document.
4079	MimeType string `json:"mimeType,omitempty"`
4080
4081	// Name: The document resource name.
4082	// The name must be empty when creating a document.
4083	// Format: `projects/<Project ID>/knowledgeBases/<Knowledge
4084	// Base
4085	// ID>/documents/<Document ID>`.
4086	Name string `json:"name,omitempty"`
4087
4088	// RawContent: The raw content of the document. This field is only
4089	// permitted for
4090	// EXTRACTIVE_QA and FAQ knowledge types.
4091	RawContent string `json:"rawContent,omitempty"`
4092
4093	// ServerResponse contains the HTTP response code and headers from the
4094	// server.
4095	googleapi.ServerResponse `json:"-"`
4096
4097	// ForceSendFields is a list of field names (e.g. "Content") 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. "Content") to include in
4106	// API 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 *GoogleCloudDialogflowV2beta1Document) MarshalJSON() ([]byte, error) {
4115	type NoMethod GoogleCloudDialogflowV2beta1Document
4116	raw := NoMethod(*s)
4117	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4118}
4119
4120// GoogleCloudDialogflowV2beta1EntityType: Represents an entity
4121// type.
4122// Entity types serve as a tool for extracting parameter values from
4123// natural
4124// language queries.
4125type GoogleCloudDialogflowV2beta1EntityType struct {
4126	// AutoExpansionMode: Optional. Indicates whether the entity type can be
4127	// automatically
4128	// expanded.
4129	//
4130	// Possible values:
4131	//   "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the
4132	// entity.
4133	//   "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values
4134	// that have not been explicitly
4135	// listed in the entity.
4136	AutoExpansionMode string `json:"autoExpansionMode,omitempty"`
4137
4138	// DisplayName: Required. The name of the entity type.
4139	DisplayName string `json:"displayName,omitempty"`
4140
4141	// EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction
4142	// during classification.
4143	EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"`
4144
4145	// Entities: Optional. The collection of entity entries associated with
4146	// the entity type.
4147	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
4148
4149	// Kind: Required. Indicates the kind of entity type.
4150	//
4151	// Possible values:
4152	//   "KIND_UNSPECIFIED" - Not specified. This value should be never
4153	// used.
4154	//   "KIND_MAP" - Map entity types allow mapping of a group of synonyms
4155	// to a canonical
4156	// value.
4157	//   "KIND_LIST" - List entity types contain a set of entries that do
4158	// not map to canonical
4159	// values. However, list entity types can contain references to other
4160	// entity
4161	// types (with or without aliases).
4162	//   "KIND_REGEXP" - Regexp entity types allow to specify regular
4163	// expressions in entries
4164	// values.
4165	Kind string `json:"kind,omitempty"`
4166
4167	// Name: The unique identifier of the entity type.
4168	// Required for EntityTypes.UpdateEntityType
4169	// and
4170	// EntityTypes.BatchUpdateEntityTypes methods.
4171	// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
4172	Name string `json:"name,omitempty"`
4173
4174	// ServerResponse contains the HTTP response code and headers from the
4175	// server.
4176	googleapi.ServerResponse `json:"-"`
4177
4178	// ForceSendFields is a list of field names (e.g. "AutoExpansionMode")
4179	// to 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. "AutoExpansionMode") to
4187	// include in API requests with the JSON null value. By default, fields
4188	// with empty values are omitted from API requests. However, any field
4189	// with an empty value appearing in NullFields will be sent to the
4190	// server as null. It is an error if a field in this list has a
4191	// non-empty value. This may be used to include null fields in Patch
4192	// requests.
4193	NullFields []string `json:"-"`
4194}
4195
4196func (s *GoogleCloudDialogflowV2beta1EntityType) MarshalJSON() ([]byte, error) {
4197	type NoMethod GoogleCloudDialogflowV2beta1EntityType
4198	raw := NoMethod(*s)
4199	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4200}
4201
4202// GoogleCloudDialogflowV2beta1EntityTypeBatch: This message is a
4203// wrapper around a collection of entity types.
4204type GoogleCloudDialogflowV2beta1EntityTypeBatch struct {
4205	// EntityTypes: A collection of entity types.
4206	EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
4207
4208	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
4209	// unconditionally include in API requests. By default, fields with
4210	// empty values are omitted from API requests. However, any non-pointer,
4211	// non-interface field appearing in ForceSendFields will be sent to the
4212	// server regardless of whether the field is empty or not. This may be
4213	// used to include empty fields in Patch requests.
4214	ForceSendFields []string `json:"-"`
4215
4216	// NullFields is a list of field names (e.g. "EntityTypes") to include
4217	// in API requests with the JSON null value. By default, fields with
4218	// empty values are omitted from API requests. However, any field with
4219	// an empty value appearing in NullFields will be sent to the server as
4220	// null. It is an error if a field in this list has a non-empty value.
4221	// This may be used to include null fields in Patch requests.
4222	NullFields []string `json:"-"`
4223}
4224
4225func (s *GoogleCloudDialogflowV2beta1EntityTypeBatch) MarshalJSON() ([]byte, error) {
4226	type NoMethod GoogleCloudDialogflowV2beta1EntityTypeBatch
4227	raw := NoMethod(*s)
4228	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4229}
4230
4231// GoogleCloudDialogflowV2beta1EntityTypeEntity: An **entity entry** for
4232// an associated entity type.
4233type GoogleCloudDialogflowV2beta1EntityTypeEntity struct {
4234	// Synonyms: Required. A collection of value synonyms. For example, if
4235	// the entity type
4236	// is *vegetable*, and `value` is *scallions*, a synonym could be
4237	// *green
4238	// onions*.
4239	//
4240	// For `KIND_LIST` entity types:
4241	//
4242	// *   This collection must contain exactly one synonym equal to
4243	// `value`.
4244	Synonyms []string `json:"synonyms,omitempty"`
4245
4246	// Value: Required. The primary value associated with this entity
4247	// entry.
4248	// For example, if the entity type is *vegetable*, the value could
4249	// be
4250	// *scallions*.
4251	//
4252	// For `KIND_MAP` entity types:
4253	//
4254	// *   A canonical value to be used in place of synonyms.
4255	//
4256	// For `KIND_LIST` entity types:
4257	//
4258	// *   A string that can contain references to other entity types (with
4259	// or
4260	//     without aliases).
4261	Value string `json:"value,omitempty"`
4262
4263	// ForceSendFields is a list of field names (e.g. "Synonyms") to
4264	// unconditionally include in API requests. By default, fields with
4265	// empty values are omitted from API requests. However, any non-pointer,
4266	// non-interface field appearing in ForceSendFields will be sent to the
4267	// server regardless of whether the field is empty or not. This may be
4268	// used to include empty fields in Patch requests.
4269	ForceSendFields []string `json:"-"`
4270
4271	// NullFields is a list of field names (e.g. "Synonyms") to include in
4272	// API requests with the JSON null value. By default, fields with empty
4273	// values are omitted from API requests. However, any field with an
4274	// empty value appearing in NullFields will be sent to the server as
4275	// null. It is an error if a field in this list has a non-empty value.
4276	// This may be used to include null fields in Patch requests.
4277	NullFields []string `json:"-"`
4278}
4279
4280func (s *GoogleCloudDialogflowV2beta1EntityTypeEntity) MarshalJSON() ([]byte, error) {
4281	type NoMethod GoogleCloudDialogflowV2beta1EntityTypeEntity
4282	raw := NoMethod(*s)
4283	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4284}
4285
4286// GoogleCloudDialogflowV2beta1EventInput: Events allow for matching
4287// intents by event name instead of the natural
4288// language input. For instance, input `<event: { name:
4289// "welcome_event",
4290// parameters: { name: "Sam" } }>` can trigger a personalized welcome
4291// response.
4292// The parameter `name` may be used by the agent in the
4293// response:
4294// "Hello #welcome_event.name! What can I do for you today?".
4295type GoogleCloudDialogflowV2beta1EventInput struct {
4296	// LanguageCode: Required. The language of this query. See
4297	// [Language
4298	// Support](https://cloud.google.com/dialogflow/docs/reference/
4299	// language)
4300	// for a list of the currently supported language codes. Note that
4301	// queries in
4302	// the same session do not necessarily need to specify the same
4303	// language.
4304	LanguageCode string `json:"languageCode,omitempty"`
4305
4306	// Name: Required. The unique identifier of the event.
4307	Name string `json:"name,omitempty"`
4308
4309	// Parameters: Optional. The collection of parameters associated with
4310	// the event.
4311	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
4312
4313	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
4314	// unconditionally include in API requests. By default, fields with
4315	// empty values are omitted from API requests. However, any non-pointer,
4316	// non-interface field appearing in ForceSendFields will be sent to the
4317	// server regardless of whether the field is empty or not. This may be
4318	// used to include empty fields in Patch requests.
4319	ForceSendFields []string `json:"-"`
4320
4321	// NullFields is a list of field names (e.g. "LanguageCode") to include
4322	// in API requests with the JSON null value. By default, fields with
4323	// empty values are omitted from API requests. However, any field with
4324	// an empty value appearing in NullFields will be sent to the server as
4325	// null. It is an error if a field in this list has a non-empty value.
4326	// This may be used to include null fields in Patch requests.
4327	NullFields []string `json:"-"`
4328}
4329
4330func (s *GoogleCloudDialogflowV2beta1EventInput) MarshalJSON() ([]byte, error) {
4331	type NoMethod GoogleCloudDialogflowV2beta1EventInput
4332	raw := NoMethod(*s)
4333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4334}
4335
4336// GoogleCloudDialogflowV2beta1ExportAgentRequest: The request message
4337// for Agents.ExportAgent.
4338type GoogleCloudDialogflowV2beta1ExportAgentRequest struct {
4339	// AgentUri: Optional. The
4340	// [Google Cloud Storage](https://cloud.google.com/storage/docs/)
4341	// URI to export the agent to.
4342	// The format of this URI must be `gs://<bucket-name>/<object-name>`.
4343	// If left unspecified, the serialized agent is returned inline.
4344	AgentUri string `json:"agentUri,omitempty"`
4345
4346	// ForceSendFields is a list of field names (e.g. "AgentUri") to
4347	// unconditionally include in API requests. By default, fields with
4348	// empty values are omitted from API requests. However, any non-pointer,
4349	// non-interface field appearing in ForceSendFields will be sent to the
4350	// server regardless of whether the field is empty or not. This may be
4351	// used to include empty fields in Patch requests.
4352	ForceSendFields []string `json:"-"`
4353
4354	// NullFields is a list of field names (e.g. "AgentUri") to include in
4355	// API requests with the JSON null value. By default, fields with empty
4356	// values are omitted from API requests. However, any field with an
4357	// empty value appearing in NullFields will be sent to the server as
4358	// null. It is an error if a field in this list has a non-empty value.
4359	// This may be used to include null fields in Patch requests.
4360	NullFields []string `json:"-"`
4361}
4362
4363func (s *GoogleCloudDialogflowV2beta1ExportAgentRequest) MarshalJSON() ([]byte, error) {
4364	type NoMethod GoogleCloudDialogflowV2beta1ExportAgentRequest
4365	raw := NoMethod(*s)
4366	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4367}
4368
4369// GoogleCloudDialogflowV2beta1ExportAgentResponse: The response message
4370// for Agents.ExportAgent.
4371type GoogleCloudDialogflowV2beta1ExportAgentResponse struct {
4372	// AgentContent: Zip compressed raw byte content for agent.
4373	AgentContent string `json:"agentContent,omitempty"`
4374
4375	// AgentUri: The URI to a file containing the exported agent. This field
4376	// is populated
4377	// only if `agent_uri` is specified in `ExportAgentRequest`.
4378	AgentUri string `json:"agentUri,omitempty"`
4379
4380	// ForceSendFields is a list of field names (e.g. "AgentContent") to
4381	// unconditionally include in API requests. By default, fields with
4382	// empty values are omitted from API requests. However, any non-pointer,
4383	// non-interface field appearing in ForceSendFields will be sent to the
4384	// server regardless of whether the field is empty or not. This may be
4385	// used to include empty fields in Patch requests.
4386	ForceSendFields []string `json:"-"`
4387
4388	// NullFields is a list of field names (e.g. "AgentContent") to include
4389	// in API requests with the JSON null value. By default, fields with
4390	// empty values are omitted from API requests. However, any field with
4391	// an empty value appearing in NullFields will be sent to the server as
4392	// null. It is an error if a field in this list has a non-empty value.
4393	// This may be used to include null fields in Patch requests.
4394	NullFields []string `json:"-"`
4395}
4396
4397func (s *GoogleCloudDialogflowV2beta1ExportAgentResponse) MarshalJSON() ([]byte, error) {
4398	type NoMethod GoogleCloudDialogflowV2beta1ExportAgentResponse
4399	raw := NoMethod(*s)
4400	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4401}
4402
4403// GoogleCloudDialogflowV2beta1GcsSource: Google Cloud Storage location
4404// for single input.
4405type GoogleCloudDialogflowV2beta1GcsSource struct {
4406	// Uri: Required. The Google Cloud Storage URIs for the inputs. A URI is
4407	// of the
4408	// form:
4409	//   gs://bucket/object-prefix-or-name
4410	// Whether a prefix or name is used depends on the use case.
4411	Uri string `json:"uri,omitempty"`
4412
4413	// ForceSendFields is a list of field names (e.g. "Uri") to
4414	// unconditionally include in API requests. By default, fields with
4415	// empty values are omitted from API requests. However, any non-pointer,
4416	// non-interface field appearing in ForceSendFields will be sent to the
4417	// server regardless of whether the field is empty or not. This may be
4418	// used to include empty fields in Patch requests.
4419	ForceSendFields []string `json:"-"`
4420
4421	// NullFields is a list of field names (e.g. "Uri") to include in API
4422	// requests with the JSON null value. By default, fields with empty
4423	// values are omitted from API requests. However, any field with an
4424	// empty value appearing in NullFields will be sent to the server as
4425	// null. It is an error if a field in this list has a non-empty value.
4426	// This may be used to include null fields in Patch requests.
4427	NullFields []string `json:"-"`
4428}
4429
4430func (s *GoogleCloudDialogflowV2beta1GcsSource) MarshalJSON() ([]byte, error) {
4431	type NoMethod GoogleCloudDialogflowV2beta1GcsSource
4432	raw := NoMethod(*s)
4433	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4434}
4435
4436// GoogleCloudDialogflowV2beta1ImportAgentRequest: The request message
4437// for Agents.ImportAgent.
4438type GoogleCloudDialogflowV2beta1ImportAgentRequest struct {
4439	// AgentContent: Zip compressed raw byte content for agent.
4440	AgentContent string `json:"agentContent,omitempty"`
4441
4442	// AgentUri: The URI to a Google Cloud Storage file containing the agent
4443	// to import.
4444	// Note: The URI must start with "gs://".
4445	AgentUri string `json:"agentUri,omitempty"`
4446
4447	// ForceSendFields is a list of field names (e.g. "AgentContent") to
4448	// unconditionally include in API requests. By default, fields with
4449	// empty values are omitted from API requests. However, any non-pointer,
4450	// non-interface field appearing in ForceSendFields will be sent to the
4451	// server regardless of whether the field is empty or not. This may be
4452	// used to include empty fields in Patch requests.
4453	ForceSendFields []string `json:"-"`
4454
4455	// NullFields is a list of field names (e.g. "AgentContent") to include
4456	// in API requests with the JSON null value. By default, fields with
4457	// empty values are omitted from API requests. However, any field with
4458	// an empty value appearing in NullFields will be sent to the server as
4459	// null. It is an error if a field in this list has a non-empty value.
4460	// This may be used to include null fields in Patch requests.
4461	NullFields []string `json:"-"`
4462}
4463
4464func (s *GoogleCloudDialogflowV2beta1ImportAgentRequest) MarshalJSON() ([]byte, error) {
4465	type NoMethod GoogleCloudDialogflowV2beta1ImportAgentRequest
4466	raw := NoMethod(*s)
4467	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4468}
4469
4470// GoogleCloudDialogflowV2beta1InputAudioConfig: Instructs the speech
4471// recognizer on how to process the audio content.
4472type GoogleCloudDialogflowV2beta1InputAudioConfig struct {
4473	// AudioEncoding: Required. Audio encoding of the audio content to
4474	// process.
4475	//
4476	// Possible values:
4477	//   "AUDIO_ENCODING_UNSPECIFIED" - Not specified.
4478	//   "AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
4479	// little-endian samples (Linear PCM).
4480	//   "AUDIO_ENCODING_FLAC" -
4481	// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless
4482	// Audio
4483	// Codec) is the recommended encoding because it is lossless
4484	// (therefore
4485	// recognition is not compromised) and requires only about half
4486	// the
4487	// bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit
4488	// and
4489	// 24-bit samples, however, not all fields in `STREAMINFO` are
4490	// supported.
4491	//   "AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit audio
4492	// samples using G.711 PCMU/mu-law.
4493	//   "AUDIO_ENCODING_AMR" - Adaptive Multi-Rate Narrowband codec.
4494	// `sample_rate_hertz` must be 8000.
4495	//   "AUDIO_ENCODING_AMR_WB" - Adaptive Multi-Rate Wideband codec.
4496	// `sample_rate_hertz` must be 16000.
4497	//   "AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio frames in Ogg
4498	// container
4499	// ([OggOpus](https://wiki.xiph.org/OggOpus)).
4500	// `sample_rate_her
4501	// tz` must be 16000.
4502	//   "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE" - Although the use of lossy
4503	// encodings is not recommended, if a very low
4504	// bitrate encoding is required, `OGG_OPUS` is highly preferred
4505	// over
4506	// Speex encoding. The [Speex](https://speex.org/) encoding supported
4507	// by
4508	// Dialogflow API has a header byte in each block, as in MIME
4509	// type
4510	// `audio/x-speex-with-header-byte`.
4511	// It is a variant of the RTP Speex encoding defined in
4512	// [RFC 5574](https://tools.ietf.org/html/rfc5574).
4513	// The stream is a sequence of blocks, one block per RTP packet. Each
4514	// block
4515	// starts with a byte containing the length of the block, in bytes,
4516	// followed
4517	// by one or more frames of Speex data, padded to an integral number
4518	// of
4519	// bytes (octets) as specified in RFC 5574. In other words, each RTP
4520	// header
4521	// is replaced with a single byte containing the block length. Only
4522	// Speex
4523	// wideband is supported. `sample_rate_hertz` must be 16000.
4524	AudioEncoding string `json:"audioEncoding,omitempty"`
4525
4526	// EnableWordInfo: Optional. If `true`, Dialogflow returns
4527	// SpeechWordInfo in
4528	// StreamingRecognitionResult with information about the recognized
4529	// speech
4530	// words, e.g. start and end time offsets. If false or unspecified,
4531	// Speech
4532	// doesn't return any word-level information.
4533	EnableWordInfo bool `json:"enableWordInfo,omitempty"`
4534
4535	// LanguageCode: Required. The language of the supplied audio.
4536	// Dialogflow does not do
4537	// translations. See
4538	// [Language
4539	// Support](https://cloud.google.com/dialogflow/docs/reference/
4540	// language)
4541	// for a list of the currently supported language codes. Note that
4542	// queries in
4543	// the same session do not necessarily need to specify the same
4544	// language.
4545	LanguageCode string `json:"languageCode,omitempty"`
4546
4547	// Model: Optional. Which Speech model to select for the given request.
4548	// Select the
4549	// model best suited to your domain to get best results. If a model is
4550	// not
4551	// explicitly specified, then we auto-select a model based on the
4552	// parameters
4553	// in the InputAudioConfig.
4554	// If enhanced speech model is enabled for the agent and an
4555	// enhanced
4556	// version of the specified model for the language does not exist, then
4557	// the
4558	// speech is recognized using the standard version of the specified
4559	// model.
4560	// Refer to
4561	// [Cloud Speech
4562	// API
4563	// documentation](https://cloud.google.com/speech-to-text/docs/basics
4564	// #select-model)
4565	// for more details.
4566	Model string `json:"model,omitempty"`
4567
4568	// ModelVariant: Optional. Which variant of the Speech model to use.
4569	//
4570	// Possible values:
4571	//   "SPEECH_MODEL_VARIANT_UNSPECIFIED" - No model variant specified. In
4572	// this case Dialogflow defaults to
4573	// USE_BEST_AVAILABLE.
4574	//   "USE_BEST_AVAILABLE" - Use the best available variant of the
4575	// Speech
4576	// model that the caller is eligible for.
4577	//
4578	// Please see the
4579	// [Dialogflow
4580	// docs](https://cloud.google.com/dialogflow/docs/data-loggin
4581	// g) for
4582	// how to make your project eligible for enhanced models.
4583	//   "USE_STANDARD" - Use standard model variant even if an enhanced
4584	// model is available.  See the
4585	// [Cloud
4586	// Speech
4587	// documentation](https://cloud.google.com/speech-to-text/docs/enh
4588	// anced-models)
4589	// for details about enhanced models.
4590	//   "USE_ENHANCED" - Use an enhanced model variant:
4591	//
4592	// * If an enhanced variant does not exist for the given
4593	//   model and request language, Dialogflow falls
4594	//   back to the standard variant.
4595	//
4596	//   The [Cloud Speech
4597	//
4598	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
4599	// odels)
4600	//   describes which models have enhanced variants.
4601	//
4602	// * If the API caller isn't eligible for enhanced models, Dialogflow
4603	// returns
4604	//   an error.  Please see the [Dialogflow
4605	//   docs](https://cloud.google.com/dialogflow/docs/data-logging)
4606	//   for how to make your project eligible.
4607	ModelVariant string `json:"modelVariant,omitempty"`
4608
4609	// PhraseHints: Optional. A list of strings containing words and phrases
4610	// that the speech
4611	// recognizer should recognize with higher likelihood.
4612	//
4613	// See [the Cloud
4614	// Speech
4615	// documentation](https://cloud.google.com/speech-to-text/docs/bas
4616	// ics#phrase-hints)
4617	// for more details.
4618	PhraseHints []string `json:"phraseHints,omitempty"`
4619
4620	// SampleRateHertz: Required. Sample rate (in Hertz) of the audio
4621	// content sent in the query.
4622	// Refer to
4623	// [Cloud Speech
4624	// API
4625	// documentation](https://cloud.google.com/speech-to-text/docs/basics
4626	// ) for
4627	// more details.
4628	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
4629
4630	// SingleUtterance: Optional. If `false` (default), recognition does not
4631	// cease until the
4632	// client closes the stream.
4633	// If `true`, the recognizer will detect a single spoken utterance in
4634	// input
4635	// audio. Recognition ceases when it detects the audio's voice
4636	// has
4637	// stopped or paused. In this case, once a detected intent is received,
4638	// the
4639	// client should close the stream and start a new request with a new
4640	// stream as
4641	// needed.
4642	// Note: This setting is relevant only for streaming methods.
4643	// Note: When specified, InputAudioConfig.single_utterance takes
4644	// precedence
4645	// over StreamingDetectIntentRequest.single_utterance.
4646	SingleUtterance bool `json:"singleUtterance,omitempty"`
4647
4648	// SpeechContexts: Optional. Context information to assist speech
4649	// recognition.
4650	//
4651	// See [the Cloud
4652	// Speech
4653	// documentation](https://cloud.google.com/speech-to-text/docs/bas
4654	// ics#phrase-hints)
4655	// for more details.
4656	SpeechContexts []*GoogleCloudDialogflowV2beta1SpeechContext `json:"speechContexts,omitempty"`
4657
4658	// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
4659	// unconditionally include in API requests. By default, fields with
4660	// empty values are omitted from API requests. However, any non-pointer,
4661	// non-interface field appearing in ForceSendFields will be sent to the
4662	// server regardless of whether the field is empty or not. This may be
4663	// used to include empty fields in Patch requests.
4664	ForceSendFields []string `json:"-"`
4665
4666	// NullFields is a list of field names (e.g. "AudioEncoding") to include
4667	// in API requests with the JSON null value. By default, fields with
4668	// empty values are omitted from API requests. However, any field with
4669	// an empty value appearing in NullFields will be sent to the server as
4670	// null. It is an error if a field in this list has a non-empty value.
4671	// This may be used to include null fields in Patch requests.
4672	NullFields []string `json:"-"`
4673}
4674
4675func (s *GoogleCloudDialogflowV2beta1InputAudioConfig) MarshalJSON() ([]byte, error) {
4676	type NoMethod GoogleCloudDialogflowV2beta1InputAudioConfig
4677	raw := NoMethod(*s)
4678	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4679}
4680
4681// GoogleCloudDialogflowV2beta1Intent: Represents an intent.
4682// Intents convert a number of user expressions or patterns into an
4683// action. An
4684// action is an extraction of a user command or sentence semantics.
4685type GoogleCloudDialogflowV2beta1Intent struct {
4686	// Action: Optional. The name of the action associated with the
4687	// intent.
4688	// Note: The action name must not contain whitespaces.
4689	Action string `json:"action,omitempty"`
4690
4691	// DefaultResponsePlatforms: Optional. The list of platforms for which
4692	// the first responses will be
4693	// copied from the messages in PLATFORM_UNSPECIFIED (i.e. default
4694	// platform).
4695	//
4696	// Possible values:
4697	//   "PLATFORM_UNSPECIFIED" - Not specified.
4698	//   "FACEBOOK" - Facebook.
4699	//   "SLACK" - Slack.
4700	//   "TELEGRAM" - Telegram.
4701	//   "KIK" - Kik.
4702	//   "SKYPE" - Skype.
4703	//   "LINE" - Line.
4704	//   "VIBER" - Viber.
4705	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
4706	// When using Actions on Google, you can choose one of the
4707	// specific
4708	// Intent.Message types that mention support for Actions on Google,
4709	// or you can use the advanced Intent.Message.payload field.
4710	// The payload field provides access to AoG features not available in
4711	// the
4712	// specific message types.
4713	// If using the Intent.Message.payload field, it should have a
4714	// structure
4715	// similar to the JSON message shown here. For more information,
4716	// see
4717	// [Actions on Google
4718	// Webhook
4719	// Format](https://developers.google.com/actions/dialogflow/webho
4720	// ok)
4721	// <pre>{
4722	//   "expectUserResponse": true,
4723	//   "isSsml": false,
4724	//   "noInputPrompts": [],
4725	//   "richResponse": {
4726	//     "items": [
4727	//       {
4728	//         "simpleResponse": {
4729	//           "displayText": "hi",
4730	//           "textToSpeech": "hello"
4731	//         }
4732	//       }
4733	//     ],
4734	//     "suggestions": [
4735	//       {
4736	//         "title": "Say this"
4737	//       },
4738	//       {
4739	//         "title": "or this"
4740	//       }
4741	//     ]
4742	//   },
4743	//   "systemIntent": {
4744	//     "data": {
4745	//       "@type":
4746	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
4747	//       "listSelect": {
4748	//         "items": [
4749	//           {
4750	//             "optionInfo": {
4751	//               "key": "key1",
4752	//               "synonyms": [
4753	//                 "key one"
4754	//               ]
4755	//             },
4756	//             "title": "must not be empty, but unique"
4757	//           },
4758	//           {
4759	//             "optionInfo": {
4760	//               "key": "key2",
4761	//               "synonyms": [
4762	//                 "key two"
4763	//               ]
4764	//             },
4765	//             "title": "must not be empty, but unique"
4766	//           }
4767	//         ]
4768	//       }
4769	//     },
4770	//     "intent": "actions.intent.OPTION"
4771	//   }
4772	// }</pre>
4773	//   "TELEPHONY" - Telephony Gateway.
4774	//   "GOOGLE_HANGOUTS" - Google Hangouts.
4775	DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"`
4776
4777	// DisplayName: Required. The name of this intent.
4778	DisplayName string `json:"displayName,omitempty"`
4779
4780	// EndInteraction: Optional. Indicates that this intent ends an
4781	// interaction. Some integrations
4782	// (e.g., Actions on Google or Dialogflow phone gateway) use this
4783	// information
4784	// to close interaction with an end user. Default is false.
4785	EndInteraction bool `json:"endInteraction,omitempty"`
4786
4787	// Events: Optional. The collection of event names that trigger the
4788	// intent.
4789	// If the collection of input contexts is not empty, all of the contexts
4790	// must
4791	// be present in the active user session for an event to trigger this
4792	// intent.
4793	Events []string `json:"events,omitempty"`
4794
4795	// FollowupIntentInfo: Read-only. Information about all followup intents
4796	// that have this intent as
4797	// a direct or indirect parent. We populate this field only in the
4798	// output.
4799	FollowupIntentInfo []*GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"`
4800
4801	// InputContextNames: Optional. The list of context names required for
4802	// this intent to be
4803	// triggered.
4804	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
4805	// ID>`.
4806	InputContextNames []string `json:"inputContextNames,omitempty"`
4807
4808	// IsFallback: Optional. Indicates whether this is a fallback intent.
4809	IsFallback bool `json:"isFallback,omitempty"`
4810
4811	// Messages: Optional. The collection of rich messages corresponding to
4812	// the
4813	// `Response` field in the Dialogflow console.
4814	Messages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"messages,omitempty"`
4815
4816	// MlDisabled: Optional. Indicates whether Machine Learning is disabled
4817	// for the intent.
4818	// Note: If `ml_disabled` setting is set to true, then this intent is
4819	// not
4820	// taken into account during inference in `ML ONLY` match mode.
4821	// Also,
4822	// auto-markup in the UI is turned off.
4823	MlDisabled bool `json:"mlDisabled,omitempty"`
4824
4825	// MlEnabled: Optional. Indicates whether Machine Learning is enabled
4826	// for the intent.
4827	// Note: If `ml_enabled` setting is set to false, then this intent is
4828	// not
4829	// taken into account during inference in `ML ONLY` match mode.
4830	// Also,
4831	// auto-markup in the UI is turned off.
4832	// DEPRECATED! Please use `ml_disabled` field instead.
4833	// NOTE: If both `ml_enabled` and `ml_disabled` are either not set or
4834	// false,
4835	// then the default value is determined as follows:
4836	// - Before April 15th, 2018 the default is:
4837	//   ml_enabled = false / ml_disabled = true.
4838	// - After April 15th, 2018 the default is:
4839	//   ml_enabled = true / ml_disabled = false.
4840	MlEnabled bool `json:"mlEnabled,omitempty"`
4841
4842	// Name: The unique identifier of this intent.
4843	// Required for Intents.UpdateIntent and
4844	// Intents.BatchUpdateIntents
4845	// methods.
4846	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
4847	Name string `json:"name,omitempty"`
4848
4849	// OutputContexts: Optional. The collection of contexts that are
4850	// activated when the intent
4851	// is matched. Context messages in this collection should not set
4852	// the
4853	// parameters field. Setting the `lifespan_count` to 0 will reset the
4854	// context
4855	// when the intent is matched.
4856	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
4857	// ID>`.
4858	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
4859
4860	// Parameters: Optional. The collection of parameters associated with
4861	// the intent.
4862	Parameters []*GoogleCloudDialogflowV2beta1IntentParameter `json:"parameters,omitempty"`
4863
4864	// ParentFollowupIntentName: Read-only after creation. The unique
4865	// identifier of the parent intent in the
4866	// chain of followup intents. You can set this field when creating an
4867	// intent,
4868	// for example with CreateIntent or BatchUpdateIntents, in order to
4869	// make this intent a followup intent.
4870	//
4871	// It identifies the parent followup intent.
4872	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
4873	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
4874
4875	// Priority: The priority of this intent. Higher numbers represent
4876	// higher
4877	// priorities.
4878	//
4879	// - If the supplied value is unspecified or 0, the service
4880	//   translates the value to 500,000, which corresponds to the
4881	//   `Normal` priority in the console.
4882	// - If the supplied value is negative, the intent is ignored
4883	//   in runtime detect intent requests.
4884	Priority int64 `json:"priority,omitempty"`
4885
4886	// ResetContexts: Optional. Indicates whether to delete all contexts in
4887	// the current
4888	// session when this intent is matched.
4889	ResetContexts bool `json:"resetContexts,omitempty"`
4890
4891	// RootFollowupIntentName: Read-only. The unique identifier of the root
4892	// intent in the chain of
4893	// followup intents. It identifies the correct followup intents chain
4894	// for
4895	// this intent. We populate this field only in the output.
4896	//
4897	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
4898	RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"`
4899
4900	// TrainingPhrases: Optional. The collection of examples that the agent
4901	// is
4902	// trained on.
4903	TrainingPhrases []*GoogleCloudDialogflowV2beta1IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
4904
4905	// WebhookState: Optional. Indicates whether webhooks are enabled for
4906	// the intent.
4907	//
4908	// Possible values:
4909	//   "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and
4910	// in the intent.
4911	//   "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in
4912	// the intent.
4913	//   "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in
4914	// the agent and in the intent. Also, each slot
4915	// filling prompt is forwarded to the webhook.
4916	WebhookState string `json:"webhookState,omitempty"`
4917
4918	// ServerResponse contains the HTTP response code and headers from the
4919	// server.
4920	googleapi.ServerResponse `json:"-"`
4921
4922	// ForceSendFields is a list of field names (e.g. "Action") to
4923	// unconditionally include in API requests. By default, fields with
4924	// empty values are omitted from API requests. However, any non-pointer,
4925	// non-interface field appearing in ForceSendFields will be sent to the
4926	// server regardless of whether the field is empty or not. This may be
4927	// used to include empty fields in Patch requests.
4928	ForceSendFields []string `json:"-"`
4929
4930	// NullFields is a list of field names (e.g. "Action") to include in API
4931	// requests with the JSON null value. By default, fields with empty
4932	// values are omitted from API requests. However, any field with an
4933	// empty value appearing in NullFields will be sent to the server as
4934	// null. It is an error if a field in this list has a non-empty value.
4935	// This may be used to include null fields in Patch requests.
4936	NullFields []string `json:"-"`
4937}
4938
4939func (s *GoogleCloudDialogflowV2beta1Intent) MarshalJSON() ([]byte, error) {
4940	type NoMethod GoogleCloudDialogflowV2beta1Intent
4941	raw := NoMethod(*s)
4942	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4943}
4944
4945// GoogleCloudDialogflowV2beta1IntentBatch: This message is a wrapper
4946// around a collection of intents.
4947type GoogleCloudDialogflowV2beta1IntentBatch struct {
4948	// Intents: A collection of intents.
4949	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
4950
4951	// ForceSendFields is a list of field names (e.g. "Intents") to
4952	// unconditionally include in API requests. By default, fields with
4953	// empty values are omitted from API requests. However, any non-pointer,
4954	// non-interface field appearing in ForceSendFields will be sent to the
4955	// server regardless of whether the field is empty or not. This may be
4956	// used to include empty fields in Patch requests.
4957	ForceSendFields []string `json:"-"`
4958
4959	// NullFields is a list of field names (e.g. "Intents") to include in
4960	// API requests with the JSON null value. By default, fields with empty
4961	// values are omitted from API requests. However, any field with an
4962	// empty value appearing in NullFields will be sent to the server as
4963	// null. It is an error if a field in this list has a non-empty value.
4964	// This may be used to include null fields in Patch requests.
4965	NullFields []string `json:"-"`
4966}
4967
4968func (s *GoogleCloudDialogflowV2beta1IntentBatch) MarshalJSON() ([]byte, error) {
4969	type NoMethod GoogleCloudDialogflowV2beta1IntentBatch
4970	raw := NoMethod(*s)
4971	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4972}
4973
4974// GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo: Represents a
4975// single followup intent in the chain.
4976type GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo struct {
4977	// FollowupIntentName: The unique identifier of the followup
4978	// intent.
4979	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
4980	FollowupIntentName string `json:"followupIntentName,omitempty"`
4981
4982	// ParentFollowupIntentName: The unique identifier of the followup
4983	// intent's parent.
4984	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
4985	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
4986
4987	// ForceSendFields is a list of field names (e.g. "FollowupIntentName")
4988	// to unconditionally include in API requests. By default, fields with
4989	// empty values are omitted from API requests. However, any non-pointer,
4990	// non-interface field appearing in ForceSendFields will be sent to the
4991	// server regardless of whether the field is empty or not. This may be
4992	// used to include empty fields in Patch requests.
4993	ForceSendFields []string `json:"-"`
4994
4995	// NullFields is a list of field names (e.g. "FollowupIntentName") to
4996	// include in API requests with the JSON null value. By default, fields
4997	// with empty values are omitted from API requests. However, any field
4998	// with an empty value appearing in NullFields will be sent to the
4999	// server as null. It is an error if a field in this list has a
5000	// non-empty value. This may be used to include null fields in Patch
5001	// requests.
5002	NullFields []string `json:"-"`
5003}
5004
5005func (s *GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) {
5006	type NoMethod GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
5007	raw := NoMethod(*s)
5008	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5009}
5010
5011// GoogleCloudDialogflowV2beta1IntentMessage: Corresponds to the
5012// `Response` field in the Dialogflow console.
5013type GoogleCloudDialogflowV2beta1IntentMessage struct {
5014	// BasicCard: Displays a basic card for Actions on Google.
5015	BasicCard *GoogleCloudDialogflowV2beta1IntentMessageBasicCard `json:"basicCard,omitempty"`
5016
5017	// BrowseCarouselCard: Browse carousel card for Actions on Google.
5018	BrowseCarouselCard *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"`
5019
5020	// Card: Displays a card.
5021	Card *GoogleCloudDialogflowV2beta1IntentMessageCard `json:"card,omitempty"`
5022
5023	// CarouselSelect: Displays a carousel card for Actions on Google.
5024	CarouselSelect *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect `json:"carouselSelect,omitempty"`
5025
5026	// Image: Displays an image.
5027	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
5028
5029	// LinkOutSuggestion: Displays a link out suggestion chip for Actions on
5030	// Google.
5031	LinkOutSuggestion *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"`
5032
5033	// ListSelect: Displays a list card for Actions on Google.
5034	ListSelect *GoogleCloudDialogflowV2beta1IntentMessageListSelect `json:"listSelect,omitempty"`
5035
5036	// MediaContent: The media content card for Actions on Google.
5037	MediaContent *GoogleCloudDialogflowV2beta1IntentMessageMediaContent `json:"mediaContent,omitempty"`
5038
5039	// Payload: Returns a response containing a custom, platform-specific
5040	// payload.
5041	// See the Intent.Message.Platform type for a description of
5042	// the
5043	// structure that may be required for your platform.
5044	Payload googleapi.RawMessage `json:"payload,omitempty"`
5045
5046	// Platform: Optional. The platform that this message is intended for.
5047	//
5048	// Possible values:
5049	//   "PLATFORM_UNSPECIFIED" - Not specified.
5050	//   "FACEBOOK" - Facebook.
5051	//   "SLACK" - Slack.
5052	//   "TELEGRAM" - Telegram.
5053	//   "KIK" - Kik.
5054	//   "SKYPE" - Skype.
5055	//   "LINE" - Line.
5056	//   "VIBER" - Viber.
5057	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
5058	// When using Actions on Google, you can choose one of the
5059	// specific
5060	// Intent.Message types that mention support for Actions on Google,
5061	// or you can use the advanced Intent.Message.payload field.
5062	// The payload field provides access to AoG features not available in
5063	// the
5064	// specific message types.
5065	// If using the Intent.Message.payload field, it should have a
5066	// structure
5067	// similar to the JSON message shown here. For more information,
5068	// see
5069	// [Actions on Google
5070	// Webhook
5071	// Format](https://developers.google.com/actions/dialogflow/webho
5072	// ok)
5073	// <pre>{
5074	//   "expectUserResponse": true,
5075	//   "isSsml": false,
5076	//   "noInputPrompts": [],
5077	//   "richResponse": {
5078	//     "items": [
5079	//       {
5080	//         "simpleResponse": {
5081	//           "displayText": "hi",
5082	//           "textToSpeech": "hello"
5083	//         }
5084	//       }
5085	//     ],
5086	//     "suggestions": [
5087	//       {
5088	//         "title": "Say this"
5089	//       },
5090	//       {
5091	//         "title": "or this"
5092	//       }
5093	//     ]
5094	//   },
5095	//   "systemIntent": {
5096	//     "data": {
5097	//       "@type":
5098	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
5099	//       "listSelect": {
5100	//         "items": [
5101	//           {
5102	//             "optionInfo": {
5103	//               "key": "key1",
5104	//               "synonyms": [
5105	//                 "key one"
5106	//               ]
5107	//             },
5108	//             "title": "must not be empty, but unique"
5109	//           },
5110	//           {
5111	//             "optionInfo": {
5112	//               "key": "key2",
5113	//               "synonyms": [
5114	//                 "key two"
5115	//               ]
5116	//             },
5117	//             "title": "must not be empty, but unique"
5118	//           }
5119	//         ]
5120	//       }
5121	//     },
5122	//     "intent": "actions.intent.OPTION"
5123	//   }
5124	// }</pre>
5125	//   "TELEPHONY" - Telephony Gateway.
5126	//   "GOOGLE_HANGOUTS" - Google Hangouts.
5127	Platform string `json:"platform,omitempty"`
5128
5129	// QuickReplies: Displays quick replies.
5130	QuickReplies *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies `json:"quickReplies,omitempty"`
5131
5132	// RbmCarouselRichCard: Rich Business Messaging (RBM) carousel rich card
5133	// response.
5134	RbmCarouselRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard `json:"rbmCarouselRichCard,omitempty"`
5135
5136	// RbmStandaloneRichCard: Standalone Rich Business Messaging (RBM) rich
5137	// card response.
5138	RbmStandaloneRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard `json:"rbmStandaloneRichCard,omitempty"`
5139
5140	// RbmText: Rich Business Messaging (RBM) text response.
5141	//
5142	// RBM allows businesses to send enriched and branded versions of SMS.
5143	// See
5144	// https://jibe.google.com/business-messaging.
5145	RbmText *GoogleCloudDialogflowV2beta1IntentMessageRbmText `json:"rbmText,omitempty"`
5146
5147	// SimpleResponses: Returns a voice or text-only response for Actions on
5148	// Google.
5149	SimpleResponses *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses `json:"simpleResponses,omitempty"`
5150
5151	// Suggestions: Displays suggestion chips for Actions on Google.
5152	Suggestions *GoogleCloudDialogflowV2beta1IntentMessageSuggestions `json:"suggestions,omitempty"`
5153
5154	// TableCard: Table card for Actions on Google.
5155	TableCard *GoogleCloudDialogflowV2beta1IntentMessageTableCard `json:"tableCard,omitempty"`
5156
5157	// TelephonyPlayAudio: Plays audio from a file in Telephony Gateway.
5158	TelephonyPlayAudio *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio `json:"telephonyPlayAudio,omitempty"`
5159
5160	// TelephonySynthesizeSpeech: Synthesizes speech in Telephony Gateway.
5161	TelephonySynthesizeSpeech *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech `json:"telephonySynthesizeSpeech,omitempty"`
5162
5163	// TelephonyTransferCall: Transfers the call in Telephony Gateway.
5164	TelephonyTransferCall *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall `json:"telephonyTransferCall,omitempty"`
5165
5166	// Text: Returns a text response.
5167	Text *GoogleCloudDialogflowV2beta1IntentMessageText `json:"text,omitempty"`
5168
5169	// ForceSendFields is a list of field names (e.g. "BasicCard") to
5170	// unconditionally include in API requests. By default, fields with
5171	// empty values are omitted from API requests. However, any non-pointer,
5172	// non-interface field appearing in ForceSendFields will be sent to the
5173	// server regardless of whether the field is empty or not. This may be
5174	// used to include empty fields in Patch requests.
5175	ForceSendFields []string `json:"-"`
5176
5177	// NullFields is a list of field names (e.g. "BasicCard") to include in
5178	// API requests with the JSON null value. By default, fields with empty
5179	// values are omitted from API requests. However, any field with an
5180	// empty value appearing in NullFields will be sent to the server as
5181	// null. It is an error if a field in this list has a non-empty value.
5182	// This may be used to include null fields in Patch requests.
5183	NullFields []string `json:"-"`
5184}
5185
5186func (s *GoogleCloudDialogflowV2beta1IntentMessage) MarshalJSON() ([]byte, error) {
5187	type NoMethod GoogleCloudDialogflowV2beta1IntentMessage
5188	raw := NoMethod(*s)
5189	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5190}
5191
5192// GoogleCloudDialogflowV2beta1IntentMessageBasicCard: The basic card
5193// message. Useful for displaying information.
5194type GoogleCloudDialogflowV2beta1IntentMessageBasicCard struct {
5195	// Buttons: Optional. The collection of card buttons.
5196	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"`
5197
5198	// FormattedText: Required, unless image is present. The body text of
5199	// the card.
5200	FormattedText string `json:"formattedText,omitempty"`
5201
5202	// Image: Optional. The image for the card.
5203	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
5204
5205	// Subtitle: Optional. The subtitle of the card.
5206	Subtitle string `json:"subtitle,omitempty"`
5207
5208	// Title: Optional. The title of the card.
5209	Title string `json:"title,omitempty"`
5210
5211	// ForceSendFields is a list of field names (e.g. "Buttons") to
5212	// unconditionally include in API requests. By default, fields with
5213	// empty values are omitted from API requests. However, any non-pointer,
5214	// non-interface field appearing in ForceSendFields will be sent to the
5215	// server regardless of whether the field is empty or not. This may be
5216	// used to include empty fields in Patch requests.
5217	ForceSendFields []string `json:"-"`
5218
5219	// NullFields is a list of field names (e.g. "Buttons") to include in
5220	// API requests with the JSON null value. By default, fields with empty
5221	// values are omitted from API requests. However, any field with an
5222	// empty value appearing in NullFields will be sent to the server as
5223	// null. It is an error if a field in this list has a non-empty value.
5224	// This may be used to include null fields in Patch requests.
5225	NullFields []string `json:"-"`
5226}
5227
5228func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCard) MarshalJSON() ([]byte, error) {
5229	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCard
5230	raw := NoMethod(*s)
5231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5232}
5233
5234// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton: The button
5235// object that appears at the bottom of a card.
5236type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton struct {
5237	// OpenUriAction: Required. Action to take when a user taps on the
5238	// button.
5239	OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"`
5240
5241	// Title: Required. The title of the button.
5242	Title string `json:"title,omitempty"`
5243
5244	// ForceSendFields is a list of field names (e.g. "OpenUriAction") to
5245	// unconditionally include in API requests. By default, fields with
5246	// empty values are omitted from API requests. However, any non-pointer,
5247	// non-interface field appearing in ForceSendFields will be sent to the
5248	// server regardless of whether the field is empty or not. This may be
5249	// used to include empty fields in Patch requests.
5250	ForceSendFields []string `json:"-"`
5251
5252	// NullFields is a list of field names (e.g. "OpenUriAction") to include
5253	// in API requests with the JSON null value. By default, fields with
5254	// empty values are omitted from API requests. However, any field with
5255	// an empty value appearing in NullFields will be sent to the server as
5256	// null. It is an error if a field in this list has a non-empty value.
5257	// This may be used to include null fields in Patch requests.
5258	NullFields []string `json:"-"`
5259}
5260
5261func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) {
5262	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
5263	raw := NoMethod(*s)
5264	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5265}
5266
5267// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction:
5268//  Opens the given URI.
5269type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction struct {
5270	// Uri: Required. The HTTP or HTTPS scheme URI.
5271	Uri string `json:"uri,omitempty"`
5272
5273	// ForceSendFields is a list of field names (e.g. "Uri") to
5274	// unconditionally include in API requests. By default, fields with
5275	// empty values are omitted from API requests. However, any non-pointer,
5276	// non-interface field appearing in ForceSendFields will be sent to the
5277	// server regardless of whether the field is empty or not. This may be
5278	// used to include empty fields in Patch requests.
5279	ForceSendFields []string `json:"-"`
5280
5281	// NullFields is a list of field names (e.g. "Uri") to include in API
5282	// requests with the JSON null value. By default, fields with empty
5283	// values are omitted from API requests. However, any field with an
5284	// empty value appearing in NullFields will be sent to the server as
5285	// null. It is an error if a field in this list has a non-empty value.
5286	// This may be used to include null fields in Patch requests.
5287	NullFields []string `json:"-"`
5288}
5289
5290func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) {
5291	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
5292	raw := NoMethod(*s)
5293	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5294}
5295
5296// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard: Browse
5297// Carousel Card for Actions on
5298// Google.
5299// https://developers.google.com/actions/assistant/responses#brow
5300// sing_carousel
5301type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard struct {
5302	// ImageDisplayOptions: Optional. Settings for displaying the image.
5303	// Applies to every image in
5304	// items.
5305	//
5306	// Possible values:
5307	//   "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the
5308	// image and the image container with gray
5309	// bars.
5310	//   "GRAY" - Fill the gaps between the image and the image container
5311	// with gray
5312	// bars.
5313	//   "WHITE" - Fill the gaps between the image and the image container
5314	// with white
5315	// bars.
5316	//   "CROPPED" - Image is scaled such that the image width and height
5317	// match or exceed
5318	// the container dimensions. This may crop the top and bottom of
5319	// the
5320	// image if the scaled image height is greater than the
5321	// container
5322	// height, or crop the left and right of the image if the scaled
5323	// image
5324	// width is greater than the container width. This is similar to
5325	// "Zoom
5326	// Mode" on a widescreen TV when playing a 4:3 video.
5327	//   "BLURRED_BACKGROUND" - Pad the gaps between image and image frame
5328	// with a blurred copy of the
5329	// same image.
5330	ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"`
5331
5332	// Items: Required. List of items in the Browse Carousel Card. Minimum
5333	// of two
5334	// items, maximum of ten.
5335	Items []*GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"`
5336
5337	// ForceSendFields is a list of field names (e.g. "ImageDisplayOptions")
5338	// to unconditionally include in API requests. By default, fields with
5339	// empty values are omitted from API requests. However, any non-pointer,
5340	// non-interface field appearing in ForceSendFields will be sent to the
5341	// server regardless of whether the field is empty or not. This may be
5342	// used to include empty fields in Patch requests.
5343	ForceSendFields []string `json:"-"`
5344
5345	// NullFields is a list of field names (e.g. "ImageDisplayOptions") to
5346	// include in API requests with the JSON null value. By default, fields
5347	// with empty values are omitted from API requests. However, any field
5348	// with an empty value appearing in NullFields will be sent to the
5349	// server as null. It is an error if a field in this list has a
5350	// non-empty value. This may be used to include null fields in Patch
5351	// requests.
5352	NullFields []string `json:"-"`
5353}
5354
5355func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) {
5356	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
5357	raw := NoMethod(*s)
5358	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5359}
5360
5361// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou
5362// selCardItem: Browsing carousel tile
5363type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct {
5364	// Description: Optional. Description of the carousel item. Maximum of
5365	// four lines of
5366	// text.
5367	Description string `json:"description,omitempty"`
5368
5369	// Footer: Optional. Text that appears at the bottom of the Browse
5370	// Carousel
5371	// Card. Maximum of one line of text.
5372	Footer string `json:"footer,omitempty"`
5373
5374	// Image: Optional. Hero image for the carousel item.
5375	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
5376
5377	// OpenUriAction: Required. Action to present to the user.
5378	OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"`
5379
5380	// Title: Required. Title of the carousel item. Maximum of two lines of
5381	// text.
5382	Title string `json:"title,omitempty"`
5383
5384	// ForceSendFields is a list of field names (e.g. "Description") to
5385	// unconditionally include in API requests. By default, fields with
5386	// empty values are omitted from API requests. However, any non-pointer,
5387	// non-interface field appearing in ForceSendFields will be sent to the
5388	// server regardless of whether the field is empty or not. This may be
5389	// used to include empty fields in Patch requests.
5390	ForceSendFields []string `json:"-"`
5391
5392	// NullFields is a list of field names (e.g. "Description") to include
5393	// in API requests with the JSON null value. By default, fields with
5394	// empty values are omitted from API requests. However, any field with
5395	// an empty value appearing in NullFields will be sent to the server as
5396	// null. It is an error if a field in this list has a non-empty value.
5397	// This may be used to include null fields in Patch requests.
5398	NullFields []string `json:"-"`
5399}
5400
5401func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) {
5402	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem
5403	raw := NoMethod(*s)
5404	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5405}
5406
5407// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou
5408// selCardItemOpenUrlAction: Actions on Google action to open a given
5409// url.
5410type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct {
5411	// Url: Required. URL
5412	Url string `json:"url,omitempty"`
5413
5414	// UrlTypeHint: Optional. Specifies the type of viewer that is used when
5415	// opening
5416	// the URL. Defaults to opening via web browser.
5417	//
5418	// Possible values:
5419	//   "URL_TYPE_HINT_UNSPECIFIED" - Unspecified
5420	//   "AMP_ACTION" - Url would be an amp action
5421	//   "AMP_CONTENT" - URL that points directly to AMP content, or to a
5422	// canonical URL
5423	// which refers to AMP content via <link rel="amphtml">.
5424	UrlTypeHint string `json:"urlTypeHint,omitempty"`
5425
5426	// ForceSendFields is a list of field names (e.g. "Url") to
5427	// unconditionally include in API requests. By default, fields with
5428	// empty values are omitted from API requests. However, any non-pointer,
5429	// non-interface field appearing in ForceSendFields will be sent to the
5430	// server regardless of whether the field is empty or not. This may be
5431	// used to include empty fields in Patch requests.
5432	ForceSendFields []string `json:"-"`
5433
5434	// NullFields is a list of field names (e.g. "Url") to include in API
5435	// requests with the JSON null value. By default, fields with empty
5436	// values are omitted from API requests. However, any field with an
5437	// empty value appearing in NullFields will be sent to the server as
5438	// null. It is an error if a field in this list has a non-empty value.
5439	// This may be used to include null fields in Patch requests.
5440	NullFields []string `json:"-"`
5441}
5442
5443func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) {
5444	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
5445	raw := NoMethod(*s)
5446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5447}
5448
5449// GoogleCloudDialogflowV2beta1IntentMessageCard: The card response
5450// message.
5451type GoogleCloudDialogflowV2beta1IntentMessageCard struct {
5452	// Buttons: Optional. The collection of card buttons.
5453	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageCardButton `json:"buttons,omitempty"`
5454
5455	// ImageUri: Optional. The public URI to an image file for the card.
5456	ImageUri string `json:"imageUri,omitempty"`
5457
5458	// Subtitle: Optional. The subtitle of the card.
5459	Subtitle string `json:"subtitle,omitempty"`
5460
5461	// Title: Optional. The title of the card.
5462	Title string `json:"title,omitempty"`
5463
5464	// ForceSendFields is a list of field names (e.g. "Buttons") to
5465	// unconditionally include in API requests. By default, fields with
5466	// empty values are omitted from API requests. However, any non-pointer,
5467	// non-interface field appearing in ForceSendFields will be sent to the
5468	// server regardless of whether the field is empty or not. This may be
5469	// used to include empty fields in Patch requests.
5470	ForceSendFields []string `json:"-"`
5471
5472	// NullFields is a list of field names (e.g. "Buttons") to include in
5473	// API requests with the JSON null value. By default, fields with empty
5474	// values are omitted from API requests. However, any field with an
5475	// empty value appearing in NullFields will be sent to the server as
5476	// null. It is an error if a field in this list has a non-empty value.
5477	// This may be used to include null fields in Patch requests.
5478	NullFields []string `json:"-"`
5479}
5480
5481func (s *GoogleCloudDialogflowV2beta1IntentMessageCard) MarshalJSON() ([]byte, error) {
5482	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCard
5483	raw := NoMethod(*s)
5484	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5485}
5486
5487// GoogleCloudDialogflowV2beta1IntentMessageCardButton: Optional.
5488// Contains information about a button.
5489type GoogleCloudDialogflowV2beta1IntentMessageCardButton struct {
5490	// Postback: Optional. The text to send back to the Dialogflow API or a
5491	// URI to
5492	// open.
5493	Postback string `json:"postback,omitempty"`
5494
5495	// Text: Optional. The text to show on the button.
5496	Text string `json:"text,omitempty"`
5497
5498	// ForceSendFields is a list of field names (e.g. "Postback") to
5499	// unconditionally include in API requests. By default, fields with
5500	// empty values are omitted from API requests. However, any non-pointer,
5501	// non-interface field appearing in ForceSendFields will be sent to the
5502	// server regardless of whether the field is empty or not. This may be
5503	// used to include empty fields in Patch requests.
5504	ForceSendFields []string `json:"-"`
5505
5506	// NullFields is a list of field names (e.g. "Postback") to include in
5507	// API requests with the JSON null value. By default, fields with empty
5508	// values are omitted from API requests. However, any field with an
5509	// empty value appearing in NullFields will be sent to the server as
5510	// null. It is an error if a field in this list has a non-empty value.
5511	// This may be used to include null fields in Patch requests.
5512	NullFields []string `json:"-"`
5513}
5514
5515func (s *GoogleCloudDialogflowV2beta1IntentMessageCardButton) MarshalJSON() ([]byte, error) {
5516	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCardButton
5517	raw := NoMethod(*s)
5518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5519}
5520
5521// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect: The card for
5522// presenting a carousel of options to select from.
5523type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect struct {
5524	// Items: Required. Carousel items.
5525	Items []*GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem `json:"items,omitempty"`
5526
5527	// ForceSendFields is a list of field names (e.g. "Items") to
5528	// unconditionally include in API requests. By default, fields with
5529	// empty values are omitted from API requests. However, any non-pointer,
5530	// non-interface field appearing in ForceSendFields will be sent to the
5531	// server regardless of whether the field is empty or not. This may be
5532	// used to include empty fields in Patch requests.
5533	ForceSendFields []string `json:"-"`
5534
5535	// NullFields is a list of field names (e.g. "Items") to include in API
5536	// requests with the JSON null value. By default, fields with empty
5537	// values are omitted from API requests. However, any field with an
5538	// empty value appearing in NullFields will be sent to the server as
5539	// null. It is an error if a field in this list has a non-empty value.
5540	// This may be used to include null fields in Patch requests.
5541	NullFields []string `json:"-"`
5542}
5543
5544func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) {
5545	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
5546	raw := NoMethod(*s)
5547	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5548}
5549
5550// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem: An item
5551// in the carousel.
5552type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem struct {
5553	// Description: Optional. The body text of the card.
5554	Description string `json:"description,omitempty"`
5555
5556	// Image: Optional. The image to display.
5557	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
5558
5559	// Info: Required. Additional info about the option item.
5560	Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"`
5561
5562	// Title: Required. Title of the carousel item.
5563	Title string `json:"title,omitempty"`
5564
5565	// ForceSendFields is a list of field names (e.g. "Description") to
5566	// unconditionally include in API requests. By default, fields with
5567	// empty values are omitted from API requests. However, any non-pointer,
5568	// non-interface field appearing in ForceSendFields will be sent to the
5569	// server regardless of whether the field is empty or not. This may be
5570	// used to include empty fields in Patch requests.
5571	ForceSendFields []string `json:"-"`
5572
5573	// NullFields is a list of field names (e.g. "Description") to include
5574	// in API requests with the JSON null value. By default, fields with
5575	// empty values are omitted from API requests. However, any field with
5576	// an empty value appearing in NullFields will be sent to the server as
5577	// null. It is an error if a field in this list has a non-empty value.
5578	// This may be used to include null fields in Patch requests.
5579	NullFields []string `json:"-"`
5580}
5581
5582func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) {
5583	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
5584	raw := NoMethod(*s)
5585	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5586}
5587
5588// GoogleCloudDialogflowV2beta1IntentMessageColumnProperties: Column
5589// properties for TableCard.
5590type GoogleCloudDialogflowV2beta1IntentMessageColumnProperties struct {
5591	// Header: Required. Column heading.
5592	Header string `json:"header,omitempty"`
5593
5594	// HorizontalAlignment: Optional. Defines text alignment for all cells
5595	// in this column.
5596	//
5597	// Possible values:
5598	//   "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading
5599	// edge of the column.
5600	//   "LEADING" - Text is aligned to the leading edge of the column.
5601	//   "CENTER" - Text is centered in the column.
5602	//   "TRAILING" - Text is aligned to the trailing edge of the column.
5603	HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
5604
5605	// ForceSendFields is a list of field names (e.g. "Header") to
5606	// unconditionally include in API requests. By default, fields with
5607	// empty values are omitted from API requests. However, any non-pointer,
5608	// non-interface field appearing in ForceSendFields will be sent to the
5609	// server regardless of whether the field is empty or not. This may be
5610	// used to include empty fields in Patch requests.
5611	ForceSendFields []string `json:"-"`
5612
5613	// NullFields is a list of field names (e.g. "Header") to include in API
5614	// requests with the JSON null value. By default, fields with empty
5615	// values are omitted from API requests. However, any field with an
5616	// empty value appearing in NullFields will be sent to the server as
5617	// null. It is an error if a field in this list has a non-empty value.
5618	// This may be used to include null fields in Patch requests.
5619	NullFields []string `json:"-"`
5620}
5621
5622func (s *GoogleCloudDialogflowV2beta1IntentMessageColumnProperties) MarshalJSON() ([]byte, error) {
5623	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageColumnProperties
5624	raw := NoMethod(*s)
5625	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5626}
5627
5628// GoogleCloudDialogflowV2beta1IntentMessageImage: The image response
5629// message.
5630type GoogleCloudDialogflowV2beta1IntentMessageImage struct {
5631	// AccessibilityText: A text description of the image to be used for
5632	// accessibility,
5633	// e.g., screen readers. Required if image_uri is set for
5634	// CarouselSelect.
5635	AccessibilityText string `json:"accessibilityText,omitempty"`
5636
5637	// ImageUri: Optional. The public URI to an image file.
5638	ImageUri string `json:"imageUri,omitempty"`
5639
5640	// ForceSendFields is a list of field names (e.g. "AccessibilityText")
5641	// to unconditionally include in API requests. By default, fields with
5642	// empty values are omitted from API requests. However, any non-pointer,
5643	// non-interface field appearing in ForceSendFields will be sent to the
5644	// server regardless of whether the field is empty or not. This may be
5645	// used to include empty fields in Patch requests.
5646	ForceSendFields []string `json:"-"`
5647
5648	// NullFields is a list of field names (e.g. "AccessibilityText") to
5649	// include in API requests with the JSON null value. By default, fields
5650	// with empty values are omitted from API requests. However, any field
5651	// with an empty value appearing in NullFields will be sent to the
5652	// server as null. It is an error if a field in this list has a
5653	// non-empty value. This may be used to include null fields in Patch
5654	// requests.
5655	NullFields []string `json:"-"`
5656}
5657
5658func (s *GoogleCloudDialogflowV2beta1IntentMessageImage) MarshalJSON() ([]byte, error) {
5659	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageImage
5660	raw := NoMethod(*s)
5661	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5662}
5663
5664// GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion: The
5665// suggestion chip message that allows the user to jump out to the
5666// app
5667// or website associated with this agent.
5668type GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion struct {
5669	// DestinationName: Required. The name of the app or site this chip is
5670	// linking to.
5671	DestinationName string `json:"destinationName,omitempty"`
5672
5673	// Uri: Required. The URI of the app or site to open when the user taps
5674	// the
5675	// suggestion chip.
5676	Uri string `json:"uri,omitempty"`
5677
5678	// ForceSendFields is a list of field names (e.g. "DestinationName") to
5679	// unconditionally include in API requests. By default, fields with
5680	// empty values are omitted from API requests. However, any non-pointer,
5681	// non-interface field appearing in ForceSendFields will be sent to the
5682	// server regardless of whether the field is empty or not. This may be
5683	// used to include empty fields in Patch requests.
5684	ForceSendFields []string `json:"-"`
5685
5686	// NullFields is a list of field names (e.g. "DestinationName") to
5687	// include in API requests with the JSON null value. By default, fields
5688	// with empty values are omitted from API requests. However, any field
5689	// with an empty value appearing in NullFields will be sent to the
5690	// server as null. It is an error if a field in this list has a
5691	// non-empty value. This may be used to include null fields in Patch
5692	// requests.
5693	NullFields []string `json:"-"`
5694}
5695
5696func (s *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) {
5697	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
5698	raw := NoMethod(*s)
5699	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5700}
5701
5702// GoogleCloudDialogflowV2beta1IntentMessageListSelect: The card for
5703// presenting a list of options to select from.
5704type GoogleCloudDialogflowV2beta1IntentMessageListSelect struct {
5705	// Items: Required. List items.
5706	Items []*GoogleCloudDialogflowV2beta1IntentMessageListSelectItem `json:"items,omitempty"`
5707
5708	// Subtitle: Optional. Subtitle of the list.
5709	Subtitle string `json:"subtitle,omitempty"`
5710
5711	// Title: Optional. The overall title of the list.
5712	Title string `json:"title,omitempty"`
5713
5714	// ForceSendFields is a list of field names (e.g. "Items") to
5715	// unconditionally include in API requests. By default, fields with
5716	// empty values are omitted from API requests. However, any non-pointer,
5717	// non-interface field appearing in ForceSendFields will be sent to the
5718	// server regardless of whether the field is empty or not. This may be
5719	// used to include empty fields in Patch requests.
5720	ForceSendFields []string `json:"-"`
5721
5722	// NullFields is a list of field names (e.g. "Items") to include in API
5723	// requests with the JSON null value. By default, fields with empty
5724	// values are omitted from API requests. However, any field with an
5725	// empty value appearing in NullFields will be sent to the server as
5726	// null. It is an error if a field in this list has a non-empty value.
5727	// This may be used to include null fields in Patch requests.
5728	NullFields []string `json:"-"`
5729}
5730
5731func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelect) MarshalJSON() ([]byte, error) {
5732	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelect
5733	raw := NoMethod(*s)
5734	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5735}
5736
5737// GoogleCloudDialogflowV2beta1IntentMessageListSelectItem: An item in
5738// the list.
5739type GoogleCloudDialogflowV2beta1IntentMessageListSelectItem struct {
5740	// Description: Optional. The main text describing the item.
5741	Description string `json:"description,omitempty"`
5742
5743	// Image: Optional. The image to display.
5744	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
5745
5746	// Info: Required. Additional information about this option.
5747	Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"`
5748
5749	// Title: Required. The title of the list item.
5750	Title string `json:"title,omitempty"`
5751
5752	// ForceSendFields is a list of field names (e.g. "Description") to
5753	// unconditionally include in API requests. By default, fields with
5754	// empty values are omitted from API requests. However, any non-pointer,
5755	// non-interface field appearing in ForceSendFields will be sent to the
5756	// server regardless of whether the field is empty or not. This may be
5757	// used to include empty fields in Patch requests.
5758	ForceSendFields []string `json:"-"`
5759
5760	// NullFields is a list of field names (e.g. "Description") to include
5761	// in API requests with the JSON null value. By default, fields with
5762	// empty values are omitted from API requests. However, any field with
5763	// an empty value appearing in NullFields will be sent to the server as
5764	// null. It is an error if a field in this list has a non-empty value.
5765	// This may be used to include null fields in Patch requests.
5766	NullFields []string `json:"-"`
5767}
5768
5769func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelectItem) MarshalJSON() ([]byte, error) {
5770	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
5771	raw := NoMethod(*s)
5772	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5773}
5774
5775// GoogleCloudDialogflowV2beta1IntentMessageMediaContent: The media
5776// content card for Actions on Google.
5777type GoogleCloudDialogflowV2beta1IntentMessageMediaContent struct {
5778	// MediaObjects: Required. List of media objects.
5779	MediaObjects []*GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"`
5780
5781	// MediaType: Optional. What type of media is the content (ie "audio").
5782	//
5783	// Possible values:
5784	//   "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified.
5785	//   "AUDIO" - Response media type is audio.
5786	MediaType string `json:"mediaType,omitempty"`
5787
5788	// ForceSendFields is a list of field names (e.g. "MediaObjects") to
5789	// unconditionally include in API requests. By default, fields with
5790	// empty values are omitted from API requests. However, any non-pointer,
5791	// non-interface field appearing in ForceSendFields will be sent to the
5792	// server regardless of whether the field is empty or not. This may be
5793	// used to include empty fields in Patch requests.
5794	ForceSendFields []string `json:"-"`
5795
5796	// NullFields is a list of field names (e.g. "MediaObjects") to include
5797	// in API requests with the JSON null value. By default, fields with
5798	// empty values are omitted from API requests. However, any field with
5799	// an empty value appearing in NullFields will be sent to the server as
5800	// null. It is an error if a field in this list has a non-empty value.
5801	// This may be used to include null fields in Patch requests.
5802	NullFields []string `json:"-"`
5803}
5804
5805func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContent) MarshalJSON() ([]byte, error) {
5806	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContent
5807	raw := NoMethod(*s)
5808	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5809}
5810
5811// GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObje
5812// ct: Response media object for media content card.
5813type GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject struct {
5814	// ContentUrl: Required. Url where the media is stored.
5815	ContentUrl string `json:"contentUrl,omitempty"`
5816
5817	// Description: Optional. Description of media card.
5818	Description string `json:"description,omitempty"`
5819
5820	// Icon: Optional. Icon to display above media content.
5821	Icon *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"icon,omitempty"`
5822
5823	// LargeImage: Optional. Image to display above media content.
5824	LargeImage *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"largeImage,omitempty"`
5825
5826	// Name: Required. Name of media card.
5827	Name string `json:"name,omitempty"`
5828
5829	// ForceSendFields is a list of field names (e.g. "ContentUrl") to
5830	// unconditionally include in API requests. By default, fields with
5831	// empty values are omitted from API requests. However, any non-pointer,
5832	// non-interface field appearing in ForceSendFields will be sent to the
5833	// server regardless of whether the field is empty or not. This may be
5834	// used to include empty fields in Patch requests.
5835	ForceSendFields []string `json:"-"`
5836
5837	// NullFields is a list of field names (e.g. "ContentUrl") to include in
5838	// API requests with the JSON null value. By default, fields with empty
5839	// values are omitted from API requests. However, any field with an
5840	// empty value appearing in NullFields will be sent to the server as
5841	// null. It is an error if a field in this list has a non-empty value.
5842	// This may be used to include null fields in Patch requests.
5843	NullFields []string `json:"-"`
5844}
5845
5846func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) {
5847	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject
5848	raw := NoMethod(*s)
5849	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5850}
5851
5852// GoogleCloudDialogflowV2beta1IntentMessageQuickReplies: The quick
5853// replies response message.
5854type GoogleCloudDialogflowV2beta1IntentMessageQuickReplies struct {
5855	// QuickReplies: Optional. The collection of quick replies.
5856	QuickReplies []string `json:"quickReplies,omitempty"`
5857
5858	// Title: Optional. The title of the collection of quick replies.
5859	Title string `json:"title,omitempty"`
5860
5861	// ForceSendFields is a list of field names (e.g. "QuickReplies") to
5862	// unconditionally include in API requests. By default, fields with
5863	// empty values are omitted from API requests. However, any non-pointer,
5864	// non-interface field appearing in ForceSendFields will be sent to the
5865	// server regardless of whether the field is empty or not. This may be
5866	// used to include empty fields in Patch requests.
5867	ForceSendFields []string `json:"-"`
5868
5869	// NullFields is a list of field names (e.g. "QuickReplies") to include
5870	// in API requests with the JSON null value. By default, fields with
5871	// empty values are omitted from API requests. However, any field with
5872	// an empty value appearing in NullFields will be sent to the server as
5873	// null. It is an error if a field in this list has a non-empty value.
5874	// This may be used to include null fields in Patch requests.
5875	NullFields []string `json:"-"`
5876}
5877
5878func (s *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies) MarshalJSON() ([]byte, error) {
5879	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
5880	raw := NoMethod(*s)
5881	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5882}
5883
5884// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent: Rich
5885// Business Messaging (RBM) Card content
5886type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent struct {
5887	// Description: Optional. Description of the card (at most 2000
5888	// bytes).
5889	//
5890	// At least one of the title, description or media must be set.
5891	Description string `json:"description,omitempty"`
5892
5893	// Media: Optional. However at least one of the title, description or
5894	// media must
5895	// be set. Media (image, GIF or a video) to include in the card.
5896	Media *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia `json:"media,omitempty"`
5897
5898	// Suggestions: Optional. List of suggestions to include in the card.
5899	Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"suggestions,omitempty"`
5900
5901	// Title: Optional. Title of the card (at most 200 bytes).
5902	//
5903	// At least one of the title, description or media must be set.
5904	Title string `json:"title,omitempty"`
5905
5906	// ForceSendFields is a list of field names (e.g. "Description") to
5907	// unconditionally include in API requests. By default, fields with
5908	// empty values are omitted from API requests. However, any non-pointer,
5909	// non-interface field appearing in ForceSendFields will be sent to the
5910	// server regardless of whether the field is empty or not. This may be
5911	// used to include empty fields in Patch requests.
5912	ForceSendFields []string `json:"-"`
5913
5914	// NullFields is a list of field names (e.g. "Description") to include
5915	// in API requests with the JSON null value. By default, fields with
5916	// empty values are omitted from API requests. However, any field with
5917	// an empty value appearing in NullFields will be sent to the server as
5918	// null. It is an error if a field in this list has a non-empty value.
5919	// This may be used to include null fields in Patch requests.
5920	NullFields []string `json:"-"`
5921}
5922
5923func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent) MarshalJSON() ([]byte, error) {
5924	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
5925	raw := NoMethod(*s)
5926	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5927}
5928
5929// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia: Rich
5930// Business Messaging (RBM) Media displayed in Cards
5931// The following media-types are currently supported:
5932//
5933// ## Image Types
5934//
5935//  image/jpeg
5936//  image/jpg'
5937//  image/gif
5938//  image/png
5939//
5940// ## Video Types
5941//
5942//  video/h263
5943//  video/m4v
5944//  video/mp4
5945//  video/mpeg
5946//  video/mpeg4
5947//  video/webm
5948type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia struct {
5949	// FileUri: Required. Publicly reachable URI of the file. The RBM
5950	// platform
5951	// determines the MIME type of the file from the content-type field
5952	// in
5953	// the HTTP headers when the platform fetches the file. The
5954	// content-type
5955	// field must be present and accurate in the HTTP response from the URL.
5956	FileUri string `json:"fileUri,omitempty"`
5957
5958	// Height: Required for cards with vertical orientation. The height of
5959	// the media
5960	// within a rich card with a vertical layout.
5961	// (https://goo.gl/NeFCjz).
5962	// For a standalone card with horizontal layout, height is
5963	// not
5964	// customizable, and this field is ignored.
5965	//
5966	// Possible values:
5967	//   "HEIGHT_UNSPECIFIED" - Not specified.
5968	//   "SHORT" - 112 DP.
5969	//   "MEDIUM" - 168 DP.
5970	//   "TALL" - 264 DP. Not available for rich card carousels when the
5971	// card width
5972	// is set to small.
5973	Height string `json:"height,omitempty"`
5974
5975	// ThumbnailUri: Optional. Publicly reachable URI of the thumbnail.If
5976	// you don't
5977	// provide a thumbnail URI, the RBM platform displays a
5978	// blank
5979	// placeholder thumbnail until the user's device downloads the
5980	// file.
5981	// Depending on the user's setting, the file may not
5982	// download
5983	// automatically and may require the user to tap a download button.
5984	ThumbnailUri string `json:"thumbnailUri,omitempty"`
5985
5986	// ForceSendFields is a list of field names (e.g. "FileUri") to
5987	// unconditionally include in API requests. By default, fields with
5988	// empty values are omitted from API requests. However, any non-pointer,
5989	// non-interface field appearing in ForceSendFields will be sent to the
5990	// server regardless of whether the field is empty or not. This may be
5991	// used to include empty fields in Patch requests.
5992	ForceSendFields []string `json:"-"`
5993
5994	// NullFields is a list of field names (e.g. "FileUri") to include in
5995	// API requests with the JSON null value. By default, fields with empty
5996	// values are omitted from API requests. However, any field with an
5997	// empty value appearing in NullFields will be sent to the server as
5998	// null. It is an error if a field in this list has a non-empty value.
5999	// This may be used to include null fields in Patch requests.
6000	NullFields []string `json:"-"`
6001}
6002
6003func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia) MarshalJSON() ([]byte, error) {
6004	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
6005	raw := NoMethod(*s)
6006	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6007}
6008
6009// GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard: Carousel
6010// Rich Business Messaging (RBM) rich card.
6011//
6012// Rich cards allow you to respond to users with more vivid content,
6013// e.g.
6014// with media and suggestions.
6015//
6016// For more details about RBM rich cards, please
6017// see:
6018// https://developers.google.com/rcs-business-messaging/rbm/guides/b
6019// uild/send-messages#rich-cards.
6020// If you want to show a single card with more control over the
6021// layout,
6022// please use RbmStandaloneCard instead.
6023type GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard struct {
6024	// CardContents: Required. The cards in the carousel. A carousel must
6025	// have at least
6026	// 2 cards and at most 10.
6027	CardContents []*GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContents,omitempty"`
6028
6029	// CardWidth: Required. The width of the cards in the carousel.
6030	//
6031	// Possible values:
6032	//   "CARD_WIDTH_UNSPECIFIED" - Not specified.
6033	//   "SMALL" - 120 DP. Note that tall media cannot be used.
6034	//   "MEDIUM" - 232 DP.
6035	CardWidth string `json:"cardWidth,omitempty"`
6036
6037	// ForceSendFields is a list of field names (e.g. "CardContents") to
6038	// unconditionally include in API requests. By default, fields with
6039	// empty values are omitted from API requests. However, any non-pointer,
6040	// non-interface field appearing in ForceSendFields will be sent to the
6041	// server regardless of whether the field is empty or not. This may be
6042	// used to include empty fields in Patch requests.
6043	ForceSendFields []string `json:"-"`
6044
6045	// NullFields is a list of field names (e.g. "CardContents") to include
6046	// in API requests with the JSON null value. By default, fields with
6047	// empty values are omitted from API requests. However, any field with
6048	// an empty value appearing in NullFields will be sent to the server as
6049	// null. It is an error if a field in this list has a non-empty value.
6050	// This may be used to include null fields in Patch requests.
6051	NullFields []string `json:"-"`
6052}
6053
6054func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard) MarshalJSON() ([]byte, error) {
6055	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
6056	raw := NoMethod(*s)
6057	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6058}
6059
6060// GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard:
6061// Standalone Rich Business Messaging (RBM) rich card.
6062//
6063// Rich cards allow you to respond to users with more vivid content,
6064// e.g.
6065// with media and suggestions.
6066//
6067// For more details about RBM rich cards, please
6068// see:
6069// https://developers.google.com/rcs-business-messaging/rbm/guides/b
6070// uild/send-messages#rich-cards.
6071// You can group multiple rich cards into one using RbmCarouselCard
6072// but
6073// carousel cards will give you less control over the card layout.
6074type GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard struct {
6075	// CardContent: Required. Card content.
6076	CardContent *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContent,omitempty"`
6077
6078	// CardOrientation: Required. Orientation of the card.
6079	//
6080	// Possible values:
6081	//   "CARD_ORIENTATION_UNSPECIFIED" - Not specified.
6082	//   "HORIZONTAL" - Horizontal layout.
6083	//   "VERTICAL" - Vertical layout.
6084	CardOrientation string `json:"cardOrientation,omitempty"`
6085
6086	// ThumbnailImageAlignment: Required if orientation is horizontal.
6087	// Image preview alignment for standalone cards with horizontal layout.
6088	//
6089	// Possible values:
6090	//   "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED" - Not specified.
6091	//   "LEFT" - Thumbnail preview is left-aligned.
6092	//   "RIGHT" - Thumbnail preview is right-aligned.
6093	ThumbnailImageAlignment string `json:"thumbnailImageAlignment,omitempty"`
6094
6095	// ForceSendFields is a list of field names (e.g. "CardContent") to
6096	// unconditionally include in API requests. By default, fields with
6097	// empty values are omitted from API requests. However, any non-pointer,
6098	// non-interface field appearing in ForceSendFields will be sent to the
6099	// server regardless of whether the field is empty or not. This may be
6100	// used to include empty fields in Patch requests.
6101	ForceSendFields []string `json:"-"`
6102
6103	// NullFields is a list of field names (e.g. "CardContent") to include
6104	// in API requests with the JSON null value. By default, fields with
6105	// empty values are omitted from API requests. However, any field with
6106	// an empty value appearing in NullFields will be sent to the server as
6107	// null. It is an error if a field in this list has a non-empty value.
6108	// This may be used to include null fields in Patch requests.
6109	NullFields []string `json:"-"`
6110}
6111
6112func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard) MarshalJSON() ([]byte, error) {
6113	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
6114	raw := NoMethod(*s)
6115	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6116}
6117
6118// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction: Rich
6119// Business Messaging (RBM) suggested client-side action that the
6120// user
6121// can choose from the card.
6122type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction struct {
6123	// Dial: Suggested client side action: Dial a phone number
6124	Dial *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial `json:"dial,omitempty"`
6125
6126	// OpenUrl: Suggested client side action: Open a URI on device
6127	OpenUrl *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri `json:"openUrl,omitempty"`
6128
6129	// PostbackData: Opaque payload that the Dialogflow receives in a user
6130	// event
6131	// when the user taps the suggested action. This data will be
6132	// also
6133	// forwarded to webhook to allow performing custom business logic.
6134	PostbackData string `json:"postbackData,omitempty"`
6135
6136	// ShareLocation: Suggested client side action: Share user location
6137	ShareLocation *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation `json:"shareLocation,omitempty"`
6138
6139	// Text: Text to display alongside the action.
6140	Text string `json:"text,omitempty"`
6141
6142	// ForceSendFields is a list of field names (e.g. "Dial") to
6143	// unconditionally include in API requests. By default, fields with
6144	// empty values are omitted from API requests. However, any non-pointer,
6145	// non-interface field appearing in ForceSendFields will be sent to the
6146	// server regardless of whether the field is empty or not. This may be
6147	// used to include empty fields in Patch requests.
6148	ForceSendFields []string `json:"-"`
6149
6150	// NullFields is a list of field names (e.g. "Dial") to include in API
6151	// requests with the JSON null value. By default, fields with empty
6152	// values are omitted from API requests. However, any field with an
6153	// empty value appearing in NullFields will be sent to the server as
6154	// null. It is an error if a field in this list has a non-empty value.
6155	// This may be used to include null fields in Patch requests.
6156	NullFields []string `json:"-"`
6157}
6158
6159func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction) MarshalJSON() ([]byte, error) {
6160	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
6161	raw := NoMethod(*s)
6162	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6163}
6164
6165// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste
6166// dActionDial: Opens the user's default dialer app with the specified
6167// phone number
6168// but does not dial automatically (https://goo.gl/ergbB2).
6169type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial struct {
6170	// PhoneNumber: Required. The phone number to fill in the default dialer
6171	// app.
6172	// This field should be in
6173	// [E.164](https://en.wikipedia.org/wiki/E.164)
6174	// format. An example of a correctly formatted phone
6175	// number:
6176	// +15556767888.
6177	PhoneNumber string `json:"phoneNumber,omitempty"`
6178
6179	// ForceSendFields is a list of field names (e.g. "PhoneNumber") to
6180	// unconditionally include in API requests. By default, fields with
6181	// empty values are omitted from API requests. However, any non-pointer,
6182	// non-interface field appearing in ForceSendFields will be sent to the
6183	// server regardless of whether the field is empty or not. This may be
6184	// used to include empty fields in Patch requests.
6185	ForceSendFields []string `json:"-"`
6186
6187	// NullFields is a list of field names (e.g. "PhoneNumber") to include
6188	// in API requests with the JSON null value. By default, fields with
6189	// empty values are omitted from API requests. However, any field with
6190	// an empty value appearing in NullFields will be sent to the server as
6191	// null. It is an error if a field in this list has a non-empty value.
6192	// This may be used to include null fields in Patch requests.
6193	NullFields []string `json:"-"`
6194}
6195
6196func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial) MarshalJSON() ([]byte, error) {
6197	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
6198	raw := NoMethod(*s)
6199	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6200}
6201
6202// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste
6203// dActionOpenUri: Opens the user's default web browser app to the
6204// specified uri
6205// (https://goo.gl/6GLJD2). If the user has an app installed that
6206// is
6207// registered as the default handler for the URL, then this app will
6208// be
6209// opened instead, and its icon will be used in the suggested action UI.
6210type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri struct {
6211	// Uri: Required. The uri to open on the user device
6212	Uri string `json:"uri,omitempty"`
6213
6214	// ForceSendFields is a list of field names (e.g. "Uri") to
6215	// unconditionally include in API requests. By default, fields with
6216	// empty values are omitted from API requests. However, any non-pointer,
6217	// non-interface field appearing in ForceSendFields will be sent to the
6218	// server regardless of whether the field is empty or not. This may be
6219	// used to include empty fields in Patch requests.
6220	ForceSendFields []string `json:"-"`
6221
6222	// NullFields is a list of field names (e.g. "Uri") to include in API
6223	// requests with the JSON null value. By default, fields with empty
6224	// values are omitted from API requests. However, any field with an
6225	// empty value appearing in NullFields will be sent to the server as
6226	// null. It is an error if a field in this list has a non-empty value.
6227	// This may be used to include null fields in Patch requests.
6228	NullFields []string `json:"-"`
6229}
6230
6231func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri) MarshalJSON() ([]byte, error) {
6232	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
6233	raw := NoMethod(*s)
6234	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6235}
6236
6237// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste
6238// dActionShareLocation: Opens the device's location chooser so the user
6239// can pick a location
6240// to send back to the agent (https://goo.gl/GXotJW).
6241type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation struct {
6242}
6243
6244// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply: Rich
6245// Business Messaging (RBM) suggested reply that the user can
6246// click
6247// instead of typing in their own response.
6248type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply struct {
6249	// PostbackData: Opaque payload that the Dialogflow receives in a user
6250	// event
6251	// when the user taps the suggested reply. This data will be
6252	// also
6253	// forwarded to webhook to allow performing custom business logic.
6254	PostbackData string `json:"postbackData,omitempty"`
6255
6256	// Text: Suggested reply text.
6257	Text string `json:"text,omitempty"`
6258
6259	// ForceSendFields is a list of field names (e.g. "PostbackData") to
6260	// unconditionally include in API requests. By default, fields with
6261	// empty values are omitted from API requests. However, any non-pointer,
6262	// non-interface field appearing in ForceSendFields will be sent to the
6263	// server regardless of whether the field is empty or not. This may be
6264	// used to include empty fields in Patch requests.
6265	ForceSendFields []string `json:"-"`
6266
6267	// NullFields is a list of field names (e.g. "PostbackData") to include
6268	// in API requests with the JSON null value. By default, fields with
6269	// empty values are omitted from API requests. However, any field with
6270	// an empty value appearing in NullFields will be sent to the server as
6271	// null. It is an error if a field in this list has a non-empty value.
6272	// This may be used to include null fields in Patch requests.
6273	NullFields []string `json:"-"`
6274}
6275
6276func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply) MarshalJSON() ([]byte, error) {
6277	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
6278	raw := NoMethod(*s)
6279	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6280}
6281
6282// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion: Rich Business
6283// Messaging (RBM) suggestion. Suggestions allow user to
6284// easily select/click a predefined response or perform an action
6285// (like
6286// opening a web uri).
6287type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion struct {
6288	// Action: Predefined client side actions that user can choose
6289	Action *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction `json:"action,omitempty"`
6290
6291	// Reply: Predefined replies for user to select instead of typing
6292	Reply *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply `json:"reply,omitempty"`
6293
6294	// ForceSendFields is a list of field names (e.g. "Action") to
6295	// unconditionally include in API requests. By default, fields with
6296	// empty values are omitted from API requests. However, any non-pointer,
6297	// non-interface field appearing in ForceSendFields will be sent to the
6298	// server regardless of whether the field is empty or not. This may be
6299	// used to include empty fields in Patch requests.
6300	ForceSendFields []string `json:"-"`
6301
6302	// NullFields is a list of field names (e.g. "Action") to include in API
6303	// requests with the JSON null value. By default, fields with empty
6304	// values are omitted from API requests. However, any field with an
6305	// empty value appearing in NullFields will be sent to the server as
6306	// null. It is an error if a field in this list has a non-empty value.
6307	// This may be used to include null fields in Patch requests.
6308	NullFields []string `json:"-"`
6309}
6310
6311func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion) MarshalJSON() ([]byte, error) {
6312	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion
6313	raw := NoMethod(*s)
6314	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6315}
6316
6317// GoogleCloudDialogflowV2beta1IntentMessageRbmText: Rich Business
6318// Messaging (RBM) text response with suggestions.
6319type GoogleCloudDialogflowV2beta1IntentMessageRbmText struct {
6320	// RbmSuggestion: Optional. One or more suggestions to show to the user.
6321	RbmSuggestion []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"rbmSuggestion,omitempty"`
6322
6323	// Text: Required. Text sent and displayed to the user.
6324	Text string `json:"text,omitempty"`
6325
6326	// ForceSendFields is a list of field names (e.g. "RbmSuggestion") to
6327	// unconditionally include in API requests. By default, fields with
6328	// empty values are omitted from API requests. However, any non-pointer,
6329	// non-interface field appearing in ForceSendFields will be sent to the
6330	// server regardless of whether the field is empty or not. This may be
6331	// used to include empty fields in Patch requests.
6332	ForceSendFields []string `json:"-"`
6333
6334	// NullFields is a list of field names (e.g. "RbmSuggestion") to include
6335	// in API requests with the JSON null value. By default, fields with
6336	// empty values are omitted from API requests. However, any field with
6337	// an empty value appearing in NullFields will be sent to the server as
6338	// null. It is an error if a field in this list has a non-empty value.
6339	// This may be used to include null fields in Patch requests.
6340	NullFields []string `json:"-"`
6341}
6342
6343func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmText) MarshalJSON() ([]byte, error) {
6344	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmText
6345	raw := NoMethod(*s)
6346	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6347}
6348
6349// GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo: Additional
6350// info about the select item for when it is triggered in a
6351// dialog.
6352type GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo struct {
6353	// Key: Required. A unique key that will be sent back to the agent if
6354	// this
6355	// response is given.
6356	Key string `json:"key,omitempty"`
6357
6358	// Synonyms: Optional. A list of synonyms that can also be used to
6359	// trigger this
6360	// item in dialog.
6361	Synonyms []string `json:"synonyms,omitempty"`
6362
6363	// ForceSendFields is a list of field names (e.g. "Key") to
6364	// unconditionally include in API requests. By default, fields with
6365	// empty values are omitted from API requests. However, any non-pointer,
6366	// non-interface field appearing in ForceSendFields will be sent to the
6367	// server regardless of whether the field is empty or not. This may be
6368	// used to include empty fields in Patch requests.
6369	ForceSendFields []string `json:"-"`
6370
6371	// NullFields is a list of field names (e.g. "Key") to include in API
6372	// requests with the JSON null value. By default, fields with empty
6373	// values are omitted from API requests. However, any field with an
6374	// empty value appearing in NullFields will be sent to the server as
6375	// null. It is an error if a field in this list has a non-empty value.
6376	// This may be used to include null fields in Patch requests.
6377	NullFields []string `json:"-"`
6378}
6379
6380func (s *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) {
6381	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
6382	raw := NoMethod(*s)
6383	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6384}
6385
6386// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse: The simple
6387// response message containing speech or text.
6388type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse struct {
6389	// DisplayText: Optional. The text to display.
6390	DisplayText string `json:"displayText,omitempty"`
6391
6392	// Ssml: One of text_to_speech or ssml must be provided. Structured
6393	// spoken
6394	// response to the user in the SSML format. Mutually exclusive
6395	// with
6396	// text_to_speech.
6397	Ssml string `json:"ssml,omitempty"`
6398
6399	// TextToSpeech: One of text_to_speech or ssml must be provided. The
6400	// plain text of the
6401	// speech output. Mutually exclusive with ssml.
6402	TextToSpeech string `json:"textToSpeech,omitempty"`
6403
6404	// ForceSendFields is a list of field names (e.g. "DisplayText") to
6405	// unconditionally include in API requests. By default, fields with
6406	// empty values are omitted from API requests. However, any non-pointer,
6407	// non-interface field appearing in ForceSendFields will be sent to the
6408	// server regardless of whether the field is empty or not. This may be
6409	// used to include empty fields in Patch requests.
6410	ForceSendFields []string `json:"-"`
6411
6412	// NullFields is a list of field names (e.g. "DisplayText") to include
6413	// in API requests with the JSON null value. By default, fields with
6414	// empty values are omitted from API requests. However, any field with
6415	// an empty value appearing in NullFields will be sent to the server as
6416	// null. It is an error if a field in this list has a non-empty value.
6417	// This may be used to include null fields in Patch requests.
6418	NullFields []string `json:"-"`
6419}
6420
6421func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) {
6422	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
6423	raw := NoMethod(*s)
6424	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6425}
6426
6427// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses: The
6428// collection of simple response candidates.
6429// This message in `QueryResult.fulfillment_messages`
6430// and
6431// `WebhookResponse.fulfillment_messages` should contain only
6432// one
6433// `SimpleResponse`.
6434type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses struct {
6435	// SimpleResponses: Required. The list of simple responses.
6436	SimpleResponses []*GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse `json:"simpleResponses,omitempty"`
6437
6438	// ForceSendFields is a list of field names (e.g. "SimpleResponses") to
6439	// unconditionally include in API requests. By default, fields with
6440	// empty values are omitted from API requests. However, any non-pointer,
6441	// non-interface field appearing in ForceSendFields will be sent to the
6442	// server regardless of whether the field is empty or not. This may be
6443	// used to include empty fields in Patch requests.
6444	ForceSendFields []string `json:"-"`
6445
6446	// NullFields is a list of field names (e.g. "SimpleResponses") to
6447	// include in API requests with the JSON null value. By default, fields
6448	// with empty values are omitted from API requests. However, any field
6449	// with an empty value appearing in NullFields will be sent to the
6450	// server as null. It is an error if a field in this list has a
6451	// non-empty value. This may be used to include null fields in Patch
6452	// requests.
6453	NullFields []string `json:"-"`
6454}
6455
6456func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) {
6457	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
6458	raw := NoMethod(*s)
6459	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6460}
6461
6462// GoogleCloudDialogflowV2beta1IntentMessageSuggestion: The suggestion
6463// chip message that the user can tap to quickly post a reply
6464// to the conversation.
6465type GoogleCloudDialogflowV2beta1IntentMessageSuggestion struct {
6466	// Title: Required. The text shown the in the suggestion chip.
6467	Title string `json:"title,omitempty"`
6468
6469	// ForceSendFields is a list of field names (e.g. "Title") to
6470	// unconditionally include in API requests. By default, fields with
6471	// empty values are omitted from API requests. However, any non-pointer,
6472	// non-interface field appearing in ForceSendFields will be sent to the
6473	// server regardless of whether the field is empty or not. This may be
6474	// used to include empty fields in Patch requests.
6475	ForceSendFields []string `json:"-"`
6476
6477	// NullFields is a list of field names (e.g. "Title") to include in API
6478	// requests with the JSON null value. By default, fields with empty
6479	// values are omitted from API requests. However, any field with an
6480	// empty value appearing in NullFields will be sent to the server as
6481	// null. It is an error if a field in this list has a non-empty value.
6482	// This may be used to include null fields in Patch requests.
6483	NullFields []string `json:"-"`
6484}
6485
6486func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestion) MarshalJSON() ([]byte, error) {
6487	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestion
6488	raw := NoMethod(*s)
6489	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6490}
6491
6492// GoogleCloudDialogflowV2beta1IntentMessageSuggestions: The collection
6493// of suggestions.
6494type GoogleCloudDialogflowV2beta1IntentMessageSuggestions struct {
6495	// Suggestions: Required. The list of suggested replies.
6496	Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageSuggestion `json:"suggestions,omitempty"`
6497
6498	// ForceSendFields is a list of field names (e.g. "Suggestions") to
6499	// unconditionally include in API requests. By default, fields with
6500	// empty values are omitted from API requests. However, any non-pointer,
6501	// non-interface field appearing in ForceSendFields will be sent to the
6502	// server regardless of whether the field is empty or not. This may be
6503	// used to include empty fields in Patch requests.
6504	ForceSendFields []string `json:"-"`
6505
6506	// NullFields is a list of field names (e.g. "Suggestions") to include
6507	// in API requests with the JSON null value. By default, fields with
6508	// empty values are omitted from API requests. However, any field with
6509	// an empty value appearing in NullFields will be sent to the server as
6510	// null. It is an error if a field in this list has a non-empty value.
6511	// This may be used to include null fields in Patch requests.
6512	NullFields []string `json:"-"`
6513}
6514
6515func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestions) MarshalJSON() ([]byte, error) {
6516	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestions
6517	raw := NoMethod(*s)
6518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6519}
6520
6521// GoogleCloudDialogflowV2beta1IntentMessageTableCard: Table card for
6522// Actions on Google.
6523type GoogleCloudDialogflowV2beta1IntentMessageTableCard struct {
6524	// Buttons: Optional. List of buttons for the card.
6525	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"`
6526
6527	// ColumnProperties: Optional. Display properties for the columns in
6528	// this table.
6529	ColumnProperties []*GoogleCloudDialogflowV2beta1IntentMessageColumnProperties `json:"columnProperties,omitempty"`
6530
6531	// Image: Optional. Image which should be displayed on the card.
6532	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
6533
6534	// Rows: Optional. Rows in this table of data.
6535	Rows []*GoogleCloudDialogflowV2beta1IntentMessageTableCardRow `json:"rows,omitempty"`
6536
6537	// Subtitle: Optional. Subtitle to the title.
6538	Subtitle string `json:"subtitle,omitempty"`
6539
6540	// Title: Required. Title of the card.
6541	Title string `json:"title,omitempty"`
6542
6543	// ForceSendFields is a list of field names (e.g. "Buttons") to
6544	// unconditionally include in API requests. By default, fields with
6545	// empty values are omitted from API requests. However, any non-pointer,
6546	// non-interface field appearing in ForceSendFields will be sent to the
6547	// server regardless of whether the field is empty or not. This may be
6548	// used to include empty fields in Patch requests.
6549	ForceSendFields []string `json:"-"`
6550
6551	// NullFields is a list of field names (e.g. "Buttons") to include in
6552	// API requests with the JSON null value. By default, fields with empty
6553	// values are omitted from API requests. However, any field with an
6554	// empty value appearing in NullFields will be sent to the server as
6555	// null. It is an error if a field in this list has a non-empty value.
6556	// This may be used to include null fields in Patch requests.
6557	NullFields []string `json:"-"`
6558}
6559
6560func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCard) MarshalJSON() ([]byte, error) {
6561	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCard
6562	raw := NoMethod(*s)
6563	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6564}
6565
6566// GoogleCloudDialogflowV2beta1IntentMessageTableCardCell: Cell of
6567// TableCardRow.
6568type GoogleCloudDialogflowV2beta1IntentMessageTableCardCell struct {
6569	// Text: Required. Text in this cell.
6570	Text string `json:"text,omitempty"`
6571
6572	// ForceSendFields is a list of field names (e.g. "Text") to
6573	// unconditionally include in API requests. By default, fields with
6574	// empty values are omitted from API requests. However, any non-pointer,
6575	// non-interface field appearing in ForceSendFields will be sent to the
6576	// server regardless of whether the field is empty or not. This may be
6577	// used to include empty fields in Patch requests.
6578	ForceSendFields []string `json:"-"`
6579
6580	// NullFields is a list of field names (e.g. "Text") to include in API
6581	// requests with the JSON null value. By default, fields with empty
6582	// values are omitted from API requests. However, any field with an
6583	// empty value appearing in NullFields will be sent to the server as
6584	// null. It is an error if a field in this list has a non-empty value.
6585	// This may be used to include null fields in Patch requests.
6586	NullFields []string `json:"-"`
6587}
6588
6589func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardCell) MarshalJSON() ([]byte, error) {
6590	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardCell
6591	raw := NoMethod(*s)
6592	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6593}
6594
6595// GoogleCloudDialogflowV2beta1IntentMessageTableCardRow: Row of
6596// TableCard.
6597type GoogleCloudDialogflowV2beta1IntentMessageTableCardRow struct {
6598	// Cells: Optional. List of cells that make up this row.
6599	Cells []*GoogleCloudDialogflowV2beta1IntentMessageTableCardCell `json:"cells,omitempty"`
6600
6601	// DividerAfter: Optional. Whether to add a visual divider after this
6602	// row.
6603	DividerAfter bool `json:"dividerAfter,omitempty"`
6604
6605	// ForceSendFields is a list of field names (e.g. "Cells") to
6606	// unconditionally include in API requests. By default, fields with
6607	// empty values are omitted from API requests. However, any non-pointer,
6608	// non-interface field appearing in ForceSendFields will be sent to the
6609	// server regardless of whether the field is empty or not. This may be
6610	// used to include empty fields in Patch requests.
6611	ForceSendFields []string `json:"-"`
6612
6613	// NullFields is a list of field names (e.g. "Cells") to include in API
6614	// requests with the JSON null value. By default, fields with empty
6615	// values are omitted from API requests. However, any field with an
6616	// empty value appearing in NullFields will be sent to the server as
6617	// null. It is an error if a field in this list has a non-empty value.
6618	// This may be used to include null fields in Patch requests.
6619	NullFields []string `json:"-"`
6620}
6621
6622func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardRow) MarshalJSON() ([]byte, error) {
6623	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardRow
6624	raw := NoMethod(*s)
6625	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6626}
6627
6628// GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio: Plays
6629// audio from a file in Telephony Gateway.
6630type GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio struct {
6631	// AudioUri: Required. URI to a Google Cloud Storage object containing
6632	// the audio to
6633	// play, e.g., "gs://bucket/object". The object must contain a
6634	// single
6635	// channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz.
6636	//
6637	// This object must be readable by the
6638	// `service-<Project
6639	// Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service
6640	// account
6641	// where <Project Number> is the number of the Telephony Gateway
6642	// project
6643	// (usually the same as the Dialogflow agent project). If the Google
6644	// Cloud
6645	// Storage bucket is in the Telephony Gateway project, this permission
6646	// is
6647	// added by default when enabling the Dialogflow V2 API.
6648	//
6649	// For audio from other sources, consider using
6650	// the
6651	// `TelephonySynthesizeSpeech` message with SSML.
6652	AudioUri string `json:"audioUri,omitempty"`
6653
6654	// ForceSendFields is a list of field names (e.g. "AudioUri") to
6655	// unconditionally include in API requests. By default, fields with
6656	// empty values are omitted from API requests. However, any non-pointer,
6657	// non-interface field appearing in ForceSendFields will be sent to the
6658	// server regardless of whether the field is empty or not. This may be
6659	// used to include empty fields in Patch requests.
6660	ForceSendFields []string `json:"-"`
6661
6662	// NullFields is a list of field names (e.g. "AudioUri") to include in
6663	// API requests with the JSON null value. By default, fields with empty
6664	// values are omitted from API requests. However, any field with an
6665	// empty value appearing in NullFields will be sent to the server as
6666	// null. It is an error if a field in this list has a non-empty value.
6667	// This may be used to include null fields in Patch requests.
6668	NullFields []string `json:"-"`
6669}
6670
6671func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio) MarshalJSON() ([]byte, error) {
6672	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
6673	raw := NoMethod(*s)
6674	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6675}
6676
6677// GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech:
6678// Synthesizes speech and plays back the synthesized audio to the caller
6679// in
6680// Telephony Gateway.
6681//
6682// Telephony Gateway takes the synthesizer settings
6683// from
6684// `DetectIntentResponse.output_audio_config` which can either be set
6685// at request-level or can come from the agent-level synthesizer config.
6686type GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech struct {
6687	// Ssml: The SSML to be synthesized. For more information,
6688	// see
6689	// [SSML](https://developers.google.com/actions/reference/ssml).
6690	Ssml string `json:"ssml,omitempty"`
6691
6692	// Text: The raw text to be synthesized.
6693	Text string `json:"text,omitempty"`
6694
6695	// ForceSendFields is a list of field names (e.g. "Ssml") to
6696	// unconditionally include in API requests. By default, fields with
6697	// empty values are omitted from API requests. However, any non-pointer,
6698	// non-interface field appearing in ForceSendFields will be sent to the
6699	// server regardless of whether the field is empty or not. This may be
6700	// used to include empty fields in Patch requests.
6701	ForceSendFields []string `json:"-"`
6702
6703	// NullFields is a list of field names (e.g. "Ssml") to include in API
6704	// requests with the JSON null value. By default, fields with empty
6705	// values are omitted from API requests. However, any field with an
6706	// empty value appearing in NullFields will be sent to the server as
6707	// null. It is an error if a field in this list has a non-empty value.
6708	// This may be used to include null fields in Patch requests.
6709	NullFields []string `json:"-"`
6710}
6711
6712func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech) MarshalJSON() ([]byte, error) {
6713	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
6714	raw := NoMethod(*s)
6715	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6716}
6717
6718// GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall:
6719// Transfers the call in Telephony Gateway.
6720type GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall struct {
6721	// PhoneNumber: Required. The phone number to transfer the call to
6722	// in [E.164 format](https://en.wikipedia.org/wiki/E.164).
6723	//
6724	// We currently only allow transferring to US numbers (+1xxxyyyzzzz).
6725	PhoneNumber string `json:"phoneNumber,omitempty"`
6726
6727	// ForceSendFields is a list of field names (e.g. "PhoneNumber") to
6728	// unconditionally include in API requests. By default, fields with
6729	// empty values are omitted from API requests. However, any non-pointer,
6730	// non-interface field appearing in ForceSendFields will be sent to the
6731	// server regardless of whether the field is empty or not. This may be
6732	// used to include empty fields in Patch requests.
6733	ForceSendFields []string `json:"-"`
6734
6735	// NullFields is a list of field names (e.g. "PhoneNumber") to include
6736	// in API requests with the JSON null value. By default, fields with
6737	// empty values are omitted from API requests. However, any field with
6738	// an empty value appearing in NullFields will be sent to the server as
6739	// null. It is an error if a field in this list has a non-empty value.
6740	// This may be used to include null fields in Patch requests.
6741	NullFields []string `json:"-"`
6742}
6743
6744func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall) MarshalJSON() ([]byte, error) {
6745	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
6746	raw := NoMethod(*s)
6747	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6748}
6749
6750// GoogleCloudDialogflowV2beta1IntentMessageText: The text response
6751// message.
6752type GoogleCloudDialogflowV2beta1IntentMessageText struct {
6753	// Text: Optional. The collection of the agent's responses.
6754	Text []string `json:"text,omitempty"`
6755
6756	// ForceSendFields is a list of field names (e.g. "Text") to
6757	// unconditionally include in API requests. By default, fields with
6758	// empty values are omitted from API requests. However, any non-pointer,
6759	// non-interface field appearing in ForceSendFields will be sent to the
6760	// server regardless of whether the field is empty or not. This may be
6761	// used to include empty fields in Patch requests.
6762	ForceSendFields []string `json:"-"`
6763
6764	// NullFields is a list of field names (e.g. "Text") to include in API
6765	// requests with the JSON null value. By default, fields with empty
6766	// values are omitted from API requests. However, any field with an
6767	// empty value appearing in NullFields will be sent to the server as
6768	// null. It is an error if a field in this list has a non-empty value.
6769	// This may be used to include null fields in Patch requests.
6770	NullFields []string `json:"-"`
6771}
6772
6773func (s *GoogleCloudDialogflowV2beta1IntentMessageText) MarshalJSON() ([]byte, error) {
6774	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageText
6775	raw := NoMethod(*s)
6776	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6777}
6778
6779// GoogleCloudDialogflowV2beta1IntentParameter: Represents intent
6780// parameters.
6781type GoogleCloudDialogflowV2beta1IntentParameter struct {
6782	// DefaultValue: Optional. The default value to use when the `value`
6783	// yields an empty
6784	// result.
6785	// Default values can be extracted from contexts by using the
6786	// following
6787	// syntax: `#context_name.parameter_name`.
6788	DefaultValue string `json:"defaultValue,omitempty"`
6789
6790	// DisplayName: Required. The name of the parameter.
6791	DisplayName string `json:"displayName,omitempty"`
6792
6793	// EntityTypeDisplayName: Optional. The name of the entity type,
6794	// prefixed with `@`, that
6795	// describes values of the parameter. If the parameter is
6796	// required, this must be provided.
6797	EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"`
6798
6799	// IsList: Optional. Indicates whether the parameter represents a list
6800	// of values.
6801	IsList bool `json:"isList,omitempty"`
6802
6803	// Mandatory: Optional. Indicates whether the parameter is required.
6804	// That is,
6805	// whether the intent cannot be completed without collecting the
6806	// parameter
6807	// value.
6808	Mandatory bool `json:"mandatory,omitempty"`
6809
6810	// Name: The unique identifier of this parameter.
6811	Name string `json:"name,omitempty"`
6812
6813	// Prompts: Optional. The collection of prompts that the agent can
6814	// present to the
6815	// user in order to collect a value for the parameter.
6816	Prompts []string `json:"prompts,omitempty"`
6817
6818	// Value: Optional. The definition of the parameter value. It can be:
6819	// - a constant string,
6820	// - a parameter value defined as `$parameter_name`,
6821	// - an original parameter value defined as
6822	// `$parameter_name.original`,
6823	// - a parameter value from some context defined as
6824	//   `#context_name.parameter_name`.
6825	Value string `json:"value,omitempty"`
6826
6827	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
6828	// unconditionally include in API requests. By default, fields with
6829	// empty values are omitted from API requests. However, any non-pointer,
6830	// non-interface field appearing in ForceSendFields will be sent to the
6831	// server regardless of whether the field is empty or not. This may be
6832	// used to include empty fields in Patch requests.
6833	ForceSendFields []string `json:"-"`
6834
6835	// NullFields is a list of field names (e.g. "DefaultValue") to include
6836	// in API requests with the JSON null value. By default, fields with
6837	// empty values are omitted from API requests. However, any field with
6838	// an empty value appearing in NullFields will be sent to the server as
6839	// null. It is an error if a field in this list has a non-empty value.
6840	// This may be used to include null fields in Patch requests.
6841	NullFields []string `json:"-"`
6842}
6843
6844func (s *GoogleCloudDialogflowV2beta1IntentParameter) MarshalJSON() ([]byte, error) {
6845	type NoMethod GoogleCloudDialogflowV2beta1IntentParameter
6846	raw := NoMethod(*s)
6847	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6848}
6849
6850// GoogleCloudDialogflowV2beta1IntentTrainingPhrase: Represents an
6851// example that the agent is trained on.
6852type GoogleCloudDialogflowV2beta1IntentTrainingPhrase struct {
6853	// Name: Output only. The unique identifier of this training phrase.
6854	Name string `json:"name,omitempty"`
6855
6856	// Parts: Required. The ordered list of training phrase parts.
6857	// The parts are concatenated in order to form the training
6858	// phrase.
6859	//
6860	// Note: The API does not automatically annotate training phrases like
6861	// the
6862	// Dialogflow Console does.
6863	//
6864	// Note: Do not forget to include whitespace at part boundaries,
6865	// so the training phrase is well formatted when the parts are
6866	// concatenated.
6867	//
6868	// If the training phrase does not need to be annotated with
6869	// parameters,
6870	// you just need a single part with only the Part.text field set.
6871	//
6872	// If you want to annotate the training phrase, you must create
6873	// multiple
6874	// parts, where the fields of each part are populated in one of two
6875	// ways:
6876	//
6877	// -   `Part.text` is set to a part of the phrase that has no
6878	// parameters.
6879	// -   `Part.text` is set to a part of the phrase that you want to
6880	// annotate,
6881	//     and the `entity_type`, `alias`, and `user_defined` fields are
6882	// all
6883	//     set.
6884	Parts []*GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart `json:"parts,omitempty"`
6885
6886	// TimesAddedCount: Optional. Indicates how many times this example was
6887	// added to
6888	// the intent. Each time a developer adds an existing sample by editing
6889	// an
6890	// intent or training, this counter is increased.
6891	TimesAddedCount int64 `json:"timesAddedCount,omitempty"`
6892
6893	// Type: Required. The type of the training phrase.
6894	//
6895	// Possible values:
6896	//   "TYPE_UNSPECIFIED" - Not specified. This value should never be
6897	// used.
6898	//   "EXAMPLE" - Examples do not contain @-prefixed entity type names,
6899	// but example parts
6900	// can be annotated with entity types.
6901	//   "TEMPLATE" - Templates are not annotated with entity types, but
6902	// they can contain
6903	// @-prefixed entity type names as substrings.
6904	// Template mode has been deprecated. Example mode is the only
6905	// supported
6906	// way to create new training phrases. If you have existing
6907	// training
6908	// phrases that you've created in template mode, those will continue
6909	// to
6910	// work.
6911	Type string `json:"type,omitempty"`
6912
6913	// ForceSendFields is a list of field names (e.g. "Name") to
6914	// unconditionally include in API requests. By default, fields with
6915	// empty values are omitted from API requests. However, any non-pointer,
6916	// non-interface field appearing in ForceSendFields will be sent to the
6917	// server regardless of whether the field is empty or not. This may be
6918	// used to include empty fields in Patch requests.
6919	ForceSendFields []string `json:"-"`
6920
6921	// NullFields is a list of field names (e.g. "Name") to include in API
6922	// requests with the JSON null value. By default, fields with empty
6923	// values are omitted from API requests. However, any field with an
6924	// empty value appearing in NullFields will be sent to the server as
6925	// null. It is an error if a field in this list has a non-empty value.
6926	// This may be used to include null fields in Patch requests.
6927	NullFields []string `json:"-"`
6928}
6929
6930func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
6931	type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrase
6932	raw := NoMethod(*s)
6933	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6934}
6935
6936// GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart: Represents a
6937// part of a training phrase.
6938type GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart struct {
6939	// Alias: Optional. The parameter name for the value extracted from
6940	// the
6941	// annotated part of the example.
6942	// This field is required for annotated parts of the training phrase.
6943	Alias string `json:"alias,omitempty"`
6944
6945	// EntityType: Optional. The entity type name prefixed with `@`.
6946	// This field is required for annotated parts of the training phrase.
6947	EntityType string `json:"entityType,omitempty"`
6948
6949	// Text: Required. The text for this part.
6950	Text string `json:"text,omitempty"`
6951
6952	// UserDefined: Optional. Indicates whether the text was manually
6953	// annotated.
6954	// This field is set to true when the Dialogflow Console is used
6955	// to
6956	// manually annotate the part. When creating an annotated part with
6957	// the
6958	// API, you must set this to true.
6959	UserDefined bool `json:"userDefined,omitempty"`
6960
6961	// ForceSendFields is a list of field names (e.g. "Alias") 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. "Alias") to include in API
6970	// 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 *GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
6979	type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
6980	raw := NoMethod(*s)
6981	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6982}
6983
6984// GoogleCloudDialogflowV2beta1KnowledgeAnswers: Represents the result
6985// of querying a Knowledge base.
6986type GoogleCloudDialogflowV2beta1KnowledgeAnswers struct {
6987	// Answers: A list of answers from Knowledge Connector.
6988	Answers []*GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer `json:"answers,omitempty"`
6989
6990	// ForceSendFields is a list of field names (e.g. "Answers") to
6991	// unconditionally include in API requests. By default, fields with
6992	// empty values are omitted from API requests. However, any non-pointer,
6993	// non-interface field appearing in ForceSendFields will be sent to the
6994	// server regardless of whether the field is empty or not. This may be
6995	// used to include empty fields in Patch requests.
6996	ForceSendFields []string `json:"-"`
6997
6998	// NullFields is a list of field names (e.g. "Answers") to include in
6999	// API requests with the JSON null value. By default, fields with empty
7000	// values are omitted from API requests. However, any field with an
7001	// empty value appearing in NullFields will be sent to the server as
7002	// null. It is an error if a field in this list has a non-empty value.
7003	// This may be used to include null fields in Patch requests.
7004	NullFields []string `json:"-"`
7005}
7006
7007func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswers) MarshalJSON() ([]byte, error) {
7008	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswers
7009	raw := NoMethod(*s)
7010	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7011}
7012
7013// GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer: An answer from
7014// Knowledge Connector.
7015type GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer struct {
7016	// Answer: The piece of text from the `source` knowledge base document
7017	// that answers
7018	// this conversational query.
7019	Answer string `json:"answer,omitempty"`
7020
7021	// FaqQuestion: The corresponding FAQ question if the answer was
7022	// extracted from a FAQ
7023	// Document, empty otherwise.
7024	FaqQuestion string `json:"faqQuestion,omitempty"`
7025
7026	// MatchConfidence: The system's confidence score that this Knowledge
7027	// answer is a good match
7028	// for this conversational query.
7029	// The range is from 0.0 (completely uncertain) to 1.0 (completely
7030	// certain).
7031	// Note: The confidence score is likely to vary somewhat (possibly even
7032	// for
7033	// identical requests), as the underlying model is under
7034	// constant
7035	// improvement. It may be deprecated in the future. We recommend
7036	// using
7037	// `match_confidence_level` which should be generally more stable.
7038	MatchConfidence float64 `json:"matchConfidence,omitempty"`
7039
7040	// MatchConfidenceLevel: The system's confidence level that this
7041	// knowledge answer is a good match
7042	// for this conversational query.
7043	// NOTE: The confidence level for a given `<query, answer>` pair may
7044	// change
7045	// without notice, as it depends on models that are constantly
7046	// being
7047	// improved. However, it will change less frequently than the
7048	// confidence
7049	// score below, and should be preferred for referencing the quality of
7050	// an
7051	// answer.
7052	//
7053	// Possible values:
7054	//   "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED" - Not specified.
7055	//   "LOW" - Indicates that the confidence is low.
7056	//   "MEDIUM" - Indicates our confidence is medium.
7057	//   "HIGH" - Indicates our confidence is high.
7058	MatchConfidenceLevel string `json:"matchConfidenceLevel,omitempty"`
7059
7060	// Source: Indicates which Knowledge Document this answer was extracted
7061	// from.
7062	// Format: `projects/<Project ID>/knowledgeBases/<Knowledge
7063	// Base
7064	// ID>/documents/<Document ID>`.
7065	Source string `json:"source,omitempty"`
7066
7067	// ForceSendFields is a list of field names (e.g. "Answer") to
7068	// unconditionally include in API requests. By default, fields with
7069	// empty values are omitted from API requests. However, any non-pointer,
7070	// non-interface field appearing in ForceSendFields will be sent to the
7071	// server regardless of whether the field is empty or not. This may be
7072	// used to include empty fields in Patch requests.
7073	ForceSendFields []string `json:"-"`
7074
7075	// NullFields is a list of field names (e.g. "Answer") to include in API
7076	// requests with the JSON null value. By default, fields with empty
7077	// values are omitted from API requests. However, any field with an
7078	// empty value appearing in NullFields will be sent to the server as
7079	// null. It is an error if a field in this list has a non-empty value.
7080	// This may be used to include null fields in Patch requests.
7081	NullFields []string `json:"-"`
7082}
7083
7084func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) MarshalJSON() ([]byte, error) {
7085	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
7086	raw := NoMethod(*s)
7087	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7088}
7089
7090func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) UnmarshalJSON(data []byte) error {
7091	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
7092	var s1 struct {
7093		MatchConfidence gensupport.JSONFloat64 `json:"matchConfidence"`
7094		*NoMethod
7095	}
7096	s1.NoMethod = (*NoMethod)(s)
7097	if err := json.Unmarshal(data, &s1); err != nil {
7098		return err
7099	}
7100	s.MatchConfidence = float64(s1.MatchConfidence)
7101	return nil
7102}
7103
7104// GoogleCloudDialogflowV2beta1KnowledgeBase: Represents knowledge base
7105// resource.
7106//
7107// Note: The `projects.agent.knowledgeBases` resource is
7108// deprecated;
7109// only use `projects.knowledgeBases`.
7110type GoogleCloudDialogflowV2beta1KnowledgeBase struct {
7111	// DisplayName: Required. The display name of the knowledge base. The
7112	// name must be 1024
7113	// bytes or less; otherwise, the creation request fails.
7114	DisplayName string `json:"displayName,omitempty"`
7115
7116	// LanguageCode: Language which represents the KnowledgeBase. When the
7117	// KnowledgeBase is
7118	// created/updated, this is populated for all non en-us languages. If
7119	// not
7120	// populated, the default language en-us applies.
7121	LanguageCode string `json:"languageCode,omitempty"`
7122
7123	// Name: The knowledge base resource name.
7124	// The name must be empty when creating a knowledge base.
7125	// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
7126	Name string `json:"name,omitempty"`
7127
7128	// ServerResponse contains the HTTP response code and headers from the
7129	// server.
7130	googleapi.ServerResponse `json:"-"`
7131
7132	// ForceSendFields is a list of field names (e.g. "DisplayName") to
7133	// unconditionally include in API requests. By default, fields with
7134	// empty values are omitted from API requests. However, any non-pointer,
7135	// non-interface field appearing in ForceSendFields will be sent to the
7136	// server regardless of whether the field is empty or not. This may be
7137	// used to include empty fields in Patch requests.
7138	ForceSendFields []string `json:"-"`
7139
7140	// NullFields is a list of field names (e.g. "DisplayName") to include
7141	// in API requests with the JSON null value. By default, fields with
7142	// empty values are omitted from API requests. However, any field with
7143	// an empty value appearing in NullFields will be sent to the server as
7144	// null. It is an error if a field in this list has a non-empty value.
7145	// This may be used to include null fields in Patch requests.
7146	NullFields []string `json:"-"`
7147}
7148
7149func (s *GoogleCloudDialogflowV2beta1KnowledgeBase) MarshalJSON() ([]byte, error) {
7150	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeBase
7151	raw := NoMethod(*s)
7152	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7153}
7154
7155// GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata: Metadata in
7156// google::longrunning::Operation for Knowledge operations.
7157type GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata struct {
7158	// State: Required. The current state of this operation.
7159	//
7160	// Possible values:
7161	//   "STATE_UNSPECIFIED" - State unspecified.
7162	//   "PENDING" - The operation has been created.
7163	//   "RUNNING" - The operation is currently running.
7164	//   "DONE" - The operation is done, either cancelled or completed.
7165	State string `json:"state,omitempty"`
7166
7167	// ForceSendFields is a list of field names (e.g. "State") to
7168	// unconditionally include in API requests. By default, fields with
7169	// empty values are omitted from API requests. However, any non-pointer,
7170	// non-interface field appearing in ForceSendFields will be sent to the
7171	// server regardless of whether the field is empty or not. This may be
7172	// used to include empty fields in Patch requests.
7173	ForceSendFields []string `json:"-"`
7174
7175	// NullFields is a list of field names (e.g. "State") to include in API
7176	// requests with the JSON null value. By default, fields with empty
7177	// values are omitted from API requests. However, any field with an
7178	// empty value appearing in NullFields will be sent to the server as
7179	// null. It is an error if a field in this list has a non-empty value.
7180	// This may be used to include null fields in Patch requests.
7181	NullFields []string `json:"-"`
7182}
7183
7184func (s *GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata) MarshalJSON() ([]byte, error) {
7185	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
7186	raw := NoMethod(*s)
7187	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7188}
7189
7190// GoogleCloudDialogflowV2beta1LabelConversationResponse: The response
7191// for
7192// ConversationDatasets.LabelConversation
7193type GoogleCloudDialogflowV2beta1LabelConversationResponse struct {
7194	// AnnotatedConversationDataset: New annotated conversation dataset
7195	// created by the labeling task.
7196	AnnotatedConversationDataset *GoogleCloudDialogflowV2beta1AnnotatedConversationDataset `json:"annotatedConversationDataset,omitempty"`
7197
7198	// ForceSendFields is a list of field names (e.g.
7199	// "AnnotatedConversationDataset") to unconditionally include in API
7200	// requests. By default, fields with empty values are omitted from API
7201	// requests. However, any non-pointer, non-interface field appearing in
7202	// ForceSendFields will be sent to the server regardless of whether the
7203	// field is empty or not. This may be used to include empty fields in
7204	// Patch requests.
7205	ForceSendFields []string `json:"-"`
7206
7207	// NullFields is a list of field names (e.g.
7208	// "AnnotatedConversationDataset") to include in API requests with the
7209	// JSON null value. By default, fields with empty values are omitted
7210	// from API requests. However, any field with an empty value appearing
7211	// in NullFields will be sent to the server as null. It is an error if a
7212	// field in this list has a non-empty value. This may be used to include
7213	// null fields in Patch requests.
7214	NullFields []string `json:"-"`
7215}
7216
7217func (s *GoogleCloudDialogflowV2beta1LabelConversationResponse) MarshalJSON() ([]byte, error) {
7218	type NoMethod GoogleCloudDialogflowV2beta1LabelConversationResponse
7219	raw := NoMethod(*s)
7220	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7221}
7222
7223// GoogleCloudDialogflowV2beta1ListContextsResponse: The response
7224// message for Contexts.ListContexts.
7225type GoogleCloudDialogflowV2beta1ListContextsResponse struct {
7226	// Contexts: The list of contexts. There will be a maximum number of
7227	// items
7228	// returned based on the page_size field in the request.
7229	Contexts []*GoogleCloudDialogflowV2beta1Context `json:"contexts,omitempty"`
7230
7231	// NextPageToken: Token to retrieve the next page of results, or empty
7232	// if there are no
7233	// more results in the list.
7234	NextPageToken string `json:"nextPageToken,omitempty"`
7235
7236	// ServerResponse contains the HTTP response code and headers from the
7237	// server.
7238	googleapi.ServerResponse `json:"-"`
7239
7240	// ForceSendFields is a list of field names (e.g. "Contexts") to
7241	// unconditionally include in API requests. By default, fields with
7242	// empty values are omitted from API requests. However, any non-pointer,
7243	// non-interface field appearing in ForceSendFields will be sent to the
7244	// server regardless of whether the field is empty or not. This may be
7245	// used to include empty fields in Patch requests.
7246	ForceSendFields []string `json:"-"`
7247
7248	// NullFields is a list of field names (e.g. "Contexts") to include in
7249	// API requests with the JSON null value. By default, fields with empty
7250	// values are omitted from API requests. However, any field with an
7251	// empty value appearing in NullFields will be sent to the server as
7252	// null. It is an error if a field in this list has a non-empty value.
7253	// This may be used to include null fields in Patch requests.
7254	NullFields []string `json:"-"`
7255}
7256
7257func (s *GoogleCloudDialogflowV2beta1ListContextsResponse) MarshalJSON() ([]byte, error) {
7258	type NoMethod GoogleCloudDialogflowV2beta1ListContextsResponse
7259	raw := NoMethod(*s)
7260	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7261}
7262
7263// GoogleCloudDialogflowV2beta1ListDocumentsResponse: Response message
7264// for Documents.ListDocuments.
7265type GoogleCloudDialogflowV2beta1ListDocumentsResponse struct {
7266	// Documents: The list of documents.
7267	Documents []*GoogleCloudDialogflowV2beta1Document `json:"documents,omitempty"`
7268
7269	// NextPageToken: Token to retrieve the next page of results, or empty
7270	// if there are no
7271	// more results in the list.
7272	NextPageToken string `json:"nextPageToken,omitempty"`
7273
7274	// ServerResponse contains the HTTP response code and headers from the
7275	// server.
7276	googleapi.ServerResponse `json:"-"`
7277
7278	// ForceSendFields is a list of field names (e.g. "Documents") to
7279	// unconditionally include in API requests. By default, fields with
7280	// empty values are omitted from API requests. However, any non-pointer,
7281	// non-interface field appearing in ForceSendFields will be sent to the
7282	// server regardless of whether the field is empty or not. This may be
7283	// used to include empty fields in Patch requests.
7284	ForceSendFields []string `json:"-"`
7285
7286	// NullFields is a list of field names (e.g. "Documents") to include in
7287	// API requests with the JSON null value. By default, fields with empty
7288	// values are omitted from API requests. However, any field with an
7289	// empty value appearing in NullFields will be sent to the server as
7290	// null. It is an error if a field in this list has a non-empty value.
7291	// This may be used to include null fields in Patch requests.
7292	NullFields []string `json:"-"`
7293}
7294
7295func (s *GoogleCloudDialogflowV2beta1ListDocumentsResponse) MarshalJSON() ([]byte, error) {
7296	type NoMethod GoogleCloudDialogflowV2beta1ListDocumentsResponse
7297	raw := NoMethod(*s)
7298	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7299}
7300
7301// GoogleCloudDialogflowV2beta1ListEntityTypesResponse: The response
7302// message for EntityTypes.ListEntityTypes.
7303type GoogleCloudDialogflowV2beta1ListEntityTypesResponse struct {
7304	// EntityTypes: The list of agent entity types. There will be a maximum
7305	// number of items
7306	// returned based on the page_size field in the request.
7307	EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
7308
7309	// NextPageToken: Token to retrieve the next page of results, or empty
7310	// if there are no
7311	// more results in the list.
7312	NextPageToken string `json:"nextPageToken,omitempty"`
7313
7314	// ServerResponse contains the HTTP response code and headers from the
7315	// server.
7316	googleapi.ServerResponse `json:"-"`
7317
7318	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
7319	// unconditionally include in API requests. By default, fields with
7320	// empty values are omitted from API requests. However, any non-pointer,
7321	// non-interface field appearing in ForceSendFields will be sent to the
7322	// server regardless of whether the field is empty or not. This may be
7323	// used to include empty fields in Patch requests.
7324	ForceSendFields []string `json:"-"`
7325
7326	// NullFields is a list of field names (e.g. "EntityTypes") to include
7327	// in API requests with the JSON null value. By default, fields with
7328	// empty values are omitted from API requests. However, any field with
7329	// an empty value appearing in NullFields will be sent to the server as
7330	// null. It is an error if a field in this list has a non-empty value.
7331	// This may be used to include null fields in Patch requests.
7332	NullFields []string `json:"-"`
7333}
7334
7335func (s *GoogleCloudDialogflowV2beta1ListEntityTypesResponse) MarshalJSON() ([]byte, error) {
7336	type NoMethod GoogleCloudDialogflowV2beta1ListEntityTypesResponse
7337	raw := NoMethod(*s)
7338	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7339}
7340
7341// GoogleCloudDialogflowV2beta1ListIntentsResponse: The response message
7342// for Intents.ListIntents.
7343type GoogleCloudDialogflowV2beta1ListIntentsResponse struct {
7344	// Intents: The list of agent intents. There will be a maximum number of
7345	// items
7346	// returned based on the page_size field in the request.
7347	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
7348
7349	// NextPageToken: Token to retrieve the next page of results, or empty
7350	// if there are no
7351	// more results in the list.
7352	NextPageToken string `json:"nextPageToken,omitempty"`
7353
7354	// ServerResponse contains the HTTP response code and headers from the
7355	// server.
7356	googleapi.ServerResponse `json:"-"`
7357
7358	// ForceSendFields is a list of field names (e.g. "Intents") to
7359	// unconditionally include in API requests. By default, fields with
7360	// empty values are omitted from API requests. However, any non-pointer,
7361	// non-interface field appearing in ForceSendFields will be sent to the
7362	// server regardless of whether the field is empty or not. This may be
7363	// used to include empty fields in Patch requests.
7364	ForceSendFields []string `json:"-"`
7365
7366	// NullFields is a list of field names (e.g. "Intents") to include in
7367	// API requests with the JSON null value. By default, fields with empty
7368	// values are omitted from API requests. However, any field with an
7369	// empty value appearing in NullFields will be sent to the server as
7370	// null. It is an error if a field in this list has a non-empty value.
7371	// This may be used to include null fields in Patch requests.
7372	NullFields []string `json:"-"`
7373}
7374
7375func (s *GoogleCloudDialogflowV2beta1ListIntentsResponse) MarshalJSON() ([]byte, error) {
7376	type NoMethod GoogleCloudDialogflowV2beta1ListIntentsResponse
7377	raw := NoMethod(*s)
7378	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7379}
7380
7381// GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse: Response
7382// message for KnowledgeBases.ListKnowledgeBases.
7383type GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse struct {
7384	// KnowledgeBases: The list of knowledge bases.
7385	KnowledgeBases []*GoogleCloudDialogflowV2beta1KnowledgeBase `json:"knowledgeBases,omitempty"`
7386
7387	// NextPageToken: Token to retrieve the next page of results, or empty
7388	// if there are no
7389	// more results in the list.
7390	NextPageToken string `json:"nextPageToken,omitempty"`
7391
7392	// ServerResponse contains the HTTP response code and headers from the
7393	// server.
7394	googleapi.ServerResponse `json:"-"`
7395
7396	// ForceSendFields is a list of field names (e.g. "KnowledgeBases") to
7397	// unconditionally include in API requests. By default, fields with
7398	// empty values are omitted from API requests. However, any non-pointer,
7399	// non-interface field appearing in ForceSendFields will be sent to the
7400	// server regardless of whether the field is empty or not. This may be
7401	// used to include empty fields in Patch requests.
7402	ForceSendFields []string `json:"-"`
7403
7404	// NullFields is a list of field names (e.g. "KnowledgeBases") to
7405	// include in API requests with the JSON null value. By default, fields
7406	// with empty values are omitted from API requests. However, any field
7407	// with an empty value appearing in NullFields will be sent to the
7408	// server as null. It is an error if a field in this list has a
7409	// non-empty value. This may be used to include null fields in Patch
7410	// requests.
7411	NullFields []string `json:"-"`
7412}
7413
7414func (s *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse) MarshalJSON() ([]byte, error) {
7415	type NoMethod GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse
7416	raw := NoMethod(*s)
7417	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7418}
7419
7420// GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse: The
7421// response message for SessionEntityTypes.ListSessionEntityTypes.
7422type GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse struct {
7423	// NextPageToken: Token to retrieve the next page of results, or empty
7424	// if there are no
7425	// more results in the list.
7426	NextPageToken string `json:"nextPageToken,omitempty"`
7427
7428	// SessionEntityTypes: The list of session entity types. There will be a
7429	// maximum number of items
7430	// returned based on the page_size field in the request.
7431	SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"`
7432
7433	// ServerResponse contains the HTTP response code and headers from the
7434	// server.
7435	googleapi.ServerResponse `json:"-"`
7436
7437	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
7438	// unconditionally include in API requests. By default, fields with
7439	// empty values are omitted from API requests. However, any non-pointer,
7440	// non-interface field appearing in ForceSendFields will be sent to the
7441	// server regardless of whether the field is empty or not. This may be
7442	// used to include empty fields in Patch requests.
7443	ForceSendFields []string `json:"-"`
7444
7445	// NullFields is a list of field names (e.g. "NextPageToken") to include
7446	// in API requests with the JSON null value. By default, fields with
7447	// empty values are omitted from API requests. However, any field with
7448	// an empty value appearing in NullFields will be sent to the server as
7449	// null. It is an error if a field in this list has a non-empty value.
7450	// This may be used to include null fields in Patch requests.
7451	NullFields []string `json:"-"`
7452}
7453
7454func (s *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) MarshalJSON() ([]byte, error) {
7455	type NoMethod GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse
7456	raw := NoMethod(*s)
7457	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7458}
7459
7460// GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest: Represents
7461// the contents of the original request that was passed to
7462// the `[Streaming]DetectIntent` call.
7463type GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest struct {
7464	// Payload: Optional. This field is set to the value of the
7465	// `QueryParameters.payload`
7466	// field passed in the request. Some integrations that query a
7467	// Dialogflow
7468	// agent may provide additional information in the payload.
7469	//
7470	// In particular for the Telephony Gateway this field has the
7471	// form:
7472	// <pre>{
7473	//  "telephony": {
7474	//    "caller_id": "+18558363987"
7475	//  }
7476	// }</pre>
7477	// Note: The caller ID field (`caller_id`) will be redacted for
7478	// Standard
7479	// Edition agents and populated with the caller ID in
7480	// [E.164
7481	// format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition
7482	// agents.
7483	Payload googleapi.RawMessage `json:"payload,omitempty"`
7484
7485	// Source: The source of this request, e.g., `google`, `facebook`,
7486	// `slack`. It is set
7487	// by Dialogflow-owned servers.
7488	Source string `json:"source,omitempty"`
7489
7490	// Version: Optional. The version of the protocol used for this
7491	// request.
7492	// This field is AoG-specific.
7493	Version string `json:"version,omitempty"`
7494
7495	// ForceSendFields is a list of field names (e.g. "Payload") to
7496	// unconditionally include in API requests. By default, fields with
7497	// empty values are omitted from API requests. However, any non-pointer,
7498	// non-interface field appearing in ForceSendFields will be sent to the
7499	// server regardless of whether the field is empty or not. This may be
7500	// used to include empty fields in Patch requests.
7501	ForceSendFields []string `json:"-"`
7502
7503	// NullFields is a list of field names (e.g. "Payload") to include in
7504	// API requests with the JSON null value. By default, fields with empty
7505	// values are omitted from API requests. However, any field with an
7506	// empty value appearing in NullFields will be sent to the server as
7507	// null. It is an error if a field in this list has a non-empty value.
7508	// This may be used to include null fields in Patch requests.
7509	NullFields []string `json:"-"`
7510}
7511
7512func (s *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) {
7513	type NoMethod GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
7514	raw := NoMethod(*s)
7515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7516}
7517
7518// GoogleCloudDialogflowV2beta1OutputAudioConfig: Instructs the speech
7519// synthesizer how to generate the output audio content.
7520type GoogleCloudDialogflowV2beta1OutputAudioConfig struct {
7521	// AudioEncoding: Required. Audio encoding of the synthesized audio
7522	// content.
7523	//
7524	// Possible values:
7525	//   "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" - Not specified.
7526	//   "OUTPUT_AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
7527	// little-endian samples (Linear PCM).
7528	// Audio content returned as LINEAR16 also contains a WAV header.
7529	//   "OUTPUT_AUDIO_ENCODING_MP3" - MP3 audio at 32kbps.
7530	//   "OUTPUT_AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio wrapped in an
7531	// ogg container. The result will be a
7532	// file which can be played natively on Android, and in browsers (at
7533	// least
7534	// Chrome and Firefox). The quality of the encoding is considerably
7535	// higher
7536	// than MP3 while using approximately the same bitrate.
7537	AudioEncoding string `json:"audioEncoding,omitempty"`
7538
7539	// SampleRateHertz: Optional. The synthesis sample rate (in hertz) for
7540	// this audio. If not
7541	// provided, then the synthesizer will use the default sample rate based
7542	// on
7543	// the audio encoding. If this is different from the voice's natural
7544	// sample
7545	// rate, then the synthesizer will honor this request by converting to
7546	// the
7547	// desired sample rate (which might result in worse audio quality).
7548	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
7549
7550	// SynthesizeSpeechConfig: Optional. Configuration of how speech should
7551	// be synthesized.
7552	SynthesizeSpeechConfig *GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig `json:"synthesizeSpeechConfig,omitempty"`
7553
7554	// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
7555	// unconditionally include in API requests. By default, fields with
7556	// empty values are omitted from API requests. However, any non-pointer,
7557	// non-interface field appearing in ForceSendFields will be sent to the
7558	// server regardless of whether the field is empty or not. This may be
7559	// used to include empty fields in Patch requests.
7560	ForceSendFields []string `json:"-"`
7561
7562	// NullFields is a list of field names (e.g. "AudioEncoding") to include
7563	// in API requests with the JSON null value. By default, fields with
7564	// empty values are omitted from API requests. However, any field with
7565	// an empty value appearing in NullFields will be sent to the server as
7566	// null. It is an error if a field in this list has a non-empty value.
7567	// This may be used to include null fields in Patch requests.
7568	NullFields []string `json:"-"`
7569}
7570
7571func (s *GoogleCloudDialogflowV2beta1OutputAudioConfig) MarshalJSON() ([]byte, error) {
7572	type NoMethod GoogleCloudDialogflowV2beta1OutputAudioConfig
7573	raw := NoMethod(*s)
7574	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7575}
7576
7577// GoogleCloudDialogflowV2beta1QueryInput: Represents the query input.
7578// It can contain either:
7579//
7580// 1.  An audio config which
7581//     instructs the speech recognizer how to process the speech
7582// audio.
7583//
7584// 2.  A conversational query in the form of text.
7585//
7586// 3.  An event that specifies which intent to trigger.
7587type GoogleCloudDialogflowV2beta1QueryInput struct {
7588	// AudioConfig: Instructs the speech recognizer how to process the
7589	// speech audio.
7590	AudioConfig *GoogleCloudDialogflowV2beta1InputAudioConfig `json:"audioConfig,omitempty"`
7591
7592	// Event: The event to be processed.
7593	Event *GoogleCloudDialogflowV2beta1EventInput `json:"event,omitempty"`
7594
7595	// Text: The natural language text to be processed.
7596	Text *GoogleCloudDialogflowV2beta1TextInput `json:"text,omitempty"`
7597
7598	// ForceSendFields is a list of field names (e.g. "AudioConfig") to
7599	// unconditionally include in API requests. By default, fields with
7600	// empty values are omitted from API requests. However, any non-pointer,
7601	// non-interface field appearing in ForceSendFields will be sent to the
7602	// server regardless of whether the field is empty or not. This may be
7603	// used to include empty fields in Patch requests.
7604	ForceSendFields []string `json:"-"`
7605
7606	// NullFields is a list of field names (e.g. "AudioConfig") to include
7607	// in API requests with the JSON null value. By default, fields with
7608	// empty values are omitted from API requests. However, any field with
7609	// an empty value appearing in NullFields will be sent to the server as
7610	// null. It is an error if a field in this list has a non-empty value.
7611	// This may be used to include null fields in Patch requests.
7612	NullFields []string `json:"-"`
7613}
7614
7615func (s *GoogleCloudDialogflowV2beta1QueryInput) MarshalJSON() ([]byte, error) {
7616	type NoMethod GoogleCloudDialogflowV2beta1QueryInput
7617	raw := NoMethod(*s)
7618	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7619}
7620
7621// GoogleCloudDialogflowV2beta1QueryParameters: Represents the
7622// parameters of the conversational query.
7623type GoogleCloudDialogflowV2beta1QueryParameters struct {
7624	// Contexts: Optional. The collection of contexts to be activated before
7625	// this query is
7626	// executed.
7627	Contexts []*GoogleCloudDialogflowV2beta1Context `json:"contexts,omitempty"`
7628
7629	// GeoLocation: Optional. The geo location of this conversational query.
7630	GeoLocation *GoogleTypeLatLng `json:"geoLocation,omitempty"`
7631
7632	// KnowledgeBaseNames: Optional. KnowledgeBases to get alternative
7633	// results from. If not set, the
7634	// KnowledgeBases enabled in the agent (through UI) will be
7635	// used.
7636	// Format:  `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
7637	KnowledgeBaseNames []string `json:"knowledgeBaseNames,omitempty"`
7638
7639	// Payload: Optional. This field can be used to pass custom data into
7640	// the webhook
7641	// associated with the agent. Arbitrary JSON objects are supported.
7642	Payload googleapi.RawMessage `json:"payload,omitempty"`
7643
7644	// ResetContexts: Optional. Specifies whether to delete all contexts in
7645	// the current session
7646	// before the new ones are activated.
7647	ResetContexts bool `json:"resetContexts,omitempty"`
7648
7649	// SentimentAnalysisRequestConfig: Optional. Configures the type of
7650	// sentiment analysis to perform. If not
7651	// provided, sentiment analysis is not performed.
7652	// Note: Sentiment Analysis is only currently available for Enterprise
7653	// Edition
7654	// agents.
7655	SentimentAnalysisRequestConfig *GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig `json:"sentimentAnalysisRequestConfig,omitempty"`
7656
7657	// SessionEntityTypes: Optional. Additional session entity types to
7658	// replace or extend developer
7659	// entity types with. The entity synonyms apply to all languages and
7660	// persist
7661	// for the session of this query.
7662	SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"`
7663
7664	// TimeZone: Optional. The time zone of this conversational query from
7665	// the
7666	// [time zone database](https://www.iana.org/time-zones),
7667	// e.g.,
7668	// America/New_York, Europe/Paris. If not provided, the time zone
7669	// specified in
7670	// agent settings is used.
7671	TimeZone string `json:"timeZone,omitempty"`
7672
7673	// WebhookHeaders: Optional. This field can be used to pass HTTP headers
7674	// for a webhook
7675	// call. These headers will be sent to webhook alone with the headers
7676	// that
7677	// have been configured through Dialogflow web console. The headers
7678	// defined
7679	// within this field will overwrite the headers configured through
7680	// Dialogflow
7681	// console if there is a conflict. Header names are
7682	// case-insensitive.
7683	// Google's specified headers are not allowed. Including:
7684	// "Host",
7685	// "Content-Length", "Connection", "From", "User-Agent",
7686	// "Accept-Encoding",
7687	// "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc.
7688	WebhookHeaders map[string]string `json:"webhookHeaders,omitempty"`
7689
7690	// ForceSendFields is a list of field names (e.g. "Contexts") to
7691	// unconditionally include in API requests. By default, fields with
7692	// empty values are omitted from API requests. However, any non-pointer,
7693	// non-interface field appearing in ForceSendFields will be sent to the
7694	// server regardless of whether the field is empty or not. This may be
7695	// used to include empty fields in Patch requests.
7696	ForceSendFields []string `json:"-"`
7697
7698	// NullFields is a list of field names (e.g. "Contexts") to include in
7699	// API requests with the JSON null value. By default, fields with empty
7700	// values are omitted from API requests. However, any field with an
7701	// empty value appearing in NullFields will be sent to the server as
7702	// null. It is an error if a field in this list has a non-empty value.
7703	// This may be used to include null fields in Patch requests.
7704	NullFields []string `json:"-"`
7705}
7706
7707func (s *GoogleCloudDialogflowV2beta1QueryParameters) MarshalJSON() ([]byte, error) {
7708	type NoMethod GoogleCloudDialogflowV2beta1QueryParameters
7709	raw := NoMethod(*s)
7710	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7711}
7712
7713// GoogleCloudDialogflowV2beta1QueryResult: Represents the result of
7714// conversational query or event processing.
7715type GoogleCloudDialogflowV2beta1QueryResult struct {
7716	// Action: The action name from the matched intent.
7717	Action string `json:"action,omitempty"`
7718
7719	// AllRequiredParamsPresent: This field is set to:
7720	//
7721	// - `false` if the matched intent has required parameters and not all
7722	// of
7723	//    the required parameter values have been collected.
7724	// - `true` if all required parameter values have been collected, or if
7725	// the
7726	//    matched intent doesn't contain any required parameters.
7727	AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"`
7728
7729	// DiagnosticInfo: The free-form diagnostic info. For example, this
7730	// field could contain
7731	// webhook call latency. The string keys of the Struct's fields map can
7732	// change
7733	// without notice.
7734	DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
7735
7736	// FulfillmentMessages: The collection of rich messages to present to
7737	// the user.
7738	FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"`
7739
7740	// FulfillmentText: The text to be pronounced to the user or shown on
7741	// the screen.
7742	// Note: This is a legacy field, `fulfillment_messages` should be
7743	// preferred.
7744	FulfillmentText string `json:"fulfillmentText,omitempty"`
7745
7746	// Intent: The intent that matched the conversational query. Some,
7747	// not
7748	// all fields are filled in this message, including but not limited
7749	// to:
7750	// `name`, `display_name`, `end_interaction` and `is_fallback`.
7751	Intent *GoogleCloudDialogflowV2beta1Intent `json:"intent,omitempty"`
7752
7753	// IntentDetectionConfidence: The intent detection confidence. Values
7754	// range from 0.0
7755	// (completely uncertain) to 1.0 (completely certain).
7756	// This value is for informational purpose only and is only used to
7757	// help match the best intent within the classification threshold.
7758	// This value may change for the same end-user expression at any time
7759	// due to a
7760	// model retraining or change in implementation.
7761	// If there are `multiple knowledge_answers` messages, this value is set
7762	// to
7763	// the greatest `knowledgeAnswers.match_confidence` value in the list.
7764	IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"`
7765
7766	// KnowledgeAnswers: The result from Knowledge Connector (if any),
7767	// ordered by decreasing
7768	// `KnowledgeAnswers.match_confidence`.
7769	KnowledgeAnswers *GoogleCloudDialogflowV2beta1KnowledgeAnswers `json:"knowledgeAnswers,omitempty"`
7770
7771	// LanguageCode: The language that was triggered during intent
7772	// detection.
7773	// See
7774	// [Language
7775	// Support](https://cloud.google.com/dialogflow/docs/reference/
7776	// language)
7777	// for a list of the currently supported language codes.
7778	LanguageCode string `json:"languageCode,omitempty"`
7779
7780	// OutputContexts: The collection of output contexts. If
7781	// applicable,
7782	// `output_contexts.parameters` contains entries with name
7783	// `<parameter name>.original` containing the original parameter
7784	// values
7785	// before the query.
7786	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
7787
7788	// Parameters: The collection of extracted parameters.
7789	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
7790
7791	// QueryText: The original conversational query text:
7792	//
7793	// - If natural language text was provided as input, `query_text`
7794	// contains
7795	//   a copy of the input.
7796	// - If natural language speech audio was provided as input,
7797	// `query_text`
7798	//   contains the speech recognition result. If speech recognizer
7799	// produced
7800	//   multiple alternatives, a particular one is picked.
7801	// - If automatic spell correction is enabled, `query_text` will contain
7802	// the
7803	//   corrected user input.
7804	QueryText string `json:"queryText,omitempty"`
7805
7806	// SentimentAnalysisResult: The sentiment analysis result, which depends
7807	// on the
7808	// `sentiment_analysis_request_config` specified in the request.
7809	SentimentAnalysisResult *GoogleCloudDialogflowV2beta1SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"`
7810
7811	// SpeechRecognitionConfidence: The Speech recognition confidence
7812	// between 0.0 and 1.0. A higher number
7813	// indicates an estimated greater likelihood that the recognized words
7814	// are
7815	// correct. The default of 0.0 is a sentinel value indicating that
7816	// confidence
7817	// was not set.
7818	//
7819	// This field is not guaranteed to be accurate or set. In particular
7820	// this
7821	// field isn't set for StreamingDetectIntent since the streaming
7822	// endpoint has
7823	// separate confidence estimates per portion of the audio
7824	// in
7825	// StreamingRecognitionResult.
7826	SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"`
7827
7828	// WebhookPayload: If the query was fulfilled by a webhook call, this
7829	// field is set to the
7830	// value of the `payload` field returned in the webhook response.
7831	WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"`
7832
7833	// WebhookSource: If the query was fulfilled by a webhook call, this
7834	// field is set to the
7835	// value of the `source` field returned in the webhook response.
7836	WebhookSource string `json:"webhookSource,omitempty"`
7837
7838	// ForceSendFields is a list of field names (e.g. "Action") to
7839	// unconditionally include in API requests. By default, fields with
7840	// empty values are omitted from API requests. However, any non-pointer,
7841	// non-interface field appearing in ForceSendFields will be sent to the
7842	// server regardless of whether the field is empty or not. This may be
7843	// used to include empty fields in Patch requests.
7844	ForceSendFields []string `json:"-"`
7845
7846	// NullFields is a list of field names (e.g. "Action") to include in API
7847	// requests with the JSON null value. By default, fields with empty
7848	// values are omitted from API requests. However, any field with an
7849	// empty value appearing in NullFields will be sent to the server as
7850	// null. It is an error if a field in this list has a non-empty value.
7851	// This may be used to include null fields in Patch requests.
7852	NullFields []string `json:"-"`
7853}
7854
7855func (s *GoogleCloudDialogflowV2beta1QueryResult) MarshalJSON() ([]byte, error) {
7856	type NoMethod GoogleCloudDialogflowV2beta1QueryResult
7857	raw := NoMethod(*s)
7858	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7859}
7860
7861func (s *GoogleCloudDialogflowV2beta1QueryResult) UnmarshalJSON(data []byte) error {
7862	type NoMethod GoogleCloudDialogflowV2beta1QueryResult
7863	var s1 struct {
7864		IntentDetectionConfidence   gensupport.JSONFloat64 `json:"intentDetectionConfidence"`
7865		SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"`
7866		*NoMethod
7867	}
7868	s1.NoMethod = (*NoMethod)(s)
7869	if err := json.Unmarshal(data, &s1); err != nil {
7870		return err
7871	}
7872	s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence)
7873	s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence)
7874	return nil
7875}
7876
7877// GoogleCloudDialogflowV2beta1ReloadDocumentRequest: Request message
7878// for Documents.ReloadDocument.
7879type GoogleCloudDialogflowV2beta1ReloadDocumentRequest struct {
7880	// GcsSource: The path of gcs source file for reloading document
7881	// content.
7882	GcsSource *GoogleCloudDialogflowV2beta1GcsSource `json:"gcsSource,omitempty"`
7883
7884	// ForceSendFields is a list of field names (e.g. "GcsSource") to
7885	// unconditionally include in API requests. By default, fields with
7886	// empty values are omitted from API requests. However, any non-pointer,
7887	// non-interface field appearing in ForceSendFields will be sent to the
7888	// server regardless of whether the field is empty or not. This may be
7889	// used to include empty fields in Patch requests.
7890	ForceSendFields []string `json:"-"`
7891
7892	// NullFields is a list of field names (e.g. "GcsSource") to include in
7893	// API requests with the JSON null value. By default, fields with empty
7894	// values are omitted from API requests. However, any field with an
7895	// empty value appearing in NullFields will be sent to the server as
7896	// null. It is an error if a field in this list has a non-empty value.
7897	// This may be used to include null fields in Patch requests.
7898	NullFields []string `json:"-"`
7899}
7900
7901func (s *GoogleCloudDialogflowV2beta1ReloadDocumentRequest) MarshalJSON() ([]byte, error) {
7902	type NoMethod GoogleCloudDialogflowV2beta1ReloadDocumentRequest
7903	raw := NoMethod(*s)
7904	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7905}
7906
7907// GoogleCloudDialogflowV2beta1RestoreAgentRequest: The request message
7908// for Agents.RestoreAgent.
7909type GoogleCloudDialogflowV2beta1RestoreAgentRequest struct {
7910	// AgentContent: Zip compressed raw byte content for agent.
7911	AgentContent string `json:"agentContent,omitempty"`
7912
7913	// AgentUri: The URI to a Google Cloud Storage file containing the agent
7914	// to restore.
7915	// Note: The URI must start with "gs://".
7916	AgentUri string `json:"agentUri,omitempty"`
7917
7918	// ForceSendFields is a list of field names (e.g. "AgentContent") to
7919	// unconditionally include in API requests. By default, fields with
7920	// empty values are omitted from API requests. However, any non-pointer,
7921	// non-interface field appearing in ForceSendFields will be sent to the
7922	// server regardless of whether the field is empty or not. This may be
7923	// used to include empty fields in Patch requests.
7924	ForceSendFields []string `json:"-"`
7925
7926	// NullFields is a list of field names (e.g. "AgentContent") to include
7927	// in API requests with the JSON null value. By default, fields with
7928	// empty values are omitted from API requests. However, any field with
7929	// an empty value appearing in NullFields will be sent to the server as
7930	// null. It is an error if a field in this list has a non-empty value.
7931	// This may be used to include null fields in Patch requests.
7932	NullFields []string `json:"-"`
7933}
7934
7935func (s *GoogleCloudDialogflowV2beta1RestoreAgentRequest) MarshalJSON() ([]byte, error) {
7936	type NoMethod GoogleCloudDialogflowV2beta1RestoreAgentRequest
7937	raw := NoMethod(*s)
7938	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7939}
7940
7941// GoogleCloudDialogflowV2beta1SearchAgentsResponse: The response
7942// message for Agents.SearchAgents.
7943type GoogleCloudDialogflowV2beta1SearchAgentsResponse struct {
7944	// Agents: The list of agents. There will be a maximum number of items
7945	// returned based
7946	// on the page_size field in the request.
7947	Agents []*GoogleCloudDialogflowV2beta1Agent `json:"agents,omitempty"`
7948
7949	// NextPageToken: Token to retrieve the next page of results, or empty
7950	// if there are no
7951	// more results in the list.
7952	NextPageToken string `json:"nextPageToken,omitempty"`
7953
7954	// ServerResponse contains the HTTP response code and headers from the
7955	// server.
7956	googleapi.ServerResponse `json:"-"`
7957
7958	// ForceSendFields is a list of field names (e.g. "Agents") to
7959	// unconditionally include in API requests. By default, fields with
7960	// empty values are omitted from API requests. However, any non-pointer,
7961	// non-interface field appearing in ForceSendFields will be sent to the
7962	// server regardless of whether the field is empty or not. This may be
7963	// used to include empty fields in Patch requests.
7964	ForceSendFields []string `json:"-"`
7965
7966	// NullFields is a list of field names (e.g. "Agents") to include in API
7967	// requests with the JSON null value. By default, fields with empty
7968	// values are omitted from API requests. However, any field with an
7969	// empty value appearing in NullFields will be sent to the server as
7970	// null. It is an error if a field in this list has a non-empty value.
7971	// This may be used to include null fields in Patch requests.
7972	NullFields []string `json:"-"`
7973}
7974
7975func (s *GoogleCloudDialogflowV2beta1SearchAgentsResponse) MarshalJSON() ([]byte, error) {
7976	type NoMethod GoogleCloudDialogflowV2beta1SearchAgentsResponse
7977	raw := NoMethod(*s)
7978	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7979}
7980
7981// GoogleCloudDialogflowV2beta1Sentiment: The sentiment, such as
7982// positive/negative feeling or association, for a unit
7983// of analysis, such as the query text.
7984type GoogleCloudDialogflowV2beta1Sentiment struct {
7985	// Magnitude: A non-negative number in the [0, +inf) range, which
7986	// represents the absolute
7987	// magnitude of sentiment, regardless of score (positive or negative).
7988	Magnitude float64 `json:"magnitude,omitempty"`
7989
7990	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0
7991	// (positive
7992	// sentiment).
7993	Score float64 `json:"score,omitempty"`
7994
7995	// ForceSendFields is a list of field names (e.g. "Magnitude") to
7996	// unconditionally include in API requests. By default, fields with
7997	// empty values are omitted from API requests. However, any non-pointer,
7998	// non-interface field appearing in ForceSendFields will be sent to the
7999	// server regardless of whether the field is empty or not. This may be
8000	// used to include empty fields in Patch requests.
8001	ForceSendFields []string `json:"-"`
8002
8003	// NullFields is a list of field names (e.g. "Magnitude") to include in
8004	// API requests with the JSON null value. By default, fields with empty
8005	// values are omitted from API requests. However, any field with an
8006	// empty value appearing in NullFields will be sent to the server as
8007	// null. It is an error if a field in this list has a non-empty value.
8008	// This may be used to include null fields in Patch requests.
8009	NullFields []string `json:"-"`
8010}
8011
8012func (s *GoogleCloudDialogflowV2beta1Sentiment) MarshalJSON() ([]byte, error) {
8013	type NoMethod GoogleCloudDialogflowV2beta1Sentiment
8014	raw := NoMethod(*s)
8015	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8016}
8017
8018func (s *GoogleCloudDialogflowV2beta1Sentiment) UnmarshalJSON(data []byte) error {
8019	type NoMethod GoogleCloudDialogflowV2beta1Sentiment
8020	var s1 struct {
8021		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
8022		Score     gensupport.JSONFloat64 `json:"score"`
8023		*NoMethod
8024	}
8025	s1.NoMethod = (*NoMethod)(s)
8026	if err := json.Unmarshal(data, &s1); err != nil {
8027		return err
8028	}
8029	s.Magnitude = float64(s1.Magnitude)
8030	s.Score = float64(s1.Score)
8031	return nil
8032}
8033
8034// GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig:
8035// Configures the types of sentiment analysis to perform.
8036type GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig struct {
8037	// AnalyzeQueryTextSentiment: Optional. Instructs the service to perform
8038	// sentiment analysis on
8039	// `query_text`. If not provided, sentiment analysis is not performed
8040	// on
8041	// `query_text`.
8042	AnalyzeQueryTextSentiment bool `json:"analyzeQueryTextSentiment,omitempty"`
8043
8044	// ForceSendFields is a list of field names (e.g.
8045	// "AnalyzeQueryTextSentiment") to unconditionally include in API
8046	// requests. By default, fields with empty values are omitted from API
8047	// requests. However, any non-pointer, non-interface field appearing in
8048	// ForceSendFields will be sent to the server regardless of whether the
8049	// field is empty or not. This may be used to include empty fields in
8050	// Patch requests.
8051	ForceSendFields []string `json:"-"`
8052
8053	// NullFields is a list of field names (e.g.
8054	// "AnalyzeQueryTextSentiment") to include in API requests with the JSON
8055	// null value. By default, fields with empty values are omitted from API
8056	// requests. However, any field with an empty value appearing in
8057	// NullFields will be sent to the server as null. It is an error if a
8058	// field in this list has a non-empty value. This may be used to include
8059	// null fields in Patch requests.
8060	NullFields []string `json:"-"`
8061}
8062
8063func (s *GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig) MarshalJSON() ([]byte, error) {
8064	type NoMethod GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig
8065	raw := NoMethod(*s)
8066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8067}
8068
8069// GoogleCloudDialogflowV2beta1SentimentAnalysisResult: The result of
8070// sentiment analysis as configured
8071// by
8072// `sentiment_analysis_request_config`.
8073type GoogleCloudDialogflowV2beta1SentimentAnalysisResult struct {
8074	// QueryTextSentiment: The sentiment analysis result for `query_text`.
8075	QueryTextSentiment *GoogleCloudDialogflowV2beta1Sentiment `json:"queryTextSentiment,omitempty"`
8076
8077	// ForceSendFields is a list of field names (e.g. "QueryTextSentiment")
8078	// to unconditionally include in API requests. By default, fields with
8079	// empty values are omitted from API requests. However, any non-pointer,
8080	// non-interface field appearing in ForceSendFields will be sent to the
8081	// server regardless of whether the field is empty or not. This may be
8082	// used to include empty fields in Patch requests.
8083	ForceSendFields []string `json:"-"`
8084
8085	// NullFields is a list of field names (e.g. "QueryTextSentiment") to
8086	// include in API requests with the JSON null value. By default, fields
8087	// with empty values are omitted from API requests. However, any field
8088	// with an empty value appearing in NullFields will be sent to the
8089	// server as null. It is an error if a field in this list has a
8090	// non-empty value. This may be used to include null fields in Patch
8091	// requests.
8092	NullFields []string `json:"-"`
8093}
8094
8095func (s *GoogleCloudDialogflowV2beta1SentimentAnalysisResult) MarshalJSON() ([]byte, error) {
8096	type NoMethod GoogleCloudDialogflowV2beta1SentimentAnalysisResult
8097	raw := NoMethod(*s)
8098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8099}
8100
8101// GoogleCloudDialogflowV2beta1SessionEntityType: Represents a session
8102// entity type.
8103//
8104// Extends or replaces a developer entity type at the user session level
8105// (we
8106// refer to the entity types defined at the agent level as "developer
8107// entity
8108// types").
8109//
8110// Note: session entity types apply to all queries, regardless of the
8111// language.
8112type GoogleCloudDialogflowV2beta1SessionEntityType struct {
8113	// Entities: Required. The collection of entities associated with this
8114	// session entity
8115	// type.
8116	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
8117
8118	// EntityOverrideMode: Required. Indicates whether the additional data
8119	// should override or
8120	// supplement the developer entity type definition.
8121	//
8122	// Possible values:
8123	//   "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value
8124	// should be never used.
8125	//   "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session
8126	// entities overrides the collection of entities
8127	// in the corresponding developer entity type.
8128	//   "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session
8129	// entities extends the collection of entities in
8130	// the corresponding developer entity type.
8131	//
8132	// Note: Even in this override mode calls to
8133	// `ListSessionEntityTypes`,
8134	// `GetSessionEntityType`, `CreateSessionEntityType`
8135	// and
8136	// `UpdateSessionEntityType` only return the additional entities added
8137	// in
8138	// this session entity type. If you want to get the supplemented
8139	// list,
8140	// please call EntityTypes.GetEntityType on the developer entity
8141	// type
8142	// and merge.
8143	EntityOverrideMode string `json:"entityOverrideMode,omitempty"`
8144
8145	// Name: Required. The unique identifier of this session entity type.
8146	// Format:
8147	// `projects/<Project ID>/agent/sessions/<Session
8148	// ID>/entityTypes/<Entity Type
8149	// Display Name>`, or
8150	// `projects/<Project ID>/agent/environments/<Environment
8151	// ID>/users/<User
8152	// ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`.
8153	// If `Environment ID` is not specified, we assume default
8154	// 'draft'
8155	// environment. If `User ID` is not specified, we assume default '-'
8156	// user.
8157	//
8158	// `<Entity Type Display Name>` must be the display name of an existing
8159	// entity
8160	// type in the same agent that will be overridden or supplemented.
8161	Name string `json:"name,omitempty"`
8162
8163	// ServerResponse contains the HTTP response code and headers from the
8164	// server.
8165	googleapi.ServerResponse `json:"-"`
8166
8167	// ForceSendFields is a list of field names (e.g. "Entities") to
8168	// unconditionally include in API requests. By default, fields with
8169	// empty values are omitted from API requests. However, any non-pointer,
8170	// non-interface field appearing in ForceSendFields will be sent to the
8171	// server regardless of whether the field is empty or not. This may be
8172	// used to include empty fields in Patch requests.
8173	ForceSendFields []string `json:"-"`
8174
8175	// NullFields is a list of field names (e.g. "Entities") to include in
8176	// API requests with the JSON null value. By default, fields with empty
8177	// values are omitted from API requests. However, any field with an
8178	// empty value appearing in NullFields will be sent to the server as
8179	// null. It is an error if a field in this list has a non-empty value.
8180	// This may be used to include null fields in Patch requests.
8181	NullFields []string `json:"-"`
8182}
8183
8184func (s *GoogleCloudDialogflowV2beta1SessionEntityType) MarshalJSON() ([]byte, error) {
8185	type NoMethod GoogleCloudDialogflowV2beta1SessionEntityType
8186	raw := NoMethod(*s)
8187	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8188}
8189
8190// GoogleCloudDialogflowV2beta1SpeechContext: Hints for the speech
8191// recognizer to help with recognition in a specific
8192// conversation state.
8193type GoogleCloudDialogflowV2beta1SpeechContext struct {
8194	// Boost: Optional. Boost for this context compared to other contexts:
8195	// * If the boost is positive, Dialogflow will increase the probability
8196	// that
8197	//   the phrases in this context are recognized over similar sounding
8198	// phrases.
8199	// * If the boost is unspecified or non-positive, Dialogflow will not
8200	// apply
8201	//   any boost.
8202	//
8203	// Dialogflow recommends that you use boosts in the range (0, 20] and
8204	// that you
8205	// find a value that fits your use case with binary search.
8206	Boost float64 `json:"boost,omitempty"`
8207
8208	// Phrases: Optional. A list of strings containing words and phrases
8209	// that the speech
8210	// recognizer should recognize with higher likelihood.
8211	//
8212	// This list can be used to:
8213	// * improve accuracy for words and phrases you expect the user to say,
8214	//   e.g. typical commands for your Dialogflow agent
8215	// * add additional words to the speech recognizer vocabulary
8216	// * ...
8217	//
8218	// See the [Cloud
8219	// Speech
8220	// documentation](https://cloud.google.com/speech-to-text/quotas) for
8221	// usage
8222	// limits.
8223	Phrases []string `json:"phrases,omitempty"`
8224
8225	// ForceSendFields is a list of field names (e.g. "Boost") to
8226	// unconditionally include in API requests. By default, fields with
8227	// empty values are omitted from API requests. However, any non-pointer,
8228	// non-interface field appearing in ForceSendFields will be sent to the
8229	// server regardless of whether the field is empty or not. This may be
8230	// used to include empty fields in Patch requests.
8231	ForceSendFields []string `json:"-"`
8232
8233	// NullFields is a list of field names (e.g. "Boost") to include in API
8234	// requests with the JSON null value. By default, fields with empty
8235	// values are omitted from API requests. However, any field with an
8236	// empty value appearing in NullFields will be sent to the server as
8237	// null. It is an error if a field in this list has a non-empty value.
8238	// This may be used to include null fields in Patch requests.
8239	NullFields []string `json:"-"`
8240}
8241
8242func (s *GoogleCloudDialogflowV2beta1SpeechContext) MarshalJSON() ([]byte, error) {
8243	type NoMethod GoogleCloudDialogflowV2beta1SpeechContext
8244	raw := NoMethod(*s)
8245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8246}
8247
8248func (s *GoogleCloudDialogflowV2beta1SpeechContext) UnmarshalJSON(data []byte) error {
8249	type NoMethod GoogleCloudDialogflowV2beta1SpeechContext
8250	var s1 struct {
8251		Boost gensupport.JSONFloat64 `json:"boost"`
8252		*NoMethod
8253	}
8254	s1.NoMethod = (*NoMethod)(s)
8255	if err := json.Unmarshal(data, &s1); err != nil {
8256		return err
8257	}
8258	s.Boost = float64(s1.Boost)
8259	return nil
8260}
8261
8262// GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig: Configuration of
8263// how speech should be synthesized.
8264type GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig struct {
8265	// EffectsProfileId: Optional. An identifier which selects 'audio
8266	// effects' profiles that are
8267	// applied on (post synthesized) text to speech. Effects are applied on
8268	// top of
8269	// each other in the order they are given.
8270	EffectsProfileId []string `json:"effectsProfileId,omitempty"`
8271
8272	// Pitch: Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means
8273	// increase 20
8274	// semitones from the original pitch. -20 means decrease 20 semitones
8275	// from the
8276	// original pitch.
8277	Pitch float64 `json:"pitch,omitempty"`
8278
8279	// SpeakingRate: Optional. Speaking rate/speed, in the range [0.25,
8280	// 4.0]. 1.0 is the normal
8281	// native speed supported by the specific voice. 2.0 is twice as fast,
8282	// and
8283	// 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed.
8284	// Any
8285	// other values < 0.25 or > 4.0 will return an error.
8286	SpeakingRate float64 `json:"speakingRate,omitempty"`
8287
8288	// Voice: Optional. The desired voice of the synthesized audio.
8289	Voice *GoogleCloudDialogflowV2beta1VoiceSelectionParams `json:"voice,omitempty"`
8290
8291	// VolumeGainDb: Optional. Volume gain (in dB) of the normal native
8292	// volume supported by the
8293	// specific voice, in the range [-96.0, 16.0]. If unset, or set to a
8294	// value of
8295	// 0.0 (dB), will play at normal native signal amplitude. A value of
8296	// -6.0 (dB)
8297	// will play at approximately half the amplitude of the normal native
8298	// signal
8299	// amplitude. A value of +6.0 (dB) will play at approximately twice
8300	// the
8301	// amplitude of the normal native signal amplitude. We strongly
8302	// recommend not
8303	// to exceed +10 (dB) as there's usually no effective increase in
8304	// loudness for
8305	// any value greater than that.
8306	VolumeGainDb float64 `json:"volumeGainDb,omitempty"`
8307
8308	// ForceSendFields is a list of field names (e.g. "EffectsProfileId") to
8309	// unconditionally include in API requests. By default, fields with
8310	// empty values are omitted from API requests. However, any non-pointer,
8311	// non-interface field appearing in ForceSendFields will be sent to the
8312	// server regardless of whether the field is empty or not. This may be
8313	// used to include empty fields in Patch requests.
8314	ForceSendFields []string `json:"-"`
8315
8316	// NullFields is a list of field names (e.g. "EffectsProfileId") to
8317	// include in API requests with the JSON null value. By default, fields
8318	// with empty values are omitted from API requests. However, any field
8319	// with an empty value appearing in NullFields will be sent to the
8320	// server as null. It is an error if a field in this list has a
8321	// non-empty value. This may be used to include null fields in Patch
8322	// requests.
8323	NullFields []string `json:"-"`
8324}
8325
8326func (s *GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig) MarshalJSON() ([]byte, error) {
8327	type NoMethod GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig
8328	raw := NoMethod(*s)
8329	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8330}
8331
8332func (s *GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig) UnmarshalJSON(data []byte) error {
8333	type NoMethod GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig
8334	var s1 struct {
8335		Pitch        gensupport.JSONFloat64 `json:"pitch"`
8336		SpeakingRate gensupport.JSONFloat64 `json:"speakingRate"`
8337		VolumeGainDb gensupport.JSONFloat64 `json:"volumeGainDb"`
8338		*NoMethod
8339	}
8340	s1.NoMethod = (*NoMethod)(s)
8341	if err := json.Unmarshal(data, &s1); err != nil {
8342		return err
8343	}
8344	s.Pitch = float64(s1.Pitch)
8345	s.SpeakingRate = float64(s1.SpeakingRate)
8346	s.VolumeGainDb = float64(s1.VolumeGainDb)
8347	return nil
8348}
8349
8350// GoogleCloudDialogflowV2beta1TextInput: Represents the natural
8351// language text to be processed.
8352type GoogleCloudDialogflowV2beta1TextInput struct {
8353	// LanguageCode: Required. The language of this conversational query.
8354	// See
8355	// [Language
8356	// Support](https://cloud.google.com/dialogflow/docs/reference/
8357	// language)
8358	// for a list of the currently supported language codes. Note that
8359	// queries in
8360	// the same session do not necessarily need to specify the same
8361	// language.
8362	LanguageCode string `json:"languageCode,omitempty"`
8363
8364	// Text: Required. The UTF-8 encoded natural language text to be
8365	// processed.
8366	// Text length must not exceed 256 characters.
8367	Text string `json:"text,omitempty"`
8368
8369	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
8370	// unconditionally include in API requests. By default, fields with
8371	// empty values are omitted from API requests. However, any non-pointer,
8372	// non-interface field appearing in ForceSendFields will be sent to the
8373	// server regardless of whether the field is empty or not. This may be
8374	// used to include empty fields in Patch requests.
8375	ForceSendFields []string `json:"-"`
8376
8377	// NullFields is a list of field names (e.g. "LanguageCode") to include
8378	// in API requests with the JSON null value. By default, fields with
8379	// empty values are omitted from API requests. However, any field with
8380	// an empty value appearing in NullFields will be sent to the server as
8381	// null. It is an error if a field in this list has a non-empty value.
8382	// This may be used to include null fields in Patch requests.
8383	NullFields []string `json:"-"`
8384}
8385
8386func (s *GoogleCloudDialogflowV2beta1TextInput) MarshalJSON() ([]byte, error) {
8387	type NoMethod GoogleCloudDialogflowV2beta1TextInput
8388	raw := NoMethod(*s)
8389	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8390}
8391
8392// GoogleCloudDialogflowV2beta1TrainAgentRequest: The request message
8393// for Agents.TrainAgent.
8394type GoogleCloudDialogflowV2beta1TrainAgentRequest struct {
8395}
8396
8397// GoogleCloudDialogflowV2beta1ValidationError: Represents a single
8398// validation error.
8399type GoogleCloudDialogflowV2beta1ValidationError struct {
8400	// Entries: The names of the entries that the error is associated
8401	// with.
8402	// Format:
8403	//
8404	// - "projects/<Project ID>/agent", if the error is associated with the
8405	// entire
8406	// agent.
8407	// - "projects/<Project ID>/agent/intents/<Intent ID>", if the error
8408	// is
8409	// associated with certain intents.
8410	// - "projects/<Project
8411	// ID>/agent/intents/<Intent Id>/trainingPhrases/<Training Phrase ID>",
8412	// if the
8413	// error is associated with certain intent training phrases.
8414	// - "projects/<Project ID>/agent/intents/<Intent
8415	// Id>/parameters/<Parameter
8416	// ID>", if the error is associated with certain intent parameters.
8417	// - "projects/<Project ID>/agent/entities/<Entity ID>", if the error
8418	// is
8419	// associated with certain entities.
8420	Entries []string `json:"entries,omitempty"`
8421
8422	// ErrorMessage: The detailed error messsage.
8423	ErrorMessage string `json:"errorMessage,omitempty"`
8424
8425	// Severity: The severity of the error.
8426	//
8427	// Possible values:
8428	//   "SEVERITY_UNSPECIFIED" - Not specified. This value should never be
8429	// used.
8430	//   "INFO" - The agent doesn't follow Dialogflow best practicies.
8431	//   "WARNING" - The agent may not behave as expected.
8432	//   "ERROR" - The agent may experience partial failures.
8433	//   "CRITICAL" - The agent may completely fail.
8434	Severity string `json:"severity,omitempty"`
8435
8436	// ForceSendFields is a list of field names (e.g. "Entries") to
8437	// unconditionally include in API requests. By default, fields with
8438	// empty values are omitted from API requests. However, any non-pointer,
8439	// non-interface field appearing in ForceSendFields will be sent to the
8440	// server regardless of whether the field is empty or not. This may be
8441	// used to include empty fields in Patch requests.
8442	ForceSendFields []string `json:"-"`
8443
8444	// NullFields is a list of field names (e.g. "Entries") to include in
8445	// API requests with the JSON null value. By default, fields with empty
8446	// values are omitted from API requests. However, any field with an
8447	// empty value appearing in NullFields will be sent to the server as
8448	// null. It is an error if a field in this list has a non-empty value.
8449	// This may be used to include null fields in Patch requests.
8450	NullFields []string `json:"-"`
8451}
8452
8453func (s *GoogleCloudDialogflowV2beta1ValidationError) MarshalJSON() ([]byte, error) {
8454	type NoMethod GoogleCloudDialogflowV2beta1ValidationError
8455	raw := NoMethod(*s)
8456	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8457}
8458
8459// GoogleCloudDialogflowV2beta1ValidationResult: Represents the output
8460// of agent validation.
8461type GoogleCloudDialogflowV2beta1ValidationResult struct {
8462	// ValidationErrors: Contains all validation errors.
8463	ValidationErrors []*GoogleCloudDialogflowV2beta1ValidationError `json:"validationErrors,omitempty"`
8464
8465	// ServerResponse contains the HTTP response code and headers from the
8466	// server.
8467	googleapi.ServerResponse `json:"-"`
8468
8469	// ForceSendFields is a list of field names (e.g. "ValidationErrors") to
8470	// unconditionally include in API requests. By default, fields with
8471	// empty values are omitted from API requests. However, any non-pointer,
8472	// non-interface field appearing in ForceSendFields will be sent to the
8473	// server regardless of whether the field is empty or not. This may be
8474	// used to include empty fields in Patch requests.
8475	ForceSendFields []string `json:"-"`
8476
8477	// NullFields is a list of field names (e.g. "ValidationErrors") to
8478	// include in API requests with the JSON null value. By default, fields
8479	// with empty values are omitted from API requests. However, any field
8480	// with an empty value appearing in NullFields will be sent to the
8481	// server as null. It is an error if a field in this list has a
8482	// non-empty value. This may be used to include null fields in Patch
8483	// requests.
8484	NullFields []string `json:"-"`
8485}
8486
8487func (s *GoogleCloudDialogflowV2beta1ValidationResult) MarshalJSON() ([]byte, error) {
8488	type NoMethod GoogleCloudDialogflowV2beta1ValidationResult
8489	raw := NoMethod(*s)
8490	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8491}
8492
8493// GoogleCloudDialogflowV2beta1VoiceSelectionParams: Description of
8494// which voice to use for speech synthesis.
8495type GoogleCloudDialogflowV2beta1VoiceSelectionParams struct {
8496	// Name: Optional. The name of the voice. If not set, the service will
8497	// choose a
8498	// voice based on the other parameters such as language_code
8499	// and
8500	// ssml_gender.
8501	Name string `json:"name,omitempty"`
8502
8503	// SsmlGender: Optional. The preferred gender of the voice. If not set,
8504	// the service will
8505	// choose a voice based on the other parameters such as language_code
8506	// and
8507	// name. Note that this is only a preference, not requirement. If
8508	// a
8509	// voice of the appropriate gender is not available, the synthesizer
8510	// should
8511	// substitute a voice with a different gender rather than failing the
8512	// request.
8513	//
8514	// Possible values:
8515	//   "SSML_VOICE_GENDER_UNSPECIFIED" - An unspecified gender, which
8516	// means that the client doesn't care which
8517	// gender the selected voice will have.
8518	//   "SSML_VOICE_GENDER_MALE" - A male voice.
8519	//   "SSML_VOICE_GENDER_FEMALE" - A female voice.
8520	//   "SSML_VOICE_GENDER_NEUTRAL" - A gender-neutral voice.
8521	SsmlGender string `json:"ssmlGender,omitempty"`
8522
8523	// ForceSendFields is a list of field names (e.g. "Name") to
8524	// unconditionally include in API requests. By default, fields with
8525	// empty values are omitted from API requests. However, any non-pointer,
8526	// non-interface field appearing in ForceSendFields will be sent to the
8527	// server regardless of whether the field is empty or not. This may be
8528	// used to include empty fields in Patch requests.
8529	ForceSendFields []string `json:"-"`
8530
8531	// NullFields is a list of field names (e.g. "Name") to include in API
8532	// requests with the JSON null value. By default, fields with empty
8533	// values are omitted from API requests. However, any field with an
8534	// empty value appearing in NullFields will be sent to the server as
8535	// null. It is an error if a field in this list has a non-empty value.
8536	// This may be used to include null fields in Patch requests.
8537	NullFields []string `json:"-"`
8538}
8539
8540func (s *GoogleCloudDialogflowV2beta1VoiceSelectionParams) MarshalJSON() ([]byte, error) {
8541	type NoMethod GoogleCloudDialogflowV2beta1VoiceSelectionParams
8542	raw := NoMethod(*s)
8543	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8544}
8545
8546// GoogleCloudDialogflowV2beta1WebhookRequest: The request message for a
8547// webhook call.
8548type GoogleCloudDialogflowV2beta1WebhookRequest struct {
8549	// AlternativeQueryResults: Alternative query results from
8550	// KnowledgeService.
8551	AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"`
8552
8553	// OriginalDetectIntentRequest: Optional. The contents of the original
8554	// request that was passed to
8555	// `[Streaming]DetectIntent` call.
8556	OriginalDetectIntentRequest *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"`
8557
8558	// QueryResult: The result of the conversational query or event
8559	// processing. Contains the
8560	// same value as `[Streaming]DetectIntentResponse.query_result`.
8561	QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"`
8562
8563	// ResponseId: The unique identifier of the response. Contains the same
8564	// value as
8565	// `[Streaming]DetectIntentResponse.response_id`.
8566	ResponseId string `json:"responseId,omitempty"`
8567
8568	// Session: The unique identifier of detectIntent request session.
8569	// Can be used to identify end-user inside webhook
8570	// implementation.
8571	// Format: `projects/<Project ID>/agent/sessions/<Session ID>`,
8572	// or
8573	// `projects/<Project ID>/agent/environments/<Environment
8574	// ID>/users/<User
8575	// ID>/sessions/<Session ID>`.
8576	Session string `json:"session,omitempty"`
8577
8578	// ForceSendFields is a list of field names (e.g.
8579	// "AlternativeQueryResults") to unconditionally include in API
8580	// requests. By default, fields with empty values are omitted from API
8581	// requests. However, any non-pointer, non-interface field appearing in
8582	// ForceSendFields will be sent to the server regardless of whether the
8583	// field is empty or not. This may be used to include empty fields in
8584	// Patch requests.
8585	ForceSendFields []string `json:"-"`
8586
8587	// NullFields is a list of field names (e.g. "AlternativeQueryResults")
8588	// to include in API requests with the JSON null value. By default,
8589	// fields with empty values are omitted from API requests. However, any
8590	// field with an empty value appearing in NullFields will be sent to the
8591	// server as null. It is an error if a field in this list has a
8592	// non-empty value. This may be used to include null fields in Patch
8593	// requests.
8594	NullFields []string `json:"-"`
8595}
8596
8597func (s *GoogleCloudDialogflowV2beta1WebhookRequest) MarshalJSON() ([]byte, error) {
8598	type NoMethod GoogleCloudDialogflowV2beta1WebhookRequest
8599	raw := NoMethod(*s)
8600	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8601}
8602
8603// GoogleCloudDialogflowV2beta1WebhookResponse: The response message for
8604// a webhook call.
8605type GoogleCloudDialogflowV2beta1WebhookResponse struct {
8606	// EndInteraction: Optional. Indicates that this intent ends an
8607	// interaction. Some integrations
8608	// (e.g., Actions on Google or Dialogflow phone gateway) use this
8609	// information
8610	// to close interaction with an end user. Default is false.
8611	EndInteraction bool `json:"endInteraction,omitempty"`
8612
8613	// FollowupEventInput: Optional. Makes the platform immediately invoke
8614	// another `DetectIntent` call
8615	// internally with the specified event as input.
8616	// When this field is set, Dialogflow ignores the
8617	// `fulfillment_text`,
8618	// `fulfillment_messages`, and `payload` fields.
8619	FollowupEventInput *GoogleCloudDialogflowV2beta1EventInput `json:"followupEventInput,omitempty"`
8620
8621	// FulfillmentMessages: Optional. The collection of rich messages to
8622	// present to the user. This
8623	// value is passed directly to `QueryResult.fulfillment_messages`.
8624	FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"`
8625
8626	// FulfillmentText: Optional. The text to be shown on the screen. This
8627	// value is passed directly
8628	// to `QueryResult.fulfillment_text`.
8629	FulfillmentText string `json:"fulfillmentText,omitempty"`
8630
8631	// OutputContexts: Optional. The collection of output contexts. This
8632	// value is passed directly
8633	// to `QueryResult.output_contexts`.
8634	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
8635
8636	// Payload: Optional. This value is passed directly to
8637	// `QueryResult.webhook_payload`.
8638	// See the related `fulfillment_messages[i].payload field`, which may be
8639	// used
8640	// as an alternative to this field.
8641	//
8642	// This field can be used for Actions on Google responses.
8643	// It should have a structure similar to the JSON message shown here.
8644	// For more
8645	// information, see
8646	// [Actions on Google
8647	// Webhook
8648	// Format](https://developers.google.com/actions/dialogflow/webho
8649	// ok)
8650	// <pre>{
8651	//   "google": {
8652	//     "expectUserResponse": true,
8653	//     "richResponse": {
8654	//       "items": [
8655	//         {
8656	//           "simpleResponse": {
8657	//             "textToSpeech": "this is a simple response"
8658	//           }
8659	//         }
8660	//       ]
8661	//     }
8662	//   }
8663	// }</pre>
8664	Payload googleapi.RawMessage `json:"payload,omitempty"`
8665
8666	// SessionEntityTypes: Optional. Additional session entity types to
8667	// replace or extend developer
8668	// entity types with. The entity synonyms apply to all languages and
8669	// persist
8670	// for the session of this query. Setting the session entity types
8671	// inside
8672	// webhook overwrites the session entity types that have been set
8673	// through
8674	// `DetectIntentRequest.query_params.session_entity_types`.
8675	SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"`
8676
8677	// Source: Optional. This value is passed directly to
8678	// `QueryResult.webhook_source`.
8679	Source string `json:"source,omitempty"`
8680
8681	// ForceSendFields is a list of field names (e.g. "EndInteraction") to
8682	// unconditionally include in API requests. By default, fields with
8683	// empty values are omitted from API requests. However, any non-pointer,
8684	// non-interface field appearing in ForceSendFields will be sent to the
8685	// server regardless of whether the field is empty or not. This may be
8686	// used to include empty fields in Patch requests.
8687	ForceSendFields []string `json:"-"`
8688
8689	// NullFields is a list of field names (e.g. "EndInteraction") to
8690	// include in API requests with the JSON null value. By default, fields
8691	// with empty values are omitted from API requests. However, any field
8692	// with an empty value appearing in NullFields will be sent to the
8693	// server as null. It is an error if a field in this list has a
8694	// non-empty value. This may be used to include null fields in Patch
8695	// requests.
8696	NullFields []string `json:"-"`
8697}
8698
8699func (s *GoogleCloudDialogflowV2beta1WebhookResponse) MarshalJSON() ([]byte, error) {
8700	type NoMethod GoogleCloudDialogflowV2beta1WebhookResponse
8701	raw := NoMethod(*s)
8702	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8703}
8704
8705// GoogleLongrunningListOperationsResponse: The response message for
8706// Operations.ListOperations.
8707type GoogleLongrunningListOperationsResponse struct {
8708	// NextPageToken: The standard List next-page token.
8709	NextPageToken string `json:"nextPageToken,omitempty"`
8710
8711	// Operations: A list of operations that matches the specified filter in
8712	// the request.
8713	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
8714
8715	// ServerResponse contains the HTTP response code and headers from the
8716	// server.
8717	googleapi.ServerResponse `json:"-"`
8718
8719	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
8720	// unconditionally include in API requests. By default, fields with
8721	// empty values are omitted from API requests. However, any non-pointer,
8722	// non-interface field appearing in ForceSendFields will be sent to the
8723	// server regardless of whether the field is empty or not. This may be
8724	// used to include empty fields in Patch requests.
8725	ForceSendFields []string `json:"-"`
8726
8727	// NullFields is a list of field names (e.g. "NextPageToken") to include
8728	// in API requests with the JSON null value. By default, fields with
8729	// empty values are omitted from API requests. However, any field with
8730	// an empty value appearing in NullFields will be sent to the server as
8731	// null. It is an error if a field in this list has a non-empty value.
8732	// This may be used to include null fields in Patch requests.
8733	NullFields []string `json:"-"`
8734}
8735
8736func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
8737	type NoMethod GoogleLongrunningListOperationsResponse
8738	raw := NoMethod(*s)
8739	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8740}
8741
8742// GoogleLongrunningOperation: This resource represents a long-running
8743// operation that is the result of a
8744// network API call.
8745type GoogleLongrunningOperation struct {
8746	// Done: If the value is `false`, it means the operation is still in
8747	// progress.
8748	// If `true`, the operation is completed, and either `error` or
8749	// `response` is
8750	// available.
8751	Done bool `json:"done,omitempty"`
8752
8753	// Error: The error result of the operation in case of failure or
8754	// cancellation.
8755	Error *GoogleRpcStatus `json:"error,omitempty"`
8756
8757	// Metadata: Service-specific metadata associated with the operation.
8758	// It typically
8759	// contains progress information and common metadata such as create
8760	// time.
8761	// Some services might not provide such metadata.  Any method that
8762	// returns a
8763	// long-running operation should document the metadata type, if any.
8764	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
8765
8766	// Name: The server-assigned name, which is only unique within the same
8767	// service that
8768	// originally returns it. If you use the default HTTP mapping,
8769	// the
8770	// `name` should be a resource name ending with
8771	// `operations/{unique_id}`.
8772	Name string `json:"name,omitempty"`
8773
8774	// Response: The normal response of the operation in case of success.
8775	// If the original
8776	// method returns no data on success, such as `Delete`, the response
8777	// is
8778	// `google.protobuf.Empty`.  If the original method is
8779	// standard
8780	// `Get`/`Create`/`Update`, the response should be the resource.  For
8781	// other
8782	// methods, the response should have the type `XxxResponse`, where
8783	// `Xxx`
8784	// is the original method name.  For example, if the original method
8785	// name
8786	// is `TakeSnapshot()`, the inferred response type
8787	// is
8788	// `TakeSnapshotResponse`.
8789	Response googleapi.RawMessage `json:"response,omitempty"`
8790
8791	// ServerResponse contains the HTTP response code and headers from the
8792	// server.
8793	googleapi.ServerResponse `json:"-"`
8794
8795	// ForceSendFields is a list of field names (e.g. "Done") to
8796	// unconditionally include in API requests. By default, fields with
8797	// empty values are omitted from API requests. However, any non-pointer,
8798	// non-interface field appearing in ForceSendFields will be sent to the
8799	// server regardless of whether the field is empty or not. This may be
8800	// used to include empty fields in Patch requests.
8801	ForceSendFields []string `json:"-"`
8802
8803	// NullFields is a list of field names (e.g. "Done") to include in API
8804	// requests with the JSON null value. By default, fields with empty
8805	// values are omitted from API requests. However, any field with an
8806	// empty value appearing in NullFields will be sent to the server as
8807	// null. It is an error if a field in this list has a non-empty value.
8808	// This may be used to include null fields in Patch requests.
8809	NullFields []string `json:"-"`
8810}
8811
8812func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
8813	type NoMethod GoogleLongrunningOperation
8814	raw := NoMethod(*s)
8815	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8816}
8817
8818// GoogleProtobufEmpty: A generic empty message that you can re-use to
8819// avoid defining duplicated
8820// empty messages in your APIs. A typical example is to use it as the
8821// request
8822// or the response type of an API method. For instance:
8823//
8824//     service Foo {
8825//       rpc Bar(google.protobuf.Empty) returns
8826// (google.protobuf.Empty);
8827//     }
8828//
8829// The JSON representation for `Empty` is empty JSON object `{}`.
8830type GoogleProtobufEmpty struct {
8831	// ServerResponse contains the HTTP response code and headers from the
8832	// server.
8833	googleapi.ServerResponse `json:"-"`
8834}
8835
8836// GoogleRpcStatus: The `Status` type defines a logical error model that
8837// is suitable for
8838// different programming environments, including REST APIs and RPC APIs.
8839// It is
8840// used by [gRPC](https://github.com/grpc). Each `Status` message
8841// contains
8842// three pieces of data: error code, error message, and error
8843// details.
8844//
8845// You can find out more about this error model and how to work with it
8846// in the
8847// [API Design Guide](https://cloud.google.com/apis/design/errors).
8848type GoogleRpcStatus struct {
8849	// Code: The status code, which should be an enum value of
8850	// google.rpc.Code.
8851	Code int64 `json:"code,omitempty"`
8852
8853	// Details: A list of messages that carry the error details.  There is a
8854	// common set of
8855	// message types for APIs to use.
8856	Details []googleapi.RawMessage `json:"details,omitempty"`
8857
8858	// Message: A developer-facing error message, which should be in
8859	// English. Any
8860	// user-facing error message should be localized and sent in
8861	// the
8862	// google.rpc.Status.details field, or localized by the client.
8863	Message string `json:"message,omitempty"`
8864
8865	// ForceSendFields is a list of field names (e.g. "Code") to
8866	// unconditionally include in API requests. By default, fields with
8867	// empty values are omitted from API requests. However, any non-pointer,
8868	// non-interface field appearing in ForceSendFields will be sent to the
8869	// server regardless of whether the field is empty or not. This may be
8870	// used to include empty fields in Patch requests.
8871	ForceSendFields []string `json:"-"`
8872
8873	// NullFields is a list of field names (e.g. "Code") to include in API
8874	// requests with the JSON null value. By default, fields with empty
8875	// values are omitted from API requests. However, any field with an
8876	// empty value appearing in NullFields will be sent to the server as
8877	// null. It is an error if a field in this list has a non-empty value.
8878	// This may be used to include null fields in Patch requests.
8879	NullFields []string `json:"-"`
8880}
8881
8882func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
8883	type NoMethod GoogleRpcStatus
8884	raw := NoMethod(*s)
8885	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8886}
8887
8888// GoogleTypeLatLng: An object representing a latitude/longitude pair.
8889// This is expressed as a pair
8890// of doubles representing degrees latitude and degrees longitude.
8891// Unless
8892// specified otherwise, this must conform to the
8893// <a
8894// href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
8895// st
8896// andard</a>. Values must be within normalized ranges.
8897type GoogleTypeLatLng struct {
8898	// Latitude: The latitude in degrees. It must be in the range [-90.0,
8899	// +90.0].
8900	Latitude float64 `json:"latitude,omitempty"`
8901
8902	// Longitude: The longitude in degrees. It must be in the range [-180.0,
8903	// +180.0].
8904	Longitude float64 `json:"longitude,omitempty"`
8905
8906	// ForceSendFields is a list of field names (e.g. "Latitude") to
8907	// unconditionally include in API requests. By default, fields with
8908	// empty values are omitted from API requests. However, any non-pointer,
8909	// non-interface field appearing in ForceSendFields will be sent to the
8910	// server regardless of whether the field is empty or not. This may be
8911	// used to include empty fields in Patch requests.
8912	ForceSendFields []string `json:"-"`
8913
8914	// NullFields is a list of field names (e.g. "Latitude") to include in
8915	// API requests with the JSON null value. By default, fields with empty
8916	// values are omitted from API requests. However, any field with an
8917	// empty value appearing in NullFields will be sent to the server as
8918	// null. It is an error if a field in this list has a non-empty value.
8919	// This may be used to include null fields in Patch requests.
8920	NullFields []string `json:"-"`
8921}
8922
8923func (s *GoogleTypeLatLng) MarshalJSON() ([]byte, error) {
8924	type NoMethod GoogleTypeLatLng
8925	raw := NoMethod(*s)
8926	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8927}
8928
8929func (s *GoogleTypeLatLng) UnmarshalJSON(data []byte) error {
8930	type NoMethod GoogleTypeLatLng
8931	var s1 struct {
8932		Latitude  gensupport.JSONFloat64 `json:"latitude"`
8933		Longitude gensupport.JSONFloat64 `json:"longitude"`
8934		*NoMethod
8935	}
8936	s1.NoMethod = (*NoMethod)(s)
8937	if err := json.Unmarshal(data, &s1); err != nil {
8938		return err
8939	}
8940	s.Latitude = float64(s1.Latitude)
8941	s.Longitude = float64(s1.Longitude)
8942	return nil
8943}
8944
8945// method id "dialogflow.projects.agent":
8946
8947type ProjectsAgentCall struct {
8948	s                                 *Service
8949	parent                            string
8950	googleclouddialogflowv2beta1agent *GoogleCloudDialogflowV2beta1Agent
8951	urlParams_                        gensupport.URLParams
8952	ctx_                              context.Context
8953	header_                           http.Header
8954}
8955
8956// Agent: Creates/updates the specified agent.
8957func (r *ProjectsService) Agent(parent string, googleclouddialogflowv2beta1agent *GoogleCloudDialogflowV2beta1Agent) *ProjectsAgentCall {
8958	c := &ProjectsAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8959	c.parent = parent
8960	c.googleclouddialogflowv2beta1agent = googleclouddialogflowv2beta1agent
8961	return c
8962}
8963
8964// UpdateMask sets the optional parameter "updateMask": The mask to
8965// control which fields get updated.
8966func (c *ProjectsAgentCall) UpdateMask(updateMask string) *ProjectsAgentCall {
8967	c.urlParams_.Set("updateMask", updateMask)
8968	return c
8969}
8970
8971// Fields allows partial responses to be retrieved. See
8972// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8973// for more information.
8974func (c *ProjectsAgentCall) Fields(s ...googleapi.Field) *ProjectsAgentCall {
8975	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8976	return c
8977}
8978
8979// Context sets the context to be used in this call's Do method. Any
8980// pending HTTP request will be aborted if the provided context is
8981// canceled.
8982func (c *ProjectsAgentCall) Context(ctx context.Context) *ProjectsAgentCall {
8983	c.ctx_ = ctx
8984	return c
8985}
8986
8987// Header returns an http.Header that can be modified by the caller to
8988// add HTTP headers to the request.
8989func (c *ProjectsAgentCall) Header() http.Header {
8990	if c.header_ == nil {
8991		c.header_ = make(http.Header)
8992	}
8993	return c.header_
8994}
8995
8996func (c *ProjectsAgentCall) doRequest(alt string) (*http.Response, error) {
8997	reqHeaders := make(http.Header)
8998	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
8999	for k, v := range c.header_ {
9000		reqHeaders[k] = v
9001	}
9002	reqHeaders.Set("User-Agent", c.s.userAgent())
9003	var body io.Reader = nil
9004	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1agent)
9005	if err != nil {
9006		return nil, err
9007	}
9008	reqHeaders.Set("Content-Type", "application/json")
9009	c.urlParams_.Set("alt", alt)
9010	c.urlParams_.Set("prettyPrint", "false")
9011	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
9012	urls += "?" + c.urlParams_.Encode()
9013	req, err := http.NewRequest("POST", urls, body)
9014	if err != nil {
9015		return nil, err
9016	}
9017	req.Header = reqHeaders
9018	googleapi.Expand(req.URL, map[string]string{
9019		"parent": c.parent,
9020	})
9021	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9022}
9023
9024// Do executes the "dialogflow.projects.agent" call.
9025// Exactly one of *GoogleCloudDialogflowV2beta1Agent or error will be
9026// non-nil. Any non-2xx status code is an error. Response headers are in
9027// either *GoogleCloudDialogflowV2beta1Agent.ServerResponse.Header or
9028// (if a response was returned at all) in
9029// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9030// whether the returned error was because http.StatusNotModified was
9031// returned.
9032func (c *ProjectsAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Agent, error) {
9033	gensupport.SetOptions(c.urlParams_, opts...)
9034	res, err := c.doRequest("json")
9035	if res != nil && res.StatusCode == http.StatusNotModified {
9036		if res.Body != nil {
9037			res.Body.Close()
9038		}
9039		return nil, &googleapi.Error{
9040			Code:   res.StatusCode,
9041			Header: res.Header,
9042		}
9043	}
9044	if err != nil {
9045		return nil, err
9046	}
9047	defer googleapi.CloseBody(res)
9048	if err := googleapi.CheckResponse(res); err != nil {
9049		return nil, err
9050	}
9051	ret := &GoogleCloudDialogflowV2beta1Agent{
9052		ServerResponse: googleapi.ServerResponse{
9053			Header:         res.Header,
9054			HTTPStatusCode: res.StatusCode,
9055		},
9056	}
9057	target := &ret
9058	if err := gensupport.DecodeResponse(target, res); err != nil {
9059		return nil, err
9060	}
9061	return ret, nil
9062	// {
9063	//   "description": "Creates/updates the specified agent.",
9064	//   "flatPath": "v2beta1/projects/{projectsId}/agent",
9065	//   "httpMethod": "POST",
9066	//   "id": "dialogflow.projects.agent",
9067	//   "parameterOrder": [
9068	//     "parent"
9069	//   ],
9070	//   "parameters": {
9071	//     "parent": {
9072	//       "description": "Required. The project of this agent.\nFormat: `projects/\u003cProject ID\u003e`.",
9073	//       "location": "path",
9074	//       "pattern": "^projects/[^/]+$",
9075	//       "required": true,
9076	//       "type": "string"
9077	//     },
9078	//     "updateMask": {
9079	//       "description": "Optional. The mask to control which fields get updated.",
9080	//       "format": "google-fieldmask",
9081	//       "location": "query",
9082	//       "type": "string"
9083	//     }
9084	//   },
9085	//   "path": "v2beta1/{+parent}/agent",
9086	//   "request": {
9087	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
9088	//   },
9089	//   "response": {
9090	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
9091	//   },
9092	//   "scopes": [
9093	//     "https://www.googleapis.com/auth/cloud-platform",
9094	//     "https://www.googleapis.com/auth/dialogflow"
9095	//   ]
9096	// }
9097
9098}
9099
9100// method id "dialogflow.projects.deleteAgent":
9101
9102type ProjectsDeleteAgentCall struct {
9103	s          *Service
9104	parent     string
9105	urlParams_ gensupport.URLParams
9106	ctx_       context.Context
9107	header_    http.Header
9108}
9109
9110// DeleteAgent: Deletes the specified agent.
9111func (r *ProjectsService) DeleteAgent(parent string) *ProjectsDeleteAgentCall {
9112	c := &ProjectsDeleteAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9113	c.parent = parent
9114	return c
9115}
9116
9117// Fields allows partial responses to be retrieved. See
9118// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9119// for more information.
9120func (c *ProjectsDeleteAgentCall) Fields(s ...googleapi.Field) *ProjectsDeleteAgentCall {
9121	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9122	return c
9123}
9124
9125// Context sets the context to be used in this call's Do method. Any
9126// pending HTTP request will be aborted if the provided context is
9127// canceled.
9128func (c *ProjectsDeleteAgentCall) Context(ctx context.Context) *ProjectsDeleteAgentCall {
9129	c.ctx_ = ctx
9130	return c
9131}
9132
9133// Header returns an http.Header that can be modified by the caller to
9134// add HTTP headers to the request.
9135func (c *ProjectsDeleteAgentCall) Header() http.Header {
9136	if c.header_ == nil {
9137		c.header_ = make(http.Header)
9138	}
9139	return c.header_
9140}
9141
9142func (c *ProjectsDeleteAgentCall) doRequest(alt string) (*http.Response, error) {
9143	reqHeaders := make(http.Header)
9144	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9145	for k, v := range c.header_ {
9146		reqHeaders[k] = v
9147	}
9148	reqHeaders.Set("User-Agent", c.s.userAgent())
9149	var body io.Reader = nil
9150	c.urlParams_.Set("alt", alt)
9151	c.urlParams_.Set("prettyPrint", "false")
9152	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
9153	urls += "?" + c.urlParams_.Encode()
9154	req, err := http.NewRequest("DELETE", urls, body)
9155	if err != nil {
9156		return nil, err
9157	}
9158	req.Header = reqHeaders
9159	googleapi.Expand(req.URL, map[string]string{
9160		"parent": c.parent,
9161	})
9162	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9163}
9164
9165// Do executes the "dialogflow.projects.deleteAgent" call.
9166// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
9167// non-2xx status code is an error. Response headers are in either
9168// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
9169// returned at all) in error.(*googleapi.Error).Header. Use
9170// googleapi.IsNotModified to check whether the returned error was
9171// because http.StatusNotModified was returned.
9172func (c *ProjectsDeleteAgentCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
9173	gensupport.SetOptions(c.urlParams_, opts...)
9174	res, err := c.doRequest("json")
9175	if res != nil && res.StatusCode == http.StatusNotModified {
9176		if res.Body != nil {
9177			res.Body.Close()
9178		}
9179		return nil, &googleapi.Error{
9180			Code:   res.StatusCode,
9181			Header: res.Header,
9182		}
9183	}
9184	if err != nil {
9185		return nil, err
9186	}
9187	defer googleapi.CloseBody(res)
9188	if err := googleapi.CheckResponse(res); err != nil {
9189		return nil, err
9190	}
9191	ret := &GoogleProtobufEmpty{
9192		ServerResponse: googleapi.ServerResponse{
9193			Header:         res.Header,
9194			HTTPStatusCode: res.StatusCode,
9195		},
9196	}
9197	target := &ret
9198	if err := gensupport.DecodeResponse(target, res); err != nil {
9199		return nil, err
9200	}
9201	return ret, nil
9202	// {
9203	//   "description": "Deletes the specified agent.",
9204	//   "flatPath": "v2beta1/projects/{projectsId}/agent",
9205	//   "httpMethod": "DELETE",
9206	//   "id": "dialogflow.projects.deleteAgent",
9207	//   "parameterOrder": [
9208	//     "parent"
9209	//   ],
9210	//   "parameters": {
9211	//     "parent": {
9212	//       "description": "Required. The project that the agent to delete is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
9213	//       "location": "path",
9214	//       "pattern": "^projects/[^/]+$",
9215	//       "required": true,
9216	//       "type": "string"
9217	//     }
9218	//   },
9219	//   "path": "v2beta1/{+parent}/agent",
9220	//   "response": {
9221	//     "$ref": "GoogleProtobufEmpty"
9222	//   },
9223	//   "scopes": [
9224	//     "https://www.googleapis.com/auth/cloud-platform",
9225	//     "https://www.googleapis.com/auth/dialogflow"
9226	//   ]
9227	// }
9228
9229}
9230
9231// method id "dialogflow.projects.getAgent":
9232
9233type ProjectsGetAgentCall struct {
9234	s            *Service
9235	parent       string
9236	urlParams_   gensupport.URLParams
9237	ifNoneMatch_ string
9238	ctx_         context.Context
9239	header_      http.Header
9240}
9241
9242// GetAgent: Retrieves the specified agent.
9243func (r *ProjectsService) GetAgent(parent string) *ProjectsGetAgentCall {
9244	c := &ProjectsGetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9245	c.parent = parent
9246	return c
9247}
9248
9249// Fields allows partial responses to be retrieved. See
9250// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9251// for more information.
9252func (c *ProjectsGetAgentCall) Fields(s ...googleapi.Field) *ProjectsGetAgentCall {
9253	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9254	return c
9255}
9256
9257// IfNoneMatch sets the optional parameter which makes the operation
9258// fail if the object's ETag matches the given value. This is useful for
9259// getting updates only after the object has changed since the last
9260// request. Use googleapi.IsNotModified to check whether the response
9261// error from Do is the result of In-None-Match.
9262func (c *ProjectsGetAgentCall) IfNoneMatch(entityTag string) *ProjectsGetAgentCall {
9263	c.ifNoneMatch_ = entityTag
9264	return c
9265}
9266
9267// Context sets the context to be used in this call's Do method. Any
9268// pending HTTP request will be aborted if the provided context is
9269// canceled.
9270func (c *ProjectsGetAgentCall) Context(ctx context.Context) *ProjectsGetAgentCall {
9271	c.ctx_ = ctx
9272	return c
9273}
9274
9275// Header returns an http.Header that can be modified by the caller to
9276// add HTTP headers to the request.
9277func (c *ProjectsGetAgentCall) Header() http.Header {
9278	if c.header_ == nil {
9279		c.header_ = make(http.Header)
9280	}
9281	return c.header_
9282}
9283
9284func (c *ProjectsGetAgentCall) doRequest(alt string) (*http.Response, error) {
9285	reqHeaders := make(http.Header)
9286	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9287	for k, v := range c.header_ {
9288		reqHeaders[k] = v
9289	}
9290	reqHeaders.Set("User-Agent", c.s.userAgent())
9291	if c.ifNoneMatch_ != "" {
9292		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9293	}
9294	var body io.Reader = nil
9295	c.urlParams_.Set("alt", alt)
9296	c.urlParams_.Set("prettyPrint", "false")
9297	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
9298	urls += "?" + c.urlParams_.Encode()
9299	req, err := http.NewRequest("GET", urls, body)
9300	if err != nil {
9301		return nil, err
9302	}
9303	req.Header = reqHeaders
9304	googleapi.Expand(req.URL, map[string]string{
9305		"parent": c.parent,
9306	})
9307	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9308}
9309
9310// Do executes the "dialogflow.projects.getAgent" call.
9311// Exactly one of *GoogleCloudDialogflowV2beta1Agent or error will be
9312// non-nil. Any non-2xx status code is an error. Response headers are in
9313// either *GoogleCloudDialogflowV2beta1Agent.ServerResponse.Header or
9314// (if a response was returned at all) in
9315// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9316// whether the returned error was because http.StatusNotModified was
9317// returned.
9318func (c *ProjectsGetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Agent, error) {
9319	gensupport.SetOptions(c.urlParams_, opts...)
9320	res, err := c.doRequest("json")
9321	if res != nil && res.StatusCode == http.StatusNotModified {
9322		if res.Body != nil {
9323			res.Body.Close()
9324		}
9325		return nil, &googleapi.Error{
9326			Code:   res.StatusCode,
9327			Header: res.Header,
9328		}
9329	}
9330	if err != nil {
9331		return nil, err
9332	}
9333	defer googleapi.CloseBody(res)
9334	if err := googleapi.CheckResponse(res); err != nil {
9335		return nil, err
9336	}
9337	ret := &GoogleCloudDialogflowV2beta1Agent{
9338		ServerResponse: googleapi.ServerResponse{
9339			Header:         res.Header,
9340			HTTPStatusCode: res.StatusCode,
9341		},
9342	}
9343	target := &ret
9344	if err := gensupport.DecodeResponse(target, res); err != nil {
9345		return nil, err
9346	}
9347	return ret, nil
9348	// {
9349	//   "description": "Retrieves the specified agent.",
9350	//   "flatPath": "v2beta1/projects/{projectsId}/agent",
9351	//   "httpMethod": "GET",
9352	//   "id": "dialogflow.projects.getAgent",
9353	//   "parameterOrder": [
9354	//     "parent"
9355	//   ],
9356	//   "parameters": {
9357	//     "parent": {
9358	//       "description": "Required. The project that the agent to fetch is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
9359	//       "location": "path",
9360	//       "pattern": "^projects/[^/]+$",
9361	//       "required": true,
9362	//       "type": "string"
9363	//     }
9364	//   },
9365	//   "path": "v2beta1/{+parent}/agent",
9366	//   "response": {
9367	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
9368	//   },
9369	//   "scopes": [
9370	//     "https://www.googleapis.com/auth/cloud-platform",
9371	//     "https://www.googleapis.com/auth/dialogflow"
9372	//   ]
9373	// }
9374
9375}
9376
9377// method id "dialogflow.projects.agent.export":
9378
9379type ProjectsAgentExportCall struct {
9380	s                                              *Service
9381	parent                                         string
9382	googleclouddialogflowv2beta1exportagentrequest *GoogleCloudDialogflowV2beta1ExportAgentRequest
9383	urlParams_                                     gensupport.URLParams
9384	ctx_                                           context.Context
9385	header_                                        http.Header
9386}
9387
9388// Export: Exports the specified agent to a ZIP file.
9389//
9390//
9391// Operation <response: ExportAgentResponse>
9392func (r *ProjectsAgentService) Export(parent string, googleclouddialogflowv2beta1exportagentrequest *GoogleCloudDialogflowV2beta1ExportAgentRequest) *ProjectsAgentExportCall {
9393	c := &ProjectsAgentExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9394	c.parent = parent
9395	c.googleclouddialogflowv2beta1exportagentrequest = googleclouddialogflowv2beta1exportagentrequest
9396	return c
9397}
9398
9399// Fields allows partial responses to be retrieved. See
9400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9401// for more information.
9402func (c *ProjectsAgentExportCall) Fields(s ...googleapi.Field) *ProjectsAgentExportCall {
9403	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9404	return c
9405}
9406
9407// Context sets the context to be used in this call's Do method. Any
9408// pending HTTP request will be aborted if the provided context is
9409// canceled.
9410func (c *ProjectsAgentExportCall) Context(ctx context.Context) *ProjectsAgentExportCall {
9411	c.ctx_ = ctx
9412	return c
9413}
9414
9415// Header returns an http.Header that can be modified by the caller to
9416// add HTTP headers to the request.
9417func (c *ProjectsAgentExportCall) Header() http.Header {
9418	if c.header_ == nil {
9419		c.header_ = make(http.Header)
9420	}
9421	return c.header_
9422}
9423
9424func (c *ProjectsAgentExportCall) doRequest(alt string) (*http.Response, error) {
9425	reqHeaders := make(http.Header)
9426	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9427	for k, v := range c.header_ {
9428		reqHeaders[k] = v
9429	}
9430	reqHeaders.Set("User-Agent", c.s.userAgent())
9431	var body io.Reader = nil
9432	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1exportagentrequest)
9433	if err != nil {
9434		return nil, err
9435	}
9436	reqHeaders.Set("Content-Type", "application/json")
9437	c.urlParams_.Set("alt", alt)
9438	c.urlParams_.Set("prettyPrint", "false")
9439	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:export")
9440	urls += "?" + c.urlParams_.Encode()
9441	req, err := http.NewRequest("POST", urls, body)
9442	if err != nil {
9443		return nil, err
9444	}
9445	req.Header = reqHeaders
9446	googleapi.Expand(req.URL, map[string]string{
9447		"parent": c.parent,
9448	})
9449	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9450}
9451
9452// Do executes the "dialogflow.projects.agent.export" call.
9453// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
9454// Any non-2xx status code is an error. Response headers are in either
9455// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
9456// was returned at all) in error.(*googleapi.Error).Header. Use
9457// googleapi.IsNotModified to check whether the returned error was
9458// because http.StatusNotModified was returned.
9459func (c *ProjectsAgentExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
9460	gensupport.SetOptions(c.urlParams_, opts...)
9461	res, err := c.doRequest("json")
9462	if res != nil && res.StatusCode == http.StatusNotModified {
9463		if res.Body != nil {
9464			res.Body.Close()
9465		}
9466		return nil, &googleapi.Error{
9467			Code:   res.StatusCode,
9468			Header: res.Header,
9469		}
9470	}
9471	if err != nil {
9472		return nil, err
9473	}
9474	defer googleapi.CloseBody(res)
9475	if err := googleapi.CheckResponse(res); err != nil {
9476		return nil, err
9477	}
9478	ret := &GoogleLongrunningOperation{
9479		ServerResponse: googleapi.ServerResponse{
9480			Header:         res.Header,
9481			HTTPStatusCode: res.StatusCode,
9482		},
9483	}
9484	target := &ret
9485	if err := gensupport.DecodeResponse(target, res); err != nil {
9486		return nil, err
9487	}
9488	return ret, nil
9489	// {
9490	//   "description": "Exports the specified agent to a ZIP file.\n\n\nOperation \u003cresponse: ExportAgentResponse\u003e",
9491	//   "flatPath": "v2beta1/projects/{projectsId}/agent:export",
9492	//   "httpMethod": "POST",
9493	//   "id": "dialogflow.projects.agent.export",
9494	//   "parameterOrder": [
9495	//     "parent"
9496	//   ],
9497	//   "parameters": {
9498	//     "parent": {
9499	//       "description": "Required. The project that the agent to export is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
9500	//       "location": "path",
9501	//       "pattern": "^projects/[^/]+$",
9502	//       "required": true,
9503	//       "type": "string"
9504	//     }
9505	//   },
9506	//   "path": "v2beta1/{+parent}/agent:export",
9507	//   "request": {
9508	//     "$ref": "GoogleCloudDialogflowV2beta1ExportAgentRequest"
9509	//   },
9510	//   "response": {
9511	//     "$ref": "GoogleLongrunningOperation"
9512	//   },
9513	//   "scopes": [
9514	//     "https://www.googleapis.com/auth/cloud-platform",
9515	//     "https://www.googleapis.com/auth/dialogflow"
9516	//   ]
9517	// }
9518
9519}
9520
9521// method id "dialogflow.projects.agent.getValidationResult":
9522
9523type ProjectsAgentGetValidationResultCall struct {
9524	s            *Service
9525	parent       string
9526	urlParams_   gensupport.URLParams
9527	ifNoneMatch_ string
9528	ctx_         context.Context
9529	header_      http.Header
9530}
9531
9532// GetValidationResult: Gets agent validation result. Agent validation
9533// is performed during
9534// training time and is updated automatically when training is
9535// completed.
9536func (r *ProjectsAgentService) GetValidationResult(parent string) *ProjectsAgentGetValidationResultCall {
9537	c := &ProjectsAgentGetValidationResultCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9538	c.parent = parent
9539	return c
9540}
9541
9542// LanguageCode sets the optional parameter "languageCode": The language
9543// for which you want a validation result. If not
9544// specified, the agent's default language is used.
9545// [Many
9546// languages](https://cloud.google.com/dialogflow/docs/reference/la
9547// nguage)
9548// are supported. Note: languages must be enabled in the agent before
9549// they can
9550// be used.
9551func (c *ProjectsAgentGetValidationResultCall) LanguageCode(languageCode string) *ProjectsAgentGetValidationResultCall {
9552	c.urlParams_.Set("languageCode", languageCode)
9553	return c
9554}
9555
9556// Fields allows partial responses to be retrieved. See
9557// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9558// for more information.
9559func (c *ProjectsAgentGetValidationResultCall) Fields(s ...googleapi.Field) *ProjectsAgentGetValidationResultCall {
9560	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9561	return c
9562}
9563
9564// IfNoneMatch sets the optional parameter which makes the operation
9565// fail if the object's ETag matches the given value. This is useful for
9566// getting updates only after the object has changed since the last
9567// request. Use googleapi.IsNotModified to check whether the response
9568// error from Do is the result of In-None-Match.
9569func (c *ProjectsAgentGetValidationResultCall) IfNoneMatch(entityTag string) *ProjectsAgentGetValidationResultCall {
9570	c.ifNoneMatch_ = entityTag
9571	return c
9572}
9573
9574// Context sets the context to be used in this call's Do method. Any
9575// pending HTTP request will be aborted if the provided context is
9576// canceled.
9577func (c *ProjectsAgentGetValidationResultCall) Context(ctx context.Context) *ProjectsAgentGetValidationResultCall {
9578	c.ctx_ = ctx
9579	return c
9580}
9581
9582// Header returns an http.Header that can be modified by the caller to
9583// add HTTP headers to the request.
9584func (c *ProjectsAgentGetValidationResultCall) Header() http.Header {
9585	if c.header_ == nil {
9586		c.header_ = make(http.Header)
9587	}
9588	return c.header_
9589}
9590
9591func (c *ProjectsAgentGetValidationResultCall) doRequest(alt string) (*http.Response, error) {
9592	reqHeaders := make(http.Header)
9593	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9594	for k, v := range c.header_ {
9595		reqHeaders[k] = v
9596	}
9597	reqHeaders.Set("User-Agent", c.s.userAgent())
9598	if c.ifNoneMatch_ != "" {
9599		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9600	}
9601	var body io.Reader = nil
9602	c.urlParams_.Set("alt", alt)
9603	c.urlParams_.Set("prettyPrint", "false")
9604	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent/validationResult")
9605	urls += "?" + c.urlParams_.Encode()
9606	req, err := http.NewRequest("GET", urls, body)
9607	if err != nil {
9608		return nil, err
9609	}
9610	req.Header = reqHeaders
9611	googleapi.Expand(req.URL, map[string]string{
9612		"parent": c.parent,
9613	})
9614	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9615}
9616
9617// Do executes the "dialogflow.projects.agent.getValidationResult" call.
9618// Exactly one of *GoogleCloudDialogflowV2beta1ValidationResult or error
9619// will be non-nil. Any non-2xx status code is an error. Response
9620// headers are in either
9621// *GoogleCloudDialogflowV2beta1ValidationResult.ServerResponse.Header
9622// or (if a response was returned at all) in
9623// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9624// whether the returned error was because http.StatusNotModified was
9625// returned.
9626func (c *ProjectsAgentGetValidationResultCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ValidationResult, error) {
9627	gensupport.SetOptions(c.urlParams_, opts...)
9628	res, err := c.doRequest("json")
9629	if res != nil && res.StatusCode == http.StatusNotModified {
9630		if res.Body != nil {
9631			res.Body.Close()
9632		}
9633		return nil, &googleapi.Error{
9634			Code:   res.StatusCode,
9635			Header: res.Header,
9636		}
9637	}
9638	if err != nil {
9639		return nil, err
9640	}
9641	defer googleapi.CloseBody(res)
9642	if err := googleapi.CheckResponse(res); err != nil {
9643		return nil, err
9644	}
9645	ret := &GoogleCloudDialogflowV2beta1ValidationResult{
9646		ServerResponse: googleapi.ServerResponse{
9647			Header:         res.Header,
9648			HTTPStatusCode: res.StatusCode,
9649		},
9650	}
9651	target := &ret
9652	if err := gensupport.DecodeResponse(target, res); err != nil {
9653		return nil, err
9654	}
9655	return ret, nil
9656	// {
9657	//   "description": "Gets agent validation result. Agent validation is performed during\ntraining time and is updated automatically when training is completed.",
9658	//   "flatPath": "v2beta1/projects/{projectsId}/agent/validationResult",
9659	//   "httpMethod": "GET",
9660	//   "id": "dialogflow.projects.agent.getValidationResult",
9661	//   "parameterOrder": [
9662	//     "parent"
9663	//   ],
9664	//   "parameters": {
9665	//     "languageCode": {
9666	//       "description": "Optional. The language for which you want a validation result. If not\nspecified, the agent's default language is used. [Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
9667	//       "location": "query",
9668	//       "type": "string"
9669	//     },
9670	//     "parent": {
9671	//       "description": "Required. The project that the agent is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
9672	//       "location": "path",
9673	//       "pattern": "^projects/[^/]+$",
9674	//       "required": true,
9675	//       "type": "string"
9676	//     }
9677	//   },
9678	//   "path": "v2beta1/{+parent}/agent/validationResult",
9679	//   "response": {
9680	//     "$ref": "GoogleCloudDialogflowV2beta1ValidationResult"
9681	//   },
9682	//   "scopes": [
9683	//     "https://www.googleapis.com/auth/cloud-platform",
9684	//     "https://www.googleapis.com/auth/dialogflow"
9685	//   ]
9686	// }
9687
9688}
9689
9690// method id "dialogflow.projects.agent.import":
9691
9692type ProjectsAgentImportCall struct {
9693	s                                              *Service
9694	parent                                         string
9695	googleclouddialogflowv2beta1importagentrequest *GoogleCloudDialogflowV2beta1ImportAgentRequest
9696	urlParams_                                     gensupport.URLParams
9697	ctx_                                           context.Context
9698	header_                                        http.Header
9699}
9700
9701// Import: Imports the specified agent from a ZIP file.
9702//
9703// Uploads new intents and entity types without deleting the existing
9704// ones.
9705// Intents and entity types with the same name are replaced with the
9706// new
9707// versions from ImportAgentRequest.
9708//
9709//
9710// Operation <response: google.protobuf.Empty>
9711func (r *ProjectsAgentService) Import(parent string, googleclouddialogflowv2beta1importagentrequest *GoogleCloudDialogflowV2beta1ImportAgentRequest) *ProjectsAgentImportCall {
9712	c := &ProjectsAgentImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9713	c.parent = parent
9714	c.googleclouddialogflowv2beta1importagentrequest = googleclouddialogflowv2beta1importagentrequest
9715	return c
9716}
9717
9718// Fields allows partial responses to be retrieved. See
9719// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9720// for more information.
9721func (c *ProjectsAgentImportCall) Fields(s ...googleapi.Field) *ProjectsAgentImportCall {
9722	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9723	return c
9724}
9725
9726// Context sets the context to be used in this call's Do method. Any
9727// pending HTTP request will be aborted if the provided context is
9728// canceled.
9729func (c *ProjectsAgentImportCall) Context(ctx context.Context) *ProjectsAgentImportCall {
9730	c.ctx_ = ctx
9731	return c
9732}
9733
9734// Header returns an http.Header that can be modified by the caller to
9735// add HTTP headers to the request.
9736func (c *ProjectsAgentImportCall) Header() http.Header {
9737	if c.header_ == nil {
9738		c.header_ = make(http.Header)
9739	}
9740	return c.header_
9741}
9742
9743func (c *ProjectsAgentImportCall) doRequest(alt string) (*http.Response, error) {
9744	reqHeaders := make(http.Header)
9745	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9746	for k, v := range c.header_ {
9747		reqHeaders[k] = v
9748	}
9749	reqHeaders.Set("User-Agent", c.s.userAgent())
9750	var body io.Reader = nil
9751	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1importagentrequest)
9752	if err != nil {
9753		return nil, err
9754	}
9755	reqHeaders.Set("Content-Type", "application/json")
9756	c.urlParams_.Set("alt", alt)
9757	c.urlParams_.Set("prettyPrint", "false")
9758	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:import")
9759	urls += "?" + c.urlParams_.Encode()
9760	req, err := http.NewRequest("POST", urls, body)
9761	if err != nil {
9762		return nil, err
9763	}
9764	req.Header = reqHeaders
9765	googleapi.Expand(req.URL, map[string]string{
9766		"parent": c.parent,
9767	})
9768	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9769}
9770
9771// Do executes the "dialogflow.projects.agent.import" call.
9772// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
9773// Any non-2xx status code is an error. Response headers are in either
9774// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
9775// was returned at all) in error.(*googleapi.Error).Header. Use
9776// googleapi.IsNotModified to check whether the returned error was
9777// because http.StatusNotModified was returned.
9778func (c *ProjectsAgentImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
9779	gensupport.SetOptions(c.urlParams_, opts...)
9780	res, err := c.doRequest("json")
9781	if res != nil && res.StatusCode == http.StatusNotModified {
9782		if res.Body != nil {
9783			res.Body.Close()
9784		}
9785		return nil, &googleapi.Error{
9786			Code:   res.StatusCode,
9787			Header: res.Header,
9788		}
9789	}
9790	if err != nil {
9791		return nil, err
9792	}
9793	defer googleapi.CloseBody(res)
9794	if err := googleapi.CheckResponse(res); err != nil {
9795		return nil, err
9796	}
9797	ret := &GoogleLongrunningOperation{
9798		ServerResponse: googleapi.ServerResponse{
9799			Header:         res.Header,
9800			HTTPStatusCode: res.StatusCode,
9801		},
9802	}
9803	target := &ret
9804	if err := gensupport.DecodeResponse(target, res); err != nil {
9805		return nil, err
9806	}
9807	return ret, nil
9808	// {
9809	//   "description": "Imports the specified agent from a ZIP file.\n\nUploads new intents and entity types without deleting the existing ones.\nIntents and entity types with the same name are replaced with the new\nversions from ImportAgentRequest.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
9810	//   "flatPath": "v2beta1/projects/{projectsId}/agent:import",
9811	//   "httpMethod": "POST",
9812	//   "id": "dialogflow.projects.agent.import",
9813	//   "parameterOrder": [
9814	//     "parent"
9815	//   ],
9816	//   "parameters": {
9817	//     "parent": {
9818	//       "description": "Required. The project that the agent to import is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
9819	//       "location": "path",
9820	//       "pattern": "^projects/[^/]+$",
9821	//       "required": true,
9822	//       "type": "string"
9823	//     }
9824	//   },
9825	//   "path": "v2beta1/{+parent}/agent:import",
9826	//   "request": {
9827	//     "$ref": "GoogleCloudDialogflowV2beta1ImportAgentRequest"
9828	//   },
9829	//   "response": {
9830	//     "$ref": "GoogleLongrunningOperation"
9831	//   },
9832	//   "scopes": [
9833	//     "https://www.googleapis.com/auth/cloud-platform",
9834	//     "https://www.googleapis.com/auth/dialogflow"
9835	//   ]
9836	// }
9837
9838}
9839
9840// method id "dialogflow.projects.agent.restore":
9841
9842type ProjectsAgentRestoreCall struct {
9843	s                                               *Service
9844	parent                                          string
9845	googleclouddialogflowv2beta1restoreagentrequest *GoogleCloudDialogflowV2beta1RestoreAgentRequest
9846	urlParams_                                      gensupport.URLParams
9847	ctx_                                            context.Context
9848	header_                                         http.Header
9849}
9850
9851// Restore: Restores the specified agent from a ZIP file.
9852//
9853// Replaces the current agent version with a new one. All the intents
9854// and
9855// entity types in the older version are deleted.
9856//
9857//
9858// Operation <response: google.protobuf.Empty>
9859func (r *ProjectsAgentService) Restore(parent string, googleclouddialogflowv2beta1restoreagentrequest *GoogleCloudDialogflowV2beta1RestoreAgentRequest) *ProjectsAgentRestoreCall {
9860	c := &ProjectsAgentRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9861	c.parent = parent
9862	c.googleclouddialogflowv2beta1restoreagentrequest = googleclouddialogflowv2beta1restoreagentrequest
9863	return c
9864}
9865
9866// Fields allows partial responses to be retrieved. See
9867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9868// for more information.
9869func (c *ProjectsAgentRestoreCall) Fields(s ...googleapi.Field) *ProjectsAgentRestoreCall {
9870	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9871	return c
9872}
9873
9874// Context sets the context to be used in this call's Do method. Any
9875// pending HTTP request will be aborted if the provided context is
9876// canceled.
9877func (c *ProjectsAgentRestoreCall) Context(ctx context.Context) *ProjectsAgentRestoreCall {
9878	c.ctx_ = ctx
9879	return c
9880}
9881
9882// Header returns an http.Header that can be modified by the caller to
9883// add HTTP headers to the request.
9884func (c *ProjectsAgentRestoreCall) Header() http.Header {
9885	if c.header_ == nil {
9886		c.header_ = make(http.Header)
9887	}
9888	return c.header_
9889}
9890
9891func (c *ProjectsAgentRestoreCall) doRequest(alt string) (*http.Response, error) {
9892	reqHeaders := make(http.Header)
9893	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
9894	for k, v := range c.header_ {
9895		reqHeaders[k] = v
9896	}
9897	reqHeaders.Set("User-Agent", c.s.userAgent())
9898	var body io.Reader = nil
9899	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1restoreagentrequest)
9900	if err != nil {
9901		return nil, err
9902	}
9903	reqHeaders.Set("Content-Type", "application/json")
9904	c.urlParams_.Set("alt", alt)
9905	c.urlParams_.Set("prettyPrint", "false")
9906	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:restore")
9907	urls += "?" + c.urlParams_.Encode()
9908	req, err := http.NewRequest("POST", urls, body)
9909	if err != nil {
9910		return nil, err
9911	}
9912	req.Header = reqHeaders
9913	googleapi.Expand(req.URL, map[string]string{
9914		"parent": c.parent,
9915	})
9916	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9917}
9918
9919// Do executes the "dialogflow.projects.agent.restore" call.
9920// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
9921// Any non-2xx status code is an error. Response headers are in either
9922// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
9923// was returned at all) in error.(*googleapi.Error).Header. Use
9924// googleapi.IsNotModified to check whether the returned error was
9925// because http.StatusNotModified was returned.
9926func (c *ProjectsAgentRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
9927	gensupport.SetOptions(c.urlParams_, opts...)
9928	res, err := c.doRequest("json")
9929	if res != nil && res.StatusCode == http.StatusNotModified {
9930		if res.Body != nil {
9931			res.Body.Close()
9932		}
9933		return nil, &googleapi.Error{
9934			Code:   res.StatusCode,
9935			Header: res.Header,
9936		}
9937	}
9938	if err != nil {
9939		return nil, err
9940	}
9941	defer googleapi.CloseBody(res)
9942	if err := googleapi.CheckResponse(res); err != nil {
9943		return nil, err
9944	}
9945	ret := &GoogleLongrunningOperation{
9946		ServerResponse: googleapi.ServerResponse{
9947			Header:         res.Header,
9948			HTTPStatusCode: res.StatusCode,
9949		},
9950	}
9951	target := &ret
9952	if err := gensupport.DecodeResponse(target, res); err != nil {
9953		return nil, err
9954	}
9955	return ret, nil
9956	// {
9957	//   "description": "Restores the specified agent from a ZIP file.\n\nReplaces the current agent version with a new one. All the intents and\nentity types in the older version are deleted.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
9958	//   "flatPath": "v2beta1/projects/{projectsId}/agent:restore",
9959	//   "httpMethod": "POST",
9960	//   "id": "dialogflow.projects.agent.restore",
9961	//   "parameterOrder": [
9962	//     "parent"
9963	//   ],
9964	//   "parameters": {
9965	//     "parent": {
9966	//       "description": "Required. The project that the agent to restore is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
9967	//       "location": "path",
9968	//       "pattern": "^projects/[^/]+$",
9969	//       "required": true,
9970	//       "type": "string"
9971	//     }
9972	//   },
9973	//   "path": "v2beta1/{+parent}/agent:restore",
9974	//   "request": {
9975	//     "$ref": "GoogleCloudDialogflowV2beta1RestoreAgentRequest"
9976	//   },
9977	//   "response": {
9978	//     "$ref": "GoogleLongrunningOperation"
9979	//   },
9980	//   "scopes": [
9981	//     "https://www.googleapis.com/auth/cloud-platform",
9982	//     "https://www.googleapis.com/auth/dialogflow"
9983	//   ]
9984	// }
9985
9986}
9987
9988// method id "dialogflow.projects.agent.search":
9989
9990type ProjectsAgentSearchCall struct {
9991	s            *Service
9992	parent       string
9993	urlParams_   gensupport.URLParams
9994	ifNoneMatch_ string
9995	ctx_         context.Context
9996	header_      http.Header
9997}
9998
9999// Search: Returns the list of agents.
10000//
10001// Since there is at most one conversational agent per project, this
10002// method is
10003// useful primarily for listing all agents across projects the caller
10004// has
10005// access to. One can achieve that with a wildcard project collection id
10006// "-".
10007// Refer to
10008// [List
10009// Sub-Collections](https://cloud.google.com/apis/design/design_pat
10010// terns#list_sub-collections).
10011func (r *ProjectsAgentService) Search(parent string) *ProjectsAgentSearchCall {
10012	c := &ProjectsAgentSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10013	c.parent = parent
10014	return c
10015}
10016
10017// PageSize sets the optional parameter "pageSize": The maximum number
10018// of items to return in a single page. By
10019// default 100 and at most 1000.
10020func (c *ProjectsAgentSearchCall) PageSize(pageSize int64) *ProjectsAgentSearchCall {
10021	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10022	return c
10023}
10024
10025// PageToken sets the optional parameter "pageToken": The
10026// next_page_token value returned from a previous list request.
10027func (c *ProjectsAgentSearchCall) PageToken(pageToken string) *ProjectsAgentSearchCall {
10028	c.urlParams_.Set("pageToken", pageToken)
10029	return c
10030}
10031
10032// Fields allows partial responses to be retrieved. See
10033// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10034// for more information.
10035func (c *ProjectsAgentSearchCall) Fields(s ...googleapi.Field) *ProjectsAgentSearchCall {
10036	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10037	return c
10038}
10039
10040// IfNoneMatch sets the optional parameter which makes the operation
10041// fail if the object's ETag matches the given value. This is useful for
10042// getting updates only after the object has changed since the last
10043// request. Use googleapi.IsNotModified to check whether the response
10044// error from Do is the result of In-None-Match.
10045func (c *ProjectsAgentSearchCall) IfNoneMatch(entityTag string) *ProjectsAgentSearchCall {
10046	c.ifNoneMatch_ = entityTag
10047	return c
10048}
10049
10050// Context sets the context to be used in this call's Do method. Any
10051// pending HTTP request will be aborted if the provided context is
10052// canceled.
10053func (c *ProjectsAgentSearchCall) Context(ctx context.Context) *ProjectsAgentSearchCall {
10054	c.ctx_ = ctx
10055	return c
10056}
10057
10058// Header returns an http.Header that can be modified by the caller to
10059// add HTTP headers to the request.
10060func (c *ProjectsAgentSearchCall) Header() http.Header {
10061	if c.header_ == nil {
10062		c.header_ = make(http.Header)
10063	}
10064	return c.header_
10065}
10066
10067func (c *ProjectsAgentSearchCall) doRequest(alt string) (*http.Response, error) {
10068	reqHeaders := make(http.Header)
10069	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10070	for k, v := range c.header_ {
10071		reqHeaders[k] = v
10072	}
10073	reqHeaders.Set("User-Agent", c.s.userAgent())
10074	if c.ifNoneMatch_ != "" {
10075		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10076	}
10077	var body io.Reader = nil
10078	c.urlParams_.Set("alt", alt)
10079	c.urlParams_.Set("prettyPrint", "false")
10080	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:search")
10081	urls += "?" + c.urlParams_.Encode()
10082	req, err := http.NewRequest("GET", urls, body)
10083	if err != nil {
10084		return nil, err
10085	}
10086	req.Header = reqHeaders
10087	googleapi.Expand(req.URL, map[string]string{
10088		"parent": c.parent,
10089	})
10090	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10091}
10092
10093// Do executes the "dialogflow.projects.agent.search" call.
10094// Exactly one of *GoogleCloudDialogflowV2beta1SearchAgentsResponse or
10095// error will be non-nil. Any non-2xx status code is an error. Response
10096// headers are in either
10097// *GoogleCloudDialogflowV2beta1SearchAgentsResponse.ServerResponse.Heade
10098// r or (if a response was returned at all) in
10099// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10100// whether the returned error was because http.StatusNotModified was
10101// returned.
10102func (c *ProjectsAgentSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SearchAgentsResponse, error) {
10103	gensupport.SetOptions(c.urlParams_, opts...)
10104	res, err := c.doRequest("json")
10105	if res != nil && res.StatusCode == http.StatusNotModified {
10106		if res.Body != nil {
10107			res.Body.Close()
10108		}
10109		return nil, &googleapi.Error{
10110			Code:   res.StatusCode,
10111			Header: res.Header,
10112		}
10113	}
10114	if err != nil {
10115		return nil, err
10116	}
10117	defer googleapi.CloseBody(res)
10118	if err := googleapi.CheckResponse(res); err != nil {
10119		return nil, err
10120	}
10121	ret := &GoogleCloudDialogflowV2beta1SearchAgentsResponse{
10122		ServerResponse: googleapi.ServerResponse{
10123			Header:         res.Header,
10124			HTTPStatusCode: res.StatusCode,
10125		},
10126	}
10127	target := &ret
10128	if err := gensupport.DecodeResponse(target, res); err != nil {
10129		return nil, err
10130	}
10131	return ret, nil
10132	// {
10133	//   "description": "Returns the list of agents.\n\nSince there is at most one conversational agent per project, this method is\nuseful primarily for listing all agents across projects the caller has\naccess to. One can achieve that with a wildcard project collection id \"-\".\nRefer to [List\nSub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).",
10134	//   "flatPath": "v2beta1/projects/{projectsId}/agent:search",
10135	//   "httpMethod": "GET",
10136	//   "id": "dialogflow.projects.agent.search",
10137	//   "parameterOrder": [
10138	//     "parent"
10139	//   ],
10140	//   "parameters": {
10141	//     "pageSize": {
10142	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
10143	//       "format": "int32",
10144	//       "location": "query",
10145	//       "type": "integer"
10146	//     },
10147	//     "pageToken": {
10148	//       "description": "Optional. The next_page_token value returned from a previous list request.",
10149	//       "location": "query",
10150	//       "type": "string"
10151	//     },
10152	//     "parent": {
10153	//       "description": "Required. The project to list agents from.\nFormat: `projects/\u003cProject ID or '-'\u003e`.",
10154	//       "location": "path",
10155	//       "pattern": "^projects/[^/]+$",
10156	//       "required": true,
10157	//       "type": "string"
10158	//     }
10159	//   },
10160	//   "path": "v2beta1/{+parent}/agent:search",
10161	//   "response": {
10162	//     "$ref": "GoogleCloudDialogflowV2beta1SearchAgentsResponse"
10163	//   },
10164	//   "scopes": [
10165	//     "https://www.googleapis.com/auth/cloud-platform",
10166	//     "https://www.googleapis.com/auth/dialogflow"
10167	//   ]
10168	// }
10169
10170}
10171
10172// Pages invokes f for each page of results.
10173// A non-nil error returned from f will halt the iteration.
10174// The provided context supersedes any context provided to the Context method.
10175func (c *ProjectsAgentSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1SearchAgentsResponse) error) error {
10176	c.ctx_ = ctx
10177	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10178	for {
10179		x, err := c.Do()
10180		if err != nil {
10181			return err
10182		}
10183		if err := f(x); err != nil {
10184			return err
10185		}
10186		if x.NextPageToken == "" {
10187			return nil
10188		}
10189		c.PageToken(x.NextPageToken)
10190	}
10191}
10192
10193// method id "dialogflow.projects.agent.train":
10194
10195type ProjectsAgentTrainCall struct {
10196	s                                             *Service
10197	parent                                        string
10198	googleclouddialogflowv2beta1trainagentrequest *GoogleCloudDialogflowV2beta1TrainAgentRequest
10199	urlParams_                                    gensupport.URLParams
10200	ctx_                                          context.Context
10201	header_                                       http.Header
10202}
10203
10204// Train: Trains the specified agent.
10205//
10206//
10207// Operation <response: google.protobuf.Empty>
10208func (r *ProjectsAgentService) Train(parent string, googleclouddialogflowv2beta1trainagentrequest *GoogleCloudDialogflowV2beta1TrainAgentRequest) *ProjectsAgentTrainCall {
10209	c := &ProjectsAgentTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10210	c.parent = parent
10211	c.googleclouddialogflowv2beta1trainagentrequest = googleclouddialogflowv2beta1trainagentrequest
10212	return c
10213}
10214
10215// Fields allows partial responses to be retrieved. See
10216// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10217// for more information.
10218func (c *ProjectsAgentTrainCall) Fields(s ...googleapi.Field) *ProjectsAgentTrainCall {
10219	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10220	return c
10221}
10222
10223// Context sets the context to be used in this call's Do method. Any
10224// pending HTTP request will be aborted if the provided context is
10225// canceled.
10226func (c *ProjectsAgentTrainCall) Context(ctx context.Context) *ProjectsAgentTrainCall {
10227	c.ctx_ = ctx
10228	return c
10229}
10230
10231// Header returns an http.Header that can be modified by the caller to
10232// add HTTP headers to the request.
10233func (c *ProjectsAgentTrainCall) Header() http.Header {
10234	if c.header_ == nil {
10235		c.header_ = make(http.Header)
10236	}
10237	return c.header_
10238}
10239
10240func (c *ProjectsAgentTrainCall) doRequest(alt string) (*http.Response, error) {
10241	reqHeaders := make(http.Header)
10242	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10243	for k, v := range c.header_ {
10244		reqHeaders[k] = v
10245	}
10246	reqHeaders.Set("User-Agent", c.s.userAgent())
10247	var body io.Reader = nil
10248	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1trainagentrequest)
10249	if err != nil {
10250		return nil, err
10251	}
10252	reqHeaders.Set("Content-Type", "application/json")
10253	c.urlParams_.Set("alt", alt)
10254	c.urlParams_.Set("prettyPrint", "false")
10255	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:train")
10256	urls += "?" + c.urlParams_.Encode()
10257	req, err := http.NewRequest("POST", urls, body)
10258	if err != nil {
10259		return nil, err
10260	}
10261	req.Header = reqHeaders
10262	googleapi.Expand(req.URL, map[string]string{
10263		"parent": c.parent,
10264	})
10265	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10266}
10267
10268// Do executes the "dialogflow.projects.agent.train" call.
10269// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
10270// Any non-2xx status code is an error. Response headers are in either
10271// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
10272// was returned at all) in error.(*googleapi.Error).Header. Use
10273// googleapi.IsNotModified to check whether the returned error was
10274// because http.StatusNotModified was returned.
10275func (c *ProjectsAgentTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
10276	gensupport.SetOptions(c.urlParams_, opts...)
10277	res, err := c.doRequest("json")
10278	if res != nil && res.StatusCode == http.StatusNotModified {
10279		if res.Body != nil {
10280			res.Body.Close()
10281		}
10282		return nil, &googleapi.Error{
10283			Code:   res.StatusCode,
10284			Header: res.Header,
10285		}
10286	}
10287	if err != nil {
10288		return nil, err
10289	}
10290	defer googleapi.CloseBody(res)
10291	if err := googleapi.CheckResponse(res); err != nil {
10292		return nil, err
10293	}
10294	ret := &GoogleLongrunningOperation{
10295		ServerResponse: googleapi.ServerResponse{
10296			Header:         res.Header,
10297			HTTPStatusCode: res.StatusCode,
10298		},
10299	}
10300	target := &ret
10301	if err := gensupport.DecodeResponse(target, res); err != nil {
10302		return nil, err
10303	}
10304	return ret, nil
10305	// {
10306	//   "description": "Trains the specified agent.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
10307	//   "flatPath": "v2beta1/projects/{projectsId}/agent:train",
10308	//   "httpMethod": "POST",
10309	//   "id": "dialogflow.projects.agent.train",
10310	//   "parameterOrder": [
10311	//     "parent"
10312	//   ],
10313	//   "parameters": {
10314	//     "parent": {
10315	//       "description": "Required. The project that the agent to train is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
10316	//       "location": "path",
10317	//       "pattern": "^projects/[^/]+$",
10318	//       "required": true,
10319	//       "type": "string"
10320	//     }
10321	//   },
10322	//   "path": "v2beta1/{+parent}/agent:train",
10323	//   "request": {
10324	//     "$ref": "GoogleCloudDialogflowV2beta1TrainAgentRequest"
10325	//   },
10326	//   "response": {
10327	//     "$ref": "GoogleLongrunningOperation"
10328	//   },
10329	//   "scopes": [
10330	//     "https://www.googleapis.com/auth/cloud-platform",
10331	//     "https://www.googleapis.com/auth/dialogflow"
10332	//   ]
10333	// }
10334
10335}
10336
10337// method id "dialogflow.projects.agent.entityTypes.batchDelete":
10338
10339type ProjectsAgentEntityTypesBatchDeleteCall struct {
10340	s                                                         *Service
10341	parent                                                    string
10342	googleclouddialogflowv2beta1batchdeleteentitytypesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest
10343	urlParams_                                                gensupport.URLParams
10344	ctx_                                                      context.Context
10345	header_                                                   http.Header
10346}
10347
10348// BatchDelete: Deletes entity types in the specified agent.
10349//
10350// Operation <response: google.protobuf.Empty>
10351func (r *ProjectsAgentEntityTypesService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteentitytypesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest) *ProjectsAgentEntityTypesBatchDeleteCall {
10352	c := &ProjectsAgentEntityTypesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10353	c.parent = parent
10354	c.googleclouddialogflowv2beta1batchdeleteentitytypesrequest = googleclouddialogflowv2beta1batchdeleteentitytypesrequest
10355	return c
10356}
10357
10358// Fields allows partial responses to be retrieved. See
10359// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10360// for more information.
10361func (c *ProjectsAgentEntityTypesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchDeleteCall {
10362	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10363	return c
10364}
10365
10366// Context sets the context to be used in this call's Do method. Any
10367// pending HTTP request will be aborted if the provided context is
10368// canceled.
10369func (c *ProjectsAgentEntityTypesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchDeleteCall {
10370	c.ctx_ = ctx
10371	return c
10372}
10373
10374// Header returns an http.Header that can be modified by the caller to
10375// add HTTP headers to the request.
10376func (c *ProjectsAgentEntityTypesBatchDeleteCall) Header() http.Header {
10377	if c.header_ == nil {
10378		c.header_ = make(http.Header)
10379	}
10380	return c.header_
10381}
10382
10383func (c *ProjectsAgentEntityTypesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
10384	reqHeaders := make(http.Header)
10385	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10386	for k, v := range c.header_ {
10387		reqHeaders[k] = v
10388	}
10389	reqHeaders.Set("User-Agent", c.s.userAgent())
10390	var body io.Reader = nil
10391	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteentitytypesrequest)
10392	if err != nil {
10393		return nil, err
10394	}
10395	reqHeaders.Set("Content-Type", "application/json")
10396	c.urlParams_.Set("alt", alt)
10397	c.urlParams_.Set("prettyPrint", "false")
10398	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes:batchDelete")
10399	urls += "?" + c.urlParams_.Encode()
10400	req, err := http.NewRequest("POST", urls, body)
10401	if err != nil {
10402		return nil, err
10403	}
10404	req.Header = reqHeaders
10405	googleapi.Expand(req.URL, map[string]string{
10406		"parent": c.parent,
10407	})
10408	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10409}
10410
10411// Do executes the "dialogflow.projects.agent.entityTypes.batchDelete" call.
10412// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
10413// Any non-2xx status code is an error. Response headers are in either
10414// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
10415// was returned at all) in error.(*googleapi.Error).Header. Use
10416// googleapi.IsNotModified to check whether the returned error was
10417// because http.StatusNotModified was returned.
10418func (c *ProjectsAgentEntityTypesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
10419	gensupport.SetOptions(c.urlParams_, opts...)
10420	res, err := c.doRequest("json")
10421	if res != nil && res.StatusCode == http.StatusNotModified {
10422		if res.Body != nil {
10423			res.Body.Close()
10424		}
10425		return nil, &googleapi.Error{
10426			Code:   res.StatusCode,
10427			Header: res.Header,
10428		}
10429	}
10430	if err != nil {
10431		return nil, err
10432	}
10433	defer googleapi.CloseBody(res)
10434	if err := googleapi.CheckResponse(res); err != nil {
10435		return nil, err
10436	}
10437	ret := &GoogleLongrunningOperation{
10438		ServerResponse: googleapi.ServerResponse{
10439			Header:         res.Header,
10440			HTTPStatusCode: res.StatusCode,
10441		},
10442	}
10443	target := &ret
10444	if err := gensupport.DecodeResponse(target, res); err != nil {
10445		return nil, err
10446	}
10447	return ret, nil
10448	// {
10449	//   "description": "Deletes entity types in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
10450	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes:batchDelete",
10451	//   "httpMethod": "POST",
10452	//   "id": "dialogflow.projects.agent.entityTypes.batchDelete",
10453	//   "parameterOrder": [
10454	//     "parent"
10455	//   ],
10456	//   "parameters": {
10457	//     "parent": {
10458	//       "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.",
10459	//       "location": "path",
10460	//       "pattern": "^projects/[^/]+/agent$",
10461	//       "required": true,
10462	//       "type": "string"
10463	//     }
10464	//   },
10465	//   "path": "v2beta1/{+parent}/entityTypes:batchDelete",
10466	//   "request": {
10467	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest"
10468	//   },
10469	//   "response": {
10470	//     "$ref": "GoogleLongrunningOperation"
10471	//   },
10472	//   "scopes": [
10473	//     "https://www.googleapis.com/auth/cloud-platform",
10474	//     "https://www.googleapis.com/auth/dialogflow"
10475	//   ]
10476	// }
10477
10478}
10479
10480// method id "dialogflow.projects.agent.entityTypes.batchUpdate":
10481
10482type ProjectsAgentEntityTypesBatchUpdateCall struct {
10483	s                                                         *Service
10484	parent                                                    string
10485	googleclouddialogflowv2beta1batchupdateentitytypesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest
10486	urlParams_                                                gensupport.URLParams
10487	ctx_                                                      context.Context
10488	header_                                                   http.Header
10489}
10490
10491// BatchUpdate: Updates/Creates multiple entity types in the specified
10492// agent.
10493//
10494// Operation <response: BatchUpdateEntityTypesResponse>
10495func (r *ProjectsAgentEntityTypesService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateentitytypesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest) *ProjectsAgentEntityTypesBatchUpdateCall {
10496	c := &ProjectsAgentEntityTypesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10497	c.parent = parent
10498	c.googleclouddialogflowv2beta1batchupdateentitytypesrequest = googleclouddialogflowv2beta1batchupdateentitytypesrequest
10499	return c
10500}
10501
10502// Fields allows partial responses to be retrieved. See
10503// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10504// for more information.
10505func (c *ProjectsAgentEntityTypesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchUpdateCall {
10506	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10507	return c
10508}
10509
10510// Context sets the context to be used in this call's Do method. Any
10511// pending HTTP request will be aborted if the provided context is
10512// canceled.
10513func (c *ProjectsAgentEntityTypesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchUpdateCall {
10514	c.ctx_ = ctx
10515	return c
10516}
10517
10518// Header returns an http.Header that can be modified by the caller to
10519// add HTTP headers to the request.
10520func (c *ProjectsAgentEntityTypesBatchUpdateCall) Header() http.Header {
10521	if c.header_ == nil {
10522		c.header_ = make(http.Header)
10523	}
10524	return c.header_
10525}
10526
10527func (c *ProjectsAgentEntityTypesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
10528	reqHeaders := make(http.Header)
10529	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10530	for k, v := range c.header_ {
10531		reqHeaders[k] = v
10532	}
10533	reqHeaders.Set("User-Agent", c.s.userAgent())
10534	var body io.Reader = nil
10535	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateentitytypesrequest)
10536	if err != nil {
10537		return nil, err
10538	}
10539	reqHeaders.Set("Content-Type", "application/json")
10540	c.urlParams_.Set("alt", alt)
10541	c.urlParams_.Set("prettyPrint", "false")
10542	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes:batchUpdate")
10543	urls += "?" + c.urlParams_.Encode()
10544	req, err := http.NewRequest("POST", urls, body)
10545	if err != nil {
10546		return nil, err
10547	}
10548	req.Header = reqHeaders
10549	googleapi.Expand(req.URL, map[string]string{
10550		"parent": c.parent,
10551	})
10552	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10553}
10554
10555// Do executes the "dialogflow.projects.agent.entityTypes.batchUpdate" call.
10556// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
10557// Any non-2xx status code is an error. Response headers are in either
10558// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
10559// was returned at all) in error.(*googleapi.Error).Header. Use
10560// googleapi.IsNotModified to check whether the returned error was
10561// because http.StatusNotModified was returned.
10562func (c *ProjectsAgentEntityTypesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
10563	gensupport.SetOptions(c.urlParams_, opts...)
10564	res, err := c.doRequest("json")
10565	if res != nil && res.StatusCode == http.StatusNotModified {
10566		if res.Body != nil {
10567			res.Body.Close()
10568		}
10569		return nil, &googleapi.Error{
10570			Code:   res.StatusCode,
10571			Header: res.Header,
10572		}
10573	}
10574	if err != nil {
10575		return nil, err
10576	}
10577	defer googleapi.CloseBody(res)
10578	if err := googleapi.CheckResponse(res); err != nil {
10579		return nil, err
10580	}
10581	ret := &GoogleLongrunningOperation{
10582		ServerResponse: googleapi.ServerResponse{
10583			Header:         res.Header,
10584			HTTPStatusCode: res.StatusCode,
10585		},
10586	}
10587	target := &ret
10588	if err := gensupport.DecodeResponse(target, res); err != nil {
10589		return nil, err
10590	}
10591	return ret, nil
10592	// {
10593	//   "description": "Updates/Creates multiple entity types in the specified agent.\n\nOperation \u003cresponse: BatchUpdateEntityTypesResponse\u003e",
10594	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes:batchUpdate",
10595	//   "httpMethod": "POST",
10596	//   "id": "dialogflow.projects.agent.entityTypes.batchUpdate",
10597	//   "parameterOrder": [
10598	//     "parent"
10599	//   ],
10600	//   "parameters": {
10601	//     "parent": {
10602	//       "description": "Required. The name of the agent to update or create entity types in.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
10603	//       "location": "path",
10604	//       "pattern": "^projects/[^/]+/agent$",
10605	//       "required": true,
10606	//       "type": "string"
10607	//     }
10608	//   },
10609	//   "path": "v2beta1/{+parent}/entityTypes:batchUpdate",
10610	//   "request": {
10611	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest"
10612	//   },
10613	//   "response": {
10614	//     "$ref": "GoogleLongrunningOperation"
10615	//   },
10616	//   "scopes": [
10617	//     "https://www.googleapis.com/auth/cloud-platform",
10618	//     "https://www.googleapis.com/auth/dialogflow"
10619	//   ]
10620	// }
10621
10622}
10623
10624// method id "dialogflow.projects.agent.entityTypes.create":
10625
10626type ProjectsAgentEntityTypesCreateCall struct {
10627	s                                      *Service
10628	parent                                 string
10629	googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType
10630	urlParams_                             gensupport.URLParams
10631	ctx_                                   context.Context
10632	header_                                http.Header
10633}
10634
10635// Create: Creates an entity type in the specified agent.
10636func (r *ProjectsAgentEntityTypesService) Create(parent string, googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType) *ProjectsAgentEntityTypesCreateCall {
10637	c := &ProjectsAgentEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10638	c.parent = parent
10639	c.googleclouddialogflowv2beta1entitytype = googleclouddialogflowv2beta1entitytype
10640	return c
10641}
10642
10643// LanguageCode sets the optional parameter "languageCode": The language
10644// of entity synonyms defined in `entity_type`. If not
10645// specified, the agent's default language is
10646// used.
10647// [Many
10648// languages](https://cloud.google.com/dialogflow/docs/refere
10649// nce/language)
10650// are supported. Note: languages must be enabled in the agent before
10651// they can
10652// be used.
10653func (c *ProjectsAgentEntityTypesCreateCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesCreateCall {
10654	c.urlParams_.Set("languageCode", languageCode)
10655	return c
10656}
10657
10658// Fields allows partial responses to be retrieved. See
10659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10660// for more information.
10661func (c *ProjectsAgentEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesCreateCall {
10662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10663	return c
10664}
10665
10666// Context sets the context to be used in this call's Do method. Any
10667// pending HTTP request will be aborted if the provided context is
10668// canceled.
10669func (c *ProjectsAgentEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesCreateCall {
10670	c.ctx_ = ctx
10671	return c
10672}
10673
10674// Header returns an http.Header that can be modified by the caller to
10675// add HTTP headers to the request.
10676func (c *ProjectsAgentEntityTypesCreateCall) Header() http.Header {
10677	if c.header_ == nil {
10678		c.header_ = make(http.Header)
10679	}
10680	return c.header_
10681}
10682
10683func (c *ProjectsAgentEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
10684	reqHeaders := make(http.Header)
10685	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10686	for k, v := range c.header_ {
10687		reqHeaders[k] = v
10688	}
10689	reqHeaders.Set("User-Agent", c.s.userAgent())
10690	var body io.Reader = nil
10691	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1entitytype)
10692	if err != nil {
10693		return nil, err
10694	}
10695	reqHeaders.Set("Content-Type", "application/json")
10696	c.urlParams_.Set("alt", alt)
10697	c.urlParams_.Set("prettyPrint", "false")
10698	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
10699	urls += "?" + c.urlParams_.Encode()
10700	req, err := http.NewRequest("POST", urls, body)
10701	if err != nil {
10702		return nil, err
10703	}
10704	req.Header = reqHeaders
10705	googleapi.Expand(req.URL, map[string]string{
10706		"parent": c.parent,
10707	})
10708	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10709}
10710
10711// Do executes the "dialogflow.projects.agent.entityTypes.create" call.
10712// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
10713// be non-nil. Any non-2xx status code is an error. Response headers are
10714// in either
10715// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
10716// a response was returned at all) in error.(*googleapi.Error).Header.
10717// Use googleapi.IsNotModified to check whether the returned error was
10718// because http.StatusNotModified was returned.
10719func (c *ProjectsAgentEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
10720	gensupport.SetOptions(c.urlParams_, opts...)
10721	res, err := c.doRequest("json")
10722	if res != nil && res.StatusCode == http.StatusNotModified {
10723		if res.Body != nil {
10724			res.Body.Close()
10725		}
10726		return nil, &googleapi.Error{
10727			Code:   res.StatusCode,
10728			Header: res.Header,
10729		}
10730	}
10731	if err != nil {
10732		return nil, err
10733	}
10734	defer googleapi.CloseBody(res)
10735	if err := googleapi.CheckResponse(res); err != nil {
10736		return nil, err
10737	}
10738	ret := &GoogleCloudDialogflowV2beta1EntityType{
10739		ServerResponse: googleapi.ServerResponse{
10740			Header:         res.Header,
10741			HTTPStatusCode: res.StatusCode,
10742		},
10743	}
10744	target := &ret
10745	if err := gensupport.DecodeResponse(target, res); err != nil {
10746		return nil, err
10747	}
10748	return ret, nil
10749	// {
10750	//   "description": "Creates an entity type in the specified agent.",
10751	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes",
10752	//   "httpMethod": "POST",
10753	//   "id": "dialogflow.projects.agent.entityTypes.create",
10754	//   "parameterOrder": [
10755	//     "parent"
10756	//   ],
10757	//   "parameters": {
10758	//     "languageCode": {
10759	//       "description": "Optional. The language of entity synonyms defined in `entity_type`. If not\nspecified, the agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
10760	//       "location": "query",
10761	//       "type": "string"
10762	//     },
10763	//     "parent": {
10764	//       "description": "Required. The agent to create a entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
10765	//       "location": "path",
10766	//       "pattern": "^projects/[^/]+/agent$",
10767	//       "required": true,
10768	//       "type": "string"
10769	//     }
10770	//   },
10771	//   "path": "v2beta1/{+parent}/entityTypes",
10772	//   "request": {
10773	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
10774	//   },
10775	//   "response": {
10776	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
10777	//   },
10778	//   "scopes": [
10779	//     "https://www.googleapis.com/auth/cloud-platform",
10780	//     "https://www.googleapis.com/auth/dialogflow"
10781	//   ]
10782	// }
10783
10784}
10785
10786// method id "dialogflow.projects.agent.entityTypes.delete":
10787
10788type ProjectsAgentEntityTypesDeleteCall struct {
10789	s          *Service
10790	name       string
10791	urlParams_ gensupport.URLParams
10792	ctx_       context.Context
10793	header_    http.Header
10794}
10795
10796// Delete: Deletes the specified entity type.
10797func (r *ProjectsAgentEntityTypesService) Delete(name string) *ProjectsAgentEntityTypesDeleteCall {
10798	c := &ProjectsAgentEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10799	c.name = name
10800	return c
10801}
10802
10803// Fields allows partial responses to be retrieved. See
10804// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10805// for more information.
10806func (c *ProjectsAgentEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesDeleteCall {
10807	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10808	return c
10809}
10810
10811// Context sets the context to be used in this call's Do method. Any
10812// pending HTTP request will be aborted if the provided context is
10813// canceled.
10814func (c *ProjectsAgentEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesDeleteCall {
10815	c.ctx_ = ctx
10816	return c
10817}
10818
10819// Header returns an http.Header that can be modified by the caller to
10820// add HTTP headers to the request.
10821func (c *ProjectsAgentEntityTypesDeleteCall) Header() http.Header {
10822	if c.header_ == nil {
10823		c.header_ = make(http.Header)
10824	}
10825	return c.header_
10826}
10827
10828func (c *ProjectsAgentEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
10829	reqHeaders := make(http.Header)
10830	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10831	for k, v := range c.header_ {
10832		reqHeaders[k] = v
10833	}
10834	reqHeaders.Set("User-Agent", c.s.userAgent())
10835	var body io.Reader = nil
10836	c.urlParams_.Set("alt", alt)
10837	c.urlParams_.Set("prettyPrint", "false")
10838	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
10839	urls += "?" + c.urlParams_.Encode()
10840	req, err := http.NewRequest("DELETE", urls, body)
10841	if err != nil {
10842		return nil, err
10843	}
10844	req.Header = reqHeaders
10845	googleapi.Expand(req.URL, map[string]string{
10846		"name": c.name,
10847	})
10848	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10849}
10850
10851// Do executes the "dialogflow.projects.agent.entityTypes.delete" call.
10852// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
10853// non-2xx status code is an error. Response headers are in either
10854// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
10855// returned at all) in error.(*googleapi.Error).Header. Use
10856// googleapi.IsNotModified to check whether the returned error was
10857// because http.StatusNotModified was returned.
10858func (c *ProjectsAgentEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
10859	gensupport.SetOptions(c.urlParams_, opts...)
10860	res, err := c.doRequest("json")
10861	if res != nil && res.StatusCode == http.StatusNotModified {
10862		if res.Body != nil {
10863			res.Body.Close()
10864		}
10865		return nil, &googleapi.Error{
10866			Code:   res.StatusCode,
10867			Header: res.Header,
10868		}
10869	}
10870	if err != nil {
10871		return nil, err
10872	}
10873	defer googleapi.CloseBody(res)
10874	if err := googleapi.CheckResponse(res); err != nil {
10875		return nil, err
10876	}
10877	ret := &GoogleProtobufEmpty{
10878		ServerResponse: googleapi.ServerResponse{
10879			Header:         res.Header,
10880			HTTPStatusCode: res.StatusCode,
10881		},
10882	}
10883	target := &ret
10884	if err := gensupport.DecodeResponse(target, res); err != nil {
10885		return nil, err
10886	}
10887	return ret, nil
10888	// {
10889	//   "description": "Deletes the specified entity type.",
10890	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
10891	//   "httpMethod": "DELETE",
10892	//   "id": "dialogflow.projects.agent.entityTypes.delete",
10893	//   "parameterOrder": [
10894	//     "name"
10895	//   ],
10896	//   "parameters": {
10897	//     "name": {
10898	//       "description": "Required. The name of the entity type to delete.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.",
10899	//       "location": "path",
10900	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
10901	//       "required": true,
10902	//       "type": "string"
10903	//     }
10904	//   },
10905	//   "path": "v2beta1/{+name}",
10906	//   "response": {
10907	//     "$ref": "GoogleProtobufEmpty"
10908	//   },
10909	//   "scopes": [
10910	//     "https://www.googleapis.com/auth/cloud-platform",
10911	//     "https://www.googleapis.com/auth/dialogflow"
10912	//   ]
10913	// }
10914
10915}
10916
10917// method id "dialogflow.projects.agent.entityTypes.get":
10918
10919type ProjectsAgentEntityTypesGetCall struct {
10920	s            *Service
10921	name         string
10922	urlParams_   gensupport.URLParams
10923	ifNoneMatch_ string
10924	ctx_         context.Context
10925	header_      http.Header
10926}
10927
10928// Get: Retrieves the specified entity type.
10929func (r *ProjectsAgentEntityTypesService) Get(name string) *ProjectsAgentEntityTypesGetCall {
10930	c := &ProjectsAgentEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10931	c.name = name
10932	return c
10933}
10934
10935// LanguageCode sets the optional parameter "languageCode": The language
10936// to retrieve entity synonyms for. If not specified,
10937// the agent's default language is
10938// used.
10939// [Many
10940// languages](https://cloud.google.com/dialogflow/docs/refere
10941// nce/language)
10942// are supported. Note: languages must be enabled in the agent before
10943// they can
10944// be used.
10945func (c *ProjectsAgentEntityTypesGetCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesGetCall {
10946	c.urlParams_.Set("languageCode", languageCode)
10947	return c
10948}
10949
10950// Fields allows partial responses to be retrieved. See
10951// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10952// for more information.
10953func (c *ProjectsAgentEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesGetCall {
10954	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10955	return c
10956}
10957
10958// IfNoneMatch sets the optional parameter which makes the operation
10959// fail if the object's ETag matches the given value. This is useful for
10960// getting updates only after the object has changed since the last
10961// request. Use googleapi.IsNotModified to check whether the response
10962// error from Do is the result of In-None-Match.
10963func (c *ProjectsAgentEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesGetCall {
10964	c.ifNoneMatch_ = entityTag
10965	return c
10966}
10967
10968// Context sets the context to be used in this call's Do method. Any
10969// pending HTTP request will be aborted if the provided context is
10970// canceled.
10971func (c *ProjectsAgentEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEntityTypesGetCall {
10972	c.ctx_ = ctx
10973	return c
10974}
10975
10976// Header returns an http.Header that can be modified by the caller to
10977// add HTTP headers to the request.
10978func (c *ProjectsAgentEntityTypesGetCall) Header() http.Header {
10979	if c.header_ == nil {
10980		c.header_ = make(http.Header)
10981	}
10982	return c.header_
10983}
10984
10985func (c *ProjectsAgentEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
10986	reqHeaders := make(http.Header)
10987	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
10988	for k, v := range c.header_ {
10989		reqHeaders[k] = v
10990	}
10991	reqHeaders.Set("User-Agent", c.s.userAgent())
10992	if c.ifNoneMatch_ != "" {
10993		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10994	}
10995	var body io.Reader = nil
10996	c.urlParams_.Set("alt", alt)
10997	c.urlParams_.Set("prettyPrint", "false")
10998	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
10999	urls += "?" + c.urlParams_.Encode()
11000	req, err := http.NewRequest("GET", urls, body)
11001	if err != nil {
11002		return nil, err
11003	}
11004	req.Header = reqHeaders
11005	googleapi.Expand(req.URL, map[string]string{
11006		"name": c.name,
11007	})
11008	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11009}
11010
11011// Do executes the "dialogflow.projects.agent.entityTypes.get" call.
11012// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
11013// be non-nil. Any non-2xx status code is an error. Response headers are
11014// in either
11015// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
11016// a response was returned at all) in error.(*googleapi.Error).Header.
11017// Use googleapi.IsNotModified to check whether the returned error was
11018// because http.StatusNotModified was returned.
11019func (c *ProjectsAgentEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
11020	gensupport.SetOptions(c.urlParams_, opts...)
11021	res, err := c.doRequest("json")
11022	if res != nil && res.StatusCode == http.StatusNotModified {
11023		if res.Body != nil {
11024			res.Body.Close()
11025		}
11026		return nil, &googleapi.Error{
11027			Code:   res.StatusCode,
11028			Header: res.Header,
11029		}
11030	}
11031	if err != nil {
11032		return nil, err
11033	}
11034	defer googleapi.CloseBody(res)
11035	if err := googleapi.CheckResponse(res); err != nil {
11036		return nil, err
11037	}
11038	ret := &GoogleCloudDialogflowV2beta1EntityType{
11039		ServerResponse: googleapi.ServerResponse{
11040			Header:         res.Header,
11041			HTTPStatusCode: res.StatusCode,
11042		},
11043	}
11044	target := &ret
11045	if err := gensupport.DecodeResponse(target, res); err != nil {
11046		return nil, err
11047	}
11048	return ret, nil
11049	// {
11050	//   "description": "Retrieves the specified entity type.",
11051	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
11052	//   "httpMethod": "GET",
11053	//   "id": "dialogflow.projects.agent.entityTypes.get",
11054	//   "parameterOrder": [
11055	//     "name"
11056	//   ],
11057	//   "parameters": {
11058	//     "languageCode": {
11059	//       "description": "Optional. The language to retrieve entity synonyms for. If not specified,\nthe agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
11060	//       "location": "query",
11061	//       "type": "string"
11062	//     },
11063	//     "name": {
11064	//       "description": "Required. The name of the entity type.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.",
11065	//       "location": "path",
11066	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
11067	//       "required": true,
11068	//       "type": "string"
11069	//     }
11070	//   },
11071	//   "path": "v2beta1/{+name}",
11072	//   "response": {
11073	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
11074	//   },
11075	//   "scopes": [
11076	//     "https://www.googleapis.com/auth/cloud-platform",
11077	//     "https://www.googleapis.com/auth/dialogflow"
11078	//   ]
11079	// }
11080
11081}
11082
11083// method id "dialogflow.projects.agent.entityTypes.list":
11084
11085type ProjectsAgentEntityTypesListCall struct {
11086	s            *Service
11087	parent       string
11088	urlParams_   gensupport.URLParams
11089	ifNoneMatch_ string
11090	ctx_         context.Context
11091	header_      http.Header
11092}
11093
11094// List: Returns the list of all entity types in the specified agent.
11095func (r *ProjectsAgentEntityTypesService) List(parent string) *ProjectsAgentEntityTypesListCall {
11096	c := &ProjectsAgentEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11097	c.parent = parent
11098	return c
11099}
11100
11101// LanguageCode sets the optional parameter "languageCode": The language
11102// to list entity synonyms for. If not specified,
11103// the agent's default language is
11104// used.
11105// [Many
11106// languages](https://cloud.google.com/dialogflow/docs/refere
11107// nce/language)
11108// are supported. Note: languages must be enabled in the agent before
11109// they can
11110// be used.
11111func (c *ProjectsAgentEntityTypesListCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesListCall {
11112	c.urlParams_.Set("languageCode", languageCode)
11113	return c
11114}
11115
11116// PageSize sets the optional parameter "pageSize": The maximum number
11117// of items to return in a single page. By
11118// default 100 and at most 1000.
11119func (c *ProjectsAgentEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEntityTypesListCall {
11120	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11121	return c
11122}
11123
11124// PageToken sets the optional parameter "pageToken": The
11125// next_page_token value returned from a previous list request.
11126func (c *ProjectsAgentEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEntityTypesListCall {
11127	c.urlParams_.Set("pageToken", pageToken)
11128	return c
11129}
11130
11131// Fields allows partial responses to be retrieved. See
11132// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11133// for more information.
11134func (c *ProjectsAgentEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesListCall {
11135	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11136	return c
11137}
11138
11139// IfNoneMatch sets the optional parameter which makes the operation
11140// fail if the object's ETag matches the given value. This is useful for
11141// getting updates only after the object has changed since the last
11142// request. Use googleapi.IsNotModified to check whether the response
11143// error from Do is the result of In-None-Match.
11144func (c *ProjectsAgentEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesListCall {
11145	c.ifNoneMatch_ = entityTag
11146	return c
11147}
11148
11149// Context sets the context to be used in this call's Do method. Any
11150// pending HTTP request will be aborted if the provided context is
11151// canceled.
11152func (c *ProjectsAgentEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEntityTypesListCall {
11153	c.ctx_ = ctx
11154	return c
11155}
11156
11157// Header returns an http.Header that can be modified by the caller to
11158// add HTTP headers to the request.
11159func (c *ProjectsAgentEntityTypesListCall) Header() http.Header {
11160	if c.header_ == nil {
11161		c.header_ = make(http.Header)
11162	}
11163	return c.header_
11164}
11165
11166func (c *ProjectsAgentEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
11167	reqHeaders := make(http.Header)
11168	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11169	for k, v := range c.header_ {
11170		reqHeaders[k] = v
11171	}
11172	reqHeaders.Set("User-Agent", c.s.userAgent())
11173	if c.ifNoneMatch_ != "" {
11174		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11175	}
11176	var body io.Reader = nil
11177	c.urlParams_.Set("alt", alt)
11178	c.urlParams_.Set("prettyPrint", "false")
11179	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
11180	urls += "?" + c.urlParams_.Encode()
11181	req, err := http.NewRequest("GET", urls, body)
11182	if err != nil {
11183		return nil, err
11184	}
11185	req.Header = reqHeaders
11186	googleapi.Expand(req.URL, map[string]string{
11187		"parent": c.parent,
11188	})
11189	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11190}
11191
11192// Do executes the "dialogflow.projects.agent.entityTypes.list" call.
11193// Exactly one of *GoogleCloudDialogflowV2beta1ListEntityTypesResponse
11194// or error will be non-nil. Any non-2xx status code is an error.
11195// Response headers are in either
11196// *GoogleCloudDialogflowV2beta1ListEntityTypesResponse.ServerResponse.He
11197// ader or (if a response was returned at all) in
11198// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11199// whether the returned error was because http.StatusNotModified was
11200// returned.
11201func (c *ProjectsAgentEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListEntityTypesResponse, error) {
11202	gensupport.SetOptions(c.urlParams_, opts...)
11203	res, err := c.doRequest("json")
11204	if res != nil && res.StatusCode == http.StatusNotModified {
11205		if res.Body != nil {
11206			res.Body.Close()
11207		}
11208		return nil, &googleapi.Error{
11209			Code:   res.StatusCode,
11210			Header: res.Header,
11211		}
11212	}
11213	if err != nil {
11214		return nil, err
11215	}
11216	defer googleapi.CloseBody(res)
11217	if err := googleapi.CheckResponse(res); err != nil {
11218		return nil, err
11219	}
11220	ret := &GoogleCloudDialogflowV2beta1ListEntityTypesResponse{
11221		ServerResponse: googleapi.ServerResponse{
11222			Header:         res.Header,
11223			HTTPStatusCode: res.StatusCode,
11224		},
11225	}
11226	target := &ret
11227	if err := gensupport.DecodeResponse(target, res); err != nil {
11228		return nil, err
11229	}
11230	return ret, nil
11231	// {
11232	//   "description": "Returns the list of all entity types in the specified agent.",
11233	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes",
11234	//   "httpMethod": "GET",
11235	//   "id": "dialogflow.projects.agent.entityTypes.list",
11236	//   "parameterOrder": [
11237	//     "parent"
11238	//   ],
11239	//   "parameters": {
11240	//     "languageCode": {
11241	//       "description": "Optional. The language to list entity synonyms for. If not specified,\nthe agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
11242	//       "location": "query",
11243	//       "type": "string"
11244	//     },
11245	//     "pageSize": {
11246	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
11247	//       "format": "int32",
11248	//       "location": "query",
11249	//       "type": "integer"
11250	//     },
11251	//     "pageToken": {
11252	//       "description": "Optional. The next_page_token value returned from a previous list request.",
11253	//       "location": "query",
11254	//       "type": "string"
11255	//     },
11256	//     "parent": {
11257	//       "description": "Required. The agent to list all entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
11258	//       "location": "path",
11259	//       "pattern": "^projects/[^/]+/agent$",
11260	//       "required": true,
11261	//       "type": "string"
11262	//     }
11263	//   },
11264	//   "path": "v2beta1/{+parent}/entityTypes",
11265	//   "response": {
11266	//     "$ref": "GoogleCloudDialogflowV2beta1ListEntityTypesResponse"
11267	//   },
11268	//   "scopes": [
11269	//     "https://www.googleapis.com/auth/cloud-platform",
11270	//     "https://www.googleapis.com/auth/dialogflow"
11271	//   ]
11272	// }
11273
11274}
11275
11276// Pages invokes f for each page of results.
11277// A non-nil error returned from f will halt the iteration.
11278// The provided context supersedes any context provided to the Context method.
11279func (c *ProjectsAgentEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListEntityTypesResponse) error) error {
11280	c.ctx_ = ctx
11281	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11282	for {
11283		x, err := c.Do()
11284		if err != nil {
11285			return err
11286		}
11287		if err := f(x); err != nil {
11288			return err
11289		}
11290		if x.NextPageToken == "" {
11291			return nil
11292		}
11293		c.PageToken(x.NextPageToken)
11294	}
11295}
11296
11297// method id "dialogflow.projects.agent.entityTypes.patch":
11298
11299type ProjectsAgentEntityTypesPatchCall struct {
11300	s                                      *Service
11301	nameid                                 string
11302	googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType
11303	urlParams_                             gensupport.URLParams
11304	ctx_                                   context.Context
11305	header_                                http.Header
11306}
11307
11308// Patch: Updates the specified entity type.
11309func (r *ProjectsAgentEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType) *ProjectsAgentEntityTypesPatchCall {
11310	c := &ProjectsAgentEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11311	c.nameid = nameid
11312	c.googleclouddialogflowv2beta1entitytype = googleclouddialogflowv2beta1entitytype
11313	return c
11314}
11315
11316// LanguageCode sets the optional parameter "languageCode": The language
11317// of entity synonyms defined in `entity_type`. If not
11318// specified, the agent's default language is
11319// used.
11320// [Many
11321// languages](https://cloud.google.com/dialogflow/docs/refere
11322// nce/language)
11323// are supported. Note: languages must be enabled in the agent before
11324// they can
11325// be used.
11326func (c *ProjectsAgentEntityTypesPatchCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesPatchCall {
11327	c.urlParams_.Set("languageCode", languageCode)
11328	return c
11329}
11330
11331// UpdateMask sets the optional parameter "updateMask": The mask to
11332// control which fields get updated.
11333func (c *ProjectsAgentEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEntityTypesPatchCall {
11334	c.urlParams_.Set("updateMask", updateMask)
11335	return c
11336}
11337
11338// Fields allows partial responses to be retrieved. See
11339// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11340// for more information.
11341func (c *ProjectsAgentEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesPatchCall {
11342	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11343	return c
11344}
11345
11346// Context sets the context to be used in this call's Do method. Any
11347// pending HTTP request will be aborted if the provided context is
11348// canceled.
11349func (c *ProjectsAgentEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEntityTypesPatchCall {
11350	c.ctx_ = ctx
11351	return c
11352}
11353
11354// Header returns an http.Header that can be modified by the caller to
11355// add HTTP headers to the request.
11356func (c *ProjectsAgentEntityTypesPatchCall) Header() http.Header {
11357	if c.header_ == nil {
11358		c.header_ = make(http.Header)
11359	}
11360	return c.header_
11361}
11362
11363func (c *ProjectsAgentEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
11364	reqHeaders := make(http.Header)
11365	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11366	for k, v := range c.header_ {
11367		reqHeaders[k] = v
11368	}
11369	reqHeaders.Set("User-Agent", c.s.userAgent())
11370	var body io.Reader = nil
11371	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1entitytype)
11372	if err != nil {
11373		return nil, err
11374	}
11375	reqHeaders.Set("Content-Type", "application/json")
11376	c.urlParams_.Set("alt", alt)
11377	c.urlParams_.Set("prettyPrint", "false")
11378	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
11379	urls += "?" + c.urlParams_.Encode()
11380	req, err := http.NewRequest("PATCH", urls, body)
11381	if err != nil {
11382		return nil, err
11383	}
11384	req.Header = reqHeaders
11385	googleapi.Expand(req.URL, map[string]string{
11386		"name": c.nameid,
11387	})
11388	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11389}
11390
11391// Do executes the "dialogflow.projects.agent.entityTypes.patch" call.
11392// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
11393// be non-nil. Any non-2xx status code is an error. Response headers are
11394// in either
11395// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
11396// a response was returned at all) in error.(*googleapi.Error).Header.
11397// Use googleapi.IsNotModified to check whether the returned error was
11398// because http.StatusNotModified was returned.
11399func (c *ProjectsAgentEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
11400	gensupport.SetOptions(c.urlParams_, opts...)
11401	res, err := c.doRequest("json")
11402	if res != nil && res.StatusCode == http.StatusNotModified {
11403		if res.Body != nil {
11404			res.Body.Close()
11405		}
11406		return nil, &googleapi.Error{
11407			Code:   res.StatusCode,
11408			Header: res.Header,
11409		}
11410	}
11411	if err != nil {
11412		return nil, err
11413	}
11414	defer googleapi.CloseBody(res)
11415	if err := googleapi.CheckResponse(res); err != nil {
11416		return nil, err
11417	}
11418	ret := &GoogleCloudDialogflowV2beta1EntityType{
11419		ServerResponse: googleapi.ServerResponse{
11420			Header:         res.Header,
11421			HTTPStatusCode: res.StatusCode,
11422		},
11423	}
11424	target := &ret
11425	if err := gensupport.DecodeResponse(target, res); err != nil {
11426		return nil, err
11427	}
11428	return ret, nil
11429	// {
11430	//   "description": "Updates the specified entity type.",
11431	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
11432	//   "httpMethod": "PATCH",
11433	//   "id": "dialogflow.projects.agent.entityTypes.patch",
11434	//   "parameterOrder": [
11435	//     "name"
11436	//   ],
11437	//   "parameters": {
11438	//     "languageCode": {
11439	//       "description": "Optional. The language of entity synonyms defined in `entity_type`. If not\nspecified, the agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
11440	//       "location": "query",
11441	//       "type": "string"
11442	//     },
11443	//     "name": {
11444	//       "description": "The unique identifier of the entity type.\nRequired for EntityTypes.UpdateEntityType and\nEntityTypes.BatchUpdateEntityTypes methods.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
11445	//       "location": "path",
11446	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
11447	//       "required": true,
11448	//       "type": "string"
11449	//     },
11450	//     "updateMask": {
11451	//       "description": "Optional. The mask to control which fields get updated.",
11452	//       "format": "google-fieldmask",
11453	//       "location": "query",
11454	//       "type": "string"
11455	//     }
11456	//   },
11457	//   "path": "v2beta1/{+name}",
11458	//   "request": {
11459	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
11460	//   },
11461	//   "response": {
11462	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
11463	//   },
11464	//   "scopes": [
11465	//     "https://www.googleapis.com/auth/cloud-platform",
11466	//     "https://www.googleapis.com/auth/dialogflow"
11467	//   ]
11468	// }
11469
11470}
11471
11472// method id "dialogflow.projects.agent.entityTypes.entities.batchCreate":
11473
11474type ProjectsAgentEntityTypesEntitiesBatchCreateCall struct {
11475	s                                                      *Service
11476	parent                                                 string
11477	googleclouddialogflowv2beta1batchcreateentitiesrequest *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest
11478	urlParams_                                             gensupport.URLParams
11479	ctx_                                                   context.Context
11480	header_                                                http.Header
11481}
11482
11483// BatchCreate: Creates multiple new entities in the specified entity
11484// type.
11485//
11486// Operation <response: google.protobuf.Empty>
11487func (r *ProjectsAgentEntityTypesEntitiesService) BatchCreate(parent string, googleclouddialogflowv2beta1batchcreateentitiesrequest *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
11488	c := &ProjectsAgentEntityTypesEntitiesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11489	c.parent = parent
11490	c.googleclouddialogflowv2beta1batchcreateentitiesrequest = googleclouddialogflowv2beta1batchcreateentitiesrequest
11491	return c
11492}
11493
11494// Fields allows partial responses to be retrieved. See
11495// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11496// for more information.
11497func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
11498	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11499	return c
11500}
11501
11502// Context sets the context to be used in this call's Do method. Any
11503// pending HTTP request will be aborted if the provided context is
11504// canceled.
11505func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
11506	c.ctx_ = ctx
11507	return c
11508}
11509
11510// Header returns an http.Header that can be modified by the caller to
11511// add HTTP headers to the request.
11512func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Header() http.Header {
11513	if c.header_ == nil {
11514		c.header_ = make(http.Header)
11515	}
11516	return c.header_
11517}
11518
11519func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) doRequest(alt string) (*http.Response, error) {
11520	reqHeaders := make(http.Header)
11521	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11522	for k, v := range c.header_ {
11523		reqHeaders[k] = v
11524	}
11525	reqHeaders.Set("User-Agent", c.s.userAgent())
11526	var body io.Reader = nil
11527	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchcreateentitiesrequest)
11528	if err != nil {
11529		return nil, err
11530	}
11531	reqHeaders.Set("Content-Type", "application/json")
11532	c.urlParams_.Set("alt", alt)
11533	c.urlParams_.Set("prettyPrint", "false")
11534	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchCreate")
11535	urls += "?" + c.urlParams_.Encode()
11536	req, err := http.NewRequest("POST", urls, body)
11537	if err != nil {
11538		return nil, err
11539	}
11540	req.Header = reqHeaders
11541	googleapi.Expand(req.URL, map[string]string{
11542		"parent": c.parent,
11543	})
11544	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11545}
11546
11547// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchCreate" call.
11548// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
11549// Any non-2xx status code is an error. Response headers are in either
11550// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
11551// was returned at all) in error.(*googleapi.Error).Header. Use
11552// googleapi.IsNotModified to check whether the returned error was
11553// because http.StatusNotModified was returned.
11554func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
11555	gensupport.SetOptions(c.urlParams_, opts...)
11556	res, err := c.doRequest("json")
11557	if res != nil && res.StatusCode == http.StatusNotModified {
11558		if res.Body != nil {
11559			res.Body.Close()
11560		}
11561		return nil, &googleapi.Error{
11562			Code:   res.StatusCode,
11563			Header: res.Header,
11564		}
11565	}
11566	if err != nil {
11567		return nil, err
11568	}
11569	defer googleapi.CloseBody(res)
11570	if err := googleapi.CheckResponse(res); err != nil {
11571		return nil, err
11572	}
11573	ret := &GoogleLongrunningOperation{
11574		ServerResponse: googleapi.ServerResponse{
11575			Header:         res.Header,
11576			HTTPStatusCode: res.StatusCode,
11577		},
11578	}
11579	target := &ret
11580	if err := gensupport.DecodeResponse(target, res); err != nil {
11581		return nil, err
11582	}
11583	return ret, nil
11584	// {
11585	//   "description": "Creates multiple new entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
11586	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate",
11587	//   "httpMethod": "POST",
11588	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchCreate",
11589	//   "parameterOrder": [
11590	//     "parent"
11591	//   ],
11592	//   "parameters": {
11593	//     "parent": {
11594	//       "description": "Required. The name of the entity type to create entities in. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
11595	//       "location": "path",
11596	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
11597	//       "required": true,
11598	//       "type": "string"
11599	//     }
11600	//   },
11601	//   "path": "v2beta1/{+parent}/entities:batchCreate",
11602	//   "request": {
11603	//     "$ref": "GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest"
11604	//   },
11605	//   "response": {
11606	//     "$ref": "GoogleLongrunningOperation"
11607	//   },
11608	//   "scopes": [
11609	//     "https://www.googleapis.com/auth/cloud-platform",
11610	//     "https://www.googleapis.com/auth/dialogflow"
11611	//   ]
11612	// }
11613
11614}
11615
11616// method id "dialogflow.projects.agent.entityTypes.entities.batchDelete":
11617
11618type ProjectsAgentEntityTypesEntitiesBatchDeleteCall struct {
11619	s                                                      *Service
11620	parent                                                 string
11621	googleclouddialogflowv2beta1batchdeleteentitiesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest
11622	urlParams_                                             gensupport.URLParams
11623	ctx_                                                   context.Context
11624	header_                                                http.Header
11625}
11626
11627// BatchDelete: Deletes entities in the specified entity
11628// type.
11629//
11630// Operation <response: google.protobuf.Empty>
11631func (r *ProjectsAgentEntityTypesEntitiesService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteentitiesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
11632	c := &ProjectsAgentEntityTypesEntitiesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11633	c.parent = parent
11634	c.googleclouddialogflowv2beta1batchdeleteentitiesrequest = googleclouddialogflowv2beta1batchdeleteentitiesrequest
11635	return c
11636}
11637
11638// Fields allows partial responses to be retrieved. See
11639// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11640// for more information.
11641func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
11642	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11643	return c
11644}
11645
11646// Context sets the context to be used in this call's Do method. Any
11647// pending HTTP request will be aborted if the provided context is
11648// canceled.
11649func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
11650	c.ctx_ = ctx
11651	return c
11652}
11653
11654// Header returns an http.Header that can be modified by the caller to
11655// add HTTP headers to the request.
11656func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Header() http.Header {
11657	if c.header_ == nil {
11658		c.header_ = make(http.Header)
11659	}
11660	return c.header_
11661}
11662
11663func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
11664	reqHeaders := make(http.Header)
11665	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11666	for k, v := range c.header_ {
11667		reqHeaders[k] = v
11668	}
11669	reqHeaders.Set("User-Agent", c.s.userAgent())
11670	var body io.Reader = nil
11671	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteentitiesrequest)
11672	if err != nil {
11673		return nil, err
11674	}
11675	reqHeaders.Set("Content-Type", "application/json")
11676	c.urlParams_.Set("alt", alt)
11677	c.urlParams_.Set("prettyPrint", "false")
11678	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchDelete")
11679	urls += "?" + c.urlParams_.Encode()
11680	req, err := http.NewRequest("POST", urls, body)
11681	if err != nil {
11682		return nil, err
11683	}
11684	req.Header = reqHeaders
11685	googleapi.Expand(req.URL, map[string]string{
11686		"parent": c.parent,
11687	})
11688	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11689}
11690
11691// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchDelete" call.
11692// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
11693// Any non-2xx status code is an error. Response headers are in either
11694// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
11695// was returned at all) in error.(*googleapi.Error).Header. Use
11696// googleapi.IsNotModified to check whether the returned error was
11697// because http.StatusNotModified was returned.
11698func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
11699	gensupport.SetOptions(c.urlParams_, opts...)
11700	res, err := c.doRequest("json")
11701	if res != nil && res.StatusCode == http.StatusNotModified {
11702		if res.Body != nil {
11703			res.Body.Close()
11704		}
11705		return nil, &googleapi.Error{
11706			Code:   res.StatusCode,
11707			Header: res.Header,
11708		}
11709	}
11710	if err != nil {
11711		return nil, err
11712	}
11713	defer googleapi.CloseBody(res)
11714	if err := googleapi.CheckResponse(res); err != nil {
11715		return nil, err
11716	}
11717	ret := &GoogleLongrunningOperation{
11718		ServerResponse: googleapi.ServerResponse{
11719			Header:         res.Header,
11720			HTTPStatusCode: res.StatusCode,
11721		},
11722	}
11723	target := &ret
11724	if err := gensupport.DecodeResponse(target, res); err != nil {
11725		return nil, err
11726	}
11727	return ret, nil
11728	// {
11729	//   "description": "Deletes entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
11730	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete",
11731	//   "httpMethod": "POST",
11732	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchDelete",
11733	//   "parameterOrder": [
11734	//     "parent"
11735	//   ],
11736	//   "parameters": {
11737	//     "parent": {
11738	//       "description": "Required. The name of the entity type to delete entries for. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
11739	//       "location": "path",
11740	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
11741	//       "required": true,
11742	//       "type": "string"
11743	//     }
11744	//   },
11745	//   "path": "v2beta1/{+parent}/entities:batchDelete",
11746	//   "request": {
11747	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest"
11748	//   },
11749	//   "response": {
11750	//     "$ref": "GoogleLongrunningOperation"
11751	//   },
11752	//   "scopes": [
11753	//     "https://www.googleapis.com/auth/cloud-platform",
11754	//     "https://www.googleapis.com/auth/dialogflow"
11755	//   ]
11756	// }
11757
11758}
11759
11760// method id "dialogflow.projects.agent.entityTypes.entities.batchUpdate":
11761
11762type ProjectsAgentEntityTypesEntitiesBatchUpdateCall struct {
11763	s                                                      *Service
11764	parent                                                 string
11765	googleclouddialogflowv2beta1batchupdateentitiesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest
11766	urlParams_                                             gensupport.URLParams
11767	ctx_                                                   context.Context
11768	header_                                                http.Header
11769}
11770
11771// BatchUpdate: Updates or creates multiple entities in the specified
11772// entity type. This
11773// method does not affect entities in the entity type that aren't
11774// explicitly
11775// specified in the request.
11776//
11777// Operation <response: google.protobuf.Empty>
11778func (r *ProjectsAgentEntityTypesEntitiesService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateentitiesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
11779	c := &ProjectsAgentEntityTypesEntitiesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11780	c.parent = parent
11781	c.googleclouddialogflowv2beta1batchupdateentitiesrequest = googleclouddialogflowv2beta1batchupdateentitiesrequest
11782	return c
11783}
11784
11785// Fields allows partial responses to be retrieved. See
11786// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11787// for more information.
11788func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
11789	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11790	return c
11791}
11792
11793// Context sets the context to be used in this call's Do method. Any
11794// pending HTTP request will be aborted if the provided context is
11795// canceled.
11796func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
11797	c.ctx_ = ctx
11798	return c
11799}
11800
11801// Header returns an http.Header that can be modified by the caller to
11802// add HTTP headers to the request.
11803func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Header() http.Header {
11804	if c.header_ == nil {
11805		c.header_ = make(http.Header)
11806	}
11807	return c.header_
11808}
11809
11810func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
11811	reqHeaders := make(http.Header)
11812	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11813	for k, v := range c.header_ {
11814		reqHeaders[k] = v
11815	}
11816	reqHeaders.Set("User-Agent", c.s.userAgent())
11817	var body io.Reader = nil
11818	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateentitiesrequest)
11819	if err != nil {
11820		return nil, err
11821	}
11822	reqHeaders.Set("Content-Type", "application/json")
11823	c.urlParams_.Set("alt", alt)
11824	c.urlParams_.Set("prettyPrint", "false")
11825	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchUpdate")
11826	urls += "?" + c.urlParams_.Encode()
11827	req, err := http.NewRequest("POST", urls, body)
11828	if err != nil {
11829		return nil, err
11830	}
11831	req.Header = reqHeaders
11832	googleapi.Expand(req.URL, map[string]string{
11833		"parent": c.parent,
11834	})
11835	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11836}
11837
11838// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchUpdate" call.
11839// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
11840// Any non-2xx status code is an error. Response headers are in either
11841// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
11842// was returned at all) in error.(*googleapi.Error).Header. Use
11843// googleapi.IsNotModified to check whether the returned error was
11844// because http.StatusNotModified was returned.
11845func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
11846	gensupport.SetOptions(c.urlParams_, opts...)
11847	res, err := c.doRequest("json")
11848	if res != nil && res.StatusCode == http.StatusNotModified {
11849		if res.Body != nil {
11850			res.Body.Close()
11851		}
11852		return nil, &googleapi.Error{
11853			Code:   res.StatusCode,
11854			Header: res.Header,
11855		}
11856	}
11857	if err != nil {
11858		return nil, err
11859	}
11860	defer googleapi.CloseBody(res)
11861	if err := googleapi.CheckResponse(res); err != nil {
11862		return nil, err
11863	}
11864	ret := &GoogleLongrunningOperation{
11865		ServerResponse: googleapi.ServerResponse{
11866			Header:         res.Header,
11867			HTTPStatusCode: res.StatusCode,
11868		},
11869	}
11870	target := &ret
11871	if err := gensupport.DecodeResponse(target, res); err != nil {
11872		return nil, err
11873	}
11874	return ret, nil
11875	// {
11876	//   "description": "Updates or creates multiple entities in the specified entity type. This\nmethod does not affect entities in the entity type that aren't explicitly\nspecified in the request.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
11877	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate",
11878	//   "httpMethod": "POST",
11879	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchUpdate",
11880	//   "parameterOrder": [
11881	//     "parent"
11882	//   ],
11883	//   "parameters": {
11884	//     "parent": {
11885	//       "description": "Required. The name of the entity type to update or create entities in.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
11886	//       "location": "path",
11887	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
11888	//       "required": true,
11889	//       "type": "string"
11890	//     }
11891	//   },
11892	//   "path": "v2beta1/{+parent}/entities:batchUpdate",
11893	//   "request": {
11894	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest"
11895	//   },
11896	//   "response": {
11897	//     "$ref": "GoogleLongrunningOperation"
11898	//   },
11899	//   "scopes": [
11900	//     "https://www.googleapis.com/auth/cloud-platform",
11901	//     "https://www.googleapis.com/auth/dialogflow"
11902	//   ]
11903	// }
11904
11905}
11906
11907// method id "dialogflow.projects.agent.environments.users.sessions.deleteContexts":
11908
11909type ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall struct {
11910	s          *Service
11911	parent     string
11912	urlParams_ gensupport.URLParams
11913	ctx_       context.Context
11914	header_    http.Header
11915}
11916
11917// DeleteContexts: Deletes all active contexts in the specified session.
11918func (r *ProjectsAgentEnvironmentsUsersSessionsService) DeleteContexts(parent string) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
11919	c := &ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11920	c.parent = parent
11921	return c
11922}
11923
11924// Fields allows partial responses to be retrieved. See
11925// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11926// for more information.
11927func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
11928	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11929	return c
11930}
11931
11932// Context sets the context to be used in this call's Do method. Any
11933// pending HTTP request will be aborted if the provided context is
11934// canceled.
11935func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
11936	c.ctx_ = ctx
11937	return c
11938}
11939
11940// Header returns an http.Header that can be modified by the caller to
11941// add HTTP headers to the request.
11942func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Header() http.Header {
11943	if c.header_ == nil {
11944		c.header_ = make(http.Header)
11945	}
11946	return c.header_
11947}
11948
11949func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
11950	reqHeaders := make(http.Header)
11951	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
11952	for k, v := range c.header_ {
11953		reqHeaders[k] = v
11954	}
11955	reqHeaders.Set("User-Agent", c.s.userAgent())
11956	var body io.Reader = nil
11957	c.urlParams_.Set("alt", alt)
11958	c.urlParams_.Set("prettyPrint", "false")
11959	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
11960	urls += "?" + c.urlParams_.Encode()
11961	req, err := http.NewRequest("DELETE", urls, body)
11962	if err != nil {
11963		return nil, err
11964	}
11965	req.Header = reqHeaders
11966	googleapi.Expand(req.URL, map[string]string{
11967		"parent": c.parent,
11968	})
11969	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11970}
11971
11972// Do executes the "dialogflow.projects.agent.environments.users.sessions.deleteContexts" call.
11973// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
11974// non-2xx status code is an error. Response headers are in either
11975// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
11976// returned at all) in error.(*googleapi.Error).Header. Use
11977// googleapi.IsNotModified to check whether the returned error was
11978// because http.StatusNotModified was returned.
11979func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
11980	gensupport.SetOptions(c.urlParams_, opts...)
11981	res, err := c.doRequest("json")
11982	if res != nil && res.StatusCode == http.StatusNotModified {
11983		if res.Body != nil {
11984			res.Body.Close()
11985		}
11986		return nil, &googleapi.Error{
11987			Code:   res.StatusCode,
11988			Header: res.Header,
11989		}
11990	}
11991	if err != nil {
11992		return nil, err
11993	}
11994	defer googleapi.CloseBody(res)
11995	if err := googleapi.CheckResponse(res); err != nil {
11996		return nil, err
11997	}
11998	ret := &GoogleProtobufEmpty{
11999		ServerResponse: googleapi.ServerResponse{
12000			Header:         res.Header,
12001			HTTPStatusCode: res.StatusCode,
12002		},
12003	}
12004	target := &ret
12005	if err := gensupport.DecodeResponse(target, res); err != nil {
12006		return nil, err
12007	}
12008	return ret, nil
12009	// {
12010	//   "description": "Deletes all active contexts in the specified session.",
12011	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
12012	//   "httpMethod": "DELETE",
12013	//   "id": "dialogflow.projects.agent.environments.users.sessions.deleteContexts",
12014	//   "parameterOrder": [
12015	//     "parent"
12016	//   ],
12017	//   "parameters": {
12018	//     "parent": {
12019	//       "description": "Required. The name of the session to delete all contexts from. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or `projects/\u003cProject\nID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession\nID\u003e`. If `Environment ID` is not specified we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
12020	//       "location": "path",
12021	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
12022	//       "required": true,
12023	//       "type": "string"
12024	//     }
12025	//   },
12026	//   "path": "v2beta1/{+parent}/contexts",
12027	//   "response": {
12028	//     "$ref": "GoogleProtobufEmpty"
12029	//   },
12030	//   "scopes": [
12031	//     "https://www.googleapis.com/auth/cloud-platform",
12032	//     "https://www.googleapis.com/auth/dialogflow"
12033	//   ]
12034	// }
12035
12036}
12037
12038// method id "dialogflow.projects.agent.environments.users.sessions.detectIntent":
12039
12040type ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall struct {
12041	s                                               *Service
12042	sessionid                                       string
12043	googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest
12044	urlParams_                                      gensupport.URLParams
12045	ctx_                                            context.Context
12046	header_                                         http.Header
12047}
12048
12049// DetectIntent: Processes a natural language query and returns
12050// structured, actionable data
12051// as a result. This method is not idempotent, because it may cause
12052// contexts
12053// and session entity types to be updated, which in turn might
12054// affect
12055// results of future queries.
12056func (r *ProjectsAgentEnvironmentsUsersSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
12057	c := &ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12058	c.sessionid = sessionid
12059	c.googleclouddialogflowv2beta1detectintentrequest = googleclouddialogflowv2beta1detectintentrequest
12060	return c
12061}
12062
12063// Fields allows partial responses to be retrieved. See
12064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12065// for more information.
12066func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
12067	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12068	return c
12069}
12070
12071// Context sets the context to be used in this call's Do method. Any
12072// pending HTTP request will be aborted if the provided context is
12073// canceled.
12074func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
12075	c.ctx_ = ctx
12076	return c
12077}
12078
12079// Header returns an http.Header that can be modified by the caller to
12080// add HTTP headers to the request.
12081func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Header() http.Header {
12082	if c.header_ == nil {
12083		c.header_ = make(http.Header)
12084	}
12085	return c.header_
12086}
12087
12088func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
12089	reqHeaders := make(http.Header)
12090	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12091	for k, v := range c.header_ {
12092		reqHeaders[k] = v
12093	}
12094	reqHeaders.Set("User-Agent", c.s.userAgent())
12095	var body io.Reader = nil
12096	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1detectintentrequest)
12097	if err != nil {
12098		return nil, err
12099	}
12100	reqHeaders.Set("Content-Type", "application/json")
12101	c.urlParams_.Set("alt", alt)
12102	c.urlParams_.Set("prettyPrint", "false")
12103	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+session}:detectIntent")
12104	urls += "?" + c.urlParams_.Encode()
12105	req, err := http.NewRequest("POST", urls, body)
12106	if err != nil {
12107		return nil, err
12108	}
12109	req.Header = reqHeaders
12110	googleapi.Expand(req.URL, map[string]string{
12111		"session": c.sessionid,
12112	})
12113	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12114}
12115
12116// Do executes the "dialogflow.projects.agent.environments.users.sessions.detectIntent" call.
12117// Exactly one of *GoogleCloudDialogflowV2beta1DetectIntentResponse or
12118// error will be non-nil. Any non-2xx status code is an error. Response
12119// headers are in either
12120// *GoogleCloudDialogflowV2beta1DetectIntentResponse.ServerResponse.Heade
12121// r or (if a response was returned at all) in
12122// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12123// whether the returned error was because http.StatusNotModified was
12124// returned.
12125func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1DetectIntentResponse, error) {
12126	gensupport.SetOptions(c.urlParams_, opts...)
12127	res, err := c.doRequest("json")
12128	if res != nil && res.StatusCode == http.StatusNotModified {
12129		if res.Body != nil {
12130			res.Body.Close()
12131		}
12132		return nil, &googleapi.Error{
12133			Code:   res.StatusCode,
12134			Header: res.Header,
12135		}
12136	}
12137	if err != nil {
12138		return nil, err
12139	}
12140	defer googleapi.CloseBody(res)
12141	if err := googleapi.CheckResponse(res); err != nil {
12142		return nil, err
12143	}
12144	ret := &GoogleCloudDialogflowV2beta1DetectIntentResponse{
12145		ServerResponse: googleapi.ServerResponse{
12146			Header:         res.Header,
12147			HTTPStatusCode: res.StatusCode,
12148		},
12149	}
12150	target := &ret
12151	if err := gensupport.DecodeResponse(target, res); err != nil {
12152		return nil, err
12153	}
12154	return ret, nil
12155	// {
12156	//   "description": "Processes a natural language query and returns structured, actionable data\nas a result. This method is not idempotent, because it may cause contexts\nand session entity types to be updated, which in turn might affect\nresults of future queries.",
12157	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent",
12158	//   "httpMethod": "POST",
12159	//   "id": "dialogflow.projects.agent.environments.users.sessions.detectIntent",
12160	//   "parameterOrder": [
12161	//     "session"
12162	//   ],
12163	//   "parameters": {
12164	//     "session": {
12165	//       "description": "Required. The name of the session this query is sent to. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`, or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we are using\n\"-\". It's up to the API caller to choose an appropriate `Session ID` and\n`User Id`. They can be a random number or some type of user and session\nidentifiers (preferably hashed). The length of the `Session ID` and\n`User ID` must not exceed 36 characters.",
12166	//       "location": "path",
12167	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
12168	//       "required": true,
12169	//       "type": "string"
12170	//     }
12171	//   },
12172	//   "path": "v2beta1/{+session}:detectIntent",
12173	//   "request": {
12174	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest"
12175	//   },
12176	//   "response": {
12177	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse"
12178	//   },
12179	//   "scopes": [
12180	//     "https://www.googleapis.com/auth/cloud-platform",
12181	//     "https://www.googleapis.com/auth/dialogflow"
12182	//   ]
12183	// }
12184
12185}
12186
12187// method id "dialogflow.projects.agent.environments.users.sessions.contexts.create":
12188
12189type ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall struct {
12190	s                                   *Service
12191	parent                              string
12192	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
12193	urlParams_                          gensupport.URLParams
12194	ctx_                                context.Context
12195	header_                             http.Header
12196}
12197
12198// Create: Creates a context.
12199//
12200// If the specified context already exists, overrides the context.
12201func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Create(parent string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
12202	c := &ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12203	c.parent = parent
12204	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
12205	return c
12206}
12207
12208// Fields allows partial responses to be retrieved. See
12209// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12210// for more information.
12211func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
12212	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12213	return c
12214}
12215
12216// Context sets the context to be used in this call's Do method. Any
12217// pending HTTP request will be aborted if the provided context is
12218// canceled.
12219func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
12220	c.ctx_ = ctx
12221	return c
12222}
12223
12224// Header returns an http.Header that can be modified by the caller to
12225// add HTTP headers to the request.
12226func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Header() http.Header {
12227	if c.header_ == nil {
12228		c.header_ = make(http.Header)
12229	}
12230	return c.header_
12231}
12232
12233func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
12234	reqHeaders := make(http.Header)
12235	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12236	for k, v := range c.header_ {
12237		reqHeaders[k] = v
12238	}
12239	reqHeaders.Set("User-Agent", c.s.userAgent())
12240	var body io.Reader = nil
12241	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
12242	if err != nil {
12243		return nil, err
12244	}
12245	reqHeaders.Set("Content-Type", "application/json")
12246	c.urlParams_.Set("alt", alt)
12247	c.urlParams_.Set("prettyPrint", "false")
12248	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
12249	urls += "?" + c.urlParams_.Encode()
12250	req, err := http.NewRequest("POST", urls, body)
12251	if err != nil {
12252		return nil, err
12253	}
12254	req.Header = reqHeaders
12255	googleapi.Expand(req.URL, map[string]string{
12256		"parent": c.parent,
12257	})
12258	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12259}
12260
12261// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.create" call.
12262// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
12263// non-nil. Any non-2xx status code is an error. Response headers are in
12264// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
12265// (if a response was returned at all) in
12266// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12267// whether the returned error was because http.StatusNotModified was
12268// returned.
12269func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
12270	gensupport.SetOptions(c.urlParams_, opts...)
12271	res, err := c.doRequest("json")
12272	if res != nil && res.StatusCode == http.StatusNotModified {
12273		if res.Body != nil {
12274			res.Body.Close()
12275		}
12276		return nil, &googleapi.Error{
12277			Code:   res.StatusCode,
12278			Header: res.Header,
12279		}
12280	}
12281	if err != nil {
12282		return nil, err
12283	}
12284	defer googleapi.CloseBody(res)
12285	if err := googleapi.CheckResponse(res); err != nil {
12286		return nil, err
12287	}
12288	ret := &GoogleCloudDialogflowV2beta1Context{
12289		ServerResponse: googleapi.ServerResponse{
12290			Header:         res.Header,
12291			HTTPStatusCode: res.StatusCode,
12292		},
12293	}
12294	target := &ret
12295	if err := gensupport.DecodeResponse(target, res); err != nil {
12296		return nil, err
12297	}
12298	return ret, nil
12299	// {
12300	//   "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.",
12301	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
12302	//   "httpMethod": "POST",
12303	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.create",
12304	//   "parameterOrder": [
12305	//     "parent"
12306	//   ],
12307	//   "parameters": {
12308	//     "parent": {
12309	//       "description": "Required. The session to create a context for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
12310	//       "location": "path",
12311	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
12312	//       "required": true,
12313	//       "type": "string"
12314	//     }
12315	//   },
12316	//   "path": "v2beta1/{+parent}/contexts",
12317	//   "request": {
12318	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
12319	//   },
12320	//   "response": {
12321	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
12322	//   },
12323	//   "scopes": [
12324	//     "https://www.googleapis.com/auth/cloud-platform",
12325	//     "https://www.googleapis.com/auth/dialogflow"
12326	//   ]
12327	// }
12328
12329}
12330
12331// method id "dialogflow.projects.agent.environments.users.sessions.contexts.delete":
12332
12333type ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall struct {
12334	s          *Service
12335	name       string
12336	urlParams_ gensupport.URLParams
12337	ctx_       context.Context
12338	header_    http.Header
12339}
12340
12341// Delete: Deletes the specified context.
12342func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Delete(name string) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
12343	c := &ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12344	c.name = name
12345	return c
12346}
12347
12348// Fields allows partial responses to be retrieved. See
12349// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12350// for more information.
12351func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
12352	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12353	return c
12354}
12355
12356// Context sets the context to be used in this call's Do method. Any
12357// pending HTTP request will be aborted if the provided context is
12358// canceled.
12359func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
12360	c.ctx_ = ctx
12361	return c
12362}
12363
12364// Header returns an http.Header that can be modified by the caller to
12365// add HTTP headers to the request.
12366func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Header() http.Header {
12367	if c.header_ == nil {
12368		c.header_ = make(http.Header)
12369	}
12370	return c.header_
12371}
12372
12373func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
12374	reqHeaders := make(http.Header)
12375	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12376	for k, v := range c.header_ {
12377		reqHeaders[k] = v
12378	}
12379	reqHeaders.Set("User-Agent", c.s.userAgent())
12380	var body io.Reader = nil
12381	c.urlParams_.Set("alt", alt)
12382	c.urlParams_.Set("prettyPrint", "false")
12383	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12384	urls += "?" + c.urlParams_.Encode()
12385	req, err := http.NewRequest("DELETE", urls, body)
12386	if err != nil {
12387		return nil, err
12388	}
12389	req.Header = reqHeaders
12390	googleapi.Expand(req.URL, map[string]string{
12391		"name": c.name,
12392	})
12393	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12394}
12395
12396// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.delete" call.
12397// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
12398// non-2xx status code is an error. Response headers are in either
12399// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
12400// returned at all) in error.(*googleapi.Error).Header. Use
12401// googleapi.IsNotModified to check whether the returned error was
12402// because http.StatusNotModified was returned.
12403func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
12404	gensupport.SetOptions(c.urlParams_, opts...)
12405	res, err := c.doRequest("json")
12406	if res != nil && res.StatusCode == http.StatusNotModified {
12407		if res.Body != nil {
12408			res.Body.Close()
12409		}
12410		return nil, &googleapi.Error{
12411			Code:   res.StatusCode,
12412			Header: res.Header,
12413		}
12414	}
12415	if err != nil {
12416		return nil, err
12417	}
12418	defer googleapi.CloseBody(res)
12419	if err := googleapi.CheckResponse(res); err != nil {
12420		return nil, err
12421	}
12422	ret := &GoogleProtobufEmpty{
12423		ServerResponse: googleapi.ServerResponse{
12424			Header:         res.Header,
12425			HTTPStatusCode: res.StatusCode,
12426		},
12427	}
12428	target := &ret
12429	if err := gensupport.DecodeResponse(target, res); err != nil {
12430		return nil, err
12431	}
12432	return ret, nil
12433	// {
12434	//   "description": "Deletes the specified context.",
12435	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
12436	//   "httpMethod": "DELETE",
12437	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.delete",
12438	//   "parameterOrder": [
12439	//     "name"
12440	//   ],
12441	//   "parameters": {
12442	//     "name": {
12443	//       "description": "Required. The name of the context to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`. If `Environment ID` is\nnot specified, we assume default 'draft' environment. If `User ID` is not\nspecified, we assume default '-' user.",
12444	//       "location": "path",
12445	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
12446	//       "required": true,
12447	//       "type": "string"
12448	//     }
12449	//   },
12450	//   "path": "v2beta1/{+name}",
12451	//   "response": {
12452	//     "$ref": "GoogleProtobufEmpty"
12453	//   },
12454	//   "scopes": [
12455	//     "https://www.googleapis.com/auth/cloud-platform",
12456	//     "https://www.googleapis.com/auth/dialogflow"
12457	//   ]
12458	// }
12459
12460}
12461
12462// method id "dialogflow.projects.agent.environments.users.sessions.contexts.get":
12463
12464type ProjectsAgentEnvironmentsUsersSessionsContextsGetCall struct {
12465	s            *Service
12466	name         string
12467	urlParams_   gensupport.URLParams
12468	ifNoneMatch_ string
12469	ctx_         context.Context
12470	header_      http.Header
12471}
12472
12473// Get: Retrieves the specified context.
12474func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Get(name string) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
12475	c := &ProjectsAgentEnvironmentsUsersSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12476	c.name = name
12477	return c
12478}
12479
12480// Fields allows partial responses to be retrieved. See
12481// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12482// for more information.
12483func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
12484	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12485	return c
12486}
12487
12488// IfNoneMatch sets the optional parameter which makes the operation
12489// fail if the object's ETag matches the given value. This is useful for
12490// getting updates only after the object has changed since the last
12491// request. Use googleapi.IsNotModified to check whether the response
12492// error from Do is the result of In-None-Match.
12493func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
12494	c.ifNoneMatch_ = entityTag
12495	return c
12496}
12497
12498// Context sets the context to be used in this call's Do method. Any
12499// pending HTTP request will be aborted if the provided context is
12500// canceled.
12501func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
12502	c.ctx_ = ctx
12503	return c
12504}
12505
12506// Header returns an http.Header that can be modified by the caller to
12507// add HTTP headers to the request.
12508func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Header() http.Header {
12509	if c.header_ == nil {
12510		c.header_ = make(http.Header)
12511	}
12512	return c.header_
12513}
12514
12515func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
12516	reqHeaders := make(http.Header)
12517	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12518	for k, v := range c.header_ {
12519		reqHeaders[k] = v
12520	}
12521	reqHeaders.Set("User-Agent", c.s.userAgent())
12522	if c.ifNoneMatch_ != "" {
12523		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12524	}
12525	var body io.Reader = nil
12526	c.urlParams_.Set("alt", alt)
12527	c.urlParams_.Set("prettyPrint", "false")
12528	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12529	urls += "?" + c.urlParams_.Encode()
12530	req, err := http.NewRequest("GET", urls, body)
12531	if err != nil {
12532		return nil, err
12533	}
12534	req.Header = reqHeaders
12535	googleapi.Expand(req.URL, map[string]string{
12536		"name": c.name,
12537	})
12538	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12539}
12540
12541// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.get" call.
12542// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
12543// non-nil. Any non-2xx status code is an error. Response headers are in
12544// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
12545// (if a response was returned at all) in
12546// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12547// whether the returned error was because http.StatusNotModified was
12548// returned.
12549func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
12550	gensupport.SetOptions(c.urlParams_, opts...)
12551	res, err := c.doRequest("json")
12552	if res != nil && res.StatusCode == http.StatusNotModified {
12553		if res.Body != nil {
12554			res.Body.Close()
12555		}
12556		return nil, &googleapi.Error{
12557			Code:   res.StatusCode,
12558			Header: res.Header,
12559		}
12560	}
12561	if err != nil {
12562		return nil, err
12563	}
12564	defer googleapi.CloseBody(res)
12565	if err := googleapi.CheckResponse(res); err != nil {
12566		return nil, err
12567	}
12568	ret := &GoogleCloudDialogflowV2beta1Context{
12569		ServerResponse: googleapi.ServerResponse{
12570			Header:         res.Header,
12571			HTTPStatusCode: res.StatusCode,
12572		},
12573	}
12574	target := &ret
12575	if err := gensupport.DecodeResponse(target, res); err != nil {
12576		return nil, err
12577	}
12578	return ret, nil
12579	// {
12580	//   "description": "Retrieves the specified context.",
12581	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
12582	//   "httpMethod": "GET",
12583	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.get",
12584	//   "parameterOrder": [
12585	//     "name"
12586	//   ],
12587	//   "parameters": {
12588	//     "name": {
12589	//       "description": "Required. The name of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`. If `Environment ID` is\nnot specified, we assume default 'draft' environment. If `User ID` is not\nspecified, we assume default '-' user.",
12590	//       "location": "path",
12591	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
12592	//       "required": true,
12593	//       "type": "string"
12594	//     }
12595	//   },
12596	//   "path": "v2beta1/{+name}",
12597	//   "response": {
12598	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
12599	//   },
12600	//   "scopes": [
12601	//     "https://www.googleapis.com/auth/cloud-platform",
12602	//     "https://www.googleapis.com/auth/dialogflow"
12603	//   ]
12604	// }
12605
12606}
12607
12608// method id "dialogflow.projects.agent.environments.users.sessions.contexts.list":
12609
12610type ProjectsAgentEnvironmentsUsersSessionsContextsListCall struct {
12611	s            *Service
12612	parent       string
12613	urlParams_   gensupport.URLParams
12614	ifNoneMatch_ string
12615	ctx_         context.Context
12616	header_      http.Header
12617}
12618
12619// List: Returns the list of all contexts in the specified session.
12620func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) List(parent string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
12621	c := &ProjectsAgentEnvironmentsUsersSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12622	c.parent = parent
12623	return c
12624}
12625
12626// PageSize sets the optional parameter "pageSize": The maximum number
12627// of items to return in a single page. By
12628// default 100 and at most 1000.
12629func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
12630	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12631	return c
12632}
12633
12634// PageToken sets the optional parameter "pageToken": The
12635// next_page_token value returned from a previous list request.
12636func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
12637	c.urlParams_.Set("pageToken", pageToken)
12638	return c
12639}
12640
12641// Fields allows partial responses to be retrieved. See
12642// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12643// for more information.
12644func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
12645	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12646	return c
12647}
12648
12649// IfNoneMatch sets the optional parameter which makes the operation
12650// fail if the object's ETag matches the given value. This is useful for
12651// getting updates only after the object has changed since the last
12652// request. Use googleapi.IsNotModified to check whether the response
12653// error from Do is the result of In-None-Match.
12654func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
12655	c.ifNoneMatch_ = entityTag
12656	return c
12657}
12658
12659// Context sets the context to be used in this call's Do method. Any
12660// pending HTTP request will be aborted if the provided context is
12661// canceled.
12662func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
12663	c.ctx_ = ctx
12664	return c
12665}
12666
12667// Header returns an http.Header that can be modified by the caller to
12668// add HTTP headers to the request.
12669func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Header() http.Header {
12670	if c.header_ == nil {
12671		c.header_ = make(http.Header)
12672	}
12673	return c.header_
12674}
12675
12676func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
12677	reqHeaders := make(http.Header)
12678	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12679	for k, v := range c.header_ {
12680		reqHeaders[k] = v
12681	}
12682	reqHeaders.Set("User-Agent", c.s.userAgent())
12683	if c.ifNoneMatch_ != "" {
12684		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12685	}
12686	var body io.Reader = nil
12687	c.urlParams_.Set("alt", alt)
12688	c.urlParams_.Set("prettyPrint", "false")
12689	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
12690	urls += "?" + c.urlParams_.Encode()
12691	req, err := http.NewRequest("GET", urls, body)
12692	if err != nil {
12693		return nil, err
12694	}
12695	req.Header = reqHeaders
12696	googleapi.Expand(req.URL, map[string]string{
12697		"parent": c.parent,
12698	})
12699	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12700}
12701
12702// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.list" call.
12703// Exactly one of *GoogleCloudDialogflowV2beta1ListContextsResponse or
12704// error will be non-nil. Any non-2xx status code is an error. Response
12705// headers are in either
12706// *GoogleCloudDialogflowV2beta1ListContextsResponse.ServerResponse.Heade
12707// r or (if a response was returned at all) in
12708// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12709// whether the returned error was because http.StatusNotModified was
12710// returned.
12711func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListContextsResponse, error) {
12712	gensupport.SetOptions(c.urlParams_, opts...)
12713	res, err := c.doRequest("json")
12714	if res != nil && res.StatusCode == http.StatusNotModified {
12715		if res.Body != nil {
12716			res.Body.Close()
12717		}
12718		return nil, &googleapi.Error{
12719			Code:   res.StatusCode,
12720			Header: res.Header,
12721		}
12722	}
12723	if err != nil {
12724		return nil, err
12725	}
12726	defer googleapi.CloseBody(res)
12727	if err := googleapi.CheckResponse(res); err != nil {
12728		return nil, err
12729	}
12730	ret := &GoogleCloudDialogflowV2beta1ListContextsResponse{
12731		ServerResponse: googleapi.ServerResponse{
12732			Header:         res.Header,
12733			HTTPStatusCode: res.StatusCode,
12734		},
12735	}
12736	target := &ret
12737	if err := gensupport.DecodeResponse(target, res); err != nil {
12738		return nil, err
12739	}
12740	return ret, nil
12741	// {
12742	//   "description": "Returns the list of all contexts in the specified session.",
12743	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
12744	//   "httpMethod": "GET",
12745	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.list",
12746	//   "parameterOrder": [
12747	//     "parent"
12748	//   ],
12749	//   "parameters": {
12750	//     "pageSize": {
12751	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
12752	//       "format": "int32",
12753	//       "location": "query",
12754	//       "type": "integer"
12755	//     },
12756	//     "pageToken": {
12757	//       "description": "Optional. The next_page_token value returned from a previous list request.",
12758	//       "location": "query",
12759	//       "type": "string"
12760	//     },
12761	//     "parent": {
12762	//       "description": "Required. The session to list all contexts from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
12763	//       "location": "path",
12764	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
12765	//       "required": true,
12766	//       "type": "string"
12767	//     }
12768	//   },
12769	//   "path": "v2beta1/{+parent}/contexts",
12770	//   "response": {
12771	//     "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse"
12772	//   },
12773	//   "scopes": [
12774	//     "https://www.googleapis.com/auth/cloud-platform",
12775	//     "https://www.googleapis.com/auth/dialogflow"
12776	//   ]
12777	// }
12778
12779}
12780
12781// Pages invokes f for each page of results.
12782// A non-nil error returned from f will halt the iteration.
12783// The provided context supersedes any context provided to the Context method.
12784func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListContextsResponse) error) error {
12785	c.ctx_ = ctx
12786	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12787	for {
12788		x, err := c.Do()
12789		if err != nil {
12790			return err
12791		}
12792		if err := f(x); err != nil {
12793			return err
12794		}
12795		if x.NextPageToken == "" {
12796			return nil
12797		}
12798		c.PageToken(x.NextPageToken)
12799	}
12800}
12801
12802// method id "dialogflow.projects.agent.environments.users.sessions.contexts.patch":
12803
12804type ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall struct {
12805	s                                   *Service
12806	nameid                              string
12807	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
12808	urlParams_                          gensupport.URLParams
12809	ctx_                                context.Context
12810	header_                             http.Header
12811}
12812
12813// Patch: Updates the specified context.
12814func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Patch(nameid string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
12815	c := &ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12816	c.nameid = nameid
12817	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
12818	return c
12819}
12820
12821// UpdateMask sets the optional parameter "updateMask": The mask to
12822// control which fields get updated.
12823func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
12824	c.urlParams_.Set("updateMask", updateMask)
12825	return c
12826}
12827
12828// Fields allows partial responses to be retrieved. See
12829// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12830// for more information.
12831func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
12832	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12833	return c
12834}
12835
12836// Context sets the context to be used in this call's Do method. Any
12837// pending HTTP request will be aborted if the provided context is
12838// canceled.
12839func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
12840	c.ctx_ = ctx
12841	return c
12842}
12843
12844// Header returns an http.Header that can be modified by the caller to
12845// add HTTP headers to the request.
12846func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Header() http.Header {
12847	if c.header_ == nil {
12848		c.header_ = make(http.Header)
12849	}
12850	return c.header_
12851}
12852
12853func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
12854	reqHeaders := make(http.Header)
12855	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
12856	for k, v := range c.header_ {
12857		reqHeaders[k] = v
12858	}
12859	reqHeaders.Set("User-Agent", c.s.userAgent())
12860	var body io.Reader = nil
12861	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
12862	if err != nil {
12863		return nil, err
12864	}
12865	reqHeaders.Set("Content-Type", "application/json")
12866	c.urlParams_.Set("alt", alt)
12867	c.urlParams_.Set("prettyPrint", "false")
12868	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12869	urls += "?" + c.urlParams_.Encode()
12870	req, err := http.NewRequest("PATCH", urls, body)
12871	if err != nil {
12872		return nil, err
12873	}
12874	req.Header = reqHeaders
12875	googleapi.Expand(req.URL, map[string]string{
12876		"name": c.nameid,
12877	})
12878	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12879}
12880
12881// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.patch" call.
12882// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
12883// non-nil. Any non-2xx status code is an error. Response headers are in
12884// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
12885// (if a response was returned at all) in
12886// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12887// whether the returned error was because http.StatusNotModified was
12888// returned.
12889func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
12890	gensupport.SetOptions(c.urlParams_, opts...)
12891	res, err := c.doRequest("json")
12892	if res != nil && res.StatusCode == http.StatusNotModified {
12893		if res.Body != nil {
12894			res.Body.Close()
12895		}
12896		return nil, &googleapi.Error{
12897			Code:   res.StatusCode,
12898			Header: res.Header,
12899		}
12900	}
12901	if err != nil {
12902		return nil, err
12903	}
12904	defer googleapi.CloseBody(res)
12905	if err := googleapi.CheckResponse(res); err != nil {
12906		return nil, err
12907	}
12908	ret := &GoogleCloudDialogflowV2beta1Context{
12909		ServerResponse: googleapi.ServerResponse{
12910			Header:         res.Header,
12911			HTTPStatusCode: res.StatusCode,
12912		},
12913	}
12914	target := &ret
12915	if err := gensupport.DecodeResponse(target, res); err != nil {
12916		return nil, err
12917	}
12918	return ret, nil
12919	// {
12920	//   "description": "Updates the specified context.",
12921	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
12922	//   "httpMethod": "PATCH",
12923	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.patch",
12924	//   "parameterOrder": [
12925	//     "name"
12926	//   ],
12927	//   "parameters": {
12928	//     "name": {
12929	//       "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`,\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\n\nThe `Context ID` is always converted to lowercase, may only contain\ncharacters in a-zA-Z0-9_-% and may be at most 250 bytes long.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
12930	//       "location": "path",
12931	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
12932	//       "required": true,
12933	//       "type": "string"
12934	//     },
12935	//     "updateMask": {
12936	//       "description": "Optional. The mask to control which fields get updated.",
12937	//       "format": "google-fieldmask",
12938	//       "location": "query",
12939	//       "type": "string"
12940	//     }
12941	//   },
12942	//   "path": "v2beta1/{+name}",
12943	//   "request": {
12944	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
12945	//   },
12946	//   "response": {
12947	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
12948	//   },
12949	//   "scopes": [
12950	//     "https://www.googleapis.com/auth/cloud-platform",
12951	//     "https://www.googleapis.com/auth/dialogflow"
12952	//   ]
12953	// }
12954
12955}
12956
12957// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.create":
12958
12959type ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall struct {
12960	s                                             *Service
12961	parent                                        string
12962	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
12963	urlParams_                                    gensupport.URLParams
12964	ctx_                                          context.Context
12965	header_                                       http.Header
12966}
12967
12968// Create: Creates a session entity type.
12969//
12970// If the specified session entity type already exists, overrides
12971// the
12972// session entity type.
12973//
12974// This method doesn't work with Google Assistant integration.
12975// Contact Dialogflow support if you need to use session entities
12976// with Google Assistant integration.
12977func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
12978	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12979	c.parent = parent
12980	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
12981	return c
12982}
12983
12984// Fields allows partial responses to be retrieved. See
12985// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12986// for more information.
12987func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
12988	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12989	return c
12990}
12991
12992// Context sets the context to be used in this call's Do method. Any
12993// pending HTTP request will be aborted if the provided context is
12994// canceled.
12995func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
12996	c.ctx_ = ctx
12997	return c
12998}
12999
13000// Header returns an http.Header that can be modified by the caller to
13001// add HTTP headers to the request.
13002func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Header() http.Header {
13003	if c.header_ == nil {
13004		c.header_ = make(http.Header)
13005	}
13006	return c.header_
13007}
13008
13009func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
13010	reqHeaders := make(http.Header)
13011	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13012	for k, v := range c.header_ {
13013		reqHeaders[k] = v
13014	}
13015	reqHeaders.Set("User-Agent", c.s.userAgent())
13016	var body io.Reader = nil
13017	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
13018	if err != nil {
13019		return nil, err
13020	}
13021	reqHeaders.Set("Content-Type", "application/json")
13022	c.urlParams_.Set("alt", alt)
13023	c.urlParams_.Set("prettyPrint", "false")
13024	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
13025	urls += "?" + c.urlParams_.Encode()
13026	req, err := http.NewRequest("POST", urls, body)
13027	if err != nil {
13028		return nil, err
13029	}
13030	req.Header = reqHeaders
13031	googleapi.Expand(req.URL, map[string]string{
13032		"parent": c.parent,
13033	})
13034	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13035}
13036
13037// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.create" call.
13038// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
13039// error will be non-nil. Any non-2xx status code is an error. Response
13040// headers are in either
13041// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
13042// or (if a response was returned at all) in
13043// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13044// whether the returned error was because http.StatusNotModified was
13045// returned.
13046func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
13047	gensupport.SetOptions(c.urlParams_, opts...)
13048	res, err := c.doRequest("json")
13049	if res != nil && res.StatusCode == http.StatusNotModified {
13050		if res.Body != nil {
13051			res.Body.Close()
13052		}
13053		return nil, &googleapi.Error{
13054			Code:   res.StatusCode,
13055			Header: res.Header,
13056		}
13057	}
13058	if err != nil {
13059		return nil, err
13060	}
13061	defer googleapi.CloseBody(res)
13062	if err := googleapi.CheckResponse(res); err != nil {
13063		return nil, err
13064	}
13065	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
13066		ServerResponse: googleapi.ServerResponse{
13067			Header:         res.Header,
13068			HTTPStatusCode: res.StatusCode,
13069		},
13070	}
13071	target := &ret
13072	if err := gensupport.DecodeResponse(target, res); err != nil {
13073		return nil, err
13074	}
13075	return ret, nil
13076	// {
13077	//   "description": "Creates a session entity type.\n\nIf the specified session entity type already exists, overrides the\nsession entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
13078	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
13079	//   "httpMethod": "POST",
13080	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.create",
13081	//   "parameterOrder": [
13082	//     "parent"
13083	//   ],
13084	//   "parameters": {
13085	//     "parent": {
13086	//       "description": "Required. The session to create a session entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
13087	//       "location": "path",
13088	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
13089	//       "required": true,
13090	//       "type": "string"
13091	//     }
13092	//   },
13093	//   "path": "v2beta1/{+parent}/entityTypes",
13094	//   "request": {
13095	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
13096	//   },
13097	//   "response": {
13098	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
13099	//   },
13100	//   "scopes": [
13101	//     "https://www.googleapis.com/auth/cloud-platform",
13102	//     "https://www.googleapis.com/auth/dialogflow"
13103	//   ]
13104	// }
13105
13106}
13107
13108// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete":
13109
13110type ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall struct {
13111	s          *Service
13112	name       string
13113	urlParams_ gensupport.URLParams
13114	ctx_       context.Context
13115	header_    http.Header
13116}
13117
13118// Delete: Deletes the specified session entity type.
13119//
13120// This method doesn't work with Google Assistant integration.
13121// Contact Dialogflow support if you need to use session entities
13122// with Google Assistant integration.
13123func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Delete(name string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
13124	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13125	c.name = name
13126	return c
13127}
13128
13129// Fields allows partial responses to be retrieved. See
13130// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13131// for more information.
13132func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
13133	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13134	return c
13135}
13136
13137// Context sets the context to be used in this call's Do method. Any
13138// pending HTTP request will be aborted if the provided context is
13139// canceled.
13140func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
13141	c.ctx_ = ctx
13142	return c
13143}
13144
13145// Header returns an http.Header that can be modified by the caller to
13146// add HTTP headers to the request.
13147func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Header() http.Header {
13148	if c.header_ == nil {
13149		c.header_ = make(http.Header)
13150	}
13151	return c.header_
13152}
13153
13154func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
13155	reqHeaders := make(http.Header)
13156	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13157	for k, v := range c.header_ {
13158		reqHeaders[k] = v
13159	}
13160	reqHeaders.Set("User-Agent", c.s.userAgent())
13161	var body io.Reader = nil
13162	c.urlParams_.Set("alt", alt)
13163	c.urlParams_.Set("prettyPrint", "false")
13164	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
13165	urls += "?" + c.urlParams_.Encode()
13166	req, err := http.NewRequest("DELETE", urls, body)
13167	if err != nil {
13168		return nil, err
13169	}
13170	req.Header = reqHeaders
13171	googleapi.Expand(req.URL, map[string]string{
13172		"name": c.name,
13173	})
13174	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13175}
13176
13177// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete" call.
13178// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
13179// non-2xx status code is an error. Response headers are in either
13180// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
13181// returned at all) in error.(*googleapi.Error).Header. Use
13182// googleapi.IsNotModified to check whether the returned error was
13183// because http.StatusNotModified was returned.
13184func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
13185	gensupport.SetOptions(c.urlParams_, opts...)
13186	res, err := c.doRequest("json")
13187	if res != nil && res.StatusCode == http.StatusNotModified {
13188		if res.Body != nil {
13189			res.Body.Close()
13190		}
13191		return nil, &googleapi.Error{
13192			Code:   res.StatusCode,
13193			Header: res.Header,
13194		}
13195	}
13196	if err != nil {
13197		return nil, err
13198	}
13199	defer googleapi.CloseBody(res)
13200	if err := googleapi.CheckResponse(res); err != nil {
13201		return nil, err
13202	}
13203	ret := &GoogleProtobufEmpty{
13204		ServerResponse: googleapi.ServerResponse{
13205			Header:         res.Header,
13206			HTTPStatusCode: res.StatusCode,
13207		},
13208	}
13209	target := &ret
13210	if err := gensupport.DecodeResponse(target, res); err != nil {
13211		return nil, err
13212	}
13213	return ret, nil
13214	// {
13215	//   "description": "Deletes the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
13216	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
13217	//   "httpMethod": "DELETE",
13218	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete",
13219	//   "parameterOrder": [
13220	//     "name"
13221	//   ],
13222	//   "parameters": {
13223	//     "name": {
13224	//       "description": "Required. The name of the entity type to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`. If `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
13225	//       "location": "path",
13226	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
13227	//       "required": true,
13228	//       "type": "string"
13229	//     }
13230	//   },
13231	//   "path": "v2beta1/{+name}",
13232	//   "response": {
13233	//     "$ref": "GoogleProtobufEmpty"
13234	//   },
13235	//   "scopes": [
13236	//     "https://www.googleapis.com/auth/cloud-platform",
13237	//     "https://www.googleapis.com/auth/dialogflow"
13238	//   ]
13239	// }
13240
13241}
13242
13243// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.get":
13244
13245type ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall struct {
13246	s            *Service
13247	name         string
13248	urlParams_   gensupport.URLParams
13249	ifNoneMatch_ string
13250	ctx_         context.Context
13251	header_      http.Header
13252}
13253
13254// Get: Retrieves the specified session entity type.
13255//
13256// This method doesn't work with Google Assistant integration.
13257// Contact Dialogflow support if you need to use session entities
13258// with Google Assistant integration.
13259func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Get(name string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
13260	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13261	c.name = name
13262	return c
13263}
13264
13265// Fields allows partial responses to be retrieved. See
13266// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13267// for more information.
13268func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
13269	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13270	return c
13271}
13272
13273// IfNoneMatch sets the optional parameter which makes the operation
13274// fail if the object's ETag matches the given value. This is useful for
13275// getting updates only after the object has changed since the last
13276// request. Use googleapi.IsNotModified to check whether the response
13277// error from Do is the result of In-None-Match.
13278func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
13279	c.ifNoneMatch_ = entityTag
13280	return c
13281}
13282
13283// Context sets the context to be used in this call's Do method. Any
13284// pending HTTP request will be aborted if the provided context is
13285// canceled.
13286func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
13287	c.ctx_ = ctx
13288	return c
13289}
13290
13291// Header returns an http.Header that can be modified by the caller to
13292// add HTTP headers to the request.
13293func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Header() http.Header {
13294	if c.header_ == nil {
13295		c.header_ = make(http.Header)
13296	}
13297	return c.header_
13298}
13299
13300func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
13301	reqHeaders := make(http.Header)
13302	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13303	for k, v := range c.header_ {
13304		reqHeaders[k] = v
13305	}
13306	reqHeaders.Set("User-Agent", c.s.userAgent())
13307	if c.ifNoneMatch_ != "" {
13308		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13309	}
13310	var body io.Reader = nil
13311	c.urlParams_.Set("alt", alt)
13312	c.urlParams_.Set("prettyPrint", "false")
13313	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
13314	urls += "?" + c.urlParams_.Encode()
13315	req, err := http.NewRequest("GET", urls, body)
13316	if err != nil {
13317		return nil, err
13318	}
13319	req.Header = reqHeaders
13320	googleapi.Expand(req.URL, map[string]string{
13321		"name": c.name,
13322	})
13323	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13324}
13325
13326// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.get" call.
13327// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
13328// error will be non-nil. Any non-2xx status code is an error. Response
13329// headers are in either
13330// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
13331// or (if a response was returned at all) in
13332// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13333// whether the returned error was because http.StatusNotModified was
13334// returned.
13335func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
13336	gensupport.SetOptions(c.urlParams_, opts...)
13337	res, err := c.doRequest("json")
13338	if res != nil && res.StatusCode == http.StatusNotModified {
13339		if res.Body != nil {
13340			res.Body.Close()
13341		}
13342		return nil, &googleapi.Error{
13343			Code:   res.StatusCode,
13344			Header: res.Header,
13345		}
13346	}
13347	if err != nil {
13348		return nil, err
13349	}
13350	defer googleapi.CloseBody(res)
13351	if err := googleapi.CheckResponse(res); err != nil {
13352		return nil, err
13353	}
13354	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
13355		ServerResponse: googleapi.ServerResponse{
13356			Header:         res.Header,
13357			HTTPStatusCode: res.StatusCode,
13358		},
13359	}
13360	target := &ret
13361	if err := gensupport.DecodeResponse(target, res); err != nil {
13362		return nil, err
13363	}
13364	return ret, nil
13365	// {
13366	//   "description": "Retrieves the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
13367	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
13368	//   "httpMethod": "GET",
13369	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.get",
13370	//   "parameterOrder": [
13371	//     "name"
13372	//   ],
13373	//   "parameters": {
13374	//     "name": {
13375	//       "description": "Required. The name of the session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`. If `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
13376	//       "location": "path",
13377	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
13378	//       "required": true,
13379	//       "type": "string"
13380	//     }
13381	//   },
13382	//   "path": "v2beta1/{+name}",
13383	//   "response": {
13384	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
13385	//   },
13386	//   "scopes": [
13387	//     "https://www.googleapis.com/auth/cloud-platform",
13388	//     "https://www.googleapis.com/auth/dialogflow"
13389	//   ]
13390	// }
13391
13392}
13393
13394// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.list":
13395
13396type ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall struct {
13397	s            *Service
13398	parent       string
13399	urlParams_   gensupport.URLParams
13400	ifNoneMatch_ string
13401	ctx_         context.Context
13402	header_      http.Header
13403}
13404
13405// List: Returns the list of all session entity types in the specified
13406// session.
13407//
13408// This method doesn't work with Google Assistant integration.
13409// Contact Dialogflow support if you need to use session entities
13410// with Google Assistant integration.
13411func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) List(parent string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
13412	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13413	c.parent = parent
13414	return c
13415}
13416
13417// PageSize sets the optional parameter "pageSize": The maximum number
13418// of items to return in a single page. By
13419// default 100 and at most 1000.
13420func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
13421	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13422	return c
13423}
13424
13425// PageToken sets the optional parameter "pageToken": The
13426// next_page_token value returned from a previous list request.
13427func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
13428	c.urlParams_.Set("pageToken", pageToken)
13429	return c
13430}
13431
13432// Fields allows partial responses to be retrieved. See
13433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13434// for more information.
13435func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
13436	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13437	return c
13438}
13439
13440// IfNoneMatch sets the optional parameter which makes the operation
13441// fail if the object's ETag matches the given value. This is useful for
13442// getting updates only after the object has changed since the last
13443// request. Use googleapi.IsNotModified to check whether the response
13444// error from Do is the result of In-None-Match.
13445func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
13446	c.ifNoneMatch_ = entityTag
13447	return c
13448}
13449
13450// Context sets the context to be used in this call's Do method. Any
13451// pending HTTP request will be aborted if the provided context is
13452// canceled.
13453func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
13454	c.ctx_ = ctx
13455	return c
13456}
13457
13458// Header returns an http.Header that can be modified by the caller to
13459// add HTTP headers to the request.
13460func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Header() http.Header {
13461	if c.header_ == nil {
13462		c.header_ = make(http.Header)
13463	}
13464	return c.header_
13465}
13466
13467func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
13468	reqHeaders := make(http.Header)
13469	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13470	for k, v := range c.header_ {
13471		reqHeaders[k] = v
13472	}
13473	reqHeaders.Set("User-Agent", c.s.userAgent())
13474	if c.ifNoneMatch_ != "" {
13475		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13476	}
13477	var body io.Reader = nil
13478	c.urlParams_.Set("alt", alt)
13479	c.urlParams_.Set("prettyPrint", "false")
13480	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
13481	urls += "?" + c.urlParams_.Encode()
13482	req, err := http.NewRequest("GET", urls, body)
13483	if err != nil {
13484		return nil, err
13485	}
13486	req.Header = reqHeaders
13487	googleapi.Expand(req.URL, map[string]string{
13488		"parent": c.parent,
13489	})
13490	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13491}
13492
13493// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.list" call.
13494// Exactly one of
13495// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse or error
13496// will be non-nil. Any non-2xx status code is an error. Response
13497// headers are in either
13498// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse.ServerResp
13499// onse.Header or (if a response was returned at all) in
13500// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13501// whether the returned error was because http.StatusNotModified was
13502// returned.
13503func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse, error) {
13504	gensupport.SetOptions(c.urlParams_, opts...)
13505	res, err := c.doRequest("json")
13506	if res != nil && res.StatusCode == http.StatusNotModified {
13507		if res.Body != nil {
13508			res.Body.Close()
13509		}
13510		return nil, &googleapi.Error{
13511			Code:   res.StatusCode,
13512			Header: res.Header,
13513		}
13514	}
13515	if err != nil {
13516		return nil, err
13517	}
13518	defer googleapi.CloseBody(res)
13519	if err := googleapi.CheckResponse(res); err != nil {
13520		return nil, err
13521	}
13522	ret := &GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse{
13523		ServerResponse: googleapi.ServerResponse{
13524			Header:         res.Header,
13525			HTTPStatusCode: res.StatusCode,
13526		},
13527	}
13528	target := &ret
13529	if err := gensupport.DecodeResponse(target, res); err != nil {
13530		return nil, err
13531	}
13532	return ret, nil
13533	// {
13534	//   "description": "Returns the list of all session entity types in the specified session.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
13535	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
13536	//   "httpMethod": "GET",
13537	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.list",
13538	//   "parameterOrder": [
13539	//     "parent"
13540	//   ],
13541	//   "parameters": {
13542	//     "pageSize": {
13543	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
13544	//       "format": "int32",
13545	//       "location": "query",
13546	//       "type": "integer"
13547	//     },
13548	//     "pageToken": {
13549	//       "description": "Optional. The next_page_token value returned from a previous list request.",
13550	//       "location": "query",
13551	//       "type": "string"
13552	//     },
13553	//     "parent": {
13554	//       "description": "Required. The session to list all session entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
13555	//       "location": "path",
13556	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
13557	//       "required": true,
13558	//       "type": "string"
13559	//     }
13560	//   },
13561	//   "path": "v2beta1/{+parent}/entityTypes",
13562	//   "response": {
13563	//     "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse"
13564	//   },
13565	//   "scopes": [
13566	//     "https://www.googleapis.com/auth/cloud-platform",
13567	//     "https://www.googleapis.com/auth/dialogflow"
13568	//   ]
13569	// }
13570
13571}
13572
13573// Pages invokes f for each page of results.
13574// A non-nil error returned from f will halt the iteration.
13575// The provided context supersedes any context provided to the Context method.
13576func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) error) error {
13577	c.ctx_ = ctx
13578	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13579	for {
13580		x, err := c.Do()
13581		if err != nil {
13582			return err
13583		}
13584		if err := f(x); err != nil {
13585			return err
13586		}
13587		if x.NextPageToken == "" {
13588			return nil
13589		}
13590		c.PageToken(x.NextPageToken)
13591	}
13592}
13593
13594// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch":
13595
13596type ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall struct {
13597	s                                             *Service
13598	nameid                                        string
13599	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
13600	urlParams_                                    gensupport.URLParams
13601	ctx_                                          context.Context
13602	header_                                       http.Header
13603}
13604
13605// Patch: Updates the specified session entity type.
13606//
13607// This method doesn't work with Google Assistant integration.
13608// Contact Dialogflow support if you need to use session entities
13609// with Google Assistant integration.
13610func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
13611	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13612	c.nameid = nameid
13613	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
13614	return c
13615}
13616
13617// UpdateMask sets the optional parameter "updateMask": The mask to
13618// control which fields get updated.
13619func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
13620	c.urlParams_.Set("updateMask", updateMask)
13621	return c
13622}
13623
13624// Fields allows partial responses to be retrieved. See
13625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13626// for more information.
13627func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
13628	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13629	return c
13630}
13631
13632// Context sets the context to be used in this call's Do method. Any
13633// pending HTTP request will be aborted if the provided context is
13634// canceled.
13635func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
13636	c.ctx_ = ctx
13637	return c
13638}
13639
13640// Header returns an http.Header that can be modified by the caller to
13641// add HTTP headers to the request.
13642func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Header() http.Header {
13643	if c.header_ == nil {
13644		c.header_ = make(http.Header)
13645	}
13646	return c.header_
13647}
13648
13649func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
13650	reqHeaders := make(http.Header)
13651	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13652	for k, v := range c.header_ {
13653		reqHeaders[k] = v
13654	}
13655	reqHeaders.Set("User-Agent", c.s.userAgent())
13656	var body io.Reader = nil
13657	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
13658	if err != nil {
13659		return nil, err
13660	}
13661	reqHeaders.Set("Content-Type", "application/json")
13662	c.urlParams_.Set("alt", alt)
13663	c.urlParams_.Set("prettyPrint", "false")
13664	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
13665	urls += "?" + c.urlParams_.Encode()
13666	req, err := http.NewRequest("PATCH", urls, body)
13667	if err != nil {
13668		return nil, err
13669	}
13670	req.Header = reqHeaders
13671	googleapi.Expand(req.URL, map[string]string{
13672		"name": c.nameid,
13673	})
13674	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13675}
13676
13677// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch" call.
13678// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
13679// error will be non-nil. Any non-2xx status code is an error. Response
13680// headers are in either
13681// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
13682// or (if a response was returned at all) in
13683// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13684// whether the returned error was because http.StatusNotModified was
13685// returned.
13686func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
13687	gensupport.SetOptions(c.urlParams_, opts...)
13688	res, err := c.doRequest("json")
13689	if res != nil && res.StatusCode == http.StatusNotModified {
13690		if res.Body != nil {
13691			res.Body.Close()
13692		}
13693		return nil, &googleapi.Error{
13694			Code:   res.StatusCode,
13695			Header: res.Header,
13696		}
13697	}
13698	if err != nil {
13699		return nil, err
13700	}
13701	defer googleapi.CloseBody(res)
13702	if err := googleapi.CheckResponse(res); err != nil {
13703		return nil, err
13704	}
13705	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
13706		ServerResponse: googleapi.ServerResponse{
13707			Header:         res.Header,
13708			HTTPStatusCode: res.StatusCode,
13709		},
13710	}
13711	target := &ret
13712	if err := gensupport.DecodeResponse(target, res); err != nil {
13713		return nil, err
13714	}
13715	return ret, nil
13716	// {
13717	//   "description": "Updates the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
13718	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
13719	//   "httpMethod": "PATCH",
13720	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch",
13721	//   "parameterOrder": [
13722	//     "name"
13723	//   ],
13724	//   "parameters": {
13725	//     "name": {
13726	//       "description": "Required. The unique identifier of this session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e`, or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display Name\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\n`\u003cEntity Type Display Name\u003e` must be the display name of an existing entity\ntype in the same agent that will be overridden or supplemented.",
13727	//       "location": "path",
13728	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
13729	//       "required": true,
13730	//       "type": "string"
13731	//     },
13732	//     "updateMask": {
13733	//       "description": "Optional. The mask to control which fields get updated.",
13734	//       "format": "google-fieldmask",
13735	//       "location": "query",
13736	//       "type": "string"
13737	//     }
13738	//   },
13739	//   "path": "v2beta1/{+name}",
13740	//   "request": {
13741	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
13742	//   },
13743	//   "response": {
13744	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
13745	//   },
13746	//   "scopes": [
13747	//     "https://www.googleapis.com/auth/cloud-platform",
13748	//     "https://www.googleapis.com/auth/dialogflow"
13749	//   ]
13750	// }
13751
13752}
13753
13754// method id "dialogflow.projects.agent.intents.batchDelete":
13755
13756type ProjectsAgentIntentsBatchDeleteCall struct {
13757	s                                                     *Service
13758	parent                                                string
13759	googleclouddialogflowv2beta1batchdeleteintentsrequest *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest
13760	urlParams_                                            gensupport.URLParams
13761	ctx_                                                  context.Context
13762	header_                                               http.Header
13763}
13764
13765// BatchDelete: Deletes intents in the specified agent.
13766//
13767// Operation <response: google.protobuf.Empty>
13768func (r *ProjectsAgentIntentsService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteintentsrequest *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest) *ProjectsAgentIntentsBatchDeleteCall {
13769	c := &ProjectsAgentIntentsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13770	c.parent = parent
13771	c.googleclouddialogflowv2beta1batchdeleteintentsrequest = googleclouddialogflowv2beta1batchdeleteintentsrequest
13772	return c
13773}
13774
13775// Fields allows partial responses to be retrieved. See
13776// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13777// for more information.
13778func (c *ProjectsAgentIntentsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchDeleteCall {
13779	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13780	return c
13781}
13782
13783// Context sets the context to be used in this call's Do method. Any
13784// pending HTTP request will be aborted if the provided context is
13785// canceled.
13786func (c *ProjectsAgentIntentsBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchDeleteCall {
13787	c.ctx_ = ctx
13788	return c
13789}
13790
13791// Header returns an http.Header that can be modified by the caller to
13792// add HTTP headers to the request.
13793func (c *ProjectsAgentIntentsBatchDeleteCall) Header() http.Header {
13794	if c.header_ == nil {
13795		c.header_ = make(http.Header)
13796	}
13797	return c.header_
13798}
13799
13800func (c *ProjectsAgentIntentsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
13801	reqHeaders := make(http.Header)
13802	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13803	for k, v := range c.header_ {
13804		reqHeaders[k] = v
13805	}
13806	reqHeaders.Set("User-Agent", c.s.userAgent())
13807	var body io.Reader = nil
13808	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteintentsrequest)
13809	if err != nil {
13810		return nil, err
13811	}
13812	reqHeaders.Set("Content-Type", "application/json")
13813	c.urlParams_.Set("alt", alt)
13814	c.urlParams_.Set("prettyPrint", "false")
13815	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents:batchDelete")
13816	urls += "?" + c.urlParams_.Encode()
13817	req, err := http.NewRequest("POST", urls, body)
13818	if err != nil {
13819		return nil, err
13820	}
13821	req.Header = reqHeaders
13822	googleapi.Expand(req.URL, map[string]string{
13823		"parent": c.parent,
13824	})
13825	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13826}
13827
13828// Do executes the "dialogflow.projects.agent.intents.batchDelete" call.
13829// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
13830// Any non-2xx status code is an error. Response headers are in either
13831// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
13832// was returned at all) in error.(*googleapi.Error).Header. Use
13833// googleapi.IsNotModified to check whether the returned error was
13834// because http.StatusNotModified was returned.
13835func (c *ProjectsAgentIntentsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
13836	gensupport.SetOptions(c.urlParams_, opts...)
13837	res, err := c.doRequest("json")
13838	if res != nil && res.StatusCode == http.StatusNotModified {
13839		if res.Body != nil {
13840			res.Body.Close()
13841		}
13842		return nil, &googleapi.Error{
13843			Code:   res.StatusCode,
13844			Header: res.Header,
13845		}
13846	}
13847	if err != nil {
13848		return nil, err
13849	}
13850	defer googleapi.CloseBody(res)
13851	if err := googleapi.CheckResponse(res); err != nil {
13852		return nil, err
13853	}
13854	ret := &GoogleLongrunningOperation{
13855		ServerResponse: googleapi.ServerResponse{
13856			Header:         res.Header,
13857			HTTPStatusCode: res.StatusCode,
13858		},
13859	}
13860	target := &ret
13861	if err := gensupport.DecodeResponse(target, res); err != nil {
13862		return nil, err
13863	}
13864	return ret, nil
13865	// {
13866	//   "description": "Deletes intents in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
13867	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents:batchDelete",
13868	//   "httpMethod": "POST",
13869	//   "id": "dialogflow.projects.agent.intents.batchDelete",
13870	//   "parameterOrder": [
13871	//     "parent"
13872	//   ],
13873	//   "parameters": {
13874	//     "parent": {
13875	//       "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.",
13876	//       "location": "path",
13877	//       "pattern": "^projects/[^/]+/agent$",
13878	//       "required": true,
13879	//       "type": "string"
13880	//     }
13881	//   },
13882	//   "path": "v2beta1/{+parent}/intents:batchDelete",
13883	//   "request": {
13884	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest"
13885	//   },
13886	//   "response": {
13887	//     "$ref": "GoogleLongrunningOperation"
13888	//   },
13889	//   "scopes": [
13890	//     "https://www.googleapis.com/auth/cloud-platform",
13891	//     "https://www.googleapis.com/auth/dialogflow"
13892	//   ]
13893	// }
13894
13895}
13896
13897// method id "dialogflow.projects.agent.intents.batchUpdate":
13898
13899type ProjectsAgentIntentsBatchUpdateCall struct {
13900	s                                                     *Service
13901	parent                                                string
13902	googleclouddialogflowv2beta1batchupdateintentsrequest *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest
13903	urlParams_                                            gensupport.URLParams
13904	ctx_                                                  context.Context
13905	header_                                               http.Header
13906}
13907
13908// BatchUpdate: Updates/Creates multiple intents in the specified
13909// agent.
13910//
13911// Operation <response: BatchUpdateIntentsResponse>
13912func (r *ProjectsAgentIntentsService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateintentsrequest *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest) *ProjectsAgentIntentsBatchUpdateCall {
13913	c := &ProjectsAgentIntentsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13914	c.parent = parent
13915	c.googleclouddialogflowv2beta1batchupdateintentsrequest = googleclouddialogflowv2beta1batchupdateintentsrequest
13916	return c
13917}
13918
13919// Fields allows partial responses to be retrieved. See
13920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13921// for more information.
13922func (c *ProjectsAgentIntentsBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchUpdateCall {
13923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13924	return c
13925}
13926
13927// Context sets the context to be used in this call's Do method. Any
13928// pending HTTP request will be aborted if the provided context is
13929// canceled.
13930func (c *ProjectsAgentIntentsBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchUpdateCall {
13931	c.ctx_ = ctx
13932	return c
13933}
13934
13935// Header returns an http.Header that can be modified by the caller to
13936// add HTTP headers to the request.
13937func (c *ProjectsAgentIntentsBatchUpdateCall) Header() http.Header {
13938	if c.header_ == nil {
13939		c.header_ = make(http.Header)
13940	}
13941	return c.header_
13942}
13943
13944func (c *ProjectsAgentIntentsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
13945	reqHeaders := make(http.Header)
13946	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
13947	for k, v := range c.header_ {
13948		reqHeaders[k] = v
13949	}
13950	reqHeaders.Set("User-Agent", c.s.userAgent())
13951	var body io.Reader = nil
13952	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateintentsrequest)
13953	if err != nil {
13954		return nil, err
13955	}
13956	reqHeaders.Set("Content-Type", "application/json")
13957	c.urlParams_.Set("alt", alt)
13958	c.urlParams_.Set("prettyPrint", "false")
13959	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents:batchUpdate")
13960	urls += "?" + c.urlParams_.Encode()
13961	req, err := http.NewRequest("POST", urls, body)
13962	if err != nil {
13963		return nil, err
13964	}
13965	req.Header = reqHeaders
13966	googleapi.Expand(req.URL, map[string]string{
13967		"parent": c.parent,
13968	})
13969	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13970}
13971
13972// Do executes the "dialogflow.projects.agent.intents.batchUpdate" call.
13973// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
13974// Any non-2xx status code is an error. Response headers are in either
13975// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
13976// was returned at all) in error.(*googleapi.Error).Header. Use
13977// googleapi.IsNotModified to check whether the returned error was
13978// because http.StatusNotModified was returned.
13979func (c *ProjectsAgentIntentsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
13980	gensupport.SetOptions(c.urlParams_, opts...)
13981	res, err := c.doRequest("json")
13982	if res != nil && res.StatusCode == http.StatusNotModified {
13983		if res.Body != nil {
13984			res.Body.Close()
13985		}
13986		return nil, &googleapi.Error{
13987			Code:   res.StatusCode,
13988			Header: res.Header,
13989		}
13990	}
13991	if err != nil {
13992		return nil, err
13993	}
13994	defer googleapi.CloseBody(res)
13995	if err := googleapi.CheckResponse(res); err != nil {
13996		return nil, err
13997	}
13998	ret := &GoogleLongrunningOperation{
13999		ServerResponse: googleapi.ServerResponse{
14000			Header:         res.Header,
14001			HTTPStatusCode: res.StatusCode,
14002		},
14003	}
14004	target := &ret
14005	if err := gensupport.DecodeResponse(target, res); err != nil {
14006		return nil, err
14007	}
14008	return ret, nil
14009	// {
14010	//   "description": "Updates/Creates multiple intents in the specified agent.\n\nOperation \u003cresponse: BatchUpdateIntentsResponse\u003e",
14011	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents:batchUpdate",
14012	//   "httpMethod": "POST",
14013	//   "id": "dialogflow.projects.agent.intents.batchUpdate",
14014	//   "parameterOrder": [
14015	//     "parent"
14016	//   ],
14017	//   "parameters": {
14018	//     "parent": {
14019	//       "description": "Required. The name of the agent to update or create intents in.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
14020	//       "location": "path",
14021	//       "pattern": "^projects/[^/]+/agent$",
14022	//       "required": true,
14023	//       "type": "string"
14024	//     }
14025	//   },
14026	//   "path": "v2beta1/{+parent}/intents:batchUpdate",
14027	//   "request": {
14028	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest"
14029	//   },
14030	//   "response": {
14031	//     "$ref": "GoogleLongrunningOperation"
14032	//   },
14033	//   "scopes": [
14034	//     "https://www.googleapis.com/auth/cloud-platform",
14035	//     "https://www.googleapis.com/auth/dialogflow"
14036	//   ]
14037	// }
14038
14039}
14040
14041// method id "dialogflow.projects.agent.intents.create":
14042
14043type ProjectsAgentIntentsCreateCall struct {
14044	s                                  *Service
14045	parent                             string
14046	googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent
14047	urlParams_                         gensupport.URLParams
14048	ctx_                               context.Context
14049	header_                            http.Header
14050}
14051
14052// Create: Creates an intent in the specified agent.
14053func (r *ProjectsAgentIntentsService) Create(parent string, googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent) *ProjectsAgentIntentsCreateCall {
14054	c := &ProjectsAgentIntentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14055	c.parent = parent
14056	c.googleclouddialogflowv2beta1intent = googleclouddialogflowv2beta1intent
14057	return c
14058}
14059
14060// IntentView sets the optional parameter "intentView": The resource
14061// view to apply to the returned intent.
14062//
14063// Possible values:
14064//   "INTENT_VIEW_UNSPECIFIED"
14065//   "INTENT_VIEW_FULL"
14066func (c *ProjectsAgentIntentsCreateCall) IntentView(intentView string) *ProjectsAgentIntentsCreateCall {
14067	c.urlParams_.Set("intentView", intentView)
14068	return c
14069}
14070
14071// LanguageCode sets the optional parameter "languageCode": The language
14072// of training phrases, parameters and rich messages
14073// defined in `intent`. If not specified, the agent's default language
14074// is
14075// used.
14076// [Many
14077// languages](https://cloud.google.com/dialogflow/docs/reference/la
14078// nguage)
14079// are supported. Note: languages must be enabled in the agent before
14080// they can
14081// be used.
14082func (c *ProjectsAgentIntentsCreateCall) LanguageCode(languageCode string) *ProjectsAgentIntentsCreateCall {
14083	c.urlParams_.Set("languageCode", languageCode)
14084	return c
14085}
14086
14087// Fields allows partial responses to be retrieved. See
14088// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14089// for more information.
14090func (c *ProjectsAgentIntentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsCreateCall {
14091	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14092	return c
14093}
14094
14095// Context sets the context to be used in this call's Do method. Any
14096// pending HTTP request will be aborted if the provided context is
14097// canceled.
14098func (c *ProjectsAgentIntentsCreateCall) Context(ctx context.Context) *ProjectsAgentIntentsCreateCall {
14099	c.ctx_ = ctx
14100	return c
14101}
14102
14103// Header returns an http.Header that can be modified by the caller to
14104// add HTTP headers to the request.
14105func (c *ProjectsAgentIntentsCreateCall) Header() http.Header {
14106	if c.header_ == nil {
14107		c.header_ = make(http.Header)
14108	}
14109	return c.header_
14110}
14111
14112func (c *ProjectsAgentIntentsCreateCall) doRequest(alt string) (*http.Response, error) {
14113	reqHeaders := make(http.Header)
14114	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14115	for k, v := range c.header_ {
14116		reqHeaders[k] = v
14117	}
14118	reqHeaders.Set("User-Agent", c.s.userAgent())
14119	var body io.Reader = nil
14120	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1intent)
14121	if err != nil {
14122		return nil, err
14123	}
14124	reqHeaders.Set("Content-Type", "application/json")
14125	c.urlParams_.Set("alt", alt)
14126	c.urlParams_.Set("prettyPrint", "false")
14127	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents")
14128	urls += "?" + c.urlParams_.Encode()
14129	req, err := http.NewRequest("POST", urls, body)
14130	if err != nil {
14131		return nil, err
14132	}
14133	req.Header = reqHeaders
14134	googleapi.Expand(req.URL, map[string]string{
14135		"parent": c.parent,
14136	})
14137	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14138}
14139
14140// Do executes the "dialogflow.projects.agent.intents.create" call.
14141// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
14142// non-nil. Any non-2xx status code is an error. Response headers are in
14143// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
14144// (if a response was returned at all) in
14145// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14146// whether the returned error was because http.StatusNotModified was
14147// returned.
14148func (c *ProjectsAgentIntentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
14149	gensupport.SetOptions(c.urlParams_, opts...)
14150	res, err := c.doRequest("json")
14151	if res != nil && res.StatusCode == http.StatusNotModified {
14152		if res.Body != nil {
14153			res.Body.Close()
14154		}
14155		return nil, &googleapi.Error{
14156			Code:   res.StatusCode,
14157			Header: res.Header,
14158		}
14159	}
14160	if err != nil {
14161		return nil, err
14162	}
14163	defer googleapi.CloseBody(res)
14164	if err := googleapi.CheckResponse(res); err != nil {
14165		return nil, err
14166	}
14167	ret := &GoogleCloudDialogflowV2beta1Intent{
14168		ServerResponse: googleapi.ServerResponse{
14169			Header:         res.Header,
14170			HTTPStatusCode: res.StatusCode,
14171		},
14172	}
14173	target := &ret
14174	if err := gensupport.DecodeResponse(target, res); err != nil {
14175		return nil, err
14176	}
14177	return ret, nil
14178	// {
14179	//   "description": "Creates an intent in the specified agent.",
14180	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents",
14181	//   "httpMethod": "POST",
14182	//   "id": "dialogflow.projects.agent.intents.create",
14183	//   "parameterOrder": [
14184	//     "parent"
14185	//   ],
14186	//   "parameters": {
14187	//     "intentView": {
14188	//       "description": "Optional. The resource view to apply to the returned intent.",
14189	//       "enum": [
14190	//         "INTENT_VIEW_UNSPECIFIED",
14191	//         "INTENT_VIEW_FULL"
14192	//       ],
14193	//       "location": "query",
14194	//       "type": "string"
14195	//     },
14196	//     "languageCode": {
14197	//       "description": "Optional. The language of training phrases, parameters and rich messages\ndefined in `intent`. If not specified, the agent's default language is\nused. [Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
14198	//       "location": "query",
14199	//       "type": "string"
14200	//     },
14201	//     "parent": {
14202	//       "description": "Required. The agent to create a intent for.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
14203	//       "location": "path",
14204	//       "pattern": "^projects/[^/]+/agent$",
14205	//       "required": true,
14206	//       "type": "string"
14207	//     }
14208	//   },
14209	//   "path": "v2beta1/{+parent}/intents",
14210	//   "request": {
14211	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
14212	//   },
14213	//   "response": {
14214	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
14215	//   },
14216	//   "scopes": [
14217	//     "https://www.googleapis.com/auth/cloud-platform",
14218	//     "https://www.googleapis.com/auth/dialogflow"
14219	//   ]
14220	// }
14221
14222}
14223
14224// method id "dialogflow.projects.agent.intents.delete":
14225
14226type ProjectsAgentIntentsDeleteCall struct {
14227	s          *Service
14228	name       string
14229	urlParams_ gensupport.URLParams
14230	ctx_       context.Context
14231	header_    http.Header
14232}
14233
14234// Delete: Deletes the specified intent and its direct or indirect
14235// followup intents.
14236func (r *ProjectsAgentIntentsService) Delete(name string) *ProjectsAgentIntentsDeleteCall {
14237	c := &ProjectsAgentIntentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14238	c.name = name
14239	return c
14240}
14241
14242// Fields allows partial responses to be retrieved. See
14243// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14244// for more information.
14245func (c *ProjectsAgentIntentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsDeleteCall {
14246	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14247	return c
14248}
14249
14250// Context sets the context to be used in this call's Do method. Any
14251// pending HTTP request will be aborted if the provided context is
14252// canceled.
14253func (c *ProjectsAgentIntentsDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsDeleteCall {
14254	c.ctx_ = ctx
14255	return c
14256}
14257
14258// Header returns an http.Header that can be modified by the caller to
14259// add HTTP headers to the request.
14260func (c *ProjectsAgentIntentsDeleteCall) Header() http.Header {
14261	if c.header_ == nil {
14262		c.header_ = make(http.Header)
14263	}
14264	return c.header_
14265}
14266
14267func (c *ProjectsAgentIntentsDeleteCall) doRequest(alt string) (*http.Response, error) {
14268	reqHeaders := make(http.Header)
14269	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14270	for k, v := range c.header_ {
14271		reqHeaders[k] = v
14272	}
14273	reqHeaders.Set("User-Agent", c.s.userAgent())
14274	var body io.Reader = nil
14275	c.urlParams_.Set("alt", alt)
14276	c.urlParams_.Set("prettyPrint", "false")
14277	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14278	urls += "?" + c.urlParams_.Encode()
14279	req, err := http.NewRequest("DELETE", urls, body)
14280	if err != nil {
14281		return nil, err
14282	}
14283	req.Header = reqHeaders
14284	googleapi.Expand(req.URL, map[string]string{
14285		"name": c.name,
14286	})
14287	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14288}
14289
14290// Do executes the "dialogflow.projects.agent.intents.delete" call.
14291// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
14292// non-2xx status code is an error. Response headers are in either
14293// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
14294// returned at all) in error.(*googleapi.Error).Header. Use
14295// googleapi.IsNotModified to check whether the returned error was
14296// because http.StatusNotModified was returned.
14297func (c *ProjectsAgentIntentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
14298	gensupport.SetOptions(c.urlParams_, opts...)
14299	res, err := c.doRequest("json")
14300	if res != nil && res.StatusCode == http.StatusNotModified {
14301		if res.Body != nil {
14302			res.Body.Close()
14303		}
14304		return nil, &googleapi.Error{
14305			Code:   res.StatusCode,
14306			Header: res.Header,
14307		}
14308	}
14309	if err != nil {
14310		return nil, err
14311	}
14312	defer googleapi.CloseBody(res)
14313	if err := googleapi.CheckResponse(res); err != nil {
14314		return nil, err
14315	}
14316	ret := &GoogleProtobufEmpty{
14317		ServerResponse: googleapi.ServerResponse{
14318			Header:         res.Header,
14319			HTTPStatusCode: res.StatusCode,
14320		},
14321	}
14322	target := &ret
14323	if err := gensupport.DecodeResponse(target, res); err != nil {
14324		return nil, err
14325	}
14326	return ret, nil
14327	// {
14328	//   "description": "Deletes the specified intent and its direct or indirect followup intents.",
14329	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents/{intentsId}",
14330	//   "httpMethod": "DELETE",
14331	//   "id": "dialogflow.projects.agent.intents.delete",
14332	//   "parameterOrder": [
14333	//     "name"
14334	//   ],
14335	//   "parameters": {
14336	//     "name": {
14337	//       "description": "Required. The name of the intent to delete. If this intent has direct or\nindirect followup intents, we also delete them.\n\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.",
14338	//       "location": "path",
14339	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
14340	//       "required": true,
14341	//       "type": "string"
14342	//     }
14343	//   },
14344	//   "path": "v2beta1/{+name}",
14345	//   "response": {
14346	//     "$ref": "GoogleProtobufEmpty"
14347	//   },
14348	//   "scopes": [
14349	//     "https://www.googleapis.com/auth/cloud-platform",
14350	//     "https://www.googleapis.com/auth/dialogflow"
14351	//   ]
14352	// }
14353
14354}
14355
14356// method id "dialogflow.projects.agent.intents.get":
14357
14358type ProjectsAgentIntentsGetCall struct {
14359	s            *Service
14360	name         string
14361	urlParams_   gensupport.URLParams
14362	ifNoneMatch_ string
14363	ctx_         context.Context
14364	header_      http.Header
14365}
14366
14367// Get: Retrieves the specified intent.
14368func (r *ProjectsAgentIntentsService) Get(name string) *ProjectsAgentIntentsGetCall {
14369	c := &ProjectsAgentIntentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14370	c.name = name
14371	return c
14372}
14373
14374// IntentView sets the optional parameter "intentView": The resource
14375// view to apply to the returned intent.
14376//
14377// Possible values:
14378//   "INTENT_VIEW_UNSPECIFIED"
14379//   "INTENT_VIEW_FULL"
14380func (c *ProjectsAgentIntentsGetCall) IntentView(intentView string) *ProjectsAgentIntentsGetCall {
14381	c.urlParams_.Set("intentView", intentView)
14382	return c
14383}
14384
14385// LanguageCode sets the optional parameter "languageCode": The language
14386// to retrieve training phrases, parameters and rich
14387// messages for. If not specified, the agent's default language is
14388// used.
14389// [Many
14390// languages](https://cloud.google.com/dialogflow/docs/refere
14391// nce/language)
14392// are supported. Note: languages must be enabled in the agent before
14393// they can
14394// be used.
14395func (c *ProjectsAgentIntentsGetCall) LanguageCode(languageCode string) *ProjectsAgentIntentsGetCall {
14396	c.urlParams_.Set("languageCode", languageCode)
14397	return c
14398}
14399
14400// Fields allows partial responses to be retrieved. See
14401// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14402// for more information.
14403func (c *ProjectsAgentIntentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsGetCall {
14404	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14405	return c
14406}
14407
14408// IfNoneMatch sets the optional parameter which makes the operation
14409// fail if the object's ETag matches the given value. This is useful for
14410// getting updates only after the object has changed since the last
14411// request. Use googleapi.IsNotModified to check whether the response
14412// error from Do is the result of In-None-Match.
14413func (c *ProjectsAgentIntentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsGetCall {
14414	c.ifNoneMatch_ = entityTag
14415	return c
14416}
14417
14418// Context sets the context to be used in this call's Do method. Any
14419// pending HTTP request will be aborted if the provided context is
14420// canceled.
14421func (c *ProjectsAgentIntentsGetCall) Context(ctx context.Context) *ProjectsAgentIntentsGetCall {
14422	c.ctx_ = ctx
14423	return c
14424}
14425
14426// Header returns an http.Header that can be modified by the caller to
14427// add HTTP headers to the request.
14428func (c *ProjectsAgentIntentsGetCall) Header() http.Header {
14429	if c.header_ == nil {
14430		c.header_ = make(http.Header)
14431	}
14432	return c.header_
14433}
14434
14435func (c *ProjectsAgentIntentsGetCall) doRequest(alt string) (*http.Response, error) {
14436	reqHeaders := make(http.Header)
14437	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14438	for k, v := range c.header_ {
14439		reqHeaders[k] = v
14440	}
14441	reqHeaders.Set("User-Agent", c.s.userAgent())
14442	if c.ifNoneMatch_ != "" {
14443		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14444	}
14445	var body io.Reader = nil
14446	c.urlParams_.Set("alt", alt)
14447	c.urlParams_.Set("prettyPrint", "false")
14448	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14449	urls += "?" + c.urlParams_.Encode()
14450	req, err := http.NewRequest("GET", urls, body)
14451	if err != nil {
14452		return nil, err
14453	}
14454	req.Header = reqHeaders
14455	googleapi.Expand(req.URL, map[string]string{
14456		"name": c.name,
14457	})
14458	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14459}
14460
14461// Do executes the "dialogflow.projects.agent.intents.get" call.
14462// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
14463// non-nil. Any non-2xx status code is an error. Response headers are in
14464// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
14465// (if a response was returned at all) in
14466// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14467// whether the returned error was because http.StatusNotModified was
14468// returned.
14469func (c *ProjectsAgentIntentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
14470	gensupport.SetOptions(c.urlParams_, opts...)
14471	res, err := c.doRequest("json")
14472	if res != nil && res.StatusCode == http.StatusNotModified {
14473		if res.Body != nil {
14474			res.Body.Close()
14475		}
14476		return nil, &googleapi.Error{
14477			Code:   res.StatusCode,
14478			Header: res.Header,
14479		}
14480	}
14481	if err != nil {
14482		return nil, err
14483	}
14484	defer googleapi.CloseBody(res)
14485	if err := googleapi.CheckResponse(res); err != nil {
14486		return nil, err
14487	}
14488	ret := &GoogleCloudDialogflowV2beta1Intent{
14489		ServerResponse: googleapi.ServerResponse{
14490			Header:         res.Header,
14491			HTTPStatusCode: res.StatusCode,
14492		},
14493	}
14494	target := &ret
14495	if err := gensupport.DecodeResponse(target, res); err != nil {
14496		return nil, err
14497	}
14498	return ret, nil
14499	// {
14500	//   "description": "Retrieves the specified intent.",
14501	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents/{intentsId}",
14502	//   "httpMethod": "GET",
14503	//   "id": "dialogflow.projects.agent.intents.get",
14504	//   "parameterOrder": [
14505	//     "name"
14506	//   ],
14507	//   "parameters": {
14508	//     "intentView": {
14509	//       "description": "Optional. The resource view to apply to the returned intent.",
14510	//       "enum": [
14511	//         "INTENT_VIEW_UNSPECIFIED",
14512	//         "INTENT_VIEW_FULL"
14513	//       ],
14514	//       "location": "query",
14515	//       "type": "string"
14516	//     },
14517	//     "languageCode": {
14518	//       "description": "Optional. The language to retrieve training phrases, parameters and rich\nmessages for. If not specified, the agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
14519	//       "location": "query",
14520	//       "type": "string"
14521	//     },
14522	//     "name": {
14523	//       "description": "Required. The name of the intent.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.",
14524	//       "location": "path",
14525	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
14526	//       "required": true,
14527	//       "type": "string"
14528	//     }
14529	//   },
14530	//   "path": "v2beta1/{+name}",
14531	//   "response": {
14532	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
14533	//   },
14534	//   "scopes": [
14535	//     "https://www.googleapis.com/auth/cloud-platform",
14536	//     "https://www.googleapis.com/auth/dialogflow"
14537	//   ]
14538	// }
14539
14540}
14541
14542// method id "dialogflow.projects.agent.intents.list":
14543
14544type ProjectsAgentIntentsListCall struct {
14545	s            *Service
14546	parent       string
14547	urlParams_   gensupport.URLParams
14548	ifNoneMatch_ string
14549	ctx_         context.Context
14550	header_      http.Header
14551}
14552
14553// List: Returns the list of all intents in the specified agent.
14554func (r *ProjectsAgentIntentsService) List(parent string) *ProjectsAgentIntentsListCall {
14555	c := &ProjectsAgentIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14556	c.parent = parent
14557	return c
14558}
14559
14560// IntentView sets the optional parameter "intentView": The resource
14561// view to apply to the returned intent.
14562//
14563// Possible values:
14564//   "INTENT_VIEW_UNSPECIFIED"
14565//   "INTENT_VIEW_FULL"
14566func (c *ProjectsAgentIntentsListCall) IntentView(intentView string) *ProjectsAgentIntentsListCall {
14567	c.urlParams_.Set("intentView", intentView)
14568	return c
14569}
14570
14571// LanguageCode sets the optional parameter "languageCode": The language
14572// to list training phrases, parameters and rich
14573// messages for. If not specified, the agent's default language is
14574// used.
14575// [Many
14576// languages](https://cloud.google.com/dialogflow/docs/refere
14577// nce/language)
14578// are supported. Note: languages must be enabled in the agent before
14579// they can
14580// be used.
14581func (c *ProjectsAgentIntentsListCall) LanguageCode(languageCode string) *ProjectsAgentIntentsListCall {
14582	c.urlParams_.Set("languageCode", languageCode)
14583	return c
14584}
14585
14586// PageSize sets the optional parameter "pageSize": The maximum number
14587// of items to return in a single page. By
14588// default 100 and at most 1000.
14589func (c *ProjectsAgentIntentsListCall) PageSize(pageSize int64) *ProjectsAgentIntentsListCall {
14590	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14591	return c
14592}
14593
14594// PageToken sets the optional parameter "pageToken": The
14595// next_page_token value returned from a previous list request.
14596func (c *ProjectsAgentIntentsListCall) PageToken(pageToken string) *ProjectsAgentIntentsListCall {
14597	c.urlParams_.Set("pageToken", pageToken)
14598	return c
14599}
14600
14601// Fields allows partial responses to be retrieved. See
14602// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14603// for more information.
14604func (c *ProjectsAgentIntentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsListCall {
14605	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14606	return c
14607}
14608
14609// IfNoneMatch sets the optional parameter which makes the operation
14610// fail if the object's ETag matches the given value. This is useful for
14611// getting updates only after the object has changed since the last
14612// request. Use googleapi.IsNotModified to check whether the response
14613// error from Do is the result of In-None-Match.
14614func (c *ProjectsAgentIntentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsListCall {
14615	c.ifNoneMatch_ = entityTag
14616	return c
14617}
14618
14619// Context sets the context to be used in this call's Do method. Any
14620// pending HTTP request will be aborted if the provided context is
14621// canceled.
14622func (c *ProjectsAgentIntentsListCall) Context(ctx context.Context) *ProjectsAgentIntentsListCall {
14623	c.ctx_ = ctx
14624	return c
14625}
14626
14627// Header returns an http.Header that can be modified by the caller to
14628// add HTTP headers to the request.
14629func (c *ProjectsAgentIntentsListCall) Header() http.Header {
14630	if c.header_ == nil {
14631		c.header_ = make(http.Header)
14632	}
14633	return c.header_
14634}
14635
14636func (c *ProjectsAgentIntentsListCall) doRequest(alt string) (*http.Response, error) {
14637	reqHeaders := make(http.Header)
14638	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14639	for k, v := range c.header_ {
14640		reqHeaders[k] = v
14641	}
14642	reqHeaders.Set("User-Agent", c.s.userAgent())
14643	if c.ifNoneMatch_ != "" {
14644		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14645	}
14646	var body io.Reader = nil
14647	c.urlParams_.Set("alt", alt)
14648	c.urlParams_.Set("prettyPrint", "false")
14649	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents")
14650	urls += "?" + c.urlParams_.Encode()
14651	req, err := http.NewRequest("GET", urls, body)
14652	if err != nil {
14653		return nil, err
14654	}
14655	req.Header = reqHeaders
14656	googleapi.Expand(req.URL, map[string]string{
14657		"parent": c.parent,
14658	})
14659	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14660}
14661
14662// Do executes the "dialogflow.projects.agent.intents.list" call.
14663// Exactly one of *GoogleCloudDialogflowV2beta1ListIntentsResponse or
14664// error will be non-nil. Any non-2xx status code is an error. Response
14665// headers are in either
14666// *GoogleCloudDialogflowV2beta1ListIntentsResponse.ServerResponse.Header
14667//  or (if a response was returned at all) in
14668// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14669// whether the returned error was because http.StatusNotModified was
14670// returned.
14671func (c *ProjectsAgentIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListIntentsResponse, error) {
14672	gensupport.SetOptions(c.urlParams_, opts...)
14673	res, err := c.doRequest("json")
14674	if res != nil && res.StatusCode == http.StatusNotModified {
14675		if res.Body != nil {
14676			res.Body.Close()
14677		}
14678		return nil, &googleapi.Error{
14679			Code:   res.StatusCode,
14680			Header: res.Header,
14681		}
14682	}
14683	if err != nil {
14684		return nil, err
14685	}
14686	defer googleapi.CloseBody(res)
14687	if err := googleapi.CheckResponse(res); err != nil {
14688		return nil, err
14689	}
14690	ret := &GoogleCloudDialogflowV2beta1ListIntentsResponse{
14691		ServerResponse: googleapi.ServerResponse{
14692			Header:         res.Header,
14693			HTTPStatusCode: res.StatusCode,
14694		},
14695	}
14696	target := &ret
14697	if err := gensupport.DecodeResponse(target, res); err != nil {
14698		return nil, err
14699	}
14700	return ret, nil
14701	// {
14702	//   "description": "Returns the list of all intents in the specified agent.",
14703	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents",
14704	//   "httpMethod": "GET",
14705	//   "id": "dialogflow.projects.agent.intents.list",
14706	//   "parameterOrder": [
14707	//     "parent"
14708	//   ],
14709	//   "parameters": {
14710	//     "intentView": {
14711	//       "description": "Optional. The resource view to apply to the returned intent.",
14712	//       "enum": [
14713	//         "INTENT_VIEW_UNSPECIFIED",
14714	//         "INTENT_VIEW_FULL"
14715	//       ],
14716	//       "location": "query",
14717	//       "type": "string"
14718	//     },
14719	//     "languageCode": {
14720	//       "description": "Optional. The language to list training phrases, parameters and rich\nmessages for. If not specified, the agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
14721	//       "location": "query",
14722	//       "type": "string"
14723	//     },
14724	//     "pageSize": {
14725	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
14726	//       "format": "int32",
14727	//       "location": "query",
14728	//       "type": "integer"
14729	//     },
14730	//     "pageToken": {
14731	//       "description": "Optional. The next_page_token value returned from a previous list request.",
14732	//       "location": "query",
14733	//       "type": "string"
14734	//     },
14735	//     "parent": {
14736	//       "description": "Required. The agent to list all intents from.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
14737	//       "location": "path",
14738	//       "pattern": "^projects/[^/]+/agent$",
14739	//       "required": true,
14740	//       "type": "string"
14741	//     }
14742	//   },
14743	//   "path": "v2beta1/{+parent}/intents",
14744	//   "response": {
14745	//     "$ref": "GoogleCloudDialogflowV2beta1ListIntentsResponse"
14746	//   },
14747	//   "scopes": [
14748	//     "https://www.googleapis.com/auth/cloud-platform",
14749	//     "https://www.googleapis.com/auth/dialogflow"
14750	//   ]
14751	// }
14752
14753}
14754
14755// Pages invokes f for each page of results.
14756// A non-nil error returned from f will halt the iteration.
14757// The provided context supersedes any context provided to the Context method.
14758func (c *ProjectsAgentIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListIntentsResponse) error) error {
14759	c.ctx_ = ctx
14760	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14761	for {
14762		x, err := c.Do()
14763		if err != nil {
14764			return err
14765		}
14766		if err := f(x); err != nil {
14767			return err
14768		}
14769		if x.NextPageToken == "" {
14770			return nil
14771		}
14772		c.PageToken(x.NextPageToken)
14773	}
14774}
14775
14776// method id "dialogflow.projects.agent.intents.patch":
14777
14778type ProjectsAgentIntentsPatchCall struct {
14779	s                                  *Service
14780	nameid                             string
14781	googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent
14782	urlParams_                         gensupport.URLParams
14783	ctx_                               context.Context
14784	header_                            http.Header
14785}
14786
14787// Patch: Updates the specified intent.
14788func (r *ProjectsAgentIntentsService) Patch(nameid string, googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent) *ProjectsAgentIntentsPatchCall {
14789	c := &ProjectsAgentIntentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14790	c.nameid = nameid
14791	c.googleclouddialogflowv2beta1intent = googleclouddialogflowv2beta1intent
14792	return c
14793}
14794
14795// IntentView sets the optional parameter "intentView": The resource
14796// view to apply to the returned intent.
14797//
14798// Possible values:
14799//   "INTENT_VIEW_UNSPECIFIED"
14800//   "INTENT_VIEW_FULL"
14801func (c *ProjectsAgentIntentsPatchCall) IntentView(intentView string) *ProjectsAgentIntentsPatchCall {
14802	c.urlParams_.Set("intentView", intentView)
14803	return c
14804}
14805
14806// LanguageCode sets the optional parameter "languageCode": The language
14807// of training phrases, parameters and rich messages
14808// defined in `intent`. If not specified, the agent's default language
14809// is
14810// used.
14811// [Many
14812// languages](https://cloud.google.com/dialogflow/docs/reference/la
14813// nguage)
14814// are supported. Note: languages must be enabled in the agent before
14815// they can
14816// be used.
14817func (c *ProjectsAgentIntentsPatchCall) LanguageCode(languageCode string) *ProjectsAgentIntentsPatchCall {
14818	c.urlParams_.Set("languageCode", languageCode)
14819	return c
14820}
14821
14822// UpdateMask sets the optional parameter "updateMask": The mask to
14823// control which fields get updated.
14824func (c *ProjectsAgentIntentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentIntentsPatchCall {
14825	c.urlParams_.Set("updateMask", updateMask)
14826	return c
14827}
14828
14829// Fields allows partial responses to be retrieved. See
14830// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14831// for more information.
14832func (c *ProjectsAgentIntentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsPatchCall {
14833	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14834	return c
14835}
14836
14837// Context sets the context to be used in this call's Do method. Any
14838// pending HTTP request will be aborted if the provided context is
14839// canceled.
14840func (c *ProjectsAgentIntentsPatchCall) Context(ctx context.Context) *ProjectsAgentIntentsPatchCall {
14841	c.ctx_ = ctx
14842	return c
14843}
14844
14845// Header returns an http.Header that can be modified by the caller to
14846// add HTTP headers to the request.
14847func (c *ProjectsAgentIntentsPatchCall) Header() http.Header {
14848	if c.header_ == nil {
14849		c.header_ = make(http.Header)
14850	}
14851	return c.header_
14852}
14853
14854func (c *ProjectsAgentIntentsPatchCall) doRequest(alt string) (*http.Response, error) {
14855	reqHeaders := make(http.Header)
14856	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14857	for k, v := range c.header_ {
14858		reqHeaders[k] = v
14859	}
14860	reqHeaders.Set("User-Agent", c.s.userAgent())
14861	var body io.Reader = nil
14862	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1intent)
14863	if err != nil {
14864		return nil, err
14865	}
14866	reqHeaders.Set("Content-Type", "application/json")
14867	c.urlParams_.Set("alt", alt)
14868	c.urlParams_.Set("prettyPrint", "false")
14869	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14870	urls += "?" + c.urlParams_.Encode()
14871	req, err := http.NewRequest("PATCH", urls, body)
14872	if err != nil {
14873		return nil, err
14874	}
14875	req.Header = reqHeaders
14876	googleapi.Expand(req.URL, map[string]string{
14877		"name": c.nameid,
14878	})
14879	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14880}
14881
14882// Do executes the "dialogflow.projects.agent.intents.patch" call.
14883// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
14884// non-nil. Any non-2xx status code is an error. Response headers are in
14885// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
14886// (if a response was returned at all) in
14887// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14888// whether the returned error was because http.StatusNotModified was
14889// returned.
14890func (c *ProjectsAgentIntentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
14891	gensupport.SetOptions(c.urlParams_, opts...)
14892	res, err := c.doRequest("json")
14893	if res != nil && res.StatusCode == http.StatusNotModified {
14894		if res.Body != nil {
14895			res.Body.Close()
14896		}
14897		return nil, &googleapi.Error{
14898			Code:   res.StatusCode,
14899			Header: res.Header,
14900		}
14901	}
14902	if err != nil {
14903		return nil, err
14904	}
14905	defer googleapi.CloseBody(res)
14906	if err := googleapi.CheckResponse(res); err != nil {
14907		return nil, err
14908	}
14909	ret := &GoogleCloudDialogflowV2beta1Intent{
14910		ServerResponse: googleapi.ServerResponse{
14911			Header:         res.Header,
14912			HTTPStatusCode: res.StatusCode,
14913		},
14914	}
14915	target := &ret
14916	if err := gensupport.DecodeResponse(target, res); err != nil {
14917		return nil, err
14918	}
14919	return ret, nil
14920	// {
14921	//   "description": "Updates the specified intent.",
14922	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents/{intentsId}",
14923	//   "httpMethod": "PATCH",
14924	//   "id": "dialogflow.projects.agent.intents.patch",
14925	//   "parameterOrder": [
14926	//     "name"
14927	//   ],
14928	//   "parameters": {
14929	//     "intentView": {
14930	//       "description": "Optional. The resource view to apply to the returned intent.",
14931	//       "enum": [
14932	//         "INTENT_VIEW_UNSPECIFIED",
14933	//         "INTENT_VIEW_FULL"
14934	//       ],
14935	//       "location": "query",
14936	//       "type": "string"
14937	//     },
14938	//     "languageCode": {
14939	//       "description": "Optional. The language of training phrases, parameters and rich messages\ndefined in `intent`. If not specified, the agent's default language is\nused. [Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
14940	//       "location": "query",
14941	//       "type": "string"
14942	//     },
14943	//     "name": {
14944	//       "description": "The unique identifier of this intent.\nRequired for Intents.UpdateIntent and Intents.BatchUpdateIntents\nmethods.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.",
14945	//       "location": "path",
14946	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
14947	//       "required": true,
14948	//       "type": "string"
14949	//     },
14950	//     "updateMask": {
14951	//       "description": "Optional. The mask to control which fields get updated.",
14952	//       "format": "google-fieldmask",
14953	//       "location": "query",
14954	//       "type": "string"
14955	//     }
14956	//   },
14957	//   "path": "v2beta1/{+name}",
14958	//   "request": {
14959	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
14960	//   },
14961	//   "response": {
14962	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
14963	//   },
14964	//   "scopes": [
14965	//     "https://www.googleapis.com/auth/cloud-platform",
14966	//     "https://www.googleapis.com/auth/dialogflow"
14967	//   ]
14968	// }
14969
14970}
14971
14972// method id "dialogflow.projects.agent.knowledgeBases.create":
14973
14974type ProjectsAgentKnowledgeBasesCreateCall struct {
14975	s                                         *Service
14976	parent                                    string
14977	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
14978	urlParams_                                gensupport.URLParams
14979	ctx_                                      context.Context
14980	header_                                   http.Header
14981}
14982
14983// Create: Creates a knowledge base.
14984//
14985// Note: The `projects.agent.knowledgeBases` resource is
14986// deprecated;
14987// only use `projects.knowledgeBases`.
14988func (r *ProjectsAgentKnowledgeBasesService) Create(parent string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsAgentKnowledgeBasesCreateCall {
14989	c := &ProjectsAgentKnowledgeBasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14990	c.parent = parent
14991	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
14992	return c
14993}
14994
14995// Fields allows partial responses to be retrieved. See
14996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14997// for more information.
14998func (c *ProjectsAgentKnowledgeBasesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesCreateCall {
14999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15000	return c
15001}
15002
15003// Context sets the context to be used in this call's Do method. Any
15004// pending HTTP request will be aborted if the provided context is
15005// canceled.
15006func (c *ProjectsAgentKnowledgeBasesCreateCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesCreateCall {
15007	c.ctx_ = ctx
15008	return c
15009}
15010
15011// Header returns an http.Header that can be modified by the caller to
15012// add HTTP headers to the request.
15013func (c *ProjectsAgentKnowledgeBasesCreateCall) Header() http.Header {
15014	if c.header_ == nil {
15015		c.header_ = make(http.Header)
15016	}
15017	return c.header_
15018}
15019
15020func (c *ProjectsAgentKnowledgeBasesCreateCall) doRequest(alt string) (*http.Response, error) {
15021	reqHeaders := make(http.Header)
15022	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15023	for k, v := range c.header_ {
15024		reqHeaders[k] = v
15025	}
15026	reqHeaders.Set("User-Agent", c.s.userAgent())
15027	var body io.Reader = nil
15028	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
15029	if err != nil {
15030		return nil, err
15031	}
15032	reqHeaders.Set("Content-Type", "application/json")
15033	c.urlParams_.Set("alt", alt)
15034	c.urlParams_.Set("prettyPrint", "false")
15035	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
15036	urls += "?" + c.urlParams_.Encode()
15037	req, err := http.NewRequest("POST", urls, body)
15038	if err != nil {
15039		return nil, err
15040	}
15041	req.Header = reqHeaders
15042	googleapi.Expand(req.URL, map[string]string{
15043		"parent": c.parent,
15044	})
15045	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15046}
15047
15048// Do executes the "dialogflow.projects.agent.knowledgeBases.create" call.
15049// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
15050// will be non-nil. Any non-2xx status code is an error. Response
15051// headers are in either
15052// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
15053// (if a response was returned at all) in
15054// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15055// whether the returned error was because http.StatusNotModified was
15056// returned.
15057func (c *ProjectsAgentKnowledgeBasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
15058	gensupport.SetOptions(c.urlParams_, opts...)
15059	res, err := c.doRequest("json")
15060	if res != nil && res.StatusCode == http.StatusNotModified {
15061		if res.Body != nil {
15062			res.Body.Close()
15063		}
15064		return nil, &googleapi.Error{
15065			Code:   res.StatusCode,
15066			Header: res.Header,
15067		}
15068	}
15069	if err != nil {
15070		return nil, err
15071	}
15072	defer googleapi.CloseBody(res)
15073	if err := googleapi.CheckResponse(res); err != nil {
15074		return nil, err
15075	}
15076	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
15077		ServerResponse: googleapi.ServerResponse{
15078			Header:         res.Header,
15079			HTTPStatusCode: res.StatusCode,
15080		},
15081	}
15082	target := &ret
15083	if err := gensupport.DecodeResponse(target, res); err != nil {
15084		return nil, err
15085	}
15086	return ret, nil
15087	// {
15088	//   "description": "Creates a knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
15089	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases",
15090	//   "httpMethod": "POST",
15091	//   "id": "dialogflow.projects.agent.knowledgeBases.create",
15092	//   "parameterOrder": [
15093	//     "parent"
15094	//   ],
15095	//   "parameters": {
15096	//     "parent": {
15097	//       "description": "Required. The project to create a knowledge base for.\nFormat: `projects/\u003cProject ID\u003e`.",
15098	//       "location": "path",
15099	//       "pattern": "^projects/[^/]+/agent$",
15100	//       "required": true,
15101	//       "type": "string"
15102	//     }
15103	//   },
15104	//   "path": "v2beta1/{+parent}/knowledgeBases",
15105	//   "request": {
15106	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
15107	//   },
15108	//   "response": {
15109	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
15110	//   },
15111	//   "scopes": [
15112	//     "https://www.googleapis.com/auth/cloud-platform",
15113	//     "https://www.googleapis.com/auth/dialogflow"
15114	//   ]
15115	// }
15116
15117}
15118
15119// method id "dialogflow.projects.agent.knowledgeBases.delete":
15120
15121type ProjectsAgentKnowledgeBasesDeleteCall struct {
15122	s          *Service
15123	name       string
15124	urlParams_ gensupport.URLParams
15125	ctx_       context.Context
15126	header_    http.Header
15127}
15128
15129// Delete: Deletes the specified knowledge base.
15130//
15131// Note: The `projects.agent.knowledgeBases` resource is
15132// deprecated;
15133// only use `projects.knowledgeBases`.
15134func (r *ProjectsAgentKnowledgeBasesService) Delete(name string) *ProjectsAgentKnowledgeBasesDeleteCall {
15135	c := &ProjectsAgentKnowledgeBasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15136	c.name = name
15137	return c
15138}
15139
15140// Force sets the optional parameter "force": Force deletes the
15141// knowledge base. When set to true, any documents
15142// in the knowledge base are also deleted.
15143func (c *ProjectsAgentKnowledgeBasesDeleteCall) Force(force bool) *ProjectsAgentKnowledgeBasesDeleteCall {
15144	c.urlParams_.Set("force", fmt.Sprint(force))
15145	return c
15146}
15147
15148// Fields allows partial responses to be retrieved. See
15149// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15150// for more information.
15151func (c *ProjectsAgentKnowledgeBasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDeleteCall {
15152	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15153	return c
15154}
15155
15156// Context sets the context to be used in this call's Do method. Any
15157// pending HTTP request will be aborted if the provided context is
15158// canceled.
15159func (c *ProjectsAgentKnowledgeBasesDeleteCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDeleteCall {
15160	c.ctx_ = ctx
15161	return c
15162}
15163
15164// Header returns an http.Header that can be modified by the caller to
15165// add HTTP headers to the request.
15166func (c *ProjectsAgentKnowledgeBasesDeleteCall) Header() http.Header {
15167	if c.header_ == nil {
15168		c.header_ = make(http.Header)
15169	}
15170	return c.header_
15171}
15172
15173func (c *ProjectsAgentKnowledgeBasesDeleteCall) doRequest(alt string) (*http.Response, error) {
15174	reqHeaders := make(http.Header)
15175	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15176	for k, v := range c.header_ {
15177		reqHeaders[k] = v
15178	}
15179	reqHeaders.Set("User-Agent", c.s.userAgent())
15180	var body io.Reader = nil
15181	c.urlParams_.Set("alt", alt)
15182	c.urlParams_.Set("prettyPrint", "false")
15183	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15184	urls += "?" + c.urlParams_.Encode()
15185	req, err := http.NewRequest("DELETE", urls, body)
15186	if err != nil {
15187		return nil, err
15188	}
15189	req.Header = reqHeaders
15190	googleapi.Expand(req.URL, map[string]string{
15191		"name": c.name,
15192	})
15193	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15194}
15195
15196// Do executes the "dialogflow.projects.agent.knowledgeBases.delete" call.
15197// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
15198// non-2xx status code is an error. Response headers are in either
15199// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
15200// returned at all) in error.(*googleapi.Error).Header. Use
15201// googleapi.IsNotModified to check whether the returned error was
15202// because http.StatusNotModified was returned.
15203func (c *ProjectsAgentKnowledgeBasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
15204	gensupport.SetOptions(c.urlParams_, opts...)
15205	res, err := c.doRequest("json")
15206	if res != nil && res.StatusCode == http.StatusNotModified {
15207		if res.Body != nil {
15208			res.Body.Close()
15209		}
15210		return nil, &googleapi.Error{
15211			Code:   res.StatusCode,
15212			Header: res.Header,
15213		}
15214	}
15215	if err != nil {
15216		return nil, err
15217	}
15218	defer googleapi.CloseBody(res)
15219	if err := googleapi.CheckResponse(res); err != nil {
15220		return nil, err
15221	}
15222	ret := &GoogleProtobufEmpty{
15223		ServerResponse: googleapi.ServerResponse{
15224			Header:         res.Header,
15225			HTTPStatusCode: res.StatusCode,
15226		},
15227	}
15228	target := &ret
15229	if err := gensupport.DecodeResponse(target, res); err != nil {
15230		return nil, err
15231	}
15232	return ret, nil
15233	// {
15234	//   "description": "Deletes the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
15235	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
15236	//   "httpMethod": "DELETE",
15237	//   "id": "dialogflow.projects.agent.knowledgeBases.delete",
15238	//   "parameterOrder": [
15239	//     "name"
15240	//   ],
15241	//   "parameters": {
15242	//     "force": {
15243	//       "description": "Optional. Force deletes the knowledge base. When set to true, any documents\nin the knowledge base are also deleted.",
15244	//       "location": "query",
15245	//       "type": "boolean"
15246	//     },
15247	//     "name": {
15248	//       "description": "Required. The name of the knowledge base to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
15249	//       "location": "path",
15250	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
15251	//       "required": true,
15252	//       "type": "string"
15253	//     }
15254	//   },
15255	//   "path": "v2beta1/{+name}",
15256	//   "response": {
15257	//     "$ref": "GoogleProtobufEmpty"
15258	//   },
15259	//   "scopes": [
15260	//     "https://www.googleapis.com/auth/cloud-platform",
15261	//     "https://www.googleapis.com/auth/dialogflow"
15262	//   ]
15263	// }
15264
15265}
15266
15267// method id "dialogflow.projects.agent.knowledgeBases.get":
15268
15269type ProjectsAgentKnowledgeBasesGetCall struct {
15270	s            *Service
15271	name         string
15272	urlParams_   gensupport.URLParams
15273	ifNoneMatch_ string
15274	ctx_         context.Context
15275	header_      http.Header
15276}
15277
15278// Get: Retrieves the specified knowledge base.
15279//
15280// Note: The `projects.agent.knowledgeBases` resource is
15281// deprecated;
15282// only use `projects.knowledgeBases`.
15283func (r *ProjectsAgentKnowledgeBasesService) Get(name string) *ProjectsAgentKnowledgeBasesGetCall {
15284	c := &ProjectsAgentKnowledgeBasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15285	c.name = name
15286	return c
15287}
15288
15289// Fields allows partial responses to be retrieved. See
15290// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15291// for more information.
15292func (c *ProjectsAgentKnowledgeBasesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesGetCall {
15293	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15294	return c
15295}
15296
15297// IfNoneMatch sets the optional parameter which makes the operation
15298// fail if the object's ETag matches the given value. This is useful for
15299// getting updates only after the object has changed since the last
15300// request. Use googleapi.IsNotModified to check whether the response
15301// error from Do is the result of In-None-Match.
15302func (c *ProjectsAgentKnowledgeBasesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesGetCall {
15303	c.ifNoneMatch_ = entityTag
15304	return c
15305}
15306
15307// Context sets the context to be used in this call's Do method. Any
15308// pending HTTP request will be aborted if the provided context is
15309// canceled.
15310func (c *ProjectsAgentKnowledgeBasesGetCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesGetCall {
15311	c.ctx_ = ctx
15312	return c
15313}
15314
15315// Header returns an http.Header that can be modified by the caller to
15316// add HTTP headers to the request.
15317func (c *ProjectsAgentKnowledgeBasesGetCall) Header() http.Header {
15318	if c.header_ == nil {
15319		c.header_ = make(http.Header)
15320	}
15321	return c.header_
15322}
15323
15324func (c *ProjectsAgentKnowledgeBasesGetCall) doRequest(alt string) (*http.Response, error) {
15325	reqHeaders := make(http.Header)
15326	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15327	for k, v := range c.header_ {
15328		reqHeaders[k] = v
15329	}
15330	reqHeaders.Set("User-Agent", c.s.userAgent())
15331	if c.ifNoneMatch_ != "" {
15332		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15333	}
15334	var body io.Reader = nil
15335	c.urlParams_.Set("alt", alt)
15336	c.urlParams_.Set("prettyPrint", "false")
15337	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15338	urls += "?" + c.urlParams_.Encode()
15339	req, err := http.NewRequest("GET", urls, body)
15340	if err != nil {
15341		return nil, err
15342	}
15343	req.Header = reqHeaders
15344	googleapi.Expand(req.URL, map[string]string{
15345		"name": c.name,
15346	})
15347	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15348}
15349
15350// Do executes the "dialogflow.projects.agent.knowledgeBases.get" call.
15351// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
15352// will be non-nil. Any non-2xx status code is an error. Response
15353// headers are in either
15354// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
15355// (if a response was returned at all) in
15356// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15357// whether the returned error was because http.StatusNotModified was
15358// returned.
15359func (c *ProjectsAgentKnowledgeBasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
15360	gensupport.SetOptions(c.urlParams_, opts...)
15361	res, err := c.doRequest("json")
15362	if res != nil && res.StatusCode == http.StatusNotModified {
15363		if res.Body != nil {
15364			res.Body.Close()
15365		}
15366		return nil, &googleapi.Error{
15367			Code:   res.StatusCode,
15368			Header: res.Header,
15369		}
15370	}
15371	if err != nil {
15372		return nil, err
15373	}
15374	defer googleapi.CloseBody(res)
15375	if err := googleapi.CheckResponse(res); err != nil {
15376		return nil, err
15377	}
15378	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
15379		ServerResponse: googleapi.ServerResponse{
15380			Header:         res.Header,
15381			HTTPStatusCode: res.StatusCode,
15382		},
15383	}
15384	target := &ret
15385	if err := gensupport.DecodeResponse(target, res); err != nil {
15386		return nil, err
15387	}
15388	return ret, nil
15389	// {
15390	//   "description": "Retrieves the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
15391	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
15392	//   "httpMethod": "GET",
15393	//   "id": "dialogflow.projects.agent.knowledgeBases.get",
15394	//   "parameterOrder": [
15395	//     "name"
15396	//   ],
15397	//   "parameters": {
15398	//     "name": {
15399	//       "description": "Required. The name of the knowledge base to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
15400	//       "location": "path",
15401	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
15402	//       "required": true,
15403	//       "type": "string"
15404	//     }
15405	//   },
15406	//   "path": "v2beta1/{+name}",
15407	//   "response": {
15408	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
15409	//   },
15410	//   "scopes": [
15411	//     "https://www.googleapis.com/auth/cloud-platform",
15412	//     "https://www.googleapis.com/auth/dialogflow"
15413	//   ]
15414	// }
15415
15416}
15417
15418// method id "dialogflow.projects.agent.knowledgeBases.list":
15419
15420type ProjectsAgentKnowledgeBasesListCall struct {
15421	s            *Service
15422	parent       string
15423	urlParams_   gensupport.URLParams
15424	ifNoneMatch_ string
15425	ctx_         context.Context
15426	header_      http.Header
15427}
15428
15429// List: Returns the list of all knowledge bases of the specified
15430// agent.
15431//
15432// Note: The `projects.agent.knowledgeBases` resource is
15433// deprecated;
15434// only use `projects.knowledgeBases`.
15435func (r *ProjectsAgentKnowledgeBasesService) List(parent string) *ProjectsAgentKnowledgeBasesListCall {
15436	c := &ProjectsAgentKnowledgeBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15437	c.parent = parent
15438	return c
15439}
15440
15441// PageSize sets the optional parameter "pageSize": The maximum number
15442// of items to return in a single page. By
15443// default 10 and at most 100.
15444func (c *ProjectsAgentKnowledgeBasesListCall) PageSize(pageSize int64) *ProjectsAgentKnowledgeBasesListCall {
15445	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15446	return c
15447}
15448
15449// PageToken sets the optional parameter "pageToken": The
15450// next_page_token value returned from a previous list request.
15451func (c *ProjectsAgentKnowledgeBasesListCall) PageToken(pageToken string) *ProjectsAgentKnowledgeBasesListCall {
15452	c.urlParams_.Set("pageToken", pageToken)
15453	return c
15454}
15455
15456// Fields allows partial responses to be retrieved. See
15457// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15458// for more information.
15459func (c *ProjectsAgentKnowledgeBasesListCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesListCall {
15460	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15461	return c
15462}
15463
15464// IfNoneMatch sets the optional parameter which makes the operation
15465// fail if the object's ETag matches the given value. This is useful for
15466// getting updates only after the object has changed since the last
15467// request. Use googleapi.IsNotModified to check whether the response
15468// error from Do is the result of In-None-Match.
15469func (c *ProjectsAgentKnowledgeBasesListCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesListCall {
15470	c.ifNoneMatch_ = entityTag
15471	return c
15472}
15473
15474// Context sets the context to be used in this call's Do method. Any
15475// pending HTTP request will be aborted if the provided context is
15476// canceled.
15477func (c *ProjectsAgentKnowledgeBasesListCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesListCall {
15478	c.ctx_ = ctx
15479	return c
15480}
15481
15482// Header returns an http.Header that can be modified by the caller to
15483// add HTTP headers to the request.
15484func (c *ProjectsAgentKnowledgeBasesListCall) Header() http.Header {
15485	if c.header_ == nil {
15486		c.header_ = make(http.Header)
15487	}
15488	return c.header_
15489}
15490
15491func (c *ProjectsAgentKnowledgeBasesListCall) doRequest(alt string) (*http.Response, error) {
15492	reqHeaders := make(http.Header)
15493	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15494	for k, v := range c.header_ {
15495		reqHeaders[k] = v
15496	}
15497	reqHeaders.Set("User-Agent", c.s.userAgent())
15498	if c.ifNoneMatch_ != "" {
15499		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15500	}
15501	var body io.Reader = nil
15502	c.urlParams_.Set("alt", alt)
15503	c.urlParams_.Set("prettyPrint", "false")
15504	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
15505	urls += "?" + c.urlParams_.Encode()
15506	req, err := http.NewRequest("GET", urls, body)
15507	if err != nil {
15508		return nil, err
15509	}
15510	req.Header = reqHeaders
15511	googleapi.Expand(req.URL, map[string]string{
15512		"parent": c.parent,
15513	})
15514	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15515}
15516
15517// Do executes the "dialogflow.projects.agent.knowledgeBases.list" call.
15518// Exactly one of
15519// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse or error will
15520// be non-nil. Any non-2xx status code is an error. Response headers are
15521// in either
15522// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse.ServerResponse
15523// .Header or (if a response was returned at all) in
15524// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15525// whether the returned error was because http.StatusNotModified was
15526// returned.
15527func (c *ProjectsAgentKnowledgeBasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse, error) {
15528	gensupport.SetOptions(c.urlParams_, opts...)
15529	res, err := c.doRequest("json")
15530	if res != nil && res.StatusCode == http.StatusNotModified {
15531		if res.Body != nil {
15532			res.Body.Close()
15533		}
15534		return nil, &googleapi.Error{
15535			Code:   res.StatusCode,
15536			Header: res.Header,
15537		}
15538	}
15539	if err != nil {
15540		return nil, err
15541	}
15542	defer googleapi.CloseBody(res)
15543	if err := googleapi.CheckResponse(res); err != nil {
15544		return nil, err
15545	}
15546	ret := &GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse{
15547		ServerResponse: googleapi.ServerResponse{
15548			Header:         res.Header,
15549			HTTPStatusCode: res.StatusCode,
15550		},
15551	}
15552	target := &ret
15553	if err := gensupport.DecodeResponse(target, res); err != nil {
15554		return nil, err
15555	}
15556	return ret, nil
15557	// {
15558	//   "description": "Returns the list of all knowledge bases of the specified agent.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
15559	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases",
15560	//   "httpMethod": "GET",
15561	//   "id": "dialogflow.projects.agent.knowledgeBases.list",
15562	//   "parameterOrder": [
15563	//     "parent"
15564	//   ],
15565	//   "parameters": {
15566	//     "pageSize": {
15567	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
15568	//       "format": "int32",
15569	//       "location": "query",
15570	//       "type": "integer"
15571	//     },
15572	//     "pageToken": {
15573	//       "description": "Optional. The next_page_token value returned from a previous list request.",
15574	//       "location": "query",
15575	//       "type": "string"
15576	//     },
15577	//     "parent": {
15578	//       "description": "Required. The project to list of knowledge bases for.\nFormat: `projects/\u003cProject ID\u003e`.",
15579	//       "location": "path",
15580	//       "pattern": "^projects/[^/]+/agent$",
15581	//       "required": true,
15582	//       "type": "string"
15583	//     }
15584	//   },
15585	//   "path": "v2beta1/{+parent}/knowledgeBases",
15586	//   "response": {
15587	//     "$ref": "GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse"
15588	//   },
15589	//   "scopes": [
15590	//     "https://www.googleapis.com/auth/cloud-platform",
15591	//     "https://www.googleapis.com/auth/dialogflow"
15592	//   ]
15593	// }
15594
15595}
15596
15597// Pages invokes f for each page of results.
15598// A non-nil error returned from f will halt the iteration.
15599// The provided context supersedes any context provided to the Context method.
15600func (c *ProjectsAgentKnowledgeBasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse) error) error {
15601	c.ctx_ = ctx
15602	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15603	for {
15604		x, err := c.Do()
15605		if err != nil {
15606			return err
15607		}
15608		if err := f(x); err != nil {
15609			return err
15610		}
15611		if x.NextPageToken == "" {
15612			return nil
15613		}
15614		c.PageToken(x.NextPageToken)
15615	}
15616}
15617
15618// method id "dialogflow.projects.agent.knowledgeBases.patch":
15619
15620type ProjectsAgentKnowledgeBasesPatchCall struct {
15621	s                                         *Service
15622	name                                      string
15623	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
15624	urlParams_                                gensupport.URLParams
15625	ctx_                                      context.Context
15626	header_                                   http.Header
15627}
15628
15629// Patch: Updates the specified knowledge base.
15630//
15631// Note: The `projects.agent.knowledgeBases` resource is
15632// deprecated;
15633// only use `projects.knowledgeBases`.
15634func (r *ProjectsAgentKnowledgeBasesService) Patch(name string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsAgentKnowledgeBasesPatchCall {
15635	c := &ProjectsAgentKnowledgeBasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15636	c.name = name
15637	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
15638	return c
15639}
15640
15641// UpdateMask sets the optional parameter "updateMask": Not specified
15642// means `update all`.
15643// Currently, only `display_name` can be updated, an InvalidArgument
15644// will be
15645// returned for attempting to update other fields.
15646func (c *ProjectsAgentKnowledgeBasesPatchCall) UpdateMask(updateMask string) *ProjectsAgentKnowledgeBasesPatchCall {
15647	c.urlParams_.Set("updateMask", updateMask)
15648	return c
15649}
15650
15651// Fields allows partial responses to be retrieved. See
15652// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15653// for more information.
15654func (c *ProjectsAgentKnowledgeBasesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesPatchCall {
15655	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15656	return c
15657}
15658
15659// Context sets the context to be used in this call's Do method. Any
15660// pending HTTP request will be aborted if the provided context is
15661// canceled.
15662func (c *ProjectsAgentKnowledgeBasesPatchCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesPatchCall {
15663	c.ctx_ = ctx
15664	return c
15665}
15666
15667// Header returns an http.Header that can be modified by the caller to
15668// add HTTP headers to the request.
15669func (c *ProjectsAgentKnowledgeBasesPatchCall) Header() http.Header {
15670	if c.header_ == nil {
15671		c.header_ = make(http.Header)
15672	}
15673	return c.header_
15674}
15675
15676func (c *ProjectsAgentKnowledgeBasesPatchCall) doRequest(alt string) (*http.Response, error) {
15677	reqHeaders := make(http.Header)
15678	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15679	for k, v := range c.header_ {
15680		reqHeaders[k] = v
15681	}
15682	reqHeaders.Set("User-Agent", c.s.userAgent())
15683	var body io.Reader = nil
15684	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
15685	if err != nil {
15686		return nil, err
15687	}
15688	reqHeaders.Set("Content-Type", "application/json")
15689	c.urlParams_.Set("alt", alt)
15690	c.urlParams_.Set("prettyPrint", "false")
15691	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15692	urls += "?" + c.urlParams_.Encode()
15693	req, err := http.NewRequest("PATCH", urls, body)
15694	if err != nil {
15695		return nil, err
15696	}
15697	req.Header = reqHeaders
15698	googleapi.Expand(req.URL, map[string]string{
15699		"name": c.name,
15700	})
15701	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15702}
15703
15704// Do executes the "dialogflow.projects.agent.knowledgeBases.patch" call.
15705// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
15706// will be non-nil. Any non-2xx status code is an error. Response
15707// headers are in either
15708// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
15709// (if a response was returned at all) in
15710// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15711// whether the returned error was because http.StatusNotModified was
15712// returned.
15713func (c *ProjectsAgentKnowledgeBasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
15714	gensupport.SetOptions(c.urlParams_, opts...)
15715	res, err := c.doRequest("json")
15716	if res != nil && res.StatusCode == http.StatusNotModified {
15717		if res.Body != nil {
15718			res.Body.Close()
15719		}
15720		return nil, &googleapi.Error{
15721			Code:   res.StatusCode,
15722			Header: res.Header,
15723		}
15724	}
15725	if err != nil {
15726		return nil, err
15727	}
15728	defer googleapi.CloseBody(res)
15729	if err := googleapi.CheckResponse(res); err != nil {
15730		return nil, err
15731	}
15732	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
15733		ServerResponse: googleapi.ServerResponse{
15734			Header:         res.Header,
15735			HTTPStatusCode: res.StatusCode,
15736		},
15737	}
15738	target := &ret
15739	if err := gensupport.DecodeResponse(target, res); err != nil {
15740		return nil, err
15741	}
15742	return ret, nil
15743	// {
15744	//   "description": "Updates the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
15745	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
15746	//   "httpMethod": "PATCH",
15747	//   "id": "dialogflow.projects.agent.knowledgeBases.patch",
15748	//   "parameterOrder": [
15749	//     "name"
15750	//   ],
15751	//   "parameters": {
15752	//     "name": {
15753	//       "description": "The knowledge base resource name.\nThe name must be empty when creating a knowledge base.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
15754	//       "location": "path",
15755	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
15756	//       "required": true,
15757	//       "type": "string"
15758	//     },
15759	//     "updateMask": {
15760	//       "description": "Optional. Not specified means `update all`.\nCurrently, only `display_name` can be updated, an InvalidArgument will be\nreturned for attempting to update other fields.",
15761	//       "format": "google-fieldmask",
15762	//       "location": "query",
15763	//       "type": "string"
15764	//     }
15765	//   },
15766	//   "path": "v2beta1/{+name}",
15767	//   "request": {
15768	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
15769	//   },
15770	//   "response": {
15771	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
15772	//   },
15773	//   "scopes": [
15774	//     "https://www.googleapis.com/auth/cloud-platform",
15775	//     "https://www.googleapis.com/auth/dialogflow"
15776	//   ]
15777	// }
15778
15779}
15780
15781// method id "dialogflow.projects.agent.knowledgeBases.documents.create":
15782
15783type ProjectsAgentKnowledgeBasesDocumentsCreateCall struct {
15784	s                                    *Service
15785	parent                               string
15786	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
15787	urlParams_                           gensupport.URLParams
15788	ctx_                                 context.Context
15789	header_                              http.Header
15790}
15791
15792// Create: Creates a new document.
15793//
15794// Note: The `projects.agent.knowledgeBases.documents` resource is
15795// deprecated;
15796// only use `projects.knowledgeBases.documents`.
15797//
15798// Operation <response: Document,
15799//            metadata: KnowledgeOperationMetadata>
15800func (r *ProjectsAgentKnowledgeBasesDocumentsService) Create(parent string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
15801	c := &ProjectsAgentKnowledgeBasesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15802	c.parent = parent
15803	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
15804	return c
15805}
15806
15807// Fields allows partial responses to be retrieved. See
15808// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15809// for more information.
15810func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
15811	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15812	return c
15813}
15814
15815// Context sets the context to be used in this call's Do method. Any
15816// pending HTTP request will be aborted if the provided context is
15817// canceled.
15818func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
15819	c.ctx_ = ctx
15820	return c
15821}
15822
15823// Header returns an http.Header that can be modified by the caller to
15824// add HTTP headers to the request.
15825func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Header() http.Header {
15826	if c.header_ == nil {
15827		c.header_ = make(http.Header)
15828	}
15829	return c.header_
15830}
15831
15832func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) {
15833	reqHeaders := make(http.Header)
15834	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15835	for k, v := range c.header_ {
15836		reqHeaders[k] = v
15837	}
15838	reqHeaders.Set("User-Agent", c.s.userAgent())
15839	var body io.Reader = nil
15840	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
15841	if err != nil {
15842		return nil, err
15843	}
15844	reqHeaders.Set("Content-Type", "application/json")
15845	c.urlParams_.Set("alt", alt)
15846	c.urlParams_.Set("prettyPrint", "false")
15847	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
15848	urls += "?" + c.urlParams_.Encode()
15849	req, err := http.NewRequest("POST", urls, body)
15850	if err != nil {
15851		return nil, err
15852	}
15853	req.Header = reqHeaders
15854	googleapi.Expand(req.URL, map[string]string{
15855		"parent": c.parent,
15856	})
15857	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15858}
15859
15860// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.create" call.
15861// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
15862// Any non-2xx status code is an error. Response headers are in either
15863// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
15864// was returned at all) in error.(*googleapi.Error).Header. Use
15865// googleapi.IsNotModified to check whether the returned error was
15866// because http.StatusNotModified was returned.
15867func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
15868	gensupport.SetOptions(c.urlParams_, opts...)
15869	res, err := c.doRequest("json")
15870	if res != nil && res.StatusCode == http.StatusNotModified {
15871		if res.Body != nil {
15872			res.Body.Close()
15873		}
15874		return nil, &googleapi.Error{
15875			Code:   res.StatusCode,
15876			Header: res.Header,
15877		}
15878	}
15879	if err != nil {
15880		return nil, err
15881	}
15882	defer googleapi.CloseBody(res)
15883	if err := googleapi.CheckResponse(res); err != nil {
15884		return nil, err
15885	}
15886	ret := &GoogleLongrunningOperation{
15887		ServerResponse: googleapi.ServerResponse{
15888			Header:         res.Header,
15889			HTTPStatusCode: res.StatusCode,
15890		},
15891	}
15892	target := &ret
15893	if err := gensupport.DecodeResponse(target, res); err != nil {
15894		return nil, err
15895	}
15896	return ret, nil
15897	// {
15898	//   "description": "Creates a new document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.\n\nOperation \u003cresponse: Document,\n           metadata: KnowledgeOperationMetadata\u003e",
15899	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents",
15900	//   "httpMethod": "POST",
15901	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.create",
15902	//   "parameterOrder": [
15903	//     "parent"
15904	//   ],
15905	//   "parameters": {
15906	//     "parent": {
15907	//       "description": "Required. The knoweldge base to create a document for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
15908	//       "location": "path",
15909	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
15910	//       "required": true,
15911	//       "type": "string"
15912	//     }
15913	//   },
15914	//   "path": "v2beta1/{+parent}/documents",
15915	//   "request": {
15916	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
15917	//   },
15918	//   "response": {
15919	//     "$ref": "GoogleLongrunningOperation"
15920	//   },
15921	//   "scopes": [
15922	//     "https://www.googleapis.com/auth/cloud-platform",
15923	//     "https://www.googleapis.com/auth/dialogflow"
15924	//   ]
15925	// }
15926
15927}
15928
15929// method id "dialogflow.projects.agent.knowledgeBases.documents.delete":
15930
15931type ProjectsAgentKnowledgeBasesDocumentsDeleteCall struct {
15932	s          *Service
15933	name       string
15934	urlParams_ gensupport.URLParams
15935	ctx_       context.Context
15936	header_    http.Header
15937}
15938
15939// Delete: Deletes the specified document.
15940//
15941// Note: The `projects.agent.knowledgeBases.documents` resource is
15942// deprecated;
15943// only use `projects.knowledgeBases.documents`.
15944//
15945// Operation <response: google.protobuf.Empty,
15946//            metadata: KnowledgeOperationMetadata>
15947func (r *ProjectsAgentKnowledgeBasesDocumentsService) Delete(name string) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
15948	c := &ProjectsAgentKnowledgeBasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15949	c.name = name
15950	return c
15951}
15952
15953// Fields allows partial responses to be retrieved. See
15954// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15955// for more information.
15956func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
15957	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15958	return c
15959}
15960
15961// Context sets the context to be used in this call's Do method. Any
15962// pending HTTP request will be aborted if the provided context is
15963// canceled.
15964func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
15965	c.ctx_ = ctx
15966	return c
15967}
15968
15969// Header returns an http.Header that can be modified by the caller to
15970// add HTTP headers to the request.
15971func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Header() http.Header {
15972	if c.header_ == nil {
15973		c.header_ = make(http.Header)
15974	}
15975	return c.header_
15976}
15977
15978func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
15979	reqHeaders := make(http.Header)
15980	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15981	for k, v := range c.header_ {
15982		reqHeaders[k] = v
15983	}
15984	reqHeaders.Set("User-Agent", c.s.userAgent())
15985	var body io.Reader = nil
15986	c.urlParams_.Set("alt", alt)
15987	c.urlParams_.Set("prettyPrint", "false")
15988	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15989	urls += "?" + c.urlParams_.Encode()
15990	req, err := http.NewRequest("DELETE", urls, body)
15991	if err != nil {
15992		return nil, err
15993	}
15994	req.Header = reqHeaders
15995	googleapi.Expand(req.URL, map[string]string{
15996		"name": c.name,
15997	})
15998	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15999}
16000
16001// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.delete" call.
16002// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
16003// Any non-2xx status code is an error. Response headers are in either
16004// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
16005// was returned at all) in error.(*googleapi.Error).Header. Use
16006// googleapi.IsNotModified to check whether the returned error was
16007// because http.StatusNotModified was returned.
16008func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
16009	gensupport.SetOptions(c.urlParams_, opts...)
16010	res, err := c.doRequest("json")
16011	if res != nil && res.StatusCode == http.StatusNotModified {
16012		if res.Body != nil {
16013			res.Body.Close()
16014		}
16015		return nil, &googleapi.Error{
16016			Code:   res.StatusCode,
16017			Header: res.Header,
16018		}
16019	}
16020	if err != nil {
16021		return nil, err
16022	}
16023	defer googleapi.CloseBody(res)
16024	if err := googleapi.CheckResponse(res); err != nil {
16025		return nil, err
16026	}
16027	ret := &GoogleLongrunningOperation{
16028		ServerResponse: googleapi.ServerResponse{
16029			Header:         res.Header,
16030			HTTPStatusCode: res.StatusCode,
16031		},
16032	}
16033	target := &ret
16034	if err := gensupport.DecodeResponse(target, res); err != nil {
16035		return nil, err
16036	}
16037	return ret, nil
16038	// {
16039	//   "description": "Deletes the specified document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.\n\nOperation \u003cresponse: google.protobuf.Empty,\n           metadata: KnowledgeOperationMetadata\u003e",
16040	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
16041	//   "httpMethod": "DELETE",
16042	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.delete",
16043	//   "parameterOrder": [
16044	//     "name"
16045	//   ],
16046	//   "parameters": {
16047	//     "name": {
16048	//       "description": "The name of the document to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
16049	//       "location": "path",
16050	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
16051	//       "required": true,
16052	//       "type": "string"
16053	//     }
16054	//   },
16055	//   "path": "v2beta1/{+name}",
16056	//   "response": {
16057	//     "$ref": "GoogleLongrunningOperation"
16058	//   },
16059	//   "scopes": [
16060	//     "https://www.googleapis.com/auth/cloud-platform",
16061	//     "https://www.googleapis.com/auth/dialogflow"
16062	//   ]
16063	// }
16064
16065}
16066
16067// method id "dialogflow.projects.agent.knowledgeBases.documents.get":
16068
16069type ProjectsAgentKnowledgeBasesDocumentsGetCall struct {
16070	s            *Service
16071	name         string
16072	urlParams_   gensupport.URLParams
16073	ifNoneMatch_ string
16074	ctx_         context.Context
16075	header_      http.Header
16076}
16077
16078// Get: Retrieves the specified document.
16079//
16080// Note: The `projects.agent.knowledgeBases.documents` resource is
16081// deprecated;
16082// only use `projects.knowledgeBases.documents`.
16083func (r *ProjectsAgentKnowledgeBasesDocumentsService) Get(name string) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
16084	c := &ProjectsAgentKnowledgeBasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16085	c.name = name
16086	return c
16087}
16088
16089// Fields allows partial responses to be retrieved. See
16090// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16091// for more information.
16092func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
16093	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16094	return c
16095}
16096
16097// IfNoneMatch sets the optional parameter which makes the operation
16098// fail if the object's ETag matches the given value. This is useful for
16099// getting updates only after the object has changed since the last
16100// request. Use googleapi.IsNotModified to check whether the response
16101// error from Do is the result of In-None-Match.
16102func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
16103	c.ifNoneMatch_ = entityTag
16104	return c
16105}
16106
16107// Context sets the context to be used in this call's Do method. Any
16108// pending HTTP request will be aborted if the provided context is
16109// canceled.
16110func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
16111	c.ctx_ = ctx
16112	return c
16113}
16114
16115// Header returns an http.Header that can be modified by the caller to
16116// add HTTP headers to the request.
16117func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Header() http.Header {
16118	if c.header_ == nil {
16119		c.header_ = make(http.Header)
16120	}
16121	return c.header_
16122}
16123
16124func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
16125	reqHeaders := make(http.Header)
16126	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16127	for k, v := range c.header_ {
16128		reqHeaders[k] = v
16129	}
16130	reqHeaders.Set("User-Agent", c.s.userAgent())
16131	if c.ifNoneMatch_ != "" {
16132		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16133	}
16134	var body io.Reader = nil
16135	c.urlParams_.Set("alt", alt)
16136	c.urlParams_.Set("prettyPrint", "false")
16137	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
16138	urls += "?" + c.urlParams_.Encode()
16139	req, err := http.NewRequest("GET", urls, body)
16140	if err != nil {
16141		return nil, err
16142	}
16143	req.Header = reqHeaders
16144	googleapi.Expand(req.URL, map[string]string{
16145		"name": c.name,
16146	})
16147	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16148}
16149
16150// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.get" call.
16151// Exactly one of *GoogleCloudDialogflowV2beta1Document or error will be
16152// non-nil. Any non-2xx status code is an error. Response headers are in
16153// either *GoogleCloudDialogflowV2beta1Document.ServerResponse.Header or
16154// (if a response was returned at all) in
16155// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16156// whether the returned error was because http.StatusNotModified was
16157// returned.
16158func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Document, error) {
16159	gensupport.SetOptions(c.urlParams_, opts...)
16160	res, err := c.doRequest("json")
16161	if res != nil && res.StatusCode == http.StatusNotModified {
16162		if res.Body != nil {
16163			res.Body.Close()
16164		}
16165		return nil, &googleapi.Error{
16166			Code:   res.StatusCode,
16167			Header: res.Header,
16168		}
16169	}
16170	if err != nil {
16171		return nil, err
16172	}
16173	defer googleapi.CloseBody(res)
16174	if err := googleapi.CheckResponse(res); err != nil {
16175		return nil, err
16176	}
16177	ret := &GoogleCloudDialogflowV2beta1Document{
16178		ServerResponse: googleapi.ServerResponse{
16179			Header:         res.Header,
16180			HTTPStatusCode: res.StatusCode,
16181		},
16182	}
16183	target := &ret
16184	if err := gensupport.DecodeResponse(target, res); err != nil {
16185		return nil, err
16186	}
16187	return ret, nil
16188	// {
16189	//   "description": "Retrieves the specified document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.",
16190	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
16191	//   "httpMethod": "GET",
16192	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.get",
16193	//   "parameterOrder": [
16194	//     "name"
16195	//   ],
16196	//   "parameters": {
16197	//     "name": {
16198	//       "description": "Required. The name of the document to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
16199	//       "location": "path",
16200	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
16201	//       "required": true,
16202	//       "type": "string"
16203	//     }
16204	//   },
16205	//   "path": "v2beta1/{+name}",
16206	//   "response": {
16207	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
16208	//   },
16209	//   "scopes": [
16210	//     "https://www.googleapis.com/auth/cloud-platform",
16211	//     "https://www.googleapis.com/auth/dialogflow"
16212	//   ]
16213	// }
16214
16215}
16216
16217// method id "dialogflow.projects.agent.knowledgeBases.documents.list":
16218
16219type ProjectsAgentKnowledgeBasesDocumentsListCall struct {
16220	s            *Service
16221	parent       string
16222	urlParams_   gensupport.URLParams
16223	ifNoneMatch_ string
16224	ctx_         context.Context
16225	header_      http.Header
16226}
16227
16228// List: Returns the list of all documents of the knowledge base.
16229//
16230// Note: The `projects.agent.knowledgeBases.documents` resource is
16231// deprecated;
16232// only use `projects.knowledgeBases.documents`.
16233func (r *ProjectsAgentKnowledgeBasesDocumentsService) List(parent string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16234	c := &ProjectsAgentKnowledgeBasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16235	c.parent = parent
16236	return c
16237}
16238
16239// PageSize sets the optional parameter "pageSize": The maximum number
16240// of items to return in a single page. By
16241// default 10 and at most 100.
16242func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) PageSize(pageSize int64) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16243	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16244	return c
16245}
16246
16247// PageToken sets the optional parameter "pageToken": The
16248// next_page_token value returned from a previous list request.
16249func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) PageToken(pageToken string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16250	c.urlParams_.Set("pageToken", pageToken)
16251	return c
16252}
16253
16254// Fields allows partial responses to be retrieved. See
16255// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16256// for more information.
16257func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16258	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16259	return c
16260}
16261
16262// IfNoneMatch sets the optional parameter which makes the operation
16263// fail if the object's ETag matches the given value. This is useful for
16264// getting updates only after the object has changed since the last
16265// request. Use googleapi.IsNotModified to check whether the response
16266// error from Do is the result of In-None-Match.
16267func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16268	c.ifNoneMatch_ = entityTag
16269	return c
16270}
16271
16272// Context sets the context to be used in this call's Do method. Any
16273// pending HTTP request will be aborted if the provided context is
16274// canceled.
16275func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16276	c.ctx_ = ctx
16277	return c
16278}
16279
16280// Header returns an http.Header that can be modified by the caller to
16281// add HTTP headers to the request.
16282func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Header() http.Header {
16283	if c.header_ == nil {
16284		c.header_ = make(http.Header)
16285	}
16286	return c.header_
16287}
16288
16289func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
16290	reqHeaders := make(http.Header)
16291	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16292	for k, v := range c.header_ {
16293		reqHeaders[k] = v
16294	}
16295	reqHeaders.Set("User-Agent", c.s.userAgent())
16296	if c.ifNoneMatch_ != "" {
16297		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16298	}
16299	var body io.Reader = nil
16300	c.urlParams_.Set("alt", alt)
16301	c.urlParams_.Set("prettyPrint", "false")
16302	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
16303	urls += "?" + c.urlParams_.Encode()
16304	req, err := http.NewRequest("GET", urls, body)
16305	if err != nil {
16306		return nil, err
16307	}
16308	req.Header = reqHeaders
16309	googleapi.Expand(req.URL, map[string]string{
16310		"parent": c.parent,
16311	})
16312	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16313}
16314
16315// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.list" call.
16316// Exactly one of *GoogleCloudDialogflowV2beta1ListDocumentsResponse or
16317// error will be non-nil. Any non-2xx status code is an error. Response
16318// headers are in either
16319// *GoogleCloudDialogflowV2beta1ListDocumentsResponse.ServerResponse.Head
16320// er or (if a response was returned at all) in
16321// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16322// whether the returned error was because http.StatusNotModified was
16323// returned.
16324func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListDocumentsResponse, error) {
16325	gensupport.SetOptions(c.urlParams_, opts...)
16326	res, err := c.doRequest("json")
16327	if res != nil && res.StatusCode == http.StatusNotModified {
16328		if res.Body != nil {
16329			res.Body.Close()
16330		}
16331		return nil, &googleapi.Error{
16332			Code:   res.StatusCode,
16333			Header: res.Header,
16334		}
16335	}
16336	if err != nil {
16337		return nil, err
16338	}
16339	defer googleapi.CloseBody(res)
16340	if err := googleapi.CheckResponse(res); err != nil {
16341		return nil, err
16342	}
16343	ret := &GoogleCloudDialogflowV2beta1ListDocumentsResponse{
16344		ServerResponse: googleapi.ServerResponse{
16345			Header:         res.Header,
16346			HTTPStatusCode: res.StatusCode,
16347		},
16348	}
16349	target := &ret
16350	if err := gensupport.DecodeResponse(target, res); err != nil {
16351		return nil, err
16352	}
16353	return ret, nil
16354	// {
16355	//   "description": "Returns the list of all documents of the knowledge base.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.",
16356	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents",
16357	//   "httpMethod": "GET",
16358	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.list",
16359	//   "parameterOrder": [
16360	//     "parent"
16361	//   ],
16362	//   "parameters": {
16363	//     "pageSize": {
16364	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
16365	//       "format": "int32",
16366	//       "location": "query",
16367	//       "type": "integer"
16368	//     },
16369	//     "pageToken": {
16370	//       "description": "Optional. The next_page_token value returned from a previous list request.",
16371	//       "location": "query",
16372	//       "type": "string"
16373	//     },
16374	//     "parent": {
16375	//       "description": "Required. The knowledge base to list all documents for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
16376	//       "location": "path",
16377	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
16378	//       "required": true,
16379	//       "type": "string"
16380	//     }
16381	//   },
16382	//   "path": "v2beta1/{+parent}/documents",
16383	//   "response": {
16384	//     "$ref": "GoogleCloudDialogflowV2beta1ListDocumentsResponse"
16385	//   },
16386	//   "scopes": [
16387	//     "https://www.googleapis.com/auth/cloud-platform",
16388	//     "https://www.googleapis.com/auth/dialogflow"
16389	//   ]
16390	// }
16391
16392}
16393
16394// Pages invokes f for each page of results.
16395// A non-nil error returned from f will halt the iteration.
16396// The provided context supersedes any context provided to the Context method.
16397func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListDocumentsResponse) error) error {
16398	c.ctx_ = ctx
16399	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16400	for {
16401		x, err := c.Do()
16402		if err != nil {
16403			return err
16404		}
16405		if err := f(x); err != nil {
16406			return err
16407		}
16408		if x.NextPageToken == "" {
16409			return nil
16410		}
16411		c.PageToken(x.NextPageToken)
16412	}
16413}
16414
16415// method id "dialogflow.projects.agent.knowledgeBases.documents.patch":
16416
16417type ProjectsAgentKnowledgeBasesDocumentsPatchCall struct {
16418	s                                    *Service
16419	name                                 string
16420	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
16421	urlParams_                           gensupport.URLParams
16422	ctx_                                 context.Context
16423	header_                              http.Header
16424}
16425
16426// Patch: Updates the specified document.
16427//
16428// Note: The `projects.agent.knowledgeBases.documents` resource is
16429// deprecated;
16430// only use `projects.knowledgeBases.documents`.
16431//
16432// Operation <response: Document,
16433//            metadata: KnowledgeOperationMetadata>
16434func (r *ProjectsAgentKnowledgeBasesDocumentsService) Patch(name string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
16435	c := &ProjectsAgentKnowledgeBasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16436	c.name = name
16437	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
16438	return c
16439}
16440
16441// UpdateMask sets the optional parameter "updateMask": Not specified
16442// means `update all`.
16443// Currently, only `display_name` can be updated, an InvalidArgument
16444// will be
16445// returned for attempting to update other fields.
16446func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
16447	c.urlParams_.Set("updateMask", updateMask)
16448	return c
16449}
16450
16451// Fields allows partial responses to be retrieved. See
16452// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16453// for more information.
16454func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
16455	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16456	return c
16457}
16458
16459// Context sets the context to be used in this call's Do method. Any
16460// pending HTTP request will be aborted if the provided context is
16461// canceled.
16462func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
16463	c.ctx_ = ctx
16464	return c
16465}
16466
16467// Header returns an http.Header that can be modified by the caller to
16468// add HTTP headers to the request.
16469func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Header() http.Header {
16470	if c.header_ == nil {
16471		c.header_ = make(http.Header)
16472	}
16473	return c.header_
16474}
16475
16476func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
16477	reqHeaders := make(http.Header)
16478	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16479	for k, v := range c.header_ {
16480		reqHeaders[k] = v
16481	}
16482	reqHeaders.Set("User-Agent", c.s.userAgent())
16483	var body io.Reader = nil
16484	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
16485	if err != nil {
16486		return nil, err
16487	}
16488	reqHeaders.Set("Content-Type", "application/json")
16489	c.urlParams_.Set("alt", alt)
16490	c.urlParams_.Set("prettyPrint", "false")
16491	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
16492	urls += "?" + c.urlParams_.Encode()
16493	req, err := http.NewRequest("PATCH", urls, body)
16494	if err != nil {
16495		return nil, err
16496	}
16497	req.Header = reqHeaders
16498	googleapi.Expand(req.URL, map[string]string{
16499		"name": c.name,
16500	})
16501	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16502}
16503
16504// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.patch" call.
16505// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
16506// Any non-2xx status code is an error. Response headers are in either
16507// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
16508// was returned at all) in error.(*googleapi.Error).Header. Use
16509// googleapi.IsNotModified to check whether the returned error was
16510// because http.StatusNotModified was returned.
16511func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
16512	gensupport.SetOptions(c.urlParams_, opts...)
16513	res, err := c.doRequest("json")
16514	if res != nil && res.StatusCode == http.StatusNotModified {
16515		if res.Body != nil {
16516			res.Body.Close()
16517		}
16518		return nil, &googleapi.Error{
16519			Code:   res.StatusCode,
16520			Header: res.Header,
16521		}
16522	}
16523	if err != nil {
16524		return nil, err
16525	}
16526	defer googleapi.CloseBody(res)
16527	if err := googleapi.CheckResponse(res); err != nil {
16528		return nil, err
16529	}
16530	ret := &GoogleLongrunningOperation{
16531		ServerResponse: googleapi.ServerResponse{
16532			Header:         res.Header,
16533			HTTPStatusCode: res.StatusCode,
16534		},
16535	}
16536	target := &ret
16537	if err := gensupport.DecodeResponse(target, res); err != nil {
16538		return nil, err
16539	}
16540	return ret, nil
16541	// {
16542	//   "description": "Updates the specified document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.\n\nOperation \u003cresponse: Document,\n           metadata: KnowledgeOperationMetadata\u003e",
16543	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
16544	//   "httpMethod": "PATCH",
16545	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.patch",
16546	//   "parameterOrder": [
16547	//     "name"
16548	//   ],
16549	//   "parameters": {
16550	//     "name": {
16551	//       "description": "The document resource name.\nThe name must be empty when creating a document.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
16552	//       "location": "path",
16553	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
16554	//       "required": true,
16555	//       "type": "string"
16556	//     },
16557	//     "updateMask": {
16558	//       "description": "Optional. Not specified means `update all`.\nCurrently, only `display_name` can be updated, an InvalidArgument will be\nreturned for attempting to update other fields.",
16559	//       "format": "google-fieldmask",
16560	//       "location": "query",
16561	//       "type": "string"
16562	//     }
16563	//   },
16564	//   "path": "v2beta1/{+name}",
16565	//   "request": {
16566	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
16567	//   },
16568	//   "response": {
16569	//     "$ref": "GoogleLongrunningOperation"
16570	//   },
16571	//   "scopes": [
16572	//     "https://www.googleapis.com/auth/cloud-platform",
16573	//     "https://www.googleapis.com/auth/dialogflow"
16574	//   ]
16575	// }
16576
16577}
16578
16579// method id "dialogflow.projects.agent.knowledgeBases.documents.reload":
16580
16581type ProjectsAgentKnowledgeBasesDocumentsReloadCall struct {
16582	s                                                 *Service
16583	name                                              string
16584	googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest
16585	urlParams_                                        gensupport.URLParams
16586	ctx_                                              context.Context
16587	header_                                           http.Header
16588}
16589
16590// Reload: Reloads the specified document from its specified source,
16591// content_uri or
16592// content. The previously loaded content of the document will be
16593// deleted.
16594// Note: Even when the content of the document has not changed, there
16595// still
16596// may be side effects because of internal implementation
16597// changes.
16598//
16599// Note: The `projects.agent.knowledgeBases.documents` resource is
16600// deprecated;
16601// only use `projects.knowledgeBases.documents`.
16602//
16603// Operation <response: Document,
16604//            metadata: KnowledgeOperationMetadata>
16605func (r *ProjectsAgentKnowledgeBasesDocumentsService) Reload(name string, googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
16606	c := &ProjectsAgentKnowledgeBasesDocumentsReloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16607	c.name = name
16608	c.googleclouddialogflowv2beta1reloaddocumentrequest = googleclouddialogflowv2beta1reloaddocumentrequest
16609	return c
16610}
16611
16612// Fields allows partial responses to be retrieved. See
16613// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16614// for more information.
16615func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
16616	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16617	return c
16618}
16619
16620// Context sets the context to be used in this call's Do method. Any
16621// pending HTTP request will be aborted if the provided context is
16622// canceled.
16623func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
16624	c.ctx_ = ctx
16625	return c
16626}
16627
16628// Header returns an http.Header that can be modified by the caller to
16629// add HTTP headers to the request.
16630func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Header() http.Header {
16631	if c.header_ == nil {
16632		c.header_ = make(http.Header)
16633	}
16634	return c.header_
16635}
16636
16637func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) doRequest(alt string) (*http.Response, error) {
16638	reqHeaders := make(http.Header)
16639	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16640	for k, v := range c.header_ {
16641		reqHeaders[k] = v
16642	}
16643	reqHeaders.Set("User-Agent", c.s.userAgent())
16644	var body io.Reader = nil
16645	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1reloaddocumentrequest)
16646	if err != nil {
16647		return nil, err
16648	}
16649	reqHeaders.Set("Content-Type", "application/json")
16650	c.urlParams_.Set("alt", alt)
16651	c.urlParams_.Set("prettyPrint", "false")
16652	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:reload")
16653	urls += "?" + c.urlParams_.Encode()
16654	req, err := http.NewRequest("POST", urls, body)
16655	if err != nil {
16656		return nil, err
16657	}
16658	req.Header = reqHeaders
16659	googleapi.Expand(req.URL, map[string]string{
16660		"name": c.name,
16661	})
16662	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16663}
16664
16665// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.reload" call.
16666// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
16667// Any non-2xx status code is an error. Response headers are in either
16668// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
16669// was returned at all) in error.(*googleapi.Error).Header. Use
16670// googleapi.IsNotModified to check whether the returned error was
16671// because http.StatusNotModified was returned.
16672func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
16673	gensupport.SetOptions(c.urlParams_, opts...)
16674	res, err := c.doRequest("json")
16675	if res != nil && res.StatusCode == http.StatusNotModified {
16676		if res.Body != nil {
16677			res.Body.Close()
16678		}
16679		return nil, &googleapi.Error{
16680			Code:   res.StatusCode,
16681			Header: res.Header,
16682		}
16683	}
16684	if err != nil {
16685		return nil, err
16686	}
16687	defer googleapi.CloseBody(res)
16688	if err := googleapi.CheckResponse(res); err != nil {
16689		return nil, err
16690	}
16691	ret := &GoogleLongrunningOperation{
16692		ServerResponse: googleapi.ServerResponse{
16693			Header:         res.Header,
16694			HTTPStatusCode: res.StatusCode,
16695		},
16696	}
16697	target := &ret
16698	if err := gensupport.DecodeResponse(target, res); err != nil {
16699		return nil, err
16700	}
16701	return ret, nil
16702	// {
16703	//   "description": "Reloads the specified document from its specified source, content_uri or\ncontent. The previously loaded content of the document will be deleted.\nNote: Even when the content of the document has not changed, there still\nmay be side effects because of internal implementation changes.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.\n\nOperation \u003cresponse: Document,\n           metadata: KnowledgeOperationMetadata\u003e",
16704	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload",
16705	//   "httpMethod": "POST",
16706	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.reload",
16707	//   "parameterOrder": [
16708	//     "name"
16709	//   ],
16710	//   "parameters": {
16711	//     "name": {
16712	//       "description": "The name of the document to reload.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`",
16713	//       "location": "path",
16714	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
16715	//       "required": true,
16716	//       "type": "string"
16717	//     }
16718	//   },
16719	//   "path": "v2beta1/{+name}:reload",
16720	//   "request": {
16721	//     "$ref": "GoogleCloudDialogflowV2beta1ReloadDocumentRequest"
16722	//   },
16723	//   "response": {
16724	//     "$ref": "GoogleLongrunningOperation"
16725	//   },
16726	//   "scopes": [
16727	//     "https://www.googleapis.com/auth/cloud-platform",
16728	//     "https://www.googleapis.com/auth/dialogflow"
16729	//   ]
16730	// }
16731
16732}
16733
16734// method id "dialogflow.projects.agent.sessions.deleteContexts":
16735
16736type ProjectsAgentSessionsDeleteContextsCall struct {
16737	s          *Service
16738	parent     string
16739	urlParams_ gensupport.URLParams
16740	ctx_       context.Context
16741	header_    http.Header
16742}
16743
16744// DeleteContexts: Deletes all active contexts in the specified session.
16745func (r *ProjectsAgentSessionsService) DeleteContexts(parent string) *ProjectsAgentSessionsDeleteContextsCall {
16746	c := &ProjectsAgentSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16747	c.parent = parent
16748	return c
16749}
16750
16751// Fields allows partial responses to be retrieved. See
16752// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16753// for more information.
16754func (c *ProjectsAgentSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDeleteContextsCall {
16755	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16756	return c
16757}
16758
16759// Context sets the context to be used in this call's Do method. Any
16760// pending HTTP request will be aborted if the provided context is
16761// canceled.
16762func (c *ProjectsAgentSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentSessionsDeleteContextsCall {
16763	c.ctx_ = ctx
16764	return c
16765}
16766
16767// Header returns an http.Header that can be modified by the caller to
16768// add HTTP headers to the request.
16769func (c *ProjectsAgentSessionsDeleteContextsCall) Header() http.Header {
16770	if c.header_ == nil {
16771		c.header_ = make(http.Header)
16772	}
16773	return c.header_
16774}
16775
16776func (c *ProjectsAgentSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
16777	reqHeaders := make(http.Header)
16778	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16779	for k, v := range c.header_ {
16780		reqHeaders[k] = v
16781	}
16782	reqHeaders.Set("User-Agent", c.s.userAgent())
16783	var body io.Reader = nil
16784	c.urlParams_.Set("alt", alt)
16785	c.urlParams_.Set("prettyPrint", "false")
16786	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
16787	urls += "?" + c.urlParams_.Encode()
16788	req, err := http.NewRequest("DELETE", urls, body)
16789	if err != nil {
16790		return nil, err
16791	}
16792	req.Header = reqHeaders
16793	googleapi.Expand(req.URL, map[string]string{
16794		"parent": c.parent,
16795	})
16796	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16797}
16798
16799// Do executes the "dialogflow.projects.agent.sessions.deleteContexts" call.
16800// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
16801// non-2xx status code is an error. Response headers are in either
16802// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
16803// returned at all) in error.(*googleapi.Error).Header. Use
16804// googleapi.IsNotModified to check whether the returned error was
16805// because http.StatusNotModified was returned.
16806func (c *ProjectsAgentSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
16807	gensupport.SetOptions(c.urlParams_, opts...)
16808	res, err := c.doRequest("json")
16809	if res != nil && res.StatusCode == http.StatusNotModified {
16810		if res.Body != nil {
16811			res.Body.Close()
16812		}
16813		return nil, &googleapi.Error{
16814			Code:   res.StatusCode,
16815			Header: res.Header,
16816		}
16817	}
16818	if err != nil {
16819		return nil, err
16820	}
16821	defer googleapi.CloseBody(res)
16822	if err := googleapi.CheckResponse(res); err != nil {
16823		return nil, err
16824	}
16825	ret := &GoogleProtobufEmpty{
16826		ServerResponse: googleapi.ServerResponse{
16827			Header:         res.Header,
16828			HTTPStatusCode: res.StatusCode,
16829		},
16830	}
16831	target := &ret
16832	if err := gensupport.DecodeResponse(target, res); err != nil {
16833		return nil, err
16834	}
16835	return ret, nil
16836	// {
16837	//   "description": "Deletes all active contexts in the specified session.",
16838	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
16839	//   "httpMethod": "DELETE",
16840	//   "id": "dialogflow.projects.agent.sessions.deleteContexts",
16841	//   "parameterOrder": [
16842	//     "parent"
16843	//   ],
16844	//   "parameters": {
16845	//     "parent": {
16846	//       "description": "Required. The name of the session to delete all contexts from. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or `projects/\u003cProject\nID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession\nID\u003e`. If `Environment ID` is not specified we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
16847	//       "location": "path",
16848	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
16849	//       "required": true,
16850	//       "type": "string"
16851	//     }
16852	//   },
16853	//   "path": "v2beta1/{+parent}/contexts",
16854	//   "response": {
16855	//     "$ref": "GoogleProtobufEmpty"
16856	//   },
16857	//   "scopes": [
16858	//     "https://www.googleapis.com/auth/cloud-platform",
16859	//     "https://www.googleapis.com/auth/dialogflow"
16860	//   ]
16861	// }
16862
16863}
16864
16865// method id "dialogflow.projects.agent.sessions.detectIntent":
16866
16867type ProjectsAgentSessionsDetectIntentCall struct {
16868	s                                               *Service
16869	sessionid                                       string
16870	googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest
16871	urlParams_                                      gensupport.URLParams
16872	ctx_                                            context.Context
16873	header_                                         http.Header
16874}
16875
16876// DetectIntent: Processes a natural language query and returns
16877// structured, actionable data
16878// as a result. This method is not idempotent, because it may cause
16879// contexts
16880// and session entity types to be updated, which in turn might
16881// affect
16882// results of future queries.
16883func (r *ProjectsAgentSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest) *ProjectsAgentSessionsDetectIntentCall {
16884	c := &ProjectsAgentSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16885	c.sessionid = sessionid
16886	c.googleclouddialogflowv2beta1detectintentrequest = googleclouddialogflowv2beta1detectintentrequest
16887	return c
16888}
16889
16890// Fields allows partial responses to be retrieved. See
16891// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16892// for more information.
16893func (c *ProjectsAgentSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDetectIntentCall {
16894	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16895	return c
16896}
16897
16898// Context sets the context to be used in this call's Do method. Any
16899// pending HTTP request will be aborted if the provided context is
16900// canceled.
16901func (c *ProjectsAgentSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentSessionsDetectIntentCall {
16902	c.ctx_ = ctx
16903	return c
16904}
16905
16906// Header returns an http.Header that can be modified by the caller to
16907// add HTTP headers to the request.
16908func (c *ProjectsAgentSessionsDetectIntentCall) Header() http.Header {
16909	if c.header_ == nil {
16910		c.header_ = make(http.Header)
16911	}
16912	return c.header_
16913}
16914
16915func (c *ProjectsAgentSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
16916	reqHeaders := make(http.Header)
16917	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16918	for k, v := range c.header_ {
16919		reqHeaders[k] = v
16920	}
16921	reqHeaders.Set("User-Agent", c.s.userAgent())
16922	var body io.Reader = nil
16923	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1detectintentrequest)
16924	if err != nil {
16925		return nil, err
16926	}
16927	reqHeaders.Set("Content-Type", "application/json")
16928	c.urlParams_.Set("alt", alt)
16929	c.urlParams_.Set("prettyPrint", "false")
16930	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+session}:detectIntent")
16931	urls += "?" + c.urlParams_.Encode()
16932	req, err := http.NewRequest("POST", urls, body)
16933	if err != nil {
16934		return nil, err
16935	}
16936	req.Header = reqHeaders
16937	googleapi.Expand(req.URL, map[string]string{
16938		"session": c.sessionid,
16939	})
16940	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16941}
16942
16943// Do executes the "dialogflow.projects.agent.sessions.detectIntent" call.
16944// Exactly one of *GoogleCloudDialogflowV2beta1DetectIntentResponse or
16945// error will be non-nil. Any non-2xx status code is an error. Response
16946// headers are in either
16947// *GoogleCloudDialogflowV2beta1DetectIntentResponse.ServerResponse.Heade
16948// r or (if a response was returned at all) in
16949// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16950// whether the returned error was because http.StatusNotModified was
16951// returned.
16952func (c *ProjectsAgentSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1DetectIntentResponse, error) {
16953	gensupport.SetOptions(c.urlParams_, opts...)
16954	res, err := c.doRequest("json")
16955	if res != nil && res.StatusCode == http.StatusNotModified {
16956		if res.Body != nil {
16957			res.Body.Close()
16958		}
16959		return nil, &googleapi.Error{
16960			Code:   res.StatusCode,
16961			Header: res.Header,
16962		}
16963	}
16964	if err != nil {
16965		return nil, err
16966	}
16967	defer googleapi.CloseBody(res)
16968	if err := googleapi.CheckResponse(res); err != nil {
16969		return nil, err
16970	}
16971	ret := &GoogleCloudDialogflowV2beta1DetectIntentResponse{
16972		ServerResponse: googleapi.ServerResponse{
16973			Header:         res.Header,
16974			HTTPStatusCode: res.StatusCode,
16975		},
16976	}
16977	target := &ret
16978	if err := gensupport.DecodeResponse(target, res); err != nil {
16979		return nil, err
16980	}
16981	return ret, nil
16982	// {
16983	//   "description": "Processes a natural language query and returns structured, actionable data\nas a result. This method is not idempotent, because it may cause contexts\nand session entity types to be updated, which in turn might affect\nresults of future queries.",
16984	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}:detectIntent",
16985	//   "httpMethod": "POST",
16986	//   "id": "dialogflow.projects.agent.sessions.detectIntent",
16987	//   "parameterOrder": [
16988	//     "session"
16989	//   ],
16990	//   "parameters": {
16991	//     "session": {
16992	//       "description": "Required. The name of the session this query is sent to. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`, or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we are using\n\"-\". It's up to the API caller to choose an appropriate `Session ID` and\n`User Id`. They can be a random number or some type of user and session\nidentifiers (preferably hashed). The length of the `Session ID` and\n`User ID` must not exceed 36 characters.",
16993	//       "location": "path",
16994	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
16995	//       "required": true,
16996	//       "type": "string"
16997	//     }
16998	//   },
16999	//   "path": "v2beta1/{+session}:detectIntent",
17000	//   "request": {
17001	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest"
17002	//   },
17003	//   "response": {
17004	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse"
17005	//   },
17006	//   "scopes": [
17007	//     "https://www.googleapis.com/auth/cloud-platform",
17008	//     "https://www.googleapis.com/auth/dialogflow"
17009	//   ]
17010	// }
17011
17012}
17013
17014// method id "dialogflow.projects.agent.sessions.contexts.create":
17015
17016type ProjectsAgentSessionsContextsCreateCall struct {
17017	s                                   *Service
17018	parent                              string
17019	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
17020	urlParams_                          gensupport.URLParams
17021	ctx_                                context.Context
17022	header_                             http.Header
17023}
17024
17025// Create: Creates a context.
17026//
17027// If the specified context already exists, overrides the context.
17028func (r *ProjectsAgentSessionsContextsService) Create(parent string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentSessionsContextsCreateCall {
17029	c := &ProjectsAgentSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17030	c.parent = parent
17031	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
17032	return c
17033}
17034
17035// Fields allows partial responses to be retrieved. See
17036// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17037// for more information.
17038func (c *ProjectsAgentSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsCreateCall {
17039	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17040	return c
17041}
17042
17043// Context sets the context to be used in this call's Do method. Any
17044// pending HTTP request will be aborted if the provided context is
17045// canceled.
17046func (c *ProjectsAgentSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsCreateCall {
17047	c.ctx_ = ctx
17048	return c
17049}
17050
17051// Header returns an http.Header that can be modified by the caller to
17052// add HTTP headers to the request.
17053func (c *ProjectsAgentSessionsContextsCreateCall) Header() http.Header {
17054	if c.header_ == nil {
17055		c.header_ = make(http.Header)
17056	}
17057	return c.header_
17058}
17059
17060func (c *ProjectsAgentSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
17061	reqHeaders := make(http.Header)
17062	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17063	for k, v := range c.header_ {
17064		reqHeaders[k] = v
17065	}
17066	reqHeaders.Set("User-Agent", c.s.userAgent())
17067	var body io.Reader = nil
17068	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
17069	if err != nil {
17070		return nil, err
17071	}
17072	reqHeaders.Set("Content-Type", "application/json")
17073	c.urlParams_.Set("alt", alt)
17074	c.urlParams_.Set("prettyPrint", "false")
17075	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
17076	urls += "?" + c.urlParams_.Encode()
17077	req, err := http.NewRequest("POST", urls, body)
17078	if err != nil {
17079		return nil, err
17080	}
17081	req.Header = reqHeaders
17082	googleapi.Expand(req.URL, map[string]string{
17083		"parent": c.parent,
17084	})
17085	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17086}
17087
17088// Do executes the "dialogflow.projects.agent.sessions.contexts.create" call.
17089// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
17090// non-nil. Any non-2xx status code is an error. Response headers are in
17091// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
17092// (if a response was returned at all) in
17093// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17094// whether the returned error was because http.StatusNotModified was
17095// returned.
17096func (c *ProjectsAgentSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
17097	gensupport.SetOptions(c.urlParams_, opts...)
17098	res, err := c.doRequest("json")
17099	if res != nil && res.StatusCode == http.StatusNotModified {
17100		if res.Body != nil {
17101			res.Body.Close()
17102		}
17103		return nil, &googleapi.Error{
17104			Code:   res.StatusCode,
17105			Header: res.Header,
17106		}
17107	}
17108	if err != nil {
17109		return nil, err
17110	}
17111	defer googleapi.CloseBody(res)
17112	if err := googleapi.CheckResponse(res); err != nil {
17113		return nil, err
17114	}
17115	ret := &GoogleCloudDialogflowV2beta1Context{
17116		ServerResponse: googleapi.ServerResponse{
17117			Header:         res.Header,
17118			HTTPStatusCode: res.StatusCode,
17119		},
17120	}
17121	target := &ret
17122	if err := gensupport.DecodeResponse(target, res); err != nil {
17123		return nil, err
17124	}
17125	return ret, nil
17126	// {
17127	//   "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.",
17128	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
17129	//   "httpMethod": "POST",
17130	//   "id": "dialogflow.projects.agent.sessions.contexts.create",
17131	//   "parameterOrder": [
17132	//     "parent"
17133	//   ],
17134	//   "parameters": {
17135	//     "parent": {
17136	//       "description": "Required. The session to create a context for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
17137	//       "location": "path",
17138	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
17139	//       "required": true,
17140	//       "type": "string"
17141	//     }
17142	//   },
17143	//   "path": "v2beta1/{+parent}/contexts",
17144	//   "request": {
17145	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
17146	//   },
17147	//   "response": {
17148	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
17149	//   },
17150	//   "scopes": [
17151	//     "https://www.googleapis.com/auth/cloud-platform",
17152	//     "https://www.googleapis.com/auth/dialogflow"
17153	//   ]
17154	// }
17155
17156}
17157
17158// method id "dialogflow.projects.agent.sessions.contexts.delete":
17159
17160type ProjectsAgentSessionsContextsDeleteCall struct {
17161	s          *Service
17162	name       string
17163	urlParams_ gensupport.URLParams
17164	ctx_       context.Context
17165	header_    http.Header
17166}
17167
17168// Delete: Deletes the specified context.
17169func (r *ProjectsAgentSessionsContextsService) Delete(name string) *ProjectsAgentSessionsContextsDeleteCall {
17170	c := &ProjectsAgentSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17171	c.name = name
17172	return c
17173}
17174
17175// Fields allows partial responses to be retrieved. See
17176// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17177// for more information.
17178func (c *ProjectsAgentSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsDeleteCall {
17179	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17180	return c
17181}
17182
17183// Context sets the context to be used in this call's Do method. Any
17184// pending HTTP request will be aborted if the provided context is
17185// canceled.
17186func (c *ProjectsAgentSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsDeleteCall {
17187	c.ctx_ = ctx
17188	return c
17189}
17190
17191// Header returns an http.Header that can be modified by the caller to
17192// add HTTP headers to the request.
17193func (c *ProjectsAgentSessionsContextsDeleteCall) Header() http.Header {
17194	if c.header_ == nil {
17195		c.header_ = make(http.Header)
17196	}
17197	return c.header_
17198}
17199
17200func (c *ProjectsAgentSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
17201	reqHeaders := make(http.Header)
17202	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17203	for k, v := range c.header_ {
17204		reqHeaders[k] = v
17205	}
17206	reqHeaders.Set("User-Agent", c.s.userAgent())
17207	var body io.Reader = nil
17208	c.urlParams_.Set("alt", alt)
17209	c.urlParams_.Set("prettyPrint", "false")
17210	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17211	urls += "?" + c.urlParams_.Encode()
17212	req, err := http.NewRequest("DELETE", urls, body)
17213	if err != nil {
17214		return nil, err
17215	}
17216	req.Header = reqHeaders
17217	googleapi.Expand(req.URL, map[string]string{
17218		"name": c.name,
17219	})
17220	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17221}
17222
17223// Do executes the "dialogflow.projects.agent.sessions.contexts.delete" call.
17224// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
17225// non-2xx status code is an error. Response headers are in either
17226// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
17227// returned at all) in error.(*googleapi.Error).Header. Use
17228// googleapi.IsNotModified to check whether the returned error was
17229// because http.StatusNotModified was returned.
17230func (c *ProjectsAgentSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
17231	gensupport.SetOptions(c.urlParams_, opts...)
17232	res, err := c.doRequest("json")
17233	if res != nil && res.StatusCode == http.StatusNotModified {
17234		if res.Body != nil {
17235			res.Body.Close()
17236		}
17237		return nil, &googleapi.Error{
17238			Code:   res.StatusCode,
17239			Header: res.Header,
17240		}
17241	}
17242	if err != nil {
17243		return nil, err
17244	}
17245	defer googleapi.CloseBody(res)
17246	if err := googleapi.CheckResponse(res); err != nil {
17247		return nil, err
17248	}
17249	ret := &GoogleProtobufEmpty{
17250		ServerResponse: googleapi.ServerResponse{
17251			Header:         res.Header,
17252			HTTPStatusCode: res.StatusCode,
17253		},
17254	}
17255	target := &ret
17256	if err := gensupport.DecodeResponse(target, res); err != nil {
17257		return nil, err
17258	}
17259	return ret, nil
17260	// {
17261	//   "description": "Deletes the specified context.",
17262	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
17263	//   "httpMethod": "DELETE",
17264	//   "id": "dialogflow.projects.agent.sessions.contexts.delete",
17265	//   "parameterOrder": [
17266	//     "name"
17267	//   ],
17268	//   "parameters": {
17269	//     "name": {
17270	//       "description": "Required. The name of the context to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`. If `Environment ID` is\nnot specified, we assume default 'draft' environment. If `User ID` is not\nspecified, we assume default '-' user.",
17271	//       "location": "path",
17272	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
17273	//       "required": true,
17274	//       "type": "string"
17275	//     }
17276	//   },
17277	//   "path": "v2beta1/{+name}",
17278	//   "response": {
17279	//     "$ref": "GoogleProtobufEmpty"
17280	//   },
17281	//   "scopes": [
17282	//     "https://www.googleapis.com/auth/cloud-platform",
17283	//     "https://www.googleapis.com/auth/dialogflow"
17284	//   ]
17285	// }
17286
17287}
17288
17289// method id "dialogflow.projects.agent.sessions.contexts.get":
17290
17291type ProjectsAgentSessionsContextsGetCall struct {
17292	s            *Service
17293	name         string
17294	urlParams_   gensupport.URLParams
17295	ifNoneMatch_ string
17296	ctx_         context.Context
17297	header_      http.Header
17298}
17299
17300// Get: Retrieves the specified context.
17301func (r *ProjectsAgentSessionsContextsService) Get(name string) *ProjectsAgentSessionsContextsGetCall {
17302	c := &ProjectsAgentSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17303	c.name = name
17304	return c
17305}
17306
17307// Fields allows partial responses to be retrieved. See
17308// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17309// for more information.
17310func (c *ProjectsAgentSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsGetCall {
17311	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17312	return c
17313}
17314
17315// IfNoneMatch sets the optional parameter which makes the operation
17316// fail if the object's ETag matches the given value. This is useful for
17317// getting updates only after the object has changed since the last
17318// request. Use googleapi.IsNotModified to check whether the response
17319// error from Do is the result of In-None-Match.
17320func (c *ProjectsAgentSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsGetCall {
17321	c.ifNoneMatch_ = entityTag
17322	return c
17323}
17324
17325// Context sets the context to be used in this call's Do method. Any
17326// pending HTTP request will be aborted if the provided context is
17327// canceled.
17328func (c *ProjectsAgentSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsGetCall {
17329	c.ctx_ = ctx
17330	return c
17331}
17332
17333// Header returns an http.Header that can be modified by the caller to
17334// add HTTP headers to the request.
17335func (c *ProjectsAgentSessionsContextsGetCall) Header() http.Header {
17336	if c.header_ == nil {
17337		c.header_ = make(http.Header)
17338	}
17339	return c.header_
17340}
17341
17342func (c *ProjectsAgentSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
17343	reqHeaders := make(http.Header)
17344	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17345	for k, v := range c.header_ {
17346		reqHeaders[k] = v
17347	}
17348	reqHeaders.Set("User-Agent", c.s.userAgent())
17349	if c.ifNoneMatch_ != "" {
17350		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17351	}
17352	var body io.Reader = nil
17353	c.urlParams_.Set("alt", alt)
17354	c.urlParams_.Set("prettyPrint", "false")
17355	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17356	urls += "?" + c.urlParams_.Encode()
17357	req, err := http.NewRequest("GET", urls, body)
17358	if err != nil {
17359		return nil, err
17360	}
17361	req.Header = reqHeaders
17362	googleapi.Expand(req.URL, map[string]string{
17363		"name": c.name,
17364	})
17365	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17366}
17367
17368// Do executes the "dialogflow.projects.agent.sessions.contexts.get" call.
17369// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
17370// non-nil. Any non-2xx status code is an error. Response headers are in
17371// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
17372// (if a response was returned at all) in
17373// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17374// whether the returned error was because http.StatusNotModified was
17375// returned.
17376func (c *ProjectsAgentSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
17377	gensupport.SetOptions(c.urlParams_, opts...)
17378	res, err := c.doRequest("json")
17379	if res != nil && res.StatusCode == http.StatusNotModified {
17380		if res.Body != nil {
17381			res.Body.Close()
17382		}
17383		return nil, &googleapi.Error{
17384			Code:   res.StatusCode,
17385			Header: res.Header,
17386		}
17387	}
17388	if err != nil {
17389		return nil, err
17390	}
17391	defer googleapi.CloseBody(res)
17392	if err := googleapi.CheckResponse(res); err != nil {
17393		return nil, err
17394	}
17395	ret := &GoogleCloudDialogflowV2beta1Context{
17396		ServerResponse: googleapi.ServerResponse{
17397			Header:         res.Header,
17398			HTTPStatusCode: res.StatusCode,
17399		},
17400	}
17401	target := &ret
17402	if err := gensupport.DecodeResponse(target, res); err != nil {
17403		return nil, err
17404	}
17405	return ret, nil
17406	// {
17407	//   "description": "Retrieves the specified context.",
17408	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
17409	//   "httpMethod": "GET",
17410	//   "id": "dialogflow.projects.agent.sessions.contexts.get",
17411	//   "parameterOrder": [
17412	//     "name"
17413	//   ],
17414	//   "parameters": {
17415	//     "name": {
17416	//       "description": "Required. The name of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`. If `Environment ID` is\nnot specified, we assume default 'draft' environment. If `User ID` is not\nspecified, we assume default '-' user.",
17417	//       "location": "path",
17418	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
17419	//       "required": true,
17420	//       "type": "string"
17421	//     }
17422	//   },
17423	//   "path": "v2beta1/{+name}",
17424	//   "response": {
17425	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
17426	//   },
17427	//   "scopes": [
17428	//     "https://www.googleapis.com/auth/cloud-platform",
17429	//     "https://www.googleapis.com/auth/dialogflow"
17430	//   ]
17431	// }
17432
17433}
17434
17435// method id "dialogflow.projects.agent.sessions.contexts.list":
17436
17437type ProjectsAgentSessionsContextsListCall struct {
17438	s            *Service
17439	parent       string
17440	urlParams_   gensupport.URLParams
17441	ifNoneMatch_ string
17442	ctx_         context.Context
17443	header_      http.Header
17444}
17445
17446// List: Returns the list of all contexts in the specified session.
17447func (r *ProjectsAgentSessionsContextsService) List(parent string) *ProjectsAgentSessionsContextsListCall {
17448	c := &ProjectsAgentSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17449	c.parent = parent
17450	return c
17451}
17452
17453// PageSize sets the optional parameter "pageSize": The maximum number
17454// of items to return in a single page. By
17455// default 100 and at most 1000.
17456func (c *ProjectsAgentSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentSessionsContextsListCall {
17457	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17458	return c
17459}
17460
17461// PageToken sets the optional parameter "pageToken": The
17462// next_page_token value returned from a previous list request.
17463func (c *ProjectsAgentSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentSessionsContextsListCall {
17464	c.urlParams_.Set("pageToken", pageToken)
17465	return c
17466}
17467
17468// Fields allows partial responses to be retrieved. See
17469// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17470// for more information.
17471func (c *ProjectsAgentSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsListCall {
17472	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17473	return c
17474}
17475
17476// IfNoneMatch sets the optional parameter which makes the operation
17477// fail if the object's ETag matches the given value. This is useful for
17478// getting updates only after the object has changed since the last
17479// request. Use googleapi.IsNotModified to check whether the response
17480// error from Do is the result of In-None-Match.
17481func (c *ProjectsAgentSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsListCall {
17482	c.ifNoneMatch_ = entityTag
17483	return c
17484}
17485
17486// Context sets the context to be used in this call's Do method. Any
17487// pending HTTP request will be aborted if the provided context is
17488// canceled.
17489func (c *ProjectsAgentSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsListCall {
17490	c.ctx_ = ctx
17491	return c
17492}
17493
17494// Header returns an http.Header that can be modified by the caller to
17495// add HTTP headers to the request.
17496func (c *ProjectsAgentSessionsContextsListCall) Header() http.Header {
17497	if c.header_ == nil {
17498		c.header_ = make(http.Header)
17499	}
17500	return c.header_
17501}
17502
17503func (c *ProjectsAgentSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
17504	reqHeaders := make(http.Header)
17505	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17506	for k, v := range c.header_ {
17507		reqHeaders[k] = v
17508	}
17509	reqHeaders.Set("User-Agent", c.s.userAgent())
17510	if c.ifNoneMatch_ != "" {
17511		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17512	}
17513	var body io.Reader = nil
17514	c.urlParams_.Set("alt", alt)
17515	c.urlParams_.Set("prettyPrint", "false")
17516	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
17517	urls += "?" + c.urlParams_.Encode()
17518	req, err := http.NewRequest("GET", urls, body)
17519	if err != nil {
17520		return nil, err
17521	}
17522	req.Header = reqHeaders
17523	googleapi.Expand(req.URL, map[string]string{
17524		"parent": c.parent,
17525	})
17526	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17527}
17528
17529// Do executes the "dialogflow.projects.agent.sessions.contexts.list" call.
17530// Exactly one of *GoogleCloudDialogflowV2beta1ListContextsResponse or
17531// error will be non-nil. Any non-2xx status code is an error. Response
17532// headers are in either
17533// *GoogleCloudDialogflowV2beta1ListContextsResponse.ServerResponse.Heade
17534// r or (if a response was returned at all) in
17535// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17536// whether the returned error was because http.StatusNotModified was
17537// returned.
17538func (c *ProjectsAgentSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListContextsResponse, error) {
17539	gensupport.SetOptions(c.urlParams_, opts...)
17540	res, err := c.doRequest("json")
17541	if res != nil && res.StatusCode == http.StatusNotModified {
17542		if res.Body != nil {
17543			res.Body.Close()
17544		}
17545		return nil, &googleapi.Error{
17546			Code:   res.StatusCode,
17547			Header: res.Header,
17548		}
17549	}
17550	if err != nil {
17551		return nil, err
17552	}
17553	defer googleapi.CloseBody(res)
17554	if err := googleapi.CheckResponse(res); err != nil {
17555		return nil, err
17556	}
17557	ret := &GoogleCloudDialogflowV2beta1ListContextsResponse{
17558		ServerResponse: googleapi.ServerResponse{
17559			Header:         res.Header,
17560			HTTPStatusCode: res.StatusCode,
17561		},
17562	}
17563	target := &ret
17564	if err := gensupport.DecodeResponse(target, res); err != nil {
17565		return nil, err
17566	}
17567	return ret, nil
17568	// {
17569	//   "description": "Returns the list of all contexts in the specified session.",
17570	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
17571	//   "httpMethod": "GET",
17572	//   "id": "dialogflow.projects.agent.sessions.contexts.list",
17573	//   "parameterOrder": [
17574	//     "parent"
17575	//   ],
17576	//   "parameters": {
17577	//     "pageSize": {
17578	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
17579	//       "format": "int32",
17580	//       "location": "query",
17581	//       "type": "integer"
17582	//     },
17583	//     "pageToken": {
17584	//       "description": "Optional. The next_page_token value returned from a previous list request.",
17585	//       "location": "query",
17586	//       "type": "string"
17587	//     },
17588	//     "parent": {
17589	//       "description": "Required. The session to list all contexts from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
17590	//       "location": "path",
17591	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
17592	//       "required": true,
17593	//       "type": "string"
17594	//     }
17595	//   },
17596	//   "path": "v2beta1/{+parent}/contexts",
17597	//   "response": {
17598	//     "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse"
17599	//   },
17600	//   "scopes": [
17601	//     "https://www.googleapis.com/auth/cloud-platform",
17602	//     "https://www.googleapis.com/auth/dialogflow"
17603	//   ]
17604	// }
17605
17606}
17607
17608// Pages invokes f for each page of results.
17609// A non-nil error returned from f will halt the iteration.
17610// The provided context supersedes any context provided to the Context method.
17611func (c *ProjectsAgentSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListContextsResponse) error) error {
17612	c.ctx_ = ctx
17613	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17614	for {
17615		x, err := c.Do()
17616		if err != nil {
17617			return err
17618		}
17619		if err := f(x); err != nil {
17620			return err
17621		}
17622		if x.NextPageToken == "" {
17623			return nil
17624		}
17625		c.PageToken(x.NextPageToken)
17626	}
17627}
17628
17629// method id "dialogflow.projects.agent.sessions.contexts.patch":
17630
17631type ProjectsAgentSessionsContextsPatchCall struct {
17632	s                                   *Service
17633	nameid                              string
17634	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
17635	urlParams_                          gensupport.URLParams
17636	ctx_                                context.Context
17637	header_                             http.Header
17638}
17639
17640// Patch: Updates the specified context.
17641func (r *ProjectsAgentSessionsContextsService) Patch(nameid string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentSessionsContextsPatchCall {
17642	c := &ProjectsAgentSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17643	c.nameid = nameid
17644	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
17645	return c
17646}
17647
17648// UpdateMask sets the optional parameter "updateMask": The mask to
17649// control which fields get updated.
17650func (c *ProjectsAgentSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsContextsPatchCall {
17651	c.urlParams_.Set("updateMask", updateMask)
17652	return c
17653}
17654
17655// Fields allows partial responses to be retrieved. See
17656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17657// for more information.
17658func (c *ProjectsAgentSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsPatchCall {
17659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17660	return c
17661}
17662
17663// Context sets the context to be used in this call's Do method. Any
17664// pending HTTP request will be aborted if the provided context is
17665// canceled.
17666func (c *ProjectsAgentSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsPatchCall {
17667	c.ctx_ = ctx
17668	return c
17669}
17670
17671// Header returns an http.Header that can be modified by the caller to
17672// add HTTP headers to the request.
17673func (c *ProjectsAgentSessionsContextsPatchCall) Header() http.Header {
17674	if c.header_ == nil {
17675		c.header_ = make(http.Header)
17676	}
17677	return c.header_
17678}
17679
17680func (c *ProjectsAgentSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
17681	reqHeaders := make(http.Header)
17682	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17683	for k, v := range c.header_ {
17684		reqHeaders[k] = v
17685	}
17686	reqHeaders.Set("User-Agent", c.s.userAgent())
17687	var body io.Reader = nil
17688	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
17689	if err != nil {
17690		return nil, err
17691	}
17692	reqHeaders.Set("Content-Type", "application/json")
17693	c.urlParams_.Set("alt", alt)
17694	c.urlParams_.Set("prettyPrint", "false")
17695	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17696	urls += "?" + c.urlParams_.Encode()
17697	req, err := http.NewRequest("PATCH", urls, body)
17698	if err != nil {
17699		return nil, err
17700	}
17701	req.Header = reqHeaders
17702	googleapi.Expand(req.URL, map[string]string{
17703		"name": c.nameid,
17704	})
17705	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17706}
17707
17708// Do executes the "dialogflow.projects.agent.sessions.contexts.patch" call.
17709// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
17710// non-nil. Any non-2xx status code is an error. Response headers are in
17711// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
17712// (if a response was returned at all) in
17713// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17714// whether the returned error was because http.StatusNotModified was
17715// returned.
17716func (c *ProjectsAgentSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
17717	gensupport.SetOptions(c.urlParams_, opts...)
17718	res, err := c.doRequest("json")
17719	if res != nil && res.StatusCode == http.StatusNotModified {
17720		if res.Body != nil {
17721			res.Body.Close()
17722		}
17723		return nil, &googleapi.Error{
17724			Code:   res.StatusCode,
17725			Header: res.Header,
17726		}
17727	}
17728	if err != nil {
17729		return nil, err
17730	}
17731	defer googleapi.CloseBody(res)
17732	if err := googleapi.CheckResponse(res); err != nil {
17733		return nil, err
17734	}
17735	ret := &GoogleCloudDialogflowV2beta1Context{
17736		ServerResponse: googleapi.ServerResponse{
17737			Header:         res.Header,
17738			HTTPStatusCode: res.StatusCode,
17739		},
17740	}
17741	target := &ret
17742	if err := gensupport.DecodeResponse(target, res); err != nil {
17743		return nil, err
17744	}
17745	return ret, nil
17746	// {
17747	//   "description": "Updates the specified context.",
17748	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
17749	//   "httpMethod": "PATCH",
17750	//   "id": "dialogflow.projects.agent.sessions.contexts.patch",
17751	//   "parameterOrder": [
17752	//     "name"
17753	//   ],
17754	//   "parameters": {
17755	//     "name": {
17756	//       "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`,\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\n\nThe `Context ID` is always converted to lowercase, may only contain\ncharacters in a-zA-Z0-9_-% and may be at most 250 bytes long.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
17757	//       "location": "path",
17758	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
17759	//       "required": true,
17760	//       "type": "string"
17761	//     },
17762	//     "updateMask": {
17763	//       "description": "Optional. The mask to control which fields get updated.",
17764	//       "format": "google-fieldmask",
17765	//       "location": "query",
17766	//       "type": "string"
17767	//     }
17768	//   },
17769	//   "path": "v2beta1/{+name}",
17770	//   "request": {
17771	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
17772	//   },
17773	//   "response": {
17774	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
17775	//   },
17776	//   "scopes": [
17777	//     "https://www.googleapis.com/auth/cloud-platform",
17778	//     "https://www.googleapis.com/auth/dialogflow"
17779	//   ]
17780	// }
17781
17782}
17783
17784// method id "dialogflow.projects.agent.sessions.entityTypes.create":
17785
17786type ProjectsAgentSessionsEntityTypesCreateCall struct {
17787	s                                             *Service
17788	parent                                        string
17789	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
17790	urlParams_                                    gensupport.URLParams
17791	ctx_                                          context.Context
17792	header_                                       http.Header
17793}
17794
17795// Create: Creates a session entity type.
17796//
17797// If the specified session entity type already exists, overrides
17798// the
17799// session entity type.
17800//
17801// This method doesn't work with Google Assistant integration.
17802// Contact Dialogflow support if you need to use session entities
17803// with Google Assistant integration.
17804func (r *ProjectsAgentSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentSessionsEntityTypesCreateCall {
17805	c := &ProjectsAgentSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17806	c.parent = parent
17807	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
17808	return c
17809}
17810
17811// Fields allows partial responses to be retrieved. See
17812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17813// for more information.
17814func (c *ProjectsAgentSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesCreateCall {
17815	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17816	return c
17817}
17818
17819// Context sets the context to be used in this call's Do method. Any
17820// pending HTTP request will be aborted if the provided context is
17821// canceled.
17822func (c *ProjectsAgentSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesCreateCall {
17823	c.ctx_ = ctx
17824	return c
17825}
17826
17827// Header returns an http.Header that can be modified by the caller to
17828// add HTTP headers to the request.
17829func (c *ProjectsAgentSessionsEntityTypesCreateCall) Header() http.Header {
17830	if c.header_ == nil {
17831		c.header_ = make(http.Header)
17832	}
17833	return c.header_
17834}
17835
17836func (c *ProjectsAgentSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
17837	reqHeaders := make(http.Header)
17838	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17839	for k, v := range c.header_ {
17840		reqHeaders[k] = v
17841	}
17842	reqHeaders.Set("User-Agent", c.s.userAgent())
17843	var body io.Reader = nil
17844	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
17845	if err != nil {
17846		return nil, err
17847	}
17848	reqHeaders.Set("Content-Type", "application/json")
17849	c.urlParams_.Set("alt", alt)
17850	c.urlParams_.Set("prettyPrint", "false")
17851	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
17852	urls += "?" + c.urlParams_.Encode()
17853	req, err := http.NewRequest("POST", urls, body)
17854	if err != nil {
17855		return nil, err
17856	}
17857	req.Header = reqHeaders
17858	googleapi.Expand(req.URL, map[string]string{
17859		"parent": c.parent,
17860	})
17861	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17862}
17863
17864// Do executes the "dialogflow.projects.agent.sessions.entityTypes.create" call.
17865// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
17866// error will be non-nil. Any non-2xx status code is an error. Response
17867// headers are in either
17868// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
17869// or (if a response was returned at all) in
17870// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17871// whether the returned error was because http.StatusNotModified was
17872// returned.
17873func (c *ProjectsAgentSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
17874	gensupport.SetOptions(c.urlParams_, opts...)
17875	res, err := c.doRequest("json")
17876	if res != nil && res.StatusCode == http.StatusNotModified {
17877		if res.Body != nil {
17878			res.Body.Close()
17879		}
17880		return nil, &googleapi.Error{
17881			Code:   res.StatusCode,
17882			Header: res.Header,
17883		}
17884	}
17885	if err != nil {
17886		return nil, err
17887	}
17888	defer googleapi.CloseBody(res)
17889	if err := googleapi.CheckResponse(res); err != nil {
17890		return nil, err
17891	}
17892	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
17893		ServerResponse: googleapi.ServerResponse{
17894			Header:         res.Header,
17895			HTTPStatusCode: res.StatusCode,
17896		},
17897	}
17898	target := &ret
17899	if err := gensupport.DecodeResponse(target, res); err != nil {
17900		return nil, err
17901	}
17902	return ret, nil
17903	// {
17904	//   "description": "Creates a session entity type.\n\nIf the specified session entity type already exists, overrides the\nsession entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
17905	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes",
17906	//   "httpMethod": "POST",
17907	//   "id": "dialogflow.projects.agent.sessions.entityTypes.create",
17908	//   "parameterOrder": [
17909	//     "parent"
17910	//   ],
17911	//   "parameters": {
17912	//     "parent": {
17913	//       "description": "Required. The session to create a session entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
17914	//       "location": "path",
17915	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
17916	//       "required": true,
17917	//       "type": "string"
17918	//     }
17919	//   },
17920	//   "path": "v2beta1/{+parent}/entityTypes",
17921	//   "request": {
17922	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
17923	//   },
17924	//   "response": {
17925	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
17926	//   },
17927	//   "scopes": [
17928	//     "https://www.googleapis.com/auth/cloud-platform",
17929	//     "https://www.googleapis.com/auth/dialogflow"
17930	//   ]
17931	// }
17932
17933}
17934
17935// method id "dialogflow.projects.agent.sessions.entityTypes.delete":
17936
17937type ProjectsAgentSessionsEntityTypesDeleteCall struct {
17938	s          *Service
17939	name       string
17940	urlParams_ gensupport.URLParams
17941	ctx_       context.Context
17942	header_    http.Header
17943}
17944
17945// Delete: Deletes the specified session entity type.
17946//
17947// This method doesn't work with Google Assistant integration.
17948// Contact Dialogflow support if you need to use session entities
17949// with Google Assistant integration.
17950func (r *ProjectsAgentSessionsEntityTypesService) Delete(name string) *ProjectsAgentSessionsEntityTypesDeleteCall {
17951	c := &ProjectsAgentSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17952	c.name = name
17953	return c
17954}
17955
17956// Fields allows partial responses to be retrieved. See
17957// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17958// for more information.
17959func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesDeleteCall {
17960	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17961	return c
17962}
17963
17964// Context sets the context to be used in this call's Do method. Any
17965// pending HTTP request will be aborted if the provided context is
17966// canceled.
17967func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesDeleteCall {
17968	c.ctx_ = ctx
17969	return c
17970}
17971
17972// Header returns an http.Header that can be modified by the caller to
17973// add HTTP headers to the request.
17974func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Header() http.Header {
17975	if c.header_ == nil {
17976		c.header_ = make(http.Header)
17977	}
17978	return c.header_
17979}
17980
17981func (c *ProjectsAgentSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
17982	reqHeaders := make(http.Header)
17983	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17984	for k, v := range c.header_ {
17985		reqHeaders[k] = v
17986	}
17987	reqHeaders.Set("User-Agent", c.s.userAgent())
17988	var body io.Reader = nil
17989	c.urlParams_.Set("alt", alt)
17990	c.urlParams_.Set("prettyPrint", "false")
17991	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17992	urls += "?" + c.urlParams_.Encode()
17993	req, err := http.NewRequest("DELETE", urls, body)
17994	if err != nil {
17995		return nil, err
17996	}
17997	req.Header = reqHeaders
17998	googleapi.Expand(req.URL, map[string]string{
17999		"name": c.name,
18000	})
18001	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18002}
18003
18004// Do executes the "dialogflow.projects.agent.sessions.entityTypes.delete" call.
18005// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
18006// non-2xx status code is an error. Response headers are in either
18007// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
18008// returned at all) in error.(*googleapi.Error).Header. Use
18009// googleapi.IsNotModified to check whether the returned error was
18010// because http.StatusNotModified was returned.
18011func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
18012	gensupport.SetOptions(c.urlParams_, opts...)
18013	res, err := c.doRequest("json")
18014	if res != nil && res.StatusCode == http.StatusNotModified {
18015		if res.Body != nil {
18016			res.Body.Close()
18017		}
18018		return nil, &googleapi.Error{
18019			Code:   res.StatusCode,
18020			Header: res.Header,
18021		}
18022	}
18023	if err != nil {
18024		return nil, err
18025	}
18026	defer googleapi.CloseBody(res)
18027	if err := googleapi.CheckResponse(res); err != nil {
18028		return nil, err
18029	}
18030	ret := &GoogleProtobufEmpty{
18031		ServerResponse: googleapi.ServerResponse{
18032			Header:         res.Header,
18033			HTTPStatusCode: res.StatusCode,
18034		},
18035	}
18036	target := &ret
18037	if err := gensupport.DecodeResponse(target, res); err != nil {
18038		return nil, err
18039	}
18040	return ret, nil
18041	// {
18042	//   "description": "Deletes the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
18043	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
18044	//   "httpMethod": "DELETE",
18045	//   "id": "dialogflow.projects.agent.sessions.entityTypes.delete",
18046	//   "parameterOrder": [
18047	//     "name"
18048	//   ],
18049	//   "parameters": {
18050	//     "name": {
18051	//       "description": "Required. The name of the entity type to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`. If `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
18052	//       "location": "path",
18053	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
18054	//       "required": true,
18055	//       "type": "string"
18056	//     }
18057	//   },
18058	//   "path": "v2beta1/{+name}",
18059	//   "response": {
18060	//     "$ref": "GoogleProtobufEmpty"
18061	//   },
18062	//   "scopes": [
18063	//     "https://www.googleapis.com/auth/cloud-platform",
18064	//     "https://www.googleapis.com/auth/dialogflow"
18065	//   ]
18066	// }
18067
18068}
18069
18070// method id "dialogflow.projects.agent.sessions.entityTypes.get":
18071
18072type ProjectsAgentSessionsEntityTypesGetCall struct {
18073	s            *Service
18074	name         string
18075	urlParams_   gensupport.URLParams
18076	ifNoneMatch_ string
18077	ctx_         context.Context
18078	header_      http.Header
18079}
18080
18081// Get: Retrieves the specified session entity type.
18082//
18083// This method doesn't work with Google Assistant integration.
18084// Contact Dialogflow support if you need to use session entities
18085// with Google Assistant integration.
18086func (r *ProjectsAgentSessionsEntityTypesService) Get(name string) *ProjectsAgentSessionsEntityTypesGetCall {
18087	c := &ProjectsAgentSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18088	c.name = name
18089	return c
18090}
18091
18092// Fields allows partial responses to be retrieved. See
18093// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18094// for more information.
18095func (c *ProjectsAgentSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesGetCall {
18096	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18097	return c
18098}
18099
18100// IfNoneMatch sets the optional parameter which makes the operation
18101// fail if the object's ETag matches the given value. This is useful for
18102// getting updates only after the object has changed since the last
18103// request. Use googleapi.IsNotModified to check whether the response
18104// error from Do is the result of In-None-Match.
18105func (c *ProjectsAgentSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesGetCall {
18106	c.ifNoneMatch_ = entityTag
18107	return c
18108}
18109
18110// Context sets the context to be used in this call's Do method. Any
18111// pending HTTP request will be aborted if the provided context is
18112// canceled.
18113func (c *ProjectsAgentSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesGetCall {
18114	c.ctx_ = ctx
18115	return c
18116}
18117
18118// Header returns an http.Header that can be modified by the caller to
18119// add HTTP headers to the request.
18120func (c *ProjectsAgentSessionsEntityTypesGetCall) Header() http.Header {
18121	if c.header_ == nil {
18122		c.header_ = make(http.Header)
18123	}
18124	return c.header_
18125}
18126
18127func (c *ProjectsAgentSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
18128	reqHeaders := make(http.Header)
18129	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18130	for k, v := range c.header_ {
18131		reqHeaders[k] = v
18132	}
18133	reqHeaders.Set("User-Agent", c.s.userAgent())
18134	if c.ifNoneMatch_ != "" {
18135		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18136	}
18137	var body io.Reader = nil
18138	c.urlParams_.Set("alt", alt)
18139	c.urlParams_.Set("prettyPrint", "false")
18140	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
18141	urls += "?" + c.urlParams_.Encode()
18142	req, err := http.NewRequest("GET", urls, body)
18143	if err != nil {
18144		return nil, err
18145	}
18146	req.Header = reqHeaders
18147	googleapi.Expand(req.URL, map[string]string{
18148		"name": c.name,
18149	})
18150	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18151}
18152
18153// Do executes the "dialogflow.projects.agent.sessions.entityTypes.get" call.
18154// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
18155// error will be non-nil. Any non-2xx status code is an error. Response
18156// headers are in either
18157// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
18158// or (if a response was returned at all) in
18159// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18160// whether the returned error was because http.StatusNotModified was
18161// returned.
18162func (c *ProjectsAgentSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
18163	gensupport.SetOptions(c.urlParams_, opts...)
18164	res, err := c.doRequest("json")
18165	if res != nil && res.StatusCode == http.StatusNotModified {
18166		if res.Body != nil {
18167			res.Body.Close()
18168		}
18169		return nil, &googleapi.Error{
18170			Code:   res.StatusCode,
18171			Header: res.Header,
18172		}
18173	}
18174	if err != nil {
18175		return nil, err
18176	}
18177	defer googleapi.CloseBody(res)
18178	if err := googleapi.CheckResponse(res); err != nil {
18179		return nil, err
18180	}
18181	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
18182		ServerResponse: googleapi.ServerResponse{
18183			Header:         res.Header,
18184			HTTPStatusCode: res.StatusCode,
18185		},
18186	}
18187	target := &ret
18188	if err := gensupport.DecodeResponse(target, res); err != nil {
18189		return nil, err
18190	}
18191	return ret, nil
18192	// {
18193	//   "description": "Retrieves the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
18194	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
18195	//   "httpMethod": "GET",
18196	//   "id": "dialogflow.projects.agent.sessions.entityTypes.get",
18197	//   "parameterOrder": [
18198	//     "name"
18199	//   ],
18200	//   "parameters": {
18201	//     "name": {
18202	//       "description": "Required. The name of the session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`. If `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
18203	//       "location": "path",
18204	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
18205	//       "required": true,
18206	//       "type": "string"
18207	//     }
18208	//   },
18209	//   "path": "v2beta1/{+name}",
18210	//   "response": {
18211	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
18212	//   },
18213	//   "scopes": [
18214	//     "https://www.googleapis.com/auth/cloud-platform",
18215	//     "https://www.googleapis.com/auth/dialogflow"
18216	//   ]
18217	// }
18218
18219}
18220
18221// method id "dialogflow.projects.agent.sessions.entityTypes.list":
18222
18223type ProjectsAgentSessionsEntityTypesListCall struct {
18224	s            *Service
18225	parent       string
18226	urlParams_   gensupport.URLParams
18227	ifNoneMatch_ string
18228	ctx_         context.Context
18229	header_      http.Header
18230}
18231
18232// List: Returns the list of all session entity types in the specified
18233// session.
18234//
18235// This method doesn't work with Google Assistant integration.
18236// Contact Dialogflow support if you need to use session entities
18237// with Google Assistant integration.
18238func (r *ProjectsAgentSessionsEntityTypesService) List(parent string) *ProjectsAgentSessionsEntityTypesListCall {
18239	c := &ProjectsAgentSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18240	c.parent = parent
18241	return c
18242}
18243
18244// PageSize sets the optional parameter "pageSize": The maximum number
18245// of items to return in a single page. By
18246// default 100 and at most 1000.
18247func (c *ProjectsAgentSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentSessionsEntityTypesListCall {
18248	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18249	return c
18250}
18251
18252// PageToken sets the optional parameter "pageToken": The
18253// next_page_token value returned from a previous list request.
18254func (c *ProjectsAgentSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentSessionsEntityTypesListCall {
18255	c.urlParams_.Set("pageToken", pageToken)
18256	return c
18257}
18258
18259// Fields allows partial responses to be retrieved. See
18260// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18261// for more information.
18262func (c *ProjectsAgentSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesListCall {
18263	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18264	return c
18265}
18266
18267// IfNoneMatch sets the optional parameter which makes the operation
18268// fail if the object's ETag matches the given value. This is useful for
18269// getting updates only after the object has changed since the last
18270// request. Use googleapi.IsNotModified to check whether the response
18271// error from Do is the result of In-None-Match.
18272func (c *ProjectsAgentSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesListCall {
18273	c.ifNoneMatch_ = entityTag
18274	return c
18275}
18276
18277// Context sets the context to be used in this call's Do method. Any
18278// pending HTTP request will be aborted if the provided context is
18279// canceled.
18280func (c *ProjectsAgentSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesListCall {
18281	c.ctx_ = ctx
18282	return c
18283}
18284
18285// Header returns an http.Header that can be modified by the caller to
18286// add HTTP headers to the request.
18287func (c *ProjectsAgentSessionsEntityTypesListCall) Header() http.Header {
18288	if c.header_ == nil {
18289		c.header_ = make(http.Header)
18290	}
18291	return c.header_
18292}
18293
18294func (c *ProjectsAgentSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
18295	reqHeaders := make(http.Header)
18296	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18297	for k, v := range c.header_ {
18298		reqHeaders[k] = v
18299	}
18300	reqHeaders.Set("User-Agent", c.s.userAgent())
18301	if c.ifNoneMatch_ != "" {
18302		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18303	}
18304	var body io.Reader = nil
18305	c.urlParams_.Set("alt", alt)
18306	c.urlParams_.Set("prettyPrint", "false")
18307	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
18308	urls += "?" + c.urlParams_.Encode()
18309	req, err := http.NewRequest("GET", urls, body)
18310	if err != nil {
18311		return nil, err
18312	}
18313	req.Header = reqHeaders
18314	googleapi.Expand(req.URL, map[string]string{
18315		"parent": c.parent,
18316	})
18317	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18318}
18319
18320// Do executes the "dialogflow.projects.agent.sessions.entityTypes.list" call.
18321// Exactly one of
18322// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse or error
18323// will be non-nil. Any non-2xx status code is an error. Response
18324// headers are in either
18325// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse.ServerResp
18326// onse.Header or (if a response was returned at all) in
18327// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18328// whether the returned error was because http.StatusNotModified was
18329// returned.
18330func (c *ProjectsAgentSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse, error) {
18331	gensupport.SetOptions(c.urlParams_, opts...)
18332	res, err := c.doRequest("json")
18333	if res != nil && res.StatusCode == http.StatusNotModified {
18334		if res.Body != nil {
18335			res.Body.Close()
18336		}
18337		return nil, &googleapi.Error{
18338			Code:   res.StatusCode,
18339			Header: res.Header,
18340		}
18341	}
18342	if err != nil {
18343		return nil, err
18344	}
18345	defer googleapi.CloseBody(res)
18346	if err := googleapi.CheckResponse(res); err != nil {
18347		return nil, err
18348	}
18349	ret := &GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse{
18350		ServerResponse: googleapi.ServerResponse{
18351			Header:         res.Header,
18352			HTTPStatusCode: res.StatusCode,
18353		},
18354	}
18355	target := &ret
18356	if err := gensupport.DecodeResponse(target, res); err != nil {
18357		return nil, err
18358	}
18359	return ret, nil
18360	// {
18361	//   "description": "Returns the list of all session entity types in the specified session.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
18362	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes",
18363	//   "httpMethod": "GET",
18364	//   "id": "dialogflow.projects.agent.sessions.entityTypes.list",
18365	//   "parameterOrder": [
18366	//     "parent"
18367	//   ],
18368	//   "parameters": {
18369	//     "pageSize": {
18370	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
18371	//       "format": "int32",
18372	//       "location": "query",
18373	//       "type": "integer"
18374	//     },
18375	//     "pageToken": {
18376	//       "description": "Optional. The next_page_token value returned from a previous list request.",
18377	//       "location": "query",
18378	//       "type": "string"
18379	//     },
18380	//     "parent": {
18381	//       "description": "Required. The session to list all session entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
18382	//       "location": "path",
18383	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
18384	//       "required": true,
18385	//       "type": "string"
18386	//     }
18387	//   },
18388	//   "path": "v2beta1/{+parent}/entityTypes",
18389	//   "response": {
18390	//     "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse"
18391	//   },
18392	//   "scopes": [
18393	//     "https://www.googleapis.com/auth/cloud-platform",
18394	//     "https://www.googleapis.com/auth/dialogflow"
18395	//   ]
18396	// }
18397
18398}
18399
18400// Pages invokes f for each page of results.
18401// A non-nil error returned from f will halt the iteration.
18402// The provided context supersedes any context provided to the Context method.
18403func (c *ProjectsAgentSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) error) error {
18404	c.ctx_ = ctx
18405	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18406	for {
18407		x, err := c.Do()
18408		if err != nil {
18409			return err
18410		}
18411		if err := f(x); err != nil {
18412			return err
18413		}
18414		if x.NextPageToken == "" {
18415			return nil
18416		}
18417		c.PageToken(x.NextPageToken)
18418	}
18419}
18420
18421// method id "dialogflow.projects.agent.sessions.entityTypes.patch":
18422
18423type ProjectsAgentSessionsEntityTypesPatchCall struct {
18424	s                                             *Service
18425	nameid                                        string
18426	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
18427	urlParams_                                    gensupport.URLParams
18428	ctx_                                          context.Context
18429	header_                                       http.Header
18430}
18431
18432// Patch: Updates the specified session entity type.
18433//
18434// This method doesn't work with Google Assistant integration.
18435// Contact Dialogflow support if you need to use session entities
18436// with Google Assistant integration.
18437func (r *ProjectsAgentSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentSessionsEntityTypesPatchCall {
18438	c := &ProjectsAgentSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18439	c.nameid = nameid
18440	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
18441	return c
18442}
18443
18444// UpdateMask sets the optional parameter "updateMask": The mask to
18445// control which fields get updated.
18446func (c *ProjectsAgentSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsEntityTypesPatchCall {
18447	c.urlParams_.Set("updateMask", updateMask)
18448	return c
18449}
18450
18451// Fields allows partial responses to be retrieved. See
18452// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18453// for more information.
18454func (c *ProjectsAgentSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesPatchCall {
18455	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18456	return c
18457}
18458
18459// Context sets the context to be used in this call's Do method. Any
18460// pending HTTP request will be aborted if the provided context is
18461// canceled.
18462func (c *ProjectsAgentSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesPatchCall {
18463	c.ctx_ = ctx
18464	return c
18465}
18466
18467// Header returns an http.Header that can be modified by the caller to
18468// add HTTP headers to the request.
18469func (c *ProjectsAgentSessionsEntityTypesPatchCall) Header() http.Header {
18470	if c.header_ == nil {
18471		c.header_ = make(http.Header)
18472	}
18473	return c.header_
18474}
18475
18476func (c *ProjectsAgentSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
18477	reqHeaders := make(http.Header)
18478	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18479	for k, v := range c.header_ {
18480		reqHeaders[k] = v
18481	}
18482	reqHeaders.Set("User-Agent", c.s.userAgent())
18483	var body io.Reader = nil
18484	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
18485	if err != nil {
18486		return nil, err
18487	}
18488	reqHeaders.Set("Content-Type", "application/json")
18489	c.urlParams_.Set("alt", alt)
18490	c.urlParams_.Set("prettyPrint", "false")
18491	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
18492	urls += "?" + c.urlParams_.Encode()
18493	req, err := http.NewRequest("PATCH", urls, body)
18494	if err != nil {
18495		return nil, err
18496	}
18497	req.Header = reqHeaders
18498	googleapi.Expand(req.URL, map[string]string{
18499		"name": c.nameid,
18500	})
18501	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18502}
18503
18504// Do executes the "dialogflow.projects.agent.sessions.entityTypes.patch" call.
18505// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
18506// error will be non-nil. Any non-2xx status code is an error. Response
18507// headers are in either
18508// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
18509// or (if a response was returned at all) in
18510// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18511// whether the returned error was because http.StatusNotModified was
18512// returned.
18513func (c *ProjectsAgentSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
18514	gensupport.SetOptions(c.urlParams_, opts...)
18515	res, err := c.doRequest("json")
18516	if res != nil && res.StatusCode == http.StatusNotModified {
18517		if res.Body != nil {
18518			res.Body.Close()
18519		}
18520		return nil, &googleapi.Error{
18521			Code:   res.StatusCode,
18522			Header: res.Header,
18523		}
18524	}
18525	if err != nil {
18526		return nil, err
18527	}
18528	defer googleapi.CloseBody(res)
18529	if err := googleapi.CheckResponse(res); err != nil {
18530		return nil, err
18531	}
18532	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
18533		ServerResponse: googleapi.ServerResponse{
18534			Header:         res.Header,
18535			HTTPStatusCode: res.StatusCode,
18536		},
18537	}
18538	target := &ret
18539	if err := gensupport.DecodeResponse(target, res); err != nil {
18540		return nil, err
18541	}
18542	return ret, nil
18543	// {
18544	//   "description": "Updates the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
18545	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
18546	//   "httpMethod": "PATCH",
18547	//   "id": "dialogflow.projects.agent.sessions.entityTypes.patch",
18548	//   "parameterOrder": [
18549	//     "name"
18550	//   ],
18551	//   "parameters": {
18552	//     "name": {
18553	//       "description": "Required. The unique identifier of this session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e`, or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display Name\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\n`\u003cEntity Type Display Name\u003e` must be the display name of an existing entity\ntype in the same agent that will be overridden or supplemented.",
18554	//       "location": "path",
18555	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
18556	//       "required": true,
18557	//       "type": "string"
18558	//     },
18559	//     "updateMask": {
18560	//       "description": "Optional. The mask to control which fields get updated.",
18561	//       "format": "google-fieldmask",
18562	//       "location": "query",
18563	//       "type": "string"
18564	//     }
18565	//   },
18566	//   "path": "v2beta1/{+name}",
18567	//   "request": {
18568	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
18569	//   },
18570	//   "response": {
18571	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
18572	//   },
18573	//   "scopes": [
18574	//     "https://www.googleapis.com/auth/cloud-platform",
18575	//     "https://www.googleapis.com/auth/dialogflow"
18576	//   ]
18577	// }
18578
18579}
18580
18581// method id "dialogflow.projects.knowledgeBases.create":
18582
18583type ProjectsKnowledgeBasesCreateCall struct {
18584	s                                         *Service
18585	parent                                    string
18586	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
18587	urlParams_                                gensupport.URLParams
18588	ctx_                                      context.Context
18589	header_                                   http.Header
18590}
18591
18592// Create: Creates a knowledge base.
18593//
18594// Note: The `projects.agent.knowledgeBases` resource is
18595// deprecated;
18596// only use `projects.knowledgeBases`.
18597func (r *ProjectsKnowledgeBasesService) Create(parent string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsKnowledgeBasesCreateCall {
18598	c := &ProjectsKnowledgeBasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18599	c.parent = parent
18600	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
18601	return c
18602}
18603
18604// Fields allows partial responses to be retrieved. See
18605// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18606// for more information.
18607func (c *ProjectsKnowledgeBasesCreateCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesCreateCall {
18608	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18609	return c
18610}
18611
18612// Context sets the context to be used in this call's Do method. Any
18613// pending HTTP request will be aborted if the provided context is
18614// canceled.
18615func (c *ProjectsKnowledgeBasesCreateCall) Context(ctx context.Context) *ProjectsKnowledgeBasesCreateCall {
18616	c.ctx_ = ctx
18617	return c
18618}
18619
18620// Header returns an http.Header that can be modified by the caller to
18621// add HTTP headers to the request.
18622func (c *ProjectsKnowledgeBasesCreateCall) Header() http.Header {
18623	if c.header_ == nil {
18624		c.header_ = make(http.Header)
18625	}
18626	return c.header_
18627}
18628
18629func (c *ProjectsKnowledgeBasesCreateCall) doRequest(alt string) (*http.Response, error) {
18630	reqHeaders := make(http.Header)
18631	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18632	for k, v := range c.header_ {
18633		reqHeaders[k] = v
18634	}
18635	reqHeaders.Set("User-Agent", c.s.userAgent())
18636	var body io.Reader = nil
18637	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
18638	if err != nil {
18639		return nil, err
18640	}
18641	reqHeaders.Set("Content-Type", "application/json")
18642	c.urlParams_.Set("alt", alt)
18643	c.urlParams_.Set("prettyPrint", "false")
18644	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
18645	urls += "?" + c.urlParams_.Encode()
18646	req, err := http.NewRequest("POST", urls, body)
18647	if err != nil {
18648		return nil, err
18649	}
18650	req.Header = reqHeaders
18651	googleapi.Expand(req.URL, map[string]string{
18652		"parent": c.parent,
18653	})
18654	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18655}
18656
18657// Do executes the "dialogflow.projects.knowledgeBases.create" call.
18658// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
18659// will be non-nil. Any non-2xx status code is an error. Response
18660// headers are in either
18661// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
18662// (if a response was returned at all) in
18663// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18664// whether the returned error was because http.StatusNotModified was
18665// returned.
18666func (c *ProjectsKnowledgeBasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
18667	gensupport.SetOptions(c.urlParams_, opts...)
18668	res, err := c.doRequest("json")
18669	if res != nil && res.StatusCode == http.StatusNotModified {
18670		if res.Body != nil {
18671			res.Body.Close()
18672		}
18673		return nil, &googleapi.Error{
18674			Code:   res.StatusCode,
18675			Header: res.Header,
18676		}
18677	}
18678	if err != nil {
18679		return nil, err
18680	}
18681	defer googleapi.CloseBody(res)
18682	if err := googleapi.CheckResponse(res); err != nil {
18683		return nil, err
18684	}
18685	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
18686		ServerResponse: googleapi.ServerResponse{
18687			Header:         res.Header,
18688			HTTPStatusCode: res.StatusCode,
18689		},
18690	}
18691	target := &ret
18692	if err := gensupport.DecodeResponse(target, res); err != nil {
18693		return nil, err
18694	}
18695	return ret, nil
18696	// {
18697	//   "description": "Creates a knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
18698	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases",
18699	//   "httpMethod": "POST",
18700	//   "id": "dialogflow.projects.knowledgeBases.create",
18701	//   "parameterOrder": [
18702	//     "parent"
18703	//   ],
18704	//   "parameters": {
18705	//     "parent": {
18706	//       "description": "Required. The project to create a knowledge base for.\nFormat: `projects/\u003cProject ID\u003e`.",
18707	//       "location": "path",
18708	//       "pattern": "^projects/[^/]+$",
18709	//       "required": true,
18710	//       "type": "string"
18711	//     }
18712	//   },
18713	//   "path": "v2beta1/{+parent}/knowledgeBases",
18714	//   "request": {
18715	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
18716	//   },
18717	//   "response": {
18718	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
18719	//   },
18720	//   "scopes": [
18721	//     "https://www.googleapis.com/auth/cloud-platform",
18722	//     "https://www.googleapis.com/auth/dialogflow"
18723	//   ]
18724	// }
18725
18726}
18727
18728// method id "dialogflow.projects.knowledgeBases.delete":
18729
18730type ProjectsKnowledgeBasesDeleteCall struct {
18731	s          *Service
18732	name       string
18733	urlParams_ gensupport.URLParams
18734	ctx_       context.Context
18735	header_    http.Header
18736}
18737
18738// Delete: Deletes the specified knowledge base.
18739//
18740// Note: The `projects.agent.knowledgeBases` resource is
18741// deprecated;
18742// only use `projects.knowledgeBases`.
18743func (r *ProjectsKnowledgeBasesService) Delete(name string) *ProjectsKnowledgeBasesDeleteCall {
18744	c := &ProjectsKnowledgeBasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18745	c.name = name
18746	return c
18747}
18748
18749// Force sets the optional parameter "force": Force deletes the
18750// knowledge base. When set to true, any documents
18751// in the knowledge base are also deleted.
18752func (c *ProjectsKnowledgeBasesDeleteCall) Force(force bool) *ProjectsKnowledgeBasesDeleteCall {
18753	c.urlParams_.Set("force", fmt.Sprint(force))
18754	return c
18755}
18756
18757// Fields allows partial responses to be retrieved. See
18758// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18759// for more information.
18760func (c *ProjectsKnowledgeBasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDeleteCall {
18761	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18762	return c
18763}
18764
18765// Context sets the context to be used in this call's Do method. Any
18766// pending HTTP request will be aborted if the provided context is
18767// canceled.
18768func (c *ProjectsKnowledgeBasesDeleteCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDeleteCall {
18769	c.ctx_ = ctx
18770	return c
18771}
18772
18773// Header returns an http.Header that can be modified by the caller to
18774// add HTTP headers to the request.
18775func (c *ProjectsKnowledgeBasesDeleteCall) Header() http.Header {
18776	if c.header_ == nil {
18777		c.header_ = make(http.Header)
18778	}
18779	return c.header_
18780}
18781
18782func (c *ProjectsKnowledgeBasesDeleteCall) doRequest(alt string) (*http.Response, error) {
18783	reqHeaders := make(http.Header)
18784	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18785	for k, v := range c.header_ {
18786		reqHeaders[k] = v
18787	}
18788	reqHeaders.Set("User-Agent", c.s.userAgent())
18789	var body io.Reader = nil
18790	c.urlParams_.Set("alt", alt)
18791	c.urlParams_.Set("prettyPrint", "false")
18792	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
18793	urls += "?" + c.urlParams_.Encode()
18794	req, err := http.NewRequest("DELETE", urls, body)
18795	if err != nil {
18796		return nil, err
18797	}
18798	req.Header = reqHeaders
18799	googleapi.Expand(req.URL, map[string]string{
18800		"name": c.name,
18801	})
18802	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18803}
18804
18805// Do executes the "dialogflow.projects.knowledgeBases.delete" call.
18806// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
18807// non-2xx status code is an error. Response headers are in either
18808// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
18809// returned at all) in error.(*googleapi.Error).Header. Use
18810// googleapi.IsNotModified to check whether the returned error was
18811// because http.StatusNotModified was returned.
18812func (c *ProjectsKnowledgeBasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
18813	gensupport.SetOptions(c.urlParams_, opts...)
18814	res, err := c.doRequest("json")
18815	if res != nil && res.StatusCode == http.StatusNotModified {
18816		if res.Body != nil {
18817			res.Body.Close()
18818		}
18819		return nil, &googleapi.Error{
18820			Code:   res.StatusCode,
18821			Header: res.Header,
18822		}
18823	}
18824	if err != nil {
18825		return nil, err
18826	}
18827	defer googleapi.CloseBody(res)
18828	if err := googleapi.CheckResponse(res); err != nil {
18829		return nil, err
18830	}
18831	ret := &GoogleProtobufEmpty{
18832		ServerResponse: googleapi.ServerResponse{
18833			Header:         res.Header,
18834			HTTPStatusCode: res.StatusCode,
18835		},
18836	}
18837	target := &ret
18838	if err := gensupport.DecodeResponse(target, res); err != nil {
18839		return nil, err
18840	}
18841	return ret, nil
18842	// {
18843	//   "description": "Deletes the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
18844	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
18845	//   "httpMethod": "DELETE",
18846	//   "id": "dialogflow.projects.knowledgeBases.delete",
18847	//   "parameterOrder": [
18848	//     "name"
18849	//   ],
18850	//   "parameters": {
18851	//     "force": {
18852	//       "description": "Optional. Force deletes the knowledge base. When set to true, any documents\nin the knowledge base are also deleted.",
18853	//       "location": "query",
18854	//       "type": "boolean"
18855	//     },
18856	//     "name": {
18857	//       "description": "Required. The name of the knowledge base to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
18858	//       "location": "path",
18859	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
18860	//       "required": true,
18861	//       "type": "string"
18862	//     }
18863	//   },
18864	//   "path": "v2beta1/{+name}",
18865	//   "response": {
18866	//     "$ref": "GoogleProtobufEmpty"
18867	//   },
18868	//   "scopes": [
18869	//     "https://www.googleapis.com/auth/cloud-platform",
18870	//     "https://www.googleapis.com/auth/dialogflow"
18871	//   ]
18872	// }
18873
18874}
18875
18876// method id "dialogflow.projects.knowledgeBases.get":
18877
18878type ProjectsKnowledgeBasesGetCall struct {
18879	s            *Service
18880	name         string
18881	urlParams_   gensupport.URLParams
18882	ifNoneMatch_ string
18883	ctx_         context.Context
18884	header_      http.Header
18885}
18886
18887// Get: Retrieves the specified knowledge base.
18888//
18889// Note: The `projects.agent.knowledgeBases` resource is
18890// deprecated;
18891// only use `projects.knowledgeBases`.
18892func (r *ProjectsKnowledgeBasesService) Get(name string) *ProjectsKnowledgeBasesGetCall {
18893	c := &ProjectsKnowledgeBasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18894	c.name = name
18895	return c
18896}
18897
18898// Fields allows partial responses to be retrieved. See
18899// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18900// for more information.
18901func (c *ProjectsKnowledgeBasesGetCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesGetCall {
18902	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18903	return c
18904}
18905
18906// IfNoneMatch sets the optional parameter which makes the operation
18907// fail if the object's ETag matches the given value. This is useful for
18908// getting updates only after the object has changed since the last
18909// request. Use googleapi.IsNotModified to check whether the response
18910// error from Do is the result of In-None-Match.
18911func (c *ProjectsKnowledgeBasesGetCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesGetCall {
18912	c.ifNoneMatch_ = entityTag
18913	return c
18914}
18915
18916// Context sets the context to be used in this call's Do method. Any
18917// pending HTTP request will be aborted if the provided context is
18918// canceled.
18919func (c *ProjectsKnowledgeBasesGetCall) Context(ctx context.Context) *ProjectsKnowledgeBasesGetCall {
18920	c.ctx_ = ctx
18921	return c
18922}
18923
18924// Header returns an http.Header that can be modified by the caller to
18925// add HTTP headers to the request.
18926func (c *ProjectsKnowledgeBasesGetCall) Header() http.Header {
18927	if c.header_ == nil {
18928		c.header_ = make(http.Header)
18929	}
18930	return c.header_
18931}
18932
18933func (c *ProjectsKnowledgeBasesGetCall) doRequest(alt string) (*http.Response, error) {
18934	reqHeaders := make(http.Header)
18935	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18936	for k, v := range c.header_ {
18937		reqHeaders[k] = v
18938	}
18939	reqHeaders.Set("User-Agent", c.s.userAgent())
18940	if c.ifNoneMatch_ != "" {
18941		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18942	}
18943	var body io.Reader = nil
18944	c.urlParams_.Set("alt", alt)
18945	c.urlParams_.Set("prettyPrint", "false")
18946	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
18947	urls += "?" + c.urlParams_.Encode()
18948	req, err := http.NewRequest("GET", urls, body)
18949	if err != nil {
18950		return nil, err
18951	}
18952	req.Header = reqHeaders
18953	googleapi.Expand(req.URL, map[string]string{
18954		"name": c.name,
18955	})
18956	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18957}
18958
18959// Do executes the "dialogflow.projects.knowledgeBases.get" call.
18960// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
18961// will be non-nil. Any non-2xx status code is an error. Response
18962// headers are in either
18963// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
18964// (if a response was returned at all) in
18965// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18966// whether the returned error was because http.StatusNotModified was
18967// returned.
18968func (c *ProjectsKnowledgeBasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
18969	gensupport.SetOptions(c.urlParams_, opts...)
18970	res, err := c.doRequest("json")
18971	if res != nil && res.StatusCode == http.StatusNotModified {
18972		if res.Body != nil {
18973			res.Body.Close()
18974		}
18975		return nil, &googleapi.Error{
18976			Code:   res.StatusCode,
18977			Header: res.Header,
18978		}
18979	}
18980	if err != nil {
18981		return nil, err
18982	}
18983	defer googleapi.CloseBody(res)
18984	if err := googleapi.CheckResponse(res); err != nil {
18985		return nil, err
18986	}
18987	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
18988		ServerResponse: googleapi.ServerResponse{
18989			Header:         res.Header,
18990			HTTPStatusCode: res.StatusCode,
18991		},
18992	}
18993	target := &ret
18994	if err := gensupport.DecodeResponse(target, res); err != nil {
18995		return nil, err
18996	}
18997	return ret, nil
18998	// {
18999	//   "description": "Retrieves the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
19000	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
19001	//   "httpMethod": "GET",
19002	//   "id": "dialogflow.projects.knowledgeBases.get",
19003	//   "parameterOrder": [
19004	//     "name"
19005	//   ],
19006	//   "parameters": {
19007	//     "name": {
19008	//       "description": "Required. The name of the knowledge base to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
19009	//       "location": "path",
19010	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
19011	//       "required": true,
19012	//       "type": "string"
19013	//     }
19014	//   },
19015	//   "path": "v2beta1/{+name}",
19016	//   "response": {
19017	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
19018	//   },
19019	//   "scopes": [
19020	//     "https://www.googleapis.com/auth/cloud-platform",
19021	//     "https://www.googleapis.com/auth/dialogflow"
19022	//   ]
19023	// }
19024
19025}
19026
19027// method id "dialogflow.projects.knowledgeBases.list":
19028
19029type ProjectsKnowledgeBasesListCall struct {
19030	s            *Service
19031	parent       string
19032	urlParams_   gensupport.URLParams
19033	ifNoneMatch_ string
19034	ctx_         context.Context
19035	header_      http.Header
19036}
19037
19038// List: Returns the list of all knowledge bases of the specified
19039// agent.
19040//
19041// Note: The `projects.agent.knowledgeBases` resource is
19042// deprecated;
19043// only use `projects.knowledgeBases`.
19044func (r *ProjectsKnowledgeBasesService) List(parent string) *ProjectsKnowledgeBasesListCall {
19045	c := &ProjectsKnowledgeBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19046	c.parent = parent
19047	return c
19048}
19049
19050// PageSize sets the optional parameter "pageSize": The maximum number
19051// of items to return in a single page. By
19052// default 10 and at most 100.
19053func (c *ProjectsKnowledgeBasesListCall) PageSize(pageSize int64) *ProjectsKnowledgeBasesListCall {
19054	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19055	return c
19056}
19057
19058// PageToken sets the optional parameter "pageToken": The
19059// next_page_token value returned from a previous list request.
19060func (c *ProjectsKnowledgeBasesListCall) PageToken(pageToken string) *ProjectsKnowledgeBasesListCall {
19061	c.urlParams_.Set("pageToken", pageToken)
19062	return c
19063}
19064
19065// Fields allows partial responses to be retrieved. See
19066// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19067// for more information.
19068func (c *ProjectsKnowledgeBasesListCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesListCall {
19069	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19070	return c
19071}
19072
19073// IfNoneMatch sets the optional parameter which makes the operation
19074// fail if the object's ETag matches the given value. This is useful for
19075// getting updates only after the object has changed since the last
19076// request. Use googleapi.IsNotModified to check whether the response
19077// error from Do is the result of In-None-Match.
19078func (c *ProjectsKnowledgeBasesListCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesListCall {
19079	c.ifNoneMatch_ = entityTag
19080	return c
19081}
19082
19083// Context sets the context to be used in this call's Do method. Any
19084// pending HTTP request will be aborted if the provided context is
19085// canceled.
19086func (c *ProjectsKnowledgeBasesListCall) Context(ctx context.Context) *ProjectsKnowledgeBasesListCall {
19087	c.ctx_ = ctx
19088	return c
19089}
19090
19091// Header returns an http.Header that can be modified by the caller to
19092// add HTTP headers to the request.
19093func (c *ProjectsKnowledgeBasesListCall) Header() http.Header {
19094	if c.header_ == nil {
19095		c.header_ = make(http.Header)
19096	}
19097	return c.header_
19098}
19099
19100func (c *ProjectsKnowledgeBasesListCall) doRequest(alt string) (*http.Response, error) {
19101	reqHeaders := make(http.Header)
19102	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19103	for k, v := range c.header_ {
19104		reqHeaders[k] = v
19105	}
19106	reqHeaders.Set("User-Agent", c.s.userAgent())
19107	if c.ifNoneMatch_ != "" {
19108		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19109	}
19110	var body io.Reader = nil
19111	c.urlParams_.Set("alt", alt)
19112	c.urlParams_.Set("prettyPrint", "false")
19113	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
19114	urls += "?" + c.urlParams_.Encode()
19115	req, err := http.NewRequest("GET", urls, body)
19116	if err != nil {
19117		return nil, err
19118	}
19119	req.Header = reqHeaders
19120	googleapi.Expand(req.URL, map[string]string{
19121		"parent": c.parent,
19122	})
19123	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19124}
19125
19126// Do executes the "dialogflow.projects.knowledgeBases.list" call.
19127// Exactly one of
19128// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse or error will
19129// be non-nil. Any non-2xx status code is an error. Response headers are
19130// in either
19131// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse.ServerResponse
19132// .Header or (if a response was returned at all) in
19133// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19134// whether the returned error was because http.StatusNotModified was
19135// returned.
19136func (c *ProjectsKnowledgeBasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse, error) {
19137	gensupport.SetOptions(c.urlParams_, opts...)
19138	res, err := c.doRequest("json")
19139	if res != nil && res.StatusCode == http.StatusNotModified {
19140		if res.Body != nil {
19141			res.Body.Close()
19142		}
19143		return nil, &googleapi.Error{
19144			Code:   res.StatusCode,
19145			Header: res.Header,
19146		}
19147	}
19148	if err != nil {
19149		return nil, err
19150	}
19151	defer googleapi.CloseBody(res)
19152	if err := googleapi.CheckResponse(res); err != nil {
19153		return nil, err
19154	}
19155	ret := &GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse{
19156		ServerResponse: googleapi.ServerResponse{
19157			Header:         res.Header,
19158			HTTPStatusCode: res.StatusCode,
19159		},
19160	}
19161	target := &ret
19162	if err := gensupport.DecodeResponse(target, res); err != nil {
19163		return nil, err
19164	}
19165	return ret, nil
19166	// {
19167	//   "description": "Returns the list of all knowledge bases of the specified agent.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
19168	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases",
19169	//   "httpMethod": "GET",
19170	//   "id": "dialogflow.projects.knowledgeBases.list",
19171	//   "parameterOrder": [
19172	//     "parent"
19173	//   ],
19174	//   "parameters": {
19175	//     "pageSize": {
19176	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
19177	//       "format": "int32",
19178	//       "location": "query",
19179	//       "type": "integer"
19180	//     },
19181	//     "pageToken": {
19182	//       "description": "Optional. The next_page_token value returned from a previous list request.",
19183	//       "location": "query",
19184	//       "type": "string"
19185	//     },
19186	//     "parent": {
19187	//       "description": "Required. The project to list of knowledge bases for.\nFormat: `projects/\u003cProject ID\u003e`.",
19188	//       "location": "path",
19189	//       "pattern": "^projects/[^/]+$",
19190	//       "required": true,
19191	//       "type": "string"
19192	//     }
19193	//   },
19194	//   "path": "v2beta1/{+parent}/knowledgeBases",
19195	//   "response": {
19196	//     "$ref": "GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse"
19197	//   },
19198	//   "scopes": [
19199	//     "https://www.googleapis.com/auth/cloud-platform",
19200	//     "https://www.googleapis.com/auth/dialogflow"
19201	//   ]
19202	// }
19203
19204}
19205
19206// Pages invokes f for each page of results.
19207// A non-nil error returned from f will halt the iteration.
19208// The provided context supersedes any context provided to the Context method.
19209func (c *ProjectsKnowledgeBasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse) error) error {
19210	c.ctx_ = ctx
19211	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19212	for {
19213		x, err := c.Do()
19214		if err != nil {
19215			return err
19216		}
19217		if err := f(x); err != nil {
19218			return err
19219		}
19220		if x.NextPageToken == "" {
19221			return nil
19222		}
19223		c.PageToken(x.NextPageToken)
19224	}
19225}
19226
19227// method id "dialogflow.projects.knowledgeBases.patch":
19228
19229type ProjectsKnowledgeBasesPatchCall struct {
19230	s                                         *Service
19231	name                                      string
19232	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
19233	urlParams_                                gensupport.URLParams
19234	ctx_                                      context.Context
19235	header_                                   http.Header
19236}
19237
19238// Patch: Updates the specified knowledge base.
19239//
19240// Note: The `projects.agent.knowledgeBases` resource is
19241// deprecated;
19242// only use `projects.knowledgeBases`.
19243func (r *ProjectsKnowledgeBasesService) Patch(name string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsKnowledgeBasesPatchCall {
19244	c := &ProjectsKnowledgeBasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19245	c.name = name
19246	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
19247	return c
19248}
19249
19250// UpdateMask sets the optional parameter "updateMask": Not specified
19251// means `update all`.
19252// Currently, only `display_name` can be updated, an InvalidArgument
19253// will be
19254// returned for attempting to update other fields.
19255func (c *ProjectsKnowledgeBasesPatchCall) UpdateMask(updateMask string) *ProjectsKnowledgeBasesPatchCall {
19256	c.urlParams_.Set("updateMask", updateMask)
19257	return c
19258}
19259
19260// Fields allows partial responses to be retrieved. See
19261// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19262// for more information.
19263func (c *ProjectsKnowledgeBasesPatchCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesPatchCall {
19264	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19265	return c
19266}
19267
19268// Context sets the context to be used in this call's Do method. Any
19269// pending HTTP request will be aborted if the provided context is
19270// canceled.
19271func (c *ProjectsKnowledgeBasesPatchCall) Context(ctx context.Context) *ProjectsKnowledgeBasesPatchCall {
19272	c.ctx_ = ctx
19273	return c
19274}
19275
19276// Header returns an http.Header that can be modified by the caller to
19277// add HTTP headers to the request.
19278func (c *ProjectsKnowledgeBasesPatchCall) Header() http.Header {
19279	if c.header_ == nil {
19280		c.header_ = make(http.Header)
19281	}
19282	return c.header_
19283}
19284
19285func (c *ProjectsKnowledgeBasesPatchCall) doRequest(alt string) (*http.Response, error) {
19286	reqHeaders := make(http.Header)
19287	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19288	for k, v := range c.header_ {
19289		reqHeaders[k] = v
19290	}
19291	reqHeaders.Set("User-Agent", c.s.userAgent())
19292	var body io.Reader = nil
19293	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
19294	if err != nil {
19295		return nil, err
19296	}
19297	reqHeaders.Set("Content-Type", "application/json")
19298	c.urlParams_.Set("alt", alt)
19299	c.urlParams_.Set("prettyPrint", "false")
19300	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
19301	urls += "?" + c.urlParams_.Encode()
19302	req, err := http.NewRequest("PATCH", urls, body)
19303	if err != nil {
19304		return nil, err
19305	}
19306	req.Header = reqHeaders
19307	googleapi.Expand(req.URL, map[string]string{
19308		"name": c.name,
19309	})
19310	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19311}
19312
19313// Do executes the "dialogflow.projects.knowledgeBases.patch" call.
19314// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
19315// will be non-nil. Any non-2xx status code is an error. Response
19316// headers are in either
19317// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
19318// (if a response was returned at all) in
19319// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19320// whether the returned error was because http.StatusNotModified was
19321// returned.
19322func (c *ProjectsKnowledgeBasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
19323	gensupport.SetOptions(c.urlParams_, opts...)
19324	res, err := c.doRequest("json")
19325	if res != nil && res.StatusCode == http.StatusNotModified {
19326		if res.Body != nil {
19327			res.Body.Close()
19328		}
19329		return nil, &googleapi.Error{
19330			Code:   res.StatusCode,
19331			Header: res.Header,
19332		}
19333	}
19334	if err != nil {
19335		return nil, err
19336	}
19337	defer googleapi.CloseBody(res)
19338	if err := googleapi.CheckResponse(res); err != nil {
19339		return nil, err
19340	}
19341	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
19342		ServerResponse: googleapi.ServerResponse{
19343			Header:         res.Header,
19344			HTTPStatusCode: res.StatusCode,
19345		},
19346	}
19347	target := &ret
19348	if err := gensupport.DecodeResponse(target, res); err != nil {
19349		return nil, err
19350	}
19351	return ret, nil
19352	// {
19353	//   "description": "Updates the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
19354	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
19355	//   "httpMethod": "PATCH",
19356	//   "id": "dialogflow.projects.knowledgeBases.patch",
19357	//   "parameterOrder": [
19358	//     "name"
19359	//   ],
19360	//   "parameters": {
19361	//     "name": {
19362	//       "description": "The knowledge base resource name.\nThe name must be empty when creating a knowledge base.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
19363	//       "location": "path",
19364	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
19365	//       "required": true,
19366	//       "type": "string"
19367	//     },
19368	//     "updateMask": {
19369	//       "description": "Optional. Not specified means `update all`.\nCurrently, only `display_name` can be updated, an InvalidArgument will be\nreturned for attempting to update other fields.",
19370	//       "format": "google-fieldmask",
19371	//       "location": "query",
19372	//       "type": "string"
19373	//     }
19374	//   },
19375	//   "path": "v2beta1/{+name}",
19376	//   "request": {
19377	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
19378	//   },
19379	//   "response": {
19380	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
19381	//   },
19382	//   "scopes": [
19383	//     "https://www.googleapis.com/auth/cloud-platform",
19384	//     "https://www.googleapis.com/auth/dialogflow"
19385	//   ]
19386	// }
19387
19388}
19389
19390// method id "dialogflow.projects.knowledgeBases.documents.create":
19391
19392type ProjectsKnowledgeBasesDocumentsCreateCall struct {
19393	s                                    *Service
19394	parent                               string
19395	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
19396	urlParams_                           gensupport.URLParams
19397	ctx_                                 context.Context
19398	header_                              http.Header
19399}
19400
19401// Create: Creates a new document.
19402//
19403// Note: The `projects.agent.knowledgeBases.documents` resource is
19404// deprecated;
19405// only use `projects.knowledgeBases.documents`.
19406//
19407// Operation <response: Document,
19408//            metadata: KnowledgeOperationMetadata>
19409func (r *ProjectsKnowledgeBasesDocumentsService) Create(parent string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsKnowledgeBasesDocumentsCreateCall {
19410	c := &ProjectsKnowledgeBasesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19411	c.parent = parent
19412	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
19413	return c
19414}
19415
19416// Fields allows partial responses to be retrieved. See
19417// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19418// for more information.
19419func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsCreateCall {
19420	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19421	return c
19422}
19423
19424// Context sets the context to be used in this call's Do method. Any
19425// pending HTTP request will be aborted if the provided context is
19426// canceled.
19427func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsCreateCall {
19428	c.ctx_ = ctx
19429	return c
19430}
19431
19432// Header returns an http.Header that can be modified by the caller to
19433// add HTTP headers to the request.
19434func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Header() http.Header {
19435	if c.header_ == nil {
19436		c.header_ = make(http.Header)
19437	}
19438	return c.header_
19439}
19440
19441func (c *ProjectsKnowledgeBasesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) {
19442	reqHeaders := make(http.Header)
19443	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19444	for k, v := range c.header_ {
19445		reqHeaders[k] = v
19446	}
19447	reqHeaders.Set("User-Agent", c.s.userAgent())
19448	var body io.Reader = nil
19449	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
19450	if err != nil {
19451		return nil, err
19452	}
19453	reqHeaders.Set("Content-Type", "application/json")
19454	c.urlParams_.Set("alt", alt)
19455	c.urlParams_.Set("prettyPrint", "false")
19456	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
19457	urls += "?" + c.urlParams_.Encode()
19458	req, err := http.NewRequest("POST", urls, body)
19459	if err != nil {
19460		return nil, err
19461	}
19462	req.Header = reqHeaders
19463	googleapi.Expand(req.URL, map[string]string{
19464		"parent": c.parent,
19465	})
19466	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19467}
19468
19469// Do executes the "dialogflow.projects.knowledgeBases.documents.create" call.
19470// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
19471// Any non-2xx status code is an error. Response headers are in either
19472// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
19473// was returned at all) in error.(*googleapi.Error).Header. Use
19474// googleapi.IsNotModified to check whether the returned error was
19475// because http.StatusNotModified was returned.
19476func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
19477	gensupport.SetOptions(c.urlParams_, opts...)
19478	res, err := c.doRequest("json")
19479	if res != nil && res.StatusCode == http.StatusNotModified {
19480		if res.Body != nil {
19481			res.Body.Close()
19482		}
19483		return nil, &googleapi.Error{
19484			Code:   res.StatusCode,
19485			Header: res.Header,
19486		}
19487	}
19488	if err != nil {
19489		return nil, err
19490	}
19491	defer googleapi.CloseBody(res)
19492	if err := googleapi.CheckResponse(res); err != nil {
19493		return nil, err
19494	}
19495	ret := &GoogleLongrunningOperation{
19496		ServerResponse: googleapi.ServerResponse{
19497			Header:         res.Header,
19498			HTTPStatusCode: res.StatusCode,
19499		},
19500	}
19501	target := &ret
19502	if err := gensupport.DecodeResponse(target, res); err != nil {
19503		return nil, err
19504	}
19505	return ret, nil
19506	// {
19507	//   "description": "Creates a new document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.\n\nOperation \u003cresponse: Document,\n           metadata: KnowledgeOperationMetadata\u003e",
19508	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents",
19509	//   "httpMethod": "POST",
19510	//   "id": "dialogflow.projects.knowledgeBases.documents.create",
19511	//   "parameterOrder": [
19512	//     "parent"
19513	//   ],
19514	//   "parameters": {
19515	//     "parent": {
19516	//       "description": "Required. The knoweldge base to create a document for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
19517	//       "location": "path",
19518	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
19519	//       "required": true,
19520	//       "type": "string"
19521	//     }
19522	//   },
19523	//   "path": "v2beta1/{+parent}/documents",
19524	//   "request": {
19525	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
19526	//   },
19527	//   "response": {
19528	//     "$ref": "GoogleLongrunningOperation"
19529	//   },
19530	//   "scopes": [
19531	//     "https://www.googleapis.com/auth/cloud-platform",
19532	//     "https://www.googleapis.com/auth/dialogflow"
19533	//   ]
19534	// }
19535
19536}
19537
19538// method id "dialogflow.projects.knowledgeBases.documents.delete":
19539
19540type ProjectsKnowledgeBasesDocumentsDeleteCall struct {
19541	s          *Service
19542	name       string
19543	urlParams_ gensupport.URLParams
19544	ctx_       context.Context
19545	header_    http.Header
19546}
19547
19548// Delete: Deletes the specified document.
19549//
19550// Note: The `projects.agent.knowledgeBases.documents` resource is
19551// deprecated;
19552// only use `projects.knowledgeBases.documents`.
19553//
19554// Operation <response: google.protobuf.Empty,
19555//            metadata: KnowledgeOperationMetadata>
19556func (r *ProjectsKnowledgeBasesDocumentsService) Delete(name string) *ProjectsKnowledgeBasesDocumentsDeleteCall {
19557	c := &ProjectsKnowledgeBasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19558	c.name = name
19559	return c
19560}
19561
19562// Fields allows partial responses to be retrieved. See
19563// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19564// for more information.
19565func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsDeleteCall {
19566	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19567	return c
19568}
19569
19570// Context sets the context to be used in this call's Do method. Any
19571// pending HTTP request will be aborted if the provided context is
19572// canceled.
19573func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsDeleteCall {
19574	c.ctx_ = ctx
19575	return c
19576}
19577
19578// Header returns an http.Header that can be modified by the caller to
19579// add HTTP headers to the request.
19580func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Header() http.Header {
19581	if c.header_ == nil {
19582		c.header_ = make(http.Header)
19583	}
19584	return c.header_
19585}
19586
19587func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
19588	reqHeaders := make(http.Header)
19589	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19590	for k, v := range c.header_ {
19591		reqHeaders[k] = v
19592	}
19593	reqHeaders.Set("User-Agent", c.s.userAgent())
19594	var body io.Reader = nil
19595	c.urlParams_.Set("alt", alt)
19596	c.urlParams_.Set("prettyPrint", "false")
19597	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
19598	urls += "?" + c.urlParams_.Encode()
19599	req, err := http.NewRequest("DELETE", urls, body)
19600	if err != nil {
19601		return nil, err
19602	}
19603	req.Header = reqHeaders
19604	googleapi.Expand(req.URL, map[string]string{
19605		"name": c.name,
19606	})
19607	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19608}
19609
19610// Do executes the "dialogflow.projects.knowledgeBases.documents.delete" call.
19611// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
19612// Any non-2xx status code is an error. Response headers are in either
19613// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
19614// was returned at all) in error.(*googleapi.Error).Header. Use
19615// googleapi.IsNotModified to check whether the returned error was
19616// because http.StatusNotModified was returned.
19617func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
19618	gensupport.SetOptions(c.urlParams_, opts...)
19619	res, err := c.doRequest("json")
19620	if res != nil && res.StatusCode == http.StatusNotModified {
19621		if res.Body != nil {
19622			res.Body.Close()
19623		}
19624		return nil, &googleapi.Error{
19625			Code:   res.StatusCode,
19626			Header: res.Header,
19627		}
19628	}
19629	if err != nil {
19630		return nil, err
19631	}
19632	defer googleapi.CloseBody(res)
19633	if err := googleapi.CheckResponse(res); err != nil {
19634		return nil, err
19635	}
19636	ret := &GoogleLongrunningOperation{
19637		ServerResponse: googleapi.ServerResponse{
19638			Header:         res.Header,
19639			HTTPStatusCode: res.StatusCode,
19640		},
19641	}
19642	target := &ret
19643	if err := gensupport.DecodeResponse(target, res); err != nil {
19644		return nil, err
19645	}
19646	return ret, nil
19647	// {
19648	//   "description": "Deletes the specified document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.\n\nOperation \u003cresponse: google.protobuf.Empty,\n           metadata: KnowledgeOperationMetadata\u003e",
19649	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
19650	//   "httpMethod": "DELETE",
19651	//   "id": "dialogflow.projects.knowledgeBases.documents.delete",
19652	//   "parameterOrder": [
19653	//     "name"
19654	//   ],
19655	//   "parameters": {
19656	//     "name": {
19657	//       "description": "The name of the document to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
19658	//       "location": "path",
19659	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
19660	//       "required": true,
19661	//       "type": "string"
19662	//     }
19663	//   },
19664	//   "path": "v2beta1/{+name}",
19665	//   "response": {
19666	//     "$ref": "GoogleLongrunningOperation"
19667	//   },
19668	//   "scopes": [
19669	//     "https://www.googleapis.com/auth/cloud-platform",
19670	//     "https://www.googleapis.com/auth/dialogflow"
19671	//   ]
19672	// }
19673
19674}
19675
19676// method id "dialogflow.projects.knowledgeBases.documents.get":
19677
19678type ProjectsKnowledgeBasesDocumentsGetCall struct {
19679	s            *Service
19680	name         string
19681	urlParams_   gensupport.URLParams
19682	ifNoneMatch_ string
19683	ctx_         context.Context
19684	header_      http.Header
19685}
19686
19687// Get: Retrieves the specified document.
19688//
19689// Note: The `projects.agent.knowledgeBases.documents` resource is
19690// deprecated;
19691// only use `projects.knowledgeBases.documents`.
19692func (r *ProjectsKnowledgeBasesDocumentsService) Get(name string) *ProjectsKnowledgeBasesDocumentsGetCall {
19693	c := &ProjectsKnowledgeBasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19694	c.name = name
19695	return c
19696}
19697
19698// Fields allows partial responses to be retrieved. See
19699// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19700// for more information.
19701func (c *ProjectsKnowledgeBasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsGetCall {
19702	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19703	return c
19704}
19705
19706// IfNoneMatch sets the optional parameter which makes the operation
19707// fail if the object's ETag matches the given value. This is useful for
19708// getting updates only after the object has changed since the last
19709// request. Use googleapi.IsNotModified to check whether the response
19710// error from Do is the result of In-None-Match.
19711func (c *ProjectsKnowledgeBasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesDocumentsGetCall {
19712	c.ifNoneMatch_ = entityTag
19713	return c
19714}
19715
19716// Context sets the context to be used in this call's Do method. Any
19717// pending HTTP request will be aborted if the provided context is
19718// canceled.
19719func (c *ProjectsKnowledgeBasesDocumentsGetCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsGetCall {
19720	c.ctx_ = ctx
19721	return c
19722}
19723
19724// Header returns an http.Header that can be modified by the caller to
19725// add HTTP headers to the request.
19726func (c *ProjectsKnowledgeBasesDocumentsGetCall) Header() http.Header {
19727	if c.header_ == nil {
19728		c.header_ = make(http.Header)
19729	}
19730	return c.header_
19731}
19732
19733func (c *ProjectsKnowledgeBasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
19734	reqHeaders := make(http.Header)
19735	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19736	for k, v := range c.header_ {
19737		reqHeaders[k] = v
19738	}
19739	reqHeaders.Set("User-Agent", c.s.userAgent())
19740	if c.ifNoneMatch_ != "" {
19741		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19742	}
19743	var body io.Reader = nil
19744	c.urlParams_.Set("alt", alt)
19745	c.urlParams_.Set("prettyPrint", "false")
19746	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
19747	urls += "?" + c.urlParams_.Encode()
19748	req, err := http.NewRequest("GET", urls, body)
19749	if err != nil {
19750		return nil, err
19751	}
19752	req.Header = reqHeaders
19753	googleapi.Expand(req.URL, map[string]string{
19754		"name": c.name,
19755	})
19756	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19757}
19758
19759// Do executes the "dialogflow.projects.knowledgeBases.documents.get" call.
19760// Exactly one of *GoogleCloudDialogflowV2beta1Document or error will be
19761// non-nil. Any non-2xx status code is an error. Response headers are in
19762// either *GoogleCloudDialogflowV2beta1Document.ServerResponse.Header or
19763// (if a response was returned at all) in
19764// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19765// whether the returned error was because http.StatusNotModified was
19766// returned.
19767func (c *ProjectsKnowledgeBasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Document, error) {
19768	gensupport.SetOptions(c.urlParams_, opts...)
19769	res, err := c.doRequest("json")
19770	if res != nil && res.StatusCode == http.StatusNotModified {
19771		if res.Body != nil {
19772			res.Body.Close()
19773		}
19774		return nil, &googleapi.Error{
19775			Code:   res.StatusCode,
19776			Header: res.Header,
19777		}
19778	}
19779	if err != nil {
19780		return nil, err
19781	}
19782	defer googleapi.CloseBody(res)
19783	if err := googleapi.CheckResponse(res); err != nil {
19784		return nil, err
19785	}
19786	ret := &GoogleCloudDialogflowV2beta1Document{
19787		ServerResponse: googleapi.ServerResponse{
19788			Header:         res.Header,
19789			HTTPStatusCode: res.StatusCode,
19790		},
19791	}
19792	target := &ret
19793	if err := gensupport.DecodeResponse(target, res); err != nil {
19794		return nil, err
19795	}
19796	return ret, nil
19797	// {
19798	//   "description": "Retrieves the specified document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.",
19799	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
19800	//   "httpMethod": "GET",
19801	//   "id": "dialogflow.projects.knowledgeBases.documents.get",
19802	//   "parameterOrder": [
19803	//     "name"
19804	//   ],
19805	//   "parameters": {
19806	//     "name": {
19807	//       "description": "Required. The name of the document to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
19808	//       "location": "path",
19809	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
19810	//       "required": true,
19811	//       "type": "string"
19812	//     }
19813	//   },
19814	//   "path": "v2beta1/{+name}",
19815	//   "response": {
19816	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
19817	//   },
19818	//   "scopes": [
19819	//     "https://www.googleapis.com/auth/cloud-platform",
19820	//     "https://www.googleapis.com/auth/dialogflow"
19821	//   ]
19822	// }
19823
19824}
19825
19826// method id "dialogflow.projects.knowledgeBases.documents.list":
19827
19828type ProjectsKnowledgeBasesDocumentsListCall struct {
19829	s            *Service
19830	parent       string
19831	urlParams_   gensupport.URLParams
19832	ifNoneMatch_ string
19833	ctx_         context.Context
19834	header_      http.Header
19835}
19836
19837// List: Returns the list of all documents of the knowledge base.
19838//
19839// Note: The `projects.agent.knowledgeBases.documents` resource is
19840// deprecated;
19841// only use `projects.knowledgeBases.documents`.
19842func (r *ProjectsKnowledgeBasesDocumentsService) List(parent string) *ProjectsKnowledgeBasesDocumentsListCall {
19843	c := &ProjectsKnowledgeBasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19844	c.parent = parent
19845	return c
19846}
19847
19848// PageSize sets the optional parameter "pageSize": The maximum number
19849// of items to return in a single page. By
19850// default 10 and at most 100.
19851func (c *ProjectsKnowledgeBasesDocumentsListCall) PageSize(pageSize int64) *ProjectsKnowledgeBasesDocumentsListCall {
19852	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19853	return c
19854}
19855
19856// PageToken sets the optional parameter "pageToken": The
19857// next_page_token value returned from a previous list request.
19858func (c *ProjectsKnowledgeBasesDocumentsListCall) PageToken(pageToken string) *ProjectsKnowledgeBasesDocumentsListCall {
19859	c.urlParams_.Set("pageToken", pageToken)
19860	return c
19861}
19862
19863// Fields allows partial responses to be retrieved. See
19864// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19865// for more information.
19866func (c *ProjectsKnowledgeBasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsListCall {
19867	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19868	return c
19869}
19870
19871// IfNoneMatch sets the optional parameter which makes the operation
19872// fail if the object's ETag matches the given value. This is useful for
19873// getting updates only after the object has changed since the last
19874// request. Use googleapi.IsNotModified to check whether the response
19875// error from Do is the result of In-None-Match.
19876func (c *ProjectsKnowledgeBasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesDocumentsListCall {
19877	c.ifNoneMatch_ = entityTag
19878	return c
19879}
19880
19881// Context sets the context to be used in this call's Do method. Any
19882// pending HTTP request will be aborted if the provided context is
19883// canceled.
19884func (c *ProjectsKnowledgeBasesDocumentsListCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsListCall {
19885	c.ctx_ = ctx
19886	return c
19887}
19888
19889// Header returns an http.Header that can be modified by the caller to
19890// add HTTP headers to the request.
19891func (c *ProjectsKnowledgeBasesDocumentsListCall) Header() http.Header {
19892	if c.header_ == nil {
19893		c.header_ = make(http.Header)
19894	}
19895	return c.header_
19896}
19897
19898func (c *ProjectsKnowledgeBasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
19899	reqHeaders := make(http.Header)
19900	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19901	for k, v := range c.header_ {
19902		reqHeaders[k] = v
19903	}
19904	reqHeaders.Set("User-Agent", c.s.userAgent())
19905	if c.ifNoneMatch_ != "" {
19906		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19907	}
19908	var body io.Reader = nil
19909	c.urlParams_.Set("alt", alt)
19910	c.urlParams_.Set("prettyPrint", "false")
19911	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
19912	urls += "?" + c.urlParams_.Encode()
19913	req, err := http.NewRequest("GET", urls, body)
19914	if err != nil {
19915		return nil, err
19916	}
19917	req.Header = reqHeaders
19918	googleapi.Expand(req.URL, map[string]string{
19919		"parent": c.parent,
19920	})
19921	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19922}
19923
19924// Do executes the "dialogflow.projects.knowledgeBases.documents.list" call.
19925// Exactly one of *GoogleCloudDialogflowV2beta1ListDocumentsResponse or
19926// error will be non-nil. Any non-2xx status code is an error. Response
19927// headers are in either
19928// *GoogleCloudDialogflowV2beta1ListDocumentsResponse.ServerResponse.Head
19929// er or (if a response was returned at all) in
19930// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19931// whether the returned error was because http.StatusNotModified was
19932// returned.
19933func (c *ProjectsKnowledgeBasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListDocumentsResponse, error) {
19934	gensupport.SetOptions(c.urlParams_, opts...)
19935	res, err := c.doRequest("json")
19936	if res != nil && res.StatusCode == http.StatusNotModified {
19937		if res.Body != nil {
19938			res.Body.Close()
19939		}
19940		return nil, &googleapi.Error{
19941			Code:   res.StatusCode,
19942			Header: res.Header,
19943		}
19944	}
19945	if err != nil {
19946		return nil, err
19947	}
19948	defer googleapi.CloseBody(res)
19949	if err := googleapi.CheckResponse(res); err != nil {
19950		return nil, err
19951	}
19952	ret := &GoogleCloudDialogflowV2beta1ListDocumentsResponse{
19953		ServerResponse: googleapi.ServerResponse{
19954			Header:         res.Header,
19955			HTTPStatusCode: res.StatusCode,
19956		},
19957	}
19958	target := &ret
19959	if err := gensupport.DecodeResponse(target, res); err != nil {
19960		return nil, err
19961	}
19962	return ret, nil
19963	// {
19964	//   "description": "Returns the list of all documents of the knowledge base.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.",
19965	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents",
19966	//   "httpMethod": "GET",
19967	//   "id": "dialogflow.projects.knowledgeBases.documents.list",
19968	//   "parameterOrder": [
19969	//     "parent"
19970	//   ],
19971	//   "parameters": {
19972	//     "pageSize": {
19973	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
19974	//       "format": "int32",
19975	//       "location": "query",
19976	//       "type": "integer"
19977	//     },
19978	//     "pageToken": {
19979	//       "description": "Optional. The next_page_token value returned from a previous list request.",
19980	//       "location": "query",
19981	//       "type": "string"
19982	//     },
19983	//     "parent": {
19984	//       "description": "Required. The knowledge base to list all documents for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
19985	//       "location": "path",
19986	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
19987	//       "required": true,
19988	//       "type": "string"
19989	//     }
19990	//   },
19991	//   "path": "v2beta1/{+parent}/documents",
19992	//   "response": {
19993	//     "$ref": "GoogleCloudDialogflowV2beta1ListDocumentsResponse"
19994	//   },
19995	//   "scopes": [
19996	//     "https://www.googleapis.com/auth/cloud-platform",
19997	//     "https://www.googleapis.com/auth/dialogflow"
19998	//   ]
19999	// }
20000
20001}
20002
20003// Pages invokes f for each page of results.
20004// A non-nil error returned from f will halt the iteration.
20005// The provided context supersedes any context provided to the Context method.
20006func (c *ProjectsKnowledgeBasesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListDocumentsResponse) error) error {
20007	c.ctx_ = ctx
20008	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20009	for {
20010		x, err := c.Do()
20011		if err != nil {
20012			return err
20013		}
20014		if err := f(x); err != nil {
20015			return err
20016		}
20017		if x.NextPageToken == "" {
20018			return nil
20019		}
20020		c.PageToken(x.NextPageToken)
20021	}
20022}
20023
20024// method id "dialogflow.projects.knowledgeBases.documents.patch":
20025
20026type ProjectsKnowledgeBasesDocumentsPatchCall struct {
20027	s                                    *Service
20028	name                                 string
20029	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
20030	urlParams_                           gensupport.URLParams
20031	ctx_                                 context.Context
20032	header_                              http.Header
20033}
20034
20035// Patch: Updates the specified document.
20036//
20037// Note: The `projects.agent.knowledgeBases.documents` resource is
20038// deprecated;
20039// only use `projects.knowledgeBases.documents`.
20040//
20041// Operation <response: Document,
20042//            metadata: KnowledgeOperationMetadata>
20043func (r *ProjectsKnowledgeBasesDocumentsService) Patch(name string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsKnowledgeBasesDocumentsPatchCall {
20044	c := &ProjectsKnowledgeBasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20045	c.name = name
20046	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
20047	return c
20048}
20049
20050// UpdateMask sets the optional parameter "updateMask": Not specified
20051// means `update all`.
20052// Currently, only `display_name` can be updated, an InvalidArgument
20053// will be
20054// returned for attempting to update other fields.
20055func (c *ProjectsKnowledgeBasesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsKnowledgeBasesDocumentsPatchCall {
20056	c.urlParams_.Set("updateMask", updateMask)
20057	return c
20058}
20059
20060// Fields allows partial responses to be retrieved. See
20061// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20062// for more information.
20063func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsPatchCall {
20064	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20065	return c
20066}
20067
20068// Context sets the context to be used in this call's Do method. Any
20069// pending HTTP request will be aborted if the provided context is
20070// canceled.
20071func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsPatchCall {
20072	c.ctx_ = ctx
20073	return c
20074}
20075
20076// Header returns an http.Header that can be modified by the caller to
20077// add HTTP headers to the request.
20078func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Header() http.Header {
20079	if c.header_ == nil {
20080		c.header_ = make(http.Header)
20081	}
20082	return c.header_
20083}
20084
20085func (c *ProjectsKnowledgeBasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
20086	reqHeaders := make(http.Header)
20087	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20088	for k, v := range c.header_ {
20089		reqHeaders[k] = v
20090	}
20091	reqHeaders.Set("User-Agent", c.s.userAgent())
20092	var body io.Reader = nil
20093	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
20094	if err != nil {
20095		return nil, err
20096	}
20097	reqHeaders.Set("Content-Type", "application/json")
20098	c.urlParams_.Set("alt", alt)
20099	c.urlParams_.Set("prettyPrint", "false")
20100	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
20101	urls += "?" + c.urlParams_.Encode()
20102	req, err := http.NewRequest("PATCH", urls, body)
20103	if err != nil {
20104		return nil, err
20105	}
20106	req.Header = reqHeaders
20107	googleapi.Expand(req.URL, map[string]string{
20108		"name": c.name,
20109	})
20110	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20111}
20112
20113// Do executes the "dialogflow.projects.knowledgeBases.documents.patch" call.
20114// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
20115// Any non-2xx status code is an error. Response headers are in either
20116// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
20117// was returned at all) in error.(*googleapi.Error).Header. Use
20118// googleapi.IsNotModified to check whether the returned error was
20119// because http.StatusNotModified was returned.
20120func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
20121	gensupport.SetOptions(c.urlParams_, opts...)
20122	res, err := c.doRequest("json")
20123	if res != nil && res.StatusCode == http.StatusNotModified {
20124		if res.Body != nil {
20125			res.Body.Close()
20126		}
20127		return nil, &googleapi.Error{
20128			Code:   res.StatusCode,
20129			Header: res.Header,
20130		}
20131	}
20132	if err != nil {
20133		return nil, err
20134	}
20135	defer googleapi.CloseBody(res)
20136	if err := googleapi.CheckResponse(res); err != nil {
20137		return nil, err
20138	}
20139	ret := &GoogleLongrunningOperation{
20140		ServerResponse: googleapi.ServerResponse{
20141			Header:         res.Header,
20142			HTTPStatusCode: res.StatusCode,
20143		},
20144	}
20145	target := &ret
20146	if err := gensupport.DecodeResponse(target, res); err != nil {
20147		return nil, err
20148	}
20149	return ret, nil
20150	// {
20151	//   "description": "Updates the specified document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.\n\nOperation \u003cresponse: Document,\n           metadata: KnowledgeOperationMetadata\u003e",
20152	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
20153	//   "httpMethod": "PATCH",
20154	//   "id": "dialogflow.projects.knowledgeBases.documents.patch",
20155	//   "parameterOrder": [
20156	//     "name"
20157	//   ],
20158	//   "parameters": {
20159	//     "name": {
20160	//       "description": "The document resource name.\nThe name must be empty when creating a document.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
20161	//       "location": "path",
20162	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
20163	//       "required": true,
20164	//       "type": "string"
20165	//     },
20166	//     "updateMask": {
20167	//       "description": "Optional. Not specified means `update all`.\nCurrently, only `display_name` can be updated, an InvalidArgument will be\nreturned for attempting to update other fields.",
20168	//       "format": "google-fieldmask",
20169	//       "location": "query",
20170	//       "type": "string"
20171	//     }
20172	//   },
20173	//   "path": "v2beta1/{+name}",
20174	//   "request": {
20175	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
20176	//   },
20177	//   "response": {
20178	//     "$ref": "GoogleLongrunningOperation"
20179	//   },
20180	//   "scopes": [
20181	//     "https://www.googleapis.com/auth/cloud-platform",
20182	//     "https://www.googleapis.com/auth/dialogflow"
20183	//   ]
20184	// }
20185
20186}
20187
20188// method id "dialogflow.projects.knowledgeBases.documents.reload":
20189
20190type ProjectsKnowledgeBasesDocumentsReloadCall struct {
20191	s                                                 *Service
20192	name                                              string
20193	googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest
20194	urlParams_                                        gensupport.URLParams
20195	ctx_                                              context.Context
20196	header_                                           http.Header
20197}
20198
20199// Reload: Reloads the specified document from its specified source,
20200// content_uri or
20201// content. The previously loaded content of the document will be
20202// deleted.
20203// Note: Even when the content of the document has not changed, there
20204// still
20205// may be side effects because of internal implementation
20206// changes.
20207//
20208// Note: The `projects.agent.knowledgeBases.documents` resource is
20209// deprecated;
20210// only use `projects.knowledgeBases.documents`.
20211//
20212// Operation <response: Document,
20213//            metadata: KnowledgeOperationMetadata>
20214func (r *ProjectsKnowledgeBasesDocumentsService) Reload(name string, googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest) *ProjectsKnowledgeBasesDocumentsReloadCall {
20215	c := &ProjectsKnowledgeBasesDocumentsReloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20216	c.name = name
20217	c.googleclouddialogflowv2beta1reloaddocumentrequest = googleclouddialogflowv2beta1reloaddocumentrequest
20218	return c
20219}
20220
20221// Fields allows partial responses to be retrieved. See
20222// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20223// for more information.
20224func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsReloadCall {
20225	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20226	return c
20227}
20228
20229// Context sets the context to be used in this call's Do method. Any
20230// pending HTTP request will be aborted if the provided context is
20231// canceled.
20232func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsReloadCall {
20233	c.ctx_ = ctx
20234	return c
20235}
20236
20237// Header returns an http.Header that can be modified by the caller to
20238// add HTTP headers to the request.
20239func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Header() http.Header {
20240	if c.header_ == nil {
20241		c.header_ = make(http.Header)
20242	}
20243	return c.header_
20244}
20245
20246func (c *ProjectsKnowledgeBasesDocumentsReloadCall) doRequest(alt string) (*http.Response, error) {
20247	reqHeaders := make(http.Header)
20248	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20249	for k, v := range c.header_ {
20250		reqHeaders[k] = v
20251	}
20252	reqHeaders.Set("User-Agent", c.s.userAgent())
20253	var body io.Reader = nil
20254	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1reloaddocumentrequest)
20255	if err != nil {
20256		return nil, err
20257	}
20258	reqHeaders.Set("Content-Type", "application/json")
20259	c.urlParams_.Set("alt", alt)
20260	c.urlParams_.Set("prettyPrint", "false")
20261	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:reload")
20262	urls += "?" + c.urlParams_.Encode()
20263	req, err := http.NewRequest("POST", urls, body)
20264	if err != nil {
20265		return nil, err
20266	}
20267	req.Header = reqHeaders
20268	googleapi.Expand(req.URL, map[string]string{
20269		"name": c.name,
20270	})
20271	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20272}
20273
20274// Do executes the "dialogflow.projects.knowledgeBases.documents.reload" call.
20275// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
20276// Any non-2xx status code is an error. Response headers are in either
20277// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
20278// was returned at all) in error.(*googleapi.Error).Header. Use
20279// googleapi.IsNotModified to check whether the returned error was
20280// because http.StatusNotModified was returned.
20281func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
20282	gensupport.SetOptions(c.urlParams_, opts...)
20283	res, err := c.doRequest("json")
20284	if res != nil && res.StatusCode == http.StatusNotModified {
20285		if res.Body != nil {
20286			res.Body.Close()
20287		}
20288		return nil, &googleapi.Error{
20289			Code:   res.StatusCode,
20290			Header: res.Header,
20291		}
20292	}
20293	if err != nil {
20294		return nil, err
20295	}
20296	defer googleapi.CloseBody(res)
20297	if err := googleapi.CheckResponse(res); err != nil {
20298		return nil, err
20299	}
20300	ret := &GoogleLongrunningOperation{
20301		ServerResponse: googleapi.ServerResponse{
20302			Header:         res.Header,
20303			HTTPStatusCode: res.StatusCode,
20304		},
20305	}
20306	target := &ret
20307	if err := gensupport.DecodeResponse(target, res); err != nil {
20308		return nil, err
20309	}
20310	return ret, nil
20311	// {
20312	//   "description": "Reloads the specified document from its specified source, content_uri or\ncontent. The previously loaded content of the document will be deleted.\nNote: Even when the content of the document has not changed, there still\nmay be side effects because of internal implementation changes.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.\n\nOperation \u003cresponse: Document,\n           metadata: KnowledgeOperationMetadata\u003e",
20313	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload",
20314	//   "httpMethod": "POST",
20315	//   "id": "dialogflow.projects.knowledgeBases.documents.reload",
20316	//   "parameterOrder": [
20317	//     "name"
20318	//   ],
20319	//   "parameters": {
20320	//     "name": {
20321	//       "description": "The name of the document to reload.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`",
20322	//       "location": "path",
20323	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
20324	//       "required": true,
20325	//       "type": "string"
20326	//     }
20327	//   },
20328	//   "path": "v2beta1/{+name}:reload",
20329	//   "request": {
20330	//     "$ref": "GoogleCloudDialogflowV2beta1ReloadDocumentRequest"
20331	//   },
20332	//   "response": {
20333	//     "$ref": "GoogleLongrunningOperation"
20334	//   },
20335	//   "scopes": [
20336	//     "https://www.googleapis.com/auth/cloud-platform",
20337	//     "https://www.googleapis.com/auth/dialogflow"
20338	//   ]
20339	// }
20340
20341}
20342
20343// method id "dialogflow.projects.locations.agent":
20344
20345type ProjectsLocationsAgentCall struct {
20346	s                                 *Service
20347	parent                            string
20348	googleclouddialogflowv2beta1agent *GoogleCloudDialogflowV2beta1Agent
20349	urlParams_                        gensupport.URLParams
20350	ctx_                              context.Context
20351	header_                           http.Header
20352}
20353
20354// Agent: Creates/updates the specified agent.
20355func (r *ProjectsLocationsService) Agent(parent string, googleclouddialogflowv2beta1agent *GoogleCloudDialogflowV2beta1Agent) *ProjectsLocationsAgentCall {
20356	c := &ProjectsLocationsAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20357	c.parent = parent
20358	c.googleclouddialogflowv2beta1agent = googleclouddialogflowv2beta1agent
20359	return c
20360}
20361
20362// UpdateMask sets the optional parameter "updateMask": The mask to
20363// control which fields get updated.
20364func (c *ProjectsLocationsAgentCall) UpdateMask(updateMask string) *ProjectsLocationsAgentCall {
20365	c.urlParams_.Set("updateMask", updateMask)
20366	return c
20367}
20368
20369// Fields allows partial responses to be retrieved. See
20370// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20371// for more information.
20372func (c *ProjectsLocationsAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentCall {
20373	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20374	return c
20375}
20376
20377// Context sets the context to be used in this call's Do method. Any
20378// pending HTTP request will be aborted if the provided context is
20379// canceled.
20380func (c *ProjectsLocationsAgentCall) Context(ctx context.Context) *ProjectsLocationsAgentCall {
20381	c.ctx_ = ctx
20382	return c
20383}
20384
20385// Header returns an http.Header that can be modified by the caller to
20386// add HTTP headers to the request.
20387func (c *ProjectsLocationsAgentCall) Header() http.Header {
20388	if c.header_ == nil {
20389		c.header_ = make(http.Header)
20390	}
20391	return c.header_
20392}
20393
20394func (c *ProjectsLocationsAgentCall) doRequest(alt string) (*http.Response, error) {
20395	reqHeaders := make(http.Header)
20396	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20397	for k, v := range c.header_ {
20398		reqHeaders[k] = v
20399	}
20400	reqHeaders.Set("User-Agent", c.s.userAgent())
20401	var body io.Reader = nil
20402	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1agent)
20403	if err != nil {
20404		return nil, err
20405	}
20406	reqHeaders.Set("Content-Type", "application/json")
20407	c.urlParams_.Set("alt", alt)
20408	c.urlParams_.Set("prettyPrint", "false")
20409	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
20410	urls += "?" + c.urlParams_.Encode()
20411	req, err := http.NewRequest("POST", urls, body)
20412	if err != nil {
20413		return nil, err
20414	}
20415	req.Header = reqHeaders
20416	googleapi.Expand(req.URL, map[string]string{
20417		"parent": c.parent,
20418	})
20419	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20420}
20421
20422// Do executes the "dialogflow.projects.locations.agent" call.
20423// Exactly one of *GoogleCloudDialogflowV2beta1Agent or error will be
20424// non-nil. Any non-2xx status code is an error. Response headers are in
20425// either *GoogleCloudDialogflowV2beta1Agent.ServerResponse.Header or
20426// (if a response was returned at all) in
20427// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20428// whether the returned error was because http.StatusNotModified was
20429// returned.
20430func (c *ProjectsLocationsAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Agent, error) {
20431	gensupport.SetOptions(c.urlParams_, opts...)
20432	res, err := c.doRequest("json")
20433	if res != nil && res.StatusCode == http.StatusNotModified {
20434		if res.Body != nil {
20435			res.Body.Close()
20436		}
20437		return nil, &googleapi.Error{
20438			Code:   res.StatusCode,
20439			Header: res.Header,
20440		}
20441	}
20442	if err != nil {
20443		return nil, err
20444	}
20445	defer googleapi.CloseBody(res)
20446	if err := googleapi.CheckResponse(res); err != nil {
20447		return nil, err
20448	}
20449	ret := &GoogleCloudDialogflowV2beta1Agent{
20450		ServerResponse: googleapi.ServerResponse{
20451			Header:         res.Header,
20452			HTTPStatusCode: res.StatusCode,
20453		},
20454	}
20455	target := &ret
20456	if err := gensupport.DecodeResponse(target, res); err != nil {
20457		return nil, err
20458	}
20459	return ret, nil
20460	// {
20461	//   "description": "Creates/updates the specified agent.",
20462	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent",
20463	//   "httpMethod": "POST",
20464	//   "id": "dialogflow.projects.locations.agent",
20465	//   "parameterOrder": [
20466	//     "parent"
20467	//   ],
20468	//   "parameters": {
20469	//     "parent": {
20470	//       "description": "Required. The project of this agent.\nFormat: `projects/\u003cProject ID\u003e`.",
20471	//       "location": "path",
20472	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
20473	//       "required": true,
20474	//       "type": "string"
20475	//     },
20476	//     "updateMask": {
20477	//       "description": "Optional. The mask to control which fields get updated.",
20478	//       "format": "google-fieldmask",
20479	//       "location": "query",
20480	//       "type": "string"
20481	//     }
20482	//   },
20483	//   "path": "v2beta1/{+parent}/agent",
20484	//   "request": {
20485	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
20486	//   },
20487	//   "response": {
20488	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
20489	//   },
20490	//   "scopes": [
20491	//     "https://www.googleapis.com/auth/cloud-platform",
20492	//     "https://www.googleapis.com/auth/dialogflow"
20493	//   ]
20494	// }
20495
20496}
20497
20498// method id "dialogflow.projects.locations.deleteAgent":
20499
20500type ProjectsLocationsDeleteAgentCall struct {
20501	s          *Service
20502	parent     string
20503	urlParams_ gensupport.URLParams
20504	ctx_       context.Context
20505	header_    http.Header
20506}
20507
20508// DeleteAgent: Deletes the specified agent.
20509func (r *ProjectsLocationsService) DeleteAgent(parent string) *ProjectsLocationsDeleteAgentCall {
20510	c := &ProjectsLocationsDeleteAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20511	c.parent = parent
20512	return c
20513}
20514
20515// Fields allows partial responses to be retrieved. See
20516// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20517// for more information.
20518func (c *ProjectsLocationsDeleteAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeleteAgentCall {
20519	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20520	return c
20521}
20522
20523// Context sets the context to be used in this call's Do method. Any
20524// pending HTTP request will be aborted if the provided context is
20525// canceled.
20526func (c *ProjectsLocationsDeleteAgentCall) Context(ctx context.Context) *ProjectsLocationsDeleteAgentCall {
20527	c.ctx_ = ctx
20528	return c
20529}
20530
20531// Header returns an http.Header that can be modified by the caller to
20532// add HTTP headers to the request.
20533func (c *ProjectsLocationsDeleteAgentCall) Header() http.Header {
20534	if c.header_ == nil {
20535		c.header_ = make(http.Header)
20536	}
20537	return c.header_
20538}
20539
20540func (c *ProjectsLocationsDeleteAgentCall) doRequest(alt string) (*http.Response, error) {
20541	reqHeaders := make(http.Header)
20542	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20543	for k, v := range c.header_ {
20544		reqHeaders[k] = v
20545	}
20546	reqHeaders.Set("User-Agent", c.s.userAgent())
20547	var body io.Reader = nil
20548	c.urlParams_.Set("alt", alt)
20549	c.urlParams_.Set("prettyPrint", "false")
20550	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
20551	urls += "?" + c.urlParams_.Encode()
20552	req, err := http.NewRequest("DELETE", urls, body)
20553	if err != nil {
20554		return nil, err
20555	}
20556	req.Header = reqHeaders
20557	googleapi.Expand(req.URL, map[string]string{
20558		"parent": c.parent,
20559	})
20560	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20561}
20562
20563// Do executes the "dialogflow.projects.locations.deleteAgent" call.
20564// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
20565// non-2xx status code is an error. Response headers are in either
20566// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
20567// returned at all) in error.(*googleapi.Error).Header. Use
20568// googleapi.IsNotModified to check whether the returned error was
20569// because http.StatusNotModified was returned.
20570func (c *ProjectsLocationsDeleteAgentCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
20571	gensupport.SetOptions(c.urlParams_, opts...)
20572	res, err := c.doRequest("json")
20573	if res != nil && res.StatusCode == http.StatusNotModified {
20574		if res.Body != nil {
20575			res.Body.Close()
20576		}
20577		return nil, &googleapi.Error{
20578			Code:   res.StatusCode,
20579			Header: res.Header,
20580		}
20581	}
20582	if err != nil {
20583		return nil, err
20584	}
20585	defer googleapi.CloseBody(res)
20586	if err := googleapi.CheckResponse(res); err != nil {
20587		return nil, err
20588	}
20589	ret := &GoogleProtobufEmpty{
20590		ServerResponse: googleapi.ServerResponse{
20591			Header:         res.Header,
20592			HTTPStatusCode: res.StatusCode,
20593		},
20594	}
20595	target := &ret
20596	if err := gensupport.DecodeResponse(target, res); err != nil {
20597		return nil, err
20598	}
20599	return ret, nil
20600	// {
20601	//   "description": "Deletes the specified agent.",
20602	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent",
20603	//   "httpMethod": "DELETE",
20604	//   "id": "dialogflow.projects.locations.deleteAgent",
20605	//   "parameterOrder": [
20606	//     "parent"
20607	//   ],
20608	//   "parameters": {
20609	//     "parent": {
20610	//       "description": "Required. The project that the agent to delete is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
20611	//       "location": "path",
20612	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
20613	//       "required": true,
20614	//       "type": "string"
20615	//     }
20616	//   },
20617	//   "path": "v2beta1/{+parent}/agent",
20618	//   "response": {
20619	//     "$ref": "GoogleProtobufEmpty"
20620	//   },
20621	//   "scopes": [
20622	//     "https://www.googleapis.com/auth/cloud-platform",
20623	//     "https://www.googleapis.com/auth/dialogflow"
20624	//   ]
20625	// }
20626
20627}
20628
20629// method id "dialogflow.projects.locations.getAgent":
20630
20631type ProjectsLocationsGetAgentCall struct {
20632	s            *Service
20633	parent       string
20634	urlParams_   gensupport.URLParams
20635	ifNoneMatch_ string
20636	ctx_         context.Context
20637	header_      http.Header
20638}
20639
20640// GetAgent: Retrieves the specified agent.
20641func (r *ProjectsLocationsService) GetAgent(parent string) *ProjectsLocationsGetAgentCall {
20642	c := &ProjectsLocationsGetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20643	c.parent = parent
20644	return c
20645}
20646
20647// Fields allows partial responses to be retrieved. See
20648// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20649// for more information.
20650func (c *ProjectsLocationsGetAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetAgentCall {
20651	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20652	return c
20653}
20654
20655// IfNoneMatch sets the optional parameter which makes the operation
20656// fail if the object's ETag matches the given value. This is useful for
20657// getting updates only after the object has changed since the last
20658// request. Use googleapi.IsNotModified to check whether the response
20659// error from Do is the result of In-None-Match.
20660func (c *ProjectsLocationsGetAgentCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetAgentCall {
20661	c.ifNoneMatch_ = entityTag
20662	return c
20663}
20664
20665// Context sets the context to be used in this call's Do method. Any
20666// pending HTTP request will be aborted if the provided context is
20667// canceled.
20668func (c *ProjectsLocationsGetAgentCall) Context(ctx context.Context) *ProjectsLocationsGetAgentCall {
20669	c.ctx_ = ctx
20670	return c
20671}
20672
20673// Header returns an http.Header that can be modified by the caller to
20674// add HTTP headers to the request.
20675func (c *ProjectsLocationsGetAgentCall) Header() http.Header {
20676	if c.header_ == nil {
20677		c.header_ = make(http.Header)
20678	}
20679	return c.header_
20680}
20681
20682func (c *ProjectsLocationsGetAgentCall) doRequest(alt string) (*http.Response, error) {
20683	reqHeaders := make(http.Header)
20684	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20685	for k, v := range c.header_ {
20686		reqHeaders[k] = v
20687	}
20688	reqHeaders.Set("User-Agent", c.s.userAgent())
20689	if c.ifNoneMatch_ != "" {
20690		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20691	}
20692	var body io.Reader = nil
20693	c.urlParams_.Set("alt", alt)
20694	c.urlParams_.Set("prettyPrint", "false")
20695	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
20696	urls += "?" + c.urlParams_.Encode()
20697	req, err := http.NewRequest("GET", urls, body)
20698	if err != nil {
20699		return nil, err
20700	}
20701	req.Header = reqHeaders
20702	googleapi.Expand(req.URL, map[string]string{
20703		"parent": c.parent,
20704	})
20705	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20706}
20707
20708// Do executes the "dialogflow.projects.locations.getAgent" call.
20709// Exactly one of *GoogleCloudDialogflowV2beta1Agent or error will be
20710// non-nil. Any non-2xx status code is an error. Response headers are in
20711// either *GoogleCloudDialogflowV2beta1Agent.ServerResponse.Header or
20712// (if a response was returned at all) in
20713// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20714// whether the returned error was because http.StatusNotModified was
20715// returned.
20716func (c *ProjectsLocationsGetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Agent, error) {
20717	gensupport.SetOptions(c.urlParams_, opts...)
20718	res, err := c.doRequest("json")
20719	if res != nil && res.StatusCode == http.StatusNotModified {
20720		if res.Body != nil {
20721			res.Body.Close()
20722		}
20723		return nil, &googleapi.Error{
20724			Code:   res.StatusCode,
20725			Header: res.Header,
20726		}
20727	}
20728	if err != nil {
20729		return nil, err
20730	}
20731	defer googleapi.CloseBody(res)
20732	if err := googleapi.CheckResponse(res); err != nil {
20733		return nil, err
20734	}
20735	ret := &GoogleCloudDialogflowV2beta1Agent{
20736		ServerResponse: googleapi.ServerResponse{
20737			Header:         res.Header,
20738			HTTPStatusCode: res.StatusCode,
20739		},
20740	}
20741	target := &ret
20742	if err := gensupport.DecodeResponse(target, res); err != nil {
20743		return nil, err
20744	}
20745	return ret, nil
20746	// {
20747	//   "description": "Retrieves the specified agent.",
20748	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent",
20749	//   "httpMethod": "GET",
20750	//   "id": "dialogflow.projects.locations.getAgent",
20751	//   "parameterOrder": [
20752	//     "parent"
20753	//   ],
20754	//   "parameters": {
20755	//     "parent": {
20756	//       "description": "Required. The project that the agent to fetch is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
20757	//       "location": "path",
20758	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
20759	//       "required": true,
20760	//       "type": "string"
20761	//     }
20762	//   },
20763	//   "path": "v2beta1/{+parent}/agent",
20764	//   "response": {
20765	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
20766	//   },
20767	//   "scopes": [
20768	//     "https://www.googleapis.com/auth/cloud-platform",
20769	//     "https://www.googleapis.com/auth/dialogflow"
20770	//   ]
20771	// }
20772
20773}
20774
20775// method id "dialogflow.projects.locations.agent.export":
20776
20777type ProjectsLocationsAgentExportCall struct {
20778	s                                              *Service
20779	parent                                         string
20780	googleclouddialogflowv2beta1exportagentrequest *GoogleCloudDialogflowV2beta1ExportAgentRequest
20781	urlParams_                                     gensupport.URLParams
20782	ctx_                                           context.Context
20783	header_                                        http.Header
20784}
20785
20786// Export: Exports the specified agent to a ZIP file.
20787//
20788//
20789// Operation <response: ExportAgentResponse>
20790func (r *ProjectsLocationsAgentService) Export(parent string, googleclouddialogflowv2beta1exportagentrequest *GoogleCloudDialogflowV2beta1ExportAgentRequest) *ProjectsLocationsAgentExportCall {
20791	c := &ProjectsLocationsAgentExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20792	c.parent = parent
20793	c.googleclouddialogflowv2beta1exportagentrequest = googleclouddialogflowv2beta1exportagentrequest
20794	return c
20795}
20796
20797// Fields allows partial responses to be retrieved. See
20798// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20799// for more information.
20800func (c *ProjectsLocationsAgentExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentExportCall {
20801	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20802	return c
20803}
20804
20805// Context sets the context to be used in this call's Do method. Any
20806// pending HTTP request will be aborted if the provided context is
20807// canceled.
20808func (c *ProjectsLocationsAgentExportCall) Context(ctx context.Context) *ProjectsLocationsAgentExportCall {
20809	c.ctx_ = ctx
20810	return c
20811}
20812
20813// Header returns an http.Header that can be modified by the caller to
20814// add HTTP headers to the request.
20815func (c *ProjectsLocationsAgentExportCall) Header() http.Header {
20816	if c.header_ == nil {
20817		c.header_ = make(http.Header)
20818	}
20819	return c.header_
20820}
20821
20822func (c *ProjectsLocationsAgentExportCall) doRequest(alt string) (*http.Response, error) {
20823	reqHeaders := make(http.Header)
20824	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20825	for k, v := range c.header_ {
20826		reqHeaders[k] = v
20827	}
20828	reqHeaders.Set("User-Agent", c.s.userAgent())
20829	var body io.Reader = nil
20830	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1exportagentrequest)
20831	if err != nil {
20832		return nil, err
20833	}
20834	reqHeaders.Set("Content-Type", "application/json")
20835	c.urlParams_.Set("alt", alt)
20836	c.urlParams_.Set("prettyPrint", "false")
20837	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:export")
20838	urls += "?" + c.urlParams_.Encode()
20839	req, err := http.NewRequest("POST", urls, body)
20840	if err != nil {
20841		return nil, err
20842	}
20843	req.Header = reqHeaders
20844	googleapi.Expand(req.URL, map[string]string{
20845		"parent": c.parent,
20846	})
20847	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20848}
20849
20850// Do executes the "dialogflow.projects.locations.agent.export" call.
20851// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
20852// Any non-2xx status code is an error. Response headers are in either
20853// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
20854// was returned at all) in error.(*googleapi.Error).Header. Use
20855// googleapi.IsNotModified to check whether the returned error was
20856// because http.StatusNotModified was returned.
20857func (c *ProjectsLocationsAgentExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
20858	gensupport.SetOptions(c.urlParams_, opts...)
20859	res, err := c.doRequest("json")
20860	if res != nil && res.StatusCode == http.StatusNotModified {
20861		if res.Body != nil {
20862			res.Body.Close()
20863		}
20864		return nil, &googleapi.Error{
20865			Code:   res.StatusCode,
20866			Header: res.Header,
20867		}
20868	}
20869	if err != nil {
20870		return nil, err
20871	}
20872	defer googleapi.CloseBody(res)
20873	if err := googleapi.CheckResponse(res); err != nil {
20874		return nil, err
20875	}
20876	ret := &GoogleLongrunningOperation{
20877		ServerResponse: googleapi.ServerResponse{
20878			Header:         res.Header,
20879			HTTPStatusCode: res.StatusCode,
20880		},
20881	}
20882	target := &ret
20883	if err := gensupport.DecodeResponse(target, res); err != nil {
20884		return nil, err
20885	}
20886	return ret, nil
20887	// {
20888	//   "description": "Exports the specified agent to a ZIP file.\n\n\nOperation \u003cresponse: ExportAgentResponse\u003e",
20889	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:export",
20890	//   "httpMethod": "POST",
20891	//   "id": "dialogflow.projects.locations.agent.export",
20892	//   "parameterOrder": [
20893	//     "parent"
20894	//   ],
20895	//   "parameters": {
20896	//     "parent": {
20897	//       "description": "Required. The project that the agent to export is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
20898	//       "location": "path",
20899	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
20900	//       "required": true,
20901	//       "type": "string"
20902	//     }
20903	//   },
20904	//   "path": "v2beta1/{+parent}/agent:export",
20905	//   "request": {
20906	//     "$ref": "GoogleCloudDialogflowV2beta1ExportAgentRequest"
20907	//   },
20908	//   "response": {
20909	//     "$ref": "GoogleLongrunningOperation"
20910	//   },
20911	//   "scopes": [
20912	//     "https://www.googleapis.com/auth/cloud-platform",
20913	//     "https://www.googleapis.com/auth/dialogflow"
20914	//   ]
20915	// }
20916
20917}
20918
20919// method id "dialogflow.projects.locations.agent.import":
20920
20921type ProjectsLocationsAgentImportCall struct {
20922	s                                              *Service
20923	parent                                         string
20924	googleclouddialogflowv2beta1importagentrequest *GoogleCloudDialogflowV2beta1ImportAgentRequest
20925	urlParams_                                     gensupport.URLParams
20926	ctx_                                           context.Context
20927	header_                                        http.Header
20928}
20929
20930// Import: Imports the specified agent from a ZIP file.
20931//
20932// Uploads new intents and entity types without deleting the existing
20933// ones.
20934// Intents and entity types with the same name are replaced with the
20935// new
20936// versions from ImportAgentRequest.
20937//
20938//
20939// Operation <response: google.protobuf.Empty>
20940func (r *ProjectsLocationsAgentService) Import(parent string, googleclouddialogflowv2beta1importagentrequest *GoogleCloudDialogflowV2beta1ImportAgentRequest) *ProjectsLocationsAgentImportCall {
20941	c := &ProjectsLocationsAgentImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20942	c.parent = parent
20943	c.googleclouddialogflowv2beta1importagentrequest = googleclouddialogflowv2beta1importagentrequest
20944	return c
20945}
20946
20947// Fields allows partial responses to be retrieved. See
20948// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20949// for more information.
20950func (c *ProjectsLocationsAgentImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentImportCall {
20951	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20952	return c
20953}
20954
20955// Context sets the context to be used in this call's Do method. Any
20956// pending HTTP request will be aborted if the provided context is
20957// canceled.
20958func (c *ProjectsLocationsAgentImportCall) Context(ctx context.Context) *ProjectsLocationsAgentImportCall {
20959	c.ctx_ = ctx
20960	return c
20961}
20962
20963// Header returns an http.Header that can be modified by the caller to
20964// add HTTP headers to the request.
20965func (c *ProjectsLocationsAgentImportCall) Header() http.Header {
20966	if c.header_ == nil {
20967		c.header_ = make(http.Header)
20968	}
20969	return c.header_
20970}
20971
20972func (c *ProjectsLocationsAgentImportCall) doRequest(alt string) (*http.Response, error) {
20973	reqHeaders := make(http.Header)
20974	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20975	for k, v := range c.header_ {
20976		reqHeaders[k] = v
20977	}
20978	reqHeaders.Set("User-Agent", c.s.userAgent())
20979	var body io.Reader = nil
20980	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1importagentrequest)
20981	if err != nil {
20982		return nil, err
20983	}
20984	reqHeaders.Set("Content-Type", "application/json")
20985	c.urlParams_.Set("alt", alt)
20986	c.urlParams_.Set("prettyPrint", "false")
20987	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:import")
20988	urls += "?" + c.urlParams_.Encode()
20989	req, err := http.NewRequest("POST", urls, body)
20990	if err != nil {
20991		return nil, err
20992	}
20993	req.Header = reqHeaders
20994	googleapi.Expand(req.URL, map[string]string{
20995		"parent": c.parent,
20996	})
20997	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20998}
20999
21000// Do executes the "dialogflow.projects.locations.agent.import" call.
21001// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
21002// Any non-2xx status code is an error. Response headers are in either
21003// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
21004// was returned at all) in error.(*googleapi.Error).Header. Use
21005// googleapi.IsNotModified to check whether the returned error was
21006// because http.StatusNotModified was returned.
21007func (c *ProjectsLocationsAgentImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
21008	gensupport.SetOptions(c.urlParams_, opts...)
21009	res, err := c.doRequest("json")
21010	if res != nil && res.StatusCode == http.StatusNotModified {
21011		if res.Body != nil {
21012			res.Body.Close()
21013		}
21014		return nil, &googleapi.Error{
21015			Code:   res.StatusCode,
21016			Header: res.Header,
21017		}
21018	}
21019	if err != nil {
21020		return nil, err
21021	}
21022	defer googleapi.CloseBody(res)
21023	if err := googleapi.CheckResponse(res); err != nil {
21024		return nil, err
21025	}
21026	ret := &GoogleLongrunningOperation{
21027		ServerResponse: googleapi.ServerResponse{
21028			Header:         res.Header,
21029			HTTPStatusCode: res.StatusCode,
21030		},
21031	}
21032	target := &ret
21033	if err := gensupport.DecodeResponse(target, res); err != nil {
21034		return nil, err
21035	}
21036	return ret, nil
21037	// {
21038	//   "description": "Imports the specified agent from a ZIP file.\n\nUploads new intents and entity types without deleting the existing ones.\nIntents and entity types with the same name are replaced with the new\nversions from ImportAgentRequest.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
21039	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:import",
21040	//   "httpMethod": "POST",
21041	//   "id": "dialogflow.projects.locations.agent.import",
21042	//   "parameterOrder": [
21043	//     "parent"
21044	//   ],
21045	//   "parameters": {
21046	//     "parent": {
21047	//       "description": "Required. The project that the agent to import is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
21048	//       "location": "path",
21049	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
21050	//       "required": true,
21051	//       "type": "string"
21052	//     }
21053	//   },
21054	//   "path": "v2beta1/{+parent}/agent:import",
21055	//   "request": {
21056	//     "$ref": "GoogleCloudDialogflowV2beta1ImportAgentRequest"
21057	//   },
21058	//   "response": {
21059	//     "$ref": "GoogleLongrunningOperation"
21060	//   },
21061	//   "scopes": [
21062	//     "https://www.googleapis.com/auth/cloud-platform",
21063	//     "https://www.googleapis.com/auth/dialogflow"
21064	//   ]
21065	// }
21066
21067}
21068
21069// method id "dialogflow.projects.locations.agent.restore":
21070
21071type ProjectsLocationsAgentRestoreCall struct {
21072	s                                               *Service
21073	parent                                          string
21074	googleclouddialogflowv2beta1restoreagentrequest *GoogleCloudDialogflowV2beta1RestoreAgentRequest
21075	urlParams_                                      gensupport.URLParams
21076	ctx_                                            context.Context
21077	header_                                         http.Header
21078}
21079
21080// Restore: Restores the specified agent from a ZIP file.
21081//
21082// Replaces the current agent version with a new one. All the intents
21083// and
21084// entity types in the older version are deleted.
21085//
21086//
21087// Operation <response: google.protobuf.Empty>
21088func (r *ProjectsLocationsAgentService) Restore(parent string, googleclouddialogflowv2beta1restoreagentrequest *GoogleCloudDialogflowV2beta1RestoreAgentRequest) *ProjectsLocationsAgentRestoreCall {
21089	c := &ProjectsLocationsAgentRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21090	c.parent = parent
21091	c.googleclouddialogflowv2beta1restoreagentrequest = googleclouddialogflowv2beta1restoreagentrequest
21092	return c
21093}
21094
21095// Fields allows partial responses to be retrieved. See
21096// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21097// for more information.
21098func (c *ProjectsLocationsAgentRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentRestoreCall {
21099	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21100	return c
21101}
21102
21103// Context sets the context to be used in this call's Do method. Any
21104// pending HTTP request will be aborted if the provided context is
21105// canceled.
21106func (c *ProjectsLocationsAgentRestoreCall) Context(ctx context.Context) *ProjectsLocationsAgentRestoreCall {
21107	c.ctx_ = ctx
21108	return c
21109}
21110
21111// Header returns an http.Header that can be modified by the caller to
21112// add HTTP headers to the request.
21113func (c *ProjectsLocationsAgentRestoreCall) Header() http.Header {
21114	if c.header_ == nil {
21115		c.header_ = make(http.Header)
21116	}
21117	return c.header_
21118}
21119
21120func (c *ProjectsLocationsAgentRestoreCall) doRequest(alt string) (*http.Response, error) {
21121	reqHeaders := make(http.Header)
21122	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21123	for k, v := range c.header_ {
21124		reqHeaders[k] = v
21125	}
21126	reqHeaders.Set("User-Agent", c.s.userAgent())
21127	var body io.Reader = nil
21128	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1restoreagentrequest)
21129	if err != nil {
21130		return nil, err
21131	}
21132	reqHeaders.Set("Content-Type", "application/json")
21133	c.urlParams_.Set("alt", alt)
21134	c.urlParams_.Set("prettyPrint", "false")
21135	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:restore")
21136	urls += "?" + c.urlParams_.Encode()
21137	req, err := http.NewRequest("POST", urls, body)
21138	if err != nil {
21139		return nil, err
21140	}
21141	req.Header = reqHeaders
21142	googleapi.Expand(req.URL, map[string]string{
21143		"parent": c.parent,
21144	})
21145	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21146}
21147
21148// Do executes the "dialogflow.projects.locations.agent.restore" call.
21149// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
21150// Any non-2xx status code is an error. Response headers are in either
21151// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
21152// was returned at all) in error.(*googleapi.Error).Header. Use
21153// googleapi.IsNotModified to check whether the returned error was
21154// because http.StatusNotModified was returned.
21155func (c *ProjectsLocationsAgentRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
21156	gensupport.SetOptions(c.urlParams_, opts...)
21157	res, err := c.doRequest("json")
21158	if res != nil && res.StatusCode == http.StatusNotModified {
21159		if res.Body != nil {
21160			res.Body.Close()
21161		}
21162		return nil, &googleapi.Error{
21163			Code:   res.StatusCode,
21164			Header: res.Header,
21165		}
21166	}
21167	if err != nil {
21168		return nil, err
21169	}
21170	defer googleapi.CloseBody(res)
21171	if err := googleapi.CheckResponse(res); err != nil {
21172		return nil, err
21173	}
21174	ret := &GoogleLongrunningOperation{
21175		ServerResponse: googleapi.ServerResponse{
21176			Header:         res.Header,
21177			HTTPStatusCode: res.StatusCode,
21178		},
21179	}
21180	target := &ret
21181	if err := gensupport.DecodeResponse(target, res); err != nil {
21182		return nil, err
21183	}
21184	return ret, nil
21185	// {
21186	//   "description": "Restores the specified agent from a ZIP file.\n\nReplaces the current agent version with a new one. All the intents and\nentity types in the older version are deleted.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
21187	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:restore",
21188	//   "httpMethod": "POST",
21189	//   "id": "dialogflow.projects.locations.agent.restore",
21190	//   "parameterOrder": [
21191	//     "parent"
21192	//   ],
21193	//   "parameters": {
21194	//     "parent": {
21195	//       "description": "Required. The project that the agent to restore is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
21196	//       "location": "path",
21197	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
21198	//       "required": true,
21199	//       "type": "string"
21200	//     }
21201	//   },
21202	//   "path": "v2beta1/{+parent}/agent:restore",
21203	//   "request": {
21204	//     "$ref": "GoogleCloudDialogflowV2beta1RestoreAgentRequest"
21205	//   },
21206	//   "response": {
21207	//     "$ref": "GoogleLongrunningOperation"
21208	//   },
21209	//   "scopes": [
21210	//     "https://www.googleapis.com/auth/cloud-platform",
21211	//     "https://www.googleapis.com/auth/dialogflow"
21212	//   ]
21213	// }
21214
21215}
21216
21217// method id "dialogflow.projects.locations.agent.train":
21218
21219type ProjectsLocationsAgentTrainCall struct {
21220	s                                             *Service
21221	parent                                        string
21222	googleclouddialogflowv2beta1trainagentrequest *GoogleCloudDialogflowV2beta1TrainAgentRequest
21223	urlParams_                                    gensupport.URLParams
21224	ctx_                                          context.Context
21225	header_                                       http.Header
21226}
21227
21228// Train: Trains the specified agent.
21229//
21230//
21231// Operation <response: google.protobuf.Empty>
21232func (r *ProjectsLocationsAgentService) Train(parent string, googleclouddialogflowv2beta1trainagentrequest *GoogleCloudDialogflowV2beta1TrainAgentRequest) *ProjectsLocationsAgentTrainCall {
21233	c := &ProjectsLocationsAgentTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21234	c.parent = parent
21235	c.googleclouddialogflowv2beta1trainagentrequest = googleclouddialogflowv2beta1trainagentrequest
21236	return c
21237}
21238
21239// Fields allows partial responses to be retrieved. See
21240// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21241// for more information.
21242func (c *ProjectsLocationsAgentTrainCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentTrainCall {
21243	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21244	return c
21245}
21246
21247// Context sets the context to be used in this call's Do method. Any
21248// pending HTTP request will be aborted if the provided context is
21249// canceled.
21250func (c *ProjectsLocationsAgentTrainCall) Context(ctx context.Context) *ProjectsLocationsAgentTrainCall {
21251	c.ctx_ = ctx
21252	return c
21253}
21254
21255// Header returns an http.Header that can be modified by the caller to
21256// add HTTP headers to the request.
21257func (c *ProjectsLocationsAgentTrainCall) Header() http.Header {
21258	if c.header_ == nil {
21259		c.header_ = make(http.Header)
21260	}
21261	return c.header_
21262}
21263
21264func (c *ProjectsLocationsAgentTrainCall) doRequest(alt string) (*http.Response, error) {
21265	reqHeaders := make(http.Header)
21266	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21267	for k, v := range c.header_ {
21268		reqHeaders[k] = v
21269	}
21270	reqHeaders.Set("User-Agent", c.s.userAgent())
21271	var body io.Reader = nil
21272	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1trainagentrequest)
21273	if err != nil {
21274		return nil, err
21275	}
21276	reqHeaders.Set("Content-Type", "application/json")
21277	c.urlParams_.Set("alt", alt)
21278	c.urlParams_.Set("prettyPrint", "false")
21279	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:train")
21280	urls += "?" + c.urlParams_.Encode()
21281	req, err := http.NewRequest("POST", urls, body)
21282	if err != nil {
21283		return nil, err
21284	}
21285	req.Header = reqHeaders
21286	googleapi.Expand(req.URL, map[string]string{
21287		"parent": c.parent,
21288	})
21289	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21290}
21291
21292// Do executes the "dialogflow.projects.locations.agent.train" call.
21293// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
21294// Any non-2xx status code is an error. Response headers are in either
21295// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
21296// was returned at all) in error.(*googleapi.Error).Header. Use
21297// googleapi.IsNotModified to check whether the returned error was
21298// because http.StatusNotModified was returned.
21299func (c *ProjectsLocationsAgentTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
21300	gensupport.SetOptions(c.urlParams_, opts...)
21301	res, err := c.doRequest("json")
21302	if res != nil && res.StatusCode == http.StatusNotModified {
21303		if res.Body != nil {
21304			res.Body.Close()
21305		}
21306		return nil, &googleapi.Error{
21307			Code:   res.StatusCode,
21308			Header: res.Header,
21309		}
21310	}
21311	if err != nil {
21312		return nil, err
21313	}
21314	defer googleapi.CloseBody(res)
21315	if err := googleapi.CheckResponse(res); err != nil {
21316		return nil, err
21317	}
21318	ret := &GoogleLongrunningOperation{
21319		ServerResponse: googleapi.ServerResponse{
21320			Header:         res.Header,
21321			HTTPStatusCode: res.StatusCode,
21322		},
21323	}
21324	target := &ret
21325	if err := gensupport.DecodeResponse(target, res); err != nil {
21326		return nil, err
21327	}
21328	return ret, nil
21329	// {
21330	//   "description": "Trains the specified agent.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
21331	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:train",
21332	//   "httpMethod": "POST",
21333	//   "id": "dialogflow.projects.locations.agent.train",
21334	//   "parameterOrder": [
21335	//     "parent"
21336	//   ],
21337	//   "parameters": {
21338	//     "parent": {
21339	//       "description": "Required. The project that the agent to train is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
21340	//       "location": "path",
21341	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
21342	//       "required": true,
21343	//       "type": "string"
21344	//     }
21345	//   },
21346	//   "path": "v2beta1/{+parent}/agent:train",
21347	//   "request": {
21348	//     "$ref": "GoogleCloudDialogflowV2beta1TrainAgentRequest"
21349	//   },
21350	//   "response": {
21351	//     "$ref": "GoogleLongrunningOperation"
21352	//   },
21353	//   "scopes": [
21354	//     "https://www.googleapis.com/auth/cloud-platform",
21355	//     "https://www.googleapis.com/auth/dialogflow"
21356	//   ]
21357	// }
21358
21359}
21360
21361// method id "dialogflow.projects.locations.agent.entityTypes.batchDelete":
21362
21363type ProjectsLocationsAgentEntityTypesBatchDeleteCall struct {
21364	s                                                         *Service
21365	parent                                                    string
21366	googleclouddialogflowv2beta1batchdeleteentitytypesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest
21367	urlParams_                                                gensupport.URLParams
21368	ctx_                                                      context.Context
21369	header_                                                   http.Header
21370}
21371
21372// BatchDelete: Deletes entity types in the specified agent.
21373//
21374// Operation <response: google.protobuf.Empty>
21375func (r *ProjectsLocationsAgentEntityTypesService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteentitytypesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest) *ProjectsLocationsAgentEntityTypesBatchDeleteCall {
21376	c := &ProjectsLocationsAgentEntityTypesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21377	c.parent = parent
21378	c.googleclouddialogflowv2beta1batchdeleteentitytypesrequest = googleclouddialogflowv2beta1batchdeleteentitytypesrequest
21379	return c
21380}
21381
21382// Fields allows partial responses to be retrieved. See
21383// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21384// for more information.
21385func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesBatchDeleteCall {
21386	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21387	return c
21388}
21389
21390// Context sets the context to be used in this call's Do method. Any
21391// pending HTTP request will be aborted if the provided context is
21392// canceled.
21393func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesBatchDeleteCall {
21394	c.ctx_ = ctx
21395	return c
21396}
21397
21398// Header returns an http.Header that can be modified by the caller to
21399// add HTTP headers to the request.
21400func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Header() http.Header {
21401	if c.header_ == nil {
21402		c.header_ = make(http.Header)
21403	}
21404	return c.header_
21405}
21406
21407func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
21408	reqHeaders := make(http.Header)
21409	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21410	for k, v := range c.header_ {
21411		reqHeaders[k] = v
21412	}
21413	reqHeaders.Set("User-Agent", c.s.userAgent())
21414	var body io.Reader = nil
21415	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteentitytypesrequest)
21416	if err != nil {
21417		return nil, err
21418	}
21419	reqHeaders.Set("Content-Type", "application/json")
21420	c.urlParams_.Set("alt", alt)
21421	c.urlParams_.Set("prettyPrint", "false")
21422	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes:batchDelete")
21423	urls += "?" + c.urlParams_.Encode()
21424	req, err := http.NewRequest("POST", urls, body)
21425	if err != nil {
21426		return nil, err
21427	}
21428	req.Header = reqHeaders
21429	googleapi.Expand(req.URL, map[string]string{
21430		"parent": c.parent,
21431	})
21432	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21433}
21434
21435// Do executes the "dialogflow.projects.locations.agent.entityTypes.batchDelete" call.
21436// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
21437// Any non-2xx status code is an error. Response headers are in either
21438// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
21439// was returned at all) in error.(*googleapi.Error).Header. Use
21440// googleapi.IsNotModified to check whether the returned error was
21441// because http.StatusNotModified was returned.
21442func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
21443	gensupport.SetOptions(c.urlParams_, opts...)
21444	res, err := c.doRequest("json")
21445	if res != nil && res.StatusCode == http.StatusNotModified {
21446		if res.Body != nil {
21447			res.Body.Close()
21448		}
21449		return nil, &googleapi.Error{
21450			Code:   res.StatusCode,
21451			Header: res.Header,
21452		}
21453	}
21454	if err != nil {
21455		return nil, err
21456	}
21457	defer googleapi.CloseBody(res)
21458	if err := googleapi.CheckResponse(res); err != nil {
21459		return nil, err
21460	}
21461	ret := &GoogleLongrunningOperation{
21462		ServerResponse: googleapi.ServerResponse{
21463			Header:         res.Header,
21464			HTTPStatusCode: res.StatusCode,
21465		},
21466	}
21467	target := &ret
21468	if err := gensupport.DecodeResponse(target, res); err != nil {
21469		return nil, err
21470	}
21471	return ret, nil
21472	// {
21473	//   "description": "Deletes entity types in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
21474	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchDelete",
21475	//   "httpMethod": "POST",
21476	//   "id": "dialogflow.projects.locations.agent.entityTypes.batchDelete",
21477	//   "parameterOrder": [
21478	//     "parent"
21479	//   ],
21480	//   "parameters": {
21481	//     "parent": {
21482	//       "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.",
21483	//       "location": "path",
21484	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
21485	//       "required": true,
21486	//       "type": "string"
21487	//     }
21488	//   },
21489	//   "path": "v2beta1/{+parent}/entityTypes:batchDelete",
21490	//   "request": {
21491	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest"
21492	//   },
21493	//   "response": {
21494	//     "$ref": "GoogleLongrunningOperation"
21495	//   },
21496	//   "scopes": [
21497	//     "https://www.googleapis.com/auth/cloud-platform",
21498	//     "https://www.googleapis.com/auth/dialogflow"
21499	//   ]
21500	// }
21501
21502}
21503
21504// method id "dialogflow.projects.locations.agent.entityTypes.batchUpdate":
21505
21506type ProjectsLocationsAgentEntityTypesBatchUpdateCall struct {
21507	s                                                         *Service
21508	parent                                                    string
21509	googleclouddialogflowv2beta1batchupdateentitytypesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest
21510	urlParams_                                                gensupport.URLParams
21511	ctx_                                                      context.Context
21512	header_                                                   http.Header
21513}
21514
21515// BatchUpdate: Updates/Creates multiple entity types in the specified
21516// agent.
21517//
21518// Operation <response: BatchUpdateEntityTypesResponse>
21519func (r *ProjectsLocationsAgentEntityTypesService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateentitytypesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest) *ProjectsLocationsAgentEntityTypesBatchUpdateCall {
21520	c := &ProjectsLocationsAgentEntityTypesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21521	c.parent = parent
21522	c.googleclouddialogflowv2beta1batchupdateentitytypesrequest = googleclouddialogflowv2beta1batchupdateentitytypesrequest
21523	return c
21524}
21525
21526// Fields allows partial responses to be retrieved. See
21527// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21528// for more information.
21529func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesBatchUpdateCall {
21530	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21531	return c
21532}
21533
21534// Context sets the context to be used in this call's Do method. Any
21535// pending HTTP request will be aborted if the provided context is
21536// canceled.
21537func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesBatchUpdateCall {
21538	c.ctx_ = ctx
21539	return c
21540}
21541
21542// Header returns an http.Header that can be modified by the caller to
21543// add HTTP headers to the request.
21544func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Header() http.Header {
21545	if c.header_ == nil {
21546		c.header_ = make(http.Header)
21547	}
21548	return c.header_
21549}
21550
21551func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
21552	reqHeaders := make(http.Header)
21553	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21554	for k, v := range c.header_ {
21555		reqHeaders[k] = v
21556	}
21557	reqHeaders.Set("User-Agent", c.s.userAgent())
21558	var body io.Reader = nil
21559	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateentitytypesrequest)
21560	if err != nil {
21561		return nil, err
21562	}
21563	reqHeaders.Set("Content-Type", "application/json")
21564	c.urlParams_.Set("alt", alt)
21565	c.urlParams_.Set("prettyPrint", "false")
21566	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes:batchUpdate")
21567	urls += "?" + c.urlParams_.Encode()
21568	req, err := http.NewRequest("POST", urls, body)
21569	if err != nil {
21570		return nil, err
21571	}
21572	req.Header = reqHeaders
21573	googleapi.Expand(req.URL, map[string]string{
21574		"parent": c.parent,
21575	})
21576	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21577}
21578
21579// Do executes the "dialogflow.projects.locations.agent.entityTypes.batchUpdate" call.
21580// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
21581// Any non-2xx status code is an error. Response headers are in either
21582// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
21583// was returned at all) in error.(*googleapi.Error).Header. Use
21584// googleapi.IsNotModified to check whether the returned error was
21585// because http.StatusNotModified was returned.
21586func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
21587	gensupport.SetOptions(c.urlParams_, opts...)
21588	res, err := c.doRequest("json")
21589	if res != nil && res.StatusCode == http.StatusNotModified {
21590		if res.Body != nil {
21591			res.Body.Close()
21592		}
21593		return nil, &googleapi.Error{
21594			Code:   res.StatusCode,
21595			Header: res.Header,
21596		}
21597	}
21598	if err != nil {
21599		return nil, err
21600	}
21601	defer googleapi.CloseBody(res)
21602	if err := googleapi.CheckResponse(res); err != nil {
21603		return nil, err
21604	}
21605	ret := &GoogleLongrunningOperation{
21606		ServerResponse: googleapi.ServerResponse{
21607			Header:         res.Header,
21608			HTTPStatusCode: res.StatusCode,
21609		},
21610	}
21611	target := &ret
21612	if err := gensupport.DecodeResponse(target, res); err != nil {
21613		return nil, err
21614	}
21615	return ret, nil
21616	// {
21617	//   "description": "Updates/Creates multiple entity types in the specified agent.\n\nOperation \u003cresponse: BatchUpdateEntityTypesResponse\u003e",
21618	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchUpdate",
21619	//   "httpMethod": "POST",
21620	//   "id": "dialogflow.projects.locations.agent.entityTypes.batchUpdate",
21621	//   "parameterOrder": [
21622	//     "parent"
21623	//   ],
21624	//   "parameters": {
21625	//     "parent": {
21626	//       "description": "Required. The name of the agent to update or create entity types in.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
21627	//       "location": "path",
21628	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
21629	//       "required": true,
21630	//       "type": "string"
21631	//     }
21632	//   },
21633	//   "path": "v2beta1/{+parent}/entityTypes:batchUpdate",
21634	//   "request": {
21635	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest"
21636	//   },
21637	//   "response": {
21638	//     "$ref": "GoogleLongrunningOperation"
21639	//   },
21640	//   "scopes": [
21641	//     "https://www.googleapis.com/auth/cloud-platform",
21642	//     "https://www.googleapis.com/auth/dialogflow"
21643	//   ]
21644	// }
21645
21646}
21647
21648// method id "dialogflow.projects.locations.agent.entityTypes.create":
21649
21650type ProjectsLocationsAgentEntityTypesCreateCall struct {
21651	s                                      *Service
21652	parent                                 string
21653	googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType
21654	urlParams_                             gensupport.URLParams
21655	ctx_                                   context.Context
21656	header_                                http.Header
21657}
21658
21659// Create: Creates an entity type in the specified agent.
21660func (r *ProjectsLocationsAgentEntityTypesService) Create(parent string, googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType) *ProjectsLocationsAgentEntityTypesCreateCall {
21661	c := &ProjectsLocationsAgentEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21662	c.parent = parent
21663	c.googleclouddialogflowv2beta1entitytype = googleclouddialogflowv2beta1entitytype
21664	return c
21665}
21666
21667// LanguageCode sets the optional parameter "languageCode": The language
21668// of entity synonyms defined in `entity_type`. If not
21669// specified, the agent's default language is
21670// used.
21671// [Many
21672// languages](https://cloud.google.com/dialogflow/docs/refere
21673// nce/language)
21674// are supported. Note: languages must be enabled in the agent before
21675// they can
21676// be used.
21677func (c *ProjectsLocationsAgentEntityTypesCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesCreateCall {
21678	c.urlParams_.Set("languageCode", languageCode)
21679	return c
21680}
21681
21682// Fields allows partial responses to be retrieved. See
21683// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21684// for more information.
21685func (c *ProjectsLocationsAgentEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesCreateCall {
21686	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21687	return c
21688}
21689
21690// Context sets the context to be used in this call's Do method. Any
21691// pending HTTP request will be aborted if the provided context is
21692// canceled.
21693func (c *ProjectsLocationsAgentEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesCreateCall {
21694	c.ctx_ = ctx
21695	return c
21696}
21697
21698// Header returns an http.Header that can be modified by the caller to
21699// add HTTP headers to the request.
21700func (c *ProjectsLocationsAgentEntityTypesCreateCall) Header() http.Header {
21701	if c.header_ == nil {
21702		c.header_ = make(http.Header)
21703	}
21704	return c.header_
21705}
21706
21707func (c *ProjectsLocationsAgentEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
21708	reqHeaders := make(http.Header)
21709	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21710	for k, v := range c.header_ {
21711		reqHeaders[k] = v
21712	}
21713	reqHeaders.Set("User-Agent", c.s.userAgent())
21714	var body io.Reader = nil
21715	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1entitytype)
21716	if err != nil {
21717		return nil, err
21718	}
21719	reqHeaders.Set("Content-Type", "application/json")
21720	c.urlParams_.Set("alt", alt)
21721	c.urlParams_.Set("prettyPrint", "false")
21722	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
21723	urls += "?" + c.urlParams_.Encode()
21724	req, err := http.NewRequest("POST", urls, body)
21725	if err != nil {
21726		return nil, err
21727	}
21728	req.Header = reqHeaders
21729	googleapi.Expand(req.URL, map[string]string{
21730		"parent": c.parent,
21731	})
21732	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21733}
21734
21735// Do executes the "dialogflow.projects.locations.agent.entityTypes.create" call.
21736// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
21737// be non-nil. Any non-2xx status code is an error. Response headers are
21738// in either
21739// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
21740// a response was returned at all) in error.(*googleapi.Error).Header.
21741// Use googleapi.IsNotModified to check whether the returned error was
21742// because http.StatusNotModified was returned.
21743func (c *ProjectsLocationsAgentEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
21744	gensupport.SetOptions(c.urlParams_, opts...)
21745	res, err := c.doRequest("json")
21746	if res != nil && res.StatusCode == http.StatusNotModified {
21747		if res.Body != nil {
21748			res.Body.Close()
21749		}
21750		return nil, &googleapi.Error{
21751			Code:   res.StatusCode,
21752			Header: res.Header,
21753		}
21754	}
21755	if err != nil {
21756		return nil, err
21757	}
21758	defer googleapi.CloseBody(res)
21759	if err := googleapi.CheckResponse(res); err != nil {
21760		return nil, err
21761	}
21762	ret := &GoogleCloudDialogflowV2beta1EntityType{
21763		ServerResponse: googleapi.ServerResponse{
21764			Header:         res.Header,
21765			HTTPStatusCode: res.StatusCode,
21766		},
21767	}
21768	target := &ret
21769	if err := gensupport.DecodeResponse(target, res); err != nil {
21770		return nil, err
21771	}
21772	return ret, nil
21773	// {
21774	//   "description": "Creates an entity type in the specified agent.",
21775	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes",
21776	//   "httpMethod": "POST",
21777	//   "id": "dialogflow.projects.locations.agent.entityTypes.create",
21778	//   "parameterOrder": [
21779	//     "parent"
21780	//   ],
21781	//   "parameters": {
21782	//     "languageCode": {
21783	//       "description": "Optional. The language of entity synonyms defined in `entity_type`. If not\nspecified, the agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
21784	//       "location": "query",
21785	//       "type": "string"
21786	//     },
21787	//     "parent": {
21788	//       "description": "Required. The agent to create a entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
21789	//       "location": "path",
21790	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
21791	//       "required": true,
21792	//       "type": "string"
21793	//     }
21794	//   },
21795	//   "path": "v2beta1/{+parent}/entityTypes",
21796	//   "request": {
21797	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
21798	//   },
21799	//   "response": {
21800	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
21801	//   },
21802	//   "scopes": [
21803	//     "https://www.googleapis.com/auth/cloud-platform",
21804	//     "https://www.googleapis.com/auth/dialogflow"
21805	//   ]
21806	// }
21807
21808}
21809
21810// method id "dialogflow.projects.locations.agent.entityTypes.delete":
21811
21812type ProjectsLocationsAgentEntityTypesDeleteCall struct {
21813	s          *Service
21814	name       string
21815	urlParams_ gensupport.URLParams
21816	ctx_       context.Context
21817	header_    http.Header
21818}
21819
21820// Delete: Deletes the specified entity type.
21821func (r *ProjectsLocationsAgentEntityTypesService) Delete(name string) *ProjectsLocationsAgentEntityTypesDeleteCall {
21822	c := &ProjectsLocationsAgentEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21823	c.name = name
21824	return c
21825}
21826
21827// Fields allows partial responses to be retrieved. See
21828// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21829// for more information.
21830func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesDeleteCall {
21831	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21832	return c
21833}
21834
21835// Context sets the context to be used in this call's Do method. Any
21836// pending HTTP request will be aborted if the provided context is
21837// canceled.
21838func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesDeleteCall {
21839	c.ctx_ = ctx
21840	return c
21841}
21842
21843// Header returns an http.Header that can be modified by the caller to
21844// add HTTP headers to the request.
21845func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Header() http.Header {
21846	if c.header_ == nil {
21847		c.header_ = make(http.Header)
21848	}
21849	return c.header_
21850}
21851
21852func (c *ProjectsLocationsAgentEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
21853	reqHeaders := make(http.Header)
21854	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21855	for k, v := range c.header_ {
21856		reqHeaders[k] = v
21857	}
21858	reqHeaders.Set("User-Agent", c.s.userAgent())
21859	var body io.Reader = nil
21860	c.urlParams_.Set("alt", alt)
21861	c.urlParams_.Set("prettyPrint", "false")
21862	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
21863	urls += "?" + c.urlParams_.Encode()
21864	req, err := http.NewRequest("DELETE", urls, body)
21865	if err != nil {
21866		return nil, err
21867	}
21868	req.Header = reqHeaders
21869	googleapi.Expand(req.URL, map[string]string{
21870		"name": c.name,
21871	})
21872	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21873}
21874
21875// Do executes the "dialogflow.projects.locations.agent.entityTypes.delete" call.
21876// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
21877// non-2xx status code is an error. Response headers are in either
21878// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
21879// returned at all) in error.(*googleapi.Error).Header. Use
21880// googleapi.IsNotModified to check whether the returned error was
21881// because http.StatusNotModified was returned.
21882func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
21883	gensupport.SetOptions(c.urlParams_, opts...)
21884	res, err := c.doRequest("json")
21885	if res != nil && res.StatusCode == http.StatusNotModified {
21886		if res.Body != nil {
21887			res.Body.Close()
21888		}
21889		return nil, &googleapi.Error{
21890			Code:   res.StatusCode,
21891			Header: res.Header,
21892		}
21893	}
21894	if err != nil {
21895		return nil, err
21896	}
21897	defer googleapi.CloseBody(res)
21898	if err := googleapi.CheckResponse(res); err != nil {
21899		return nil, err
21900	}
21901	ret := &GoogleProtobufEmpty{
21902		ServerResponse: googleapi.ServerResponse{
21903			Header:         res.Header,
21904			HTTPStatusCode: res.StatusCode,
21905		},
21906	}
21907	target := &ret
21908	if err := gensupport.DecodeResponse(target, res); err != nil {
21909		return nil, err
21910	}
21911	return ret, nil
21912	// {
21913	//   "description": "Deletes the specified entity type.",
21914	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}",
21915	//   "httpMethod": "DELETE",
21916	//   "id": "dialogflow.projects.locations.agent.entityTypes.delete",
21917	//   "parameterOrder": [
21918	//     "name"
21919	//   ],
21920	//   "parameters": {
21921	//     "name": {
21922	//       "description": "Required. The name of the entity type to delete.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.",
21923	//       "location": "path",
21924	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
21925	//       "required": true,
21926	//       "type": "string"
21927	//     }
21928	//   },
21929	//   "path": "v2beta1/{+name}",
21930	//   "response": {
21931	//     "$ref": "GoogleProtobufEmpty"
21932	//   },
21933	//   "scopes": [
21934	//     "https://www.googleapis.com/auth/cloud-platform",
21935	//     "https://www.googleapis.com/auth/dialogflow"
21936	//   ]
21937	// }
21938
21939}
21940
21941// method id "dialogflow.projects.locations.agent.entityTypes.get":
21942
21943type ProjectsLocationsAgentEntityTypesGetCall struct {
21944	s            *Service
21945	name         string
21946	urlParams_   gensupport.URLParams
21947	ifNoneMatch_ string
21948	ctx_         context.Context
21949	header_      http.Header
21950}
21951
21952// Get: Retrieves the specified entity type.
21953func (r *ProjectsLocationsAgentEntityTypesService) Get(name string) *ProjectsLocationsAgentEntityTypesGetCall {
21954	c := &ProjectsLocationsAgentEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21955	c.name = name
21956	return c
21957}
21958
21959// LanguageCode sets the optional parameter "languageCode": The language
21960// to retrieve entity synonyms for. If not specified,
21961// the agent's default language is
21962// used.
21963// [Many
21964// languages](https://cloud.google.com/dialogflow/docs/refere
21965// nce/language)
21966// are supported. Note: languages must be enabled in the agent before
21967// they can
21968// be used.
21969func (c *ProjectsLocationsAgentEntityTypesGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesGetCall {
21970	c.urlParams_.Set("languageCode", languageCode)
21971	return c
21972}
21973
21974// Fields allows partial responses to be retrieved. See
21975// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21976// for more information.
21977func (c *ProjectsLocationsAgentEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesGetCall {
21978	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21979	return c
21980}
21981
21982// IfNoneMatch sets the optional parameter which makes the operation
21983// fail if the object's ETag matches the given value. This is useful for
21984// getting updates only after the object has changed since the last
21985// request. Use googleapi.IsNotModified to check whether the response
21986// error from Do is the result of In-None-Match.
21987func (c *ProjectsLocationsAgentEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEntityTypesGetCall {
21988	c.ifNoneMatch_ = entityTag
21989	return c
21990}
21991
21992// Context sets the context to be used in this call's Do method. Any
21993// pending HTTP request will be aborted if the provided context is
21994// canceled.
21995func (c *ProjectsLocationsAgentEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesGetCall {
21996	c.ctx_ = ctx
21997	return c
21998}
21999
22000// Header returns an http.Header that can be modified by the caller to
22001// add HTTP headers to the request.
22002func (c *ProjectsLocationsAgentEntityTypesGetCall) Header() http.Header {
22003	if c.header_ == nil {
22004		c.header_ = make(http.Header)
22005	}
22006	return c.header_
22007}
22008
22009func (c *ProjectsLocationsAgentEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
22010	reqHeaders := make(http.Header)
22011	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22012	for k, v := range c.header_ {
22013		reqHeaders[k] = v
22014	}
22015	reqHeaders.Set("User-Agent", c.s.userAgent())
22016	if c.ifNoneMatch_ != "" {
22017		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22018	}
22019	var body io.Reader = nil
22020	c.urlParams_.Set("alt", alt)
22021	c.urlParams_.Set("prettyPrint", "false")
22022	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
22023	urls += "?" + c.urlParams_.Encode()
22024	req, err := http.NewRequest("GET", urls, body)
22025	if err != nil {
22026		return nil, err
22027	}
22028	req.Header = reqHeaders
22029	googleapi.Expand(req.URL, map[string]string{
22030		"name": c.name,
22031	})
22032	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22033}
22034
22035// Do executes the "dialogflow.projects.locations.agent.entityTypes.get" call.
22036// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
22037// be non-nil. Any non-2xx status code is an error. Response headers are
22038// in either
22039// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
22040// a response was returned at all) in error.(*googleapi.Error).Header.
22041// Use googleapi.IsNotModified to check whether the returned error was
22042// because http.StatusNotModified was returned.
22043func (c *ProjectsLocationsAgentEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
22044	gensupport.SetOptions(c.urlParams_, opts...)
22045	res, err := c.doRequest("json")
22046	if res != nil && res.StatusCode == http.StatusNotModified {
22047		if res.Body != nil {
22048			res.Body.Close()
22049		}
22050		return nil, &googleapi.Error{
22051			Code:   res.StatusCode,
22052			Header: res.Header,
22053		}
22054	}
22055	if err != nil {
22056		return nil, err
22057	}
22058	defer googleapi.CloseBody(res)
22059	if err := googleapi.CheckResponse(res); err != nil {
22060		return nil, err
22061	}
22062	ret := &GoogleCloudDialogflowV2beta1EntityType{
22063		ServerResponse: googleapi.ServerResponse{
22064			Header:         res.Header,
22065			HTTPStatusCode: res.StatusCode,
22066		},
22067	}
22068	target := &ret
22069	if err := gensupport.DecodeResponse(target, res); err != nil {
22070		return nil, err
22071	}
22072	return ret, nil
22073	// {
22074	//   "description": "Retrieves the specified entity type.",
22075	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}",
22076	//   "httpMethod": "GET",
22077	//   "id": "dialogflow.projects.locations.agent.entityTypes.get",
22078	//   "parameterOrder": [
22079	//     "name"
22080	//   ],
22081	//   "parameters": {
22082	//     "languageCode": {
22083	//       "description": "Optional. The language to retrieve entity synonyms for. If not specified,\nthe agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
22084	//       "location": "query",
22085	//       "type": "string"
22086	//     },
22087	//     "name": {
22088	//       "description": "Required. The name of the entity type.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.",
22089	//       "location": "path",
22090	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
22091	//       "required": true,
22092	//       "type": "string"
22093	//     }
22094	//   },
22095	//   "path": "v2beta1/{+name}",
22096	//   "response": {
22097	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
22098	//   },
22099	//   "scopes": [
22100	//     "https://www.googleapis.com/auth/cloud-platform",
22101	//     "https://www.googleapis.com/auth/dialogflow"
22102	//   ]
22103	// }
22104
22105}
22106
22107// method id "dialogflow.projects.locations.agent.entityTypes.list":
22108
22109type ProjectsLocationsAgentEntityTypesListCall struct {
22110	s            *Service
22111	parent       string
22112	urlParams_   gensupport.URLParams
22113	ifNoneMatch_ string
22114	ctx_         context.Context
22115	header_      http.Header
22116}
22117
22118// List: Returns the list of all entity types in the specified agent.
22119func (r *ProjectsLocationsAgentEntityTypesService) List(parent string) *ProjectsLocationsAgentEntityTypesListCall {
22120	c := &ProjectsLocationsAgentEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22121	c.parent = parent
22122	return c
22123}
22124
22125// LanguageCode sets the optional parameter "languageCode": The language
22126// to list entity synonyms for. If not specified,
22127// the agent's default language is
22128// used.
22129// [Many
22130// languages](https://cloud.google.com/dialogflow/docs/refere
22131// nce/language)
22132// are supported. Note: languages must be enabled in the agent before
22133// they can
22134// be used.
22135func (c *ProjectsLocationsAgentEntityTypesListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesListCall {
22136	c.urlParams_.Set("languageCode", languageCode)
22137	return c
22138}
22139
22140// PageSize sets the optional parameter "pageSize": The maximum number
22141// of items to return in a single page. By
22142// default 100 and at most 1000.
22143func (c *ProjectsLocationsAgentEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEntityTypesListCall {
22144	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22145	return c
22146}
22147
22148// PageToken sets the optional parameter "pageToken": The
22149// next_page_token value returned from a previous list request.
22150func (c *ProjectsLocationsAgentEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentEntityTypesListCall {
22151	c.urlParams_.Set("pageToken", pageToken)
22152	return c
22153}
22154
22155// Fields allows partial responses to be retrieved. See
22156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22157// for more information.
22158func (c *ProjectsLocationsAgentEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesListCall {
22159	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22160	return c
22161}
22162
22163// IfNoneMatch sets the optional parameter which makes the operation
22164// fail if the object's ETag matches the given value. This is useful for
22165// getting updates only after the object has changed since the last
22166// request. Use googleapi.IsNotModified to check whether the response
22167// error from Do is the result of In-None-Match.
22168func (c *ProjectsLocationsAgentEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEntityTypesListCall {
22169	c.ifNoneMatch_ = entityTag
22170	return c
22171}
22172
22173// Context sets the context to be used in this call's Do method. Any
22174// pending HTTP request will be aborted if the provided context is
22175// canceled.
22176func (c *ProjectsLocationsAgentEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesListCall {
22177	c.ctx_ = ctx
22178	return c
22179}
22180
22181// Header returns an http.Header that can be modified by the caller to
22182// add HTTP headers to the request.
22183func (c *ProjectsLocationsAgentEntityTypesListCall) Header() http.Header {
22184	if c.header_ == nil {
22185		c.header_ = make(http.Header)
22186	}
22187	return c.header_
22188}
22189
22190func (c *ProjectsLocationsAgentEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
22191	reqHeaders := make(http.Header)
22192	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22193	for k, v := range c.header_ {
22194		reqHeaders[k] = v
22195	}
22196	reqHeaders.Set("User-Agent", c.s.userAgent())
22197	if c.ifNoneMatch_ != "" {
22198		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22199	}
22200	var body io.Reader = nil
22201	c.urlParams_.Set("alt", alt)
22202	c.urlParams_.Set("prettyPrint", "false")
22203	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
22204	urls += "?" + c.urlParams_.Encode()
22205	req, err := http.NewRequest("GET", urls, body)
22206	if err != nil {
22207		return nil, err
22208	}
22209	req.Header = reqHeaders
22210	googleapi.Expand(req.URL, map[string]string{
22211		"parent": c.parent,
22212	})
22213	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22214}
22215
22216// Do executes the "dialogflow.projects.locations.agent.entityTypes.list" call.
22217// Exactly one of *GoogleCloudDialogflowV2beta1ListEntityTypesResponse
22218// or error will be non-nil. Any non-2xx status code is an error.
22219// Response headers are in either
22220// *GoogleCloudDialogflowV2beta1ListEntityTypesResponse.ServerResponse.He
22221// ader or (if a response was returned at all) in
22222// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22223// whether the returned error was because http.StatusNotModified was
22224// returned.
22225func (c *ProjectsLocationsAgentEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListEntityTypesResponse, error) {
22226	gensupport.SetOptions(c.urlParams_, opts...)
22227	res, err := c.doRequest("json")
22228	if res != nil && res.StatusCode == http.StatusNotModified {
22229		if res.Body != nil {
22230			res.Body.Close()
22231		}
22232		return nil, &googleapi.Error{
22233			Code:   res.StatusCode,
22234			Header: res.Header,
22235		}
22236	}
22237	if err != nil {
22238		return nil, err
22239	}
22240	defer googleapi.CloseBody(res)
22241	if err := googleapi.CheckResponse(res); err != nil {
22242		return nil, err
22243	}
22244	ret := &GoogleCloudDialogflowV2beta1ListEntityTypesResponse{
22245		ServerResponse: googleapi.ServerResponse{
22246			Header:         res.Header,
22247			HTTPStatusCode: res.StatusCode,
22248		},
22249	}
22250	target := &ret
22251	if err := gensupport.DecodeResponse(target, res); err != nil {
22252		return nil, err
22253	}
22254	return ret, nil
22255	// {
22256	//   "description": "Returns the list of all entity types in the specified agent.",
22257	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes",
22258	//   "httpMethod": "GET",
22259	//   "id": "dialogflow.projects.locations.agent.entityTypes.list",
22260	//   "parameterOrder": [
22261	//     "parent"
22262	//   ],
22263	//   "parameters": {
22264	//     "languageCode": {
22265	//       "description": "Optional. The language to list entity synonyms for. If not specified,\nthe agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
22266	//       "location": "query",
22267	//       "type": "string"
22268	//     },
22269	//     "pageSize": {
22270	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
22271	//       "format": "int32",
22272	//       "location": "query",
22273	//       "type": "integer"
22274	//     },
22275	//     "pageToken": {
22276	//       "description": "Optional. The next_page_token value returned from a previous list request.",
22277	//       "location": "query",
22278	//       "type": "string"
22279	//     },
22280	//     "parent": {
22281	//       "description": "Required. The agent to list all entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
22282	//       "location": "path",
22283	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
22284	//       "required": true,
22285	//       "type": "string"
22286	//     }
22287	//   },
22288	//   "path": "v2beta1/{+parent}/entityTypes",
22289	//   "response": {
22290	//     "$ref": "GoogleCloudDialogflowV2beta1ListEntityTypesResponse"
22291	//   },
22292	//   "scopes": [
22293	//     "https://www.googleapis.com/auth/cloud-platform",
22294	//     "https://www.googleapis.com/auth/dialogflow"
22295	//   ]
22296	// }
22297
22298}
22299
22300// Pages invokes f for each page of results.
22301// A non-nil error returned from f will halt the iteration.
22302// The provided context supersedes any context provided to the Context method.
22303func (c *ProjectsLocationsAgentEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListEntityTypesResponse) error) error {
22304	c.ctx_ = ctx
22305	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22306	for {
22307		x, err := c.Do()
22308		if err != nil {
22309			return err
22310		}
22311		if err := f(x); err != nil {
22312			return err
22313		}
22314		if x.NextPageToken == "" {
22315			return nil
22316		}
22317		c.PageToken(x.NextPageToken)
22318	}
22319}
22320
22321// method id "dialogflow.projects.locations.agent.entityTypes.patch":
22322
22323type ProjectsLocationsAgentEntityTypesPatchCall struct {
22324	s                                      *Service
22325	nameid                                 string
22326	googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType
22327	urlParams_                             gensupport.URLParams
22328	ctx_                                   context.Context
22329	header_                                http.Header
22330}
22331
22332// Patch: Updates the specified entity type.
22333func (r *ProjectsLocationsAgentEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType) *ProjectsLocationsAgentEntityTypesPatchCall {
22334	c := &ProjectsLocationsAgentEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22335	c.nameid = nameid
22336	c.googleclouddialogflowv2beta1entitytype = googleclouddialogflowv2beta1entitytype
22337	return c
22338}
22339
22340// LanguageCode sets the optional parameter "languageCode": The language
22341// of entity synonyms defined in `entity_type`. If not
22342// specified, the agent's default language is
22343// used.
22344// [Many
22345// languages](https://cloud.google.com/dialogflow/docs/refere
22346// nce/language)
22347// are supported. Note: languages must be enabled in the agent before
22348// they can
22349// be used.
22350func (c *ProjectsLocationsAgentEntityTypesPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesPatchCall {
22351	c.urlParams_.Set("languageCode", languageCode)
22352	return c
22353}
22354
22355// UpdateMask sets the optional parameter "updateMask": The mask to
22356// control which fields get updated.
22357func (c *ProjectsLocationsAgentEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentEntityTypesPatchCall {
22358	c.urlParams_.Set("updateMask", updateMask)
22359	return c
22360}
22361
22362// Fields allows partial responses to be retrieved. See
22363// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22364// for more information.
22365func (c *ProjectsLocationsAgentEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesPatchCall {
22366	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22367	return c
22368}
22369
22370// Context sets the context to be used in this call's Do method. Any
22371// pending HTTP request will be aborted if the provided context is
22372// canceled.
22373func (c *ProjectsLocationsAgentEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesPatchCall {
22374	c.ctx_ = ctx
22375	return c
22376}
22377
22378// Header returns an http.Header that can be modified by the caller to
22379// add HTTP headers to the request.
22380func (c *ProjectsLocationsAgentEntityTypesPatchCall) Header() http.Header {
22381	if c.header_ == nil {
22382		c.header_ = make(http.Header)
22383	}
22384	return c.header_
22385}
22386
22387func (c *ProjectsLocationsAgentEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
22388	reqHeaders := make(http.Header)
22389	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22390	for k, v := range c.header_ {
22391		reqHeaders[k] = v
22392	}
22393	reqHeaders.Set("User-Agent", c.s.userAgent())
22394	var body io.Reader = nil
22395	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1entitytype)
22396	if err != nil {
22397		return nil, err
22398	}
22399	reqHeaders.Set("Content-Type", "application/json")
22400	c.urlParams_.Set("alt", alt)
22401	c.urlParams_.Set("prettyPrint", "false")
22402	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
22403	urls += "?" + c.urlParams_.Encode()
22404	req, err := http.NewRequest("PATCH", urls, body)
22405	if err != nil {
22406		return nil, err
22407	}
22408	req.Header = reqHeaders
22409	googleapi.Expand(req.URL, map[string]string{
22410		"name": c.nameid,
22411	})
22412	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22413}
22414
22415// Do executes the "dialogflow.projects.locations.agent.entityTypes.patch" call.
22416// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
22417// be non-nil. Any non-2xx status code is an error. Response headers are
22418// in either
22419// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
22420// a response was returned at all) in error.(*googleapi.Error).Header.
22421// Use googleapi.IsNotModified to check whether the returned error was
22422// because http.StatusNotModified was returned.
22423func (c *ProjectsLocationsAgentEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
22424	gensupport.SetOptions(c.urlParams_, opts...)
22425	res, err := c.doRequest("json")
22426	if res != nil && res.StatusCode == http.StatusNotModified {
22427		if res.Body != nil {
22428			res.Body.Close()
22429		}
22430		return nil, &googleapi.Error{
22431			Code:   res.StatusCode,
22432			Header: res.Header,
22433		}
22434	}
22435	if err != nil {
22436		return nil, err
22437	}
22438	defer googleapi.CloseBody(res)
22439	if err := googleapi.CheckResponse(res); err != nil {
22440		return nil, err
22441	}
22442	ret := &GoogleCloudDialogflowV2beta1EntityType{
22443		ServerResponse: googleapi.ServerResponse{
22444			Header:         res.Header,
22445			HTTPStatusCode: res.StatusCode,
22446		},
22447	}
22448	target := &ret
22449	if err := gensupport.DecodeResponse(target, res); err != nil {
22450		return nil, err
22451	}
22452	return ret, nil
22453	// {
22454	//   "description": "Updates the specified entity type.",
22455	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}",
22456	//   "httpMethod": "PATCH",
22457	//   "id": "dialogflow.projects.locations.agent.entityTypes.patch",
22458	//   "parameterOrder": [
22459	//     "name"
22460	//   ],
22461	//   "parameters": {
22462	//     "languageCode": {
22463	//       "description": "Optional. The language of entity synonyms defined in `entity_type`. If not\nspecified, the agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
22464	//       "location": "query",
22465	//       "type": "string"
22466	//     },
22467	//     "name": {
22468	//       "description": "The unique identifier of the entity type.\nRequired for EntityTypes.UpdateEntityType and\nEntityTypes.BatchUpdateEntityTypes methods.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
22469	//       "location": "path",
22470	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
22471	//       "required": true,
22472	//       "type": "string"
22473	//     },
22474	//     "updateMask": {
22475	//       "description": "Optional. The mask to control which fields get updated.",
22476	//       "format": "google-fieldmask",
22477	//       "location": "query",
22478	//       "type": "string"
22479	//     }
22480	//   },
22481	//   "path": "v2beta1/{+name}",
22482	//   "request": {
22483	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
22484	//   },
22485	//   "response": {
22486	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
22487	//   },
22488	//   "scopes": [
22489	//     "https://www.googleapis.com/auth/cloud-platform",
22490	//     "https://www.googleapis.com/auth/dialogflow"
22491	//   ]
22492	// }
22493
22494}
22495
22496// method id "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate":
22497
22498type ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall struct {
22499	s                                                      *Service
22500	parent                                                 string
22501	googleclouddialogflowv2beta1batchcreateentitiesrequest *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest
22502	urlParams_                                             gensupport.URLParams
22503	ctx_                                                   context.Context
22504	header_                                                http.Header
22505}
22506
22507// BatchCreate: Creates multiple new entities in the specified entity
22508// type.
22509//
22510// Operation <response: google.protobuf.Empty>
22511func (r *ProjectsLocationsAgentEntityTypesEntitiesService) BatchCreate(parent string, googleclouddialogflowv2beta1batchcreateentitiesrequest *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest) *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall {
22512	c := &ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22513	c.parent = parent
22514	c.googleclouddialogflowv2beta1batchcreateentitiesrequest = googleclouddialogflowv2beta1batchcreateentitiesrequest
22515	return c
22516}
22517
22518// Fields allows partial responses to be retrieved. See
22519// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22520// for more information.
22521func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall {
22522	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22523	return c
22524}
22525
22526// Context sets the context to be used in this call's Do method. Any
22527// pending HTTP request will be aborted if the provided context is
22528// canceled.
22529func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall {
22530	c.ctx_ = ctx
22531	return c
22532}
22533
22534// Header returns an http.Header that can be modified by the caller to
22535// add HTTP headers to the request.
22536func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Header() http.Header {
22537	if c.header_ == nil {
22538		c.header_ = make(http.Header)
22539	}
22540	return c.header_
22541}
22542
22543func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) doRequest(alt string) (*http.Response, error) {
22544	reqHeaders := make(http.Header)
22545	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22546	for k, v := range c.header_ {
22547		reqHeaders[k] = v
22548	}
22549	reqHeaders.Set("User-Agent", c.s.userAgent())
22550	var body io.Reader = nil
22551	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchcreateentitiesrequest)
22552	if err != nil {
22553		return nil, err
22554	}
22555	reqHeaders.Set("Content-Type", "application/json")
22556	c.urlParams_.Set("alt", alt)
22557	c.urlParams_.Set("prettyPrint", "false")
22558	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchCreate")
22559	urls += "?" + c.urlParams_.Encode()
22560	req, err := http.NewRequest("POST", urls, body)
22561	if err != nil {
22562		return nil, err
22563	}
22564	req.Header = reqHeaders
22565	googleapi.Expand(req.URL, map[string]string{
22566		"parent": c.parent,
22567	})
22568	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22569}
22570
22571// Do executes the "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate" call.
22572// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
22573// Any non-2xx status code is an error. Response headers are in either
22574// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
22575// was returned at all) in error.(*googleapi.Error).Header. Use
22576// googleapi.IsNotModified to check whether the returned error was
22577// because http.StatusNotModified was returned.
22578func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
22579	gensupport.SetOptions(c.urlParams_, opts...)
22580	res, err := c.doRequest("json")
22581	if res != nil && res.StatusCode == http.StatusNotModified {
22582		if res.Body != nil {
22583			res.Body.Close()
22584		}
22585		return nil, &googleapi.Error{
22586			Code:   res.StatusCode,
22587			Header: res.Header,
22588		}
22589	}
22590	if err != nil {
22591		return nil, err
22592	}
22593	defer googleapi.CloseBody(res)
22594	if err := googleapi.CheckResponse(res); err != nil {
22595		return nil, err
22596	}
22597	ret := &GoogleLongrunningOperation{
22598		ServerResponse: googleapi.ServerResponse{
22599			Header:         res.Header,
22600			HTTPStatusCode: res.StatusCode,
22601		},
22602	}
22603	target := &ret
22604	if err := gensupport.DecodeResponse(target, res); err != nil {
22605		return nil, err
22606	}
22607	return ret, nil
22608	// {
22609	//   "description": "Creates multiple new entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
22610	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate",
22611	//   "httpMethod": "POST",
22612	//   "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate",
22613	//   "parameterOrder": [
22614	//     "parent"
22615	//   ],
22616	//   "parameters": {
22617	//     "parent": {
22618	//       "description": "Required. The name of the entity type to create entities in. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
22619	//       "location": "path",
22620	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
22621	//       "required": true,
22622	//       "type": "string"
22623	//     }
22624	//   },
22625	//   "path": "v2beta1/{+parent}/entities:batchCreate",
22626	//   "request": {
22627	//     "$ref": "GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest"
22628	//   },
22629	//   "response": {
22630	//     "$ref": "GoogleLongrunningOperation"
22631	//   },
22632	//   "scopes": [
22633	//     "https://www.googleapis.com/auth/cloud-platform",
22634	//     "https://www.googleapis.com/auth/dialogflow"
22635	//   ]
22636	// }
22637
22638}
22639
22640// method id "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete":
22641
22642type ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall struct {
22643	s                                                      *Service
22644	parent                                                 string
22645	googleclouddialogflowv2beta1batchdeleteentitiesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest
22646	urlParams_                                             gensupport.URLParams
22647	ctx_                                                   context.Context
22648	header_                                                http.Header
22649}
22650
22651// BatchDelete: Deletes entities in the specified entity
22652// type.
22653//
22654// Operation <response: google.protobuf.Empty>
22655func (r *ProjectsLocationsAgentEntityTypesEntitiesService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteentitiesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest) *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall {
22656	c := &ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22657	c.parent = parent
22658	c.googleclouddialogflowv2beta1batchdeleteentitiesrequest = googleclouddialogflowv2beta1batchdeleteentitiesrequest
22659	return c
22660}
22661
22662// Fields allows partial responses to be retrieved. See
22663// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22664// for more information.
22665func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall {
22666	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22667	return c
22668}
22669
22670// Context sets the context to be used in this call's Do method. Any
22671// pending HTTP request will be aborted if the provided context is
22672// canceled.
22673func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall {
22674	c.ctx_ = ctx
22675	return c
22676}
22677
22678// Header returns an http.Header that can be modified by the caller to
22679// add HTTP headers to the request.
22680func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Header() http.Header {
22681	if c.header_ == nil {
22682		c.header_ = make(http.Header)
22683	}
22684	return c.header_
22685}
22686
22687func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
22688	reqHeaders := make(http.Header)
22689	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22690	for k, v := range c.header_ {
22691		reqHeaders[k] = v
22692	}
22693	reqHeaders.Set("User-Agent", c.s.userAgent())
22694	var body io.Reader = nil
22695	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteentitiesrequest)
22696	if err != nil {
22697		return nil, err
22698	}
22699	reqHeaders.Set("Content-Type", "application/json")
22700	c.urlParams_.Set("alt", alt)
22701	c.urlParams_.Set("prettyPrint", "false")
22702	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchDelete")
22703	urls += "?" + c.urlParams_.Encode()
22704	req, err := http.NewRequest("POST", urls, body)
22705	if err != nil {
22706		return nil, err
22707	}
22708	req.Header = reqHeaders
22709	googleapi.Expand(req.URL, map[string]string{
22710		"parent": c.parent,
22711	})
22712	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22713}
22714
22715// Do executes the "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete" call.
22716// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
22717// Any non-2xx status code is an error. Response headers are in either
22718// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
22719// was returned at all) in error.(*googleapi.Error).Header. Use
22720// googleapi.IsNotModified to check whether the returned error was
22721// because http.StatusNotModified was returned.
22722func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
22723	gensupport.SetOptions(c.urlParams_, opts...)
22724	res, err := c.doRequest("json")
22725	if res != nil && res.StatusCode == http.StatusNotModified {
22726		if res.Body != nil {
22727			res.Body.Close()
22728		}
22729		return nil, &googleapi.Error{
22730			Code:   res.StatusCode,
22731			Header: res.Header,
22732		}
22733	}
22734	if err != nil {
22735		return nil, err
22736	}
22737	defer googleapi.CloseBody(res)
22738	if err := googleapi.CheckResponse(res); err != nil {
22739		return nil, err
22740	}
22741	ret := &GoogleLongrunningOperation{
22742		ServerResponse: googleapi.ServerResponse{
22743			Header:         res.Header,
22744			HTTPStatusCode: res.StatusCode,
22745		},
22746	}
22747	target := &ret
22748	if err := gensupport.DecodeResponse(target, res); err != nil {
22749		return nil, err
22750	}
22751	return ret, nil
22752	// {
22753	//   "description": "Deletes entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
22754	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete",
22755	//   "httpMethod": "POST",
22756	//   "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete",
22757	//   "parameterOrder": [
22758	//     "parent"
22759	//   ],
22760	//   "parameters": {
22761	//     "parent": {
22762	//       "description": "Required. The name of the entity type to delete entries for. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
22763	//       "location": "path",
22764	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
22765	//       "required": true,
22766	//       "type": "string"
22767	//     }
22768	//   },
22769	//   "path": "v2beta1/{+parent}/entities:batchDelete",
22770	//   "request": {
22771	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest"
22772	//   },
22773	//   "response": {
22774	//     "$ref": "GoogleLongrunningOperation"
22775	//   },
22776	//   "scopes": [
22777	//     "https://www.googleapis.com/auth/cloud-platform",
22778	//     "https://www.googleapis.com/auth/dialogflow"
22779	//   ]
22780	// }
22781
22782}
22783
22784// method id "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate":
22785
22786type ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall struct {
22787	s                                                      *Service
22788	parent                                                 string
22789	googleclouddialogflowv2beta1batchupdateentitiesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest
22790	urlParams_                                             gensupport.URLParams
22791	ctx_                                                   context.Context
22792	header_                                                http.Header
22793}
22794
22795// BatchUpdate: Updates or creates multiple entities in the specified
22796// entity type. This
22797// method does not affect entities in the entity type that aren't
22798// explicitly
22799// specified in the request.
22800//
22801// Operation <response: google.protobuf.Empty>
22802func (r *ProjectsLocationsAgentEntityTypesEntitiesService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateentitiesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest) *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall {
22803	c := &ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22804	c.parent = parent
22805	c.googleclouddialogflowv2beta1batchupdateentitiesrequest = googleclouddialogflowv2beta1batchupdateentitiesrequest
22806	return c
22807}
22808
22809// Fields allows partial responses to be retrieved. See
22810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22811// for more information.
22812func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall {
22813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22814	return c
22815}
22816
22817// Context sets the context to be used in this call's Do method. Any
22818// pending HTTP request will be aborted if the provided context is
22819// canceled.
22820func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall {
22821	c.ctx_ = ctx
22822	return c
22823}
22824
22825// Header returns an http.Header that can be modified by the caller to
22826// add HTTP headers to the request.
22827func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Header() http.Header {
22828	if c.header_ == nil {
22829		c.header_ = make(http.Header)
22830	}
22831	return c.header_
22832}
22833
22834func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
22835	reqHeaders := make(http.Header)
22836	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22837	for k, v := range c.header_ {
22838		reqHeaders[k] = v
22839	}
22840	reqHeaders.Set("User-Agent", c.s.userAgent())
22841	var body io.Reader = nil
22842	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateentitiesrequest)
22843	if err != nil {
22844		return nil, err
22845	}
22846	reqHeaders.Set("Content-Type", "application/json")
22847	c.urlParams_.Set("alt", alt)
22848	c.urlParams_.Set("prettyPrint", "false")
22849	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchUpdate")
22850	urls += "?" + c.urlParams_.Encode()
22851	req, err := http.NewRequest("POST", urls, body)
22852	if err != nil {
22853		return nil, err
22854	}
22855	req.Header = reqHeaders
22856	googleapi.Expand(req.URL, map[string]string{
22857		"parent": c.parent,
22858	})
22859	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22860}
22861
22862// Do executes the "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate" call.
22863// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
22864// Any non-2xx status code is an error. Response headers are in either
22865// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
22866// was returned at all) in error.(*googleapi.Error).Header. Use
22867// googleapi.IsNotModified to check whether the returned error was
22868// because http.StatusNotModified was returned.
22869func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
22870	gensupport.SetOptions(c.urlParams_, opts...)
22871	res, err := c.doRequest("json")
22872	if res != nil && res.StatusCode == http.StatusNotModified {
22873		if res.Body != nil {
22874			res.Body.Close()
22875		}
22876		return nil, &googleapi.Error{
22877			Code:   res.StatusCode,
22878			Header: res.Header,
22879		}
22880	}
22881	if err != nil {
22882		return nil, err
22883	}
22884	defer googleapi.CloseBody(res)
22885	if err := googleapi.CheckResponse(res); err != nil {
22886		return nil, err
22887	}
22888	ret := &GoogleLongrunningOperation{
22889		ServerResponse: googleapi.ServerResponse{
22890			Header:         res.Header,
22891			HTTPStatusCode: res.StatusCode,
22892		},
22893	}
22894	target := &ret
22895	if err := gensupport.DecodeResponse(target, res); err != nil {
22896		return nil, err
22897	}
22898	return ret, nil
22899	// {
22900	//   "description": "Updates or creates multiple entities in the specified entity type. This\nmethod does not affect entities in the entity type that aren't explicitly\nspecified in the request.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
22901	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate",
22902	//   "httpMethod": "POST",
22903	//   "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate",
22904	//   "parameterOrder": [
22905	//     "parent"
22906	//   ],
22907	//   "parameters": {
22908	//     "parent": {
22909	//       "description": "Required. The name of the entity type to update or create entities in.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
22910	//       "location": "path",
22911	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
22912	//       "required": true,
22913	//       "type": "string"
22914	//     }
22915	//   },
22916	//   "path": "v2beta1/{+parent}/entities:batchUpdate",
22917	//   "request": {
22918	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest"
22919	//   },
22920	//   "response": {
22921	//     "$ref": "GoogleLongrunningOperation"
22922	//   },
22923	//   "scopes": [
22924	//     "https://www.googleapis.com/auth/cloud-platform",
22925	//     "https://www.googleapis.com/auth/dialogflow"
22926	//   ]
22927	// }
22928
22929}
22930
22931// method id "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts":
22932
22933type ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall struct {
22934	s          *Service
22935	parent     string
22936	urlParams_ gensupport.URLParams
22937	ctx_       context.Context
22938	header_    http.Header
22939}
22940
22941// DeleteContexts: Deletes all active contexts in the specified session.
22942func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsService) DeleteContexts(parent string) *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall {
22943	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22944	c.parent = parent
22945	return c
22946}
22947
22948// Fields allows partial responses to be retrieved. See
22949// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22950// for more information.
22951func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall {
22952	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22953	return c
22954}
22955
22956// Context sets the context to be used in this call's Do method. Any
22957// pending HTTP request will be aborted if the provided context is
22958// canceled.
22959func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall {
22960	c.ctx_ = ctx
22961	return c
22962}
22963
22964// Header returns an http.Header that can be modified by the caller to
22965// add HTTP headers to the request.
22966func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Header() http.Header {
22967	if c.header_ == nil {
22968		c.header_ = make(http.Header)
22969	}
22970	return c.header_
22971}
22972
22973func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
22974	reqHeaders := make(http.Header)
22975	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22976	for k, v := range c.header_ {
22977		reqHeaders[k] = v
22978	}
22979	reqHeaders.Set("User-Agent", c.s.userAgent())
22980	var body io.Reader = nil
22981	c.urlParams_.Set("alt", alt)
22982	c.urlParams_.Set("prettyPrint", "false")
22983	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
22984	urls += "?" + c.urlParams_.Encode()
22985	req, err := http.NewRequest("DELETE", urls, body)
22986	if err != nil {
22987		return nil, err
22988	}
22989	req.Header = reqHeaders
22990	googleapi.Expand(req.URL, map[string]string{
22991		"parent": c.parent,
22992	})
22993	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22994}
22995
22996// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts" call.
22997// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
22998// non-2xx status code is an error. Response headers are in either
22999// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
23000// returned at all) in error.(*googleapi.Error).Header. Use
23001// googleapi.IsNotModified to check whether the returned error was
23002// because http.StatusNotModified was returned.
23003func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
23004	gensupport.SetOptions(c.urlParams_, opts...)
23005	res, err := c.doRequest("json")
23006	if res != nil && res.StatusCode == http.StatusNotModified {
23007		if res.Body != nil {
23008			res.Body.Close()
23009		}
23010		return nil, &googleapi.Error{
23011			Code:   res.StatusCode,
23012			Header: res.Header,
23013		}
23014	}
23015	if err != nil {
23016		return nil, err
23017	}
23018	defer googleapi.CloseBody(res)
23019	if err := googleapi.CheckResponse(res); err != nil {
23020		return nil, err
23021	}
23022	ret := &GoogleProtobufEmpty{
23023		ServerResponse: googleapi.ServerResponse{
23024			Header:         res.Header,
23025			HTTPStatusCode: res.StatusCode,
23026		},
23027	}
23028	target := &ret
23029	if err := gensupport.DecodeResponse(target, res); err != nil {
23030		return nil, err
23031	}
23032	return ret, nil
23033	// {
23034	//   "description": "Deletes all active contexts in the specified session.",
23035	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
23036	//   "httpMethod": "DELETE",
23037	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts",
23038	//   "parameterOrder": [
23039	//     "parent"
23040	//   ],
23041	//   "parameters": {
23042	//     "parent": {
23043	//       "description": "Required. The name of the session to delete all contexts from. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or `projects/\u003cProject\nID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession\nID\u003e`. If `Environment ID` is not specified we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
23044	//       "location": "path",
23045	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
23046	//       "required": true,
23047	//       "type": "string"
23048	//     }
23049	//   },
23050	//   "path": "v2beta1/{+parent}/contexts",
23051	//   "response": {
23052	//     "$ref": "GoogleProtobufEmpty"
23053	//   },
23054	//   "scopes": [
23055	//     "https://www.googleapis.com/auth/cloud-platform",
23056	//     "https://www.googleapis.com/auth/dialogflow"
23057	//   ]
23058	// }
23059
23060}
23061
23062// method id "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent":
23063
23064type ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall struct {
23065	s                                               *Service
23066	sessionid                                       string
23067	googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest
23068	urlParams_                                      gensupport.URLParams
23069	ctx_                                            context.Context
23070	header_                                         http.Header
23071}
23072
23073// DetectIntent: Processes a natural language query and returns
23074// structured, actionable data
23075// as a result. This method is not idempotent, because it may cause
23076// contexts
23077// and session entity types to be updated, which in turn might
23078// affect
23079// results of future queries.
23080func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest) *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall {
23081	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23082	c.sessionid = sessionid
23083	c.googleclouddialogflowv2beta1detectintentrequest = googleclouddialogflowv2beta1detectintentrequest
23084	return c
23085}
23086
23087// Fields allows partial responses to be retrieved. See
23088// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23089// for more information.
23090func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall {
23091	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23092	return c
23093}
23094
23095// Context sets the context to be used in this call's Do method. Any
23096// pending HTTP request will be aborted if the provided context is
23097// canceled.
23098func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall {
23099	c.ctx_ = ctx
23100	return c
23101}
23102
23103// Header returns an http.Header that can be modified by the caller to
23104// add HTTP headers to the request.
23105func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Header() http.Header {
23106	if c.header_ == nil {
23107		c.header_ = make(http.Header)
23108	}
23109	return c.header_
23110}
23111
23112func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
23113	reqHeaders := make(http.Header)
23114	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23115	for k, v := range c.header_ {
23116		reqHeaders[k] = v
23117	}
23118	reqHeaders.Set("User-Agent", c.s.userAgent())
23119	var body io.Reader = nil
23120	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1detectintentrequest)
23121	if err != nil {
23122		return nil, err
23123	}
23124	reqHeaders.Set("Content-Type", "application/json")
23125	c.urlParams_.Set("alt", alt)
23126	c.urlParams_.Set("prettyPrint", "false")
23127	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+session}:detectIntent")
23128	urls += "?" + c.urlParams_.Encode()
23129	req, err := http.NewRequest("POST", urls, body)
23130	if err != nil {
23131		return nil, err
23132	}
23133	req.Header = reqHeaders
23134	googleapi.Expand(req.URL, map[string]string{
23135		"session": c.sessionid,
23136	})
23137	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23138}
23139
23140// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent" call.
23141// Exactly one of *GoogleCloudDialogflowV2beta1DetectIntentResponse or
23142// error will be non-nil. Any non-2xx status code is an error. Response
23143// headers are in either
23144// *GoogleCloudDialogflowV2beta1DetectIntentResponse.ServerResponse.Heade
23145// r or (if a response was returned at all) in
23146// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23147// whether the returned error was because http.StatusNotModified was
23148// returned.
23149func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1DetectIntentResponse, error) {
23150	gensupport.SetOptions(c.urlParams_, opts...)
23151	res, err := c.doRequest("json")
23152	if res != nil && res.StatusCode == http.StatusNotModified {
23153		if res.Body != nil {
23154			res.Body.Close()
23155		}
23156		return nil, &googleapi.Error{
23157			Code:   res.StatusCode,
23158			Header: res.Header,
23159		}
23160	}
23161	if err != nil {
23162		return nil, err
23163	}
23164	defer googleapi.CloseBody(res)
23165	if err := googleapi.CheckResponse(res); err != nil {
23166		return nil, err
23167	}
23168	ret := &GoogleCloudDialogflowV2beta1DetectIntentResponse{
23169		ServerResponse: googleapi.ServerResponse{
23170			Header:         res.Header,
23171			HTTPStatusCode: res.StatusCode,
23172		},
23173	}
23174	target := &ret
23175	if err := gensupport.DecodeResponse(target, res); err != nil {
23176		return nil, err
23177	}
23178	return ret, nil
23179	// {
23180	//   "description": "Processes a natural language query and returns structured, actionable data\nas a result. This method is not idempotent, because it may cause contexts\nand session entity types to be updated, which in turn might affect\nresults of future queries.",
23181	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent",
23182	//   "httpMethod": "POST",
23183	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent",
23184	//   "parameterOrder": [
23185	//     "session"
23186	//   ],
23187	//   "parameters": {
23188	//     "session": {
23189	//       "description": "Required. The name of the session this query is sent to. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`, or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we are using\n\"-\". It's up to the API caller to choose an appropriate `Session ID` and\n`User Id`. They can be a random number or some type of user and session\nidentifiers (preferably hashed). The length of the `Session ID` and\n`User ID` must not exceed 36 characters.",
23190	//       "location": "path",
23191	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
23192	//       "required": true,
23193	//       "type": "string"
23194	//     }
23195	//   },
23196	//   "path": "v2beta1/{+session}:detectIntent",
23197	//   "request": {
23198	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest"
23199	//   },
23200	//   "response": {
23201	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse"
23202	//   },
23203	//   "scopes": [
23204	//     "https://www.googleapis.com/auth/cloud-platform",
23205	//     "https://www.googleapis.com/auth/dialogflow"
23206	//   ]
23207	// }
23208
23209}
23210
23211// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create":
23212
23213type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall struct {
23214	s                                   *Service
23215	parent                              string
23216	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
23217	urlParams_                          gensupport.URLParams
23218	ctx_                                context.Context
23219	header_                             http.Header
23220}
23221
23222// Create: Creates a context.
23223//
23224// If the specified context already exists, overrides the context.
23225func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Create(parent string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall {
23226	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23227	c.parent = parent
23228	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
23229	return c
23230}
23231
23232// Fields allows partial responses to be retrieved. See
23233// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23234// for more information.
23235func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall {
23236	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23237	return c
23238}
23239
23240// Context sets the context to be used in this call's Do method. Any
23241// pending HTTP request will be aborted if the provided context is
23242// canceled.
23243func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall {
23244	c.ctx_ = ctx
23245	return c
23246}
23247
23248// Header returns an http.Header that can be modified by the caller to
23249// add HTTP headers to the request.
23250func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Header() http.Header {
23251	if c.header_ == nil {
23252		c.header_ = make(http.Header)
23253	}
23254	return c.header_
23255}
23256
23257func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
23258	reqHeaders := make(http.Header)
23259	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23260	for k, v := range c.header_ {
23261		reqHeaders[k] = v
23262	}
23263	reqHeaders.Set("User-Agent", c.s.userAgent())
23264	var body io.Reader = nil
23265	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
23266	if err != nil {
23267		return nil, err
23268	}
23269	reqHeaders.Set("Content-Type", "application/json")
23270	c.urlParams_.Set("alt", alt)
23271	c.urlParams_.Set("prettyPrint", "false")
23272	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
23273	urls += "?" + c.urlParams_.Encode()
23274	req, err := http.NewRequest("POST", urls, body)
23275	if err != nil {
23276		return nil, err
23277	}
23278	req.Header = reqHeaders
23279	googleapi.Expand(req.URL, map[string]string{
23280		"parent": c.parent,
23281	})
23282	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23283}
23284
23285// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create" call.
23286// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
23287// non-nil. Any non-2xx status code is an error. Response headers are in
23288// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
23289// (if a response was returned at all) in
23290// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23291// whether the returned error was because http.StatusNotModified was
23292// returned.
23293func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
23294	gensupport.SetOptions(c.urlParams_, opts...)
23295	res, err := c.doRequest("json")
23296	if res != nil && res.StatusCode == http.StatusNotModified {
23297		if res.Body != nil {
23298			res.Body.Close()
23299		}
23300		return nil, &googleapi.Error{
23301			Code:   res.StatusCode,
23302			Header: res.Header,
23303		}
23304	}
23305	if err != nil {
23306		return nil, err
23307	}
23308	defer googleapi.CloseBody(res)
23309	if err := googleapi.CheckResponse(res); err != nil {
23310		return nil, err
23311	}
23312	ret := &GoogleCloudDialogflowV2beta1Context{
23313		ServerResponse: googleapi.ServerResponse{
23314			Header:         res.Header,
23315			HTTPStatusCode: res.StatusCode,
23316		},
23317	}
23318	target := &ret
23319	if err := gensupport.DecodeResponse(target, res); err != nil {
23320		return nil, err
23321	}
23322	return ret, nil
23323	// {
23324	//   "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.",
23325	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
23326	//   "httpMethod": "POST",
23327	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create",
23328	//   "parameterOrder": [
23329	//     "parent"
23330	//   ],
23331	//   "parameters": {
23332	//     "parent": {
23333	//       "description": "Required. The session to create a context for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
23334	//       "location": "path",
23335	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
23336	//       "required": true,
23337	//       "type": "string"
23338	//     }
23339	//   },
23340	//   "path": "v2beta1/{+parent}/contexts",
23341	//   "request": {
23342	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
23343	//   },
23344	//   "response": {
23345	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
23346	//   },
23347	//   "scopes": [
23348	//     "https://www.googleapis.com/auth/cloud-platform",
23349	//     "https://www.googleapis.com/auth/dialogflow"
23350	//   ]
23351	// }
23352
23353}
23354
23355// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete":
23356
23357type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall struct {
23358	s          *Service
23359	name       string
23360	urlParams_ gensupport.URLParams
23361	ctx_       context.Context
23362	header_    http.Header
23363}
23364
23365// Delete: Deletes the specified context.
23366func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Delete(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall {
23367	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23368	c.name = name
23369	return c
23370}
23371
23372// Fields allows partial responses to be retrieved. See
23373// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23374// for more information.
23375func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall {
23376	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23377	return c
23378}
23379
23380// Context sets the context to be used in this call's Do method. Any
23381// pending HTTP request will be aborted if the provided context is
23382// canceled.
23383func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall {
23384	c.ctx_ = ctx
23385	return c
23386}
23387
23388// Header returns an http.Header that can be modified by the caller to
23389// add HTTP headers to the request.
23390func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Header() http.Header {
23391	if c.header_ == nil {
23392		c.header_ = make(http.Header)
23393	}
23394	return c.header_
23395}
23396
23397func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
23398	reqHeaders := make(http.Header)
23399	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23400	for k, v := range c.header_ {
23401		reqHeaders[k] = v
23402	}
23403	reqHeaders.Set("User-Agent", c.s.userAgent())
23404	var body io.Reader = nil
23405	c.urlParams_.Set("alt", alt)
23406	c.urlParams_.Set("prettyPrint", "false")
23407	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
23408	urls += "?" + c.urlParams_.Encode()
23409	req, err := http.NewRequest("DELETE", urls, body)
23410	if err != nil {
23411		return nil, err
23412	}
23413	req.Header = reqHeaders
23414	googleapi.Expand(req.URL, map[string]string{
23415		"name": c.name,
23416	})
23417	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23418}
23419
23420// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete" call.
23421// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
23422// non-2xx status code is an error. Response headers are in either
23423// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
23424// returned at all) in error.(*googleapi.Error).Header. Use
23425// googleapi.IsNotModified to check whether the returned error was
23426// because http.StatusNotModified was returned.
23427func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
23428	gensupport.SetOptions(c.urlParams_, opts...)
23429	res, err := c.doRequest("json")
23430	if res != nil && res.StatusCode == http.StatusNotModified {
23431		if res.Body != nil {
23432			res.Body.Close()
23433		}
23434		return nil, &googleapi.Error{
23435			Code:   res.StatusCode,
23436			Header: res.Header,
23437		}
23438	}
23439	if err != nil {
23440		return nil, err
23441	}
23442	defer googleapi.CloseBody(res)
23443	if err := googleapi.CheckResponse(res); err != nil {
23444		return nil, err
23445	}
23446	ret := &GoogleProtobufEmpty{
23447		ServerResponse: googleapi.ServerResponse{
23448			Header:         res.Header,
23449			HTTPStatusCode: res.StatusCode,
23450		},
23451	}
23452	target := &ret
23453	if err := gensupport.DecodeResponse(target, res); err != nil {
23454		return nil, err
23455	}
23456	return ret, nil
23457	// {
23458	//   "description": "Deletes the specified context.",
23459	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
23460	//   "httpMethod": "DELETE",
23461	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete",
23462	//   "parameterOrder": [
23463	//     "name"
23464	//   ],
23465	//   "parameters": {
23466	//     "name": {
23467	//       "description": "Required. The name of the context to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`. If `Environment ID` is\nnot specified, we assume default 'draft' environment. If `User ID` is not\nspecified, we assume default '-' user.",
23468	//       "location": "path",
23469	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
23470	//       "required": true,
23471	//       "type": "string"
23472	//     }
23473	//   },
23474	//   "path": "v2beta1/{+name}",
23475	//   "response": {
23476	//     "$ref": "GoogleProtobufEmpty"
23477	//   },
23478	//   "scopes": [
23479	//     "https://www.googleapis.com/auth/cloud-platform",
23480	//     "https://www.googleapis.com/auth/dialogflow"
23481	//   ]
23482	// }
23483
23484}
23485
23486// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get":
23487
23488type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall struct {
23489	s            *Service
23490	name         string
23491	urlParams_   gensupport.URLParams
23492	ifNoneMatch_ string
23493	ctx_         context.Context
23494	header_      http.Header
23495}
23496
23497// Get: Retrieves the specified context.
23498func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Get(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
23499	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23500	c.name = name
23501	return c
23502}
23503
23504// Fields allows partial responses to be retrieved. See
23505// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23506// for more information.
23507func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
23508	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23509	return c
23510}
23511
23512// IfNoneMatch sets the optional parameter which makes the operation
23513// fail if the object's ETag matches the given value. This is useful for
23514// getting updates only after the object has changed since the last
23515// request. Use googleapi.IsNotModified to check whether the response
23516// error from Do is the result of In-None-Match.
23517func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
23518	c.ifNoneMatch_ = entityTag
23519	return c
23520}
23521
23522// Context sets the context to be used in this call's Do method. Any
23523// pending HTTP request will be aborted if the provided context is
23524// canceled.
23525func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
23526	c.ctx_ = ctx
23527	return c
23528}
23529
23530// Header returns an http.Header that can be modified by the caller to
23531// add HTTP headers to the request.
23532func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Header() http.Header {
23533	if c.header_ == nil {
23534		c.header_ = make(http.Header)
23535	}
23536	return c.header_
23537}
23538
23539func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
23540	reqHeaders := make(http.Header)
23541	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23542	for k, v := range c.header_ {
23543		reqHeaders[k] = v
23544	}
23545	reqHeaders.Set("User-Agent", c.s.userAgent())
23546	if c.ifNoneMatch_ != "" {
23547		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23548	}
23549	var body io.Reader = nil
23550	c.urlParams_.Set("alt", alt)
23551	c.urlParams_.Set("prettyPrint", "false")
23552	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
23553	urls += "?" + c.urlParams_.Encode()
23554	req, err := http.NewRequest("GET", urls, body)
23555	if err != nil {
23556		return nil, err
23557	}
23558	req.Header = reqHeaders
23559	googleapi.Expand(req.URL, map[string]string{
23560		"name": c.name,
23561	})
23562	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23563}
23564
23565// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get" call.
23566// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
23567// non-nil. Any non-2xx status code is an error. Response headers are in
23568// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
23569// (if a response was returned at all) in
23570// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23571// whether the returned error was because http.StatusNotModified was
23572// returned.
23573func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
23574	gensupport.SetOptions(c.urlParams_, opts...)
23575	res, err := c.doRequest("json")
23576	if res != nil && res.StatusCode == http.StatusNotModified {
23577		if res.Body != nil {
23578			res.Body.Close()
23579		}
23580		return nil, &googleapi.Error{
23581			Code:   res.StatusCode,
23582			Header: res.Header,
23583		}
23584	}
23585	if err != nil {
23586		return nil, err
23587	}
23588	defer googleapi.CloseBody(res)
23589	if err := googleapi.CheckResponse(res); err != nil {
23590		return nil, err
23591	}
23592	ret := &GoogleCloudDialogflowV2beta1Context{
23593		ServerResponse: googleapi.ServerResponse{
23594			Header:         res.Header,
23595			HTTPStatusCode: res.StatusCode,
23596		},
23597	}
23598	target := &ret
23599	if err := gensupport.DecodeResponse(target, res); err != nil {
23600		return nil, err
23601	}
23602	return ret, nil
23603	// {
23604	//   "description": "Retrieves the specified context.",
23605	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
23606	//   "httpMethod": "GET",
23607	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get",
23608	//   "parameterOrder": [
23609	//     "name"
23610	//   ],
23611	//   "parameters": {
23612	//     "name": {
23613	//       "description": "Required. The name of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`. If `Environment ID` is\nnot specified, we assume default 'draft' environment. If `User ID` is not\nspecified, we assume default '-' user.",
23614	//       "location": "path",
23615	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
23616	//       "required": true,
23617	//       "type": "string"
23618	//     }
23619	//   },
23620	//   "path": "v2beta1/{+name}",
23621	//   "response": {
23622	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
23623	//   },
23624	//   "scopes": [
23625	//     "https://www.googleapis.com/auth/cloud-platform",
23626	//     "https://www.googleapis.com/auth/dialogflow"
23627	//   ]
23628	// }
23629
23630}
23631
23632// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list":
23633
23634type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall struct {
23635	s            *Service
23636	parent       string
23637	urlParams_   gensupport.URLParams
23638	ifNoneMatch_ string
23639	ctx_         context.Context
23640	header_      http.Header
23641}
23642
23643// List: Returns the list of all contexts in the specified session.
23644func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) List(parent string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
23645	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23646	c.parent = parent
23647	return c
23648}
23649
23650// PageSize sets the optional parameter "pageSize": The maximum number
23651// of items to return in a single page. By
23652// default 100 and at most 1000.
23653func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
23654	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23655	return c
23656}
23657
23658// PageToken sets the optional parameter "pageToken": The
23659// next_page_token value returned from a previous list request.
23660func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) PageToken(pageToken string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
23661	c.urlParams_.Set("pageToken", pageToken)
23662	return c
23663}
23664
23665// Fields allows partial responses to be retrieved. See
23666// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23667// for more information.
23668func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
23669	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23670	return c
23671}
23672
23673// IfNoneMatch sets the optional parameter which makes the operation
23674// fail if the object's ETag matches the given value. This is useful for
23675// getting updates only after the object has changed since the last
23676// request. Use googleapi.IsNotModified to check whether the response
23677// error from Do is the result of In-None-Match.
23678func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
23679	c.ifNoneMatch_ = entityTag
23680	return c
23681}
23682
23683// Context sets the context to be used in this call's Do method. Any
23684// pending HTTP request will be aborted if the provided context is
23685// canceled.
23686func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
23687	c.ctx_ = ctx
23688	return c
23689}
23690
23691// Header returns an http.Header that can be modified by the caller to
23692// add HTTP headers to the request.
23693func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Header() http.Header {
23694	if c.header_ == nil {
23695		c.header_ = make(http.Header)
23696	}
23697	return c.header_
23698}
23699
23700func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
23701	reqHeaders := make(http.Header)
23702	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23703	for k, v := range c.header_ {
23704		reqHeaders[k] = v
23705	}
23706	reqHeaders.Set("User-Agent", c.s.userAgent())
23707	if c.ifNoneMatch_ != "" {
23708		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23709	}
23710	var body io.Reader = nil
23711	c.urlParams_.Set("alt", alt)
23712	c.urlParams_.Set("prettyPrint", "false")
23713	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
23714	urls += "?" + c.urlParams_.Encode()
23715	req, err := http.NewRequest("GET", urls, body)
23716	if err != nil {
23717		return nil, err
23718	}
23719	req.Header = reqHeaders
23720	googleapi.Expand(req.URL, map[string]string{
23721		"parent": c.parent,
23722	})
23723	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23724}
23725
23726// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list" call.
23727// Exactly one of *GoogleCloudDialogflowV2beta1ListContextsResponse or
23728// error will be non-nil. Any non-2xx status code is an error. Response
23729// headers are in either
23730// *GoogleCloudDialogflowV2beta1ListContextsResponse.ServerResponse.Heade
23731// r or (if a response was returned at all) in
23732// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23733// whether the returned error was because http.StatusNotModified was
23734// returned.
23735func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListContextsResponse, error) {
23736	gensupport.SetOptions(c.urlParams_, opts...)
23737	res, err := c.doRequest("json")
23738	if res != nil && res.StatusCode == http.StatusNotModified {
23739		if res.Body != nil {
23740			res.Body.Close()
23741		}
23742		return nil, &googleapi.Error{
23743			Code:   res.StatusCode,
23744			Header: res.Header,
23745		}
23746	}
23747	if err != nil {
23748		return nil, err
23749	}
23750	defer googleapi.CloseBody(res)
23751	if err := googleapi.CheckResponse(res); err != nil {
23752		return nil, err
23753	}
23754	ret := &GoogleCloudDialogflowV2beta1ListContextsResponse{
23755		ServerResponse: googleapi.ServerResponse{
23756			Header:         res.Header,
23757			HTTPStatusCode: res.StatusCode,
23758		},
23759	}
23760	target := &ret
23761	if err := gensupport.DecodeResponse(target, res); err != nil {
23762		return nil, err
23763	}
23764	return ret, nil
23765	// {
23766	//   "description": "Returns the list of all contexts in the specified session.",
23767	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
23768	//   "httpMethod": "GET",
23769	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list",
23770	//   "parameterOrder": [
23771	//     "parent"
23772	//   ],
23773	//   "parameters": {
23774	//     "pageSize": {
23775	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
23776	//       "format": "int32",
23777	//       "location": "query",
23778	//       "type": "integer"
23779	//     },
23780	//     "pageToken": {
23781	//       "description": "Optional. The next_page_token value returned from a previous list request.",
23782	//       "location": "query",
23783	//       "type": "string"
23784	//     },
23785	//     "parent": {
23786	//       "description": "Required. The session to list all contexts from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
23787	//       "location": "path",
23788	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
23789	//       "required": true,
23790	//       "type": "string"
23791	//     }
23792	//   },
23793	//   "path": "v2beta1/{+parent}/contexts",
23794	//   "response": {
23795	//     "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse"
23796	//   },
23797	//   "scopes": [
23798	//     "https://www.googleapis.com/auth/cloud-platform",
23799	//     "https://www.googleapis.com/auth/dialogflow"
23800	//   ]
23801	// }
23802
23803}
23804
23805// Pages invokes f for each page of results.
23806// A non-nil error returned from f will halt the iteration.
23807// The provided context supersedes any context provided to the Context method.
23808func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListContextsResponse) error) error {
23809	c.ctx_ = ctx
23810	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23811	for {
23812		x, err := c.Do()
23813		if err != nil {
23814			return err
23815		}
23816		if err := f(x); err != nil {
23817			return err
23818		}
23819		if x.NextPageToken == "" {
23820			return nil
23821		}
23822		c.PageToken(x.NextPageToken)
23823	}
23824}
23825
23826// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch":
23827
23828type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall struct {
23829	s                                   *Service
23830	nameid                              string
23831	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
23832	urlParams_                          gensupport.URLParams
23833	ctx_                                context.Context
23834	header_                             http.Header
23835}
23836
23837// Patch: Updates the specified context.
23838func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Patch(nameid string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
23839	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23840	c.nameid = nameid
23841	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
23842	return c
23843}
23844
23845// UpdateMask sets the optional parameter "updateMask": The mask to
23846// control which fields get updated.
23847func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
23848	c.urlParams_.Set("updateMask", updateMask)
23849	return c
23850}
23851
23852// Fields allows partial responses to be retrieved. See
23853// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23854// for more information.
23855func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
23856	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23857	return c
23858}
23859
23860// Context sets the context to be used in this call's Do method. Any
23861// pending HTTP request will be aborted if the provided context is
23862// canceled.
23863func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
23864	c.ctx_ = ctx
23865	return c
23866}
23867
23868// Header returns an http.Header that can be modified by the caller to
23869// add HTTP headers to the request.
23870func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Header() http.Header {
23871	if c.header_ == nil {
23872		c.header_ = make(http.Header)
23873	}
23874	return c.header_
23875}
23876
23877func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
23878	reqHeaders := make(http.Header)
23879	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23880	for k, v := range c.header_ {
23881		reqHeaders[k] = v
23882	}
23883	reqHeaders.Set("User-Agent", c.s.userAgent())
23884	var body io.Reader = nil
23885	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
23886	if err != nil {
23887		return nil, err
23888	}
23889	reqHeaders.Set("Content-Type", "application/json")
23890	c.urlParams_.Set("alt", alt)
23891	c.urlParams_.Set("prettyPrint", "false")
23892	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
23893	urls += "?" + c.urlParams_.Encode()
23894	req, err := http.NewRequest("PATCH", urls, body)
23895	if err != nil {
23896		return nil, err
23897	}
23898	req.Header = reqHeaders
23899	googleapi.Expand(req.URL, map[string]string{
23900		"name": c.nameid,
23901	})
23902	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23903}
23904
23905// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch" call.
23906// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
23907// non-nil. Any non-2xx status code is an error. Response headers are in
23908// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
23909// (if a response was returned at all) in
23910// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23911// whether the returned error was because http.StatusNotModified was
23912// returned.
23913func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
23914	gensupport.SetOptions(c.urlParams_, opts...)
23915	res, err := c.doRequest("json")
23916	if res != nil && res.StatusCode == http.StatusNotModified {
23917		if res.Body != nil {
23918			res.Body.Close()
23919		}
23920		return nil, &googleapi.Error{
23921			Code:   res.StatusCode,
23922			Header: res.Header,
23923		}
23924	}
23925	if err != nil {
23926		return nil, err
23927	}
23928	defer googleapi.CloseBody(res)
23929	if err := googleapi.CheckResponse(res); err != nil {
23930		return nil, err
23931	}
23932	ret := &GoogleCloudDialogflowV2beta1Context{
23933		ServerResponse: googleapi.ServerResponse{
23934			Header:         res.Header,
23935			HTTPStatusCode: res.StatusCode,
23936		},
23937	}
23938	target := &ret
23939	if err := gensupport.DecodeResponse(target, res); err != nil {
23940		return nil, err
23941	}
23942	return ret, nil
23943	// {
23944	//   "description": "Updates the specified context.",
23945	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
23946	//   "httpMethod": "PATCH",
23947	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch",
23948	//   "parameterOrder": [
23949	//     "name"
23950	//   ],
23951	//   "parameters": {
23952	//     "name": {
23953	//       "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`,\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\n\nThe `Context ID` is always converted to lowercase, may only contain\ncharacters in a-zA-Z0-9_-% and may be at most 250 bytes long.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
23954	//       "location": "path",
23955	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
23956	//       "required": true,
23957	//       "type": "string"
23958	//     },
23959	//     "updateMask": {
23960	//       "description": "Optional. The mask to control which fields get updated.",
23961	//       "format": "google-fieldmask",
23962	//       "location": "query",
23963	//       "type": "string"
23964	//     }
23965	//   },
23966	//   "path": "v2beta1/{+name}",
23967	//   "request": {
23968	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
23969	//   },
23970	//   "response": {
23971	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
23972	//   },
23973	//   "scopes": [
23974	//     "https://www.googleapis.com/auth/cloud-platform",
23975	//     "https://www.googleapis.com/auth/dialogflow"
23976	//   ]
23977	// }
23978
23979}
23980
23981// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create":
23982
23983type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall struct {
23984	s                                             *Service
23985	parent                                        string
23986	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
23987	urlParams_                                    gensupport.URLParams
23988	ctx_                                          context.Context
23989	header_                                       http.Header
23990}
23991
23992// Create: Creates a session entity type.
23993//
23994// If the specified session entity type already exists, overrides
23995// the
23996// session entity type.
23997//
23998// This method doesn't work with Google Assistant integration.
23999// Contact Dialogflow support if you need to use session entities
24000// with Google Assistant integration.
24001func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
24002	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24003	c.parent = parent
24004	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
24005	return c
24006}
24007
24008// Fields allows partial responses to be retrieved. See
24009// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24010// for more information.
24011func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
24012	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24013	return c
24014}
24015
24016// Context sets the context to be used in this call's Do method. Any
24017// pending HTTP request will be aborted if the provided context is
24018// canceled.
24019func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
24020	c.ctx_ = ctx
24021	return c
24022}
24023
24024// Header returns an http.Header that can be modified by the caller to
24025// add HTTP headers to the request.
24026func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Header() http.Header {
24027	if c.header_ == nil {
24028		c.header_ = make(http.Header)
24029	}
24030	return c.header_
24031}
24032
24033func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
24034	reqHeaders := make(http.Header)
24035	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24036	for k, v := range c.header_ {
24037		reqHeaders[k] = v
24038	}
24039	reqHeaders.Set("User-Agent", c.s.userAgent())
24040	var body io.Reader = nil
24041	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
24042	if err != nil {
24043		return nil, err
24044	}
24045	reqHeaders.Set("Content-Type", "application/json")
24046	c.urlParams_.Set("alt", alt)
24047	c.urlParams_.Set("prettyPrint", "false")
24048	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
24049	urls += "?" + c.urlParams_.Encode()
24050	req, err := http.NewRequest("POST", urls, body)
24051	if err != nil {
24052		return nil, err
24053	}
24054	req.Header = reqHeaders
24055	googleapi.Expand(req.URL, map[string]string{
24056		"parent": c.parent,
24057	})
24058	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24059}
24060
24061// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create" call.
24062// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
24063// error will be non-nil. Any non-2xx status code is an error. Response
24064// headers are in either
24065// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
24066// or (if a response was returned at all) in
24067// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24068// whether the returned error was because http.StatusNotModified was
24069// returned.
24070func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
24071	gensupport.SetOptions(c.urlParams_, opts...)
24072	res, err := c.doRequest("json")
24073	if res != nil && res.StatusCode == http.StatusNotModified {
24074		if res.Body != nil {
24075			res.Body.Close()
24076		}
24077		return nil, &googleapi.Error{
24078			Code:   res.StatusCode,
24079			Header: res.Header,
24080		}
24081	}
24082	if err != nil {
24083		return nil, err
24084	}
24085	defer googleapi.CloseBody(res)
24086	if err := googleapi.CheckResponse(res); err != nil {
24087		return nil, err
24088	}
24089	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
24090		ServerResponse: googleapi.ServerResponse{
24091			Header:         res.Header,
24092			HTTPStatusCode: res.StatusCode,
24093		},
24094	}
24095	target := &ret
24096	if err := gensupport.DecodeResponse(target, res); err != nil {
24097		return nil, err
24098	}
24099	return ret, nil
24100	// {
24101	//   "description": "Creates a session entity type.\n\nIf the specified session entity type already exists, overrides the\nsession entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
24102	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
24103	//   "httpMethod": "POST",
24104	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create",
24105	//   "parameterOrder": [
24106	//     "parent"
24107	//   ],
24108	//   "parameters": {
24109	//     "parent": {
24110	//       "description": "Required. The session to create a session entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
24111	//       "location": "path",
24112	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
24113	//       "required": true,
24114	//       "type": "string"
24115	//     }
24116	//   },
24117	//   "path": "v2beta1/{+parent}/entityTypes",
24118	//   "request": {
24119	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
24120	//   },
24121	//   "response": {
24122	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
24123	//   },
24124	//   "scopes": [
24125	//     "https://www.googleapis.com/auth/cloud-platform",
24126	//     "https://www.googleapis.com/auth/dialogflow"
24127	//   ]
24128	// }
24129
24130}
24131
24132// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete":
24133
24134type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall struct {
24135	s          *Service
24136	name       string
24137	urlParams_ gensupport.URLParams
24138	ctx_       context.Context
24139	header_    http.Header
24140}
24141
24142// Delete: Deletes the specified session entity type.
24143//
24144// This method doesn't work with Google Assistant integration.
24145// Contact Dialogflow support if you need to use session entities
24146// with Google Assistant integration.
24147func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Delete(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
24148	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24149	c.name = name
24150	return c
24151}
24152
24153// Fields allows partial responses to be retrieved. See
24154// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24155// for more information.
24156func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
24157	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24158	return c
24159}
24160
24161// Context sets the context to be used in this call's Do method. Any
24162// pending HTTP request will be aborted if the provided context is
24163// canceled.
24164func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
24165	c.ctx_ = ctx
24166	return c
24167}
24168
24169// Header returns an http.Header that can be modified by the caller to
24170// add HTTP headers to the request.
24171func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Header() http.Header {
24172	if c.header_ == nil {
24173		c.header_ = make(http.Header)
24174	}
24175	return c.header_
24176}
24177
24178func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
24179	reqHeaders := make(http.Header)
24180	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24181	for k, v := range c.header_ {
24182		reqHeaders[k] = v
24183	}
24184	reqHeaders.Set("User-Agent", c.s.userAgent())
24185	var body io.Reader = nil
24186	c.urlParams_.Set("alt", alt)
24187	c.urlParams_.Set("prettyPrint", "false")
24188	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
24189	urls += "?" + c.urlParams_.Encode()
24190	req, err := http.NewRequest("DELETE", urls, body)
24191	if err != nil {
24192		return nil, err
24193	}
24194	req.Header = reqHeaders
24195	googleapi.Expand(req.URL, map[string]string{
24196		"name": c.name,
24197	})
24198	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24199}
24200
24201// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete" call.
24202// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
24203// non-2xx status code is an error. Response headers are in either
24204// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
24205// returned at all) in error.(*googleapi.Error).Header. Use
24206// googleapi.IsNotModified to check whether the returned error was
24207// because http.StatusNotModified was returned.
24208func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
24209	gensupport.SetOptions(c.urlParams_, opts...)
24210	res, err := c.doRequest("json")
24211	if res != nil && res.StatusCode == http.StatusNotModified {
24212		if res.Body != nil {
24213			res.Body.Close()
24214		}
24215		return nil, &googleapi.Error{
24216			Code:   res.StatusCode,
24217			Header: res.Header,
24218		}
24219	}
24220	if err != nil {
24221		return nil, err
24222	}
24223	defer googleapi.CloseBody(res)
24224	if err := googleapi.CheckResponse(res); err != nil {
24225		return nil, err
24226	}
24227	ret := &GoogleProtobufEmpty{
24228		ServerResponse: googleapi.ServerResponse{
24229			Header:         res.Header,
24230			HTTPStatusCode: res.StatusCode,
24231		},
24232	}
24233	target := &ret
24234	if err := gensupport.DecodeResponse(target, res); err != nil {
24235		return nil, err
24236	}
24237	return ret, nil
24238	// {
24239	//   "description": "Deletes the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
24240	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
24241	//   "httpMethod": "DELETE",
24242	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete",
24243	//   "parameterOrder": [
24244	//     "name"
24245	//   ],
24246	//   "parameters": {
24247	//     "name": {
24248	//       "description": "Required. The name of the entity type to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`. If `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
24249	//       "location": "path",
24250	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
24251	//       "required": true,
24252	//       "type": "string"
24253	//     }
24254	//   },
24255	//   "path": "v2beta1/{+name}",
24256	//   "response": {
24257	//     "$ref": "GoogleProtobufEmpty"
24258	//   },
24259	//   "scopes": [
24260	//     "https://www.googleapis.com/auth/cloud-platform",
24261	//     "https://www.googleapis.com/auth/dialogflow"
24262	//   ]
24263	// }
24264
24265}
24266
24267// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get":
24268
24269type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall struct {
24270	s            *Service
24271	name         string
24272	urlParams_   gensupport.URLParams
24273	ifNoneMatch_ string
24274	ctx_         context.Context
24275	header_      http.Header
24276}
24277
24278// Get: Retrieves the specified session entity type.
24279//
24280// This method doesn't work with Google Assistant integration.
24281// Contact Dialogflow support if you need to use session entities
24282// with Google Assistant integration.
24283func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Get(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
24284	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24285	c.name = name
24286	return c
24287}
24288
24289// Fields allows partial responses to be retrieved. See
24290// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24291// for more information.
24292func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
24293	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24294	return c
24295}
24296
24297// IfNoneMatch sets the optional parameter which makes the operation
24298// fail if the object's ETag matches the given value. This is useful for
24299// getting updates only after the object has changed since the last
24300// request. Use googleapi.IsNotModified to check whether the response
24301// error from Do is the result of In-None-Match.
24302func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
24303	c.ifNoneMatch_ = entityTag
24304	return c
24305}
24306
24307// Context sets the context to be used in this call's Do method. Any
24308// pending HTTP request will be aborted if the provided context is
24309// canceled.
24310func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
24311	c.ctx_ = ctx
24312	return c
24313}
24314
24315// Header returns an http.Header that can be modified by the caller to
24316// add HTTP headers to the request.
24317func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Header() http.Header {
24318	if c.header_ == nil {
24319		c.header_ = make(http.Header)
24320	}
24321	return c.header_
24322}
24323
24324func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
24325	reqHeaders := make(http.Header)
24326	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24327	for k, v := range c.header_ {
24328		reqHeaders[k] = v
24329	}
24330	reqHeaders.Set("User-Agent", c.s.userAgent())
24331	if c.ifNoneMatch_ != "" {
24332		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24333	}
24334	var body io.Reader = nil
24335	c.urlParams_.Set("alt", alt)
24336	c.urlParams_.Set("prettyPrint", "false")
24337	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
24338	urls += "?" + c.urlParams_.Encode()
24339	req, err := http.NewRequest("GET", urls, body)
24340	if err != nil {
24341		return nil, err
24342	}
24343	req.Header = reqHeaders
24344	googleapi.Expand(req.URL, map[string]string{
24345		"name": c.name,
24346	})
24347	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24348}
24349
24350// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get" call.
24351// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
24352// error will be non-nil. Any non-2xx status code is an error. Response
24353// headers are in either
24354// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
24355// or (if a response was returned at all) in
24356// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24357// whether the returned error was because http.StatusNotModified was
24358// returned.
24359func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
24360	gensupport.SetOptions(c.urlParams_, opts...)
24361	res, err := c.doRequest("json")
24362	if res != nil && res.StatusCode == http.StatusNotModified {
24363		if res.Body != nil {
24364			res.Body.Close()
24365		}
24366		return nil, &googleapi.Error{
24367			Code:   res.StatusCode,
24368			Header: res.Header,
24369		}
24370	}
24371	if err != nil {
24372		return nil, err
24373	}
24374	defer googleapi.CloseBody(res)
24375	if err := googleapi.CheckResponse(res); err != nil {
24376		return nil, err
24377	}
24378	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
24379		ServerResponse: googleapi.ServerResponse{
24380			Header:         res.Header,
24381			HTTPStatusCode: res.StatusCode,
24382		},
24383	}
24384	target := &ret
24385	if err := gensupport.DecodeResponse(target, res); err != nil {
24386		return nil, err
24387	}
24388	return ret, nil
24389	// {
24390	//   "description": "Retrieves the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
24391	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
24392	//   "httpMethod": "GET",
24393	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get",
24394	//   "parameterOrder": [
24395	//     "name"
24396	//   ],
24397	//   "parameters": {
24398	//     "name": {
24399	//       "description": "Required. The name of the session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`. If `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
24400	//       "location": "path",
24401	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
24402	//       "required": true,
24403	//       "type": "string"
24404	//     }
24405	//   },
24406	//   "path": "v2beta1/{+name}",
24407	//   "response": {
24408	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
24409	//   },
24410	//   "scopes": [
24411	//     "https://www.googleapis.com/auth/cloud-platform",
24412	//     "https://www.googleapis.com/auth/dialogflow"
24413	//   ]
24414	// }
24415
24416}
24417
24418// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list":
24419
24420type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall struct {
24421	s            *Service
24422	parent       string
24423	urlParams_   gensupport.URLParams
24424	ifNoneMatch_ string
24425	ctx_         context.Context
24426	header_      http.Header
24427}
24428
24429// List: Returns the list of all session entity types in the specified
24430// session.
24431//
24432// This method doesn't work with Google Assistant integration.
24433// Contact Dialogflow support if you need to use session entities
24434// with Google Assistant integration.
24435func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) List(parent string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
24436	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24437	c.parent = parent
24438	return c
24439}
24440
24441// PageSize sets the optional parameter "pageSize": The maximum number
24442// of items to return in a single page. By
24443// default 100 and at most 1000.
24444func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
24445	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24446	return c
24447}
24448
24449// PageToken sets the optional parameter "pageToken": The
24450// next_page_token value returned from a previous list request.
24451func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
24452	c.urlParams_.Set("pageToken", pageToken)
24453	return c
24454}
24455
24456// Fields allows partial responses to be retrieved. See
24457// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24458// for more information.
24459func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
24460	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24461	return c
24462}
24463
24464// IfNoneMatch sets the optional parameter which makes the operation
24465// fail if the object's ETag matches the given value. This is useful for
24466// getting updates only after the object has changed since the last
24467// request. Use googleapi.IsNotModified to check whether the response
24468// error from Do is the result of In-None-Match.
24469func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
24470	c.ifNoneMatch_ = entityTag
24471	return c
24472}
24473
24474// Context sets the context to be used in this call's Do method. Any
24475// pending HTTP request will be aborted if the provided context is
24476// canceled.
24477func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
24478	c.ctx_ = ctx
24479	return c
24480}
24481
24482// Header returns an http.Header that can be modified by the caller to
24483// add HTTP headers to the request.
24484func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Header() http.Header {
24485	if c.header_ == nil {
24486		c.header_ = make(http.Header)
24487	}
24488	return c.header_
24489}
24490
24491func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
24492	reqHeaders := make(http.Header)
24493	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24494	for k, v := range c.header_ {
24495		reqHeaders[k] = v
24496	}
24497	reqHeaders.Set("User-Agent", c.s.userAgent())
24498	if c.ifNoneMatch_ != "" {
24499		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24500	}
24501	var body io.Reader = nil
24502	c.urlParams_.Set("alt", alt)
24503	c.urlParams_.Set("prettyPrint", "false")
24504	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
24505	urls += "?" + c.urlParams_.Encode()
24506	req, err := http.NewRequest("GET", urls, body)
24507	if err != nil {
24508		return nil, err
24509	}
24510	req.Header = reqHeaders
24511	googleapi.Expand(req.URL, map[string]string{
24512		"parent": c.parent,
24513	})
24514	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24515}
24516
24517// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list" call.
24518// Exactly one of
24519// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse or error
24520// will be non-nil. Any non-2xx status code is an error. Response
24521// headers are in either
24522// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse.ServerResp
24523// onse.Header or (if a response was returned at all) in
24524// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24525// whether the returned error was because http.StatusNotModified was
24526// returned.
24527func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse, error) {
24528	gensupport.SetOptions(c.urlParams_, opts...)
24529	res, err := c.doRequest("json")
24530	if res != nil && res.StatusCode == http.StatusNotModified {
24531		if res.Body != nil {
24532			res.Body.Close()
24533		}
24534		return nil, &googleapi.Error{
24535			Code:   res.StatusCode,
24536			Header: res.Header,
24537		}
24538	}
24539	if err != nil {
24540		return nil, err
24541	}
24542	defer googleapi.CloseBody(res)
24543	if err := googleapi.CheckResponse(res); err != nil {
24544		return nil, err
24545	}
24546	ret := &GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse{
24547		ServerResponse: googleapi.ServerResponse{
24548			Header:         res.Header,
24549			HTTPStatusCode: res.StatusCode,
24550		},
24551	}
24552	target := &ret
24553	if err := gensupport.DecodeResponse(target, res); err != nil {
24554		return nil, err
24555	}
24556	return ret, nil
24557	// {
24558	//   "description": "Returns the list of all session entity types in the specified session.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
24559	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
24560	//   "httpMethod": "GET",
24561	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list",
24562	//   "parameterOrder": [
24563	//     "parent"
24564	//   ],
24565	//   "parameters": {
24566	//     "pageSize": {
24567	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
24568	//       "format": "int32",
24569	//       "location": "query",
24570	//       "type": "integer"
24571	//     },
24572	//     "pageToken": {
24573	//       "description": "Optional. The next_page_token value returned from a previous list request.",
24574	//       "location": "query",
24575	//       "type": "string"
24576	//     },
24577	//     "parent": {
24578	//       "description": "Required. The session to list all session entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
24579	//       "location": "path",
24580	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
24581	//       "required": true,
24582	//       "type": "string"
24583	//     }
24584	//   },
24585	//   "path": "v2beta1/{+parent}/entityTypes",
24586	//   "response": {
24587	//     "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse"
24588	//   },
24589	//   "scopes": [
24590	//     "https://www.googleapis.com/auth/cloud-platform",
24591	//     "https://www.googleapis.com/auth/dialogflow"
24592	//   ]
24593	// }
24594
24595}
24596
24597// Pages invokes f for each page of results.
24598// A non-nil error returned from f will halt the iteration.
24599// The provided context supersedes any context provided to the Context method.
24600func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) error) error {
24601	c.ctx_ = ctx
24602	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24603	for {
24604		x, err := c.Do()
24605		if err != nil {
24606			return err
24607		}
24608		if err := f(x); err != nil {
24609			return err
24610		}
24611		if x.NextPageToken == "" {
24612			return nil
24613		}
24614		c.PageToken(x.NextPageToken)
24615	}
24616}
24617
24618// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch":
24619
24620type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall struct {
24621	s                                             *Service
24622	nameid                                        string
24623	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
24624	urlParams_                                    gensupport.URLParams
24625	ctx_                                          context.Context
24626	header_                                       http.Header
24627}
24628
24629// Patch: Updates the specified session entity type.
24630//
24631// This method doesn't work with Google Assistant integration.
24632// Contact Dialogflow support if you need to use session entities
24633// with Google Assistant integration.
24634func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
24635	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24636	c.nameid = nameid
24637	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
24638	return c
24639}
24640
24641// UpdateMask sets the optional parameter "updateMask": The mask to
24642// control which fields get updated.
24643func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
24644	c.urlParams_.Set("updateMask", updateMask)
24645	return c
24646}
24647
24648// Fields allows partial responses to be retrieved. See
24649// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24650// for more information.
24651func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
24652	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24653	return c
24654}
24655
24656// Context sets the context to be used in this call's Do method. Any
24657// pending HTTP request will be aborted if the provided context is
24658// canceled.
24659func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
24660	c.ctx_ = ctx
24661	return c
24662}
24663
24664// Header returns an http.Header that can be modified by the caller to
24665// add HTTP headers to the request.
24666func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Header() http.Header {
24667	if c.header_ == nil {
24668		c.header_ = make(http.Header)
24669	}
24670	return c.header_
24671}
24672
24673func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
24674	reqHeaders := make(http.Header)
24675	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24676	for k, v := range c.header_ {
24677		reqHeaders[k] = v
24678	}
24679	reqHeaders.Set("User-Agent", c.s.userAgent())
24680	var body io.Reader = nil
24681	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
24682	if err != nil {
24683		return nil, err
24684	}
24685	reqHeaders.Set("Content-Type", "application/json")
24686	c.urlParams_.Set("alt", alt)
24687	c.urlParams_.Set("prettyPrint", "false")
24688	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
24689	urls += "?" + c.urlParams_.Encode()
24690	req, err := http.NewRequest("PATCH", urls, body)
24691	if err != nil {
24692		return nil, err
24693	}
24694	req.Header = reqHeaders
24695	googleapi.Expand(req.URL, map[string]string{
24696		"name": c.nameid,
24697	})
24698	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24699}
24700
24701// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch" call.
24702// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
24703// error will be non-nil. Any non-2xx status code is an error. Response
24704// headers are in either
24705// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
24706// or (if a response was returned at all) in
24707// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24708// whether the returned error was because http.StatusNotModified was
24709// returned.
24710func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, 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 := &GoogleCloudDialogflowV2beta1SessionEntityType{
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": "Updates the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
24742	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
24743	//   "httpMethod": "PATCH",
24744	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch",
24745	//   "parameterOrder": [
24746	//     "name"
24747	//   ],
24748	//   "parameters": {
24749	//     "name": {
24750	//       "description": "Required. The unique identifier of this session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e`, or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display Name\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\n`\u003cEntity Type Display Name\u003e` must be the display name of an existing entity\ntype in the same agent that will be overridden or supplemented.",
24751	//       "location": "path",
24752	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
24753	//       "required": true,
24754	//       "type": "string"
24755	//     },
24756	//     "updateMask": {
24757	//       "description": "Optional. The mask to control which fields get updated.",
24758	//       "format": "google-fieldmask",
24759	//       "location": "query",
24760	//       "type": "string"
24761	//     }
24762	//   },
24763	//   "path": "v2beta1/{+name}",
24764	//   "request": {
24765	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
24766	//   },
24767	//   "response": {
24768	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
24769	//   },
24770	//   "scopes": [
24771	//     "https://www.googleapis.com/auth/cloud-platform",
24772	//     "https://www.googleapis.com/auth/dialogflow"
24773	//   ]
24774	// }
24775
24776}
24777
24778// method id "dialogflow.projects.locations.agent.intents.batchDelete":
24779
24780type ProjectsLocationsAgentIntentsBatchDeleteCall struct {
24781	s                                                     *Service
24782	parent                                                string
24783	googleclouddialogflowv2beta1batchdeleteintentsrequest *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest
24784	urlParams_                                            gensupport.URLParams
24785	ctx_                                                  context.Context
24786	header_                                               http.Header
24787}
24788
24789// BatchDelete: Deletes intents in the specified agent.
24790//
24791// Operation <response: google.protobuf.Empty>
24792func (r *ProjectsLocationsAgentIntentsService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteintentsrequest *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest) *ProjectsLocationsAgentIntentsBatchDeleteCall {
24793	c := &ProjectsLocationsAgentIntentsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24794	c.parent = parent
24795	c.googleclouddialogflowv2beta1batchdeleteintentsrequest = googleclouddialogflowv2beta1batchdeleteintentsrequest
24796	return c
24797}
24798
24799// Fields allows partial responses to be retrieved. See
24800// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24801// for more information.
24802func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsBatchDeleteCall {
24803	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24804	return c
24805}
24806
24807// Context sets the context to be used in this call's Do method. Any
24808// pending HTTP request will be aborted if the provided context is
24809// canceled.
24810func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsBatchDeleteCall {
24811	c.ctx_ = ctx
24812	return c
24813}
24814
24815// Header returns an http.Header that can be modified by the caller to
24816// add HTTP headers to the request.
24817func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Header() http.Header {
24818	if c.header_ == nil {
24819		c.header_ = make(http.Header)
24820	}
24821	return c.header_
24822}
24823
24824func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
24825	reqHeaders := make(http.Header)
24826	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24827	for k, v := range c.header_ {
24828		reqHeaders[k] = v
24829	}
24830	reqHeaders.Set("User-Agent", c.s.userAgent())
24831	var body io.Reader = nil
24832	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteintentsrequest)
24833	if err != nil {
24834		return nil, err
24835	}
24836	reqHeaders.Set("Content-Type", "application/json")
24837	c.urlParams_.Set("alt", alt)
24838	c.urlParams_.Set("prettyPrint", "false")
24839	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents:batchDelete")
24840	urls += "?" + c.urlParams_.Encode()
24841	req, err := http.NewRequest("POST", urls, body)
24842	if err != nil {
24843		return nil, err
24844	}
24845	req.Header = reqHeaders
24846	googleapi.Expand(req.URL, map[string]string{
24847		"parent": c.parent,
24848	})
24849	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24850}
24851
24852// Do executes the "dialogflow.projects.locations.agent.intents.batchDelete" call.
24853// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
24854// Any non-2xx status code is an error. Response headers are in either
24855// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
24856// was returned at all) in error.(*googleapi.Error).Header. Use
24857// googleapi.IsNotModified to check whether the returned error was
24858// because http.StatusNotModified was returned.
24859func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
24860	gensupport.SetOptions(c.urlParams_, opts...)
24861	res, err := c.doRequest("json")
24862	if res != nil && res.StatusCode == http.StatusNotModified {
24863		if res.Body != nil {
24864			res.Body.Close()
24865		}
24866		return nil, &googleapi.Error{
24867			Code:   res.StatusCode,
24868			Header: res.Header,
24869		}
24870	}
24871	if err != nil {
24872		return nil, err
24873	}
24874	defer googleapi.CloseBody(res)
24875	if err := googleapi.CheckResponse(res); err != nil {
24876		return nil, err
24877	}
24878	ret := &GoogleLongrunningOperation{
24879		ServerResponse: googleapi.ServerResponse{
24880			Header:         res.Header,
24881			HTTPStatusCode: res.StatusCode,
24882		},
24883	}
24884	target := &ret
24885	if err := gensupport.DecodeResponse(target, res); err != nil {
24886		return nil, err
24887	}
24888	return ret, nil
24889	// {
24890	//   "description": "Deletes intents in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
24891	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents:batchDelete",
24892	//   "httpMethod": "POST",
24893	//   "id": "dialogflow.projects.locations.agent.intents.batchDelete",
24894	//   "parameterOrder": [
24895	//     "parent"
24896	//   ],
24897	//   "parameters": {
24898	//     "parent": {
24899	//       "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.",
24900	//       "location": "path",
24901	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
24902	//       "required": true,
24903	//       "type": "string"
24904	//     }
24905	//   },
24906	//   "path": "v2beta1/{+parent}/intents:batchDelete",
24907	//   "request": {
24908	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest"
24909	//   },
24910	//   "response": {
24911	//     "$ref": "GoogleLongrunningOperation"
24912	//   },
24913	//   "scopes": [
24914	//     "https://www.googleapis.com/auth/cloud-platform",
24915	//     "https://www.googleapis.com/auth/dialogflow"
24916	//   ]
24917	// }
24918
24919}
24920
24921// method id "dialogflow.projects.locations.agent.intents.batchUpdate":
24922
24923type ProjectsLocationsAgentIntentsBatchUpdateCall struct {
24924	s                                                     *Service
24925	parent                                                string
24926	googleclouddialogflowv2beta1batchupdateintentsrequest *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest
24927	urlParams_                                            gensupport.URLParams
24928	ctx_                                                  context.Context
24929	header_                                               http.Header
24930}
24931
24932// BatchUpdate: Updates/Creates multiple intents in the specified
24933// agent.
24934//
24935// Operation <response: BatchUpdateIntentsResponse>
24936func (r *ProjectsLocationsAgentIntentsService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateintentsrequest *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest) *ProjectsLocationsAgentIntentsBatchUpdateCall {
24937	c := &ProjectsLocationsAgentIntentsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24938	c.parent = parent
24939	c.googleclouddialogflowv2beta1batchupdateintentsrequest = googleclouddialogflowv2beta1batchupdateintentsrequest
24940	return c
24941}
24942
24943// Fields allows partial responses to be retrieved. See
24944// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24945// for more information.
24946func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsBatchUpdateCall {
24947	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24948	return c
24949}
24950
24951// Context sets the context to be used in this call's Do method. Any
24952// pending HTTP request will be aborted if the provided context is
24953// canceled.
24954func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsBatchUpdateCall {
24955	c.ctx_ = ctx
24956	return c
24957}
24958
24959// Header returns an http.Header that can be modified by the caller to
24960// add HTTP headers to the request.
24961func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Header() http.Header {
24962	if c.header_ == nil {
24963		c.header_ = make(http.Header)
24964	}
24965	return c.header_
24966}
24967
24968func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
24969	reqHeaders := make(http.Header)
24970	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24971	for k, v := range c.header_ {
24972		reqHeaders[k] = v
24973	}
24974	reqHeaders.Set("User-Agent", c.s.userAgent())
24975	var body io.Reader = nil
24976	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateintentsrequest)
24977	if err != nil {
24978		return nil, err
24979	}
24980	reqHeaders.Set("Content-Type", "application/json")
24981	c.urlParams_.Set("alt", alt)
24982	c.urlParams_.Set("prettyPrint", "false")
24983	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents:batchUpdate")
24984	urls += "?" + c.urlParams_.Encode()
24985	req, err := http.NewRequest("POST", urls, body)
24986	if err != nil {
24987		return nil, err
24988	}
24989	req.Header = reqHeaders
24990	googleapi.Expand(req.URL, map[string]string{
24991		"parent": c.parent,
24992	})
24993	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24994}
24995
24996// Do executes the "dialogflow.projects.locations.agent.intents.batchUpdate" call.
24997// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
24998// Any non-2xx status code is an error. Response headers are in either
24999// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
25000// was returned at all) in error.(*googleapi.Error).Header. Use
25001// googleapi.IsNotModified to check whether the returned error was
25002// because http.StatusNotModified was returned.
25003func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
25004	gensupport.SetOptions(c.urlParams_, opts...)
25005	res, err := c.doRequest("json")
25006	if res != nil && res.StatusCode == http.StatusNotModified {
25007		if res.Body != nil {
25008			res.Body.Close()
25009		}
25010		return nil, &googleapi.Error{
25011			Code:   res.StatusCode,
25012			Header: res.Header,
25013		}
25014	}
25015	if err != nil {
25016		return nil, err
25017	}
25018	defer googleapi.CloseBody(res)
25019	if err := googleapi.CheckResponse(res); err != nil {
25020		return nil, err
25021	}
25022	ret := &GoogleLongrunningOperation{
25023		ServerResponse: googleapi.ServerResponse{
25024			Header:         res.Header,
25025			HTTPStatusCode: res.StatusCode,
25026		},
25027	}
25028	target := &ret
25029	if err := gensupport.DecodeResponse(target, res); err != nil {
25030		return nil, err
25031	}
25032	return ret, nil
25033	// {
25034	//   "description": "Updates/Creates multiple intents in the specified agent.\n\nOperation \u003cresponse: BatchUpdateIntentsResponse\u003e",
25035	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents:batchUpdate",
25036	//   "httpMethod": "POST",
25037	//   "id": "dialogflow.projects.locations.agent.intents.batchUpdate",
25038	//   "parameterOrder": [
25039	//     "parent"
25040	//   ],
25041	//   "parameters": {
25042	//     "parent": {
25043	//       "description": "Required. The name of the agent to update or create intents in.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
25044	//       "location": "path",
25045	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
25046	//       "required": true,
25047	//       "type": "string"
25048	//     }
25049	//   },
25050	//   "path": "v2beta1/{+parent}/intents:batchUpdate",
25051	//   "request": {
25052	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest"
25053	//   },
25054	//   "response": {
25055	//     "$ref": "GoogleLongrunningOperation"
25056	//   },
25057	//   "scopes": [
25058	//     "https://www.googleapis.com/auth/cloud-platform",
25059	//     "https://www.googleapis.com/auth/dialogflow"
25060	//   ]
25061	// }
25062
25063}
25064
25065// method id "dialogflow.projects.locations.agent.intents.create":
25066
25067type ProjectsLocationsAgentIntentsCreateCall struct {
25068	s                                  *Service
25069	parent                             string
25070	googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent
25071	urlParams_                         gensupport.URLParams
25072	ctx_                               context.Context
25073	header_                            http.Header
25074}
25075
25076// Create: Creates an intent in the specified agent.
25077func (r *ProjectsLocationsAgentIntentsService) Create(parent string, googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent) *ProjectsLocationsAgentIntentsCreateCall {
25078	c := &ProjectsLocationsAgentIntentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25079	c.parent = parent
25080	c.googleclouddialogflowv2beta1intent = googleclouddialogflowv2beta1intent
25081	return c
25082}
25083
25084// IntentView sets the optional parameter "intentView": The resource
25085// view to apply to the returned intent.
25086//
25087// Possible values:
25088//   "INTENT_VIEW_UNSPECIFIED"
25089//   "INTENT_VIEW_FULL"
25090func (c *ProjectsLocationsAgentIntentsCreateCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsCreateCall {
25091	c.urlParams_.Set("intentView", intentView)
25092	return c
25093}
25094
25095// LanguageCode sets the optional parameter "languageCode": The language
25096// of training phrases, parameters and rich messages
25097// defined in `intent`. If not specified, the agent's default language
25098// is
25099// used.
25100// [Many
25101// languages](https://cloud.google.com/dialogflow/docs/reference/la
25102// nguage)
25103// are supported. Note: languages must be enabled in the agent before
25104// they can
25105// be used.
25106func (c *ProjectsLocationsAgentIntentsCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsCreateCall {
25107	c.urlParams_.Set("languageCode", languageCode)
25108	return c
25109}
25110
25111// Fields allows partial responses to be retrieved. See
25112// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25113// for more information.
25114func (c *ProjectsLocationsAgentIntentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsCreateCall {
25115	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25116	return c
25117}
25118
25119// Context sets the context to be used in this call's Do method. Any
25120// pending HTTP request will be aborted if the provided context is
25121// canceled.
25122func (c *ProjectsLocationsAgentIntentsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsCreateCall {
25123	c.ctx_ = ctx
25124	return c
25125}
25126
25127// Header returns an http.Header that can be modified by the caller to
25128// add HTTP headers to the request.
25129func (c *ProjectsLocationsAgentIntentsCreateCall) Header() http.Header {
25130	if c.header_ == nil {
25131		c.header_ = make(http.Header)
25132	}
25133	return c.header_
25134}
25135
25136func (c *ProjectsLocationsAgentIntentsCreateCall) doRequest(alt string) (*http.Response, error) {
25137	reqHeaders := make(http.Header)
25138	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
25139	for k, v := range c.header_ {
25140		reqHeaders[k] = v
25141	}
25142	reqHeaders.Set("User-Agent", c.s.userAgent())
25143	var body io.Reader = nil
25144	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1intent)
25145	if err != nil {
25146		return nil, err
25147	}
25148	reqHeaders.Set("Content-Type", "application/json")
25149	c.urlParams_.Set("alt", alt)
25150	c.urlParams_.Set("prettyPrint", "false")
25151	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents")
25152	urls += "?" + c.urlParams_.Encode()
25153	req, err := http.NewRequest("POST", urls, body)
25154	if err != nil {
25155		return nil, err
25156	}
25157	req.Header = reqHeaders
25158	googleapi.Expand(req.URL, map[string]string{
25159		"parent": c.parent,
25160	})
25161	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25162}
25163
25164// Do executes the "dialogflow.projects.locations.agent.intents.create" call.
25165// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
25166// non-nil. Any non-2xx status code is an error. Response headers are in
25167// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
25168// (if a response was returned at all) in
25169// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25170// whether the returned error was because http.StatusNotModified was
25171// returned.
25172func (c *ProjectsLocationsAgentIntentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
25173	gensupport.SetOptions(c.urlParams_, opts...)
25174	res, err := c.doRequest("json")
25175	if res != nil && res.StatusCode == http.StatusNotModified {
25176		if res.Body != nil {
25177			res.Body.Close()
25178		}
25179		return nil, &googleapi.Error{
25180			Code:   res.StatusCode,
25181			Header: res.Header,
25182		}
25183	}
25184	if err != nil {
25185		return nil, err
25186	}
25187	defer googleapi.CloseBody(res)
25188	if err := googleapi.CheckResponse(res); err != nil {
25189		return nil, err
25190	}
25191	ret := &GoogleCloudDialogflowV2beta1Intent{
25192		ServerResponse: googleapi.ServerResponse{
25193			Header:         res.Header,
25194			HTTPStatusCode: res.StatusCode,
25195		},
25196	}
25197	target := &ret
25198	if err := gensupport.DecodeResponse(target, res); err != nil {
25199		return nil, err
25200	}
25201	return ret, nil
25202	// {
25203	//   "description": "Creates an intent in the specified agent.",
25204	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents",
25205	//   "httpMethod": "POST",
25206	//   "id": "dialogflow.projects.locations.agent.intents.create",
25207	//   "parameterOrder": [
25208	//     "parent"
25209	//   ],
25210	//   "parameters": {
25211	//     "intentView": {
25212	//       "description": "Optional. The resource view to apply to the returned intent.",
25213	//       "enum": [
25214	//         "INTENT_VIEW_UNSPECIFIED",
25215	//         "INTENT_VIEW_FULL"
25216	//       ],
25217	//       "location": "query",
25218	//       "type": "string"
25219	//     },
25220	//     "languageCode": {
25221	//       "description": "Optional. The language of training phrases, parameters and rich messages\ndefined in `intent`. If not specified, the agent's default language is\nused. [Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
25222	//       "location": "query",
25223	//       "type": "string"
25224	//     },
25225	//     "parent": {
25226	//       "description": "Required. The agent to create a intent for.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
25227	//       "location": "path",
25228	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
25229	//       "required": true,
25230	//       "type": "string"
25231	//     }
25232	//   },
25233	//   "path": "v2beta1/{+parent}/intents",
25234	//   "request": {
25235	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
25236	//   },
25237	//   "response": {
25238	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
25239	//   },
25240	//   "scopes": [
25241	//     "https://www.googleapis.com/auth/cloud-platform",
25242	//     "https://www.googleapis.com/auth/dialogflow"
25243	//   ]
25244	// }
25245
25246}
25247
25248// method id "dialogflow.projects.locations.agent.intents.delete":
25249
25250type ProjectsLocationsAgentIntentsDeleteCall struct {
25251	s          *Service
25252	name       string
25253	urlParams_ gensupport.URLParams
25254	ctx_       context.Context
25255	header_    http.Header
25256}
25257
25258// Delete: Deletes the specified intent and its direct or indirect
25259// followup intents.
25260func (r *ProjectsLocationsAgentIntentsService) Delete(name string) *ProjectsLocationsAgentIntentsDeleteCall {
25261	c := &ProjectsLocationsAgentIntentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25262	c.name = name
25263	return c
25264}
25265
25266// Fields allows partial responses to be retrieved. See
25267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25268// for more information.
25269func (c *ProjectsLocationsAgentIntentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsDeleteCall {
25270	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25271	return c
25272}
25273
25274// Context sets the context to be used in this call's Do method. Any
25275// pending HTTP request will be aborted if the provided context is
25276// canceled.
25277func (c *ProjectsLocationsAgentIntentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsDeleteCall {
25278	c.ctx_ = ctx
25279	return c
25280}
25281
25282// Header returns an http.Header that can be modified by the caller to
25283// add HTTP headers to the request.
25284func (c *ProjectsLocationsAgentIntentsDeleteCall) Header() http.Header {
25285	if c.header_ == nil {
25286		c.header_ = make(http.Header)
25287	}
25288	return c.header_
25289}
25290
25291func (c *ProjectsLocationsAgentIntentsDeleteCall) doRequest(alt string) (*http.Response, error) {
25292	reqHeaders := make(http.Header)
25293	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
25294	for k, v := range c.header_ {
25295		reqHeaders[k] = v
25296	}
25297	reqHeaders.Set("User-Agent", c.s.userAgent())
25298	var body io.Reader = nil
25299	c.urlParams_.Set("alt", alt)
25300	c.urlParams_.Set("prettyPrint", "false")
25301	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
25302	urls += "?" + c.urlParams_.Encode()
25303	req, err := http.NewRequest("DELETE", urls, body)
25304	if err != nil {
25305		return nil, err
25306	}
25307	req.Header = reqHeaders
25308	googleapi.Expand(req.URL, map[string]string{
25309		"name": c.name,
25310	})
25311	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25312}
25313
25314// Do executes the "dialogflow.projects.locations.agent.intents.delete" call.
25315// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
25316// non-2xx status code is an error. Response headers are in either
25317// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
25318// returned at all) in error.(*googleapi.Error).Header. Use
25319// googleapi.IsNotModified to check whether the returned error was
25320// because http.StatusNotModified was returned.
25321func (c *ProjectsLocationsAgentIntentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
25322	gensupport.SetOptions(c.urlParams_, opts...)
25323	res, err := c.doRequest("json")
25324	if res != nil && res.StatusCode == http.StatusNotModified {
25325		if res.Body != nil {
25326			res.Body.Close()
25327		}
25328		return nil, &googleapi.Error{
25329			Code:   res.StatusCode,
25330			Header: res.Header,
25331		}
25332	}
25333	if err != nil {
25334		return nil, err
25335	}
25336	defer googleapi.CloseBody(res)
25337	if err := googleapi.CheckResponse(res); err != nil {
25338		return nil, err
25339	}
25340	ret := &GoogleProtobufEmpty{
25341		ServerResponse: googleapi.ServerResponse{
25342			Header:         res.Header,
25343			HTTPStatusCode: res.StatusCode,
25344		},
25345	}
25346	target := &ret
25347	if err := gensupport.DecodeResponse(target, res); err != nil {
25348		return nil, err
25349	}
25350	return ret, nil
25351	// {
25352	//   "description": "Deletes the specified intent and its direct or indirect followup intents.",
25353	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}",
25354	//   "httpMethod": "DELETE",
25355	//   "id": "dialogflow.projects.locations.agent.intents.delete",
25356	//   "parameterOrder": [
25357	//     "name"
25358	//   ],
25359	//   "parameters": {
25360	//     "name": {
25361	//       "description": "Required. The name of the intent to delete. If this intent has direct or\nindirect followup intents, we also delete them.\n\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.",
25362	//       "location": "path",
25363	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$",
25364	//       "required": true,
25365	//       "type": "string"
25366	//     }
25367	//   },
25368	//   "path": "v2beta1/{+name}",
25369	//   "response": {
25370	//     "$ref": "GoogleProtobufEmpty"
25371	//   },
25372	//   "scopes": [
25373	//     "https://www.googleapis.com/auth/cloud-platform",
25374	//     "https://www.googleapis.com/auth/dialogflow"
25375	//   ]
25376	// }
25377
25378}
25379
25380// method id "dialogflow.projects.locations.agent.intents.get":
25381
25382type ProjectsLocationsAgentIntentsGetCall struct {
25383	s            *Service
25384	name         string
25385	urlParams_   gensupport.URLParams
25386	ifNoneMatch_ string
25387	ctx_         context.Context
25388	header_      http.Header
25389}
25390
25391// Get: Retrieves the specified intent.
25392func (r *ProjectsLocationsAgentIntentsService) Get(name string) *ProjectsLocationsAgentIntentsGetCall {
25393	c := &ProjectsLocationsAgentIntentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25394	c.name = name
25395	return c
25396}
25397
25398// IntentView sets the optional parameter "intentView": The resource
25399// view to apply to the returned intent.
25400//
25401// Possible values:
25402//   "INTENT_VIEW_UNSPECIFIED"
25403//   "INTENT_VIEW_FULL"
25404func (c *ProjectsLocationsAgentIntentsGetCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsGetCall {
25405	c.urlParams_.Set("intentView", intentView)
25406	return c
25407}
25408
25409// LanguageCode sets the optional parameter "languageCode": The language
25410// to retrieve training phrases, parameters and rich
25411// messages for. If not specified, the agent's default language is
25412// used.
25413// [Many
25414// languages](https://cloud.google.com/dialogflow/docs/refere
25415// nce/language)
25416// are supported. Note: languages must be enabled in the agent before
25417// they can
25418// be used.
25419func (c *ProjectsLocationsAgentIntentsGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsGetCall {
25420	c.urlParams_.Set("languageCode", languageCode)
25421	return c
25422}
25423
25424// Fields allows partial responses to be retrieved. See
25425// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25426// for more information.
25427func (c *ProjectsLocationsAgentIntentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsGetCall {
25428	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25429	return c
25430}
25431
25432// IfNoneMatch sets the optional parameter which makes the operation
25433// fail if the object's ETag matches the given value. This is useful for
25434// getting updates only after the object has changed since the last
25435// request. Use googleapi.IsNotModified to check whether the response
25436// error from Do is the result of In-None-Match.
25437func (c *ProjectsLocationsAgentIntentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentIntentsGetCall {
25438	c.ifNoneMatch_ = entityTag
25439	return c
25440}
25441
25442// Context sets the context to be used in this call's Do method. Any
25443// pending HTTP request will be aborted if the provided context is
25444// canceled.
25445func (c *ProjectsLocationsAgentIntentsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsGetCall {
25446	c.ctx_ = ctx
25447	return c
25448}
25449
25450// Header returns an http.Header that can be modified by the caller to
25451// add HTTP headers to the request.
25452func (c *ProjectsLocationsAgentIntentsGetCall) Header() http.Header {
25453	if c.header_ == nil {
25454		c.header_ = make(http.Header)
25455	}
25456	return c.header_
25457}
25458
25459func (c *ProjectsLocationsAgentIntentsGetCall) doRequest(alt string) (*http.Response, error) {
25460	reqHeaders := make(http.Header)
25461	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
25462	for k, v := range c.header_ {
25463		reqHeaders[k] = v
25464	}
25465	reqHeaders.Set("User-Agent", c.s.userAgent())
25466	if c.ifNoneMatch_ != "" {
25467		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25468	}
25469	var body io.Reader = nil
25470	c.urlParams_.Set("alt", alt)
25471	c.urlParams_.Set("prettyPrint", "false")
25472	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
25473	urls += "?" + c.urlParams_.Encode()
25474	req, err := http.NewRequest("GET", urls, body)
25475	if err != nil {
25476		return nil, err
25477	}
25478	req.Header = reqHeaders
25479	googleapi.Expand(req.URL, map[string]string{
25480		"name": c.name,
25481	})
25482	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25483}
25484
25485// Do executes the "dialogflow.projects.locations.agent.intents.get" call.
25486// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
25487// non-nil. Any non-2xx status code is an error. Response headers are in
25488// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
25489// (if a response was returned at all) in
25490// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25491// whether the returned error was because http.StatusNotModified was
25492// returned.
25493func (c *ProjectsLocationsAgentIntentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
25494	gensupport.SetOptions(c.urlParams_, opts...)
25495	res, err := c.doRequest("json")
25496	if res != nil && res.StatusCode == http.StatusNotModified {
25497		if res.Body != nil {
25498			res.Body.Close()
25499		}
25500		return nil, &googleapi.Error{
25501			Code:   res.StatusCode,
25502			Header: res.Header,
25503		}
25504	}
25505	if err != nil {
25506		return nil, err
25507	}
25508	defer googleapi.CloseBody(res)
25509	if err := googleapi.CheckResponse(res); err != nil {
25510		return nil, err
25511	}
25512	ret := &GoogleCloudDialogflowV2beta1Intent{
25513		ServerResponse: googleapi.ServerResponse{
25514			Header:         res.Header,
25515			HTTPStatusCode: res.StatusCode,
25516		},
25517	}
25518	target := &ret
25519	if err := gensupport.DecodeResponse(target, res); err != nil {
25520		return nil, err
25521	}
25522	return ret, nil
25523	// {
25524	//   "description": "Retrieves the specified intent.",
25525	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}",
25526	//   "httpMethod": "GET",
25527	//   "id": "dialogflow.projects.locations.agent.intents.get",
25528	//   "parameterOrder": [
25529	//     "name"
25530	//   ],
25531	//   "parameters": {
25532	//     "intentView": {
25533	//       "description": "Optional. The resource view to apply to the returned intent.",
25534	//       "enum": [
25535	//         "INTENT_VIEW_UNSPECIFIED",
25536	//         "INTENT_VIEW_FULL"
25537	//       ],
25538	//       "location": "query",
25539	//       "type": "string"
25540	//     },
25541	//     "languageCode": {
25542	//       "description": "Optional. The language to retrieve training phrases, parameters and rich\nmessages for. If not specified, the agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
25543	//       "location": "query",
25544	//       "type": "string"
25545	//     },
25546	//     "name": {
25547	//       "description": "Required. The name of the intent.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.",
25548	//       "location": "path",
25549	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$",
25550	//       "required": true,
25551	//       "type": "string"
25552	//     }
25553	//   },
25554	//   "path": "v2beta1/{+name}",
25555	//   "response": {
25556	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
25557	//   },
25558	//   "scopes": [
25559	//     "https://www.googleapis.com/auth/cloud-platform",
25560	//     "https://www.googleapis.com/auth/dialogflow"
25561	//   ]
25562	// }
25563
25564}
25565
25566// method id "dialogflow.projects.locations.agent.intents.list":
25567
25568type ProjectsLocationsAgentIntentsListCall struct {
25569	s            *Service
25570	parent       string
25571	urlParams_   gensupport.URLParams
25572	ifNoneMatch_ string
25573	ctx_         context.Context
25574	header_      http.Header
25575}
25576
25577// List: Returns the list of all intents in the specified agent.
25578func (r *ProjectsLocationsAgentIntentsService) List(parent string) *ProjectsLocationsAgentIntentsListCall {
25579	c := &ProjectsLocationsAgentIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25580	c.parent = parent
25581	return c
25582}
25583
25584// IntentView sets the optional parameter "intentView": The resource
25585// view to apply to the returned intent.
25586//
25587// Possible values:
25588//   "INTENT_VIEW_UNSPECIFIED"
25589//   "INTENT_VIEW_FULL"
25590func (c *ProjectsLocationsAgentIntentsListCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsListCall {
25591	c.urlParams_.Set("intentView", intentView)
25592	return c
25593}
25594
25595// LanguageCode sets the optional parameter "languageCode": The language
25596// to list training phrases, parameters and rich
25597// messages for. If not specified, the agent's default language is
25598// used.
25599// [Many
25600// languages](https://cloud.google.com/dialogflow/docs/refere
25601// nce/language)
25602// are supported. Note: languages must be enabled in the agent before
25603// they can
25604// be used.
25605func (c *ProjectsLocationsAgentIntentsListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsListCall {
25606	c.urlParams_.Set("languageCode", languageCode)
25607	return c
25608}
25609
25610// PageSize sets the optional parameter "pageSize": The maximum number
25611// of items to return in a single page. By
25612// default 100 and at most 1000.
25613func (c *ProjectsLocationsAgentIntentsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentIntentsListCall {
25614	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
25615	return c
25616}
25617
25618// PageToken sets the optional parameter "pageToken": The
25619// next_page_token value returned from a previous list request.
25620func (c *ProjectsLocationsAgentIntentsListCall) PageToken(pageToken string) *ProjectsLocationsAgentIntentsListCall {
25621	c.urlParams_.Set("pageToken", pageToken)
25622	return c
25623}
25624
25625// Fields allows partial responses to be retrieved. See
25626// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25627// for more information.
25628func (c *ProjectsLocationsAgentIntentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsListCall {
25629	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25630	return c
25631}
25632
25633// IfNoneMatch sets the optional parameter which makes the operation
25634// fail if the object's ETag matches the given value. This is useful for
25635// getting updates only after the object has changed since the last
25636// request. Use googleapi.IsNotModified to check whether the response
25637// error from Do is the result of In-None-Match.
25638func (c *ProjectsLocationsAgentIntentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentIntentsListCall {
25639	c.ifNoneMatch_ = entityTag
25640	return c
25641}
25642
25643// Context sets the context to be used in this call's Do method. Any
25644// pending HTTP request will be aborted if the provided context is
25645// canceled.
25646func (c *ProjectsLocationsAgentIntentsListCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsListCall {
25647	c.ctx_ = ctx
25648	return c
25649}
25650
25651// Header returns an http.Header that can be modified by the caller to
25652// add HTTP headers to the request.
25653func (c *ProjectsLocationsAgentIntentsListCall) Header() http.Header {
25654	if c.header_ == nil {
25655		c.header_ = make(http.Header)
25656	}
25657	return c.header_
25658}
25659
25660func (c *ProjectsLocationsAgentIntentsListCall) doRequest(alt string) (*http.Response, error) {
25661	reqHeaders := make(http.Header)
25662	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
25663	for k, v := range c.header_ {
25664		reqHeaders[k] = v
25665	}
25666	reqHeaders.Set("User-Agent", c.s.userAgent())
25667	if c.ifNoneMatch_ != "" {
25668		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25669	}
25670	var body io.Reader = nil
25671	c.urlParams_.Set("alt", alt)
25672	c.urlParams_.Set("prettyPrint", "false")
25673	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents")
25674	urls += "?" + c.urlParams_.Encode()
25675	req, err := http.NewRequest("GET", urls, body)
25676	if err != nil {
25677		return nil, err
25678	}
25679	req.Header = reqHeaders
25680	googleapi.Expand(req.URL, map[string]string{
25681		"parent": c.parent,
25682	})
25683	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25684}
25685
25686// Do executes the "dialogflow.projects.locations.agent.intents.list" call.
25687// Exactly one of *GoogleCloudDialogflowV2beta1ListIntentsResponse or
25688// error will be non-nil. Any non-2xx status code is an error. Response
25689// headers are in either
25690// *GoogleCloudDialogflowV2beta1ListIntentsResponse.ServerResponse.Header
25691//  or (if a response was returned at all) in
25692// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25693// whether the returned error was because http.StatusNotModified was
25694// returned.
25695func (c *ProjectsLocationsAgentIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListIntentsResponse, error) {
25696	gensupport.SetOptions(c.urlParams_, opts...)
25697	res, err := c.doRequest("json")
25698	if res != nil && res.StatusCode == http.StatusNotModified {
25699		if res.Body != nil {
25700			res.Body.Close()
25701		}
25702		return nil, &googleapi.Error{
25703			Code:   res.StatusCode,
25704			Header: res.Header,
25705		}
25706	}
25707	if err != nil {
25708		return nil, err
25709	}
25710	defer googleapi.CloseBody(res)
25711	if err := googleapi.CheckResponse(res); err != nil {
25712		return nil, err
25713	}
25714	ret := &GoogleCloudDialogflowV2beta1ListIntentsResponse{
25715		ServerResponse: googleapi.ServerResponse{
25716			Header:         res.Header,
25717			HTTPStatusCode: res.StatusCode,
25718		},
25719	}
25720	target := &ret
25721	if err := gensupport.DecodeResponse(target, res); err != nil {
25722		return nil, err
25723	}
25724	return ret, nil
25725	// {
25726	//   "description": "Returns the list of all intents in the specified agent.",
25727	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents",
25728	//   "httpMethod": "GET",
25729	//   "id": "dialogflow.projects.locations.agent.intents.list",
25730	//   "parameterOrder": [
25731	//     "parent"
25732	//   ],
25733	//   "parameters": {
25734	//     "intentView": {
25735	//       "description": "Optional. The resource view to apply to the returned intent.",
25736	//       "enum": [
25737	//         "INTENT_VIEW_UNSPECIFIED",
25738	//         "INTENT_VIEW_FULL"
25739	//       ],
25740	//       "location": "query",
25741	//       "type": "string"
25742	//     },
25743	//     "languageCode": {
25744	//       "description": "Optional. The language to list training phrases, parameters and rich\nmessages for. If not specified, the agent's default language is used.\n[Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
25745	//       "location": "query",
25746	//       "type": "string"
25747	//     },
25748	//     "pageSize": {
25749	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
25750	//       "format": "int32",
25751	//       "location": "query",
25752	//       "type": "integer"
25753	//     },
25754	//     "pageToken": {
25755	//       "description": "Optional. The next_page_token value returned from a previous list request.",
25756	//       "location": "query",
25757	//       "type": "string"
25758	//     },
25759	//     "parent": {
25760	//       "description": "Required. The agent to list all intents from.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
25761	//       "location": "path",
25762	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
25763	//       "required": true,
25764	//       "type": "string"
25765	//     }
25766	//   },
25767	//   "path": "v2beta1/{+parent}/intents",
25768	//   "response": {
25769	//     "$ref": "GoogleCloudDialogflowV2beta1ListIntentsResponse"
25770	//   },
25771	//   "scopes": [
25772	//     "https://www.googleapis.com/auth/cloud-platform",
25773	//     "https://www.googleapis.com/auth/dialogflow"
25774	//   ]
25775	// }
25776
25777}
25778
25779// Pages invokes f for each page of results.
25780// A non-nil error returned from f will halt the iteration.
25781// The provided context supersedes any context provided to the Context method.
25782func (c *ProjectsLocationsAgentIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListIntentsResponse) error) error {
25783	c.ctx_ = ctx
25784	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25785	for {
25786		x, err := c.Do()
25787		if err != nil {
25788			return err
25789		}
25790		if err := f(x); err != nil {
25791			return err
25792		}
25793		if x.NextPageToken == "" {
25794			return nil
25795		}
25796		c.PageToken(x.NextPageToken)
25797	}
25798}
25799
25800// method id "dialogflow.projects.locations.agent.intents.patch":
25801
25802type ProjectsLocationsAgentIntentsPatchCall struct {
25803	s                                  *Service
25804	nameid                             string
25805	googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent
25806	urlParams_                         gensupport.URLParams
25807	ctx_                               context.Context
25808	header_                            http.Header
25809}
25810
25811// Patch: Updates the specified intent.
25812func (r *ProjectsLocationsAgentIntentsService) Patch(nameid string, googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent) *ProjectsLocationsAgentIntentsPatchCall {
25813	c := &ProjectsLocationsAgentIntentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25814	c.nameid = nameid
25815	c.googleclouddialogflowv2beta1intent = googleclouddialogflowv2beta1intent
25816	return c
25817}
25818
25819// IntentView sets the optional parameter "intentView": The resource
25820// view to apply to the returned intent.
25821//
25822// Possible values:
25823//   "INTENT_VIEW_UNSPECIFIED"
25824//   "INTENT_VIEW_FULL"
25825func (c *ProjectsLocationsAgentIntentsPatchCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsPatchCall {
25826	c.urlParams_.Set("intentView", intentView)
25827	return c
25828}
25829
25830// LanguageCode sets the optional parameter "languageCode": The language
25831// of training phrases, parameters and rich messages
25832// defined in `intent`. If not specified, the agent's default language
25833// is
25834// used.
25835// [Many
25836// languages](https://cloud.google.com/dialogflow/docs/reference/la
25837// nguage)
25838// are supported. Note: languages must be enabled in the agent before
25839// they can
25840// be used.
25841func (c *ProjectsLocationsAgentIntentsPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsPatchCall {
25842	c.urlParams_.Set("languageCode", languageCode)
25843	return c
25844}
25845
25846// UpdateMask sets the optional parameter "updateMask": The mask to
25847// control which fields get updated.
25848func (c *ProjectsLocationsAgentIntentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentIntentsPatchCall {
25849	c.urlParams_.Set("updateMask", updateMask)
25850	return c
25851}
25852
25853// Fields allows partial responses to be retrieved. See
25854// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25855// for more information.
25856func (c *ProjectsLocationsAgentIntentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsPatchCall {
25857	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25858	return c
25859}
25860
25861// Context sets the context to be used in this call's Do method. Any
25862// pending HTTP request will be aborted if the provided context is
25863// canceled.
25864func (c *ProjectsLocationsAgentIntentsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsPatchCall {
25865	c.ctx_ = ctx
25866	return c
25867}
25868
25869// Header returns an http.Header that can be modified by the caller to
25870// add HTTP headers to the request.
25871func (c *ProjectsLocationsAgentIntentsPatchCall) Header() http.Header {
25872	if c.header_ == nil {
25873		c.header_ = make(http.Header)
25874	}
25875	return c.header_
25876}
25877
25878func (c *ProjectsLocationsAgentIntentsPatchCall) doRequest(alt string) (*http.Response, error) {
25879	reqHeaders := make(http.Header)
25880	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
25881	for k, v := range c.header_ {
25882		reqHeaders[k] = v
25883	}
25884	reqHeaders.Set("User-Agent", c.s.userAgent())
25885	var body io.Reader = nil
25886	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1intent)
25887	if err != nil {
25888		return nil, err
25889	}
25890	reqHeaders.Set("Content-Type", "application/json")
25891	c.urlParams_.Set("alt", alt)
25892	c.urlParams_.Set("prettyPrint", "false")
25893	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
25894	urls += "?" + c.urlParams_.Encode()
25895	req, err := http.NewRequest("PATCH", urls, body)
25896	if err != nil {
25897		return nil, err
25898	}
25899	req.Header = reqHeaders
25900	googleapi.Expand(req.URL, map[string]string{
25901		"name": c.nameid,
25902	})
25903	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25904}
25905
25906// Do executes the "dialogflow.projects.locations.agent.intents.patch" call.
25907// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
25908// non-nil. Any non-2xx status code is an error. Response headers are in
25909// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
25910// (if a response was returned at all) in
25911// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25912// whether the returned error was because http.StatusNotModified was
25913// returned.
25914func (c *ProjectsLocationsAgentIntentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
25915	gensupport.SetOptions(c.urlParams_, opts...)
25916	res, err := c.doRequest("json")
25917	if res != nil && res.StatusCode == http.StatusNotModified {
25918		if res.Body != nil {
25919			res.Body.Close()
25920		}
25921		return nil, &googleapi.Error{
25922			Code:   res.StatusCode,
25923			Header: res.Header,
25924		}
25925	}
25926	if err != nil {
25927		return nil, err
25928	}
25929	defer googleapi.CloseBody(res)
25930	if err := googleapi.CheckResponse(res); err != nil {
25931		return nil, err
25932	}
25933	ret := &GoogleCloudDialogflowV2beta1Intent{
25934		ServerResponse: googleapi.ServerResponse{
25935			Header:         res.Header,
25936			HTTPStatusCode: res.StatusCode,
25937		},
25938	}
25939	target := &ret
25940	if err := gensupport.DecodeResponse(target, res); err != nil {
25941		return nil, err
25942	}
25943	return ret, nil
25944	// {
25945	//   "description": "Updates the specified intent.",
25946	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}",
25947	//   "httpMethod": "PATCH",
25948	//   "id": "dialogflow.projects.locations.agent.intents.patch",
25949	//   "parameterOrder": [
25950	//     "name"
25951	//   ],
25952	//   "parameters": {
25953	//     "intentView": {
25954	//       "description": "Optional. The resource view to apply to the returned intent.",
25955	//       "enum": [
25956	//         "INTENT_VIEW_UNSPECIFIED",
25957	//         "INTENT_VIEW_FULL"
25958	//       ],
25959	//       "location": "query",
25960	//       "type": "string"
25961	//     },
25962	//     "languageCode": {
25963	//       "description": "Optional. The language of training phrases, parameters and rich messages\ndefined in `intent`. If not specified, the agent's default language is\nused. [Many\nlanguages](https://cloud.google.com/dialogflow/docs/reference/language)\nare supported. Note: languages must be enabled in the agent before they can\nbe used.",
25964	//       "location": "query",
25965	//       "type": "string"
25966	//     },
25967	//     "name": {
25968	//       "description": "The unique identifier of this intent.\nRequired for Intents.UpdateIntent and Intents.BatchUpdateIntents\nmethods.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.",
25969	//       "location": "path",
25970	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$",
25971	//       "required": true,
25972	//       "type": "string"
25973	//     },
25974	//     "updateMask": {
25975	//       "description": "Optional. The mask to control which fields get updated.",
25976	//       "format": "google-fieldmask",
25977	//       "location": "query",
25978	//       "type": "string"
25979	//     }
25980	//   },
25981	//   "path": "v2beta1/{+name}",
25982	//   "request": {
25983	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
25984	//   },
25985	//   "response": {
25986	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
25987	//   },
25988	//   "scopes": [
25989	//     "https://www.googleapis.com/auth/cloud-platform",
25990	//     "https://www.googleapis.com/auth/dialogflow"
25991	//   ]
25992	// }
25993
25994}
25995
25996// method id "dialogflow.projects.locations.agent.sessions.deleteContexts":
25997
25998type ProjectsLocationsAgentSessionsDeleteContextsCall struct {
25999	s          *Service
26000	parent     string
26001	urlParams_ gensupport.URLParams
26002	ctx_       context.Context
26003	header_    http.Header
26004}
26005
26006// DeleteContexts: Deletes all active contexts in the specified session.
26007func (r *ProjectsLocationsAgentSessionsService) DeleteContexts(parent string) *ProjectsLocationsAgentSessionsDeleteContextsCall {
26008	c := &ProjectsLocationsAgentSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26009	c.parent = parent
26010	return c
26011}
26012
26013// Fields allows partial responses to be retrieved. See
26014// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26015// for more information.
26016func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsDeleteContextsCall {
26017	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26018	return c
26019}
26020
26021// Context sets the context to be used in this call's Do method. Any
26022// pending HTTP request will be aborted if the provided context is
26023// canceled.
26024func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsDeleteContextsCall {
26025	c.ctx_ = ctx
26026	return c
26027}
26028
26029// Header returns an http.Header that can be modified by the caller to
26030// add HTTP headers to the request.
26031func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Header() http.Header {
26032	if c.header_ == nil {
26033		c.header_ = make(http.Header)
26034	}
26035	return c.header_
26036}
26037
26038func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
26039	reqHeaders := make(http.Header)
26040	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26041	for k, v := range c.header_ {
26042		reqHeaders[k] = v
26043	}
26044	reqHeaders.Set("User-Agent", c.s.userAgent())
26045	var body io.Reader = nil
26046	c.urlParams_.Set("alt", alt)
26047	c.urlParams_.Set("prettyPrint", "false")
26048	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
26049	urls += "?" + c.urlParams_.Encode()
26050	req, err := http.NewRequest("DELETE", urls, body)
26051	if err != nil {
26052		return nil, err
26053	}
26054	req.Header = reqHeaders
26055	googleapi.Expand(req.URL, map[string]string{
26056		"parent": c.parent,
26057	})
26058	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26059}
26060
26061// Do executes the "dialogflow.projects.locations.agent.sessions.deleteContexts" call.
26062// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
26063// non-2xx status code is an error. Response headers are in either
26064// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
26065// returned at all) in error.(*googleapi.Error).Header. Use
26066// googleapi.IsNotModified to check whether the returned error was
26067// because http.StatusNotModified was returned.
26068func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
26069	gensupport.SetOptions(c.urlParams_, opts...)
26070	res, err := c.doRequest("json")
26071	if res != nil && res.StatusCode == http.StatusNotModified {
26072		if res.Body != nil {
26073			res.Body.Close()
26074		}
26075		return nil, &googleapi.Error{
26076			Code:   res.StatusCode,
26077			Header: res.Header,
26078		}
26079	}
26080	if err != nil {
26081		return nil, err
26082	}
26083	defer googleapi.CloseBody(res)
26084	if err := googleapi.CheckResponse(res); err != nil {
26085		return nil, err
26086	}
26087	ret := &GoogleProtobufEmpty{
26088		ServerResponse: googleapi.ServerResponse{
26089			Header:         res.Header,
26090			HTTPStatusCode: res.StatusCode,
26091		},
26092	}
26093	target := &ret
26094	if err := gensupport.DecodeResponse(target, res); err != nil {
26095		return nil, err
26096	}
26097	return ret, nil
26098	// {
26099	//   "description": "Deletes all active contexts in the specified session.",
26100	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts",
26101	//   "httpMethod": "DELETE",
26102	//   "id": "dialogflow.projects.locations.agent.sessions.deleteContexts",
26103	//   "parameterOrder": [
26104	//     "parent"
26105	//   ],
26106	//   "parameters": {
26107	//     "parent": {
26108	//       "description": "Required. The name of the session to delete all contexts from. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or `projects/\u003cProject\nID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession\nID\u003e`. If `Environment ID` is not specified we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
26109	//       "location": "path",
26110	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
26111	//       "required": true,
26112	//       "type": "string"
26113	//     }
26114	//   },
26115	//   "path": "v2beta1/{+parent}/contexts",
26116	//   "response": {
26117	//     "$ref": "GoogleProtobufEmpty"
26118	//   },
26119	//   "scopes": [
26120	//     "https://www.googleapis.com/auth/cloud-platform",
26121	//     "https://www.googleapis.com/auth/dialogflow"
26122	//   ]
26123	// }
26124
26125}
26126
26127// method id "dialogflow.projects.locations.agent.sessions.detectIntent":
26128
26129type ProjectsLocationsAgentSessionsDetectIntentCall struct {
26130	s                                               *Service
26131	sessionid                                       string
26132	googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest
26133	urlParams_                                      gensupport.URLParams
26134	ctx_                                            context.Context
26135	header_                                         http.Header
26136}
26137
26138// DetectIntent: Processes a natural language query and returns
26139// structured, actionable data
26140// as a result. This method is not idempotent, because it may cause
26141// contexts
26142// and session entity types to be updated, which in turn might
26143// affect
26144// results of future queries.
26145func (r *ProjectsLocationsAgentSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest) *ProjectsLocationsAgentSessionsDetectIntentCall {
26146	c := &ProjectsLocationsAgentSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26147	c.sessionid = sessionid
26148	c.googleclouddialogflowv2beta1detectintentrequest = googleclouddialogflowv2beta1detectintentrequest
26149	return c
26150}
26151
26152// Fields allows partial responses to be retrieved. See
26153// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26154// for more information.
26155func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsDetectIntentCall {
26156	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26157	return c
26158}
26159
26160// Context sets the context to be used in this call's Do method. Any
26161// pending HTTP request will be aborted if the provided context is
26162// canceled.
26163func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsDetectIntentCall {
26164	c.ctx_ = ctx
26165	return c
26166}
26167
26168// Header returns an http.Header that can be modified by the caller to
26169// add HTTP headers to the request.
26170func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Header() http.Header {
26171	if c.header_ == nil {
26172		c.header_ = make(http.Header)
26173	}
26174	return c.header_
26175}
26176
26177func (c *ProjectsLocationsAgentSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
26178	reqHeaders := make(http.Header)
26179	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26180	for k, v := range c.header_ {
26181		reqHeaders[k] = v
26182	}
26183	reqHeaders.Set("User-Agent", c.s.userAgent())
26184	var body io.Reader = nil
26185	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1detectintentrequest)
26186	if err != nil {
26187		return nil, err
26188	}
26189	reqHeaders.Set("Content-Type", "application/json")
26190	c.urlParams_.Set("alt", alt)
26191	c.urlParams_.Set("prettyPrint", "false")
26192	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+session}:detectIntent")
26193	urls += "?" + c.urlParams_.Encode()
26194	req, err := http.NewRequest("POST", urls, body)
26195	if err != nil {
26196		return nil, err
26197	}
26198	req.Header = reqHeaders
26199	googleapi.Expand(req.URL, map[string]string{
26200		"session": c.sessionid,
26201	})
26202	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26203}
26204
26205// Do executes the "dialogflow.projects.locations.agent.sessions.detectIntent" call.
26206// Exactly one of *GoogleCloudDialogflowV2beta1DetectIntentResponse or
26207// error will be non-nil. Any non-2xx status code is an error. Response
26208// headers are in either
26209// *GoogleCloudDialogflowV2beta1DetectIntentResponse.ServerResponse.Heade
26210// r or (if a response was returned at all) in
26211// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26212// whether the returned error was because http.StatusNotModified was
26213// returned.
26214func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1DetectIntentResponse, error) {
26215	gensupport.SetOptions(c.urlParams_, opts...)
26216	res, err := c.doRequest("json")
26217	if res != nil && res.StatusCode == http.StatusNotModified {
26218		if res.Body != nil {
26219			res.Body.Close()
26220		}
26221		return nil, &googleapi.Error{
26222			Code:   res.StatusCode,
26223			Header: res.Header,
26224		}
26225	}
26226	if err != nil {
26227		return nil, err
26228	}
26229	defer googleapi.CloseBody(res)
26230	if err := googleapi.CheckResponse(res); err != nil {
26231		return nil, err
26232	}
26233	ret := &GoogleCloudDialogflowV2beta1DetectIntentResponse{
26234		ServerResponse: googleapi.ServerResponse{
26235			Header:         res.Header,
26236			HTTPStatusCode: res.StatusCode,
26237		},
26238	}
26239	target := &ret
26240	if err := gensupport.DecodeResponse(target, res); err != nil {
26241		return nil, err
26242	}
26243	return ret, nil
26244	// {
26245	//   "description": "Processes a natural language query and returns structured, actionable data\nas a result. This method is not idempotent, because it may cause contexts\nand session entity types to be updated, which in turn might affect\nresults of future queries.",
26246	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}:detectIntent",
26247	//   "httpMethod": "POST",
26248	//   "id": "dialogflow.projects.locations.agent.sessions.detectIntent",
26249	//   "parameterOrder": [
26250	//     "session"
26251	//   ],
26252	//   "parameters": {
26253	//     "session": {
26254	//       "description": "Required. The name of the session this query is sent to. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e`, or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we are using\n\"-\". It's up to the API caller to choose an appropriate `Session ID` and\n`User Id`. They can be a random number or some type of user and session\nidentifiers (preferably hashed). The length of the `Session ID` and\n`User ID` must not exceed 36 characters.",
26255	//       "location": "path",
26256	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
26257	//       "required": true,
26258	//       "type": "string"
26259	//     }
26260	//   },
26261	//   "path": "v2beta1/{+session}:detectIntent",
26262	//   "request": {
26263	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest"
26264	//   },
26265	//   "response": {
26266	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse"
26267	//   },
26268	//   "scopes": [
26269	//     "https://www.googleapis.com/auth/cloud-platform",
26270	//     "https://www.googleapis.com/auth/dialogflow"
26271	//   ]
26272	// }
26273
26274}
26275
26276// method id "dialogflow.projects.locations.agent.sessions.contexts.create":
26277
26278type ProjectsLocationsAgentSessionsContextsCreateCall struct {
26279	s                                   *Service
26280	parent                              string
26281	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
26282	urlParams_                          gensupport.URLParams
26283	ctx_                                context.Context
26284	header_                             http.Header
26285}
26286
26287// Create: Creates a context.
26288//
26289// If the specified context already exists, overrides the context.
26290func (r *ProjectsLocationsAgentSessionsContextsService) Create(parent string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsLocationsAgentSessionsContextsCreateCall {
26291	c := &ProjectsLocationsAgentSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26292	c.parent = parent
26293	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
26294	return c
26295}
26296
26297// Fields allows partial responses to be retrieved. See
26298// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26299// for more information.
26300func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsCreateCall {
26301	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26302	return c
26303}
26304
26305// Context sets the context to be used in this call's Do method. Any
26306// pending HTTP request will be aborted if the provided context is
26307// canceled.
26308func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsCreateCall {
26309	c.ctx_ = ctx
26310	return c
26311}
26312
26313// Header returns an http.Header that can be modified by the caller to
26314// add HTTP headers to the request.
26315func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Header() http.Header {
26316	if c.header_ == nil {
26317		c.header_ = make(http.Header)
26318	}
26319	return c.header_
26320}
26321
26322func (c *ProjectsLocationsAgentSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
26323	reqHeaders := make(http.Header)
26324	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26325	for k, v := range c.header_ {
26326		reqHeaders[k] = v
26327	}
26328	reqHeaders.Set("User-Agent", c.s.userAgent())
26329	var body io.Reader = nil
26330	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
26331	if err != nil {
26332		return nil, err
26333	}
26334	reqHeaders.Set("Content-Type", "application/json")
26335	c.urlParams_.Set("alt", alt)
26336	c.urlParams_.Set("prettyPrint", "false")
26337	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
26338	urls += "?" + c.urlParams_.Encode()
26339	req, err := http.NewRequest("POST", urls, body)
26340	if err != nil {
26341		return nil, err
26342	}
26343	req.Header = reqHeaders
26344	googleapi.Expand(req.URL, map[string]string{
26345		"parent": c.parent,
26346	})
26347	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26348}
26349
26350// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.create" call.
26351// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
26352// non-nil. Any non-2xx status code is an error. Response headers are in
26353// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
26354// (if a response was returned at all) in
26355// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26356// whether the returned error was because http.StatusNotModified was
26357// returned.
26358func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
26359	gensupport.SetOptions(c.urlParams_, opts...)
26360	res, err := c.doRequest("json")
26361	if res != nil && res.StatusCode == http.StatusNotModified {
26362		if res.Body != nil {
26363			res.Body.Close()
26364		}
26365		return nil, &googleapi.Error{
26366			Code:   res.StatusCode,
26367			Header: res.Header,
26368		}
26369	}
26370	if err != nil {
26371		return nil, err
26372	}
26373	defer googleapi.CloseBody(res)
26374	if err := googleapi.CheckResponse(res); err != nil {
26375		return nil, err
26376	}
26377	ret := &GoogleCloudDialogflowV2beta1Context{
26378		ServerResponse: googleapi.ServerResponse{
26379			Header:         res.Header,
26380			HTTPStatusCode: res.StatusCode,
26381		},
26382	}
26383	target := &ret
26384	if err := gensupport.DecodeResponse(target, res); err != nil {
26385		return nil, err
26386	}
26387	return ret, nil
26388	// {
26389	//   "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.",
26390	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts",
26391	//   "httpMethod": "POST",
26392	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.create",
26393	//   "parameterOrder": [
26394	//     "parent"
26395	//   ],
26396	//   "parameters": {
26397	//     "parent": {
26398	//       "description": "Required. The session to create a context for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
26399	//       "location": "path",
26400	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
26401	//       "required": true,
26402	//       "type": "string"
26403	//     }
26404	//   },
26405	//   "path": "v2beta1/{+parent}/contexts",
26406	//   "request": {
26407	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
26408	//   },
26409	//   "response": {
26410	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
26411	//   },
26412	//   "scopes": [
26413	//     "https://www.googleapis.com/auth/cloud-platform",
26414	//     "https://www.googleapis.com/auth/dialogflow"
26415	//   ]
26416	// }
26417
26418}
26419
26420// method id "dialogflow.projects.locations.agent.sessions.contexts.delete":
26421
26422type ProjectsLocationsAgentSessionsContextsDeleteCall struct {
26423	s          *Service
26424	name       string
26425	urlParams_ gensupport.URLParams
26426	ctx_       context.Context
26427	header_    http.Header
26428}
26429
26430// Delete: Deletes the specified context.
26431func (r *ProjectsLocationsAgentSessionsContextsService) Delete(name string) *ProjectsLocationsAgentSessionsContextsDeleteCall {
26432	c := &ProjectsLocationsAgentSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26433	c.name = name
26434	return c
26435}
26436
26437// Fields allows partial responses to be retrieved. See
26438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26439// for more information.
26440func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsDeleteCall {
26441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26442	return c
26443}
26444
26445// Context sets the context to be used in this call's Do method. Any
26446// pending HTTP request will be aborted if the provided context is
26447// canceled.
26448func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsDeleteCall {
26449	c.ctx_ = ctx
26450	return c
26451}
26452
26453// Header returns an http.Header that can be modified by the caller to
26454// add HTTP headers to the request.
26455func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Header() http.Header {
26456	if c.header_ == nil {
26457		c.header_ = make(http.Header)
26458	}
26459	return c.header_
26460}
26461
26462func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
26463	reqHeaders := make(http.Header)
26464	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26465	for k, v := range c.header_ {
26466		reqHeaders[k] = v
26467	}
26468	reqHeaders.Set("User-Agent", c.s.userAgent())
26469	var body io.Reader = nil
26470	c.urlParams_.Set("alt", alt)
26471	c.urlParams_.Set("prettyPrint", "false")
26472	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
26473	urls += "?" + c.urlParams_.Encode()
26474	req, err := http.NewRequest("DELETE", urls, body)
26475	if err != nil {
26476		return nil, err
26477	}
26478	req.Header = reqHeaders
26479	googleapi.Expand(req.URL, map[string]string{
26480		"name": c.name,
26481	})
26482	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26483}
26484
26485// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.delete" call.
26486// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
26487// non-2xx status code is an error. Response headers are in either
26488// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
26489// returned at all) in error.(*googleapi.Error).Header. Use
26490// googleapi.IsNotModified to check whether the returned error was
26491// because http.StatusNotModified was returned.
26492func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
26493	gensupport.SetOptions(c.urlParams_, opts...)
26494	res, err := c.doRequest("json")
26495	if res != nil && res.StatusCode == http.StatusNotModified {
26496		if res.Body != nil {
26497			res.Body.Close()
26498		}
26499		return nil, &googleapi.Error{
26500			Code:   res.StatusCode,
26501			Header: res.Header,
26502		}
26503	}
26504	if err != nil {
26505		return nil, err
26506	}
26507	defer googleapi.CloseBody(res)
26508	if err := googleapi.CheckResponse(res); err != nil {
26509		return nil, err
26510	}
26511	ret := &GoogleProtobufEmpty{
26512		ServerResponse: googleapi.ServerResponse{
26513			Header:         res.Header,
26514			HTTPStatusCode: res.StatusCode,
26515		},
26516	}
26517	target := &ret
26518	if err := gensupport.DecodeResponse(target, res); err != nil {
26519		return nil, err
26520	}
26521	return ret, nil
26522	// {
26523	//   "description": "Deletes the specified context.",
26524	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
26525	//   "httpMethod": "DELETE",
26526	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.delete",
26527	//   "parameterOrder": [
26528	//     "name"
26529	//   ],
26530	//   "parameters": {
26531	//     "name": {
26532	//       "description": "Required. The name of the context to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`. If `Environment ID` is\nnot specified, we assume default 'draft' environment. If `User ID` is not\nspecified, we assume default '-' user.",
26533	//       "location": "path",
26534	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
26535	//       "required": true,
26536	//       "type": "string"
26537	//     }
26538	//   },
26539	//   "path": "v2beta1/{+name}",
26540	//   "response": {
26541	//     "$ref": "GoogleProtobufEmpty"
26542	//   },
26543	//   "scopes": [
26544	//     "https://www.googleapis.com/auth/cloud-platform",
26545	//     "https://www.googleapis.com/auth/dialogflow"
26546	//   ]
26547	// }
26548
26549}
26550
26551// method id "dialogflow.projects.locations.agent.sessions.contexts.get":
26552
26553type ProjectsLocationsAgentSessionsContextsGetCall struct {
26554	s            *Service
26555	name         string
26556	urlParams_   gensupport.URLParams
26557	ifNoneMatch_ string
26558	ctx_         context.Context
26559	header_      http.Header
26560}
26561
26562// Get: Retrieves the specified context.
26563func (r *ProjectsLocationsAgentSessionsContextsService) Get(name string) *ProjectsLocationsAgentSessionsContextsGetCall {
26564	c := &ProjectsLocationsAgentSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26565	c.name = name
26566	return c
26567}
26568
26569// Fields allows partial responses to be retrieved. See
26570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26571// for more information.
26572func (c *ProjectsLocationsAgentSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsGetCall {
26573	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26574	return c
26575}
26576
26577// IfNoneMatch sets the optional parameter which makes the operation
26578// fail if the object's ETag matches the given value. This is useful for
26579// getting updates only after the object has changed since the last
26580// request. Use googleapi.IsNotModified to check whether the response
26581// error from Do is the result of In-None-Match.
26582func (c *ProjectsLocationsAgentSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsContextsGetCall {
26583	c.ifNoneMatch_ = entityTag
26584	return c
26585}
26586
26587// Context sets the context to be used in this call's Do method. Any
26588// pending HTTP request will be aborted if the provided context is
26589// canceled.
26590func (c *ProjectsLocationsAgentSessionsContextsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsGetCall {
26591	c.ctx_ = ctx
26592	return c
26593}
26594
26595// Header returns an http.Header that can be modified by the caller to
26596// add HTTP headers to the request.
26597func (c *ProjectsLocationsAgentSessionsContextsGetCall) Header() http.Header {
26598	if c.header_ == nil {
26599		c.header_ = make(http.Header)
26600	}
26601	return c.header_
26602}
26603
26604func (c *ProjectsLocationsAgentSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
26605	reqHeaders := make(http.Header)
26606	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26607	for k, v := range c.header_ {
26608		reqHeaders[k] = v
26609	}
26610	reqHeaders.Set("User-Agent", c.s.userAgent())
26611	if c.ifNoneMatch_ != "" {
26612		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26613	}
26614	var body io.Reader = nil
26615	c.urlParams_.Set("alt", alt)
26616	c.urlParams_.Set("prettyPrint", "false")
26617	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
26618	urls += "?" + c.urlParams_.Encode()
26619	req, err := http.NewRequest("GET", urls, body)
26620	if err != nil {
26621		return nil, err
26622	}
26623	req.Header = reqHeaders
26624	googleapi.Expand(req.URL, map[string]string{
26625		"name": c.name,
26626	})
26627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26628}
26629
26630// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.get" call.
26631// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
26632// non-nil. Any non-2xx status code is an error. Response headers are in
26633// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
26634// (if a response was returned at all) in
26635// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26636// whether the returned error was because http.StatusNotModified was
26637// returned.
26638func (c *ProjectsLocationsAgentSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
26639	gensupport.SetOptions(c.urlParams_, opts...)
26640	res, err := c.doRequest("json")
26641	if res != nil && res.StatusCode == http.StatusNotModified {
26642		if res.Body != nil {
26643			res.Body.Close()
26644		}
26645		return nil, &googleapi.Error{
26646			Code:   res.StatusCode,
26647			Header: res.Header,
26648		}
26649	}
26650	if err != nil {
26651		return nil, err
26652	}
26653	defer googleapi.CloseBody(res)
26654	if err := googleapi.CheckResponse(res); err != nil {
26655		return nil, err
26656	}
26657	ret := &GoogleCloudDialogflowV2beta1Context{
26658		ServerResponse: googleapi.ServerResponse{
26659			Header:         res.Header,
26660			HTTPStatusCode: res.StatusCode,
26661		},
26662	}
26663	target := &ret
26664	if err := gensupport.DecodeResponse(target, res); err != nil {
26665		return nil, err
26666	}
26667	return ret, nil
26668	// {
26669	//   "description": "Retrieves the specified context.",
26670	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
26671	//   "httpMethod": "GET",
26672	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.get",
26673	//   "parameterOrder": [
26674	//     "name"
26675	//   ],
26676	//   "parameters": {
26677	//     "name": {
26678	//       "description": "Required. The name of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`. If `Environment ID` is\nnot specified, we assume default 'draft' environment. If `User ID` is not\nspecified, we assume default '-' user.",
26679	//       "location": "path",
26680	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
26681	//       "required": true,
26682	//       "type": "string"
26683	//     }
26684	//   },
26685	//   "path": "v2beta1/{+name}",
26686	//   "response": {
26687	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
26688	//   },
26689	//   "scopes": [
26690	//     "https://www.googleapis.com/auth/cloud-platform",
26691	//     "https://www.googleapis.com/auth/dialogflow"
26692	//   ]
26693	// }
26694
26695}
26696
26697// method id "dialogflow.projects.locations.agent.sessions.contexts.list":
26698
26699type ProjectsLocationsAgentSessionsContextsListCall struct {
26700	s            *Service
26701	parent       string
26702	urlParams_   gensupport.URLParams
26703	ifNoneMatch_ string
26704	ctx_         context.Context
26705	header_      http.Header
26706}
26707
26708// List: Returns the list of all contexts in the specified session.
26709func (r *ProjectsLocationsAgentSessionsContextsService) List(parent string) *ProjectsLocationsAgentSessionsContextsListCall {
26710	c := &ProjectsLocationsAgentSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26711	c.parent = parent
26712	return c
26713}
26714
26715// PageSize sets the optional parameter "pageSize": The maximum number
26716// of items to return in a single page. By
26717// default 100 and at most 1000.
26718func (c *ProjectsLocationsAgentSessionsContextsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentSessionsContextsListCall {
26719	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26720	return c
26721}
26722
26723// PageToken sets the optional parameter "pageToken": The
26724// next_page_token value returned from a previous list request.
26725func (c *ProjectsLocationsAgentSessionsContextsListCall) PageToken(pageToken string) *ProjectsLocationsAgentSessionsContextsListCall {
26726	c.urlParams_.Set("pageToken", pageToken)
26727	return c
26728}
26729
26730// Fields allows partial responses to be retrieved. See
26731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26732// for more information.
26733func (c *ProjectsLocationsAgentSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsListCall {
26734	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26735	return c
26736}
26737
26738// IfNoneMatch sets the optional parameter which makes the operation
26739// fail if the object's ETag matches the given value. This is useful for
26740// getting updates only after the object has changed since the last
26741// request. Use googleapi.IsNotModified to check whether the response
26742// error from Do is the result of In-None-Match.
26743func (c *ProjectsLocationsAgentSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsContextsListCall {
26744	c.ifNoneMatch_ = entityTag
26745	return c
26746}
26747
26748// Context sets the context to be used in this call's Do method. Any
26749// pending HTTP request will be aborted if the provided context is
26750// canceled.
26751func (c *ProjectsLocationsAgentSessionsContextsListCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsListCall {
26752	c.ctx_ = ctx
26753	return c
26754}
26755
26756// Header returns an http.Header that can be modified by the caller to
26757// add HTTP headers to the request.
26758func (c *ProjectsLocationsAgentSessionsContextsListCall) Header() http.Header {
26759	if c.header_ == nil {
26760		c.header_ = make(http.Header)
26761	}
26762	return c.header_
26763}
26764
26765func (c *ProjectsLocationsAgentSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
26766	reqHeaders := make(http.Header)
26767	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26768	for k, v := range c.header_ {
26769		reqHeaders[k] = v
26770	}
26771	reqHeaders.Set("User-Agent", c.s.userAgent())
26772	if c.ifNoneMatch_ != "" {
26773		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26774	}
26775	var body io.Reader = nil
26776	c.urlParams_.Set("alt", alt)
26777	c.urlParams_.Set("prettyPrint", "false")
26778	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
26779	urls += "?" + c.urlParams_.Encode()
26780	req, err := http.NewRequest("GET", urls, body)
26781	if err != nil {
26782		return nil, err
26783	}
26784	req.Header = reqHeaders
26785	googleapi.Expand(req.URL, map[string]string{
26786		"parent": c.parent,
26787	})
26788	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26789}
26790
26791// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.list" call.
26792// Exactly one of *GoogleCloudDialogflowV2beta1ListContextsResponse or
26793// error will be non-nil. Any non-2xx status code is an error. Response
26794// headers are in either
26795// *GoogleCloudDialogflowV2beta1ListContextsResponse.ServerResponse.Heade
26796// r or (if a response was returned at all) in
26797// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26798// whether the returned error was because http.StatusNotModified was
26799// returned.
26800func (c *ProjectsLocationsAgentSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListContextsResponse, error) {
26801	gensupport.SetOptions(c.urlParams_, opts...)
26802	res, err := c.doRequest("json")
26803	if res != nil && res.StatusCode == http.StatusNotModified {
26804		if res.Body != nil {
26805			res.Body.Close()
26806		}
26807		return nil, &googleapi.Error{
26808			Code:   res.StatusCode,
26809			Header: res.Header,
26810		}
26811	}
26812	if err != nil {
26813		return nil, err
26814	}
26815	defer googleapi.CloseBody(res)
26816	if err := googleapi.CheckResponse(res); err != nil {
26817		return nil, err
26818	}
26819	ret := &GoogleCloudDialogflowV2beta1ListContextsResponse{
26820		ServerResponse: googleapi.ServerResponse{
26821			Header:         res.Header,
26822			HTTPStatusCode: res.StatusCode,
26823		},
26824	}
26825	target := &ret
26826	if err := gensupport.DecodeResponse(target, res); err != nil {
26827		return nil, err
26828	}
26829	return ret, nil
26830	// {
26831	//   "description": "Returns the list of all contexts in the specified session.",
26832	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts",
26833	//   "httpMethod": "GET",
26834	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.list",
26835	//   "parameterOrder": [
26836	//     "parent"
26837	//   ],
26838	//   "parameters": {
26839	//     "pageSize": {
26840	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
26841	//       "format": "int32",
26842	//       "location": "query",
26843	//       "type": "integer"
26844	//     },
26845	//     "pageToken": {
26846	//       "description": "Optional. The next_page_token value returned from a previous list request.",
26847	//       "location": "query",
26848	//       "type": "string"
26849	//     },
26850	//     "parent": {
26851	//       "description": "Required. The session to list all contexts from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
26852	//       "location": "path",
26853	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
26854	//       "required": true,
26855	//       "type": "string"
26856	//     }
26857	//   },
26858	//   "path": "v2beta1/{+parent}/contexts",
26859	//   "response": {
26860	//     "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse"
26861	//   },
26862	//   "scopes": [
26863	//     "https://www.googleapis.com/auth/cloud-platform",
26864	//     "https://www.googleapis.com/auth/dialogflow"
26865	//   ]
26866	// }
26867
26868}
26869
26870// Pages invokes f for each page of results.
26871// A non-nil error returned from f will halt the iteration.
26872// The provided context supersedes any context provided to the Context method.
26873func (c *ProjectsLocationsAgentSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListContextsResponse) error) error {
26874	c.ctx_ = ctx
26875	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26876	for {
26877		x, err := c.Do()
26878		if err != nil {
26879			return err
26880		}
26881		if err := f(x); err != nil {
26882			return err
26883		}
26884		if x.NextPageToken == "" {
26885			return nil
26886		}
26887		c.PageToken(x.NextPageToken)
26888	}
26889}
26890
26891// method id "dialogflow.projects.locations.agent.sessions.contexts.patch":
26892
26893type ProjectsLocationsAgentSessionsContextsPatchCall struct {
26894	s                                   *Service
26895	nameid                              string
26896	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
26897	urlParams_                          gensupport.URLParams
26898	ctx_                                context.Context
26899	header_                             http.Header
26900}
26901
26902// Patch: Updates the specified context.
26903func (r *ProjectsLocationsAgentSessionsContextsService) Patch(nameid string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsLocationsAgentSessionsContextsPatchCall {
26904	c := &ProjectsLocationsAgentSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26905	c.nameid = nameid
26906	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
26907	return c
26908}
26909
26910// UpdateMask sets the optional parameter "updateMask": The mask to
26911// control which fields get updated.
26912func (c *ProjectsLocationsAgentSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentSessionsContextsPatchCall {
26913	c.urlParams_.Set("updateMask", updateMask)
26914	return c
26915}
26916
26917// Fields allows partial responses to be retrieved. See
26918// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26919// for more information.
26920func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsPatchCall {
26921	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26922	return c
26923}
26924
26925// Context sets the context to be used in this call's Do method. Any
26926// pending HTTP request will be aborted if the provided context is
26927// canceled.
26928func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsPatchCall {
26929	c.ctx_ = ctx
26930	return c
26931}
26932
26933// Header returns an http.Header that can be modified by the caller to
26934// add HTTP headers to the request.
26935func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Header() http.Header {
26936	if c.header_ == nil {
26937		c.header_ = make(http.Header)
26938	}
26939	return c.header_
26940}
26941
26942func (c *ProjectsLocationsAgentSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
26943	reqHeaders := make(http.Header)
26944	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26945	for k, v := range c.header_ {
26946		reqHeaders[k] = v
26947	}
26948	reqHeaders.Set("User-Agent", c.s.userAgent())
26949	var body io.Reader = nil
26950	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
26951	if err != nil {
26952		return nil, err
26953	}
26954	reqHeaders.Set("Content-Type", "application/json")
26955	c.urlParams_.Set("alt", alt)
26956	c.urlParams_.Set("prettyPrint", "false")
26957	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
26958	urls += "?" + c.urlParams_.Encode()
26959	req, err := http.NewRequest("PATCH", urls, body)
26960	if err != nil {
26961		return nil, err
26962	}
26963	req.Header = reqHeaders
26964	googleapi.Expand(req.URL, map[string]string{
26965		"name": c.nameid,
26966	})
26967	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26968}
26969
26970// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.patch" call.
26971// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
26972// non-nil. Any non-2xx status code is an error. Response headers are in
26973// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
26974// (if a response was returned at all) in
26975// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26976// whether the returned error was because http.StatusNotModified was
26977// returned.
26978func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
26979	gensupport.SetOptions(c.urlParams_, opts...)
26980	res, err := c.doRequest("json")
26981	if res != nil && res.StatusCode == http.StatusNotModified {
26982		if res.Body != nil {
26983			res.Body.Close()
26984		}
26985		return nil, &googleapi.Error{
26986			Code:   res.StatusCode,
26987			Header: res.Header,
26988		}
26989	}
26990	if err != nil {
26991		return nil, err
26992	}
26993	defer googleapi.CloseBody(res)
26994	if err := googleapi.CheckResponse(res); err != nil {
26995		return nil, err
26996	}
26997	ret := &GoogleCloudDialogflowV2beta1Context{
26998		ServerResponse: googleapi.ServerResponse{
26999			Header:         res.Header,
27000			HTTPStatusCode: res.StatusCode,
27001		},
27002	}
27003	target := &ret
27004	if err := gensupport.DecodeResponse(target, res); err != nil {
27005		return nil, err
27006	}
27007	return ret, nil
27008	// {
27009	//   "description": "Updates the specified context.",
27010	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
27011	//   "httpMethod": "PATCH",
27012	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.patch",
27013	//   "parameterOrder": [
27014	//     "name"
27015	//   ],
27016	//   "parameters": {
27017	//     "name": {
27018	//       "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`,\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\n\nThe `Context ID` is always converted to lowercase, may only contain\ncharacters in a-zA-Z0-9_-% and may be at most 250 bytes long.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
27019	//       "location": "path",
27020	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
27021	//       "required": true,
27022	//       "type": "string"
27023	//     },
27024	//     "updateMask": {
27025	//       "description": "Optional. The mask to control which fields get updated.",
27026	//       "format": "google-fieldmask",
27027	//       "location": "query",
27028	//       "type": "string"
27029	//     }
27030	//   },
27031	//   "path": "v2beta1/{+name}",
27032	//   "request": {
27033	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
27034	//   },
27035	//   "response": {
27036	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
27037	//   },
27038	//   "scopes": [
27039	//     "https://www.googleapis.com/auth/cloud-platform",
27040	//     "https://www.googleapis.com/auth/dialogflow"
27041	//   ]
27042	// }
27043
27044}
27045
27046// method id "dialogflow.projects.locations.agent.sessions.entityTypes.create":
27047
27048type ProjectsLocationsAgentSessionsEntityTypesCreateCall struct {
27049	s                                             *Service
27050	parent                                        string
27051	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
27052	urlParams_                                    gensupport.URLParams
27053	ctx_                                          context.Context
27054	header_                                       http.Header
27055}
27056
27057// Create: Creates a session entity type.
27058//
27059// If the specified session entity type already exists, overrides
27060// the
27061// session entity type.
27062//
27063// This method doesn't work with Google Assistant integration.
27064// Contact Dialogflow support if you need to use session entities
27065// with Google Assistant integration.
27066func (r *ProjectsLocationsAgentSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsLocationsAgentSessionsEntityTypesCreateCall {
27067	c := &ProjectsLocationsAgentSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27068	c.parent = parent
27069	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
27070	return c
27071}
27072
27073// Fields allows partial responses to be retrieved. See
27074// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27075// for more information.
27076func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesCreateCall {
27077	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27078	return c
27079}
27080
27081// Context sets the context to be used in this call's Do method. Any
27082// pending HTTP request will be aborted if the provided context is
27083// canceled.
27084func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesCreateCall {
27085	c.ctx_ = ctx
27086	return c
27087}
27088
27089// Header returns an http.Header that can be modified by the caller to
27090// add HTTP headers to the request.
27091func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Header() http.Header {
27092	if c.header_ == nil {
27093		c.header_ = make(http.Header)
27094	}
27095	return c.header_
27096}
27097
27098func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
27099	reqHeaders := make(http.Header)
27100	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27101	for k, v := range c.header_ {
27102		reqHeaders[k] = v
27103	}
27104	reqHeaders.Set("User-Agent", c.s.userAgent())
27105	var body io.Reader = nil
27106	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
27107	if err != nil {
27108		return nil, err
27109	}
27110	reqHeaders.Set("Content-Type", "application/json")
27111	c.urlParams_.Set("alt", alt)
27112	c.urlParams_.Set("prettyPrint", "false")
27113	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
27114	urls += "?" + c.urlParams_.Encode()
27115	req, err := http.NewRequest("POST", urls, body)
27116	if err != nil {
27117		return nil, err
27118	}
27119	req.Header = reqHeaders
27120	googleapi.Expand(req.URL, map[string]string{
27121		"parent": c.parent,
27122	})
27123	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27124}
27125
27126// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.create" call.
27127// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
27128// error will be non-nil. Any non-2xx status code is an error. Response
27129// headers are in either
27130// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
27131// or (if a response was returned at all) in
27132// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27133// whether the returned error was because http.StatusNotModified was
27134// returned.
27135func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
27136	gensupport.SetOptions(c.urlParams_, opts...)
27137	res, err := c.doRequest("json")
27138	if res != nil && res.StatusCode == http.StatusNotModified {
27139		if res.Body != nil {
27140			res.Body.Close()
27141		}
27142		return nil, &googleapi.Error{
27143			Code:   res.StatusCode,
27144			Header: res.Header,
27145		}
27146	}
27147	if err != nil {
27148		return nil, err
27149	}
27150	defer googleapi.CloseBody(res)
27151	if err := googleapi.CheckResponse(res); err != nil {
27152		return nil, err
27153	}
27154	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
27155		ServerResponse: googleapi.ServerResponse{
27156			Header:         res.Header,
27157			HTTPStatusCode: res.StatusCode,
27158		},
27159	}
27160	target := &ret
27161	if err := gensupport.DecodeResponse(target, res); err != nil {
27162		return nil, err
27163	}
27164	return ret, nil
27165	// {
27166	//   "description": "Creates a session entity type.\n\nIf the specified session entity type already exists, overrides the\nsession entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
27167	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes",
27168	//   "httpMethod": "POST",
27169	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.create",
27170	//   "parameterOrder": [
27171	//     "parent"
27172	//   ],
27173	//   "parameters": {
27174	//     "parent": {
27175	//       "description": "Required. The session to create a session entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`. If `Environment ID` is not specified, we assume\ndefault 'draft' environment. If `User ID` is not specified, we assume\ndefault '-' user.",
27176	//       "location": "path",
27177	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
27178	//       "required": true,
27179	//       "type": "string"
27180	//     }
27181	//   },
27182	//   "path": "v2beta1/{+parent}/entityTypes",
27183	//   "request": {
27184	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
27185	//   },
27186	//   "response": {
27187	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
27188	//   },
27189	//   "scopes": [
27190	//     "https://www.googleapis.com/auth/cloud-platform",
27191	//     "https://www.googleapis.com/auth/dialogflow"
27192	//   ]
27193	// }
27194
27195}
27196
27197// method id "dialogflow.projects.locations.agent.sessions.entityTypes.delete":
27198
27199type ProjectsLocationsAgentSessionsEntityTypesDeleteCall struct {
27200	s          *Service
27201	name       string
27202	urlParams_ gensupport.URLParams
27203	ctx_       context.Context
27204	header_    http.Header
27205}
27206
27207// Delete: Deletes the specified session entity type.
27208//
27209// This method doesn't work with Google Assistant integration.
27210// Contact Dialogflow support if you need to use session entities
27211// with Google Assistant integration.
27212func (r *ProjectsLocationsAgentSessionsEntityTypesService) Delete(name string) *ProjectsLocationsAgentSessionsEntityTypesDeleteCall {
27213	c := &ProjectsLocationsAgentSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27214	c.name = name
27215	return c
27216}
27217
27218// Fields allows partial responses to be retrieved. See
27219// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27220// for more information.
27221func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesDeleteCall {
27222	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27223	return c
27224}
27225
27226// Context sets the context to be used in this call's Do method. Any
27227// pending HTTP request will be aborted if the provided context is
27228// canceled.
27229func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesDeleteCall {
27230	c.ctx_ = ctx
27231	return c
27232}
27233
27234// Header returns an http.Header that can be modified by the caller to
27235// add HTTP headers to the request.
27236func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Header() http.Header {
27237	if c.header_ == nil {
27238		c.header_ = make(http.Header)
27239	}
27240	return c.header_
27241}
27242
27243func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
27244	reqHeaders := make(http.Header)
27245	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27246	for k, v := range c.header_ {
27247		reqHeaders[k] = v
27248	}
27249	reqHeaders.Set("User-Agent", c.s.userAgent())
27250	var body io.Reader = nil
27251	c.urlParams_.Set("alt", alt)
27252	c.urlParams_.Set("prettyPrint", "false")
27253	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
27254	urls += "?" + c.urlParams_.Encode()
27255	req, err := http.NewRequest("DELETE", urls, body)
27256	if err != nil {
27257		return nil, err
27258	}
27259	req.Header = reqHeaders
27260	googleapi.Expand(req.URL, map[string]string{
27261		"name": c.name,
27262	})
27263	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27264}
27265
27266// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.delete" call.
27267// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
27268// non-2xx status code is an error. Response headers are in either
27269// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
27270// returned at all) in error.(*googleapi.Error).Header. Use
27271// googleapi.IsNotModified to check whether the returned error was
27272// because http.StatusNotModified was returned.
27273func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
27274	gensupport.SetOptions(c.urlParams_, opts...)
27275	res, err := c.doRequest("json")
27276	if res != nil && res.StatusCode == http.StatusNotModified {
27277		if res.Body != nil {
27278			res.Body.Close()
27279		}
27280		return nil, &googleapi.Error{
27281			Code:   res.StatusCode,
27282			Header: res.Header,
27283		}
27284	}
27285	if err != nil {
27286		return nil, err
27287	}
27288	defer googleapi.CloseBody(res)
27289	if err := googleapi.CheckResponse(res); err != nil {
27290		return nil, err
27291	}
27292	ret := &GoogleProtobufEmpty{
27293		ServerResponse: googleapi.ServerResponse{
27294			Header:         res.Header,
27295			HTTPStatusCode: res.StatusCode,
27296		},
27297	}
27298	target := &ret
27299	if err := gensupport.DecodeResponse(target, res); err != nil {
27300		return nil, err
27301	}
27302	return ret, nil
27303	// {
27304	//   "description": "Deletes the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
27305	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
27306	//   "httpMethod": "DELETE",
27307	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.delete",
27308	//   "parameterOrder": [
27309	//     "name"
27310	//   ],
27311	//   "parameters": {
27312	//     "name": {
27313	//       "description": "Required. The name of the entity type to delete. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`. If `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
27314	//       "location": "path",
27315	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
27316	//       "required": true,
27317	//       "type": "string"
27318	//     }
27319	//   },
27320	//   "path": "v2beta1/{+name}",
27321	//   "response": {
27322	//     "$ref": "GoogleProtobufEmpty"
27323	//   },
27324	//   "scopes": [
27325	//     "https://www.googleapis.com/auth/cloud-platform",
27326	//     "https://www.googleapis.com/auth/dialogflow"
27327	//   ]
27328	// }
27329
27330}
27331
27332// method id "dialogflow.projects.locations.agent.sessions.entityTypes.get":
27333
27334type ProjectsLocationsAgentSessionsEntityTypesGetCall struct {
27335	s            *Service
27336	name         string
27337	urlParams_   gensupport.URLParams
27338	ifNoneMatch_ string
27339	ctx_         context.Context
27340	header_      http.Header
27341}
27342
27343// Get: Retrieves the specified session entity type.
27344//
27345// This method doesn't work with Google Assistant integration.
27346// Contact Dialogflow support if you need to use session entities
27347// with Google Assistant integration.
27348func (r *ProjectsLocationsAgentSessionsEntityTypesService) Get(name string) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
27349	c := &ProjectsLocationsAgentSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27350	c.name = name
27351	return c
27352}
27353
27354// Fields allows partial responses to be retrieved. See
27355// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27356// for more information.
27357func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
27358	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27359	return c
27360}
27361
27362// IfNoneMatch sets the optional parameter which makes the operation
27363// fail if the object's ETag matches the given value. This is useful for
27364// getting updates only after the object has changed since the last
27365// request. Use googleapi.IsNotModified to check whether the response
27366// error from Do is the result of In-None-Match.
27367func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
27368	c.ifNoneMatch_ = entityTag
27369	return c
27370}
27371
27372// Context sets the context to be used in this call's Do method. Any
27373// pending HTTP request will be aborted if the provided context is
27374// canceled.
27375func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
27376	c.ctx_ = ctx
27377	return c
27378}
27379
27380// Header returns an http.Header that can be modified by the caller to
27381// add HTTP headers to the request.
27382func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Header() http.Header {
27383	if c.header_ == nil {
27384		c.header_ = make(http.Header)
27385	}
27386	return c.header_
27387}
27388
27389func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
27390	reqHeaders := make(http.Header)
27391	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27392	for k, v := range c.header_ {
27393		reqHeaders[k] = v
27394	}
27395	reqHeaders.Set("User-Agent", c.s.userAgent())
27396	if c.ifNoneMatch_ != "" {
27397		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27398	}
27399	var body io.Reader = nil
27400	c.urlParams_.Set("alt", alt)
27401	c.urlParams_.Set("prettyPrint", "false")
27402	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
27403	urls += "?" + c.urlParams_.Encode()
27404	req, err := http.NewRequest("GET", urls, body)
27405	if err != nil {
27406		return nil, err
27407	}
27408	req.Header = reqHeaders
27409	googleapi.Expand(req.URL, map[string]string{
27410		"name": c.name,
27411	})
27412	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27413}
27414
27415// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.get" call.
27416// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
27417// error will be non-nil. Any non-2xx status code is an error. Response
27418// headers are in either
27419// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
27420// or (if a response was returned at all) in
27421// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27422// whether the returned error was because http.StatusNotModified was
27423// returned.
27424func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
27425	gensupport.SetOptions(c.urlParams_, opts...)
27426	res, err := c.doRequest("json")
27427	if res != nil && res.StatusCode == http.StatusNotModified {
27428		if res.Body != nil {
27429			res.Body.Close()
27430		}
27431		return nil, &googleapi.Error{
27432			Code:   res.StatusCode,
27433			Header: res.Header,
27434		}
27435	}
27436	if err != nil {
27437		return nil, err
27438	}
27439	defer googleapi.CloseBody(res)
27440	if err := googleapi.CheckResponse(res); err != nil {
27441		return nil, err
27442	}
27443	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
27444		ServerResponse: googleapi.ServerResponse{
27445			Header:         res.Header,
27446			HTTPStatusCode: res.StatusCode,
27447		},
27448	}
27449	target := &ret
27450	if err := gensupport.DecodeResponse(target, res); err != nil {
27451		return nil, err
27452	}
27453	return ret, nil
27454	// {
27455	//   "description": "Retrieves the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
27456	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
27457	//   "httpMethod": "GET",
27458	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.get",
27459	//   "parameterOrder": [
27460	//     "name"
27461	//   ],
27462	//   "parameters": {
27463	//     "name": {
27464	//       "description": "Required. The name of the session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e` or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`. If `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
27465	//       "location": "path",
27466	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
27467	//       "required": true,
27468	//       "type": "string"
27469	//     }
27470	//   },
27471	//   "path": "v2beta1/{+name}",
27472	//   "response": {
27473	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
27474	//   },
27475	//   "scopes": [
27476	//     "https://www.googleapis.com/auth/cloud-platform",
27477	//     "https://www.googleapis.com/auth/dialogflow"
27478	//   ]
27479	// }
27480
27481}
27482
27483// method id "dialogflow.projects.locations.agent.sessions.entityTypes.list":
27484
27485type ProjectsLocationsAgentSessionsEntityTypesListCall struct {
27486	s            *Service
27487	parent       string
27488	urlParams_   gensupport.URLParams
27489	ifNoneMatch_ string
27490	ctx_         context.Context
27491	header_      http.Header
27492}
27493
27494// List: Returns the list of all session entity types in the specified
27495// session.
27496//
27497// This method doesn't work with Google Assistant integration.
27498// Contact Dialogflow support if you need to use session entities
27499// with Google Assistant integration.
27500func (r *ProjectsLocationsAgentSessionsEntityTypesService) List(parent string) *ProjectsLocationsAgentSessionsEntityTypesListCall {
27501	c := &ProjectsLocationsAgentSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27502	c.parent = parent
27503	return c
27504}
27505
27506// PageSize sets the optional parameter "pageSize": The maximum number
27507// of items to return in a single page. By
27508// default 100 and at most 1000.
27509func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentSessionsEntityTypesListCall {
27510	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27511	return c
27512}
27513
27514// PageToken sets the optional parameter "pageToken": The
27515// next_page_token value returned from a previous list request.
27516func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentSessionsEntityTypesListCall {
27517	c.urlParams_.Set("pageToken", pageToken)
27518	return c
27519}
27520
27521// Fields allows partial responses to be retrieved. See
27522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27523// for more information.
27524func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesListCall {
27525	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27526	return c
27527}
27528
27529// IfNoneMatch sets the optional parameter which makes the operation
27530// fail if the object's ETag matches the given value. This is useful for
27531// getting updates only after the object has changed since the last
27532// request. Use googleapi.IsNotModified to check whether the response
27533// error from Do is the result of In-None-Match.
27534func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsEntityTypesListCall {
27535	c.ifNoneMatch_ = entityTag
27536	return c
27537}
27538
27539// Context sets the context to be used in this call's Do method. Any
27540// pending HTTP request will be aborted if the provided context is
27541// canceled.
27542func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesListCall {
27543	c.ctx_ = ctx
27544	return c
27545}
27546
27547// Header returns an http.Header that can be modified by the caller to
27548// add HTTP headers to the request.
27549func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Header() http.Header {
27550	if c.header_ == nil {
27551		c.header_ = make(http.Header)
27552	}
27553	return c.header_
27554}
27555
27556func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
27557	reqHeaders := make(http.Header)
27558	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27559	for k, v := range c.header_ {
27560		reqHeaders[k] = v
27561	}
27562	reqHeaders.Set("User-Agent", c.s.userAgent())
27563	if c.ifNoneMatch_ != "" {
27564		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27565	}
27566	var body io.Reader = nil
27567	c.urlParams_.Set("alt", alt)
27568	c.urlParams_.Set("prettyPrint", "false")
27569	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
27570	urls += "?" + c.urlParams_.Encode()
27571	req, err := http.NewRequest("GET", urls, body)
27572	if err != nil {
27573		return nil, err
27574	}
27575	req.Header = reqHeaders
27576	googleapi.Expand(req.URL, map[string]string{
27577		"parent": c.parent,
27578	})
27579	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27580}
27581
27582// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.list" call.
27583// Exactly one of
27584// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse or error
27585// will be non-nil. Any non-2xx status code is an error. Response
27586// headers are in either
27587// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse.ServerResp
27588// onse.Header or (if a response was returned at all) in
27589// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27590// whether the returned error was because http.StatusNotModified was
27591// returned.
27592func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse, error) {
27593	gensupport.SetOptions(c.urlParams_, opts...)
27594	res, err := c.doRequest("json")
27595	if res != nil && res.StatusCode == http.StatusNotModified {
27596		if res.Body != nil {
27597			res.Body.Close()
27598		}
27599		return nil, &googleapi.Error{
27600			Code:   res.StatusCode,
27601			Header: res.Header,
27602		}
27603	}
27604	if err != nil {
27605		return nil, err
27606	}
27607	defer googleapi.CloseBody(res)
27608	if err := googleapi.CheckResponse(res); err != nil {
27609		return nil, err
27610	}
27611	ret := &GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse{
27612		ServerResponse: googleapi.ServerResponse{
27613			Header:         res.Header,
27614			HTTPStatusCode: res.StatusCode,
27615		},
27616	}
27617	target := &ret
27618	if err := gensupport.DecodeResponse(target, res); err != nil {
27619		return nil, err
27620	}
27621	return ret, nil
27622	// {
27623	//   "description": "Returns the list of all session entity types in the specified session.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
27624	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes",
27625	//   "httpMethod": "GET",
27626	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.list",
27627	//   "parameterOrder": [
27628	//     "parent"
27629	//   ],
27630	//   "parameters": {
27631	//     "pageSize": {
27632	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
27633	//       "format": "int32",
27634	//       "location": "query",
27635	//       "type": "integer"
27636	//     },
27637	//     "pageToken": {
27638	//       "description": "Optional. The next_page_token value returned from a previous list request.",
27639	//       "location": "query",
27640	//       "type": "string"
27641	//     },
27642	//     "parent": {
27643	//       "description": "Required. The session to list all session entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e` or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser ID\u003e/\nsessions/\u003cSession ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.",
27644	//       "location": "path",
27645	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
27646	//       "required": true,
27647	//       "type": "string"
27648	//     }
27649	//   },
27650	//   "path": "v2beta1/{+parent}/entityTypes",
27651	//   "response": {
27652	//     "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse"
27653	//   },
27654	//   "scopes": [
27655	//     "https://www.googleapis.com/auth/cloud-platform",
27656	//     "https://www.googleapis.com/auth/dialogflow"
27657	//   ]
27658	// }
27659
27660}
27661
27662// Pages invokes f for each page of results.
27663// A non-nil error returned from f will halt the iteration.
27664// The provided context supersedes any context provided to the Context method.
27665func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) error) error {
27666	c.ctx_ = ctx
27667	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27668	for {
27669		x, err := c.Do()
27670		if err != nil {
27671			return err
27672		}
27673		if err := f(x); err != nil {
27674			return err
27675		}
27676		if x.NextPageToken == "" {
27677			return nil
27678		}
27679		c.PageToken(x.NextPageToken)
27680	}
27681}
27682
27683// method id "dialogflow.projects.locations.agent.sessions.entityTypes.patch":
27684
27685type ProjectsLocationsAgentSessionsEntityTypesPatchCall struct {
27686	s                                             *Service
27687	nameid                                        string
27688	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
27689	urlParams_                                    gensupport.URLParams
27690	ctx_                                          context.Context
27691	header_                                       http.Header
27692}
27693
27694// Patch: Updates the specified session entity type.
27695//
27696// This method doesn't work with Google Assistant integration.
27697// Contact Dialogflow support if you need to use session entities
27698// with Google Assistant integration.
27699func (r *ProjectsLocationsAgentSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
27700	c := &ProjectsLocationsAgentSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27701	c.nameid = nameid
27702	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
27703	return c
27704}
27705
27706// UpdateMask sets the optional parameter "updateMask": The mask to
27707// control which fields get updated.
27708func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
27709	c.urlParams_.Set("updateMask", updateMask)
27710	return c
27711}
27712
27713// Fields allows partial responses to be retrieved. See
27714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27715// for more information.
27716func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
27717	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27718	return c
27719}
27720
27721// Context sets the context to be used in this call's Do method. Any
27722// pending HTTP request will be aborted if the provided context is
27723// canceled.
27724func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
27725	c.ctx_ = ctx
27726	return c
27727}
27728
27729// Header returns an http.Header that can be modified by the caller to
27730// add HTTP headers to the request.
27731func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Header() http.Header {
27732	if c.header_ == nil {
27733		c.header_ = make(http.Header)
27734	}
27735	return c.header_
27736}
27737
27738func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
27739	reqHeaders := make(http.Header)
27740	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27741	for k, v := range c.header_ {
27742		reqHeaders[k] = v
27743	}
27744	reqHeaders.Set("User-Agent", c.s.userAgent())
27745	var body io.Reader = nil
27746	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
27747	if err != nil {
27748		return nil, err
27749	}
27750	reqHeaders.Set("Content-Type", "application/json")
27751	c.urlParams_.Set("alt", alt)
27752	c.urlParams_.Set("prettyPrint", "false")
27753	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
27754	urls += "?" + c.urlParams_.Encode()
27755	req, err := http.NewRequest("PATCH", urls, body)
27756	if err != nil {
27757		return nil, err
27758	}
27759	req.Header = reqHeaders
27760	googleapi.Expand(req.URL, map[string]string{
27761		"name": c.nameid,
27762	})
27763	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27764}
27765
27766// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.patch" call.
27767// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
27768// error will be non-nil. Any non-2xx status code is an error. Response
27769// headers are in either
27770// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
27771// or (if a response was returned at all) in
27772// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27773// whether the returned error was because http.StatusNotModified was
27774// returned.
27775func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
27776	gensupport.SetOptions(c.urlParams_, opts...)
27777	res, err := c.doRequest("json")
27778	if res != nil && res.StatusCode == http.StatusNotModified {
27779		if res.Body != nil {
27780			res.Body.Close()
27781		}
27782		return nil, &googleapi.Error{
27783			Code:   res.StatusCode,
27784			Header: res.Header,
27785		}
27786	}
27787	if err != nil {
27788		return nil, err
27789	}
27790	defer googleapi.CloseBody(res)
27791	if err := googleapi.CheckResponse(res); err != nil {
27792		return nil, err
27793	}
27794	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
27795		ServerResponse: googleapi.ServerResponse{
27796			Header:         res.Header,
27797			HTTPStatusCode: res.StatusCode,
27798		},
27799	}
27800	target := &ret
27801	if err := gensupport.DecodeResponse(target, res); err != nil {
27802		return nil, err
27803	}
27804	return ret, nil
27805	// {
27806	//   "description": "Updates the specified session entity type.\n\nThis method doesn't work with Google Assistant integration.\nContact Dialogflow support if you need to use session entities\nwith Google Assistant integration.",
27807	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
27808	//   "httpMethod": "PATCH",
27809	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.patch",
27810	//   "parameterOrder": [
27811	//     "name"
27812	//   ],
27813	//   "parameters": {
27814	//     "name": {
27815	//       "description": "Required. The unique identifier of this session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e`, or\n`projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display Name\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\n`\u003cEntity Type Display Name\u003e` must be the display name of an existing entity\ntype in the same agent that will be overridden or supplemented.",
27816	//       "location": "path",
27817	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
27818	//       "required": true,
27819	//       "type": "string"
27820	//     },
27821	//     "updateMask": {
27822	//       "description": "Optional. The mask to control which fields get updated.",
27823	//       "format": "google-fieldmask",
27824	//       "location": "query",
27825	//       "type": "string"
27826	//     }
27827	//   },
27828	//   "path": "v2beta1/{+name}",
27829	//   "request": {
27830	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
27831	//   },
27832	//   "response": {
27833	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
27834	//   },
27835	//   "scopes": [
27836	//     "https://www.googleapis.com/auth/cloud-platform",
27837	//     "https://www.googleapis.com/auth/dialogflow"
27838	//   ]
27839	// }
27840
27841}
27842
27843// method id "dialogflow.projects.locations.operations.cancel":
27844
27845type ProjectsLocationsOperationsCancelCall struct {
27846	s          *Service
27847	name       string
27848	urlParams_ gensupport.URLParams
27849	ctx_       context.Context
27850	header_    http.Header
27851}
27852
27853// Cancel: Starts asynchronous cancellation on a long-running operation.
27854//  The server
27855// makes a best effort to cancel the operation, but success is
27856// not
27857// guaranteed.  If the server doesn't support this method, it
27858// returns
27859// `google.rpc.Code.UNIMPLEMENTED`.  Clients can
27860// use
27861// Operations.GetOperation or
27862// other methods to check whether the cancellation succeeded or whether
27863// the
27864// operation completed despite cancellation. On successful
27865// cancellation,
27866// the operation is not deleted; instead, it becomes an operation
27867// with
27868// an Operation.error value with a google.rpc.Status.code of
27869// 1,
27870// corresponding to `Code.CANCELLED`.
27871func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall {
27872	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27873	c.name = name
27874	return c
27875}
27876
27877// Fields allows partial responses to be retrieved. See
27878// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27879// for more information.
27880func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
27881	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27882	return c
27883}
27884
27885// Context sets the context to be used in this call's Do method. Any
27886// pending HTTP request will be aborted if the provided context is
27887// canceled.
27888func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
27889	c.ctx_ = ctx
27890	return c
27891}
27892
27893// Header returns an http.Header that can be modified by the caller to
27894// add HTTP headers to the request.
27895func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
27896	if c.header_ == nil {
27897		c.header_ = make(http.Header)
27898	}
27899	return c.header_
27900}
27901
27902func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
27903	reqHeaders := make(http.Header)
27904	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27905	for k, v := range c.header_ {
27906		reqHeaders[k] = v
27907	}
27908	reqHeaders.Set("User-Agent", c.s.userAgent())
27909	var body io.Reader = nil
27910	c.urlParams_.Set("alt", alt)
27911	c.urlParams_.Set("prettyPrint", "false")
27912	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:cancel")
27913	urls += "?" + c.urlParams_.Encode()
27914	req, err := http.NewRequest("POST", urls, body)
27915	if err != nil {
27916		return nil, err
27917	}
27918	req.Header = reqHeaders
27919	googleapi.Expand(req.URL, map[string]string{
27920		"name": c.name,
27921	})
27922	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27923}
27924
27925// Do executes the "dialogflow.projects.locations.operations.cancel" call.
27926// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
27927// non-2xx status code is an error. Response headers are in either
27928// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
27929// returned at all) in error.(*googleapi.Error).Header. Use
27930// googleapi.IsNotModified to check whether the returned error was
27931// because http.StatusNotModified was returned.
27932func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
27933	gensupport.SetOptions(c.urlParams_, opts...)
27934	res, err := c.doRequest("json")
27935	if res != nil && res.StatusCode == http.StatusNotModified {
27936		if res.Body != nil {
27937			res.Body.Close()
27938		}
27939		return nil, &googleapi.Error{
27940			Code:   res.StatusCode,
27941			Header: res.Header,
27942		}
27943	}
27944	if err != nil {
27945		return nil, err
27946	}
27947	defer googleapi.CloseBody(res)
27948	if err := googleapi.CheckResponse(res); err != nil {
27949		return nil, err
27950	}
27951	ret := &GoogleProtobufEmpty{
27952		ServerResponse: googleapi.ServerResponse{
27953			Header:         res.Header,
27954			HTTPStatusCode: res.StatusCode,
27955		},
27956	}
27957	target := &ret
27958	if err := gensupport.DecodeResponse(target, res); err != nil {
27959		return nil, err
27960	}
27961	return ret, nil
27962	// {
27963	//   "description": "Starts asynchronous cancellation on a long-running operation.  The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed.  If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.  Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
27964	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
27965	//   "httpMethod": "POST",
27966	//   "id": "dialogflow.projects.locations.operations.cancel",
27967	//   "parameterOrder": [
27968	//     "name"
27969	//   ],
27970	//   "parameters": {
27971	//     "name": {
27972	//       "description": "The name of the operation resource to be cancelled.",
27973	//       "location": "path",
27974	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
27975	//       "required": true,
27976	//       "type": "string"
27977	//     }
27978	//   },
27979	//   "path": "v2beta1/{+name}:cancel",
27980	//   "response": {
27981	//     "$ref": "GoogleProtobufEmpty"
27982	//   },
27983	//   "scopes": [
27984	//     "https://www.googleapis.com/auth/cloud-platform",
27985	//     "https://www.googleapis.com/auth/dialogflow"
27986	//   ]
27987	// }
27988
27989}
27990
27991// method id "dialogflow.projects.locations.operations.get":
27992
27993type ProjectsLocationsOperationsGetCall struct {
27994	s            *Service
27995	name         string
27996	urlParams_   gensupport.URLParams
27997	ifNoneMatch_ string
27998	ctx_         context.Context
27999	header_      http.Header
28000}
28001
28002// Get: Gets the latest state of a long-running operation.  Clients can
28003// use this
28004// method to poll the operation result at intervals as recommended by
28005// the API
28006// service.
28007func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
28008	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28009	c.name = name
28010	return c
28011}
28012
28013// Fields allows partial responses to be retrieved. See
28014// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28015// for more information.
28016func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
28017	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28018	return c
28019}
28020
28021// IfNoneMatch sets the optional parameter which makes the operation
28022// fail if the object's ETag matches the given value. This is useful for
28023// getting updates only after the object has changed since the last
28024// request. Use googleapi.IsNotModified to check whether the response
28025// error from Do is the result of In-None-Match.
28026func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
28027	c.ifNoneMatch_ = entityTag
28028	return c
28029}
28030
28031// Context sets the context to be used in this call's Do method. Any
28032// pending HTTP request will be aborted if the provided context is
28033// canceled.
28034func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
28035	c.ctx_ = ctx
28036	return c
28037}
28038
28039// Header returns an http.Header that can be modified by the caller to
28040// add HTTP headers to the request.
28041func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
28042	if c.header_ == nil {
28043		c.header_ = make(http.Header)
28044	}
28045	return c.header_
28046}
28047
28048func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
28049	reqHeaders := make(http.Header)
28050	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
28051	for k, v := range c.header_ {
28052		reqHeaders[k] = v
28053	}
28054	reqHeaders.Set("User-Agent", c.s.userAgent())
28055	if c.ifNoneMatch_ != "" {
28056		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28057	}
28058	var body io.Reader = nil
28059	c.urlParams_.Set("alt", alt)
28060	c.urlParams_.Set("prettyPrint", "false")
28061	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
28062	urls += "?" + c.urlParams_.Encode()
28063	req, err := http.NewRequest("GET", urls, body)
28064	if err != nil {
28065		return nil, err
28066	}
28067	req.Header = reqHeaders
28068	googleapi.Expand(req.URL, map[string]string{
28069		"name": c.name,
28070	})
28071	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28072}
28073
28074// Do executes the "dialogflow.projects.locations.operations.get" call.
28075// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
28076// Any non-2xx status code is an error. Response headers are in either
28077// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
28078// was returned at all) in error.(*googleapi.Error).Header. Use
28079// googleapi.IsNotModified to check whether the returned error was
28080// because http.StatusNotModified was returned.
28081func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
28082	gensupport.SetOptions(c.urlParams_, opts...)
28083	res, err := c.doRequest("json")
28084	if res != nil && res.StatusCode == http.StatusNotModified {
28085		if res.Body != nil {
28086			res.Body.Close()
28087		}
28088		return nil, &googleapi.Error{
28089			Code:   res.StatusCode,
28090			Header: res.Header,
28091		}
28092	}
28093	if err != nil {
28094		return nil, err
28095	}
28096	defer googleapi.CloseBody(res)
28097	if err := googleapi.CheckResponse(res); err != nil {
28098		return nil, err
28099	}
28100	ret := &GoogleLongrunningOperation{
28101		ServerResponse: googleapi.ServerResponse{
28102			Header:         res.Header,
28103			HTTPStatusCode: res.StatusCode,
28104		},
28105	}
28106	target := &ret
28107	if err := gensupport.DecodeResponse(target, res); err != nil {
28108		return nil, err
28109	}
28110	return ret, nil
28111	// {
28112	//   "description": "Gets the latest state of a long-running operation.  Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
28113	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
28114	//   "httpMethod": "GET",
28115	//   "id": "dialogflow.projects.locations.operations.get",
28116	//   "parameterOrder": [
28117	//     "name"
28118	//   ],
28119	//   "parameters": {
28120	//     "name": {
28121	//       "description": "The name of the operation resource.",
28122	//       "location": "path",
28123	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
28124	//       "required": true,
28125	//       "type": "string"
28126	//     }
28127	//   },
28128	//   "path": "v2beta1/{+name}",
28129	//   "response": {
28130	//     "$ref": "GoogleLongrunningOperation"
28131	//   },
28132	//   "scopes": [
28133	//     "https://www.googleapis.com/auth/cloud-platform",
28134	//     "https://www.googleapis.com/auth/dialogflow"
28135	//   ]
28136	// }
28137
28138}
28139
28140// method id "dialogflow.projects.locations.operations.list":
28141
28142type ProjectsLocationsOperationsListCall struct {
28143	s            *Service
28144	name         string
28145	urlParams_   gensupport.URLParams
28146	ifNoneMatch_ string
28147	ctx_         context.Context
28148	header_      http.Header
28149}
28150
28151// List: Lists operations that match the specified filter in the
28152// request. If the
28153// server doesn't support this method, it returns
28154// `UNIMPLEMENTED`.
28155//
28156// NOTE: the `name` binding allows API services to override the
28157// binding
28158// to use different resource name schemes, such as `users/*/operations`.
28159// To
28160// override the binding, API services can add a binding such
28161// as
28162// "/v1/{name=users/*}/operations" to their service configuration.
28163// For backwards compatibility, the default name includes the
28164// operations
28165// collection id, however overriding users must ensure the name
28166// binding
28167// is the parent resource, without the operations collection id.
28168func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
28169	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28170	c.name = name
28171	return c
28172}
28173
28174// Filter sets the optional parameter "filter": The standard list
28175// filter.
28176func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
28177	c.urlParams_.Set("filter", filter)
28178	return c
28179}
28180
28181// PageSize sets the optional parameter "pageSize": The standard list
28182// page size.
28183func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
28184	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28185	return c
28186}
28187
28188// PageToken sets the optional parameter "pageToken": The standard list
28189// page token.
28190func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
28191	c.urlParams_.Set("pageToken", pageToken)
28192	return c
28193}
28194
28195// Fields allows partial responses to be retrieved. See
28196// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28197// for more information.
28198func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
28199	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28200	return c
28201}
28202
28203// IfNoneMatch sets the optional parameter which makes the operation
28204// fail if the object's ETag matches the given value. This is useful for
28205// getting updates only after the object has changed since the last
28206// request. Use googleapi.IsNotModified to check whether the response
28207// error from Do is the result of In-None-Match.
28208func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
28209	c.ifNoneMatch_ = entityTag
28210	return c
28211}
28212
28213// Context sets the context to be used in this call's Do method. Any
28214// pending HTTP request will be aborted if the provided context is
28215// canceled.
28216func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
28217	c.ctx_ = ctx
28218	return c
28219}
28220
28221// Header returns an http.Header that can be modified by the caller to
28222// add HTTP headers to the request.
28223func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
28224	if c.header_ == nil {
28225		c.header_ = make(http.Header)
28226	}
28227	return c.header_
28228}
28229
28230func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
28231	reqHeaders := make(http.Header)
28232	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
28233	for k, v := range c.header_ {
28234		reqHeaders[k] = v
28235	}
28236	reqHeaders.Set("User-Agent", c.s.userAgent())
28237	if c.ifNoneMatch_ != "" {
28238		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28239	}
28240	var body io.Reader = nil
28241	c.urlParams_.Set("alt", alt)
28242	c.urlParams_.Set("prettyPrint", "false")
28243	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}/operations")
28244	urls += "?" + c.urlParams_.Encode()
28245	req, err := http.NewRequest("GET", urls, body)
28246	if err != nil {
28247		return nil, err
28248	}
28249	req.Header = reqHeaders
28250	googleapi.Expand(req.URL, map[string]string{
28251		"name": c.name,
28252	})
28253	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28254}
28255
28256// Do executes the "dialogflow.projects.locations.operations.list" call.
28257// Exactly one of *GoogleLongrunningListOperationsResponse or error will
28258// be non-nil. Any non-2xx status code is an error. Response headers are
28259// in either
28260// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
28261// a response was returned at all) in error.(*googleapi.Error).Header.
28262// Use googleapi.IsNotModified to check whether the returned error was
28263// because http.StatusNotModified was returned.
28264func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
28265	gensupport.SetOptions(c.urlParams_, opts...)
28266	res, err := c.doRequest("json")
28267	if res != nil && res.StatusCode == http.StatusNotModified {
28268		if res.Body != nil {
28269			res.Body.Close()
28270		}
28271		return nil, &googleapi.Error{
28272			Code:   res.StatusCode,
28273			Header: res.Header,
28274		}
28275	}
28276	if err != nil {
28277		return nil, err
28278	}
28279	defer googleapi.CloseBody(res)
28280	if err := googleapi.CheckResponse(res); err != nil {
28281		return nil, err
28282	}
28283	ret := &GoogleLongrunningListOperationsResponse{
28284		ServerResponse: googleapi.ServerResponse{
28285			Header:         res.Header,
28286			HTTPStatusCode: res.StatusCode,
28287		},
28288	}
28289	target := &ret
28290	if err := gensupport.DecodeResponse(target, res); err != nil {
28291		return nil, err
28292	}
28293	return ret, nil
28294	// {
28295	//   "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
28296	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/operations",
28297	//   "httpMethod": "GET",
28298	//   "id": "dialogflow.projects.locations.operations.list",
28299	//   "parameterOrder": [
28300	//     "name"
28301	//   ],
28302	//   "parameters": {
28303	//     "filter": {
28304	//       "description": "The standard list filter.",
28305	//       "location": "query",
28306	//       "type": "string"
28307	//     },
28308	//     "name": {
28309	//       "description": "The name of the operation's parent resource.",
28310	//       "location": "path",
28311	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
28312	//       "required": true,
28313	//       "type": "string"
28314	//     },
28315	//     "pageSize": {
28316	//       "description": "The standard list page size.",
28317	//       "format": "int32",
28318	//       "location": "query",
28319	//       "type": "integer"
28320	//     },
28321	//     "pageToken": {
28322	//       "description": "The standard list page token.",
28323	//       "location": "query",
28324	//       "type": "string"
28325	//     }
28326	//   },
28327	//   "path": "v2beta1/{+name}/operations",
28328	//   "response": {
28329	//     "$ref": "GoogleLongrunningListOperationsResponse"
28330	//   },
28331	//   "scopes": [
28332	//     "https://www.googleapis.com/auth/cloud-platform",
28333	//     "https://www.googleapis.com/auth/dialogflow"
28334	//   ]
28335	// }
28336
28337}
28338
28339// Pages invokes f for each page of results.
28340// A non-nil error returned from f will halt the iteration.
28341// The provided context supersedes any context provided to the Context method.
28342func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
28343	c.ctx_ = ctx
28344	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28345	for {
28346		x, err := c.Do()
28347		if err != nil {
28348			return err
28349		}
28350		if err := f(x); err != nil {
28351			return err
28352		}
28353		if x.NextPageToken == "" {
28354			return nil
28355		}
28356		c.PageToken(x.NextPageToken)
28357	}
28358}
28359
28360// method id "dialogflow.projects.operations.cancel":
28361
28362type ProjectsOperationsCancelCall struct {
28363	s          *Service
28364	name       string
28365	urlParams_ gensupport.URLParams
28366	ctx_       context.Context
28367	header_    http.Header
28368}
28369
28370// Cancel: Starts asynchronous cancellation on a long-running operation.
28371//  The server
28372// makes a best effort to cancel the operation, but success is
28373// not
28374// guaranteed.  If the server doesn't support this method, it
28375// returns
28376// `google.rpc.Code.UNIMPLEMENTED`.  Clients can
28377// use
28378// Operations.GetOperation or
28379// other methods to check whether the cancellation succeeded or whether
28380// the
28381// operation completed despite cancellation. On successful
28382// cancellation,
28383// the operation is not deleted; instead, it becomes an operation
28384// with
28385// an Operation.error value with a google.rpc.Status.code of
28386// 1,
28387// corresponding to `Code.CANCELLED`.
28388func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall {
28389	c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28390	c.name = name
28391	return c
28392}
28393
28394// Fields allows partial responses to be retrieved. See
28395// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28396// for more information.
28397func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall {
28398	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28399	return c
28400}
28401
28402// Context sets the context to be used in this call's Do method. Any
28403// pending HTTP request will be aborted if the provided context is
28404// canceled.
28405func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall {
28406	c.ctx_ = ctx
28407	return c
28408}
28409
28410// Header returns an http.Header that can be modified by the caller to
28411// add HTTP headers to the request.
28412func (c *ProjectsOperationsCancelCall) Header() http.Header {
28413	if c.header_ == nil {
28414		c.header_ = make(http.Header)
28415	}
28416	return c.header_
28417}
28418
28419func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
28420	reqHeaders := make(http.Header)
28421	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
28422	for k, v := range c.header_ {
28423		reqHeaders[k] = v
28424	}
28425	reqHeaders.Set("User-Agent", c.s.userAgent())
28426	var body io.Reader = nil
28427	c.urlParams_.Set("alt", alt)
28428	c.urlParams_.Set("prettyPrint", "false")
28429	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:cancel")
28430	urls += "?" + c.urlParams_.Encode()
28431	req, err := http.NewRequest("POST", urls, body)
28432	if err != nil {
28433		return nil, err
28434	}
28435	req.Header = reqHeaders
28436	googleapi.Expand(req.URL, map[string]string{
28437		"name": c.name,
28438	})
28439	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28440}
28441
28442// Do executes the "dialogflow.projects.operations.cancel" call.
28443// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
28444// non-2xx status code is an error. Response headers are in either
28445// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
28446// returned at all) in error.(*googleapi.Error).Header. Use
28447// googleapi.IsNotModified to check whether the returned error was
28448// because http.StatusNotModified was returned.
28449func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
28450	gensupport.SetOptions(c.urlParams_, opts...)
28451	res, err := c.doRequest("json")
28452	if res != nil && res.StatusCode == http.StatusNotModified {
28453		if res.Body != nil {
28454			res.Body.Close()
28455		}
28456		return nil, &googleapi.Error{
28457			Code:   res.StatusCode,
28458			Header: res.Header,
28459		}
28460	}
28461	if err != nil {
28462		return nil, err
28463	}
28464	defer googleapi.CloseBody(res)
28465	if err := googleapi.CheckResponse(res); err != nil {
28466		return nil, err
28467	}
28468	ret := &GoogleProtobufEmpty{
28469		ServerResponse: googleapi.ServerResponse{
28470			Header:         res.Header,
28471			HTTPStatusCode: res.StatusCode,
28472		},
28473	}
28474	target := &ret
28475	if err := gensupport.DecodeResponse(target, res); err != nil {
28476		return nil, err
28477	}
28478	return ret, nil
28479	// {
28480	//   "description": "Starts asynchronous cancellation on a long-running operation.  The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed.  If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.  Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
28481	//   "flatPath": "v2beta1/projects/{projectsId}/operations/{operationsId}:cancel",
28482	//   "httpMethod": "POST",
28483	//   "id": "dialogflow.projects.operations.cancel",
28484	//   "parameterOrder": [
28485	//     "name"
28486	//   ],
28487	//   "parameters": {
28488	//     "name": {
28489	//       "description": "The name of the operation resource to be cancelled.",
28490	//       "location": "path",
28491	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
28492	//       "required": true,
28493	//       "type": "string"
28494	//     }
28495	//   },
28496	//   "path": "v2beta1/{+name}:cancel",
28497	//   "response": {
28498	//     "$ref": "GoogleProtobufEmpty"
28499	//   },
28500	//   "scopes": [
28501	//     "https://www.googleapis.com/auth/cloud-platform",
28502	//     "https://www.googleapis.com/auth/dialogflow"
28503	//   ]
28504	// }
28505
28506}
28507
28508// method id "dialogflow.projects.operations.get":
28509
28510type ProjectsOperationsGetCall struct {
28511	s            *Service
28512	name         string
28513	urlParams_   gensupport.URLParams
28514	ifNoneMatch_ string
28515	ctx_         context.Context
28516	header_      http.Header
28517}
28518
28519// Get: Gets the latest state of a long-running operation.  Clients can
28520// use this
28521// method to poll the operation result at intervals as recommended by
28522// the API
28523// service.
28524func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
28525	c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28526	c.name = name
28527	return c
28528}
28529
28530// Fields allows partial responses to be retrieved. See
28531// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28532// for more information.
28533func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
28534	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28535	return c
28536}
28537
28538// IfNoneMatch sets the optional parameter which makes the operation
28539// fail if the object's ETag matches the given value. This is useful for
28540// getting updates only after the object has changed since the last
28541// request. Use googleapi.IsNotModified to check whether the response
28542// error from Do is the result of In-None-Match.
28543func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
28544	c.ifNoneMatch_ = entityTag
28545	return c
28546}
28547
28548// Context sets the context to be used in this call's Do method. Any
28549// pending HTTP request will be aborted if the provided context is
28550// canceled.
28551func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
28552	c.ctx_ = ctx
28553	return c
28554}
28555
28556// Header returns an http.Header that can be modified by the caller to
28557// add HTTP headers to the request.
28558func (c *ProjectsOperationsGetCall) Header() http.Header {
28559	if c.header_ == nil {
28560		c.header_ = make(http.Header)
28561	}
28562	return c.header_
28563}
28564
28565func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
28566	reqHeaders := make(http.Header)
28567	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
28568	for k, v := range c.header_ {
28569		reqHeaders[k] = v
28570	}
28571	reqHeaders.Set("User-Agent", c.s.userAgent())
28572	if c.ifNoneMatch_ != "" {
28573		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28574	}
28575	var body io.Reader = nil
28576	c.urlParams_.Set("alt", alt)
28577	c.urlParams_.Set("prettyPrint", "false")
28578	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
28579	urls += "?" + c.urlParams_.Encode()
28580	req, err := http.NewRequest("GET", urls, body)
28581	if err != nil {
28582		return nil, err
28583	}
28584	req.Header = reqHeaders
28585	googleapi.Expand(req.URL, map[string]string{
28586		"name": c.name,
28587	})
28588	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28589}
28590
28591// Do executes the "dialogflow.projects.operations.get" call.
28592// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
28593// Any non-2xx status code is an error. Response headers are in either
28594// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
28595// was returned at all) in error.(*googleapi.Error).Header. Use
28596// googleapi.IsNotModified to check whether the returned error was
28597// because http.StatusNotModified was returned.
28598func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
28599	gensupport.SetOptions(c.urlParams_, opts...)
28600	res, err := c.doRequest("json")
28601	if res != nil && res.StatusCode == http.StatusNotModified {
28602		if res.Body != nil {
28603			res.Body.Close()
28604		}
28605		return nil, &googleapi.Error{
28606			Code:   res.StatusCode,
28607			Header: res.Header,
28608		}
28609	}
28610	if err != nil {
28611		return nil, err
28612	}
28613	defer googleapi.CloseBody(res)
28614	if err := googleapi.CheckResponse(res); err != nil {
28615		return nil, err
28616	}
28617	ret := &GoogleLongrunningOperation{
28618		ServerResponse: googleapi.ServerResponse{
28619			Header:         res.Header,
28620			HTTPStatusCode: res.StatusCode,
28621		},
28622	}
28623	target := &ret
28624	if err := gensupport.DecodeResponse(target, res); err != nil {
28625		return nil, err
28626	}
28627	return ret, nil
28628	// {
28629	//   "description": "Gets the latest state of a long-running operation.  Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
28630	//   "flatPath": "v2beta1/projects/{projectsId}/operations/{operationsId}",
28631	//   "httpMethod": "GET",
28632	//   "id": "dialogflow.projects.operations.get",
28633	//   "parameterOrder": [
28634	//     "name"
28635	//   ],
28636	//   "parameters": {
28637	//     "name": {
28638	//       "description": "The name of the operation resource.",
28639	//       "location": "path",
28640	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
28641	//       "required": true,
28642	//       "type": "string"
28643	//     }
28644	//   },
28645	//   "path": "v2beta1/{+name}",
28646	//   "response": {
28647	//     "$ref": "GoogleLongrunningOperation"
28648	//   },
28649	//   "scopes": [
28650	//     "https://www.googleapis.com/auth/cloud-platform",
28651	//     "https://www.googleapis.com/auth/dialogflow"
28652	//   ]
28653	// }
28654
28655}
28656
28657// method id "dialogflow.projects.operations.list":
28658
28659type ProjectsOperationsListCall struct {
28660	s            *Service
28661	name         string
28662	urlParams_   gensupport.URLParams
28663	ifNoneMatch_ string
28664	ctx_         context.Context
28665	header_      http.Header
28666}
28667
28668// List: Lists operations that match the specified filter in the
28669// request. If the
28670// server doesn't support this method, it returns
28671// `UNIMPLEMENTED`.
28672//
28673// NOTE: the `name` binding allows API services to override the
28674// binding
28675// to use different resource name schemes, such as `users/*/operations`.
28676// To
28677// override the binding, API services can add a binding such
28678// as
28679// "/v1/{name=users/*}/operations" to their service configuration.
28680// For backwards compatibility, the default name includes the
28681// operations
28682// collection id, however overriding users must ensure the name
28683// binding
28684// is the parent resource, without the operations collection id.
28685func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall {
28686	c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28687	c.name = name
28688	return c
28689}
28690
28691// Filter sets the optional parameter "filter": The standard list
28692// filter.
28693func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall {
28694	c.urlParams_.Set("filter", filter)
28695	return c
28696}
28697
28698// PageSize sets the optional parameter "pageSize": The standard list
28699// page size.
28700func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall {
28701	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28702	return c
28703}
28704
28705// PageToken sets the optional parameter "pageToken": The standard list
28706// page token.
28707func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall {
28708	c.urlParams_.Set("pageToken", pageToken)
28709	return c
28710}
28711
28712// Fields allows partial responses to be retrieved. See
28713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28714// for more information.
28715func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall {
28716	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28717	return c
28718}
28719
28720// IfNoneMatch sets the optional parameter which makes the operation
28721// fail if the object's ETag matches the given value. This is useful for
28722// getting updates only after the object has changed since the last
28723// request. Use googleapi.IsNotModified to check whether the response
28724// error from Do is the result of In-None-Match.
28725func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall {
28726	c.ifNoneMatch_ = entityTag
28727	return c
28728}
28729
28730// Context sets the context to be used in this call's Do method. Any
28731// pending HTTP request will be aborted if the provided context is
28732// canceled.
28733func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall {
28734	c.ctx_ = ctx
28735	return c
28736}
28737
28738// Header returns an http.Header that can be modified by the caller to
28739// add HTTP headers to the request.
28740func (c *ProjectsOperationsListCall) Header() http.Header {
28741	if c.header_ == nil {
28742		c.header_ = make(http.Header)
28743	}
28744	return c.header_
28745}
28746
28747func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
28748	reqHeaders := make(http.Header)
28749	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
28750	for k, v := range c.header_ {
28751		reqHeaders[k] = v
28752	}
28753	reqHeaders.Set("User-Agent", c.s.userAgent())
28754	if c.ifNoneMatch_ != "" {
28755		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28756	}
28757	var body io.Reader = nil
28758	c.urlParams_.Set("alt", alt)
28759	c.urlParams_.Set("prettyPrint", "false")
28760	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}/operations")
28761	urls += "?" + c.urlParams_.Encode()
28762	req, err := http.NewRequest("GET", urls, body)
28763	if err != nil {
28764		return nil, err
28765	}
28766	req.Header = reqHeaders
28767	googleapi.Expand(req.URL, map[string]string{
28768		"name": c.name,
28769	})
28770	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28771}
28772
28773// Do executes the "dialogflow.projects.operations.list" call.
28774// Exactly one of *GoogleLongrunningListOperationsResponse or error will
28775// be non-nil. Any non-2xx status code is an error. Response headers are
28776// in either
28777// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
28778// a response was returned at all) in error.(*googleapi.Error).Header.
28779// Use googleapi.IsNotModified to check whether the returned error was
28780// because http.StatusNotModified was returned.
28781func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
28782	gensupport.SetOptions(c.urlParams_, opts...)
28783	res, err := c.doRequest("json")
28784	if res != nil && res.StatusCode == http.StatusNotModified {
28785		if res.Body != nil {
28786			res.Body.Close()
28787		}
28788		return nil, &googleapi.Error{
28789			Code:   res.StatusCode,
28790			Header: res.Header,
28791		}
28792	}
28793	if err != nil {
28794		return nil, err
28795	}
28796	defer googleapi.CloseBody(res)
28797	if err := googleapi.CheckResponse(res); err != nil {
28798		return nil, err
28799	}
28800	ret := &GoogleLongrunningListOperationsResponse{
28801		ServerResponse: googleapi.ServerResponse{
28802			Header:         res.Header,
28803			HTTPStatusCode: res.StatusCode,
28804		},
28805	}
28806	target := &ret
28807	if err := gensupport.DecodeResponse(target, res); err != nil {
28808		return nil, err
28809	}
28810	return ret, nil
28811	// {
28812	//   "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
28813	//   "flatPath": "v2beta1/projects/{projectsId}/operations",
28814	//   "httpMethod": "GET",
28815	//   "id": "dialogflow.projects.operations.list",
28816	//   "parameterOrder": [
28817	//     "name"
28818	//   ],
28819	//   "parameters": {
28820	//     "filter": {
28821	//       "description": "The standard list filter.",
28822	//       "location": "query",
28823	//       "type": "string"
28824	//     },
28825	//     "name": {
28826	//       "description": "The name of the operation's parent resource.",
28827	//       "location": "path",
28828	//       "pattern": "^projects/[^/]+$",
28829	//       "required": true,
28830	//       "type": "string"
28831	//     },
28832	//     "pageSize": {
28833	//       "description": "The standard list page size.",
28834	//       "format": "int32",
28835	//       "location": "query",
28836	//       "type": "integer"
28837	//     },
28838	//     "pageToken": {
28839	//       "description": "The standard list page token.",
28840	//       "location": "query",
28841	//       "type": "string"
28842	//     }
28843	//   },
28844	//   "path": "v2beta1/{+name}/operations",
28845	//   "response": {
28846	//     "$ref": "GoogleLongrunningListOperationsResponse"
28847	//   },
28848	//   "scopes": [
28849	//     "https://www.googleapis.com/auth/cloud-platform",
28850	//     "https://www.googleapis.com/auth/dialogflow"
28851	//   ]
28852	// }
28853
28854}
28855
28856// Pages invokes f for each page of results.
28857// A non-nil error returned from f will halt the iteration.
28858// The provided context supersedes any context provided to the Context method.
28859func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
28860	c.ctx_ = ctx
28861	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28862	for {
28863		x, err := c.Do()
28864		if err != nil {
28865			return err
28866		}
28867		if err := f(x); err != nil {
28868			return err
28869		}
28870		if x.NextPageToken == "" {
28871			return nil
28872		}
28873		c.PageToken(x.NextPageToken)
28874	}
28875}
28876