1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package dialogflow provides access to the Dialogflow API.
8//
9// This package is DEPRECATED. Use package cloud.google.com/go/dialogflow/apiv2 instead.
10//
11// For product documentation, see: https://cloud.google.com/dialogflow/
12//
13// Creating a client
14//
15// Usage example:
16//
17//   import "google.golang.org/api/dialogflow/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	internaloption "google.golang.org/api/option/internaloption"
62	htransport "google.golang.org/api/transport/http"
63)
64
65// Always reference these packages, just in case the auto-generated code
66// below doesn't.
67var _ = bytes.NewBuffer
68var _ = strconv.Itoa
69var _ = fmt.Sprintf
70var _ = json.NewDecoder
71var _ = io.Copy
72var _ = url.Parse
73var _ = gensupport.MarshalJSON
74var _ = googleapi.Version
75var _ = errors.New
76var _ = strings.Replace
77var _ = context.Canceled
78var _ = internaloption.WithDefaultEndpoint
79
80const apiId = "dialogflow:v2beta1"
81const apiName = "dialogflow"
82const apiVersion = "v2beta1"
83const basePath = "https://dialogflow.googleapis.com/"
84
85// OAuth2 scopes used by this API.
86const (
87	// View and manage your data across Google Cloud Platform services
88	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
89
90	// View, manage and query your Dialogflow agents
91	DialogflowScope = "https://www.googleapis.com/auth/dialogflow"
92)
93
94// NewService creates a new Service.
95func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
96	scopesOption := option.WithScopes(
97		"https://www.googleapis.com/auth/cloud-platform",
98		"https://www.googleapis.com/auth/dialogflow",
99	)
100	// NOTE: prepend, so we don't override user-specified scopes.
101	opts = append([]option.ClientOption{scopesOption}, opts...)
102	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
103	client, endpoint, err := htransport.NewClient(ctx, opts...)
104	if err != nil {
105		return nil, err
106	}
107	s, err := New(client)
108	if err != nil {
109		return nil, err
110	}
111	if endpoint != "" {
112		s.BasePath = endpoint
113	}
114	return s, nil
115}
116
117// New creates a new Service. It uses the provided http.Client for requests.
118//
119// Deprecated: please use NewService instead.
120// To provide a custom HTTP client, use option.WithHTTPClient.
121// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
122func New(client *http.Client) (*Service, error) {
123	if client == nil {
124		return nil, errors.New("client is nil")
125	}
126	s := &Service{client: client, BasePath: basePath}
127	s.Projects = NewProjectsService(s)
128	return s, nil
129}
130
131type Service struct {
132	client    *http.Client
133	BasePath  string // API endpoint base URL
134	UserAgent string // optional additional User-Agent fragment
135
136	Projects *ProjectsService
137}
138
139func (s *Service) userAgent() string {
140	if s.UserAgent == "" {
141		return googleapi.UserAgent
142	}
143	return googleapi.UserAgent + " " + s.UserAgent
144}
145
146func NewProjectsService(s *Service) *ProjectsService {
147	rs := &ProjectsService{s: s}
148	rs.Agent = NewProjectsAgentService(s)
149	rs.KnowledgeBases = NewProjectsKnowledgeBasesService(s)
150	rs.Locations = NewProjectsLocationsService(s)
151	rs.Operations = NewProjectsOperationsService(s)
152	return rs
153}
154
155type ProjectsService struct {
156	s *Service
157
158	Agent *ProjectsAgentService
159
160	KnowledgeBases *ProjectsKnowledgeBasesService
161
162	Locations *ProjectsLocationsService
163
164	Operations *ProjectsOperationsService
165}
166
167func NewProjectsAgentService(s *Service) *ProjectsAgentService {
168	rs := &ProjectsAgentService{s: s}
169	rs.EntityTypes = NewProjectsAgentEntityTypesService(s)
170	rs.Environments = NewProjectsAgentEnvironmentsService(s)
171	rs.Intents = NewProjectsAgentIntentsService(s)
172	rs.KnowledgeBases = NewProjectsAgentKnowledgeBasesService(s)
173	rs.Sessions = NewProjectsAgentSessionsService(s)
174	return rs
175}
176
177type ProjectsAgentService struct {
178	s *Service
179
180	EntityTypes *ProjectsAgentEntityTypesService
181
182	Environments *ProjectsAgentEnvironmentsService
183
184	Intents *ProjectsAgentIntentsService
185
186	KnowledgeBases *ProjectsAgentKnowledgeBasesService
187
188	Sessions *ProjectsAgentSessionsService
189}
190
191func NewProjectsAgentEntityTypesService(s *Service) *ProjectsAgentEntityTypesService {
192	rs := &ProjectsAgentEntityTypesService{s: s}
193	rs.Entities = NewProjectsAgentEntityTypesEntitiesService(s)
194	return rs
195}
196
197type ProjectsAgentEntityTypesService struct {
198	s *Service
199
200	Entities *ProjectsAgentEntityTypesEntitiesService
201}
202
203func NewProjectsAgentEntityTypesEntitiesService(s *Service) *ProjectsAgentEntityTypesEntitiesService {
204	rs := &ProjectsAgentEntityTypesEntitiesService{s: s}
205	return rs
206}
207
208type ProjectsAgentEntityTypesEntitiesService struct {
209	s *Service
210}
211
212func NewProjectsAgentEnvironmentsService(s *Service) *ProjectsAgentEnvironmentsService {
213	rs := &ProjectsAgentEnvironmentsService{s: s}
214	rs.Users = NewProjectsAgentEnvironmentsUsersService(s)
215	return rs
216}
217
218type ProjectsAgentEnvironmentsService struct {
219	s *Service
220
221	Users *ProjectsAgentEnvironmentsUsersService
222}
223
224func NewProjectsAgentEnvironmentsUsersService(s *Service) *ProjectsAgentEnvironmentsUsersService {
225	rs := &ProjectsAgentEnvironmentsUsersService{s: s}
226	rs.Sessions = NewProjectsAgentEnvironmentsUsersSessionsService(s)
227	return rs
228}
229
230type ProjectsAgentEnvironmentsUsersService struct {
231	s *Service
232
233	Sessions *ProjectsAgentEnvironmentsUsersSessionsService
234}
235
236func NewProjectsAgentEnvironmentsUsersSessionsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsService {
237	rs := &ProjectsAgentEnvironmentsUsersSessionsService{s: s}
238	rs.Contexts = NewProjectsAgentEnvironmentsUsersSessionsContextsService(s)
239	rs.EntityTypes = NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s)
240	return rs
241}
242
243type ProjectsAgentEnvironmentsUsersSessionsService struct {
244	s *Service
245
246	Contexts *ProjectsAgentEnvironmentsUsersSessionsContextsService
247
248	EntityTypes *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService
249}
250
251func NewProjectsAgentEnvironmentsUsersSessionsContextsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsContextsService {
252	rs := &ProjectsAgentEnvironmentsUsersSessionsContextsService{s: s}
253	return rs
254}
255
256type ProjectsAgentEnvironmentsUsersSessionsContextsService struct {
257	s *Service
258}
259
260func NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService {
261	rs := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesService{s: s}
262	return rs
263}
264
265type ProjectsAgentEnvironmentsUsersSessionsEntityTypesService struct {
266	s *Service
267}
268
269func NewProjectsAgentIntentsService(s *Service) *ProjectsAgentIntentsService {
270	rs := &ProjectsAgentIntentsService{s: s}
271	return rs
272}
273
274type ProjectsAgentIntentsService struct {
275	s *Service
276}
277
278func NewProjectsAgentKnowledgeBasesService(s *Service) *ProjectsAgentKnowledgeBasesService {
279	rs := &ProjectsAgentKnowledgeBasesService{s: s}
280	rs.Documents = NewProjectsAgentKnowledgeBasesDocumentsService(s)
281	return rs
282}
283
284type ProjectsAgentKnowledgeBasesService struct {
285	s *Service
286
287	Documents *ProjectsAgentKnowledgeBasesDocumentsService
288}
289
290func NewProjectsAgentKnowledgeBasesDocumentsService(s *Service) *ProjectsAgentKnowledgeBasesDocumentsService {
291	rs := &ProjectsAgentKnowledgeBasesDocumentsService{s: s}
292	return rs
293}
294
295type ProjectsAgentKnowledgeBasesDocumentsService struct {
296	s *Service
297}
298
299func NewProjectsAgentSessionsService(s *Service) *ProjectsAgentSessionsService {
300	rs := &ProjectsAgentSessionsService{s: s}
301	rs.Contexts = NewProjectsAgentSessionsContextsService(s)
302	rs.EntityTypes = NewProjectsAgentSessionsEntityTypesService(s)
303	return rs
304}
305
306type ProjectsAgentSessionsService struct {
307	s *Service
308
309	Contexts *ProjectsAgentSessionsContextsService
310
311	EntityTypes *ProjectsAgentSessionsEntityTypesService
312}
313
314func NewProjectsAgentSessionsContextsService(s *Service) *ProjectsAgentSessionsContextsService {
315	rs := &ProjectsAgentSessionsContextsService{s: s}
316	return rs
317}
318
319type ProjectsAgentSessionsContextsService struct {
320	s *Service
321}
322
323func NewProjectsAgentSessionsEntityTypesService(s *Service) *ProjectsAgentSessionsEntityTypesService {
324	rs := &ProjectsAgentSessionsEntityTypesService{s: s}
325	return rs
326}
327
328type ProjectsAgentSessionsEntityTypesService struct {
329	s *Service
330}
331
332func NewProjectsKnowledgeBasesService(s *Service) *ProjectsKnowledgeBasesService {
333	rs := &ProjectsKnowledgeBasesService{s: s}
334	rs.Documents = NewProjectsKnowledgeBasesDocumentsService(s)
335	return rs
336}
337
338type ProjectsKnowledgeBasesService struct {
339	s *Service
340
341	Documents *ProjectsKnowledgeBasesDocumentsService
342}
343
344func NewProjectsKnowledgeBasesDocumentsService(s *Service) *ProjectsKnowledgeBasesDocumentsService {
345	rs := &ProjectsKnowledgeBasesDocumentsService{s: s}
346	return rs
347}
348
349type ProjectsKnowledgeBasesDocumentsService struct {
350	s *Service
351}
352
353func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
354	rs := &ProjectsLocationsService{s: s}
355	rs.Agent_ = NewProjectsLocationsAgentService(s)
356	rs.Operations = NewProjectsLocationsOperationsService(s)
357	return rs
358}
359
360type ProjectsLocationsService struct {
361	s *Service
362
363	Agent_ *ProjectsLocationsAgentService
364
365	Operations *ProjectsLocationsOperationsService
366}
367
368func NewProjectsLocationsAgentService(s *Service) *ProjectsLocationsAgentService {
369	rs := &ProjectsLocationsAgentService{s: s}
370	rs.EntityTypes = NewProjectsLocationsAgentEntityTypesService(s)
371	rs.Environments = NewProjectsLocationsAgentEnvironmentsService(s)
372	rs.Intents = NewProjectsLocationsAgentIntentsService(s)
373	rs.Sessions = NewProjectsLocationsAgentSessionsService(s)
374	return rs
375}
376
377type ProjectsLocationsAgentService struct {
378	s *Service
379
380	EntityTypes *ProjectsLocationsAgentEntityTypesService
381
382	Environments *ProjectsLocationsAgentEnvironmentsService
383
384	Intents *ProjectsLocationsAgentIntentsService
385
386	Sessions *ProjectsLocationsAgentSessionsService
387}
388
389func NewProjectsLocationsAgentEntityTypesService(s *Service) *ProjectsLocationsAgentEntityTypesService {
390	rs := &ProjectsLocationsAgentEntityTypesService{s: s}
391	rs.Entities = NewProjectsLocationsAgentEntityTypesEntitiesService(s)
392	return rs
393}
394
395type ProjectsLocationsAgentEntityTypesService struct {
396	s *Service
397
398	Entities *ProjectsLocationsAgentEntityTypesEntitiesService
399}
400
401func NewProjectsLocationsAgentEntityTypesEntitiesService(s *Service) *ProjectsLocationsAgentEntityTypesEntitiesService {
402	rs := &ProjectsLocationsAgentEntityTypesEntitiesService{s: s}
403	return rs
404}
405
406type ProjectsLocationsAgentEntityTypesEntitiesService struct {
407	s *Service
408}
409
410func NewProjectsLocationsAgentEnvironmentsService(s *Service) *ProjectsLocationsAgentEnvironmentsService {
411	rs := &ProjectsLocationsAgentEnvironmentsService{s: s}
412	rs.Users = NewProjectsLocationsAgentEnvironmentsUsersService(s)
413	return rs
414}
415
416type ProjectsLocationsAgentEnvironmentsService struct {
417	s *Service
418
419	Users *ProjectsLocationsAgentEnvironmentsUsersService
420}
421
422func NewProjectsLocationsAgentEnvironmentsUsersService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersService {
423	rs := &ProjectsLocationsAgentEnvironmentsUsersService{s: s}
424	rs.Sessions = NewProjectsLocationsAgentEnvironmentsUsersSessionsService(s)
425	return rs
426}
427
428type ProjectsLocationsAgentEnvironmentsUsersService struct {
429	s *Service
430
431	Sessions *ProjectsLocationsAgentEnvironmentsUsersSessionsService
432}
433
434func NewProjectsLocationsAgentEnvironmentsUsersSessionsService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersSessionsService {
435	rs := &ProjectsLocationsAgentEnvironmentsUsersSessionsService{s: s}
436	rs.Contexts = NewProjectsLocationsAgentEnvironmentsUsersSessionsContextsService(s)
437	rs.EntityTypes = NewProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService(s)
438	return rs
439}
440
441type ProjectsLocationsAgentEnvironmentsUsersSessionsService struct {
442	s *Service
443
444	Contexts *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService
445
446	EntityTypes *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService
447}
448
449func NewProjectsLocationsAgentEnvironmentsUsersSessionsContextsService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService {
450	rs := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService{s: s}
451	return rs
452}
453
454type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService struct {
455	s *Service
456}
457
458func NewProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService(s *Service) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService {
459	rs := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService{s: s}
460	return rs
461}
462
463type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService struct {
464	s *Service
465}
466
467func NewProjectsLocationsAgentIntentsService(s *Service) *ProjectsLocationsAgentIntentsService {
468	rs := &ProjectsLocationsAgentIntentsService{s: s}
469	return rs
470}
471
472type ProjectsLocationsAgentIntentsService struct {
473	s *Service
474}
475
476func NewProjectsLocationsAgentSessionsService(s *Service) *ProjectsLocationsAgentSessionsService {
477	rs := &ProjectsLocationsAgentSessionsService{s: s}
478	rs.Contexts = NewProjectsLocationsAgentSessionsContextsService(s)
479	rs.EntityTypes = NewProjectsLocationsAgentSessionsEntityTypesService(s)
480	return rs
481}
482
483type ProjectsLocationsAgentSessionsService struct {
484	s *Service
485
486	Contexts *ProjectsLocationsAgentSessionsContextsService
487
488	EntityTypes *ProjectsLocationsAgentSessionsEntityTypesService
489}
490
491func NewProjectsLocationsAgentSessionsContextsService(s *Service) *ProjectsLocationsAgentSessionsContextsService {
492	rs := &ProjectsLocationsAgentSessionsContextsService{s: s}
493	return rs
494}
495
496type ProjectsLocationsAgentSessionsContextsService struct {
497	s *Service
498}
499
500func NewProjectsLocationsAgentSessionsEntityTypesService(s *Service) *ProjectsLocationsAgentSessionsEntityTypesService {
501	rs := &ProjectsLocationsAgentSessionsEntityTypesService{s: s}
502	return rs
503}
504
505type ProjectsLocationsAgentSessionsEntityTypesService struct {
506	s *Service
507}
508
509func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
510	rs := &ProjectsLocationsOperationsService{s: s}
511	return rs
512}
513
514type ProjectsLocationsOperationsService struct {
515	s *Service
516}
517
518func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
519	rs := &ProjectsOperationsService{s: s}
520	return rs
521}
522
523type ProjectsOperationsService struct {
524	s *Service
525}
526
527// GoogleCloudDialogflowV2AnnotatedMessagePart: Represents a part of a
528// message possibly annotated with an entity. The part
529// can be an entity or purely a part of the message between two entities
530// or
531// message start/end.
532type GoogleCloudDialogflowV2AnnotatedMessagePart struct {
533	// EntityType: The [Dialogflow system
534	// entity
535	// type](https://cloud.google.com/dialogflow/docs/reference/system
536	// -entities)
537	// of this message part. If this is empty, Dialogflow could not annotate
538	// the
539	// phrase part with a system entity.
540	EntityType string `json:"entityType,omitempty"`
541
542	// FormattedValue: The [Dialogflow system entity formatted
543	// value
544	// ](https://cloud.google.com/dialogflow/docs/reference/system-enti
545	// ties) of
546	// this message part. For example for a system entity of
547	// type
548	// `@sys.unit-currency`, this may contain:
549	// <pre>
550	// {
551	//   "amount": 5,
552	//   "currency": "USD"
553	// }
554	// </pre>
555	FormattedValue interface{} `json:"formattedValue,omitempty"`
556
557	// Text: A part of a message possibly annotated with an entity.
558	Text string `json:"text,omitempty"`
559
560	// ForceSendFields is a list of field names (e.g. "EntityType") to
561	// unconditionally include in API requests. By default, fields with
562	// empty values are omitted from API requests. However, any non-pointer,
563	// non-interface field appearing in ForceSendFields will be sent to the
564	// server regardless of whether the field is empty or not. This may be
565	// used to include empty fields in Patch requests.
566	ForceSendFields []string `json:"-"`
567
568	// NullFields is a list of field names (e.g. "EntityType") to include in
569	// API requests with the JSON null value. By default, fields with empty
570	// values are omitted from API requests. However, any field with an
571	// empty value appearing in NullFields will be sent to the server as
572	// null. It is an error if a field in this list has a non-empty value.
573	// This may be used to include null fields in Patch requests.
574	NullFields []string `json:"-"`
575}
576
577func (s *GoogleCloudDialogflowV2AnnotatedMessagePart) MarshalJSON() ([]byte, error) {
578	type NoMethod GoogleCloudDialogflowV2AnnotatedMessagePart
579	raw := NoMethod(*s)
580	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
581}
582
583// GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse: The response
584// message for EntityTypes.BatchUpdateEntityTypes.
585type GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse struct {
586	// EntityTypes: The collection of updated or created entity types.
587	EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"`
588
589	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
590	// unconditionally include in API requests. By default, fields with
591	// empty values are omitted from API requests. However, any non-pointer,
592	// non-interface field appearing in ForceSendFields will be sent to the
593	// server regardless of whether the field is empty or not. This may be
594	// used to include empty fields in Patch requests.
595	ForceSendFields []string `json:"-"`
596
597	// NullFields is a list of field names (e.g. "EntityTypes") to include
598	// in API requests with the JSON null value. By default, fields with
599	// empty values are omitted from API requests. However, any field with
600	// an empty value appearing in NullFields will be sent to the server as
601	// null. It is an error if a field in this list has a non-empty value.
602	// This may be used to include null fields in Patch requests.
603	NullFields []string `json:"-"`
604}
605
606func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) {
607	type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
608	raw := NoMethod(*s)
609	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
610}
611
612// GoogleCloudDialogflowV2BatchUpdateIntentsResponse: The response
613// message for Intents.BatchUpdateIntents.
614type GoogleCloudDialogflowV2BatchUpdateIntentsResponse struct {
615	// Intents: The collection of updated or created intents.
616	Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"`
617
618	// ForceSendFields is a list of field names (e.g. "Intents") to
619	// unconditionally include in API requests. By default, fields with
620	// empty values are omitted from API requests. However, any non-pointer,
621	// non-interface field appearing in ForceSendFields will be sent to the
622	// server regardless of whether the field is empty or not. This may be
623	// used to include empty fields in Patch requests.
624	ForceSendFields []string `json:"-"`
625
626	// NullFields is a list of field names (e.g. "Intents") to include in
627	// API requests with the JSON null value. By default, fields with empty
628	// values are omitted from API requests. However, any field with an
629	// empty value appearing in NullFields will be sent to the server as
630	// null. It is an error if a field in this list has a non-empty value.
631	// This may be used to include null fields in Patch requests.
632	NullFields []string `json:"-"`
633}
634
635func (s *GoogleCloudDialogflowV2BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) {
636	type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsResponse
637	raw := NoMethod(*s)
638	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
639}
640
641// GoogleCloudDialogflowV2Context: Represents a context.
642type GoogleCloudDialogflowV2Context struct {
643	// LifespanCount: Optional. The number of conversational query requests
644	// after which the
645	// context expires. If set to `0` (the default) the context
646	// expires
647	// immediately. Contexts expire automatically after 20 minutes if
648	// there
649	// are no matching queries.
650	LifespanCount int64 `json:"lifespanCount,omitempty"`
651
652	// Name: Required. The unique identifier of the context.
653	// Format:
654	// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context
655	// ID>`.
656	//
657	// The `Context ID` is always converted to lowercase, may only
658	// contain
659	// characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
660	//
661	// The following context names are reserved for internal use by
662	// Dialogflow.
663	// You should not use these contexts or create contexts with these
664	// names:
665	//
666	// * `__system_counters__`
667	// * `*_id_dialog_context`
668	// * `*_dialog_params_size`
669	Name string `json:"name,omitempty"`
670
671	// Parameters: Optional. The collection of parameters associated with
672	// this context.
673	// Refer to
674	// [this
675	// doc](https://cloud.google.com/dialogflow/docs/intents-actions-pa
676	// rameters)
677	// for syntax.
678	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
679
680	// ForceSendFields is a list of field names (e.g. "LifespanCount") to
681	// unconditionally include in API requests. By default, fields with
682	// empty values are omitted from API requests. However, any non-pointer,
683	// non-interface field appearing in ForceSendFields will be sent to the
684	// server regardless of whether the field is empty or not. This may be
685	// used to include empty fields in Patch requests.
686	ForceSendFields []string `json:"-"`
687
688	// NullFields is a list of field names (e.g. "LifespanCount") to include
689	// in API requests with the JSON null value. By default, fields with
690	// empty values are omitted from API requests. However, any field with
691	// an empty value appearing in NullFields will be sent to the server as
692	// null. It is an error if a field in this list has a non-empty value.
693	// This may be used to include null fields in Patch requests.
694	NullFields []string `json:"-"`
695}
696
697func (s *GoogleCloudDialogflowV2Context) MarshalJSON() ([]byte, error) {
698	type NoMethod GoogleCloudDialogflowV2Context
699	raw := NoMethod(*s)
700	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
701}
702
703// GoogleCloudDialogflowV2ConversationEvent: Represents a notification
704// sent to Cloud Pub/Sub subscribers for conversation
705// lifecycle events.
706type GoogleCloudDialogflowV2ConversationEvent struct {
707	// Conversation: The unique identifier of the conversation this
708	// notification
709	// refers to.
710	// Format: `projects/<Project ID>/conversations/<Conversation ID>`.
711	Conversation string `json:"conversation,omitempty"`
712
713	// ErrorStatus: More detailed information about an error. Only set for
714	// type
715	// UNRECOVERABLE_ERROR_IN_PHONE_CALL.
716	ErrorStatus *GoogleRpcStatus `json:"errorStatus,omitempty"`
717
718	// NewMessagePayload: Payload of NEW_MESSAGE event.
719	NewMessagePayload *GoogleCloudDialogflowV2Message `json:"newMessagePayload,omitempty"`
720
721	// Type: The type of the event that this notification refers to.
722	//
723	// Possible values:
724	//   "TYPE_UNSPECIFIED" - Type not set.
725	//   "CONVERSATION_STARTED" - A new conversation has been opened. This
726	// is fired when a telephone call
727	// is answered, or a conversation is created via the API.
728	//   "CONVERSATION_FINISHED" - An existing conversation has closed. This
729	// is fired when a telephone call
730	// is terminated, or a conversation is closed via the API.
731	//   "HUMAN_INTERVENTION_NEEDED" - An existing conversation has received
732	// notification from Dialogflow that
733	// human intervention is required.
734	//   "NEW_MESSAGE" - An existing conversation has received a new
735	// message, either from API or
736	// telephony. It is configured
737	// in
738	// ConversationProfile.new_message_event_notification_config
739	//   "UNRECOVERABLE_ERROR" - Unrecoverable error during a telephone
740	// call.
741	//
742	// In general non-recoverable errors only occur if something
743	// was
744	// misconfigured in the ConversationProfile corresponding to the call.
745	// After
746	// a non-recoverable error, Dialogflow may stop responding.
747	//
748	// We don't fire this event:
749	// * in an API call because we can directly return the error, or,
750	// * when we can recover from an error.
751	Type string `json:"type,omitempty"`
752
753	// ForceSendFields is a list of field names (e.g. "Conversation") to
754	// unconditionally include in API requests. By default, fields with
755	// empty values are omitted from API requests. However, any non-pointer,
756	// non-interface field appearing in ForceSendFields will be sent to the
757	// server regardless of whether the field is empty or not. This may be
758	// used to include empty fields in Patch requests.
759	ForceSendFields []string `json:"-"`
760
761	// NullFields is a list of field names (e.g. "Conversation") to include
762	// in API requests with the JSON null value. By default, fields with
763	// empty values are omitted from API requests. However, any field with
764	// an empty value appearing in NullFields will be sent to the server as
765	// null. It is an error if a field in this list has a non-empty value.
766	// This may be used to include null fields in Patch requests.
767	NullFields []string `json:"-"`
768}
769
770func (s *GoogleCloudDialogflowV2ConversationEvent) MarshalJSON() ([]byte, error) {
771	type NoMethod GoogleCloudDialogflowV2ConversationEvent
772	raw := NoMethod(*s)
773	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
774}
775
776// GoogleCloudDialogflowV2EntityType: Represents an entity type.
777// Entity types serve as a tool for extracting parameter values from
778// natural
779// language queries.
780type GoogleCloudDialogflowV2EntityType struct {
781	// AutoExpansionMode: Optional. Indicates whether the entity type can be
782	// automatically
783	// expanded.
784	//
785	// Possible values:
786	//   "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the
787	// entity.
788	//   "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values
789	// that have not been explicitly
790	// listed in the entity.
791	AutoExpansionMode string `json:"autoExpansionMode,omitempty"`
792
793	// DisplayName: Required. The name of the entity type.
794	DisplayName string `json:"displayName,omitempty"`
795
796	// EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction
797	// during classification.
798	EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"`
799
800	// Entities: Optional. The collection of entity entries associated with
801	// the entity type.
802	Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"`
803
804	// Kind: Required. Indicates the kind of entity type.
805	//
806	// Possible values:
807	//   "KIND_UNSPECIFIED" - Not specified. This value should be never
808	// used.
809	//   "KIND_MAP" - Map entity types allow mapping of a group of synonyms
810	// to a reference
811	// value.
812	//   "KIND_LIST" - List entity types contain a set of entries that do
813	// not map to reference
814	// values. However, list entity types can contain references to other
815	// entity
816	// types (with or without aliases).
817	//   "KIND_REGEXP" - Regexp entity types allow to specify regular
818	// expressions in entries
819	// values.
820	Kind string `json:"kind,omitempty"`
821
822	// Name: The unique identifier of the entity type.
823	// Required for EntityTypes.UpdateEntityType
824	// and
825	// EntityTypes.BatchUpdateEntityTypes methods.
826	// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
827	Name string `json:"name,omitempty"`
828
829	// ForceSendFields is a list of field names (e.g. "AutoExpansionMode")
830	// to unconditionally include in API requests. By default, fields with
831	// empty values are omitted from API requests. However, any non-pointer,
832	// non-interface field appearing in ForceSendFields will be sent to the
833	// server regardless of whether the field is empty or not. This may be
834	// used to include empty fields in Patch requests.
835	ForceSendFields []string `json:"-"`
836
837	// NullFields is a list of field names (e.g. "AutoExpansionMode") to
838	// include in API requests with the JSON null value. By default, fields
839	// with empty values are omitted from API requests. However, any field
840	// with an empty value appearing in NullFields will be sent to the
841	// server as null. It is an error if a field in this list has a
842	// non-empty value. This may be used to include null fields in Patch
843	// requests.
844	NullFields []string `json:"-"`
845}
846
847func (s *GoogleCloudDialogflowV2EntityType) MarshalJSON() ([]byte, error) {
848	type NoMethod GoogleCloudDialogflowV2EntityType
849	raw := NoMethod(*s)
850	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
851}
852
853// GoogleCloudDialogflowV2EntityTypeEntity: An **entity entry** for an
854// associated entity type.
855type GoogleCloudDialogflowV2EntityTypeEntity struct {
856	// Synonyms: Required. A collection of value synonyms. For example, if
857	// the entity type
858	// is *vegetable*, and `value` is *scallions*, a synonym could be
859	// *green
860	// onions*.
861	//
862	// For `KIND_LIST` entity types:
863	//
864	// *   This collection must contain exactly one synonym equal to
865	// `value`.
866	Synonyms []string `json:"synonyms,omitempty"`
867
868	// Value: Required. The primary value associated with this entity
869	// entry.
870	// For example, if the entity type is *vegetable*, the value could
871	// be
872	// *scallions*.
873	//
874	// For `KIND_MAP` entity types:
875	//
876	// *   A reference value to be used in place of synonyms.
877	//
878	// For `KIND_LIST` entity types:
879	//
880	// *   A string that can contain references to other entity types (with
881	// or
882	//     without aliases).
883	Value string `json:"value,omitempty"`
884
885	// ForceSendFields is a list of field names (e.g. "Synonyms") to
886	// unconditionally include in API requests. By default, fields with
887	// empty values are omitted from API requests. However, any non-pointer,
888	// non-interface field appearing in ForceSendFields will be sent to the
889	// server regardless of whether the field is empty or not. This may be
890	// used to include empty fields in Patch requests.
891	ForceSendFields []string `json:"-"`
892
893	// NullFields is a list of field names (e.g. "Synonyms") to include in
894	// API requests with the JSON null value. By default, fields with empty
895	// values are omitted from API requests. However, any field with an
896	// empty value appearing in NullFields will be sent to the server as
897	// null. It is an error if a field in this list has a non-empty value.
898	// This may be used to include null fields in Patch requests.
899	NullFields []string `json:"-"`
900}
901
902func (s *GoogleCloudDialogflowV2EntityTypeEntity) MarshalJSON() ([]byte, error) {
903	type NoMethod GoogleCloudDialogflowV2EntityTypeEntity
904	raw := NoMethod(*s)
905	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
906}
907
908// GoogleCloudDialogflowV2EventInput: Events allow for matching intents
909// by event name instead of the natural
910// language input. For instance, input `<event: { name:
911// "welcome_event",
912// parameters: { name: "Sam" } }>` can trigger a personalized welcome
913// response.
914// The parameter `name` may be used by the agent in the
915// response:
916// "Hello #welcome_event.name! What can I do for you today?".
917type GoogleCloudDialogflowV2EventInput struct {
918	// LanguageCode: Required. The language of this query. See
919	// [Language
920	// Support](https://cloud.google.com/dialogflow/docs/reference/
921	// language)
922	// for a list of the currently supported language codes. Note that
923	// queries in
924	// the same session do not necessarily need to specify the same
925	// language.
926	LanguageCode string `json:"languageCode,omitempty"`
927
928	// Name: Required. The unique identifier of the event.
929	Name string `json:"name,omitempty"`
930
931	// Parameters: The collection of parameters associated with the event.
932	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
933
934	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
935	// unconditionally include in API requests. By default, fields with
936	// empty values are omitted from API requests. However, any non-pointer,
937	// non-interface field appearing in ForceSendFields will be sent to the
938	// server regardless of whether the field is empty or not. This may be
939	// used to include empty fields in Patch requests.
940	ForceSendFields []string `json:"-"`
941
942	// NullFields is a list of field names (e.g. "LanguageCode") to include
943	// in API requests with the JSON null value. By default, fields with
944	// empty values are omitted from API requests. However, any field with
945	// an empty value appearing in NullFields will be sent to the server as
946	// null. It is an error if a field in this list has a non-empty value.
947	// This may be used to include null fields in Patch requests.
948	NullFields []string `json:"-"`
949}
950
951func (s *GoogleCloudDialogflowV2EventInput) MarshalJSON() ([]byte, error) {
952	type NoMethod GoogleCloudDialogflowV2EventInput
953	raw := NoMethod(*s)
954	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
955}
956
957// GoogleCloudDialogflowV2ExportAgentResponse: The response message for
958// Agents.ExportAgent.
959type GoogleCloudDialogflowV2ExportAgentResponse struct {
960	// AgentContent: Zip compressed raw byte content for agent.
961	AgentContent string `json:"agentContent,omitempty"`
962
963	// AgentUri: The URI to a file containing the exported agent. This field
964	// is populated
965	// only if `agent_uri` is specified in `ExportAgentRequest`.
966	AgentUri string `json:"agentUri,omitempty"`
967
968	// ForceSendFields is a list of field names (e.g. "AgentContent") to
969	// unconditionally include in API requests. By default, fields with
970	// empty values are omitted from API requests. However, any non-pointer,
971	// non-interface field appearing in ForceSendFields will be sent to the
972	// server regardless of whether the field is empty or not. This may be
973	// used to include empty fields in Patch requests.
974	ForceSendFields []string `json:"-"`
975
976	// NullFields is a list of field names (e.g. "AgentContent") to include
977	// in API requests with the JSON null value. By default, fields with
978	// empty values are omitted from API requests. However, any field with
979	// an empty value appearing in NullFields will be sent to the server as
980	// null. It is an error if a field in this list has a non-empty value.
981	// This may be used to include null fields in Patch requests.
982	NullFields []string `json:"-"`
983}
984
985func (s *GoogleCloudDialogflowV2ExportAgentResponse) MarshalJSON() ([]byte, error) {
986	type NoMethod GoogleCloudDialogflowV2ExportAgentResponse
987	raw := NoMethod(*s)
988	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
989}
990
991// GoogleCloudDialogflowV2Intent: Represents an intent.
992// Intents convert a number of user expressions or patterns into an
993// action. An
994// action is an extraction of a user command or sentence semantics.
995type GoogleCloudDialogflowV2Intent struct {
996	// Action: Optional. The name of the action associated with the
997	// intent.
998	// Note: The action name must not contain whitespaces.
999	Action string `json:"action,omitempty"`
1000
1001	// DefaultResponsePlatforms: Optional. The list of platforms for which
1002	// the first responses will be
1003	// copied from the messages in PLATFORM_UNSPECIFIED (i.e. default
1004	// platform).
1005	//
1006	// Possible values:
1007	//   "PLATFORM_UNSPECIFIED" - Not specified.
1008	//   "FACEBOOK" - Facebook.
1009	//   "SLACK" - Slack.
1010	//   "TELEGRAM" - Telegram.
1011	//   "KIK" - Kik.
1012	//   "SKYPE" - Skype.
1013	//   "LINE" - Line.
1014	//   "VIBER" - Viber.
1015	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
1016	// When using Actions on Google, you can choose one of the
1017	// specific
1018	// Intent.Message types that mention support for Actions on Google,
1019	// or you can use the advanced Intent.Message.payload field.
1020	// The payload field provides access to AoG features not available in
1021	// the
1022	// specific message types.
1023	// If using the Intent.Message.payload field, it should have a
1024	// structure
1025	// similar to the JSON message shown here. For more information,
1026	// see
1027	// [Actions on Google
1028	// Webhook
1029	// Format](https://developers.google.com/actions/dialogflow/webho
1030	// ok)
1031	// <pre>{
1032	//   "expectUserResponse": true,
1033	//   "isSsml": false,
1034	//   "noInputPrompts": [],
1035	//   "richResponse": {
1036	//     "items": [
1037	//       {
1038	//         "simpleResponse": {
1039	//           "displayText": "hi",
1040	//           "textToSpeech": "hello"
1041	//         }
1042	//       }
1043	//     ],
1044	//     "suggestions": [
1045	//       {
1046	//         "title": "Say this"
1047	//       },
1048	//       {
1049	//         "title": "or this"
1050	//       }
1051	//     ]
1052	//   },
1053	//   "systemIntent": {
1054	//     "data": {
1055	//       "@type":
1056	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
1057	//       "listSelect": {
1058	//         "items": [
1059	//           {
1060	//             "optionInfo": {
1061	//               "key": "key1",
1062	//               "synonyms": [
1063	//                 "key one"
1064	//               ]
1065	//             },
1066	//             "title": "must not be empty, but unique"
1067	//           },
1068	//           {
1069	//             "optionInfo": {
1070	//               "key": "key2",
1071	//               "synonyms": [
1072	//                 "key two"
1073	//               ]
1074	//             },
1075	//             "title": "must not be empty, but unique"
1076	//           }
1077	//         ]
1078	//       }
1079	//     },
1080	//     "intent": "actions.intent.OPTION"
1081	//   }
1082	// }</pre>
1083	//   "GOOGLE_HANGOUTS" - Google Hangouts.
1084	DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"`
1085
1086	// DisplayName: Required. The name of this intent.
1087	DisplayName string `json:"displayName,omitempty"`
1088
1089	// Events: Optional. The collection of event names that trigger the
1090	// intent.
1091	// If the collection of input contexts is not empty, all of the contexts
1092	// must
1093	// be present in the active user session for an event to trigger this
1094	// intent.
1095	Events []string `json:"events,omitempty"`
1096
1097	// FollowupIntentInfo: Read-only. Information about all followup intents
1098	// that have this intent as
1099	// a direct or indirect parent. We populate this field only in the
1100	// output.
1101	FollowupIntentInfo []*GoogleCloudDialogflowV2IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"`
1102
1103	// InputContextNames: Optional. The list of context names required for
1104	// this intent to be
1105	// triggered.
1106	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
1107	// ID>`.
1108	InputContextNames []string `json:"inputContextNames,omitempty"`
1109
1110	// IsFallback: Optional. Indicates whether this is a fallback intent.
1111	IsFallback bool `json:"isFallback,omitempty"`
1112
1113	// Messages: Optional. The collection of rich messages corresponding to
1114	// the
1115	// `Response` field in the Dialogflow console.
1116	Messages []*GoogleCloudDialogflowV2IntentMessage `json:"messages,omitempty"`
1117
1118	// MlDisabled: Optional. Indicates whether Machine Learning is disabled
1119	// for the intent.
1120	// Note: If `ml_disabled` setting is set to true, then this intent is
1121	// not
1122	// taken into account during inference in `ML ONLY` match mode.
1123	// Also,
1124	// auto-markup in the UI is turned off.
1125	MlDisabled bool `json:"mlDisabled,omitempty"`
1126
1127	// Name: The unique identifier of this intent.
1128	// Required for Intents.UpdateIntent and
1129	// Intents.BatchUpdateIntents
1130	// methods.
1131	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
1132	Name string `json:"name,omitempty"`
1133
1134	// OutputContexts: Optional. The collection of contexts that are
1135	// activated when the intent
1136	// is matched. Context messages in this collection should not set
1137	// the
1138	// parameters field. Setting the `lifespan_count` to 0 will reset the
1139	// context
1140	// when the intent is matched.
1141	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
1142	// ID>`.
1143	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
1144
1145	// Parameters: Optional. The collection of parameters associated with
1146	// the intent.
1147	Parameters []*GoogleCloudDialogflowV2IntentParameter `json:"parameters,omitempty"`
1148
1149	// ParentFollowupIntentName: Read-only after creation. The unique
1150	// identifier of the parent intent in the
1151	// chain of followup intents. You can set this field when creating an
1152	// intent,
1153	// for example with CreateIntent or
1154	// BatchUpdateIntents, in order to make this
1155	// intent a followup intent.
1156	//
1157	// It identifies the parent followup intent.
1158	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
1159	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
1160
1161	// Priority: Optional. The priority of this intent. Higher numbers
1162	// represent higher
1163	// priorities.
1164	//
1165	// - If the supplied value is unspecified or 0, the service
1166	//   translates the value to 500,000, which corresponds to the
1167	//   `Normal` priority in the console.
1168	// - If the supplied value is negative, the intent is ignored
1169	//   in runtime detect intent requests.
1170	Priority int64 `json:"priority,omitempty"`
1171
1172	// ResetContexts: Optional. Indicates whether to delete all contexts in
1173	// the current
1174	// session when this intent is matched.
1175	ResetContexts bool `json:"resetContexts,omitempty"`
1176
1177	// RootFollowupIntentName: Read-only. The unique identifier of the root
1178	// intent in the chain of
1179	// followup intents. It identifies the correct followup intents chain
1180	// for
1181	// this intent. We populate this field only in the output.
1182	//
1183	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
1184	RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"`
1185
1186	// TrainingPhrases: Optional. The collection of examples that the agent
1187	// is
1188	// trained on.
1189	TrainingPhrases []*GoogleCloudDialogflowV2IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
1190
1191	// WebhookState: Optional. Indicates whether webhooks are enabled for
1192	// the intent.
1193	//
1194	// Possible values:
1195	//   "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and
1196	// in the intent.
1197	//   "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in
1198	// the intent.
1199	//   "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in
1200	// the agent and in the intent. Also, each slot
1201	// filling prompt is forwarded to the webhook.
1202	WebhookState string `json:"webhookState,omitempty"`
1203
1204	// ForceSendFields is a list of field names (e.g. "Action") to
1205	// unconditionally include in API requests. By default, fields with
1206	// empty values are omitted from API requests. However, any non-pointer,
1207	// non-interface field appearing in ForceSendFields will be sent to the
1208	// server regardless of whether the field is empty or not. This may be
1209	// used to include empty fields in Patch requests.
1210	ForceSendFields []string `json:"-"`
1211
1212	// NullFields is a list of field names (e.g. "Action") to include in API
1213	// requests with the JSON null value. By default, fields with empty
1214	// values are omitted from API requests. However, any field with an
1215	// empty value appearing in NullFields will be sent to the server as
1216	// null. It is an error if a field in this list has a non-empty value.
1217	// This may be used to include null fields in Patch requests.
1218	NullFields []string `json:"-"`
1219}
1220
1221func (s *GoogleCloudDialogflowV2Intent) MarshalJSON() ([]byte, error) {
1222	type NoMethod GoogleCloudDialogflowV2Intent
1223	raw := NoMethod(*s)
1224	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1225}
1226
1227// GoogleCloudDialogflowV2IntentFollowupIntentInfo: Represents a single
1228// followup intent in the chain.
1229type GoogleCloudDialogflowV2IntentFollowupIntentInfo struct {
1230	// FollowupIntentName: The unique identifier of the followup
1231	// intent.
1232	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
1233	FollowupIntentName string `json:"followupIntentName,omitempty"`
1234
1235	// ParentFollowupIntentName: The unique identifier of the followup
1236	// intent's parent.
1237	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
1238	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
1239
1240	// ForceSendFields is a list of field names (e.g. "FollowupIntentName")
1241	// to unconditionally include in API requests. By default, fields with
1242	// empty values are omitted from API requests. However, any non-pointer,
1243	// non-interface field appearing in ForceSendFields will be sent to the
1244	// server regardless of whether the field is empty or not. This may be
1245	// used to include empty fields in Patch requests.
1246	ForceSendFields []string `json:"-"`
1247
1248	// NullFields is a list of field names (e.g. "FollowupIntentName") to
1249	// include in API requests with the JSON null value. By default, fields
1250	// with empty values are omitted from API requests. However, any field
1251	// with an empty value appearing in NullFields will be sent to the
1252	// server as null. It is an error if a field in this list has a
1253	// non-empty value. This may be used to include null fields in Patch
1254	// requests.
1255	NullFields []string `json:"-"`
1256}
1257
1258func (s *GoogleCloudDialogflowV2IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) {
1259	type NoMethod GoogleCloudDialogflowV2IntentFollowupIntentInfo
1260	raw := NoMethod(*s)
1261	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1262}
1263
1264// GoogleCloudDialogflowV2IntentMessage: Corresponds to the `Response`
1265// field in the Dialogflow console.
1266type GoogleCloudDialogflowV2IntentMessage struct {
1267	// BasicCard: The basic card response for Actions on Google.
1268	BasicCard *GoogleCloudDialogflowV2IntentMessageBasicCard `json:"basicCard,omitempty"`
1269
1270	// BrowseCarouselCard: Browse carousel card for Actions on Google.
1271	BrowseCarouselCard *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"`
1272
1273	// Card: The card response.
1274	Card *GoogleCloudDialogflowV2IntentMessageCard `json:"card,omitempty"`
1275
1276	// CarouselSelect: The carousel card response for Actions on Google.
1277	CarouselSelect *GoogleCloudDialogflowV2IntentMessageCarouselSelect `json:"carouselSelect,omitempty"`
1278
1279	// Image: The image response.
1280	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1281
1282	// LinkOutSuggestion: The link out suggestion chip for Actions on
1283	// Google.
1284	LinkOutSuggestion *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"`
1285
1286	// ListSelect: The list card response for Actions on Google.
1287	ListSelect *GoogleCloudDialogflowV2IntentMessageListSelect `json:"listSelect,omitempty"`
1288
1289	// MediaContent: The media content card for Actions on Google.
1290	MediaContent *GoogleCloudDialogflowV2IntentMessageMediaContent `json:"mediaContent,omitempty"`
1291
1292	// Payload: Returns a response containing a custom, platform-specific
1293	// payload.
1294	// See the Intent.Message.Platform type for a description of
1295	// the
1296	// structure that may be required for your platform.
1297	Payload googleapi.RawMessage `json:"payload,omitempty"`
1298
1299	// Platform: Optional. The platform that this message is intended for.
1300	//
1301	// Possible values:
1302	//   "PLATFORM_UNSPECIFIED" - Not specified.
1303	//   "FACEBOOK" - Facebook.
1304	//   "SLACK" - Slack.
1305	//   "TELEGRAM" - Telegram.
1306	//   "KIK" - Kik.
1307	//   "SKYPE" - Skype.
1308	//   "LINE" - Line.
1309	//   "VIBER" - Viber.
1310	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
1311	// When using Actions on Google, you can choose one of the
1312	// specific
1313	// Intent.Message types that mention support for Actions on Google,
1314	// or you can use the advanced Intent.Message.payload field.
1315	// The payload field provides access to AoG features not available in
1316	// the
1317	// specific message types.
1318	// If using the Intent.Message.payload field, it should have a
1319	// structure
1320	// similar to the JSON message shown here. For more information,
1321	// see
1322	// [Actions on Google
1323	// Webhook
1324	// Format](https://developers.google.com/actions/dialogflow/webho
1325	// ok)
1326	// <pre>{
1327	//   "expectUserResponse": true,
1328	//   "isSsml": false,
1329	//   "noInputPrompts": [],
1330	//   "richResponse": {
1331	//     "items": [
1332	//       {
1333	//         "simpleResponse": {
1334	//           "displayText": "hi",
1335	//           "textToSpeech": "hello"
1336	//         }
1337	//       }
1338	//     ],
1339	//     "suggestions": [
1340	//       {
1341	//         "title": "Say this"
1342	//       },
1343	//       {
1344	//         "title": "or this"
1345	//       }
1346	//     ]
1347	//   },
1348	//   "systemIntent": {
1349	//     "data": {
1350	//       "@type":
1351	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
1352	//       "listSelect": {
1353	//         "items": [
1354	//           {
1355	//             "optionInfo": {
1356	//               "key": "key1",
1357	//               "synonyms": [
1358	//                 "key one"
1359	//               ]
1360	//             },
1361	//             "title": "must not be empty, but unique"
1362	//           },
1363	//           {
1364	//             "optionInfo": {
1365	//               "key": "key2",
1366	//               "synonyms": [
1367	//                 "key two"
1368	//               ]
1369	//             },
1370	//             "title": "must not be empty, but unique"
1371	//           }
1372	//         ]
1373	//       }
1374	//     },
1375	//     "intent": "actions.intent.OPTION"
1376	//   }
1377	// }</pre>
1378	//   "GOOGLE_HANGOUTS" - Google Hangouts.
1379	Platform string `json:"platform,omitempty"`
1380
1381	// QuickReplies: The quick replies response.
1382	QuickReplies *GoogleCloudDialogflowV2IntentMessageQuickReplies `json:"quickReplies,omitempty"`
1383
1384	// SimpleResponses: The voice and text-only responses for Actions on
1385	// Google.
1386	SimpleResponses *GoogleCloudDialogflowV2IntentMessageSimpleResponses `json:"simpleResponses,omitempty"`
1387
1388	// Suggestions: The suggestion chips for Actions on Google.
1389	Suggestions *GoogleCloudDialogflowV2IntentMessageSuggestions `json:"suggestions,omitempty"`
1390
1391	// TableCard: Table card for Actions on Google.
1392	TableCard *GoogleCloudDialogflowV2IntentMessageTableCard `json:"tableCard,omitempty"`
1393
1394	// Text: The text response.
1395	Text *GoogleCloudDialogflowV2IntentMessageText `json:"text,omitempty"`
1396
1397	// ForceSendFields is a list of field names (e.g. "BasicCard") to
1398	// unconditionally include in API requests. By default, fields with
1399	// empty values are omitted from API requests. However, any non-pointer,
1400	// non-interface field appearing in ForceSendFields will be sent to the
1401	// server regardless of whether the field is empty or not. This may be
1402	// used to include empty fields in Patch requests.
1403	ForceSendFields []string `json:"-"`
1404
1405	// NullFields is a list of field names (e.g. "BasicCard") to include in
1406	// API requests with the JSON null value. By default, fields with empty
1407	// values are omitted from API requests. However, any field with an
1408	// empty value appearing in NullFields will be sent to the server as
1409	// null. It is an error if a field in this list has a non-empty value.
1410	// This may be used to include null fields in Patch requests.
1411	NullFields []string `json:"-"`
1412}
1413
1414func (s *GoogleCloudDialogflowV2IntentMessage) MarshalJSON() ([]byte, error) {
1415	type NoMethod GoogleCloudDialogflowV2IntentMessage
1416	raw := NoMethod(*s)
1417	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1418}
1419
1420// GoogleCloudDialogflowV2IntentMessageBasicCard: The basic card
1421// message. Useful for displaying information.
1422type GoogleCloudDialogflowV2IntentMessageBasicCard struct {
1423	// Buttons: Optional. The collection of card buttons.
1424	Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"`
1425
1426	// FormattedText: Required, unless image is present. The body text of
1427	// the card.
1428	FormattedText string `json:"formattedText,omitempty"`
1429
1430	// Image: Optional. The image for the card.
1431	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1432
1433	// Subtitle: Optional. The subtitle of the card.
1434	Subtitle string `json:"subtitle,omitempty"`
1435
1436	// Title: Optional. The title of the card.
1437	Title string `json:"title,omitempty"`
1438
1439	// ForceSendFields is a list of field names (e.g. "Buttons") to
1440	// unconditionally include in API requests. By default, fields with
1441	// empty values are omitted from API requests. However, any non-pointer,
1442	// non-interface field appearing in ForceSendFields will be sent to the
1443	// server regardless of whether the field is empty or not. This may be
1444	// used to include empty fields in Patch requests.
1445	ForceSendFields []string `json:"-"`
1446
1447	// NullFields is a list of field names (e.g. "Buttons") to include in
1448	// API requests with the JSON null value. By default, fields with empty
1449	// values are omitted from API requests. However, any field with an
1450	// empty value appearing in NullFields will be sent to the server as
1451	// null. It is an error if a field in this list has a non-empty value.
1452	// This may be used to include null fields in Patch requests.
1453	NullFields []string `json:"-"`
1454}
1455
1456func (s *GoogleCloudDialogflowV2IntentMessageBasicCard) MarshalJSON() ([]byte, error) {
1457	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCard
1458	raw := NoMethod(*s)
1459	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1460}
1461
1462// GoogleCloudDialogflowV2IntentMessageBasicCardButton: The button
1463// object that appears at the bottom of a card.
1464type GoogleCloudDialogflowV2IntentMessageBasicCardButton struct {
1465	// OpenUriAction: Required. Action to take when a user taps on the
1466	// button.
1467	OpenUriAction *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"`
1468
1469	// Title: Required. The title of the button.
1470	Title string `json:"title,omitempty"`
1471
1472	// ForceSendFields is a list of field names (e.g. "OpenUriAction") to
1473	// unconditionally include in API requests. By default, fields with
1474	// empty values are omitted from API requests. However, any non-pointer,
1475	// non-interface field appearing in ForceSendFields will be sent to the
1476	// server regardless of whether the field is empty or not. This may be
1477	// used to include empty fields in Patch requests.
1478	ForceSendFields []string `json:"-"`
1479
1480	// NullFields is a list of field names (e.g. "OpenUriAction") to include
1481	// in API requests with the JSON null value. By default, fields with
1482	// empty values are omitted from API requests. However, any field with
1483	// an empty value appearing in NullFields will be sent to the server as
1484	// null. It is an error if a field in this list has a non-empty value.
1485	// This may be used to include null fields in Patch requests.
1486	NullFields []string `json:"-"`
1487}
1488
1489func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) {
1490	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButton
1491	raw := NoMethod(*s)
1492	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1493}
1494
1495// GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction:
1496// Opens the given URI.
1497type GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction struct {
1498	// Uri: Required. The HTTP or HTTPS scheme URI.
1499	Uri string `json:"uri,omitempty"`
1500
1501	// ForceSendFields is a list of field names (e.g. "Uri") to
1502	// unconditionally include in API requests. By default, fields with
1503	// empty values are omitted from API requests. However, any non-pointer,
1504	// non-interface field appearing in ForceSendFields will be sent to the
1505	// server regardless of whether the field is empty or not. This may be
1506	// used to include empty fields in Patch requests.
1507	ForceSendFields []string `json:"-"`
1508
1509	// NullFields is a list of field names (e.g. "Uri") to include in API
1510	// requests with the JSON null value. By default, fields with empty
1511	// values are omitted from API requests. However, any field with an
1512	// empty value appearing in NullFields will be sent to the server as
1513	// null. It is an error if a field in this list has a non-empty value.
1514	// This may be used to include null fields in Patch requests.
1515	NullFields []string `json:"-"`
1516}
1517
1518func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) {
1519	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
1520	raw := NoMethod(*s)
1521	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1522}
1523
1524// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard: Browse
1525// Carousel Card for Actions on
1526// Google.
1527// https://developers.google.com/actions/assistant/responses#brow
1528// sing_carousel
1529type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard struct {
1530	// ImageDisplayOptions: Optional. Settings for displaying the image.
1531	// Applies to every image in
1532	// items.
1533	//
1534	// Possible values:
1535	//   "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the
1536	// image and the image container with gray
1537	// bars.
1538	//   "GRAY" - Fill the gaps between the image and the image container
1539	// with gray
1540	// bars.
1541	//   "WHITE" - Fill the gaps between the image and the image container
1542	// with white
1543	// bars.
1544	//   "CROPPED" - Image is scaled such that the image width and height
1545	// match or exceed
1546	// the container dimensions. This may crop the top and bottom of
1547	// the
1548	// image if the scaled image height is greater than the
1549	// container
1550	// height, or crop the left and right of the image if the scaled
1551	// image
1552	// width is greater than the container width. This is similar to
1553	// "Zoom
1554	// Mode" on a widescreen TV when playing a 4:3 video.
1555	//   "BLURRED_BACKGROUND" - Pad the gaps between image and image frame
1556	// with a blurred copy of the
1557	// same image.
1558	ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"`
1559
1560	// Items: Required. List of items in the Browse Carousel Card. Minimum
1561	// of two
1562	// items, maximum of ten.
1563	Items []*GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"`
1564
1565	// ForceSendFields is a list of field names (e.g. "ImageDisplayOptions")
1566	// to unconditionally include in API requests. By default, fields with
1567	// empty values are omitted from API requests. However, any non-pointer,
1568	// non-interface field appearing in ForceSendFields will be sent to the
1569	// server regardless of whether the field is empty or not. This may be
1570	// used to include empty fields in Patch requests.
1571	ForceSendFields []string `json:"-"`
1572
1573	// NullFields is a list of field names (e.g. "ImageDisplayOptions") to
1574	// include in API requests with the JSON null value. By default, fields
1575	// with empty values are omitted from API requests. However, any field
1576	// with an empty value appearing in NullFields will be sent to the
1577	// server as null. It is an error if a field in this list has a
1578	// non-empty value. This may be used to include null fields in Patch
1579	// requests.
1580	NullFields []string `json:"-"`
1581}
1582
1583func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) {
1584	type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard
1585	raw := NoMethod(*s)
1586	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1587}
1588
1589// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa
1590// rdItem: Browsing carousel tile
1591type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct {
1592	// Description: Optional. Description of the carousel item. Maximum of
1593	// four lines of
1594	// text.
1595	Description string `json:"description,omitempty"`
1596
1597	// Footer: Optional. Text that appears at the bottom of the Browse
1598	// Carousel
1599	// Card. Maximum of one line of text.
1600	Footer string `json:"footer,omitempty"`
1601
1602	// Image: Optional. Hero image for the carousel item.
1603	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1604
1605	// OpenUriAction: Required. Action to present to the user.
1606	OpenUriAction *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"`
1607
1608	// Title: Required. Title of the carousel item. Maximum of two lines of
1609	// text.
1610	Title string `json:"title,omitempty"`
1611
1612	// ForceSendFields is a list of field names (e.g. "Description") to
1613	// unconditionally include in API requests. By default, fields with
1614	// empty values are omitted from API requests. However, any non-pointer,
1615	// non-interface field appearing in ForceSendFields will be sent to the
1616	// server regardless of whether the field is empty or not. This may be
1617	// used to include empty fields in Patch requests.
1618	ForceSendFields []string `json:"-"`
1619
1620	// NullFields is a list of field names (e.g. "Description") to include
1621	// in API requests with the JSON null value. By default, fields with
1622	// empty values are omitted from API requests. However, any field with
1623	// an empty value appearing in NullFields will be sent to the server as
1624	// null. It is an error if a field in this list has a non-empty value.
1625	// This may be used to include null fields in Patch requests.
1626	NullFields []string `json:"-"`
1627}
1628
1629func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) {
1630	type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem
1631	raw := NoMethod(*s)
1632	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1633}
1634
1635// GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCa
1636// rdItemOpenUrlAction: Actions on Google action to open a given url.
1637type GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct {
1638	// Url: Required. URL
1639	Url string `json:"url,omitempty"`
1640
1641	// UrlTypeHint: Optional. Specifies the type of viewer that is used when
1642	// opening
1643	// the URL. Defaults to opening via web browser.
1644	//
1645	// Possible values:
1646	//   "URL_TYPE_HINT_UNSPECIFIED" - Unspecified
1647	//   "AMP_ACTION" - Url would be an amp action
1648	//   "AMP_CONTENT" - URL that points directly to AMP content, or to a
1649	// canonical URL
1650	// which refers to AMP content via <link rel="amphtml">.
1651	UrlTypeHint string `json:"urlTypeHint,omitempty"`
1652
1653	// ForceSendFields is a list of field names (e.g. "Url") to
1654	// unconditionally include in API requests. By default, fields with
1655	// empty values are omitted from API requests. However, any non-pointer,
1656	// non-interface field appearing in ForceSendFields will be sent to the
1657	// server regardless of whether the field is empty or not. This may be
1658	// used to include empty fields in Patch requests.
1659	ForceSendFields []string `json:"-"`
1660
1661	// NullFields is a list of field names (e.g. "Url") to include in API
1662	// requests with the JSON null value. By default, fields with empty
1663	// values are omitted from API requests. However, any field with an
1664	// empty value appearing in NullFields will be sent to the server as
1665	// null. It is an error if a field in this list has a non-empty value.
1666	// This may be used to include null fields in Patch requests.
1667	NullFields []string `json:"-"`
1668}
1669
1670func (s *GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) {
1671	type NoMethod GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
1672	raw := NoMethod(*s)
1673	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1674}
1675
1676// GoogleCloudDialogflowV2IntentMessageCard: The card response message.
1677type GoogleCloudDialogflowV2IntentMessageCard struct {
1678	// Buttons: Optional. The collection of card buttons.
1679	Buttons []*GoogleCloudDialogflowV2IntentMessageCardButton `json:"buttons,omitempty"`
1680
1681	// ImageUri: Optional. The public URI to an image file for the card.
1682	ImageUri string `json:"imageUri,omitempty"`
1683
1684	// Subtitle: Optional. The subtitle of the card.
1685	Subtitle string `json:"subtitle,omitempty"`
1686
1687	// Title: Optional. The title of the card.
1688	Title string `json:"title,omitempty"`
1689
1690	// ForceSendFields is a list of field names (e.g. "Buttons") to
1691	// unconditionally include in API requests. By default, fields with
1692	// empty values are omitted from API requests. However, any non-pointer,
1693	// non-interface field appearing in ForceSendFields will be sent to the
1694	// server regardless of whether the field is empty or not. This may be
1695	// used to include empty fields in Patch requests.
1696	ForceSendFields []string `json:"-"`
1697
1698	// NullFields is a list of field names (e.g. "Buttons") to include in
1699	// API requests with the JSON null value. By default, fields with empty
1700	// values are omitted from API requests. However, any field with an
1701	// empty value appearing in NullFields will be sent to the server as
1702	// null. It is an error if a field in this list has a non-empty value.
1703	// This may be used to include null fields in Patch requests.
1704	NullFields []string `json:"-"`
1705}
1706
1707func (s *GoogleCloudDialogflowV2IntentMessageCard) MarshalJSON() ([]byte, error) {
1708	type NoMethod GoogleCloudDialogflowV2IntentMessageCard
1709	raw := NoMethod(*s)
1710	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1711}
1712
1713// GoogleCloudDialogflowV2IntentMessageCardButton: Contains information
1714// about a button.
1715type GoogleCloudDialogflowV2IntentMessageCardButton struct {
1716	// Postback: Optional. The text to send back to the Dialogflow API or a
1717	// URI to
1718	// open.
1719	Postback string `json:"postback,omitempty"`
1720
1721	// Text: Optional. The text to show on the button.
1722	Text string `json:"text,omitempty"`
1723
1724	// ForceSendFields is a list of field names (e.g. "Postback") to
1725	// unconditionally include in API requests. By default, fields with
1726	// empty values are omitted from API requests. However, any non-pointer,
1727	// non-interface field appearing in ForceSendFields will be sent to the
1728	// server regardless of whether the field is empty or not. This may be
1729	// used to include empty fields in Patch requests.
1730	ForceSendFields []string `json:"-"`
1731
1732	// NullFields is a list of field names (e.g. "Postback") to include in
1733	// API requests with the JSON null value. By default, fields with empty
1734	// values are omitted from API requests. However, any field with an
1735	// empty value appearing in NullFields will be sent to the server as
1736	// null. It is an error if a field in this list has a non-empty value.
1737	// This may be used to include null fields in Patch requests.
1738	NullFields []string `json:"-"`
1739}
1740
1741func (s *GoogleCloudDialogflowV2IntentMessageCardButton) MarshalJSON() ([]byte, error) {
1742	type NoMethod GoogleCloudDialogflowV2IntentMessageCardButton
1743	raw := NoMethod(*s)
1744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1745}
1746
1747// GoogleCloudDialogflowV2IntentMessageCarouselSelect: The card for
1748// presenting a carousel of options to select from.
1749type GoogleCloudDialogflowV2IntentMessageCarouselSelect struct {
1750	// Items: Required. Carousel items.
1751	Items []*GoogleCloudDialogflowV2IntentMessageCarouselSelectItem `json:"items,omitempty"`
1752
1753	// ForceSendFields is a list of field names (e.g. "Items") to
1754	// unconditionally include in API requests. By default, fields with
1755	// empty values are omitted from API requests. However, any non-pointer,
1756	// non-interface field appearing in ForceSendFields will be sent to the
1757	// server regardless of whether the field is empty or not. This may be
1758	// used to include empty fields in Patch requests.
1759	ForceSendFields []string `json:"-"`
1760
1761	// NullFields is a list of field names (e.g. "Items") to include in API
1762	// requests with the JSON null value. By default, fields with empty
1763	// values are omitted from API requests. However, any field with an
1764	// empty value appearing in NullFields will be sent to the server as
1765	// null. It is an error if a field in this list has a non-empty value.
1766	// This may be used to include null fields in Patch requests.
1767	NullFields []string `json:"-"`
1768}
1769
1770func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) {
1771	type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelect
1772	raw := NoMethod(*s)
1773	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1774}
1775
1776// GoogleCloudDialogflowV2IntentMessageCarouselSelectItem: An item in
1777// the carousel.
1778type GoogleCloudDialogflowV2IntentMessageCarouselSelectItem struct {
1779	// Description: Optional. The body text of the card.
1780	Description string `json:"description,omitempty"`
1781
1782	// Image: Optional. The image to display.
1783	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1784
1785	// Info: Required. Additional info about the option item.
1786	Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"`
1787
1788	// Title: Required. Title of the carousel item.
1789	Title string `json:"title,omitempty"`
1790
1791	// ForceSendFields is a list of field names (e.g. "Description") to
1792	// unconditionally include in API requests. By default, fields with
1793	// empty values are omitted from API requests. However, any non-pointer,
1794	// non-interface field appearing in ForceSendFields will be sent to the
1795	// server regardless of whether the field is empty or not. This may be
1796	// used to include empty fields in Patch requests.
1797	ForceSendFields []string `json:"-"`
1798
1799	// NullFields is a list of field names (e.g. "Description") to include
1800	// in API requests with the JSON null value. By default, fields with
1801	// empty values are omitted from API requests. However, any field with
1802	// an empty value appearing in NullFields will be sent to the server as
1803	// null. It is an error if a field in this list has a non-empty value.
1804	// This may be used to include null fields in Patch requests.
1805	NullFields []string `json:"-"`
1806}
1807
1808func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) {
1809	type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
1810	raw := NoMethod(*s)
1811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1812}
1813
1814// GoogleCloudDialogflowV2IntentMessageColumnProperties: Column
1815// properties for TableCard.
1816type GoogleCloudDialogflowV2IntentMessageColumnProperties struct {
1817	// Header: Required. Column heading.
1818	Header string `json:"header,omitempty"`
1819
1820	// HorizontalAlignment: Optional. Defines text alignment for all cells
1821	// in this column.
1822	//
1823	// Possible values:
1824	//   "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading
1825	// edge of the column.
1826	//   "LEADING" - Text is aligned to the leading edge of the column.
1827	//   "CENTER" - Text is centered in the column.
1828	//   "TRAILING" - Text is aligned to the trailing edge of the column.
1829	HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
1830
1831	// ForceSendFields is a list of field names (e.g. "Header") to
1832	// unconditionally include in API requests. By default, fields with
1833	// empty values are omitted from API requests. However, any non-pointer,
1834	// non-interface field appearing in ForceSendFields will be sent to the
1835	// server regardless of whether the field is empty or not. This may be
1836	// used to include empty fields in Patch requests.
1837	ForceSendFields []string `json:"-"`
1838
1839	// NullFields is a list of field names (e.g. "Header") to include in API
1840	// requests with the JSON null value. By default, fields with empty
1841	// values are omitted from API requests. However, any field with an
1842	// empty value appearing in NullFields will be sent to the server as
1843	// null. It is an error if a field in this list has a non-empty value.
1844	// This may be used to include null fields in Patch requests.
1845	NullFields []string `json:"-"`
1846}
1847
1848func (s *GoogleCloudDialogflowV2IntentMessageColumnProperties) MarshalJSON() ([]byte, error) {
1849	type NoMethod GoogleCloudDialogflowV2IntentMessageColumnProperties
1850	raw := NoMethod(*s)
1851	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1852}
1853
1854// GoogleCloudDialogflowV2IntentMessageImage: The image response
1855// message.
1856type GoogleCloudDialogflowV2IntentMessageImage struct {
1857	// AccessibilityText: Optional. A text description of the image to be
1858	// used for accessibility,
1859	// e.g., screen readers.
1860	AccessibilityText string `json:"accessibilityText,omitempty"`
1861
1862	// ImageUri: Optional. The public URI to an image file.
1863	ImageUri string `json:"imageUri,omitempty"`
1864
1865	// ForceSendFields is a list of field names (e.g. "AccessibilityText")
1866	// to unconditionally include in API requests. By default, fields with
1867	// empty values are omitted from API requests. However, any non-pointer,
1868	// non-interface field appearing in ForceSendFields will be sent to the
1869	// server regardless of whether the field is empty or not. This may be
1870	// used to include empty fields in Patch requests.
1871	ForceSendFields []string `json:"-"`
1872
1873	// NullFields is a list of field names (e.g. "AccessibilityText") to
1874	// include in API requests with the JSON null value. By default, fields
1875	// with empty values are omitted from API requests. However, any field
1876	// with an empty value appearing in NullFields will be sent to the
1877	// server as null. It is an error if a field in this list has a
1878	// non-empty value. This may be used to include null fields in Patch
1879	// requests.
1880	NullFields []string `json:"-"`
1881}
1882
1883func (s *GoogleCloudDialogflowV2IntentMessageImage) MarshalJSON() ([]byte, error) {
1884	type NoMethod GoogleCloudDialogflowV2IntentMessageImage
1885	raw := NoMethod(*s)
1886	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1887}
1888
1889// GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion: The suggestion
1890// chip message that allows the user to jump out to the app
1891// or website associated with this agent.
1892type GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion struct {
1893	// DestinationName: Required. The name of the app or site this chip is
1894	// linking to.
1895	DestinationName string `json:"destinationName,omitempty"`
1896
1897	// Uri: Required. The URI of the app or site to open when the user taps
1898	// the
1899	// suggestion chip.
1900	Uri string `json:"uri,omitempty"`
1901
1902	// ForceSendFields is a list of field names (e.g. "DestinationName") to
1903	// unconditionally include in API requests. By default, fields with
1904	// empty values are omitted from API requests. However, any non-pointer,
1905	// non-interface field appearing in ForceSendFields will be sent to the
1906	// server regardless of whether the field is empty or not. This may be
1907	// used to include empty fields in Patch requests.
1908	ForceSendFields []string `json:"-"`
1909
1910	// NullFields is a list of field names (e.g. "DestinationName") to
1911	// include in API requests with the JSON null value. By default, fields
1912	// with empty values are omitted from API requests. However, any field
1913	// with an empty value appearing in NullFields will be sent to the
1914	// server as null. It is an error if a field in this list has a
1915	// non-empty value. This may be used to include null fields in Patch
1916	// requests.
1917	NullFields []string `json:"-"`
1918}
1919
1920func (s *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) {
1921	type NoMethod GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
1922	raw := NoMethod(*s)
1923	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1924}
1925
1926// GoogleCloudDialogflowV2IntentMessageListSelect: The card for
1927// presenting a list of options to select from.
1928type GoogleCloudDialogflowV2IntentMessageListSelect struct {
1929	// Items: Required. List items.
1930	Items []*GoogleCloudDialogflowV2IntentMessageListSelectItem `json:"items,omitempty"`
1931
1932	// Subtitle: Optional. Subtitle of the list.
1933	Subtitle string `json:"subtitle,omitempty"`
1934
1935	// Title: Optional. The overall title of the list.
1936	Title string `json:"title,omitempty"`
1937
1938	// ForceSendFields is a list of field names (e.g. "Items") to
1939	// unconditionally include in API requests. By default, fields with
1940	// empty values are omitted from API requests. However, any non-pointer,
1941	// non-interface field appearing in ForceSendFields will be sent to the
1942	// server regardless of whether the field is empty or not. This may be
1943	// used to include empty fields in Patch requests.
1944	ForceSendFields []string `json:"-"`
1945
1946	// NullFields is a list of field names (e.g. "Items") to include in API
1947	// requests with the JSON null value. By default, fields with empty
1948	// values are omitted from API requests. However, any field with an
1949	// empty value appearing in NullFields will be sent to the server as
1950	// null. It is an error if a field in this list has a non-empty value.
1951	// This may be used to include null fields in Patch requests.
1952	NullFields []string `json:"-"`
1953}
1954
1955func (s *GoogleCloudDialogflowV2IntentMessageListSelect) MarshalJSON() ([]byte, error) {
1956	type NoMethod GoogleCloudDialogflowV2IntentMessageListSelect
1957	raw := NoMethod(*s)
1958	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1959}
1960
1961// GoogleCloudDialogflowV2IntentMessageListSelectItem: An item in the
1962// list.
1963type GoogleCloudDialogflowV2IntentMessageListSelectItem struct {
1964	// Description: Optional. The main text describing the item.
1965	Description string `json:"description,omitempty"`
1966
1967	// Image: Optional. The image to display.
1968	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1969
1970	// Info: Required. Additional information about this option.
1971	Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"`
1972
1973	// Title: Required. The title of the list item.
1974	Title string `json:"title,omitempty"`
1975
1976	// ForceSendFields is a list of field names (e.g. "Description") to
1977	// unconditionally include in API requests. By default, fields with
1978	// empty values are omitted from API requests. However, any non-pointer,
1979	// non-interface field appearing in ForceSendFields will be sent to the
1980	// server regardless of whether the field is empty or not. This may be
1981	// used to include empty fields in Patch requests.
1982	ForceSendFields []string `json:"-"`
1983
1984	// NullFields is a list of field names (e.g. "Description") to include
1985	// in API requests with the JSON null value. By default, fields with
1986	// empty values are omitted from API requests. However, any field with
1987	// an empty value appearing in NullFields will be sent to the server as
1988	// null. It is an error if a field in this list has a non-empty value.
1989	// This may be used to include null fields in Patch requests.
1990	NullFields []string `json:"-"`
1991}
1992
1993func (s *GoogleCloudDialogflowV2IntentMessageListSelectItem) MarshalJSON() ([]byte, error) {
1994	type NoMethod GoogleCloudDialogflowV2IntentMessageListSelectItem
1995	raw := NoMethod(*s)
1996	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1997}
1998
1999// GoogleCloudDialogflowV2IntentMessageMediaContent: The media content
2000// card for Actions on Google.
2001type GoogleCloudDialogflowV2IntentMessageMediaContent struct {
2002	// MediaObjects: Required. List of media objects.
2003	MediaObjects []*GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"`
2004
2005	// MediaType: Optional. What type of media is the content (ie "audio").
2006	//
2007	// Possible values:
2008	//   "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified.
2009	//   "AUDIO" - Response media type is audio.
2010	MediaType string `json:"mediaType,omitempty"`
2011
2012	// ForceSendFields is a list of field names (e.g. "MediaObjects") to
2013	// unconditionally include in API requests. By default, fields with
2014	// empty values are omitted from API requests. However, any non-pointer,
2015	// non-interface field appearing in ForceSendFields will be sent to the
2016	// server regardless of whether the field is empty or not. This may be
2017	// used to include empty fields in Patch requests.
2018	ForceSendFields []string `json:"-"`
2019
2020	// NullFields is a list of field names (e.g. "MediaObjects") to include
2021	// in API requests with the JSON null value. By default, fields with
2022	// empty values are omitted from API requests. However, any field with
2023	// an empty value appearing in NullFields will be sent to the server as
2024	// null. It is an error if a field in this list has a non-empty value.
2025	// This may be used to include null fields in Patch requests.
2026	NullFields []string `json:"-"`
2027}
2028
2029func (s *GoogleCloudDialogflowV2IntentMessageMediaContent) MarshalJSON() ([]byte, error) {
2030	type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContent
2031	raw := NoMethod(*s)
2032	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2033}
2034
2035// GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject:
2036// Response media object for media content card.
2037type GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject struct {
2038	// ContentUrl: Required. Url where the media is stored.
2039	ContentUrl string `json:"contentUrl,omitempty"`
2040
2041	// Description: Optional. Description of media card.
2042	Description string `json:"description,omitempty"`
2043
2044	// Icon: Optional. Icon to display above media content.
2045	Icon *GoogleCloudDialogflowV2IntentMessageImage `json:"icon,omitempty"`
2046
2047	// LargeImage: Optional. Image to display above media content.
2048	LargeImage *GoogleCloudDialogflowV2IntentMessageImage `json:"largeImage,omitempty"`
2049
2050	// Name: Required. Name of media card.
2051	Name string `json:"name,omitempty"`
2052
2053	// ForceSendFields is a list of field names (e.g. "ContentUrl") to
2054	// unconditionally include in API requests. By default, fields with
2055	// empty values are omitted from API requests. However, any non-pointer,
2056	// non-interface field appearing in ForceSendFields will be sent to the
2057	// server regardless of whether the field is empty or not. This may be
2058	// used to include empty fields in Patch requests.
2059	ForceSendFields []string `json:"-"`
2060
2061	// NullFields is a list of field names (e.g. "ContentUrl") to include in
2062	// API requests with the JSON null value. By default, fields with empty
2063	// values are omitted from API requests. However, any field with an
2064	// empty value appearing in NullFields will be sent to the server as
2065	// null. It is an error if a field in this list has a non-empty value.
2066	// This may be used to include null fields in Patch requests.
2067	NullFields []string `json:"-"`
2068}
2069
2070func (s *GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) {
2071	type NoMethod GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject
2072	raw := NoMethod(*s)
2073	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2074}
2075
2076// GoogleCloudDialogflowV2IntentMessageQuickReplies: The quick replies
2077// response message.
2078type GoogleCloudDialogflowV2IntentMessageQuickReplies struct {
2079	// QuickReplies: Optional. The collection of quick replies.
2080	QuickReplies []string `json:"quickReplies,omitempty"`
2081
2082	// Title: Optional. The title of the collection of quick replies.
2083	Title string `json:"title,omitempty"`
2084
2085	// ForceSendFields is a list of field names (e.g. "QuickReplies") to
2086	// unconditionally include in API requests. By default, fields with
2087	// empty values are omitted from API requests. However, any non-pointer,
2088	// non-interface field appearing in ForceSendFields will be sent to the
2089	// server regardless of whether the field is empty or not. This may be
2090	// used to include empty fields in Patch requests.
2091	ForceSendFields []string `json:"-"`
2092
2093	// NullFields is a list of field names (e.g. "QuickReplies") to include
2094	// in API requests with the JSON null value. By default, fields with
2095	// empty values are omitted from API requests. However, any field with
2096	// an empty value appearing in NullFields will be sent to the server as
2097	// null. It is an error if a field in this list has a non-empty value.
2098	// This may be used to include null fields in Patch requests.
2099	NullFields []string `json:"-"`
2100}
2101
2102func (s *GoogleCloudDialogflowV2IntentMessageQuickReplies) MarshalJSON() ([]byte, error) {
2103	type NoMethod GoogleCloudDialogflowV2IntentMessageQuickReplies
2104	raw := NoMethod(*s)
2105	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2106}
2107
2108// GoogleCloudDialogflowV2IntentMessageSelectItemInfo: Additional info
2109// about the select item for when it is triggered in a
2110// dialog.
2111type GoogleCloudDialogflowV2IntentMessageSelectItemInfo struct {
2112	// Key: Required. A unique key that will be sent back to the agent if
2113	// this
2114	// response is given.
2115	Key string `json:"key,omitempty"`
2116
2117	// Synonyms: Optional. A list of synonyms that can also be used to
2118	// trigger this
2119	// item in dialog.
2120	Synonyms []string `json:"synonyms,omitempty"`
2121
2122	// ForceSendFields is a list of field names (e.g. "Key") to
2123	// unconditionally include in API requests. By default, fields with
2124	// empty values are omitted from API requests. However, any non-pointer,
2125	// non-interface field appearing in ForceSendFields will be sent to the
2126	// server regardless of whether the field is empty or not. This may be
2127	// used to include empty fields in Patch requests.
2128	ForceSendFields []string `json:"-"`
2129
2130	// NullFields is a list of field names (e.g. "Key") to include in API
2131	// requests with the JSON null value. By default, fields with empty
2132	// values are omitted from API requests. However, any field with an
2133	// empty value appearing in NullFields will be sent to the server as
2134	// null. It is an error if a field in this list has a non-empty value.
2135	// This may be used to include null fields in Patch requests.
2136	NullFields []string `json:"-"`
2137}
2138
2139func (s *GoogleCloudDialogflowV2IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) {
2140	type NoMethod GoogleCloudDialogflowV2IntentMessageSelectItemInfo
2141	raw := NoMethod(*s)
2142	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2143}
2144
2145// GoogleCloudDialogflowV2IntentMessageSimpleResponse: The simple
2146// response message containing speech or text.
2147type GoogleCloudDialogflowV2IntentMessageSimpleResponse struct {
2148	// DisplayText: Optional. The text to display.
2149	DisplayText string `json:"displayText,omitempty"`
2150
2151	// Ssml: One of text_to_speech or ssml must be provided. Structured
2152	// spoken
2153	// response to the user in the SSML format. Mutually exclusive
2154	// with
2155	// text_to_speech.
2156	Ssml string `json:"ssml,omitempty"`
2157
2158	// TextToSpeech: One of text_to_speech or ssml must be provided. The
2159	// plain text of the
2160	// speech output. Mutually exclusive with ssml.
2161	TextToSpeech string `json:"textToSpeech,omitempty"`
2162
2163	// ForceSendFields is a list of field names (e.g. "DisplayText") to
2164	// unconditionally include in API requests. By default, fields with
2165	// empty values are omitted from API requests. However, any non-pointer,
2166	// non-interface field appearing in ForceSendFields will be sent to the
2167	// server regardless of whether the field is empty or not. This may be
2168	// used to include empty fields in Patch requests.
2169	ForceSendFields []string `json:"-"`
2170
2171	// NullFields is a list of field names (e.g. "DisplayText") to include
2172	// in API requests with the JSON null value. By default, fields with
2173	// empty values are omitted from API requests. However, any field with
2174	// an empty value appearing in NullFields will be sent to the server as
2175	// null. It is an error if a field in this list has a non-empty value.
2176	// This may be used to include null fields in Patch requests.
2177	NullFields []string `json:"-"`
2178}
2179
2180func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) {
2181	type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponse
2182	raw := NoMethod(*s)
2183	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2184}
2185
2186// GoogleCloudDialogflowV2IntentMessageSimpleResponses: The collection
2187// of simple response candidates.
2188// This message in `QueryResult.fulfillment_messages`
2189// and
2190// `WebhookResponse.fulfillment_messages` should contain only
2191// one
2192// `SimpleResponse`.
2193type GoogleCloudDialogflowV2IntentMessageSimpleResponses struct {
2194	// SimpleResponses: Required. The list of simple responses.
2195	SimpleResponses []*GoogleCloudDialogflowV2IntentMessageSimpleResponse `json:"simpleResponses,omitempty"`
2196
2197	// ForceSendFields is a list of field names (e.g. "SimpleResponses") to
2198	// unconditionally include in API requests. By default, fields with
2199	// empty values are omitted from API requests. However, any non-pointer,
2200	// non-interface field appearing in ForceSendFields will be sent to the
2201	// server regardless of whether the field is empty or not. This may be
2202	// used to include empty fields in Patch requests.
2203	ForceSendFields []string `json:"-"`
2204
2205	// NullFields is a list of field names (e.g. "SimpleResponses") to
2206	// include in API requests with the JSON null value. By default, fields
2207	// with empty values are omitted from API requests. However, any field
2208	// with an empty value appearing in NullFields will be sent to the
2209	// server as null. It is an error if a field in this list has a
2210	// non-empty value. This may be used to include null fields in Patch
2211	// requests.
2212	NullFields []string `json:"-"`
2213}
2214
2215func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) {
2216	type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponses
2217	raw := NoMethod(*s)
2218	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2219}
2220
2221// GoogleCloudDialogflowV2IntentMessageSuggestion: The suggestion chip
2222// message that the user can tap to quickly post a reply
2223// to the conversation.
2224type GoogleCloudDialogflowV2IntentMessageSuggestion struct {
2225	// Title: Required. The text shown the in the suggestion chip.
2226	Title string `json:"title,omitempty"`
2227
2228	// ForceSendFields is a list of field names (e.g. "Title") to
2229	// unconditionally include in API requests. By default, fields with
2230	// empty values are omitted from API requests. However, any non-pointer,
2231	// non-interface field appearing in ForceSendFields will be sent to the
2232	// server regardless of whether the field is empty or not. This may be
2233	// used to include empty fields in Patch requests.
2234	ForceSendFields []string `json:"-"`
2235
2236	// NullFields is a list of field names (e.g. "Title") to include in API
2237	// requests with the JSON null value. By default, fields with empty
2238	// values are omitted from API requests. However, any field with an
2239	// empty value appearing in NullFields will be sent to the server as
2240	// null. It is an error if a field in this list has a non-empty value.
2241	// This may be used to include null fields in Patch requests.
2242	NullFields []string `json:"-"`
2243}
2244
2245func (s *GoogleCloudDialogflowV2IntentMessageSuggestion) MarshalJSON() ([]byte, error) {
2246	type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestion
2247	raw := NoMethod(*s)
2248	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2249}
2250
2251// GoogleCloudDialogflowV2IntentMessageSuggestions: The collection of
2252// suggestions.
2253type GoogleCloudDialogflowV2IntentMessageSuggestions struct {
2254	// Suggestions: Required. The list of suggested replies.
2255	Suggestions []*GoogleCloudDialogflowV2IntentMessageSuggestion `json:"suggestions,omitempty"`
2256
2257	// ForceSendFields is a list of field names (e.g. "Suggestions") to
2258	// unconditionally include in API requests. By default, fields with
2259	// empty values are omitted from API requests. However, any non-pointer,
2260	// non-interface field appearing in ForceSendFields will be sent to the
2261	// server regardless of whether the field is empty or not. This may be
2262	// used to include empty fields in Patch requests.
2263	ForceSendFields []string `json:"-"`
2264
2265	// NullFields is a list of field names (e.g. "Suggestions") to include
2266	// in API requests with the JSON null value. By default, fields with
2267	// empty values are omitted from API requests. However, any field with
2268	// an empty value appearing in NullFields will be sent to the server as
2269	// null. It is an error if a field in this list has a non-empty value.
2270	// This may be used to include null fields in Patch requests.
2271	NullFields []string `json:"-"`
2272}
2273
2274func (s *GoogleCloudDialogflowV2IntentMessageSuggestions) MarshalJSON() ([]byte, error) {
2275	type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestions
2276	raw := NoMethod(*s)
2277	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2278}
2279
2280// GoogleCloudDialogflowV2IntentMessageTableCard: Table card for Actions
2281// on Google.
2282type GoogleCloudDialogflowV2IntentMessageTableCard struct {
2283	// Buttons: Optional. List of buttons for the card.
2284	Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"`
2285
2286	// ColumnProperties: Optional. Display properties for the columns in
2287	// this table.
2288	ColumnProperties []*GoogleCloudDialogflowV2IntentMessageColumnProperties `json:"columnProperties,omitempty"`
2289
2290	// Image: Optional. Image which should be displayed on the card.
2291	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
2292
2293	// Rows: Optional. Rows in this table of data.
2294	Rows []*GoogleCloudDialogflowV2IntentMessageTableCardRow `json:"rows,omitempty"`
2295
2296	// Subtitle: Optional. Subtitle to the title.
2297	Subtitle string `json:"subtitle,omitempty"`
2298
2299	// Title: Required. Title of the card.
2300	Title string `json:"title,omitempty"`
2301
2302	// ForceSendFields is a list of field names (e.g. "Buttons") to
2303	// unconditionally include in API requests. By default, fields with
2304	// empty values are omitted from API requests. However, any non-pointer,
2305	// non-interface field appearing in ForceSendFields will be sent to the
2306	// server regardless of whether the field is empty or not. This may be
2307	// used to include empty fields in Patch requests.
2308	ForceSendFields []string `json:"-"`
2309
2310	// NullFields is a list of field names (e.g. "Buttons") to include in
2311	// API requests with the JSON null value. By default, fields with empty
2312	// values are omitted from API requests. However, any field with an
2313	// empty value appearing in NullFields will be sent to the server as
2314	// null. It is an error if a field in this list has a non-empty value.
2315	// This may be used to include null fields in Patch requests.
2316	NullFields []string `json:"-"`
2317}
2318
2319func (s *GoogleCloudDialogflowV2IntentMessageTableCard) MarshalJSON() ([]byte, error) {
2320	type NoMethod GoogleCloudDialogflowV2IntentMessageTableCard
2321	raw := NoMethod(*s)
2322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2323}
2324
2325// GoogleCloudDialogflowV2IntentMessageTableCardCell: Cell of
2326// TableCardRow.
2327type GoogleCloudDialogflowV2IntentMessageTableCardCell struct {
2328	// Text: Required. Text in this cell.
2329	Text string `json:"text,omitempty"`
2330
2331	// ForceSendFields is a list of field names (e.g. "Text") to
2332	// unconditionally include in API requests. By default, fields with
2333	// empty values are omitted from API requests. However, any non-pointer,
2334	// non-interface field appearing in ForceSendFields will be sent to the
2335	// server regardless of whether the field is empty or not. This may be
2336	// used to include empty fields in Patch requests.
2337	ForceSendFields []string `json:"-"`
2338
2339	// NullFields is a list of field names (e.g. "Text") to include in API
2340	// requests with the JSON null value. By default, fields with empty
2341	// values are omitted from API requests. However, any field with an
2342	// empty value appearing in NullFields will be sent to the server as
2343	// null. It is an error if a field in this list has a non-empty value.
2344	// This may be used to include null fields in Patch requests.
2345	NullFields []string `json:"-"`
2346}
2347
2348func (s *GoogleCloudDialogflowV2IntentMessageTableCardCell) MarshalJSON() ([]byte, error) {
2349	type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardCell
2350	raw := NoMethod(*s)
2351	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2352}
2353
2354// GoogleCloudDialogflowV2IntentMessageTableCardRow: Row of TableCard.
2355type GoogleCloudDialogflowV2IntentMessageTableCardRow struct {
2356	// Cells: Optional. List of cells that make up this row.
2357	Cells []*GoogleCloudDialogflowV2IntentMessageTableCardCell `json:"cells,omitempty"`
2358
2359	// DividerAfter: Optional. Whether to add a visual divider after this
2360	// row.
2361	DividerAfter bool `json:"dividerAfter,omitempty"`
2362
2363	// ForceSendFields is a list of field names (e.g. "Cells") to
2364	// unconditionally include in API requests. By default, fields with
2365	// empty values are omitted from API requests. However, any non-pointer,
2366	// non-interface field appearing in ForceSendFields will be sent to the
2367	// server regardless of whether the field is empty or not. This may be
2368	// used to include empty fields in Patch requests.
2369	ForceSendFields []string `json:"-"`
2370
2371	// NullFields is a list of field names (e.g. "Cells") to include in API
2372	// requests with the JSON null value. By default, fields with empty
2373	// values are omitted from API requests. However, any field with an
2374	// empty value appearing in NullFields will be sent to the server as
2375	// null. It is an error if a field in this list has a non-empty value.
2376	// This may be used to include null fields in Patch requests.
2377	NullFields []string `json:"-"`
2378}
2379
2380func (s *GoogleCloudDialogflowV2IntentMessageTableCardRow) MarshalJSON() ([]byte, error) {
2381	type NoMethod GoogleCloudDialogflowV2IntentMessageTableCardRow
2382	raw := NoMethod(*s)
2383	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2384}
2385
2386// GoogleCloudDialogflowV2IntentMessageText: The text response message.
2387type GoogleCloudDialogflowV2IntentMessageText struct {
2388	// Text: Optional. The collection of the agent's responses.
2389	Text []string `json:"text,omitempty"`
2390
2391	// ForceSendFields is a list of field names (e.g. "Text") to
2392	// unconditionally include in API requests. By default, fields with
2393	// empty values are omitted from API requests. However, any non-pointer,
2394	// non-interface field appearing in ForceSendFields will be sent to the
2395	// server regardless of whether the field is empty or not. This may be
2396	// used to include empty fields in Patch requests.
2397	ForceSendFields []string `json:"-"`
2398
2399	// NullFields is a list of field names (e.g. "Text") to include in API
2400	// requests with the JSON null value. By default, fields with empty
2401	// values are omitted from API requests. However, any field with an
2402	// empty value appearing in NullFields will be sent to the server as
2403	// null. It is an error if a field in this list has a non-empty value.
2404	// This may be used to include null fields in Patch requests.
2405	NullFields []string `json:"-"`
2406}
2407
2408func (s *GoogleCloudDialogflowV2IntentMessageText) MarshalJSON() ([]byte, error) {
2409	type NoMethod GoogleCloudDialogflowV2IntentMessageText
2410	raw := NoMethod(*s)
2411	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2412}
2413
2414// GoogleCloudDialogflowV2IntentParameter: Represents intent parameters.
2415type GoogleCloudDialogflowV2IntentParameter struct {
2416	// DefaultValue: Optional. The default value to use when the `value`
2417	// yields an empty
2418	// result.
2419	// Default values can be extracted from contexts by using the
2420	// following
2421	// syntax: `#context_name.parameter_name`.
2422	DefaultValue string `json:"defaultValue,omitempty"`
2423
2424	// DisplayName: Required. The name of the parameter.
2425	DisplayName string `json:"displayName,omitempty"`
2426
2427	// EntityTypeDisplayName: Optional. The name of the entity type,
2428	// prefixed with `@`, that
2429	// describes values of the parameter. If the parameter is
2430	// required, this must be provided.
2431	EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"`
2432
2433	// IsList: Optional. Indicates whether the parameter represents a list
2434	// of values.
2435	IsList bool `json:"isList,omitempty"`
2436
2437	// Mandatory: Optional. Indicates whether the parameter is required.
2438	// That is,
2439	// whether the intent cannot be completed without collecting the
2440	// parameter
2441	// value.
2442	Mandatory bool `json:"mandatory,omitempty"`
2443
2444	// Name: The unique identifier of this parameter.
2445	Name string `json:"name,omitempty"`
2446
2447	// Prompts: Optional. The collection of prompts that the agent can
2448	// present to the
2449	// user in order to collect a value for the parameter.
2450	Prompts []string `json:"prompts,omitempty"`
2451
2452	// Value: Optional. The definition of the parameter value. It can be:
2453	// - a constant string,
2454	// - a parameter value defined as `$parameter_name`,
2455	// - an original parameter value defined as
2456	// `$parameter_name.original`,
2457	// - a parameter value from some context defined as
2458	//   `#context_name.parameter_name`.
2459	Value string `json:"value,omitempty"`
2460
2461	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
2462	// unconditionally include in API requests. By default, fields with
2463	// empty values are omitted from API requests. However, any non-pointer,
2464	// non-interface field appearing in ForceSendFields will be sent to the
2465	// server regardless of whether the field is empty or not. This may be
2466	// used to include empty fields in Patch requests.
2467	ForceSendFields []string `json:"-"`
2468
2469	// NullFields is a list of field names (e.g. "DefaultValue") to include
2470	// in API requests with the JSON null value. By default, fields with
2471	// empty values are omitted from API requests. However, any field with
2472	// an empty value appearing in NullFields will be sent to the server as
2473	// null. It is an error if a field in this list has a non-empty value.
2474	// This may be used to include null fields in Patch requests.
2475	NullFields []string `json:"-"`
2476}
2477
2478func (s *GoogleCloudDialogflowV2IntentParameter) MarshalJSON() ([]byte, error) {
2479	type NoMethod GoogleCloudDialogflowV2IntentParameter
2480	raw := NoMethod(*s)
2481	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2482}
2483
2484// GoogleCloudDialogflowV2IntentTrainingPhrase: Represents an example
2485// that the agent is trained on.
2486type GoogleCloudDialogflowV2IntentTrainingPhrase struct {
2487	// Name: Output only. The unique identifier of this training phrase.
2488	Name string `json:"name,omitempty"`
2489
2490	// Parts: Required. The ordered list of training phrase parts.
2491	// The parts are concatenated in order to form the training
2492	// phrase.
2493	//
2494	// Note: The API does not automatically annotate training phrases like
2495	// the
2496	// Dialogflow Console does.
2497	//
2498	// Note: Do not forget to include whitespace at part boundaries,
2499	// so the training phrase is well formatted when the parts are
2500	// concatenated.
2501	//
2502	// If the training phrase does not need to be annotated with
2503	// parameters,
2504	// you just need a single part with only the Part.text field set.
2505	//
2506	// If you want to annotate the training phrase, you must create
2507	// multiple
2508	// parts, where the fields of each part are populated in one of two
2509	// ways:
2510	//
2511	// -   `Part.text` is set to a part of the phrase that has no
2512	// parameters.
2513	// -   `Part.text` is set to a part of the phrase that you want to
2514	// annotate,
2515	//     and the `entity_type`, `alias`, and `user_defined` fields are
2516	// all
2517	//     set.
2518	Parts []*GoogleCloudDialogflowV2IntentTrainingPhrasePart `json:"parts,omitempty"`
2519
2520	// TimesAddedCount: Optional. Indicates how many times this example was
2521	// added to
2522	// the intent. Each time a developer adds an existing sample by editing
2523	// an
2524	// intent or training, this counter is increased.
2525	TimesAddedCount int64 `json:"timesAddedCount,omitempty"`
2526
2527	// Type: Required. The type of the training phrase.
2528	//
2529	// Possible values:
2530	//   "TYPE_UNSPECIFIED" - Not specified. This value should never be
2531	// used.
2532	//   "EXAMPLE" - Examples do not contain @-prefixed entity type names,
2533	// but example parts
2534	// can be annotated with entity types.
2535	//   "TEMPLATE" - Templates are not annotated with entity types, but
2536	// they can contain
2537	// @-prefixed entity type names as substrings.
2538	// Template mode has been deprecated. Example mode is the only
2539	// supported
2540	// way to create new training phrases. If you have existing
2541	// training
2542	// phrases that you've created in template mode, those will continue
2543	// to
2544	// work.
2545	Type string `json:"type,omitempty"`
2546
2547	// ForceSendFields is a list of field names (e.g. "Name") to
2548	// unconditionally include in API requests. By default, fields with
2549	// empty values are omitted from API requests. However, any non-pointer,
2550	// non-interface field appearing in ForceSendFields will be sent to the
2551	// server regardless of whether the field is empty or not. This may be
2552	// used to include empty fields in Patch requests.
2553	ForceSendFields []string `json:"-"`
2554
2555	// NullFields is a list of field names (e.g. "Name") to include in API
2556	// requests with the JSON null value. By default, fields with empty
2557	// values are omitted from API requests. However, any field with an
2558	// empty value appearing in NullFields will be sent to the server as
2559	// null. It is an error if a field in this list has a non-empty value.
2560	// This may be used to include null fields in Patch requests.
2561	NullFields []string `json:"-"`
2562}
2563
2564func (s *GoogleCloudDialogflowV2IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
2565	type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrase
2566	raw := NoMethod(*s)
2567	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2568}
2569
2570// GoogleCloudDialogflowV2IntentTrainingPhrasePart: Represents a part of
2571// a training phrase.
2572type GoogleCloudDialogflowV2IntentTrainingPhrasePart struct {
2573	// Alias: Optional. The parameter name for the value extracted from
2574	// the
2575	// annotated part of the example.
2576	// This field is required for annotated parts of the training phrase.
2577	Alias string `json:"alias,omitempty"`
2578
2579	// EntityType: Optional. The entity type name prefixed with `@`.
2580	// This field is required for annotated parts of the training phrase.
2581	EntityType string `json:"entityType,omitempty"`
2582
2583	// Text: Required. The text for this part.
2584	Text string `json:"text,omitempty"`
2585
2586	// UserDefined: Optional. Indicates whether the text was manually
2587	// annotated.
2588	// This field is set to true when the Dialogflow Console is used
2589	// to
2590	// manually annotate the part. When creating an annotated part with
2591	// the
2592	// API, you must set this to true.
2593	UserDefined bool `json:"userDefined,omitempty"`
2594
2595	// ForceSendFields is a list of field names (e.g. "Alias") to
2596	// unconditionally include in API requests. By default, fields with
2597	// empty values are omitted from API requests. However, any non-pointer,
2598	// non-interface field appearing in ForceSendFields will be sent to the
2599	// server regardless of whether the field is empty or not. This may be
2600	// used to include empty fields in Patch requests.
2601	ForceSendFields []string `json:"-"`
2602
2603	// NullFields is a list of field names (e.g. "Alias") to include in API
2604	// requests with the JSON null value. By default, fields with empty
2605	// values are omitted from API requests. However, any field with an
2606	// empty value appearing in NullFields will be sent to the server as
2607	// null. It is an error if a field in this list has a non-empty value.
2608	// This may be used to include null fields in Patch requests.
2609	NullFields []string `json:"-"`
2610}
2611
2612func (s *GoogleCloudDialogflowV2IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
2613	type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrasePart
2614	raw := NoMethod(*s)
2615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2616}
2617
2618// GoogleCloudDialogflowV2Message: Represents a message posted into a
2619// conversation.
2620type GoogleCloudDialogflowV2Message struct {
2621	// Content: Required. The message content.
2622	Content string `json:"content,omitempty"`
2623
2624	// CreateTime: Output only. The time when the message was created.
2625	CreateTime string `json:"createTime,omitempty"`
2626
2627	// LanguageCode: Optional. The message language.
2628	// This should be a
2629	// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
2630	// language tag. Example: "en-US".
2631	LanguageCode string `json:"languageCode,omitempty"`
2632
2633	// MessageAnnotation: Output only. The annotation for the message.
2634	MessageAnnotation *GoogleCloudDialogflowV2MessageAnnotation `json:"messageAnnotation,omitempty"`
2635
2636	// Name: The unique identifier of the message.
2637	// Format: `projects/<Project
2638	// ID>/conversations/<Conversation
2639	// ID>/messages/<Message ID>`.
2640	Name string `json:"name,omitempty"`
2641
2642	// Participant: Output only. The participant that sends this message.
2643	Participant string `json:"participant,omitempty"`
2644
2645	// ParticipantRole: Output only. The role of the participant.
2646	//
2647	// Possible values:
2648	//   "ROLE_UNSPECIFIED" - Participant role not set.
2649	//   "HUMAN_AGENT" - Participant is a human agent.
2650	//   "AUTOMATED_AGENT" - Participant is an automated agent, such as a
2651	// Dialogflow agent.
2652	//   "END_USER" - Participant is an end user that has called or chatted
2653	// with
2654	// Dialogflow services.
2655	ParticipantRole string `json:"participantRole,omitempty"`
2656
2657	// ForceSendFields is a list of field names (e.g. "Content") to
2658	// unconditionally include in API requests. By default, fields with
2659	// empty values are omitted from API requests. However, any non-pointer,
2660	// non-interface field appearing in ForceSendFields will be sent to the
2661	// server regardless of whether the field is empty or not. This may be
2662	// used to include empty fields in Patch requests.
2663	ForceSendFields []string `json:"-"`
2664
2665	// NullFields is a list of field names (e.g. "Content") to include in
2666	// API requests with the JSON null value. By default, fields with empty
2667	// values are omitted from API requests. However, any field with an
2668	// empty value appearing in NullFields will be sent to the server as
2669	// null. It is an error if a field in this list has a non-empty value.
2670	// This may be used to include null fields in Patch requests.
2671	NullFields []string `json:"-"`
2672}
2673
2674func (s *GoogleCloudDialogflowV2Message) MarshalJSON() ([]byte, error) {
2675	type NoMethod GoogleCloudDialogflowV2Message
2676	raw := NoMethod(*s)
2677	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2678}
2679
2680// GoogleCloudDialogflowV2MessageAnnotation: Represents the result of
2681// annotation for the message.
2682type GoogleCloudDialogflowV2MessageAnnotation struct {
2683	// ContainEntities: Indicates whether the text message contains
2684	// entities.
2685	ContainEntities bool `json:"containEntities,omitempty"`
2686
2687	// Parts: The collection of annotated message parts ordered by
2688	// their
2689	// position in the message. You can recover the annotated message
2690	// by
2691	// concatenating [AnnotatedMessagePart.text].
2692	Parts []*GoogleCloudDialogflowV2AnnotatedMessagePart `json:"parts,omitempty"`
2693
2694	// ForceSendFields is a list of field names (e.g. "ContainEntities") to
2695	// unconditionally include in API requests. By default, fields with
2696	// empty values are omitted from API requests. However, any non-pointer,
2697	// non-interface field appearing in ForceSendFields will be sent to the
2698	// server regardless of whether the field is empty or not. This may be
2699	// used to include empty fields in Patch requests.
2700	ForceSendFields []string `json:"-"`
2701
2702	// NullFields is a list of field names (e.g. "ContainEntities") to
2703	// include in API requests with the JSON null value. By default, fields
2704	// with empty values are omitted from API requests. However, any field
2705	// with an empty value appearing in NullFields will be sent to the
2706	// server as null. It is an error if a field in this list has a
2707	// non-empty value. This may be used to include null fields in Patch
2708	// requests.
2709	NullFields []string `json:"-"`
2710}
2711
2712func (s *GoogleCloudDialogflowV2MessageAnnotation) MarshalJSON() ([]byte, error) {
2713	type NoMethod GoogleCloudDialogflowV2MessageAnnotation
2714	raw := NoMethod(*s)
2715	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2716}
2717
2718// GoogleCloudDialogflowV2OriginalDetectIntentRequest: Represents the
2719// contents of the original request that was passed to
2720// the `[Streaming]DetectIntent` call.
2721type GoogleCloudDialogflowV2OriginalDetectIntentRequest struct {
2722	// Payload: Optional. This field is set to the value of the
2723	// `QueryParameters.payload`
2724	// field passed in the request. Some integrations that query a
2725	// Dialogflow
2726	// agent may provide additional information in the payload.
2727	//
2728	// In particular for the Telephony Gateway this field has the
2729	// form:
2730	// <pre>{
2731	//  "telephony": {
2732	//    "caller_id": "+18558363987"
2733	//  }
2734	// }</pre>
2735	// Note: The caller ID field (`caller_id`) will be redacted for
2736	// Standard
2737	// Edition agents and populated with the caller ID in
2738	// [E.164
2739	// format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition
2740	// agents.
2741	Payload googleapi.RawMessage `json:"payload,omitempty"`
2742
2743	// Source: The source of this request, e.g., `google`, `facebook`,
2744	// `slack`. It is set
2745	// by Dialogflow-owned servers.
2746	Source string `json:"source,omitempty"`
2747
2748	// Version: Optional. The version of the protocol used for this
2749	// request.
2750	// This field is AoG-specific.
2751	Version string `json:"version,omitempty"`
2752
2753	// ForceSendFields is a list of field names (e.g. "Payload") to
2754	// unconditionally include in API requests. By default, fields with
2755	// empty values are omitted from API requests. However, any non-pointer,
2756	// non-interface field appearing in ForceSendFields will be sent to the
2757	// server regardless of whether the field is empty or not. This may be
2758	// used to include empty fields in Patch requests.
2759	ForceSendFields []string `json:"-"`
2760
2761	// NullFields is a list of field names (e.g. "Payload") to include in
2762	// API requests with the JSON null value. By default, fields with empty
2763	// values are omitted from API requests. However, any field with an
2764	// empty value appearing in NullFields will be sent to the server as
2765	// null. It is an error if a field in this list has a non-empty value.
2766	// This may be used to include null fields in Patch requests.
2767	NullFields []string `json:"-"`
2768}
2769
2770func (s *GoogleCloudDialogflowV2OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) {
2771	type NoMethod GoogleCloudDialogflowV2OriginalDetectIntentRequest
2772	raw := NoMethod(*s)
2773	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2774}
2775
2776// GoogleCloudDialogflowV2QueryResult: Represents the result of
2777// conversational query or event processing.
2778type GoogleCloudDialogflowV2QueryResult struct {
2779	// Action: The action name from the matched intent.
2780	Action string `json:"action,omitempty"`
2781
2782	// AllRequiredParamsPresent: This field is set to:
2783	//
2784	// - `false` if the matched intent has required parameters and not all
2785	// of
2786	//    the required parameter values have been collected.
2787	// - `true` if all required parameter values have been collected, or if
2788	// the
2789	//    matched intent doesn't contain any required parameters.
2790	AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"`
2791
2792	// DiagnosticInfo: Free-form diagnostic information for the associated
2793	// detect intent request.
2794	// The fields of this data can change without notice, so you should not
2795	// write
2796	// code that depends on its structure.
2797	// The data may contain:
2798	//
2799	// - webhook call latency
2800	// - webhook errors
2801	DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
2802
2803	// FulfillmentMessages: The collection of rich messages to present to
2804	// the user.
2805	FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"`
2806
2807	// FulfillmentText: The text to be pronounced to the user or shown on
2808	// the screen.
2809	// Note: This is a legacy field, `fulfillment_messages` should be
2810	// preferred.
2811	FulfillmentText string `json:"fulfillmentText,omitempty"`
2812
2813	// Intent: The intent that matched the conversational query. Some,
2814	// not
2815	// all fields are filled in this message, including but not limited
2816	// to:
2817	// `name`, `display_name`, `end_interaction` and `is_fallback`.
2818	Intent *GoogleCloudDialogflowV2Intent `json:"intent,omitempty"`
2819
2820	// IntentDetectionConfidence: The intent detection confidence. Values
2821	// range from 0.0
2822	// (completely uncertain) to 1.0 (completely certain).
2823	// This value is for informational purpose only and is only used to
2824	// help match the best intent within the classification threshold.
2825	// This value may change for the same end-user expression at any time
2826	// due to a
2827	// model retraining or change in implementation.
2828	// If there are `multiple knowledge_answers` messages, this value is set
2829	// to
2830	// the greatest `knowledgeAnswers.match_confidence` value in the list.
2831	IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"`
2832
2833	// LanguageCode: The language that was triggered during intent
2834	// detection.
2835	// See
2836	// [Language
2837	// Support](https://cloud.google.com/dialogflow/docs/reference/
2838	// language)
2839	// for a list of the currently supported language codes.
2840	LanguageCode string `json:"languageCode,omitempty"`
2841
2842	// OutputContexts: The collection of output contexts. If
2843	// applicable,
2844	// `output_contexts.parameters` contains entries with name
2845	// `<parameter name>.original` containing the original parameter
2846	// values
2847	// before the query.
2848	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
2849
2850	// Parameters: The collection of extracted parameters.
2851	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
2852
2853	// QueryText: The original conversational query text:
2854	//
2855	// - If natural language text was provided as input, `query_text`
2856	// contains
2857	//   a copy of the input.
2858	// - If natural language speech audio was provided as input,
2859	// `query_text`
2860	//   contains the speech recognition result. If speech recognizer
2861	// produced
2862	//   multiple alternatives, a particular one is picked.
2863	// - If automatic spell correction is enabled, `query_text` will contain
2864	// the
2865	//   corrected user input.
2866	QueryText string `json:"queryText,omitempty"`
2867
2868	// SentimentAnalysisResult: The sentiment analysis result, which depends
2869	// on the
2870	// `sentiment_analysis_request_config` specified in the request.
2871	SentimentAnalysisResult *GoogleCloudDialogflowV2SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"`
2872
2873	// SpeechRecognitionConfidence: The Speech recognition confidence
2874	// between 0.0 and 1.0. A higher number
2875	// indicates an estimated greater likelihood that the recognized words
2876	// are
2877	// correct. The default of 0.0 is a sentinel value indicating that
2878	// confidence
2879	// was not set.
2880	//
2881	// This field is not guaranteed to be accurate or set. In particular
2882	// this
2883	// field isn't set for StreamingDetectIntent since the streaming
2884	// endpoint has
2885	// separate confidence estimates per portion of the audio
2886	// in
2887	// StreamingRecognitionResult.
2888	SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"`
2889
2890	// WebhookPayload: If the query was fulfilled by a webhook call, this
2891	// field is set to the
2892	// value of the `payload` field returned in the webhook response.
2893	WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"`
2894
2895	// WebhookSource: If the query was fulfilled by a webhook call, this
2896	// field is set to the
2897	// value of the `source` field returned in the webhook response.
2898	WebhookSource string `json:"webhookSource,omitempty"`
2899
2900	// ForceSendFields is a list of field names (e.g. "Action") to
2901	// unconditionally include in API requests. By default, fields with
2902	// empty values are omitted from API requests. However, any non-pointer,
2903	// non-interface field appearing in ForceSendFields will be sent to the
2904	// server regardless of whether the field is empty or not. This may be
2905	// used to include empty fields in Patch requests.
2906	ForceSendFields []string `json:"-"`
2907
2908	// NullFields is a list of field names (e.g. "Action") to include in API
2909	// requests with the JSON null value. By default, fields with empty
2910	// values are omitted from API requests. However, any field with an
2911	// empty value appearing in NullFields will be sent to the server as
2912	// null. It is an error if a field in this list has a non-empty value.
2913	// This may be used to include null fields in Patch requests.
2914	NullFields []string `json:"-"`
2915}
2916
2917func (s *GoogleCloudDialogflowV2QueryResult) MarshalJSON() ([]byte, error) {
2918	type NoMethod GoogleCloudDialogflowV2QueryResult
2919	raw := NoMethod(*s)
2920	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2921}
2922
2923func (s *GoogleCloudDialogflowV2QueryResult) UnmarshalJSON(data []byte) error {
2924	type NoMethod GoogleCloudDialogflowV2QueryResult
2925	var s1 struct {
2926		IntentDetectionConfidence   gensupport.JSONFloat64 `json:"intentDetectionConfidence"`
2927		SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"`
2928		*NoMethod
2929	}
2930	s1.NoMethod = (*NoMethod)(s)
2931	if err := json.Unmarshal(data, &s1); err != nil {
2932		return err
2933	}
2934	s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence)
2935	s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence)
2936	return nil
2937}
2938
2939// GoogleCloudDialogflowV2Sentiment: The sentiment, such as
2940// positive/negative feeling or association, for a unit
2941// of analysis, such as the query text.
2942type GoogleCloudDialogflowV2Sentiment struct {
2943	// Magnitude: A non-negative number in the [0, +inf) range, which
2944	// represents the absolute
2945	// magnitude of sentiment, regardless of score (positive or negative).
2946	Magnitude float64 `json:"magnitude,omitempty"`
2947
2948	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0
2949	// (positive
2950	// sentiment).
2951	Score float64 `json:"score,omitempty"`
2952
2953	// ForceSendFields is a list of field names (e.g. "Magnitude") to
2954	// unconditionally include in API requests. By default, fields with
2955	// empty values are omitted from API requests. However, any non-pointer,
2956	// non-interface field appearing in ForceSendFields will be sent to the
2957	// server regardless of whether the field is empty or not. This may be
2958	// used to include empty fields in Patch requests.
2959	ForceSendFields []string `json:"-"`
2960
2961	// NullFields is a list of field names (e.g. "Magnitude") to include in
2962	// API requests with the JSON null value. By default, fields with empty
2963	// values are omitted from API requests. However, any field with an
2964	// empty value appearing in NullFields will be sent to the server as
2965	// null. It is an error if a field in this list has a non-empty value.
2966	// This may be used to include null fields in Patch requests.
2967	NullFields []string `json:"-"`
2968}
2969
2970func (s *GoogleCloudDialogflowV2Sentiment) MarshalJSON() ([]byte, error) {
2971	type NoMethod GoogleCloudDialogflowV2Sentiment
2972	raw := NoMethod(*s)
2973	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2974}
2975
2976func (s *GoogleCloudDialogflowV2Sentiment) UnmarshalJSON(data []byte) error {
2977	type NoMethod GoogleCloudDialogflowV2Sentiment
2978	var s1 struct {
2979		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
2980		Score     gensupport.JSONFloat64 `json:"score"`
2981		*NoMethod
2982	}
2983	s1.NoMethod = (*NoMethod)(s)
2984	if err := json.Unmarshal(data, &s1); err != nil {
2985		return err
2986	}
2987	s.Magnitude = float64(s1.Magnitude)
2988	s.Score = float64(s1.Score)
2989	return nil
2990}
2991
2992// GoogleCloudDialogflowV2SentimentAnalysisResult: The result of
2993// sentiment analysis as configured
2994// by
2995// `sentiment_analysis_request_config`.
2996type GoogleCloudDialogflowV2SentimentAnalysisResult struct {
2997	// QueryTextSentiment: The sentiment analysis result for `query_text`.
2998	QueryTextSentiment *GoogleCloudDialogflowV2Sentiment `json:"queryTextSentiment,omitempty"`
2999
3000	// ForceSendFields is a list of field names (e.g. "QueryTextSentiment")
3001	// to unconditionally include in API requests. By default, fields with
3002	// empty values are omitted from API requests. However, any non-pointer,
3003	// non-interface field appearing in ForceSendFields will be sent to the
3004	// server regardless of whether the field is empty or not. This may be
3005	// used to include empty fields in Patch requests.
3006	ForceSendFields []string `json:"-"`
3007
3008	// NullFields is a list of field names (e.g. "QueryTextSentiment") to
3009	// include in API requests with the JSON null value. By default, fields
3010	// with empty values are omitted from API requests. However, any field
3011	// with an empty value appearing in NullFields will be sent to the
3012	// server as null. It is an error if a field in this list has a
3013	// non-empty value. This may be used to include null fields in Patch
3014	// requests.
3015	NullFields []string `json:"-"`
3016}
3017
3018func (s *GoogleCloudDialogflowV2SentimentAnalysisResult) MarshalJSON() ([]byte, error) {
3019	type NoMethod GoogleCloudDialogflowV2SentimentAnalysisResult
3020	raw := NoMethod(*s)
3021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3022}
3023
3024// GoogleCloudDialogflowV2SessionEntityType: Represents a session entity
3025// type.
3026//
3027// Extends or replaces a custom entity type at the user session level
3028// (we
3029// refer to the entity types defined at the agent level as "custom
3030// entity
3031// types").
3032//
3033// Note: session entity types apply to all queries, regardless of the
3034// language.
3035type GoogleCloudDialogflowV2SessionEntityType struct {
3036	// Entities: Required. The collection of entities associated with this
3037	// session entity
3038	// type.
3039	Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"`
3040
3041	// EntityOverrideMode: Required. Indicates whether the additional data
3042	// should override or
3043	// supplement the custom entity type definition.
3044	//
3045	// Possible values:
3046	//   "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value
3047	// should be never used.
3048	//   "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session
3049	// entities overrides the collection of entities
3050	// in the corresponding custom entity type.
3051	//   "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session
3052	// entities extends the collection of entities in
3053	// the corresponding custom entity type.
3054	//
3055	// Note: Even in this override mode calls to
3056	// `ListSessionEntityTypes`,
3057	// `GetSessionEntityType`, `CreateSessionEntityType`
3058	// and
3059	// `UpdateSessionEntityType` only return the additional entities added
3060	// in
3061	// this session entity type. If you want to get the supplemented
3062	// list,
3063	// please call EntityTypes.GetEntityType on the custom entity type
3064	// and merge.
3065	EntityOverrideMode string `json:"entityOverrideMode,omitempty"`
3066
3067	// Name: Required. The unique identifier of this session entity type.
3068	// Format:
3069	// `projects/<Project ID>/agent/sessions/<Session
3070	// ID>/entityTypes/<Entity Type
3071	// Display Name>`.
3072	//
3073	// `<Entity Type Display Name>` must be the display name of an existing
3074	// entity
3075	// type in the same agent that will be overridden or supplemented.
3076	Name string `json:"name,omitempty"`
3077
3078	// ForceSendFields is a list of field names (e.g. "Entities") to
3079	// unconditionally include in API requests. By default, fields with
3080	// empty values are omitted from API requests. However, any non-pointer,
3081	// non-interface field appearing in ForceSendFields will be sent to the
3082	// server regardless of whether the field is empty or not. This may be
3083	// used to include empty fields in Patch requests.
3084	ForceSendFields []string `json:"-"`
3085
3086	// NullFields is a list of field names (e.g. "Entities") to include in
3087	// API requests with the JSON null value. By default, fields with empty
3088	// values are omitted from API requests. However, any field with an
3089	// empty value appearing in NullFields will be sent to the server as
3090	// null. It is an error if a field in this list has a non-empty value.
3091	// This may be used to include null fields in Patch requests.
3092	NullFields []string `json:"-"`
3093}
3094
3095func (s *GoogleCloudDialogflowV2SessionEntityType) MarshalJSON() ([]byte, error) {
3096	type NoMethod GoogleCloudDialogflowV2SessionEntityType
3097	raw := NoMethod(*s)
3098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3099}
3100
3101// GoogleCloudDialogflowV2WebhookRequest: The request message for a
3102// webhook call.
3103type GoogleCloudDialogflowV2WebhookRequest struct {
3104	// OriginalDetectIntentRequest: Optional. The contents of the original
3105	// request that was passed to
3106	// `[Streaming]DetectIntent` call.
3107	OriginalDetectIntentRequest *GoogleCloudDialogflowV2OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"`
3108
3109	// QueryResult: The result of the conversational query or event
3110	// processing. Contains the
3111	// same value as `[Streaming]DetectIntentResponse.query_result`.
3112	QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"`
3113
3114	// ResponseId: The unique identifier of the response. Contains the same
3115	// value as
3116	// `[Streaming]DetectIntentResponse.response_id`.
3117	ResponseId string `json:"responseId,omitempty"`
3118
3119	// Session: The unique identifier of detectIntent request session.
3120	// Can be used to identify end-user inside webhook
3121	// implementation.
3122	// Format: `projects/<Project ID>/agent/sessions/<Session ID>`,
3123	// or
3124	// `projects/<Project ID>/agent/environments/<Environment
3125	// ID>/users/<User
3126	// ID>/sessions/<Session ID>`.
3127	Session string `json:"session,omitempty"`
3128
3129	// ForceSendFields is a list of field names (e.g.
3130	// "OriginalDetectIntentRequest") to unconditionally include in API
3131	// requests. By default, fields with empty values are omitted from API
3132	// requests. However, any non-pointer, non-interface field appearing in
3133	// ForceSendFields will be sent to the server regardless of whether the
3134	// field is empty or not. This may be used to include empty fields in
3135	// Patch requests.
3136	ForceSendFields []string `json:"-"`
3137
3138	// NullFields is a list of field names (e.g.
3139	// "OriginalDetectIntentRequest") to include in API requests with the
3140	// JSON null value. By default, fields with empty values are omitted
3141	// from API requests. However, any field with an empty value appearing
3142	// in NullFields will be sent to the server as null. It is an error if a
3143	// field in this list has a non-empty value. This may be used to include
3144	// null fields in Patch requests.
3145	NullFields []string `json:"-"`
3146}
3147
3148func (s *GoogleCloudDialogflowV2WebhookRequest) MarshalJSON() ([]byte, error) {
3149	type NoMethod GoogleCloudDialogflowV2WebhookRequest
3150	raw := NoMethod(*s)
3151	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3152}
3153
3154// GoogleCloudDialogflowV2WebhookResponse: The response message for a
3155// webhook call.
3156//
3157// This response is validated by the Dialogflow server. If validation
3158// fails,
3159// an error will be returned in the QueryResult.diagnostic_info
3160// field.
3161// Setting JSON fields to an empty value with the wrong type is a common
3162// error.
3163// To avoid this error:
3164//
3165// - Use "" for empty strings
3166// - Use `{}` or `null` for empty objects
3167// - Use `[]` or `null` for empty arrays
3168//
3169// For more information, see the
3170// [Protocol Buffers
3171// Language
3172// Guide](https://developers.google.com/protocol-buffers/docs/pr
3173// oto3#json).
3174type GoogleCloudDialogflowV2WebhookResponse struct {
3175	// FollowupEventInput: Optional. Makes the platform immediately invoke
3176	// another `DetectIntent` call
3177	// internally with the specified event as input.
3178	// When this field is set, Dialogflow ignores the
3179	// `fulfillment_text`,
3180	// `fulfillment_messages`, and `payload` fields.
3181	FollowupEventInput *GoogleCloudDialogflowV2EventInput `json:"followupEventInput,omitempty"`
3182
3183	// FulfillmentMessages: Optional. The collection of rich messages to
3184	// present to the user. This
3185	// value is passed directly to `QueryResult.fulfillment_messages`.
3186	FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"`
3187
3188	// FulfillmentText: Optional. The text to be shown on the screen. This
3189	// value is passed directly
3190	// to `QueryResult.fulfillment_text`.
3191	FulfillmentText string `json:"fulfillmentText,omitempty"`
3192
3193	// OutputContexts: Optional. The collection of output contexts. This
3194	// value is passed directly
3195	// to `QueryResult.output_contexts`.
3196	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
3197
3198	// Payload: Optional. This value is passed directly to
3199	// `QueryResult.webhook_payload`.
3200	// See the related `fulfillment_messages[i].payload field`, which may be
3201	// used
3202	// as an alternative to this field.
3203	//
3204	// This field can be used for Actions on Google responses.
3205	// It should have a structure similar to the JSON message shown here.
3206	// For more
3207	// information, see
3208	// [Actions on Google
3209	// Webhook
3210	// Format](https://developers.google.com/actions/dialogflow/webho
3211	// ok)
3212	// <pre>{
3213	//   "google": {
3214	//     "expectUserResponse": true,
3215	//     "richResponse": {
3216	//       "items": [
3217	//         {
3218	//           "simpleResponse": {
3219	//             "textToSpeech": "this is a simple response"
3220	//           }
3221	//         }
3222	//       ]
3223	//     }
3224	//   }
3225	// }</pre>
3226	Payload googleapi.RawMessage `json:"payload,omitempty"`
3227
3228	// SessionEntityTypes: Optional. Additional session entity types to
3229	// replace or extend developer
3230	// entity types with. The entity synonyms apply to all languages and
3231	// persist
3232	// for the session of this query. Setting the session entity types
3233	// inside
3234	// webhook overwrites the session entity types that have been set
3235	// through
3236	// `DetectIntentRequest.query_params.session_entity_types`.
3237	SessionEntityTypes []*GoogleCloudDialogflowV2SessionEntityType `json:"sessionEntityTypes,omitempty"`
3238
3239	// Source: Optional. This value is passed directly to
3240	// `QueryResult.webhook_source`.
3241	Source string `json:"source,omitempty"`
3242
3243	// ForceSendFields is a list of field names (e.g. "FollowupEventInput")
3244	// to unconditionally include in API requests. By default, fields with
3245	// empty values are omitted from API requests. However, any non-pointer,
3246	// non-interface field appearing in ForceSendFields will be sent to the
3247	// server regardless of whether the field is empty or not. This may be
3248	// used to include empty fields in Patch requests.
3249	ForceSendFields []string `json:"-"`
3250
3251	// NullFields is a list of field names (e.g. "FollowupEventInput") to
3252	// include in API requests with the JSON null value. By default, fields
3253	// with empty values are omitted from API requests. However, any field
3254	// with an empty value appearing in NullFields will be sent to the
3255	// server as null. It is an error if a field in this list has a
3256	// non-empty value. This may be used to include null fields in Patch
3257	// requests.
3258	NullFields []string `json:"-"`
3259}
3260
3261func (s *GoogleCloudDialogflowV2WebhookResponse) MarshalJSON() ([]byte, error) {
3262	type NoMethod GoogleCloudDialogflowV2WebhookResponse
3263	raw := NoMethod(*s)
3264	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3265}
3266
3267// GoogleCloudDialogflowV2beta1Agent: Represents a conversational agent.
3268type GoogleCloudDialogflowV2beta1Agent struct {
3269	// ApiVersion: Optional. API version displayed in Dialogflow console. If
3270	// not specified,
3271	// V2 API is assumed. Clients are free to query different service
3272	// endpoints
3273	// for different API versions. However, bots connectors and webhook
3274	// calls will
3275	// follow the specified API version.
3276	//
3277	// Possible values:
3278	//   "API_VERSION_UNSPECIFIED" - Not specified.
3279	//   "API_VERSION_V1" - Legacy V1 API.
3280	//   "API_VERSION_V2" - V2 API.
3281	//   "API_VERSION_V2_BETA_1" - V2beta1 API.
3282	ApiVersion string `json:"apiVersion,omitempty"`
3283
3284	// AvatarUri: Optional. The URI of the agent's avatar.
3285	// Avatars are used throughout the Dialogflow console and in the
3286	// self-hosted
3287	// [Web
3288	// Demo](https://cloud.google.com/dialogflow/docs/integr
3289	// ations/web-demo)
3290	// integration.
3291	AvatarUri string `json:"avatarUri,omitempty"`
3292
3293	// ClassificationThreshold: Optional. To filter out false positive
3294	// results and still get variety in
3295	// matched natural language inputs for your agent, you can tune the
3296	// machine
3297	// learning classification threshold. If the returned score value is
3298	// less than
3299	// the threshold value, then a fallback intent will be triggered or, if
3300	// there
3301	// are no fallback intents defined, no intent will be triggered. The
3302	// score
3303	// values range from 0.0 (completely uncertain) to 1.0 (completely
3304	// certain).
3305	// If set to 0.0, the default of 0.3 is used.
3306	ClassificationThreshold float64 `json:"classificationThreshold,omitempty"`
3307
3308	// DefaultLanguageCode: Required. The default language of the agent as a
3309	// language tag.
3310	// See
3311	// [Language
3312	// Support](https://cloud.google.com/dialogflow/docs/refere
3313	// nce/language)
3314	// for a list of the currently supported language codes. This field
3315	// cannot be
3316	// set by the `Update` method.
3317	DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"`
3318
3319	// Description: Optional. The description of this agent.
3320	// The maximum length is 500 characters. If exceeded, the request is
3321	// rejected.
3322	Description string `json:"description,omitempty"`
3323
3324	// DisplayName: Required. The name of this agent.
3325	DisplayName string `json:"displayName,omitempty"`
3326
3327	// EnableLogging: Optional. Determines whether this agent should log
3328	// conversation queries.
3329	EnableLogging bool `json:"enableLogging,omitempty"`
3330
3331	// MatchMode: Optional. Determines how intents are detected from user
3332	// queries.
3333	//
3334	// Possible values:
3335	//   "MATCH_MODE_UNSPECIFIED" - Not specified.
3336	//   "MATCH_MODE_HYBRID" - Best for agents with a small number of
3337	// examples in intents and/or wide
3338	// use of templates syntax and composite entities.
3339	//   "MATCH_MODE_ML_ONLY" - Can be used for agents with a large number
3340	// of examples in intents,
3341	// especially the ones using @sys.any or very large custom entities.
3342	MatchMode string `json:"matchMode,omitempty"`
3343
3344	// Parent: Required. The project of this agent.
3345	// Format: `projects/<Project ID>`.
3346	Parent string `json:"parent,omitempty"`
3347
3348	// SupportedLanguageCodes: Optional. The list of all languages supported
3349	// by this agent (except for the
3350	// `default_language_code`).
3351	SupportedLanguageCodes []string `json:"supportedLanguageCodes,omitempty"`
3352
3353	// Tier: Optional. The agent tier. If not specified, TIER_STANDARD is
3354	// assumed.
3355	//
3356	// Possible values:
3357	//   "TIER_UNSPECIFIED" - Not specified. This value should never be
3358	// used.
3359	//   "TIER_STANDARD" - Standard tier.
3360	//   "TIER_ENTERPRISE" - Enterprise tier (Essentials).
3361	//   "TIER_ENTERPRISE_PLUS" - Enterprise tier (Plus).
3362	Tier string `json:"tier,omitempty"`
3363
3364	// TimeZone: Required. The time zone of this agent from the
3365	// [time zone database](https://www.iana.org/time-zones),
3366	// e.g.,
3367	// America/New_York, Europe/Paris.
3368	TimeZone string `json:"timeZone,omitempty"`
3369
3370	// ServerResponse contains the HTTP response code and headers from the
3371	// server.
3372	googleapi.ServerResponse `json:"-"`
3373
3374	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
3375	// unconditionally include in API requests. By default, fields with
3376	// empty values are omitted from API requests. However, any non-pointer,
3377	// non-interface field appearing in ForceSendFields will be sent to the
3378	// server regardless of whether the field is empty or not. This may be
3379	// used to include empty fields in Patch requests.
3380	ForceSendFields []string `json:"-"`
3381
3382	// NullFields is a list of field names (e.g. "ApiVersion") to include in
3383	// API requests with the JSON null value. By default, fields with empty
3384	// values are omitted from API requests. However, any field with an
3385	// empty value appearing in NullFields will be sent to the server as
3386	// null. It is an error if a field in this list has a non-empty value.
3387	// This may be used to include null fields in Patch requests.
3388	NullFields []string `json:"-"`
3389}
3390
3391func (s *GoogleCloudDialogflowV2beta1Agent) MarshalJSON() ([]byte, error) {
3392	type NoMethod GoogleCloudDialogflowV2beta1Agent
3393	raw := NoMethod(*s)
3394	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3395}
3396
3397func (s *GoogleCloudDialogflowV2beta1Agent) UnmarshalJSON(data []byte) error {
3398	type NoMethod GoogleCloudDialogflowV2beta1Agent
3399	var s1 struct {
3400		ClassificationThreshold gensupport.JSONFloat64 `json:"classificationThreshold"`
3401		*NoMethod
3402	}
3403	s1.NoMethod = (*NoMethod)(s)
3404	if err := json.Unmarshal(data, &s1); err != nil {
3405		return err
3406	}
3407	s.ClassificationThreshold = float64(s1.ClassificationThreshold)
3408	return nil
3409}
3410
3411// GoogleCloudDialogflowV2beta1AnnotatedConversationDataset: Represents
3412// an annotated conversation dataset.
3413// ConversationDataset can have multiple AnnotatedConversationDataset,
3414// each of
3415// them represents one result from one annotation
3416// task.
3417// AnnotatedConversationDataset can only be generated from annotation
3418// task,
3419// which will be triggered by LabelConversation.
3420type GoogleCloudDialogflowV2beta1AnnotatedConversationDataset struct {
3421	// CompletedExampleCount: Output only. Number of examples that have
3422	// annotations in the annotated
3423	// conversation dataset.
3424	CompletedExampleCount int64 `json:"completedExampleCount,omitempty,string"`
3425
3426	// CreateTime: Output only. Creation time of this annotated conversation
3427	// dataset.
3428	CreateTime string `json:"createTime,omitempty"`
3429
3430	// Description: Optional. The description of the annotated conversation
3431	// dataset.
3432	// Maximum of 10000 bytes.
3433	Description string `json:"description,omitempty"`
3434
3435	// DisplayName: Required. The display name of the annotated conversation
3436	// dataset.
3437	// It's specified when user starts an annotation task. Maximum of 64
3438	// bytes.
3439	DisplayName string `json:"displayName,omitempty"`
3440
3441	// ExampleCount: Output only. Number of examples in the annotated
3442	// conversation dataset.
3443	ExampleCount int64 `json:"exampleCount,omitempty,string"`
3444
3445	// Name: Output only. AnnotatedConversationDataset resource name.
3446	// Format:
3447	// `projects/<Project ID>/conversationDatasets/<Conversation
3448	// Dataset
3449	// ID>/annotatedConversationDatasets/<Annotated Conversation Dataset
3450	// ID>`
3451	Name string `json:"name,omitempty"`
3452
3453	// QuestionTypeName: Output only. Question type name that identifies a
3454	// labeling task.
3455	// A question is a single task that a worker answers. A question type is
3456	// set
3457	// of related questions. Each question belongs to a particular question
3458	// type.
3459	// It can be used in CrowdCompute UI to filter and manage labeling
3460	// tasks.
3461	QuestionTypeName string `json:"questionTypeName,omitempty"`
3462
3463	// ForceSendFields is a list of field names (e.g.
3464	// "CompletedExampleCount") to unconditionally include in API requests.
3465	// By default, fields with empty values are omitted from API requests.
3466	// However, any non-pointer, non-interface field appearing in
3467	// ForceSendFields will be sent to the server regardless of whether the
3468	// field is empty or not. This may be used to include empty fields in
3469	// Patch requests.
3470	ForceSendFields []string `json:"-"`
3471
3472	// NullFields is a list of field names (e.g. "CompletedExampleCount") to
3473	// include in API requests with the JSON null value. By default, fields
3474	// with empty values are omitted from API requests. However, any field
3475	// with an empty value appearing in NullFields will be sent to the
3476	// server as null. It is an error if a field in this list has a
3477	// non-empty value. This may be used to include null fields in Patch
3478	// requests.
3479	NullFields []string `json:"-"`
3480}
3481
3482func (s *GoogleCloudDialogflowV2beta1AnnotatedConversationDataset) MarshalJSON() ([]byte, error) {
3483	type NoMethod GoogleCloudDialogflowV2beta1AnnotatedConversationDataset
3484	raw := NoMethod(*s)
3485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3486}
3487
3488// GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest: The request
3489// message for EntityTypes.BatchCreateEntities.
3490type GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest struct {
3491	// Entities: Required. The entities to create.
3492	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
3493
3494	// LanguageCode: Optional. The language of entity synonyms defined in
3495	// `entities`. If not
3496	// specified, the agent's default language is
3497	// used.
3498	// [Many
3499	// languages](https://cloud.google.com/dialogflow/docs/refere
3500	// nce/language)
3501	// are supported. Note: languages must be enabled in the agent before
3502	// they can
3503	// be used.
3504	LanguageCode string `json:"languageCode,omitempty"`
3505
3506	// ForceSendFields is a list of field names (e.g. "Entities") to
3507	// unconditionally include in API requests. By default, fields with
3508	// empty values are omitted from API requests. However, any non-pointer,
3509	// non-interface field appearing in ForceSendFields will be sent to the
3510	// server regardless of whether the field is empty or not. This may be
3511	// used to include empty fields in Patch requests.
3512	ForceSendFields []string `json:"-"`
3513
3514	// NullFields is a list of field names (e.g. "Entities") to include in
3515	// API requests with the JSON null value. By default, fields with empty
3516	// values are omitted from API requests. However, any field with an
3517	// empty value appearing in NullFields will be sent to the server as
3518	// null. It is an error if a field in this list has a non-empty value.
3519	// This may be used to include null fields in Patch requests.
3520	NullFields []string `json:"-"`
3521}
3522
3523func (s *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest) MarshalJSON() ([]byte, error) {
3524	type NoMethod GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest
3525	raw := NoMethod(*s)
3526	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3527}
3528
3529// GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest: The request
3530// message for EntityTypes.BatchDeleteEntities.
3531type GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest struct {
3532	// EntityValues: Required. The reference `values` of the entities to
3533	// delete. Note that
3534	// these are not fully-qualified names, i.e. they don't start
3535	// with
3536	// `projects/<Project ID>`.
3537	EntityValues []string `json:"entityValues,omitempty"`
3538
3539	// LanguageCode: Optional. The language of entity synonyms defined in
3540	// `entities`. If not
3541	// specified, the agent's default language is
3542	// used.
3543	// [Many
3544	// languages](https://cloud.google.com/dialogflow/docs/refere
3545	// nce/language)
3546	// are supported. Note: languages must be enabled in the agent before
3547	// they can
3548	// be used.
3549	LanguageCode string `json:"languageCode,omitempty"`
3550
3551	// ForceSendFields is a list of field names (e.g. "EntityValues") to
3552	// unconditionally include in API requests. By default, fields with
3553	// empty values are omitted from API requests. However, any non-pointer,
3554	// non-interface field appearing in ForceSendFields will be sent to the
3555	// server regardless of whether the field is empty or not. This may be
3556	// used to include empty fields in Patch requests.
3557	ForceSendFields []string `json:"-"`
3558
3559	// NullFields is a list of field names (e.g. "EntityValues") to include
3560	// in API requests with the JSON null value. By default, fields with
3561	// empty values are omitted from API requests. However, any field with
3562	// an empty value appearing in NullFields will be sent to the server as
3563	// null. It is an error if a field in this list has a non-empty value.
3564	// This may be used to include null fields in Patch requests.
3565	NullFields []string `json:"-"`
3566}
3567
3568func (s *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest) MarshalJSON() ([]byte, error) {
3569	type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest
3570	raw := NoMethod(*s)
3571	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3572}
3573
3574// GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest: The
3575// request message for EntityTypes.BatchDeleteEntityTypes.
3576type GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest struct {
3577	// EntityTypeNames: Required. The names entity types to delete. All
3578	// names must point to the
3579	// same agent as `parent`.
3580	EntityTypeNames []string `json:"entityTypeNames,omitempty"`
3581
3582	// ForceSendFields is a list of field names (e.g. "EntityTypeNames") to
3583	// unconditionally include in API requests. By default, fields with
3584	// empty values are omitted from API requests. However, any non-pointer,
3585	// non-interface field appearing in ForceSendFields will be sent to the
3586	// server regardless of whether the field is empty or not. This may be
3587	// used to include empty fields in Patch requests.
3588	ForceSendFields []string `json:"-"`
3589
3590	// NullFields is a list of field names (e.g. "EntityTypeNames") to
3591	// include in API requests with the JSON null value. By default, fields
3592	// with empty values are omitted from API requests. However, any field
3593	// with an empty value appearing in NullFields will be sent to the
3594	// server as null. It is an error if a field in this list has a
3595	// non-empty value. This may be used to include null fields in Patch
3596	// requests.
3597	NullFields []string `json:"-"`
3598}
3599
3600func (s *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest) MarshalJSON() ([]byte, error) {
3601	type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest
3602	raw := NoMethod(*s)
3603	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3604}
3605
3606// GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest: The request
3607// message for Intents.BatchDeleteIntents.
3608type GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest struct {
3609	// Intents: Required. The collection of intents to delete. Only intent
3610	// `name` must be
3611	// filled in.
3612	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
3613
3614	// ForceSendFields is a list of field names (e.g. "Intents") to
3615	// unconditionally include in API requests. By default, fields with
3616	// empty values are omitted from API requests. However, any non-pointer,
3617	// non-interface field appearing in ForceSendFields will be sent to the
3618	// server regardless of whether the field is empty or not. This may be
3619	// used to include empty fields in Patch requests.
3620	ForceSendFields []string `json:"-"`
3621
3622	// NullFields is a list of field names (e.g. "Intents") to include in
3623	// API requests with the JSON null value. By default, fields with empty
3624	// values are omitted from API requests. However, any field with an
3625	// empty value appearing in NullFields will be sent to the server as
3626	// null. It is an error if a field in this list has a non-empty value.
3627	// This may be used to include null fields in Patch requests.
3628	NullFields []string `json:"-"`
3629}
3630
3631func (s *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest) MarshalJSON() ([]byte, error) {
3632	type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest
3633	raw := NoMethod(*s)
3634	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3635}
3636
3637// GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest: The request
3638// message for EntityTypes.BatchUpdateEntities.
3639type GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest struct {
3640	// Entities: Required. The entities to update or create.
3641	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
3642
3643	// LanguageCode: Optional. The language of entity synonyms defined in
3644	// `entities`. If not
3645	// specified, the agent's default language is
3646	// used.
3647	// [Many
3648	// languages](https://cloud.google.com/dialogflow/docs/refere
3649	// nce/language)
3650	// are supported. Note: languages must be enabled in the agent before
3651	// they can
3652	// be used.
3653	LanguageCode string `json:"languageCode,omitempty"`
3654
3655	// UpdateMask: Optional. The mask to control which fields get updated.
3656	UpdateMask string `json:"updateMask,omitempty"`
3657
3658	// ForceSendFields is a list of field names (e.g. "Entities") to
3659	// unconditionally include in API requests. By default, fields with
3660	// empty values are omitted from API requests. However, any non-pointer,
3661	// non-interface field appearing in ForceSendFields will be sent to the
3662	// server regardless of whether the field is empty or not. This may be
3663	// used to include empty fields in Patch requests.
3664	ForceSendFields []string `json:"-"`
3665
3666	// NullFields is a list of field names (e.g. "Entities") to include in
3667	// API requests with the JSON null value. By default, fields with empty
3668	// values are omitted from API requests. However, any field with an
3669	// empty value appearing in NullFields will be sent to the server as
3670	// null. It is an error if a field in this list has a non-empty value.
3671	// This may be used to include null fields in Patch requests.
3672	NullFields []string `json:"-"`
3673}
3674
3675func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest) MarshalJSON() ([]byte, error) {
3676	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest
3677	raw := NoMethod(*s)
3678	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3679}
3680
3681// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest: The
3682// request message for EntityTypes.BatchUpdateEntityTypes.
3683type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest struct {
3684	// EntityTypeBatchInline: The collection of entity types to update or
3685	// create.
3686	EntityTypeBatchInline *GoogleCloudDialogflowV2beta1EntityTypeBatch `json:"entityTypeBatchInline,omitempty"`
3687
3688	// EntityTypeBatchUri: The URI to a Google Cloud Storage file containing
3689	// entity types to update
3690	// or create. The file format can either be a serialized proto
3691	// (of
3692	// EntityBatch type) or a JSON object. Note: The URI must start
3693	// with
3694	// "gs://".
3695	EntityTypeBatchUri string `json:"entityTypeBatchUri,omitempty"`
3696
3697	// LanguageCode: Optional. The language of entity synonyms defined in
3698	// `entity_types`. If not
3699	// specified, the agent's default language is
3700	// used.
3701	// [Many
3702	// languages](https://cloud.google.com/dialogflow/docs/refere
3703	// nce/language)
3704	// are supported. Note: languages must be enabled in the agent before
3705	// they can
3706	// be used.
3707	LanguageCode string `json:"languageCode,omitempty"`
3708
3709	// UpdateMask: Optional. The mask to control which fields get updated.
3710	UpdateMask string `json:"updateMask,omitempty"`
3711
3712	// ForceSendFields is a list of field names (e.g.
3713	// "EntityTypeBatchInline") to unconditionally include in API requests.
3714	// By default, fields with empty values are omitted from API requests.
3715	// However, any non-pointer, non-interface field appearing in
3716	// ForceSendFields will be sent to the server regardless of whether the
3717	// field is empty or not. This may be used to include empty fields in
3718	// Patch requests.
3719	ForceSendFields []string `json:"-"`
3720
3721	// NullFields is a list of field names (e.g. "EntityTypeBatchInline") to
3722	// include in API requests with the JSON null value. By default, fields
3723	// with empty values are omitted from API requests. However, any field
3724	// with an empty value appearing in NullFields will be sent to the
3725	// server as null. It is an error if a field in this list has a
3726	// non-empty value. This may be used to include null fields in Patch
3727	// requests.
3728	NullFields []string `json:"-"`
3729}
3730
3731func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest) MarshalJSON() ([]byte, error) {
3732	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest
3733	raw := NoMethod(*s)
3734	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3735}
3736
3737// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse: The
3738// response message for EntityTypes.BatchUpdateEntityTypes.
3739type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse struct {
3740	// EntityTypes: The collection of updated or created entity types.
3741	EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
3742
3743	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
3744	// unconditionally include in API requests. By default, fields with
3745	// empty values are omitted from API requests. However, any non-pointer,
3746	// non-interface field appearing in ForceSendFields will be sent to the
3747	// server regardless of whether the field is empty or not. This may be
3748	// used to include empty fields in Patch requests.
3749	ForceSendFields []string `json:"-"`
3750
3751	// NullFields is a list of field names (e.g. "EntityTypes") to include
3752	// in API requests with the JSON null value. By default, fields with
3753	// empty values are omitted from API requests. However, any field with
3754	// an empty value appearing in NullFields will be sent to the server as
3755	// null. It is an error if a field in this list has a non-empty value.
3756	// This may be used to include null fields in Patch requests.
3757	NullFields []string `json:"-"`
3758}
3759
3760func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) {
3761	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
3762	raw := NoMethod(*s)
3763	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3764}
3765
3766// GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest: The request
3767// message for Intents.BatchUpdateIntents.
3768type GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest struct {
3769	// IntentBatchInline: The collection of intents to update or create.
3770	IntentBatchInline *GoogleCloudDialogflowV2beta1IntentBatch `json:"intentBatchInline,omitempty"`
3771
3772	// IntentBatchUri: The URI to a Google Cloud Storage file containing
3773	// intents to update or
3774	// create. The file format can either be a serialized proto (of
3775	// IntentBatch
3776	// type) or JSON object. Note: The URI must start with "gs://".
3777	IntentBatchUri string `json:"intentBatchUri,omitempty"`
3778
3779	// IntentView: Optional. The resource view to apply to the returned
3780	// intent.
3781	//
3782	// Possible values:
3783	//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
3784	// in the response.
3785	//   "INTENT_VIEW_FULL" - All fields are populated.
3786	IntentView string `json:"intentView,omitempty"`
3787
3788	// LanguageCode: Optional. The language of training phrases, parameters
3789	// and rich messages
3790	// defined in `intents`. If not specified, the agent's default language
3791	// is
3792	// used.
3793	// [Many
3794	// languages](https://cloud.google.com/dialogflow/docs/reference/la
3795	// nguage)
3796	// are supported. Note: languages must be enabled in the agent before
3797	// they can
3798	// be used.
3799	LanguageCode string `json:"languageCode,omitempty"`
3800
3801	// UpdateMask: Optional. The mask to control which fields get updated.
3802	UpdateMask string `json:"updateMask,omitempty"`
3803
3804	// ForceSendFields is a list of field names (e.g. "IntentBatchInline")
3805	// to unconditionally include in API requests. By default, fields with
3806	// empty values are omitted from API requests. However, any non-pointer,
3807	// non-interface field appearing in ForceSendFields will be sent to the
3808	// server regardless of whether the field is empty or not. This may be
3809	// used to include empty fields in Patch requests.
3810	ForceSendFields []string `json:"-"`
3811
3812	// NullFields is a list of field names (e.g. "IntentBatchInline") to
3813	// include in API requests with the JSON null value. By default, fields
3814	// with empty values are omitted from API requests. However, any field
3815	// with an empty value appearing in NullFields will be sent to the
3816	// server as null. It is an error if a field in this list has a
3817	// non-empty value. This may be used to include null fields in Patch
3818	// requests.
3819	NullFields []string `json:"-"`
3820}
3821
3822func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest) MarshalJSON() ([]byte, error) {
3823	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest
3824	raw := NoMethod(*s)
3825	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3826}
3827
3828// GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse: The response
3829// message for Intents.BatchUpdateIntents.
3830type GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse struct {
3831	// Intents: The collection of updated or created intents.
3832	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
3833
3834	// ForceSendFields is a list of field names (e.g. "Intents") to
3835	// unconditionally include in API requests. By default, fields with
3836	// empty values are omitted from API requests. However, any non-pointer,
3837	// non-interface field appearing in ForceSendFields will be sent to the
3838	// server regardless of whether the field is empty or not. This may be
3839	// used to include empty fields in Patch requests.
3840	ForceSendFields []string `json:"-"`
3841
3842	// NullFields is a list of field names (e.g. "Intents") to include in
3843	// API requests with the JSON null value. By default, fields with empty
3844	// values are omitted from API requests. However, any field with an
3845	// empty value appearing in NullFields will be sent to the server as
3846	// null. It is an error if a field in this list has a non-empty value.
3847	// This may be used to include null fields in Patch requests.
3848	NullFields []string `json:"-"`
3849}
3850
3851func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) {
3852	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
3853	raw := NoMethod(*s)
3854	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3855}
3856
3857// GoogleCloudDialogflowV2beta1Context: Represents a context.
3858type GoogleCloudDialogflowV2beta1Context struct {
3859	// LifespanCount: Optional. The number of conversational query requests
3860	// after which the
3861	// context expires. If set to `0` (the default) the context
3862	// expires
3863	// immediately. Contexts expire automatically after 20 minutes if
3864	// there
3865	// are no matching queries.
3866	LifespanCount int64 `json:"lifespanCount,omitempty"`
3867
3868	// Name: Required. The unique identifier of the context.
3869	// Format:
3870	// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context
3871	// ID>`,
3872	// or `projects/<Project ID>/agent/environments/<Environment
3873	// ID>/users/<User
3874	// ID>/sessions/<Session ID>/contexts/<Context ID>`.
3875	//
3876	// The `Context ID` is always converted to lowercase, may only
3877	// contain
3878	// characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
3879	//
3880	// If `Environment ID` is not specified, we assume default
3881	// 'draft'
3882	// environment. If `User ID` is not specified, we assume default '-'
3883	// user.
3884	//
3885	// The following context names are reserved for internal use by
3886	// Dialogflow.
3887	// You should not use these contexts or create contexts with these
3888	// names:
3889	//
3890	// * `__system_counters__`
3891	// * `*_id_dialog_context`
3892	// * `*_dialog_params_size`
3893	Name string `json:"name,omitempty"`
3894
3895	// Parameters: Optional. The collection of parameters associated with
3896	// this context.
3897	// Refer to
3898	// [this
3899	// doc](https://cloud.google.com/dialogflow/docs/intents-actions-pa
3900	// rameters)
3901	// for syntax.
3902	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
3903
3904	// ServerResponse contains the HTTP response code and headers from the
3905	// server.
3906	googleapi.ServerResponse `json:"-"`
3907
3908	// ForceSendFields is a list of field names (e.g. "LifespanCount") to
3909	// unconditionally include in API requests. By default, fields with
3910	// empty values are omitted from API requests. However, any non-pointer,
3911	// non-interface field appearing in ForceSendFields will be sent to the
3912	// server regardless of whether the field is empty or not. This may be
3913	// used to include empty fields in Patch requests.
3914	ForceSendFields []string `json:"-"`
3915
3916	// NullFields is a list of field names (e.g. "LifespanCount") to include
3917	// in API requests with the JSON null value. By default, fields with
3918	// empty values are omitted from API requests. However, any field with
3919	// an empty value appearing in NullFields will be sent to the server as
3920	// null. It is an error if a field in this list has a non-empty value.
3921	// This may be used to include null fields in Patch requests.
3922	NullFields []string `json:"-"`
3923}
3924
3925func (s *GoogleCloudDialogflowV2beta1Context) MarshalJSON() ([]byte, error) {
3926	type NoMethod GoogleCloudDialogflowV2beta1Context
3927	raw := NoMethod(*s)
3928	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3929}
3930
3931// GoogleCloudDialogflowV2beta1DetectIntentRequest:
3932// ======================================================================
3933// ======
3934// Requests and responses for custom methods.
3935// The request to detect user's intent.
3936type GoogleCloudDialogflowV2beta1DetectIntentRequest struct {
3937	// InputAudio: The natural language speech audio to be processed. This
3938	// field
3939	// should be populated iff `query_input` is set to an input audio
3940	// config.
3941	// A single request can contain up to 1 minute of speech audio data.
3942	InputAudio string `json:"inputAudio,omitempty"`
3943
3944	// OutputAudioConfig: Instructs the speech synthesizer how to generate
3945	// the output
3946	// audio. If this field is not set and agent-level speech synthesizer is
3947	// not
3948	// configured, no output audio is generated.
3949	OutputAudioConfig *GoogleCloudDialogflowV2beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"`
3950
3951	// OutputAudioConfigMask: Mask for output_audio_config indicating which
3952	// settings in this
3953	// request-level config should override speech synthesizer settings
3954	// defined at
3955	// agent-level.
3956	//
3957	// If unspecified or empty, output_audio_config replaces the
3958	// agent-level
3959	// config in its entirety.
3960	OutputAudioConfigMask string `json:"outputAudioConfigMask,omitempty"`
3961
3962	// QueryInput: Required. The input specification. It can be set to:
3963	//
3964	// 1.  an audio config
3965	//     which instructs the speech recognizer how to process the speech
3966	// audio,
3967	//
3968	// 2.  a conversational query in the form of text, or
3969	//
3970	// 3.  an event that specifies which intent to trigger.
3971	QueryInput *GoogleCloudDialogflowV2beta1QueryInput `json:"queryInput,omitempty"`
3972
3973	// QueryParams: The parameters of this query.
3974	QueryParams *GoogleCloudDialogflowV2beta1QueryParameters `json:"queryParams,omitempty"`
3975
3976	// ForceSendFields is a list of field names (e.g. "InputAudio") to
3977	// unconditionally include in API requests. By default, fields with
3978	// empty values are omitted from API requests. However, any non-pointer,
3979	// non-interface field appearing in ForceSendFields will be sent to the
3980	// server regardless of whether the field is empty or not. This may be
3981	// used to include empty fields in Patch requests.
3982	ForceSendFields []string `json:"-"`
3983
3984	// NullFields is a list of field names (e.g. "InputAudio") to include in
3985	// API requests with the JSON null value. By default, fields with empty
3986	// values are omitted from API requests. However, any field with an
3987	// empty value appearing in NullFields will be sent to the server as
3988	// null. It is an error if a field in this list has a non-empty value.
3989	// This may be used to include null fields in Patch requests.
3990	NullFields []string `json:"-"`
3991}
3992
3993func (s *GoogleCloudDialogflowV2beta1DetectIntentRequest) MarshalJSON() ([]byte, error) {
3994	type NoMethod GoogleCloudDialogflowV2beta1DetectIntentRequest
3995	raw := NoMethod(*s)
3996	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3997}
3998
3999// GoogleCloudDialogflowV2beta1DetectIntentResponse: The message
4000// returned from the DetectIntent method.
4001type GoogleCloudDialogflowV2beta1DetectIntentResponse struct {
4002	// AlternativeQueryResults: If Knowledge Connectors are enabled, there
4003	// could be more than one result
4004	// returned for a given query or event, and this field will contain
4005	// all
4006	// results except for the top one, which is captured in query_result.
4007	// The
4008	// alternative results are ordered by
4009	// decreasing
4010	// `QueryResult.intent_detection_confidence`. If Knowledge Connectors
4011	// are
4012	// disabled, this field will be empty until multiple responses for
4013	// regular
4014	// intents are supported, at which point those additional results will
4015	// be
4016	// surfaced here.
4017	AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"`
4018
4019	// OutputAudio: The audio data bytes encoded as specified in the
4020	// request.
4021	// Note: The output audio is generated based on the values of default
4022	// platform
4023	// text responses found in the `query_result.fulfillment_messages`
4024	// field. If
4025	// multiple default text responses exist, they will be concatenated
4026	// when
4027	// generating audio. If no default platform text responses exist,
4028	// the
4029	// generated audio content will be empty.
4030	OutputAudio string `json:"outputAudio,omitempty"`
4031
4032	// OutputAudioConfig: The config used by the speech synthesizer to
4033	// generate the output audio.
4034	OutputAudioConfig *GoogleCloudDialogflowV2beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"`
4035
4036	// QueryResult: The selected results of the conversational query or
4037	// event processing.
4038	// See `alternative_query_results` for additional potential results.
4039	QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"`
4040
4041	// ResponseId: The unique identifier of the response. It can be used
4042	// to
4043	// locate a response in the training example set or for reporting
4044	// issues.
4045	ResponseId string `json:"responseId,omitempty"`
4046
4047	// WebhookStatus: Specifies the status of the webhook request.
4048	WebhookStatus *GoogleRpcStatus `json:"webhookStatus,omitempty"`
4049
4050	// ServerResponse contains the HTTP response code and headers from the
4051	// server.
4052	googleapi.ServerResponse `json:"-"`
4053
4054	// ForceSendFields is a list of field names (e.g.
4055	// "AlternativeQueryResults") to unconditionally include in API
4056	// requests. By default, fields with empty values are omitted from API
4057	// requests. However, any non-pointer, non-interface field appearing in
4058	// ForceSendFields will be sent to the server regardless of whether the
4059	// field is empty or not. This may be used to include empty fields in
4060	// Patch requests.
4061	ForceSendFields []string `json:"-"`
4062
4063	// NullFields is a list of field names (e.g. "AlternativeQueryResults")
4064	// to include in API requests with the JSON null value. By default,
4065	// fields with empty values are omitted from API requests. However, any
4066	// field with an empty value appearing in NullFields will be sent to the
4067	// server as null. It is an error if a field in this list has a
4068	// non-empty value. This may be used to include null fields in Patch
4069	// requests.
4070	NullFields []string `json:"-"`
4071}
4072
4073func (s *GoogleCloudDialogflowV2beta1DetectIntentResponse) MarshalJSON() ([]byte, error) {
4074	type NoMethod GoogleCloudDialogflowV2beta1DetectIntentResponse
4075	raw := NoMethod(*s)
4076	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4077}
4078
4079// GoogleCloudDialogflowV2beta1Document: A document resource.
4080//
4081// Note: The `projects.agent.knowledgeBases.documents` resource is
4082// deprecated;
4083// only use `projects.knowledgeBases.documents`.
4084type GoogleCloudDialogflowV2beta1Document struct {
4085	// Content: The raw content of the document. This field is only
4086	// permitted for
4087	// EXTRACTIVE_QA and FAQ knowledge types.
4088	// Note: This field is in the process of being deprecated, please
4089	// use
4090	// raw_content instead.
4091	Content string `json:"content,omitempty"`
4092
4093	// ContentUri: The URI where the file content is located.
4094	//
4095	// For documents stored in Google Cloud Storage, these URIs must
4096	// have
4097	// the form `gs://<bucket-name>/<object-name>`.
4098	//
4099	// NOTE: External URLs must correspond to public webpages, i.e., they
4100	// must
4101	// be indexed by Google Search. In particular, URLs for showing
4102	// documents in
4103	// Google Cloud Storage (i.e. the URL in your browser) are not
4104	// supported.
4105	// Instead use the `gs://` format URI described above.
4106	ContentUri string `json:"contentUri,omitempty"`
4107
4108	// DisplayName: Required. The display name of the document. The name
4109	// must be 1024 bytes or
4110	// less; otherwise, the creation request fails.
4111	DisplayName string `json:"displayName,omitempty"`
4112
4113	// KnowledgeTypes: Required. The knowledge type of document content.
4114	//
4115	// Possible values:
4116	//   "KNOWLEDGE_TYPE_UNSPECIFIED" - The type is unspecified or
4117	// arbitrary.
4118	//   "FAQ" - The document content contains question and answer pairs as
4119	// either HTML or
4120	// CSV. Typical FAQ HTML formats are parsed accurately, but unusual
4121	// formats
4122	// may fail to be parsed.
4123	//
4124	// CSV must have questions in the first column and answers in the
4125	// second,
4126	// with no header. Because of this explicit format, they are always
4127	// parsed
4128	// accurately.
4129	//   "EXTRACTIVE_QA" - Documents for which unstructured text is
4130	// extracted and used for
4131	// question answering.
4132	KnowledgeTypes []string `json:"knowledgeTypes,omitempty"`
4133
4134	// MimeType: Required. The MIME type of this document.
4135	MimeType string `json:"mimeType,omitempty"`
4136
4137	// Name: The document resource name.
4138	// The name must be empty when creating a document.
4139	// Format: `projects/<Project ID>/knowledgeBases/<Knowledge
4140	// Base
4141	// ID>/documents/<Document ID>`.
4142	Name string `json:"name,omitempty"`
4143
4144	// RawContent: The raw content of the document. This field is only
4145	// permitted for
4146	// EXTRACTIVE_QA and FAQ knowledge types.
4147	RawContent string `json:"rawContent,omitempty"`
4148
4149	// ServerResponse contains the HTTP response code and headers from the
4150	// server.
4151	googleapi.ServerResponse `json:"-"`
4152
4153	// ForceSendFields is a list of field names (e.g. "Content") to
4154	// unconditionally include in API requests. By default, fields with
4155	// empty values are omitted from API requests. However, any non-pointer,
4156	// non-interface field appearing in ForceSendFields will be sent to the
4157	// server regardless of whether the field is empty or not. This may be
4158	// used to include empty fields in Patch requests.
4159	ForceSendFields []string `json:"-"`
4160
4161	// NullFields is a list of field names (e.g. "Content") to include in
4162	// API requests with the JSON null value. By default, fields with empty
4163	// values are omitted from API requests. However, any field with an
4164	// empty value appearing in NullFields will be sent to the server as
4165	// null. It is an error if a field in this list has a non-empty value.
4166	// This may be used to include null fields in Patch requests.
4167	NullFields []string `json:"-"`
4168}
4169
4170func (s *GoogleCloudDialogflowV2beta1Document) MarshalJSON() ([]byte, error) {
4171	type NoMethod GoogleCloudDialogflowV2beta1Document
4172	raw := NoMethod(*s)
4173	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4174}
4175
4176// GoogleCloudDialogflowV2beta1EntityType: Represents an entity
4177// type.
4178// Entity types serve as a tool for extracting parameter values from
4179// natural
4180// language queries.
4181type GoogleCloudDialogflowV2beta1EntityType struct {
4182	// AutoExpansionMode: Optional. Indicates whether the entity type can be
4183	// automatically
4184	// expanded.
4185	//
4186	// Possible values:
4187	//   "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the
4188	// entity.
4189	//   "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values
4190	// that have not been explicitly
4191	// listed in the entity.
4192	AutoExpansionMode string `json:"autoExpansionMode,omitempty"`
4193
4194	// DisplayName: Required. The name of the entity type.
4195	DisplayName string `json:"displayName,omitempty"`
4196
4197	// EnableFuzzyExtraction: Optional. Enables fuzzy entity extraction
4198	// during classification.
4199	EnableFuzzyExtraction bool `json:"enableFuzzyExtraction,omitempty"`
4200
4201	// Entities: Optional. The collection of entity entries associated with
4202	// the entity type.
4203	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
4204
4205	// Kind: Required. Indicates the kind of entity type.
4206	//
4207	// Possible values:
4208	//   "KIND_UNSPECIFIED" - Not specified. This value should be never
4209	// used.
4210	//   "KIND_MAP" - Map entity types allow mapping of a group of synonyms
4211	// to a reference
4212	// value.
4213	//   "KIND_LIST" - List entity types contain a set of entries that do
4214	// not map to reference
4215	// values. However, list entity types can contain references to other
4216	// entity
4217	// types (with or without aliases).
4218	//   "KIND_REGEXP" - Regexp entity types allow to specify regular
4219	// expressions in entries
4220	// values.
4221	Kind string `json:"kind,omitempty"`
4222
4223	// Name: The unique identifier of the entity type.
4224	// Required for EntityTypes.UpdateEntityType
4225	// and
4226	// EntityTypes.BatchUpdateEntityTypes methods.
4227	// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
4228	Name string `json:"name,omitempty"`
4229
4230	// ServerResponse contains the HTTP response code and headers from the
4231	// server.
4232	googleapi.ServerResponse `json:"-"`
4233
4234	// ForceSendFields is a list of field names (e.g. "AutoExpansionMode")
4235	// to unconditionally include in API requests. By default, fields with
4236	// empty values are omitted from API requests. However, any non-pointer,
4237	// non-interface field appearing in ForceSendFields will be sent to the
4238	// server regardless of whether the field is empty or not. This may be
4239	// used to include empty fields in Patch requests.
4240	ForceSendFields []string `json:"-"`
4241
4242	// NullFields is a list of field names (e.g. "AutoExpansionMode") to
4243	// include in API requests with the JSON null value. By default, fields
4244	// with empty values are omitted from API requests. However, any field
4245	// with an empty value appearing in NullFields will be sent to the
4246	// server as null. It is an error if a field in this list has a
4247	// non-empty value. This may be used to include null fields in Patch
4248	// requests.
4249	NullFields []string `json:"-"`
4250}
4251
4252func (s *GoogleCloudDialogflowV2beta1EntityType) MarshalJSON() ([]byte, error) {
4253	type NoMethod GoogleCloudDialogflowV2beta1EntityType
4254	raw := NoMethod(*s)
4255	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4256}
4257
4258// GoogleCloudDialogflowV2beta1EntityTypeBatch: This message is a
4259// wrapper around a collection of entity types.
4260type GoogleCloudDialogflowV2beta1EntityTypeBatch struct {
4261	// EntityTypes: A collection of entity types.
4262	EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
4263
4264	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
4265	// unconditionally include in API requests. By default, fields with
4266	// empty values are omitted from API requests. However, any non-pointer,
4267	// non-interface field appearing in ForceSendFields will be sent to the
4268	// server regardless of whether the field is empty or not. This may be
4269	// used to include empty fields in Patch requests.
4270	ForceSendFields []string `json:"-"`
4271
4272	// NullFields is a list of field names (e.g. "EntityTypes") to include
4273	// in API requests with the JSON null value. By default, fields with
4274	// empty values are omitted from API requests. However, any field with
4275	// an empty value appearing in NullFields will be sent to the server as
4276	// null. It is an error if a field in this list has a non-empty value.
4277	// This may be used to include null fields in Patch requests.
4278	NullFields []string `json:"-"`
4279}
4280
4281func (s *GoogleCloudDialogflowV2beta1EntityTypeBatch) MarshalJSON() ([]byte, error) {
4282	type NoMethod GoogleCloudDialogflowV2beta1EntityTypeBatch
4283	raw := NoMethod(*s)
4284	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4285}
4286
4287// GoogleCloudDialogflowV2beta1EntityTypeEntity: An **entity entry** for
4288// an associated entity type.
4289type GoogleCloudDialogflowV2beta1EntityTypeEntity struct {
4290	// Synonyms: Required. A collection of value synonyms. For example, if
4291	// the entity type
4292	// is *vegetable*, and `value` is *scallions*, a synonym could be
4293	// *green
4294	// onions*.
4295	//
4296	// For `KIND_LIST` entity types:
4297	//
4298	// *   This collection must contain exactly one synonym equal to
4299	// `value`.
4300	Synonyms []string `json:"synonyms,omitempty"`
4301
4302	// Value: Required. The primary value associated with this entity
4303	// entry.
4304	// For example, if the entity type is *vegetable*, the value could
4305	// be
4306	// *scallions*.
4307	//
4308	// For `KIND_MAP` entity types:
4309	//
4310	// *   A reference value to be used in place of synonyms.
4311	//
4312	// For `KIND_LIST` entity types:
4313	//
4314	// *   A string that can contain references to other entity types (with
4315	// or
4316	//     without aliases).
4317	Value string `json:"value,omitempty"`
4318
4319	// ForceSendFields is a list of field names (e.g. "Synonyms") to
4320	// unconditionally include in API requests. By default, fields with
4321	// empty values are omitted from API requests. However, any non-pointer,
4322	// non-interface field appearing in ForceSendFields will be sent to the
4323	// server regardless of whether the field is empty or not. This may be
4324	// used to include empty fields in Patch requests.
4325	ForceSendFields []string `json:"-"`
4326
4327	// NullFields is a list of field names (e.g. "Synonyms") to include in
4328	// API requests with the JSON null value. By default, fields with empty
4329	// values are omitted from API requests. However, any field with an
4330	// empty value appearing in NullFields will be sent to the server as
4331	// null. It is an error if a field in this list has a non-empty value.
4332	// This may be used to include null fields in Patch requests.
4333	NullFields []string `json:"-"`
4334}
4335
4336func (s *GoogleCloudDialogflowV2beta1EntityTypeEntity) MarshalJSON() ([]byte, error) {
4337	type NoMethod GoogleCloudDialogflowV2beta1EntityTypeEntity
4338	raw := NoMethod(*s)
4339	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4340}
4341
4342// GoogleCloudDialogflowV2beta1EventInput: Events allow for matching
4343// intents by event name instead of the natural
4344// language input. For instance, input `<event: { name:
4345// "welcome_event",
4346// parameters: { name: "Sam" } }>` can trigger a personalized welcome
4347// response.
4348// The parameter `name` may be used by the agent in the
4349// response:
4350// "Hello #welcome_event.name! What can I do for you today?".
4351type GoogleCloudDialogflowV2beta1EventInput struct {
4352	// LanguageCode: Required. The language of this query. See
4353	// [Language
4354	// Support](https://cloud.google.com/dialogflow/docs/reference/
4355	// language)
4356	// for a list of the currently supported language codes. Note that
4357	// queries in
4358	// the same session do not necessarily need to specify the same
4359	// language.
4360	LanguageCode string `json:"languageCode,omitempty"`
4361
4362	// Name: Required. The unique identifier of the event.
4363	Name string `json:"name,omitempty"`
4364
4365	// Parameters: The collection of parameters associated with the event.
4366	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
4367
4368	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
4369	// unconditionally include in API requests. By default, fields with
4370	// empty values are omitted from API requests. However, any non-pointer,
4371	// non-interface field appearing in ForceSendFields will be sent to the
4372	// server regardless of whether the field is empty or not. This may be
4373	// used to include empty fields in Patch requests.
4374	ForceSendFields []string `json:"-"`
4375
4376	// NullFields is a list of field names (e.g. "LanguageCode") to include
4377	// in API requests with the JSON null value. By default, fields with
4378	// empty values are omitted from API requests. However, any field with
4379	// an empty value appearing in NullFields will be sent to the server as
4380	// null. It is an error if a field in this list has a non-empty value.
4381	// This may be used to include null fields in Patch requests.
4382	NullFields []string `json:"-"`
4383}
4384
4385func (s *GoogleCloudDialogflowV2beta1EventInput) MarshalJSON() ([]byte, error) {
4386	type NoMethod GoogleCloudDialogflowV2beta1EventInput
4387	raw := NoMethod(*s)
4388	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4389}
4390
4391// GoogleCloudDialogflowV2beta1ExportAgentRequest: The request message
4392// for Agents.ExportAgent.
4393type GoogleCloudDialogflowV2beta1ExportAgentRequest struct {
4394	// AgentUri: Optional. The
4395	// [Google Cloud Storage](https://cloud.google.com/storage/docs/)
4396	// URI to export the agent to.
4397	// The format of this URI must be `gs://<bucket-name>/<object-name>`.
4398	// If left unspecified, the serialized agent is returned inline.
4399	AgentUri string `json:"agentUri,omitempty"`
4400
4401	// ForceSendFields is a list of field names (e.g. "AgentUri") to
4402	// unconditionally include in API requests. By default, fields with
4403	// empty values are omitted from API requests. However, any non-pointer,
4404	// non-interface field appearing in ForceSendFields will be sent to the
4405	// server regardless of whether the field is empty or not. This may be
4406	// used to include empty fields in Patch requests.
4407	ForceSendFields []string `json:"-"`
4408
4409	// NullFields is a list of field names (e.g. "AgentUri") to include in
4410	// API requests with the JSON null value. By default, fields with empty
4411	// values are omitted from API requests. However, any field with an
4412	// empty value appearing in NullFields will be sent to the server as
4413	// null. It is an error if a field in this list has a non-empty value.
4414	// This may be used to include null fields in Patch requests.
4415	NullFields []string `json:"-"`
4416}
4417
4418func (s *GoogleCloudDialogflowV2beta1ExportAgentRequest) MarshalJSON() ([]byte, error) {
4419	type NoMethod GoogleCloudDialogflowV2beta1ExportAgentRequest
4420	raw := NoMethod(*s)
4421	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4422}
4423
4424// GoogleCloudDialogflowV2beta1ExportAgentResponse: The response message
4425// for Agents.ExportAgent.
4426type GoogleCloudDialogflowV2beta1ExportAgentResponse struct {
4427	// AgentContent: Zip compressed raw byte content for agent.
4428	AgentContent string `json:"agentContent,omitempty"`
4429
4430	// AgentUri: The URI to a file containing the exported agent. This field
4431	// is populated
4432	// only if `agent_uri` is specified in `ExportAgentRequest`.
4433	AgentUri string `json:"agentUri,omitempty"`
4434
4435	// ForceSendFields is a list of field names (e.g. "AgentContent") to
4436	// unconditionally include in API requests. By default, fields with
4437	// empty values are omitted from API requests. However, any non-pointer,
4438	// non-interface field appearing in ForceSendFields will be sent to the
4439	// server regardless of whether the field is empty or not. This may be
4440	// used to include empty fields in Patch requests.
4441	ForceSendFields []string `json:"-"`
4442
4443	// NullFields is a list of field names (e.g. "AgentContent") to include
4444	// in API requests with the JSON null value. By default, fields with
4445	// empty values are omitted from API requests. However, any field with
4446	// an empty value appearing in NullFields will be sent to the server as
4447	// null. It is an error if a field in this list has a non-empty value.
4448	// This may be used to include null fields in Patch requests.
4449	NullFields []string `json:"-"`
4450}
4451
4452func (s *GoogleCloudDialogflowV2beta1ExportAgentResponse) MarshalJSON() ([]byte, error) {
4453	type NoMethod GoogleCloudDialogflowV2beta1ExportAgentResponse
4454	raw := NoMethod(*s)
4455	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4456}
4457
4458// GoogleCloudDialogflowV2beta1Fulfillment: Represents a fulfillment.
4459type GoogleCloudDialogflowV2beta1Fulfillment struct {
4460	// DisplayName: Optional. The human-readable name of the fulfillment,
4461	// unique within the agent.
4462	DisplayName string `json:"displayName,omitempty"`
4463
4464	// Enabled: Optional. Whether fulfillment is enabled.
4465	Enabled bool `json:"enabled,omitempty"`
4466
4467	// Features: Optional. The field defines whether the fulfillment is
4468	// enabled for certain features.
4469	Features []*GoogleCloudDialogflowV2beta1FulfillmentFeature `json:"features,omitempty"`
4470
4471	// GenericWebService: Configuration for a generic web service.
4472	GenericWebService *GoogleCloudDialogflowV2beta1FulfillmentGenericWebService `json:"genericWebService,omitempty"`
4473
4474	// Name: Required. The unique identifier of the fulfillment.
4475	// Format: `projects/<Project ID>/agent/fulfillment`.
4476	Name string `json:"name,omitempty"`
4477
4478	// ServerResponse contains the HTTP response code and headers from the
4479	// server.
4480	googleapi.ServerResponse `json:"-"`
4481
4482	// ForceSendFields is a list of field names (e.g. "DisplayName") to
4483	// unconditionally include in API requests. By default, fields with
4484	// empty values are omitted from API requests. However, any non-pointer,
4485	// non-interface field appearing in ForceSendFields will be sent to the
4486	// server regardless of whether the field is empty or not. This may be
4487	// used to include empty fields in Patch requests.
4488	ForceSendFields []string `json:"-"`
4489
4490	// NullFields is a list of field names (e.g. "DisplayName") to include
4491	// in API requests with the JSON null value. By default, fields with
4492	// empty values are omitted from API requests. However, any field with
4493	// an empty value appearing in NullFields will be sent to the server as
4494	// null. It is an error if a field in this list has a non-empty value.
4495	// This may be used to include null fields in Patch requests.
4496	NullFields []string `json:"-"`
4497}
4498
4499func (s *GoogleCloudDialogflowV2beta1Fulfillment) MarshalJSON() ([]byte, error) {
4500	type NoMethod GoogleCloudDialogflowV2beta1Fulfillment
4501	raw := NoMethod(*s)
4502	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4503}
4504
4505// GoogleCloudDialogflowV2beta1FulfillmentFeature: Whether fulfillment
4506// is enabled for the specific feature.
4507type GoogleCloudDialogflowV2beta1FulfillmentFeature struct {
4508	// Type: The type of the feature that enabled for fulfillment.
4509	//
4510	// Possible values:
4511	//   "TYPE_UNSPECIFIED" - Feature type not specified.
4512	//   "SMALLTALK" - Fulfillment is enabled for SmallTalk.
4513	Type string `json:"type,omitempty"`
4514
4515	// ForceSendFields is a list of field names (e.g. "Type") to
4516	// unconditionally include in API requests. By default, fields with
4517	// empty values are omitted from API requests. However, any non-pointer,
4518	// non-interface field appearing in ForceSendFields will be sent to the
4519	// server regardless of whether the field is empty or not. This may be
4520	// used to include empty fields in Patch requests.
4521	ForceSendFields []string `json:"-"`
4522
4523	// NullFields is a list of field names (e.g. "Type") to include in API
4524	// requests with the JSON null value. By default, fields with empty
4525	// values are omitted from API requests. However, any field with an
4526	// empty value appearing in NullFields will be sent to the server as
4527	// null. It is an error if a field in this list has a non-empty value.
4528	// This may be used to include null fields in Patch requests.
4529	NullFields []string `json:"-"`
4530}
4531
4532func (s *GoogleCloudDialogflowV2beta1FulfillmentFeature) MarshalJSON() ([]byte, error) {
4533	type NoMethod GoogleCloudDialogflowV2beta1FulfillmentFeature
4534	raw := NoMethod(*s)
4535	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4536}
4537
4538// GoogleCloudDialogflowV2beta1FulfillmentGenericWebService: Represents
4539// configuration for a generic web service.
4540// Dialogflow supports two mechanisms for authentications:
4541// - Basic authentication with username and password.
4542// - Authentication with additional authentication headers.
4543// More information could be found
4544// at:
4545// https://cloud.google.com/dialogflow/docs/fulfillment-configure.
4546type GoogleCloudDialogflowV2beta1FulfillmentGenericWebService struct {
4547	// IsCloudFunction: Optional. Indicates if generic web service is
4548	// created through Cloud Functions
4549	// integration. Defaults to false.
4550	IsCloudFunction bool `json:"isCloudFunction,omitempty"`
4551
4552	// Password: Optional. The password for HTTP Basic authentication.
4553	Password string `json:"password,omitempty"`
4554
4555	// RequestHeaders: Optional. The HTTP request headers to send together
4556	// with fulfillment requests.
4557	RequestHeaders map[string]string `json:"requestHeaders,omitempty"`
4558
4559	// Uri: Required. The fulfillment URI for receiving POST requests.
4560	Uri string `json:"uri,omitempty"`
4561
4562	// Username: Optional. The user name for HTTP Basic authentication.
4563	Username string `json:"username,omitempty"`
4564
4565	// ForceSendFields is a list of field names (e.g. "IsCloudFunction") to
4566	// unconditionally include in API requests. By default, fields with
4567	// empty values are omitted from API requests. However, any non-pointer,
4568	// non-interface field appearing in ForceSendFields will be sent to the
4569	// server regardless of whether the field is empty or not. This may be
4570	// used to include empty fields in Patch requests.
4571	ForceSendFields []string `json:"-"`
4572
4573	// NullFields is a list of field names (e.g. "IsCloudFunction") to
4574	// include in API requests with the JSON null value. By default, fields
4575	// with empty values are omitted from API requests. However, any field
4576	// with an empty value appearing in NullFields will be sent to the
4577	// server as null. It is an error if a field in this list has a
4578	// non-empty value. This may be used to include null fields in Patch
4579	// requests.
4580	NullFields []string `json:"-"`
4581}
4582
4583func (s *GoogleCloudDialogflowV2beta1FulfillmentGenericWebService) MarshalJSON() ([]byte, error) {
4584	type NoMethod GoogleCloudDialogflowV2beta1FulfillmentGenericWebService
4585	raw := NoMethod(*s)
4586	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4587}
4588
4589// GoogleCloudDialogflowV2beta1GcsSource: Google Cloud Storage location
4590// for single input.
4591type GoogleCloudDialogflowV2beta1GcsSource struct {
4592	// Uri: Required. The Google Cloud Storage URIs for the inputs. A URI is
4593	// of the
4594	// form:
4595	//   gs://bucket/object-prefix-or-name
4596	// Whether a prefix or name is used depends on the use case.
4597	Uri string `json:"uri,omitempty"`
4598
4599	// ForceSendFields is a list of field names (e.g. "Uri") to
4600	// unconditionally include in API requests. By default, fields with
4601	// empty values are omitted from API requests. However, any non-pointer,
4602	// non-interface field appearing in ForceSendFields will be sent to the
4603	// server regardless of whether the field is empty or not. This may be
4604	// used to include empty fields in Patch requests.
4605	ForceSendFields []string `json:"-"`
4606
4607	// NullFields is a list of field names (e.g. "Uri") to include in API
4608	// requests with the JSON null value. By default, fields with empty
4609	// values are omitted from API requests. However, any field with an
4610	// empty value appearing in NullFields will be sent to the server as
4611	// null. It is an error if a field in this list has a non-empty value.
4612	// This may be used to include null fields in Patch requests.
4613	NullFields []string `json:"-"`
4614}
4615
4616func (s *GoogleCloudDialogflowV2beta1GcsSource) MarshalJSON() ([]byte, error) {
4617	type NoMethod GoogleCloudDialogflowV2beta1GcsSource
4618	raw := NoMethod(*s)
4619	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4620}
4621
4622// GoogleCloudDialogflowV2beta1ImportAgentRequest: The request message
4623// for Agents.ImportAgent.
4624type GoogleCloudDialogflowV2beta1ImportAgentRequest struct {
4625	// AgentContent: Zip compressed raw byte content for agent.
4626	AgentContent string `json:"agentContent,omitempty"`
4627
4628	// AgentUri: The URI to a Google Cloud Storage file containing the agent
4629	// to import.
4630	// Note: The URI must start with "gs://".
4631	AgentUri string `json:"agentUri,omitempty"`
4632
4633	// ForceSendFields is a list of field names (e.g. "AgentContent") to
4634	// unconditionally include in API requests. By default, fields with
4635	// empty values are omitted from API requests. However, any non-pointer,
4636	// non-interface field appearing in ForceSendFields will be sent to the
4637	// server regardless of whether the field is empty or not. This may be
4638	// used to include empty fields in Patch requests.
4639	ForceSendFields []string `json:"-"`
4640
4641	// NullFields is a list of field names (e.g. "AgentContent") to include
4642	// in API requests with the JSON null value. By default, fields with
4643	// empty values are omitted from API requests. However, any field with
4644	// an empty value appearing in NullFields will be sent to the server as
4645	// null. It is an error if a field in this list has a non-empty value.
4646	// This may be used to include null fields in Patch requests.
4647	NullFields []string `json:"-"`
4648}
4649
4650func (s *GoogleCloudDialogflowV2beta1ImportAgentRequest) MarshalJSON() ([]byte, error) {
4651	type NoMethod GoogleCloudDialogflowV2beta1ImportAgentRequest
4652	raw := NoMethod(*s)
4653	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4654}
4655
4656// GoogleCloudDialogflowV2beta1InputAudioConfig: Instructs the speech
4657// recognizer on how to process the audio content.
4658type GoogleCloudDialogflowV2beta1InputAudioConfig struct {
4659	// AudioEncoding: Required. Audio encoding of the audio content to
4660	// process.
4661	//
4662	// Possible values:
4663	//   "AUDIO_ENCODING_UNSPECIFIED" - Not specified.
4664	//   "AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
4665	// little-endian samples (Linear PCM).
4666	//   "AUDIO_ENCODING_FLAC" -
4667	// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless
4668	// Audio
4669	// Codec) is the recommended encoding because it is lossless
4670	// (therefore
4671	// recognition is not compromised) and requires only about half
4672	// the
4673	// bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit
4674	// and
4675	// 24-bit samples, however, not all fields in `STREAMINFO` are
4676	// supported.
4677	//   "AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit audio
4678	// samples using G.711 PCMU/mu-law.
4679	//   "AUDIO_ENCODING_AMR" - Adaptive Multi-Rate Narrowband codec.
4680	// `sample_rate_hertz` must be 8000.
4681	//   "AUDIO_ENCODING_AMR_WB" - Adaptive Multi-Rate Wideband codec.
4682	// `sample_rate_hertz` must be 16000.
4683	//   "AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio frames in Ogg
4684	// container
4685	// ([OggOpus](https://wiki.xiph.org/OggOpus)).
4686	// `sample_rate_her
4687	// tz` must be 16000.
4688	//   "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE" - Although the use of lossy
4689	// encodings is not recommended, if a very low
4690	// bitrate encoding is required, `OGG_OPUS` is highly preferred
4691	// over
4692	// Speex encoding. The [Speex](https://speex.org/) encoding supported
4693	// by
4694	// Dialogflow API has a header byte in each block, as in MIME
4695	// type
4696	// `audio/x-speex-with-header-byte`.
4697	// It is a variant of the RTP Speex encoding defined in
4698	// [RFC 5574](https://tools.ietf.org/html/rfc5574).
4699	// The stream is a sequence of blocks, one block per RTP packet. Each
4700	// block
4701	// starts with a byte containing the length of the block, in bytes,
4702	// followed
4703	// by one or more frames of Speex data, padded to an integral number
4704	// of
4705	// bytes (octets) as specified in RFC 5574. In other words, each RTP
4706	// header
4707	// is replaced with a single byte containing the block length. Only
4708	// Speex
4709	// wideband is supported. `sample_rate_hertz` must be 16000.
4710	AudioEncoding string `json:"audioEncoding,omitempty"`
4711
4712	// EnableWordInfo: Optional. If `true`, Dialogflow returns
4713	// SpeechWordInfo in
4714	// StreamingRecognitionResult with information about the recognized
4715	// speech
4716	// words, e.g. start and end time offsets. If false or unspecified,
4717	// Speech
4718	// doesn't return any word-level information.
4719	EnableWordInfo bool `json:"enableWordInfo,omitempty"`
4720
4721	// LanguageCode: Required. The language of the supplied audio.
4722	// Dialogflow does not do
4723	// translations. See
4724	// [Language
4725	// Support](https://cloud.google.com/dialogflow/docs/reference/
4726	// language)
4727	// for a list of the currently supported language codes. Note that
4728	// queries in
4729	// the same session do not necessarily need to specify the same
4730	// language.
4731	LanguageCode string `json:"languageCode,omitempty"`
4732
4733	// Model: Optional. Which Speech model to select for the given request.
4734	// Select the
4735	// model best suited to your domain to get best results. If a model is
4736	// not
4737	// explicitly specified, then we auto-select a model based on the
4738	// parameters
4739	// in the InputAudioConfig.
4740	// If enhanced speech model is enabled for the agent and an
4741	// enhanced
4742	// version of the specified model for the language does not exist, then
4743	// the
4744	// speech is recognized using the standard version of the specified
4745	// model.
4746	// Refer to
4747	// [Cloud Speech
4748	// API
4749	// documentation](https://cloud.google.com/speech-to-text/docs/basics
4750	// #select-model)
4751	// for more details.
4752	Model string `json:"model,omitempty"`
4753
4754	// ModelVariant: Optional. Which variant of the Speech model to use.
4755	//
4756	// Possible values:
4757	//   "SPEECH_MODEL_VARIANT_UNSPECIFIED" - No model variant specified. In
4758	// this case Dialogflow defaults to
4759	// USE_BEST_AVAILABLE.
4760	//   "USE_BEST_AVAILABLE" - Use the best available variant of the
4761	// Speech
4762	// model that the caller is eligible for.
4763	//
4764	// Please see the
4765	// [Dialogflow
4766	// docs](https://cloud.google.com/dialogflow/docs/data-loggin
4767	// g) for
4768	// how to make your project eligible for enhanced models.
4769	//   "USE_STANDARD" - Use standard model variant even if an enhanced
4770	// model is available.  See the
4771	// [Cloud
4772	// Speech
4773	// documentation](https://cloud.google.com/speech-to-text/docs/enh
4774	// anced-models)
4775	// for details about enhanced models.
4776	//   "USE_ENHANCED" - Use an enhanced model variant:
4777	//
4778	// * If an enhanced variant does not exist for the given
4779	//   model and request language, Dialogflow falls
4780	//   back to the standard variant.
4781	//
4782	//   The [Cloud Speech
4783	//
4784	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
4785	// odels)
4786	//   describes which models have enhanced variants.
4787	//
4788	// * If the API caller isn't eligible for enhanced models, Dialogflow
4789	// returns
4790	//   an error.  Please see the [Dialogflow
4791	//   docs](https://cloud.google.com/dialogflow/docs/data-logging)
4792	//   for how to make your project eligible.
4793	ModelVariant string `json:"modelVariant,omitempty"`
4794
4795	// PhraseHints: Optional. A list of strings containing words and phrases
4796	// that the speech
4797	// recognizer should recognize with higher likelihood.
4798	//
4799	// See [the Cloud
4800	// Speech
4801	// documentation](https://cloud.google.com/speech-to-text/docs/bas
4802	// ics#phrase-hints)
4803	// for more details.
4804	//
4805	// This field is deprecated. Please use [speech_contexts]() instead. If
4806	// you
4807	// specify both [phrase_hints]() and [speech_contexts](), Dialogflow
4808	// will
4809	// treat the [phrase_hints]() as a single additional [SpeechContext]().
4810	PhraseHints []string `json:"phraseHints,omitempty"`
4811
4812	// SampleRateHertz: Required. Sample rate (in Hertz) of the audio
4813	// content sent in the query.
4814	// Refer to
4815	// [Cloud Speech
4816	// API
4817	// documentation](https://cloud.google.com/speech-to-text/docs/basics
4818	// ) for
4819	// more details.
4820	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
4821
4822	// SingleUtterance: Optional. If `false` (default), recognition does not
4823	// cease until the
4824	// client closes the stream.
4825	// If `true`, the recognizer will detect a single spoken utterance in
4826	// input
4827	// audio. Recognition ceases when it detects the audio's voice
4828	// has
4829	// stopped or paused. In this case, once a detected intent is received,
4830	// the
4831	// client should close the stream and start a new request with a new
4832	// stream as
4833	// needed.
4834	// Note: This setting is relevant only for streaming methods.
4835	// Note: When specified, InputAudioConfig.single_utterance takes
4836	// precedence
4837	// over StreamingDetectIntentRequest.single_utterance.
4838	SingleUtterance bool `json:"singleUtterance,omitempty"`
4839
4840	// SpeechContexts: Optional. Context information to assist speech
4841	// recognition.
4842	//
4843	// See [the Cloud
4844	// Speech
4845	// documentation](https://cloud.google.com/speech-to-text/docs/bas
4846	// ics#phrase-hints)
4847	// for more details.
4848	SpeechContexts []*GoogleCloudDialogflowV2beta1SpeechContext `json:"speechContexts,omitempty"`
4849
4850	// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
4851	// unconditionally include in API requests. By default, fields with
4852	// empty values are omitted from API requests. However, any non-pointer,
4853	// non-interface field appearing in ForceSendFields will be sent to the
4854	// server regardless of whether the field is empty or not. This may be
4855	// used to include empty fields in Patch requests.
4856	ForceSendFields []string `json:"-"`
4857
4858	// NullFields is a list of field names (e.g. "AudioEncoding") to include
4859	// in API requests with the JSON null value. By default, fields with
4860	// empty values are omitted from API requests. However, any field with
4861	// an empty value appearing in NullFields will be sent to the server as
4862	// null. It is an error if a field in this list has a non-empty value.
4863	// This may be used to include null fields in Patch requests.
4864	NullFields []string `json:"-"`
4865}
4866
4867func (s *GoogleCloudDialogflowV2beta1InputAudioConfig) MarshalJSON() ([]byte, error) {
4868	type NoMethod GoogleCloudDialogflowV2beta1InputAudioConfig
4869	raw := NoMethod(*s)
4870	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4871}
4872
4873// GoogleCloudDialogflowV2beta1Intent: Represents an intent.
4874// Intents convert a number of user expressions or patterns into an
4875// action. An
4876// action is an extraction of a user command or sentence semantics.
4877type GoogleCloudDialogflowV2beta1Intent struct {
4878	// Action: Optional. The name of the action associated with the
4879	// intent.
4880	// Note: The action name must not contain whitespaces.
4881	Action string `json:"action,omitempty"`
4882
4883	// DefaultResponsePlatforms: Optional. The list of platforms for which
4884	// the first responses will be
4885	// copied from the messages in PLATFORM_UNSPECIFIED (i.e. default
4886	// platform).
4887	//
4888	// Possible values:
4889	//   "PLATFORM_UNSPECIFIED" - Not specified.
4890	//   "FACEBOOK" - Facebook.
4891	//   "SLACK" - Slack.
4892	//   "TELEGRAM" - Telegram.
4893	//   "KIK" - Kik.
4894	//   "SKYPE" - Skype.
4895	//   "LINE" - Line.
4896	//   "VIBER" - Viber.
4897	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
4898	// When using Actions on Google, you can choose one of the
4899	// specific
4900	// Intent.Message types that mention support for Actions on Google,
4901	// or you can use the advanced Intent.Message.payload field.
4902	// The payload field provides access to AoG features not available in
4903	// the
4904	// specific message types.
4905	// If using the Intent.Message.payload field, it should have a
4906	// structure
4907	// similar to the JSON message shown here. For more information,
4908	// see
4909	// [Actions on Google
4910	// Webhook
4911	// Format](https://developers.google.com/actions/dialogflow/webho
4912	// ok)
4913	// <pre>{
4914	//   "expectUserResponse": true,
4915	//   "isSsml": false,
4916	//   "noInputPrompts": [],
4917	//   "richResponse": {
4918	//     "items": [
4919	//       {
4920	//         "simpleResponse": {
4921	//           "displayText": "hi",
4922	//           "textToSpeech": "hello"
4923	//         }
4924	//       }
4925	//     ],
4926	//     "suggestions": [
4927	//       {
4928	//         "title": "Say this"
4929	//       },
4930	//       {
4931	//         "title": "or this"
4932	//       }
4933	//     ]
4934	//   },
4935	//   "systemIntent": {
4936	//     "data": {
4937	//       "@type":
4938	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
4939	//       "listSelect": {
4940	//         "items": [
4941	//           {
4942	//             "optionInfo": {
4943	//               "key": "key1",
4944	//               "synonyms": [
4945	//                 "key one"
4946	//               ]
4947	//             },
4948	//             "title": "must not be empty, but unique"
4949	//           },
4950	//           {
4951	//             "optionInfo": {
4952	//               "key": "key2",
4953	//               "synonyms": [
4954	//                 "key two"
4955	//               ]
4956	//             },
4957	//             "title": "must not be empty, but unique"
4958	//           }
4959	//         ]
4960	//       }
4961	//     },
4962	//     "intent": "actions.intent.OPTION"
4963	//   }
4964	// }</pre>
4965	//   "TELEPHONY" - Telephony Gateway.
4966	//   "GOOGLE_HANGOUTS" - Google Hangouts.
4967	DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"`
4968
4969	// DisplayName: Required. The name of this intent.
4970	DisplayName string `json:"displayName,omitempty"`
4971
4972	// EndInteraction: Optional. Indicates that this intent ends an
4973	// interaction. Some integrations
4974	// (e.g., Actions on Google or Dialogflow phone gateway) use this
4975	// information
4976	// to close interaction with an end user. Default is false.
4977	EndInteraction bool `json:"endInteraction,omitempty"`
4978
4979	// Events: Optional. The collection of event names that trigger the
4980	// intent.
4981	// If the collection of input contexts is not empty, all of the contexts
4982	// must
4983	// be present in the active user session for an event to trigger this
4984	// intent.
4985	Events []string `json:"events,omitempty"`
4986
4987	// FollowupIntentInfo: Read-only. Information about all followup intents
4988	// that have this intent as
4989	// a direct or indirect parent. We populate this field only in the
4990	// output.
4991	FollowupIntentInfo []*GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"`
4992
4993	// InputContextNames: Optional. The list of context names required for
4994	// this intent to be
4995	// triggered.
4996	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
4997	// ID>`.
4998	InputContextNames []string `json:"inputContextNames,omitempty"`
4999
5000	// IsFallback: Optional. Indicates whether this is a fallback intent.
5001	IsFallback bool `json:"isFallback,omitempty"`
5002
5003	// Messages: Optional. The collection of rich messages corresponding to
5004	// the
5005	// `Response` field in the Dialogflow console.
5006	Messages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"messages,omitempty"`
5007
5008	// MlDisabled: Optional. Indicates whether Machine Learning is disabled
5009	// for the intent.
5010	// Note: If `ml_disabled` setting is set to true, then this intent is
5011	// not
5012	// taken into account during inference in `ML ONLY` match mode.
5013	// Also,
5014	// auto-markup in the UI is turned off.
5015	MlDisabled bool `json:"mlDisabled,omitempty"`
5016
5017	// MlEnabled: Optional. Indicates whether Machine Learning is enabled
5018	// for the intent.
5019	// Note: If `ml_enabled` setting is set to false, then this intent is
5020	// not
5021	// taken into account during inference in `ML ONLY` match mode.
5022	// Also,
5023	// auto-markup in the UI is turned off.
5024	// DEPRECATED! Please use `ml_disabled` field instead.
5025	// NOTE: If both `ml_enabled` and `ml_disabled` are either not set or
5026	// false,
5027	// then the default value is determined as follows:
5028	// - Before April 15th, 2018 the default is:
5029	//   ml_enabled = false / ml_disabled = true.
5030	// - After April 15th, 2018 the default is:
5031	//   ml_enabled = true / ml_disabled = false.
5032	MlEnabled bool `json:"mlEnabled,omitempty"`
5033
5034	// Name: The unique identifier of this intent.
5035	// Required for Intents.UpdateIntent and
5036	// Intents.BatchUpdateIntents
5037	// methods.
5038	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
5039	Name string `json:"name,omitempty"`
5040
5041	// OutputContexts: Optional. The collection of contexts that are
5042	// activated when the intent
5043	// is matched. Context messages in this collection should not set
5044	// the
5045	// parameters field. Setting the `lifespan_count` to 0 will reset the
5046	// context
5047	// when the intent is matched.
5048	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
5049	// ID>`.
5050	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
5051
5052	// Parameters: Optional. The collection of parameters associated with
5053	// the intent.
5054	Parameters []*GoogleCloudDialogflowV2beta1IntentParameter `json:"parameters,omitempty"`
5055
5056	// ParentFollowupIntentName: Read-only after creation. The unique
5057	// identifier of the parent intent in the
5058	// chain of followup intents. You can set this field when creating an
5059	// intent,
5060	// for example with CreateIntent or
5061	// BatchUpdateIntents, in order to make this
5062	// intent a followup intent.
5063	//
5064	// It identifies the parent followup intent.
5065	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
5066	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
5067
5068	// Priority: The priority of this intent. Higher numbers represent
5069	// higher
5070	// priorities.
5071	//
5072	// - If the supplied value is unspecified or 0, the service
5073	//   translates the value to 500,000, which corresponds to the
5074	//   `Normal` priority in the console.
5075	// - If the supplied value is negative, the intent is ignored
5076	//   in runtime detect intent requests.
5077	Priority int64 `json:"priority,omitempty"`
5078
5079	// ResetContexts: Optional. Indicates whether to delete all contexts in
5080	// the current
5081	// session when this intent is matched.
5082	ResetContexts bool `json:"resetContexts,omitempty"`
5083
5084	// RootFollowupIntentName: Read-only. The unique identifier of the root
5085	// intent in the chain of
5086	// followup intents. It identifies the correct followup intents chain
5087	// for
5088	// this intent. We populate this field only in the output.
5089	//
5090	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
5091	RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"`
5092
5093	// TrainingPhrases: Optional. The collection of examples that the agent
5094	// is
5095	// trained on.
5096	TrainingPhrases []*GoogleCloudDialogflowV2beta1IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
5097
5098	// WebhookState: Optional. Indicates whether webhooks are enabled for
5099	// the intent.
5100	//
5101	// Possible values:
5102	//   "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and
5103	// in the intent.
5104	//   "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in
5105	// the intent.
5106	//   "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in
5107	// the agent and in the intent. Also, each slot
5108	// filling prompt is forwarded to the webhook.
5109	WebhookState string `json:"webhookState,omitempty"`
5110
5111	// ServerResponse contains the HTTP response code and headers from the
5112	// server.
5113	googleapi.ServerResponse `json:"-"`
5114
5115	// ForceSendFields is a list of field names (e.g. "Action") to
5116	// unconditionally include in API requests. By default, fields with
5117	// empty values are omitted from API requests. However, any non-pointer,
5118	// non-interface field appearing in ForceSendFields will be sent to the
5119	// server regardless of whether the field is empty or not. This may be
5120	// used to include empty fields in Patch requests.
5121	ForceSendFields []string `json:"-"`
5122
5123	// NullFields is a list of field names (e.g. "Action") to include in API
5124	// requests with the JSON null value. By default, fields with empty
5125	// values are omitted from API requests. However, any field with an
5126	// empty value appearing in NullFields will be sent to the server as
5127	// null. It is an error if a field in this list has a non-empty value.
5128	// This may be used to include null fields in Patch requests.
5129	NullFields []string `json:"-"`
5130}
5131
5132func (s *GoogleCloudDialogflowV2beta1Intent) MarshalJSON() ([]byte, error) {
5133	type NoMethod GoogleCloudDialogflowV2beta1Intent
5134	raw := NoMethod(*s)
5135	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5136}
5137
5138// GoogleCloudDialogflowV2beta1IntentBatch: This message is a wrapper
5139// around a collection of intents.
5140type GoogleCloudDialogflowV2beta1IntentBatch struct {
5141	// Intents: A collection of intents.
5142	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
5143
5144	// ForceSendFields is a list of field names (e.g. "Intents") to
5145	// unconditionally include in API requests. By default, fields with
5146	// empty values are omitted from API requests. However, any non-pointer,
5147	// non-interface field appearing in ForceSendFields will be sent to the
5148	// server regardless of whether the field is empty or not. This may be
5149	// used to include empty fields in Patch requests.
5150	ForceSendFields []string `json:"-"`
5151
5152	// NullFields is a list of field names (e.g. "Intents") to include in
5153	// API requests with the JSON null value. By default, fields with empty
5154	// values are omitted from API requests. However, any field with an
5155	// empty value appearing in NullFields will be sent to the server as
5156	// null. It is an error if a field in this list has a non-empty value.
5157	// This may be used to include null fields in Patch requests.
5158	NullFields []string `json:"-"`
5159}
5160
5161func (s *GoogleCloudDialogflowV2beta1IntentBatch) MarshalJSON() ([]byte, error) {
5162	type NoMethod GoogleCloudDialogflowV2beta1IntentBatch
5163	raw := NoMethod(*s)
5164	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5165}
5166
5167// GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo: Represents a
5168// single followup intent in the chain.
5169type GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo struct {
5170	// FollowupIntentName: The unique identifier of the followup
5171	// intent.
5172	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
5173	FollowupIntentName string `json:"followupIntentName,omitempty"`
5174
5175	// ParentFollowupIntentName: The unique identifier of the followup
5176	// intent's parent.
5177	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
5178	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
5179
5180	// ForceSendFields is a list of field names (e.g. "FollowupIntentName")
5181	// to unconditionally include in API requests. By default, fields with
5182	// empty values are omitted from API requests. However, any non-pointer,
5183	// non-interface field appearing in ForceSendFields will be sent to the
5184	// server regardless of whether the field is empty or not. This may be
5185	// used to include empty fields in Patch requests.
5186	ForceSendFields []string `json:"-"`
5187
5188	// NullFields is a list of field names (e.g. "FollowupIntentName") to
5189	// include in API requests with the JSON null value. By default, fields
5190	// with empty values are omitted from API requests. However, any field
5191	// with an empty value appearing in NullFields will be sent to the
5192	// server as null. It is an error if a field in this list has a
5193	// non-empty value. This may be used to include null fields in Patch
5194	// requests.
5195	NullFields []string `json:"-"`
5196}
5197
5198func (s *GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) {
5199	type NoMethod GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
5200	raw := NoMethod(*s)
5201	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5202}
5203
5204// GoogleCloudDialogflowV2beta1IntentMessage: Corresponds to the
5205// `Response` field in the Dialogflow console.
5206type GoogleCloudDialogflowV2beta1IntentMessage struct {
5207	// BasicCard: Displays a basic card for Actions on Google.
5208	BasicCard *GoogleCloudDialogflowV2beta1IntentMessageBasicCard `json:"basicCard,omitempty"`
5209
5210	// BrowseCarouselCard: Browse carousel card for Actions on Google.
5211	BrowseCarouselCard *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard `json:"browseCarouselCard,omitempty"`
5212
5213	// Card: Displays a card.
5214	Card *GoogleCloudDialogflowV2beta1IntentMessageCard `json:"card,omitempty"`
5215
5216	// CarouselSelect: Displays a carousel card for Actions on Google.
5217	CarouselSelect *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect `json:"carouselSelect,omitempty"`
5218
5219	// Image: Displays an image.
5220	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
5221
5222	// LinkOutSuggestion: Displays a link out suggestion chip for Actions on
5223	// Google.
5224	LinkOutSuggestion *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"`
5225
5226	// ListSelect: Displays a list card for Actions on Google.
5227	ListSelect *GoogleCloudDialogflowV2beta1IntentMessageListSelect `json:"listSelect,omitempty"`
5228
5229	// MediaContent: The media content card for Actions on Google.
5230	MediaContent *GoogleCloudDialogflowV2beta1IntentMessageMediaContent `json:"mediaContent,omitempty"`
5231
5232	// Payload: Returns a response containing a custom, platform-specific
5233	// payload.
5234	// See the Intent.Message.Platform type for a description of
5235	// the
5236	// structure that may be required for your platform.
5237	Payload googleapi.RawMessage `json:"payload,omitempty"`
5238
5239	// Platform: Optional. The platform that this message is intended for.
5240	//
5241	// Possible values:
5242	//   "PLATFORM_UNSPECIFIED" - Not specified.
5243	//   "FACEBOOK" - Facebook.
5244	//   "SLACK" - Slack.
5245	//   "TELEGRAM" - Telegram.
5246	//   "KIK" - Kik.
5247	//   "SKYPE" - Skype.
5248	//   "LINE" - Line.
5249	//   "VIBER" - Viber.
5250	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
5251	// When using Actions on Google, you can choose one of the
5252	// specific
5253	// Intent.Message types that mention support for Actions on Google,
5254	// or you can use the advanced Intent.Message.payload field.
5255	// The payload field provides access to AoG features not available in
5256	// the
5257	// specific message types.
5258	// If using the Intent.Message.payload field, it should have a
5259	// structure
5260	// similar to the JSON message shown here. For more information,
5261	// see
5262	// [Actions on Google
5263	// Webhook
5264	// Format](https://developers.google.com/actions/dialogflow/webho
5265	// ok)
5266	// <pre>{
5267	//   "expectUserResponse": true,
5268	//   "isSsml": false,
5269	//   "noInputPrompts": [],
5270	//   "richResponse": {
5271	//     "items": [
5272	//       {
5273	//         "simpleResponse": {
5274	//           "displayText": "hi",
5275	//           "textToSpeech": "hello"
5276	//         }
5277	//       }
5278	//     ],
5279	//     "suggestions": [
5280	//       {
5281	//         "title": "Say this"
5282	//       },
5283	//       {
5284	//         "title": "or this"
5285	//       }
5286	//     ]
5287	//   },
5288	//   "systemIntent": {
5289	//     "data": {
5290	//       "@type":
5291	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
5292	//       "listSelect": {
5293	//         "items": [
5294	//           {
5295	//             "optionInfo": {
5296	//               "key": "key1",
5297	//               "synonyms": [
5298	//                 "key one"
5299	//               ]
5300	//             },
5301	//             "title": "must not be empty, but unique"
5302	//           },
5303	//           {
5304	//             "optionInfo": {
5305	//               "key": "key2",
5306	//               "synonyms": [
5307	//                 "key two"
5308	//               ]
5309	//             },
5310	//             "title": "must not be empty, but unique"
5311	//           }
5312	//         ]
5313	//       }
5314	//     },
5315	//     "intent": "actions.intent.OPTION"
5316	//   }
5317	// }</pre>
5318	//   "TELEPHONY" - Telephony Gateway.
5319	//   "GOOGLE_HANGOUTS" - Google Hangouts.
5320	Platform string `json:"platform,omitempty"`
5321
5322	// QuickReplies: Displays quick replies.
5323	QuickReplies *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies `json:"quickReplies,omitempty"`
5324
5325	// RbmCarouselRichCard: Rich Business Messaging (RBM) carousel rich card
5326	// response.
5327	RbmCarouselRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard `json:"rbmCarouselRichCard,omitempty"`
5328
5329	// RbmStandaloneRichCard: Standalone Rich Business Messaging (RBM) rich
5330	// card response.
5331	RbmStandaloneRichCard *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard `json:"rbmStandaloneRichCard,omitempty"`
5332
5333	// RbmText: Rich Business Messaging (RBM) text response.
5334	//
5335	// RBM allows businesses to send enriched and branded versions of SMS.
5336	// See
5337	// https://jibe.google.com/business-messaging.
5338	RbmText *GoogleCloudDialogflowV2beta1IntentMessageRbmText `json:"rbmText,omitempty"`
5339
5340	// SimpleResponses: Returns a voice or text-only response for Actions on
5341	// Google.
5342	SimpleResponses *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses `json:"simpleResponses,omitempty"`
5343
5344	// Suggestions: Displays suggestion chips for Actions on Google.
5345	Suggestions *GoogleCloudDialogflowV2beta1IntentMessageSuggestions `json:"suggestions,omitempty"`
5346
5347	// TableCard: Table card for Actions on Google.
5348	TableCard *GoogleCloudDialogflowV2beta1IntentMessageTableCard `json:"tableCard,omitempty"`
5349
5350	// TelephonyPlayAudio: Plays audio from a file in Telephony Gateway.
5351	TelephonyPlayAudio *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio `json:"telephonyPlayAudio,omitempty"`
5352
5353	// TelephonySynthesizeSpeech: Synthesizes speech in Telephony Gateway.
5354	TelephonySynthesizeSpeech *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech `json:"telephonySynthesizeSpeech,omitempty"`
5355
5356	// TelephonyTransferCall: Transfers the call in Telephony Gateway.
5357	TelephonyTransferCall *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall `json:"telephonyTransferCall,omitempty"`
5358
5359	// Text: Returns a text response.
5360	Text *GoogleCloudDialogflowV2beta1IntentMessageText `json:"text,omitempty"`
5361
5362	// ForceSendFields is a list of field names (e.g. "BasicCard") to
5363	// unconditionally include in API requests. By default, fields with
5364	// empty values are omitted from API requests. However, any non-pointer,
5365	// non-interface field appearing in ForceSendFields will be sent to the
5366	// server regardless of whether the field is empty or not. This may be
5367	// used to include empty fields in Patch requests.
5368	ForceSendFields []string `json:"-"`
5369
5370	// NullFields is a list of field names (e.g. "BasicCard") to include in
5371	// API requests with the JSON null value. By default, fields with empty
5372	// values are omitted from API requests. However, any field with an
5373	// empty value appearing in NullFields will be sent to the server as
5374	// null. It is an error if a field in this list has a non-empty value.
5375	// This may be used to include null fields in Patch requests.
5376	NullFields []string `json:"-"`
5377}
5378
5379func (s *GoogleCloudDialogflowV2beta1IntentMessage) MarshalJSON() ([]byte, error) {
5380	type NoMethod GoogleCloudDialogflowV2beta1IntentMessage
5381	raw := NoMethod(*s)
5382	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5383}
5384
5385// GoogleCloudDialogflowV2beta1IntentMessageBasicCard: The basic card
5386// message. Useful for displaying information.
5387type GoogleCloudDialogflowV2beta1IntentMessageBasicCard struct {
5388	// Buttons: Optional. The collection of card buttons.
5389	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"`
5390
5391	// FormattedText: Required, unless image is present. The body text of
5392	// the card.
5393	FormattedText string `json:"formattedText,omitempty"`
5394
5395	// Image: Optional. The image for the card.
5396	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
5397
5398	// Subtitle: Optional. The subtitle of the card.
5399	Subtitle string `json:"subtitle,omitempty"`
5400
5401	// Title: Optional. The title of the card.
5402	Title string `json:"title,omitempty"`
5403
5404	// ForceSendFields is a list of field names (e.g. "Buttons") to
5405	// unconditionally include in API requests. By default, fields with
5406	// empty values are omitted from API requests. However, any non-pointer,
5407	// non-interface field appearing in ForceSendFields will be sent to the
5408	// server regardless of whether the field is empty or not. This may be
5409	// used to include empty fields in Patch requests.
5410	ForceSendFields []string `json:"-"`
5411
5412	// NullFields is a list of field names (e.g. "Buttons") to include in
5413	// API requests with the JSON null value. By default, fields with empty
5414	// values are omitted from API requests. However, any field with an
5415	// empty value appearing in NullFields will be sent to the server as
5416	// null. It is an error if a field in this list has a non-empty value.
5417	// This may be used to include null fields in Patch requests.
5418	NullFields []string `json:"-"`
5419}
5420
5421func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCard) MarshalJSON() ([]byte, error) {
5422	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCard
5423	raw := NoMethod(*s)
5424	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5425}
5426
5427// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton: The button
5428// object that appears at the bottom of a card.
5429type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton struct {
5430	// OpenUriAction: Required. Action to take when a user taps on the
5431	// button.
5432	OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"`
5433
5434	// Title: Required. The title of the button.
5435	Title string `json:"title,omitempty"`
5436
5437	// ForceSendFields is a list of field names (e.g. "OpenUriAction") to
5438	// unconditionally include in API requests. By default, fields with
5439	// empty values are omitted from API requests. However, any non-pointer,
5440	// non-interface field appearing in ForceSendFields will be sent to the
5441	// server regardless of whether the field is empty or not. This may be
5442	// used to include empty fields in Patch requests.
5443	ForceSendFields []string `json:"-"`
5444
5445	// NullFields is a list of field names (e.g. "OpenUriAction") to include
5446	// in API requests with the JSON null value. By default, fields with
5447	// empty values are omitted from API requests. However, any field with
5448	// an empty value appearing in NullFields will be sent to the server as
5449	// null. It is an error if a field in this list has a non-empty value.
5450	// This may be used to include null fields in Patch requests.
5451	NullFields []string `json:"-"`
5452}
5453
5454func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) {
5455	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
5456	raw := NoMethod(*s)
5457	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5458}
5459
5460// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction:
5461//  Opens the given URI.
5462type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction struct {
5463	// Uri: Required. The HTTP or HTTPS scheme URI.
5464	Uri string `json:"uri,omitempty"`
5465
5466	// ForceSendFields is a list of field names (e.g. "Uri") to
5467	// unconditionally include in API requests. By default, fields with
5468	// empty values are omitted from API requests. However, any non-pointer,
5469	// non-interface field appearing in ForceSendFields will be sent to the
5470	// server regardless of whether the field is empty or not. This may be
5471	// used to include empty fields in Patch requests.
5472	ForceSendFields []string `json:"-"`
5473
5474	// NullFields is a list of field names (e.g. "Uri") to include in API
5475	// requests with the JSON null value. By default, fields with empty
5476	// values are omitted from API requests. However, any field with an
5477	// empty value appearing in NullFields will be sent to the server as
5478	// null. It is an error if a field in this list has a non-empty value.
5479	// This may be used to include null fields in Patch requests.
5480	NullFields []string `json:"-"`
5481}
5482
5483func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) {
5484	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
5485	raw := NoMethod(*s)
5486	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5487}
5488
5489// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard: Browse
5490// Carousel Card for Actions on
5491// Google.
5492// https://developers.google.com/actions/assistant/responses#brow
5493// sing_carousel
5494type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard struct {
5495	// ImageDisplayOptions: Optional. Settings for displaying the image.
5496	// Applies to every image in
5497	// items.
5498	//
5499	// Possible values:
5500	//   "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" - Fill the gaps between the
5501	// image and the image container with gray
5502	// bars.
5503	//   "GRAY" - Fill the gaps between the image and the image container
5504	// with gray
5505	// bars.
5506	//   "WHITE" - Fill the gaps between the image and the image container
5507	// with white
5508	// bars.
5509	//   "CROPPED" - Image is scaled such that the image width and height
5510	// match or exceed
5511	// the container dimensions. This may crop the top and bottom of
5512	// the
5513	// image if the scaled image height is greater than the
5514	// container
5515	// height, or crop the left and right of the image if the scaled
5516	// image
5517	// width is greater than the container width. This is similar to
5518	// "Zoom
5519	// Mode" on a widescreen TV when playing a 4:3 video.
5520	//   "BLURRED_BACKGROUND" - Pad the gaps between image and image frame
5521	// with a blurred copy of the
5522	// same image.
5523	ImageDisplayOptions string `json:"imageDisplayOptions,omitempty"`
5524
5525	// Items: Required. List of items in the Browse Carousel Card. Minimum
5526	// of two
5527	// items, maximum of ten.
5528	Items []*GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem `json:"items,omitempty"`
5529
5530	// ForceSendFields is a list of field names (e.g. "ImageDisplayOptions")
5531	// to unconditionally include in API requests. By default, fields with
5532	// empty values are omitted from API requests. However, any non-pointer,
5533	// non-interface field appearing in ForceSendFields will be sent to the
5534	// server regardless of whether the field is empty or not. This may be
5535	// used to include empty fields in Patch requests.
5536	ForceSendFields []string `json:"-"`
5537
5538	// NullFields is a list of field names (e.g. "ImageDisplayOptions") to
5539	// include in API requests with the JSON null value. By default, fields
5540	// with empty values are omitted from API requests. However, any field
5541	// with an empty value appearing in NullFields will be sent to the
5542	// server as null. It is an error if a field in this list has a
5543	// non-empty value. This may be used to include null fields in Patch
5544	// requests.
5545	NullFields []string `json:"-"`
5546}
5547
5548func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard) MarshalJSON() ([]byte, error) {
5549	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
5550	raw := NoMethod(*s)
5551	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5552}
5553
5554// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou
5555// selCardItem: Browsing carousel tile
5556type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem struct {
5557	// Description: Optional. Description of the carousel item. Maximum of
5558	// four lines of
5559	// text.
5560	Description string `json:"description,omitempty"`
5561
5562	// Footer: Optional. Text that appears at the bottom of the Browse
5563	// Carousel
5564	// Card. Maximum of one line of text.
5565	Footer string `json:"footer,omitempty"`
5566
5567	// Image: Optional. Hero image for the carousel item.
5568	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
5569
5570	// OpenUriAction: Required. Action to present to the user.
5571	OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction `json:"openUriAction,omitempty"`
5572
5573	// Title: Required. Title of the carousel item. Maximum of two lines of
5574	// text.
5575	Title string `json:"title,omitempty"`
5576
5577	// ForceSendFields is a list of field names (e.g. "Description") to
5578	// unconditionally include in API requests. By default, fields with
5579	// empty values are omitted from API requests. However, any non-pointer,
5580	// non-interface field appearing in ForceSendFields will be sent to the
5581	// server regardless of whether the field is empty or not. This may be
5582	// used to include empty fields in Patch requests.
5583	ForceSendFields []string `json:"-"`
5584
5585	// NullFields is a list of field names (e.g. "Description") to include
5586	// in API requests with the JSON null value. By default, fields with
5587	// empty values are omitted from API requests. However, any field with
5588	// an empty value appearing in NullFields will be sent to the server as
5589	// null. It is an error if a field in this list has a non-empty value.
5590	// This may be used to include null fields in Patch requests.
5591	NullFields []string `json:"-"`
5592}
5593
5594func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem) MarshalJSON() ([]byte, error) {
5595	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem
5596	raw := NoMethod(*s)
5597	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5598}
5599
5600// GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarou
5601// selCardItemOpenUrlAction: Actions on Google action to open a given
5602// url.
5603type GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction struct {
5604	// Url: Required. URL
5605	Url string `json:"url,omitempty"`
5606
5607	// UrlTypeHint: Optional. Specifies the type of viewer that is used when
5608	// opening
5609	// the URL. Defaults to opening via web browser.
5610	//
5611	// Possible values:
5612	//   "URL_TYPE_HINT_UNSPECIFIED" - Unspecified
5613	//   "AMP_ACTION" - Url would be an amp action
5614	//   "AMP_CONTENT" - URL that points directly to AMP content, or to a
5615	// canonical URL
5616	// which refers to AMP content via <link rel="amphtml">.
5617	UrlTypeHint string `json:"urlTypeHint,omitempty"`
5618
5619	// ForceSendFields is a list of field names (e.g. "Url") to
5620	// unconditionally include in API requests. By default, fields with
5621	// empty values are omitted from API requests. However, any non-pointer,
5622	// non-interface field appearing in ForceSendFields will be sent to the
5623	// server regardless of whether the field is empty or not. This may be
5624	// used to include empty fields in Patch requests.
5625	ForceSendFields []string `json:"-"`
5626
5627	// NullFields is a list of field names (e.g. "Url") to include in API
5628	// requests with the JSON null value. By default, fields with empty
5629	// values are omitted from API requests. However, any field with an
5630	// empty value appearing in NullFields will be sent to the server as
5631	// null. It is an error if a field in this list has a non-empty value.
5632	// This may be used to include null fields in Patch requests.
5633	NullFields []string `json:"-"`
5634}
5635
5636func (s *GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction) MarshalJSON() ([]byte, error) {
5637	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
5638	raw := NoMethod(*s)
5639	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5640}
5641
5642// GoogleCloudDialogflowV2beta1IntentMessageCard: The card response
5643// message.
5644type GoogleCloudDialogflowV2beta1IntentMessageCard struct {
5645	// Buttons: Optional. The collection of card buttons.
5646	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageCardButton `json:"buttons,omitempty"`
5647
5648	// ImageUri: Optional. The public URI to an image file for the card.
5649	ImageUri string `json:"imageUri,omitempty"`
5650
5651	// Subtitle: Optional. The subtitle of the card.
5652	Subtitle string `json:"subtitle,omitempty"`
5653
5654	// Title: Optional. The title of the card.
5655	Title string `json:"title,omitempty"`
5656
5657	// ForceSendFields is a list of field names (e.g. "Buttons") to
5658	// unconditionally include in API requests. By default, fields with
5659	// empty values are omitted from API requests. However, any non-pointer,
5660	// non-interface field appearing in ForceSendFields will be sent to the
5661	// server regardless of whether the field is empty or not. This may be
5662	// used to include empty fields in Patch requests.
5663	ForceSendFields []string `json:"-"`
5664
5665	// NullFields is a list of field names (e.g. "Buttons") to include in
5666	// API requests with the JSON null value. By default, fields with empty
5667	// values are omitted from API requests. However, any field with an
5668	// empty value appearing in NullFields will be sent to the server as
5669	// null. It is an error if a field in this list has a non-empty value.
5670	// This may be used to include null fields in Patch requests.
5671	NullFields []string `json:"-"`
5672}
5673
5674func (s *GoogleCloudDialogflowV2beta1IntentMessageCard) MarshalJSON() ([]byte, error) {
5675	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCard
5676	raw := NoMethod(*s)
5677	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5678}
5679
5680// GoogleCloudDialogflowV2beta1IntentMessageCardButton: Optional.
5681// Contains information about a button.
5682type GoogleCloudDialogflowV2beta1IntentMessageCardButton struct {
5683	// Postback: Optional. The text to send back to the Dialogflow API or a
5684	// URI to
5685	// open.
5686	Postback string `json:"postback,omitempty"`
5687
5688	// Text: Optional. The text to show on the button.
5689	Text string `json:"text,omitempty"`
5690
5691	// ForceSendFields is a list of field names (e.g. "Postback") to
5692	// unconditionally include in API requests. By default, fields with
5693	// empty values are omitted from API requests. However, any non-pointer,
5694	// non-interface field appearing in ForceSendFields will be sent to the
5695	// server regardless of whether the field is empty or not. This may be
5696	// used to include empty fields in Patch requests.
5697	ForceSendFields []string `json:"-"`
5698
5699	// NullFields is a list of field names (e.g. "Postback") to include in
5700	// API requests with the JSON null value. By default, fields with empty
5701	// values are omitted from API requests. However, any field with an
5702	// empty value appearing in NullFields will be sent to the server as
5703	// null. It is an error if a field in this list has a non-empty value.
5704	// This may be used to include null fields in Patch requests.
5705	NullFields []string `json:"-"`
5706}
5707
5708func (s *GoogleCloudDialogflowV2beta1IntentMessageCardButton) MarshalJSON() ([]byte, error) {
5709	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCardButton
5710	raw := NoMethod(*s)
5711	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5712}
5713
5714// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect: The card for
5715// presenting a carousel of options to select from.
5716type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect struct {
5717	// Items: Required. Carousel items.
5718	Items []*GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem `json:"items,omitempty"`
5719
5720	// ForceSendFields is a list of field names (e.g. "Items") to
5721	// unconditionally include in API requests. By default, fields with
5722	// empty values are omitted from API requests. However, any non-pointer,
5723	// non-interface field appearing in ForceSendFields will be sent to the
5724	// server regardless of whether the field is empty or not. This may be
5725	// used to include empty fields in Patch requests.
5726	ForceSendFields []string `json:"-"`
5727
5728	// NullFields is a list of field names (e.g. "Items") to include in API
5729	// requests with the JSON null value. By default, fields with empty
5730	// values are omitted from API requests. However, any field with an
5731	// empty value appearing in NullFields will be sent to the server as
5732	// null. It is an error if a field in this list has a non-empty value.
5733	// This may be used to include null fields in Patch requests.
5734	NullFields []string `json:"-"`
5735}
5736
5737func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) {
5738	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
5739	raw := NoMethod(*s)
5740	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5741}
5742
5743// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem: An item
5744// in the carousel.
5745type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem struct {
5746	// Description: Optional. The body text of the card.
5747	Description string `json:"description,omitempty"`
5748
5749	// Image: Optional. The image to display.
5750	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
5751
5752	// Info: Required. Additional info about the option item.
5753	Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"`
5754
5755	// Title: Required. Title of the carousel item.
5756	Title string `json:"title,omitempty"`
5757
5758	// ForceSendFields is a list of field names (e.g. "Description") to
5759	// unconditionally include in API requests. By default, fields with
5760	// empty values are omitted from API requests. However, any non-pointer,
5761	// non-interface field appearing in ForceSendFields will be sent to the
5762	// server regardless of whether the field is empty or not. This may be
5763	// used to include empty fields in Patch requests.
5764	ForceSendFields []string `json:"-"`
5765
5766	// NullFields is a list of field names (e.g. "Description") to include
5767	// in API requests with the JSON null value. By default, fields with
5768	// empty values are omitted from API requests. However, any field with
5769	// an empty value appearing in NullFields will be sent to the server as
5770	// null. It is an error if a field in this list has a non-empty value.
5771	// This may be used to include null fields in Patch requests.
5772	NullFields []string `json:"-"`
5773}
5774
5775func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) {
5776	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
5777	raw := NoMethod(*s)
5778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5779}
5780
5781// GoogleCloudDialogflowV2beta1IntentMessageColumnProperties: Column
5782// properties for TableCard.
5783type GoogleCloudDialogflowV2beta1IntentMessageColumnProperties struct {
5784	// Header: Required. Column heading.
5785	Header string `json:"header,omitempty"`
5786
5787	// HorizontalAlignment: Optional. Defines text alignment for all cells
5788	// in this column.
5789	//
5790	// Possible values:
5791	//   "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Text is aligned to the leading
5792	// edge of the column.
5793	//   "LEADING" - Text is aligned to the leading edge of the column.
5794	//   "CENTER" - Text is centered in the column.
5795	//   "TRAILING" - Text is aligned to the trailing edge of the column.
5796	HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
5797
5798	// ForceSendFields is a list of field names (e.g. "Header") to
5799	// unconditionally include in API requests. By default, fields with
5800	// empty values are omitted from API requests. However, any non-pointer,
5801	// non-interface field appearing in ForceSendFields will be sent to the
5802	// server regardless of whether the field is empty or not. This may be
5803	// used to include empty fields in Patch requests.
5804	ForceSendFields []string `json:"-"`
5805
5806	// NullFields is a list of field names (e.g. "Header") to include in API
5807	// requests with the JSON null value. By default, fields with empty
5808	// values are omitted from API requests. However, any field with an
5809	// empty value appearing in NullFields will be sent to the server as
5810	// null. It is an error if a field in this list has a non-empty value.
5811	// This may be used to include null fields in Patch requests.
5812	NullFields []string `json:"-"`
5813}
5814
5815func (s *GoogleCloudDialogflowV2beta1IntentMessageColumnProperties) MarshalJSON() ([]byte, error) {
5816	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageColumnProperties
5817	raw := NoMethod(*s)
5818	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5819}
5820
5821// GoogleCloudDialogflowV2beta1IntentMessageImage: The image response
5822// message.
5823type GoogleCloudDialogflowV2beta1IntentMessageImage struct {
5824	// AccessibilityText: A text description of the image to be used for
5825	// accessibility,
5826	// e.g., screen readers. Required if image_uri is set for
5827	// CarouselSelect.
5828	AccessibilityText string `json:"accessibilityText,omitempty"`
5829
5830	// ImageUri: Optional. The public URI to an image file.
5831	ImageUri string `json:"imageUri,omitempty"`
5832
5833	// ForceSendFields is a list of field names (e.g. "AccessibilityText")
5834	// to unconditionally include in API requests. By default, fields with
5835	// empty values are omitted from API requests. However, any non-pointer,
5836	// non-interface field appearing in ForceSendFields will be sent to the
5837	// server regardless of whether the field is empty or not. This may be
5838	// used to include empty fields in Patch requests.
5839	ForceSendFields []string `json:"-"`
5840
5841	// NullFields is a list of field names (e.g. "AccessibilityText") to
5842	// include in API requests with the JSON null value. By default, fields
5843	// with empty values are omitted from API requests. However, any field
5844	// with an empty value appearing in NullFields will be sent to the
5845	// server as null. It is an error if a field in this list has a
5846	// non-empty value. This may be used to include null fields in Patch
5847	// requests.
5848	NullFields []string `json:"-"`
5849}
5850
5851func (s *GoogleCloudDialogflowV2beta1IntentMessageImage) MarshalJSON() ([]byte, error) {
5852	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageImage
5853	raw := NoMethod(*s)
5854	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5855}
5856
5857// GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion: The
5858// suggestion chip message that allows the user to jump out to the
5859// app
5860// or website associated with this agent.
5861type GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion struct {
5862	// DestinationName: Required. The name of the app or site this chip is
5863	// linking to.
5864	DestinationName string `json:"destinationName,omitempty"`
5865
5866	// Uri: Required. The URI of the app or site to open when the user taps
5867	// the
5868	// suggestion chip.
5869	Uri string `json:"uri,omitempty"`
5870
5871	// ForceSendFields is a list of field names (e.g. "DestinationName") to
5872	// unconditionally include in API requests. By default, fields with
5873	// empty values are omitted from API requests. However, any non-pointer,
5874	// non-interface field appearing in ForceSendFields will be sent to the
5875	// server regardless of whether the field is empty or not. This may be
5876	// used to include empty fields in Patch requests.
5877	ForceSendFields []string `json:"-"`
5878
5879	// NullFields is a list of field names (e.g. "DestinationName") to
5880	// include in API requests with the JSON null value. By default, fields
5881	// with empty values are omitted from API requests. However, any field
5882	// with an empty value appearing in NullFields will be sent to the
5883	// server as null. It is an error if a field in this list has a
5884	// non-empty value. This may be used to include null fields in Patch
5885	// requests.
5886	NullFields []string `json:"-"`
5887}
5888
5889func (s *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) {
5890	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
5891	raw := NoMethod(*s)
5892	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5893}
5894
5895// GoogleCloudDialogflowV2beta1IntentMessageListSelect: The card for
5896// presenting a list of options to select from.
5897type GoogleCloudDialogflowV2beta1IntentMessageListSelect struct {
5898	// Items: Required. List items.
5899	Items []*GoogleCloudDialogflowV2beta1IntentMessageListSelectItem `json:"items,omitempty"`
5900
5901	// Subtitle: Optional. Subtitle of the list.
5902	Subtitle string `json:"subtitle,omitempty"`
5903
5904	// Title: Optional. The overall title of the list.
5905	Title string `json:"title,omitempty"`
5906
5907	// ForceSendFields is a list of field names (e.g. "Items") to
5908	// unconditionally include in API requests. By default, fields with
5909	// empty values are omitted from API requests. However, any non-pointer,
5910	// non-interface field appearing in ForceSendFields will be sent to the
5911	// server regardless of whether the field is empty or not. This may be
5912	// used to include empty fields in Patch requests.
5913	ForceSendFields []string `json:"-"`
5914
5915	// NullFields is a list of field names (e.g. "Items") to include in API
5916	// requests with the JSON null value. By default, fields with empty
5917	// values are omitted from API requests. However, any field with an
5918	// empty value appearing in NullFields will be sent to the server as
5919	// null. It is an error if a field in this list has a non-empty value.
5920	// This may be used to include null fields in Patch requests.
5921	NullFields []string `json:"-"`
5922}
5923
5924func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelect) MarshalJSON() ([]byte, error) {
5925	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelect
5926	raw := NoMethod(*s)
5927	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5928}
5929
5930// GoogleCloudDialogflowV2beta1IntentMessageListSelectItem: An item in
5931// the list.
5932type GoogleCloudDialogflowV2beta1IntentMessageListSelectItem struct {
5933	// Description: Optional. The main text describing the item.
5934	Description string `json:"description,omitempty"`
5935
5936	// Image: Optional. The image to display.
5937	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
5938
5939	// Info: Required. Additional information about this option.
5940	Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"`
5941
5942	// Title: Required. The title of the list item.
5943	Title string `json:"title,omitempty"`
5944
5945	// ForceSendFields is a list of field names (e.g. "Description") to
5946	// unconditionally include in API requests. By default, fields with
5947	// empty values are omitted from API requests. However, any non-pointer,
5948	// non-interface field appearing in ForceSendFields will be sent to the
5949	// server regardless of whether the field is empty or not. This may be
5950	// used to include empty fields in Patch requests.
5951	ForceSendFields []string `json:"-"`
5952
5953	// NullFields is a list of field names (e.g. "Description") to include
5954	// in API requests with the JSON null value. By default, fields with
5955	// empty values are omitted from API requests. However, any field with
5956	// an empty value appearing in NullFields will be sent to the server as
5957	// null. It is an error if a field in this list has a non-empty value.
5958	// This may be used to include null fields in Patch requests.
5959	NullFields []string `json:"-"`
5960}
5961
5962func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelectItem) MarshalJSON() ([]byte, error) {
5963	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
5964	raw := NoMethod(*s)
5965	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5966}
5967
5968// GoogleCloudDialogflowV2beta1IntentMessageMediaContent: The media
5969// content card for Actions on Google.
5970type GoogleCloudDialogflowV2beta1IntentMessageMediaContent struct {
5971	// MediaObjects: Required. List of media objects.
5972	MediaObjects []*GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject `json:"mediaObjects,omitempty"`
5973
5974	// MediaType: Optional. What type of media is the content (ie "audio").
5975	//
5976	// Possible values:
5977	//   "RESPONSE_MEDIA_TYPE_UNSPECIFIED" - Unspecified.
5978	//   "AUDIO" - Response media type is audio.
5979	MediaType string `json:"mediaType,omitempty"`
5980
5981	// ForceSendFields is a list of field names (e.g. "MediaObjects") to
5982	// unconditionally include in API requests. By default, fields with
5983	// empty values are omitted from API requests. However, any non-pointer,
5984	// non-interface field appearing in ForceSendFields will be sent to the
5985	// server regardless of whether the field is empty or not. This may be
5986	// used to include empty fields in Patch requests.
5987	ForceSendFields []string `json:"-"`
5988
5989	// NullFields is a list of field names (e.g. "MediaObjects") to include
5990	// in API requests with the JSON null value. By default, fields with
5991	// empty values are omitted from API requests. However, any field with
5992	// an empty value appearing in NullFields will be sent to the server as
5993	// null. It is an error if a field in this list has a non-empty value.
5994	// This may be used to include null fields in Patch requests.
5995	NullFields []string `json:"-"`
5996}
5997
5998func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContent) MarshalJSON() ([]byte, error) {
5999	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContent
6000	raw := NoMethod(*s)
6001	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6002}
6003
6004// GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObje
6005// ct: Response media object for media content card.
6006type GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject struct {
6007	// ContentUrl: Required. Url where the media is stored.
6008	ContentUrl string `json:"contentUrl,omitempty"`
6009
6010	// Description: Optional. Description of media card.
6011	Description string `json:"description,omitempty"`
6012
6013	// Icon: Optional. Icon to display above media content.
6014	Icon *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"icon,omitempty"`
6015
6016	// LargeImage: Optional. Image to display above media content.
6017	LargeImage *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"largeImage,omitempty"`
6018
6019	// Name: Required. Name of media card.
6020	Name string `json:"name,omitempty"`
6021
6022	// ForceSendFields is a list of field names (e.g. "ContentUrl") to
6023	// unconditionally include in API requests. By default, fields with
6024	// empty values are omitted from API requests. However, any non-pointer,
6025	// non-interface field appearing in ForceSendFields will be sent to the
6026	// server regardless of whether the field is empty or not. This may be
6027	// used to include empty fields in Patch requests.
6028	ForceSendFields []string `json:"-"`
6029
6030	// NullFields is a list of field names (e.g. "ContentUrl") to include in
6031	// API requests with the JSON null value. By default, fields with empty
6032	// values are omitted from API requests. However, any field with an
6033	// empty value appearing in NullFields will be sent to the server as
6034	// null. It is an error if a field in this list has a non-empty value.
6035	// This may be used to include null fields in Patch requests.
6036	NullFields []string `json:"-"`
6037}
6038
6039func (s *GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject) MarshalJSON() ([]byte, error) {
6040	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject
6041	raw := NoMethod(*s)
6042	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6043}
6044
6045// GoogleCloudDialogflowV2beta1IntentMessageQuickReplies: The quick
6046// replies response message.
6047type GoogleCloudDialogflowV2beta1IntentMessageQuickReplies struct {
6048	// QuickReplies: Optional. The collection of quick replies.
6049	QuickReplies []string `json:"quickReplies,omitempty"`
6050
6051	// Title: Optional. The title of the collection of quick replies.
6052	Title string `json:"title,omitempty"`
6053
6054	// ForceSendFields is a list of field names (e.g. "QuickReplies") to
6055	// unconditionally include in API requests. By default, fields with
6056	// empty values are omitted from API requests. However, any non-pointer,
6057	// non-interface field appearing in ForceSendFields will be sent to the
6058	// server regardless of whether the field is empty or not. This may be
6059	// used to include empty fields in Patch requests.
6060	ForceSendFields []string `json:"-"`
6061
6062	// NullFields is a list of field names (e.g. "QuickReplies") to include
6063	// in API requests with the JSON null value. By default, fields with
6064	// empty values are omitted from API requests. However, any field with
6065	// an empty value appearing in NullFields will be sent to the server as
6066	// null. It is an error if a field in this list has a non-empty value.
6067	// This may be used to include null fields in Patch requests.
6068	NullFields []string `json:"-"`
6069}
6070
6071func (s *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies) MarshalJSON() ([]byte, error) {
6072	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
6073	raw := NoMethod(*s)
6074	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6075}
6076
6077// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent: Rich
6078// Business Messaging (RBM) Card content
6079type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent struct {
6080	// Description: Optional. Description of the card (at most 2000
6081	// bytes).
6082	//
6083	// At least one of the title, description or media must be set.
6084	Description string `json:"description,omitempty"`
6085
6086	// Media: Optional. However at least one of the title, description or
6087	// media must
6088	// be set. Media (image, GIF or a video) to include in the card.
6089	Media *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia `json:"media,omitempty"`
6090
6091	// Suggestions: Optional. List of suggestions to include in the card.
6092	Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"suggestions,omitempty"`
6093
6094	// Title: Optional. Title of the card (at most 200 bytes).
6095	//
6096	// At least one of the title, description or media must be set.
6097	Title string `json:"title,omitempty"`
6098
6099	// ForceSendFields is a list of field names (e.g. "Description") to
6100	// unconditionally include in API requests. By default, fields with
6101	// empty values are omitted from API requests. However, any non-pointer,
6102	// non-interface field appearing in ForceSendFields will be sent to the
6103	// server regardless of whether the field is empty or not. This may be
6104	// used to include empty fields in Patch requests.
6105	ForceSendFields []string `json:"-"`
6106
6107	// NullFields is a list of field names (e.g. "Description") to include
6108	// in API requests with the JSON null value. By default, fields with
6109	// empty values are omitted from API requests. However, any field with
6110	// an empty value appearing in NullFields will be sent to the server as
6111	// null. It is an error if a field in this list has a non-empty value.
6112	// This may be used to include null fields in Patch requests.
6113	NullFields []string `json:"-"`
6114}
6115
6116func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent) MarshalJSON() ([]byte, error) {
6117	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
6118	raw := NoMethod(*s)
6119	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6120}
6121
6122// GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia: Rich
6123// Business Messaging (RBM) Media displayed in Cards
6124// The following media-types are currently supported:
6125//
6126// ## Image Types
6127//
6128//  image/jpeg
6129//  image/jpg'
6130//  image/gif
6131//  image/png
6132//
6133// ## Video Types
6134//
6135//  video/h263
6136//  video/m4v
6137//  video/mp4
6138//  video/mpeg
6139//  video/mpeg4
6140//  video/webm
6141type GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia struct {
6142	// FileUri: Required. Publicly reachable URI of the file. The RBM
6143	// platform
6144	// determines the MIME type of the file from the content-type field
6145	// in
6146	// the HTTP headers when the platform fetches the file. The
6147	// content-type
6148	// field must be present and accurate in the HTTP response from the URL.
6149	FileUri string `json:"fileUri,omitempty"`
6150
6151	// Height: Required for cards with vertical orientation. The height of
6152	// the media
6153	// within a rich card with a vertical layout.
6154	// (https://goo.gl/NeFCjz).
6155	// For a standalone card with horizontal layout, height is
6156	// not
6157	// customizable, and this field is ignored.
6158	//
6159	// Possible values:
6160	//   "HEIGHT_UNSPECIFIED" - Not specified.
6161	//   "SHORT" - 112 DP.
6162	//   "MEDIUM" - 168 DP.
6163	//   "TALL" - 264 DP. Not available for rich card carousels when the
6164	// card width
6165	// is set to small.
6166	Height string `json:"height,omitempty"`
6167
6168	// ThumbnailUri: Optional. Publicly reachable URI of the thumbnail.If
6169	// you don't
6170	// provide a thumbnail URI, the RBM platform displays a
6171	// blank
6172	// placeholder thumbnail until the user's device downloads the
6173	// file.
6174	// Depending on the user's setting, the file may not
6175	// download
6176	// automatically and may require the user to tap a download button.
6177	ThumbnailUri string `json:"thumbnailUri,omitempty"`
6178
6179	// ForceSendFields is a list of field names (e.g. "FileUri") 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. "FileUri") to include in
6188	// API requests with the JSON null value. By default, fields with empty
6189	// values are omitted from API requests. However, any field with an
6190	// 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 *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia) MarshalJSON() ([]byte, error) {
6197	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
6198	raw := NoMethod(*s)
6199	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6200}
6201
6202// GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard: Carousel
6203// Rich Business Messaging (RBM) rich card.
6204//
6205// Rich cards allow you to respond to users with more vivid content,
6206// e.g.
6207// with media and suggestions.
6208//
6209// For more details about RBM rich cards, please
6210// see:
6211// https://developers.google.com/rcs-business-messaging/rbm/guides/b
6212// uild/send-messages#rich-cards.
6213// If you want to show a single card with more control over the
6214// layout,
6215// please use RbmStandaloneCard instead.
6216type GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard struct {
6217	// CardContents: Required. The cards in the carousel. A carousel must
6218	// have at least
6219	// 2 cards and at most 10.
6220	CardContents []*GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContents,omitempty"`
6221
6222	// CardWidth: Required. The width of the cards in the carousel.
6223	//
6224	// Possible values:
6225	//   "CARD_WIDTH_UNSPECIFIED" - Not specified.
6226	//   "SMALL" - 120 DP. Note that tall media cannot be used.
6227	//   "MEDIUM" - 232 DP.
6228	CardWidth string `json:"cardWidth,omitempty"`
6229
6230	// ForceSendFields is a list of field names (e.g. "CardContents") to
6231	// unconditionally include in API requests. By default, fields with
6232	// empty values are omitted from API requests. However, any non-pointer,
6233	// non-interface field appearing in ForceSendFields will be sent to the
6234	// server regardless of whether the field is empty or not. This may be
6235	// used to include empty fields in Patch requests.
6236	ForceSendFields []string `json:"-"`
6237
6238	// NullFields is a list of field names (e.g. "CardContents") to include
6239	// in API requests with the JSON null value. By default, fields with
6240	// empty values are omitted from API requests. However, any field with
6241	// an empty value appearing in NullFields will be sent to the server as
6242	// null. It is an error if a field in this list has a non-empty value.
6243	// This may be used to include null fields in Patch requests.
6244	NullFields []string `json:"-"`
6245}
6246
6247func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard) MarshalJSON() ([]byte, error) {
6248	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
6249	raw := NoMethod(*s)
6250	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6251}
6252
6253// GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard:
6254// Standalone Rich Business Messaging (RBM) rich card.
6255//
6256// Rich cards allow you to respond to users with more vivid content,
6257// e.g.
6258// with media and suggestions.
6259//
6260// For more details about RBM rich cards, please
6261// see:
6262// https://developers.google.com/rcs-business-messaging/rbm/guides/b
6263// uild/send-messages#rich-cards.
6264// You can group multiple rich cards into one using RbmCarouselCard
6265// but
6266// carousel cards will give you less control over the card layout.
6267type GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard struct {
6268	// CardContent: Required. Card content.
6269	CardContent *GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent `json:"cardContent,omitempty"`
6270
6271	// CardOrientation: Required. Orientation of the card.
6272	//
6273	// Possible values:
6274	//   "CARD_ORIENTATION_UNSPECIFIED" - Not specified.
6275	//   "HORIZONTAL" - Horizontal layout.
6276	//   "VERTICAL" - Vertical layout.
6277	CardOrientation string `json:"cardOrientation,omitempty"`
6278
6279	// ThumbnailImageAlignment: Required if orientation is horizontal.
6280	// Image preview alignment for standalone cards with horizontal layout.
6281	//
6282	// Possible values:
6283	//   "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED" - Not specified.
6284	//   "LEFT" - Thumbnail preview is left-aligned.
6285	//   "RIGHT" - Thumbnail preview is right-aligned.
6286	ThumbnailImageAlignment string `json:"thumbnailImageAlignment,omitempty"`
6287
6288	// ForceSendFields is a list of field names (e.g. "CardContent") to
6289	// unconditionally include in API requests. By default, fields with
6290	// empty values are omitted from API requests. However, any non-pointer,
6291	// non-interface field appearing in ForceSendFields will be sent to the
6292	// server regardless of whether the field is empty or not. This may be
6293	// used to include empty fields in Patch requests.
6294	ForceSendFields []string `json:"-"`
6295
6296	// NullFields is a list of field names (e.g. "CardContent") to include
6297	// in API requests with the JSON null value. By default, fields with
6298	// empty values are omitted from API requests. However, any field with
6299	// an empty value appearing in NullFields will be sent to the server as
6300	// null. It is an error if a field in this list has a non-empty value.
6301	// This may be used to include null fields in Patch requests.
6302	NullFields []string `json:"-"`
6303}
6304
6305func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard) MarshalJSON() ([]byte, error) {
6306	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
6307	raw := NoMethod(*s)
6308	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6309}
6310
6311// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction: Rich
6312// Business Messaging (RBM) suggested client-side action that the
6313// user
6314// can choose from the card.
6315type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction struct {
6316	// Dial: Suggested client side action: Dial a phone number
6317	Dial *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial `json:"dial,omitempty"`
6318
6319	// OpenUrl: Suggested client side action: Open a URI on device
6320	OpenUrl *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri `json:"openUrl,omitempty"`
6321
6322	// PostbackData: Opaque payload that the Dialogflow receives in a user
6323	// event
6324	// when the user taps the suggested action. This data will be
6325	// also
6326	// forwarded to webhook to allow performing custom business logic.
6327	PostbackData string `json:"postbackData,omitempty"`
6328
6329	// ShareLocation: Suggested client side action: Share user location
6330	ShareLocation *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation `json:"shareLocation,omitempty"`
6331
6332	// Text: Text to display alongside the action.
6333	Text string `json:"text,omitempty"`
6334
6335	// ForceSendFields is a list of field names (e.g. "Dial") to
6336	// unconditionally include in API requests. By default, fields with
6337	// empty values are omitted from API requests. However, any non-pointer,
6338	// non-interface field appearing in ForceSendFields will be sent to the
6339	// server regardless of whether the field is empty or not. This may be
6340	// used to include empty fields in Patch requests.
6341	ForceSendFields []string `json:"-"`
6342
6343	// NullFields is a list of field names (e.g. "Dial") to include in API
6344	// requests with the JSON null value. By default, fields with empty
6345	// values are omitted from API requests. However, any field with an
6346	// empty value appearing in NullFields will be sent to the server as
6347	// null. It is an error if a field in this list has a non-empty value.
6348	// This may be used to include null fields in Patch requests.
6349	NullFields []string `json:"-"`
6350}
6351
6352func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction) MarshalJSON() ([]byte, error) {
6353	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
6354	raw := NoMethod(*s)
6355	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6356}
6357
6358// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste
6359// dActionDial: Opens the user's default dialer app with the specified
6360// phone number
6361// but does not dial automatically (https://goo.gl/ergbB2).
6362type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial struct {
6363	// PhoneNumber: Required. The phone number to fill in the default dialer
6364	// app.
6365	// This field should be in
6366	// [E.164](https://en.wikipedia.org/wiki/E.164)
6367	// format. An example of a correctly formatted phone
6368	// number:
6369	// +15556767888.
6370	PhoneNumber string `json:"phoneNumber,omitempty"`
6371
6372	// ForceSendFields is a list of field names (e.g. "PhoneNumber") to
6373	// unconditionally include in API requests. By default, fields with
6374	// empty values are omitted from API requests. However, any non-pointer,
6375	// non-interface field appearing in ForceSendFields will be sent to the
6376	// server regardless of whether the field is empty or not. This may be
6377	// used to include empty fields in Patch requests.
6378	ForceSendFields []string `json:"-"`
6379
6380	// NullFields is a list of field names (e.g. "PhoneNumber") to include
6381	// in API requests with the JSON null value. By default, fields with
6382	// empty values are omitted from API requests. However, any field with
6383	// an empty value appearing in NullFields will be sent to the server as
6384	// null. It is an error if a field in this list has a non-empty value.
6385	// This may be used to include null fields in Patch requests.
6386	NullFields []string `json:"-"`
6387}
6388
6389func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial) MarshalJSON() ([]byte, error) {
6390	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
6391	raw := NoMethod(*s)
6392	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6393}
6394
6395// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste
6396// dActionOpenUri: Opens the user's default web browser app to the
6397// specified uri
6398// (https://goo.gl/6GLJD2). If the user has an app installed that
6399// is
6400// registered as the default handler for the URL, then this app will
6401// be
6402// opened instead, and its icon will be used in the suggested action UI.
6403type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri struct {
6404	// Uri: Required. The uri to open on the user device
6405	Uri string `json:"uri,omitempty"`
6406
6407	// ForceSendFields is a list of field names (e.g. "Uri") to
6408	// unconditionally include in API requests. By default, fields with
6409	// empty values are omitted from API requests. However, any non-pointer,
6410	// non-interface field appearing in ForceSendFields will be sent to the
6411	// server regardless of whether the field is empty or not. This may be
6412	// used to include empty fields in Patch requests.
6413	ForceSendFields []string `json:"-"`
6414
6415	// NullFields is a list of field names (e.g. "Uri") to include in API
6416	// requests with the JSON null value. By default, fields with empty
6417	// values are omitted from API requests. However, any field with an
6418	// empty value appearing in NullFields will be sent to the server as
6419	// null. It is an error if a field in this list has a non-empty value.
6420	// This may be used to include null fields in Patch requests.
6421	NullFields []string `json:"-"`
6422}
6423
6424func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri) MarshalJSON() ([]byte, error) {
6425	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
6426	raw := NoMethod(*s)
6427	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6428}
6429
6430// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggeste
6431// dActionShareLocation: Opens the device's location chooser so the user
6432// can pick a location
6433// to send back to the agent (https://goo.gl/GXotJW).
6434type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation struct {
6435}
6436
6437// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply: Rich
6438// Business Messaging (RBM) suggested reply that the user can
6439// click
6440// instead of typing in their own response.
6441type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply struct {
6442	// PostbackData: Opaque payload that the Dialogflow receives in a user
6443	// event
6444	// when the user taps the suggested reply. This data will be
6445	// also
6446	// forwarded to webhook to allow performing custom business logic.
6447	PostbackData string `json:"postbackData,omitempty"`
6448
6449	// Text: Suggested reply text.
6450	Text string `json:"text,omitempty"`
6451
6452	// ForceSendFields is a list of field names (e.g. "PostbackData") to
6453	// unconditionally include in API requests. By default, fields with
6454	// empty values are omitted from API requests. However, any non-pointer,
6455	// non-interface field appearing in ForceSendFields will be sent to the
6456	// server regardless of whether the field is empty or not. This may be
6457	// used to include empty fields in Patch requests.
6458	ForceSendFields []string `json:"-"`
6459
6460	// NullFields is a list of field names (e.g. "PostbackData") to include
6461	// in API requests with the JSON null value. By default, fields with
6462	// empty values are omitted from API requests. However, any field with
6463	// an empty value appearing in NullFields will be sent to the server as
6464	// null. It is an error if a field in this list has a non-empty value.
6465	// This may be used to include null fields in Patch requests.
6466	NullFields []string `json:"-"`
6467}
6468
6469func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply) MarshalJSON() ([]byte, error) {
6470	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
6471	raw := NoMethod(*s)
6472	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6473}
6474
6475// GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion: Rich Business
6476// Messaging (RBM) suggestion. Suggestions allow user to
6477// easily select/click a predefined response or perform an action
6478// (like
6479// opening a web uri).
6480type GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion struct {
6481	// Action: Predefined client side actions that user can choose
6482	Action *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction `json:"action,omitempty"`
6483
6484	// Reply: Predefined replies for user to select instead of typing
6485	Reply *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply `json:"reply,omitempty"`
6486
6487	// ForceSendFields is a list of field names (e.g. "Action") to
6488	// unconditionally include in API requests. By default, fields with
6489	// empty values are omitted from API requests. However, any non-pointer,
6490	// non-interface field appearing in ForceSendFields will be sent to the
6491	// server regardless of whether the field is empty or not. This may be
6492	// used to include empty fields in Patch requests.
6493	ForceSendFields []string `json:"-"`
6494
6495	// NullFields is a list of field names (e.g. "Action") to include in API
6496	// requests with the JSON null value. By default, fields with empty
6497	// values are omitted from API requests. However, any field with an
6498	// empty value appearing in NullFields will be sent to the server as
6499	// null. It is an error if a field in this list has a non-empty value.
6500	// This may be used to include null fields in Patch requests.
6501	NullFields []string `json:"-"`
6502}
6503
6504func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion) MarshalJSON() ([]byte, error) {
6505	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion
6506	raw := NoMethod(*s)
6507	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6508}
6509
6510// GoogleCloudDialogflowV2beta1IntentMessageRbmText: Rich Business
6511// Messaging (RBM) text response with suggestions.
6512type GoogleCloudDialogflowV2beta1IntentMessageRbmText struct {
6513	// RbmSuggestion: Optional. One or more suggestions to show to the user.
6514	RbmSuggestion []*GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion `json:"rbmSuggestion,omitempty"`
6515
6516	// Text: Required. Text sent and displayed to the user.
6517	Text string `json:"text,omitempty"`
6518
6519	// ForceSendFields is a list of field names (e.g. "RbmSuggestion") to
6520	// unconditionally include in API requests. By default, fields with
6521	// empty values are omitted from API requests. However, any non-pointer,
6522	// non-interface field appearing in ForceSendFields will be sent to the
6523	// server regardless of whether the field is empty or not. This may be
6524	// used to include empty fields in Patch requests.
6525	ForceSendFields []string `json:"-"`
6526
6527	// NullFields is a list of field names (e.g. "RbmSuggestion") to include
6528	// in API requests with the JSON null value. By default, fields with
6529	// empty values are omitted from API requests. However, any field with
6530	// an empty value appearing in NullFields will be sent to the server as
6531	// null. It is an error if a field in this list has a non-empty value.
6532	// This may be used to include null fields in Patch requests.
6533	NullFields []string `json:"-"`
6534}
6535
6536func (s *GoogleCloudDialogflowV2beta1IntentMessageRbmText) MarshalJSON() ([]byte, error) {
6537	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageRbmText
6538	raw := NoMethod(*s)
6539	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6540}
6541
6542// GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo: Additional
6543// info about the select item for when it is triggered in a
6544// dialog.
6545type GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo struct {
6546	// Key: Required. A unique key that will be sent back to the agent if
6547	// this
6548	// response is given.
6549	Key string `json:"key,omitempty"`
6550
6551	// Synonyms: Optional. A list of synonyms that can also be used to
6552	// trigger this
6553	// item in dialog.
6554	Synonyms []string `json:"synonyms,omitempty"`
6555
6556	// ForceSendFields is a list of field names (e.g. "Key") to
6557	// unconditionally include in API requests. By default, fields with
6558	// empty values are omitted from API requests. However, any non-pointer,
6559	// non-interface field appearing in ForceSendFields will be sent to the
6560	// server regardless of whether the field is empty or not. This may be
6561	// used to include empty fields in Patch requests.
6562	ForceSendFields []string `json:"-"`
6563
6564	// NullFields is a list of field names (e.g. "Key") to include in API
6565	// requests with the JSON null value. By default, fields with empty
6566	// values are omitted from API requests. However, any field with an
6567	// empty value appearing in NullFields will be sent to the server as
6568	// null. It is an error if a field in this list has a non-empty value.
6569	// This may be used to include null fields in Patch requests.
6570	NullFields []string `json:"-"`
6571}
6572
6573func (s *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) {
6574	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
6575	raw := NoMethod(*s)
6576	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6577}
6578
6579// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse: The simple
6580// response message containing speech or text.
6581type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse struct {
6582	// DisplayText: Optional. The text to display.
6583	DisplayText string `json:"displayText,omitempty"`
6584
6585	// Ssml: One of text_to_speech or ssml must be provided. Structured
6586	// spoken
6587	// response to the user in the SSML format. Mutually exclusive
6588	// with
6589	// text_to_speech.
6590	Ssml string `json:"ssml,omitempty"`
6591
6592	// TextToSpeech: One of text_to_speech or ssml must be provided. The
6593	// plain text of the
6594	// speech output. Mutually exclusive with ssml.
6595	TextToSpeech string `json:"textToSpeech,omitempty"`
6596
6597	// ForceSendFields is a list of field names (e.g. "DisplayText") to
6598	// unconditionally include in API requests. By default, fields with
6599	// empty values are omitted from API requests. However, any non-pointer,
6600	// non-interface field appearing in ForceSendFields will be sent to the
6601	// server regardless of whether the field is empty or not. This may be
6602	// used to include empty fields in Patch requests.
6603	ForceSendFields []string `json:"-"`
6604
6605	// NullFields is a list of field names (e.g. "DisplayText") to include
6606	// in API requests with the JSON null value. By default, fields with
6607	// empty values are omitted from API requests. However, any field with
6608	// an empty value appearing in NullFields will be sent to the server as
6609	// null. It is an error if a field in this list has a non-empty value.
6610	// This may be used to include null fields in Patch requests.
6611	NullFields []string `json:"-"`
6612}
6613
6614func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) {
6615	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
6616	raw := NoMethod(*s)
6617	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6618}
6619
6620// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses: The
6621// collection of simple response candidates.
6622// This message in `QueryResult.fulfillment_messages`
6623// and
6624// `WebhookResponse.fulfillment_messages` should contain only
6625// one
6626// `SimpleResponse`.
6627type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses struct {
6628	// SimpleResponses: Required. The list of simple responses.
6629	SimpleResponses []*GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse `json:"simpleResponses,omitempty"`
6630
6631	// ForceSendFields is a list of field names (e.g. "SimpleResponses") to
6632	// unconditionally include in API requests. By default, fields with
6633	// empty values are omitted from API requests. However, any non-pointer,
6634	// non-interface field appearing in ForceSendFields will be sent to the
6635	// server regardless of whether the field is empty or not. This may be
6636	// used to include empty fields in Patch requests.
6637	ForceSendFields []string `json:"-"`
6638
6639	// NullFields is a list of field names (e.g. "SimpleResponses") to
6640	// include in API requests with the JSON null value. By default, fields
6641	// with empty values are omitted from API requests. However, any field
6642	// with an empty value appearing in NullFields will be sent to the
6643	// server as null. It is an error if a field in this list has a
6644	// non-empty value. This may be used to include null fields in Patch
6645	// requests.
6646	NullFields []string `json:"-"`
6647}
6648
6649func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) {
6650	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
6651	raw := NoMethod(*s)
6652	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6653}
6654
6655// GoogleCloudDialogflowV2beta1IntentMessageSuggestion: The suggestion
6656// chip message that the user can tap to quickly post a reply
6657// to the conversation.
6658type GoogleCloudDialogflowV2beta1IntentMessageSuggestion struct {
6659	// Title: Required. The text shown the in the suggestion chip.
6660	Title string `json:"title,omitempty"`
6661
6662	// ForceSendFields is a list of field names (e.g. "Title") to
6663	// unconditionally include in API requests. By default, fields with
6664	// empty values are omitted from API requests. However, any non-pointer,
6665	// non-interface field appearing in ForceSendFields will be sent to the
6666	// server regardless of whether the field is empty or not. This may be
6667	// used to include empty fields in Patch requests.
6668	ForceSendFields []string `json:"-"`
6669
6670	// NullFields is a list of field names (e.g. "Title") to include in API
6671	// requests with the JSON null value. By default, fields with empty
6672	// values are omitted from API requests. However, any field with an
6673	// empty value appearing in NullFields will be sent to the server as
6674	// null. It is an error if a field in this list has a non-empty value.
6675	// This may be used to include null fields in Patch requests.
6676	NullFields []string `json:"-"`
6677}
6678
6679func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestion) MarshalJSON() ([]byte, error) {
6680	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestion
6681	raw := NoMethod(*s)
6682	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6683}
6684
6685// GoogleCloudDialogflowV2beta1IntentMessageSuggestions: The collection
6686// of suggestions.
6687type GoogleCloudDialogflowV2beta1IntentMessageSuggestions struct {
6688	// Suggestions: Required. The list of suggested replies.
6689	Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageSuggestion `json:"suggestions,omitempty"`
6690
6691	// ForceSendFields is a list of field names (e.g. "Suggestions") to
6692	// unconditionally include in API requests. By default, fields with
6693	// empty values are omitted from API requests. However, any non-pointer,
6694	// non-interface field appearing in ForceSendFields will be sent to the
6695	// server regardless of whether the field is empty or not. This may be
6696	// used to include empty fields in Patch requests.
6697	ForceSendFields []string `json:"-"`
6698
6699	// NullFields is a list of field names (e.g. "Suggestions") to include
6700	// in API requests with the JSON null value. By default, fields with
6701	// empty values are omitted from API requests. However, any field with
6702	// an empty value appearing in NullFields will be sent to the server as
6703	// null. It is an error if a field in this list has a non-empty value.
6704	// This may be used to include null fields in Patch requests.
6705	NullFields []string `json:"-"`
6706}
6707
6708func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestions) MarshalJSON() ([]byte, error) {
6709	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestions
6710	raw := NoMethod(*s)
6711	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6712}
6713
6714// GoogleCloudDialogflowV2beta1IntentMessageTableCard: Table card for
6715// Actions on Google.
6716type GoogleCloudDialogflowV2beta1IntentMessageTableCard struct {
6717	// Buttons: Optional. List of buttons for the card.
6718	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"`
6719
6720	// ColumnProperties: Optional. Display properties for the columns in
6721	// this table.
6722	ColumnProperties []*GoogleCloudDialogflowV2beta1IntentMessageColumnProperties `json:"columnProperties,omitempty"`
6723
6724	// Image: Optional. Image which should be displayed on the card.
6725	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
6726
6727	// Rows: Optional. Rows in this table of data.
6728	Rows []*GoogleCloudDialogflowV2beta1IntentMessageTableCardRow `json:"rows,omitempty"`
6729
6730	// Subtitle: Optional. Subtitle to the title.
6731	Subtitle string `json:"subtitle,omitempty"`
6732
6733	// Title: Required. Title of the card.
6734	Title string `json:"title,omitempty"`
6735
6736	// ForceSendFields is a list of field names (e.g. "Buttons") to
6737	// unconditionally include in API requests. By default, fields with
6738	// empty values are omitted from API requests. However, any non-pointer,
6739	// non-interface field appearing in ForceSendFields will be sent to the
6740	// server regardless of whether the field is empty or not. This may be
6741	// used to include empty fields in Patch requests.
6742	ForceSendFields []string `json:"-"`
6743
6744	// NullFields is a list of field names (e.g. "Buttons") to include in
6745	// API requests with the JSON null value. By default, fields with empty
6746	// values are omitted from API requests. However, any field with an
6747	// empty value appearing in NullFields will be sent to the server as
6748	// null. It is an error if a field in this list has a non-empty value.
6749	// This may be used to include null fields in Patch requests.
6750	NullFields []string `json:"-"`
6751}
6752
6753func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCard) MarshalJSON() ([]byte, error) {
6754	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCard
6755	raw := NoMethod(*s)
6756	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6757}
6758
6759// GoogleCloudDialogflowV2beta1IntentMessageTableCardCell: Cell of
6760// TableCardRow.
6761type GoogleCloudDialogflowV2beta1IntentMessageTableCardCell struct {
6762	// Text: Required. Text in this cell.
6763	Text string `json:"text,omitempty"`
6764
6765	// ForceSendFields is a list of field names (e.g. "Text") to
6766	// unconditionally include in API requests. By default, fields with
6767	// empty values are omitted from API requests. However, any non-pointer,
6768	// non-interface field appearing in ForceSendFields will be sent to the
6769	// server regardless of whether the field is empty or not. This may be
6770	// used to include empty fields in Patch requests.
6771	ForceSendFields []string `json:"-"`
6772
6773	// NullFields is a list of field names (e.g. "Text") to include in API
6774	// requests with the JSON null value. By default, fields with empty
6775	// values are omitted from API requests. However, any field with an
6776	// empty value appearing in NullFields will be sent to the server as
6777	// null. It is an error if a field in this list has a non-empty value.
6778	// This may be used to include null fields in Patch requests.
6779	NullFields []string `json:"-"`
6780}
6781
6782func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardCell) MarshalJSON() ([]byte, error) {
6783	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardCell
6784	raw := NoMethod(*s)
6785	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6786}
6787
6788// GoogleCloudDialogflowV2beta1IntentMessageTableCardRow: Row of
6789// TableCard.
6790type GoogleCloudDialogflowV2beta1IntentMessageTableCardRow struct {
6791	// Cells: Optional. List of cells that make up this row.
6792	Cells []*GoogleCloudDialogflowV2beta1IntentMessageTableCardCell `json:"cells,omitempty"`
6793
6794	// DividerAfter: Optional. Whether to add a visual divider after this
6795	// row.
6796	DividerAfter bool `json:"dividerAfter,omitempty"`
6797
6798	// ForceSendFields is a list of field names (e.g. "Cells") to
6799	// unconditionally include in API requests. By default, fields with
6800	// empty values are omitted from API requests. However, any non-pointer,
6801	// non-interface field appearing in ForceSendFields will be sent to the
6802	// server regardless of whether the field is empty or not. This may be
6803	// used to include empty fields in Patch requests.
6804	ForceSendFields []string `json:"-"`
6805
6806	// NullFields is a list of field names (e.g. "Cells") to include in API
6807	// requests with the JSON null value. By default, fields with empty
6808	// values are omitted from API requests. However, any field with an
6809	// empty value appearing in NullFields will be sent to the server as
6810	// null. It is an error if a field in this list has a non-empty value.
6811	// This may be used to include null fields in Patch requests.
6812	NullFields []string `json:"-"`
6813}
6814
6815func (s *GoogleCloudDialogflowV2beta1IntentMessageTableCardRow) MarshalJSON() ([]byte, error) {
6816	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTableCardRow
6817	raw := NoMethod(*s)
6818	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6819}
6820
6821// GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio: Plays
6822// audio from a file in Telephony Gateway.
6823type GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio struct {
6824	// AudioUri: Required. URI to a Google Cloud Storage object containing
6825	// the audio to
6826	// play, e.g., "gs://bucket/object". The object must contain a
6827	// single
6828	// channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz.
6829	//
6830	// This object must be readable by the
6831	// `service-<Project
6832	// Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service
6833	// account
6834	// where <Project Number> is the number of the Telephony Gateway
6835	// project
6836	// (usually the same as the Dialogflow agent project). If the Google
6837	// Cloud
6838	// Storage bucket is in the Telephony Gateway project, this permission
6839	// is
6840	// added by default when enabling the Dialogflow V2 API.
6841	//
6842	// For audio from other sources, consider using
6843	// the
6844	// `TelephonySynthesizeSpeech` message with SSML.
6845	AudioUri string `json:"audioUri,omitempty"`
6846
6847	// ForceSendFields is a list of field names (e.g. "AudioUri") to
6848	// unconditionally include in API requests. By default, fields with
6849	// empty values are omitted from API requests. However, any non-pointer,
6850	// non-interface field appearing in ForceSendFields will be sent to the
6851	// server regardless of whether the field is empty or not. This may be
6852	// used to include empty fields in Patch requests.
6853	ForceSendFields []string `json:"-"`
6854
6855	// NullFields is a list of field names (e.g. "AudioUri") to include in
6856	// API requests with the JSON null value. By default, fields with empty
6857	// values are omitted from API requests. However, any field with an
6858	// empty value appearing in NullFields will be sent to the server as
6859	// null. It is an error if a field in this list has a non-empty value.
6860	// This may be used to include null fields in Patch requests.
6861	NullFields []string `json:"-"`
6862}
6863
6864func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio) MarshalJSON() ([]byte, error) {
6865	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
6866	raw := NoMethod(*s)
6867	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6868}
6869
6870// GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech:
6871// Synthesizes speech and plays back the synthesized audio to the caller
6872// in
6873// Telephony Gateway.
6874//
6875// Telephony Gateway takes the synthesizer settings
6876// from
6877// `DetectIntentResponse.output_audio_config` which can either be set
6878// at request-level or can come from the agent-level synthesizer config.
6879type GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech struct {
6880	// Ssml: The SSML to be synthesized. For more information,
6881	// see
6882	// [SSML](https://developers.google.com/actions/reference/ssml).
6883	Ssml string `json:"ssml,omitempty"`
6884
6885	// Text: The raw text to be synthesized.
6886	Text string `json:"text,omitempty"`
6887
6888	// ForceSendFields is a list of field names (e.g. "Ssml") to
6889	// unconditionally include in API requests. By default, fields with
6890	// empty values are omitted from API requests. However, any non-pointer,
6891	// non-interface field appearing in ForceSendFields will be sent to the
6892	// server regardless of whether the field is empty or not. This may be
6893	// used to include empty fields in Patch requests.
6894	ForceSendFields []string `json:"-"`
6895
6896	// NullFields is a list of field names (e.g. "Ssml") to include in API
6897	// requests with the JSON null value. By default, fields with empty
6898	// values are omitted from API requests. However, any field with an
6899	// empty value appearing in NullFields will be sent to the server as
6900	// null. It is an error if a field in this list has a non-empty value.
6901	// This may be used to include null fields in Patch requests.
6902	NullFields []string `json:"-"`
6903}
6904
6905func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech) MarshalJSON() ([]byte, error) {
6906	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
6907	raw := NoMethod(*s)
6908	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6909}
6910
6911// GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall:
6912// Transfers the call in Telephony Gateway.
6913type GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall struct {
6914	// PhoneNumber: Required. The phone number to transfer the call to
6915	// in [E.164 format](https://en.wikipedia.org/wiki/E.164).
6916	//
6917	// We currently only allow transferring to US numbers (+1xxxyyyzzzz).
6918	PhoneNumber string `json:"phoneNumber,omitempty"`
6919
6920	// ForceSendFields is a list of field names (e.g. "PhoneNumber") to
6921	// unconditionally include in API requests. By default, fields with
6922	// empty values are omitted from API requests. However, any non-pointer,
6923	// non-interface field appearing in ForceSendFields will be sent to the
6924	// server regardless of whether the field is empty or not. This may be
6925	// used to include empty fields in Patch requests.
6926	ForceSendFields []string `json:"-"`
6927
6928	// NullFields is a list of field names (e.g. "PhoneNumber") to include
6929	// in API requests with the JSON null value. By default, fields with
6930	// empty values are omitted from API requests. However, any field with
6931	// an empty value appearing in NullFields will be sent to the server as
6932	// null. It is an error if a field in this list has a non-empty value.
6933	// This may be used to include null fields in Patch requests.
6934	NullFields []string `json:"-"`
6935}
6936
6937func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall) MarshalJSON() ([]byte, error) {
6938	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
6939	raw := NoMethod(*s)
6940	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6941}
6942
6943// GoogleCloudDialogflowV2beta1IntentMessageText: The text response
6944// message.
6945type GoogleCloudDialogflowV2beta1IntentMessageText struct {
6946	// Text: Optional. The collection of the agent's responses.
6947	Text []string `json:"text,omitempty"`
6948
6949	// ForceSendFields is a list of field names (e.g. "Text") to
6950	// unconditionally include in API requests. By default, fields with
6951	// empty values are omitted from API requests. However, any non-pointer,
6952	// non-interface field appearing in ForceSendFields will be sent to the
6953	// server regardless of whether the field is empty or not. This may be
6954	// used to include empty fields in Patch requests.
6955	ForceSendFields []string `json:"-"`
6956
6957	// NullFields is a list of field names (e.g. "Text") to include in API
6958	// requests with the JSON null value. By default, fields with empty
6959	// values are omitted from API requests. However, any field with an
6960	// empty value appearing in NullFields will be sent to the server as
6961	// null. It is an error if a field in this list has a non-empty value.
6962	// This may be used to include null fields in Patch requests.
6963	NullFields []string `json:"-"`
6964}
6965
6966func (s *GoogleCloudDialogflowV2beta1IntentMessageText) MarshalJSON() ([]byte, error) {
6967	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageText
6968	raw := NoMethod(*s)
6969	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6970}
6971
6972// GoogleCloudDialogflowV2beta1IntentParameter: Represents intent
6973// parameters.
6974type GoogleCloudDialogflowV2beta1IntentParameter struct {
6975	// DefaultValue: Optional. The default value to use when the `value`
6976	// yields an empty
6977	// result.
6978	// Default values can be extracted from contexts by using the
6979	// following
6980	// syntax: `#context_name.parameter_name`.
6981	DefaultValue string `json:"defaultValue,omitempty"`
6982
6983	// DisplayName: Required. The name of the parameter.
6984	DisplayName string `json:"displayName,omitempty"`
6985
6986	// EntityTypeDisplayName: Optional. The name of the entity type,
6987	// prefixed with `@`, that
6988	// describes values of the parameter. If the parameter is
6989	// required, this must be provided.
6990	EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"`
6991
6992	// IsList: Optional. Indicates whether the parameter represents a list
6993	// of values.
6994	IsList bool `json:"isList,omitempty"`
6995
6996	// Mandatory: Optional. Indicates whether the parameter is required.
6997	// That is,
6998	// whether the intent cannot be completed without collecting the
6999	// parameter
7000	// value.
7001	Mandatory bool `json:"mandatory,omitempty"`
7002
7003	// Name: The unique identifier of this parameter.
7004	Name string `json:"name,omitempty"`
7005
7006	// Prompts: Optional. The collection of prompts that the agent can
7007	// present to the
7008	// user in order to collect a value for the parameter.
7009	Prompts []string `json:"prompts,omitempty"`
7010
7011	// Value: Optional. The definition of the parameter value. It can be:
7012	// - a constant string,
7013	// - a parameter value defined as `$parameter_name`,
7014	// - an original parameter value defined as
7015	// `$parameter_name.original`,
7016	// - a parameter value from some context defined as
7017	//   `#context_name.parameter_name`.
7018	Value string `json:"value,omitempty"`
7019
7020	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
7021	// unconditionally include in API requests. By default, fields with
7022	// empty values are omitted from API requests. However, any non-pointer,
7023	// non-interface field appearing in ForceSendFields will be sent to the
7024	// server regardless of whether the field is empty or not. This may be
7025	// used to include empty fields in Patch requests.
7026	ForceSendFields []string `json:"-"`
7027
7028	// NullFields is a list of field names (e.g. "DefaultValue") to include
7029	// in API requests with the JSON null value. By default, fields with
7030	// empty values are omitted from API requests. However, any field with
7031	// an empty value appearing in NullFields will be sent to the server as
7032	// null. It is an error if a field in this list has a non-empty value.
7033	// This may be used to include null fields in Patch requests.
7034	NullFields []string `json:"-"`
7035}
7036
7037func (s *GoogleCloudDialogflowV2beta1IntentParameter) MarshalJSON() ([]byte, error) {
7038	type NoMethod GoogleCloudDialogflowV2beta1IntentParameter
7039	raw := NoMethod(*s)
7040	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7041}
7042
7043// GoogleCloudDialogflowV2beta1IntentTrainingPhrase: Represents an
7044// example that the agent is trained on.
7045type GoogleCloudDialogflowV2beta1IntentTrainingPhrase struct {
7046	// Name: Output only. The unique identifier of this training phrase.
7047	Name string `json:"name,omitempty"`
7048
7049	// Parts: Required. The ordered list of training phrase parts.
7050	// The parts are concatenated in order to form the training
7051	// phrase.
7052	//
7053	// Note: The API does not automatically annotate training phrases like
7054	// the
7055	// Dialogflow Console does.
7056	//
7057	// Note: Do not forget to include whitespace at part boundaries,
7058	// so the training phrase is well formatted when the parts are
7059	// concatenated.
7060	//
7061	// If the training phrase does not need to be annotated with
7062	// parameters,
7063	// you just need a single part with only the Part.text field set.
7064	//
7065	// If you want to annotate the training phrase, you must create
7066	// multiple
7067	// parts, where the fields of each part are populated in one of two
7068	// ways:
7069	//
7070	// -   `Part.text` is set to a part of the phrase that has no
7071	// parameters.
7072	// -   `Part.text` is set to a part of the phrase that you want to
7073	// annotate,
7074	//     and the `entity_type`, `alias`, and `user_defined` fields are
7075	// all
7076	//     set.
7077	Parts []*GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart `json:"parts,omitempty"`
7078
7079	// TimesAddedCount: Optional. Indicates how many times this example was
7080	// added to
7081	// the intent. Each time a developer adds an existing sample by editing
7082	// an
7083	// intent or training, this counter is increased.
7084	TimesAddedCount int64 `json:"timesAddedCount,omitempty"`
7085
7086	// Type: Required. The type of the training phrase.
7087	//
7088	// Possible values:
7089	//   "TYPE_UNSPECIFIED" - Not specified. This value should never be
7090	// used.
7091	//   "EXAMPLE" - Examples do not contain @-prefixed entity type names,
7092	// but example parts
7093	// can be annotated with entity types.
7094	//   "TEMPLATE" - Templates are not annotated with entity types, but
7095	// they can contain
7096	// @-prefixed entity type names as substrings.
7097	// Template mode has been deprecated. Example mode is the only
7098	// supported
7099	// way to create new training phrases. If you have existing
7100	// training
7101	// phrases that you've created in template mode, those will continue
7102	// to
7103	// work.
7104	Type string `json:"type,omitempty"`
7105
7106	// ForceSendFields is a list of field names (e.g. "Name") to
7107	// unconditionally include in API requests. By default, fields with
7108	// empty values are omitted from API requests. However, any non-pointer,
7109	// non-interface field appearing in ForceSendFields will be sent to the
7110	// server regardless of whether the field is empty or not. This may be
7111	// used to include empty fields in Patch requests.
7112	ForceSendFields []string `json:"-"`
7113
7114	// NullFields is a list of field names (e.g. "Name") to include in API
7115	// requests with the JSON null value. By default, fields with empty
7116	// values are omitted from API requests. However, any field with an
7117	// empty value appearing in NullFields will be sent to the server as
7118	// null. It is an error if a field in this list has a non-empty value.
7119	// This may be used to include null fields in Patch requests.
7120	NullFields []string `json:"-"`
7121}
7122
7123func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
7124	type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrase
7125	raw := NoMethod(*s)
7126	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7127}
7128
7129// GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart: Represents a
7130// part of a training phrase.
7131type GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart struct {
7132	// Alias: Optional. The parameter name for the value extracted from
7133	// the
7134	// annotated part of the example.
7135	// This field is required for annotated parts of the training phrase.
7136	Alias string `json:"alias,omitempty"`
7137
7138	// EntityType: Optional. The entity type name prefixed with `@`.
7139	// This field is required for annotated parts of the training phrase.
7140	EntityType string `json:"entityType,omitempty"`
7141
7142	// Text: Required. The text for this part.
7143	Text string `json:"text,omitempty"`
7144
7145	// UserDefined: Optional. Indicates whether the text was manually
7146	// annotated.
7147	// This field is set to true when the Dialogflow Console is used
7148	// to
7149	// manually annotate the part. When creating an annotated part with
7150	// the
7151	// API, you must set this to true.
7152	UserDefined bool `json:"userDefined,omitempty"`
7153
7154	// ForceSendFields is a list of field names (e.g. "Alias") to
7155	// unconditionally include in API requests. By default, fields with
7156	// empty values are omitted from API requests. However, any non-pointer,
7157	// non-interface field appearing in ForceSendFields will be sent to the
7158	// server regardless of whether the field is empty or not. This may be
7159	// used to include empty fields in Patch requests.
7160	ForceSendFields []string `json:"-"`
7161
7162	// NullFields is a list of field names (e.g. "Alias") to include in API
7163	// requests with the JSON null value. By default, fields with empty
7164	// values are omitted from API requests. However, any field with an
7165	// empty value appearing in NullFields will be sent to the server as
7166	// null. It is an error if a field in this list has a non-empty value.
7167	// This may be used to include null fields in Patch requests.
7168	NullFields []string `json:"-"`
7169}
7170
7171func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
7172	type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
7173	raw := NoMethod(*s)
7174	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7175}
7176
7177// GoogleCloudDialogflowV2beta1KnowledgeAnswers: Represents the result
7178// of querying a Knowledge base.
7179type GoogleCloudDialogflowV2beta1KnowledgeAnswers struct {
7180	// Answers: A list of answers from Knowledge Connector.
7181	Answers []*GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer `json:"answers,omitempty"`
7182
7183	// ForceSendFields is a list of field names (e.g. "Answers") to
7184	// unconditionally include in API requests. By default, fields with
7185	// empty values are omitted from API requests. However, any non-pointer,
7186	// non-interface field appearing in ForceSendFields will be sent to the
7187	// server regardless of whether the field is empty or not. This may be
7188	// used to include empty fields in Patch requests.
7189	ForceSendFields []string `json:"-"`
7190
7191	// NullFields is a list of field names (e.g. "Answers") to include in
7192	// API requests with the JSON null value. By default, fields with empty
7193	// values are omitted from API requests. However, any field with an
7194	// empty value appearing in NullFields will be sent to the server as
7195	// null. It is an error if a field in this list has a non-empty value.
7196	// This may be used to include null fields in Patch requests.
7197	NullFields []string `json:"-"`
7198}
7199
7200func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswers) MarshalJSON() ([]byte, error) {
7201	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswers
7202	raw := NoMethod(*s)
7203	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7204}
7205
7206// GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer: An answer from
7207// Knowledge Connector.
7208type GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer struct {
7209	// Answer: The piece of text from the `source` knowledge base document
7210	// that answers
7211	// this conversational query.
7212	Answer string `json:"answer,omitempty"`
7213
7214	// FaqQuestion: The corresponding FAQ question if the answer was
7215	// extracted from a FAQ
7216	// Document, empty otherwise.
7217	FaqQuestion string `json:"faqQuestion,omitempty"`
7218
7219	// MatchConfidence: The system's confidence score that this Knowledge
7220	// answer is a good match
7221	// for this conversational query.
7222	// The range is from 0.0 (completely uncertain) to 1.0 (completely
7223	// certain).
7224	// Note: The confidence score is likely to vary somewhat (possibly even
7225	// for
7226	// identical requests), as the underlying model is under
7227	// constant
7228	// improvement. It may be deprecated in the future. We recommend
7229	// using
7230	// `match_confidence_level` which should be generally more stable.
7231	MatchConfidence float64 `json:"matchConfidence,omitempty"`
7232
7233	// MatchConfidenceLevel: The system's confidence level that this
7234	// knowledge answer is a good match
7235	// for this conversational query.
7236	// NOTE: The confidence level for a given `<query, answer>` pair may
7237	// change
7238	// without notice, as it depends on models that are constantly
7239	// being
7240	// improved. However, it will change less frequently than the
7241	// confidence
7242	// score below, and should be preferred for referencing the quality of
7243	// an
7244	// answer.
7245	//
7246	// Possible values:
7247	//   "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED" - Not specified.
7248	//   "LOW" - Indicates that the confidence is low.
7249	//   "MEDIUM" - Indicates our confidence is medium.
7250	//   "HIGH" - Indicates our confidence is high.
7251	MatchConfidenceLevel string `json:"matchConfidenceLevel,omitempty"`
7252
7253	// Source: Indicates which Knowledge Document this answer was extracted
7254	// from.
7255	// Format: `projects/<Project ID>/knowledgeBases/<Knowledge
7256	// Base
7257	// ID>/documents/<Document ID>`.
7258	Source string `json:"source,omitempty"`
7259
7260	// ForceSendFields is a list of field names (e.g. "Answer") to
7261	// unconditionally include in API requests. By default, fields with
7262	// empty values are omitted from API requests. However, any non-pointer,
7263	// non-interface field appearing in ForceSendFields will be sent to the
7264	// server regardless of whether the field is empty or not. This may be
7265	// used to include empty fields in Patch requests.
7266	ForceSendFields []string `json:"-"`
7267
7268	// NullFields is a list of field names (e.g. "Answer") to include in API
7269	// requests with the JSON null value. By default, fields with empty
7270	// values are omitted from API requests. However, any field with an
7271	// empty value appearing in NullFields will be sent to the server as
7272	// null. It is an error if a field in this list has a non-empty value.
7273	// This may be used to include null fields in Patch requests.
7274	NullFields []string `json:"-"`
7275}
7276
7277func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) MarshalJSON() ([]byte, error) {
7278	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
7279	raw := NoMethod(*s)
7280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7281}
7282
7283func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) UnmarshalJSON(data []byte) error {
7284	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
7285	var s1 struct {
7286		MatchConfidence gensupport.JSONFloat64 `json:"matchConfidence"`
7287		*NoMethod
7288	}
7289	s1.NoMethod = (*NoMethod)(s)
7290	if err := json.Unmarshal(data, &s1); err != nil {
7291		return err
7292	}
7293	s.MatchConfidence = float64(s1.MatchConfidence)
7294	return nil
7295}
7296
7297// GoogleCloudDialogflowV2beta1KnowledgeBase: Represents knowledge base
7298// resource.
7299//
7300// Note: The `projects.agent.knowledgeBases` resource is
7301// deprecated;
7302// only use `projects.knowledgeBases`.
7303type GoogleCloudDialogflowV2beta1KnowledgeBase struct {
7304	// DisplayName: Required. The display name of the knowledge base. The
7305	// name must be 1024
7306	// bytes or less; otherwise, the creation request fails.
7307	DisplayName string `json:"displayName,omitempty"`
7308
7309	// LanguageCode: Language which represents the KnowledgeBase. When the
7310	// KnowledgeBase is
7311	// created/updated, this is populated for all non en-us languages. If
7312	// not
7313	// populated, the default language en-us applies.
7314	LanguageCode string `json:"languageCode,omitempty"`
7315
7316	// Name: The knowledge base resource name.
7317	// The name must be empty when creating a knowledge base.
7318	// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
7319	Name string `json:"name,omitempty"`
7320
7321	// ServerResponse contains the HTTP response code and headers from the
7322	// server.
7323	googleapi.ServerResponse `json:"-"`
7324
7325	// ForceSendFields is a list of field names (e.g. "DisplayName") to
7326	// unconditionally include in API requests. By default, fields with
7327	// empty values are omitted from API requests. However, any non-pointer,
7328	// non-interface field appearing in ForceSendFields will be sent to the
7329	// server regardless of whether the field is empty or not. This may be
7330	// used to include empty fields in Patch requests.
7331	ForceSendFields []string `json:"-"`
7332
7333	// NullFields is a list of field names (e.g. "DisplayName") to include
7334	// in API requests with the JSON null value. By default, fields with
7335	// empty values are omitted from API requests. However, any field with
7336	// an empty value appearing in NullFields will be sent to the server as
7337	// null. It is an error if a field in this list has a non-empty value.
7338	// This may be used to include null fields in Patch requests.
7339	NullFields []string `json:"-"`
7340}
7341
7342func (s *GoogleCloudDialogflowV2beta1KnowledgeBase) MarshalJSON() ([]byte, error) {
7343	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeBase
7344	raw := NoMethod(*s)
7345	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7346}
7347
7348// GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata: Metadata in
7349// google::longrunning::Operation for Knowledge operations.
7350type GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata struct {
7351	// State: Required. The current state of this operation.
7352	//
7353	// Possible values:
7354	//   "STATE_UNSPECIFIED" - State unspecified.
7355	//   "PENDING" - The operation has been created.
7356	//   "RUNNING" - The operation is currently running.
7357	//   "DONE" - The operation is done, either cancelled or completed.
7358	State string `json:"state,omitempty"`
7359
7360	// ForceSendFields is a list of field names (e.g. "State") to
7361	// unconditionally include in API requests. By default, fields with
7362	// empty values are omitted from API requests. However, any non-pointer,
7363	// non-interface field appearing in ForceSendFields will be sent to the
7364	// server regardless of whether the field is empty or not. This may be
7365	// used to include empty fields in Patch requests.
7366	ForceSendFields []string `json:"-"`
7367
7368	// NullFields is a list of field names (e.g. "State") to include in API
7369	// requests with the JSON null value. By default, fields with empty
7370	// values are omitted from API requests. However, any field with an
7371	// empty value appearing in NullFields will be sent to the server as
7372	// null. It is an error if a field in this list has a non-empty value.
7373	// This may be used to include null fields in Patch requests.
7374	NullFields []string `json:"-"`
7375}
7376
7377func (s *GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata) MarshalJSON() ([]byte, error) {
7378	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
7379	raw := NoMethod(*s)
7380	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7381}
7382
7383// GoogleCloudDialogflowV2beta1LabelConversationResponse: The response
7384// for
7385// ConversationDatasets.LabelConversation.
7386type GoogleCloudDialogflowV2beta1LabelConversationResponse struct {
7387	// AnnotatedConversationDataset: New annotated conversation dataset
7388	// created by the labeling task.
7389	AnnotatedConversationDataset *GoogleCloudDialogflowV2beta1AnnotatedConversationDataset `json:"annotatedConversationDataset,omitempty"`
7390
7391	// ForceSendFields is a list of field names (e.g.
7392	// "AnnotatedConversationDataset") to unconditionally include in API
7393	// requests. By default, fields with empty values are omitted from API
7394	// requests. However, any non-pointer, non-interface field appearing in
7395	// ForceSendFields will be sent to the server regardless of whether the
7396	// field is empty or not. This may be used to include empty fields in
7397	// Patch requests.
7398	ForceSendFields []string `json:"-"`
7399
7400	// NullFields is a list of field names (e.g.
7401	// "AnnotatedConversationDataset") to include in API requests with the
7402	// JSON null value. By default, fields with empty values are omitted
7403	// from API requests. However, any field with an empty value appearing
7404	// in NullFields will be sent to the server as null. It is an error if a
7405	// field in this list has a non-empty value. This may be used to include
7406	// null fields in Patch requests.
7407	NullFields []string `json:"-"`
7408}
7409
7410func (s *GoogleCloudDialogflowV2beta1LabelConversationResponse) MarshalJSON() ([]byte, error) {
7411	type NoMethod GoogleCloudDialogflowV2beta1LabelConversationResponse
7412	raw := NoMethod(*s)
7413	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7414}
7415
7416// GoogleCloudDialogflowV2beta1ListContextsResponse: The response
7417// message for Contexts.ListContexts.
7418type GoogleCloudDialogflowV2beta1ListContextsResponse struct {
7419	// Contexts: The list of contexts. There will be a maximum number of
7420	// items
7421	// returned based on the page_size field in the request.
7422	Contexts []*GoogleCloudDialogflowV2beta1Context `json:"contexts,omitempty"`
7423
7424	// NextPageToken: Token to retrieve the next page of results, or empty
7425	// if there are no
7426	// more results in the list.
7427	NextPageToken string `json:"nextPageToken,omitempty"`
7428
7429	// ServerResponse contains the HTTP response code and headers from the
7430	// server.
7431	googleapi.ServerResponse `json:"-"`
7432
7433	// ForceSendFields is a list of field names (e.g. "Contexts") to
7434	// unconditionally include in API requests. By default, fields with
7435	// empty values are omitted from API requests. However, any non-pointer,
7436	// non-interface field appearing in ForceSendFields will be sent to the
7437	// server regardless of whether the field is empty or not. This may be
7438	// used to include empty fields in Patch requests.
7439	ForceSendFields []string `json:"-"`
7440
7441	// NullFields is a list of field names (e.g. "Contexts") to include in
7442	// API requests with the JSON null value. By default, fields with empty
7443	// values are omitted from API requests. However, any field with an
7444	// empty value appearing in NullFields will be sent to the server as
7445	// null. It is an error if a field in this list has a non-empty value.
7446	// This may be used to include null fields in Patch requests.
7447	NullFields []string `json:"-"`
7448}
7449
7450func (s *GoogleCloudDialogflowV2beta1ListContextsResponse) MarshalJSON() ([]byte, error) {
7451	type NoMethod GoogleCloudDialogflowV2beta1ListContextsResponse
7452	raw := NoMethod(*s)
7453	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7454}
7455
7456// GoogleCloudDialogflowV2beta1ListDocumentsResponse: Response message
7457// for Documents.ListDocuments.
7458type GoogleCloudDialogflowV2beta1ListDocumentsResponse struct {
7459	// Documents: The list of documents.
7460	Documents []*GoogleCloudDialogflowV2beta1Document `json:"documents,omitempty"`
7461
7462	// NextPageToken: Token to retrieve the next page of results, or empty
7463	// if there are no
7464	// more results in the list.
7465	NextPageToken string `json:"nextPageToken,omitempty"`
7466
7467	// ServerResponse contains the HTTP response code and headers from the
7468	// server.
7469	googleapi.ServerResponse `json:"-"`
7470
7471	// ForceSendFields is a list of field names (e.g. "Documents") to
7472	// unconditionally include in API requests. By default, fields with
7473	// empty values are omitted from API requests. However, any non-pointer,
7474	// non-interface field appearing in ForceSendFields will be sent to the
7475	// server regardless of whether the field is empty or not. This may be
7476	// used to include empty fields in Patch requests.
7477	ForceSendFields []string `json:"-"`
7478
7479	// NullFields is a list of field names (e.g. "Documents") to include in
7480	// API requests with the JSON null value. By default, fields with empty
7481	// values are omitted from API requests. However, any field with an
7482	// empty value appearing in NullFields will be sent to the server as
7483	// null. It is an error if a field in this list has a non-empty value.
7484	// This may be used to include null fields in Patch requests.
7485	NullFields []string `json:"-"`
7486}
7487
7488func (s *GoogleCloudDialogflowV2beta1ListDocumentsResponse) MarshalJSON() ([]byte, error) {
7489	type NoMethod GoogleCloudDialogflowV2beta1ListDocumentsResponse
7490	raw := NoMethod(*s)
7491	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7492}
7493
7494// GoogleCloudDialogflowV2beta1ListEntityTypesResponse: The response
7495// message for EntityTypes.ListEntityTypes.
7496type GoogleCloudDialogflowV2beta1ListEntityTypesResponse struct {
7497	// EntityTypes: The list of agent entity types. There will be a maximum
7498	// number of items
7499	// returned based on the page_size field in the request.
7500	EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
7501
7502	// NextPageToken: Token to retrieve the next page of results, or empty
7503	// if there are no
7504	// more results in the list.
7505	NextPageToken string `json:"nextPageToken,omitempty"`
7506
7507	// ServerResponse contains the HTTP response code and headers from the
7508	// server.
7509	googleapi.ServerResponse `json:"-"`
7510
7511	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
7512	// unconditionally include in API requests. By default, fields with
7513	// empty values are omitted from API requests. However, any non-pointer,
7514	// non-interface field appearing in ForceSendFields will be sent to the
7515	// server regardless of whether the field is empty or not. This may be
7516	// used to include empty fields in Patch requests.
7517	ForceSendFields []string `json:"-"`
7518
7519	// NullFields is a list of field names (e.g. "EntityTypes") to include
7520	// in API requests with the JSON null value. By default, fields with
7521	// empty values are omitted from API requests. However, any field with
7522	// an empty value appearing in NullFields will be sent to the server as
7523	// null. It is an error if a field in this list has a non-empty value.
7524	// This may be used to include null fields in Patch requests.
7525	NullFields []string `json:"-"`
7526}
7527
7528func (s *GoogleCloudDialogflowV2beta1ListEntityTypesResponse) MarshalJSON() ([]byte, error) {
7529	type NoMethod GoogleCloudDialogflowV2beta1ListEntityTypesResponse
7530	raw := NoMethod(*s)
7531	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7532}
7533
7534// GoogleCloudDialogflowV2beta1ListIntentsResponse: The response message
7535// for Intents.ListIntents.
7536type GoogleCloudDialogflowV2beta1ListIntentsResponse struct {
7537	// Intents: The list of agent intents. There will be a maximum number of
7538	// items
7539	// returned based on the page_size field in the request.
7540	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
7541
7542	// NextPageToken: Token to retrieve the next page of results, or empty
7543	// if there are no
7544	// more results in the list.
7545	NextPageToken string `json:"nextPageToken,omitempty"`
7546
7547	// ServerResponse contains the HTTP response code and headers from the
7548	// server.
7549	googleapi.ServerResponse `json:"-"`
7550
7551	// ForceSendFields is a list of field names (e.g. "Intents") to
7552	// unconditionally include in API requests. By default, fields with
7553	// empty values are omitted from API requests. However, any non-pointer,
7554	// non-interface field appearing in ForceSendFields will be sent to the
7555	// server regardless of whether the field is empty or not. This may be
7556	// used to include empty fields in Patch requests.
7557	ForceSendFields []string `json:"-"`
7558
7559	// NullFields is a list of field names (e.g. "Intents") to include in
7560	// API requests with the JSON null value. By default, fields with empty
7561	// values are omitted from API requests. However, any field with an
7562	// empty value appearing in NullFields will be sent to the server as
7563	// null. It is an error if a field in this list has a non-empty value.
7564	// This may be used to include null fields in Patch requests.
7565	NullFields []string `json:"-"`
7566}
7567
7568func (s *GoogleCloudDialogflowV2beta1ListIntentsResponse) MarshalJSON() ([]byte, error) {
7569	type NoMethod GoogleCloudDialogflowV2beta1ListIntentsResponse
7570	raw := NoMethod(*s)
7571	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7572}
7573
7574// GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse: Response
7575// message for KnowledgeBases.ListKnowledgeBases.
7576type GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse struct {
7577	// KnowledgeBases: The list of knowledge bases.
7578	KnowledgeBases []*GoogleCloudDialogflowV2beta1KnowledgeBase `json:"knowledgeBases,omitempty"`
7579
7580	// NextPageToken: Token to retrieve the next page of results, or empty
7581	// if there are no
7582	// more results in the list.
7583	NextPageToken string `json:"nextPageToken,omitempty"`
7584
7585	// ServerResponse contains the HTTP response code and headers from the
7586	// server.
7587	googleapi.ServerResponse `json:"-"`
7588
7589	// ForceSendFields is a list of field names (e.g. "KnowledgeBases") to
7590	// unconditionally include in API requests. By default, fields with
7591	// empty values are omitted from API requests. However, any non-pointer,
7592	// non-interface field appearing in ForceSendFields will be sent to the
7593	// server regardless of whether the field is empty or not. This may be
7594	// used to include empty fields in Patch requests.
7595	ForceSendFields []string `json:"-"`
7596
7597	// NullFields is a list of field names (e.g. "KnowledgeBases") to
7598	// include in API requests with the JSON null value. By default, fields
7599	// with empty values are omitted from API requests. However, any field
7600	// with an empty value appearing in NullFields will be sent to the
7601	// server as null. It is an error if a field in this list has a
7602	// non-empty value. This may be used to include null fields in Patch
7603	// requests.
7604	NullFields []string `json:"-"`
7605}
7606
7607func (s *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse) MarshalJSON() ([]byte, error) {
7608	type NoMethod GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse
7609	raw := NoMethod(*s)
7610	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7611}
7612
7613// GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse: The
7614// response message for SessionEntityTypes.ListSessionEntityTypes.
7615type GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse struct {
7616	// NextPageToken: Token to retrieve the next page of results, or empty
7617	// if there are no
7618	// more results in the list.
7619	NextPageToken string `json:"nextPageToken,omitempty"`
7620
7621	// SessionEntityTypes: The list of session entity types. There will be a
7622	// maximum number of items
7623	// returned based on the page_size field in the request.
7624	SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"`
7625
7626	// ServerResponse contains the HTTP response code and headers from the
7627	// server.
7628	googleapi.ServerResponse `json:"-"`
7629
7630	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
7631	// unconditionally include in API requests. By default, fields with
7632	// empty values are omitted from API requests. However, any non-pointer,
7633	// non-interface field appearing in ForceSendFields will be sent to the
7634	// server regardless of whether the field is empty or not. This may be
7635	// used to include empty fields in Patch requests.
7636	ForceSendFields []string `json:"-"`
7637
7638	// NullFields is a list of field names (e.g. "NextPageToken") to include
7639	// in API requests with the JSON null value. By default, fields with
7640	// empty values are omitted from API requests. However, any field with
7641	// an empty value appearing in NullFields will be sent to the server as
7642	// null. It is an error if a field in this list has a non-empty value.
7643	// This may be used to include null fields in Patch requests.
7644	NullFields []string `json:"-"`
7645}
7646
7647func (s *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) MarshalJSON() ([]byte, error) {
7648	type NoMethod GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse
7649	raw := NoMethod(*s)
7650	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7651}
7652
7653// GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest: Represents
7654// the contents of the original request that was passed to
7655// the `[Streaming]DetectIntent` call.
7656type GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest struct {
7657	// Payload: Optional. This field is set to the value of the
7658	// `QueryParameters.payload`
7659	// field passed in the request. Some integrations that query a
7660	// Dialogflow
7661	// agent may provide additional information in the payload.
7662	//
7663	// In particular for the Telephony Gateway this field has the
7664	// form:
7665	// <pre>{
7666	//  "telephony": {
7667	//    "caller_id": "+18558363987"
7668	//  }
7669	// }</pre>
7670	// Note: The caller ID field (`caller_id`) will be redacted for
7671	// Standard
7672	// Edition agents and populated with the caller ID in
7673	// [E.164
7674	// format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition
7675	// agents.
7676	Payload googleapi.RawMessage `json:"payload,omitempty"`
7677
7678	// Source: The source of this request, e.g., `google`, `facebook`,
7679	// `slack`. It is set
7680	// by Dialogflow-owned servers.
7681	Source string `json:"source,omitempty"`
7682
7683	// Version: Optional. The version of the protocol used for this
7684	// request.
7685	// This field is AoG-specific.
7686	Version string `json:"version,omitempty"`
7687
7688	// ForceSendFields is a list of field names (e.g. "Payload") to
7689	// unconditionally include in API requests. By default, fields with
7690	// empty values are omitted from API requests. However, any non-pointer,
7691	// non-interface field appearing in ForceSendFields will be sent to the
7692	// server regardless of whether the field is empty or not. This may be
7693	// used to include empty fields in Patch requests.
7694	ForceSendFields []string `json:"-"`
7695
7696	// NullFields is a list of field names (e.g. "Payload") to include in
7697	// API requests with the JSON null value. By default, fields with empty
7698	// values are omitted from API requests. However, any field with an
7699	// empty value appearing in NullFields will be sent to the server as
7700	// null. It is an error if a field in this list has a non-empty value.
7701	// This may be used to include null fields in Patch requests.
7702	NullFields []string `json:"-"`
7703}
7704
7705func (s *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) {
7706	type NoMethod GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
7707	raw := NoMethod(*s)
7708	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7709}
7710
7711// GoogleCloudDialogflowV2beta1OutputAudioConfig: Instructs the speech
7712// synthesizer how to generate the output audio content.
7713// If this audio config is supplied in a request, it overrides all
7714// existing
7715// text-to-speech settings applied to the agent.
7716type GoogleCloudDialogflowV2beta1OutputAudioConfig struct {
7717	// AudioEncoding: Required. Audio encoding of the synthesized audio
7718	// content.
7719	//
7720	// Possible values:
7721	//   "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" - Not specified.
7722	//   "OUTPUT_AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
7723	// little-endian samples (Linear PCM).
7724	// Audio content returned as LINEAR16 also contains a WAV header.
7725	//   "OUTPUT_AUDIO_ENCODING_MP3" - MP3 audio at 32kbps.
7726	//   "OUTPUT_AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio wrapped in an
7727	// ogg container. The result will be a
7728	// file which can be played natively on Android, and in browsers (at
7729	// least
7730	// Chrome and Firefox). The quality of the encoding is considerably
7731	// higher
7732	// than MP3 while using approximately the same bitrate.
7733	AudioEncoding string `json:"audioEncoding,omitempty"`
7734
7735	// SampleRateHertz: The synthesis sample rate (in hertz) for this audio.
7736	// If not
7737	// provided, then the synthesizer will use the default sample rate based
7738	// on
7739	// the audio encoding. If this is different from the voice's natural
7740	// sample
7741	// rate, then the synthesizer will honor this request by converting to
7742	// the
7743	// desired sample rate (which might result in worse audio quality).
7744	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
7745
7746	// SynthesizeSpeechConfig: Configuration of how speech should be
7747	// synthesized.
7748	SynthesizeSpeechConfig *GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig `json:"synthesizeSpeechConfig,omitempty"`
7749
7750	// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
7751	// unconditionally include in API requests. By default, fields with
7752	// empty values are omitted from API requests. However, any non-pointer,
7753	// non-interface field appearing in ForceSendFields will be sent to the
7754	// server regardless of whether the field is empty or not. This may be
7755	// used to include empty fields in Patch requests.
7756	ForceSendFields []string `json:"-"`
7757
7758	// NullFields is a list of field names (e.g. "AudioEncoding") to include
7759	// in API requests with the JSON null value. By default, fields with
7760	// empty values are omitted from API requests. However, any field with
7761	// an empty value appearing in NullFields will be sent to the server as
7762	// null. It is an error if a field in this list has a non-empty value.
7763	// This may be used to include null fields in Patch requests.
7764	NullFields []string `json:"-"`
7765}
7766
7767func (s *GoogleCloudDialogflowV2beta1OutputAudioConfig) MarshalJSON() ([]byte, error) {
7768	type NoMethod GoogleCloudDialogflowV2beta1OutputAudioConfig
7769	raw := NoMethod(*s)
7770	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7771}
7772
7773// GoogleCloudDialogflowV2beta1QueryInput: Represents the query input.
7774// It can contain either:
7775//
7776// 1.  An audio config which
7777//     instructs the speech recognizer how to process the speech
7778// audio.
7779//
7780// 2.  A conversational query in the form of text.
7781//
7782// 3.  An event that specifies which intent to trigger.
7783type GoogleCloudDialogflowV2beta1QueryInput struct {
7784	// AudioConfig: Instructs the speech recognizer how to process the
7785	// speech audio.
7786	AudioConfig *GoogleCloudDialogflowV2beta1InputAudioConfig `json:"audioConfig,omitempty"`
7787
7788	// Event: The event to be processed.
7789	Event *GoogleCloudDialogflowV2beta1EventInput `json:"event,omitempty"`
7790
7791	// Text: The natural language text to be processed.
7792	Text *GoogleCloudDialogflowV2beta1TextInput `json:"text,omitempty"`
7793
7794	// ForceSendFields is a list of field names (e.g. "AudioConfig") to
7795	// unconditionally include in API requests. By default, fields with
7796	// empty values are omitted from API requests. However, any non-pointer,
7797	// non-interface field appearing in ForceSendFields will be sent to the
7798	// server regardless of whether the field is empty or not. This may be
7799	// used to include empty fields in Patch requests.
7800	ForceSendFields []string `json:"-"`
7801
7802	// NullFields is a list of field names (e.g. "AudioConfig") to include
7803	// in API requests with the JSON null value. By default, fields with
7804	// empty values are omitted from API requests. However, any field with
7805	// an empty value appearing in NullFields will be sent to the server as
7806	// null. It is an error if a field in this list has a non-empty value.
7807	// This may be used to include null fields in Patch requests.
7808	NullFields []string `json:"-"`
7809}
7810
7811func (s *GoogleCloudDialogflowV2beta1QueryInput) MarshalJSON() ([]byte, error) {
7812	type NoMethod GoogleCloudDialogflowV2beta1QueryInput
7813	raw := NoMethod(*s)
7814	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7815}
7816
7817// GoogleCloudDialogflowV2beta1QueryParameters: Represents the
7818// parameters of the conversational query.
7819type GoogleCloudDialogflowV2beta1QueryParameters struct {
7820	// Contexts: The collection of contexts to be activated before this
7821	// query is
7822	// executed.
7823	Contexts []*GoogleCloudDialogflowV2beta1Context `json:"contexts,omitempty"`
7824
7825	// GeoLocation: The geo location of this conversational query.
7826	GeoLocation *GoogleTypeLatLng `json:"geoLocation,omitempty"`
7827
7828	// KnowledgeBaseNames: KnowledgeBases to get alternative results from.
7829	// If not set, the
7830	// KnowledgeBases enabled in the agent (through UI) will be
7831	// used.
7832	// Format:  `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
7833	KnowledgeBaseNames []string `json:"knowledgeBaseNames,omitempty"`
7834
7835	// Payload: This field can be used to pass custom data into the
7836	// webhook
7837	// associated with the agent. Arbitrary JSON objects are supported.
7838	Payload googleapi.RawMessage `json:"payload,omitempty"`
7839
7840	// ResetContexts: Specifies whether to delete all contexts in the
7841	// current session
7842	// before the new ones are activated.
7843	ResetContexts bool `json:"resetContexts,omitempty"`
7844
7845	// SentimentAnalysisRequestConfig: Configures the type of sentiment
7846	// analysis to perform. If not
7847	// provided, sentiment analysis is not performed.
7848	// Note: Sentiment Analysis is only currently available for Enterprise
7849	// Edition
7850	// agents.
7851	SentimentAnalysisRequestConfig *GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig `json:"sentimentAnalysisRequestConfig,omitempty"`
7852
7853	// SessionEntityTypes: Additional session entity types to replace or
7854	// extend developer
7855	// entity types with. The entity synonyms apply to all languages and
7856	// persist
7857	// for the session of this query.
7858	SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"`
7859
7860	// SubAgents: For mega agent query, directly specify which sub agents to
7861	// query.
7862	// If any specified sub agent is not linked to the mega agent, an error
7863	// will
7864	// be returned. If empty, Dialogflow will decide which sub agents to
7865	// query.
7866	// If specified for a non-mega-agent query, will be silently ignored.
7867	SubAgents []*GoogleCloudDialogflowV2beta1SubAgent `json:"subAgents,omitempty"`
7868
7869	// TimeZone: The time zone of this conversational query from the
7870	// [time zone database](https://www.iana.org/time-zones),
7871	// e.g.,
7872	// America/New_York, Europe/Paris. If not provided, the time zone
7873	// specified in
7874	// agent settings is used.
7875	TimeZone string `json:"timeZone,omitempty"`
7876
7877	// WebhookHeaders: This field can be used to pass HTTP headers for a
7878	// webhook
7879	// call. These headers will be sent to webhook alone with the headers
7880	// that
7881	// have been configured through Dialogflow web console. The headers
7882	// defined
7883	// within this field will overwrite the headers configured through
7884	// Dialogflow
7885	// console if there is a conflict. Header names are
7886	// case-insensitive.
7887	// Google's specified headers are not allowed. Including:
7888	// "Host",
7889	// "Content-Length", "Connection", "From", "User-Agent",
7890	// "Accept-Encoding",
7891	// "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc.
7892	WebhookHeaders map[string]string `json:"webhookHeaders,omitempty"`
7893
7894	// ForceSendFields is a list of field names (e.g. "Contexts") to
7895	// unconditionally include in API requests. By default, fields with
7896	// empty values are omitted from API requests. However, any non-pointer,
7897	// non-interface field appearing in ForceSendFields will be sent to the
7898	// server regardless of whether the field is empty or not. This may be
7899	// used to include empty fields in Patch requests.
7900	ForceSendFields []string `json:"-"`
7901
7902	// NullFields is a list of field names (e.g. "Contexts") to include in
7903	// API requests with the JSON null value. By default, fields with empty
7904	// values are omitted from API requests. However, any field with an
7905	// empty value appearing in NullFields will be sent to the server as
7906	// null. It is an error if a field in this list has a non-empty value.
7907	// This may be used to include null fields in Patch requests.
7908	NullFields []string `json:"-"`
7909}
7910
7911func (s *GoogleCloudDialogflowV2beta1QueryParameters) MarshalJSON() ([]byte, error) {
7912	type NoMethod GoogleCloudDialogflowV2beta1QueryParameters
7913	raw := NoMethod(*s)
7914	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7915}
7916
7917// GoogleCloudDialogflowV2beta1QueryResult: Represents the result of
7918// conversational query or event processing.
7919type GoogleCloudDialogflowV2beta1QueryResult struct {
7920	// Action: The action name from the matched intent.
7921	Action string `json:"action,omitempty"`
7922
7923	// AllRequiredParamsPresent: This field is set to:
7924	//
7925	// - `false` if the matched intent has required parameters and not all
7926	// of
7927	//    the required parameter values have been collected.
7928	// - `true` if all required parameter values have been collected, or if
7929	// the
7930	//    matched intent doesn't contain any required parameters.
7931	AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"`
7932
7933	// DiagnosticInfo: Free-form diagnostic information for the associated
7934	// detect intent request.
7935	// The fields of this data can change without notice, so you should not
7936	// write
7937	// code that depends on its structure.
7938	// The data may contain:
7939	//
7940	// - webhook call latency
7941	// - webhook errors
7942	DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
7943
7944	// FulfillmentMessages: The collection of rich messages to present to
7945	// the user.
7946	FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"`
7947
7948	// FulfillmentText: The text to be pronounced to the user or shown on
7949	// the screen.
7950	// Note: This is a legacy field, `fulfillment_messages` should be
7951	// preferred.
7952	FulfillmentText string `json:"fulfillmentText,omitempty"`
7953
7954	// Intent: The intent that matched the conversational query. Some,
7955	// not
7956	// all fields are filled in this message, including but not limited
7957	// to:
7958	// `name`, `display_name`, `end_interaction` and `is_fallback`.
7959	Intent *GoogleCloudDialogflowV2beta1Intent `json:"intent,omitempty"`
7960
7961	// IntentDetectionConfidence: The intent detection confidence. Values
7962	// range from 0.0
7963	// (completely uncertain) to 1.0 (completely certain).
7964	// This value is for informational purpose only and is only used to
7965	// help match the best intent within the classification threshold.
7966	// This value may change for the same end-user expression at any time
7967	// due to a
7968	// model retraining or change in implementation.
7969	// If there are `multiple knowledge_answers` messages, this value is set
7970	// to
7971	// the greatest `knowledgeAnswers.match_confidence` value in the list.
7972	IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"`
7973
7974	// KnowledgeAnswers: The result from Knowledge Connector (if any),
7975	// ordered by decreasing
7976	// `KnowledgeAnswers.match_confidence`.
7977	KnowledgeAnswers *GoogleCloudDialogflowV2beta1KnowledgeAnswers `json:"knowledgeAnswers,omitempty"`
7978
7979	// LanguageCode: The language that was triggered during intent
7980	// detection.
7981	// See
7982	// [Language
7983	// Support](https://cloud.google.com/dialogflow/docs/reference/
7984	// language)
7985	// for a list of the currently supported language codes.
7986	LanguageCode string `json:"languageCode,omitempty"`
7987
7988	// OutputContexts: The collection of output contexts. If
7989	// applicable,
7990	// `output_contexts.parameters` contains entries with name
7991	// `<parameter name>.original` containing the original parameter
7992	// values
7993	// before the query.
7994	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
7995
7996	// Parameters: The collection of extracted parameters.
7997	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
7998
7999	// QueryText: The original conversational query text:
8000	//
8001	// - If natural language text was provided as input, `query_text`
8002	// contains
8003	//   a copy of the input.
8004	// - If natural language speech audio was provided as input,
8005	// `query_text`
8006	//   contains the speech recognition result. If speech recognizer
8007	// produced
8008	//   multiple alternatives, a particular one is picked.
8009	// - If automatic spell correction is enabled, `query_text` will contain
8010	// the
8011	//   corrected user input.
8012	QueryText string `json:"queryText,omitempty"`
8013
8014	// SentimentAnalysisResult: The sentiment analysis result, which depends
8015	// on the
8016	// `sentiment_analysis_request_config` specified in the request.
8017	SentimentAnalysisResult *GoogleCloudDialogflowV2beta1SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"`
8018
8019	// SpeechRecognitionConfidence: The Speech recognition confidence
8020	// between 0.0 and 1.0. A higher number
8021	// indicates an estimated greater likelihood that the recognized words
8022	// are
8023	// correct. The default of 0.0 is a sentinel value indicating that
8024	// confidence
8025	// was not set.
8026	//
8027	// This field is not guaranteed to be accurate or set. In particular
8028	// this
8029	// field isn't set for StreamingDetectIntent since the streaming
8030	// endpoint has
8031	// separate confidence estimates per portion of the audio
8032	// in
8033	// StreamingRecognitionResult.
8034	SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"`
8035
8036	// WebhookPayload: If the query was fulfilled by a webhook call, this
8037	// field is set to the
8038	// value of the `payload` field returned in the webhook response.
8039	WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"`
8040
8041	// WebhookSource: If the query was fulfilled by a webhook call, this
8042	// field is set to the
8043	// value of the `source` field returned in the webhook response.
8044	WebhookSource string `json:"webhookSource,omitempty"`
8045
8046	// ForceSendFields is a list of field names (e.g. "Action") to
8047	// unconditionally include in API requests. By default, fields with
8048	// empty values are omitted from API requests. However, any non-pointer,
8049	// non-interface field appearing in ForceSendFields will be sent to the
8050	// server regardless of whether the field is empty or not. This may be
8051	// used to include empty fields in Patch requests.
8052	ForceSendFields []string `json:"-"`
8053
8054	// NullFields is a list of field names (e.g. "Action") to include in API
8055	// requests with the JSON null value. By default, fields with empty
8056	// values are omitted from API requests. However, any field with an
8057	// empty value appearing in NullFields will be sent to the server as
8058	// null. It is an error if a field in this list has a non-empty value.
8059	// This may be used to include null fields in Patch requests.
8060	NullFields []string `json:"-"`
8061}
8062
8063func (s *GoogleCloudDialogflowV2beta1QueryResult) MarshalJSON() ([]byte, error) {
8064	type NoMethod GoogleCloudDialogflowV2beta1QueryResult
8065	raw := NoMethod(*s)
8066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8067}
8068
8069func (s *GoogleCloudDialogflowV2beta1QueryResult) UnmarshalJSON(data []byte) error {
8070	type NoMethod GoogleCloudDialogflowV2beta1QueryResult
8071	var s1 struct {
8072		IntentDetectionConfidence   gensupport.JSONFloat64 `json:"intentDetectionConfidence"`
8073		SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"`
8074		*NoMethod
8075	}
8076	s1.NoMethod = (*NoMethod)(s)
8077	if err := json.Unmarshal(data, &s1); err != nil {
8078		return err
8079	}
8080	s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence)
8081	s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence)
8082	return nil
8083}
8084
8085// GoogleCloudDialogflowV2beta1ReloadDocumentRequest: Request message
8086// for Documents.ReloadDocument.
8087type GoogleCloudDialogflowV2beta1ReloadDocumentRequest struct {
8088	// GcsSource: The path of gcs source file for reloading document
8089	// content.
8090	GcsSource *GoogleCloudDialogflowV2beta1GcsSource `json:"gcsSource,omitempty"`
8091
8092	// ForceSendFields is a list of field names (e.g. "GcsSource") to
8093	// unconditionally include in API requests. By default, fields with
8094	// empty values are omitted from API requests. However, any non-pointer,
8095	// non-interface field appearing in ForceSendFields will be sent to the
8096	// server regardless of whether the field is empty or not. This may be
8097	// used to include empty fields in Patch requests.
8098	ForceSendFields []string `json:"-"`
8099
8100	// NullFields is a list of field names (e.g. "GcsSource") to include in
8101	// API requests with the JSON null value. By default, fields with empty
8102	// values are omitted from API requests. However, any field with an
8103	// empty value appearing in NullFields will be sent to the server as
8104	// null. It is an error if a field in this list has a non-empty value.
8105	// This may be used to include null fields in Patch requests.
8106	NullFields []string `json:"-"`
8107}
8108
8109func (s *GoogleCloudDialogflowV2beta1ReloadDocumentRequest) MarshalJSON() ([]byte, error) {
8110	type NoMethod GoogleCloudDialogflowV2beta1ReloadDocumentRequest
8111	raw := NoMethod(*s)
8112	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8113}
8114
8115// GoogleCloudDialogflowV2beta1RestoreAgentRequest: The request message
8116// for Agents.RestoreAgent.
8117type GoogleCloudDialogflowV2beta1RestoreAgentRequest struct {
8118	// AgentContent: Zip compressed raw byte content for agent.
8119	AgentContent string `json:"agentContent,omitempty"`
8120
8121	// AgentUri: The URI to a Google Cloud Storage file containing the agent
8122	// to restore.
8123	// Note: The URI must start with "gs://".
8124	AgentUri string `json:"agentUri,omitempty"`
8125
8126	// ForceSendFields is a list of field names (e.g. "AgentContent") to
8127	// unconditionally include in API requests. By default, fields with
8128	// empty values are omitted from API requests. However, any non-pointer,
8129	// non-interface field appearing in ForceSendFields will be sent to the
8130	// server regardless of whether the field is empty or not. This may be
8131	// used to include empty fields in Patch requests.
8132	ForceSendFields []string `json:"-"`
8133
8134	// NullFields is a list of field names (e.g. "AgentContent") to include
8135	// in API requests with the JSON null value. By default, fields with
8136	// empty values are omitted from API requests. However, any field with
8137	// an empty value appearing in NullFields will be sent to the server as
8138	// null. It is an error if a field in this list has a non-empty value.
8139	// This may be used to include null fields in Patch requests.
8140	NullFields []string `json:"-"`
8141}
8142
8143func (s *GoogleCloudDialogflowV2beta1RestoreAgentRequest) MarshalJSON() ([]byte, error) {
8144	type NoMethod GoogleCloudDialogflowV2beta1RestoreAgentRequest
8145	raw := NoMethod(*s)
8146	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8147}
8148
8149// GoogleCloudDialogflowV2beta1SearchAgentsResponse: The response
8150// message for Agents.SearchAgents.
8151type GoogleCloudDialogflowV2beta1SearchAgentsResponse struct {
8152	// Agents: The list of agents. There will be a maximum number of items
8153	// returned based
8154	// on the page_size field in the request.
8155	Agents []*GoogleCloudDialogflowV2beta1Agent `json:"agents,omitempty"`
8156
8157	// NextPageToken: Token to retrieve the next page of results, or empty
8158	// if there are no
8159	// more results in the list.
8160	NextPageToken string `json:"nextPageToken,omitempty"`
8161
8162	// ServerResponse contains the HTTP response code and headers from the
8163	// server.
8164	googleapi.ServerResponse `json:"-"`
8165
8166	// ForceSendFields is a list of field names (e.g. "Agents") to
8167	// unconditionally include in API requests. By default, fields with
8168	// empty values are omitted from API requests. However, any non-pointer,
8169	// non-interface field appearing in ForceSendFields will be sent to the
8170	// server regardless of whether the field is empty or not. This may be
8171	// used to include empty fields in Patch requests.
8172	ForceSendFields []string `json:"-"`
8173
8174	// NullFields is a list of field names (e.g. "Agents") to include in API
8175	// requests with the JSON null value. By default, fields with empty
8176	// values are omitted from API requests. However, any field with an
8177	// empty value appearing in NullFields will be sent to the server as
8178	// null. It is an error if a field in this list has a non-empty value.
8179	// This may be used to include null fields in Patch requests.
8180	NullFields []string `json:"-"`
8181}
8182
8183func (s *GoogleCloudDialogflowV2beta1SearchAgentsResponse) MarshalJSON() ([]byte, error) {
8184	type NoMethod GoogleCloudDialogflowV2beta1SearchAgentsResponse
8185	raw := NoMethod(*s)
8186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8187}
8188
8189// GoogleCloudDialogflowV2beta1Sentiment: The sentiment, such as
8190// positive/negative feeling or association, for a unit
8191// of analysis, such as the query text.
8192type GoogleCloudDialogflowV2beta1Sentiment struct {
8193	// Magnitude: A non-negative number in the [0, +inf) range, which
8194	// represents the absolute
8195	// magnitude of sentiment, regardless of score (positive or negative).
8196	Magnitude float64 `json:"magnitude,omitempty"`
8197
8198	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0
8199	// (positive
8200	// sentiment).
8201	Score float64 `json:"score,omitempty"`
8202
8203	// ForceSendFields is a list of field names (e.g. "Magnitude") to
8204	// unconditionally include in API requests. By default, fields with
8205	// empty values are omitted from API requests. However, any non-pointer,
8206	// non-interface field appearing in ForceSendFields will be sent to the
8207	// server regardless of whether the field is empty or not. This may be
8208	// used to include empty fields in Patch requests.
8209	ForceSendFields []string `json:"-"`
8210
8211	// NullFields is a list of field names (e.g. "Magnitude") to include in
8212	// API requests with the JSON null value. By default, fields with empty
8213	// values are omitted from API requests. However, any field with an
8214	// empty value appearing in NullFields will be sent to the server as
8215	// null. It is an error if a field in this list has a non-empty value.
8216	// This may be used to include null fields in Patch requests.
8217	NullFields []string `json:"-"`
8218}
8219
8220func (s *GoogleCloudDialogflowV2beta1Sentiment) MarshalJSON() ([]byte, error) {
8221	type NoMethod GoogleCloudDialogflowV2beta1Sentiment
8222	raw := NoMethod(*s)
8223	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8224}
8225
8226func (s *GoogleCloudDialogflowV2beta1Sentiment) UnmarshalJSON(data []byte) error {
8227	type NoMethod GoogleCloudDialogflowV2beta1Sentiment
8228	var s1 struct {
8229		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
8230		Score     gensupport.JSONFloat64 `json:"score"`
8231		*NoMethod
8232	}
8233	s1.NoMethod = (*NoMethod)(s)
8234	if err := json.Unmarshal(data, &s1); err != nil {
8235		return err
8236	}
8237	s.Magnitude = float64(s1.Magnitude)
8238	s.Score = float64(s1.Score)
8239	return nil
8240}
8241
8242// GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig:
8243// Configures the types of sentiment analysis to perform.
8244type GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig struct {
8245	// AnalyzeQueryTextSentiment: Instructs the service to perform sentiment
8246	// analysis on
8247	// `query_text`. If not provided, sentiment analysis is not performed
8248	// on
8249	// `query_text`.
8250	AnalyzeQueryTextSentiment bool `json:"analyzeQueryTextSentiment,omitempty"`
8251
8252	// ForceSendFields is a list of field names (e.g.
8253	// "AnalyzeQueryTextSentiment") to unconditionally include in API
8254	// requests. By default, fields with empty values are omitted from API
8255	// requests. However, any non-pointer, non-interface field appearing in
8256	// ForceSendFields will be sent to the server regardless of whether the
8257	// field is empty or not. This may be used to include empty fields in
8258	// Patch requests.
8259	ForceSendFields []string `json:"-"`
8260
8261	// NullFields is a list of field names (e.g.
8262	// "AnalyzeQueryTextSentiment") to include in API requests with the JSON
8263	// null value. By default, fields with empty values are omitted from API
8264	// requests. However, any field with an empty value appearing in
8265	// NullFields will be sent to the server as null. It is an error if a
8266	// field in this list has a non-empty value. This may be used to include
8267	// null fields in Patch requests.
8268	NullFields []string `json:"-"`
8269}
8270
8271func (s *GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig) MarshalJSON() ([]byte, error) {
8272	type NoMethod GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig
8273	raw := NoMethod(*s)
8274	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8275}
8276
8277// GoogleCloudDialogflowV2beta1SentimentAnalysisResult: The result of
8278// sentiment analysis as configured
8279// by
8280// `sentiment_analysis_request_config`.
8281type GoogleCloudDialogflowV2beta1SentimentAnalysisResult struct {
8282	// QueryTextSentiment: The sentiment analysis result for `query_text`.
8283	QueryTextSentiment *GoogleCloudDialogflowV2beta1Sentiment `json:"queryTextSentiment,omitempty"`
8284
8285	// ForceSendFields is a list of field names (e.g. "QueryTextSentiment")
8286	// to unconditionally include in API requests. By default, fields with
8287	// empty values are omitted from API requests. However, any non-pointer,
8288	// non-interface field appearing in ForceSendFields will be sent to the
8289	// server regardless of whether the field is empty or not. This may be
8290	// used to include empty fields in Patch requests.
8291	ForceSendFields []string `json:"-"`
8292
8293	// NullFields is a list of field names (e.g. "QueryTextSentiment") to
8294	// include in API requests with the JSON null value. By default, fields
8295	// with empty values are omitted from API requests. However, any field
8296	// with an empty value appearing in NullFields will be sent to the
8297	// server as null. It is an error if a field in this list has a
8298	// non-empty value. This may be used to include null fields in Patch
8299	// requests.
8300	NullFields []string `json:"-"`
8301}
8302
8303func (s *GoogleCloudDialogflowV2beta1SentimentAnalysisResult) MarshalJSON() ([]byte, error) {
8304	type NoMethod GoogleCloudDialogflowV2beta1SentimentAnalysisResult
8305	raw := NoMethod(*s)
8306	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8307}
8308
8309// GoogleCloudDialogflowV2beta1SessionEntityType: Represents a session
8310// entity type.
8311//
8312// Extends or replaces a custom entity type at the user session level
8313// (we
8314// refer to the entity types defined at the agent level as "custom
8315// entity
8316// types").
8317//
8318// Note: session entity types apply to all queries, regardless of the
8319// language.
8320type GoogleCloudDialogflowV2beta1SessionEntityType struct {
8321	// Entities: Required. The collection of entities associated with this
8322	// session entity
8323	// type.
8324	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
8325
8326	// EntityOverrideMode: Required. Indicates whether the additional data
8327	// should override or
8328	// supplement the custom entity type definition.
8329	//
8330	// Possible values:
8331	//   "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value
8332	// should be never used.
8333	//   "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session
8334	// entities overrides the collection of entities
8335	// in the corresponding custom entity type.
8336	//   "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session
8337	// entities extends the collection of entities in
8338	// the corresponding custom entity type.
8339	//
8340	// Note: Even in this override mode calls to
8341	// `ListSessionEntityTypes`,
8342	// `GetSessionEntityType`, `CreateSessionEntityType`
8343	// and
8344	// `UpdateSessionEntityType` only return the additional entities added
8345	// in
8346	// this session entity type. If you want to get the supplemented
8347	// list,
8348	// please call EntityTypes.GetEntityType on the custom entity type
8349	// and merge.
8350	EntityOverrideMode string `json:"entityOverrideMode,omitempty"`
8351
8352	// Name: Required. The unique identifier of this session entity type.
8353	// Format:
8354	// `projects/<Project ID>/agent/sessions/<Session
8355	// ID>/entityTypes/<Entity Type
8356	// Display Name>`, or
8357	// `projects/<Project ID>/agent/environments/<Environment
8358	// ID>/users/<User
8359	// ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`.
8360	// If `Environment ID` is not specified, we assume default
8361	// 'draft'
8362	// environment. If `User ID` is not specified, we assume default '-'
8363	// user.
8364	//
8365	// `<Entity Type Display Name>` must be the display name of an existing
8366	// entity
8367	// type in the same agent that will be overridden or supplemented.
8368	Name string `json:"name,omitempty"`
8369
8370	// ServerResponse contains the HTTP response code and headers from the
8371	// server.
8372	googleapi.ServerResponse `json:"-"`
8373
8374	// ForceSendFields is a list of field names (e.g. "Entities") to
8375	// unconditionally include in API requests. By default, fields with
8376	// empty values are omitted from API requests. However, any non-pointer,
8377	// non-interface field appearing in ForceSendFields will be sent to the
8378	// server regardless of whether the field is empty or not. This may be
8379	// used to include empty fields in Patch requests.
8380	ForceSendFields []string `json:"-"`
8381
8382	// NullFields is a list of field names (e.g. "Entities") to include in
8383	// API requests with the JSON null value. By default, fields with empty
8384	// values are omitted from API requests. However, any field with an
8385	// empty value appearing in NullFields will be sent to the server as
8386	// null. It is an error if a field in this list has a non-empty value.
8387	// This may be used to include null fields in Patch requests.
8388	NullFields []string `json:"-"`
8389}
8390
8391func (s *GoogleCloudDialogflowV2beta1SessionEntityType) MarshalJSON() ([]byte, error) {
8392	type NoMethod GoogleCloudDialogflowV2beta1SessionEntityType
8393	raw := NoMethod(*s)
8394	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8395}
8396
8397// GoogleCloudDialogflowV2beta1SpeechContext: Hints for the speech
8398// recognizer to help with recognition in a specific
8399// conversation state.
8400type GoogleCloudDialogflowV2beta1SpeechContext struct {
8401	// Boost: Optional. Boost for this context compared to other contexts:
8402	// * If the boost is positive, Dialogflow will increase the probability
8403	// that
8404	//   the phrases in this context are recognized over similar sounding
8405	// phrases.
8406	// * If the boost is unspecified or non-positive, Dialogflow will not
8407	// apply
8408	//   any boost.
8409	//
8410	// Dialogflow recommends that you use boosts in the range (0, 20] and
8411	// that you
8412	// find a value that fits your use case with binary search.
8413	Boost float64 `json:"boost,omitempty"`
8414
8415	// Phrases: Optional. A list of strings containing words and phrases
8416	// that the speech
8417	// recognizer should recognize with higher likelihood.
8418	//
8419	// This list can be used to:
8420	// * improve accuracy for words and phrases you expect the user to say,
8421	//   e.g. typical commands for your Dialogflow agent
8422	// * add additional words to the speech recognizer vocabulary
8423	// * ...
8424	//
8425	// See the [Cloud
8426	// Speech
8427	// documentation](https://cloud.google.com/speech-to-text/quotas) for
8428	// usage
8429	// limits.
8430	Phrases []string `json:"phrases,omitempty"`
8431
8432	// ForceSendFields is a list of field names (e.g. "Boost") to
8433	// unconditionally include in API requests. By default, fields with
8434	// empty values are omitted from API requests. However, any non-pointer,
8435	// non-interface field appearing in ForceSendFields will be sent to the
8436	// server regardless of whether the field is empty or not. This may be
8437	// used to include empty fields in Patch requests.
8438	ForceSendFields []string `json:"-"`
8439
8440	// NullFields is a list of field names (e.g. "Boost") to include in API
8441	// requests with the JSON null value. By default, fields with empty
8442	// values are omitted from API requests. However, any field with an
8443	// empty value appearing in NullFields will be sent to the server as
8444	// null. It is an error if a field in this list has a non-empty value.
8445	// This may be used to include null fields in Patch requests.
8446	NullFields []string `json:"-"`
8447}
8448
8449func (s *GoogleCloudDialogflowV2beta1SpeechContext) MarshalJSON() ([]byte, error) {
8450	type NoMethod GoogleCloudDialogflowV2beta1SpeechContext
8451	raw := NoMethod(*s)
8452	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8453}
8454
8455func (s *GoogleCloudDialogflowV2beta1SpeechContext) UnmarshalJSON(data []byte) error {
8456	type NoMethod GoogleCloudDialogflowV2beta1SpeechContext
8457	var s1 struct {
8458		Boost gensupport.JSONFloat64 `json:"boost"`
8459		*NoMethod
8460	}
8461	s1.NoMethod = (*NoMethod)(s)
8462	if err := json.Unmarshal(data, &s1); err != nil {
8463		return err
8464	}
8465	s.Boost = float64(s1.Boost)
8466	return nil
8467}
8468
8469// GoogleCloudDialogflowV2beta1SubAgent: Contains basic configuration
8470// for a sub-agent.
8471type GoogleCloudDialogflowV2beta1SubAgent struct {
8472	// Environment: Optional. The unique identifier (`environment name` in
8473	// dialogflow console)
8474	// of this sub-agent environment. Assumes draft environment if
8475	// `environment`
8476	// is not set.
8477	Environment string `json:"environment,omitempty"`
8478
8479	// Project: Required. The project of this agent.
8480	// Format: `projects/<Project ID>`.
8481	Project string `json:"project,omitempty"`
8482
8483	// ForceSendFields is a list of field names (e.g. "Environment") to
8484	// unconditionally include in API requests. By default, fields with
8485	// empty values are omitted from API requests. However, any non-pointer,
8486	// non-interface field appearing in ForceSendFields will be sent to the
8487	// server regardless of whether the field is empty or not. This may be
8488	// used to include empty fields in Patch requests.
8489	ForceSendFields []string `json:"-"`
8490
8491	// NullFields is a list of field names (e.g. "Environment") to include
8492	// in API requests with the JSON null value. By default, fields with
8493	// empty values are omitted from API requests. However, any field with
8494	// an empty value appearing in NullFields will be sent to the server as
8495	// null. It is an error if a field in this list has a non-empty value.
8496	// This may be used to include null fields in Patch requests.
8497	NullFields []string `json:"-"`
8498}
8499
8500func (s *GoogleCloudDialogflowV2beta1SubAgent) MarshalJSON() ([]byte, error) {
8501	type NoMethod GoogleCloudDialogflowV2beta1SubAgent
8502	raw := NoMethod(*s)
8503	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8504}
8505
8506// GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig: Configuration of
8507// how speech should be synthesized.
8508type GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig struct {
8509	// EffectsProfileId: Optional. An identifier which selects 'audio
8510	// effects' profiles that are
8511	// applied on (post synthesized) text to speech. Effects are applied on
8512	// top of
8513	// each other in the order they are given.
8514	EffectsProfileId []string `json:"effectsProfileId,omitempty"`
8515
8516	// Pitch: Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means
8517	// increase 20
8518	// semitones from the original pitch. -20 means decrease 20 semitones
8519	// from the
8520	// original pitch.
8521	Pitch float64 `json:"pitch,omitempty"`
8522
8523	// SpeakingRate: Optional. Speaking rate/speed, in the range [0.25,
8524	// 4.0]. 1.0 is the normal
8525	// native speed supported by the specific voice. 2.0 is twice as fast,
8526	// and
8527	// 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed.
8528	// Any
8529	// other values < 0.25 or > 4.0 will return an error.
8530	SpeakingRate float64 `json:"speakingRate,omitempty"`
8531
8532	// Voice: Optional. The desired voice of the synthesized audio.
8533	Voice *GoogleCloudDialogflowV2beta1VoiceSelectionParams `json:"voice,omitempty"`
8534
8535	// VolumeGainDb: Optional. Volume gain (in dB) of the normal native
8536	// volume supported by the
8537	// specific voice, in the range [-96.0, 16.0]. If unset, or set to a
8538	// value of
8539	// 0.0 (dB), will play at normal native signal amplitude. A value of
8540	// -6.0 (dB)
8541	// will play at approximately half the amplitude of the normal native
8542	// signal
8543	// amplitude. A value of +6.0 (dB) will play at approximately twice
8544	// the
8545	// amplitude of the normal native signal amplitude. We strongly
8546	// recommend not
8547	// to exceed +10 (dB) as there's usually no effective increase in
8548	// loudness for
8549	// any value greater than that.
8550	VolumeGainDb float64 `json:"volumeGainDb,omitempty"`
8551
8552	// ForceSendFields is a list of field names (e.g. "EffectsProfileId") to
8553	// unconditionally include in API requests. By default, fields with
8554	// empty values are omitted from API requests. However, any non-pointer,
8555	// non-interface field appearing in ForceSendFields will be sent to the
8556	// server regardless of whether the field is empty or not. This may be
8557	// used to include empty fields in Patch requests.
8558	ForceSendFields []string `json:"-"`
8559
8560	// NullFields is a list of field names (e.g. "EffectsProfileId") to
8561	// include in API requests with the JSON null value. By default, fields
8562	// with empty values are omitted from API requests. However, any field
8563	// with an empty value appearing in NullFields will be sent to the
8564	// server as null. It is an error if a field in this list has a
8565	// non-empty value. This may be used to include null fields in Patch
8566	// requests.
8567	NullFields []string `json:"-"`
8568}
8569
8570func (s *GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig) MarshalJSON() ([]byte, error) {
8571	type NoMethod GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig
8572	raw := NoMethod(*s)
8573	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8574}
8575
8576func (s *GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig) UnmarshalJSON(data []byte) error {
8577	type NoMethod GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig
8578	var s1 struct {
8579		Pitch        gensupport.JSONFloat64 `json:"pitch"`
8580		SpeakingRate gensupport.JSONFloat64 `json:"speakingRate"`
8581		VolumeGainDb gensupport.JSONFloat64 `json:"volumeGainDb"`
8582		*NoMethod
8583	}
8584	s1.NoMethod = (*NoMethod)(s)
8585	if err := json.Unmarshal(data, &s1); err != nil {
8586		return err
8587	}
8588	s.Pitch = float64(s1.Pitch)
8589	s.SpeakingRate = float64(s1.SpeakingRate)
8590	s.VolumeGainDb = float64(s1.VolumeGainDb)
8591	return nil
8592}
8593
8594// GoogleCloudDialogflowV2beta1TextInput: Represents the natural
8595// language text to be processed.
8596type GoogleCloudDialogflowV2beta1TextInput struct {
8597	// LanguageCode: Required. The language of this conversational query.
8598	// See
8599	// [Language
8600	// Support](https://cloud.google.com/dialogflow/docs/reference/
8601	// language)
8602	// for a list of the currently supported language codes. Note that
8603	// queries in
8604	// the same session do not necessarily need to specify the same
8605	// language.
8606	LanguageCode string `json:"languageCode,omitempty"`
8607
8608	// Text: Required. The UTF-8 encoded natural language text to be
8609	// processed.
8610	// Text length must not exceed 256 characters.
8611	Text string `json:"text,omitempty"`
8612
8613	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
8614	// unconditionally include in API requests. By default, fields with
8615	// empty values are omitted from API requests. However, any non-pointer,
8616	// non-interface field appearing in ForceSendFields will be sent to the
8617	// server regardless of whether the field is empty or not. This may be
8618	// used to include empty fields in Patch requests.
8619	ForceSendFields []string `json:"-"`
8620
8621	// NullFields is a list of field names (e.g. "LanguageCode") to include
8622	// in API requests with the JSON null value. By default, fields with
8623	// empty values are omitted from API requests. However, any field with
8624	// an empty value appearing in NullFields will be sent to the server as
8625	// null. It is an error if a field in this list has a non-empty value.
8626	// This may be used to include null fields in Patch requests.
8627	NullFields []string `json:"-"`
8628}
8629
8630func (s *GoogleCloudDialogflowV2beta1TextInput) MarshalJSON() ([]byte, error) {
8631	type NoMethod GoogleCloudDialogflowV2beta1TextInput
8632	raw := NoMethod(*s)
8633	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8634}
8635
8636// GoogleCloudDialogflowV2beta1TrainAgentRequest: The request message
8637// for Agents.TrainAgent.
8638type GoogleCloudDialogflowV2beta1TrainAgentRequest struct {
8639}
8640
8641// GoogleCloudDialogflowV2beta1ValidationError: Represents a single
8642// validation error.
8643type GoogleCloudDialogflowV2beta1ValidationError struct {
8644	// Entries: The names of the entries that the error is associated
8645	// with.
8646	// Format:
8647	//
8648	// - "projects/<Project ID>/agent", if the error is associated with the
8649	// entire
8650	// agent.
8651	// - "projects/<Project ID>/agent/intents/<Intent ID>", if the error
8652	// is
8653	// associated with certain intents.
8654	// - "projects/<Project
8655	// ID>/agent/intents/<Intent Id>/trainingPhrases/<Training Phrase ID>",
8656	// if the
8657	// error is associated with certain intent training phrases.
8658	// - "projects/<Project ID>/agent/intents/<Intent
8659	// Id>/parameters/<Parameter
8660	// ID>", if the error is associated with certain intent parameters.
8661	// - "projects/<Project ID>/agent/entities/<Entity ID>", if the error
8662	// is
8663	// associated with certain entities.
8664	Entries []string `json:"entries,omitempty"`
8665
8666	// ErrorMessage: The detailed error messsage.
8667	ErrorMessage string `json:"errorMessage,omitempty"`
8668
8669	// Severity: The severity of the error.
8670	//
8671	// Possible values:
8672	//   "SEVERITY_UNSPECIFIED" - Not specified. This value should never be
8673	// used.
8674	//   "INFO" - The agent doesn't follow Dialogflow best practicies.
8675	//   "WARNING" - The agent may not behave as expected.
8676	//   "ERROR" - The agent may experience partial failures.
8677	//   "CRITICAL" - The agent may completely fail.
8678	Severity string `json:"severity,omitempty"`
8679
8680	// ForceSendFields is a list of field names (e.g. "Entries") to
8681	// unconditionally include in API requests. By default, fields with
8682	// empty values are omitted from API requests. However, any non-pointer,
8683	// non-interface field appearing in ForceSendFields will be sent to the
8684	// server regardless of whether the field is empty or not. This may be
8685	// used to include empty fields in Patch requests.
8686	ForceSendFields []string `json:"-"`
8687
8688	// NullFields is a list of field names (e.g. "Entries") to include in
8689	// API requests with the JSON null value. By default, fields with empty
8690	// values are omitted from API requests. However, any field with an
8691	// empty value appearing in NullFields will be sent to the server as
8692	// null. It is an error if a field in this list has a non-empty value.
8693	// This may be used to include null fields in Patch requests.
8694	NullFields []string `json:"-"`
8695}
8696
8697func (s *GoogleCloudDialogflowV2beta1ValidationError) MarshalJSON() ([]byte, error) {
8698	type NoMethod GoogleCloudDialogflowV2beta1ValidationError
8699	raw := NoMethod(*s)
8700	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8701}
8702
8703// GoogleCloudDialogflowV2beta1ValidationResult: Represents the output
8704// of agent validation.
8705type GoogleCloudDialogflowV2beta1ValidationResult struct {
8706	// ValidationErrors: Contains all validation errors.
8707	ValidationErrors []*GoogleCloudDialogflowV2beta1ValidationError `json:"validationErrors,omitempty"`
8708
8709	// ServerResponse contains the HTTP response code and headers from the
8710	// server.
8711	googleapi.ServerResponse `json:"-"`
8712
8713	// ForceSendFields is a list of field names (e.g. "ValidationErrors") to
8714	// unconditionally include in API requests. By default, fields with
8715	// empty values are omitted from API requests. However, any non-pointer,
8716	// non-interface field appearing in ForceSendFields will be sent to the
8717	// server regardless of whether the field is empty or not. This may be
8718	// used to include empty fields in Patch requests.
8719	ForceSendFields []string `json:"-"`
8720
8721	// NullFields is a list of field names (e.g. "ValidationErrors") to
8722	// include in API requests with the JSON null value. By default, fields
8723	// with empty values are omitted from API requests. However, any field
8724	// with an empty value appearing in NullFields will be sent to the
8725	// server as null. It is an error if a field in this list has a
8726	// non-empty value. This may be used to include null fields in Patch
8727	// requests.
8728	NullFields []string `json:"-"`
8729}
8730
8731func (s *GoogleCloudDialogflowV2beta1ValidationResult) MarshalJSON() ([]byte, error) {
8732	type NoMethod GoogleCloudDialogflowV2beta1ValidationResult
8733	raw := NoMethod(*s)
8734	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8735}
8736
8737// GoogleCloudDialogflowV2beta1VoiceSelectionParams: Description of
8738// which voice to use for speech synthesis.
8739type GoogleCloudDialogflowV2beta1VoiceSelectionParams struct {
8740	// Name: Optional. The name of the voice. If not set, the service will
8741	// choose a
8742	// voice based on the other parameters such as language_code
8743	// and
8744	// ssml_gender.
8745	Name string `json:"name,omitempty"`
8746
8747	// SsmlGender: Optional. The preferred gender of the voice. If not set,
8748	// the service will
8749	// choose a voice based on the other parameters such as language_code
8750	// and
8751	// name. Note that this is only a preference, not requirement. If
8752	// a
8753	// voice of the appropriate gender is not available, the synthesizer
8754	// should
8755	// substitute a voice with a different gender rather than failing the
8756	// request.
8757	//
8758	// Possible values:
8759	//   "SSML_VOICE_GENDER_UNSPECIFIED" - An unspecified gender, which
8760	// means that the client doesn't care which
8761	// gender the selected voice will have.
8762	//   "SSML_VOICE_GENDER_MALE" - A male voice.
8763	//   "SSML_VOICE_GENDER_FEMALE" - A female voice.
8764	//   "SSML_VOICE_GENDER_NEUTRAL" - A gender-neutral voice.
8765	SsmlGender string `json:"ssmlGender,omitempty"`
8766
8767	// ForceSendFields is a list of field names (e.g. "Name") to
8768	// unconditionally include in API requests. By default, fields with
8769	// empty values are omitted from API requests. However, any non-pointer,
8770	// non-interface field appearing in ForceSendFields will be sent to the
8771	// server regardless of whether the field is empty or not. This may be
8772	// used to include empty fields in Patch requests.
8773	ForceSendFields []string `json:"-"`
8774
8775	// NullFields is a list of field names (e.g. "Name") to include in API
8776	// requests with the JSON null value. By default, fields with empty
8777	// values are omitted from API requests. However, any field with an
8778	// empty value appearing in NullFields will be sent to the server as
8779	// null. It is an error if a field in this list has a non-empty value.
8780	// This may be used to include null fields in Patch requests.
8781	NullFields []string `json:"-"`
8782}
8783
8784func (s *GoogleCloudDialogflowV2beta1VoiceSelectionParams) MarshalJSON() ([]byte, error) {
8785	type NoMethod GoogleCloudDialogflowV2beta1VoiceSelectionParams
8786	raw := NoMethod(*s)
8787	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8788}
8789
8790// GoogleCloudDialogflowV2beta1WebhookRequest: The request message for a
8791// webhook call.
8792type GoogleCloudDialogflowV2beta1WebhookRequest struct {
8793	// AlternativeQueryResults: Alternative query results from
8794	// KnowledgeService.
8795	AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"`
8796
8797	// OriginalDetectIntentRequest: Optional. The contents of the original
8798	// request that was passed to
8799	// `[Streaming]DetectIntent` call.
8800	OriginalDetectIntentRequest *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"`
8801
8802	// QueryResult: The result of the conversational query or event
8803	// processing. Contains the
8804	// same value as `[Streaming]DetectIntentResponse.query_result`.
8805	QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"`
8806
8807	// ResponseId: The unique identifier of the response. Contains the same
8808	// value as
8809	// `[Streaming]DetectIntentResponse.response_id`.
8810	ResponseId string `json:"responseId,omitempty"`
8811
8812	// Session: The unique identifier of detectIntent request session.
8813	// Can be used to identify end-user inside webhook
8814	// implementation.
8815	// Format: `projects/<Project ID>/agent/sessions/<Session ID>`,
8816	// or
8817	// `projects/<Project ID>/agent/environments/<Environment
8818	// ID>/users/<User
8819	// ID>/sessions/<Session ID>`.
8820	Session string `json:"session,omitempty"`
8821
8822	// ForceSendFields is a list of field names (e.g.
8823	// "AlternativeQueryResults") to unconditionally include in API
8824	// requests. By default, fields with empty values are omitted from API
8825	// requests. However, any non-pointer, non-interface field appearing in
8826	// ForceSendFields will be sent to the server regardless of whether the
8827	// field is empty or not. This may be used to include empty fields in
8828	// Patch requests.
8829	ForceSendFields []string `json:"-"`
8830
8831	// NullFields is a list of field names (e.g. "AlternativeQueryResults")
8832	// to include in API requests with the JSON null value. By default,
8833	// fields with empty values are omitted from API requests. However, any
8834	// field with an empty value appearing in NullFields will be sent to the
8835	// server as null. It is an error if a field in this list has a
8836	// non-empty value. This may be used to include null fields in Patch
8837	// requests.
8838	NullFields []string `json:"-"`
8839}
8840
8841func (s *GoogleCloudDialogflowV2beta1WebhookRequest) MarshalJSON() ([]byte, error) {
8842	type NoMethod GoogleCloudDialogflowV2beta1WebhookRequest
8843	raw := NoMethod(*s)
8844	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8845}
8846
8847// GoogleCloudDialogflowV2beta1WebhookResponse: The response message for
8848// a webhook call.
8849//
8850// This response is validated by the Dialogflow server. If validation
8851// fails,
8852// an error will be returned in the QueryResult.diagnostic_info
8853// field.
8854// Setting JSON fields to an empty value with the wrong type is a common
8855// error.
8856// To avoid this error:
8857//
8858// - Use "" for empty strings
8859// - Use `{}` or `null` for empty objects
8860// - Use `[]` or `null` for empty arrays
8861//
8862// For more information, see the
8863// [Protocol Buffers
8864// Language
8865// Guide](https://developers.google.com/protocol-buffers/docs/pr
8866// oto3#json).
8867type GoogleCloudDialogflowV2beta1WebhookResponse struct {
8868	// EndInteraction: Optional. Indicates that this intent ends an
8869	// interaction. Some integrations
8870	// (e.g., Actions on Google or Dialogflow phone gateway) use this
8871	// information
8872	// to close interaction with an end user. Default is false.
8873	EndInteraction bool `json:"endInteraction,omitempty"`
8874
8875	// FollowupEventInput: Optional. Makes the platform immediately invoke
8876	// another `DetectIntent` call
8877	// internally with the specified event as input.
8878	// When this field is set, Dialogflow ignores the
8879	// `fulfillment_text`,
8880	// `fulfillment_messages`, and `payload` fields.
8881	FollowupEventInput *GoogleCloudDialogflowV2beta1EventInput `json:"followupEventInput,omitempty"`
8882
8883	// FulfillmentMessages: Optional. The collection of rich messages to
8884	// present to the user. This
8885	// value is passed directly to `QueryResult.fulfillment_messages`.
8886	FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"`
8887
8888	// FulfillmentText: Optional. The text to be shown on the screen. This
8889	// value is passed directly
8890	// to `QueryResult.fulfillment_text`.
8891	FulfillmentText string `json:"fulfillmentText,omitempty"`
8892
8893	// OutputContexts: Optional. The collection of output contexts. This
8894	// value is passed directly
8895	// to `QueryResult.output_contexts`.
8896	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
8897
8898	// Payload: Optional. This value is passed directly to
8899	// `QueryResult.webhook_payload`.
8900	// See the related `fulfillment_messages[i].payload field`, which may be
8901	// used
8902	// as an alternative to this field.
8903	//
8904	// This field can be used for Actions on Google responses.
8905	// It should have a structure similar to the JSON message shown here.
8906	// For more
8907	// information, see
8908	// [Actions on Google
8909	// Webhook
8910	// Format](https://developers.google.com/actions/dialogflow/webho
8911	// ok)
8912	// <pre>{
8913	//   "google": {
8914	//     "expectUserResponse": true,
8915	//     "richResponse": {
8916	//       "items": [
8917	//         {
8918	//           "simpleResponse": {
8919	//             "textToSpeech": "this is a simple response"
8920	//           }
8921	//         }
8922	//       ]
8923	//     }
8924	//   }
8925	// }</pre>
8926	Payload googleapi.RawMessage `json:"payload,omitempty"`
8927
8928	// SessionEntityTypes: Optional. Additional session entity types to
8929	// replace or extend developer
8930	// entity types with. The entity synonyms apply to all languages and
8931	// persist
8932	// for the session of this query. Setting the session entity types
8933	// inside
8934	// webhook overwrites the session entity types that have been set
8935	// through
8936	// `DetectIntentRequest.query_params.session_entity_types`.
8937	SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"`
8938
8939	// Source: Optional. This value is passed directly to
8940	// `QueryResult.webhook_source`.
8941	Source string `json:"source,omitempty"`
8942
8943	// ForceSendFields is a list of field names (e.g. "EndInteraction") to
8944	// unconditionally include in API requests. By default, fields with
8945	// empty values are omitted from API requests. However, any non-pointer,
8946	// non-interface field appearing in ForceSendFields will be sent to the
8947	// server regardless of whether the field is empty or not. This may be
8948	// used to include empty fields in Patch requests.
8949	ForceSendFields []string `json:"-"`
8950
8951	// NullFields is a list of field names (e.g. "EndInteraction") to
8952	// include in API requests with the JSON null value. By default, fields
8953	// with empty values are omitted from API requests. However, any field
8954	// with an empty value appearing in NullFields will be sent to the
8955	// server as null. It is an error if a field in this list has a
8956	// non-empty value. This may be used to include null fields in Patch
8957	// requests.
8958	NullFields []string `json:"-"`
8959}
8960
8961func (s *GoogleCloudDialogflowV2beta1WebhookResponse) MarshalJSON() ([]byte, error) {
8962	type NoMethod GoogleCloudDialogflowV2beta1WebhookResponse
8963	raw := NoMethod(*s)
8964	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8965}
8966
8967// GoogleLongrunningListOperationsResponse: The response message for
8968// Operations.ListOperations.
8969type GoogleLongrunningListOperationsResponse struct {
8970	// NextPageToken: The standard List next-page token.
8971	NextPageToken string `json:"nextPageToken,omitempty"`
8972
8973	// Operations: A list of operations that matches the specified filter in
8974	// the request.
8975	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
8976
8977	// ServerResponse contains the HTTP response code and headers from the
8978	// server.
8979	googleapi.ServerResponse `json:"-"`
8980
8981	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
8982	// unconditionally include in API requests. By default, fields with
8983	// empty values are omitted from API requests. However, any non-pointer,
8984	// non-interface field appearing in ForceSendFields will be sent to the
8985	// server regardless of whether the field is empty or not. This may be
8986	// used to include empty fields in Patch requests.
8987	ForceSendFields []string `json:"-"`
8988
8989	// NullFields is a list of field names (e.g. "NextPageToken") to include
8990	// in API requests with the JSON null value. By default, fields with
8991	// empty values are omitted from API requests. However, any field with
8992	// an empty value appearing in NullFields will be sent to the server as
8993	// null. It is an error if a field in this list has a non-empty value.
8994	// This may be used to include null fields in Patch requests.
8995	NullFields []string `json:"-"`
8996}
8997
8998func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
8999	type NoMethod GoogleLongrunningListOperationsResponse
9000	raw := NoMethod(*s)
9001	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9002}
9003
9004// GoogleLongrunningOperation: This resource represents a long-running
9005// operation that is the result of a
9006// network API call.
9007type GoogleLongrunningOperation struct {
9008	// Done: If the value is `false`, it means the operation is still in
9009	// progress.
9010	// If `true`, the operation is completed, and either `error` or
9011	// `response` is
9012	// available.
9013	Done bool `json:"done,omitempty"`
9014
9015	// Error: The error result of the operation in case of failure or
9016	// cancellation.
9017	Error *GoogleRpcStatus `json:"error,omitempty"`
9018
9019	// Metadata: Service-specific metadata associated with the operation.
9020	// It typically
9021	// contains progress information and common metadata such as create
9022	// time.
9023	// Some services might not provide such metadata.  Any method that
9024	// returns a
9025	// long-running operation should document the metadata type, if any.
9026	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
9027
9028	// Name: The server-assigned name, which is only unique within the same
9029	// service that
9030	// originally returns it. If you use the default HTTP mapping,
9031	// the
9032	// `name` should be a resource name ending with
9033	// `operations/{unique_id}`.
9034	Name string `json:"name,omitempty"`
9035
9036	// Response: The normal response of the operation in case of success.
9037	// If the original
9038	// method returns no data on success, such as `Delete`, the response
9039	// is
9040	// `google.protobuf.Empty`.  If the original method is
9041	// standard
9042	// `Get`/`Create`/`Update`, the response should be the resource.  For
9043	// other
9044	// methods, the response should have the type `XxxResponse`, where
9045	// `Xxx`
9046	// is the original method name.  For example, if the original method
9047	// name
9048	// is `TakeSnapshot()`, the inferred response type
9049	// is
9050	// `TakeSnapshotResponse`.
9051	Response googleapi.RawMessage `json:"response,omitempty"`
9052
9053	// ServerResponse contains the HTTP response code and headers from the
9054	// server.
9055	googleapi.ServerResponse `json:"-"`
9056
9057	// ForceSendFields is a list of field names (e.g. "Done") to
9058	// unconditionally include in API requests. By default, fields with
9059	// empty values are omitted from API requests. However, any non-pointer,
9060	// non-interface field appearing in ForceSendFields will be sent to the
9061	// server regardless of whether the field is empty or not. This may be
9062	// used to include empty fields in Patch requests.
9063	ForceSendFields []string `json:"-"`
9064
9065	// NullFields is a list of field names (e.g. "Done") to include in API
9066	// requests with the JSON null value. By default, fields with empty
9067	// values are omitted from API requests. However, any field with an
9068	// empty value appearing in NullFields will be sent to the server as
9069	// null. It is an error if a field in this list has a non-empty value.
9070	// This may be used to include null fields in Patch requests.
9071	NullFields []string `json:"-"`
9072}
9073
9074func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
9075	type NoMethod GoogleLongrunningOperation
9076	raw := NoMethod(*s)
9077	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9078}
9079
9080// GoogleProtobufEmpty: A generic empty message that you can re-use to
9081// avoid defining duplicated
9082// empty messages in your APIs. A typical example is to use it as the
9083// request
9084// or the response type of an API method. For instance:
9085//
9086//     service Foo {
9087//       rpc Bar(google.protobuf.Empty) returns
9088// (google.protobuf.Empty);
9089//     }
9090//
9091// The JSON representation for `Empty` is empty JSON object `{}`.
9092type GoogleProtobufEmpty struct {
9093	// ServerResponse contains the HTTP response code and headers from the
9094	// server.
9095	googleapi.ServerResponse `json:"-"`
9096}
9097
9098// GoogleRpcStatus: The `Status` type defines a logical error model that
9099// is suitable for
9100// different programming environments, including REST APIs and RPC APIs.
9101// It is
9102// used by [gRPC](https://github.com/grpc). Each `Status` message
9103// contains
9104// three pieces of data: error code, error message, and error
9105// details.
9106//
9107// You can find out more about this error model and how to work with it
9108// in the
9109// [API Design Guide](https://cloud.google.com/apis/design/errors).
9110type GoogleRpcStatus struct {
9111	// Code: The status code, which should be an enum value of
9112	// google.rpc.Code.
9113	Code int64 `json:"code,omitempty"`
9114
9115	// Details: A list of messages that carry the error details.  There is a
9116	// common set of
9117	// message types for APIs to use.
9118	Details []googleapi.RawMessage `json:"details,omitempty"`
9119
9120	// Message: A developer-facing error message, which should be in
9121	// English. Any
9122	// user-facing error message should be localized and sent in
9123	// the
9124	// google.rpc.Status.details field, or localized by the client.
9125	Message string `json:"message,omitempty"`
9126
9127	// ForceSendFields is a list of field names (e.g. "Code") to
9128	// unconditionally include in API requests. By default, fields with
9129	// empty values are omitted from API requests. However, any non-pointer,
9130	// non-interface field appearing in ForceSendFields will be sent to the
9131	// server regardless of whether the field is empty or not. This may be
9132	// used to include empty fields in Patch requests.
9133	ForceSendFields []string `json:"-"`
9134
9135	// NullFields is a list of field names (e.g. "Code") to include in API
9136	// requests with the JSON null value. By default, fields with empty
9137	// values are omitted from API requests. However, any field with an
9138	// empty value appearing in NullFields will be sent to the server as
9139	// null. It is an error if a field in this list has a non-empty value.
9140	// This may be used to include null fields in Patch requests.
9141	NullFields []string `json:"-"`
9142}
9143
9144func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
9145	type NoMethod GoogleRpcStatus
9146	raw := NoMethod(*s)
9147	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9148}
9149
9150// GoogleTypeLatLng: An object representing a latitude/longitude pair.
9151// This is expressed as a pair
9152// of doubles representing degrees latitude and degrees longitude.
9153// Unless
9154// specified otherwise, this must conform to the
9155// <a
9156// href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
9157// st
9158// andard</a>. Values must be within normalized ranges.
9159type GoogleTypeLatLng struct {
9160	// Latitude: The latitude in degrees. It must be in the range [-90.0,
9161	// +90.0].
9162	Latitude float64 `json:"latitude,omitempty"`
9163
9164	// Longitude: The longitude in degrees. It must be in the range [-180.0,
9165	// +180.0].
9166	Longitude float64 `json:"longitude,omitempty"`
9167
9168	// ForceSendFields is a list of field names (e.g. "Latitude") to
9169	// unconditionally include in API requests. By default, fields with
9170	// empty values are omitted from API requests. However, any non-pointer,
9171	// non-interface field appearing in ForceSendFields will be sent to the
9172	// server regardless of whether the field is empty or not. This may be
9173	// used to include empty fields in Patch requests.
9174	ForceSendFields []string `json:"-"`
9175
9176	// NullFields is a list of field names (e.g. "Latitude") to include in
9177	// API requests with the JSON null value. By default, fields with empty
9178	// values are omitted from API requests. However, any field with an
9179	// empty value appearing in NullFields will be sent to the server as
9180	// null. It is an error if a field in this list has a non-empty value.
9181	// This may be used to include null fields in Patch requests.
9182	NullFields []string `json:"-"`
9183}
9184
9185func (s *GoogleTypeLatLng) MarshalJSON() ([]byte, error) {
9186	type NoMethod GoogleTypeLatLng
9187	raw := NoMethod(*s)
9188	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9189}
9190
9191func (s *GoogleTypeLatLng) UnmarshalJSON(data []byte) error {
9192	type NoMethod GoogleTypeLatLng
9193	var s1 struct {
9194		Latitude  gensupport.JSONFloat64 `json:"latitude"`
9195		Longitude gensupport.JSONFloat64 `json:"longitude"`
9196		*NoMethod
9197	}
9198	s1.NoMethod = (*NoMethod)(s)
9199	if err := json.Unmarshal(data, &s1); err != nil {
9200		return err
9201	}
9202	s.Latitude = float64(s1.Latitude)
9203	s.Longitude = float64(s1.Longitude)
9204	return nil
9205}
9206
9207// method id "dialogflow.projects.deleteAgent":
9208
9209type ProjectsDeleteAgentCall struct {
9210	s          *Service
9211	parent     string
9212	urlParams_ gensupport.URLParams
9213	ctx_       context.Context
9214	header_    http.Header
9215}
9216
9217// DeleteAgent: Deletes the specified agent.
9218func (r *ProjectsService) DeleteAgent(parent string) *ProjectsDeleteAgentCall {
9219	c := &ProjectsDeleteAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9220	c.parent = parent
9221	return c
9222}
9223
9224// Fields allows partial responses to be retrieved. See
9225// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9226// for more information.
9227func (c *ProjectsDeleteAgentCall) Fields(s ...googleapi.Field) *ProjectsDeleteAgentCall {
9228	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9229	return c
9230}
9231
9232// Context sets the context to be used in this call's Do method. Any
9233// pending HTTP request will be aborted if the provided context is
9234// canceled.
9235func (c *ProjectsDeleteAgentCall) Context(ctx context.Context) *ProjectsDeleteAgentCall {
9236	c.ctx_ = ctx
9237	return c
9238}
9239
9240// Header returns an http.Header that can be modified by the caller to
9241// add HTTP headers to the request.
9242func (c *ProjectsDeleteAgentCall) Header() http.Header {
9243	if c.header_ == nil {
9244		c.header_ = make(http.Header)
9245	}
9246	return c.header_
9247}
9248
9249func (c *ProjectsDeleteAgentCall) doRequest(alt string) (*http.Response, error) {
9250	reqHeaders := make(http.Header)
9251	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
9252	for k, v := range c.header_ {
9253		reqHeaders[k] = v
9254	}
9255	reqHeaders.Set("User-Agent", c.s.userAgent())
9256	var body io.Reader = nil
9257	c.urlParams_.Set("alt", alt)
9258	c.urlParams_.Set("prettyPrint", "false")
9259	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
9260	urls += "?" + c.urlParams_.Encode()
9261	req, err := http.NewRequest("DELETE", urls, body)
9262	if err != nil {
9263		return nil, err
9264	}
9265	req.Header = reqHeaders
9266	googleapi.Expand(req.URL, map[string]string{
9267		"parent": c.parent,
9268	})
9269	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9270}
9271
9272// Do executes the "dialogflow.projects.deleteAgent" call.
9273// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
9274// non-2xx status code is an error. Response headers are in either
9275// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
9276// returned at all) in error.(*googleapi.Error).Header. Use
9277// googleapi.IsNotModified to check whether the returned error was
9278// because http.StatusNotModified was returned.
9279func (c *ProjectsDeleteAgentCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
9280	gensupport.SetOptions(c.urlParams_, opts...)
9281	res, err := c.doRequest("json")
9282	if res != nil && res.StatusCode == http.StatusNotModified {
9283		if res.Body != nil {
9284			res.Body.Close()
9285		}
9286		return nil, &googleapi.Error{
9287			Code:   res.StatusCode,
9288			Header: res.Header,
9289		}
9290	}
9291	if err != nil {
9292		return nil, err
9293	}
9294	defer googleapi.CloseBody(res)
9295	if err := googleapi.CheckResponse(res); err != nil {
9296		return nil, err
9297	}
9298	ret := &GoogleProtobufEmpty{
9299		ServerResponse: googleapi.ServerResponse{
9300			Header:         res.Header,
9301			HTTPStatusCode: res.StatusCode,
9302		},
9303	}
9304	target := &ret
9305	if err := gensupport.DecodeResponse(target, res); err != nil {
9306		return nil, err
9307	}
9308	return ret, nil
9309	// {
9310	//   "description": "Deletes the specified agent.",
9311	//   "flatPath": "v2beta1/projects/{projectsId}/agent",
9312	//   "httpMethod": "DELETE",
9313	//   "id": "dialogflow.projects.deleteAgent",
9314	//   "parameterOrder": [
9315	//     "parent"
9316	//   ],
9317	//   "parameters": {
9318	//     "parent": {
9319	//       "description": "Required. The project that the agent to delete is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
9320	//       "location": "path",
9321	//       "pattern": "^projects/[^/]+$",
9322	//       "required": true,
9323	//       "type": "string"
9324	//     }
9325	//   },
9326	//   "path": "v2beta1/{+parent}/agent",
9327	//   "response": {
9328	//     "$ref": "GoogleProtobufEmpty"
9329	//   },
9330	//   "scopes": [
9331	//     "https://www.googleapis.com/auth/cloud-platform",
9332	//     "https://www.googleapis.com/auth/dialogflow"
9333	//   ]
9334	// }
9335
9336}
9337
9338// method id "dialogflow.projects.getAgent":
9339
9340type ProjectsGetAgentCall struct {
9341	s            *Service
9342	parent       string
9343	urlParams_   gensupport.URLParams
9344	ifNoneMatch_ string
9345	ctx_         context.Context
9346	header_      http.Header
9347}
9348
9349// GetAgent: Retrieves the specified agent.
9350func (r *ProjectsService) GetAgent(parent string) *ProjectsGetAgentCall {
9351	c := &ProjectsGetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9352	c.parent = parent
9353	return c
9354}
9355
9356// Fields allows partial responses to be retrieved. See
9357// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9358// for more information.
9359func (c *ProjectsGetAgentCall) Fields(s ...googleapi.Field) *ProjectsGetAgentCall {
9360	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9361	return c
9362}
9363
9364// IfNoneMatch sets the optional parameter which makes the operation
9365// fail if the object's ETag matches the given value. This is useful for
9366// getting updates only after the object has changed since the last
9367// request. Use googleapi.IsNotModified to check whether the response
9368// error from Do is the result of In-None-Match.
9369func (c *ProjectsGetAgentCall) IfNoneMatch(entityTag string) *ProjectsGetAgentCall {
9370	c.ifNoneMatch_ = entityTag
9371	return c
9372}
9373
9374// Context sets the context to be used in this call's Do method. Any
9375// pending HTTP request will be aborted if the provided context is
9376// canceled.
9377func (c *ProjectsGetAgentCall) Context(ctx context.Context) *ProjectsGetAgentCall {
9378	c.ctx_ = ctx
9379	return c
9380}
9381
9382// Header returns an http.Header that can be modified by the caller to
9383// add HTTP headers to the request.
9384func (c *ProjectsGetAgentCall) Header() http.Header {
9385	if c.header_ == nil {
9386		c.header_ = make(http.Header)
9387	}
9388	return c.header_
9389}
9390
9391func (c *ProjectsGetAgentCall) doRequest(alt string) (*http.Response, error) {
9392	reqHeaders := make(http.Header)
9393	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
9394	for k, v := range c.header_ {
9395		reqHeaders[k] = v
9396	}
9397	reqHeaders.Set("User-Agent", c.s.userAgent())
9398	if c.ifNoneMatch_ != "" {
9399		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9400	}
9401	var body io.Reader = nil
9402	c.urlParams_.Set("alt", alt)
9403	c.urlParams_.Set("prettyPrint", "false")
9404	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
9405	urls += "?" + c.urlParams_.Encode()
9406	req, err := http.NewRequest("GET", urls, body)
9407	if err != nil {
9408		return nil, err
9409	}
9410	req.Header = reqHeaders
9411	googleapi.Expand(req.URL, map[string]string{
9412		"parent": c.parent,
9413	})
9414	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9415}
9416
9417// Do executes the "dialogflow.projects.getAgent" call.
9418// Exactly one of *GoogleCloudDialogflowV2beta1Agent or error will be
9419// non-nil. Any non-2xx status code is an error. Response headers are in
9420// either *GoogleCloudDialogflowV2beta1Agent.ServerResponse.Header or
9421// (if a response was returned at all) in
9422// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9423// whether the returned error was because http.StatusNotModified was
9424// returned.
9425func (c *ProjectsGetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Agent, error) {
9426	gensupport.SetOptions(c.urlParams_, opts...)
9427	res, err := c.doRequest("json")
9428	if res != nil && res.StatusCode == http.StatusNotModified {
9429		if res.Body != nil {
9430			res.Body.Close()
9431		}
9432		return nil, &googleapi.Error{
9433			Code:   res.StatusCode,
9434			Header: res.Header,
9435		}
9436	}
9437	if err != nil {
9438		return nil, err
9439	}
9440	defer googleapi.CloseBody(res)
9441	if err := googleapi.CheckResponse(res); err != nil {
9442		return nil, err
9443	}
9444	ret := &GoogleCloudDialogflowV2beta1Agent{
9445		ServerResponse: googleapi.ServerResponse{
9446			Header:         res.Header,
9447			HTTPStatusCode: res.StatusCode,
9448		},
9449	}
9450	target := &ret
9451	if err := gensupport.DecodeResponse(target, res); err != nil {
9452		return nil, err
9453	}
9454	return ret, nil
9455	// {
9456	//   "description": "Retrieves the specified agent.",
9457	//   "flatPath": "v2beta1/projects/{projectsId}/agent",
9458	//   "httpMethod": "GET",
9459	//   "id": "dialogflow.projects.getAgent",
9460	//   "parameterOrder": [
9461	//     "parent"
9462	//   ],
9463	//   "parameters": {
9464	//     "parent": {
9465	//       "description": "Required. The project that the agent to fetch is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
9466	//       "location": "path",
9467	//       "pattern": "^projects/[^/]+$",
9468	//       "required": true,
9469	//       "type": "string"
9470	//     }
9471	//   },
9472	//   "path": "v2beta1/{+parent}/agent",
9473	//   "response": {
9474	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
9475	//   },
9476	//   "scopes": [
9477	//     "https://www.googleapis.com/auth/cloud-platform",
9478	//     "https://www.googleapis.com/auth/dialogflow"
9479	//   ]
9480	// }
9481
9482}
9483
9484// method id "dialogflow.projects.setAgent":
9485
9486type ProjectsSetAgentCall struct {
9487	s                                 *Service
9488	parent                            string
9489	googleclouddialogflowv2beta1agent *GoogleCloudDialogflowV2beta1Agent
9490	urlParams_                        gensupport.URLParams
9491	ctx_                              context.Context
9492	header_                           http.Header
9493}
9494
9495// SetAgent: Creates/updates the specified agent.
9496func (r *ProjectsService) SetAgent(parent string, googleclouddialogflowv2beta1agent *GoogleCloudDialogflowV2beta1Agent) *ProjectsSetAgentCall {
9497	c := &ProjectsSetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9498	c.parent = parent
9499	c.googleclouddialogflowv2beta1agent = googleclouddialogflowv2beta1agent
9500	return c
9501}
9502
9503// UpdateMask sets the optional parameter "updateMask": The mask to
9504// control which fields get updated.
9505func (c *ProjectsSetAgentCall) UpdateMask(updateMask string) *ProjectsSetAgentCall {
9506	c.urlParams_.Set("updateMask", updateMask)
9507	return c
9508}
9509
9510// Fields allows partial responses to be retrieved. See
9511// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9512// for more information.
9513func (c *ProjectsSetAgentCall) Fields(s ...googleapi.Field) *ProjectsSetAgentCall {
9514	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9515	return c
9516}
9517
9518// Context sets the context to be used in this call's Do method. Any
9519// pending HTTP request will be aborted if the provided context is
9520// canceled.
9521func (c *ProjectsSetAgentCall) Context(ctx context.Context) *ProjectsSetAgentCall {
9522	c.ctx_ = ctx
9523	return c
9524}
9525
9526// Header returns an http.Header that can be modified by the caller to
9527// add HTTP headers to the request.
9528func (c *ProjectsSetAgentCall) Header() http.Header {
9529	if c.header_ == nil {
9530		c.header_ = make(http.Header)
9531	}
9532	return c.header_
9533}
9534
9535func (c *ProjectsSetAgentCall) doRequest(alt string) (*http.Response, error) {
9536	reqHeaders := make(http.Header)
9537	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
9538	for k, v := range c.header_ {
9539		reqHeaders[k] = v
9540	}
9541	reqHeaders.Set("User-Agent", c.s.userAgent())
9542	var body io.Reader = nil
9543	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1agent)
9544	if err != nil {
9545		return nil, err
9546	}
9547	reqHeaders.Set("Content-Type", "application/json")
9548	c.urlParams_.Set("alt", alt)
9549	c.urlParams_.Set("prettyPrint", "false")
9550	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
9551	urls += "?" + c.urlParams_.Encode()
9552	req, err := http.NewRequest("POST", urls, body)
9553	if err != nil {
9554		return nil, err
9555	}
9556	req.Header = reqHeaders
9557	googleapi.Expand(req.URL, map[string]string{
9558		"parent": c.parent,
9559	})
9560	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9561}
9562
9563// Do executes the "dialogflow.projects.setAgent" call.
9564// Exactly one of *GoogleCloudDialogflowV2beta1Agent or error will be
9565// non-nil. Any non-2xx status code is an error. Response headers are in
9566// either *GoogleCloudDialogflowV2beta1Agent.ServerResponse.Header or
9567// (if a response was returned at all) in
9568// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9569// whether the returned error was because http.StatusNotModified was
9570// returned.
9571func (c *ProjectsSetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Agent, error) {
9572	gensupport.SetOptions(c.urlParams_, opts...)
9573	res, err := c.doRequest("json")
9574	if res != nil && res.StatusCode == http.StatusNotModified {
9575		if res.Body != nil {
9576			res.Body.Close()
9577		}
9578		return nil, &googleapi.Error{
9579			Code:   res.StatusCode,
9580			Header: res.Header,
9581		}
9582	}
9583	if err != nil {
9584		return nil, err
9585	}
9586	defer googleapi.CloseBody(res)
9587	if err := googleapi.CheckResponse(res); err != nil {
9588		return nil, err
9589	}
9590	ret := &GoogleCloudDialogflowV2beta1Agent{
9591		ServerResponse: googleapi.ServerResponse{
9592			Header:         res.Header,
9593			HTTPStatusCode: res.StatusCode,
9594		},
9595	}
9596	target := &ret
9597	if err := gensupport.DecodeResponse(target, res); err != nil {
9598		return nil, err
9599	}
9600	return ret, nil
9601	// {
9602	//   "description": "Creates/updates the specified agent.",
9603	//   "flatPath": "v2beta1/projects/{projectsId}/agent",
9604	//   "httpMethod": "POST",
9605	//   "id": "dialogflow.projects.setAgent",
9606	//   "parameterOrder": [
9607	//     "parent"
9608	//   ],
9609	//   "parameters": {
9610	//     "parent": {
9611	//       "description": "Required. The project of this agent.\nFormat: `projects/\u003cProject ID\u003e`.",
9612	//       "location": "path",
9613	//       "pattern": "^projects/[^/]+$",
9614	//       "required": true,
9615	//       "type": "string"
9616	//     },
9617	//     "updateMask": {
9618	//       "description": "Optional. The mask to control which fields get updated.",
9619	//       "format": "google-fieldmask",
9620	//       "location": "query",
9621	//       "type": "string"
9622	//     }
9623	//   },
9624	//   "path": "v2beta1/{+parent}/agent",
9625	//   "request": {
9626	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
9627	//   },
9628	//   "response": {
9629	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
9630	//   },
9631	//   "scopes": [
9632	//     "https://www.googleapis.com/auth/cloud-platform",
9633	//     "https://www.googleapis.com/auth/dialogflow"
9634	//   ]
9635	// }
9636
9637}
9638
9639// method id "dialogflow.projects.agent.export":
9640
9641type ProjectsAgentExportCall struct {
9642	s                                              *Service
9643	parent                                         string
9644	googleclouddialogflowv2beta1exportagentrequest *GoogleCloudDialogflowV2beta1ExportAgentRequest
9645	urlParams_                                     gensupport.URLParams
9646	ctx_                                           context.Context
9647	header_                                        http.Header
9648}
9649
9650// Export: Exports the specified agent to a ZIP file.
9651//
9652//
9653// Operation <response: ExportAgentResponse>
9654func (r *ProjectsAgentService) Export(parent string, googleclouddialogflowv2beta1exportagentrequest *GoogleCloudDialogflowV2beta1ExportAgentRequest) *ProjectsAgentExportCall {
9655	c := &ProjectsAgentExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9656	c.parent = parent
9657	c.googleclouddialogflowv2beta1exportagentrequest = googleclouddialogflowv2beta1exportagentrequest
9658	return c
9659}
9660
9661// Fields allows partial responses to be retrieved. See
9662// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9663// for more information.
9664func (c *ProjectsAgentExportCall) Fields(s ...googleapi.Field) *ProjectsAgentExportCall {
9665	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9666	return c
9667}
9668
9669// Context sets the context to be used in this call's Do method. Any
9670// pending HTTP request will be aborted if the provided context is
9671// canceled.
9672func (c *ProjectsAgentExportCall) Context(ctx context.Context) *ProjectsAgentExportCall {
9673	c.ctx_ = ctx
9674	return c
9675}
9676
9677// Header returns an http.Header that can be modified by the caller to
9678// add HTTP headers to the request.
9679func (c *ProjectsAgentExportCall) Header() http.Header {
9680	if c.header_ == nil {
9681		c.header_ = make(http.Header)
9682	}
9683	return c.header_
9684}
9685
9686func (c *ProjectsAgentExportCall) doRequest(alt string) (*http.Response, error) {
9687	reqHeaders := make(http.Header)
9688	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
9689	for k, v := range c.header_ {
9690		reqHeaders[k] = v
9691	}
9692	reqHeaders.Set("User-Agent", c.s.userAgent())
9693	var body io.Reader = nil
9694	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1exportagentrequest)
9695	if err != nil {
9696		return nil, err
9697	}
9698	reqHeaders.Set("Content-Type", "application/json")
9699	c.urlParams_.Set("alt", alt)
9700	c.urlParams_.Set("prettyPrint", "false")
9701	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:export")
9702	urls += "?" + c.urlParams_.Encode()
9703	req, err := http.NewRequest("POST", urls, body)
9704	if err != nil {
9705		return nil, err
9706	}
9707	req.Header = reqHeaders
9708	googleapi.Expand(req.URL, map[string]string{
9709		"parent": c.parent,
9710	})
9711	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9712}
9713
9714// Do executes the "dialogflow.projects.agent.export" call.
9715// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
9716// Any non-2xx status code is an error. Response headers are in either
9717// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
9718// was returned at all) in error.(*googleapi.Error).Header. Use
9719// googleapi.IsNotModified to check whether the returned error was
9720// because http.StatusNotModified was returned.
9721func (c *ProjectsAgentExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
9722	gensupport.SetOptions(c.urlParams_, opts...)
9723	res, err := c.doRequest("json")
9724	if res != nil && res.StatusCode == http.StatusNotModified {
9725		if res.Body != nil {
9726			res.Body.Close()
9727		}
9728		return nil, &googleapi.Error{
9729			Code:   res.StatusCode,
9730			Header: res.Header,
9731		}
9732	}
9733	if err != nil {
9734		return nil, err
9735	}
9736	defer googleapi.CloseBody(res)
9737	if err := googleapi.CheckResponse(res); err != nil {
9738		return nil, err
9739	}
9740	ret := &GoogleLongrunningOperation{
9741		ServerResponse: googleapi.ServerResponse{
9742			Header:         res.Header,
9743			HTTPStatusCode: res.StatusCode,
9744		},
9745	}
9746	target := &ret
9747	if err := gensupport.DecodeResponse(target, res); err != nil {
9748		return nil, err
9749	}
9750	return ret, nil
9751	// {
9752	//   "description": "Exports the specified agent to a ZIP file.\n\n\nOperation \u003cresponse: ExportAgentResponse\u003e",
9753	//   "flatPath": "v2beta1/projects/{projectsId}/agent:export",
9754	//   "httpMethod": "POST",
9755	//   "id": "dialogflow.projects.agent.export",
9756	//   "parameterOrder": [
9757	//     "parent"
9758	//   ],
9759	//   "parameters": {
9760	//     "parent": {
9761	//       "description": "Required. The project that the agent to export is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
9762	//       "location": "path",
9763	//       "pattern": "^projects/[^/]+$",
9764	//       "required": true,
9765	//       "type": "string"
9766	//     }
9767	//   },
9768	//   "path": "v2beta1/{+parent}/agent:export",
9769	//   "request": {
9770	//     "$ref": "GoogleCloudDialogflowV2beta1ExportAgentRequest"
9771	//   },
9772	//   "response": {
9773	//     "$ref": "GoogleLongrunningOperation"
9774	//   },
9775	//   "scopes": [
9776	//     "https://www.googleapis.com/auth/cloud-platform",
9777	//     "https://www.googleapis.com/auth/dialogflow"
9778	//   ]
9779	// }
9780
9781}
9782
9783// method id "dialogflow.projects.agent.getFulfillment":
9784
9785type ProjectsAgentGetFulfillmentCall struct {
9786	s            *Service
9787	name         string
9788	urlParams_   gensupport.URLParams
9789	ifNoneMatch_ string
9790	ctx_         context.Context
9791	header_      http.Header
9792}
9793
9794// GetFulfillment: Retrieves the fulfillment.
9795func (r *ProjectsAgentService) GetFulfillment(name string) *ProjectsAgentGetFulfillmentCall {
9796	c := &ProjectsAgentGetFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9797	c.name = name
9798	return c
9799}
9800
9801// Fields allows partial responses to be retrieved. See
9802// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9803// for more information.
9804func (c *ProjectsAgentGetFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsAgentGetFulfillmentCall {
9805	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9806	return c
9807}
9808
9809// IfNoneMatch sets the optional parameter which makes the operation
9810// fail if the object's ETag matches the given value. This is useful for
9811// getting updates only after the object has changed since the last
9812// request. Use googleapi.IsNotModified to check whether the response
9813// error from Do is the result of In-None-Match.
9814func (c *ProjectsAgentGetFulfillmentCall) IfNoneMatch(entityTag string) *ProjectsAgentGetFulfillmentCall {
9815	c.ifNoneMatch_ = entityTag
9816	return c
9817}
9818
9819// Context sets the context to be used in this call's Do method. Any
9820// pending HTTP request will be aborted if the provided context is
9821// canceled.
9822func (c *ProjectsAgentGetFulfillmentCall) Context(ctx context.Context) *ProjectsAgentGetFulfillmentCall {
9823	c.ctx_ = ctx
9824	return c
9825}
9826
9827// Header returns an http.Header that can be modified by the caller to
9828// add HTTP headers to the request.
9829func (c *ProjectsAgentGetFulfillmentCall) Header() http.Header {
9830	if c.header_ == nil {
9831		c.header_ = make(http.Header)
9832	}
9833	return c.header_
9834}
9835
9836func (c *ProjectsAgentGetFulfillmentCall) doRequest(alt string) (*http.Response, error) {
9837	reqHeaders := make(http.Header)
9838	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
9839	for k, v := range c.header_ {
9840		reqHeaders[k] = v
9841	}
9842	reqHeaders.Set("User-Agent", c.s.userAgent())
9843	if c.ifNoneMatch_ != "" {
9844		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9845	}
9846	var body io.Reader = nil
9847	c.urlParams_.Set("alt", alt)
9848	c.urlParams_.Set("prettyPrint", "false")
9849	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
9850	urls += "?" + c.urlParams_.Encode()
9851	req, err := http.NewRequest("GET", urls, body)
9852	if err != nil {
9853		return nil, err
9854	}
9855	req.Header = reqHeaders
9856	googleapi.Expand(req.URL, map[string]string{
9857		"name": c.name,
9858	})
9859	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9860}
9861
9862// Do executes the "dialogflow.projects.agent.getFulfillment" call.
9863// Exactly one of *GoogleCloudDialogflowV2beta1Fulfillment or error will
9864// be non-nil. Any non-2xx status code is an error. Response headers are
9865// in either
9866// *GoogleCloudDialogflowV2beta1Fulfillment.ServerResponse.Header or (if
9867// a response was returned at all) in error.(*googleapi.Error).Header.
9868// Use googleapi.IsNotModified to check whether the returned error was
9869// because http.StatusNotModified was returned.
9870func (c *ProjectsAgentGetFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Fulfillment, error) {
9871	gensupport.SetOptions(c.urlParams_, opts...)
9872	res, err := c.doRequest("json")
9873	if res != nil && res.StatusCode == http.StatusNotModified {
9874		if res.Body != nil {
9875			res.Body.Close()
9876		}
9877		return nil, &googleapi.Error{
9878			Code:   res.StatusCode,
9879			Header: res.Header,
9880		}
9881	}
9882	if err != nil {
9883		return nil, err
9884	}
9885	defer googleapi.CloseBody(res)
9886	if err := googleapi.CheckResponse(res); err != nil {
9887		return nil, err
9888	}
9889	ret := &GoogleCloudDialogflowV2beta1Fulfillment{
9890		ServerResponse: googleapi.ServerResponse{
9891			Header:         res.Header,
9892			HTTPStatusCode: res.StatusCode,
9893		},
9894	}
9895	target := &ret
9896	if err := gensupport.DecodeResponse(target, res); err != nil {
9897		return nil, err
9898	}
9899	return ret, nil
9900	// {
9901	//   "description": "Retrieves the fulfillment.",
9902	//   "flatPath": "v2beta1/projects/{projectsId}/agent/fulfillment",
9903	//   "httpMethod": "GET",
9904	//   "id": "dialogflow.projects.agent.getFulfillment",
9905	//   "parameterOrder": [
9906	//     "name"
9907	//   ],
9908	//   "parameters": {
9909	//     "name": {
9910	//       "description": "Required. The name of the fulfillment.\nFormat: `projects/\u003cProject ID\u003e/agent/fulfillment`.",
9911	//       "location": "path",
9912	//       "pattern": "^projects/[^/]+/agent/fulfillment$",
9913	//       "required": true,
9914	//       "type": "string"
9915	//     }
9916	//   },
9917	//   "path": "v2beta1/{+name}",
9918	//   "response": {
9919	//     "$ref": "GoogleCloudDialogflowV2beta1Fulfillment"
9920	//   },
9921	//   "scopes": [
9922	//     "https://www.googleapis.com/auth/cloud-platform",
9923	//     "https://www.googleapis.com/auth/dialogflow"
9924	//   ]
9925	// }
9926
9927}
9928
9929// method id "dialogflow.projects.agent.getValidationResult":
9930
9931type ProjectsAgentGetValidationResultCall struct {
9932	s            *Service
9933	parent       string
9934	urlParams_   gensupport.URLParams
9935	ifNoneMatch_ string
9936	ctx_         context.Context
9937	header_      http.Header
9938}
9939
9940// GetValidationResult: Gets agent validation result. Agent validation
9941// is performed during
9942// training time and is updated automatically when training is
9943// completed.
9944func (r *ProjectsAgentService) GetValidationResult(parent string) *ProjectsAgentGetValidationResultCall {
9945	c := &ProjectsAgentGetValidationResultCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9946	c.parent = parent
9947	return c
9948}
9949
9950// LanguageCode sets the optional parameter "languageCode": The language
9951// for which you want a validation result. If not
9952// specified, the agent's default language is used.
9953// [Many
9954// languages](https://cloud.google.com/dialogflow/docs/reference/la
9955// nguage)
9956// are supported. Note: languages must be enabled in the agent before
9957// they can
9958// be used.
9959func (c *ProjectsAgentGetValidationResultCall) LanguageCode(languageCode string) *ProjectsAgentGetValidationResultCall {
9960	c.urlParams_.Set("languageCode", languageCode)
9961	return c
9962}
9963
9964// Fields allows partial responses to be retrieved. See
9965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9966// for more information.
9967func (c *ProjectsAgentGetValidationResultCall) Fields(s ...googleapi.Field) *ProjectsAgentGetValidationResultCall {
9968	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9969	return c
9970}
9971
9972// IfNoneMatch sets the optional parameter which makes the operation
9973// fail if the object's ETag matches the given value. This is useful for
9974// getting updates only after the object has changed since the last
9975// request. Use googleapi.IsNotModified to check whether the response
9976// error from Do is the result of In-None-Match.
9977func (c *ProjectsAgentGetValidationResultCall) IfNoneMatch(entityTag string) *ProjectsAgentGetValidationResultCall {
9978	c.ifNoneMatch_ = entityTag
9979	return c
9980}
9981
9982// Context sets the context to be used in this call's Do method. Any
9983// pending HTTP request will be aborted if the provided context is
9984// canceled.
9985func (c *ProjectsAgentGetValidationResultCall) Context(ctx context.Context) *ProjectsAgentGetValidationResultCall {
9986	c.ctx_ = ctx
9987	return c
9988}
9989
9990// Header returns an http.Header that can be modified by the caller to
9991// add HTTP headers to the request.
9992func (c *ProjectsAgentGetValidationResultCall) Header() http.Header {
9993	if c.header_ == nil {
9994		c.header_ = make(http.Header)
9995	}
9996	return c.header_
9997}
9998
9999func (c *ProjectsAgentGetValidationResultCall) doRequest(alt string) (*http.Response, error) {
10000	reqHeaders := make(http.Header)
10001	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
10002	for k, v := range c.header_ {
10003		reqHeaders[k] = v
10004	}
10005	reqHeaders.Set("User-Agent", c.s.userAgent())
10006	if c.ifNoneMatch_ != "" {
10007		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10008	}
10009	var body io.Reader = nil
10010	c.urlParams_.Set("alt", alt)
10011	c.urlParams_.Set("prettyPrint", "false")
10012	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent/validationResult")
10013	urls += "?" + c.urlParams_.Encode()
10014	req, err := http.NewRequest("GET", urls, body)
10015	if err != nil {
10016		return nil, err
10017	}
10018	req.Header = reqHeaders
10019	googleapi.Expand(req.URL, map[string]string{
10020		"parent": c.parent,
10021	})
10022	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10023}
10024
10025// Do executes the "dialogflow.projects.agent.getValidationResult" call.
10026// Exactly one of *GoogleCloudDialogflowV2beta1ValidationResult or error
10027// will be non-nil. Any non-2xx status code is an error. Response
10028// headers are in either
10029// *GoogleCloudDialogflowV2beta1ValidationResult.ServerResponse.Header
10030// or (if a response was returned at all) in
10031// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10032// whether the returned error was because http.StatusNotModified was
10033// returned.
10034func (c *ProjectsAgentGetValidationResultCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ValidationResult, error) {
10035	gensupport.SetOptions(c.urlParams_, opts...)
10036	res, err := c.doRequest("json")
10037	if res != nil && res.StatusCode == http.StatusNotModified {
10038		if res.Body != nil {
10039			res.Body.Close()
10040		}
10041		return nil, &googleapi.Error{
10042			Code:   res.StatusCode,
10043			Header: res.Header,
10044		}
10045	}
10046	if err != nil {
10047		return nil, err
10048	}
10049	defer googleapi.CloseBody(res)
10050	if err := googleapi.CheckResponse(res); err != nil {
10051		return nil, err
10052	}
10053	ret := &GoogleCloudDialogflowV2beta1ValidationResult{
10054		ServerResponse: googleapi.ServerResponse{
10055			Header:         res.Header,
10056			HTTPStatusCode: res.StatusCode,
10057		},
10058	}
10059	target := &ret
10060	if err := gensupport.DecodeResponse(target, res); err != nil {
10061		return nil, err
10062	}
10063	return ret, nil
10064	// {
10065	//   "description": "Gets agent validation result. Agent validation is performed during\ntraining time and is updated automatically when training is completed.",
10066	//   "flatPath": "v2beta1/projects/{projectsId}/agent/validationResult",
10067	//   "httpMethod": "GET",
10068	//   "id": "dialogflow.projects.agent.getValidationResult",
10069	//   "parameterOrder": [
10070	//     "parent"
10071	//   ],
10072	//   "parameters": {
10073	//     "languageCode": {
10074	//       "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.",
10075	//       "location": "query",
10076	//       "type": "string"
10077	//     },
10078	//     "parent": {
10079	//       "description": "Required. The project that the agent is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
10080	//       "location": "path",
10081	//       "pattern": "^projects/[^/]+$",
10082	//       "required": true,
10083	//       "type": "string"
10084	//     }
10085	//   },
10086	//   "path": "v2beta1/{+parent}/agent/validationResult",
10087	//   "response": {
10088	//     "$ref": "GoogleCloudDialogflowV2beta1ValidationResult"
10089	//   },
10090	//   "scopes": [
10091	//     "https://www.googleapis.com/auth/cloud-platform",
10092	//     "https://www.googleapis.com/auth/dialogflow"
10093	//   ]
10094	// }
10095
10096}
10097
10098// method id "dialogflow.projects.agent.import":
10099
10100type ProjectsAgentImportCall struct {
10101	s                                              *Service
10102	parent                                         string
10103	googleclouddialogflowv2beta1importagentrequest *GoogleCloudDialogflowV2beta1ImportAgentRequest
10104	urlParams_                                     gensupport.URLParams
10105	ctx_                                           context.Context
10106	header_                                        http.Header
10107}
10108
10109// Import: Imports the specified agent from a ZIP file.
10110//
10111// Uploads new intents and entity types without deleting the existing
10112// ones.
10113// Intents and entity types with the same name are replaced with the
10114// new
10115// versions from ImportAgentRequest.
10116//
10117//
10118// Operation <response: google.protobuf.Empty>
10119func (r *ProjectsAgentService) Import(parent string, googleclouddialogflowv2beta1importagentrequest *GoogleCloudDialogflowV2beta1ImportAgentRequest) *ProjectsAgentImportCall {
10120	c := &ProjectsAgentImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10121	c.parent = parent
10122	c.googleclouddialogflowv2beta1importagentrequest = googleclouddialogflowv2beta1importagentrequest
10123	return c
10124}
10125
10126// Fields allows partial responses to be retrieved. See
10127// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10128// for more information.
10129func (c *ProjectsAgentImportCall) Fields(s ...googleapi.Field) *ProjectsAgentImportCall {
10130	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10131	return c
10132}
10133
10134// Context sets the context to be used in this call's Do method. Any
10135// pending HTTP request will be aborted if the provided context is
10136// canceled.
10137func (c *ProjectsAgentImportCall) Context(ctx context.Context) *ProjectsAgentImportCall {
10138	c.ctx_ = ctx
10139	return c
10140}
10141
10142// Header returns an http.Header that can be modified by the caller to
10143// add HTTP headers to the request.
10144func (c *ProjectsAgentImportCall) Header() http.Header {
10145	if c.header_ == nil {
10146		c.header_ = make(http.Header)
10147	}
10148	return c.header_
10149}
10150
10151func (c *ProjectsAgentImportCall) doRequest(alt string) (*http.Response, error) {
10152	reqHeaders := make(http.Header)
10153	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
10154	for k, v := range c.header_ {
10155		reqHeaders[k] = v
10156	}
10157	reqHeaders.Set("User-Agent", c.s.userAgent())
10158	var body io.Reader = nil
10159	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1importagentrequest)
10160	if err != nil {
10161		return nil, err
10162	}
10163	reqHeaders.Set("Content-Type", "application/json")
10164	c.urlParams_.Set("alt", alt)
10165	c.urlParams_.Set("prettyPrint", "false")
10166	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:import")
10167	urls += "?" + c.urlParams_.Encode()
10168	req, err := http.NewRequest("POST", urls, body)
10169	if err != nil {
10170		return nil, err
10171	}
10172	req.Header = reqHeaders
10173	googleapi.Expand(req.URL, map[string]string{
10174		"parent": c.parent,
10175	})
10176	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10177}
10178
10179// Do executes the "dialogflow.projects.agent.import" call.
10180// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
10181// Any non-2xx status code is an error. Response headers are in either
10182// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
10183// was returned at all) in error.(*googleapi.Error).Header. Use
10184// googleapi.IsNotModified to check whether the returned error was
10185// because http.StatusNotModified was returned.
10186func (c *ProjectsAgentImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
10187	gensupport.SetOptions(c.urlParams_, opts...)
10188	res, err := c.doRequest("json")
10189	if res != nil && res.StatusCode == http.StatusNotModified {
10190		if res.Body != nil {
10191			res.Body.Close()
10192		}
10193		return nil, &googleapi.Error{
10194			Code:   res.StatusCode,
10195			Header: res.Header,
10196		}
10197	}
10198	if err != nil {
10199		return nil, err
10200	}
10201	defer googleapi.CloseBody(res)
10202	if err := googleapi.CheckResponse(res); err != nil {
10203		return nil, err
10204	}
10205	ret := &GoogleLongrunningOperation{
10206		ServerResponse: googleapi.ServerResponse{
10207			Header:         res.Header,
10208			HTTPStatusCode: res.StatusCode,
10209		},
10210	}
10211	target := &ret
10212	if err := gensupport.DecodeResponse(target, res); err != nil {
10213		return nil, err
10214	}
10215	return ret, nil
10216	// {
10217	//   "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",
10218	//   "flatPath": "v2beta1/projects/{projectsId}/agent:import",
10219	//   "httpMethod": "POST",
10220	//   "id": "dialogflow.projects.agent.import",
10221	//   "parameterOrder": [
10222	//     "parent"
10223	//   ],
10224	//   "parameters": {
10225	//     "parent": {
10226	//       "description": "Required. The project that the agent to import is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
10227	//       "location": "path",
10228	//       "pattern": "^projects/[^/]+$",
10229	//       "required": true,
10230	//       "type": "string"
10231	//     }
10232	//   },
10233	//   "path": "v2beta1/{+parent}/agent:import",
10234	//   "request": {
10235	//     "$ref": "GoogleCloudDialogflowV2beta1ImportAgentRequest"
10236	//   },
10237	//   "response": {
10238	//     "$ref": "GoogleLongrunningOperation"
10239	//   },
10240	//   "scopes": [
10241	//     "https://www.googleapis.com/auth/cloud-platform",
10242	//     "https://www.googleapis.com/auth/dialogflow"
10243	//   ]
10244	// }
10245
10246}
10247
10248// method id "dialogflow.projects.agent.restore":
10249
10250type ProjectsAgentRestoreCall struct {
10251	s                                               *Service
10252	parent                                          string
10253	googleclouddialogflowv2beta1restoreagentrequest *GoogleCloudDialogflowV2beta1RestoreAgentRequest
10254	urlParams_                                      gensupport.URLParams
10255	ctx_                                            context.Context
10256	header_                                         http.Header
10257}
10258
10259// Restore: Restores the specified agent from a ZIP file.
10260//
10261// Replaces the current agent version with a new one. All the intents
10262// and
10263// entity types in the older version are deleted.
10264//
10265//
10266// Operation <response: google.protobuf.Empty>
10267func (r *ProjectsAgentService) Restore(parent string, googleclouddialogflowv2beta1restoreagentrequest *GoogleCloudDialogflowV2beta1RestoreAgentRequest) *ProjectsAgentRestoreCall {
10268	c := &ProjectsAgentRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10269	c.parent = parent
10270	c.googleclouddialogflowv2beta1restoreagentrequest = googleclouddialogflowv2beta1restoreagentrequest
10271	return c
10272}
10273
10274// Fields allows partial responses to be retrieved. See
10275// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10276// for more information.
10277func (c *ProjectsAgentRestoreCall) Fields(s ...googleapi.Field) *ProjectsAgentRestoreCall {
10278	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10279	return c
10280}
10281
10282// Context sets the context to be used in this call's Do method. Any
10283// pending HTTP request will be aborted if the provided context is
10284// canceled.
10285func (c *ProjectsAgentRestoreCall) Context(ctx context.Context) *ProjectsAgentRestoreCall {
10286	c.ctx_ = ctx
10287	return c
10288}
10289
10290// Header returns an http.Header that can be modified by the caller to
10291// add HTTP headers to the request.
10292func (c *ProjectsAgentRestoreCall) Header() http.Header {
10293	if c.header_ == nil {
10294		c.header_ = make(http.Header)
10295	}
10296	return c.header_
10297}
10298
10299func (c *ProjectsAgentRestoreCall) doRequest(alt string) (*http.Response, error) {
10300	reqHeaders := make(http.Header)
10301	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
10302	for k, v := range c.header_ {
10303		reqHeaders[k] = v
10304	}
10305	reqHeaders.Set("User-Agent", c.s.userAgent())
10306	var body io.Reader = nil
10307	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1restoreagentrequest)
10308	if err != nil {
10309		return nil, err
10310	}
10311	reqHeaders.Set("Content-Type", "application/json")
10312	c.urlParams_.Set("alt", alt)
10313	c.urlParams_.Set("prettyPrint", "false")
10314	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:restore")
10315	urls += "?" + c.urlParams_.Encode()
10316	req, err := http.NewRequest("POST", urls, body)
10317	if err != nil {
10318		return nil, err
10319	}
10320	req.Header = reqHeaders
10321	googleapi.Expand(req.URL, map[string]string{
10322		"parent": c.parent,
10323	})
10324	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10325}
10326
10327// Do executes the "dialogflow.projects.agent.restore" call.
10328// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
10329// Any non-2xx status code is an error. Response headers are in either
10330// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
10331// was returned at all) in error.(*googleapi.Error).Header. Use
10332// googleapi.IsNotModified to check whether the returned error was
10333// because http.StatusNotModified was returned.
10334func (c *ProjectsAgentRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
10335	gensupport.SetOptions(c.urlParams_, opts...)
10336	res, err := c.doRequest("json")
10337	if res != nil && res.StatusCode == http.StatusNotModified {
10338		if res.Body != nil {
10339			res.Body.Close()
10340		}
10341		return nil, &googleapi.Error{
10342			Code:   res.StatusCode,
10343			Header: res.Header,
10344		}
10345	}
10346	if err != nil {
10347		return nil, err
10348	}
10349	defer googleapi.CloseBody(res)
10350	if err := googleapi.CheckResponse(res); err != nil {
10351		return nil, err
10352	}
10353	ret := &GoogleLongrunningOperation{
10354		ServerResponse: googleapi.ServerResponse{
10355			Header:         res.Header,
10356			HTTPStatusCode: res.StatusCode,
10357		},
10358	}
10359	target := &ret
10360	if err := gensupport.DecodeResponse(target, res); err != nil {
10361		return nil, err
10362	}
10363	return ret, nil
10364	// {
10365	//   "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",
10366	//   "flatPath": "v2beta1/projects/{projectsId}/agent:restore",
10367	//   "httpMethod": "POST",
10368	//   "id": "dialogflow.projects.agent.restore",
10369	//   "parameterOrder": [
10370	//     "parent"
10371	//   ],
10372	//   "parameters": {
10373	//     "parent": {
10374	//       "description": "Required. The project that the agent to restore is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
10375	//       "location": "path",
10376	//       "pattern": "^projects/[^/]+$",
10377	//       "required": true,
10378	//       "type": "string"
10379	//     }
10380	//   },
10381	//   "path": "v2beta1/{+parent}/agent:restore",
10382	//   "request": {
10383	//     "$ref": "GoogleCloudDialogflowV2beta1RestoreAgentRequest"
10384	//   },
10385	//   "response": {
10386	//     "$ref": "GoogleLongrunningOperation"
10387	//   },
10388	//   "scopes": [
10389	//     "https://www.googleapis.com/auth/cloud-platform",
10390	//     "https://www.googleapis.com/auth/dialogflow"
10391	//   ]
10392	// }
10393
10394}
10395
10396// method id "dialogflow.projects.agent.search":
10397
10398type ProjectsAgentSearchCall struct {
10399	s            *Service
10400	parent       string
10401	urlParams_   gensupport.URLParams
10402	ifNoneMatch_ string
10403	ctx_         context.Context
10404	header_      http.Header
10405}
10406
10407// Search: Returns the list of agents.
10408//
10409// Since there is at most one conversational agent per project, this
10410// method is
10411// useful primarily for listing all agents across projects the caller
10412// has
10413// access to. One can achieve that with a wildcard project collection id
10414// "-".
10415// Refer to
10416// [List
10417// Sub-Collections](https://cloud.google.com/apis/design/design_pat
10418// terns#list_sub-collections).
10419func (r *ProjectsAgentService) Search(parent string) *ProjectsAgentSearchCall {
10420	c := &ProjectsAgentSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10421	c.parent = parent
10422	return c
10423}
10424
10425// PageSize sets the optional parameter "pageSize": The maximum number
10426// of items to return in a single page. By
10427// default 100 and at most 1000.
10428func (c *ProjectsAgentSearchCall) PageSize(pageSize int64) *ProjectsAgentSearchCall {
10429	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10430	return c
10431}
10432
10433// PageToken sets the optional parameter "pageToken": The
10434// next_page_token value returned from a previous list request.
10435func (c *ProjectsAgentSearchCall) PageToken(pageToken string) *ProjectsAgentSearchCall {
10436	c.urlParams_.Set("pageToken", pageToken)
10437	return c
10438}
10439
10440// Fields allows partial responses to be retrieved. See
10441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10442// for more information.
10443func (c *ProjectsAgentSearchCall) Fields(s ...googleapi.Field) *ProjectsAgentSearchCall {
10444	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10445	return c
10446}
10447
10448// IfNoneMatch sets the optional parameter which makes the operation
10449// fail if the object's ETag matches the given value. This is useful for
10450// getting updates only after the object has changed since the last
10451// request. Use googleapi.IsNotModified to check whether the response
10452// error from Do is the result of In-None-Match.
10453func (c *ProjectsAgentSearchCall) IfNoneMatch(entityTag string) *ProjectsAgentSearchCall {
10454	c.ifNoneMatch_ = entityTag
10455	return c
10456}
10457
10458// Context sets the context to be used in this call's Do method. Any
10459// pending HTTP request will be aborted if the provided context is
10460// canceled.
10461func (c *ProjectsAgentSearchCall) Context(ctx context.Context) *ProjectsAgentSearchCall {
10462	c.ctx_ = ctx
10463	return c
10464}
10465
10466// Header returns an http.Header that can be modified by the caller to
10467// add HTTP headers to the request.
10468func (c *ProjectsAgentSearchCall) Header() http.Header {
10469	if c.header_ == nil {
10470		c.header_ = make(http.Header)
10471	}
10472	return c.header_
10473}
10474
10475func (c *ProjectsAgentSearchCall) doRequest(alt string) (*http.Response, error) {
10476	reqHeaders := make(http.Header)
10477	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
10478	for k, v := range c.header_ {
10479		reqHeaders[k] = v
10480	}
10481	reqHeaders.Set("User-Agent", c.s.userAgent())
10482	if c.ifNoneMatch_ != "" {
10483		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10484	}
10485	var body io.Reader = nil
10486	c.urlParams_.Set("alt", alt)
10487	c.urlParams_.Set("prettyPrint", "false")
10488	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:search")
10489	urls += "?" + c.urlParams_.Encode()
10490	req, err := http.NewRequest("GET", urls, body)
10491	if err != nil {
10492		return nil, err
10493	}
10494	req.Header = reqHeaders
10495	googleapi.Expand(req.URL, map[string]string{
10496		"parent": c.parent,
10497	})
10498	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10499}
10500
10501// Do executes the "dialogflow.projects.agent.search" call.
10502// Exactly one of *GoogleCloudDialogflowV2beta1SearchAgentsResponse or
10503// error will be non-nil. Any non-2xx status code is an error. Response
10504// headers are in either
10505// *GoogleCloudDialogflowV2beta1SearchAgentsResponse.ServerResponse.Heade
10506// r or (if a response was returned at all) in
10507// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10508// whether the returned error was because http.StatusNotModified was
10509// returned.
10510func (c *ProjectsAgentSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SearchAgentsResponse, error) {
10511	gensupport.SetOptions(c.urlParams_, opts...)
10512	res, err := c.doRequest("json")
10513	if res != nil && res.StatusCode == http.StatusNotModified {
10514		if res.Body != nil {
10515			res.Body.Close()
10516		}
10517		return nil, &googleapi.Error{
10518			Code:   res.StatusCode,
10519			Header: res.Header,
10520		}
10521	}
10522	if err != nil {
10523		return nil, err
10524	}
10525	defer googleapi.CloseBody(res)
10526	if err := googleapi.CheckResponse(res); err != nil {
10527		return nil, err
10528	}
10529	ret := &GoogleCloudDialogflowV2beta1SearchAgentsResponse{
10530		ServerResponse: googleapi.ServerResponse{
10531			Header:         res.Header,
10532			HTTPStatusCode: res.StatusCode,
10533		},
10534	}
10535	target := &ret
10536	if err := gensupport.DecodeResponse(target, res); err != nil {
10537		return nil, err
10538	}
10539	return ret, nil
10540	// {
10541	//   "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).",
10542	//   "flatPath": "v2beta1/projects/{projectsId}/agent:search",
10543	//   "httpMethod": "GET",
10544	//   "id": "dialogflow.projects.agent.search",
10545	//   "parameterOrder": [
10546	//     "parent"
10547	//   ],
10548	//   "parameters": {
10549	//     "pageSize": {
10550	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
10551	//       "format": "int32",
10552	//       "location": "query",
10553	//       "type": "integer"
10554	//     },
10555	//     "pageToken": {
10556	//       "description": "Optional. The next_page_token value returned from a previous list request.",
10557	//       "location": "query",
10558	//       "type": "string"
10559	//     },
10560	//     "parent": {
10561	//       "description": "Required. The project to list agents from.\nFormat: `projects/\u003cProject ID or '-'\u003e`.",
10562	//       "location": "path",
10563	//       "pattern": "^projects/[^/]+$",
10564	//       "required": true,
10565	//       "type": "string"
10566	//     }
10567	//   },
10568	//   "path": "v2beta1/{+parent}/agent:search",
10569	//   "response": {
10570	//     "$ref": "GoogleCloudDialogflowV2beta1SearchAgentsResponse"
10571	//   },
10572	//   "scopes": [
10573	//     "https://www.googleapis.com/auth/cloud-platform",
10574	//     "https://www.googleapis.com/auth/dialogflow"
10575	//   ]
10576	// }
10577
10578}
10579
10580// Pages invokes f for each page of results.
10581// A non-nil error returned from f will halt the iteration.
10582// The provided context supersedes any context provided to the Context method.
10583func (c *ProjectsAgentSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1SearchAgentsResponse) error) error {
10584	c.ctx_ = ctx
10585	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10586	for {
10587		x, err := c.Do()
10588		if err != nil {
10589			return err
10590		}
10591		if err := f(x); err != nil {
10592			return err
10593		}
10594		if x.NextPageToken == "" {
10595			return nil
10596		}
10597		c.PageToken(x.NextPageToken)
10598	}
10599}
10600
10601// method id "dialogflow.projects.agent.train":
10602
10603type ProjectsAgentTrainCall struct {
10604	s                                             *Service
10605	parent                                        string
10606	googleclouddialogflowv2beta1trainagentrequest *GoogleCloudDialogflowV2beta1TrainAgentRequest
10607	urlParams_                                    gensupport.URLParams
10608	ctx_                                          context.Context
10609	header_                                       http.Header
10610}
10611
10612// Train: Trains the specified agent.
10613//
10614//
10615// Operation <response: google.protobuf.Empty>
10616func (r *ProjectsAgentService) Train(parent string, googleclouddialogflowv2beta1trainagentrequest *GoogleCloudDialogflowV2beta1TrainAgentRequest) *ProjectsAgentTrainCall {
10617	c := &ProjectsAgentTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10618	c.parent = parent
10619	c.googleclouddialogflowv2beta1trainagentrequest = googleclouddialogflowv2beta1trainagentrequest
10620	return c
10621}
10622
10623// Fields allows partial responses to be retrieved. See
10624// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10625// for more information.
10626func (c *ProjectsAgentTrainCall) Fields(s ...googleapi.Field) *ProjectsAgentTrainCall {
10627	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10628	return c
10629}
10630
10631// Context sets the context to be used in this call's Do method. Any
10632// pending HTTP request will be aborted if the provided context is
10633// canceled.
10634func (c *ProjectsAgentTrainCall) Context(ctx context.Context) *ProjectsAgentTrainCall {
10635	c.ctx_ = ctx
10636	return c
10637}
10638
10639// Header returns an http.Header that can be modified by the caller to
10640// add HTTP headers to the request.
10641func (c *ProjectsAgentTrainCall) Header() http.Header {
10642	if c.header_ == nil {
10643		c.header_ = make(http.Header)
10644	}
10645	return c.header_
10646}
10647
10648func (c *ProjectsAgentTrainCall) doRequest(alt string) (*http.Response, error) {
10649	reqHeaders := make(http.Header)
10650	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
10651	for k, v := range c.header_ {
10652		reqHeaders[k] = v
10653	}
10654	reqHeaders.Set("User-Agent", c.s.userAgent())
10655	var body io.Reader = nil
10656	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1trainagentrequest)
10657	if err != nil {
10658		return nil, err
10659	}
10660	reqHeaders.Set("Content-Type", "application/json")
10661	c.urlParams_.Set("alt", alt)
10662	c.urlParams_.Set("prettyPrint", "false")
10663	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:train")
10664	urls += "?" + c.urlParams_.Encode()
10665	req, err := http.NewRequest("POST", urls, body)
10666	if err != nil {
10667		return nil, err
10668	}
10669	req.Header = reqHeaders
10670	googleapi.Expand(req.URL, map[string]string{
10671		"parent": c.parent,
10672	})
10673	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10674}
10675
10676// Do executes the "dialogflow.projects.agent.train" call.
10677// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
10678// Any non-2xx status code is an error. Response headers are in either
10679// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
10680// was returned at all) in error.(*googleapi.Error).Header. Use
10681// googleapi.IsNotModified to check whether the returned error was
10682// because http.StatusNotModified was returned.
10683func (c *ProjectsAgentTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
10684	gensupport.SetOptions(c.urlParams_, opts...)
10685	res, err := c.doRequest("json")
10686	if res != nil && res.StatusCode == http.StatusNotModified {
10687		if res.Body != nil {
10688			res.Body.Close()
10689		}
10690		return nil, &googleapi.Error{
10691			Code:   res.StatusCode,
10692			Header: res.Header,
10693		}
10694	}
10695	if err != nil {
10696		return nil, err
10697	}
10698	defer googleapi.CloseBody(res)
10699	if err := googleapi.CheckResponse(res); err != nil {
10700		return nil, err
10701	}
10702	ret := &GoogleLongrunningOperation{
10703		ServerResponse: googleapi.ServerResponse{
10704			Header:         res.Header,
10705			HTTPStatusCode: res.StatusCode,
10706		},
10707	}
10708	target := &ret
10709	if err := gensupport.DecodeResponse(target, res); err != nil {
10710		return nil, err
10711	}
10712	return ret, nil
10713	// {
10714	//   "description": "Trains the specified agent.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
10715	//   "flatPath": "v2beta1/projects/{projectsId}/agent:train",
10716	//   "httpMethod": "POST",
10717	//   "id": "dialogflow.projects.agent.train",
10718	//   "parameterOrder": [
10719	//     "parent"
10720	//   ],
10721	//   "parameters": {
10722	//     "parent": {
10723	//       "description": "Required. The project that the agent to train is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
10724	//       "location": "path",
10725	//       "pattern": "^projects/[^/]+$",
10726	//       "required": true,
10727	//       "type": "string"
10728	//     }
10729	//   },
10730	//   "path": "v2beta1/{+parent}/agent:train",
10731	//   "request": {
10732	//     "$ref": "GoogleCloudDialogflowV2beta1TrainAgentRequest"
10733	//   },
10734	//   "response": {
10735	//     "$ref": "GoogleLongrunningOperation"
10736	//   },
10737	//   "scopes": [
10738	//     "https://www.googleapis.com/auth/cloud-platform",
10739	//     "https://www.googleapis.com/auth/dialogflow"
10740	//   ]
10741	// }
10742
10743}
10744
10745// method id "dialogflow.projects.agent.updateFulfillment":
10746
10747type ProjectsAgentUpdateFulfillmentCall struct {
10748	s                                       *Service
10749	nameid                                  string
10750	googleclouddialogflowv2beta1fulfillment *GoogleCloudDialogflowV2beta1Fulfillment
10751	urlParams_                              gensupport.URLParams
10752	ctx_                                    context.Context
10753	header_                                 http.Header
10754}
10755
10756// UpdateFulfillment: Updates the fulfillment.
10757func (r *ProjectsAgentService) UpdateFulfillment(nameid string, googleclouddialogflowv2beta1fulfillment *GoogleCloudDialogflowV2beta1Fulfillment) *ProjectsAgentUpdateFulfillmentCall {
10758	c := &ProjectsAgentUpdateFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10759	c.nameid = nameid
10760	c.googleclouddialogflowv2beta1fulfillment = googleclouddialogflowv2beta1fulfillment
10761	return c
10762}
10763
10764// UpdateMask sets the optional parameter "updateMask": Required. The
10765// mask to control which fields get updated. If the mask is not
10766// present, all fields will be updated.
10767func (c *ProjectsAgentUpdateFulfillmentCall) UpdateMask(updateMask string) *ProjectsAgentUpdateFulfillmentCall {
10768	c.urlParams_.Set("updateMask", updateMask)
10769	return c
10770}
10771
10772// Fields allows partial responses to be retrieved. See
10773// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10774// for more information.
10775func (c *ProjectsAgentUpdateFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsAgentUpdateFulfillmentCall {
10776	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10777	return c
10778}
10779
10780// Context sets the context to be used in this call's Do method. Any
10781// pending HTTP request will be aborted if the provided context is
10782// canceled.
10783func (c *ProjectsAgentUpdateFulfillmentCall) Context(ctx context.Context) *ProjectsAgentUpdateFulfillmentCall {
10784	c.ctx_ = ctx
10785	return c
10786}
10787
10788// Header returns an http.Header that can be modified by the caller to
10789// add HTTP headers to the request.
10790func (c *ProjectsAgentUpdateFulfillmentCall) Header() http.Header {
10791	if c.header_ == nil {
10792		c.header_ = make(http.Header)
10793	}
10794	return c.header_
10795}
10796
10797func (c *ProjectsAgentUpdateFulfillmentCall) doRequest(alt string) (*http.Response, error) {
10798	reqHeaders := make(http.Header)
10799	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
10800	for k, v := range c.header_ {
10801		reqHeaders[k] = v
10802	}
10803	reqHeaders.Set("User-Agent", c.s.userAgent())
10804	var body io.Reader = nil
10805	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1fulfillment)
10806	if err != nil {
10807		return nil, err
10808	}
10809	reqHeaders.Set("Content-Type", "application/json")
10810	c.urlParams_.Set("alt", alt)
10811	c.urlParams_.Set("prettyPrint", "false")
10812	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
10813	urls += "?" + c.urlParams_.Encode()
10814	req, err := http.NewRequest("PATCH", urls, body)
10815	if err != nil {
10816		return nil, err
10817	}
10818	req.Header = reqHeaders
10819	googleapi.Expand(req.URL, map[string]string{
10820		"name": c.nameid,
10821	})
10822	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10823}
10824
10825// Do executes the "dialogflow.projects.agent.updateFulfillment" call.
10826// Exactly one of *GoogleCloudDialogflowV2beta1Fulfillment or error will
10827// be non-nil. Any non-2xx status code is an error. Response headers are
10828// in either
10829// *GoogleCloudDialogflowV2beta1Fulfillment.ServerResponse.Header or (if
10830// a response was returned at all) in error.(*googleapi.Error).Header.
10831// Use googleapi.IsNotModified to check whether the returned error was
10832// because http.StatusNotModified was returned.
10833func (c *ProjectsAgentUpdateFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Fulfillment, error) {
10834	gensupport.SetOptions(c.urlParams_, opts...)
10835	res, err := c.doRequest("json")
10836	if res != nil && res.StatusCode == http.StatusNotModified {
10837		if res.Body != nil {
10838			res.Body.Close()
10839		}
10840		return nil, &googleapi.Error{
10841			Code:   res.StatusCode,
10842			Header: res.Header,
10843		}
10844	}
10845	if err != nil {
10846		return nil, err
10847	}
10848	defer googleapi.CloseBody(res)
10849	if err := googleapi.CheckResponse(res); err != nil {
10850		return nil, err
10851	}
10852	ret := &GoogleCloudDialogflowV2beta1Fulfillment{
10853		ServerResponse: googleapi.ServerResponse{
10854			Header:         res.Header,
10855			HTTPStatusCode: res.StatusCode,
10856		},
10857	}
10858	target := &ret
10859	if err := gensupport.DecodeResponse(target, res); err != nil {
10860		return nil, err
10861	}
10862	return ret, nil
10863	// {
10864	//   "description": "Updates the fulfillment.",
10865	//   "flatPath": "v2beta1/projects/{projectsId}/agent/fulfillment",
10866	//   "httpMethod": "PATCH",
10867	//   "id": "dialogflow.projects.agent.updateFulfillment",
10868	//   "parameterOrder": [
10869	//     "name"
10870	//   ],
10871	//   "parameters": {
10872	//     "name": {
10873	//       "description": "Required. The unique identifier of the fulfillment.\nFormat: `projects/\u003cProject ID\u003e/agent/fulfillment`.",
10874	//       "location": "path",
10875	//       "pattern": "^projects/[^/]+/agent/fulfillment$",
10876	//       "required": true,
10877	//       "type": "string"
10878	//     },
10879	//     "updateMask": {
10880	//       "description": "Required. The mask to control which fields get updated. If the mask is not\npresent, all fields will be updated.",
10881	//       "format": "google-fieldmask",
10882	//       "location": "query",
10883	//       "type": "string"
10884	//     }
10885	//   },
10886	//   "path": "v2beta1/{+name}",
10887	//   "request": {
10888	//     "$ref": "GoogleCloudDialogflowV2beta1Fulfillment"
10889	//   },
10890	//   "response": {
10891	//     "$ref": "GoogleCloudDialogflowV2beta1Fulfillment"
10892	//   },
10893	//   "scopes": [
10894	//     "https://www.googleapis.com/auth/cloud-platform",
10895	//     "https://www.googleapis.com/auth/dialogflow"
10896	//   ]
10897	// }
10898
10899}
10900
10901// method id "dialogflow.projects.agent.entityTypes.batchDelete":
10902
10903type ProjectsAgentEntityTypesBatchDeleteCall struct {
10904	s                                                         *Service
10905	parent                                                    string
10906	googleclouddialogflowv2beta1batchdeleteentitytypesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest
10907	urlParams_                                                gensupport.URLParams
10908	ctx_                                                      context.Context
10909	header_                                                   http.Header
10910}
10911
10912// BatchDelete: Deletes entity types in the specified agent.
10913//
10914// Operation <response: google.protobuf.Empty>
10915func (r *ProjectsAgentEntityTypesService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteentitytypesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest) *ProjectsAgentEntityTypesBatchDeleteCall {
10916	c := &ProjectsAgentEntityTypesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10917	c.parent = parent
10918	c.googleclouddialogflowv2beta1batchdeleteentitytypesrequest = googleclouddialogflowv2beta1batchdeleteentitytypesrequest
10919	return c
10920}
10921
10922// Fields allows partial responses to be retrieved. See
10923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10924// for more information.
10925func (c *ProjectsAgentEntityTypesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchDeleteCall {
10926	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10927	return c
10928}
10929
10930// Context sets the context to be used in this call's Do method. Any
10931// pending HTTP request will be aborted if the provided context is
10932// canceled.
10933func (c *ProjectsAgentEntityTypesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchDeleteCall {
10934	c.ctx_ = ctx
10935	return c
10936}
10937
10938// Header returns an http.Header that can be modified by the caller to
10939// add HTTP headers to the request.
10940func (c *ProjectsAgentEntityTypesBatchDeleteCall) Header() http.Header {
10941	if c.header_ == nil {
10942		c.header_ = make(http.Header)
10943	}
10944	return c.header_
10945}
10946
10947func (c *ProjectsAgentEntityTypesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
10948	reqHeaders := make(http.Header)
10949	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
10950	for k, v := range c.header_ {
10951		reqHeaders[k] = v
10952	}
10953	reqHeaders.Set("User-Agent", c.s.userAgent())
10954	var body io.Reader = nil
10955	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteentitytypesrequest)
10956	if err != nil {
10957		return nil, err
10958	}
10959	reqHeaders.Set("Content-Type", "application/json")
10960	c.urlParams_.Set("alt", alt)
10961	c.urlParams_.Set("prettyPrint", "false")
10962	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes:batchDelete")
10963	urls += "?" + c.urlParams_.Encode()
10964	req, err := http.NewRequest("POST", urls, body)
10965	if err != nil {
10966		return nil, err
10967	}
10968	req.Header = reqHeaders
10969	googleapi.Expand(req.URL, map[string]string{
10970		"parent": c.parent,
10971	})
10972	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10973}
10974
10975// Do executes the "dialogflow.projects.agent.entityTypes.batchDelete" call.
10976// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
10977// Any non-2xx status code is an error. Response headers are in either
10978// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
10979// was returned at all) in error.(*googleapi.Error).Header. Use
10980// googleapi.IsNotModified to check whether the returned error was
10981// because http.StatusNotModified was returned.
10982func (c *ProjectsAgentEntityTypesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
10983	gensupport.SetOptions(c.urlParams_, opts...)
10984	res, err := c.doRequest("json")
10985	if res != nil && res.StatusCode == http.StatusNotModified {
10986		if res.Body != nil {
10987			res.Body.Close()
10988		}
10989		return nil, &googleapi.Error{
10990			Code:   res.StatusCode,
10991			Header: res.Header,
10992		}
10993	}
10994	if err != nil {
10995		return nil, err
10996	}
10997	defer googleapi.CloseBody(res)
10998	if err := googleapi.CheckResponse(res); err != nil {
10999		return nil, err
11000	}
11001	ret := &GoogleLongrunningOperation{
11002		ServerResponse: googleapi.ServerResponse{
11003			Header:         res.Header,
11004			HTTPStatusCode: res.StatusCode,
11005		},
11006	}
11007	target := &ret
11008	if err := gensupport.DecodeResponse(target, res); err != nil {
11009		return nil, err
11010	}
11011	return ret, nil
11012	// {
11013	//   "description": "Deletes entity types in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
11014	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes:batchDelete",
11015	//   "httpMethod": "POST",
11016	//   "id": "dialogflow.projects.agent.entityTypes.batchDelete",
11017	//   "parameterOrder": [
11018	//     "parent"
11019	//   ],
11020	//   "parameters": {
11021	//     "parent": {
11022	//       "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.",
11023	//       "location": "path",
11024	//       "pattern": "^projects/[^/]+/agent$",
11025	//       "required": true,
11026	//       "type": "string"
11027	//     }
11028	//   },
11029	//   "path": "v2beta1/{+parent}/entityTypes:batchDelete",
11030	//   "request": {
11031	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest"
11032	//   },
11033	//   "response": {
11034	//     "$ref": "GoogleLongrunningOperation"
11035	//   },
11036	//   "scopes": [
11037	//     "https://www.googleapis.com/auth/cloud-platform",
11038	//     "https://www.googleapis.com/auth/dialogflow"
11039	//   ]
11040	// }
11041
11042}
11043
11044// method id "dialogflow.projects.agent.entityTypes.batchUpdate":
11045
11046type ProjectsAgentEntityTypesBatchUpdateCall struct {
11047	s                                                         *Service
11048	parent                                                    string
11049	googleclouddialogflowv2beta1batchupdateentitytypesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest
11050	urlParams_                                                gensupport.URLParams
11051	ctx_                                                      context.Context
11052	header_                                                   http.Header
11053}
11054
11055// BatchUpdate: Updates/Creates multiple entity types in the specified
11056// agent.
11057//
11058// Operation <response: BatchUpdateEntityTypesResponse>
11059func (r *ProjectsAgentEntityTypesService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateentitytypesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest) *ProjectsAgentEntityTypesBatchUpdateCall {
11060	c := &ProjectsAgentEntityTypesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11061	c.parent = parent
11062	c.googleclouddialogflowv2beta1batchupdateentitytypesrequest = googleclouddialogflowv2beta1batchupdateentitytypesrequest
11063	return c
11064}
11065
11066// Fields allows partial responses to be retrieved. See
11067// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11068// for more information.
11069func (c *ProjectsAgentEntityTypesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchUpdateCall {
11070	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11071	return c
11072}
11073
11074// Context sets the context to be used in this call's Do method. Any
11075// pending HTTP request will be aborted if the provided context is
11076// canceled.
11077func (c *ProjectsAgentEntityTypesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchUpdateCall {
11078	c.ctx_ = ctx
11079	return c
11080}
11081
11082// Header returns an http.Header that can be modified by the caller to
11083// add HTTP headers to the request.
11084func (c *ProjectsAgentEntityTypesBatchUpdateCall) Header() http.Header {
11085	if c.header_ == nil {
11086		c.header_ = make(http.Header)
11087	}
11088	return c.header_
11089}
11090
11091func (c *ProjectsAgentEntityTypesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
11092	reqHeaders := make(http.Header)
11093	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
11094	for k, v := range c.header_ {
11095		reqHeaders[k] = v
11096	}
11097	reqHeaders.Set("User-Agent", c.s.userAgent())
11098	var body io.Reader = nil
11099	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateentitytypesrequest)
11100	if err != nil {
11101		return nil, err
11102	}
11103	reqHeaders.Set("Content-Type", "application/json")
11104	c.urlParams_.Set("alt", alt)
11105	c.urlParams_.Set("prettyPrint", "false")
11106	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes:batchUpdate")
11107	urls += "?" + c.urlParams_.Encode()
11108	req, err := http.NewRequest("POST", urls, body)
11109	if err != nil {
11110		return nil, err
11111	}
11112	req.Header = reqHeaders
11113	googleapi.Expand(req.URL, map[string]string{
11114		"parent": c.parent,
11115	})
11116	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11117}
11118
11119// Do executes the "dialogflow.projects.agent.entityTypes.batchUpdate" call.
11120// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
11121// Any non-2xx status code is an error. Response headers are in either
11122// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
11123// was returned at all) in error.(*googleapi.Error).Header. Use
11124// googleapi.IsNotModified to check whether the returned error was
11125// because http.StatusNotModified was returned.
11126func (c *ProjectsAgentEntityTypesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
11127	gensupport.SetOptions(c.urlParams_, opts...)
11128	res, err := c.doRequest("json")
11129	if res != nil && res.StatusCode == http.StatusNotModified {
11130		if res.Body != nil {
11131			res.Body.Close()
11132		}
11133		return nil, &googleapi.Error{
11134			Code:   res.StatusCode,
11135			Header: res.Header,
11136		}
11137	}
11138	if err != nil {
11139		return nil, err
11140	}
11141	defer googleapi.CloseBody(res)
11142	if err := googleapi.CheckResponse(res); err != nil {
11143		return nil, err
11144	}
11145	ret := &GoogleLongrunningOperation{
11146		ServerResponse: googleapi.ServerResponse{
11147			Header:         res.Header,
11148			HTTPStatusCode: res.StatusCode,
11149		},
11150	}
11151	target := &ret
11152	if err := gensupport.DecodeResponse(target, res); err != nil {
11153		return nil, err
11154	}
11155	return ret, nil
11156	// {
11157	//   "description": "Updates/Creates multiple entity types in the specified agent.\n\nOperation \u003cresponse: BatchUpdateEntityTypesResponse\u003e",
11158	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes:batchUpdate",
11159	//   "httpMethod": "POST",
11160	//   "id": "dialogflow.projects.agent.entityTypes.batchUpdate",
11161	//   "parameterOrder": [
11162	//     "parent"
11163	//   ],
11164	//   "parameters": {
11165	//     "parent": {
11166	//       "description": "Required. The name of the agent to update or create entity types in.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
11167	//       "location": "path",
11168	//       "pattern": "^projects/[^/]+/agent$",
11169	//       "required": true,
11170	//       "type": "string"
11171	//     }
11172	//   },
11173	//   "path": "v2beta1/{+parent}/entityTypes:batchUpdate",
11174	//   "request": {
11175	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest"
11176	//   },
11177	//   "response": {
11178	//     "$ref": "GoogleLongrunningOperation"
11179	//   },
11180	//   "scopes": [
11181	//     "https://www.googleapis.com/auth/cloud-platform",
11182	//     "https://www.googleapis.com/auth/dialogflow"
11183	//   ]
11184	// }
11185
11186}
11187
11188// method id "dialogflow.projects.agent.entityTypes.create":
11189
11190type ProjectsAgentEntityTypesCreateCall struct {
11191	s                                      *Service
11192	parent                                 string
11193	googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType
11194	urlParams_                             gensupport.URLParams
11195	ctx_                                   context.Context
11196	header_                                http.Header
11197}
11198
11199// Create: Creates an entity type in the specified agent.
11200func (r *ProjectsAgentEntityTypesService) Create(parent string, googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType) *ProjectsAgentEntityTypesCreateCall {
11201	c := &ProjectsAgentEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11202	c.parent = parent
11203	c.googleclouddialogflowv2beta1entitytype = googleclouddialogflowv2beta1entitytype
11204	return c
11205}
11206
11207// LanguageCode sets the optional parameter "languageCode": The language
11208// of entity synonyms defined in `entity_type`. If not
11209// specified, the agent's default language is
11210// used.
11211// [Many
11212// languages](https://cloud.google.com/dialogflow/docs/refere
11213// nce/language)
11214// are supported. Note: languages must be enabled in the agent before
11215// they can
11216// be used.
11217func (c *ProjectsAgentEntityTypesCreateCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesCreateCall {
11218	c.urlParams_.Set("languageCode", languageCode)
11219	return c
11220}
11221
11222// Fields allows partial responses to be retrieved. See
11223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11224// for more information.
11225func (c *ProjectsAgentEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesCreateCall {
11226	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11227	return c
11228}
11229
11230// Context sets the context to be used in this call's Do method. Any
11231// pending HTTP request will be aborted if the provided context is
11232// canceled.
11233func (c *ProjectsAgentEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesCreateCall {
11234	c.ctx_ = ctx
11235	return c
11236}
11237
11238// Header returns an http.Header that can be modified by the caller to
11239// add HTTP headers to the request.
11240func (c *ProjectsAgentEntityTypesCreateCall) Header() http.Header {
11241	if c.header_ == nil {
11242		c.header_ = make(http.Header)
11243	}
11244	return c.header_
11245}
11246
11247func (c *ProjectsAgentEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
11248	reqHeaders := make(http.Header)
11249	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
11250	for k, v := range c.header_ {
11251		reqHeaders[k] = v
11252	}
11253	reqHeaders.Set("User-Agent", c.s.userAgent())
11254	var body io.Reader = nil
11255	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1entitytype)
11256	if err != nil {
11257		return nil, err
11258	}
11259	reqHeaders.Set("Content-Type", "application/json")
11260	c.urlParams_.Set("alt", alt)
11261	c.urlParams_.Set("prettyPrint", "false")
11262	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
11263	urls += "?" + c.urlParams_.Encode()
11264	req, err := http.NewRequest("POST", urls, body)
11265	if err != nil {
11266		return nil, err
11267	}
11268	req.Header = reqHeaders
11269	googleapi.Expand(req.URL, map[string]string{
11270		"parent": c.parent,
11271	})
11272	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11273}
11274
11275// Do executes the "dialogflow.projects.agent.entityTypes.create" call.
11276// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
11277// be non-nil. Any non-2xx status code is an error. Response headers are
11278// in either
11279// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
11280// a response was returned at all) in error.(*googleapi.Error).Header.
11281// Use googleapi.IsNotModified to check whether the returned error was
11282// because http.StatusNotModified was returned.
11283func (c *ProjectsAgentEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
11284	gensupport.SetOptions(c.urlParams_, opts...)
11285	res, err := c.doRequest("json")
11286	if res != nil && res.StatusCode == http.StatusNotModified {
11287		if res.Body != nil {
11288			res.Body.Close()
11289		}
11290		return nil, &googleapi.Error{
11291			Code:   res.StatusCode,
11292			Header: res.Header,
11293		}
11294	}
11295	if err != nil {
11296		return nil, err
11297	}
11298	defer googleapi.CloseBody(res)
11299	if err := googleapi.CheckResponse(res); err != nil {
11300		return nil, err
11301	}
11302	ret := &GoogleCloudDialogflowV2beta1EntityType{
11303		ServerResponse: googleapi.ServerResponse{
11304			Header:         res.Header,
11305			HTTPStatusCode: res.StatusCode,
11306		},
11307	}
11308	target := &ret
11309	if err := gensupport.DecodeResponse(target, res); err != nil {
11310		return nil, err
11311	}
11312	return ret, nil
11313	// {
11314	//   "description": "Creates an entity type in the specified agent.",
11315	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes",
11316	//   "httpMethod": "POST",
11317	//   "id": "dialogflow.projects.agent.entityTypes.create",
11318	//   "parameterOrder": [
11319	//     "parent"
11320	//   ],
11321	//   "parameters": {
11322	//     "languageCode": {
11323	//       "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.",
11324	//       "location": "query",
11325	//       "type": "string"
11326	//     },
11327	//     "parent": {
11328	//       "description": "Required. The agent to create a entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
11329	//       "location": "path",
11330	//       "pattern": "^projects/[^/]+/agent$",
11331	//       "required": true,
11332	//       "type": "string"
11333	//     }
11334	//   },
11335	//   "path": "v2beta1/{+parent}/entityTypes",
11336	//   "request": {
11337	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
11338	//   },
11339	//   "response": {
11340	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
11341	//   },
11342	//   "scopes": [
11343	//     "https://www.googleapis.com/auth/cloud-platform",
11344	//     "https://www.googleapis.com/auth/dialogflow"
11345	//   ]
11346	// }
11347
11348}
11349
11350// method id "dialogflow.projects.agent.entityTypes.delete":
11351
11352type ProjectsAgentEntityTypesDeleteCall struct {
11353	s          *Service
11354	name       string
11355	urlParams_ gensupport.URLParams
11356	ctx_       context.Context
11357	header_    http.Header
11358}
11359
11360// Delete: Deletes the specified entity type.
11361func (r *ProjectsAgentEntityTypesService) Delete(name string) *ProjectsAgentEntityTypesDeleteCall {
11362	c := &ProjectsAgentEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11363	c.name = name
11364	return c
11365}
11366
11367// Fields allows partial responses to be retrieved. See
11368// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11369// for more information.
11370func (c *ProjectsAgentEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesDeleteCall {
11371	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11372	return c
11373}
11374
11375// Context sets the context to be used in this call's Do method. Any
11376// pending HTTP request will be aborted if the provided context is
11377// canceled.
11378func (c *ProjectsAgentEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesDeleteCall {
11379	c.ctx_ = ctx
11380	return c
11381}
11382
11383// Header returns an http.Header that can be modified by the caller to
11384// add HTTP headers to the request.
11385func (c *ProjectsAgentEntityTypesDeleteCall) Header() http.Header {
11386	if c.header_ == nil {
11387		c.header_ = make(http.Header)
11388	}
11389	return c.header_
11390}
11391
11392func (c *ProjectsAgentEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
11393	reqHeaders := make(http.Header)
11394	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
11395	for k, v := range c.header_ {
11396		reqHeaders[k] = v
11397	}
11398	reqHeaders.Set("User-Agent", c.s.userAgent())
11399	var body io.Reader = nil
11400	c.urlParams_.Set("alt", alt)
11401	c.urlParams_.Set("prettyPrint", "false")
11402	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
11403	urls += "?" + c.urlParams_.Encode()
11404	req, err := http.NewRequest("DELETE", urls, body)
11405	if err != nil {
11406		return nil, err
11407	}
11408	req.Header = reqHeaders
11409	googleapi.Expand(req.URL, map[string]string{
11410		"name": c.name,
11411	})
11412	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11413}
11414
11415// Do executes the "dialogflow.projects.agent.entityTypes.delete" call.
11416// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
11417// non-2xx status code is an error. Response headers are in either
11418// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
11419// returned at all) in error.(*googleapi.Error).Header. Use
11420// googleapi.IsNotModified to check whether the returned error was
11421// because http.StatusNotModified was returned.
11422func (c *ProjectsAgentEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
11423	gensupport.SetOptions(c.urlParams_, opts...)
11424	res, err := c.doRequest("json")
11425	if res != nil && res.StatusCode == http.StatusNotModified {
11426		if res.Body != nil {
11427			res.Body.Close()
11428		}
11429		return nil, &googleapi.Error{
11430			Code:   res.StatusCode,
11431			Header: res.Header,
11432		}
11433	}
11434	if err != nil {
11435		return nil, err
11436	}
11437	defer googleapi.CloseBody(res)
11438	if err := googleapi.CheckResponse(res); err != nil {
11439		return nil, err
11440	}
11441	ret := &GoogleProtobufEmpty{
11442		ServerResponse: googleapi.ServerResponse{
11443			Header:         res.Header,
11444			HTTPStatusCode: res.StatusCode,
11445		},
11446	}
11447	target := &ret
11448	if err := gensupport.DecodeResponse(target, res); err != nil {
11449		return nil, err
11450	}
11451	return ret, nil
11452	// {
11453	//   "description": "Deletes the specified entity type.",
11454	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
11455	//   "httpMethod": "DELETE",
11456	//   "id": "dialogflow.projects.agent.entityTypes.delete",
11457	//   "parameterOrder": [
11458	//     "name"
11459	//   ],
11460	//   "parameters": {
11461	//     "name": {
11462	//       "description": "Required. The name of the entity type to delete.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.",
11463	//       "location": "path",
11464	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
11465	//       "required": true,
11466	//       "type": "string"
11467	//     }
11468	//   },
11469	//   "path": "v2beta1/{+name}",
11470	//   "response": {
11471	//     "$ref": "GoogleProtobufEmpty"
11472	//   },
11473	//   "scopes": [
11474	//     "https://www.googleapis.com/auth/cloud-platform",
11475	//     "https://www.googleapis.com/auth/dialogflow"
11476	//   ]
11477	// }
11478
11479}
11480
11481// method id "dialogflow.projects.agent.entityTypes.get":
11482
11483type ProjectsAgentEntityTypesGetCall struct {
11484	s            *Service
11485	name         string
11486	urlParams_   gensupport.URLParams
11487	ifNoneMatch_ string
11488	ctx_         context.Context
11489	header_      http.Header
11490}
11491
11492// Get: Retrieves the specified entity type.
11493func (r *ProjectsAgentEntityTypesService) Get(name string) *ProjectsAgentEntityTypesGetCall {
11494	c := &ProjectsAgentEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11495	c.name = name
11496	return c
11497}
11498
11499// LanguageCode sets the optional parameter "languageCode": The language
11500// to retrieve entity synonyms for. If not specified,
11501// the agent's default language is
11502// used.
11503// [Many
11504// languages](https://cloud.google.com/dialogflow/docs/refere
11505// nce/language)
11506// are supported. Note: languages must be enabled in the agent before
11507// they can
11508// be used.
11509func (c *ProjectsAgentEntityTypesGetCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesGetCall {
11510	c.urlParams_.Set("languageCode", languageCode)
11511	return c
11512}
11513
11514// Fields allows partial responses to be retrieved. See
11515// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11516// for more information.
11517func (c *ProjectsAgentEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesGetCall {
11518	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11519	return c
11520}
11521
11522// IfNoneMatch sets the optional parameter which makes the operation
11523// fail if the object's ETag matches the given value. This is useful for
11524// getting updates only after the object has changed since the last
11525// request. Use googleapi.IsNotModified to check whether the response
11526// error from Do is the result of In-None-Match.
11527func (c *ProjectsAgentEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesGetCall {
11528	c.ifNoneMatch_ = entityTag
11529	return c
11530}
11531
11532// Context sets the context to be used in this call's Do method. Any
11533// pending HTTP request will be aborted if the provided context is
11534// canceled.
11535func (c *ProjectsAgentEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEntityTypesGetCall {
11536	c.ctx_ = ctx
11537	return c
11538}
11539
11540// Header returns an http.Header that can be modified by the caller to
11541// add HTTP headers to the request.
11542func (c *ProjectsAgentEntityTypesGetCall) Header() http.Header {
11543	if c.header_ == nil {
11544		c.header_ = make(http.Header)
11545	}
11546	return c.header_
11547}
11548
11549func (c *ProjectsAgentEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
11550	reqHeaders := make(http.Header)
11551	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
11552	for k, v := range c.header_ {
11553		reqHeaders[k] = v
11554	}
11555	reqHeaders.Set("User-Agent", c.s.userAgent())
11556	if c.ifNoneMatch_ != "" {
11557		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11558	}
11559	var body io.Reader = nil
11560	c.urlParams_.Set("alt", alt)
11561	c.urlParams_.Set("prettyPrint", "false")
11562	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
11563	urls += "?" + c.urlParams_.Encode()
11564	req, err := http.NewRequest("GET", urls, body)
11565	if err != nil {
11566		return nil, err
11567	}
11568	req.Header = reqHeaders
11569	googleapi.Expand(req.URL, map[string]string{
11570		"name": c.name,
11571	})
11572	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11573}
11574
11575// Do executes the "dialogflow.projects.agent.entityTypes.get" call.
11576// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
11577// be non-nil. Any non-2xx status code is an error. Response headers are
11578// in either
11579// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
11580// a response was returned at all) in error.(*googleapi.Error).Header.
11581// Use googleapi.IsNotModified to check whether the returned error was
11582// because http.StatusNotModified was returned.
11583func (c *ProjectsAgentEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
11584	gensupport.SetOptions(c.urlParams_, opts...)
11585	res, err := c.doRequest("json")
11586	if res != nil && res.StatusCode == http.StatusNotModified {
11587		if res.Body != nil {
11588			res.Body.Close()
11589		}
11590		return nil, &googleapi.Error{
11591			Code:   res.StatusCode,
11592			Header: res.Header,
11593		}
11594	}
11595	if err != nil {
11596		return nil, err
11597	}
11598	defer googleapi.CloseBody(res)
11599	if err := googleapi.CheckResponse(res); err != nil {
11600		return nil, err
11601	}
11602	ret := &GoogleCloudDialogflowV2beta1EntityType{
11603		ServerResponse: googleapi.ServerResponse{
11604			Header:         res.Header,
11605			HTTPStatusCode: res.StatusCode,
11606		},
11607	}
11608	target := &ret
11609	if err := gensupport.DecodeResponse(target, res); err != nil {
11610		return nil, err
11611	}
11612	return ret, nil
11613	// {
11614	//   "description": "Retrieves the specified entity type.",
11615	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
11616	//   "httpMethod": "GET",
11617	//   "id": "dialogflow.projects.agent.entityTypes.get",
11618	//   "parameterOrder": [
11619	//     "name"
11620	//   ],
11621	//   "parameters": {
11622	//     "languageCode": {
11623	//       "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.",
11624	//       "location": "query",
11625	//       "type": "string"
11626	//     },
11627	//     "name": {
11628	//       "description": "Required. The name of the entity type.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.",
11629	//       "location": "path",
11630	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
11631	//       "required": true,
11632	//       "type": "string"
11633	//     }
11634	//   },
11635	//   "path": "v2beta1/{+name}",
11636	//   "response": {
11637	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
11638	//   },
11639	//   "scopes": [
11640	//     "https://www.googleapis.com/auth/cloud-platform",
11641	//     "https://www.googleapis.com/auth/dialogflow"
11642	//   ]
11643	// }
11644
11645}
11646
11647// method id "dialogflow.projects.agent.entityTypes.list":
11648
11649type ProjectsAgentEntityTypesListCall struct {
11650	s            *Service
11651	parent       string
11652	urlParams_   gensupport.URLParams
11653	ifNoneMatch_ string
11654	ctx_         context.Context
11655	header_      http.Header
11656}
11657
11658// List: Returns the list of all entity types in the specified agent.
11659func (r *ProjectsAgentEntityTypesService) List(parent string) *ProjectsAgentEntityTypesListCall {
11660	c := &ProjectsAgentEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11661	c.parent = parent
11662	return c
11663}
11664
11665// LanguageCode sets the optional parameter "languageCode": The language
11666// to list entity synonyms for. If not specified,
11667// the agent's default language is
11668// used.
11669// [Many
11670// languages](https://cloud.google.com/dialogflow/docs/refere
11671// nce/language)
11672// are supported. Note: languages must be enabled in the agent before
11673// they can
11674// be used.
11675func (c *ProjectsAgentEntityTypesListCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesListCall {
11676	c.urlParams_.Set("languageCode", languageCode)
11677	return c
11678}
11679
11680// PageSize sets the optional parameter "pageSize": The maximum number
11681// of items to return in a single page. By
11682// default 100 and at most 1000.
11683func (c *ProjectsAgentEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEntityTypesListCall {
11684	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11685	return c
11686}
11687
11688// PageToken sets the optional parameter "pageToken": The
11689// next_page_token value returned from a previous list request.
11690func (c *ProjectsAgentEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEntityTypesListCall {
11691	c.urlParams_.Set("pageToken", pageToken)
11692	return c
11693}
11694
11695// Fields allows partial responses to be retrieved. See
11696// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11697// for more information.
11698func (c *ProjectsAgentEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesListCall {
11699	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11700	return c
11701}
11702
11703// IfNoneMatch sets the optional parameter which makes the operation
11704// fail if the object's ETag matches the given value. This is useful for
11705// getting updates only after the object has changed since the last
11706// request. Use googleapi.IsNotModified to check whether the response
11707// error from Do is the result of In-None-Match.
11708func (c *ProjectsAgentEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesListCall {
11709	c.ifNoneMatch_ = entityTag
11710	return c
11711}
11712
11713// Context sets the context to be used in this call's Do method. Any
11714// pending HTTP request will be aborted if the provided context is
11715// canceled.
11716func (c *ProjectsAgentEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEntityTypesListCall {
11717	c.ctx_ = ctx
11718	return c
11719}
11720
11721// Header returns an http.Header that can be modified by the caller to
11722// add HTTP headers to the request.
11723func (c *ProjectsAgentEntityTypesListCall) Header() http.Header {
11724	if c.header_ == nil {
11725		c.header_ = make(http.Header)
11726	}
11727	return c.header_
11728}
11729
11730func (c *ProjectsAgentEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
11731	reqHeaders := make(http.Header)
11732	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
11733	for k, v := range c.header_ {
11734		reqHeaders[k] = v
11735	}
11736	reqHeaders.Set("User-Agent", c.s.userAgent())
11737	if c.ifNoneMatch_ != "" {
11738		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11739	}
11740	var body io.Reader = nil
11741	c.urlParams_.Set("alt", alt)
11742	c.urlParams_.Set("prettyPrint", "false")
11743	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
11744	urls += "?" + c.urlParams_.Encode()
11745	req, err := http.NewRequest("GET", urls, body)
11746	if err != nil {
11747		return nil, err
11748	}
11749	req.Header = reqHeaders
11750	googleapi.Expand(req.URL, map[string]string{
11751		"parent": c.parent,
11752	})
11753	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11754}
11755
11756// Do executes the "dialogflow.projects.agent.entityTypes.list" call.
11757// Exactly one of *GoogleCloudDialogflowV2beta1ListEntityTypesResponse
11758// or error will be non-nil. Any non-2xx status code is an error.
11759// Response headers are in either
11760// *GoogleCloudDialogflowV2beta1ListEntityTypesResponse.ServerResponse.He
11761// ader or (if a response was returned at all) in
11762// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11763// whether the returned error was because http.StatusNotModified was
11764// returned.
11765func (c *ProjectsAgentEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListEntityTypesResponse, error) {
11766	gensupport.SetOptions(c.urlParams_, opts...)
11767	res, err := c.doRequest("json")
11768	if res != nil && res.StatusCode == http.StatusNotModified {
11769		if res.Body != nil {
11770			res.Body.Close()
11771		}
11772		return nil, &googleapi.Error{
11773			Code:   res.StatusCode,
11774			Header: res.Header,
11775		}
11776	}
11777	if err != nil {
11778		return nil, err
11779	}
11780	defer googleapi.CloseBody(res)
11781	if err := googleapi.CheckResponse(res); err != nil {
11782		return nil, err
11783	}
11784	ret := &GoogleCloudDialogflowV2beta1ListEntityTypesResponse{
11785		ServerResponse: googleapi.ServerResponse{
11786			Header:         res.Header,
11787			HTTPStatusCode: res.StatusCode,
11788		},
11789	}
11790	target := &ret
11791	if err := gensupport.DecodeResponse(target, res); err != nil {
11792		return nil, err
11793	}
11794	return ret, nil
11795	// {
11796	//   "description": "Returns the list of all entity types in the specified agent.",
11797	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes",
11798	//   "httpMethod": "GET",
11799	//   "id": "dialogflow.projects.agent.entityTypes.list",
11800	//   "parameterOrder": [
11801	//     "parent"
11802	//   ],
11803	//   "parameters": {
11804	//     "languageCode": {
11805	//       "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.",
11806	//       "location": "query",
11807	//       "type": "string"
11808	//     },
11809	//     "pageSize": {
11810	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
11811	//       "format": "int32",
11812	//       "location": "query",
11813	//       "type": "integer"
11814	//     },
11815	//     "pageToken": {
11816	//       "description": "Optional. The next_page_token value returned from a previous list request.",
11817	//       "location": "query",
11818	//       "type": "string"
11819	//     },
11820	//     "parent": {
11821	//       "description": "Required. The agent to list all entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
11822	//       "location": "path",
11823	//       "pattern": "^projects/[^/]+/agent$",
11824	//       "required": true,
11825	//       "type": "string"
11826	//     }
11827	//   },
11828	//   "path": "v2beta1/{+parent}/entityTypes",
11829	//   "response": {
11830	//     "$ref": "GoogleCloudDialogflowV2beta1ListEntityTypesResponse"
11831	//   },
11832	//   "scopes": [
11833	//     "https://www.googleapis.com/auth/cloud-platform",
11834	//     "https://www.googleapis.com/auth/dialogflow"
11835	//   ]
11836	// }
11837
11838}
11839
11840// Pages invokes f for each page of results.
11841// A non-nil error returned from f will halt the iteration.
11842// The provided context supersedes any context provided to the Context method.
11843func (c *ProjectsAgentEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListEntityTypesResponse) error) error {
11844	c.ctx_ = ctx
11845	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11846	for {
11847		x, err := c.Do()
11848		if err != nil {
11849			return err
11850		}
11851		if err := f(x); err != nil {
11852			return err
11853		}
11854		if x.NextPageToken == "" {
11855			return nil
11856		}
11857		c.PageToken(x.NextPageToken)
11858	}
11859}
11860
11861// method id "dialogflow.projects.agent.entityTypes.patch":
11862
11863type ProjectsAgentEntityTypesPatchCall struct {
11864	s                                      *Service
11865	nameid                                 string
11866	googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType
11867	urlParams_                             gensupport.URLParams
11868	ctx_                                   context.Context
11869	header_                                http.Header
11870}
11871
11872// Patch: Updates the specified entity type.
11873func (r *ProjectsAgentEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType) *ProjectsAgentEntityTypesPatchCall {
11874	c := &ProjectsAgentEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11875	c.nameid = nameid
11876	c.googleclouddialogflowv2beta1entitytype = googleclouddialogflowv2beta1entitytype
11877	return c
11878}
11879
11880// LanguageCode sets the optional parameter "languageCode": The language
11881// of entity synonyms defined in `entity_type`. If not
11882// specified, the agent's default language is
11883// used.
11884// [Many
11885// languages](https://cloud.google.com/dialogflow/docs/refere
11886// nce/language)
11887// are supported. Note: languages must be enabled in the agent before
11888// they can
11889// be used.
11890func (c *ProjectsAgentEntityTypesPatchCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesPatchCall {
11891	c.urlParams_.Set("languageCode", languageCode)
11892	return c
11893}
11894
11895// UpdateMask sets the optional parameter "updateMask": The mask to
11896// control which fields get updated.
11897func (c *ProjectsAgentEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEntityTypesPatchCall {
11898	c.urlParams_.Set("updateMask", updateMask)
11899	return c
11900}
11901
11902// Fields allows partial responses to be retrieved. See
11903// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11904// for more information.
11905func (c *ProjectsAgentEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesPatchCall {
11906	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11907	return c
11908}
11909
11910// Context sets the context to be used in this call's Do method. Any
11911// pending HTTP request will be aborted if the provided context is
11912// canceled.
11913func (c *ProjectsAgentEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEntityTypesPatchCall {
11914	c.ctx_ = ctx
11915	return c
11916}
11917
11918// Header returns an http.Header that can be modified by the caller to
11919// add HTTP headers to the request.
11920func (c *ProjectsAgentEntityTypesPatchCall) Header() http.Header {
11921	if c.header_ == nil {
11922		c.header_ = make(http.Header)
11923	}
11924	return c.header_
11925}
11926
11927func (c *ProjectsAgentEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
11928	reqHeaders := make(http.Header)
11929	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
11930	for k, v := range c.header_ {
11931		reqHeaders[k] = v
11932	}
11933	reqHeaders.Set("User-Agent", c.s.userAgent())
11934	var body io.Reader = nil
11935	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1entitytype)
11936	if err != nil {
11937		return nil, err
11938	}
11939	reqHeaders.Set("Content-Type", "application/json")
11940	c.urlParams_.Set("alt", alt)
11941	c.urlParams_.Set("prettyPrint", "false")
11942	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
11943	urls += "?" + c.urlParams_.Encode()
11944	req, err := http.NewRequest("PATCH", urls, body)
11945	if err != nil {
11946		return nil, err
11947	}
11948	req.Header = reqHeaders
11949	googleapi.Expand(req.URL, map[string]string{
11950		"name": c.nameid,
11951	})
11952	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11953}
11954
11955// Do executes the "dialogflow.projects.agent.entityTypes.patch" call.
11956// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
11957// be non-nil. Any non-2xx status code is an error. Response headers are
11958// in either
11959// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
11960// a response was returned at all) in error.(*googleapi.Error).Header.
11961// Use googleapi.IsNotModified to check whether the returned error was
11962// because http.StatusNotModified was returned.
11963func (c *ProjectsAgentEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
11964	gensupport.SetOptions(c.urlParams_, opts...)
11965	res, err := c.doRequest("json")
11966	if res != nil && res.StatusCode == http.StatusNotModified {
11967		if res.Body != nil {
11968			res.Body.Close()
11969		}
11970		return nil, &googleapi.Error{
11971			Code:   res.StatusCode,
11972			Header: res.Header,
11973		}
11974	}
11975	if err != nil {
11976		return nil, err
11977	}
11978	defer googleapi.CloseBody(res)
11979	if err := googleapi.CheckResponse(res); err != nil {
11980		return nil, err
11981	}
11982	ret := &GoogleCloudDialogflowV2beta1EntityType{
11983		ServerResponse: googleapi.ServerResponse{
11984			Header:         res.Header,
11985			HTTPStatusCode: res.StatusCode,
11986		},
11987	}
11988	target := &ret
11989	if err := gensupport.DecodeResponse(target, res); err != nil {
11990		return nil, err
11991	}
11992	return ret, nil
11993	// {
11994	//   "description": "Updates the specified entity type.",
11995	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
11996	//   "httpMethod": "PATCH",
11997	//   "id": "dialogflow.projects.agent.entityTypes.patch",
11998	//   "parameterOrder": [
11999	//     "name"
12000	//   ],
12001	//   "parameters": {
12002	//     "languageCode": {
12003	//       "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.",
12004	//       "location": "query",
12005	//       "type": "string"
12006	//     },
12007	//     "name": {
12008	//       "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`.",
12009	//       "location": "path",
12010	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
12011	//       "required": true,
12012	//       "type": "string"
12013	//     },
12014	//     "updateMask": {
12015	//       "description": "Optional. The mask to control which fields get updated.",
12016	//       "format": "google-fieldmask",
12017	//       "location": "query",
12018	//       "type": "string"
12019	//     }
12020	//   },
12021	//   "path": "v2beta1/{+name}",
12022	//   "request": {
12023	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
12024	//   },
12025	//   "response": {
12026	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
12027	//   },
12028	//   "scopes": [
12029	//     "https://www.googleapis.com/auth/cloud-platform",
12030	//     "https://www.googleapis.com/auth/dialogflow"
12031	//   ]
12032	// }
12033
12034}
12035
12036// method id "dialogflow.projects.agent.entityTypes.entities.batchCreate":
12037
12038type ProjectsAgentEntityTypesEntitiesBatchCreateCall struct {
12039	s                                                      *Service
12040	parent                                                 string
12041	googleclouddialogflowv2beta1batchcreateentitiesrequest *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest
12042	urlParams_                                             gensupport.URLParams
12043	ctx_                                                   context.Context
12044	header_                                                http.Header
12045}
12046
12047// BatchCreate: Creates multiple new entities in the specified entity
12048// type.
12049//
12050// Operation <response: google.protobuf.Empty>
12051func (r *ProjectsAgentEntityTypesEntitiesService) BatchCreate(parent string, googleclouddialogflowv2beta1batchcreateentitiesrequest *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
12052	c := &ProjectsAgentEntityTypesEntitiesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12053	c.parent = parent
12054	c.googleclouddialogflowv2beta1batchcreateentitiesrequest = googleclouddialogflowv2beta1batchcreateentitiesrequest
12055	return c
12056}
12057
12058// Fields allows partial responses to be retrieved. See
12059// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12060// for more information.
12061func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
12062	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12063	return c
12064}
12065
12066// Context sets the context to be used in this call's Do method. Any
12067// pending HTTP request will be aborted if the provided context is
12068// canceled.
12069func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
12070	c.ctx_ = ctx
12071	return c
12072}
12073
12074// Header returns an http.Header that can be modified by the caller to
12075// add HTTP headers to the request.
12076func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Header() http.Header {
12077	if c.header_ == nil {
12078		c.header_ = make(http.Header)
12079	}
12080	return c.header_
12081}
12082
12083func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) doRequest(alt string) (*http.Response, error) {
12084	reqHeaders := make(http.Header)
12085	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
12086	for k, v := range c.header_ {
12087		reqHeaders[k] = v
12088	}
12089	reqHeaders.Set("User-Agent", c.s.userAgent())
12090	var body io.Reader = nil
12091	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchcreateentitiesrequest)
12092	if err != nil {
12093		return nil, err
12094	}
12095	reqHeaders.Set("Content-Type", "application/json")
12096	c.urlParams_.Set("alt", alt)
12097	c.urlParams_.Set("prettyPrint", "false")
12098	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchCreate")
12099	urls += "?" + c.urlParams_.Encode()
12100	req, err := http.NewRequest("POST", urls, body)
12101	if err != nil {
12102		return nil, err
12103	}
12104	req.Header = reqHeaders
12105	googleapi.Expand(req.URL, map[string]string{
12106		"parent": c.parent,
12107	})
12108	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12109}
12110
12111// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchCreate" call.
12112// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
12113// Any non-2xx status code is an error. Response headers are in either
12114// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
12115// was returned at all) in error.(*googleapi.Error).Header. Use
12116// googleapi.IsNotModified to check whether the returned error was
12117// because http.StatusNotModified was returned.
12118func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
12119	gensupport.SetOptions(c.urlParams_, opts...)
12120	res, err := c.doRequest("json")
12121	if res != nil && res.StatusCode == http.StatusNotModified {
12122		if res.Body != nil {
12123			res.Body.Close()
12124		}
12125		return nil, &googleapi.Error{
12126			Code:   res.StatusCode,
12127			Header: res.Header,
12128		}
12129	}
12130	if err != nil {
12131		return nil, err
12132	}
12133	defer googleapi.CloseBody(res)
12134	if err := googleapi.CheckResponse(res); err != nil {
12135		return nil, err
12136	}
12137	ret := &GoogleLongrunningOperation{
12138		ServerResponse: googleapi.ServerResponse{
12139			Header:         res.Header,
12140			HTTPStatusCode: res.StatusCode,
12141		},
12142	}
12143	target := &ret
12144	if err := gensupport.DecodeResponse(target, res); err != nil {
12145		return nil, err
12146	}
12147	return ret, nil
12148	// {
12149	//   "description": "Creates multiple new entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
12150	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate",
12151	//   "httpMethod": "POST",
12152	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchCreate",
12153	//   "parameterOrder": [
12154	//     "parent"
12155	//   ],
12156	//   "parameters": {
12157	//     "parent": {
12158	//       "description": "Required. The name of the entity type to create entities in. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
12159	//       "location": "path",
12160	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
12161	//       "required": true,
12162	//       "type": "string"
12163	//     }
12164	//   },
12165	//   "path": "v2beta1/{+parent}/entities:batchCreate",
12166	//   "request": {
12167	//     "$ref": "GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest"
12168	//   },
12169	//   "response": {
12170	//     "$ref": "GoogleLongrunningOperation"
12171	//   },
12172	//   "scopes": [
12173	//     "https://www.googleapis.com/auth/cloud-platform",
12174	//     "https://www.googleapis.com/auth/dialogflow"
12175	//   ]
12176	// }
12177
12178}
12179
12180// method id "dialogflow.projects.agent.entityTypes.entities.batchDelete":
12181
12182type ProjectsAgentEntityTypesEntitiesBatchDeleteCall struct {
12183	s                                                      *Service
12184	parent                                                 string
12185	googleclouddialogflowv2beta1batchdeleteentitiesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest
12186	urlParams_                                             gensupport.URLParams
12187	ctx_                                                   context.Context
12188	header_                                                http.Header
12189}
12190
12191// BatchDelete: Deletes entities in the specified entity
12192// type.
12193//
12194// Operation <response: google.protobuf.Empty>
12195func (r *ProjectsAgentEntityTypesEntitiesService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteentitiesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
12196	c := &ProjectsAgentEntityTypesEntitiesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12197	c.parent = parent
12198	c.googleclouddialogflowv2beta1batchdeleteentitiesrequest = googleclouddialogflowv2beta1batchdeleteentitiesrequest
12199	return c
12200}
12201
12202// Fields allows partial responses to be retrieved. See
12203// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12204// for more information.
12205func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
12206	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12207	return c
12208}
12209
12210// Context sets the context to be used in this call's Do method. Any
12211// pending HTTP request will be aborted if the provided context is
12212// canceled.
12213func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
12214	c.ctx_ = ctx
12215	return c
12216}
12217
12218// Header returns an http.Header that can be modified by the caller to
12219// add HTTP headers to the request.
12220func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Header() http.Header {
12221	if c.header_ == nil {
12222		c.header_ = make(http.Header)
12223	}
12224	return c.header_
12225}
12226
12227func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
12228	reqHeaders := make(http.Header)
12229	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
12230	for k, v := range c.header_ {
12231		reqHeaders[k] = v
12232	}
12233	reqHeaders.Set("User-Agent", c.s.userAgent())
12234	var body io.Reader = nil
12235	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteentitiesrequest)
12236	if err != nil {
12237		return nil, err
12238	}
12239	reqHeaders.Set("Content-Type", "application/json")
12240	c.urlParams_.Set("alt", alt)
12241	c.urlParams_.Set("prettyPrint", "false")
12242	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchDelete")
12243	urls += "?" + c.urlParams_.Encode()
12244	req, err := http.NewRequest("POST", urls, body)
12245	if err != nil {
12246		return nil, err
12247	}
12248	req.Header = reqHeaders
12249	googleapi.Expand(req.URL, map[string]string{
12250		"parent": c.parent,
12251	})
12252	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12253}
12254
12255// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchDelete" call.
12256// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
12257// Any non-2xx status code is an error. Response headers are in either
12258// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
12259// was returned at all) in error.(*googleapi.Error).Header. Use
12260// googleapi.IsNotModified to check whether the returned error was
12261// because http.StatusNotModified was returned.
12262func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
12263	gensupport.SetOptions(c.urlParams_, opts...)
12264	res, err := c.doRequest("json")
12265	if res != nil && res.StatusCode == http.StatusNotModified {
12266		if res.Body != nil {
12267			res.Body.Close()
12268		}
12269		return nil, &googleapi.Error{
12270			Code:   res.StatusCode,
12271			Header: res.Header,
12272		}
12273	}
12274	if err != nil {
12275		return nil, err
12276	}
12277	defer googleapi.CloseBody(res)
12278	if err := googleapi.CheckResponse(res); err != nil {
12279		return nil, err
12280	}
12281	ret := &GoogleLongrunningOperation{
12282		ServerResponse: googleapi.ServerResponse{
12283			Header:         res.Header,
12284			HTTPStatusCode: res.StatusCode,
12285		},
12286	}
12287	target := &ret
12288	if err := gensupport.DecodeResponse(target, res); err != nil {
12289		return nil, err
12290	}
12291	return ret, nil
12292	// {
12293	//   "description": "Deletes entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
12294	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete",
12295	//   "httpMethod": "POST",
12296	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchDelete",
12297	//   "parameterOrder": [
12298	//     "parent"
12299	//   ],
12300	//   "parameters": {
12301	//     "parent": {
12302	//       "description": "Required. The name of the entity type to delete entries for. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
12303	//       "location": "path",
12304	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
12305	//       "required": true,
12306	//       "type": "string"
12307	//     }
12308	//   },
12309	//   "path": "v2beta1/{+parent}/entities:batchDelete",
12310	//   "request": {
12311	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest"
12312	//   },
12313	//   "response": {
12314	//     "$ref": "GoogleLongrunningOperation"
12315	//   },
12316	//   "scopes": [
12317	//     "https://www.googleapis.com/auth/cloud-platform",
12318	//     "https://www.googleapis.com/auth/dialogflow"
12319	//   ]
12320	// }
12321
12322}
12323
12324// method id "dialogflow.projects.agent.entityTypes.entities.batchUpdate":
12325
12326type ProjectsAgentEntityTypesEntitiesBatchUpdateCall struct {
12327	s                                                      *Service
12328	parent                                                 string
12329	googleclouddialogflowv2beta1batchupdateentitiesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest
12330	urlParams_                                             gensupport.URLParams
12331	ctx_                                                   context.Context
12332	header_                                                http.Header
12333}
12334
12335// BatchUpdate: Updates or creates multiple entities in the specified
12336// entity type. This
12337// method does not affect entities in the entity type that aren't
12338// explicitly
12339// specified in the request.
12340//
12341// Operation <response: google.protobuf.Empty>
12342func (r *ProjectsAgentEntityTypesEntitiesService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateentitiesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
12343	c := &ProjectsAgentEntityTypesEntitiesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12344	c.parent = parent
12345	c.googleclouddialogflowv2beta1batchupdateentitiesrequest = googleclouddialogflowv2beta1batchupdateentitiesrequest
12346	return c
12347}
12348
12349// Fields allows partial responses to be retrieved. See
12350// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12351// for more information.
12352func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
12353	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12354	return c
12355}
12356
12357// Context sets the context to be used in this call's Do method. Any
12358// pending HTTP request will be aborted if the provided context is
12359// canceled.
12360func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
12361	c.ctx_ = ctx
12362	return c
12363}
12364
12365// Header returns an http.Header that can be modified by the caller to
12366// add HTTP headers to the request.
12367func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Header() http.Header {
12368	if c.header_ == nil {
12369		c.header_ = make(http.Header)
12370	}
12371	return c.header_
12372}
12373
12374func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
12375	reqHeaders := make(http.Header)
12376	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
12377	for k, v := range c.header_ {
12378		reqHeaders[k] = v
12379	}
12380	reqHeaders.Set("User-Agent", c.s.userAgent())
12381	var body io.Reader = nil
12382	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateentitiesrequest)
12383	if err != nil {
12384		return nil, err
12385	}
12386	reqHeaders.Set("Content-Type", "application/json")
12387	c.urlParams_.Set("alt", alt)
12388	c.urlParams_.Set("prettyPrint", "false")
12389	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchUpdate")
12390	urls += "?" + c.urlParams_.Encode()
12391	req, err := http.NewRequest("POST", urls, body)
12392	if err != nil {
12393		return nil, err
12394	}
12395	req.Header = reqHeaders
12396	googleapi.Expand(req.URL, map[string]string{
12397		"parent": c.parent,
12398	})
12399	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12400}
12401
12402// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchUpdate" call.
12403// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
12404// Any non-2xx status code is an error. Response headers are in either
12405// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
12406// was returned at all) in error.(*googleapi.Error).Header. Use
12407// googleapi.IsNotModified to check whether the returned error was
12408// because http.StatusNotModified was returned.
12409func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
12410	gensupport.SetOptions(c.urlParams_, opts...)
12411	res, err := c.doRequest("json")
12412	if res != nil && res.StatusCode == http.StatusNotModified {
12413		if res.Body != nil {
12414			res.Body.Close()
12415		}
12416		return nil, &googleapi.Error{
12417			Code:   res.StatusCode,
12418			Header: res.Header,
12419		}
12420	}
12421	if err != nil {
12422		return nil, err
12423	}
12424	defer googleapi.CloseBody(res)
12425	if err := googleapi.CheckResponse(res); err != nil {
12426		return nil, err
12427	}
12428	ret := &GoogleLongrunningOperation{
12429		ServerResponse: googleapi.ServerResponse{
12430			Header:         res.Header,
12431			HTTPStatusCode: res.StatusCode,
12432		},
12433	}
12434	target := &ret
12435	if err := gensupport.DecodeResponse(target, res); err != nil {
12436		return nil, err
12437	}
12438	return ret, nil
12439	// {
12440	//   "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",
12441	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate",
12442	//   "httpMethod": "POST",
12443	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchUpdate",
12444	//   "parameterOrder": [
12445	//     "parent"
12446	//   ],
12447	//   "parameters": {
12448	//     "parent": {
12449	//       "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`.",
12450	//       "location": "path",
12451	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
12452	//       "required": true,
12453	//       "type": "string"
12454	//     }
12455	//   },
12456	//   "path": "v2beta1/{+parent}/entities:batchUpdate",
12457	//   "request": {
12458	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest"
12459	//   },
12460	//   "response": {
12461	//     "$ref": "GoogleLongrunningOperation"
12462	//   },
12463	//   "scopes": [
12464	//     "https://www.googleapis.com/auth/cloud-platform",
12465	//     "https://www.googleapis.com/auth/dialogflow"
12466	//   ]
12467	// }
12468
12469}
12470
12471// method id "dialogflow.projects.agent.environments.users.sessions.deleteContexts":
12472
12473type ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall struct {
12474	s          *Service
12475	parent     string
12476	urlParams_ gensupport.URLParams
12477	ctx_       context.Context
12478	header_    http.Header
12479}
12480
12481// DeleteContexts: Deletes all active contexts in the specified session.
12482func (r *ProjectsAgentEnvironmentsUsersSessionsService) DeleteContexts(parent string) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
12483	c := &ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12484	c.parent = parent
12485	return c
12486}
12487
12488// Fields allows partial responses to be retrieved. See
12489// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12490// for more information.
12491func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
12492	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12493	return c
12494}
12495
12496// Context sets the context to be used in this call's Do method. Any
12497// pending HTTP request will be aborted if the provided context is
12498// canceled.
12499func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
12500	c.ctx_ = ctx
12501	return c
12502}
12503
12504// Header returns an http.Header that can be modified by the caller to
12505// add HTTP headers to the request.
12506func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Header() http.Header {
12507	if c.header_ == nil {
12508		c.header_ = make(http.Header)
12509	}
12510	return c.header_
12511}
12512
12513func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
12514	reqHeaders := make(http.Header)
12515	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
12516	for k, v := range c.header_ {
12517		reqHeaders[k] = v
12518	}
12519	reqHeaders.Set("User-Agent", c.s.userAgent())
12520	var body io.Reader = nil
12521	c.urlParams_.Set("alt", alt)
12522	c.urlParams_.Set("prettyPrint", "false")
12523	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
12524	urls += "?" + c.urlParams_.Encode()
12525	req, err := http.NewRequest("DELETE", urls, body)
12526	if err != nil {
12527		return nil, err
12528	}
12529	req.Header = reqHeaders
12530	googleapi.Expand(req.URL, map[string]string{
12531		"parent": c.parent,
12532	})
12533	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12534}
12535
12536// Do executes the "dialogflow.projects.agent.environments.users.sessions.deleteContexts" call.
12537// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
12538// non-2xx status code is an error. Response headers are in either
12539// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
12540// returned at all) in error.(*googleapi.Error).Header. Use
12541// googleapi.IsNotModified to check whether the returned error was
12542// because http.StatusNotModified was returned.
12543func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
12544	gensupport.SetOptions(c.urlParams_, opts...)
12545	res, err := c.doRequest("json")
12546	if res != nil && res.StatusCode == http.StatusNotModified {
12547		if res.Body != nil {
12548			res.Body.Close()
12549		}
12550		return nil, &googleapi.Error{
12551			Code:   res.StatusCode,
12552			Header: res.Header,
12553		}
12554	}
12555	if err != nil {
12556		return nil, err
12557	}
12558	defer googleapi.CloseBody(res)
12559	if err := googleapi.CheckResponse(res); err != nil {
12560		return nil, err
12561	}
12562	ret := &GoogleProtobufEmpty{
12563		ServerResponse: googleapi.ServerResponse{
12564			Header:         res.Header,
12565			HTTPStatusCode: res.StatusCode,
12566		},
12567	}
12568	target := &ret
12569	if err := gensupport.DecodeResponse(target, res); err != nil {
12570		return nil, err
12571	}
12572	return ret, nil
12573	// {
12574	//   "description": "Deletes all active contexts in the specified session.",
12575	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
12576	//   "httpMethod": "DELETE",
12577	//   "id": "dialogflow.projects.agent.environments.users.sessions.deleteContexts",
12578	//   "parameterOrder": [
12579	//     "parent"
12580	//   ],
12581	//   "parameters": {
12582	//     "parent": {
12583	//       "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.",
12584	//       "location": "path",
12585	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
12586	//       "required": true,
12587	//       "type": "string"
12588	//     }
12589	//   },
12590	//   "path": "v2beta1/{+parent}/contexts",
12591	//   "response": {
12592	//     "$ref": "GoogleProtobufEmpty"
12593	//   },
12594	//   "scopes": [
12595	//     "https://www.googleapis.com/auth/cloud-platform",
12596	//     "https://www.googleapis.com/auth/dialogflow"
12597	//   ]
12598	// }
12599
12600}
12601
12602// method id "dialogflow.projects.agent.environments.users.sessions.detectIntent":
12603
12604type ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall struct {
12605	s                                               *Service
12606	sessionid                                       string
12607	googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest
12608	urlParams_                                      gensupport.URLParams
12609	ctx_                                            context.Context
12610	header_                                         http.Header
12611}
12612
12613// DetectIntent: Processes a natural language query and returns
12614// structured, actionable data
12615// as a result. This method is not idempotent, because it may cause
12616// contexts
12617// and session entity types to be updated, which in turn might
12618// affect
12619// results of future queries.
12620func (r *ProjectsAgentEnvironmentsUsersSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
12621	c := &ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12622	c.sessionid = sessionid
12623	c.googleclouddialogflowv2beta1detectintentrequest = googleclouddialogflowv2beta1detectintentrequest
12624	return c
12625}
12626
12627// Fields allows partial responses to be retrieved. See
12628// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12629// for more information.
12630func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
12631	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12632	return c
12633}
12634
12635// Context sets the context to be used in this call's Do method. Any
12636// pending HTTP request will be aborted if the provided context is
12637// canceled.
12638func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
12639	c.ctx_ = ctx
12640	return c
12641}
12642
12643// Header returns an http.Header that can be modified by the caller to
12644// add HTTP headers to the request.
12645func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Header() http.Header {
12646	if c.header_ == nil {
12647		c.header_ = make(http.Header)
12648	}
12649	return c.header_
12650}
12651
12652func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
12653	reqHeaders := make(http.Header)
12654	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
12655	for k, v := range c.header_ {
12656		reqHeaders[k] = v
12657	}
12658	reqHeaders.Set("User-Agent", c.s.userAgent())
12659	var body io.Reader = nil
12660	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1detectintentrequest)
12661	if err != nil {
12662		return nil, err
12663	}
12664	reqHeaders.Set("Content-Type", "application/json")
12665	c.urlParams_.Set("alt", alt)
12666	c.urlParams_.Set("prettyPrint", "false")
12667	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+session}:detectIntent")
12668	urls += "?" + c.urlParams_.Encode()
12669	req, err := http.NewRequest("POST", urls, body)
12670	if err != nil {
12671		return nil, err
12672	}
12673	req.Header = reqHeaders
12674	googleapi.Expand(req.URL, map[string]string{
12675		"session": c.sessionid,
12676	})
12677	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12678}
12679
12680// Do executes the "dialogflow.projects.agent.environments.users.sessions.detectIntent" call.
12681// Exactly one of *GoogleCloudDialogflowV2beta1DetectIntentResponse or
12682// error will be non-nil. Any non-2xx status code is an error. Response
12683// headers are in either
12684// *GoogleCloudDialogflowV2beta1DetectIntentResponse.ServerResponse.Heade
12685// r or (if a response was returned at all) in
12686// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12687// whether the returned error was because http.StatusNotModified was
12688// returned.
12689func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1DetectIntentResponse, error) {
12690	gensupport.SetOptions(c.urlParams_, opts...)
12691	res, err := c.doRequest("json")
12692	if res != nil && res.StatusCode == http.StatusNotModified {
12693		if res.Body != nil {
12694			res.Body.Close()
12695		}
12696		return nil, &googleapi.Error{
12697			Code:   res.StatusCode,
12698			Header: res.Header,
12699		}
12700	}
12701	if err != nil {
12702		return nil, err
12703	}
12704	defer googleapi.CloseBody(res)
12705	if err := googleapi.CheckResponse(res); err != nil {
12706		return nil, err
12707	}
12708	ret := &GoogleCloudDialogflowV2beta1DetectIntentResponse{
12709		ServerResponse: googleapi.ServerResponse{
12710			Header:         res.Header,
12711			HTTPStatusCode: res.StatusCode,
12712		},
12713	}
12714	target := &ret
12715	if err := gensupport.DecodeResponse(target, res); err != nil {
12716		return nil, err
12717	}
12718	return ret, nil
12719	// {
12720	//   "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.",
12721	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent",
12722	//   "httpMethod": "POST",
12723	//   "id": "dialogflow.projects.agent.environments.users.sessions.detectIntent",
12724	//   "parameterOrder": [
12725	//     "session"
12726	//   ],
12727	//   "parameters": {
12728	//     "session": {
12729	//       "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.",
12730	//       "location": "path",
12731	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
12732	//       "required": true,
12733	//       "type": "string"
12734	//     }
12735	//   },
12736	//   "path": "v2beta1/{+session}:detectIntent",
12737	//   "request": {
12738	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest"
12739	//   },
12740	//   "response": {
12741	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse"
12742	//   },
12743	//   "scopes": [
12744	//     "https://www.googleapis.com/auth/cloud-platform",
12745	//     "https://www.googleapis.com/auth/dialogflow"
12746	//   ]
12747	// }
12748
12749}
12750
12751// method id "dialogflow.projects.agent.environments.users.sessions.contexts.create":
12752
12753type ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall struct {
12754	s                                   *Service
12755	parent                              string
12756	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
12757	urlParams_                          gensupport.URLParams
12758	ctx_                                context.Context
12759	header_                             http.Header
12760}
12761
12762// Create: Creates a context.
12763//
12764// If the specified context already exists, overrides the context.
12765func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Create(parent string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
12766	c := &ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12767	c.parent = parent
12768	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
12769	return c
12770}
12771
12772// Fields allows partial responses to be retrieved. See
12773// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12774// for more information.
12775func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
12776	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12777	return c
12778}
12779
12780// Context sets the context to be used in this call's Do method. Any
12781// pending HTTP request will be aborted if the provided context is
12782// canceled.
12783func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
12784	c.ctx_ = ctx
12785	return c
12786}
12787
12788// Header returns an http.Header that can be modified by the caller to
12789// add HTTP headers to the request.
12790func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Header() http.Header {
12791	if c.header_ == nil {
12792		c.header_ = make(http.Header)
12793	}
12794	return c.header_
12795}
12796
12797func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
12798	reqHeaders := make(http.Header)
12799	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
12800	for k, v := range c.header_ {
12801		reqHeaders[k] = v
12802	}
12803	reqHeaders.Set("User-Agent", c.s.userAgent())
12804	var body io.Reader = nil
12805	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
12806	if err != nil {
12807		return nil, err
12808	}
12809	reqHeaders.Set("Content-Type", "application/json")
12810	c.urlParams_.Set("alt", alt)
12811	c.urlParams_.Set("prettyPrint", "false")
12812	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
12813	urls += "?" + c.urlParams_.Encode()
12814	req, err := http.NewRequest("POST", urls, body)
12815	if err != nil {
12816		return nil, err
12817	}
12818	req.Header = reqHeaders
12819	googleapi.Expand(req.URL, map[string]string{
12820		"parent": c.parent,
12821	})
12822	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12823}
12824
12825// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.create" call.
12826// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
12827// non-nil. Any non-2xx status code is an error. Response headers are in
12828// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
12829// (if a response was returned at all) in
12830// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12831// whether the returned error was because http.StatusNotModified was
12832// returned.
12833func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
12834	gensupport.SetOptions(c.urlParams_, opts...)
12835	res, err := c.doRequest("json")
12836	if res != nil && res.StatusCode == http.StatusNotModified {
12837		if res.Body != nil {
12838			res.Body.Close()
12839		}
12840		return nil, &googleapi.Error{
12841			Code:   res.StatusCode,
12842			Header: res.Header,
12843		}
12844	}
12845	if err != nil {
12846		return nil, err
12847	}
12848	defer googleapi.CloseBody(res)
12849	if err := googleapi.CheckResponse(res); err != nil {
12850		return nil, err
12851	}
12852	ret := &GoogleCloudDialogflowV2beta1Context{
12853		ServerResponse: googleapi.ServerResponse{
12854			Header:         res.Header,
12855			HTTPStatusCode: res.StatusCode,
12856		},
12857	}
12858	target := &ret
12859	if err := gensupport.DecodeResponse(target, res); err != nil {
12860		return nil, err
12861	}
12862	return ret, nil
12863	// {
12864	//   "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.",
12865	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
12866	//   "httpMethod": "POST",
12867	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.create",
12868	//   "parameterOrder": [
12869	//     "parent"
12870	//   ],
12871	//   "parameters": {
12872	//     "parent": {
12873	//       "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.",
12874	//       "location": "path",
12875	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
12876	//       "required": true,
12877	//       "type": "string"
12878	//     }
12879	//   },
12880	//   "path": "v2beta1/{+parent}/contexts",
12881	//   "request": {
12882	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
12883	//   },
12884	//   "response": {
12885	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
12886	//   },
12887	//   "scopes": [
12888	//     "https://www.googleapis.com/auth/cloud-platform",
12889	//     "https://www.googleapis.com/auth/dialogflow"
12890	//   ]
12891	// }
12892
12893}
12894
12895// method id "dialogflow.projects.agent.environments.users.sessions.contexts.delete":
12896
12897type ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall struct {
12898	s          *Service
12899	name       string
12900	urlParams_ gensupport.URLParams
12901	ctx_       context.Context
12902	header_    http.Header
12903}
12904
12905// Delete: Deletes the specified context.
12906func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Delete(name string) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
12907	c := &ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12908	c.name = name
12909	return c
12910}
12911
12912// Fields allows partial responses to be retrieved. See
12913// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12914// for more information.
12915func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
12916	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12917	return c
12918}
12919
12920// Context sets the context to be used in this call's Do method. Any
12921// pending HTTP request will be aborted if the provided context is
12922// canceled.
12923func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
12924	c.ctx_ = ctx
12925	return c
12926}
12927
12928// Header returns an http.Header that can be modified by the caller to
12929// add HTTP headers to the request.
12930func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Header() http.Header {
12931	if c.header_ == nil {
12932		c.header_ = make(http.Header)
12933	}
12934	return c.header_
12935}
12936
12937func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
12938	reqHeaders := make(http.Header)
12939	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
12940	for k, v := range c.header_ {
12941		reqHeaders[k] = v
12942	}
12943	reqHeaders.Set("User-Agent", c.s.userAgent())
12944	var body io.Reader = nil
12945	c.urlParams_.Set("alt", alt)
12946	c.urlParams_.Set("prettyPrint", "false")
12947	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12948	urls += "?" + c.urlParams_.Encode()
12949	req, err := http.NewRequest("DELETE", urls, body)
12950	if err != nil {
12951		return nil, err
12952	}
12953	req.Header = reqHeaders
12954	googleapi.Expand(req.URL, map[string]string{
12955		"name": c.name,
12956	})
12957	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12958}
12959
12960// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.delete" call.
12961// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
12962// non-2xx status code is an error. Response headers are in either
12963// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
12964// returned at all) in error.(*googleapi.Error).Header. Use
12965// googleapi.IsNotModified to check whether the returned error was
12966// because http.StatusNotModified was returned.
12967func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
12968	gensupport.SetOptions(c.urlParams_, opts...)
12969	res, err := c.doRequest("json")
12970	if res != nil && res.StatusCode == http.StatusNotModified {
12971		if res.Body != nil {
12972			res.Body.Close()
12973		}
12974		return nil, &googleapi.Error{
12975			Code:   res.StatusCode,
12976			Header: res.Header,
12977		}
12978	}
12979	if err != nil {
12980		return nil, err
12981	}
12982	defer googleapi.CloseBody(res)
12983	if err := googleapi.CheckResponse(res); err != nil {
12984		return nil, err
12985	}
12986	ret := &GoogleProtobufEmpty{
12987		ServerResponse: googleapi.ServerResponse{
12988			Header:         res.Header,
12989			HTTPStatusCode: res.StatusCode,
12990		},
12991	}
12992	target := &ret
12993	if err := gensupport.DecodeResponse(target, res); err != nil {
12994		return nil, err
12995	}
12996	return ret, nil
12997	// {
12998	//   "description": "Deletes the specified context.",
12999	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
13000	//   "httpMethod": "DELETE",
13001	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.delete",
13002	//   "parameterOrder": [
13003	//     "name"
13004	//   ],
13005	//   "parameters": {
13006	//     "name": {
13007	//       "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.",
13008	//       "location": "path",
13009	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
13010	//       "required": true,
13011	//       "type": "string"
13012	//     }
13013	//   },
13014	//   "path": "v2beta1/{+name}",
13015	//   "response": {
13016	//     "$ref": "GoogleProtobufEmpty"
13017	//   },
13018	//   "scopes": [
13019	//     "https://www.googleapis.com/auth/cloud-platform",
13020	//     "https://www.googleapis.com/auth/dialogflow"
13021	//   ]
13022	// }
13023
13024}
13025
13026// method id "dialogflow.projects.agent.environments.users.sessions.contexts.get":
13027
13028type ProjectsAgentEnvironmentsUsersSessionsContextsGetCall struct {
13029	s            *Service
13030	name         string
13031	urlParams_   gensupport.URLParams
13032	ifNoneMatch_ string
13033	ctx_         context.Context
13034	header_      http.Header
13035}
13036
13037// Get: Retrieves the specified context.
13038func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Get(name string) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
13039	c := &ProjectsAgentEnvironmentsUsersSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13040	c.name = name
13041	return c
13042}
13043
13044// Fields allows partial responses to be retrieved. See
13045// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13046// for more information.
13047func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
13048	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13049	return c
13050}
13051
13052// IfNoneMatch sets the optional parameter which makes the operation
13053// fail if the object's ETag matches the given value. This is useful for
13054// getting updates only after the object has changed since the last
13055// request. Use googleapi.IsNotModified to check whether the response
13056// error from Do is the result of In-None-Match.
13057func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
13058	c.ifNoneMatch_ = entityTag
13059	return c
13060}
13061
13062// Context sets the context to be used in this call's Do method. Any
13063// pending HTTP request will be aborted if the provided context is
13064// canceled.
13065func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
13066	c.ctx_ = ctx
13067	return c
13068}
13069
13070// Header returns an http.Header that can be modified by the caller to
13071// add HTTP headers to the request.
13072func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Header() http.Header {
13073	if c.header_ == nil {
13074		c.header_ = make(http.Header)
13075	}
13076	return c.header_
13077}
13078
13079func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
13080	reqHeaders := make(http.Header)
13081	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
13082	for k, v := range c.header_ {
13083		reqHeaders[k] = v
13084	}
13085	reqHeaders.Set("User-Agent", c.s.userAgent())
13086	if c.ifNoneMatch_ != "" {
13087		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13088	}
13089	var body io.Reader = nil
13090	c.urlParams_.Set("alt", alt)
13091	c.urlParams_.Set("prettyPrint", "false")
13092	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
13093	urls += "?" + c.urlParams_.Encode()
13094	req, err := http.NewRequest("GET", urls, body)
13095	if err != nil {
13096		return nil, err
13097	}
13098	req.Header = reqHeaders
13099	googleapi.Expand(req.URL, map[string]string{
13100		"name": c.name,
13101	})
13102	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13103}
13104
13105// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.get" call.
13106// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
13107// non-nil. Any non-2xx status code is an error. Response headers are in
13108// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
13109// (if a response was returned at all) in
13110// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13111// whether the returned error was because http.StatusNotModified was
13112// returned.
13113func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
13114	gensupport.SetOptions(c.urlParams_, opts...)
13115	res, err := c.doRequest("json")
13116	if res != nil && res.StatusCode == http.StatusNotModified {
13117		if res.Body != nil {
13118			res.Body.Close()
13119		}
13120		return nil, &googleapi.Error{
13121			Code:   res.StatusCode,
13122			Header: res.Header,
13123		}
13124	}
13125	if err != nil {
13126		return nil, err
13127	}
13128	defer googleapi.CloseBody(res)
13129	if err := googleapi.CheckResponse(res); err != nil {
13130		return nil, err
13131	}
13132	ret := &GoogleCloudDialogflowV2beta1Context{
13133		ServerResponse: googleapi.ServerResponse{
13134			Header:         res.Header,
13135			HTTPStatusCode: res.StatusCode,
13136		},
13137	}
13138	target := &ret
13139	if err := gensupport.DecodeResponse(target, res); err != nil {
13140		return nil, err
13141	}
13142	return ret, nil
13143	// {
13144	//   "description": "Retrieves the specified context.",
13145	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
13146	//   "httpMethod": "GET",
13147	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.get",
13148	//   "parameterOrder": [
13149	//     "name"
13150	//   ],
13151	//   "parameters": {
13152	//     "name": {
13153	//       "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.",
13154	//       "location": "path",
13155	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
13156	//       "required": true,
13157	//       "type": "string"
13158	//     }
13159	//   },
13160	//   "path": "v2beta1/{+name}",
13161	//   "response": {
13162	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
13163	//   },
13164	//   "scopes": [
13165	//     "https://www.googleapis.com/auth/cloud-platform",
13166	//     "https://www.googleapis.com/auth/dialogflow"
13167	//   ]
13168	// }
13169
13170}
13171
13172// method id "dialogflow.projects.agent.environments.users.sessions.contexts.list":
13173
13174type ProjectsAgentEnvironmentsUsersSessionsContextsListCall struct {
13175	s            *Service
13176	parent       string
13177	urlParams_   gensupport.URLParams
13178	ifNoneMatch_ string
13179	ctx_         context.Context
13180	header_      http.Header
13181}
13182
13183// List: Returns the list of all contexts in the specified session.
13184func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) List(parent string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
13185	c := &ProjectsAgentEnvironmentsUsersSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13186	c.parent = parent
13187	return c
13188}
13189
13190// PageSize sets the optional parameter "pageSize": The maximum number
13191// of items to return in a single page. By
13192// default 100 and at most 1000.
13193func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
13194	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13195	return c
13196}
13197
13198// PageToken sets the optional parameter "pageToken": The
13199// next_page_token value returned from a previous list request.
13200func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
13201	c.urlParams_.Set("pageToken", pageToken)
13202	return c
13203}
13204
13205// Fields allows partial responses to be retrieved. See
13206// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13207// for more information.
13208func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
13209	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13210	return c
13211}
13212
13213// IfNoneMatch sets the optional parameter which makes the operation
13214// fail if the object's ETag matches the given value. This is useful for
13215// getting updates only after the object has changed since the last
13216// request. Use googleapi.IsNotModified to check whether the response
13217// error from Do is the result of In-None-Match.
13218func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
13219	c.ifNoneMatch_ = entityTag
13220	return c
13221}
13222
13223// Context sets the context to be used in this call's Do method. Any
13224// pending HTTP request will be aborted if the provided context is
13225// canceled.
13226func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
13227	c.ctx_ = ctx
13228	return c
13229}
13230
13231// Header returns an http.Header that can be modified by the caller to
13232// add HTTP headers to the request.
13233func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Header() http.Header {
13234	if c.header_ == nil {
13235		c.header_ = make(http.Header)
13236	}
13237	return c.header_
13238}
13239
13240func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
13241	reqHeaders := make(http.Header)
13242	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
13243	for k, v := range c.header_ {
13244		reqHeaders[k] = v
13245	}
13246	reqHeaders.Set("User-Agent", c.s.userAgent())
13247	if c.ifNoneMatch_ != "" {
13248		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13249	}
13250	var body io.Reader = nil
13251	c.urlParams_.Set("alt", alt)
13252	c.urlParams_.Set("prettyPrint", "false")
13253	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
13254	urls += "?" + c.urlParams_.Encode()
13255	req, err := http.NewRequest("GET", urls, body)
13256	if err != nil {
13257		return nil, err
13258	}
13259	req.Header = reqHeaders
13260	googleapi.Expand(req.URL, map[string]string{
13261		"parent": c.parent,
13262	})
13263	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13264}
13265
13266// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.list" call.
13267// Exactly one of *GoogleCloudDialogflowV2beta1ListContextsResponse or
13268// error will be non-nil. Any non-2xx status code is an error. Response
13269// headers are in either
13270// *GoogleCloudDialogflowV2beta1ListContextsResponse.ServerResponse.Heade
13271// r or (if a response was returned at all) in
13272// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13273// whether the returned error was because http.StatusNotModified was
13274// returned.
13275func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListContextsResponse, error) {
13276	gensupport.SetOptions(c.urlParams_, opts...)
13277	res, err := c.doRequest("json")
13278	if res != nil && res.StatusCode == http.StatusNotModified {
13279		if res.Body != nil {
13280			res.Body.Close()
13281		}
13282		return nil, &googleapi.Error{
13283			Code:   res.StatusCode,
13284			Header: res.Header,
13285		}
13286	}
13287	if err != nil {
13288		return nil, err
13289	}
13290	defer googleapi.CloseBody(res)
13291	if err := googleapi.CheckResponse(res); err != nil {
13292		return nil, err
13293	}
13294	ret := &GoogleCloudDialogflowV2beta1ListContextsResponse{
13295		ServerResponse: googleapi.ServerResponse{
13296			Header:         res.Header,
13297			HTTPStatusCode: res.StatusCode,
13298		},
13299	}
13300	target := &ret
13301	if err := gensupport.DecodeResponse(target, res); err != nil {
13302		return nil, err
13303	}
13304	return ret, nil
13305	// {
13306	//   "description": "Returns the list of all contexts in the specified session.",
13307	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
13308	//   "httpMethod": "GET",
13309	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.list",
13310	//   "parameterOrder": [
13311	//     "parent"
13312	//   ],
13313	//   "parameters": {
13314	//     "pageSize": {
13315	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
13316	//       "format": "int32",
13317	//       "location": "query",
13318	//       "type": "integer"
13319	//     },
13320	//     "pageToken": {
13321	//       "description": "Optional. The next_page_token value returned from a previous list request.",
13322	//       "location": "query",
13323	//       "type": "string"
13324	//     },
13325	//     "parent": {
13326	//       "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.",
13327	//       "location": "path",
13328	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
13329	//       "required": true,
13330	//       "type": "string"
13331	//     }
13332	//   },
13333	//   "path": "v2beta1/{+parent}/contexts",
13334	//   "response": {
13335	//     "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse"
13336	//   },
13337	//   "scopes": [
13338	//     "https://www.googleapis.com/auth/cloud-platform",
13339	//     "https://www.googleapis.com/auth/dialogflow"
13340	//   ]
13341	// }
13342
13343}
13344
13345// Pages invokes f for each page of results.
13346// A non-nil error returned from f will halt the iteration.
13347// The provided context supersedes any context provided to the Context method.
13348func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListContextsResponse) error) error {
13349	c.ctx_ = ctx
13350	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13351	for {
13352		x, err := c.Do()
13353		if err != nil {
13354			return err
13355		}
13356		if err := f(x); err != nil {
13357			return err
13358		}
13359		if x.NextPageToken == "" {
13360			return nil
13361		}
13362		c.PageToken(x.NextPageToken)
13363	}
13364}
13365
13366// method id "dialogflow.projects.agent.environments.users.sessions.contexts.patch":
13367
13368type ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall struct {
13369	s                                   *Service
13370	nameid                              string
13371	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
13372	urlParams_                          gensupport.URLParams
13373	ctx_                                context.Context
13374	header_                             http.Header
13375}
13376
13377// Patch: Updates the specified context.
13378func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Patch(nameid string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
13379	c := &ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13380	c.nameid = nameid
13381	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
13382	return c
13383}
13384
13385// UpdateMask sets the optional parameter "updateMask": The mask to
13386// control which fields get updated.
13387func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
13388	c.urlParams_.Set("updateMask", updateMask)
13389	return c
13390}
13391
13392// Fields allows partial responses to be retrieved. See
13393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13394// for more information.
13395func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
13396	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13397	return c
13398}
13399
13400// Context sets the context to be used in this call's Do method. Any
13401// pending HTTP request will be aborted if the provided context is
13402// canceled.
13403func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
13404	c.ctx_ = ctx
13405	return c
13406}
13407
13408// Header returns an http.Header that can be modified by the caller to
13409// add HTTP headers to the request.
13410func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Header() http.Header {
13411	if c.header_ == nil {
13412		c.header_ = make(http.Header)
13413	}
13414	return c.header_
13415}
13416
13417func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
13418	reqHeaders := make(http.Header)
13419	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
13420	for k, v := range c.header_ {
13421		reqHeaders[k] = v
13422	}
13423	reqHeaders.Set("User-Agent", c.s.userAgent())
13424	var body io.Reader = nil
13425	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
13426	if err != nil {
13427		return nil, err
13428	}
13429	reqHeaders.Set("Content-Type", "application/json")
13430	c.urlParams_.Set("alt", alt)
13431	c.urlParams_.Set("prettyPrint", "false")
13432	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
13433	urls += "?" + c.urlParams_.Encode()
13434	req, err := http.NewRequest("PATCH", urls, body)
13435	if err != nil {
13436		return nil, err
13437	}
13438	req.Header = reqHeaders
13439	googleapi.Expand(req.URL, map[string]string{
13440		"name": c.nameid,
13441	})
13442	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13443}
13444
13445// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.patch" call.
13446// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
13447// non-nil. Any non-2xx status code is an error. Response headers are in
13448// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
13449// (if a response was returned at all) in
13450// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13451// whether the returned error was because http.StatusNotModified was
13452// returned.
13453func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
13454	gensupport.SetOptions(c.urlParams_, opts...)
13455	res, err := c.doRequest("json")
13456	if res != nil && res.StatusCode == http.StatusNotModified {
13457		if res.Body != nil {
13458			res.Body.Close()
13459		}
13460		return nil, &googleapi.Error{
13461			Code:   res.StatusCode,
13462			Header: res.Header,
13463		}
13464	}
13465	if err != nil {
13466		return nil, err
13467	}
13468	defer googleapi.CloseBody(res)
13469	if err := googleapi.CheckResponse(res); err != nil {
13470		return nil, err
13471	}
13472	ret := &GoogleCloudDialogflowV2beta1Context{
13473		ServerResponse: googleapi.ServerResponse{
13474			Header:         res.Header,
13475			HTTPStatusCode: res.StatusCode,
13476		},
13477	}
13478	target := &ret
13479	if err := gensupport.DecodeResponse(target, res); err != nil {
13480		return nil, err
13481	}
13482	return ret, nil
13483	// {
13484	//   "description": "Updates the specified context.",
13485	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
13486	//   "httpMethod": "PATCH",
13487	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.patch",
13488	//   "parameterOrder": [
13489	//     "name"
13490	//   ],
13491	//   "parameters": {
13492	//     "name": {
13493	//       "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`,\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\n\nThe `Context ID` is always converted to lowercase, may only contain\ncharacters in a-zA-Z0-9_-% and may be at most 250 bytes long.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\nThe following context names are reserved for internal use by Dialogflow.\nYou should not use these contexts or create contexts with these names:\n\n* `__system_counters__`\n* `*_id_dialog_context`\n* `*_dialog_params_size`",
13494	//       "location": "path",
13495	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
13496	//       "required": true,
13497	//       "type": "string"
13498	//     },
13499	//     "updateMask": {
13500	//       "description": "Optional. The mask to control which fields get updated.",
13501	//       "format": "google-fieldmask",
13502	//       "location": "query",
13503	//       "type": "string"
13504	//     }
13505	//   },
13506	//   "path": "v2beta1/{+name}",
13507	//   "request": {
13508	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
13509	//   },
13510	//   "response": {
13511	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
13512	//   },
13513	//   "scopes": [
13514	//     "https://www.googleapis.com/auth/cloud-platform",
13515	//     "https://www.googleapis.com/auth/dialogflow"
13516	//   ]
13517	// }
13518
13519}
13520
13521// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.create":
13522
13523type ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall struct {
13524	s                                             *Service
13525	parent                                        string
13526	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
13527	urlParams_                                    gensupport.URLParams
13528	ctx_                                          context.Context
13529	header_                                       http.Header
13530}
13531
13532// Create: Creates a session entity type.
13533//
13534// If the specified session entity type already exists, overrides
13535// the
13536// session entity type.
13537//
13538// This method doesn't work with Google Assistant integration.
13539// Contact Dialogflow support if you need to use session entities
13540// with Google Assistant integration.
13541func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
13542	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13543	c.parent = parent
13544	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
13545	return c
13546}
13547
13548// Fields allows partial responses to be retrieved. See
13549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13550// for more information.
13551func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
13552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13553	return c
13554}
13555
13556// Context sets the context to be used in this call's Do method. Any
13557// pending HTTP request will be aborted if the provided context is
13558// canceled.
13559func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
13560	c.ctx_ = ctx
13561	return c
13562}
13563
13564// Header returns an http.Header that can be modified by the caller to
13565// add HTTP headers to the request.
13566func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Header() http.Header {
13567	if c.header_ == nil {
13568		c.header_ = make(http.Header)
13569	}
13570	return c.header_
13571}
13572
13573func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
13574	reqHeaders := make(http.Header)
13575	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
13576	for k, v := range c.header_ {
13577		reqHeaders[k] = v
13578	}
13579	reqHeaders.Set("User-Agent", c.s.userAgent())
13580	var body io.Reader = nil
13581	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
13582	if err != nil {
13583		return nil, err
13584	}
13585	reqHeaders.Set("Content-Type", "application/json")
13586	c.urlParams_.Set("alt", alt)
13587	c.urlParams_.Set("prettyPrint", "false")
13588	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
13589	urls += "?" + c.urlParams_.Encode()
13590	req, err := http.NewRequest("POST", urls, body)
13591	if err != nil {
13592		return nil, err
13593	}
13594	req.Header = reqHeaders
13595	googleapi.Expand(req.URL, map[string]string{
13596		"parent": c.parent,
13597	})
13598	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13599}
13600
13601// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.create" call.
13602// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
13603// error will be non-nil. Any non-2xx status code is an error. Response
13604// headers are in either
13605// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
13606// or (if a response was returned at all) in
13607// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13608// whether the returned error was because http.StatusNotModified was
13609// returned.
13610func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
13611	gensupport.SetOptions(c.urlParams_, opts...)
13612	res, err := c.doRequest("json")
13613	if res != nil && res.StatusCode == http.StatusNotModified {
13614		if res.Body != nil {
13615			res.Body.Close()
13616		}
13617		return nil, &googleapi.Error{
13618			Code:   res.StatusCode,
13619			Header: res.Header,
13620		}
13621	}
13622	if err != nil {
13623		return nil, err
13624	}
13625	defer googleapi.CloseBody(res)
13626	if err := googleapi.CheckResponse(res); err != nil {
13627		return nil, err
13628	}
13629	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
13630		ServerResponse: googleapi.ServerResponse{
13631			Header:         res.Header,
13632			HTTPStatusCode: res.StatusCode,
13633		},
13634	}
13635	target := &ret
13636	if err := gensupport.DecodeResponse(target, res); err != nil {
13637		return nil, err
13638	}
13639	return ret, nil
13640	// {
13641	//   "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.",
13642	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
13643	//   "httpMethod": "POST",
13644	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.create",
13645	//   "parameterOrder": [
13646	//     "parent"
13647	//   ],
13648	//   "parameters": {
13649	//     "parent": {
13650	//       "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.",
13651	//       "location": "path",
13652	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
13653	//       "required": true,
13654	//       "type": "string"
13655	//     }
13656	//   },
13657	//   "path": "v2beta1/{+parent}/entityTypes",
13658	//   "request": {
13659	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
13660	//   },
13661	//   "response": {
13662	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
13663	//   },
13664	//   "scopes": [
13665	//     "https://www.googleapis.com/auth/cloud-platform",
13666	//     "https://www.googleapis.com/auth/dialogflow"
13667	//   ]
13668	// }
13669
13670}
13671
13672// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete":
13673
13674type ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall struct {
13675	s          *Service
13676	name       string
13677	urlParams_ gensupport.URLParams
13678	ctx_       context.Context
13679	header_    http.Header
13680}
13681
13682// Delete: Deletes the specified session entity type.
13683//
13684// This method doesn't work with Google Assistant integration.
13685// Contact Dialogflow support if you need to use session entities
13686// with Google Assistant integration.
13687func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Delete(name string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
13688	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13689	c.name = name
13690	return c
13691}
13692
13693// Fields allows partial responses to be retrieved. See
13694// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13695// for more information.
13696func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
13697	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13698	return c
13699}
13700
13701// Context sets the context to be used in this call's Do method. Any
13702// pending HTTP request will be aborted if the provided context is
13703// canceled.
13704func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
13705	c.ctx_ = ctx
13706	return c
13707}
13708
13709// Header returns an http.Header that can be modified by the caller to
13710// add HTTP headers to the request.
13711func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Header() http.Header {
13712	if c.header_ == nil {
13713		c.header_ = make(http.Header)
13714	}
13715	return c.header_
13716}
13717
13718func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
13719	reqHeaders := make(http.Header)
13720	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
13721	for k, v := range c.header_ {
13722		reqHeaders[k] = v
13723	}
13724	reqHeaders.Set("User-Agent", c.s.userAgent())
13725	var body io.Reader = nil
13726	c.urlParams_.Set("alt", alt)
13727	c.urlParams_.Set("prettyPrint", "false")
13728	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
13729	urls += "?" + c.urlParams_.Encode()
13730	req, err := http.NewRequest("DELETE", urls, body)
13731	if err != nil {
13732		return nil, err
13733	}
13734	req.Header = reqHeaders
13735	googleapi.Expand(req.URL, map[string]string{
13736		"name": c.name,
13737	})
13738	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13739}
13740
13741// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete" call.
13742// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
13743// non-2xx status code is an error. Response headers are in either
13744// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
13745// returned at all) in error.(*googleapi.Error).Header. Use
13746// googleapi.IsNotModified to check whether the returned error was
13747// because http.StatusNotModified was returned.
13748func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
13749	gensupport.SetOptions(c.urlParams_, opts...)
13750	res, err := c.doRequest("json")
13751	if res != nil && res.StatusCode == http.StatusNotModified {
13752		if res.Body != nil {
13753			res.Body.Close()
13754		}
13755		return nil, &googleapi.Error{
13756			Code:   res.StatusCode,
13757			Header: res.Header,
13758		}
13759	}
13760	if err != nil {
13761		return nil, err
13762	}
13763	defer googleapi.CloseBody(res)
13764	if err := googleapi.CheckResponse(res); err != nil {
13765		return nil, err
13766	}
13767	ret := &GoogleProtobufEmpty{
13768		ServerResponse: googleapi.ServerResponse{
13769			Header:         res.Header,
13770			HTTPStatusCode: res.StatusCode,
13771		},
13772	}
13773	target := &ret
13774	if err := gensupport.DecodeResponse(target, res); err != nil {
13775		return nil, err
13776	}
13777	return ret, nil
13778	// {
13779	//   "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.",
13780	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
13781	//   "httpMethod": "DELETE",
13782	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete",
13783	//   "parameterOrder": [
13784	//     "name"
13785	//   ],
13786	//   "parameters": {
13787	//     "name": {
13788	//       "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.",
13789	//       "location": "path",
13790	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
13791	//       "required": true,
13792	//       "type": "string"
13793	//     }
13794	//   },
13795	//   "path": "v2beta1/{+name}",
13796	//   "response": {
13797	//     "$ref": "GoogleProtobufEmpty"
13798	//   },
13799	//   "scopes": [
13800	//     "https://www.googleapis.com/auth/cloud-platform",
13801	//     "https://www.googleapis.com/auth/dialogflow"
13802	//   ]
13803	// }
13804
13805}
13806
13807// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.get":
13808
13809type ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall struct {
13810	s            *Service
13811	name         string
13812	urlParams_   gensupport.URLParams
13813	ifNoneMatch_ string
13814	ctx_         context.Context
13815	header_      http.Header
13816}
13817
13818// Get: Retrieves the specified session entity type.
13819//
13820// This method doesn't work with Google Assistant integration.
13821// Contact Dialogflow support if you need to use session entities
13822// with Google Assistant integration.
13823func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Get(name string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
13824	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13825	c.name = name
13826	return c
13827}
13828
13829// Fields allows partial responses to be retrieved. See
13830// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13831// for more information.
13832func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
13833	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13834	return c
13835}
13836
13837// IfNoneMatch sets the optional parameter which makes the operation
13838// fail if the object's ETag matches the given value. This is useful for
13839// getting updates only after the object has changed since the last
13840// request. Use googleapi.IsNotModified to check whether the response
13841// error from Do is the result of In-None-Match.
13842func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
13843	c.ifNoneMatch_ = entityTag
13844	return c
13845}
13846
13847// Context sets the context to be used in this call's Do method. Any
13848// pending HTTP request will be aborted if the provided context is
13849// canceled.
13850func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
13851	c.ctx_ = ctx
13852	return c
13853}
13854
13855// Header returns an http.Header that can be modified by the caller to
13856// add HTTP headers to the request.
13857func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Header() http.Header {
13858	if c.header_ == nil {
13859		c.header_ = make(http.Header)
13860	}
13861	return c.header_
13862}
13863
13864func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
13865	reqHeaders := make(http.Header)
13866	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
13867	for k, v := range c.header_ {
13868		reqHeaders[k] = v
13869	}
13870	reqHeaders.Set("User-Agent", c.s.userAgent())
13871	if c.ifNoneMatch_ != "" {
13872		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13873	}
13874	var body io.Reader = nil
13875	c.urlParams_.Set("alt", alt)
13876	c.urlParams_.Set("prettyPrint", "false")
13877	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
13878	urls += "?" + c.urlParams_.Encode()
13879	req, err := http.NewRequest("GET", urls, body)
13880	if err != nil {
13881		return nil, err
13882	}
13883	req.Header = reqHeaders
13884	googleapi.Expand(req.URL, map[string]string{
13885		"name": c.name,
13886	})
13887	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13888}
13889
13890// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.get" call.
13891// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
13892// error will be non-nil. Any non-2xx status code is an error. Response
13893// headers are in either
13894// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
13895// or (if a response was returned at all) in
13896// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13897// whether the returned error was because http.StatusNotModified was
13898// returned.
13899func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
13900	gensupport.SetOptions(c.urlParams_, opts...)
13901	res, err := c.doRequest("json")
13902	if res != nil && res.StatusCode == http.StatusNotModified {
13903		if res.Body != nil {
13904			res.Body.Close()
13905		}
13906		return nil, &googleapi.Error{
13907			Code:   res.StatusCode,
13908			Header: res.Header,
13909		}
13910	}
13911	if err != nil {
13912		return nil, err
13913	}
13914	defer googleapi.CloseBody(res)
13915	if err := googleapi.CheckResponse(res); err != nil {
13916		return nil, err
13917	}
13918	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
13919		ServerResponse: googleapi.ServerResponse{
13920			Header:         res.Header,
13921			HTTPStatusCode: res.StatusCode,
13922		},
13923	}
13924	target := &ret
13925	if err := gensupport.DecodeResponse(target, res); err != nil {
13926		return nil, err
13927	}
13928	return ret, nil
13929	// {
13930	//   "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.",
13931	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
13932	//   "httpMethod": "GET",
13933	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.get",
13934	//   "parameterOrder": [
13935	//     "name"
13936	//   ],
13937	//   "parameters": {
13938	//     "name": {
13939	//       "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.",
13940	//       "location": "path",
13941	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
13942	//       "required": true,
13943	//       "type": "string"
13944	//     }
13945	//   },
13946	//   "path": "v2beta1/{+name}",
13947	//   "response": {
13948	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
13949	//   },
13950	//   "scopes": [
13951	//     "https://www.googleapis.com/auth/cloud-platform",
13952	//     "https://www.googleapis.com/auth/dialogflow"
13953	//   ]
13954	// }
13955
13956}
13957
13958// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.list":
13959
13960type ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall struct {
13961	s            *Service
13962	parent       string
13963	urlParams_   gensupport.URLParams
13964	ifNoneMatch_ string
13965	ctx_         context.Context
13966	header_      http.Header
13967}
13968
13969// List: Returns the list of all session entity types in the specified
13970// session.
13971//
13972// This method doesn't work with Google Assistant integration.
13973// Contact Dialogflow support if you need to use session entities
13974// with Google Assistant integration.
13975func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) List(parent string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
13976	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13977	c.parent = parent
13978	return c
13979}
13980
13981// PageSize sets the optional parameter "pageSize": The maximum number
13982// of items to return in a single page. By
13983// default 100 and at most 1000.
13984func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
13985	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13986	return c
13987}
13988
13989// PageToken sets the optional parameter "pageToken": The
13990// next_page_token value returned from a previous list request.
13991func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
13992	c.urlParams_.Set("pageToken", pageToken)
13993	return c
13994}
13995
13996// Fields allows partial responses to be retrieved. See
13997// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13998// for more information.
13999func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
14000	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14001	return c
14002}
14003
14004// IfNoneMatch sets the optional parameter which makes the operation
14005// fail if the object's ETag matches the given value. This is useful for
14006// getting updates only after the object has changed since the last
14007// request. Use googleapi.IsNotModified to check whether the response
14008// error from Do is the result of In-None-Match.
14009func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
14010	c.ifNoneMatch_ = entityTag
14011	return c
14012}
14013
14014// Context sets the context to be used in this call's Do method. Any
14015// pending HTTP request will be aborted if the provided context is
14016// canceled.
14017func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
14018	c.ctx_ = ctx
14019	return c
14020}
14021
14022// Header returns an http.Header that can be modified by the caller to
14023// add HTTP headers to the request.
14024func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Header() http.Header {
14025	if c.header_ == nil {
14026		c.header_ = make(http.Header)
14027	}
14028	return c.header_
14029}
14030
14031func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
14032	reqHeaders := make(http.Header)
14033	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14034	for k, v := range c.header_ {
14035		reqHeaders[k] = v
14036	}
14037	reqHeaders.Set("User-Agent", c.s.userAgent())
14038	if c.ifNoneMatch_ != "" {
14039		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14040	}
14041	var body io.Reader = nil
14042	c.urlParams_.Set("alt", alt)
14043	c.urlParams_.Set("prettyPrint", "false")
14044	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
14045	urls += "?" + c.urlParams_.Encode()
14046	req, err := http.NewRequest("GET", urls, body)
14047	if err != nil {
14048		return nil, err
14049	}
14050	req.Header = reqHeaders
14051	googleapi.Expand(req.URL, map[string]string{
14052		"parent": c.parent,
14053	})
14054	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14055}
14056
14057// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.list" call.
14058// Exactly one of
14059// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse or error
14060// will be non-nil. Any non-2xx status code is an error. Response
14061// headers are in either
14062// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse.ServerResp
14063// onse.Header or (if a response was returned at all) in
14064// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14065// whether the returned error was because http.StatusNotModified was
14066// returned.
14067func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse, error) {
14068	gensupport.SetOptions(c.urlParams_, opts...)
14069	res, err := c.doRequest("json")
14070	if res != nil && res.StatusCode == http.StatusNotModified {
14071		if res.Body != nil {
14072			res.Body.Close()
14073		}
14074		return nil, &googleapi.Error{
14075			Code:   res.StatusCode,
14076			Header: res.Header,
14077		}
14078	}
14079	if err != nil {
14080		return nil, err
14081	}
14082	defer googleapi.CloseBody(res)
14083	if err := googleapi.CheckResponse(res); err != nil {
14084		return nil, err
14085	}
14086	ret := &GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse{
14087		ServerResponse: googleapi.ServerResponse{
14088			Header:         res.Header,
14089			HTTPStatusCode: res.StatusCode,
14090		},
14091	}
14092	target := &ret
14093	if err := gensupport.DecodeResponse(target, res); err != nil {
14094		return nil, err
14095	}
14096	return ret, nil
14097	// {
14098	//   "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.",
14099	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
14100	//   "httpMethod": "GET",
14101	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.list",
14102	//   "parameterOrder": [
14103	//     "parent"
14104	//   ],
14105	//   "parameters": {
14106	//     "pageSize": {
14107	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
14108	//       "format": "int32",
14109	//       "location": "query",
14110	//       "type": "integer"
14111	//     },
14112	//     "pageToken": {
14113	//       "description": "Optional. The next_page_token value returned from a previous list request.",
14114	//       "location": "query",
14115	//       "type": "string"
14116	//     },
14117	//     "parent": {
14118	//       "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.",
14119	//       "location": "path",
14120	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
14121	//       "required": true,
14122	//       "type": "string"
14123	//     }
14124	//   },
14125	//   "path": "v2beta1/{+parent}/entityTypes",
14126	//   "response": {
14127	//     "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse"
14128	//   },
14129	//   "scopes": [
14130	//     "https://www.googleapis.com/auth/cloud-platform",
14131	//     "https://www.googleapis.com/auth/dialogflow"
14132	//   ]
14133	// }
14134
14135}
14136
14137// Pages invokes f for each page of results.
14138// A non-nil error returned from f will halt the iteration.
14139// The provided context supersedes any context provided to the Context method.
14140func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) error) error {
14141	c.ctx_ = ctx
14142	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14143	for {
14144		x, err := c.Do()
14145		if err != nil {
14146			return err
14147		}
14148		if err := f(x); err != nil {
14149			return err
14150		}
14151		if x.NextPageToken == "" {
14152			return nil
14153		}
14154		c.PageToken(x.NextPageToken)
14155	}
14156}
14157
14158// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch":
14159
14160type ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall struct {
14161	s                                             *Service
14162	nameid                                        string
14163	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
14164	urlParams_                                    gensupport.URLParams
14165	ctx_                                          context.Context
14166	header_                                       http.Header
14167}
14168
14169// Patch: Updates the specified session entity type.
14170//
14171// This method doesn't work with Google Assistant integration.
14172// Contact Dialogflow support if you need to use session entities
14173// with Google Assistant integration.
14174func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
14175	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14176	c.nameid = nameid
14177	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
14178	return c
14179}
14180
14181// UpdateMask sets the optional parameter "updateMask": The mask to
14182// control which fields get updated.
14183func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
14184	c.urlParams_.Set("updateMask", updateMask)
14185	return c
14186}
14187
14188// Fields allows partial responses to be retrieved. See
14189// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14190// for more information.
14191func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
14192	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14193	return c
14194}
14195
14196// Context sets the context to be used in this call's Do method. Any
14197// pending HTTP request will be aborted if the provided context is
14198// canceled.
14199func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
14200	c.ctx_ = ctx
14201	return c
14202}
14203
14204// Header returns an http.Header that can be modified by the caller to
14205// add HTTP headers to the request.
14206func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Header() http.Header {
14207	if c.header_ == nil {
14208		c.header_ = make(http.Header)
14209	}
14210	return c.header_
14211}
14212
14213func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
14214	reqHeaders := make(http.Header)
14215	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14216	for k, v := range c.header_ {
14217		reqHeaders[k] = v
14218	}
14219	reqHeaders.Set("User-Agent", c.s.userAgent())
14220	var body io.Reader = nil
14221	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
14222	if err != nil {
14223		return nil, err
14224	}
14225	reqHeaders.Set("Content-Type", "application/json")
14226	c.urlParams_.Set("alt", alt)
14227	c.urlParams_.Set("prettyPrint", "false")
14228	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14229	urls += "?" + c.urlParams_.Encode()
14230	req, err := http.NewRequest("PATCH", urls, body)
14231	if err != nil {
14232		return nil, err
14233	}
14234	req.Header = reqHeaders
14235	googleapi.Expand(req.URL, map[string]string{
14236		"name": c.nameid,
14237	})
14238	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14239}
14240
14241// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch" call.
14242// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
14243// error will be non-nil. Any non-2xx status code is an error. Response
14244// headers are in either
14245// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
14246// or (if a response was returned at all) in
14247// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14248// whether the returned error was because http.StatusNotModified was
14249// returned.
14250func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
14251	gensupport.SetOptions(c.urlParams_, opts...)
14252	res, err := c.doRequest("json")
14253	if res != nil && res.StatusCode == http.StatusNotModified {
14254		if res.Body != nil {
14255			res.Body.Close()
14256		}
14257		return nil, &googleapi.Error{
14258			Code:   res.StatusCode,
14259			Header: res.Header,
14260		}
14261	}
14262	if err != nil {
14263		return nil, err
14264	}
14265	defer googleapi.CloseBody(res)
14266	if err := googleapi.CheckResponse(res); err != nil {
14267		return nil, err
14268	}
14269	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
14270		ServerResponse: googleapi.ServerResponse{
14271			Header:         res.Header,
14272			HTTPStatusCode: res.StatusCode,
14273		},
14274	}
14275	target := &ret
14276	if err := gensupport.DecodeResponse(target, res); err != nil {
14277		return nil, err
14278	}
14279	return ret, nil
14280	// {
14281	//   "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.",
14282	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
14283	//   "httpMethod": "PATCH",
14284	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch",
14285	//   "parameterOrder": [
14286	//     "name"
14287	//   ],
14288	//   "parameters": {
14289	//     "name": {
14290	//       "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.",
14291	//       "location": "path",
14292	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
14293	//       "required": true,
14294	//       "type": "string"
14295	//     },
14296	//     "updateMask": {
14297	//       "description": "Optional. The mask to control which fields get updated.",
14298	//       "format": "google-fieldmask",
14299	//       "location": "query",
14300	//       "type": "string"
14301	//     }
14302	//   },
14303	//   "path": "v2beta1/{+name}",
14304	//   "request": {
14305	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
14306	//   },
14307	//   "response": {
14308	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
14309	//   },
14310	//   "scopes": [
14311	//     "https://www.googleapis.com/auth/cloud-platform",
14312	//     "https://www.googleapis.com/auth/dialogflow"
14313	//   ]
14314	// }
14315
14316}
14317
14318// method id "dialogflow.projects.agent.intents.batchDelete":
14319
14320type ProjectsAgentIntentsBatchDeleteCall struct {
14321	s                                                     *Service
14322	parent                                                string
14323	googleclouddialogflowv2beta1batchdeleteintentsrequest *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest
14324	urlParams_                                            gensupport.URLParams
14325	ctx_                                                  context.Context
14326	header_                                               http.Header
14327}
14328
14329// BatchDelete: Deletes intents in the specified agent.
14330//
14331// Operation <response: google.protobuf.Empty>
14332func (r *ProjectsAgentIntentsService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteintentsrequest *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest) *ProjectsAgentIntentsBatchDeleteCall {
14333	c := &ProjectsAgentIntentsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14334	c.parent = parent
14335	c.googleclouddialogflowv2beta1batchdeleteintentsrequest = googleclouddialogflowv2beta1batchdeleteintentsrequest
14336	return c
14337}
14338
14339// Fields allows partial responses to be retrieved. See
14340// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14341// for more information.
14342func (c *ProjectsAgentIntentsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchDeleteCall {
14343	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14344	return c
14345}
14346
14347// Context sets the context to be used in this call's Do method. Any
14348// pending HTTP request will be aborted if the provided context is
14349// canceled.
14350func (c *ProjectsAgentIntentsBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchDeleteCall {
14351	c.ctx_ = ctx
14352	return c
14353}
14354
14355// Header returns an http.Header that can be modified by the caller to
14356// add HTTP headers to the request.
14357func (c *ProjectsAgentIntentsBatchDeleteCall) Header() http.Header {
14358	if c.header_ == nil {
14359		c.header_ = make(http.Header)
14360	}
14361	return c.header_
14362}
14363
14364func (c *ProjectsAgentIntentsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
14365	reqHeaders := make(http.Header)
14366	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14367	for k, v := range c.header_ {
14368		reqHeaders[k] = v
14369	}
14370	reqHeaders.Set("User-Agent", c.s.userAgent())
14371	var body io.Reader = nil
14372	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteintentsrequest)
14373	if err != nil {
14374		return nil, err
14375	}
14376	reqHeaders.Set("Content-Type", "application/json")
14377	c.urlParams_.Set("alt", alt)
14378	c.urlParams_.Set("prettyPrint", "false")
14379	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents:batchDelete")
14380	urls += "?" + c.urlParams_.Encode()
14381	req, err := http.NewRequest("POST", urls, body)
14382	if err != nil {
14383		return nil, err
14384	}
14385	req.Header = reqHeaders
14386	googleapi.Expand(req.URL, map[string]string{
14387		"parent": c.parent,
14388	})
14389	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14390}
14391
14392// Do executes the "dialogflow.projects.agent.intents.batchDelete" call.
14393// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
14394// Any non-2xx status code is an error. Response headers are in either
14395// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
14396// was returned at all) in error.(*googleapi.Error).Header. Use
14397// googleapi.IsNotModified to check whether the returned error was
14398// because http.StatusNotModified was returned.
14399func (c *ProjectsAgentIntentsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
14400	gensupport.SetOptions(c.urlParams_, opts...)
14401	res, err := c.doRequest("json")
14402	if res != nil && res.StatusCode == http.StatusNotModified {
14403		if res.Body != nil {
14404			res.Body.Close()
14405		}
14406		return nil, &googleapi.Error{
14407			Code:   res.StatusCode,
14408			Header: res.Header,
14409		}
14410	}
14411	if err != nil {
14412		return nil, err
14413	}
14414	defer googleapi.CloseBody(res)
14415	if err := googleapi.CheckResponse(res); err != nil {
14416		return nil, err
14417	}
14418	ret := &GoogleLongrunningOperation{
14419		ServerResponse: googleapi.ServerResponse{
14420			Header:         res.Header,
14421			HTTPStatusCode: res.StatusCode,
14422		},
14423	}
14424	target := &ret
14425	if err := gensupport.DecodeResponse(target, res); err != nil {
14426		return nil, err
14427	}
14428	return ret, nil
14429	// {
14430	//   "description": "Deletes intents in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
14431	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents:batchDelete",
14432	//   "httpMethod": "POST",
14433	//   "id": "dialogflow.projects.agent.intents.batchDelete",
14434	//   "parameterOrder": [
14435	//     "parent"
14436	//   ],
14437	//   "parameters": {
14438	//     "parent": {
14439	//       "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.",
14440	//       "location": "path",
14441	//       "pattern": "^projects/[^/]+/agent$",
14442	//       "required": true,
14443	//       "type": "string"
14444	//     }
14445	//   },
14446	//   "path": "v2beta1/{+parent}/intents:batchDelete",
14447	//   "request": {
14448	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest"
14449	//   },
14450	//   "response": {
14451	//     "$ref": "GoogleLongrunningOperation"
14452	//   },
14453	//   "scopes": [
14454	//     "https://www.googleapis.com/auth/cloud-platform",
14455	//     "https://www.googleapis.com/auth/dialogflow"
14456	//   ]
14457	// }
14458
14459}
14460
14461// method id "dialogflow.projects.agent.intents.batchUpdate":
14462
14463type ProjectsAgentIntentsBatchUpdateCall struct {
14464	s                                                     *Service
14465	parent                                                string
14466	googleclouddialogflowv2beta1batchupdateintentsrequest *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest
14467	urlParams_                                            gensupport.URLParams
14468	ctx_                                                  context.Context
14469	header_                                               http.Header
14470}
14471
14472// BatchUpdate: Updates/Creates multiple intents in the specified
14473// agent.
14474//
14475// Operation <response: BatchUpdateIntentsResponse>
14476func (r *ProjectsAgentIntentsService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateintentsrequest *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest) *ProjectsAgentIntentsBatchUpdateCall {
14477	c := &ProjectsAgentIntentsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14478	c.parent = parent
14479	c.googleclouddialogflowv2beta1batchupdateintentsrequest = googleclouddialogflowv2beta1batchupdateintentsrequest
14480	return c
14481}
14482
14483// Fields allows partial responses to be retrieved. See
14484// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14485// for more information.
14486func (c *ProjectsAgentIntentsBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchUpdateCall {
14487	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14488	return c
14489}
14490
14491// Context sets the context to be used in this call's Do method. Any
14492// pending HTTP request will be aborted if the provided context is
14493// canceled.
14494func (c *ProjectsAgentIntentsBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchUpdateCall {
14495	c.ctx_ = ctx
14496	return c
14497}
14498
14499// Header returns an http.Header that can be modified by the caller to
14500// add HTTP headers to the request.
14501func (c *ProjectsAgentIntentsBatchUpdateCall) Header() http.Header {
14502	if c.header_ == nil {
14503		c.header_ = make(http.Header)
14504	}
14505	return c.header_
14506}
14507
14508func (c *ProjectsAgentIntentsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
14509	reqHeaders := make(http.Header)
14510	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14511	for k, v := range c.header_ {
14512		reqHeaders[k] = v
14513	}
14514	reqHeaders.Set("User-Agent", c.s.userAgent())
14515	var body io.Reader = nil
14516	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateintentsrequest)
14517	if err != nil {
14518		return nil, err
14519	}
14520	reqHeaders.Set("Content-Type", "application/json")
14521	c.urlParams_.Set("alt", alt)
14522	c.urlParams_.Set("prettyPrint", "false")
14523	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents:batchUpdate")
14524	urls += "?" + c.urlParams_.Encode()
14525	req, err := http.NewRequest("POST", urls, body)
14526	if err != nil {
14527		return nil, err
14528	}
14529	req.Header = reqHeaders
14530	googleapi.Expand(req.URL, map[string]string{
14531		"parent": c.parent,
14532	})
14533	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14534}
14535
14536// Do executes the "dialogflow.projects.agent.intents.batchUpdate" call.
14537// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
14538// Any non-2xx status code is an error. Response headers are in either
14539// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
14540// was returned at all) in error.(*googleapi.Error).Header. Use
14541// googleapi.IsNotModified to check whether the returned error was
14542// because http.StatusNotModified was returned.
14543func (c *ProjectsAgentIntentsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
14544	gensupport.SetOptions(c.urlParams_, opts...)
14545	res, err := c.doRequest("json")
14546	if res != nil && res.StatusCode == http.StatusNotModified {
14547		if res.Body != nil {
14548			res.Body.Close()
14549		}
14550		return nil, &googleapi.Error{
14551			Code:   res.StatusCode,
14552			Header: res.Header,
14553		}
14554	}
14555	if err != nil {
14556		return nil, err
14557	}
14558	defer googleapi.CloseBody(res)
14559	if err := googleapi.CheckResponse(res); err != nil {
14560		return nil, err
14561	}
14562	ret := &GoogleLongrunningOperation{
14563		ServerResponse: googleapi.ServerResponse{
14564			Header:         res.Header,
14565			HTTPStatusCode: res.StatusCode,
14566		},
14567	}
14568	target := &ret
14569	if err := gensupport.DecodeResponse(target, res); err != nil {
14570		return nil, err
14571	}
14572	return ret, nil
14573	// {
14574	//   "description": "Updates/Creates multiple intents in the specified agent.\n\nOperation \u003cresponse: BatchUpdateIntentsResponse\u003e",
14575	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents:batchUpdate",
14576	//   "httpMethod": "POST",
14577	//   "id": "dialogflow.projects.agent.intents.batchUpdate",
14578	//   "parameterOrder": [
14579	//     "parent"
14580	//   ],
14581	//   "parameters": {
14582	//     "parent": {
14583	//       "description": "Required. The name of the agent to update or create intents in.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
14584	//       "location": "path",
14585	//       "pattern": "^projects/[^/]+/agent$",
14586	//       "required": true,
14587	//       "type": "string"
14588	//     }
14589	//   },
14590	//   "path": "v2beta1/{+parent}/intents:batchUpdate",
14591	//   "request": {
14592	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest"
14593	//   },
14594	//   "response": {
14595	//     "$ref": "GoogleLongrunningOperation"
14596	//   },
14597	//   "scopes": [
14598	//     "https://www.googleapis.com/auth/cloud-platform",
14599	//     "https://www.googleapis.com/auth/dialogflow"
14600	//   ]
14601	// }
14602
14603}
14604
14605// method id "dialogflow.projects.agent.intents.create":
14606
14607type ProjectsAgentIntentsCreateCall struct {
14608	s                                  *Service
14609	parent                             string
14610	googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent
14611	urlParams_                         gensupport.URLParams
14612	ctx_                               context.Context
14613	header_                            http.Header
14614}
14615
14616// Create: Creates an intent in the specified agent.
14617func (r *ProjectsAgentIntentsService) Create(parent string, googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent) *ProjectsAgentIntentsCreateCall {
14618	c := &ProjectsAgentIntentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14619	c.parent = parent
14620	c.googleclouddialogflowv2beta1intent = googleclouddialogflowv2beta1intent
14621	return c
14622}
14623
14624// IntentView sets the optional parameter "intentView": The resource
14625// view to apply to the returned intent.
14626//
14627// Possible values:
14628//   "INTENT_VIEW_UNSPECIFIED"
14629//   "INTENT_VIEW_FULL"
14630func (c *ProjectsAgentIntentsCreateCall) IntentView(intentView string) *ProjectsAgentIntentsCreateCall {
14631	c.urlParams_.Set("intentView", intentView)
14632	return c
14633}
14634
14635// LanguageCode sets the optional parameter "languageCode": The language
14636// of training phrases, parameters and rich messages
14637// defined in `intent`. If not specified, the agent's default language
14638// is
14639// used.
14640// [Many
14641// languages](https://cloud.google.com/dialogflow/docs/reference/la
14642// nguage)
14643// are supported. Note: languages must be enabled in the agent before
14644// they can
14645// be used.
14646func (c *ProjectsAgentIntentsCreateCall) LanguageCode(languageCode string) *ProjectsAgentIntentsCreateCall {
14647	c.urlParams_.Set("languageCode", languageCode)
14648	return c
14649}
14650
14651// Fields allows partial responses to be retrieved. See
14652// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14653// for more information.
14654func (c *ProjectsAgentIntentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsCreateCall {
14655	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14656	return c
14657}
14658
14659// Context sets the context to be used in this call's Do method. Any
14660// pending HTTP request will be aborted if the provided context is
14661// canceled.
14662func (c *ProjectsAgentIntentsCreateCall) Context(ctx context.Context) *ProjectsAgentIntentsCreateCall {
14663	c.ctx_ = ctx
14664	return c
14665}
14666
14667// Header returns an http.Header that can be modified by the caller to
14668// add HTTP headers to the request.
14669func (c *ProjectsAgentIntentsCreateCall) Header() http.Header {
14670	if c.header_ == nil {
14671		c.header_ = make(http.Header)
14672	}
14673	return c.header_
14674}
14675
14676func (c *ProjectsAgentIntentsCreateCall) doRequest(alt string) (*http.Response, error) {
14677	reqHeaders := make(http.Header)
14678	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14679	for k, v := range c.header_ {
14680		reqHeaders[k] = v
14681	}
14682	reqHeaders.Set("User-Agent", c.s.userAgent())
14683	var body io.Reader = nil
14684	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1intent)
14685	if err != nil {
14686		return nil, err
14687	}
14688	reqHeaders.Set("Content-Type", "application/json")
14689	c.urlParams_.Set("alt", alt)
14690	c.urlParams_.Set("prettyPrint", "false")
14691	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents")
14692	urls += "?" + c.urlParams_.Encode()
14693	req, err := http.NewRequest("POST", urls, body)
14694	if err != nil {
14695		return nil, err
14696	}
14697	req.Header = reqHeaders
14698	googleapi.Expand(req.URL, map[string]string{
14699		"parent": c.parent,
14700	})
14701	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14702}
14703
14704// Do executes the "dialogflow.projects.agent.intents.create" call.
14705// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
14706// non-nil. Any non-2xx status code is an error. Response headers are in
14707// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
14708// (if a response was returned at all) in
14709// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14710// whether the returned error was because http.StatusNotModified was
14711// returned.
14712func (c *ProjectsAgentIntentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
14713	gensupport.SetOptions(c.urlParams_, opts...)
14714	res, err := c.doRequest("json")
14715	if res != nil && res.StatusCode == http.StatusNotModified {
14716		if res.Body != nil {
14717			res.Body.Close()
14718		}
14719		return nil, &googleapi.Error{
14720			Code:   res.StatusCode,
14721			Header: res.Header,
14722		}
14723	}
14724	if err != nil {
14725		return nil, err
14726	}
14727	defer googleapi.CloseBody(res)
14728	if err := googleapi.CheckResponse(res); err != nil {
14729		return nil, err
14730	}
14731	ret := &GoogleCloudDialogflowV2beta1Intent{
14732		ServerResponse: googleapi.ServerResponse{
14733			Header:         res.Header,
14734			HTTPStatusCode: res.StatusCode,
14735		},
14736	}
14737	target := &ret
14738	if err := gensupport.DecodeResponse(target, res); err != nil {
14739		return nil, err
14740	}
14741	return ret, nil
14742	// {
14743	//   "description": "Creates an intent in the specified agent.",
14744	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents",
14745	//   "httpMethod": "POST",
14746	//   "id": "dialogflow.projects.agent.intents.create",
14747	//   "parameterOrder": [
14748	//     "parent"
14749	//   ],
14750	//   "parameters": {
14751	//     "intentView": {
14752	//       "description": "Optional. The resource view to apply to the returned intent.",
14753	//       "enum": [
14754	//         "INTENT_VIEW_UNSPECIFIED",
14755	//         "INTENT_VIEW_FULL"
14756	//       ],
14757	//       "location": "query",
14758	//       "type": "string"
14759	//     },
14760	//     "languageCode": {
14761	//       "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.",
14762	//       "location": "query",
14763	//       "type": "string"
14764	//     },
14765	//     "parent": {
14766	//       "description": "Required. The agent to create a intent for.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
14767	//       "location": "path",
14768	//       "pattern": "^projects/[^/]+/agent$",
14769	//       "required": true,
14770	//       "type": "string"
14771	//     }
14772	//   },
14773	//   "path": "v2beta1/{+parent}/intents",
14774	//   "request": {
14775	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
14776	//   },
14777	//   "response": {
14778	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
14779	//   },
14780	//   "scopes": [
14781	//     "https://www.googleapis.com/auth/cloud-platform",
14782	//     "https://www.googleapis.com/auth/dialogflow"
14783	//   ]
14784	// }
14785
14786}
14787
14788// method id "dialogflow.projects.agent.intents.delete":
14789
14790type ProjectsAgentIntentsDeleteCall struct {
14791	s          *Service
14792	name       string
14793	urlParams_ gensupport.URLParams
14794	ctx_       context.Context
14795	header_    http.Header
14796}
14797
14798// Delete: Deletes the specified intent and its direct or indirect
14799// followup intents.
14800func (r *ProjectsAgentIntentsService) Delete(name string) *ProjectsAgentIntentsDeleteCall {
14801	c := &ProjectsAgentIntentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14802	c.name = name
14803	return c
14804}
14805
14806// Fields allows partial responses to be retrieved. See
14807// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14808// for more information.
14809func (c *ProjectsAgentIntentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsDeleteCall {
14810	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14811	return c
14812}
14813
14814// Context sets the context to be used in this call's Do method. Any
14815// pending HTTP request will be aborted if the provided context is
14816// canceled.
14817func (c *ProjectsAgentIntentsDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsDeleteCall {
14818	c.ctx_ = ctx
14819	return c
14820}
14821
14822// Header returns an http.Header that can be modified by the caller to
14823// add HTTP headers to the request.
14824func (c *ProjectsAgentIntentsDeleteCall) Header() http.Header {
14825	if c.header_ == nil {
14826		c.header_ = make(http.Header)
14827	}
14828	return c.header_
14829}
14830
14831func (c *ProjectsAgentIntentsDeleteCall) doRequest(alt string) (*http.Response, error) {
14832	reqHeaders := make(http.Header)
14833	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
14834	for k, v := range c.header_ {
14835		reqHeaders[k] = v
14836	}
14837	reqHeaders.Set("User-Agent", c.s.userAgent())
14838	var body io.Reader = nil
14839	c.urlParams_.Set("alt", alt)
14840	c.urlParams_.Set("prettyPrint", "false")
14841	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14842	urls += "?" + c.urlParams_.Encode()
14843	req, err := http.NewRequest("DELETE", urls, body)
14844	if err != nil {
14845		return nil, err
14846	}
14847	req.Header = reqHeaders
14848	googleapi.Expand(req.URL, map[string]string{
14849		"name": c.name,
14850	})
14851	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14852}
14853
14854// Do executes the "dialogflow.projects.agent.intents.delete" call.
14855// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
14856// non-2xx status code is an error. Response headers are in either
14857// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
14858// returned at all) in error.(*googleapi.Error).Header. Use
14859// googleapi.IsNotModified to check whether the returned error was
14860// because http.StatusNotModified was returned.
14861func (c *ProjectsAgentIntentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
14862	gensupport.SetOptions(c.urlParams_, opts...)
14863	res, err := c.doRequest("json")
14864	if res != nil && res.StatusCode == http.StatusNotModified {
14865		if res.Body != nil {
14866			res.Body.Close()
14867		}
14868		return nil, &googleapi.Error{
14869			Code:   res.StatusCode,
14870			Header: res.Header,
14871		}
14872	}
14873	if err != nil {
14874		return nil, err
14875	}
14876	defer googleapi.CloseBody(res)
14877	if err := googleapi.CheckResponse(res); err != nil {
14878		return nil, err
14879	}
14880	ret := &GoogleProtobufEmpty{
14881		ServerResponse: googleapi.ServerResponse{
14882			Header:         res.Header,
14883			HTTPStatusCode: res.StatusCode,
14884		},
14885	}
14886	target := &ret
14887	if err := gensupport.DecodeResponse(target, res); err != nil {
14888		return nil, err
14889	}
14890	return ret, nil
14891	// {
14892	//   "description": "Deletes the specified intent and its direct or indirect followup intents.",
14893	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents/{intentsId}",
14894	//   "httpMethod": "DELETE",
14895	//   "id": "dialogflow.projects.agent.intents.delete",
14896	//   "parameterOrder": [
14897	//     "name"
14898	//   ],
14899	//   "parameters": {
14900	//     "name": {
14901	//       "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`.",
14902	//       "location": "path",
14903	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
14904	//       "required": true,
14905	//       "type": "string"
14906	//     }
14907	//   },
14908	//   "path": "v2beta1/{+name}",
14909	//   "response": {
14910	//     "$ref": "GoogleProtobufEmpty"
14911	//   },
14912	//   "scopes": [
14913	//     "https://www.googleapis.com/auth/cloud-platform",
14914	//     "https://www.googleapis.com/auth/dialogflow"
14915	//   ]
14916	// }
14917
14918}
14919
14920// method id "dialogflow.projects.agent.intents.get":
14921
14922type ProjectsAgentIntentsGetCall struct {
14923	s            *Service
14924	name         string
14925	urlParams_   gensupport.URLParams
14926	ifNoneMatch_ string
14927	ctx_         context.Context
14928	header_      http.Header
14929}
14930
14931// Get: Retrieves the specified intent.
14932func (r *ProjectsAgentIntentsService) Get(name string) *ProjectsAgentIntentsGetCall {
14933	c := &ProjectsAgentIntentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14934	c.name = name
14935	return c
14936}
14937
14938// IntentView sets the optional parameter "intentView": The resource
14939// view to apply to the returned intent.
14940//
14941// Possible values:
14942//   "INTENT_VIEW_UNSPECIFIED"
14943//   "INTENT_VIEW_FULL"
14944func (c *ProjectsAgentIntentsGetCall) IntentView(intentView string) *ProjectsAgentIntentsGetCall {
14945	c.urlParams_.Set("intentView", intentView)
14946	return c
14947}
14948
14949// LanguageCode sets the optional parameter "languageCode": The language
14950// to retrieve training phrases, parameters and rich
14951// messages for. If not specified, the agent's default language is
14952// used.
14953// [Many
14954// languages](https://cloud.google.com/dialogflow/docs/refere
14955// nce/language)
14956// are supported. Note: languages must be enabled in the agent before
14957// they can
14958// be used.
14959func (c *ProjectsAgentIntentsGetCall) LanguageCode(languageCode string) *ProjectsAgentIntentsGetCall {
14960	c.urlParams_.Set("languageCode", languageCode)
14961	return c
14962}
14963
14964// Fields allows partial responses to be retrieved. See
14965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14966// for more information.
14967func (c *ProjectsAgentIntentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsGetCall {
14968	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14969	return c
14970}
14971
14972// IfNoneMatch sets the optional parameter which makes the operation
14973// fail if the object's ETag matches the given value. This is useful for
14974// getting updates only after the object has changed since the last
14975// request. Use googleapi.IsNotModified to check whether the response
14976// error from Do is the result of In-None-Match.
14977func (c *ProjectsAgentIntentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsGetCall {
14978	c.ifNoneMatch_ = entityTag
14979	return c
14980}
14981
14982// Context sets the context to be used in this call's Do method. Any
14983// pending HTTP request will be aborted if the provided context is
14984// canceled.
14985func (c *ProjectsAgentIntentsGetCall) Context(ctx context.Context) *ProjectsAgentIntentsGetCall {
14986	c.ctx_ = ctx
14987	return c
14988}
14989
14990// Header returns an http.Header that can be modified by the caller to
14991// add HTTP headers to the request.
14992func (c *ProjectsAgentIntentsGetCall) Header() http.Header {
14993	if c.header_ == nil {
14994		c.header_ = make(http.Header)
14995	}
14996	return c.header_
14997}
14998
14999func (c *ProjectsAgentIntentsGetCall) doRequest(alt string) (*http.Response, error) {
15000	reqHeaders := make(http.Header)
15001	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15002	for k, v := range c.header_ {
15003		reqHeaders[k] = v
15004	}
15005	reqHeaders.Set("User-Agent", c.s.userAgent())
15006	if c.ifNoneMatch_ != "" {
15007		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15008	}
15009	var body io.Reader = nil
15010	c.urlParams_.Set("alt", alt)
15011	c.urlParams_.Set("prettyPrint", "false")
15012	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15013	urls += "?" + c.urlParams_.Encode()
15014	req, err := http.NewRequest("GET", urls, body)
15015	if err != nil {
15016		return nil, err
15017	}
15018	req.Header = reqHeaders
15019	googleapi.Expand(req.URL, map[string]string{
15020		"name": c.name,
15021	})
15022	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15023}
15024
15025// Do executes the "dialogflow.projects.agent.intents.get" call.
15026// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
15027// non-nil. Any non-2xx status code is an error. Response headers are in
15028// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
15029// (if a response was returned at all) in
15030// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15031// whether the returned error was because http.StatusNotModified was
15032// returned.
15033func (c *ProjectsAgentIntentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
15034	gensupport.SetOptions(c.urlParams_, opts...)
15035	res, err := c.doRequest("json")
15036	if res != nil && res.StatusCode == http.StatusNotModified {
15037		if res.Body != nil {
15038			res.Body.Close()
15039		}
15040		return nil, &googleapi.Error{
15041			Code:   res.StatusCode,
15042			Header: res.Header,
15043		}
15044	}
15045	if err != nil {
15046		return nil, err
15047	}
15048	defer googleapi.CloseBody(res)
15049	if err := googleapi.CheckResponse(res); err != nil {
15050		return nil, err
15051	}
15052	ret := &GoogleCloudDialogflowV2beta1Intent{
15053		ServerResponse: googleapi.ServerResponse{
15054			Header:         res.Header,
15055			HTTPStatusCode: res.StatusCode,
15056		},
15057	}
15058	target := &ret
15059	if err := gensupport.DecodeResponse(target, res); err != nil {
15060		return nil, err
15061	}
15062	return ret, nil
15063	// {
15064	//   "description": "Retrieves the specified intent.",
15065	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents/{intentsId}",
15066	//   "httpMethod": "GET",
15067	//   "id": "dialogflow.projects.agent.intents.get",
15068	//   "parameterOrder": [
15069	//     "name"
15070	//   ],
15071	//   "parameters": {
15072	//     "intentView": {
15073	//       "description": "Optional. The resource view to apply to the returned intent.",
15074	//       "enum": [
15075	//         "INTENT_VIEW_UNSPECIFIED",
15076	//         "INTENT_VIEW_FULL"
15077	//       ],
15078	//       "location": "query",
15079	//       "type": "string"
15080	//     },
15081	//     "languageCode": {
15082	//       "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.",
15083	//       "location": "query",
15084	//       "type": "string"
15085	//     },
15086	//     "name": {
15087	//       "description": "Required. The name of the intent.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.",
15088	//       "location": "path",
15089	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
15090	//       "required": true,
15091	//       "type": "string"
15092	//     }
15093	//   },
15094	//   "path": "v2beta1/{+name}",
15095	//   "response": {
15096	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
15097	//   },
15098	//   "scopes": [
15099	//     "https://www.googleapis.com/auth/cloud-platform",
15100	//     "https://www.googleapis.com/auth/dialogflow"
15101	//   ]
15102	// }
15103
15104}
15105
15106// method id "dialogflow.projects.agent.intents.list":
15107
15108type ProjectsAgentIntentsListCall struct {
15109	s            *Service
15110	parent       string
15111	urlParams_   gensupport.URLParams
15112	ifNoneMatch_ string
15113	ctx_         context.Context
15114	header_      http.Header
15115}
15116
15117// List: Returns the list of all intents in the specified agent.
15118func (r *ProjectsAgentIntentsService) List(parent string) *ProjectsAgentIntentsListCall {
15119	c := &ProjectsAgentIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15120	c.parent = parent
15121	return c
15122}
15123
15124// IntentView sets the optional parameter "intentView": The resource
15125// view to apply to the returned intent.
15126//
15127// Possible values:
15128//   "INTENT_VIEW_UNSPECIFIED"
15129//   "INTENT_VIEW_FULL"
15130func (c *ProjectsAgentIntentsListCall) IntentView(intentView string) *ProjectsAgentIntentsListCall {
15131	c.urlParams_.Set("intentView", intentView)
15132	return c
15133}
15134
15135// LanguageCode sets the optional parameter "languageCode": The language
15136// to list training phrases, parameters and rich
15137// messages for. If not specified, the agent's default language is
15138// used.
15139// [Many
15140// languages](https://cloud.google.com/dialogflow/docs/refere
15141// nce/language)
15142// are supported. Note: languages must be enabled in the agent before
15143// they can
15144// be used.
15145func (c *ProjectsAgentIntentsListCall) LanguageCode(languageCode string) *ProjectsAgentIntentsListCall {
15146	c.urlParams_.Set("languageCode", languageCode)
15147	return c
15148}
15149
15150// PageSize sets the optional parameter "pageSize": The maximum number
15151// of items to return in a single page. By
15152// default 100 and at most 1000.
15153func (c *ProjectsAgentIntentsListCall) PageSize(pageSize int64) *ProjectsAgentIntentsListCall {
15154	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15155	return c
15156}
15157
15158// PageToken sets the optional parameter "pageToken": The
15159// next_page_token value returned from a previous list request.
15160func (c *ProjectsAgentIntentsListCall) PageToken(pageToken string) *ProjectsAgentIntentsListCall {
15161	c.urlParams_.Set("pageToken", pageToken)
15162	return c
15163}
15164
15165// Fields allows partial responses to be retrieved. See
15166// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15167// for more information.
15168func (c *ProjectsAgentIntentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsListCall {
15169	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15170	return c
15171}
15172
15173// IfNoneMatch sets the optional parameter which makes the operation
15174// fail if the object's ETag matches the given value. This is useful for
15175// getting updates only after the object has changed since the last
15176// request. Use googleapi.IsNotModified to check whether the response
15177// error from Do is the result of In-None-Match.
15178func (c *ProjectsAgentIntentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsListCall {
15179	c.ifNoneMatch_ = entityTag
15180	return c
15181}
15182
15183// Context sets the context to be used in this call's Do method. Any
15184// pending HTTP request will be aborted if the provided context is
15185// canceled.
15186func (c *ProjectsAgentIntentsListCall) Context(ctx context.Context) *ProjectsAgentIntentsListCall {
15187	c.ctx_ = ctx
15188	return c
15189}
15190
15191// Header returns an http.Header that can be modified by the caller to
15192// add HTTP headers to the request.
15193func (c *ProjectsAgentIntentsListCall) Header() http.Header {
15194	if c.header_ == nil {
15195		c.header_ = make(http.Header)
15196	}
15197	return c.header_
15198}
15199
15200func (c *ProjectsAgentIntentsListCall) doRequest(alt string) (*http.Response, error) {
15201	reqHeaders := make(http.Header)
15202	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15203	for k, v := range c.header_ {
15204		reqHeaders[k] = v
15205	}
15206	reqHeaders.Set("User-Agent", c.s.userAgent())
15207	if c.ifNoneMatch_ != "" {
15208		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15209	}
15210	var body io.Reader = nil
15211	c.urlParams_.Set("alt", alt)
15212	c.urlParams_.Set("prettyPrint", "false")
15213	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents")
15214	urls += "?" + c.urlParams_.Encode()
15215	req, err := http.NewRequest("GET", urls, body)
15216	if err != nil {
15217		return nil, err
15218	}
15219	req.Header = reqHeaders
15220	googleapi.Expand(req.URL, map[string]string{
15221		"parent": c.parent,
15222	})
15223	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15224}
15225
15226// Do executes the "dialogflow.projects.agent.intents.list" call.
15227// Exactly one of *GoogleCloudDialogflowV2beta1ListIntentsResponse or
15228// error will be non-nil. Any non-2xx status code is an error. Response
15229// headers are in either
15230// *GoogleCloudDialogflowV2beta1ListIntentsResponse.ServerResponse.Header
15231//  or (if a response was returned at all) in
15232// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15233// whether the returned error was because http.StatusNotModified was
15234// returned.
15235func (c *ProjectsAgentIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListIntentsResponse, error) {
15236	gensupport.SetOptions(c.urlParams_, opts...)
15237	res, err := c.doRequest("json")
15238	if res != nil && res.StatusCode == http.StatusNotModified {
15239		if res.Body != nil {
15240			res.Body.Close()
15241		}
15242		return nil, &googleapi.Error{
15243			Code:   res.StatusCode,
15244			Header: res.Header,
15245		}
15246	}
15247	if err != nil {
15248		return nil, err
15249	}
15250	defer googleapi.CloseBody(res)
15251	if err := googleapi.CheckResponse(res); err != nil {
15252		return nil, err
15253	}
15254	ret := &GoogleCloudDialogflowV2beta1ListIntentsResponse{
15255		ServerResponse: googleapi.ServerResponse{
15256			Header:         res.Header,
15257			HTTPStatusCode: res.StatusCode,
15258		},
15259	}
15260	target := &ret
15261	if err := gensupport.DecodeResponse(target, res); err != nil {
15262		return nil, err
15263	}
15264	return ret, nil
15265	// {
15266	//   "description": "Returns the list of all intents in the specified agent.",
15267	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents",
15268	//   "httpMethod": "GET",
15269	//   "id": "dialogflow.projects.agent.intents.list",
15270	//   "parameterOrder": [
15271	//     "parent"
15272	//   ],
15273	//   "parameters": {
15274	//     "intentView": {
15275	//       "description": "Optional. The resource view to apply to the returned intent.",
15276	//       "enum": [
15277	//         "INTENT_VIEW_UNSPECIFIED",
15278	//         "INTENT_VIEW_FULL"
15279	//       ],
15280	//       "location": "query",
15281	//       "type": "string"
15282	//     },
15283	//     "languageCode": {
15284	//       "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.",
15285	//       "location": "query",
15286	//       "type": "string"
15287	//     },
15288	//     "pageSize": {
15289	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
15290	//       "format": "int32",
15291	//       "location": "query",
15292	//       "type": "integer"
15293	//     },
15294	//     "pageToken": {
15295	//       "description": "Optional. The next_page_token value returned from a previous list request.",
15296	//       "location": "query",
15297	//       "type": "string"
15298	//     },
15299	//     "parent": {
15300	//       "description": "Required. The agent to list all intents from.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
15301	//       "location": "path",
15302	//       "pattern": "^projects/[^/]+/agent$",
15303	//       "required": true,
15304	//       "type": "string"
15305	//     }
15306	//   },
15307	//   "path": "v2beta1/{+parent}/intents",
15308	//   "response": {
15309	//     "$ref": "GoogleCloudDialogflowV2beta1ListIntentsResponse"
15310	//   },
15311	//   "scopes": [
15312	//     "https://www.googleapis.com/auth/cloud-platform",
15313	//     "https://www.googleapis.com/auth/dialogflow"
15314	//   ]
15315	// }
15316
15317}
15318
15319// Pages invokes f for each page of results.
15320// A non-nil error returned from f will halt the iteration.
15321// The provided context supersedes any context provided to the Context method.
15322func (c *ProjectsAgentIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListIntentsResponse) error) error {
15323	c.ctx_ = ctx
15324	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15325	for {
15326		x, err := c.Do()
15327		if err != nil {
15328			return err
15329		}
15330		if err := f(x); err != nil {
15331			return err
15332		}
15333		if x.NextPageToken == "" {
15334			return nil
15335		}
15336		c.PageToken(x.NextPageToken)
15337	}
15338}
15339
15340// method id "dialogflow.projects.agent.intents.patch":
15341
15342type ProjectsAgentIntentsPatchCall struct {
15343	s                                  *Service
15344	nameid                             string
15345	googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent
15346	urlParams_                         gensupport.URLParams
15347	ctx_                               context.Context
15348	header_                            http.Header
15349}
15350
15351// Patch: Updates the specified intent.
15352func (r *ProjectsAgentIntentsService) Patch(nameid string, googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent) *ProjectsAgentIntentsPatchCall {
15353	c := &ProjectsAgentIntentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15354	c.nameid = nameid
15355	c.googleclouddialogflowv2beta1intent = googleclouddialogflowv2beta1intent
15356	return c
15357}
15358
15359// IntentView sets the optional parameter "intentView": The resource
15360// view to apply to the returned intent.
15361//
15362// Possible values:
15363//   "INTENT_VIEW_UNSPECIFIED"
15364//   "INTENT_VIEW_FULL"
15365func (c *ProjectsAgentIntentsPatchCall) IntentView(intentView string) *ProjectsAgentIntentsPatchCall {
15366	c.urlParams_.Set("intentView", intentView)
15367	return c
15368}
15369
15370// LanguageCode sets the optional parameter "languageCode": The language
15371// of training phrases, parameters and rich messages
15372// defined in `intent`. If not specified, the agent's default language
15373// is
15374// used.
15375// [Many
15376// languages](https://cloud.google.com/dialogflow/docs/reference/la
15377// nguage)
15378// are supported. Note: languages must be enabled in the agent before
15379// they can
15380// be used.
15381func (c *ProjectsAgentIntentsPatchCall) LanguageCode(languageCode string) *ProjectsAgentIntentsPatchCall {
15382	c.urlParams_.Set("languageCode", languageCode)
15383	return c
15384}
15385
15386// UpdateMask sets the optional parameter "updateMask": The mask to
15387// control which fields get updated.
15388func (c *ProjectsAgentIntentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentIntentsPatchCall {
15389	c.urlParams_.Set("updateMask", updateMask)
15390	return c
15391}
15392
15393// Fields allows partial responses to be retrieved. See
15394// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15395// for more information.
15396func (c *ProjectsAgentIntentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsPatchCall {
15397	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15398	return c
15399}
15400
15401// Context sets the context to be used in this call's Do method. Any
15402// pending HTTP request will be aborted if the provided context is
15403// canceled.
15404func (c *ProjectsAgentIntentsPatchCall) Context(ctx context.Context) *ProjectsAgentIntentsPatchCall {
15405	c.ctx_ = ctx
15406	return c
15407}
15408
15409// Header returns an http.Header that can be modified by the caller to
15410// add HTTP headers to the request.
15411func (c *ProjectsAgentIntentsPatchCall) Header() http.Header {
15412	if c.header_ == nil {
15413		c.header_ = make(http.Header)
15414	}
15415	return c.header_
15416}
15417
15418func (c *ProjectsAgentIntentsPatchCall) doRequest(alt string) (*http.Response, error) {
15419	reqHeaders := make(http.Header)
15420	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15421	for k, v := range c.header_ {
15422		reqHeaders[k] = v
15423	}
15424	reqHeaders.Set("User-Agent", c.s.userAgent())
15425	var body io.Reader = nil
15426	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1intent)
15427	if err != nil {
15428		return nil, err
15429	}
15430	reqHeaders.Set("Content-Type", "application/json")
15431	c.urlParams_.Set("alt", alt)
15432	c.urlParams_.Set("prettyPrint", "false")
15433	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15434	urls += "?" + c.urlParams_.Encode()
15435	req, err := http.NewRequest("PATCH", urls, body)
15436	if err != nil {
15437		return nil, err
15438	}
15439	req.Header = reqHeaders
15440	googleapi.Expand(req.URL, map[string]string{
15441		"name": c.nameid,
15442	})
15443	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15444}
15445
15446// Do executes the "dialogflow.projects.agent.intents.patch" call.
15447// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
15448// non-nil. Any non-2xx status code is an error. Response headers are in
15449// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
15450// (if a response was returned at all) in
15451// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15452// whether the returned error was because http.StatusNotModified was
15453// returned.
15454func (c *ProjectsAgentIntentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
15455	gensupport.SetOptions(c.urlParams_, opts...)
15456	res, err := c.doRequest("json")
15457	if res != nil && res.StatusCode == http.StatusNotModified {
15458		if res.Body != nil {
15459			res.Body.Close()
15460		}
15461		return nil, &googleapi.Error{
15462			Code:   res.StatusCode,
15463			Header: res.Header,
15464		}
15465	}
15466	if err != nil {
15467		return nil, err
15468	}
15469	defer googleapi.CloseBody(res)
15470	if err := googleapi.CheckResponse(res); err != nil {
15471		return nil, err
15472	}
15473	ret := &GoogleCloudDialogflowV2beta1Intent{
15474		ServerResponse: googleapi.ServerResponse{
15475			Header:         res.Header,
15476			HTTPStatusCode: res.StatusCode,
15477		},
15478	}
15479	target := &ret
15480	if err := gensupport.DecodeResponse(target, res); err != nil {
15481		return nil, err
15482	}
15483	return ret, nil
15484	// {
15485	//   "description": "Updates the specified intent.",
15486	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents/{intentsId}",
15487	//   "httpMethod": "PATCH",
15488	//   "id": "dialogflow.projects.agent.intents.patch",
15489	//   "parameterOrder": [
15490	//     "name"
15491	//   ],
15492	//   "parameters": {
15493	//     "intentView": {
15494	//       "description": "Optional. The resource view to apply to the returned intent.",
15495	//       "enum": [
15496	//         "INTENT_VIEW_UNSPECIFIED",
15497	//         "INTENT_VIEW_FULL"
15498	//       ],
15499	//       "location": "query",
15500	//       "type": "string"
15501	//     },
15502	//     "languageCode": {
15503	//       "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.",
15504	//       "location": "query",
15505	//       "type": "string"
15506	//     },
15507	//     "name": {
15508	//       "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`.",
15509	//       "location": "path",
15510	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
15511	//       "required": true,
15512	//       "type": "string"
15513	//     },
15514	//     "updateMask": {
15515	//       "description": "Optional. The mask to control which fields get updated.",
15516	//       "format": "google-fieldmask",
15517	//       "location": "query",
15518	//       "type": "string"
15519	//     }
15520	//   },
15521	//   "path": "v2beta1/{+name}",
15522	//   "request": {
15523	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
15524	//   },
15525	//   "response": {
15526	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
15527	//   },
15528	//   "scopes": [
15529	//     "https://www.googleapis.com/auth/cloud-platform",
15530	//     "https://www.googleapis.com/auth/dialogflow"
15531	//   ]
15532	// }
15533
15534}
15535
15536// method id "dialogflow.projects.agent.knowledgeBases.create":
15537
15538type ProjectsAgentKnowledgeBasesCreateCall struct {
15539	s                                         *Service
15540	parent                                    string
15541	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
15542	urlParams_                                gensupport.URLParams
15543	ctx_                                      context.Context
15544	header_                                   http.Header
15545}
15546
15547// Create: Creates a knowledge base.
15548//
15549// Note: The `projects.agent.knowledgeBases` resource is
15550// deprecated;
15551// only use `projects.knowledgeBases`.
15552func (r *ProjectsAgentKnowledgeBasesService) Create(parent string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsAgentKnowledgeBasesCreateCall {
15553	c := &ProjectsAgentKnowledgeBasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15554	c.parent = parent
15555	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
15556	return c
15557}
15558
15559// Fields allows partial responses to be retrieved. See
15560// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15561// for more information.
15562func (c *ProjectsAgentKnowledgeBasesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesCreateCall {
15563	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15564	return c
15565}
15566
15567// Context sets the context to be used in this call's Do method. Any
15568// pending HTTP request will be aborted if the provided context is
15569// canceled.
15570func (c *ProjectsAgentKnowledgeBasesCreateCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesCreateCall {
15571	c.ctx_ = ctx
15572	return c
15573}
15574
15575// Header returns an http.Header that can be modified by the caller to
15576// add HTTP headers to the request.
15577func (c *ProjectsAgentKnowledgeBasesCreateCall) Header() http.Header {
15578	if c.header_ == nil {
15579		c.header_ = make(http.Header)
15580	}
15581	return c.header_
15582}
15583
15584func (c *ProjectsAgentKnowledgeBasesCreateCall) doRequest(alt string) (*http.Response, error) {
15585	reqHeaders := make(http.Header)
15586	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15587	for k, v := range c.header_ {
15588		reqHeaders[k] = v
15589	}
15590	reqHeaders.Set("User-Agent", c.s.userAgent())
15591	var body io.Reader = nil
15592	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
15593	if err != nil {
15594		return nil, err
15595	}
15596	reqHeaders.Set("Content-Type", "application/json")
15597	c.urlParams_.Set("alt", alt)
15598	c.urlParams_.Set("prettyPrint", "false")
15599	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
15600	urls += "?" + c.urlParams_.Encode()
15601	req, err := http.NewRequest("POST", urls, body)
15602	if err != nil {
15603		return nil, err
15604	}
15605	req.Header = reqHeaders
15606	googleapi.Expand(req.URL, map[string]string{
15607		"parent": c.parent,
15608	})
15609	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15610}
15611
15612// Do executes the "dialogflow.projects.agent.knowledgeBases.create" call.
15613// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
15614// will be non-nil. Any non-2xx status code is an error. Response
15615// headers are in either
15616// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
15617// (if a response was returned at all) in
15618// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15619// whether the returned error was because http.StatusNotModified was
15620// returned.
15621func (c *ProjectsAgentKnowledgeBasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
15622	gensupport.SetOptions(c.urlParams_, opts...)
15623	res, err := c.doRequest("json")
15624	if res != nil && res.StatusCode == http.StatusNotModified {
15625		if res.Body != nil {
15626			res.Body.Close()
15627		}
15628		return nil, &googleapi.Error{
15629			Code:   res.StatusCode,
15630			Header: res.Header,
15631		}
15632	}
15633	if err != nil {
15634		return nil, err
15635	}
15636	defer googleapi.CloseBody(res)
15637	if err := googleapi.CheckResponse(res); err != nil {
15638		return nil, err
15639	}
15640	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
15641		ServerResponse: googleapi.ServerResponse{
15642			Header:         res.Header,
15643			HTTPStatusCode: res.StatusCode,
15644		},
15645	}
15646	target := &ret
15647	if err := gensupport.DecodeResponse(target, res); err != nil {
15648		return nil, err
15649	}
15650	return ret, nil
15651	// {
15652	//   "description": "Creates a knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
15653	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases",
15654	//   "httpMethod": "POST",
15655	//   "id": "dialogflow.projects.agent.knowledgeBases.create",
15656	//   "parameterOrder": [
15657	//     "parent"
15658	//   ],
15659	//   "parameters": {
15660	//     "parent": {
15661	//       "description": "Required. The project to create a knowledge base for.\nFormat: `projects/\u003cProject ID\u003e`.",
15662	//       "location": "path",
15663	//       "pattern": "^projects/[^/]+/agent$",
15664	//       "required": true,
15665	//       "type": "string"
15666	//     }
15667	//   },
15668	//   "path": "v2beta1/{+parent}/knowledgeBases",
15669	//   "request": {
15670	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
15671	//   },
15672	//   "response": {
15673	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
15674	//   },
15675	//   "scopes": [
15676	//     "https://www.googleapis.com/auth/cloud-platform",
15677	//     "https://www.googleapis.com/auth/dialogflow"
15678	//   ]
15679	// }
15680
15681}
15682
15683// method id "dialogflow.projects.agent.knowledgeBases.delete":
15684
15685type ProjectsAgentKnowledgeBasesDeleteCall struct {
15686	s          *Service
15687	name       string
15688	urlParams_ gensupport.URLParams
15689	ctx_       context.Context
15690	header_    http.Header
15691}
15692
15693// Delete: Deletes the specified knowledge base.
15694//
15695// Note: The `projects.agent.knowledgeBases` resource is
15696// deprecated;
15697// only use `projects.knowledgeBases`.
15698func (r *ProjectsAgentKnowledgeBasesService) Delete(name string) *ProjectsAgentKnowledgeBasesDeleteCall {
15699	c := &ProjectsAgentKnowledgeBasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15700	c.name = name
15701	return c
15702}
15703
15704// Force sets the optional parameter "force": Force deletes the
15705// knowledge base. When set to true, any documents
15706// in the knowledge base are also deleted.
15707func (c *ProjectsAgentKnowledgeBasesDeleteCall) Force(force bool) *ProjectsAgentKnowledgeBasesDeleteCall {
15708	c.urlParams_.Set("force", fmt.Sprint(force))
15709	return c
15710}
15711
15712// Fields allows partial responses to be retrieved. See
15713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15714// for more information.
15715func (c *ProjectsAgentKnowledgeBasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDeleteCall {
15716	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15717	return c
15718}
15719
15720// Context sets the context to be used in this call's Do method. Any
15721// pending HTTP request will be aborted if the provided context is
15722// canceled.
15723func (c *ProjectsAgentKnowledgeBasesDeleteCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDeleteCall {
15724	c.ctx_ = ctx
15725	return c
15726}
15727
15728// Header returns an http.Header that can be modified by the caller to
15729// add HTTP headers to the request.
15730func (c *ProjectsAgentKnowledgeBasesDeleteCall) Header() http.Header {
15731	if c.header_ == nil {
15732		c.header_ = make(http.Header)
15733	}
15734	return c.header_
15735}
15736
15737func (c *ProjectsAgentKnowledgeBasesDeleteCall) doRequest(alt string) (*http.Response, error) {
15738	reqHeaders := make(http.Header)
15739	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15740	for k, v := range c.header_ {
15741		reqHeaders[k] = v
15742	}
15743	reqHeaders.Set("User-Agent", c.s.userAgent())
15744	var body io.Reader = nil
15745	c.urlParams_.Set("alt", alt)
15746	c.urlParams_.Set("prettyPrint", "false")
15747	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15748	urls += "?" + c.urlParams_.Encode()
15749	req, err := http.NewRequest("DELETE", urls, body)
15750	if err != nil {
15751		return nil, err
15752	}
15753	req.Header = reqHeaders
15754	googleapi.Expand(req.URL, map[string]string{
15755		"name": c.name,
15756	})
15757	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15758}
15759
15760// Do executes the "dialogflow.projects.agent.knowledgeBases.delete" call.
15761// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
15762// non-2xx status code is an error. Response headers are in either
15763// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
15764// returned at all) in error.(*googleapi.Error).Header. Use
15765// googleapi.IsNotModified to check whether the returned error was
15766// because http.StatusNotModified was returned.
15767func (c *ProjectsAgentKnowledgeBasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
15768	gensupport.SetOptions(c.urlParams_, opts...)
15769	res, err := c.doRequest("json")
15770	if res != nil && res.StatusCode == http.StatusNotModified {
15771		if res.Body != nil {
15772			res.Body.Close()
15773		}
15774		return nil, &googleapi.Error{
15775			Code:   res.StatusCode,
15776			Header: res.Header,
15777		}
15778	}
15779	if err != nil {
15780		return nil, err
15781	}
15782	defer googleapi.CloseBody(res)
15783	if err := googleapi.CheckResponse(res); err != nil {
15784		return nil, err
15785	}
15786	ret := &GoogleProtobufEmpty{
15787		ServerResponse: googleapi.ServerResponse{
15788			Header:         res.Header,
15789			HTTPStatusCode: res.StatusCode,
15790		},
15791	}
15792	target := &ret
15793	if err := gensupport.DecodeResponse(target, res); err != nil {
15794		return nil, err
15795	}
15796	return ret, nil
15797	// {
15798	//   "description": "Deletes the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
15799	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
15800	//   "httpMethod": "DELETE",
15801	//   "id": "dialogflow.projects.agent.knowledgeBases.delete",
15802	//   "parameterOrder": [
15803	//     "name"
15804	//   ],
15805	//   "parameters": {
15806	//     "force": {
15807	//       "description": "Optional. Force deletes the knowledge base. When set to true, any documents\nin the knowledge base are also deleted.",
15808	//       "location": "query",
15809	//       "type": "boolean"
15810	//     },
15811	//     "name": {
15812	//       "description": "Required. The name of the knowledge base to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
15813	//       "location": "path",
15814	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
15815	//       "required": true,
15816	//       "type": "string"
15817	//     }
15818	//   },
15819	//   "path": "v2beta1/{+name}",
15820	//   "response": {
15821	//     "$ref": "GoogleProtobufEmpty"
15822	//   },
15823	//   "scopes": [
15824	//     "https://www.googleapis.com/auth/cloud-platform",
15825	//     "https://www.googleapis.com/auth/dialogflow"
15826	//   ]
15827	// }
15828
15829}
15830
15831// method id "dialogflow.projects.agent.knowledgeBases.get":
15832
15833type ProjectsAgentKnowledgeBasesGetCall struct {
15834	s            *Service
15835	name         string
15836	urlParams_   gensupport.URLParams
15837	ifNoneMatch_ string
15838	ctx_         context.Context
15839	header_      http.Header
15840}
15841
15842// Get: Retrieves the specified knowledge base.
15843//
15844// Note: The `projects.agent.knowledgeBases` resource is
15845// deprecated;
15846// only use `projects.knowledgeBases`.
15847func (r *ProjectsAgentKnowledgeBasesService) Get(name string) *ProjectsAgentKnowledgeBasesGetCall {
15848	c := &ProjectsAgentKnowledgeBasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15849	c.name = name
15850	return c
15851}
15852
15853// Fields allows partial responses to be retrieved. See
15854// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15855// for more information.
15856func (c *ProjectsAgentKnowledgeBasesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesGetCall {
15857	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15858	return c
15859}
15860
15861// IfNoneMatch sets the optional parameter which makes the operation
15862// fail if the object's ETag matches the given value. This is useful for
15863// getting updates only after the object has changed since the last
15864// request. Use googleapi.IsNotModified to check whether the response
15865// error from Do is the result of In-None-Match.
15866func (c *ProjectsAgentKnowledgeBasesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesGetCall {
15867	c.ifNoneMatch_ = entityTag
15868	return c
15869}
15870
15871// Context sets the context to be used in this call's Do method. Any
15872// pending HTTP request will be aborted if the provided context is
15873// canceled.
15874func (c *ProjectsAgentKnowledgeBasesGetCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesGetCall {
15875	c.ctx_ = ctx
15876	return c
15877}
15878
15879// Header returns an http.Header that can be modified by the caller to
15880// add HTTP headers to the request.
15881func (c *ProjectsAgentKnowledgeBasesGetCall) Header() http.Header {
15882	if c.header_ == nil {
15883		c.header_ = make(http.Header)
15884	}
15885	return c.header_
15886}
15887
15888func (c *ProjectsAgentKnowledgeBasesGetCall) doRequest(alt string) (*http.Response, error) {
15889	reqHeaders := make(http.Header)
15890	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
15891	for k, v := range c.header_ {
15892		reqHeaders[k] = v
15893	}
15894	reqHeaders.Set("User-Agent", c.s.userAgent())
15895	if c.ifNoneMatch_ != "" {
15896		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15897	}
15898	var body io.Reader = nil
15899	c.urlParams_.Set("alt", alt)
15900	c.urlParams_.Set("prettyPrint", "false")
15901	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15902	urls += "?" + c.urlParams_.Encode()
15903	req, err := http.NewRequest("GET", urls, body)
15904	if err != nil {
15905		return nil, err
15906	}
15907	req.Header = reqHeaders
15908	googleapi.Expand(req.URL, map[string]string{
15909		"name": c.name,
15910	})
15911	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15912}
15913
15914// Do executes the "dialogflow.projects.agent.knowledgeBases.get" call.
15915// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
15916// will be non-nil. Any non-2xx status code is an error. Response
15917// headers are in either
15918// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
15919// (if a response was returned at all) in
15920// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15921// whether the returned error was because http.StatusNotModified was
15922// returned.
15923func (c *ProjectsAgentKnowledgeBasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
15924	gensupport.SetOptions(c.urlParams_, opts...)
15925	res, err := c.doRequest("json")
15926	if res != nil && res.StatusCode == http.StatusNotModified {
15927		if res.Body != nil {
15928			res.Body.Close()
15929		}
15930		return nil, &googleapi.Error{
15931			Code:   res.StatusCode,
15932			Header: res.Header,
15933		}
15934	}
15935	if err != nil {
15936		return nil, err
15937	}
15938	defer googleapi.CloseBody(res)
15939	if err := googleapi.CheckResponse(res); err != nil {
15940		return nil, err
15941	}
15942	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
15943		ServerResponse: googleapi.ServerResponse{
15944			Header:         res.Header,
15945			HTTPStatusCode: res.StatusCode,
15946		},
15947	}
15948	target := &ret
15949	if err := gensupport.DecodeResponse(target, res); err != nil {
15950		return nil, err
15951	}
15952	return ret, nil
15953	// {
15954	//   "description": "Retrieves the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
15955	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
15956	//   "httpMethod": "GET",
15957	//   "id": "dialogflow.projects.agent.knowledgeBases.get",
15958	//   "parameterOrder": [
15959	//     "name"
15960	//   ],
15961	//   "parameters": {
15962	//     "name": {
15963	//       "description": "Required. The name of the knowledge base to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
15964	//       "location": "path",
15965	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
15966	//       "required": true,
15967	//       "type": "string"
15968	//     }
15969	//   },
15970	//   "path": "v2beta1/{+name}",
15971	//   "response": {
15972	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
15973	//   },
15974	//   "scopes": [
15975	//     "https://www.googleapis.com/auth/cloud-platform",
15976	//     "https://www.googleapis.com/auth/dialogflow"
15977	//   ]
15978	// }
15979
15980}
15981
15982// method id "dialogflow.projects.agent.knowledgeBases.list":
15983
15984type ProjectsAgentKnowledgeBasesListCall struct {
15985	s            *Service
15986	parent       string
15987	urlParams_   gensupport.URLParams
15988	ifNoneMatch_ string
15989	ctx_         context.Context
15990	header_      http.Header
15991}
15992
15993// List: Returns the list of all knowledge bases of the specified
15994// agent.
15995//
15996// Note: The `projects.agent.knowledgeBases` resource is
15997// deprecated;
15998// only use `projects.knowledgeBases`.
15999func (r *ProjectsAgentKnowledgeBasesService) List(parent string) *ProjectsAgentKnowledgeBasesListCall {
16000	c := &ProjectsAgentKnowledgeBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16001	c.parent = parent
16002	return c
16003}
16004
16005// PageSize sets the optional parameter "pageSize": The maximum number
16006// of items to return in a single page. By
16007// default 10 and at most 100.
16008func (c *ProjectsAgentKnowledgeBasesListCall) PageSize(pageSize int64) *ProjectsAgentKnowledgeBasesListCall {
16009	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16010	return c
16011}
16012
16013// PageToken sets the optional parameter "pageToken": The
16014// next_page_token value returned from a previous list request.
16015func (c *ProjectsAgentKnowledgeBasesListCall) PageToken(pageToken string) *ProjectsAgentKnowledgeBasesListCall {
16016	c.urlParams_.Set("pageToken", pageToken)
16017	return c
16018}
16019
16020// Fields allows partial responses to be retrieved. See
16021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16022// for more information.
16023func (c *ProjectsAgentKnowledgeBasesListCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesListCall {
16024	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16025	return c
16026}
16027
16028// IfNoneMatch sets the optional parameter which makes the operation
16029// fail if the object's ETag matches the given value. This is useful for
16030// getting updates only after the object has changed since the last
16031// request. Use googleapi.IsNotModified to check whether the response
16032// error from Do is the result of In-None-Match.
16033func (c *ProjectsAgentKnowledgeBasesListCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesListCall {
16034	c.ifNoneMatch_ = entityTag
16035	return c
16036}
16037
16038// Context sets the context to be used in this call's Do method. Any
16039// pending HTTP request will be aborted if the provided context is
16040// canceled.
16041func (c *ProjectsAgentKnowledgeBasesListCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesListCall {
16042	c.ctx_ = ctx
16043	return c
16044}
16045
16046// Header returns an http.Header that can be modified by the caller to
16047// add HTTP headers to the request.
16048func (c *ProjectsAgentKnowledgeBasesListCall) Header() http.Header {
16049	if c.header_ == nil {
16050		c.header_ = make(http.Header)
16051	}
16052	return c.header_
16053}
16054
16055func (c *ProjectsAgentKnowledgeBasesListCall) doRequest(alt string) (*http.Response, error) {
16056	reqHeaders := make(http.Header)
16057	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16058	for k, v := range c.header_ {
16059		reqHeaders[k] = v
16060	}
16061	reqHeaders.Set("User-Agent", c.s.userAgent())
16062	if c.ifNoneMatch_ != "" {
16063		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16064	}
16065	var body io.Reader = nil
16066	c.urlParams_.Set("alt", alt)
16067	c.urlParams_.Set("prettyPrint", "false")
16068	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
16069	urls += "?" + c.urlParams_.Encode()
16070	req, err := http.NewRequest("GET", urls, body)
16071	if err != nil {
16072		return nil, err
16073	}
16074	req.Header = reqHeaders
16075	googleapi.Expand(req.URL, map[string]string{
16076		"parent": c.parent,
16077	})
16078	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16079}
16080
16081// Do executes the "dialogflow.projects.agent.knowledgeBases.list" call.
16082// Exactly one of
16083// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse or error will
16084// be non-nil. Any non-2xx status code is an error. Response headers are
16085// in either
16086// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse.ServerResponse
16087// .Header or (if a response was returned at all) in
16088// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16089// whether the returned error was because http.StatusNotModified was
16090// returned.
16091func (c *ProjectsAgentKnowledgeBasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse, error) {
16092	gensupport.SetOptions(c.urlParams_, opts...)
16093	res, err := c.doRequest("json")
16094	if res != nil && res.StatusCode == http.StatusNotModified {
16095		if res.Body != nil {
16096			res.Body.Close()
16097		}
16098		return nil, &googleapi.Error{
16099			Code:   res.StatusCode,
16100			Header: res.Header,
16101		}
16102	}
16103	if err != nil {
16104		return nil, err
16105	}
16106	defer googleapi.CloseBody(res)
16107	if err := googleapi.CheckResponse(res); err != nil {
16108		return nil, err
16109	}
16110	ret := &GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse{
16111		ServerResponse: googleapi.ServerResponse{
16112			Header:         res.Header,
16113			HTTPStatusCode: res.StatusCode,
16114		},
16115	}
16116	target := &ret
16117	if err := gensupport.DecodeResponse(target, res); err != nil {
16118		return nil, err
16119	}
16120	return ret, nil
16121	// {
16122	//   "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`.",
16123	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases",
16124	//   "httpMethod": "GET",
16125	//   "id": "dialogflow.projects.agent.knowledgeBases.list",
16126	//   "parameterOrder": [
16127	//     "parent"
16128	//   ],
16129	//   "parameters": {
16130	//     "pageSize": {
16131	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
16132	//       "format": "int32",
16133	//       "location": "query",
16134	//       "type": "integer"
16135	//     },
16136	//     "pageToken": {
16137	//       "description": "Optional. The next_page_token value returned from a previous list request.",
16138	//       "location": "query",
16139	//       "type": "string"
16140	//     },
16141	//     "parent": {
16142	//       "description": "Required. The project to list of knowledge bases for.\nFormat: `projects/\u003cProject ID\u003e`.",
16143	//       "location": "path",
16144	//       "pattern": "^projects/[^/]+/agent$",
16145	//       "required": true,
16146	//       "type": "string"
16147	//     }
16148	//   },
16149	//   "path": "v2beta1/{+parent}/knowledgeBases",
16150	//   "response": {
16151	//     "$ref": "GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse"
16152	//   },
16153	//   "scopes": [
16154	//     "https://www.googleapis.com/auth/cloud-platform",
16155	//     "https://www.googleapis.com/auth/dialogflow"
16156	//   ]
16157	// }
16158
16159}
16160
16161// Pages invokes f for each page of results.
16162// A non-nil error returned from f will halt the iteration.
16163// The provided context supersedes any context provided to the Context method.
16164func (c *ProjectsAgentKnowledgeBasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse) error) error {
16165	c.ctx_ = ctx
16166	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16167	for {
16168		x, err := c.Do()
16169		if err != nil {
16170			return err
16171		}
16172		if err := f(x); err != nil {
16173			return err
16174		}
16175		if x.NextPageToken == "" {
16176			return nil
16177		}
16178		c.PageToken(x.NextPageToken)
16179	}
16180}
16181
16182// method id "dialogflow.projects.agent.knowledgeBases.patch":
16183
16184type ProjectsAgentKnowledgeBasesPatchCall struct {
16185	s                                         *Service
16186	name                                      string
16187	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
16188	urlParams_                                gensupport.URLParams
16189	ctx_                                      context.Context
16190	header_                                   http.Header
16191}
16192
16193// Patch: Updates the specified knowledge base.
16194//
16195// Note: The `projects.agent.knowledgeBases` resource is
16196// deprecated;
16197// only use `projects.knowledgeBases`.
16198func (r *ProjectsAgentKnowledgeBasesService) Patch(name string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsAgentKnowledgeBasesPatchCall {
16199	c := &ProjectsAgentKnowledgeBasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16200	c.name = name
16201	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
16202	return c
16203}
16204
16205// UpdateMask sets the optional parameter "updateMask": Not specified
16206// means `update all`.
16207// Currently, only `display_name` can be updated, an InvalidArgument
16208// will be
16209// returned for attempting to update other fields.
16210func (c *ProjectsAgentKnowledgeBasesPatchCall) UpdateMask(updateMask string) *ProjectsAgentKnowledgeBasesPatchCall {
16211	c.urlParams_.Set("updateMask", updateMask)
16212	return c
16213}
16214
16215// Fields allows partial responses to be retrieved. See
16216// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16217// for more information.
16218func (c *ProjectsAgentKnowledgeBasesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesPatchCall {
16219	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16220	return c
16221}
16222
16223// Context sets the context to be used in this call's Do method. Any
16224// pending HTTP request will be aborted if the provided context is
16225// canceled.
16226func (c *ProjectsAgentKnowledgeBasesPatchCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesPatchCall {
16227	c.ctx_ = ctx
16228	return c
16229}
16230
16231// Header returns an http.Header that can be modified by the caller to
16232// add HTTP headers to the request.
16233func (c *ProjectsAgentKnowledgeBasesPatchCall) Header() http.Header {
16234	if c.header_ == nil {
16235		c.header_ = make(http.Header)
16236	}
16237	return c.header_
16238}
16239
16240func (c *ProjectsAgentKnowledgeBasesPatchCall) doRequest(alt string) (*http.Response, error) {
16241	reqHeaders := make(http.Header)
16242	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16243	for k, v := range c.header_ {
16244		reqHeaders[k] = v
16245	}
16246	reqHeaders.Set("User-Agent", c.s.userAgent())
16247	var body io.Reader = nil
16248	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
16249	if err != nil {
16250		return nil, err
16251	}
16252	reqHeaders.Set("Content-Type", "application/json")
16253	c.urlParams_.Set("alt", alt)
16254	c.urlParams_.Set("prettyPrint", "false")
16255	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
16256	urls += "?" + c.urlParams_.Encode()
16257	req, err := http.NewRequest("PATCH", urls, body)
16258	if err != nil {
16259		return nil, err
16260	}
16261	req.Header = reqHeaders
16262	googleapi.Expand(req.URL, map[string]string{
16263		"name": c.name,
16264	})
16265	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16266}
16267
16268// Do executes the "dialogflow.projects.agent.knowledgeBases.patch" call.
16269// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
16270// will be non-nil. Any non-2xx status code is an error. Response
16271// headers are in either
16272// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
16273// (if a response was returned at all) in
16274// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16275// whether the returned error was because http.StatusNotModified was
16276// returned.
16277func (c *ProjectsAgentKnowledgeBasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
16278	gensupport.SetOptions(c.urlParams_, opts...)
16279	res, err := c.doRequest("json")
16280	if res != nil && res.StatusCode == http.StatusNotModified {
16281		if res.Body != nil {
16282			res.Body.Close()
16283		}
16284		return nil, &googleapi.Error{
16285			Code:   res.StatusCode,
16286			Header: res.Header,
16287		}
16288	}
16289	if err != nil {
16290		return nil, err
16291	}
16292	defer googleapi.CloseBody(res)
16293	if err := googleapi.CheckResponse(res); err != nil {
16294		return nil, err
16295	}
16296	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
16297		ServerResponse: googleapi.ServerResponse{
16298			Header:         res.Header,
16299			HTTPStatusCode: res.StatusCode,
16300		},
16301	}
16302	target := &ret
16303	if err := gensupport.DecodeResponse(target, res); err != nil {
16304		return nil, err
16305	}
16306	return ret, nil
16307	// {
16308	//   "description": "Updates the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
16309	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
16310	//   "httpMethod": "PATCH",
16311	//   "id": "dialogflow.projects.agent.knowledgeBases.patch",
16312	//   "parameterOrder": [
16313	//     "name"
16314	//   ],
16315	//   "parameters": {
16316	//     "name": {
16317	//       "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`.",
16318	//       "location": "path",
16319	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
16320	//       "required": true,
16321	//       "type": "string"
16322	//     },
16323	//     "updateMask": {
16324	//       "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.",
16325	//       "format": "google-fieldmask",
16326	//       "location": "query",
16327	//       "type": "string"
16328	//     }
16329	//   },
16330	//   "path": "v2beta1/{+name}",
16331	//   "request": {
16332	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
16333	//   },
16334	//   "response": {
16335	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
16336	//   },
16337	//   "scopes": [
16338	//     "https://www.googleapis.com/auth/cloud-platform",
16339	//     "https://www.googleapis.com/auth/dialogflow"
16340	//   ]
16341	// }
16342
16343}
16344
16345// method id "dialogflow.projects.agent.knowledgeBases.documents.create":
16346
16347type ProjectsAgentKnowledgeBasesDocumentsCreateCall struct {
16348	s                                    *Service
16349	parent                               string
16350	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
16351	urlParams_                           gensupport.URLParams
16352	ctx_                                 context.Context
16353	header_                              http.Header
16354}
16355
16356// Create: Creates a new document.
16357//
16358// Note: The `projects.agent.knowledgeBases.documents` resource is
16359// deprecated;
16360// only use `projects.knowledgeBases.documents`.
16361//
16362// Operation <response: Document,
16363//            metadata: KnowledgeOperationMetadata>
16364func (r *ProjectsAgentKnowledgeBasesDocumentsService) Create(parent string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
16365	c := &ProjectsAgentKnowledgeBasesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16366	c.parent = parent
16367	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
16368	return c
16369}
16370
16371// Fields allows partial responses to be retrieved. See
16372// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16373// for more information.
16374func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
16375	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16376	return c
16377}
16378
16379// Context sets the context to be used in this call's Do method. Any
16380// pending HTTP request will be aborted if the provided context is
16381// canceled.
16382func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
16383	c.ctx_ = ctx
16384	return c
16385}
16386
16387// Header returns an http.Header that can be modified by the caller to
16388// add HTTP headers to the request.
16389func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Header() http.Header {
16390	if c.header_ == nil {
16391		c.header_ = make(http.Header)
16392	}
16393	return c.header_
16394}
16395
16396func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) {
16397	reqHeaders := make(http.Header)
16398	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16399	for k, v := range c.header_ {
16400		reqHeaders[k] = v
16401	}
16402	reqHeaders.Set("User-Agent", c.s.userAgent())
16403	var body io.Reader = nil
16404	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
16405	if err != nil {
16406		return nil, err
16407	}
16408	reqHeaders.Set("Content-Type", "application/json")
16409	c.urlParams_.Set("alt", alt)
16410	c.urlParams_.Set("prettyPrint", "false")
16411	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
16412	urls += "?" + c.urlParams_.Encode()
16413	req, err := http.NewRequest("POST", urls, body)
16414	if err != nil {
16415		return nil, err
16416	}
16417	req.Header = reqHeaders
16418	googleapi.Expand(req.URL, map[string]string{
16419		"parent": c.parent,
16420	})
16421	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16422}
16423
16424// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.create" call.
16425// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
16426// Any non-2xx status code is an error. Response headers are in either
16427// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
16428// was returned at all) in error.(*googleapi.Error).Header. Use
16429// googleapi.IsNotModified to check whether the returned error was
16430// because http.StatusNotModified was returned.
16431func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
16432	gensupport.SetOptions(c.urlParams_, opts...)
16433	res, err := c.doRequest("json")
16434	if res != nil && res.StatusCode == http.StatusNotModified {
16435		if res.Body != nil {
16436			res.Body.Close()
16437		}
16438		return nil, &googleapi.Error{
16439			Code:   res.StatusCode,
16440			Header: res.Header,
16441		}
16442	}
16443	if err != nil {
16444		return nil, err
16445	}
16446	defer googleapi.CloseBody(res)
16447	if err := googleapi.CheckResponse(res); err != nil {
16448		return nil, err
16449	}
16450	ret := &GoogleLongrunningOperation{
16451		ServerResponse: googleapi.ServerResponse{
16452			Header:         res.Header,
16453			HTTPStatusCode: res.StatusCode,
16454		},
16455	}
16456	target := &ret
16457	if err := gensupport.DecodeResponse(target, res); err != nil {
16458		return nil, err
16459	}
16460	return ret, nil
16461	// {
16462	//   "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",
16463	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents",
16464	//   "httpMethod": "POST",
16465	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.create",
16466	//   "parameterOrder": [
16467	//     "parent"
16468	//   ],
16469	//   "parameters": {
16470	//     "parent": {
16471	//       "description": "Required. The knoweldge base to create a document for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
16472	//       "location": "path",
16473	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
16474	//       "required": true,
16475	//       "type": "string"
16476	//     }
16477	//   },
16478	//   "path": "v2beta1/{+parent}/documents",
16479	//   "request": {
16480	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
16481	//   },
16482	//   "response": {
16483	//     "$ref": "GoogleLongrunningOperation"
16484	//   },
16485	//   "scopes": [
16486	//     "https://www.googleapis.com/auth/cloud-platform",
16487	//     "https://www.googleapis.com/auth/dialogflow"
16488	//   ]
16489	// }
16490
16491}
16492
16493// method id "dialogflow.projects.agent.knowledgeBases.documents.delete":
16494
16495type ProjectsAgentKnowledgeBasesDocumentsDeleteCall struct {
16496	s          *Service
16497	name       string
16498	urlParams_ gensupport.URLParams
16499	ctx_       context.Context
16500	header_    http.Header
16501}
16502
16503// Delete: Deletes the specified document.
16504//
16505// Note: The `projects.agent.knowledgeBases.documents` resource is
16506// deprecated;
16507// only use `projects.knowledgeBases.documents`.
16508//
16509// Operation <response: google.protobuf.Empty,
16510//            metadata: KnowledgeOperationMetadata>
16511func (r *ProjectsAgentKnowledgeBasesDocumentsService) Delete(name string) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
16512	c := &ProjectsAgentKnowledgeBasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16513	c.name = name
16514	return c
16515}
16516
16517// Fields allows partial responses to be retrieved. See
16518// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16519// for more information.
16520func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
16521	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16522	return c
16523}
16524
16525// Context sets the context to be used in this call's Do method. Any
16526// pending HTTP request will be aborted if the provided context is
16527// canceled.
16528func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
16529	c.ctx_ = ctx
16530	return c
16531}
16532
16533// Header returns an http.Header that can be modified by the caller to
16534// add HTTP headers to the request.
16535func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Header() http.Header {
16536	if c.header_ == nil {
16537		c.header_ = make(http.Header)
16538	}
16539	return c.header_
16540}
16541
16542func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
16543	reqHeaders := make(http.Header)
16544	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16545	for k, v := range c.header_ {
16546		reqHeaders[k] = v
16547	}
16548	reqHeaders.Set("User-Agent", c.s.userAgent())
16549	var body io.Reader = nil
16550	c.urlParams_.Set("alt", alt)
16551	c.urlParams_.Set("prettyPrint", "false")
16552	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
16553	urls += "?" + c.urlParams_.Encode()
16554	req, err := http.NewRequest("DELETE", urls, body)
16555	if err != nil {
16556		return nil, err
16557	}
16558	req.Header = reqHeaders
16559	googleapi.Expand(req.URL, map[string]string{
16560		"name": c.name,
16561	})
16562	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16563}
16564
16565// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.delete" call.
16566// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
16567// Any non-2xx status code is an error. Response headers are in either
16568// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
16569// was returned at all) in error.(*googleapi.Error).Header. Use
16570// googleapi.IsNotModified to check whether the returned error was
16571// because http.StatusNotModified was returned.
16572func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
16573	gensupport.SetOptions(c.urlParams_, opts...)
16574	res, err := c.doRequest("json")
16575	if res != nil && res.StatusCode == http.StatusNotModified {
16576		if res.Body != nil {
16577			res.Body.Close()
16578		}
16579		return nil, &googleapi.Error{
16580			Code:   res.StatusCode,
16581			Header: res.Header,
16582		}
16583	}
16584	if err != nil {
16585		return nil, err
16586	}
16587	defer googleapi.CloseBody(res)
16588	if err := googleapi.CheckResponse(res); err != nil {
16589		return nil, err
16590	}
16591	ret := &GoogleLongrunningOperation{
16592		ServerResponse: googleapi.ServerResponse{
16593			Header:         res.Header,
16594			HTTPStatusCode: res.StatusCode,
16595		},
16596	}
16597	target := &ret
16598	if err := gensupport.DecodeResponse(target, res); err != nil {
16599		return nil, err
16600	}
16601	return ret, nil
16602	// {
16603	//   "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",
16604	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
16605	//   "httpMethod": "DELETE",
16606	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.delete",
16607	//   "parameterOrder": [
16608	//     "name"
16609	//   ],
16610	//   "parameters": {
16611	//     "name": {
16612	//       "description": "The name of the document to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
16613	//       "location": "path",
16614	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
16615	//       "required": true,
16616	//       "type": "string"
16617	//     }
16618	//   },
16619	//   "path": "v2beta1/{+name}",
16620	//   "response": {
16621	//     "$ref": "GoogleLongrunningOperation"
16622	//   },
16623	//   "scopes": [
16624	//     "https://www.googleapis.com/auth/cloud-platform",
16625	//     "https://www.googleapis.com/auth/dialogflow"
16626	//   ]
16627	// }
16628
16629}
16630
16631// method id "dialogflow.projects.agent.knowledgeBases.documents.get":
16632
16633type ProjectsAgentKnowledgeBasesDocumentsGetCall struct {
16634	s            *Service
16635	name         string
16636	urlParams_   gensupport.URLParams
16637	ifNoneMatch_ string
16638	ctx_         context.Context
16639	header_      http.Header
16640}
16641
16642// Get: Retrieves the specified document.
16643//
16644// Note: The `projects.agent.knowledgeBases.documents` resource is
16645// deprecated;
16646// only use `projects.knowledgeBases.documents`.
16647func (r *ProjectsAgentKnowledgeBasesDocumentsService) Get(name string) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
16648	c := &ProjectsAgentKnowledgeBasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16649	c.name = name
16650	return c
16651}
16652
16653// Fields allows partial responses to be retrieved. See
16654// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16655// for more information.
16656func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
16657	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16658	return c
16659}
16660
16661// IfNoneMatch sets the optional parameter which makes the operation
16662// fail if the object's ETag matches the given value. This is useful for
16663// getting updates only after the object has changed since the last
16664// request. Use googleapi.IsNotModified to check whether the response
16665// error from Do is the result of In-None-Match.
16666func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
16667	c.ifNoneMatch_ = entityTag
16668	return c
16669}
16670
16671// Context sets the context to be used in this call's Do method. Any
16672// pending HTTP request will be aborted if the provided context is
16673// canceled.
16674func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
16675	c.ctx_ = ctx
16676	return c
16677}
16678
16679// Header returns an http.Header that can be modified by the caller to
16680// add HTTP headers to the request.
16681func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Header() http.Header {
16682	if c.header_ == nil {
16683		c.header_ = make(http.Header)
16684	}
16685	return c.header_
16686}
16687
16688func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
16689	reqHeaders := make(http.Header)
16690	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16691	for k, v := range c.header_ {
16692		reqHeaders[k] = v
16693	}
16694	reqHeaders.Set("User-Agent", c.s.userAgent())
16695	if c.ifNoneMatch_ != "" {
16696		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16697	}
16698	var body io.Reader = nil
16699	c.urlParams_.Set("alt", alt)
16700	c.urlParams_.Set("prettyPrint", "false")
16701	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
16702	urls += "?" + c.urlParams_.Encode()
16703	req, err := http.NewRequest("GET", urls, body)
16704	if err != nil {
16705		return nil, err
16706	}
16707	req.Header = reqHeaders
16708	googleapi.Expand(req.URL, map[string]string{
16709		"name": c.name,
16710	})
16711	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16712}
16713
16714// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.get" call.
16715// Exactly one of *GoogleCloudDialogflowV2beta1Document or error will be
16716// non-nil. Any non-2xx status code is an error. Response headers are in
16717// either *GoogleCloudDialogflowV2beta1Document.ServerResponse.Header or
16718// (if a response was returned at all) in
16719// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16720// whether the returned error was because http.StatusNotModified was
16721// returned.
16722func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Document, error) {
16723	gensupport.SetOptions(c.urlParams_, opts...)
16724	res, err := c.doRequest("json")
16725	if res != nil && res.StatusCode == http.StatusNotModified {
16726		if res.Body != nil {
16727			res.Body.Close()
16728		}
16729		return nil, &googleapi.Error{
16730			Code:   res.StatusCode,
16731			Header: res.Header,
16732		}
16733	}
16734	if err != nil {
16735		return nil, err
16736	}
16737	defer googleapi.CloseBody(res)
16738	if err := googleapi.CheckResponse(res); err != nil {
16739		return nil, err
16740	}
16741	ret := &GoogleCloudDialogflowV2beta1Document{
16742		ServerResponse: googleapi.ServerResponse{
16743			Header:         res.Header,
16744			HTTPStatusCode: res.StatusCode,
16745		},
16746	}
16747	target := &ret
16748	if err := gensupport.DecodeResponse(target, res); err != nil {
16749		return nil, err
16750	}
16751	return ret, nil
16752	// {
16753	//   "description": "Retrieves the specified document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.",
16754	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
16755	//   "httpMethod": "GET",
16756	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.get",
16757	//   "parameterOrder": [
16758	//     "name"
16759	//   ],
16760	//   "parameters": {
16761	//     "name": {
16762	//       "description": "Required. The name of the document to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
16763	//       "location": "path",
16764	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
16765	//       "required": true,
16766	//       "type": "string"
16767	//     }
16768	//   },
16769	//   "path": "v2beta1/{+name}",
16770	//   "response": {
16771	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
16772	//   },
16773	//   "scopes": [
16774	//     "https://www.googleapis.com/auth/cloud-platform",
16775	//     "https://www.googleapis.com/auth/dialogflow"
16776	//   ]
16777	// }
16778
16779}
16780
16781// method id "dialogflow.projects.agent.knowledgeBases.documents.list":
16782
16783type ProjectsAgentKnowledgeBasesDocumentsListCall struct {
16784	s            *Service
16785	parent       string
16786	urlParams_   gensupport.URLParams
16787	ifNoneMatch_ string
16788	ctx_         context.Context
16789	header_      http.Header
16790}
16791
16792// List: Returns the list of all documents of the knowledge base.
16793//
16794// Note: The `projects.agent.knowledgeBases.documents` resource is
16795// deprecated;
16796// only use `projects.knowledgeBases.documents`.
16797func (r *ProjectsAgentKnowledgeBasesDocumentsService) List(parent string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16798	c := &ProjectsAgentKnowledgeBasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16799	c.parent = parent
16800	return c
16801}
16802
16803// PageSize sets the optional parameter "pageSize": The maximum number
16804// of items to return in a single page. By
16805// default 10 and at most 100.
16806func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) PageSize(pageSize int64) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16807	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16808	return c
16809}
16810
16811// PageToken sets the optional parameter "pageToken": The
16812// next_page_token value returned from a previous list request.
16813func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) PageToken(pageToken string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16814	c.urlParams_.Set("pageToken", pageToken)
16815	return c
16816}
16817
16818// Fields allows partial responses to be retrieved. See
16819// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16820// for more information.
16821func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16822	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16823	return c
16824}
16825
16826// IfNoneMatch sets the optional parameter which makes the operation
16827// fail if the object's ETag matches the given value. This is useful for
16828// getting updates only after the object has changed since the last
16829// request. Use googleapi.IsNotModified to check whether the response
16830// error from Do is the result of In-None-Match.
16831func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16832	c.ifNoneMatch_ = entityTag
16833	return c
16834}
16835
16836// Context sets the context to be used in this call's Do method. Any
16837// pending HTTP request will be aborted if the provided context is
16838// canceled.
16839func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsListCall {
16840	c.ctx_ = ctx
16841	return c
16842}
16843
16844// Header returns an http.Header that can be modified by the caller to
16845// add HTTP headers to the request.
16846func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Header() http.Header {
16847	if c.header_ == nil {
16848		c.header_ = make(http.Header)
16849	}
16850	return c.header_
16851}
16852
16853func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
16854	reqHeaders := make(http.Header)
16855	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
16856	for k, v := range c.header_ {
16857		reqHeaders[k] = v
16858	}
16859	reqHeaders.Set("User-Agent", c.s.userAgent())
16860	if c.ifNoneMatch_ != "" {
16861		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16862	}
16863	var body io.Reader = nil
16864	c.urlParams_.Set("alt", alt)
16865	c.urlParams_.Set("prettyPrint", "false")
16866	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
16867	urls += "?" + c.urlParams_.Encode()
16868	req, err := http.NewRequest("GET", urls, body)
16869	if err != nil {
16870		return nil, err
16871	}
16872	req.Header = reqHeaders
16873	googleapi.Expand(req.URL, map[string]string{
16874		"parent": c.parent,
16875	})
16876	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16877}
16878
16879// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.list" call.
16880// Exactly one of *GoogleCloudDialogflowV2beta1ListDocumentsResponse or
16881// error will be non-nil. Any non-2xx status code is an error. Response
16882// headers are in either
16883// *GoogleCloudDialogflowV2beta1ListDocumentsResponse.ServerResponse.Head
16884// er or (if a response was returned at all) in
16885// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16886// whether the returned error was because http.StatusNotModified was
16887// returned.
16888func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListDocumentsResponse, error) {
16889	gensupport.SetOptions(c.urlParams_, opts...)
16890	res, err := c.doRequest("json")
16891	if res != nil && res.StatusCode == http.StatusNotModified {
16892		if res.Body != nil {
16893			res.Body.Close()
16894		}
16895		return nil, &googleapi.Error{
16896			Code:   res.StatusCode,
16897			Header: res.Header,
16898		}
16899	}
16900	if err != nil {
16901		return nil, err
16902	}
16903	defer googleapi.CloseBody(res)
16904	if err := googleapi.CheckResponse(res); err != nil {
16905		return nil, err
16906	}
16907	ret := &GoogleCloudDialogflowV2beta1ListDocumentsResponse{
16908		ServerResponse: googleapi.ServerResponse{
16909			Header:         res.Header,
16910			HTTPStatusCode: res.StatusCode,
16911		},
16912	}
16913	target := &ret
16914	if err := gensupport.DecodeResponse(target, res); err != nil {
16915		return nil, err
16916	}
16917	return ret, nil
16918	// {
16919	//   "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`.",
16920	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents",
16921	//   "httpMethod": "GET",
16922	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.list",
16923	//   "parameterOrder": [
16924	//     "parent"
16925	//   ],
16926	//   "parameters": {
16927	//     "pageSize": {
16928	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
16929	//       "format": "int32",
16930	//       "location": "query",
16931	//       "type": "integer"
16932	//     },
16933	//     "pageToken": {
16934	//       "description": "Optional. The next_page_token value returned from a previous list request.",
16935	//       "location": "query",
16936	//       "type": "string"
16937	//     },
16938	//     "parent": {
16939	//       "description": "Required. The knowledge base to list all documents for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
16940	//       "location": "path",
16941	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
16942	//       "required": true,
16943	//       "type": "string"
16944	//     }
16945	//   },
16946	//   "path": "v2beta1/{+parent}/documents",
16947	//   "response": {
16948	//     "$ref": "GoogleCloudDialogflowV2beta1ListDocumentsResponse"
16949	//   },
16950	//   "scopes": [
16951	//     "https://www.googleapis.com/auth/cloud-platform",
16952	//     "https://www.googleapis.com/auth/dialogflow"
16953	//   ]
16954	// }
16955
16956}
16957
16958// Pages invokes f for each page of results.
16959// A non-nil error returned from f will halt the iteration.
16960// The provided context supersedes any context provided to the Context method.
16961func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListDocumentsResponse) error) error {
16962	c.ctx_ = ctx
16963	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16964	for {
16965		x, err := c.Do()
16966		if err != nil {
16967			return err
16968		}
16969		if err := f(x); err != nil {
16970			return err
16971		}
16972		if x.NextPageToken == "" {
16973			return nil
16974		}
16975		c.PageToken(x.NextPageToken)
16976	}
16977}
16978
16979// method id "dialogflow.projects.agent.knowledgeBases.documents.patch":
16980
16981type ProjectsAgentKnowledgeBasesDocumentsPatchCall struct {
16982	s                                    *Service
16983	name                                 string
16984	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
16985	urlParams_                           gensupport.URLParams
16986	ctx_                                 context.Context
16987	header_                              http.Header
16988}
16989
16990// Patch: Updates the specified document.
16991//
16992// Note: The `projects.agent.knowledgeBases.documents` resource is
16993// deprecated;
16994// only use `projects.knowledgeBases.documents`.
16995//
16996// Operation <response: Document,
16997//            metadata: KnowledgeOperationMetadata>
16998func (r *ProjectsAgentKnowledgeBasesDocumentsService) Patch(name string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
16999	c := &ProjectsAgentKnowledgeBasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17000	c.name = name
17001	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
17002	return c
17003}
17004
17005// UpdateMask sets the optional parameter "updateMask": Not specified
17006// means `update all`.
17007// Currently, only `display_name` can be updated, an InvalidArgument
17008// will be
17009// returned for attempting to update other fields.
17010func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
17011	c.urlParams_.Set("updateMask", updateMask)
17012	return c
17013}
17014
17015// Fields allows partial responses to be retrieved. See
17016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17017// for more information.
17018func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
17019	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17020	return c
17021}
17022
17023// Context sets the context to be used in this call's Do method. Any
17024// pending HTTP request will be aborted if the provided context is
17025// canceled.
17026func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
17027	c.ctx_ = ctx
17028	return c
17029}
17030
17031// Header returns an http.Header that can be modified by the caller to
17032// add HTTP headers to the request.
17033func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Header() http.Header {
17034	if c.header_ == nil {
17035		c.header_ = make(http.Header)
17036	}
17037	return c.header_
17038}
17039
17040func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
17041	reqHeaders := make(http.Header)
17042	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17043	for k, v := range c.header_ {
17044		reqHeaders[k] = v
17045	}
17046	reqHeaders.Set("User-Agent", c.s.userAgent())
17047	var body io.Reader = nil
17048	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
17049	if err != nil {
17050		return nil, err
17051	}
17052	reqHeaders.Set("Content-Type", "application/json")
17053	c.urlParams_.Set("alt", alt)
17054	c.urlParams_.Set("prettyPrint", "false")
17055	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17056	urls += "?" + c.urlParams_.Encode()
17057	req, err := http.NewRequest("PATCH", urls, body)
17058	if err != nil {
17059		return nil, err
17060	}
17061	req.Header = reqHeaders
17062	googleapi.Expand(req.URL, map[string]string{
17063		"name": c.name,
17064	})
17065	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17066}
17067
17068// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.patch" call.
17069// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
17070// Any non-2xx status code is an error. Response headers are in either
17071// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
17072// was returned at all) in error.(*googleapi.Error).Header. Use
17073// googleapi.IsNotModified to check whether the returned error was
17074// because http.StatusNotModified was returned.
17075func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
17076	gensupport.SetOptions(c.urlParams_, opts...)
17077	res, err := c.doRequest("json")
17078	if res != nil && res.StatusCode == http.StatusNotModified {
17079		if res.Body != nil {
17080			res.Body.Close()
17081		}
17082		return nil, &googleapi.Error{
17083			Code:   res.StatusCode,
17084			Header: res.Header,
17085		}
17086	}
17087	if err != nil {
17088		return nil, err
17089	}
17090	defer googleapi.CloseBody(res)
17091	if err := googleapi.CheckResponse(res); err != nil {
17092		return nil, err
17093	}
17094	ret := &GoogleLongrunningOperation{
17095		ServerResponse: googleapi.ServerResponse{
17096			Header:         res.Header,
17097			HTTPStatusCode: res.StatusCode,
17098		},
17099	}
17100	target := &ret
17101	if err := gensupport.DecodeResponse(target, res); err != nil {
17102		return nil, err
17103	}
17104	return ret, nil
17105	// {
17106	//   "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",
17107	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
17108	//   "httpMethod": "PATCH",
17109	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.patch",
17110	//   "parameterOrder": [
17111	//     "name"
17112	//   ],
17113	//   "parameters": {
17114	//     "name": {
17115	//       "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`.",
17116	//       "location": "path",
17117	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
17118	//       "required": true,
17119	//       "type": "string"
17120	//     },
17121	//     "updateMask": {
17122	//       "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.",
17123	//       "format": "google-fieldmask",
17124	//       "location": "query",
17125	//       "type": "string"
17126	//     }
17127	//   },
17128	//   "path": "v2beta1/{+name}",
17129	//   "request": {
17130	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
17131	//   },
17132	//   "response": {
17133	//     "$ref": "GoogleLongrunningOperation"
17134	//   },
17135	//   "scopes": [
17136	//     "https://www.googleapis.com/auth/cloud-platform",
17137	//     "https://www.googleapis.com/auth/dialogflow"
17138	//   ]
17139	// }
17140
17141}
17142
17143// method id "dialogflow.projects.agent.knowledgeBases.documents.reload":
17144
17145type ProjectsAgentKnowledgeBasesDocumentsReloadCall struct {
17146	s                                                 *Service
17147	name                                              string
17148	googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest
17149	urlParams_                                        gensupport.URLParams
17150	ctx_                                              context.Context
17151	header_                                           http.Header
17152}
17153
17154// Reload: Reloads the specified document from its specified source,
17155// content_uri or
17156// content. The previously loaded content of the document will be
17157// deleted.
17158// Note: Even when the content of the document has not changed, there
17159// still
17160// may be side effects because of internal implementation
17161// changes.
17162//
17163// Note: The `projects.agent.knowledgeBases.documents` resource is
17164// deprecated;
17165// only use `projects.knowledgeBases.documents`.
17166//
17167// Operation <response: Document,
17168//            metadata: KnowledgeOperationMetadata>
17169func (r *ProjectsAgentKnowledgeBasesDocumentsService) Reload(name string, googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
17170	c := &ProjectsAgentKnowledgeBasesDocumentsReloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17171	c.name = name
17172	c.googleclouddialogflowv2beta1reloaddocumentrequest = googleclouddialogflowv2beta1reloaddocumentrequest
17173	return c
17174}
17175
17176// Fields allows partial responses to be retrieved. See
17177// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17178// for more information.
17179func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
17180	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17181	return c
17182}
17183
17184// Context sets the context to be used in this call's Do method. Any
17185// pending HTTP request will be aborted if the provided context is
17186// canceled.
17187func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
17188	c.ctx_ = ctx
17189	return c
17190}
17191
17192// Header returns an http.Header that can be modified by the caller to
17193// add HTTP headers to the request.
17194func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Header() http.Header {
17195	if c.header_ == nil {
17196		c.header_ = make(http.Header)
17197	}
17198	return c.header_
17199}
17200
17201func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) doRequest(alt string) (*http.Response, error) {
17202	reqHeaders := make(http.Header)
17203	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17204	for k, v := range c.header_ {
17205		reqHeaders[k] = v
17206	}
17207	reqHeaders.Set("User-Agent", c.s.userAgent())
17208	var body io.Reader = nil
17209	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1reloaddocumentrequest)
17210	if err != nil {
17211		return nil, err
17212	}
17213	reqHeaders.Set("Content-Type", "application/json")
17214	c.urlParams_.Set("alt", alt)
17215	c.urlParams_.Set("prettyPrint", "false")
17216	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:reload")
17217	urls += "?" + c.urlParams_.Encode()
17218	req, err := http.NewRequest("POST", urls, body)
17219	if err != nil {
17220		return nil, err
17221	}
17222	req.Header = reqHeaders
17223	googleapi.Expand(req.URL, map[string]string{
17224		"name": c.name,
17225	})
17226	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17227}
17228
17229// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.reload" call.
17230// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
17231// Any non-2xx status code is an error. Response headers are in either
17232// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
17233// was returned at all) in error.(*googleapi.Error).Header. Use
17234// googleapi.IsNotModified to check whether the returned error was
17235// because http.StatusNotModified was returned.
17236func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
17237	gensupport.SetOptions(c.urlParams_, opts...)
17238	res, err := c.doRequest("json")
17239	if res != nil && res.StatusCode == http.StatusNotModified {
17240		if res.Body != nil {
17241			res.Body.Close()
17242		}
17243		return nil, &googleapi.Error{
17244			Code:   res.StatusCode,
17245			Header: res.Header,
17246		}
17247	}
17248	if err != nil {
17249		return nil, err
17250	}
17251	defer googleapi.CloseBody(res)
17252	if err := googleapi.CheckResponse(res); err != nil {
17253		return nil, err
17254	}
17255	ret := &GoogleLongrunningOperation{
17256		ServerResponse: googleapi.ServerResponse{
17257			Header:         res.Header,
17258			HTTPStatusCode: res.StatusCode,
17259		},
17260	}
17261	target := &ret
17262	if err := gensupport.DecodeResponse(target, res); err != nil {
17263		return nil, err
17264	}
17265	return ret, nil
17266	// {
17267	//   "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",
17268	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload",
17269	//   "httpMethod": "POST",
17270	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.reload",
17271	//   "parameterOrder": [
17272	//     "name"
17273	//   ],
17274	//   "parameters": {
17275	//     "name": {
17276	//       "description": "The name of the document to reload.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`",
17277	//       "location": "path",
17278	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
17279	//       "required": true,
17280	//       "type": "string"
17281	//     }
17282	//   },
17283	//   "path": "v2beta1/{+name}:reload",
17284	//   "request": {
17285	//     "$ref": "GoogleCloudDialogflowV2beta1ReloadDocumentRequest"
17286	//   },
17287	//   "response": {
17288	//     "$ref": "GoogleLongrunningOperation"
17289	//   },
17290	//   "scopes": [
17291	//     "https://www.googleapis.com/auth/cloud-platform",
17292	//     "https://www.googleapis.com/auth/dialogflow"
17293	//   ]
17294	// }
17295
17296}
17297
17298// method id "dialogflow.projects.agent.sessions.deleteContexts":
17299
17300type ProjectsAgentSessionsDeleteContextsCall struct {
17301	s          *Service
17302	parent     string
17303	urlParams_ gensupport.URLParams
17304	ctx_       context.Context
17305	header_    http.Header
17306}
17307
17308// DeleteContexts: Deletes all active contexts in the specified session.
17309func (r *ProjectsAgentSessionsService) DeleteContexts(parent string) *ProjectsAgentSessionsDeleteContextsCall {
17310	c := &ProjectsAgentSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17311	c.parent = parent
17312	return c
17313}
17314
17315// Fields allows partial responses to be retrieved. See
17316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17317// for more information.
17318func (c *ProjectsAgentSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDeleteContextsCall {
17319	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17320	return c
17321}
17322
17323// Context sets the context to be used in this call's Do method. Any
17324// pending HTTP request will be aborted if the provided context is
17325// canceled.
17326func (c *ProjectsAgentSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentSessionsDeleteContextsCall {
17327	c.ctx_ = ctx
17328	return c
17329}
17330
17331// Header returns an http.Header that can be modified by the caller to
17332// add HTTP headers to the request.
17333func (c *ProjectsAgentSessionsDeleteContextsCall) Header() http.Header {
17334	if c.header_ == nil {
17335		c.header_ = make(http.Header)
17336	}
17337	return c.header_
17338}
17339
17340func (c *ProjectsAgentSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
17341	reqHeaders := make(http.Header)
17342	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17343	for k, v := range c.header_ {
17344		reqHeaders[k] = v
17345	}
17346	reqHeaders.Set("User-Agent", c.s.userAgent())
17347	var body io.Reader = nil
17348	c.urlParams_.Set("alt", alt)
17349	c.urlParams_.Set("prettyPrint", "false")
17350	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
17351	urls += "?" + c.urlParams_.Encode()
17352	req, err := http.NewRequest("DELETE", urls, body)
17353	if err != nil {
17354		return nil, err
17355	}
17356	req.Header = reqHeaders
17357	googleapi.Expand(req.URL, map[string]string{
17358		"parent": c.parent,
17359	})
17360	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17361}
17362
17363// Do executes the "dialogflow.projects.agent.sessions.deleteContexts" call.
17364// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
17365// non-2xx status code is an error. Response headers are in either
17366// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
17367// returned at all) in error.(*googleapi.Error).Header. Use
17368// googleapi.IsNotModified to check whether the returned error was
17369// because http.StatusNotModified was returned.
17370func (c *ProjectsAgentSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
17371	gensupport.SetOptions(c.urlParams_, opts...)
17372	res, err := c.doRequest("json")
17373	if res != nil && res.StatusCode == http.StatusNotModified {
17374		if res.Body != nil {
17375			res.Body.Close()
17376		}
17377		return nil, &googleapi.Error{
17378			Code:   res.StatusCode,
17379			Header: res.Header,
17380		}
17381	}
17382	if err != nil {
17383		return nil, err
17384	}
17385	defer googleapi.CloseBody(res)
17386	if err := googleapi.CheckResponse(res); err != nil {
17387		return nil, err
17388	}
17389	ret := &GoogleProtobufEmpty{
17390		ServerResponse: googleapi.ServerResponse{
17391			Header:         res.Header,
17392			HTTPStatusCode: res.StatusCode,
17393		},
17394	}
17395	target := &ret
17396	if err := gensupport.DecodeResponse(target, res); err != nil {
17397		return nil, err
17398	}
17399	return ret, nil
17400	// {
17401	//   "description": "Deletes all active contexts in the specified session.",
17402	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
17403	//   "httpMethod": "DELETE",
17404	//   "id": "dialogflow.projects.agent.sessions.deleteContexts",
17405	//   "parameterOrder": [
17406	//     "parent"
17407	//   ],
17408	//   "parameters": {
17409	//     "parent": {
17410	//       "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.",
17411	//       "location": "path",
17412	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
17413	//       "required": true,
17414	//       "type": "string"
17415	//     }
17416	//   },
17417	//   "path": "v2beta1/{+parent}/contexts",
17418	//   "response": {
17419	//     "$ref": "GoogleProtobufEmpty"
17420	//   },
17421	//   "scopes": [
17422	//     "https://www.googleapis.com/auth/cloud-platform",
17423	//     "https://www.googleapis.com/auth/dialogflow"
17424	//   ]
17425	// }
17426
17427}
17428
17429// method id "dialogflow.projects.agent.sessions.detectIntent":
17430
17431type ProjectsAgentSessionsDetectIntentCall struct {
17432	s                                               *Service
17433	sessionid                                       string
17434	googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest
17435	urlParams_                                      gensupport.URLParams
17436	ctx_                                            context.Context
17437	header_                                         http.Header
17438}
17439
17440// DetectIntent: Processes a natural language query and returns
17441// structured, actionable data
17442// as a result. This method is not idempotent, because it may cause
17443// contexts
17444// and session entity types to be updated, which in turn might
17445// affect
17446// results of future queries.
17447func (r *ProjectsAgentSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest) *ProjectsAgentSessionsDetectIntentCall {
17448	c := &ProjectsAgentSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17449	c.sessionid = sessionid
17450	c.googleclouddialogflowv2beta1detectintentrequest = googleclouddialogflowv2beta1detectintentrequest
17451	return c
17452}
17453
17454// Fields allows partial responses to be retrieved. See
17455// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17456// for more information.
17457func (c *ProjectsAgentSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDetectIntentCall {
17458	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17459	return c
17460}
17461
17462// Context sets the context to be used in this call's Do method. Any
17463// pending HTTP request will be aborted if the provided context is
17464// canceled.
17465func (c *ProjectsAgentSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentSessionsDetectIntentCall {
17466	c.ctx_ = ctx
17467	return c
17468}
17469
17470// Header returns an http.Header that can be modified by the caller to
17471// add HTTP headers to the request.
17472func (c *ProjectsAgentSessionsDetectIntentCall) Header() http.Header {
17473	if c.header_ == nil {
17474		c.header_ = make(http.Header)
17475	}
17476	return c.header_
17477}
17478
17479func (c *ProjectsAgentSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
17480	reqHeaders := make(http.Header)
17481	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17482	for k, v := range c.header_ {
17483		reqHeaders[k] = v
17484	}
17485	reqHeaders.Set("User-Agent", c.s.userAgent())
17486	var body io.Reader = nil
17487	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1detectintentrequest)
17488	if err != nil {
17489		return nil, err
17490	}
17491	reqHeaders.Set("Content-Type", "application/json")
17492	c.urlParams_.Set("alt", alt)
17493	c.urlParams_.Set("prettyPrint", "false")
17494	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+session}:detectIntent")
17495	urls += "?" + c.urlParams_.Encode()
17496	req, err := http.NewRequest("POST", urls, body)
17497	if err != nil {
17498		return nil, err
17499	}
17500	req.Header = reqHeaders
17501	googleapi.Expand(req.URL, map[string]string{
17502		"session": c.sessionid,
17503	})
17504	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17505}
17506
17507// Do executes the "dialogflow.projects.agent.sessions.detectIntent" call.
17508// Exactly one of *GoogleCloudDialogflowV2beta1DetectIntentResponse or
17509// error will be non-nil. Any non-2xx status code is an error. Response
17510// headers are in either
17511// *GoogleCloudDialogflowV2beta1DetectIntentResponse.ServerResponse.Heade
17512// r or (if a response was returned at all) in
17513// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17514// whether the returned error was because http.StatusNotModified was
17515// returned.
17516func (c *ProjectsAgentSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1DetectIntentResponse, error) {
17517	gensupport.SetOptions(c.urlParams_, opts...)
17518	res, err := c.doRequest("json")
17519	if res != nil && res.StatusCode == http.StatusNotModified {
17520		if res.Body != nil {
17521			res.Body.Close()
17522		}
17523		return nil, &googleapi.Error{
17524			Code:   res.StatusCode,
17525			Header: res.Header,
17526		}
17527	}
17528	if err != nil {
17529		return nil, err
17530	}
17531	defer googleapi.CloseBody(res)
17532	if err := googleapi.CheckResponse(res); err != nil {
17533		return nil, err
17534	}
17535	ret := &GoogleCloudDialogflowV2beta1DetectIntentResponse{
17536		ServerResponse: googleapi.ServerResponse{
17537			Header:         res.Header,
17538			HTTPStatusCode: res.StatusCode,
17539		},
17540	}
17541	target := &ret
17542	if err := gensupport.DecodeResponse(target, res); err != nil {
17543		return nil, err
17544	}
17545	return ret, nil
17546	// {
17547	//   "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.",
17548	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}:detectIntent",
17549	//   "httpMethod": "POST",
17550	//   "id": "dialogflow.projects.agent.sessions.detectIntent",
17551	//   "parameterOrder": [
17552	//     "session"
17553	//   ],
17554	//   "parameters": {
17555	//     "session": {
17556	//       "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.",
17557	//       "location": "path",
17558	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
17559	//       "required": true,
17560	//       "type": "string"
17561	//     }
17562	//   },
17563	//   "path": "v2beta1/{+session}:detectIntent",
17564	//   "request": {
17565	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest"
17566	//   },
17567	//   "response": {
17568	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse"
17569	//   },
17570	//   "scopes": [
17571	//     "https://www.googleapis.com/auth/cloud-platform",
17572	//     "https://www.googleapis.com/auth/dialogflow"
17573	//   ]
17574	// }
17575
17576}
17577
17578// method id "dialogflow.projects.agent.sessions.contexts.create":
17579
17580type ProjectsAgentSessionsContextsCreateCall struct {
17581	s                                   *Service
17582	parent                              string
17583	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
17584	urlParams_                          gensupport.URLParams
17585	ctx_                                context.Context
17586	header_                             http.Header
17587}
17588
17589// Create: Creates a context.
17590//
17591// If the specified context already exists, overrides the context.
17592func (r *ProjectsAgentSessionsContextsService) Create(parent string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentSessionsContextsCreateCall {
17593	c := &ProjectsAgentSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17594	c.parent = parent
17595	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
17596	return c
17597}
17598
17599// Fields allows partial responses to be retrieved. See
17600// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17601// for more information.
17602func (c *ProjectsAgentSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsCreateCall {
17603	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17604	return c
17605}
17606
17607// Context sets the context to be used in this call's Do method. Any
17608// pending HTTP request will be aborted if the provided context is
17609// canceled.
17610func (c *ProjectsAgentSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsCreateCall {
17611	c.ctx_ = ctx
17612	return c
17613}
17614
17615// Header returns an http.Header that can be modified by the caller to
17616// add HTTP headers to the request.
17617func (c *ProjectsAgentSessionsContextsCreateCall) Header() http.Header {
17618	if c.header_ == nil {
17619		c.header_ = make(http.Header)
17620	}
17621	return c.header_
17622}
17623
17624func (c *ProjectsAgentSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
17625	reqHeaders := make(http.Header)
17626	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17627	for k, v := range c.header_ {
17628		reqHeaders[k] = v
17629	}
17630	reqHeaders.Set("User-Agent", c.s.userAgent())
17631	var body io.Reader = nil
17632	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
17633	if err != nil {
17634		return nil, err
17635	}
17636	reqHeaders.Set("Content-Type", "application/json")
17637	c.urlParams_.Set("alt", alt)
17638	c.urlParams_.Set("prettyPrint", "false")
17639	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
17640	urls += "?" + c.urlParams_.Encode()
17641	req, err := http.NewRequest("POST", urls, body)
17642	if err != nil {
17643		return nil, err
17644	}
17645	req.Header = reqHeaders
17646	googleapi.Expand(req.URL, map[string]string{
17647		"parent": c.parent,
17648	})
17649	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17650}
17651
17652// Do executes the "dialogflow.projects.agent.sessions.contexts.create" call.
17653// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
17654// non-nil. Any non-2xx status code is an error. Response headers are in
17655// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
17656// (if a response was returned at all) in
17657// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17658// whether the returned error was because http.StatusNotModified was
17659// returned.
17660func (c *ProjectsAgentSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
17661	gensupport.SetOptions(c.urlParams_, opts...)
17662	res, err := c.doRequest("json")
17663	if res != nil && res.StatusCode == http.StatusNotModified {
17664		if res.Body != nil {
17665			res.Body.Close()
17666		}
17667		return nil, &googleapi.Error{
17668			Code:   res.StatusCode,
17669			Header: res.Header,
17670		}
17671	}
17672	if err != nil {
17673		return nil, err
17674	}
17675	defer googleapi.CloseBody(res)
17676	if err := googleapi.CheckResponse(res); err != nil {
17677		return nil, err
17678	}
17679	ret := &GoogleCloudDialogflowV2beta1Context{
17680		ServerResponse: googleapi.ServerResponse{
17681			Header:         res.Header,
17682			HTTPStatusCode: res.StatusCode,
17683		},
17684	}
17685	target := &ret
17686	if err := gensupport.DecodeResponse(target, res); err != nil {
17687		return nil, err
17688	}
17689	return ret, nil
17690	// {
17691	//   "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.",
17692	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
17693	//   "httpMethod": "POST",
17694	//   "id": "dialogflow.projects.agent.sessions.contexts.create",
17695	//   "parameterOrder": [
17696	//     "parent"
17697	//   ],
17698	//   "parameters": {
17699	//     "parent": {
17700	//       "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.",
17701	//       "location": "path",
17702	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
17703	//       "required": true,
17704	//       "type": "string"
17705	//     }
17706	//   },
17707	//   "path": "v2beta1/{+parent}/contexts",
17708	//   "request": {
17709	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
17710	//   },
17711	//   "response": {
17712	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
17713	//   },
17714	//   "scopes": [
17715	//     "https://www.googleapis.com/auth/cloud-platform",
17716	//     "https://www.googleapis.com/auth/dialogflow"
17717	//   ]
17718	// }
17719
17720}
17721
17722// method id "dialogflow.projects.agent.sessions.contexts.delete":
17723
17724type ProjectsAgentSessionsContextsDeleteCall struct {
17725	s          *Service
17726	name       string
17727	urlParams_ gensupport.URLParams
17728	ctx_       context.Context
17729	header_    http.Header
17730}
17731
17732// Delete: Deletes the specified context.
17733func (r *ProjectsAgentSessionsContextsService) Delete(name string) *ProjectsAgentSessionsContextsDeleteCall {
17734	c := &ProjectsAgentSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17735	c.name = name
17736	return c
17737}
17738
17739// Fields allows partial responses to be retrieved. See
17740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17741// for more information.
17742func (c *ProjectsAgentSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsDeleteCall {
17743	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17744	return c
17745}
17746
17747// Context sets the context to be used in this call's Do method. Any
17748// pending HTTP request will be aborted if the provided context is
17749// canceled.
17750func (c *ProjectsAgentSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsDeleteCall {
17751	c.ctx_ = ctx
17752	return c
17753}
17754
17755// Header returns an http.Header that can be modified by the caller to
17756// add HTTP headers to the request.
17757func (c *ProjectsAgentSessionsContextsDeleteCall) Header() http.Header {
17758	if c.header_ == nil {
17759		c.header_ = make(http.Header)
17760	}
17761	return c.header_
17762}
17763
17764func (c *ProjectsAgentSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
17765	reqHeaders := make(http.Header)
17766	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17767	for k, v := range c.header_ {
17768		reqHeaders[k] = v
17769	}
17770	reqHeaders.Set("User-Agent", c.s.userAgent())
17771	var body io.Reader = nil
17772	c.urlParams_.Set("alt", alt)
17773	c.urlParams_.Set("prettyPrint", "false")
17774	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17775	urls += "?" + c.urlParams_.Encode()
17776	req, err := http.NewRequest("DELETE", urls, body)
17777	if err != nil {
17778		return nil, err
17779	}
17780	req.Header = reqHeaders
17781	googleapi.Expand(req.URL, map[string]string{
17782		"name": c.name,
17783	})
17784	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17785}
17786
17787// Do executes the "dialogflow.projects.agent.sessions.contexts.delete" call.
17788// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
17789// non-2xx status code is an error. Response headers are in either
17790// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
17791// returned at all) in error.(*googleapi.Error).Header. Use
17792// googleapi.IsNotModified to check whether the returned error was
17793// because http.StatusNotModified was returned.
17794func (c *ProjectsAgentSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
17795	gensupport.SetOptions(c.urlParams_, opts...)
17796	res, err := c.doRequest("json")
17797	if res != nil && res.StatusCode == http.StatusNotModified {
17798		if res.Body != nil {
17799			res.Body.Close()
17800		}
17801		return nil, &googleapi.Error{
17802			Code:   res.StatusCode,
17803			Header: res.Header,
17804		}
17805	}
17806	if err != nil {
17807		return nil, err
17808	}
17809	defer googleapi.CloseBody(res)
17810	if err := googleapi.CheckResponse(res); err != nil {
17811		return nil, err
17812	}
17813	ret := &GoogleProtobufEmpty{
17814		ServerResponse: googleapi.ServerResponse{
17815			Header:         res.Header,
17816			HTTPStatusCode: res.StatusCode,
17817		},
17818	}
17819	target := &ret
17820	if err := gensupport.DecodeResponse(target, res); err != nil {
17821		return nil, err
17822	}
17823	return ret, nil
17824	// {
17825	//   "description": "Deletes the specified context.",
17826	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
17827	//   "httpMethod": "DELETE",
17828	//   "id": "dialogflow.projects.agent.sessions.contexts.delete",
17829	//   "parameterOrder": [
17830	//     "name"
17831	//   ],
17832	//   "parameters": {
17833	//     "name": {
17834	//       "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.",
17835	//       "location": "path",
17836	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
17837	//       "required": true,
17838	//       "type": "string"
17839	//     }
17840	//   },
17841	//   "path": "v2beta1/{+name}",
17842	//   "response": {
17843	//     "$ref": "GoogleProtobufEmpty"
17844	//   },
17845	//   "scopes": [
17846	//     "https://www.googleapis.com/auth/cloud-platform",
17847	//     "https://www.googleapis.com/auth/dialogflow"
17848	//   ]
17849	// }
17850
17851}
17852
17853// method id "dialogflow.projects.agent.sessions.contexts.get":
17854
17855type ProjectsAgentSessionsContextsGetCall struct {
17856	s            *Service
17857	name         string
17858	urlParams_   gensupport.URLParams
17859	ifNoneMatch_ string
17860	ctx_         context.Context
17861	header_      http.Header
17862}
17863
17864// Get: Retrieves the specified context.
17865func (r *ProjectsAgentSessionsContextsService) Get(name string) *ProjectsAgentSessionsContextsGetCall {
17866	c := &ProjectsAgentSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17867	c.name = name
17868	return c
17869}
17870
17871// Fields allows partial responses to be retrieved. See
17872// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17873// for more information.
17874func (c *ProjectsAgentSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsGetCall {
17875	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17876	return c
17877}
17878
17879// IfNoneMatch sets the optional parameter which makes the operation
17880// fail if the object's ETag matches the given value. This is useful for
17881// getting updates only after the object has changed since the last
17882// request. Use googleapi.IsNotModified to check whether the response
17883// error from Do is the result of In-None-Match.
17884func (c *ProjectsAgentSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsGetCall {
17885	c.ifNoneMatch_ = entityTag
17886	return c
17887}
17888
17889// Context sets the context to be used in this call's Do method. Any
17890// pending HTTP request will be aborted if the provided context is
17891// canceled.
17892func (c *ProjectsAgentSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsGetCall {
17893	c.ctx_ = ctx
17894	return c
17895}
17896
17897// Header returns an http.Header that can be modified by the caller to
17898// add HTTP headers to the request.
17899func (c *ProjectsAgentSessionsContextsGetCall) Header() http.Header {
17900	if c.header_ == nil {
17901		c.header_ = make(http.Header)
17902	}
17903	return c.header_
17904}
17905
17906func (c *ProjectsAgentSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
17907	reqHeaders := make(http.Header)
17908	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
17909	for k, v := range c.header_ {
17910		reqHeaders[k] = v
17911	}
17912	reqHeaders.Set("User-Agent", c.s.userAgent())
17913	if c.ifNoneMatch_ != "" {
17914		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17915	}
17916	var body io.Reader = nil
17917	c.urlParams_.Set("alt", alt)
17918	c.urlParams_.Set("prettyPrint", "false")
17919	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17920	urls += "?" + c.urlParams_.Encode()
17921	req, err := http.NewRequest("GET", urls, body)
17922	if err != nil {
17923		return nil, err
17924	}
17925	req.Header = reqHeaders
17926	googleapi.Expand(req.URL, map[string]string{
17927		"name": c.name,
17928	})
17929	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17930}
17931
17932// Do executes the "dialogflow.projects.agent.sessions.contexts.get" call.
17933// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
17934// non-nil. Any non-2xx status code is an error. Response headers are in
17935// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
17936// (if a response was returned at all) in
17937// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17938// whether the returned error was because http.StatusNotModified was
17939// returned.
17940func (c *ProjectsAgentSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
17941	gensupport.SetOptions(c.urlParams_, opts...)
17942	res, err := c.doRequest("json")
17943	if res != nil && res.StatusCode == http.StatusNotModified {
17944		if res.Body != nil {
17945			res.Body.Close()
17946		}
17947		return nil, &googleapi.Error{
17948			Code:   res.StatusCode,
17949			Header: res.Header,
17950		}
17951	}
17952	if err != nil {
17953		return nil, err
17954	}
17955	defer googleapi.CloseBody(res)
17956	if err := googleapi.CheckResponse(res); err != nil {
17957		return nil, err
17958	}
17959	ret := &GoogleCloudDialogflowV2beta1Context{
17960		ServerResponse: googleapi.ServerResponse{
17961			Header:         res.Header,
17962			HTTPStatusCode: res.StatusCode,
17963		},
17964	}
17965	target := &ret
17966	if err := gensupport.DecodeResponse(target, res); err != nil {
17967		return nil, err
17968	}
17969	return ret, nil
17970	// {
17971	//   "description": "Retrieves the specified context.",
17972	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
17973	//   "httpMethod": "GET",
17974	//   "id": "dialogflow.projects.agent.sessions.contexts.get",
17975	//   "parameterOrder": [
17976	//     "name"
17977	//   ],
17978	//   "parameters": {
17979	//     "name": {
17980	//       "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.",
17981	//       "location": "path",
17982	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
17983	//       "required": true,
17984	//       "type": "string"
17985	//     }
17986	//   },
17987	//   "path": "v2beta1/{+name}",
17988	//   "response": {
17989	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
17990	//   },
17991	//   "scopes": [
17992	//     "https://www.googleapis.com/auth/cloud-platform",
17993	//     "https://www.googleapis.com/auth/dialogflow"
17994	//   ]
17995	// }
17996
17997}
17998
17999// method id "dialogflow.projects.agent.sessions.contexts.list":
18000
18001type ProjectsAgentSessionsContextsListCall struct {
18002	s            *Service
18003	parent       string
18004	urlParams_   gensupport.URLParams
18005	ifNoneMatch_ string
18006	ctx_         context.Context
18007	header_      http.Header
18008}
18009
18010// List: Returns the list of all contexts in the specified session.
18011func (r *ProjectsAgentSessionsContextsService) List(parent string) *ProjectsAgentSessionsContextsListCall {
18012	c := &ProjectsAgentSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18013	c.parent = parent
18014	return c
18015}
18016
18017// PageSize sets the optional parameter "pageSize": The maximum number
18018// of items to return in a single page. By
18019// default 100 and at most 1000.
18020func (c *ProjectsAgentSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentSessionsContextsListCall {
18021	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18022	return c
18023}
18024
18025// PageToken sets the optional parameter "pageToken": The
18026// next_page_token value returned from a previous list request.
18027func (c *ProjectsAgentSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentSessionsContextsListCall {
18028	c.urlParams_.Set("pageToken", pageToken)
18029	return c
18030}
18031
18032// Fields allows partial responses to be retrieved. See
18033// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18034// for more information.
18035func (c *ProjectsAgentSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsListCall {
18036	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18037	return c
18038}
18039
18040// IfNoneMatch sets the optional parameter which makes the operation
18041// fail if the object's ETag matches the given value. This is useful for
18042// getting updates only after the object has changed since the last
18043// request. Use googleapi.IsNotModified to check whether the response
18044// error from Do is the result of In-None-Match.
18045func (c *ProjectsAgentSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsListCall {
18046	c.ifNoneMatch_ = entityTag
18047	return c
18048}
18049
18050// Context sets the context to be used in this call's Do method. Any
18051// pending HTTP request will be aborted if the provided context is
18052// canceled.
18053func (c *ProjectsAgentSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsListCall {
18054	c.ctx_ = ctx
18055	return c
18056}
18057
18058// Header returns an http.Header that can be modified by the caller to
18059// add HTTP headers to the request.
18060func (c *ProjectsAgentSessionsContextsListCall) Header() http.Header {
18061	if c.header_ == nil {
18062		c.header_ = make(http.Header)
18063	}
18064	return c.header_
18065}
18066
18067func (c *ProjectsAgentSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
18068	reqHeaders := make(http.Header)
18069	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18070	for k, v := range c.header_ {
18071		reqHeaders[k] = v
18072	}
18073	reqHeaders.Set("User-Agent", c.s.userAgent())
18074	if c.ifNoneMatch_ != "" {
18075		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18076	}
18077	var body io.Reader = nil
18078	c.urlParams_.Set("alt", alt)
18079	c.urlParams_.Set("prettyPrint", "false")
18080	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
18081	urls += "?" + c.urlParams_.Encode()
18082	req, err := http.NewRequest("GET", urls, body)
18083	if err != nil {
18084		return nil, err
18085	}
18086	req.Header = reqHeaders
18087	googleapi.Expand(req.URL, map[string]string{
18088		"parent": c.parent,
18089	})
18090	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18091}
18092
18093// Do executes the "dialogflow.projects.agent.sessions.contexts.list" call.
18094// Exactly one of *GoogleCloudDialogflowV2beta1ListContextsResponse or
18095// error will be non-nil. Any non-2xx status code is an error. Response
18096// headers are in either
18097// *GoogleCloudDialogflowV2beta1ListContextsResponse.ServerResponse.Heade
18098// r or (if a response was returned at all) in
18099// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18100// whether the returned error was because http.StatusNotModified was
18101// returned.
18102func (c *ProjectsAgentSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListContextsResponse, error) {
18103	gensupport.SetOptions(c.urlParams_, opts...)
18104	res, err := c.doRequest("json")
18105	if res != nil && res.StatusCode == http.StatusNotModified {
18106		if res.Body != nil {
18107			res.Body.Close()
18108		}
18109		return nil, &googleapi.Error{
18110			Code:   res.StatusCode,
18111			Header: res.Header,
18112		}
18113	}
18114	if err != nil {
18115		return nil, err
18116	}
18117	defer googleapi.CloseBody(res)
18118	if err := googleapi.CheckResponse(res); err != nil {
18119		return nil, err
18120	}
18121	ret := &GoogleCloudDialogflowV2beta1ListContextsResponse{
18122		ServerResponse: googleapi.ServerResponse{
18123			Header:         res.Header,
18124			HTTPStatusCode: res.StatusCode,
18125		},
18126	}
18127	target := &ret
18128	if err := gensupport.DecodeResponse(target, res); err != nil {
18129		return nil, err
18130	}
18131	return ret, nil
18132	// {
18133	//   "description": "Returns the list of all contexts in the specified session.",
18134	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
18135	//   "httpMethod": "GET",
18136	//   "id": "dialogflow.projects.agent.sessions.contexts.list",
18137	//   "parameterOrder": [
18138	//     "parent"
18139	//   ],
18140	//   "parameters": {
18141	//     "pageSize": {
18142	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
18143	//       "format": "int32",
18144	//       "location": "query",
18145	//       "type": "integer"
18146	//     },
18147	//     "pageToken": {
18148	//       "description": "Optional. The next_page_token value returned from a previous list request.",
18149	//       "location": "query",
18150	//       "type": "string"
18151	//     },
18152	//     "parent": {
18153	//       "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.",
18154	//       "location": "path",
18155	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
18156	//       "required": true,
18157	//       "type": "string"
18158	//     }
18159	//   },
18160	//   "path": "v2beta1/{+parent}/contexts",
18161	//   "response": {
18162	//     "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse"
18163	//   },
18164	//   "scopes": [
18165	//     "https://www.googleapis.com/auth/cloud-platform",
18166	//     "https://www.googleapis.com/auth/dialogflow"
18167	//   ]
18168	// }
18169
18170}
18171
18172// Pages invokes f for each page of results.
18173// A non-nil error returned from f will halt the iteration.
18174// The provided context supersedes any context provided to the Context method.
18175func (c *ProjectsAgentSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListContextsResponse) error) error {
18176	c.ctx_ = ctx
18177	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18178	for {
18179		x, err := c.Do()
18180		if err != nil {
18181			return err
18182		}
18183		if err := f(x); err != nil {
18184			return err
18185		}
18186		if x.NextPageToken == "" {
18187			return nil
18188		}
18189		c.PageToken(x.NextPageToken)
18190	}
18191}
18192
18193// method id "dialogflow.projects.agent.sessions.contexts.patch":
18194
18195type ProjectsAgentSessionsContextsPatchCall struct {
18196	s                                   *Service
18197	nameid                              string
18198	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
18199	urlParams_                          gensupport.URLParams
18200	ctx_                                context.Context
18201	header_                             http.Header
18202}
18203
18204// Patch: Updates the specified context.
18205func (r *ProjectsAgentSessionsContextsService) Patch(nameid string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentSessionsContextsPatchCall {
18206	c := &ProjectsAgentSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18207	c.nameid = nameid
18208	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
18209	return c
18210}
18211
18212// UpdateMask sets the optional parameter "updateMask": The mask to
18213// control which fields get updated.
18214func (c *ProjectsAgentSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsContextsPatchCall {
18215	c.urlParams_.Set("updateMask", updateMask)
18216	return c
18217}
18218
18219// Fields allows partial responses to be retrieved. See
18220// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18221// for more information.
18222func (c *ProjectsAgentSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsPatchCall {
18223	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18224	return c
18225}
18226
18227// Context sets the context to be used in this call's Do method. Any
18228// pending HTTP request will be aborted if the provided context is
18229// canceled.
18230func (c *ProjectsAgentSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsPatchCall {
18231	c.ctx_ = ctx
18232	return c
18233}
18234
18235// Header returns an http.Header that can be modified by the caller to
18236// add HTTP headers to the request.
18237func (c *ProjectsAgentSessionsContextsPatchCall) Header() http.Header {
18238	if c.header_ == nil {
18239		c.header_ = make(http.Header)
18240	}
18241	return c.header_
18242}
18243
18244func (c *ProjectsAgentSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
18245	reqHeaders := make(http.Header)
18246	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18247	for k, v := range c.header_ {
18248		reqHeaders[k] = v
18249	}
18250	reqHeaders.Set("User-Agent", c.s.userAgent())
18251	var body io.Reader = nil
18252	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
18253	if err != nil {
18254		return nil, err
18255	}
18256	reqHeaders.Set("Content-Type", "application/json")
18257	c.urlParams_.Set("alt", alt)
18258	c.urlParams_.Set("prettyPrint", "false")
18259	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
18260	urls += "?" + c.urlParams_.Encode()
18261	req, err := http.NewRequest("PATCH", urls, body)
18262	if err != nil {
18263		return nil, err
18264	}
18265	req.Header = reqHeaders
18266	googleapi.Expand(req.URL, map[string]string{
18267		"name": c.nameid,
18268	})
18269	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18270}
18271
18272// Do executes the "dialogflow.projects.agent.sessions.contexts.patch" call.
18273// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
18274// non-nil. Any non-2xx status code is an error. Response headers are in
18275// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
18276// (if a response was returned at all) in
18277// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18278// whether the returned error was because http.StatusNotModified was
18279// returned.
18280func (c *ProjectsAgentSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
18281	gensupport.SetOptions(c.urlParams_, opts...)
18282	res, err := c.doRequest("json")
18283	if res != nil && res.StatusCode == http.StatusNotModified {
18284		if res.Body != nil {
18285			res.Body.Close()
18286		}
18287		return nil, &googleapi.Error{
18288			Code:   res.StatusCode,
18289			Header: res.Header,
18290		}
18291	}
18292	if err != nil {
18293		return nil, err
18294	}
18295	defer googleapi.CloseBody(res)
18296	if err := googleapi.CheckResponse(res); err != nil {
18297		return nil, err
18298	}
18299	ret := &GoogleCloudDialogflowV2beta1Context{
18300		ServerResponse: googleapi.ServerResponse{
18301			Header:         res.Header,
18302			HTTPStatusCode: res.StatusCode,
18303		},
18304	}
18305	target := &ret
18306	if err := gensupport.DecodeResponse(target, res); err != nil {
18307		return nil, err
18308	}
18309	return ret, nil
18310	// {
18311	//   "description": "Updates the specified context.",
18312	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
18313	//   "httpMethod": "PATCH",
18314	//   "id": "dialogflow.projects.agent.sessions.contexts.patch",
18315	//   "parameterOrder": [
18316	//     "name"
18317	//   ],
18318	//   "parameters": {
18319	//     "name": {
18320	//       "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`,\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\n\nThe `Context ID` is always converted to lowercase, may only contain\ncharacters in a-zA-Z0-9_-% and may be at most 250 bytes long.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\nThe following context names are reserved for internal use by Dialogflow.\nYou should not use these contexts or create contexts with these names:\n\n* `__system_counters__`\n* `*_id_dialog_context`\n* `*_dialog_params_size`",
18321	//       "location": "path",
18322	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
18323	//       "required": true,
18324	//       "type": "string"
18325	//     },
18326	//     "updateMask": {
18327	//       "description": "Optional. The mask to control which fields get updated.",
18328	//       "format": "google-fieldmask",
18329	//       "location": "query",
18330	//       "type": "string"
18331	//     }
18332	//   },
18333	//   "path": "v2beta1/{+name}",
18334	//   "request": {
18335	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
18336	//   },
18337	//   "response": {
18338	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
18339	//   },
18340	//   "scopes": [
18341	//     "https://www.googleapis.com/auth/cloud-platform",
18342	//     "https://www.googleapis.com/auth/dialogflow"
18343	//   ]
18344	// }
18345
18346}
18347
18348// method id "dialogflow.projects.agent.sessions.entityTypes.create":
18349
18350type ProjectsAgentSessionsEntityTypesCreateCall struct {
18351	s                                             *Service
18352	parent                                        string
18353	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
18354	urlParams_                                    gensupport.URLParams
18355	ctx_                                          context.Context
18356	header_                                       http.Header
18357}
18358
18359// Create: Creates a session entity type.
18360//
18361// If the specified session entity type already exists, overrides
18362// the
18363// session entity type.
18364//
18365// This method doesn't work with Google Assistant integration.
18366// Contact Dialogflow support if you need to use session entities
18367// with Google Assistant integration.
18368func (r *ProjectsAgentSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentSessionsEntityTypesCreateCall {
18369	c := &ProjectsAgentSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18370	c.parent = parent
18371	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
18372	return c
18373}
18374
18375// Fields allows partial responses to be retrieved. See
18376// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18377// for more information.
18378func (c *ProjectsAgentSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesCreateCall {
18379	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18380	return c
18381}
18382
18383// Context sets the context to be used in this call's Do method. Any
18384// pending HTTP request will be aborted if the provided context is
18385// canceled.
18386func (c *ProjectsAgentSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesCreateCall {
18387	c.ctx_ = ctx
18388	return c
18389}
18390
18391// Header returns an http.Header that can be modified by the caller to
18392// add HTTP headers to the request.
18393func (c *ProjectsAgentSessionsEntityTypesCreateCall) Header() http.Header {
18394	if c.header_ == nil {
18395		c.header_ = make(http.Header)
18396	}
18397	return c.header_
18398}
18399
18400func (c *ProjectsAgentSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
18401	reqHeaders := make(http.Header)
18402	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18403	for k, v := range c.header_ {
18404		reqHeaders[k] = v
18405	}
18406	reqHeaders.Set("User-Agent", c.s.userAgent())
18407	var body io.Reader = nil
18408	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
18409	if err != nil {
18410		return nil, err
18411	}
18412	reqHeaders.Set("Content-Type", "application/json")
18413	c.urlParams_.Set("alt", alt)
18414	c.urlParams_.Set("prettyPrint", "false")
18415	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
18416	urls += "?" + c.urlParams_.Encode()
18417	req, err := http.NewRequest("POST", urls, body)
18418	if err != nil {
18419		return nil, err
18420	}
18421	req.Header = reqHeaders
18422	googleapi.Expand(req.URL, map[string]string{
18423		"parent": c.parent,
18424	})
18425	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18426}
18427
18428// Do executes the "dialogflow.projects.agent.sessions.entityTypes.create" call.
18429// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
18430// error will be non-nil. Any non-2xx status code is an error. Response
18431// headers are in either
18432// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
18433// or (if a response was returned at all) in
18434// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18435// whether the returned error was because http.StatusNotModified was
18436// returned.
18437func (c *ProjectsAgentSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
18438	gensupport.SetOptions(c.urlParams_, opts...)
18439	res, err := c.doRequest("json")
18440	if res != nil && res.StatusCode == http.StatusNotModified {
18441		if res.Body != nil {
18442			res.Body.Close()
18443		}
18444		return nil, &googleapi.Error{
18445			Code:   res.StatusCode,
18446			Header: res.Header,
18447		}
18448	}
18449	if err != nil {
18450		return nil, err
18451	}
18452	defer googleapi.CloseBody(res)
18453	if err := googleapi.CheckResponse(res); err != nil {
18454		return nil, err
18455	}
18456	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
18457		ServerResponse: googleapi.ServerResponse{
18458			Header:         res.Header,
18459			HTTPStatusCode: res.StatusCode,
18460		},
18461	}
18462	target := &ret
18463	if err := gensupport.DecodeResponse(target, res); err != nil {
18464		return nil, err
18465	}
18466	return ret, nil
18467	// {
18468	//   "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.",
18469	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes",
18470	//   "httpMethod": "POST",
18471	//   "id": "dialogflow.projects.agent.sessions.entityTypes.create",
18472	//   "parameterOrder": [
18473	//     "parent"
18474	//   ],
18475	//   "parameters": {
18476	//     "parent": {
18477	//       "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.",
18478	//       "location": "path",
18479	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
18480	//       "required": true,
18481	//       "type": "string"
18482	//     }
18483	//   },
18484	//   "path": "v2beta1/{+parent}/entityTypes",
18485	//   "request": {
18486	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
18487	//   },
18488	//   "response": {
18489	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
18490	//   },
18491	//   "scopes": [
18492	//     "https://www.googleapis.com/auth/cloud-platform",
18493	//     "https://www.googleapis.com/auth/dialogflow"
18494	//   ]
18495	// }
18496
18497}
18498
18499// method id "dialogflow.projects.agent.sessions.entityTypes.delete":
18500
18501type ProjectsAgentSessionsEntityTypesDeleteCall struct {
18502	s          *Service
18503	name       string
18504	urlParams_ gensupport.URLParams
18505	ctx_       context.Context
18506	header_    http.Header
18507}
18508
18509// Delete: Deletes the specified session entity type.
18510//
18511// This method doesn't work with Google Assistant integration.
18512// Contact Dialogflow support if you need to use session entities
18513// with Google Assistant integration.
18514func (r *ProjectsAgentSessionsEntityTypesService) Delete(name string) *ProjectsAgentSessionsEntityTypesDeleteCall {
18515	c := &ProjectsAgentSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18516	c.name = name
18517	return c
18518}
18519
18520// Fields allows partial responses to be retrieved. See
18521// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18522// for more information.
18523func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesDeleteCall {
18524	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18525	return c
18526}
18527
18528// Context sets the context to be used in this call's Do method. Any
18529// pending HTTP request will be aborted if the provided context is
18530// canceled.
18531func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesDeleteCall {
18532	c.ctx_ = ctx
18533	return c
18534}
18535
18536// Header returns an http.Header that can be modified by the caller to
18537// add HTTP headers to the request.
18538func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Header() http.Header {
18539	if c.header_ == nil {
18540		c.header_ = make(http.Header)
18541	}
18542	return c.header_
18543}
18544
18545func (c *ProjectsAgentSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
18546	reqHeaders := make(http.Header)
18547	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18548	for k, v := range c.header_ {
18549		reqHeaders[k] = v
18550	}
18551	reqHeaders.Set("User-Agent", c.s.userAgent())
18552	var body io.Reader = nil
18553	c.urlParams_.Set("alt", alt)
18554	c.urlParams_.Set("prettyPrint", "false")
18555	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
18556	urls += "?" + c.urlParams_.Encode()
18557	req, err := http.NewRequest("DELETE", urls, body)
18558	if err != nil {
18559		return nil, err
18560	}
18561	req.Header = reqHeaders
18562	googleapi.Expand(req.URL, map[string]string{
18563		"name": c.name,
18564	})
18565	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18566}
18567
18568// Do executes the "dialogflow.projects.agent.sessions.entityTypes.delete" call.
18569// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
18570// non-2xx status code is an error. Response headers are in either
18571// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
18572// returned at all) in error.(*googleapi.Error).Header. Use
18573// googleapi.IsNotModified to check whether the returned error was
18574// because http.StatusNotModified was returned.
18575func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
18576	gensupport.SetOptions(c.urlParams_, opts...)
18577	res, err := c.doRequest("json")
18578	if res != nil && res.StatusCode == http.StatusNotModified {
18579		if res.Body != nil {
18580			res.Body.Close()
18581		}
18582		return nil, &googleapi.Error{
18583			Code:   res.StatusCode,
18584			Header: res.Header,
18585		}
18586	}
18587	if err != nil {
18588		return nil, err
18589	}
18590	defer googleapi.CloseBody(res)
18591	if err := googleapi.CheckResponse(res); err != nil {
18592		return nil, err
18593	}
18594	ret := &GoogleProtobufEmpty{
18595		ServerResponse: googleapi.ServerResponse{
18596			Header:         res.Header,
18597			HTTPStatusCode: res.StatusCode,
18598		},
18599	}
18600	target := &ret
18601	if err := gensupport.DecodeResponse(target, res); err != nil {
18602		return nil, err
18603	}
18604	return ret, nil
18605	// {
18606	//   "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.",
18607	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
18608	//   "httpMethod": "DELETE",
18609	//   "id": "dialogflow.projects.agent.sessions.entityTypes.delete",
18610	//   "parameterOrder": [
18611	//     "name"
18612	//   ],
18613	//   "parameters": {
18614	//     "name": {
18615	//       "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.",
18616	//       "location": "path",
18617	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
18618	//       "required": true,
18619	//       "type": "string"
18620	//     }
18621	//   },
18622	//   "path": "v2beta1/{+name}",
18623	//   "response": {
18624	//     "$ref": "GoogleProtobufEmpty"
18625	//   },
18626	//   "scopes": [
18627	//     "https://www.googleapis.com/auth/cloud-platform",
18628	//     "https://www.googleapis.com/auth/dialogflow"
18629	//   ]
18630	// }
18631
18632}
18633
18634// method id "dialogflow.projects.agent.sessions.entityTypes.get":
18635
18636type ProjectsAgentSessionsEntityTypesGetCall struct {
18637	s            *Service
18638	name         string
18639	urlParams_   gensupport.URLParams
18640	ifNoneMatch_ string
18641	ctx_         context.Context
18642	header_      http.Header
18643}
18644
18645// Get: Retrieves the specified session entity type.
18646//
18647// This method doesn't work with Google Assistant integration.
18648// Contact Dialogflow support if you need to use session entities
18649// with Google Assistant integration.
18650func (r *ProjectsAgentSessionsEntityTypesService) Get(name string) *ProjectsAgentSessionsEntityTypesGetCall {
18651	c := &ProjectsAgentSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18652	c.name = name
18653	return c
18654}
18655
18656// Fields allows partial responses to be retrieved. See
18657// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18658// for more information.
18659func (c *ProjectsAgentSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesGetCall {
18660	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18661	return c
18662}
18663
18664// IfNoneMatch sets the optional parameter which makes the operation
18665// fail if the object's ETag matches the given value. This is useful for
18666// getting updates only after the object has changed since the last
18667// request. Use googleapi.IsNotModified to check whether the response
18668// error from Do is the result of In-None-Match.
18669func (c *ProjectsAgentSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesGetCall {
18670	c.ifNoneMatch_ = entityTag
18671	return c
18672}
18673
18674// Context sets the context to be used in this call's Do method. Any
18675// pending HTTP request will be aborted if the provided context is
18676// canceled.
18677func (c *ProjectsAgentSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesGetCall {
18678	c.ctx_ = ctx
18679	return c
18680}
18681
18682// Header returns an http.Header that can be modified by the caller to
18683// add HTTP headers to the request.
18684func (c *ProjectsAgentSessionsEntityTypesGetCall) Header() http.Header {
18685	if c.header_ == nil {
18686		c.header_ = make(http.Header)
18687	}
18688	return c.header_
18689}
18690
18691func (c *ProjectsAgentSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
18692	reqHeaders := make(http.Header)
18693	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18694	for k, v := range c.header_ {
18695		reqHeaders[k] = v
18696	}
18697	reqHeaders.Set("User-Agent", c.s.userAgent())
18698	if c.ifNoneMatch_ != "" {
18699		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18700	}
18701	var body io.Reader = nil
18702	c.urlParams_.Set("alt", alt)
18703	c.urlParams_.Set("prettyPrint", "false")
18704	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
18705	urls += "?" + c.urlParams_.Encode()
18706	req, err := http.NewRequest("GET", urls, body)
18707	if err != nil {
18708		return nil, err
18709	}
18710	req.Header = reqHeaders
18711	googleapi.Expand(req.URL, map[string]string{
18712		"name": c.name,
18713	})
18714	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18715}
18716
18717// Do executes the "dialogflow.projects.agent.sessions.entityTypes.get" call.
18718// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
18719// error will be non-nil. Any non-2xx status code is an error. Response
18720// headers are in either
18721// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
18722// or (if a response was returned at all) in
18723// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18724// whether the returned error was because http.StatusNotModified was
18725// returned.
18726func (c *ProjectsAgentSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
18727	gensupport.SetOptions(c.urlParams_, opts...)
18728	res, err := c.doRequest("json")
18729	if res != nil && res.StatusCode == http.StatusNotModified {
18730		if res.Body != nil {
18731			res.Body.Close()
18732		}
18733		return nil, &googleapi.Error{
18734			Code:   res.StatusCode,
18735			Header: res.Header,
18736		}
18737	}
18738	if err != nil {
18739		return nil, err
18740	}
18741	defer googleapi.CloseBody(res)
18742	if err := googleapi.CheckResponse(res); err != nil {
18743		return nil, err
18744	}
18745	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
18746		ServerResponse: googleapi.ServerResponse{
18747			Header:         res.Header,
18748			HTTPStatusCode: res.StatusCode,
18749		},
18750	}
18751	target := &ret
18752	if err := gensupport.DecodeResponse(target, res); err != nil {
18753		return nil, err
18754	}
18755	return ret, nil
18756	// {
18757	//   "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.",
18758	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
18759	//   "httpMethod": "GET",
18760	//   "id": "dialogflow.projects.agent.sessions.entityTypes.get",
18761	//   "parameterOrder": [
18762	//     "name"
18763	//   ],
18764	//   "parameters": {
18765	//     "name": {
18766	//       "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.",
18767	//       "location": "path",
18768	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
18769	//       "required": true,
18770	//       "type": "string"
18771	//     }
18772	//   },
18773	//   "path": "v2beta1/{+name}",
18774	//   "response": {
18775	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
18776	//   },
18777	//   "scopes": [
18778	//     "https://www.googleapis.com/auth/cloud-platform",
18779	//     "https://www.googleapis.com/auth/dialogflow"
18780	//   ]
18781	// }
18782
18783}
18784
18785// method id "dialogflow.projects.agent.sessions.entityTypes.list":
18786
18787type ProjectsAgentSessionsEntityTypesListCall struct {
18788	s            *Service
18789	parent       string
18790	urlParams_   gensupport.URLParams
18791	ifNoneMatch_ string
18792	ctx_         context.Context
18793	header_      http.Header
18794}
18795
18796// List: Returns the list of all session entity types in the specified
18797// session.
18798//
18799// This method doesn't work with Google Assistant integration.
18800// Contact Dialogflow support if you need to use session entities
18801// with Google Assistant integration.
18802func (r *ProjectsAgentSessionsEntityTypesService) List(parent string) *ProjectsAgentSessionsEntityTypesListCall {
18803	c := &ProjectsAgentSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18804	c.parent = parent
18805	return c
18806}
18807
18808// PageSize sets the optional parameter "pageSize": The maximum number
18809// of items to return in a single page. By
18810// default 100 and at most 1000.
18811func (c *ProjectsAgentSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentSessionsEntityTypesListCall {
18812	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18813	return c
18814}
18815
18816// PageToken sets the optional parameter "pageToken": The
18817// next_page_token value returned from a previous list request.
18818func (c *ProjectsAgentSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentSessionsEntityTypesListCall {
18819	c.urlParams_.Set("pageToken", pageToken)
18820	return c
18821}
18822
18823// Fields allows partial responses to be retrieved. See
18824// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18825// for more information.
18826func (c *ProjectsAgentSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesListCall {
18827	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18828	return c
18829}
18830
18831// IfNoneMatch sets the optional parameter which makes the operation
18832// fail if the object's ETag matches the given value. This is useful for
18833// getting updates only after the object has changed since the last
18834// request. Use googleapi.IsNotModified to check whether the response
18835// error from Do is the result of In-None-Match.
18836func (c *ProjectsAgentSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesListCall {
18837	c.ifNoneMatch_ = entityTag
18838	return c
18839}
18840
18841// Context sets the context to be used in this call's Do method. Any
18842// pending HTTP request will be aborted if the provided context is
18843// canceled.
18844func (c *ProjectsAgentSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesListCall {
18845	c.ctx_ = ctx
18846	return c
18847}
18848
18849// Header returns an http.Header that can be modified by the caller to
18850// add HTTP headers to the request.
18851func (c *ProjectsAgentSessionsEntityTypesListCall) Header() http.Header {
18852	if c.header_ == nil {
18853		c.header_ = make(http.Header)
18854	}
18855	return c.header_
18856}
18857
18858func (c *ProjectsAgentSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
18859	reqHeaders := make(http.Header)
18860	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
18861	for k, v := range c.header_ {
18862		reqHeaders[k] = v
18863	}
18864	reqHeaders.Set("User-Agent", c.s.userAgent())
18865	if c.ifNoneMatch_ != "" {
18866		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18867	}
18868	var body io.Reader = nil
18869	c.urlParams_.Set("alt", alt)
18870	c.urlParams_.Set("prettyPrint", "false")
18871	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
18872	urls += "?" + c.urlParams_.Encode()
18873	req, err := http.NewRequest("GET", urls, body)
18874	if err != nil {
18875		return nil, err
18876	}
18877	req.Header = reqHeaders
18878	googleapi.Expand(req.URL, map[string]string{
18879		"parent": c.parent,
18880	})
18881	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18882}
18883
18884// Do executes the "dialogflow.projects.agent.sessions.entityTypes.list" call.
18885// Exactly one of
18886// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse or error
18887// will be non-nil. Any non-2xx status code is an error. Response
18888// headers are in either
18889// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse.ServerResp
18890// onse.Header or (if a response was returned at all) in
18891// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18892// whether the returned error was because http.StatusNotModified was
18893// returned.
18894func (c *ProjectsAgentSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse, error) {
18895	gensupport.SetOptions(c.urlParams_, opts...)
18896	res, err := c.doRequest("json")
18897	if res != nil && res.StatusCode == http.StatusNotModified {
18898		if res.Body != nil {
18899			res.Body.Close()
18900		}
18901		return nil, &googleapi.Error{
18902			Code:   res.StatusCode,
18903			Header: res.Header,
18904		}
18905	}
18906	if err != nil {
18907		return nil, err
18908	}
18909	defer googleapi.CloseBody(res)
18910	if err := googleapi.CheckResponse(res); err != nil {
18911		return nil, err
18912	}
18913	ret := &GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse{
18914		ServerResponse: googleapi.ServerResponse{
18915			Header:         res.Header,
18916			HTTPStatusCode: res.StatusCode,
18917		},
18918	}
18919	target := &ret
18920	if err := gensupport.DecodeResponse(target, res); err != nil {
18921		return nil, err
18922	}
18923	return ret, nil
18924	// {
18925	//   "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.",
18926	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes",
18927	//   "httpMethod": "GET",
18928	//   "id": "dialogflow.projects.agent.sessions.entityTypes.list",
18929	//   "parameterOrder": [
18930	//     "parent"
18931	//   ],
18932	//   "parameters": {
18933	//     "pageSize": {
18934	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
18935	//       "format": "int32",
18936	//       "location": "query",
18937	//       "type": "integer"
18938	//     },
18939	//     "pageToken": {
18940	//       "description": "Optional. The next_page_token value returned from a previous list request.",
18941	//       "location": "query",
18942	//       "type": "string"
18943	//     },
18944	//     "parent": {
18945	//       "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.",
18946	//       "location": "path",
18947	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
18948	//       "required": true,
18949	//       "type": "string"
18950	//     }
18951	//   },
18952	//   "path": "v2beta1/{+parent}/entityTypes",
18953	//   "response": {
18954	//     "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse"
18955	//   },
18956	//   "scopes": [
18957	//     "https://www.googleapis.com/auth/cloud-platform",
18958	//     "https://www.googleapis.com/auth/dialogflow"
18959	//   ]
18960	// }
18961
18962}
18963
18964// Pages invokes f for each page of results.
18965// A non-nil error returned from f will halt the iteration.
18966// The provided context supersedes any context provided to the Context method.
18967func (c *ProjectsAgentSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) error) error {
18968	c.ctx_ = ctx
18969	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18970	for {
18971		x, err := c.Do()
18972		if err != nil {
18973			return err
18974		}
18975		if err := f(x); err != nil {
18976			return err
18977		}
18978		if x.NextPageToken == "" {
18979			return nil
18980		}
18981		c.PageToken(x.NextPageToken)
18982	}
18983}
18984
18985// method id "dialogflow.projects.agent.sessions.entityTypes.patch":
18986
18987type ProjectsAgentSessionsEntityTypesPatchCall struct {
18988	s                                             *Service
18989	nameid                                        string
18990	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
18991	urlParams_                                    gensupport.URLParams
18992	ctx_                                          context.Context
18993	header_                                       http.Header
18994}
18995
18996// Patch: Updates the specified session entity type.
18997//
18998// This method doesn't work with Google Assistant integration.
18999// Contact Dialogflow support if you need to use session entities
19000// with Google Assistant integration.
19001func (r *ProjectsAgentSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentSessionsEntityTypesPatchCall {
19002	c := &ProjectsAgentSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19003	c.nameid = nameid
19004	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
19005	return c
19006}
19007
19008// UpdateMask sets the optional parameter "updateMask": The mask to
19009// control which fields get updated.
19010func (c *ProjectsAgentSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsEntityTypesPatchCall {
19011	c.urlParams_.Set("updateMask", updateMask)
19012	return c
19013}
19014
19015// Fields allows partial responses to be retrieved. See
19016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19017// for more information.
19018func (c *ProjectsAgentSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesPatchCall {
19019	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19020	return c
19021}
19022
19023// Context sets the context to be used in this call's Do method. Any
19024// pending HTTP request will be aborted if the provided context is
19025// canceled.
19026func (c *ProjectsAgentSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesPatchCall {
19027	c.ctx_ = ctx
19028	return c
19029}
19030
19031// Header returns an http.Header that can be modified by the caller to
19032// add HTTP headers to the request.
19033func (c *ProjectsAgentSessionsEntityTypesPatchCall) Header() http.Header {
19034	if c.header_ == nil {
19035		c.header_ = make(http.Header)
19036	}
19037	return c.header_
19038}
19039
19040func (c *ProjectsAgentSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
19041	reqHeaders := make(http.Header)
19042	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19043	for k, v := range c.header_ {
19044		reqHeaders[k] = v
19045	}
19046	reqHeaders.Set("User-Agent", c.s.userAgent())
19047	var body io.Reader = nil
19048	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
19049	if err != nil {
19050		return nil, err
19051	}
19052	reqHeaders.Set("Content-Type", "application/json")
19053	c.urlParams_.Set("alt", alt)
19054	c.urlParams_.Set("prettyPrint", "false")
19055	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
19056	urls += "?" + c.urlParams_.Encode()
19057	req, err := http.NewRequest("PATCH", urls, body)
19058	if err != nil {
19059		return nil, err
19060	}
19061	req.Header = reqHeaders
19062	googleapi.Expand(req.URL, map[string]string{
19063		"name": c.nameid,
19064	})
19065	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19066}
19067
19068// Do executes the "dialogflow.projects.agent.sessions.entityTypes.patch" call.
19069// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
19070// error will be non-nil. Any non-2xx status code is an error. Response
19071// headers are in either
19072// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
19073// or (if a response was returned at all) in
19074// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19075// whether the returned error was because http.StatusNotModified was
19076// returned.
19077func (c *ProjectsAgentSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
19078	gensupport.SetOptions(c.urlParams_, opts...)
19079	res, err := c.doRequest("json")
19080	if res != nil && res.StatusCode == http.StatusNotModified {
19081		if res.Body != nil {
19082			res.Body.Close()
19083		}
19084		return nil, &googleapi.Error{
19085			Code:   res.StatusCode,
19086			Header: res.Header,
19087		}
19088	}
19089	if err != nil {
19090		return nil, err
19091	}
19092	defer googleapi.CloseBody(res)
19093	if err := googleapi.CheckResponse(res); err != nil {
19094		return nil, err
19095	}
19096	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
19097		ServerResponse: googleapi.ServerResponse{
19098			Header:         res.Header,
19099			HTTPStatusCode: res.StatusCode,
19100		},
19101	}
19102	target := &ret
19103	if err := gensupport.DecodeResponse(target, res); err != nil {
19104		return nil, err
19105	}
19106	return ret, nil
19107	// {
19108	//   "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.",
19109	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
19110	//   "httpMethod": "PATCH",
19111	//   "id": "dialogflow.projects.agent.sessions.entityTypes.patch",
19112	//   "parameterOrder": [
19113	//     "name"
19114	//   ],
19115	//   "parameters": {
19116	//     "name": {
19117	//       "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.",
19118	//       "location": "path",
19119	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
19120	//       "required": true,
19121	//       "type": "string"
19122	//     },
19123	//     "updateMask": {
19124	//       "description": "Optional. The mask to control which fields get updated.",
19125	//       "format": "google-fieldmask",
19126	//       "location": "query",
19127	//       "type": "string"
19128	//     }
19129	//   },
19130	//   "path": "v2beta1/{+name}",
19131	//   "request": {
19132	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
19133	//   },
19134	//   "response": {
19135	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
19136	//   },
19137	//   "scopes": [
19138	//     "https://www.googleapis.com/auth/cloud-platform",
19139	//     "https://www.googleapis.com/auth/dialogflow"
19140	//   ]
19141	// }
19142
19143}
19144
19145// method id "dialogflow.projects.knowledgeBases.create":
19146
19147type ProjectsKnowledgeBasesCreateCall struct {
19148	s                                         *Service
19149	parent                                    string
19150	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
19151	urlParams_                                gensupport.URLParams
19152	ctx_                                      context.Context
19153	header_                                   http.Header
19154}
19155
19156// Create: Creates a knowledge base.
19157//
19158// Note: The `projects.agent.knowledgeBases` resource is
19159// deprecated;
19160// only use `projects.knowledgeBases`.
19161func (r *ProjectsKnowledgeBasesService) Create(parent string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsKnowledgeBasesCreateCall {
19162	c := &ProjectsKnowledgeBasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19163	c.parent = parent
19164	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
19165	return c
19166}
19167
19168// Fields allows partial responses to be retrieved. See
19169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19170// for more information.
19171func (c *ProjectsKnowledgeBasesCreateCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesCreateCall {
19172	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19173	return c
19174}
19175
19176// Context sets the context to be used in this call's Do method. Any
19177// pending HTTP request will be aborted if the provided context is
19178// canceled.
19179func (c *ProjectsKnowledgeBasesCreateCall) Context(ctx context.Context) *ProjectsKnowledgeBasesCreateCall {
19180	c.ctx_ = ctx
19181	return c
19182}
19183
19184// Header returns an http.Header that can be modified by the caller to
19185// add HTTP headers to the request.
19186func (c *ProjectsKnowledgeBasesCreateCall) Header() http.Header {
19187	if c.header_ == nil {
19188		c.header_ = make(http.Header)
19189	}
19190	return c.header_
19191}
19192
19193func (c *ProjectsKnowledgeBasesCreateCall) doRequest(alt string) (*http.Response, error) {
19194	reqHeaders := make(http.Header)
19195	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19196	for k, v := range c.header_ {
19197		reqHeaders[k] = v
19198	}
19199	reqHeaders.Set("User-Agent", c.s.userAgent())
19200	var body io.Reader = nil
19201	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
19202	if err != nil {
19203		return nil, err
19204	}
19205	reqHeaders.Set("Content-Type", "application/json")
19206	c.urlParams_.Set("alt", alt)
19207	c.urlParams_.Set("prettyPrint", "false")
19208	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
19209	urls += "?" + c.urlParams_.Encode()
19210	req, err := http.NewRequest("POST", urls, body)
19211	if err != nil {
19212		return nil, err
19213	}
19214	req.Header = reqHeaders
19215	googleapi.Expand(req.URL, map[string]string{
19216		"parent": c.parent,
19217	})
19218	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19219}
19220
19221// Do executes the "dialogflow.projects.knowledgeBases.create" call.
19222// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
19223// will be non-nil. Any non-2xx status code is an error. Response
19224// headers are in either
19225// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
19226// (if a response was returned at all) in
19227// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19228// whether the returned error was because http.StatusNotModified was
19229// returned.
19230func (c *ProjectsKnowledgeBasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
19231	gensupport.SetOptions(c.urlParams_, opts...)
19232	res, err := c.doRequest("json")
19233	if res != nil && res.StatusCode == http.StatusNotModified {
19234		if res.Body != nil {
19235			res.Body.Close()
19236		}
19237		return nil, &googleapi.Error{
19238			Code:   res.StatusCode,
19239			Header: res.Header,
19240		}
19241	}
19242	if err != nil {
19243		return nil, err
19244	}
19245	defer googleapi.CloseBody(res)
19246	if err := googleapi.CheckResponse(res); err != nil {
19247		return nil, err
19248	}
19249	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
19250		ServerResponse: googleapi.ServerResponse{
19251			Header:         res.Header,
19252			HTTPStatusCode: res.StatusCode,
19253		},
19254	}
19255	target := &ret
19256	if err := gensupport.DecodeResponse(target, res); err != nil {
19257		return nil, err
19258	}
19259	return ret, nil
19260	// {
19261	//   "description": "Creates a knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
19262	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases",
19263	//   "httpMethod": "POST",
19264	//   "id": "dialogflow.projects.knowledgeBases.create",
19265	//   "parameterOrder": [
19266	//     "parent"
19267	//   ],
19268	//   "parameters": {
19269	//     "parent": {
19270	//       "description": "Required. The project to create a knowledge base for.\nFormat: `projects/\u003cProject ID\u003e`.",
19271	//       "location": "path",
19272	//       "pattern": "^projects/[^/]+$",
19273	//       "required": true,
19274	//       "type": "string"
19275	//     }
19276	//   },
19277	//   "path": "v2beta1/{+parent}/knowledgeBases",
19278	//   "request": {
19279	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
19280	//   },
19281	//   "response": {
19282	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
19283	//   },
19284	//   "scopes": [
19285	//     "https://www.googleapis.com/auth/cloud-platform",
19286	//     "https://www.googleapis.com/auth/dialogflow"
19287	//   ]
19288	// }
19289
19290}
19291
19292// method id "dialogflow.projects.knowledgeBases.delete":
19293
19294type ProjectsKnowledgeBasesDeleteCall struct {
19295	s          *Service
19296	name       string
19297	urlParams_ gensupport.URLParams
19298	ctx_       context.Context
19299	header_    http.Header
19300}
19301
19302// Delete: Deletes the specified knowledge base.
19303//
19304// Note: The `projects.agent.knowledgeBases` resource is
19305// deprecated;
19306// only use `projects.knowledgeBases`.
19307func (r *ProjectsKnowledgeBasesService) Delete(name string) *ProjectsKnowledgeBasesDeleteCall {
19308	c := &ProjectsKnowledgeBasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19309	c.name = name
19310	return c
19311}
19312
19313// Force sets the optional parameter "force": Force deletes the
19314// knowledge base. When set to true, any documents
19315// in the knowledge base are also deleted.
19316func (c *ProjectsKnowledgeBasesDeleteCall) Force(force bool) *ProjectsKnowledgeBasesDeleteCall {
19317	c.urlParams_.Set("force", fmt.Sprint(force))
19318	return c
19319}
19320
19321// Fields allows partial responses to be retrieved. See
19322// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19323// for more information.
19324func (c *ProjectsKnowledgeBasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDeleteCall {
19325	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19326	return c
19327}
19328
19329// Context sets the context to be used in this call's Do method. Any
19330// pending HTTP request will be aborted if the provided context is
19331// canceled.
19332func (c *ProjectsKnowledgeBasesDeleteCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDeleteCall {
19333	c.ctx_ = ctx
19334	return c
19335}
19336
19337// Header returns an http.Header that can be modified by the caller to
19338// add HTTP headers to the request.
19339func (c *ProjectsKnowledgeBasesDeleteCall) Header() http.Header {
19340	if c.header_ == nil {
19341		c.header_ = make(http.Header)
19342	}
19343	return c.header_
19344}
19345
19346func (c *ProjectsKnowledgeBasesDeleteCall) doRequest(alt string) (*http.Response, error) {
19347	reqHeaders := make(http.Header)
19348	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19349	for k, v := range c.header_ {
19350		reqHeaders[k] = v
19351	}
19352	reqHeaders.Set("User-Agent", c.s.userAgent())
19353	var body io.Reader = nil
19354	c.urlParams_.Set("alt", alt)
19355	c.urlParams_.Set("prettyPrint", "false")
19356	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
19357	urls += "?" + c.urlParams_.Encode()
19358	req, err := http.NewRequest("DELETE", urls, body)
19359	if err != nil {
19360		return nil, err
19361	}
19362	req.Header = reqHeaders
19363	googleapi.Expand(req.URL, map[string]string{
19364		"name": c.name,
19365	})
19366	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19367}
19368
19369// Do executes the "dialogflow.projects.knowledgeBases.delete" call.
19370// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
19371// non-2xx status code is an error. Response headers are in either
19372// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
19373// returned at all) in error.(*googleapi.Error).Header. Use
19374// googleapi.IsNotModified to check whether the returned error was
19375// because http.StatusNotModified was returned.
19376func (c *ProjectsKnowledgeBasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
19377	gensupport.SetOptions(c.urlParams_, opts...)
19378	res, err := c.doRequest("json")
19379	if res != nil && res.StatusCode == http.StatusNotModified {
19380		if res.Body != nil {
19381			res.Body.Close()
19382		}
19383		return nil, &googleapi.Error{
19384			Code:   res.StatusCode,
19385			Header: res.Header,
19386		}
19387	}
19388	if err != nil {
19389		return nil, err
19390	}
19391	defer googleapi.CloseBody(res)
19392	if err := googleapi.CheckResponse(res); err != nil {
19393		return nil, err
19394	}
19395	ret := &GoogleProtobufEmpty{
19396		ServerResponse: googleapi.ServerResponse{
19397			Header:         res.Header,
19398			HTTPStatusCode: res.StatusCode,
19399		},
19400	}
19401	target := &ret
19402	if err := gensupport.DecodeResponse(target, res); err != nil {
19403		return nil, err
19404	}
19405	return ret, nil
19406	// {
19407	//   "description": "Deletes the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
19408	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
19409	//   "httpMethod": "DELETE",
19410	//   "id": "dialogflow.projects.knowledgeBases.delete",
19411	//   "parameterOrder": [
19412	//     "name"
19413	//   ],
19414	//   "parameters": {
19415	//     "force": {
19416	//       "description": "Optional. Force deletes the knowledge base. When set to true, any documents\nin the knowledge base are also deleted.",
19417	//       "location": "query",
19418	//       "type": "boolean"
19419	//     },
19420	//     "name": {
19421	//       "description": "Required. The name of the knowledge base to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
19422	//       "location": "path",
19423	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
19424	//       "required": true,
19425	//       "type": "string"
19426	//     }
19427	//   },
19428	//   "path": "v2beta1/{+name}",
19429	//   "response": {
19430	//     "$ref": "GoogleProtobufEmpty"
19431	//   },
19432	//   "scopes": [
19433	//     "https://www.googleapis.com/auth/cloud-platform",
19434	//     "https://www.googleapis.com/auth/dialogflow"
19435	//   ]
19436	// }
19437
19438}
19439
19440// method id "dialogflow.projects.knowledgeBases.get":
19441
19442type ProjectsKnowledgeBasesGetCall struct {
19443	s            *Service
19444	name         string
19445	urlParams_   gensupport.URLParams
19446	ifNoneMatch_ string
19447	ctx_         context.Context
19448	header_      http.Header
19449}
19450
19451// Get: Retrieves the specified knowledge base.
19452//
19453// Note: The `projects.agent.knowledgeBases` resource is
19454// deprecated;
19455// only use `projects.knowledgeBases`.
19456func (r *ProjectsKnowledgeBasesService) Get(name string) *ProjectsKnowledgeBasesGetCall {
19457	c := &ProjectsKnowledgeBasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19458	c.name = name
19459	return c
19460}
19461
19462// Fields allows partial responses to be retrieved. See
19463// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19464// for more information.
19465func (c *ProjectsKnowledgeBasesGetCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesGetCall {
19466	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19467	return c
19468}
19469
19470// IfNoneMatch sets the optional parameter which makes the operation
19471// fail if the object's ETag matches the given value. This is useful for
19472// getting updates only after the object has changed since the last
19473// request. Use googleapi.IsNotModified to check whether the response
19474// error from Do is the result of In-None-Match.
19475func (c *ProjectsKnowledgeBasesGetCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesGetCall {
19476	c.ifNoneMatch_ = entityTag
19477	return c
19478}
19479
19480// Context sets the context to be used in this call's Do method. Any
19481// pending HTTP request will be aborted if the provided context is
19482// canceled.
19483func (c *ProjectsKnowledgeBasesGetCall) Context(ctx context.Context) *ProjectsKnowledgeBasesGetCall {
19484	c.ctx_ = ctx
19485	return c
19486}
19487
19488// Header returns an http.Header that can be modified by the caller to
19489// add HTTP headers to the request.
19490func (c *ProjectsKnowledgeBasesGetCall) Header() http.Header {
19491	if c.header_ == nil {
19492		c.header_ = make(http.Header)
19493	}
19494	return c.header_
19495}
19496
19497func (c *ProjectsKnowledgeBasesGetCall) doRequest(alt string) (*http.Response, error) {
19498	reqHeaders := make(http.Header)
19499	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19500	for k, v := range c.header_ {
19501		reqHeaders[k] = v
19502	}
19503	reqHeaders.Set("User-Agent", c.s.userAgent())
19504	if c.ifNoneMatch_ != "" {
19505		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19506	}
19507	var body io.Reader = nil
19508	c.urlParams_.Set("alt", alt)
19509	c.urlParams_.Set("prettyPrint", "false")
19510	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
19511	urls += "?" + c.urlParams_.Encode()
19512	req, err := http.NewRequest("GET", urls, body)
19513	if err != nil {
19514		return nil, err
19515	}
19516	req.Header = reqHeaders
19517	googleapi.Expand(req.URL, map[string]string{
19518		"name": c.name,
19519	})
19520	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19521}
19522
19523// Do executes the "dialogflow.projects.knowledgeBases.get" call.
19524// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
19525// will be non-nil. Any non-2xx status code is an error. Response
19526// headers are in either
19527// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
19528// (if a response was returned at all) in
19529// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19530// whether the returned error was because http.StatusNotModified was
19531// returned.
19532func (c *ProjectsKnowledgeBasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
19533	gensupport.SetOptions(c.urlParams_, opts...)
19534	res, err := c.doRequest("json")
19535	if res != nil && res.StatusCode == http.StatusNotModified {
19536		if res.Body != nil {
19537			res.Body.Close()
19538		}
19539		return nil, &googleapi.Error{
19540			Code:   res.StatusCode,
19541			Header: res.Header,
19542		}
19543	}
19544	if err != nil {
19545		return nil, err
19546	}
19547	defer googleapi.CloseBody(res)
19548	if err := googleapi.CheckResponse(res); err != nil {
19549		return nil, err
19550	}
19551	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
19552		ServerResponse: googleapi.ServerResponse{
19553			Header:         res.Header,
19554			HTTPStatusCode: res.StatusCode,
19555		},
19556	}
19557	target := &ret
19558	if err := gensupport.DecodeResponse(target, res); err != nil {
19559		return nil, err
19560	}
19561	return ret, nil
19562	// {
19563	//   "description": "Retrieves the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
19564	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
19565	//   "httpMethod": "GET",
19566	//   "id": "dialogflow.projects.knowledgeBases.get",
19567	//   "parameterOrder": [
19568	//     "name"
19569	//   ],
19570	//   "parameters": {
19571	//     "name": {
19572	//       "description": "Required. The name of the knowledge base to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
19573	//       "location": "path",
19574	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
19575	//       "required": true,
19576	//       "type": "string"
19577	//     }
19578	//   },
19579	//   "path": "v2beta1/{+name}",
19580	//   "response": {
19581	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
19582	//   },
19583	//   "scopes": [
19584	//     "https://www.googleapis.com/auth/cloud-platform",
19585	//     "https://www.googleapis.com/auth/dialogflow"
19586	//   ]
19587	// }
19588
19589}
19590
19591// method id "dialogflow.projects.knowledgeBases.list":
19592
19593type ProjectsKnowledgeBasesListCall struct {
19594	s            *Service
19595	parent       string
19596	urlParams_   gensupport.URLParams
19597	ifNoneMatch_ string
19598	ctx_         context.Context
19599	header_      http.Header
19600}
19601
19602// List: Returns the list of all knowledge bases of the specified
19603// agent.
19604//
19605// Note: The `projects.agent.knowledgeBases` resource is
19606// deprecated;
19607// only use `projects.knowledgeBases`.
19608func (r *ProjectsKnowledgeBasesService) List(parent string) *ProjectsKnowledgeBasesListCall {
19609	c := &ProjectsKnowledgeBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19610	c.parent = parent
19611	return c
19612}
19613
19614// PageSize sets the optional parameter "pageSize": The maximum number
19615// of items to return in a single page. By
19616// default 10 and at most 100.
19617func (c *ProjectsKnowledgeBasesListCall) PageSize(pageSize int64) *ProjectsKnowledgeBasesListCall {
19618	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19619	return c
19620}
19621
19622// PageToken sets the optional parameter "pageToken": The
19623// next_page_token value returned from a previous list request.
19624func (c *ProjectsKnowledgeBasesListCall) PageToken(pageToken string) *ProjectsKnowledgeBasesListCall {
19625	c.urlParams_.Set("pageToken", pageToken)
19626	return c
19627}
19628
19629// Fields allows partial responses to be retrieved. See
19630// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19631// for more information.
19632func (c *ProjectsKnowledgeBasesListCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesListCall {
19633	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19634	return c
19635}
19636
19637// IfNoneMatch sets the optional parameter which makes the operation
19638// fail if the object's ETag matches the given value. This is useful for
19639// getting updates only after the object has changed since the last
19640// request. Use googleapi.IsNotModified to check whether the response
19641// error from Do is the result of In-None-Match.
19642func (c *ProjectsKnowledgeBasesListCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesListCall {
19643	c.ifNoneMatch_ = entityTag
19644	return c
19645}
19646
19647// Context sets the context to be used in this call's Do method. Any
19648// pending HTTP request will be aborted if the provided context is
19649// canceled.
19650func (c *ProjectsKnowledgeBasesListCall) Context(ctx context.Context) *ProjectsKnowledgeBasesListCall {
19651	c.ctx_ = ctx
19652	return c
19653}
19654
19655// Header returns an http.Header that can be modified by the caller to
19656// add HTTP headers to the request.
19657func (c *ProjectsKnowledgeBasesListCall) Header() http.Header {
19658	if c.header_ == nil {
19659		c.header_ = make(http.Header)
19660	}
19661	return c.header_
19662}
19663
19664func (c *ProjectsKnowledgeBasesListCall) doRequest(alt string) (*http.Response, error) {
19665	reqHeaders := make(http.Header)
19666	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19667	for k, v := range c.header_ {
19668		reqHeaders[k] = v
19669	}
19670	reqHeaders.Set("User-Agent", c.s.userAgent())
19671	if c.ifNoneMatch_ != "" {
19672		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19673	}
19674	var body io.Reader = nil
19675	c.urlParams_.Set("alt", alt)
19676	c.urlParams_.Set("prettyPrint", "false")
19677	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
19678	urls += "?" + c.urlParams_.Encode()
19679	req, err := http.NewRequest("GET", urls, body)
19680	if err != nil {
19681		return nil, err
19682	}
19683	req.Header = reqHeaders
19684	googleapi.Expand(req.URL, map[string]string{
19685		"parent": c.parent,
19686	})
19687	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19688}
19689
19690// Do executes the "dialogflow.projects.knowledgeBases.list" call.
19691// Exactly one of
19692// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse or error will
19693// be non-nil. Any non-2xx status code is an error. Response headers are
19694// in either
19695// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse.ServerResponse
19696// .Header or (if a response was returned at all) in
19697// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19698// whether the returned error was because http.StatusNotModified was
19699// returned.
19700func (c *ProjectsKnowledgeBasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse, error) {
19701	gensupport.SetOptions(c.urlParams_, opts...)
19702	res, err := c.doRequest("json")
19703	if res != nil && res.StatusCode == http.StatusNotModified {
19704		if res.Body != nil {
19705			res.Body.Close()
19706		}
19707		return nil, &googleapi.Error{
19708			Code:   res.StatusCode,
19709			Header: res.Header,
19710		}
19711	}
19712	if err != nil {
19713		return nil, err
19714	}
19715	defer googleapi.CloseBody(res)
19716	if err := googleapi.CheckResponse(res); err != nil {
19717		return nil, err
19718	}
19719	ret := &GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse{
19720		ServerResponse: googleapi.ServerResponse{
19721			Header:         res.Header,
19722			HTTPStatusCode: res.StatusCode,
19723		},
19724	}
19725	target := &ret
19726	if err := gensupport.DecodeResponse(target, res); err != nil {
19727		return nil, err
19728	}
19729	return ret, nil
19730	// {
19731	//   "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`.",
19732	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases",
19733	//   "httpMethod": "GET",
19734	//   "id": "dialogflow.projects.knowledgeBases.list",
19735	//   "parameterOrder": [
19736	//     "parent"
19737	//   ],
19738	//   "parameters": {
19739	//     "pageSize": {
19740	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
19741	//       "format": "int32",
19742	//       "location": "query",
19743	//       "type": "integer"
19744	//     },
19745	//     "pageToken": {
19746	//       "description": "Optional. The next_page_token value returned from a previous list request.",
19747	//       "location": "query",
19748	//       "type": "string"
19749	//     },
19750	//     "parent": {
19751	//       "description": "Required. The project to list of knowledge bases for.\nFormat: `projects/\u003cProject ID\u003e`.",
19752	//       "location": "path",
19753	//       "pattern": "^projects/[^/]+$",
19754	//       "required": true,
19755	//       "type": "string"
19756	//     }
19757	//   },
19758	//   "path": "v2beta1/{+parent}/knowledgeBases",
19759	//   "response": {
19760	//     "$ref": "GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse"
19761	//   },
19762	//   "scopes": [
19763	//     "https://www.googleapis.com/auth/cloud-platform",
19764	//     "https://www.googleapis.com/auth/dialogflow"
19765	//   ]
19766	// }
19767
19768}
19769
19770// Pages invokes f for each page of results.
19771// A non-nil error returned from f will halt the iteration.
19772// The provided context supersedes any context provided to the Context method.
19773func (c *ProjectsKnowledgeBasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse) error) error {
19774	c.ctx_ = ctx
19775	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19776	for {
19777		x, err := c.Do()
19778		if err != nil {
19779			return err
19780		}
19781		if err := f(x); err != nil {
19782			return err
19783		}
19784		if x.NextPageToken == "" {
19785			return nil
19786		}
19787		c.PageToken(x.NextPageToken)
19788	}
19789}
19790
19791// method id "dialogflow.projects.knowledgeBases.patch":
19792
19793type ProjectsKnowledgeBasesPatchCall struct {
19794	s                                         *Service
19795	name                                      string
19796	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
19797	urlParams_                                gensupport.URLParams
19798	ctx_                                      context.Context
19799	header_                                   http.Header
19800}
19801
19802// Patch: Updates the specified knowledge base.
19803//
19804// Note: The `projects.agent.knowledgeBases` resource is
19805// deprecated;
19806// only use `projects.knowledgeBases`.
19807func (r *ProjectsKnowledgeBasesService) Patch(name string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsKnowledgeBasesPatchCall {
19808	c := &ProjectsKnowledgeBasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19809	c.name = name
19810	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
19811	return c
19812}
19813
19814// UpdateMask sets the optional parameter "updateMask": Not specified
19815// means `update all`.
19816// Currently, only `display_name` can be updated, an InvalidArgument
19817// will be
19818// returned for attempting to update other fields.
19819func (c *ProjectsKnowledgeBasesPatchCall) UpdateMask(updateMask string) *ProjectsKnowledgeBasesPatchCall {
19820	c.urlParams_.Set("updateMask", updateMask)
19821	return c
19822}
19823
19824// Fields allows partial responses to be retrieved. See
19825// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19826// for more information.
19827func (c *ProjectsKnowledgeBasesPatchCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesPatchCall {
19828	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19829	return c
19830}
19831
19832// Context sets the context to be used in this call's Do method. Any
19833// pending HTTP request will be aborted if the provided context is
19834// canceled.
19835func (c *ProjectsKnowledgeBasesPatchCall) Context(ctx context.Context) *ProjectsKnowledgeBasesPatchCall {
19836	c.ctx_ = ctx
19837	return c
19838}
19839
19840// Header returns an http.Header that can be modified by the caller to
19841// add HTTP headers to the request.
19842func (c *ProjectsKnowledgeBasesPatchCall) Header() http.Header {
19843	if c.header_ == nil {
19844		c.header_ = make(http.Header)
19845	}
19846	return c.header_
19847}
19848
19849func (c *ProjectsKnowledgeBasesPatchCall) doRequest(alt string) (*http.Response, error) {
19850	reqHeaders := make(http.Header)
19851	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
19852	for k, v := range c.header_ {
19853		reqHeaders[k] = v
19854	}
19855	reqHeaders.Set("User-Agent", c.s.userAgent())
19856	var body io.Reader = nil
19857	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
19858	if err != nil {
19859		return nil, err
19860	}
19861	reqHeaders.Set("Content-Type", "application/json")
19862	c.urlParams_.Set("alt", alt)
19863	c.urlParams_.Set("prettyPrint", "false")
19864	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
19865	urls += "?" + c.urlParams_.Encode()
19866	req, err := http.NewRequest("PATCH", urls, body)
19867	if err != nil {
19868		return nil, err
19869	}
19870	req.Header = reqHeaders
19871	googleapi.Expand(req.URL, map[string]string{
19872		"name": c.name,
19873	})
19874	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19875}
19876
19877// Do executes the "dialogflow.projects.knowledgeBases.patch" call.
19878// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
19879// will be non-nil. Any non-2xx status code is an error. Response
19880// headers are in either
19881// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
19882// (if a response was returned at all) in
19883// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19884// whether the returned error was because http.StatusNotModified was
19885// returned.
19886func (c *ProjectsKnowledgeBasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
19887	gensupport.SetOptions(c.urlParams_, opts...)
19888	res, err := c.doRequest("json")
19889	if res != nil && res.StatusCode == http.StatusNotModified {
19890		if res.Body != nil {
19891			res.Body.Close()
19892		}
19893		return nil, &googleapi.Error{
19894			Code:   res.StatusCode,
19895			Header: res.Header,
19896		}
19897	}
19898	if err != nil {
19899		return nil, err
19900	}
19901	defer googleapi.CloseBody(res)
19902	if err := googleapi.CheckResponse(res); err != nil {
19903		return nil, err
19904	}
19905	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
19906		ServerResponse: googleapi.ServerResponse{
19907			Header:         res.Header,
19908			HTTPStatusCode: res.StatusCode,
19909		},
19910	}
19911	target := &ret
19912	if err := gensupport.DecodeResponse(target, res); err != nil {
19913		return nil, err
19914	}
19915	return ret, nil
19916	// {
19917	//   "description": "Updates the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
19918	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
19919	//   "httpMethod": "PATCH",
19920	//   "id": "dialogflow.projects.knowledgeBases.patch",
19921	//   "parameterOrder": [
19922	//     "name"
19923	//   ],
19924	//   "parameters": {
19925	//     "name": {
19926	//       "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`.",
19927	//       "location": "path",
19928	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
19929	//       "required": true,
19930	//       "type": "string"
19931	//     },
19932	//     "updateMask": {
19933	//       "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.",
19934	//       "format": "google-fieldmask",
19935	//       "location": "query",
19936	//       "type": "string"
19937	//     }
19938	//   },
19939	//   "path": "v2beta1/{+name}",
19940	//   "request": {
19941	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
19942	//   },
19943	//   "response": {
19944	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
19945	//   },
19946	//   "scopes": [
19947	//     "https://www.googleapis.com/auth/cloud-platform",
19948	//     "https://www.googleapis.com/auth/dialogflow"
19949	//   ]
19950	// }
19951
19952}
19953
19954// method id "dialogflow.projects.knowledgeBases.documents.create":
19955
19956type ProjectsKnowledgeBasesDocumentsCreateCall struct {
19957	s                                    *Service
19958	parent                               string
19959	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
19960	urlParams_                           gensupport.URLParams
19961	ctx_                                 context.Context
19962	header_                              http.Header
19963}
19964
19965// Create: Creates a new document.
19966//
19967// Note: The `projects.agent.knowledgeBases.documents` resource is
19968// deprecated;
19969// only use `projects.knowledgeBases.documents`.
19970//
19971// Operation <response: Document,
19972//            metadata: KnowledgeOperationMetadata>
19973func (r *ProjectsKnowledgeBasesDocumentsService) Create(parent string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsKnowledgeBasesDocumentsCreateCall {
19974	c := &ProjectsKnowledgeBasesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19975	c.parent = parent
19976	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
19977	return c
19978}
19979
19980// Fields allows partial responses to be retrieved. See
19981// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19982// for more information.
19983func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsCreateCall {
19984	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19985	return c
19986}
19987
19988// Context sets the context to be used in this call's Do method. Any
19989// pending HTTP request will be aborted if the provided context is
19990// canceled.
19991func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsCreateCall {
19992	c.ctx_ = ctx
19993	return c
19994}
19995
19996// Header returns an http.Header that can be modified by the caller to
19997// add HTTP headers to the request.
19998func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Header() http.Header {
19999	if c.header_ == nil {
20000		c.header_ = make(http.Header)
20001	}
20002	return c.header_
20003}
20004
20005func (c *ProjectsKnowledgeBasesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) {
20006	reqHeaders := make(http.Header)
20007	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20008	for k, v := range c.header_ {
20009		reqHeaders[k] = v
20010	}
20011	reqHeaders.Set("User-Agent", c.s.userAgent())
20012	var body io.Reader = nil
20013	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
20014	if err != nil {
20015		return nil, err
20016	}
20017	reqHeaders.Set("Content-Type", "application/json")
20018	c.urlParams_.Set("alt", alt)
20019	c.urlParams_.Set("prettyPrint", "false")
20020	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
20021	urls += "?" + c.urlParams_.Encode()
20022	req, err := http.NewRequest("POST", urls, body)
20023	if err != nil {
20024		return nil, err
20025	}
20026	req.Header = reqHeaders
20027	googleapi.Expand(req.URL, map[string]string{
20028		"parent": c.parent,
20029	})
20030	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20031}
20032
20033// Do executes the "dialogflow.projects.knowledgeBases.documents.create" call.
20034// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
20035// Any non-2xx status code is an error. Response headers are in either
20036// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
20037// was returned at all) in error.(*googleapi.Error).Header. Use
20038// googleapi.IsNotModified to check whether the returned error was
20039// because http.StatusNotModified was returned.
20040func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
20041	gensupport.SetOptions(c.urlParams_, opts...)
20042	res, err := c.doRequest("json")
20043	if res != nil && res.StatusCode == http.StatusNotModified {
20044		if res.Body != nil {
20045			res.Body.Close()
20046		}
20047		return nil, &googleapi.Error{
20048			Code:   res.StatusCode,
20049			Header: res.Header,
20050		}
20051	}
20052	if err != nil {
20053		return nil, err
20054	}
20055	defer googleapi.CloseBody(res)
20056	if err := googleapi.CheckResponse(res); err != nil {
20057		return nil, err
20058	}
20059	ret := &GoogleLongrunningOperation{
20060		ServerResponse: googleapi.ServerResponse{
20061			Header:         res.Header,
20062			HTTPStatusCode: res.StatusCode,
20063		},
20064	}
20065	target := &ret
20066	if err := gensupport.DecodeResponse(target, res); err != nil {
20067		return nil, err
20068	}
20069	return ret, nil
20070	// {
20071	//   "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",
20072	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents",
20073	//   "httpMethod": "POST",
20074	//   "id": "dialogflow.projects.knowledgeBases.documents.create",
20075	//   "parameterOrder": [
20076	//     "parent"
20077	//   ],
20078	//   "parameters": {
20079	//     "parent": {
20080	//       "description": "Required. The knoweldge base to create a document for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
20081	//       "location": "path",
20082	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
20083	//       "required": true,
20084	//       "type": "string"
20085	//     }
20086	//   },
20087	//   "path": "v2beta1/{+parent}/documents",
20088	//   "request": {
20089	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
20090	//   },
20091	//   "response": {
20092	//     "$ref": "GoogleLongrunningOperation"
20093	//   },
20094	//   "scopes": [
20095	//     "https://www.googleapis.com/auth/cloud-platform",
20096	//     "https://www.googleapis.com/auth/dialogflow"
20097	//   ]
20098	// }
20099
20100}
20101
20102// method id "dialogflow.projects.knowledgeBases.documents.delete":
20103
20104type ProjectsKnowledgeBasesDocumentsDeleteCall struct {
20105	s          *Service
20106	name       string
20107	urlParams_ gensupport.URLParams
20108	ctx_       context.Context
20109	header_    http.Header
20110}
20111
20112// Delete: Deletes the specified document.
20113//
20114// Note: The `projects.agent.knowledgeBases.documents` resource is
20115// deprecated;
20116// only use `projects.knowledgeBases.documents`.
20117//
20118// Operation <response: google.protobuf.Empty,
20119//            metadata: KnowledgeOperationMetadata>
20120func (r *ProjectsKnowledgeBasesDocumentsService) Delete(name string) *ProjectsKnowledgeBasesDocumentsDeleteCall {
20121	c := &ProjectsKnowledgeBasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20122	c.name = name
20123	return c
20124}
20125
20126// Fields allows partial responses to be retrieved. See
20127// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20128// for more information.
20129func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsDeleteCall {
20130	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20131	return c
20132}
20133
20134// Context sets the context to be used in this call's Do method. Any
20135// pending HTTP request will be aborted if the provided context is
20136// canceled.
20137func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsDeleteCall {
20138	c.ctx_ = ctx
20139	return c
20140}
20141
20142// Header returns an http.Header that can be modified by the caller to
20143// add HTTP headers to the request.
20144func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Header() http.Header {
20145	if c.header_ == nil {
20146		c.header_ = make(http.Header)
20147	}
20148	return c.header_
20149}
20150
20151func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
20152	reqHeaders := make(http.Header)
20153	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20154	for k, v := range c.header_ {
20155		reqHeaders[k] = v
20156	}
20157	reqHeaders.Set("User-Agent", c.s.userAgent())
20158	var body io.Reader = nil
20159	c.urlParams_.Set("alt", alt)
20160	c.urlParams_.Set("prettyPrint", "false")
20161	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
20162	urls += "?" + c.urlParams_.Encode()
20163	req, err := http.NewRequest("DELETE", urls, body)
20164	if err != nil {
20165		return nil, err
20166	}
20167	req.Header = reqHeaders
20168	googleapi.Expand(req.URL, map[string]string{
20169		"name": c.name,
20170	})
20171	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20172}
20173
20174// Do executes the "dialogflow.projects.knowledgeBases.documents.delete" call.
20175// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
20176// Any non-2xx status code is an error. Response headers are in either
20177// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
20178// was returned at all) in error.(*googleapi.Error).Header. Use
20179// googleapi.IsNotModified to check whether the returned error was
20180// because http.StatusNotModified was returned.
20181func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
20182	gensupport.SetOptions(c.urlParams_, opts...)
20183	res, err := c.doRequest("json")
20184	if res != nil && res.StatusCode == http.StatusNotModified {
20185		if res.Body != nil {
20186			res.Body.Close()
20187		}
20188		return nil, &googleapi.Error{
20189			Code:   res.StatusCode,
20190			Header: res.Header,
20191		}
20192	}
20193	if err != nil {
20194		return nil, err
20195	}
20196	defer googleapi.CloseBody(res)
20197	if err := googleapi.CheckResponse(res); err != nil {
20198		return nil, err
20199	}
20200	ret := &GoogleLongrunningOperation{
20201		ServerResponse: googleapi.ServerResponse{
20202			Header:         res.Header,
20203			HTTPStatusCode: res.StatusCode,
20204		},
20205	}
20206	target := &ret
20207	if err := gensupport.DecodeResponse(target, res); err != nil {
20208		return nil, err
20209	}
20210	return ret, nil
20211	// {
20212	//   "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",
20213	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
20214	//   "httpMethod": "DELETE",
20215	//   "id": "dialogflow.projects.knowledgeBases.documents.delete",
20216	//   "parameterOrder": [
20217	//     "name"
20218	//   ],
20219	//   "parameters": {
20220	//     "name": {
20221	//       "description": "The name of the document to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
20222	//       "location": "path",
20223	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
20224	//       "required": true,
20225	//       "type": "string"
20226	//     }
20227	//   },
20228	//   "path": "v2beta1/{+name}",
20229	//   "response": {
20230	//     "$ref": "GoogleLongrunningOperation"
20231	//   },
20232	//   "scopes": [
20233	//     "https://www.googleapis.com/auth/cloud-platform",
20234	//     "https://www.googleapis.com/auth/dialogflow"
20235	//   ]
20236	// }
20237
20238}
20239
20240// method id "dialogflow.projects.knowledgeBases.documents.get":
20241
20242type ProjectsKnowledgeBasesDocumentsGetCall struct {
20243	s            *Service
20244	name         string
20245	urlParams_   gensupport.URLParams
20246	ifNoneMatch_ string
20247	ctx_         context.Context
20248	header_      http.Header
20249}
20250
20251// Get: Retrieves the specified document.
20252//
20253// Note: The `projects.agent.knowledgeBases.documents` resource is
20254// deprecated;
20255// only use `projects.knowledgeBases.documents`.
20256func (r *ProjectsKnowledgeBasesDocumentsService) Get(name string) *ProjectsKnowledgeBasesDocumentsGetCall {
20257	c := &ProjectsKnowledgeBasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20258	c.name = name
20259	return c
20260}
20261
20262// Fields allows partial responses to be retrieved. See
20263// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20264// for more information.
20265func (c *ProjectsKnowledgeBasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsGetCall {
20266	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20267	return c
20268}
20269
20270// IfNoneMatch sets the optional parameter which makes the operation
20271// fail if the object's ETag matches the given value. This is useful for
20272// getting updates only after the object has changed since the last
20273// request. Use googleapi.IsNotModified to check whether the response
20274// error from Do is the result of In-None-Match.
20275func (c *ProjectsKnowledgeBasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesDocumentsGetCall {
20276	c.ifNoneMatch_ = entityTag
20277	return c
20278}
20279
20280// Context sets the context to be used in this call's Do method. Any
20281// pending HTTP request will be aborted if the provided context is
20282// canceled.
20283func (c *ProjectsKnowledgeBasesDocumentsGetCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsGetCall {
20284	c.ctx_ = ctx
20285	return c
20286}
20287
20288// Header returns an http.Header that can be modified by the caller to
20289// add HTTP headers to the request.
20290func (c *ProjectsKnowledgeBasesDocumentsGetCall) Header() http.Header {
20291	if c.header_ == nil {
20292		c.header_ = make(http.Header)
20293	}
20294	return c.header_
20295}
20296
20297func (c *ProjectsKnowledgeBasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
20298	reqHeaders := make(http.Header)
20299	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20300	for k, v := range c.header_ {
20301		reqHeaders[k] = v
20302	}
20303	reqHeaders.Set("User-Agent", c.s.userAgent())
20304	if c.ifNoneMatch_ != "" {
20305		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20306	}
20307	var body io.Reader = nil
20308	c.urlParams_.Set("alt", alt)
20309	c.urlParams_.Set("prettyPrint", "false")
20310	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
20311	urls += "?" + c.urlParams_.Encode()
20312	req, err := http.NewRequest("GET", urls, body)
20313	if err != nil {
20314		return nil, err
20315	}
20316	req.Header = reqHeaders
20317	googleapi.Expand(req.URL, map[string]string{
20318		"name": c.name,
20319	})
20320	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20321}
20322
20323// Do executes the "dialogflow.projects.knowledgeBases.documents.get" call.
20324// Exactly one of *GoogleCloudDialogflowV2beta1Document or error will be
20325// non-nil. Any non-2xx status code is an error. Response headers are in
20326// either *GoogleCloudDialogflowV2beta1Document.ServerResponse.Header or
20327// (if a response was returned at all) in
20328// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20329// whether the returned error was because http.StatusNotModified was
20330// returned.
20331func (c *ProjectsKnowledgeBasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Document, error) {
20332	gensupport.SetOptions(c.urlParams_, opts...)
20333	res, err := c.doRequest("json")
20334	if res != nil && res.StatusCode == http.StatusNotModified {
20335		if res.Body != nil {
20336			res.Body.Close()
20337		}
20338		return nil, &googleapi.Error{
20339			Code:   res.StatusCode,
20340			Header: res.Header,
20341		}
20342	}
20343	if err != nil {
20344		return nil, err
20345	}
20346	defer googleapi.CloseBody(res)
20347	if err := googleapi.CheckResponse(res); err != nil {
20348		return nil, err
20349	}
20350	ret := &GoogleCloudDialogflowV2beta1Document{
20351		ServerResponse: googleapi.ServerResponse{
20352			Header:         res.Header,
20353			HTTPStatusCode: res.StatusCode,
20354		},
20355	}
20356	target := &ret
20357	if err := gensupport.DecodeResponse(target, res); err != nil {
20358		return nil, err
20359	}
20360	return ret, nil
20361	// {
20362	//   "description": "Retrieves the specified document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.",
20363	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
20364	//   "httpMethod": "GET",
20365	//   "id": "dialogflow.projects.knowledgeBases.documents.get",
20366	//   "parameterOrder": [
20367	//     "name"
20368	//   ],
20369	//   "parameters": {
20370	//     "name": {
20371	//       "description": "Required. The name of the document to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
20372	//       "location": "path",
20373	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
20374	//       "required": true,
20375	//       "type": "string"
20376	//     }
20377	//   },
20378	//   "path": "v2beta1/{+name}",
20379	//   "response": {
20380	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
20381	//   },
20382	//   "scopes": [
20383	//     "https://www.googleapis.com/auth/cloud-platform",
20384	//     "https://www.googleapis.com/auth/dialogflow"
20385	//   ]
20386	// }
20387
20388}
20389
20390// method id "dialogflow.projects.knowledgeBases.documents.list":
20391
20392type ProjectsKnowledgeBasesDocumentsListCall struct {
20393	s            *Service
20394	parent       string
20395	urlParams_   gensupport.URLParams
20396	ifNoneMatch_ string
20397	ctx_         context.Context
20398	header_      http.Header
20399}
20400
20401// List: Returns the list of all documents of the knowledge base.
20402//
20403// Note: The `projects.agent.knowledgeBases.documents` resource is
20404// deprecated;
20405// only use `projects.knowledgeBases.documents`.
20406func (r *ProjectsKnowledgeBasesDocumentsService) List(parent string) *ProjectsKnowledgeBasesDocumentsListCall {
20407	c := &ProjectsKnowledgeBasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20408	c.parent = parent
20409	return c
20410}
20411
20412// PageSize sets the optional parameter "pageSize": The maximum number
20413// of items to return in a single page. By
20414// default 10 and at most 100.
20415func (c *ProjectsKnowledgeBasesDocumentsListCall) PageSize(pageSize int64) *ProjectsKnowledgeBasesDocumentsListCall {
20416	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
20417	return c
20418}
20419
20420// PageToken sets the optional parameter "pageToken": The
20421// next_page_token value returned from a previous list request.
20422func (c *ProjectsKnowledgeBasesDocumentsListCall) PageToken(pageToken string) *ProjectsKnowledgeBasesDocumentsListCall {
20423	c.urlParams_.Set("pageToken", pageToken)
20424	return c
20425}
20426
20427// Fields allows partial responses to be retrieved. See
20428// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20429// for more information.
20430func (c *ProjectsKnowledgeBasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsListCall {
20431	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20432	return c
20433}
20434
20435// IfNoneMatch sets the optional parameter which makes the operation
20436// fail if the object's ETag matches the given value. This is useful for
20437// getting updates only after the object has changed since the last
20438// request. Use googleapi.IsNotModified to check whether the response
20439// error from Do is the result of In-None-Match.
20440func (c *ProjectsKnowledgeBasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesDocumentsListCall {
20441	c.ifNoneMatch_ = entityTag
20442	return c
20443}
20444
20445// Context sets the context to be used in this call's Do method. Any
20446// pending HTTP request will be aborted if the provided context is
20447// canceled.
20448func (c *ProjectsKnowledgeBasesDocumentsListCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsListCall {
20449	c.ctx_ = ctx
20450	return c
20451}
20452
20453// Header returns an http.Header that can be modified by the caller to
20454// add HTTP headers to the request.
20455func (c *ProjectsKnowledgeBasesDocumentsListCall) Header() http.Header {
20456	if c.header_ == nil {
20457		c.header_ = make(http.Header)
20458	}
20459	return c.header_
20460}
20461
20462func (c *ProjectsKnowledgeBasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
20463	reqHeaders := make(http.Header)
20464	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20465	for k, v := range c.header_ {
20466		reqHeaders[k] = v
20467	}
20468	reqHeaders.Set("User-Agent", c.s.userAgent())
20469	if c.ifNoneMatch_ != "" {
20470		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20471	}
20472	var body io.Reader = nil
20473	c.urlParams_.Set("alt", alt)
20474	c.urlParams_.Set("prettyPrint", "false")
20475	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
20476	urls += "?" + c.urlParams_.Encode()
20477	req, err := http.NewRequest("GET", urls, body)
20478	if err != nil {
20479		return nil, err
20480	}
20481	req.Header = reqHeaders
20482	googleapi.Expand(req.URL, map[string]string{
20483		"parent": c.parent,
20484	})
20485	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20486}
20487
20488// Do executes the "dialogflow.projects.knowledgeBases.documents.list" call.
20489// Exactly one of *GoogleCloudDialogflowV2beta1ListDocumentsResponse or
20490// error will be non-nil. Any non-2xx status code is an error. Response
20491// headers are in either
20492// *GoogleCloudDialogflowV2beta1ListDocumentsResponse.ServerResponse.Head
20493// er or (if a response was returned at all) in
20494// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20495// whether the returned error was because http.StatusNotModified was
20496// returned.
20497func (c *ProjectsKnowledgeBasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListDocumentsResponse, error) {
20498	gensupport.SetOptions(c.urlParams_, opts...)
20499	res, err := c.doRequest("json")
20500	if res != nil && res.StatusCode == http.StatusNotModified {
20501		if res.Body != nil {
20502			res.Body.Close()
20503		}
20504		return nil, &googleapi.Error{
20505			Code:   res.StatusCode,
20506			Header: res.Header,
20507		}
20508	}
20509	if err != nil {
20510		return nil, err
20511	}
20512	defer googleapi.CloseBody(res)
20513	if err := googleapi.CheckResponse(res); err != nil {
20514		return nil, err
20515	}
20516	ret := &GoogleCloudDialogflowV2beta1ListDocumentsResponse{
20517		ServerResponse: googleapi.ServerResponse{
20518			Header:         res.Header,
20519			HTTPStatusCode: res.StatusCode,
20520		},
20521	}
20522	target := &ret
20523	if err := gensupport.DecodeResponse(target, res); err != nil {
20524		return nil, err
20525	}
20526	return ret, nil
20527	// {
20528	//   "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`.",
20529	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents",
20530	//   "httpMethod": "GET",
20531	//   "id": "dialogflow.projects.knowledgeBases.documents.list",
20532	//   "parameterOrder": [
20533	//     "parent"
20534	//   ],
20535	//   "parameters": {
20536	//     "pageSize": {
20537	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
20538	//       "format": "int32",
20539	//       "location": "query",
20540	//       "type": "integer"
20541	//     },
20542	//     "pageToken": {
20543	//       "description": "Optional. The next_page_token value returned from a previous list request.",
20544	//       "location": "query",
20545	//       "type": "string"
20546	//     },
20547	//     "parent": {
20548	//       "description": "Required. The knowledge base to list all documents for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
20549	//       "location": "path",
20550	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
20551	//       "required": true,
20552	//       "type": "string"
20553	//     }
20554	//   },
20555	//   "path": "v2beta1/{+parent}/documents",
20556	//   "response": {
20557	//     "$ref": "GoogleCloudDialogflowV2beta1ListDocumentsResponse"
20558	//   },
20559	//   "scopes": [
20560	//     "https://www.googleapis.com/auth/cloud-platform",
20561	//     "https://www.googleapis.com/auth/dialogflow"
20562	//   ]
20563	// }
20564
20565}
20566
20567// Pages invokes f for each page of results.
20568// A non-nil error returned from f will halt the iteration.
20569// The provided context supersedes any context provided to the Context method.
20570func (c *ProjectsKnowledgeBasesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListDocumentsResponse) error) error {
20571	c.ctx_ = ctx
20572	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20573	for {
20574		x, err := c.Do()
20575		if err != nil {
20576			return err
20577		}
20578		if err := f(x); err != nil {
20579			return err
20580		}
20581		if x.NextPageToken == "" {
20582			return nil
20583		}
20584		c.PageToken(x.NextPageToken)
20585	}
20586}
20587
20588// method id "dialogflow.projects.knowledgeBases.documents.patch":
20589
20590type ProjectsKnowledgeBasesDocumentsPatchCall struct {
20591	s                                    *Service
20592	name                                 string
20593	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
20594	urlParams_                           gensupport.URLParams
20595	ctx_                                 context.Context
20596	header_                              http.Header
20597}
20598
20599// Patch: Updates the specified document.
20600//
20601// Note: The `projects.agent.knowledgeBases.documents` resource is
20602// deprecated;
20603// only use `projects.knowledgeBases.documents`.
20604//
20605// Operation <response: Document,
20606//            metadata: KnowledgeOperationMetadata>
20607func (r *ProjectsKnowledgeBasesDocumentsService) Patch(name string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsKnowledgeBasesDocumentsPatchCall {
20608	c := &ProjectsKnowledgeBasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20609	c.name = name
20610	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
20611	return c
20612}
20613
20614// UpdateMask sets the optional parameter "updateMask": Not specified
20615// means `update all`.
20616// Currently, only `display_name` can be updated, an InvalidArgument
20617// will be
20618// returned for attempting to update other fields.
20619func (c *ProjectsKnowledgeBasesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsKnowledgeBasesDocumentsPatchCall {
20620	c.urlParams_.Set("updateMask", updateMask)
20621	return c
20622}
20623
20624// Fields allows partial responses to be retrieved. See
20625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20626// for more information.
20627func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsPatchCall {
20628	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20629	return c
20630}
20631
20632// Context sets the context to be used in this call's Do method. Any
20633// pending HTTP request will be aborted if the provided context is
20634// canceled.
20635func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsPatchCall {
20636	c.ctx_ = ctx
20637	return c
20638}
20639
20640// Header returns an http.Header that can be modified by the caller to
20641// add HTTP headers to the request.
20642func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Header() http.Header {
20643	if c.header_ == nil {
20644		c.header_ = make(http.Header)
20645	}
20646	return c.header_
20647}
20648
20649func (c *ProjectsKnowledgeBasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
20650	reqHeaders := make(http.Header)
20651	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20652	for k, v := range c.header_ {
20653		reqHeaders[k] = v
20654	}
20655	reqHeaders.Set("User-Agent", c.s.userAgent())
20656	var body io.Reader = nil
20657	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
20658	if err != nil {
20659		return nil, err
20660	}
20661	reqHeaders.Set("Content-Type", "application/json")
20662	c.urlParams_.Set("alt", alt)
20663	c.urlParams_.Set("prettyPrint", "false")
20664	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
20665	urls += "?" + c.urlParams_.Encode()
20666	req, err := http.NewRequest("PATCH", urls, body)
20667	if err != nil {
20668		return nil, err
20669	}
20670	req.Header = reqHeaders
20671	googleapi.Expand(req.URL, map[string]string{
20672		"name": c.name,
20673	})
20674	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20675}
20676
20677// Do executes the "dialogflow.projects.knowledgeBases.documents.patch" call.
20678// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
20679// Any non-2xx status code is an error. Response headers are in either
20680// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
20681// was returned at all) in error.(*googleapi.Error).Header. Use
20682// googleapi.IsNotModified to check whether the returned error was
20683// because http.StatusNotModified was returned.
20684func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
20685	gensupport.SetOptions(c.urlParams_, opts...)
20686	res, err := c.doRequest("json")
20687	if res != nil && res.StatusCode == http.StatusNotModified {
20688		if res.Body != nil {
20689			res.Body.Close()
20690		}
20691		return nil, &googleapi.Error{
20692			Code:   res.StatusCode,
20693			Header: res.Header,
20694		}
20695	}
20696	if err != nil {
20697		return nil, err
20698	}
20699	defer googleapi.CloseBody(res)
20700	if err := googleapi.CheckResponse(res); err != nil {
20701		return nil, err
20702	}
20703	ret := &GoogleLongrunningOperation{
20704		ServerResponse: googleapi.ServerResponse{
20705			Header:         res.Header,
20706			HTTPStatusCode: res.StatusCode,
20707		},
20708	}
20709	target := &ret
20710	if err := gensupport.DecodeResponse(target, res); err != nil {
20711		return nil, err
20712	}
20713	return ret, nil
20714	// {
20715	//   "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",
20716	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
20717	//   "httpMethod": "PATCH",
20718	//   "id": "dialogflow.projects.knowledgeBases.documents.patch",
20719	//   "parameterOrder": [
20720	//     "name"
20721	//   ],
20722	//   "parameters": {
20723	//     "name": {
20724	//       "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`.",
20725	//       "location": "path",
20726	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
20727	//       "required": true,
20728	//       "type": "string"
20729	//     },
20730	//     "updateMask": {
20731	//       "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.",
20732	//       "format": "google-fieldmask",
20733	//       "location": "query",
20734	//       "type": "string"
20735	//     }
20736	//   },
20737	//   "path": "v2beta1/{+name}",
20738	//   "request": {
20739	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
20740	//   },
20741	//   "response": {
20742	//     "$ref": "GoogleLongrunningOperation"
20743	//   },
20744	//   "scopes": [
20745	//     "https://www.googleapis.com/auth/cloud-platform",
20746	//     "https://www.googleapis.com/auth/dialogflow"
20747	//   ]
20748	// }
20749
20750}
20751
20752// method id "dialogflow.projects.knowledgeBases.documents.reload":
20753
20754type ProjectsKnowledgeBasesDocumentsReloadCall struct {
20755	s                                                 *Service
20756	name                                              string
20757	googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest
20758	urlParams_                                        gensupport.URLParams
20759	ctx_                                              context.Context
20760	header_                                           http.Header
20761}
20762
20763// Reload: Reloads the specified document from its specified source,
20764// content_uri or
20765// content. The previously loaded content of the document will be
20766// deleted.
20767// Note: Even when the content of the document has not changed, there
20768// still
20769// may be side effects because of internal implementation
20770// changes.
20771//
20772// Note: The `projects.agent.knowledgeBases.documents` resource is
20773// deprecated;
20774// only use `projects.knowledgeBases.documents`.
20775//
20776// Operation <response: Document,
20777//            metadata: KnowledgeOperationMetadata>
20778func (r *ProjectsKnowledgeBasesDocumentsService) Reload(name string, googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest) *ProjectsKnowledgeBasesDocumentsReloadCall {
20779	c := &ProjectsKnowledgeBasesDocumentsReloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20780	c.name = name
20781	c.googleclouddialogflowv2beta1reloaddocumentrequest = googleclouddialogflowv2beta1reloaddocumentrequest
20782	return c
20783}
20784
20785// Fields allows partial responses to be retrieved. See
20786// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20787// for more information.
20788func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsReloadCall {
20789	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20790	return c
20791}
20792
20793// Context sets the context to be used in this call's Do method. Any
20794// pending HTTP request will be aborted if the provided context is
20795// canceled.
20796func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsReloadCall {
20797	c.ctx_ = ctx
20798	return c
20799}
20800
20801// Header returns an http.Header that can be modified by the caller to
20802// add HTTP headers to the request.
20803func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Header() http.Header {
20804	if c.header_ == nil {
20805		c.header_ = make(http.Header)
20806	}
20807	return c.header_
20808}
20809
20810func (c *ProjectsKnowledgeBasesDocumentsReloadCall) doRequest(alt string) (*http.Response, error) {
20811	reqHeaders := make(http.Header)
20812	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20813	for k, v := range c.header_ {
20814		reqHeaders[k] = v
20815	}
20816	reqHeaders.Set("User-Agent", c.s.userAgent())
20817	var body io.Reader = nil
20818	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1reloaddocumentrequest)
20819	if err != nil {
20820		return nil, err
20821	}
20822	reqHeaders.Set("Content-Type", "application/json")
20823	c.urlParams_.Set("alt", alt)
20824	c.urlParams_.Set("prettyPrint", "false")
20825	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:reload")
20826	urls += "?" + c.urlParams_.Encode()
20827	req, err := http.NewRequest("POST", urls, body)
20828	if err != nil {
20829		return nil, err
20830	}
20831	req.Header = reqHeaders
20832	googleapi.Expand(req.URL, map[string]string{
20833		"name": c.name,
20834	})
20835	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20836}
20837
20838// Do executes the "dialogflow.projects.knowledgeBases.documents.reload" call.
20839// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
20840// Any non-2xx status code is an error. Response headers are in either
20841// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
20842// was returned at all) in error.(*googleapi.Error).Header. Use
20843// googleapi.IsNotModified to check whether the returned error was
20844// because http.StatusNotModified was returned.
20845func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
20846	gensupport.SetOptions(c.urlParams_, opts...)
20847	res, err := c.doRequest("json")
20848	if res != nil && res.StatusCode == http.StatusNotModified {
20849		if res.Body != nil {
20850			res.Body.Close()
20851		}
20852		return nil, &googleapi.Error{
20853			Code:   res.StatusCode,
20854			Header: res.Header,
20855		}
20856	}
20857	if err != nil {
20858		return nil, err
20859	}
20860	defer googleapi.CloseBody(res)
20861	if err := googleapi.CheckResponse(res); err != nil {
20862		return nil, err
20863	}
20864	ret := &GoogleLongrunningOperation{
20865		ServerResponse: googleapi.ServerResponse{
20866			Header:         res.Header,
20867			HTTPStatusCode: res.StatusCode,
20868		},
20869	}
20870	target := &ret
20871	if err := gensupport.DecodeResponse(target, res); err != nil {
20872		return nil, err
20873	}
20874	return ret, nil
20875	// {
20876	//   "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",
20877	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload",
20878	//   "httpMethod": "POST",
20879	//   "id": "dialogflow.projects.knowledgeBases.documents.reload",
20880	//   "parameterOrder": [
20881	//     "name"
20882	//   ],
20883	//   "parameters": {
20884	//     "name": {
20885	//       "description": "The name of the document to reload.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`",
20886	//       "location": "path",
20887	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
20888	//       "required": true,
20889	//       "type": "string"
20890	//     }
20891	//   },
20892	//   "path": "v2beta1/{+name}:reload",
20893	//   "request": {
20894	//     "$ref": "GoogleCloudDialogflowV2beta1ReloadDocumentRequest"
20895	//   },
20896	//   "response": {
20897	//     "$ref": "GoogleLongrunningOperation"
20898	//   },
20899	//   "scopes": [
20900	//     "https://www.googleapis.com/auth/cloud-platform",
20901	//     "https://www.googleapis.com/auth/dialogflow"
20902	//   ]
20903	// }
20904
20905}
20906
20907// method id "dialogflow.projects.locations.agent":
20908
20909type ProjectsLocationsAgentCall struct {
20910	s                                 *Service
20911	parent                            string
20912	googleclouddialogflowv2beta1agent *GoogleCloudDialogflowV2beta1Agent
20913	urlParams_                        gensupport.URLParams
20914	ctx_                              context.Context
20915	header_                           http.Header
20916}
20917
20918// Agent: Creates/updates the specified agent.
20919func (r *ProjectsLocationsService) Agent(parent string, googleclouddialogflowv2beta1agent *GoogleCloudDialogflowV2beta1Agent) *ProjectsLocationsAgentCall {
20920	c := &ProjectsLocationsAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20921	c.parent = parent
20922	c.googleclouddialogflowv2beta1agent = googleclouddialogflowv2beta1agent
20923	return c
20924}
20925
20926// UpdateMask sets the optional parameter "updateMask": The mask to
20927// control which fields get updated.
20928func (c *ProjectsLocationsAgentCall) UpdateMask(updateMask string) *ProjectsLocationsAgentCall {
20929	c.urlParams_.Set("updateMask", updateMask)
20930	return c
20931}
20932
20933// Fields allows partial responses to be retrieved. See
20934// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20935// for more information.
20936func (c *ProjectsLocationsAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentCall {
20937	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20938	return c
20939}
20940
20941// Context sets the context to be used in this call's Do method. Any
20942// pending HTTP request will be aborted if the provided context is
20943// canceled.
20944func (c *ProjectsLocationsAgentCall) Context(ctx context.Context) *ProjectsLocationsAgentCall {
20945	c.ctx_ = ctx
20946	return c
20947}
20948
20949// Header returns an http.Header that can be modified by the caller to
20950// add HTTP headers to the request.
20951func (c *ProjectsLocationsAgentCall) Header() http.Header {
20952	if c.header_ == nil {
20953		c.header_ = make(http.Header)
20954	}
20955	return c.header_
20956}
20957
20958func (c *ProjectsLocationsAgentCall) doRequest(alt string) (*http.Response, error) {
20959	reqHeaders := make(http.Header)
20960	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
20961	for k, v := range c.header_ {
20962		reqHeaders[k] = v
20963	}
20964	reqHeaders.Set("User-Agent", c.s.userAgent())
20965	var body io.Reader = nil
20966	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1agent)
20967	if err != nil {
20968		return nil, err
20969	}
20970	reqHeaders.Set("Content-Type", "application/json")
20971	c.urlParams_.Set("alt", alt)
20972	c.urlParams_.Set("prettyPrint", "false")
20973	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
20974	urls += "?" + c.urlParams_.Encode()
20975	req, err := http.NewRequest("POST", urls, body)
20976	if err != nil {
20977		return nil, err
20978	}
20979	req.Header = reqHeaders
20980	googleapi.Expand(req.URL, map[string]string{
20981		"parent": c.parent,
20982	})
20983	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20984}
20985
20986// Do executes the "dialogflow.projects.locations.agent" call.
20987// Exactly one of *GoogleCloudDialogflowV2beta1Agent or error will be
20988// non-nil. Any non-2xx status code is an error. Response headers are in
20989// either *GoogleCloudDialogflowV2beta1Agent.ServerResponse.Header or
20990// (if a response was returned at all) in
20991// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20992// whether the returned error was because http.StatusNotModified was
20993// returned.
20994func (c *ProjectsLocationsAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Agent, error) {
20995	gensupport.SetOptions(c.urlParams_, opts...)
20996	res, err := c.doRequest("json")
20997	if res != nil && res.StatusCode == http.StatusNotModified {
20998		if res.Body != nil {
20999			res.Body.Close()
21000		}
21001		return nil, &googleapi.Error{
21002			Code:   res.StatusCode,
21003			Header: res.Header,
21004		}
21005	}
21006	if err != nil {
21007		return nil, err
21008	}
21009	defer googleapi.CloseBody(res)
21010	if err := googleapi.CheckResponse(res); err != nil {
21011		return nil, err
21012	}
21013	ret := &GoogleCloudDialogflowV2beta1Agent{
21014		ServerResponse: googleapi.ServerResponse{
21015			Header:         res.Header,
21016			HTTPStatusCode: res.StatusCode,
21017		},
21018	}
21019	target := &ret
21020	if err := gensupport.DecodeResponse(target, res); err != nil {
21021		return nil, err
21022	}
21023	return ret, nil
21024	// {
21025	//   "description": "Creates/updates the specified agent.",
21026	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent",
21027	//   "httpMethod": "POST",
21028	//   "id": "dialogflow.projects.locations.agent",
21029	//   "parameterOrder": [
21030	//     "parent"
21031	//   ],
21032	//   "parameters": {
21033	//     "parent": {
21034	//       "description": "Required. The project of this agent.\nFormat: `projects/\u003cProject ID\u003e`.",
21035	//       "location": "path",
21036	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
21037	//       "required": true,
21038	//       "type": "string"
21039	//     },
21040	//     "updateMask": {
21041	//       "description": "Optional. The mask to control which fields get updated.",
21042	//       "format": "google-fieldmask",
21043	//       "location": "query",
21044	//       "type": "string"
21045	//     }
21046	//   },
21047	//   "path": "v2beta1/{+parent}/agent",
21048	//   "request": {
21049	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
21050	//   },
21051	//   "response": {
21052	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
21053	//   },
21054	//   "scopes": [
21055	//     "https://www.googleapis.com/auth/cloud-platform",
21056	//     "https://www.googleapis.com/auth/dialogflow"
21057	//   ]
21058	// }
21059
21060}
21061
21062// method id "dialogflow.projects.locations.deleteAgent":
21063
21064type ProjectsLocationsDeleteAgentCall struct {
21065	s          *Service
21066	parent     string
21067	urlParams_ gensupport.URLParams
21068	ctx_       context.Context
21069	header_    http.Header
21070}
21071
21072// DeleteAgent: Deletes the specified agent.
21073func (r *ProjectsLocationsService) DeleteAgent(parent string) *ProjectsLocationsDeleteAgentCall {
21074	c := &ProjectsLocationsDeleteAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21075	c.parent = parent
21076	return c
21077}
21078
21079// Fields allows partial responses to be retrieved. See
21080// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21081// for more information.
21082func (c *ProjectsLocationsDeleteAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeleteAgentCall {
21083	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21084	return c
21085}
21086
21087// Context sets the context to be used in this call's Do method. Any
21088// pending HTTP request will be aborted if the provided context is
21089// canceled.
21090func (c *ProjectsLocationsDeleteAgentCall) Context(ctx context.Context) *ProjectsLocationsDeleteAgentCall {
21091	c.ctx_ = ctx
21092	return c
21093}
21094
21095// Header returns an http.Header that can be modified by the caller to
21096// add HTTP headers to the request.
21097func (c *ProjectsLocationsDeleteAgentCall) Header() http.Header {
21098	if c.header_ == nil {
21099		c.header_ = make(http.Header)
21100	}
21101	return c.header_
21102}
21103
21104func (c *ProjectsLocationsDeleteAgentCall) doRequest(alt string) (*http.Response, error) {
21105	reqHeaders := make(http.Header)
21106	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21107	for k, v := range c.header_ {
21108		reqHeaders[k] = v
21109	}
21110	reqHeaders.Set("User-Agent", c.s.userAgent())
21111	var body io.Reader = nil
21112	c.urlParams_.Set("alt", alt)
21113	c.urlParams_.Set("prettyPrint", "false")
21114	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
21115	urls += "?" + c.urlParams_.Encode()
21116	req, err := http.NewRequest("DELETE", urls, body)
21117	if err != nil {
21118		return nil, err
21119	}
21120	req.Header = reqHeaders
21121	googleapi.Expand(req.URL, map[string]string{
21122		"parent": c.parent,
21123	})
21124	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21125}
21126
21127// Do executes the "dialogflow.projects.locations.deleteAgent" call.
21128// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
21129// non-2xx status code is an error. Response headers are in either
21130// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
21131// returned at all) in error.(*googleapi.Error).Header. Use
21132// googleapi.IsNotModified to check whether the returned error was
21133// because http.StatusNotModified was returned.
21134func (c *ProjectsLocationsDeleteAgentCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
21135	gensupport.SetOptions(c.urlParams_, opts...)
21136	res, err := c.doRequest("json")
21137	if res != nil && res.StatusCode == http.StatusNotModified {
21138		if res.Body != nil {
21139			res.Body.Close()
21140		}
21141		return nil, &googleapi.Error{
21142			Code:   res.StatusCode,
21143			Header: res.Header,
21144		}
21145	}
21146	if err != nil {
21147		return nil, err
21148	}
21149	defer googleapi.CloseBody(res)
21150	if err := googleapi.CheckResponse(res); err != nil {
21151		return nil, err
21152	}
21153	ret := &GoogleProtobufEmpty{
21154		ServerResponse: googleapi.ServerResponse{
21155			Header:         res.Header,
21156			HTTPStatusCode: res.StatusCode,
21157		},
21158	}
21159	target := &ret
21160	if err := gensupport.DecodeResponse(target, res); err != nil {
21161		return nil, err
21162	}
21163	return ret, nil
21164	// {
21165	//   "description": "Deletes the specified agent.",
21166	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent",
21167	//   "httpMethod": "DELETE",
21168	//   "id": "dialogflow.projects.locations.deleteAgent",
21169	//   "parameterOrder": [
21170	//     "parent"
21171	//   ],
21172	//   "parameters": {
21173	//     "parent": {
21174	//       "description": "Required. The project that the agent to delete is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
21175	//       "location": "path",
21176	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
21177	//       "required": true,
21178	//       "type": "string"
21179	//     }
21180	//   },
21181	//   "path": "v2beta1/{+parent}/agent",
21182	//   "response": {
21183	//     "$ref": "GoogleProtobufEmpty"
21184	//   },
21185	//   "scopes": [
21186	//     "https://www.googleapis.com/auth/cloud-platform",
21187	//     "https://www.googleapis.com/auth/dialogflow"
21188	//   ]
21189	// }
21190
21191}
21192
21193// method id "dialogflow.projects.locations.getAgent":
21194
21195type ProjectsLocationsGetAgentCall struct {
21196	s            *Service
21197	parent       string
21198	urlParams_   gensupport.URLParams
21199	ifNoneMatch_ string
21200	ctx_         context.Context
21201	header_      http.Header
21202}
21203
21204// GetAgent: Retrieves the specified agent.
21205func (r *ProjectsLocationsService) GetAgent(parent string) *ProjectsLocationsGetAgentCall {
21206	c := &ProjectsLocationsGetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21207	c.parent = parent
21208	return c
21209}
21210
21211// Fields allows partial responses to be retrieved. See
21212// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21213// for more information.
21214func (c *ProjectsLocationsGetAgentCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetAgentCall {
21215	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21216	return c
21217}
21218
21219// IfNoneMatch sets the optional parameter which makes the operation
21220// fail if the object's ETag matches the given value. This is useful for
21221// getting updates only after the object has changed since the last
21222// request. Use googleapi.IsNotModified to check whether the response
21223// error from Do is the result of In-None-Match.
21224func (c *ProjectsLocationsGetAgentCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetAgentCall {
21225	c.ifNoneMatch_ = entityTag
21226	return c
21227}
21228
21229// Context sets the context to be used in this call's Do method. Any
21230// pending HTTP request will be aborted if the provided context is
21231// canceled.
21232func (c *ProjectsLocationsGetAgentCall) Context(ctx context.Context) *ProjectsLocationsGetAgentCall {
21233	c.ctx_ = ctx
21234	return c
21235}
21236
21237// Header returns an http.Header that can be modified by the caller to
21238// add HTTP headers to the request.
21239func (c *ProjectsLocationsGetAgentCall) Header() http.Header {
21240	if c.header_ == nil {
21241		c.header_ = make(http.Header)
21242	}
21243	return c.header_
21244}
21245
21246func (c *ProjectsLocationsGetAgentCall) doRequest(alt string) (*http.Response, error) {
21247	reqHeaders := make(http.Header)
21248	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21249	for k, v := range c.header_ {
21250		reqHeaders[k] = v
21251	}
21252	reqHeaders.Set("User-Agent", c.s.userAgent())
21253	if c.ifNoneMatch_ != "" {
21254		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21255	}
21256	var body io.Reader = nil
21257	c.urlParams_.Set("alt", alt)
21258	c.urlParams_.Set("prettyPrint", "false")
21259	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
21260	urls += "?" + c.urlParams_.Encode()
21261	req, err := http.NewRequest("GET", urls, body)
21262	if err != nil {
21263		return nil, err
21264	}
21265	req.Header = reqHeaders
21266	googleapi.Expand(req.URL, map[string]string{
21267		"parent": c.parent,
21268	})
21269	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21270}
21271
21272// Do executes the "dialogflow.projects.locations.getAgent" call.
21273// Exactly one of *GoogleCloudDialogflowV2beta1Agent or error will be
21274// non-nil. Any non-2xx status code is an error. Response headers are in
21275// either *GoogleCloudDialogflowV2beta1Agent.ServerResponse.Header or
21276// (if a response was returned at all) in
21277// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21278// whether the returned error was because http.StatusNotModified was
21279// returned.
21280func (c *ProjectsLocationsGetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Agent, error) {
21281	gensupport.SetOptions(c.urlParams_, opts...)
21282	res, err := c.doRequest("json")
21283	if res != nil && res.StatusCode == http.StatusNotModified {
21284		if res.Body != nil {
21285			res.Body.Close()
21286		}
21287		return nil, &googleapi.Error{
21288			Code:   res.StatusCode,
21289			Header: res.Header,
21290		}
21291	}
21292	if err != nil {
21293		return nil, err
21294	}
21295	defer googleapi.CloseBody(res)
21296	if err := googleapi.CheckResponse(res); err != nil {
21297		return nil, err
21298	}
21299	ret := &GoogleCloudDialogflowV2beta1Agent{
21300		ServerResponse: googleapi.ServerResponse{
21301			Header:         res.Header,
21302			HTTPStatusCode: res.StatusCode,
21303		},
21304	}
21305	target := &ret
21306	if err := gensupport.DecodeResponse(target, res); err != nil {
21307		return nil, err
21308	}
21309	return ret, nil
21310	// {
21311	//   "description": "Retrieves the specified agent.",
21312	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent",
21313	//   "httpMethod": "GET",
21314	//   "id": "dialogflow.projects.locations.getAgent",
21315	//   "parameterOrder": [
21316	//     "parent"
21317	//   ],
21318	//   "parameters": {
21319	//     "parent": {
21320	//       "description": "Required. The project that the agent to fetch is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
21321	//       "location": "path",
21322	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
21323	//       "required": true,
21324	//       "type": "string"
21325	//     }
21326	//   },
21327	//   "path": "v2beta1/{+parent}/agent",
21328	//   "response": {
21329	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
21330	//   },
21331	//   "scopes": [
21332	//     "https://www.googleapis.com/auth/cloud-platform",
21333	//     "https://www.googleapis.com/auth/dialogflow"
21334	//   ]
21335	// }
21336
21337}
21338
21339// method id "dialogflow.projects.locations.agent.export":
21340
21341type ProjectsLocationsAgentExportCall struct {
21342	s                                              *Service
21343	parent                                         string
21344	googleclouddialogflowv2beta1exportagentrequest *GoogleCloudDialogflowV2beta1ExportAgentRequest
21345	urlParams_                                     gensupport.URLParams
21346	ctx_                                           context.Context
21347	header_                                        http.Header
21348}
21349
21350// Export: Exports the specified agent to a ZIP file.
21351//
21352//
21353// Operation <response: ExportAgentResponse>
21354func (r *ProjectsLocationsAgentService) Export(parent string, googleclouddialogflowv2beta1exportagentrequest *GoogleCloudDialogflowV2beta1ExportAgentRequest) *ProjectsLocationsAgentExportCall {
21355	c := &ProjectsLocationsAgentExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21356	c.parent = parent
21357	c.googleclouddialogflowv2beta1exportagentrequest = googleclouddialogflowv2beta1exportagentrequest
21358	return c
21359}
21360
21361// Fields allows partial responses to be retrieved. See
21362// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21363// for more information.
21364func (c *ProjectsLocationsAgentExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentExportCall {
21365	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21366	return c
21367}
21368
21369// Context sets the context to be used in this call's Do method. Any
21370// pending HTTP request will be aborted if the provided context is
21371// canceled.
21372func (c *ProjectsLocationsAgentExportCall) Context(ctx context.Context) *ProjectsLocationsAgentExportCall {
21373	c.ctx_ = ctx
21374	return c
21375}
21376
21377// Header returns an http.Header that can be modified by the caller to
21378// add HTTP headers to the request.
21379func (c *ProjectsLocationsAgentExportCall) Header() http.Header {
21380	if c.header_ == nil {
21381		c.header_ = make(http.Header)
21382	}
21383	return c.header_
21384}
21385
21386func (c *ProjectsLocationsAgentExportCall) doRequest(alt string) (*http.Response, error) {
21387	reqHeaders := make(http.Header)
21388	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21389	for k, v := range c.header_ {
21390		reqHeaders[k] = v
21391	}
21392	reqHeaders.Set("User-Agent", c.s.userAgent())
21393	var body io.Reader = nil
21394	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1exportagentrequest)
21395	if err != nil {
21396		return nil, err
21397	}
21398	reqHeaders.Set("Content-Type", "application/json")
21399	c.urlParams_.Set("alt", alt)
21400	c.urlParams_.Set("prettyPrint", "false")
21401	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:export")
21402	urls += "?" + c.urlParams_.Encode()
21403	req, err := http.NewRequest("POST", urls, body)
21404	if err != nil {
21405		return nil, err
21406	}
21407	req.Header = reqHeaders
21408	googleapi.Expand(req.URL, map[string]string{
21409		"parent": c.parent,
21410	})
21411	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21412}
21413
21414// Do executes the "dialogflow.projects.locations.agent.export" call.
21415// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
21416// Any non-2xx status code is an error. Response headers are in either
21417// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
21418// was returned at all) in error.(*googleapi.Error).Header. Use
21419// googleapi.IsNotModified to check whether the returned error was
21420// because http.StatusNotModified was returned.
21421func (c *ProjectsLocationsAgentExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
21422	gensupport.SetOptions(c.urlParams_, opts...)
21423	res, err := c.doRequest("json")
21424	if res != nil && res.StatusCode == http.StatusNotModified {
21425		if res.Body != nil {
21426			res.Body.Close()
21427		}
21428		return nil, &googleapi.Error{
21429			Code:   res.StatusCode,
21430			Header: res.Header,
21431		}
21432	}
21433	if err != nil {
21434		return nil, err
21435	}
21436	defer googleapi.CloseBody(res)
21437	if err := googleapi.CheckResponse(res); err != nil {
21438		return nil, err
21439	}
21440	ret := &GoogleLongrunningOperation{
21441		ServerResponse: googleapi.ServerResponse{
21442			Header:         res.Header,
21443			HTTPStatusCode: res.StatusCode,
21444		},
21445	}
21446	target := &ret
21447	if err := gensupport.DecodeResponse(target, res); err != nil {
21448		return nil, err
21449	}
21450	return ret, nil
21451	// {
21452	//   "description": "Exports the specified agent to a ZIP file.\n\n\nOperation \u003cresponse: ExportAgentResponse\u003e",
21453	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:export",
21454	//   "httpMethod": "POST",
21455	//   "id": "dialogflow.projects.locations.agent.export",
21456	//   "parameterOrder": [
21457	//     "parent"
21458	//   ],
21459	//   "parameters": {
21460	//     "parent": {
21461	//       "description": "Required. The project that the agent to export is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
21462	//       "location": "path",
21463	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
21464	//       "required": true,
21465	//       "type": "string"
21466	//     }
21467	//   },
21468	//   "path": "v2beta1/{+parent}/agent:export",
21469	//   "request": {
21470	//     "$ref": "GoogleCloudDialogflowV2beta1ExportAgentRequest"
21471	//   },
21472	//   "response": {
21473	//     "$ref": "GoogleLongrunningOperation"
21474	//   },
21475	//   "scopes": [
21476	//     "https://www.googleapis.com/auth/cloud-platform",
21477	//     "https://www.googleapis.com/auth/dialogflow"
21478	//   ]
21479	// }
21480
21481}
21482
21483// method id "dialogflow.projects.locations.agent.fulfillment":
21484
21485type ProjectsLocationsAgentFulfillmentCall struct {
21486	s                                       *Service
21487	nameid                                  string
21488	googleclouddialogflowv2beta1fulfillment *GoogleCloudDialogflowV2beta1Fulfillment
21489	urlParams_                              gensupport.URLParams
21490	ctx_                                    context.Context
21491	header_                                 http.Header
21492}
21493
21494// Fulfillment: Updates the fulfillment.
21495func (r *ProjectsLocationsAgentService) Fulfillment(nameid string, googleclouddialogflowv2beta1fulfillment *GoogleCloudDialogflowV2beta1Fulfillment) *ProjectsLocationsAgentFulfillmentCall {
21496	c := &ProjectsLocationsAgentFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21497	c.nameid = nameid
21498	c.googleclouddialogflowv2beta1fulfillment = googleclouddialogflowv2beta1fulfillment
21499	return c
21500}
21501
21502// UpdateMask sets the optional parameter "updateMask": Required. The
21503// mask to control which fields get updated. If the mask is not
21504// present, all fields will be updated.
21505func (c *ProjectsLocationsAgentFulfillmentCall) UpdateMask(updateMask string) *ProjectsLocationsAgentFulfillmentCall {
21506	c.urlParams_.Set("updateMask", updateMask)
21507	return c
21508}
21509
21510// Fields allows partial responses to be retrieved. See
21511// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21512// for more information.
21513func (c *ProjectsLocationsAgentFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentFulfillmentCall {
21514	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21515	return c
21516}
21517
21518// Context sets the context to be used in this call's Do method. Any
21519// pending HTTP request will be aborted if the provided context is
21520// canceled.
21521func (c *ProjectsLocationsAgentFulfillmentCall) Context(ctx context.Context) *ProjectsLocationsAgentFulfillmentCall {
21522	c.ctx_ = ctx
21523	return c
21524}
21525
21526// Header returns an http.Header that can be modified by the caller to
21527// add HTTP headers to the request.
21528func (c *ProjectsLocationsAgentFulfillmentCall) Header() http.Header {
21529	if c.header_ == nil {
21530		c.header_ = make(http.Header)
21531	}
21532	return c.header_
21533}
21534
21535func (c *ProjectsLocationsAgentFulfillmentCall) doRequest(alt string) (*http.Response, error) {
21536	reqHeaders := make(http.Header)
21537	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21538	for k, v := range c.header_ {
21539		reqHeaders[k] = v
21540	}
21541	reqHeaders.Set("User-Agent", c.s.userAgent())
21542	var body io.Reader = nil
21543	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1fulfillment)
21544	if err != nil {
21545		return nil, err
21546	}
21547	reqHeaders.Set("Content-Type", "application/json")
21548	c.urlParams_.Set("alt", alt)
21549	c.urlParams_.Set("prettyPrint", "false")
21550	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
21551	urls += "?" + c.urlParams_.Encode()
21552	req, err := http.NewRequest("POST", urls, body)
21553	if err != nil {
21554		return nil, err
21555	}
21556	req.Header = reqHeaders
21557	googleapi.Expand(req.URL, map[string]string{
21558		"name": c.nameid,
21559	})
21560	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21561}
21562
21563// Do executes the "dialogflow.projects.locations.agent.fulfillment" call.
21564// Exactly one of *GoogleCloudDialogflowV2beta1Fulfillment or error will
21565// be non-nil. Any non-2xx status code is an error. Response headers are
21566// in either
21567// *GoogleCloudDialogflowV2beta1Fulfillment.ServerResponse.Header or (if
21568// a response was returned at all) in error.(*googleapi.Error).Header.
21569// Use googleapi.IsNotModified to check whether the returned error was
21570// because http.StatusNotModified was returned.
21571func (c *ProjectsLocationsAgentFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Fulfillment, error) {
21572	gensupport.SetOptions(c.urlParams_, opts...)
21573	res, err := c.doRequest("json")
21574	if res != nil && res.StatusCode == http.StatusNotModified {
21575		if res.Body != nil {
21576			res.Body.Close()
21577		}
21578		return nil, &googleapi.Error{
21579			Code:   res.StatusCode,
21580			Header: res.Header,
21581		}
21582	}
21583	if err != nil {
21584		return nil, err
21585	}
21586	defer googleapi.CloseBody(res)
21587	if err := googleapi.CheckResponse(res); err != nil {
21588		return nil, err
21589	}
21590	ret := &GoogleCloudDialogflowV2beta1Fulfillment{
21591		ServerResponse: googleapi.ServerResponse{
21592			Header:         res.Header,
21593			HTTPStatusCode: res.StatusCode,
21594		},
21595	}
21596	target := &ret
21597	if err := gensupport.DecodeResponse(target, res); err != nil {
21598		return nil, err
21599	}
21600	return ret, nil
21601	// {
21602	//   "description": "Updates the fulfillment.",
21603	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/fulfillment",
21604	//   "httpMethod": "POST",
21605	//   "id": "dialogflow.projects.locations.agent.fulfillment",
21606	//   "parameterOrder": [
21607	//     "name"
21608	//   ],
21609	//   "parameters": {
21610	//     "name": {
21611	//       "description": "Required. The unique identifier of the fulfillment.\nFormat: `projects/\u003cProject ID\u003e/agent/fulfillment`.",
21612	//       "location": "path",
21613	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/fulfillment$",
21614	//       "required": true,
21615	//       "type": "string"
21616	//     },
21617	//     "updateMask": {
21618	//       "description": "Required. The mask to control which fields get updated. If the mask is not\npresent, all fields will be updated.",
21619	//       "format": "google-fieldmask",
21620	//       "location": "query",
21621	//       "type": "string"
21622	//     }
21623	//   },
21624	//   "path": "v2beta1/{+name}",
21625	//   "request": {
21626	//     "$ref": "GoogleCloudDialogflowV2beta1Fulfillment"
21627	//   },
21628	//   "response": {
21629	//     "$ref": "GoogleCloudDialogflowV2beta1Fulfillment"
21630	//   },
21631	//   "scopes": [
21632	//     "https://www.googleapis.com/auth/cloud-platform",
21633	//     "https://www.googleapis.com/auth/dialogflow"
21634	//   ]
21635	// }
21636
21637}
21638
21639// method id "dialogflow.projects.locations.agent.getFulfillment":
21640
21641type ProjectsLocationsAgentGetFulfillmentCall struct {
21642	s            *Service
21643	name         string
21644	urlParams_   gensupport.URLParams
21645	ifNoneMatch_ string
21646	ctx_         context.Context
21647	header_      http.Header
21648}
21649
21650// GetFulfillment: Retrieves the fulfillment.
21651func (r *ProjectsLocationsAgentService) GetFulfillment(name string) *ProjectsLocationsAgentGetFulfillmentCall {
21652	c := &ProjectsLocationsAgentGetFulfillmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21653	c.name = name
21654	return c
21655}
21656
21657// Fields allows partial responses to be retrieved. See
21658// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21659// for more information.
21660func (c *ProjectsLocationsAgentGetFulfillmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentGetFulfillmentCall {
21661	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21662	return c
21663}
21664
21665// IfNoneMatch sets the optional parameter which makes the operation
21666// fail if the object's ETag matches the given value. This is useful for
21667// getting updates only after the object has changed since the last
21668// request. Use googleapi.IsNotModified to check whether the response
21669// error from Do is the result of In-None-Match.
21670func (c *ProjectsLocationsAgentGetFulfillmentCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentGetFulfillmentCall {
21671	c.ifNoneMatch_ = entityTag
21672	return c
21673}
21674
21675// Context sets the context to be used in this call's Do method. Any
21676// pending HTTP request will be aborted if the provided context is
21677// canceled.
21678func (c *ProjectsLocationsAgentGetFulfillmentCall) Context(ctx context.Context) *ProjectsLocationsAgentGetFulfillmentCall {
21679	c.ctx_ = ctx
21680	return c
21681}
21682
21683// Header returns an http.Header that can be modified by the caller to
21684// add HTTP headers to the request.
21685func (c *ProjectsLocationsAgentGetFulfillmentCall) Header() http.Header {
21686	if c.header_ == nil {
21687		c.header_ = make(http.Header)
21688	}
21689	return c.header_
21690}
21691
21692func (c *ProjectsLocationsAgentGetFulfillmentCall) doRequest(alt string) (*http.Response, error) {
21693	reqHeaders := make(http.Header)
21694	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21695	for k, v := range c.header_ {
21696		reqHeaders[k] = v
21697	}
21698	reqHeaders.Set("User-Agent", c.s.userAgent())
21699	if c.ifNoneMatch_ != "" {
21700		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21701	}
21702	var body io.Reader = nil
21703	c.urlParams_.Set("alt", alt)
21704	c.urlParams_.Set("prettyPrint", "false")
21705	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
21706	urls += "?" + c.urlParams_.Encode()
21707	req, err := http.NewRequest("GET", urls, body)
21708	if err != nil {
21709		return nil, err
21710	}
21711	req.Header = reqHeaders
21712	googleapi.Expand(req.URL, map[string]string{
21713		"name": c.name,
21714	})
21715	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21716}
21717
21718// Do executes the "dialogflow.projects.locations.agent.getFulfillment" call.
21719// Exactly one of *GoogleCloudDialogflowV2beta1Fulfillment or error will
21720// be non-nil. Any non-2xx status code is an error. Response headers are
21721// in either
21722// *GoogleCloudDialogflowV2beta1Fulfillment.ServerResponse.Header or (if
21723// a response was returned at all) in error.(*googleapi.Error).Header.
21724// Use googleapi.IsNotModified to check whether the returned error was
21725// because http.StatusNotModified was returned.
21726func (c *ProjectsLocationsAgentGetFulfillmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Fulfillment, error) {
21727	gensupport.SetOptions(c.urlParams_, opts...)
21728	res, err := c.doRequest("json")
21729	if res != nil && res.StatusCode == http.StatusNotModified {
21730		if res.Body != nil {
21731			res.Body.Close()
21732		}
21733		return nil, &googleapi.Error{
21734			Code:   res.StatusCode,
21735			Header: res.Header,
21736		}
21737	}
21738	if err != nil {
21739		return nil, err
21740	}
21741	defer googleapi.CloseBody(res)
21742	if err := googleapi.CheckResponse(res); err != nil {
21743		return nil, err
21744	}
21745	ret := &GoogleCloudDialogflowV2beta1Fulfillment{
21746		ServerResponse: googleapi.ServerResponse{
21747			Header:         res.Header,
21748			HTTPStatusCode: res.StatusCode,
21749		},
21750	}
21751	target := &ret
21752	if err := gensupport.DecodeResponse(target, res); err != nil {
21753		return nil, err
21754	}
21755	return ret, nil
21756	// {
21757	//   "description": "Retrieves the fulfillment.",
21758	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/fulfillment",
21759	//   "httpMethod": "GET",
21760	//   "id": "dialogflow.projects.locations.agent.getFulfillment",
21761	//   "parameterOrder": [
21762	//     "name"
21763	//   ],
21764	//   "parameters": {
21765	//     "name": {
21766	//       "description": "Required. The name of the fulfillment.\nFormat: `projects/\u003cProject ID\u003e/agent/fulfillment`.",
21767	//       "location": "path",
21768	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/fulfillment$",
21769	//       "required": true,
21770	//       "type": "string"
21771	//     }
21772	//   },
21773	//   "path": "v2beta1/{+name}",
21774	//   "response": {
21775	//     "$ref": "GoogleCloudDialogflowV2beta1Fulfillment"
21776	//   },
21777	//   "scopes": [
21778	//     "https://www.googleapis.com/auth/cloud-platform",
21779	//     "https://www.googleapis.com/auth/dialogflow"
21780	//   ]
21781	// }
21782
21783}
21784
21785// method id "dialogflow.projects.locations.agent.import":
21786
21787type ProjectsLocationsAgentImportCall struct {
21788	s                                              *Service
21789	parent                                         string
21790	googleclouddialogflowv2beta1importagentrequest *GoogleCloudDialogflowV2beta1ImportAgentRequest
21791	urlParams_                                     gensupport.URLParams
21792	ctx_                                           context.Context
21793	header_                                        http.Header
21794}
21795
21796// Import: Imports the specified agent from a ZIP file.
21797//
21798// Uploads new intents and entity types without deleting the existing
21799// ones.
21800// Intents and entity types with the same name are replaced with the
21801// new
21802// versions from ImportAgentRequest.
21803//
21804//
21805// Operation <response: google.protobuf.Empty>
21806func (r *ProjectsLocationsAgentService) Import(parent string, googleclouddialogflowv2beta1importagentrequest *GoogleCloudDialogflowV2beta1ImportAgentRequest) *ProjectsLocationsAgentImportCall {
21807	c := &ProjectsLocationsAgentImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21808	c.parent = parent
21809	c.googleclouddialogflowv2beta1importagentrequest = googleclouddialogflowv2beta1importagentrequest
21810	return c
21811}
21812
21813// Fields allows partial responses to be retrieved. See
21814// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21815// for more information.
21816func (c *ProjectsLocationsAgentImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentImportCall {
21817	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21818	return c
21819}
21820
21821// Context sets the context to be used in this call's Do method. Any
21822// pending HTTP request will be aborted if the provided context is
21823// canceled.
21824func (c *ProjectsLocationsAgentImportCall) Context(ctx context.Context) *ProjectsLocationsAgentImportCall {
21825	c.ctx_ = ctx
21826	return c
21827}
21828
21829// Header returns an http.Header that can be modified by the caller to
21830// add HTTP headers to the request.
21831func (c *ProjectsLocationsAgentImportCall) Header() http.Header {
21832	if c.header_ == nil {
21833		c.header_ = make(http.Header)
21834	}
21835	return c.header_
21836}
21837
21838func (c *ProjectsLocationsAgentImportCall) doRequest(alt string) (*http.Response, error) {
21839	reqHeaders := make(http.Header)
21840	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21841	for k, v := range c.header_ {
21842		reqHeaders[k] = v
21843	}
21844	reqHeaders.Set("User-Agent", c.s.userAgent())
21845	var body io.Reader = nil
21846	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1importagentrequest)
21847	if err != nil {
21848		return nil, err
21849	}
21850	reqHeaders.Set("Content-Type", "application/json")
21851	c.urlParams_.Set("alt", alt)
21852	c.urlParams_.Set("prettyPrint", "false")
21853	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:import")
21854	urls += "?" + c.urlParams_.Encode()
21855	req, err := http.NewRequest("POST", urls, body)
21856	if err != nil {
21857		return nil, err
21858	}
21859	req.Header = reqHeaders
21860	googleapi.Expand(req.URL, map[string]string{
21861		"parent": c.parent,
21862	})
21863	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21864}
21865
21866// Do executes the "dialogflow.projects.locations.agent.import" call.
21867// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
21868// Any non-2xx status code is an error. Response headers are in either
21869// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
21870// was returned at all) in error.(*googleapi.Error).Header. Use
21871// googleapi.IsNotModified to check whether the returned error was
21872// because http.StatusNotModified was returned.
21873func (c *ProjectsLocationsAgentImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
21874	gensupport.SetOptions(c.urlParams_, opts...)
21875	res, err := c.doRequest("json")
21876	if res != nil && res.StatusCode == http.StatusNotModified {
21877		if res.Body != nil {
21878			res.Body.Close()
21879		}
21880		return nil, &googleapi.Error{
21881			Code:   res.StatusCode,
21882			Header: res.Header,
21883		}
21884	}
21885	if err != nil {
21886		return nil, err
21887	}
21888	defer googleapi.CloseBody(res)
21889	if err := googleapi.CheckResponse(res); err != nil {
21890		return nil, err
21891	}
21892	ret := &GoogleLongrunningOperation{
21893		ServerResponse: googleapi.ServerResponse{
21894			Header:         res.Header,
21895			HTTPStatusCode: res.StatusCode,
21896		},
21897	}
21898	target := &ret
21899	if err := gensupport.DecodeResponse(target, res); err != nil {
21900		return nil, err
21901	}
21902	return ret, nil
21903	// {
21904	//   "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",
21905	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:import",
21906	//   "httpMethod": "POST",
21907	//   "id": "dialogflow.projects.locations.agent.import",
21908	//   "parameterOrder": [
21909	//     "parent"
21910	//   ],
21911	//   "parameters": {
21912	//     "parent": {
21913	//       "description": "Required. The project that the agent to import is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
21914	//       "location": "path",
21915	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
21916	//       "required": true,
21917	//       "type": "string"
21918	//     }
21919	//   },
21920	//   "path": "v2beta1/{+parent}/agent:import",
21921	//   "request": {
21922	//     "$ref": "GoogleCloudDialogflowV2beta1ImportAgentRequest"
21923	//   },
21924	//   "response": {
21925	//     "$ref": "GoogleLongrunningOperation"
21926	//   },
21927	//   "scopes": [
21928	//     "https://www.googleapis.com/auth/cloud-platform",
21929	//     "https://www.googleapis.com/auth/dialogflow"
21930	//   ]
21931	// }
21932
21933}
21934
21935// method id "dialogflow.projects.locations.agent.restore":
21936
21937type ProjectsLocationsAgentRestoreCall struct {
21938	s                                               *Service
21939	parent                                          string
21940	googleclouddialogflowv2beta1restoreagentrequest *GoogleCloudDialogflowV2beta1RestoreAgentRequest
21941	urlParams_                                      gensupport.URLParams
21942	ctx_                                            context.Context
21943	header_                                         http.Header
21944}
21945
21946// Restore: Restores the specified agent from a ZIP file.
21947//
21948// Replaces the current agent version with a new one. All the intents
21949// and
21950// entity types in the older version are deleted.
21951//
21952//
21953// Operation <response: google.protobuf.Empty>
21954func (r *ProjectsLocationsAgentService) Restore(parent string, googleclouddialogflowv2beta1restoreagentrequest *GoogleCloudDialogflowV2beta1RestoreAgentRequest) *ProjectsLocationsAgentRestoreCall {
21955	c := &ProjectsLocationsAgentRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21956	c.parent = parent
21957	c.googleclouddialogflowv2beta1restoreagentrequest = googleclouddialogflowv2beta1restoreagentrequest
21958	return c
21959}
21960
21961// Fields allows partial responses to be retrieved. See
21962// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21963// for more information.
21964func (c *ProjectsLocationsAgentRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentRestoreCall {
21965	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21966	return c
21967}
21968
21969// Context sets the context to be used in this call's Do method. Any
21970// pending HTTP request will be aborted if the provided context is
21971// canceled.
21972func (c *ProjectsLocationsAgentRestoreCall) Context(ctx context.Context) *ProjectsLocationsAgentRestoreCall {
21973	c.ctx_ = ctx
21974	return c
21975}
21976
21977// Header returns an http.Header that can be modified by the caller to
21978// add HTTP headers to the request.
21979func (c *ProjectsLocationsAgentRestoreCall) Header() http.Header {
21980	if c.header_ == nil {
21981		c.header_ = make(http.Header)
21982	}
21983	return c.header_
21984}
21985
21986func (c *ProjectsLocationsAgentRestoreCall) doRequest(alt string) (*http.Response, error) {
21987	reqHeaders := make(http.Header)
21988	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
21989	for k, v := range c.header_ {
21990		reqHeaders[k] = v
21991	}
21992	reqHeaders.Set("User-Agent", c.s.userAgent())
21993	var body io.Reader = nil
21994	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1restoreagentrequest)
21995	if err != nil {
21996		return nil, err
21997	}
21998	reqHeaders.Set("Content-Type", "application/json")
21999	c.urlParams_.Set("alt", alt)
22000	c.urlParams_.Set("prettyPrint", "false")
22001	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:restore")
22002	urls += "?" + c.urlParams_.Encode()
22003	req, err := http.NewRequest("POST", urls, body)
22004	if err != nil {
22005		return nil, err
22006	}
22007	req.Header = reqHeaders
22008	googleapi.Expand(req.URL, map[string]string{
22009		"parent": c.parent,
22010	})
22011	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22012}
22013
22014// Do executes the "dialogflow.projects.locations.agent.restore" call.
22015// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
22016// Any non-2xx status code is an error. Response headers are in either
22017// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
22018// was returned at all) in error.(*googleapi.Error).Header. Use
22019// googleapi.IsNotModified to check whether the returned error was
22020// because http.StatusNotModified was returned.
22021func (c *ProjectsLocationsAgentRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
22022	gensupport.SetOptions(c.urlParams_, opts...)
22023	res, err := c.doRequest("json")
22024	if res != nil && res.StatusCode == http.StatusNotModified {
22025		if res.Body != nil {
22026			res.Body.Close()
22027		}
22028		return nil, &googleapi.Error{
22029			Code:   res.StatusCode,
22030			Header: res.Header,
22031		}
22032	}
22033	if err != nil {
22034		return nil, err
22035	}
22036	defer googleapi.CloseBody(res)
22037	if err := googleapi.CheckResponse(res); err != nil {
22038		return nil, err
22039	}
22040	ret := &GoogleLongrunningOperation{
22041		ServerResponse: googleapi.ServerResponse{
22042			Header:         res.Header,
22043			HTTPStatusCode: res.StatusCode,
22044		},
22045	}
22046	target := &ret
22047	if err := gensupport.DecodeResponse(target, res); err != nil {
22048		return nil, err
22049	}
22050	return ret, nil
22051	// {
22052	//   "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",
22053	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:restore",
22054	//   "httpMethod": "POST",
22055	//   "id": "dialogflow.projects.locations.agent.restore",
22056	//   "parameterOrder": [
22057	//     "parent"
22058	//   ],
22059	//   "parameters": {
22060	//     "parent": {
22061	//       "description": "Required. The project that the agent to restore is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
22062	//       "location": "path",
22063	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
22064	//       "required": true,
22065	//       "type": "string"
22066	//     }
22067	//   },
22068	//   "path": "v2beta1/{+parent}/agent:restore",
22069	//   "request": {
22070	//     "$ref": "GoogleCloudDialogflowV2beta1RestoreAgentRequest"
22071	//   },
22072	//   "response": {
22073	//     "$ref": "GoogleLongrunningOperation"
22074	//   },
22075	//   "scopes": [
22076	//     "https://www.googleapis.com/auth/cloud-platform",
22077	//     "https://www.googleapis.com/auth/dialogflow"
22078	//   ]
22079	// }
22080
22081}
22082
22083// method id "dialogflow.projects.locations.agent.train":
22084
22085type ProjectsLocationsAgentTrainCall struct {
22086	s                                             *Service
22087	parent                                        string
22088	googleclouddialogflowv2beta1trainagentrequest *GoogleCloudDialogflowV2beta1TrainAgentRequest
22089	urlParams_                                    gensupport.URLParams
22090	ctx_                                          context.Context
22091	header_                                       http.Header
22092}
22093
22094// Train: Trains the specified agent.
22095//
22096//
22097// Operation <response: google.protobuf.Empty>
22098func (r *ProjectsLocationsAgentService) Train(parent string, googleclouddialogflowv2beta1trainagentrequest *GoogleCloudDialogflowV2beta1TrainAgentRequest) *ProjectsLocationsAgentTrainCall {
22099	c := &ProjectsLocationsAgentTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22100	c.parent = parent
22101	c.googleclouddialogflowv2beta1trainagentrequest = googleclouddialogflowv2beta1trainagentrequest
22102	return c
22103}
22104
22105// Fields allows partial responses to be retrieved. See
22106// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22107// for more information.
22108func (c *ProjectsLocationsAgentTrainCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentTrainCall {
22109	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22110	return c
22111}
22112
22113// Context sets the context to be used in this call's Do method. Any
22114// pending HTTP request will be aborted if the provided context is
22115// canceled.
22116func (c *ProjectsLocationsAgentTrainCall) Context(ctx context.Context) *ProjectsLocationsAgentTrainCall {
22117	c.ctx_ = ctx
22118	return c
22119}
22120
22121// Header returns an http.Header that can be modified by the caller to
22122// add HTTP headers to the request.
22123func (c *ProjectsLocationsAgentTrainCall) Header() http.Header {
22124	if c.header_ == nil {
22125		c.header_ = make(http.Header)
22126	}
22127	return c.header_
22128}
22129
22130func (c *ProjectsLocationsAgentTrainCall) doRequest(alt string) (*http.Response, error) {
22131	reqHeaders := make(http.Header)
22132	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
22133	for k, v := range c.header_ {
22134		reqHeaders[k] = v
22135	}
22136	reqHeaders.Set("User-Agent", c.s.userAgent())
22137	var body io.Reader = nil
22138	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1trainagentrequest)
22139	if err != nil {
22140		return nil, err
22141	}
22142	reqHeaders.Set("Content-Type", "application/json")
22143	c.urlParams_.Set("alt", alt)
22144	c.urlParams_.Set("prettyPrint", "false")
22145	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:train")
22146	urls += "?" + c.urlParams_.Encode()
22147	req, err := http.NewRequest("POST", urls, body)
22148	if err != nil {
22149		return nil, err
22150	}
22151	req.Header = reqHeaders
22152	googleapi.Expand(req.URL, map[string]string{
22153		"parent": c.parent,
22154	})
22155	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22156}
22157
22158// Do executes the "dialogflow.projects.locations.agent.train" call.
22159// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
22160// Any non-2xx status code is an error. Response headers are in either
22161// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
22162// was returned at all) in error.(*googleapi.Error).Header. Use
22163// googleapi.IsNotModified to check whether the returned error was
22164// because http.StatusNotModified was returned.
22165func (c *ProjectsLocationsAgentTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
22166	gensupport.SetOptions(c.urlParams_, opts...)
22167	res, err := c.doRequest("json")
22168	if res != nil && res.StatusCode == http.StatusNotModified {
22169		if res.Body != nil {
22170			res.Body.Close()
22171		}
22172		return nil, &googleapi.Error{
22173			Code:   res.StatusCode,
22174			Header: res.Header,
22175		}
22176	}
22177	if err != nil {
22178		return nil, err
22179	}
22180	defer googleapi.CloseBody(res)
22181	if err := googleapi.CheckResponse(res); err != nil {
22182		return nil, err
22183	}
22184	ret := &GoogleLongrunningOperation{
22185		ServerResponse: googleapi.ServerResponse{
22186			Header:         res.Header,
22187			HTTPStatusCode: res.StatusCode,
22188		},
22189	}
22190	target := &ret
22191	if err := gensupport.DecodeResponse(target, res); err != nil {
22192		return nil, err
22193	}
22194	return ret, nil
22195	// {
22196	//   "description": "Trains the specified agent.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
22197	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:train",
22198	//   "httpMethod": "POST",
22199	//   "id": "dialogflow.projects.locations.agent.train",
22200	//   "parameterOrder": [
22201	//     "parent"
22202	//   ],
22203	//   "parameters": {
22204	//     "parent": {
22205	//       "description": "Required. The project that the agent to train is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
22206	//       "location": "path",
22207	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
22208	//       "required": true,
22209	//       "type": "string"
22210	//     }
22211	//   },
22212	//   "path": "v2beta1/{+parent}/agent:train",
22213	//   "request": {
22214	//     "$ref": "GoogleCloudDialogflowV2beta1TrainAgentRequest"
22215	//   },
22216	//   "response": {
22217	//     "$ref": "GoogleLongrunningOperation"
22218	//   },
22219	//   "scopes": [
22220	//     "https://www.googleapis.com/auth/cloud-platform",
22221	//     "https://www.googleapis.com/auth/dialogflow"
22222	//   ]
22223	// }
22224
22225}
22226
22227// method id "dialogflow.projects.locations.agent.entityTypes.batchDelete":
22228
22229type ProjectsLocationsAgentEntityTypesBatchDeleteCall struct {
22230	s                                                         *Service
22231	parent                                                    string
22232	googleclouddialogflowv2beta1batchdeleteentitytypesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest
22233	urlParams_                                                gensupport.URLParams
22234	ctx_                                                      context.Context
22235	header_                                                   http.Header
22236}
22237
22238// BatchDelete: Deletes entity types in the specified agent.
22239//
22240// Operation <response: google.protobuf.Empty>
22241func (r *ProjectsLocationsAgentEntityTypesService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteentitytypesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest) *ProjectsLocationsAgentEntityTypesBatchDeleteCall {
22242	c := &ProjectsLocationsAgentEntityTypesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22243	c.parent = parent
22244	c.googleclouddialogflowv2beta1batchdeleteentitytypesrequest = googleclouddialogflowv2beta1batchdeleteentitytypesrequest
22245	return c
22246}
22247
22248// Fields allows partial responses to be retrieved. See
22249// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22250// for more information.
22251func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesBatchDeleteCall {
22252	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22253	return c
22254}
22255
22256// Context sets the context to be used in this call's Do method. Any
22257// pending HTTP request will be aborted if the provided context is
22258// canceled.
22259func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesBatchDeleteCall {
22260	c.ctx_ = ctx
22261	return c
22262}
22263
22264// Header returns an http.Header that can be modified by the caller to
22265// add HTTP headers to the request.
22266func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Header() http.Header {
22267	if c.header_ == nil {
22268		c.header_ = make(http.Header)
22269	}
22270	return c.header_
22271}
22272
22273func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
22274	reqHeaders := make(http.Header)
22275	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
22276	for k, v := range c.header_ {
22277		reqHeaders[k] = v
22278	}
22279	reqHeaders.Set("User-Agent", c.s.userAgent())
22280	var body io.Reader = nil
22281	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteentitytypesrequest)
22282	if err != nil {
22283		return nil, err
22284	}
22285	reqHeaders.Set("Content-Type", "application/json")
22286	c.urlParams_.Set("alt", alt)
22287	c.urlParams_.Set("prettyPrint", "false")
22288	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes:batchDelete")
22289	urls += "?" + c.urlParams_.Encode()
22290	req, err := http.NewRequest("POST", urls, body)
22291	if err != nil {
22292		return nil, err
22293	}
22294	req.Header = reqHeaders
22295	googleapi.Expand(req.URL, map[string]string{
22296		"parent": c.parent,
22297	})
22298	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22299}
22300
22301// Do executes the "dialogflow.projects.locations.agent.entityTypes.batchDelete" call.
22302// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
22303// Any non-2xx status code is an error. Response headers are in either
22304// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
22305// was returned at all) in error.(*googleapi.Error).Header. Use
22306// googleapi.IsNotModified to check whether the returned error was
22307// because http.StatusNotModified was returned.
22308func (c *ProjectsLocationsAgentEntityTypesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
22309	gensupport.SetOptions(c.urlParams_, opts...)
22310	res, err := c.doRequest("json")
22311	if res != nil && res.StatusCode == http.StatusNotModified {
22312		if res.Body != nil {
22313			res.Body.Close()
22314		}
22315		return nil, &googleapi.Error{
22316			Code:   res.StatusCode,
22317			Header: res.Header,
22318		}
22319	}
22320	if err != nil {
22321		return nil, err
22322	}
22323	defer googleapi.CloseBody(res)
22324	if err := googleapi.CheckResponse(res); err != nil {
22325		return nil, err
22326	}
22327	ret := &GoogleLongrunningOperation{
22328		ServerResponse: googleapi.ServerResponse{
22329			Header:         res.Header,
22330			HTTPStatusCode: res.StatusCode,
22331		},
22332	}
22333	target := &ret
22334	if err := gensupport.DecodeResponse(target, res); err != nil {
22335		return nil, err
22336	}
22337	return ret, nil
22338	// {
22339	//   "description": "Deletes entity types in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
22340	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchDelete",
22341	//   "httpMethod": "POST",
22342	//   "id": "dialogflow.projects.locations.agent.entityTypes.batchDelete",
22343	//   "parameterOrder": [
22344	//     "parent"
22345	//   ],
22346	//   "parameters": {
22347	//     "parent": {
22348	//       "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.",
22349	//       "location": "path",
22350	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
22351	//       "required": true,
22352	//       "type": "string"
22353	//     }
22354	//   },
22355	//   "path": "v2beta1/{+parent}/entityTypes:batchDelete",
22356	//   "request": {
22357	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest"
22358	//   },
22359	//   "response": {
22360	//     "$ref": "GoogleLongrunningOperation"
22361	//   },
22362	//   "scopes": [
22363	//     "https://www.googleapis.com/auth/cloud-platform",
22364	//     "https://www.googleapis.com/auth/dialogflow"
22365	//   ]
22366	// }
22367
22368}
22369
22370// method id "dialogflow.projects.locations.agent.entityTypes.batchUpdate":
22371
22372type ProjectsLocationsAgentEntityTypesBatchUpdateCall struct {
22373	s                                                         *Service
22374	parent                                                    string
22375	googleclouddialogflowv2beta1batchupdateentitytypesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest
22376	urlParams_                                                gensupport.URLParams
22377	ctx_                                                      context.Context
22378	header_                                                   http.Header
22379}
22380
22381// BatchUpdate: Updates/Creates multiple entity types in the specified
22382// agent.
22383//
22384// Operation <response: BatchUpdateEntityTypesResponse>
22385func (r *ProjectsLocationsAgentEntityTypesService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateentitytypesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest) *ProjectsLocationsAgentEntityTypesBatchUpdateCall {
22386	c := &ProjectsLocationsAgentEntityTypesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22387	c.parent = parent
22388	c.googleclouddialogflowv2beta1batchupdateentitytypesrequest = googleclouddialogflowv2beta1batchupdateentitytypesrequest
22389	return c
22390}
22391
22392// Fields allows partial responses to be retrieved. See
22393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22394// for more information.
22395func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesBatchUpdateCall {
22396	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22397	return c
22398}
22399
22400// Context sets the context to be used in this call's Do method. Any
22401// pending HTTP request will be aborted if the provided context is
22402// canceled.
22403func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesBatchUpdateCall {
22404	c.ctx_ = ctx
22405	return c
22406}
22407
22408// Header returns an http.Header that can be modified by the caller to
22409// add HTTP headers to the request.
22410func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Header() http.Header {
22411	if c.header_ == nil {
22412		c.header_ = make(http.Header)
22413	}
22414	return c.header_
22415}
22416
22417func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
22418	reqHeaders := make(http.Header)
22419	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
22420	for k, v := range c.header_ {
22421		reqHeaders[k] = v
22422	}
22423	reqHeaders.Set("User-Agent", c.s.userAgent())
22424	var body io.Reader = nil
22425	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateentitytypesrequest)
22426	if err != nil {
22427		return nil, err
22428	}
22429	reqHeaders.Set("Content-Type", "application/json")
22430	c.urlParams_.Set("alt", alt)
22431	c.urlParams_.Set("prettyPrint", "false")
22432	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes:batchUpdate")
22433	urls += "?" + c.urlParams_.Encode()
22434	req, err := http.NewRequest("POST", urls, body)
22435	if err != nil {
22436		return nil, err
22437	}
22438	req.Header = reqHeaders
22439	googleapi.Expand(req.URL, map[string]string{
22440		"parent": c.parent,
22441	})
22442	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22443}
22444
22445// Do executes the "dialogflow.projects.locations.agent.entityTypes.batchUpdate" call.
22446// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
22447// Any non-2xx status code is an error. Response headers are in either
22448// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
22449// was returned at all) in error.(*googleapi.Error).Header. Use
22450// googleapi.IsNotModified to check whether the returned error was
22451// because http.StatusNotModified was returned.
22452func (c *ProjectsLocationsAgentEntityTypesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
22453	gensupport.SetOptions(c.urlParams_, opts...)
22454	res, err := c.doRequest("json")
22455	if res != nil && res.StatusCode == http.StatusNotModified {
22456		if res.Body != nil {
22457			res.Body.Close()
22458		}
22459		return nil, &googleapi.Error{
22460			Code:   res.StatusCode,
22461			Header: res.Header,
22462		}
22463	}
22464	if err != nil {
22465		return nil, err
22466	}
22467	defer googleapi.CloseBody(res)
22468	if err := googleapi.CheckResponse(res); err != nil {
22469		return nil, err
22470	}
22471	ret := &GoogleLongrunningOperation{
22472		ServerResponse: googleapi.ServerResponse{
22473			Header:         res.Header,
22474			HTTPStatusCode: res.StatusCode,
22475		},
22476	}
22477	target := &ret
22478	if err := gensupport.DecodeResponse(target, res); err != nil {
22479		return nil, err
22480	}
22481	return ret, nil
22482	// {
22483	//   "description": "Updates/Creates multiple entity types in the specified agent.\n\nOperation \u003cresponse: BatchUpdateEntityTypesResponse\u003e",
22484	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchUpdate",
22485	//   "httpMethod": "POST",
22486	//   "id": "dialogflow.projects.locations.agent.entityTypes.batchUpdate",
22487	//   "parameterOrder": [
22488	//     "parent"
22489	//   ],
22490	//   "parameters": {
22491	//     "parent": {
22492	//       "description": "Required. The name of the agent to update or create entity types in.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
22493	//       "location": "path",
22494	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
22495	//       "required": true,
22496	//       "type": "string"
22497	//     }
22498	//   },
22499	//   "path": "v2beta1/{+parent}/entityTypes:batchUpdate",
22500	//   "request": {
22501	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest"
22502	//   },
22503	//   "response": {
22504	//     "$ref": "GoogleLongrunningOperation"
22505	//   },
22506	//   "scopes": [
22507	//     "https://www.googleapis.com/auth/cloud-platform",
22508	//     "https://www.googleapis.com/auth/dialogflow"
22509	//   ]
22510	// }
22511
22512}
22513
22514// method id "dialogflow.projects.locations.agent.entityTypes.create":
22515
22516type ProjectsLocationsAgentEntityTypesCreateCall struct {
22517	s                                      *Service
22518	parent                                 string
22519	googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType
22520	urlParams_                             gensupport.URLParams
22521	ctx_                                   context.Context
22522	header_                                http.Header
22523}
22524
22525// Create: Creates an entity type in the specified agent.
22526func (r *ProjectsLocationsAgentEntityTypesService) Create(parent string, googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType) *ProjectsLocationsAgentEntityTypesCreateCall {
22527	c := &ProjectsLocationsAgentEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22528	c.parent = parent
22529	c.googleclouddialogflowv2beta1entitytype = googleclouddialogflowv2beta1entitytype
22530	return c
22531}
22532
22533// LanguageCode sets the optional parameter "languageCode": The language
22534// of entity synonyms defined in `entity_type`. If not
22535// specified, the agent's default language is
22536// used.
22537// [Many
22538// languages](https://cloud.google.com/dialogflow/docs/refere
22539// nce/language)
22540// are supported. Note: languages must be enabled in the agent before
22541// they can
22542// be used.
22543func (c *ProjectsLocationsAgentEntityTypesCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesCreateCall {
22544	c.urlParams_.Set("languageCode", languageCode)
22545	return c
22546}
22547
22548// Fields allows partial responses to be retrieved. See
22549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22550// for more information.
22551func (c *ProjectsLocationsAgentEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesCreateCall {
22552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22553	return c
22554}
22555
22556// Context sets the context to be used in this call's Do method. Any
22557// pending HTTP request will be aborted if the provided context is
22558// canceled.
22559func (c *ProjectsLocationsAgentEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesCreateCall {
22560	c.ctx_ = ctx
22561	return c
22562}
22563
22564// Header returns an http.Header that can be modified by the caller to
22565// add HTTP headers to the request.
22566func (c *ProjectsLocationsAgentEntityTypesCreateCall) Header() http.Header {
22567	if c.header_ == nil {
22568		c.header_ = make(http.Header)
22569	}
22570	return c.header_
22571}
22572
22573func (c *ProjectsLocationsAgentEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
22574	reqHeaders := make(http.Header)
22575	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
22576	for k, v := range c.header_ {
22577		reqHeaders[k] = v
22578	}
22579	reqHeaders.Set("User-Agent", c.s.userAgent())
22580	var body io.Reader = nil
22581	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1entitytype)
22582	if err != nil {
22583		return nil, err
22584	}
22585	reqHeaders.Set("Content-Type", "application/json")
22586	c.urlParams_.Set("alt", alt)
22587	c.urlParams_.Set("prettyPrint", "false")
22588	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
22589	urls += "?" + c.urlParams_.Encode()
22590	req, err := http.NewRequest("POST", urls, body)
22591	if err != nil {
22592		return nil, err
22593	}
22594	req.Header = reqHeaders
22595	googleapi.Expand(req.URL, map[string]string{
22596		"parent": c.parent,
22597	})
22598	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22599}
22600
22601// Do executes the "dialogflow.projects.locations.agent.entityTypes.create" call.
22602// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
22603// be non-nil. Any non-2xx status code is an error. Response headers are
22604// in either
22605// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
22606// a response was returned at all) in error.(*googleapi.Error).Header.
22607// Use googleapi.IsNotModified to check whether the returned error was
22608// because http.StatusNotModified was returned.
22609func (c *ProjectsLocationsAgentEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
22610	gensupport.SetOptions(c.urlParams_, opts...)
22611	res, err := c.doRequest("json")
22612	if res != nil && res.StatusCode == http.StatusNotModified {
22613		if res.Body != nil {
22614			res.Body.Close()
22615		}
22616		return nil, &googleapi.Error{
22617			Code:   res.StatusCode,
22618			Header: res.Header,
22619		}
22620	}
22621	if err != nil {
22622		return nil, err
22623	}
22624	defer googleapi.CloseBody(res)
22625	if err := googleapi.CheckResponse(res); err != nil {
22626		return nil, err
22627	}
22628	ret := &GoogleCloudDialogflowV2beta1EntityType{
22629		ServerResponse: googleapi.ServerResponse{
22630			Header:         res.Header,
22631			HTTPStatusCode: res.StatusCode,
22632		},
22633	}
22634	target := &ret
22635	if err := gensupport.DecodeResponse(target, res); err != nil {
22636		return nil, err
22637	}
22638	return ret, nil
22639	// {
22640	//   "description": "Creates an entity type in the specified agent.",
22641	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes",
22642	//   "httpMethod": "POST",
22643	//   "id": "dialogflow.projects.locations.agent.entityTypes.create",
22644	//   "parameterOrder": [
22645	//     "parent"
22646	//   ],
22647	//   "parameters": {
22648	//     "languageCode": {
22649	//       "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.",
22650	//       "location": "query",
22651	//       "type": "string"
22652	//     },
22653	//     "parent": {
22654	//       "description": "Required. The agent to create a entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
22655	//       "location": "path",
22656	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
22657	//       "required": true,
22658	//       "type": "string"
22659	//     }
22660	//   },
22661	//   "path": "v2beta1/{+parent}/entityTypes",
22662	//   "request": {
22663	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
22664	//   },
22665	//   "response": {
22666	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
22667	//   },
22668	//   "scopes": [
22669	//     "https://www.googleapis.com/auth/cloud-platform",
22670	//     "https://www.googleapis.com/auth/dialogflow"
22671	//   ]
22672	// }
22673
22674}
22675
22676// method id "dialogflow.projects.locations.agent.entityTypes.delete":
22677
22678type ProjectsLocationsAgentEntityTypesDeleteCall struct {
22679	s          *Service
22680	name       string
22681	urlParams_ gensupport.URLParams
22682	ctx_       context.Context
22683	header_    http.Header
22684}
22685
22686// Delete: Deletes the specified entity type.
22687func (r *ProjectsLocationsAgentEntityTypesService) Delete(name string) *ProjectsLocationsAgentEntityTypesDeleteCall {
22688	c := &ProjectsLocationsAgentEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22689	c.name = name
22690	return c
22691}
22692
22693// Fields allows partial responses to be retrieved. See
22694// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22695// for more information.
22696func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesDeleteCall {
22697	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22698	return c
22699}
22700
22701// Context sets the context to be used in this call's Do method. Any
22702// pending HTTP request will be aborted if the provided context is
22703// canceled.
22704func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesDeleteCall {
22705	c.ctx_ = ctx
22706	return c
22707}
22708
22709// Header returns an http.Header that can be modified by the caller to
22710// add HTTP headers to the request.
22711func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Header() http.Header {
22712	if c.header_ == nil {
22713		c.header_ = make(http.Header)
22714	}
22715	return c.header_
22716}
22717
22718func (c *ProjectsLocationsAgentEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
22719	reqHeaders := make(http.Header)
22720	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
22721	for k, v := range c.header_ {
22722		reqHeaders[k] = v
22723	}
22724	reqHeaders.Set("User-Agent", c.s.userAgent())
22725	var body io.Reader = nil
22726	c.urlParams_.Set("alt", alt)
22727	c.urlParams_.Set("prettyPrint", "false")
22728	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
22729	urls += "?" + c.urlParams_.Encode()
22730	req, err := http.NewRequest("DELETE", urls, body)
22731	if err != nil {
22732		return nil, err
22733	}
22734	req.Header = reqHeaders
22735	googleapi.Expand(req.URL, map[string]string{
22736		"name": c.name,
22737	})
22738	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22739}
22740
22741// Do executes the "dialogflow.projects.locations.agent.entityTypes.delete" call.
22742// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
22743// non-2xx status code is an error. Response headers are in either
22744// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
22745// returned at all) in error.(*googleapi.Error).Header. Use
22746// googleapi.IsNotModified to check whether the returned error was
22747// because http.StatusNotModified was returned.
22748func (c *ProjectsLocationsAgentEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
22749	gensupport.SetOptions(c.urlParams_, opts...)
22750	res, err := c.doRequest("json")
22751	if res != nil && res.StatusCode == http.StatusNotModified {
22752		if res.Body != nil {
22753			res.Body.Close()
22754		}
22755		return nil, &googleapi.Error{
22756			Code:   res.StatusCode,
22757			Header: res.Header,
22758		}
22759	}
22760	if err != nil {
22761		return nil, err
22762	}
22763	defer googleapi.CloseBody(res)
22764	if err := googleapi.CheckResponse(res); err != nil {
22765		return nil, err
22766	}
22767	ret := &GoogleProtobufEmpty{
22768		ServerResponse: googleapi.ServerResponse{
22769			Header:         res.Header,
22770			HTTPStatusCode: res.StatusCode,
22771		},
22772	}
22773	target := &ret
22774	if err := gensupport.DecodeResponse(target, res); err != nil {
22775		return nil, err
22776	}
22777	return ret, nil
22778	// {
22779	//   "description": "Deletes the specified entity type.",
22780	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}",
22781	//   "httpMethod": "DELETE",
22782	//   "id": "dialogflow.projects.locations.agent.entityTypes.delete",
22783	//   "parameterOrder": [
22784	//     "name"
22785	//   ],
22786	//   "parameters": {
22787	//     "name": {
22788	//       "description": "Required. The name of the entity type to delete.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.",
22789	//       "location": "path",
22790	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
22791	//       "required": true,
22792	//       "type": "string"
22793	//     }
22794	//   },
22795	//   "path": "v2beta1/{+name}",
22796	//   "response": {
22797	//     "$ref": "GoogleProtobufEmpty"
22798	//   },
22799	//   "scopes": [
22800	//     "https://www.googleapis.com/auth/cloud-platform",
22801	//     "https://www.googleapis.com/auth/dialogflow"
22802	//   ]
22803	// }
22804
22805}
22806
22807// method id "dialogflow.projects.locations.agent.entityTypes.get":
22808
22809type ProjectsLocationsAgentEntityTypesGetCall struct {
22810	s            *Service
22811	name         string
22812	urlParams_   gensupport.URLParams
22813	ifNoneMatch_ string
22814	ctx_         context.Context
22815	header_      http.Header
22816}
22817
22818// Get: Retrieves the specified entity type.
22819func (r *ProjectsLocationsAgentEntityTypesService) Get(name string) *ProjectsLocationsAgentEntityTypesGetCall {
22820	c := &ProjectsLocationsAgentEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22821	c.name = name
22822	return c
22823}
22824
22825// LanguageCode sets the optional parameter "languageCode": The language
22826// to retrieve entity synonyms for. If not specified,
22827// the agent's default language is
22828// used.
22829// [Many
22830// languages](https://cloud.google.com/dialogflow/docs/refere
22831// nce/language)
22832// are supported. Note: languages must be enabled in the agent before
22833// they can
22834// be used.
22835func (c *ProjectsLocationsAgentEntityTypesGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesGetCall {
22836	c.urlParams_.Set("languageCode", languageCode)
22837	return c
22838}
22839
22840// Fields allows partial responses to be retrieved. See
22841// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22842// for more information.
22843func (c *ProjectsLocationsAgentEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesGetCall {
22844	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22845	return c
22846}
22847
22848// IfNoneMatch sets the optional parameter which makes the operation
22849// fail if the object's ETag matches the given value. This is useful for
22850// getting updates only after the object has changed since the last
22851// request. Use googleapi.IsNotModified to check whether the response
22852// error from Do is the result of In-None-Match.
22853func (c *ProjectsLocationsAgentEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEntityTypesGetCall {
22854	c.ifNoneMatch_ = entityTag
22855	return c
22856}
22857
22858// Context sets the context to be used in this call's Do method. Any
22859// pending HTTP request will be aborted if the provided context is
22860// canceled.
22861func (c *ProjectsLocationsAgentEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesGetCall {
22862	c.ctx_ = ctx
22863	return c
22864}
22865
22866// Header returns an http.Header that can be modified by the caller to
22867// add HTTP headers to the request.
22868func (c *ProjectsLocationsAgentEntityTypesGetCall) Header() http.Header {
22869	if c.header_ == nil {
22870		c.header_ = make(http.Header)
22871	}
22872	return c.header_
22873}
22874
22875func (c *ProjectsLocationsAgentEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
22876	reqHeaders := make(http.Header)
22877	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
22878	for k, v := range c.header_ {
22879		reqHeaders[k] = v
22880	}
22881	reqHeaders.Set("User-Agent", c.s.userAgent())
22882	if c.ifNoneMatch_ != "" {
22883		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22884	}
22885	var body io.Reader = nil
22886	c.urlParams_.Set("alt", alt)
22887	c.urlParams_.Set("prettyPrint", "false")
22888	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
22889	urls += "?" + c.urlParams_.Encode()
22890	req, err := http.NewRequest("GET", urls, body)
22891	if err != nil {
22892		return nil, err
22893	}
22894	req.Header = reqHeaders
22895	googleapi.Expand(req.URL, map[string]string{
22896		"name": c.name,
22897	})
22898	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22899}
22900
22901// Do executes the "dialogflow.projects.locations.agent.entityTypes.get" call.
22902// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
22903// be non-nil. Any non-2xx status code is an error. Response headers are
22904// in either
22905// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
22906// a response was returned at all) in error.(*googleapi.Error).Header.
22907// Use googleapi.IsNotModified to check whether the returned error was
22908// because http.StatusNotModified was returned.
22909func (c *ProjectsLocationsAgentEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
22910	gensupport.SetOptions(c.urlParams_, opts...)
22911	res, err := c.doRequest("json")
22912	if res != nil && res.StatusCode == http.StatusNotModified {
22913		if res.Body != nil {
22914			res.Body.Close()
22915		}
22916		return nil, &googleapi.Error{
22917			Code:   res.StatusCode,
22918			Header: res.Header,
22919		}
22920	}
22921	if err != nil {
22922		return nil, err
22923	}
22924	defer googleapi.CloseBody(res)
22925	if err := googleapi.CheckResponse(res); err != nil {
22926		return nil, err
22927	}
22928	ret := &GoogleCloudDialogflowV2beta1EntityType{
22929		ServerResponse: googleapi.ServerResponse{
22930			Header:         res.Header,
22931			HTTPStatusCode: res.StatusCode,
22932		},
22933	}
22934	target := &ret
22935	if err := gensupport.DecodeResponse(target, res); err != nil {
22936		return nil, err
22937	}
22938	return ret, nil
22939	// {
22940	//   "description": "Retrieves the specified entity type.",
22941	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}",
22942	//   "httpMethod": "GET",
22943	//   "id": "dialogflow.projects.locations.agent.entityTypes.get",
22944	//   "parameterOrder": [
22945	//     "name"
22946	//   ],
22947	//   "parameters": {
22948	//     "languageCode": {
22949	//       "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.",
22950	//       "location": "query",
22951	//       "type": "string"
22952	//     },
22953	//     "name": {
22954	//       "description": "Required. The name of the entity type.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.",
22955	//       "location": "path",
22956	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
22957	//       "required": true,
22958	//       "type": "string"
22959	//     }
22960	//   },
22961	//   "path": "v2beta1/{+name}",
22962	//   "response": {
22963	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
22964	//   },
22965	//   "scopes": [
22966	//     "https://www.googleapis.com/auth/cloud-platform",
22967	//     "https://www.googleapis.com/auth/dialogflow"
22968	//   ]
22969	// }
22970
22971}
22972
22973// method id "dialogflow.projects.locations.agent.entityTypes.list":
22974
22975type ProjectsLocationsAgentEntityTypesListCall struct {
22976	s            *Service
22977	parent       string
22978	urlParams_   gensupport.URLParams
22979	ifNoneMatch_ string
22980	ctx_         context.Context
22981	header_      http.Header
22982}
22983
22984// List: Returns the list of all entity types in the specified agent.
22985func (r *ProjectsLocationsAgentEntityTypesService) List(parent string) *ProjectsLocationsAgentEntityTypesListCall {
22986	c := &ProjectsLocationsAgentEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22987	c.parent = parent
22988	return c
22989}
22990
22991// LanguageCode sets the optional parameter "languageCode": The language
22992// to list entity synonyms for. If not specified,
22993// the agent's default language is
22994// used.
22995// [Many
22996// languages](https://cloud.google.com/dialogflow/docs/refere
22997// nce/language)
22998// are supported. Note: languages must be enabled in the agent before
22999// they can
23000// be used.
23001func (c *ProjectsLocationsAgentEntityTypesListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesListCall {
23002	c.urlParams_.Set("languageCode", languageCode)
23003	return c
23004}
23005
23006// PageSize sets the optional parameter "pageSize": The maximum number
23007// of items to return in a single page. By
23008// default 100 and at most 1000.
23009func (c *ProjectsLocationsAgentEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEntityTypesListCall {
23010	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23011	return c
23012}
23013
23014// PageToken sets the optional parameter "pageToken": The
23015// next_page_token value returned from a previous list request.
23016func (c *ProjectsLocationsAgentEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentEntityTypesListCall {
23017	c.urlParams_.Set("pageToken", pageToken)
23018	return c
23019}
23020
23021// Fields allows partial responses to be retrieved. See
23022// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23023// for more information.
23024func (c *ProjectsLocationsAgentEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesListCall {
23025	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23026	return c
23027}
23028
23029// IfNoneMatch sets the optional parameter which makes the operation
23030// fail if the object's ETag matches the given value. This is useful for
23031// getting updates only after the object has changed since the last
23032// request. Use googleapi.IsNotModified to check whether the response
23033// error from Do is the result of In-None-Match.
23034func (c *ProjectsLocationsAgentEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEntityTypesListCall {
23035	c.ifNoneMatch_ = entityTag
23036	return c
23037}
23038
23039// Context sets the context to be used in this call's Do method. Any
23040// pending HTTP request will be aborted if the provided context is
23041// canceled.
23042func (c *ProjectsLocationsAgentEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesListCall {
23043	c.ctx_ = ctx
23044	return c
23045}
23046
23047// Header returns an http.Header that can be modified by the caller to
23048// add HTTP headers to the request.
23049func (c *ProjectsLocationsAgentEntityTypesListCall) Header() http.Header {
23050	if c.header_ == nil {
23051		c.header_ = make(http.Header)
23052	}
23053	return c.header_
23054}
23055
23056func (c *ProjectsLocationsAgentEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
23057	reqHeaders := make(http.Header)
23058	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23059	for k, v := range c.header_ {
23060		reqHeaders[k] = v
23061	}
23062	reqHeaders.Set("User-Agent", c.s.userAgent())
23063	if c.ifNoneMatch_ != "" {
23064		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23065	}
23066	var body io.Reader = nil
23067	c.urlParams_.Set("alt", alt)
23068	c.urlParams_.Set("prettyPrint", "false")
23069	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
23070	urls += "?" + c.urlParams_.Encode()
23071	req, err := http.NewRequest("GET", urls, body)
23072	if err != nil {
23073		return nil, err
23074	}
23075	req.Header = reqHeaders
23076	googleapi.Expand(req.URL, map[string]string{
23077		"parent": c.parent,
23078	})
23079	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23080}
23081
23082// Do executes the "dialogflow.projects.locations.agent.entityTypes.list" call.
23083// Exactly one of *GoogleCloudDialogflowV2beta1ListEntityTypesResponse
23084// or error will be non-nil. Any non-2xx status code is an error.
23085// Response headers are in either
23086// *GoogleCloudDialogflowV2beta1ListEntityTypesResponse.ServerResponse.He
23087// ader or (if a response was returned at all) in
23088// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23089// whether the returned error was because http.StatusNotModified was
23090// returned.
23091func (c *ProjectsLocationsAgentEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListEntityTypesResponse, error) {
23092	gensupport.SetOptions(c.urlParams_, opts...)
23093	res, err := c.doRequest("json")
23094	if res != nil && res.StatusCode == http.StatusNotModified {
23095		if res.Body != nil {
23096			res.Body.Close()
23097		}
23098		return nil, &googleapi.Error{
23099			Code:   res.StatusCode,
23100			Header: res.Header,
23101		}
23102	}
23103	if err != nil {
23104		return nil, err
23105	}
23106	defer googleapi.CloseBody(res)
23107	if err := googleapi.CheckResponse(res); err != nil {
23108		return nil, err
23109	}
23110	ret := &GoogleCloudDialogflowV2beta1ListEntityTypesResponse{
23111		ServerResponse: googleapi.ServerResponse{
23112			Header:         res.Header,
23113			HTTPStatusCode: res.StatusCode,
23114		},
23115	}
23116	target := &ret
23117	if err := gensupport.DecodeResponse(target, res); err != nil {
23118		return nil, err
23119	}
23120	return ret, nil
23121	// {
23122	//   "description": "Returns the list of all entity types in the specified agent.",
23123	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes",
23124	//   "httpMethod": "GET",
23125	//   "id": "dialogflow.projects.locations.agent.entityTypes.list",
23126	//   "parameterOrder": [
23127	//     "parent"
23128	//   ],
23129	//   "parameters": {
23130	//     "languageCode": {
23131	//       "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.",
23132	//       "location": "query",
23133	//       "type": "string"
23134	//     },
23135	//     "pageSize": {
23136	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
23137	//       "format": "int32",
23138	//       "location": "query",
23139	//       "type": "integer"
23140	//     },
23141	//     "pageToken": {
23142	//       "description": "Optional. The next_page_token value returned from a previous list request.",
23143	//       "location": "query",
23144	//       "type": "string"
23145	//     },
23146	//     "parent": {
23147	//       "description": "Required. The agent to list all entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
23148	//       "location": "path",
23149	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
23150	//       "required": true,
23151	//       "type": "string"
23152	//     }
23153	//   },
23154	//   "path": "v2beta1/{+parent}/entityTypes",
23155	//   "response": {
23156	//     "$ref": "GoogleCloudDialogflowV2beta1ListEntityTypesResponse"
23157	//   },
23158	//   "scopes": [
23159	//     "https://www.googleapis.com/auth/cloud-platform",
23160	//     "https://www.googleapis.com/auth/dialogflow"
23161	//   ]
23162	// }
23163
23164}
23165
23166// Pages invokes f for each page of results.
23167// A non-nil error returned from f will halt the iteration.
23168// The provided context supersedes any context provided to the Context method.
23169func (c *ProjectsLocationsAgentEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListEntityTypesResponse) error) error {
23170	c.ctx_ = ctx
23171	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23172	for {
23173		x, err := c.Do()
23174		if err != nil {
23175			return err
23176		}
23177		if err := f(x); err != nil {
23178			return err
23179		}
23180		if x.NextPageToken == "" {
23181			return nil
23182		}
23183		c.PageToken(x.NextPageToken)
23184	}
23185}
23186
23187// method id "dialogflow.projects.locations.agent.entityTypes.patch":
23188
23189type ProjectsLocationsAgentEntityTypesPatchCall struct {
23190	s                                      *Service
23191	nameid                                 string
23192	googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType
23193	urlParams_                             gensupport.URLParams
23194	ctx_                                   context.Context
23195	header_                                http.Header
23196}
23197
23198// Patch: Updates the specified entity type.
23199func (r *ProjectsLocationsAgentEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType) *ProjectsLocationsAgentEntityTypesPatchCall {
23200	c := &ProjectsLocationsAgentEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23201	c.nameid = nameid
23202	c.googleclouddialogflowv2beta1entitytype = googleclouddialogflowv2beta1entitytype
23203	return c
23204}
23205
23206// LanguageCode sets the optional parameter "languageCode": The language
23207// of entity synonyms defined in `entity_type`. If not
23208// specified, the agent's default language is
23209// used.
23210// [Many
23211// languages](https://cloud.google.com/dialogflow/docs/refere
23212// nce/language)
23213// are supported. Note: languages must be enabled in the agent before
23214// they can
23215// be used.
23216func (c *ProjectsLocationsAgentEntityTypesPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentEntityTypesPatchCall {
23217	c.urlParams_.Set("languageCode", languageCode)
23218	return c
23219}
23220
23221// UpdateMask sets the optional parameter "updateMask": The mask to
23222// control which fields get updated.
23223func (c *ProjectsLocationsAgentEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentEntityTypesPatchCall {
23224	c.urlParams_.Set("updateMask", updateMask)
23225	return c
23226}
23227
23228// Fields allows partial responses to be retrieved. See
23229// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23230// for more information.
23231func (c *ProjectsLocationsAgentEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesPatchCall {
23232	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23233	return c
23234}
23235
23236// Context sets the context to be used in this call's Do method. Any
23237// pending HTTP request will be aborted if the provided context is
23238// canceled.
23239func (c *ProjectsLocationsAgentEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesPatchCall {
23240	c.ctx_ = ctx
23241	return c
23242}
23243
23244// Header returns an http.Header that can be modified by the caller to
23245// add HTTP headers to the request.
23246func (c *ProjectsLocationsAgentEntityTypesPatchCall) Header() http.Header {
23247	if c.header_ == nil {
23248		c.header_ = make(http.Header)
23249	}
23250	return c.header_
23251}
23252
23253func (c *ProjectsLocationsAgentEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
23254	reqHeaders := make(http.Header)
23255	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23256	for k, v := range c.header_ {
23257		reqHeaders[k] = v
23258	}
23259	reqHeaders.Set("User-Agent", c.s.userAgent())
23260	var body io.Reader = nil
23261	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1entitytype)
23262	if err != nil {
23263		return nil, err
23264	}
23265	reqHeaders.Set("Content-Type", "application/json")
23266	c.urlParams_.Set("alt", alt)
23267	c.urlParams_.Set("prettyPrint", "false")
23268	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
23269	urls += "?" + c.urlParams_.Encode()
23270	req, err := http.NewRequest("PATCH", urls, body)
23271	if err != nil {
23272		return nil, err
23273	}
23274	req.Header = reqHeaders
23275	googleapi.Expand(req.URL, map[string]string{
23276		"name": c.nameid,
23277	})
23278	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23279}
23280
23281// Do executes the "dialogflow.projects.locations.agent.entityTypes.patch" call.
23282// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
23283// be non-nil. Any non-2xx status code is an error. Response headers are
23284// in either
23285// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
23286// a response was returned at all) in error.(*googleapi.Error).Header.
23287// Use googleapi.IsNotModified to check whether the returned error was
23288// because http.StatusNotModified was returned.
23289func (c *ProjectsLocationsAgentEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
23290	gensupport.SetOptions(c.urlParams_, opts...)
23291	res, err := c.doRequest("json")
23292	if res != nil && res.StatusCode == http.StatusNotModified {
23293		if res.Body != nil {
23294			res.Body.Close()
23295		}
23296		return nil, &googleapi.Error{
23297			Code:   res.StatusCode,
23298			Header: res.Header,
23299		}
23300	}
23301	if err != nil {
23302		return nil, err
23303	}
23304	defer googleapi.CloseBody(res)
23305	if err := googleapi.CheckResponse(res); err != nil {
23306		return nil, err
23307	}
23308	ret := &GoogleCloudDialogflowV2beta1EntityType{
23309		ServerResponse: googleapi.ServerResponse{
23310			Header:         res.Header,
23311			HTTPStatusCode: res.StatusCode,
23312		},
23313	}
23314	target := &ret
23315	if err := gensupport.DecodeResponse(target, res); err != nil {
23316		return nil, err
23317	}
23318	return ret, nil
23319	// {
23320	//   "description": "Updates the specified entity type.",
23321	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}",
23322	//   "httpMethod": "PATCH",
23323	//   "id": "dialogflow.projects.locations.agent.entityTypes.patch",
23324	//   "parameterOrder": [
23325	//     "name"
23326	//   ],
23327	//   "parameters": {
23328	//     "languageCode": {
23329	//       "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.",
23330	//       "location": "query",
23331	//       "type": "string"
23332	//     },
23333	//     "name": {
23334	//       "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`.",
23335	//       "location": "path",
23336	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
23337	//       "required": true,
23338	//       "type": "string"
23339	//     },
23340	//     "updateMask": {
23341	//       "description": "Optional. The mask to control which fields get updated.",
23342	//       "format": "google-fieldmask",
23343	//       "location": "query",
23344	//       "type": "string"
23345	//     }
23346	//   },
23347	//   "path": "v2beta1/{+name}",
23348	//   "request": {
23349	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
23350	//   },
23351	//   "response": {
23352	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
23353	//   },
23354	//   "scopes": [
23355	//     "https://www.googleapis.com/auth/cloud-platform",
23356	//     "https://www.googleapis.com/auth/dialogflow"
23357	//   ]
23358	// }
23359
23360}
23361
23362// method id "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate":
23363
23364type ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall struct {
23365	s                                                      *Service
23366	parent                                                 string
23367	googleclouddialogflowv2beta1batchcreateentitiesrequest *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest
23368	urlParams_                                             gensupport.URLParams
23369	ctx_                                                   context.Context
23370	header_                                                http.Header
23371}
23372
23373// BatchCreate: Creates multiple new entities in the specified entity
23374// type.
23375//
23376// Operation <response: google.protobuf.Empty>
23377func (r *ProjectsLocationsAgentEntityTypesEntitiesService) BatchCreate(parent string, googleclouddialogflowv2beta1batchcreateentitiesrequest *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest) *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall {
23378	c := &ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23379	c.parent = parent
23380	c.googleclouddialogflowv2beta1batchcreateentitiesrequest = googleclouddialogflowv2beta1batchcreateentitiesrequest
23381	return c
23382}
23383
23384// Fields allows partial responses to be retrieved. See
23385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23386// for more information.
23387func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall {
23388	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23389	return c
23390}
23391
23392// Context sets the context to be used in this call's Do method. Any
23393// pending HTTP request will be aborted if the provided context is
23394// canceled.
23395func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall {
23396	c.ctx_ = ctx
23397	return c
23398}
23399
23400// Header returns an http.Header that can be modified by the caller to
23401// add HTTP headers to the request.
23402func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Header() http.Header {
23403	if c.header_ == nil {
23404		c.header_ = make(http.Header)
23405	}
23406	return c.header_
23407}
23408
23409func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) doRequest(alt string) (*http.Response, error) {
23410	reqHeaders := make(http.Header)
23411	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23412	for k, v := range c.header_ {
23413		reqHeaders[k] = v
23414	}
23415	reqHeaders.Set("User-Agent", c.s.userAgent())
23416	var body io.Reader = nil
23417	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchcreateentitiesrequest)
23418	if err != nil {
23419		return nil, err
23420	}
23421	reqHeaders.Set("Content-Type", "application/json")
23422	c.urlParams_.Set("alt", alt)
23423	c.urlParams_.Set("prettyPrint", "false")
23424	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchCreate")
23425	urls += "?" + c.urlParams_.Encode()
23426	req, err := http.NewRequest("POST", urls, body)
23427	if err != nil {
23428		return nil, err
23429	}
23430	req.Header = reqHeaders
23431	googleapi.Expand(req.URL, map[string]string{
23432		"parent": c.parent,
23433	})
23434	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23435}
23436
23437// Do executes the "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate" call.
23438// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
23439// Any non-2xx status code is an error. Response headers are in either
23440// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
23441// was returned at all) in error.(*googleapi.Error).Header. Use
23442// googleapi.IsNotModified to check whether the returned error was
23443// because http.StatusNotModified was returned.
23444func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
23445	gensupport.SetOptions(c.urlParams_, opts...)
23446	res, err := c.doRequest("json")
23447	if res != nil && res.StatusCode == http.StatusNotModified {
23448		if res.Body != nil {
23449			res.Body.Close()
23450		}
23451		return nil, &googleapi.Error{
23452			Code:   res.StatusCode,
23453			Header: res.Header,
23454		}
23455	}
23456	if err != nil {
23457		return nil, err
23458	}
23459	defer googleapi.CloseBody(res)
23460	if err := googleapi.CheckResponse(res); err != nil {
23461		return nil, err
23462	}
23463	ret := &GoogleLongrunningOperation{
23464		ServerResponse: googleapi.ServerResponse{
23465			Header:         res.Header,
23466			HTTPStatusCode: res.StatusCode,
23467		},
23468	}
23469	target := &ret
23470	if err := gensupport.DecodeResponse(target, res); err != nil {
23471		return nil, err
23472	}
23473	return ret, nil
23474	// {
23475	//   "description": "Creates multiple new entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
23476	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate",
23477	//   "httpMethod": "POST",
23478	//   "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate",
23479	//   "parameterOrder": [
23480	//     "parent"
23481	//   ],
23482	//   "parameters": {
23483	//     "parent": {
23484	//       "description": "Required. The name of the entity type to create entities in. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
23485	//       "location": "path",
23486	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
23487	//       "required": true,
23488	//       "type": "string"
23489	//     }
23490	//   },
23491	//   "path": "v2beta1/{+parent}/entities:batchCreate",
23492	//   "request": {
23493	//     "$ref": "GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest"
23494	//   },
23495	//   "response": {
23496	//     "$ref": "GoogleLongrunningOperation"
23497	//   },
23498	//   "scopes": [
23499	//     "https://www.googleapis.com/auth/cloud-platform",
23500	//     "https://www.googleapis.com/auth/dialogflow"
23501	//   ]
23502	// }
23503
23504}
23505
23506// method id "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete":
23507
23508type ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall struct {
23509	s                                                      *Service
23510	parent                                                 string
23511	googleclouddialogflowv2beta1batchdeleteentitiesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest
23512	urlParams_                                             gensupport.URLParams
23513	ctx_                                                   context.Context
23514	header_                                                http.Header
23515}
23516
23517// BatchDelete: Deletes entities in the specified entity
23518// type.
23519//
23520// Operation <response: google.protobuf.Empty>
23521func (r *ProjectsLocationsAgentEntityTypesEntitiesService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteentitiesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest) *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall {
23522	c := &ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23523	c.parent = parent
23524	c.googleclouddialogflowv2beta1batchdeleteentitiesrequest = googleclouddialogflowv2beta1batchdeleteentitiesrequest
23525	return c
23526}
23527
23528// Fields allows partial responses to be retrieved. See
23529// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23530// for more information.
23531func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall {
23532	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23533	return c
23534}
23535
23536// Context sets the context to be used in this call's Do method. Any
23537// pending HTTP request will be aborted if the provided context is
23538// canceled.
23539func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall {
23540	c.ctx_ = ctx
23541	return c
23542}
23543
23544// Header returns an http.Header that can be modified by the caller to
23545// add HTTP headers to the request.
23546func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Header() http.Header {
23547	if c.header_ == nil {
23548		c.header_ = make(http.Header)
23549	}
23550	return c.header_
23551}
23552
23553func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
23554	reqHeaders := make(http.Header)
23555	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23556	for k, v := range c.header_ {
23557		reqHeaders[k] = v
23558	}
23559	reqHeaders.Set("User-Agent", c.s.userAgent())
23560	var body io.Reader = nil
23561	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteentitiesrequest)
23562	if err != nil {
23563		return nil, err
23564	}
23565	reqHeaders.Set("Content-Type", "application/json")
23566	c.urlParams_.Set("alt", alt)
23567	c.urlParams_.Set("prettyPrint", "false")
23568	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchDelete")
23569	urls += "?" + c.urlParams_.Encode()
23570	req, err := http.NewRequest("POST", urls, body)
23571	if err != nil {
23572		return nil, err
23573	}
23574	req.Header = reqHeaders
23575	googleapi.Expand(req.URL, map[string]string{
23576		"parent": c.parent,
23577	})
23578	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23579}
23580
23581// Do executes the "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete" call.
23582// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
23583// Any non-2xx status code is an error. Response headers are in either
23584// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
23585// was returned at all) in error.(*googleapi.Error).Header. Use
23586// googleapi.IsNotModified to check whether the returned error was
23587// because http.StatusNotModified was returned.
23588func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
23589	gensupport.SetOptions(c.urlParams_, opts...)
23590	res, err := c.doRequest("json")
23591	if res != nil && res.StatusCode == http.StatusNotModified {
23592		if res.Body != nil {
23593			res.Body.Close()
23594		}
23595		return nil, &googleapi.Error{
23596			Code:   res.StatusCode,
23597			Header: res.Header,
23598		}
23599	}
23600	if err != nil {
23601		return nil, err
23602	}
23603	defer googleapi.CloseBody(res)
23604	if err := googleapi.CheckResponse(res); err != nil {
23605		return nil, err
23606	}
23607	ret := &GoogleLongrunningOperation{
23608		ServerResponse: googleapi.ServerResponse{
23609			Header:         res.Header,
23610			HTTPStatusCode: res.StatusCode,
23611		},
23612	}
23613	target := &ret
23614	if err := gensupport.DecodeResponse(target, res); err != nil {
23615		return nil, err
23616	}
23617	return ret, nil
23618	// {
23619	//   "description": "Deletes entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
23620	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete",
23621	//   "httpMethod": "POST",
23622	//   "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete",
23623	//   "parameterOrder": [
23624	//     "parent"
23625	//   ],
23626	//   "parameters": {
23627	//     "parent": {
23628	//       "description": "Required. The name of the entity type to delete entries for. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
23629	//       "location": "path",
23630	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
23631	//       "required": true,
23632	//       "type": "string"
23633	//     }
23634	//   },
23635	//   "path": "v2beta1/{+parent}/entities:batchDelete",
23636	//   "request": {
23637	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest"
23638	//   },
23639	//   "response": {
23640	//     "$ref": "GoogleLongrunningOperation"
23641	//   },
23642	//   "scopes": [
23643	//     "https://www.googleapis.com/auth/cloud-platform",
23644	//     "https://www.googleapis.com/auth/dialogflow"
23645	//   ]
23646	// }
23647
23648}
23649
23650// method id "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate":
23651
23652type ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall struct {
23653	s                                                      *Service
23654	parent                                                 string
23655	googleclouddialogflowv2beta1batchupdateentitiesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest
23656	urlParams_                                             gensupport.URLParams
23657	ctx_                                                   context.Context
23658	header_                                                http.Header
23659}
23660
23661// BatchUpdate: Updates or creates multiple entities in the specified
23662// entity type. This
23663// method does not affect entities in the entity type that aren't
23664// explicitly
23665// specified in the request.
23666//
23667// Operation <response: google.protobuf.Empty>
23668func (r *ProjectsLocationsAgentEntityTypesEntitiesService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateentitiesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest) *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall {
23669	c := &ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23670	c.parent = parent
23671	c.googleclouddialogflowv2beta1batchupdateentitiesrequest = googleclouddialogflowv2beta1batchupdateentitiesrequest
23672	return c
23673}
23674
23675// Fields allows partial responses to be retrieved. See
23676// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23677// for more information.
23678func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall {
23679	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall {
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 *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Header() http.Header {
23694	if c.header_ == nil {
23695		c.header_ = make(http.Header)
23696	}
23697	return c.header_
23698}
23699
23700func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
23701	reqHeaders := make(http.Header)
23702	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23703	for k, v := range c.header_ {
23704		reqHeaders[k] = v
23705	}
23706	reqHeaders.Set("User-Agent", c.s.userAgent())
23707	var body io.Reader = nil
23708	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateentitiesrequest)
23709	if err != nil {
23710		return nil, err
23711	}
23712	reqHeaders.Set("Content-Type", "application/json")
23713	c.urlParams_.Set("alt", alt)
23714	c.urlParams_.Set("prettyPrint", "false")
23715	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchUpdate")
23716	urls += "?" + c.urlParams_.Encode()
23717	req, err := http.NewRequest("POST", urls, body)
23718	if err != nil {
23719		return nil, err
23720	}
23721	req.Header = reqHeaders
23722	googleapi.Expand(req.URL, map[string]string{
23723		"parent": c.parent,
23724	})
23725	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23726}
23727
23728// Do executes the "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate" call.
23729// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
23730// Any non-2xx status code is an error. Response headers are in either
23731// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
23732// was returned at all) in error.(*googleapi.Error).Header. Use
23733// googleapi.IsNotModified to check whether the returned error was
23734// because http.StatusNotModified was returned.
23735func (c *ProjectsLocationsAgentEntityTypesEntitiesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{
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": "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",
23767	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate",
23768	//   "httpMethod": "POST",
23769	//   "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate",
23770	//   "parameterOrder": [
23771	//     "parent"
23772	//   ],
23773	//   "parameters": {
23774	//     "parent": {
23775	//       "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`.",
23776	//       "location": "path",
23777	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$",
23778	//       "required": true,
23779	//       "type": "string"
23780	//     }
23781	//   },
23782	//   "path": "v2beta1/{+parent}/entities:batchUpdate",
23783	//   "request": {
23784	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest"
23785	//   },
23786	//   "response": {
23787	//     "$ref": "GoogleLongrunningOperation"
23788	//   },
23789	//   "scopes": [
23790	//     "https://www.googleapis.com/auth/cloud-platform",
23791	//     "https://www.googleapis.com/auth/dialogflow"
23792	//   ]
23793	// }
23794
23795}
23796
23797// method id "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts":
23798
23799type ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall struct {
23800	s          *Service
23801	parent     string
23802	urlParams_ gensupport.URLParams
23803	ctx_       context.Context
23804	header_    http.Header
23805}
23806
23807// DeleteContexts: Deletes all active contexts in the specified session.
23808func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsService) DeleteContexts(parent string) *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall {
23809	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23810	c.parent = parent
23811	return c
23812}
23813
23814// Fields allows partial responses to be retrieved. See
23815// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23816// for more information.
23817func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall {
23818	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23819	return c
23820}
23821
23822// Context sets the context to be used in this call's Do method. Any
23823// pending HTTP request will be aborted if the provided context is
23824// canceled.
23825func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall {
23826	c.ctx_ = ctx
23827	return c
23828}
23829
23830// Header returns an http.Header that can be modified by the caller to
23831// add HTTP headers to the request.
23832func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Header() http.Header {
23833	if c.header_ == nil {
23834		c.header_ = make(http.Header)
23835	}
23836	return c.header_
23837}
23838
23839func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
23840	reqHeaders := make(http.Header)
23841	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23842	for k, v := range c.header_ {
23843		reqHeaders[k] = v
23844	}
23845	reqHeaders.Set("User-Agent", c.s.userAgent())
23846	var body io.Reader = nil
23847	c.urlParams_.Set("alt", alt)
23848	c.urlParams_.Set("prettyPrint", "false")
23849	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
23850	urls += "?" + c.urlParams_.Encode()
23851	req, err := http.NewRequest("DELETE", urls, body)
23852	if err != nil {
23853		return nil, err
23854	}
23855	req.Header = reqHeaders
23856	googleapi.Expand(req.URL, map[string]string{
23857		"parent": c.parent,
23858	})
23859	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23860}
23861
23862// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts" call.
23863// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
23864// non-2xx status code is an error. Response headers are in either
23865// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
23866// returned at all) in error.(*googleapi.Error).Header. Use
23867// googleapi.IsNotModified to check whether the returned error was
23868// because http.StatusNotModified was returned.
23869func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
23870	gensupport.SetOptions(c.urlParams_, opts...)
23871	res, err := c.doRequest("json")
23872	if res != nil && res.StatusCode == http.StatusNotModified {
23873		if res.Body != nil {
23874			res.Body.Close()
23875		}
23876		return nil, &googleapi.Error{
23877			Code:   res.StatusCode,
23878			Header: res.Header,
23879		}
23880	}
23881	if err != nil {
23882		return nil, err
23883	}
23884	defer googleapi.CloseBody(res)
23885	if err := googleapi.CheckResponse(res); err != nil {
23886		return nil, err
23887	}
23888	ret := &GoogleProtobufEmpty{
23889		ServerResponse: googleapi.ServerResponse{
23890			Header:         res.Header,
23891			HTTPStatusCode: res.StatusCode,
23892		},
23893	}
23894	target := &ret
23895	if err := gensupport.DecodeResponse(target, res); err != nil {
23896		return nil, err
23897	}
23898	return ret, nil
23899	// {
23900	//   "description": "Deletes all active contexts in the specified session.",
23901	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
23902	//   "httpMethod": "DELETE",
23903	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts",
23904	//   "parameterOrder": [
23905	//     "parent"
23906	//   ],
23907	//   "parameters": {
23908	//     "parent": {
23909	//       "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.",
23910	//       "location": "path",
23911	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
23912	//       "required": true,
23913	//       "type": "string"
23914	//     }
23915	//   },
23916	//   "path": "v2beta1/{+parent}/contexts",
23917	//   "response": {
23918	//     "$ref": "GoogleProtobufEmpty"
23919	//   },
23920	//   "scopes": [
23921	//     "https://www.googleapis.com/auth/cloud-platform",
23922	//     "https://www.googleapis.com/auth/dialogflow"
23923	//   ]
23924	// }
23925
23926}
23927
23928// method id "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent":
23929
23930type ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall struct {
23931	s                                               *Service
23932	sessionid                                       string
23933	googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest
23934	urlParams_                                      gensupport.URLParams
23935	ctx_                                            context.Context
23936	header_                                         http.Header
23937}
23938
23939// DetectIntent: Processes a natural language query and returns
23940// structured, actionable data
23941// as a result. This method is not idempotent, because it may cause
23942// contexts
23943// and session entity types to be updated, which in turn might
23944// affect
23945// results of future queries.
23946func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest) *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall {
23947	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23948	c.sessionid = sessionid
23949	c.googleclouddialogflowv2beta1detectintentrequest = googleclouddialogflowv2beta1detectintentrequest
23950	return c
23951}
23952
23953// Fields allows partial responses to be retrieved. See
23954// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23955// for more information.
23956func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall {
23957	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23958	return c
23959}
23960
23961// Context sets the context to be used in this call's Do method. Any
23962// pending HTTP request will be aborted if the provided context is
23963// canceled.
23964func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall {
23965	c.ctx_ = ctx
23966	return c
23967}
23968
23969// Header returns an http.Header that can be modified by the caller to
23970// add HTTP headers to the request.
23971func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Header() http.Header {
23972	if c.header_ == nil {
23973		c.header_ = make(http.Header)
23974	}
23975	return c.header_
23976}
23977
23978func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
23979	reqHeaders := make(http.Header)
23980	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
23981	for k, v := range c.header_ {
23982		reqHeaders[k] = v
23983	}
23984	reqHeaders.Set("User-Agent", c.s.userAgent())
23985	var body io.Reader = nil
23986	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1detectintentrequest)
23987	if err != nil {
23988		return nil, err
23989	}
23990	reqHeaders.Set("Content-Type", "application/json")
23991	c.urlParams_.Set("alt", alt)
23992	c.urlParams_.Set("prettyPrint", "false")
23993	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+session}:detectIntent")
23994	urls += "?" + c.urlParams_.Encode()
23995	req, err := http.NewRequest("POST", urls, body)
23996	if err != nil {
23997		return nil, err
23998	}
23999	req.Header = reqHeaders
24000	googleapi.Expand(req.URL, map[string]string{
24001		"session": c.sessionid,
24002	})
24003	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24004}
24005
24006// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent" call.
24007// Exactly one of *GoogleCloudDialogflowV2beta1DetectIntentResponse or
24008// error will be non-nil. Any non-2xx status code is an error. Response
24009// headers are in either
24010// *GoogleCloudDialogflowV2beta1DetectIntentResponse.ServerResponse.Heade
24011// r or (if a response was returned at all) in
24012// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24013// whether the returned error was because http.StatusNotModified was
24014// returned.
24015func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1DetectIntentResponse, error) {
24016	gensupport.SetOptions(c.urlParams_, opts...)
24017	res, err := c.doRequest("json")
24018	if res != nil && res.StatusCode == http.StatusNotModified {
24019		if res.Body != nil {
24020			res.Body.Close()
24021		}
24022		return nil, &googleapi.Error{
24023			Code:   res.StatusCode,
24024			Header: res.Header,
24025		}
24026	}
24027	if err != nil {
24028		return nil, err
24029	}
24030	defer googleapi.CloseBody(res)
24031	if err := googleapi.CheckResponse(res); err != nil {
24032		return nil, err
24033	}
24034	ret := &GoogleCloudDialogflowV2beta1DetectIntentResponse{
24035		ServerResponse: googleapi.ServerResponse{
24036			Header:         res.Header,
24037			HTTPStatusCode: res.StatusCode,
24038		},
24039	}
24040	target := &ret
24041	if err := gensupport.DecodeResponse(target, res); err != nil {
24042		return nil, err
24043	}
24044	return ret, nil
24045	// {
24046	//   "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.",
24047	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent",
24048	//   "httpMethod": "POST",
24049	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent",
24050	//   "parameterOrder": [
24051	//     "session"
24052	//   ],
24053	//   "parameters": {
24054	//     "session": {
24055	//       "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.",
24056	//       "location": "path",
24057	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
24058	//       "required": true,
24059	//       "type": "string"
24060	//     }
24061	//   },
24062	//   "path": "v2beta1/{+session}:detectIntent",
24063	//   "request": {
24064	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest"
24065	//   },
24066	//   "response": {
24067	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse"
24068	//   },
24069	//   "scopes": [
24070	//     "https://www.googleapis.com/auth/cloud-platform",
24071	//     "https://www.googleapis.com/auth/dialogflow"
24072	//   ]
24073	// }
24074
24075}
24076
24077// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create":
24078
24079type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall struct {
24080	s                                   *Service
24081	parent                              string
24082	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
24083	urlParams_                          gensupport.URLParams
24084	ctx_                                context.Context
24085	header_                             http.Header
24086}
24087
24088// Create: Creates a context.
24089//
24090// If the specified context already exists, overrides the context.
24091func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Create(parent string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall {
24092	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24093	c.parent = parent
24094	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
24095	return c
24096}
24097
24098// Fields allows partial responses to be retrieved. See
24099// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24100// for more information.
24101func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall {
24102	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24103	return c
24104}
24105
24106// Context sets the context to be used in this call's Do method. Any
24107// pending HTTP request will be aborted if the provided context is
24108// canceled.
24109func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall {
24110	c.ctx_ = ctx
24111	return c
24112}
24113
24114// Header returns an http.Header that can be modified by the caller to
24115// add HTTP headers to the request.
24116func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Header() http.Header {
24117	if c.header_ == nil {
24118		c.header_ = make(http.Header)
24119	}
24120	return c.header_
24121}
24122
24123func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
24124	reqHeaders := make(http.Header)
24125	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24126	for k, v := range c.header_ {
24127		reqHeaders[k] = v
24128	}
24129	reqHeaders.Set("User-Agent", c.s.userAgent())
24130	var body io.Reader = nil
24131	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
24132	if err != nil {
24133		return nil, err
24134	}
24135	reqHeaders.Set("Content-Type", "application/json")
24136	c.urlParams_.Set("alt", alt)
24137	c.urlParams_.Set("prettyPrint", "false")
24138	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
24139	urls += "?" + c.urlParams_.Encode()
24140	req, err := http.NewRequest("POST", urls, body)
24141	if err != nil {
24142		return nil, err
24143	}
24144	req.Header = reqHeaders
24145	googleapi.Expand(req.URL, map[string]string{
24146		"parent": c.parent,
24147	})
24148	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24149}
24150
24151// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create" call.
24152// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
24153// non-nil. Any non-2xx status code is an error. Response headers are in
24154// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
24155// (if a response was returned at all) in
24156// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24157// whether the returned error was because http.StatusNotModified was
24158// returned.
24159func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
24160	gensupport.SetOptions(c.urlParams_, opts...)
24161	res, err := c.doRequest("json")
24162	if res != nil && res.StatusCode == http.StatusNotModified {
24163		if res.Body != nil {
24164			res.Body.Close()
24165		}
24166		return nil, &googleapi.Error{
24167			Code:   res.StatusCode,
24168			Header: res.Header,
24169		}
24170	}
24171	if err != nil {
24172		return nil, err
24173	}
24174	defer googleapi.CloseBody(res)
24175	if err := googleapi.CheckResponse(res); err != nil {
24176		return nil, err
24177	}
24178	ret := &GoogleCloudDialogflowV2beta1Context{
24179		ServerResponse: googleapi.ServerResponse{
24180			Header:         res.Header,
24181			HTTPStatusCode: res.StatusCode,
24182		},
24183	}
24184	target := &ret
24185	if err := gensupport.DecodeResponse(target, res); err != nil {
24186		return nil, err
24187	}
24188	return ret, nil
24189	// {
24190	//   "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.",
24191	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
24192	//   "httpMethod": "POST",
24193	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create",
24194	//   "parameterOrder": [
24195	//     "parent"
24196	//   ],
24197	//   "parameters": {
24198	//     "parent": {
24199	//       "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.",
24200	//       "location": "path",
24201	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
24202	//       "required": true,
24203	//       "type": "string"
24204	//     }
24205	//   },
24206	//   "path": "v2beta1/{+parent}/contexts",
24207	//   "request": {
24208	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
24209	//   },
24210	//   "response": {
24211	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
24212	//   },
24213	//   "scopes": [
24214	//     "https://www.googleapis.com/auth/cloud-platform",
24215	//     "https://www.googleapis.com/auth/dialogflow"
24216	//   ]
24217	// }
24218
24219}
24220
24221// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete":
24222
24223type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall struct {
24224	s          *Service
24225	name       string
24226	urlParams_ gensupport.URLParams
24227	ctx_       context.Context
24228	header_    http.Header
24229}
24230
24231// Delete: Deletes the specified context.
24232func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Delete(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall {
24233	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24234	c.name = name
24235	return c
24236}
24237
24238// Fields allows partial responses to be retrieved. See
24239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24240// for more information.
24241func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall {
24242	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24243	return c
24244}
24245
24246// Context sets the context to be used in this call's Do method. Any
24247// pending HTTP request will be aborted if the provided context is
24248// canceled.
24249func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall {
24250	c.ctx_ = ctx
24251	return c
24252}
24253
24254// Header returns an http.Header that can be modified by the caller to
24255// add HTTP headers to the request.
24256func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Header() http.Header {
24257	if c.header_ == nil {
24258		c.header_ = make(http.Header)
24259	}
24260	return c.header_
24261}
24262
24263func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
24264	reqHeaders := make(http.Header)
24265	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24266	for k, v := range c.header_ {
24267		reqHeaders[k] = v
24268	}
24269	reqHeaders.Set("User-Agent", c.s.userAgent())
24270	var body io.Reader = nil
24271	c.urlParams_.Set("alt", alt)
24272	c.urlParams_.Set("prettyPrint", "false")
24273	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
24274	urls += "?" + c.urlParams_.Encode()
24275	req, err := http.NewRequest("DELETE", urls, body)
24276	if err != nil {
24277		return nil, err
24278	}
24279	req.Header = reqHeaders
24280	googleapi.Expand(req.URL, map[string]string{
24281		"name": c.name,
24282	})
24283	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24284}
24285
24286// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete" call.
24287// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
24288// non-2xx status code is an error. Response headers are in either
24289// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
24290// returned at all) in error.(*googleapi.Error).Header. Use
24291// googleapi.IsNotModified to check whether the returned error was
24292// because http.StatusNotModified was returned.
24293func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
24294	gensupport.SetOptions(c.urlParams_, opts...)
24295	res, err := c.doRequest("json")
24296	if res != nil && res.StatusCode == http.StatusNotModified {
24297		if res.Body != nil {
24298			res.Body.Close()
24299		}
24300		return nil, &googleapi.Error{
24301			Code:   res.StatusCode,
24302			Header: res.Header,
24303		}
24304	}
24305	if err != nil {
24306		return nil, err
24307	}
24308	defer googleapi.CloseBody(res)
24309	if err := googleapi.CheckResponse(res); err != nil {
24310		return nil, err
24311	}
24312	ret := &GoogleProtobufEmpty{
24313		ServerResponse: googleapi.ServerResponse{
24314			Header:         res.Header,
24315			HTTPStatusCode: res.StatusCode,
24316		},
24317	}
24318	target := &ret
24319	if err := gensupport.DecodeResponse(target, res); err != nil {
24320		return nil, err
24321	}
24322	return ret, nil
24323	// {
24324	//   "description": "Deletes the specified context.",
24325	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
24326	//   "httpMethod": "DELETE",
24327	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete",
24328	//   "parameterOrder": [
24329	//     "name"
24330	//   ],
24331	//   "parameters": {
24332	//     "name": {
24333	//       "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.",
24334	//       "location": "path",
24335	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
24336	//       "required": true,
24337	//       "type": "string"
24338	//     }
24339	//   },
24340	//   "path": "v2beta1/{+name}",
24341	//   "response": {
24342	//     "$ref": "GoogleProtobufEmpty"
24343	//   },
24344	//   "scopes": [
24345	//     "https://www.googleapis.com/auth/cloud-platform",
24346	//     "https://www.googleapis.com/auth/dialogflow"
24347	//   ]
24348	// }
24349
24350}
24351
24352// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get":
24353
24354type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall struct {
24355	s            *Service
24356	name         string
24357	urlParams_   gensupport.URLParams
24358	ifNoneMatch_ string
24359	ctx_         context.Context
24360	header_      http.Header
24361}
24362
24363// Get: Retrieves the specified context.
24364func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Get(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
24365	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24366	c.name = name
24367	return c
24368}
24369
24370// Fields allows partial responses to be retrieved. See
24371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24372// for more information.
24373func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
24374	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24375	return c
24376}
24377
24378// IfNoneMatch sets the optional parameter which makes the operation
24379// fail if the object's ETag matches the given value. This is useful for
24380// getting updates only after the object has changed since the last
24381// request. Use googleapi.IsNotModified to check whether the response
24382// error from Do is the result of In-None-Match.
24383func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
24384	c.ifNoneMatch_ = entityTag
24385	return c
24386}
24387
24388// Context sets the context to be used in this call's Do method. Any
24389// pending HTTP request will be aborted if the provided context is
24390// canceled.
24391func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall {
24392	c.ctx_ = ctx
24393	return c
24394}
24395
24396// Header returns an http.Header that can be modified by the caller to
24397// add HTTP headers to the request.
24398func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Header() http.Header {
24399	if c.header_ == nil {
24400		c.header_ = make(http.Header)
24401	}
24402	return c.header_
24403}
24404
24405func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
24406	reqHeaders := make(http.Header)
24407	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24408	for k, v := range c.header_ {
24409		reqHeaders[k] = v
24410	}
24411	reqHeaders.Set("User-Agent", c.s.userAgent())
24412	if c.ifNoneMatch_ != "" {
24413		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24414	}
24415	var body io.Reader = nil
24416	c.urlParams_.Set("alt", alt)
24417	c.urlParams_.Set("prettyPrint", "false")
24418	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
24419	urls += "?" + c.urlParams_.Encode()
24420	req, err := http.NewRequest("GET", urls, body)
24421	if err != nil {
24422		return nil, err
24423	}
24424	req.Header = reqHeaders
24425	googleapi.Expand(req.URL, map[string]string{
24426		"name": c.name,
24427	})
24428	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24429}
24430
24431// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get" call.
24432// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
24433// non-nil. Any non-2xx status code is an error. Response headers are in
24434// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
24435// (if a response was returned at all) in
24436// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24437// whether the returned error was because http.StatusNotModified was
24438// returned.
24439func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
24440	gensupport.SetOptions(c.urlParams_, opts...)
24441	res, err := c.doRequest("json")
24442	if res != nil && res.StatusCode == http.StatusNotModified {
24443		if res.Body != nil {
24444			res.Body.Close()
24445		}
24446		return nil, &googleapi.Error{
24447			Code:   res.StatusCode,
24448			Header: res.Header,
24449		}
24450	}
24451	if err != nil {
24452		return nil, err
24453	}
24454	defer googleapi.CloseBody(res)
24455	if err := googleapi.CheckResponse(res); err != nil {
24456		return nil, err
24457	}
24458	ret := &GoogleCloudDialogflowV2beta1Context{
24459		ServerResponse: googleapi.ServerResponse{
24460			Header:         res.Header,
24461			HTTPStatusCode: res.StatusCode,
24462		},
24463	}
24464	target := &ret
24465	if err := gensupport.DecodeResponse(target, res); err != nil {
24466		return nil, err
24467	}
24468	return ret, nil
24469	// {
24470	//   "description": "Retrieves the specified context.",
24471	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
24472	//   "httpMethod": "GET",
24473	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get",
24474	//   "parameterOrder": [
24475	//     "name"
24476	//   ],
24477	//   "parameters": {
24478	//     "name": {
24479	//       "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.",
24480	//       "location": "path",
24481	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
24482	//       "required": true,
24483	//       "type": "string"
24484	//     }
24485	//   },
24486	//   "path": "v2beta1/{+name}",
24487	//   "response": {
24488	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
24489	//   },
24490	//   "scopes": [
24491	//     "https://www.googleapis.com/auth/cloud-platform",
24492	//     "https://www.googleapis.com/auth/dialogflow"
24493	//   ]
24494	// }
24495
24496}
24497
24498// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list":
24499
24500type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall struct {
24501	s            *Service
24502	parent       string
24503	urlParams_   gensupport.URLParams
24504	ifNoneMatch_ string
24505	ctx_         context.Context
24506	header_      http.Header
24507}
24508
24509// List: Returns the list of all contexts in the specified session.
24510func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) List(parent string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
24511	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24512	c.parent = parent
24513	return c
24514}
24515
24516// PageSize sets the optional parameter "pageSize": The maximum number
24517// of items to return in a single page. By
24518// default 100 and at most 1000.
24519func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
24520	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24521	return c
24522}
24523
24524// PageToken sets the optional parameter "pageToken": The
24525// next_page_token value returned from a previous list request.
24526func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) PageToken(pageToken string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
24527	c.urlParams_.Set("pageToken", pageToken)
24528	return c
24529}
24530
24531// Fields allows partial responses to be retrieved. See
24532// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24533// for more information.
24534func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
24535	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24536	return c
24537}
24538
24539// IfNoneMatch sets the optional parameter which makes the operation
24540// fail if the object's ETag matches the given value. This is useful for
24541// getting updates only after the object has changed since the last
24542// request. Use googleapi.IsNotModified to check whether the response
24543// error from Do is the result of In-None-Match.
24544func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
24545	c.ifNoneMatch_ = entityTag
24546	return c
24547}
24548
24549// Context sets the context to be used in this call's Do method. Any
24550// pending HTTP request will be aborted if the provided context is
24551// canceled.
24552func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall {
24553	c.ctx_ = ctx
24554	return c
24555}
24556
24557// Header returns an http.Header that can be modified by the caller to
24558// add HTTP headers to the request.
24559func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Header() http.Header {
24560	if c.header_ == nil {
24561		c.header_ = make(http.Header)
24562	}
24563	return c.header_
24564}
24565
24566func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
24567	reqHeaders := make(http.Header)
24568	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24569	for k, v := range c.header_ {
24570		reqHeaders[k] = v
24571	}
24572	reqHeaders.Set("User-Agent", c.s.userAgent())
24573	if c.ifNoneMatch_ != "" {
24574		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24575	}
24576	var body io.Reader = nil
24577	c.urlParams_.Set("alt", alt)
24578	c.urlParams_.Set("prettyPrint", "false")
24579	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
24580	urls += "?" + c.urlParams_.Encode()
24581	req, err := http.NewRequest("GET", urls, body)
24582	if err != nil {
24583		return nil, err
24584	}
24585	req.Header = reqHeaders
24586	googleapi.Expand(req.URL, map[string]string{
24587		"parent": c.parent,
24588	})
24589	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24590}
24591
24592// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list" call.
24593// Exactly one of *GoogleCloudDialogflowV2beta1ListContextsResponse or
24594// error will be non-nil. Any non-2xx status code is an error. Response
24595// headers are in either
24596// *GoogleCloudDialogflowV2beta1ListContextsResponse.ServerResponse.Heade
24597// r or (if a response was returned at all) in
24598// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24599// whether the returned error was because http.StatusNotModified was
24600// returned.
24601func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListContextsResponse, error) {
24602	gensupport.SetOptions(c.urlParams_, opts...)
24603	res, err := c.doRequest("json")
24604	if res != nil && res.StatusCode == http.StatusNotModified {
24605		if res.Body != nil {
24606			res.Body.Close()
24607		}
24608		return nil, &googleapi.Error{
24609			Code:   res.StatusCode,
24610			Header: res.Header,
24611		}
24612	}
24613	if err != nil {
24614		return nil, err
24615	}
24616	defer googleapi.CloseBody(res)
24617	if err := googleapi.CheckResponse(res); err != nil {
24618		return nil, err
24619	}
24620	ret := &GoogleCloudDialogflowV2beta1ListContextsResponse{
24621		ServerResponse: googleapi.ServerResponse{
24622			Header:         res.Header,
24623			HTTPStatusCode: res.StatusCode,
24624		},
24625	}
24626	target := &ret
24627	if err := gensupport.DecodeResponse(target, res); err != nil {
24628		return nil, err
24629	}
24630	return ret, nil
24631	// {
24632	//   "description": "Returns the list of all contexts in the specified session.",
24633	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
24634	//   "httpMethod": "GET",
24635	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list",
24636	//   "parameterOrder": [
24637	//     "parent"
24638	//   ],
24639	//   "parameters": {
24640	//     "pageSize": {
24641	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
24642	//       "format": "int32",
24643	//       "location": "query",
24644	//       "type": "integer"
24645	//     },
24646	//     "pageToken": {
24647	//       "description": "Optional. The next_page_token value returned from a previous list request.",
24648	//       "location": "query",
24649	//       "type": "string"
24650	//     },
24651	//     "parent": {
24652	//       "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.",
24653	//       "location": "path",
24654	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
24655	//       "required": true,
24656	//       "type": "string"
24657	//     }
24658	//   },
24659	//   "path": "v2beta1/{+parent}/contexts",
24660	//   "response": {
24661	//     "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse"
24662	//   },
24663	//   "scopes": [
24664	//     "https://www.googleapis.com/auth/cloud-platform",
24665	//     "https://www.googleapis.com/auth/dialogflow"
24666	//   ]
24667	// }
24668
24669}
24670
24671// Pages invokes f for each page of results.
24672// A non-nil error returned from f will halt the iteration.
24673// The provided context supersedes any context provided to the Context method.
24674func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListContextsResponse) error) error {
24675	c.ctx_ = ctx
24676	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24677	for {
24678		x, err := c.Do()
24679		if err != nil {
24680			return err
24681		}
24682		if err := f(x); err != nil {
24683			return err
24684		}
24685		if x.NextPageToken == "" {
24686			return nil
24687		}
24688		c.PageToken(x.NextPageToken)
24689	}
24690}
24691
24692// method id "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch":
24693
24694type ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall struct {
24695	s                                   *Service
24696	nameid                              string
24697	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
24698	urlParams_                          gensupport.URLParams
24699	ctx_                                context.Context
24700	header_                             http.Header
24701}
24702
24703// Patch: Updates the specified context.
24704func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsService) Patch(nameid string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
24705	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24706	c.nameid = nameid
24707	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
24708	return c
24709}
24710
24711// UpdateMask sets the optional parameter "updateMask": The mask to
24712// control which fields get updated.
24713func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
24714	c.urlParams_.Set("updateMask", updateMask)
24715	return c
24716}
24717
24718// Fields allows partial responses to be retrieved. See
24719// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24720// for more information.
24721func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
24722	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24723	return c
24724}
24725
24726// Context sets the context to be used in this call's Do method. Any
24727// pending HTTP request will be aborted if the provided context is
24728// canceled.
24729func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall {
24730	c.ctx_ = ctx
24731	return c
24732}
24733
24734// Header returns an http.Header that can be modified by the caller to
24735// add HTTP headers to the request.
24736func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Header() http.Header {
24737	if c.header_ == nil {
24738		c.header_ = make(http.Header)
24739	}
24740	return c.header_
24741}
24742
24743func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
24744	reqHeaders := make(http.Header)
24745	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24746	for k, v := range c.header_ {
24747		reqHeaders[k] = v
24748	}
24749	reqHeaders.Set("User-Agent", c.s.userAgent())
24750	var body io.Reader = nil
24751	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
24752	if err != nil {
24753		return nil, err
24754	}
24755	reqHeaders.Set("Content-Type", "application/json")
24756	c.urlParams_.Set("alt", alt)
24757	c.urlParams_.Set("prettyPrint", "false")
24758	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
24759	urls += "?" + c.urlParams_.Encode()
24760	req, err := http.NewRequest("PATCH", urls, body)
24761	if err != nil {
24762		return nil, err
24763	}
24764	req.Header = reqHeaders
24765	googleapi.Expand(req.URL, map[string]string{
24766		"name": c.nameid,
24767	})
24768	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24769}
24770
24771// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch" call.
24772// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
24773// non-nil. Any non-2xx status code is an error. Response headers are in
24774// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
24775// (if a response was returned at all) in
24776// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24777// whether the returned error was because http.StatusNotModified was
24778// returned.
24779func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
24780	gensupport.SetOptions(c.urlParams_, opts...)
24781	res, err := c.doRequest("json")
24782	if res != nil && res.StatusCode == http.StatusNotModified {
24783		if res.Body != nil {
24784			res.Body.Close()
24785		}
24786		return nil, &googleapi.Error{
24787			Code:   res.StatusCode,
24788			Header: res.Header,
24789		}
24790	}
24791	if err != nil {
24792		return nil, err
24793	}
24794	defer googleapi.CloseBody(res)
24795	if err := googleapi.CheckResponse(res); err != nil {
24796		return nil, err
24797	}
24798	ret := &GoogleCloudDialogflowV2beta1Context{
24799		ServerResponse: googleapi.ServerResponse{
24800			Header:         res.Header,
24801			HTTPStatusCode: res.StatusCode,
24802		},
24803	}
24804	target := &ret
24805	if err := gensupport.DecodeResponse(target, res); err != nil {
24806		return nil, err
24807	}
24808	return ret, nil
24809	// {
24810	//   "description": "Updates the specified context.",
24811	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
24812	//   "httpMethod": "PATCH",
24813	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch",
24814	//   "parameterOrder": [
24815	//     "name"
24816	//   ],
24817	//   "parameters": {
24818	//     "name": {
24819	//       "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`,\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\n\nThe `Context ID` is always converted to lowercase, may only contain\ncharacters in a-zA-Z0-9_-% and may be at most 250 bytes long.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\nThe following context names are reserved for internal use by Dialogflow.\nYou should not use these contexts or create contexts with these names:\n\n* `__system_counters__`\n* `*_id_dialog_context`\n* `*_dialog_params_size`",
24820	//       "location": "path",
24821	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
24822	//       "required": true,
24823	//       "type": "string"
24824	//     },
24825	//     "updateMask": {
24826	//       "description": "Optional. The mask to control which fields get updated.",
24827	//       "format": "google-fieldmask",
24828	//       "location": "query",
24829	//       "type": "string"
24830	//     }
24831	//   },
24832	//   "path": "v2beta1/{+name}",
24833	//   "request": {
24834	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
24835	//   },
24836	//   "response": {
24837	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
24838	//   },
24839	//   "scopes": [
24840	//     "https://www.googleapis.com/auth/cloud-platform",
24841	//     "https://www.googleapis.com/auth/dialogflow"
24842	//   ]
24843	// }
24844
24845}
24846
24847// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create":
24848
24849type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall struct {
24850	s                                             *Service
24851	parent                                        string
24852	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
24853	urlParams_                                    gensupport.URLParams
24854	ctx_                                          context.Context
24855	header_                                       http.Header
24856}
24857
24858// Create: Creates a session entity type.
24859//
24860// If the specified session entity type already exists, overrides
24861// the
24862// session entity type.
24863//
24864// This method doesn't work with Google Assistant integration.
24865// Contact Dialogflow support if you need to use session entities
24866// with Google Assistant integration.
24867func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
24868	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24869	c.parent = parent
24870	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
24871	return c
24872}
24873
24874// Fields allows partial responses to be retrieved. See
24875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24876// for more information.
24877func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
24878	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24879	return c
24880}
24881
24882// Context sets the context to be used in this call's Do method. Any
24883// pending HTTP request will be aborted if the provided context is
24884// canceled.
24885func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
24886	c.ctx_ = ctx
24887	return c
24888}
24889
24890// Header returns an http.Header that can be modified by the caller to
24891// add HTTP headers to the request.
24892func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Header() http.Header {
24893	if c.header_ == nil {
24894		c.header_ = make(http.Header)
24895	}
24896	return c.header_
24897}
24898
24899func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
24900	reqHeaders := make(http.Header)
24901	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
24902	for k, v := range c.header_ {
24903		reqHeaders[k] = v
24904	}
24905	reqHeaders.Set("User-Agent", c.s.userAgent())
24906	var body io.Reader = nil
24907	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
24908	if err != nil {
24909		return nil, err
24910	}
24911	reqHeaders.Set("Content-Type", "application/json")
24912	c.urlParams_.Set("alt", alt)
24913	c.urlParams_.Set("prettyPrint", "false")
24914	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
24915	urls += "?" + c.urlParams_.Encode()
24916	req, err := http.NewRequest("POST", urls, body)
24917	if err != nil {
24918		return nil, err
24919	}
24920	req.Header = reqHeaders
24921	googleapi.Expand(req.URL, map[string]string{
24922		"parent": c.parent,
24923	})
24924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24925}
24926
24927// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create" call.
24928// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
24929// error will be non-nil. Any non-2xx status code is an error. Response
24930// headers are in either
24931// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
24932// or (if a response was returned at all) in
24933// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24934// whether the returned error was because http.StatusNotModified was
24935// returned.
24936func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
24937	gensupport.SetOptions(c.urlParams_, opts...)
24938	res, err := c.doRequest("json")
24939	if res != nil && res.StatusCode == http.StatusNotModified {
24940		if res.Body != nil {
24941			res.Body.Close()
24942		}
24943		return nil, &googleapi.Error{
24944			Code:   res.StatusCode,
24945			Header: res.Header,
24946		}
24947	}
24948	if err != nil {
24949		return nil, err
24950	}
24951	defer googleapi.CloseBody(res)
24952	if err := googleapi.CheckResponse(res); err != nil {
24953		return nil, err
24954	}
24955	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
24956		ServerResponse: googleapi.ServerResponse{
24957			Header:         res.Header,
24958			HTTPStatusCode: res.StatusCode,
24959		},
24960	}
24961	target := &ret
24962	if err := gensupport.DecodeResponse(target, res); err != nil {
24963		return nil, err
24964	}
24965	return ret, nil
24966	// {
24967	//   "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.",
24968	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
24969	//   "httpMethod": "POST",
24970	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create",
24971	//   "parameterOrder": [
24972	//     "parent"
24973	//   ],
24974	//   "parameters": {
24975	//     "parent": {
24976	//       "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.",
24977	//       "location": "path",
24978	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
24979	//       "required": true,
24980	//       "type": "string"
24981	//     }
24982	//   },
24983	//   "path": "v2beta1/{+parent}/entityTypes",
24984	//   "request": {
24985	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
24986	//   },
24987	//   "response": {
24988	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
24989	//   },
24990	//   "scopes": [
24991	//     "https://www.googleapis.com/auth/cloud-platform",
24992	//     "https://www.googleapis.com/auth/dialogflow"
24993	//   ]
24994	// }
24995
24996}
24997
24998// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete":
24999
25000type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall struct {
25001	s          *Service
25002	name       string
25003	urlParams_ gensupport.URLParams
25004	ctx_       context.Context
25005	header_    http.Header
25006}
25007
25008// Delete: Deletes the specified session entity type.
25009//
25010// This method doesn't work with Google Assistant integration.
25011// Contact Dialogflow support if you need to use session entities
25012// with Google Assistant integration.
25013func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Delete(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
25014	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25015	c.name = name
25016	return c
25017}
25018
25019// Fields allows partial responses to be retrieved. See
25020// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25021// for more information.
25022func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
25023	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25024	return c
25025}
25026
25027// Context sets the context to be used in this call's Do method. Any
25028// pending HTTP request will be aborted if the provided context is
25029// canceled.
25030func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
25031	c.ctx_ = ctx
25032	return c
25033}
25034
25035// Header returns an http.Header that can be modified by the caller to
25036// add HTTP headers to the request.
25037func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Header() http.Header {
25038	if c.header_ == nil {
25039		c.header_ = make(http.Header)
25040	}
25041	return c.header_
25042}
25043
25044func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
25045	reqHeaders := make(http.Header)
25046	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25047	for k, v := range c.header_ {
25048		reqHeaders[k] = v
25049	}
25050	reqHeaders.Set("User-Agent", c.s.userAgent())
25051	var body io.Reader = nil
25052	c.urlParams_.Set("alt", alt)
25053	c.urlParams_.Set("prettyPrint", "false")
25054	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
25055	urls += "?" + c.urlParams_.Encode()
25056	req, err := http.NewRequest("DELETE", urls, body)
25057	if err != nil {
25058		return nil, err
25059	}
25060	req.Header = reqHeaders
25061	googleapi.Expand(req.URL, map[string]string{
25062		"name": c.name,
25063	})
25064	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25065}
25066
25067// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete" call.
25068// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
25069// non-2xx status code is an error. Response headers are in either
25070// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
25071// returned at all) in error.(*googleapi.Error).Header. Use
25072// googleapi.IsNotModified to check whether the returned error was
25073// because http.StatusNotModified was returned.
25074func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
25075	gensupport.SetOptions(c.urlParams_, opts...)
25076	res, err := c.doRequest("json")
25077	if res != nil && res.StatusCode == http.StatusNotModified {
25078		if res.Body != nil {
25079			res.Body.Close()
25080		}
25081		return nil, &googleapi.Error{
25082			Code:   res.StatusCode,
25083			Header: res.Header,
25084		}
25085	}
25086	if err != nil {
25087		return nil, err
25088	}
25089	defer googleapi.CloseBody(res)
25090	if err := googleapi.CheckResponse(res); err != nil {
25091		return nil, err
25092	}
25093	ret := &GoogleProtobufEmpty{
25094		ServerResponse: googleapi.ServerResponse{
25095			Header:         res.Header,
25096			HTTPStatusCode: res.StatusCode,
25097		},
25098	}
25099	target := &ret
25100	if err := gensupport.DecodeResponse(target, res); err != nil {
25101		return nil, err
25102	}
25103	return ret, nil
25104	// {
25105	//   "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.",
25106	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
25107	//   "httpMethod": "DELETE",
25108	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete",
25109	//   "parameterOrder": [
25110	//     "name"
25111	//   ],
25112	//   "parameters": {
25113	//     "name": {
25114	//       "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.",
25115	//       "location": "path",
25116	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
25117	//       "required": true,
25118	//       "type": "string"
25119	//     }
25120	//   },
25121	//   "path": "v2beta1/{+name}",
25122	//   "response": {
25123	//     "$ref": "GoogleProtobufEmpty"
25124	//   },
25125	//   "scopes": [
25126	//     "https://www.googleapis.com/auth/cloud-platform",
25127	//     "https://www.googleapis.com/auth/dialogflow"
25128	//   ]
25129	// }
25130
25131}
25132
25133// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get":
25134
25135type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall struct {
25136	s            *Service
25137	name         string
25138	urlParams_   gensupport.URLParams
25139	ifNoneMatch_ string
25140	ctx_         context.Context
25141	header_      http.Header
25142}
25143
25144// Get: Retrieves the specified session entity type.
25145//
25146// This method doesn't work with Google Assistant integration.
25147// Contact Dialogflow support if you need to use session entities
25148// with Google Assistant integration.
25149func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Get(name string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
25150	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25151	c.name = name
25152	return c
25153}
25154
25155// Fields allows partial responses to be retrieved. See
25156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25157// for more information.
25158func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
25159	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25160	return c
25161}
25162
25163// IfNoneMatch sets the optional parameter which makes the operation
25164// fail if the object's ETag matches the given value. This is useful for
25165// getting updates only after the object has changed since the last
25166// request. Use googleapi.IsNotModified to check whether the response
25167// error from Do is the result of In-None-Match.
25168func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
25169	c.ifNoneMatch_ = entityTag
25170	return c
25171}
25172
25173// Context sets the context to be used in this call's Do method. Any
25174// pending HTTP request will be aborted if the provided context is
25175// canceled.
25176func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
25177	c.ctx_ = ctx
25178	return c
25179}
25180
25181// Header returns an http.Header that can be modified by the caller to
25182// add HTTP headers to the request.
25183func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Header() http.Header {
25184	if c.header_ == nil {
25185		c.header_ = make(http.Header)
25186	}
25187	return c.header_
25188}
25189
25190func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
25191	reqHeaders := make(http.Header)
25192	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25193	for k, v := range c.header_ {
25194		reqHeaders[k] = v
25195	}
25196	reqHeaders.Set("User-Agent", c.s.userAgent())
25197	if c.ifNoneMatch_ != "" {
25198		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25199	}
25200	var body io.Reader = nil
25201	c.urlParams_.Set("alt", alt)
25202	c.urlParams_.Set("prettyPrint", "false")
25203	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
25204	urls += "?" + c.urlParams_.Encode()
25205	req, err := http.NewRequest("GET", urls, body)
25206	if err != nil {
25207		return nil, err
25208	}
25209	req.Header = reqHeaders
25210	googleapi.Expand(req.URL, map[string]string{
25211		"name": c.name,
25212	})
25213	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25214}
25215
25216// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get" call.
25217// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
25218// error will be non-nil. Any non-2xx status code is an error. Response
25219// headers are in either
25220// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
25221// or (if a response was returned at all) in
25222// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25223// whether the returned error was because http.StatusNotModified was
25224// returned.
25225func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
25226	gensupport.SetOptions(c.urlParams_, opts...)
25227	res, err := c.doRequest("json")
25228	if res != nil && res.StatusCode == http.StatusNotModified {
25229		if res.Body != nil {
25230			res.Body.Close()
25231		}
25232		return nil, &googleapi.Error{
25233			Code:   res.StatusCode,
25234			Header: res.Header,
25235		}
25236	}
25237	if err != nil {
25238		return nil, err
25239	}
25240	defer googleapi.CloseBody(res)
25241	if err := googleapi.CheckResponse(res); err != nil {
25242		return nil, err
25243	}
25244	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
25245		ServerResponse: googleapi.ServerResponse{
25246			Header:         res.Header,
25247			HTTPStatusCode: res.StatusCode,
25248		},
25249	}
25250	target := &ret
25251	if err := gensupport.DecodeResponse(target, res); err != nil {
25252		return nil, err
25253	}
25254	return ret, nil
25255	// {
25256	//   "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.",
25257	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
25258	//   "httpMethod": "GET",
25259	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get",
25260	//   "parameterOrder": [
25261	//     "name"
25262	//   ],
25263	//   "parameters": {
25264	//     "name": {
25265	//       "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.",
25266	//       "location": "path",
25267	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
25268	//       "required": true,
25269	//       "type": "string"
25270	//     }
25271	//   },
25272	//   "path": "v2beta1/{+name}",
25273	//   "response": {
25274	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
25275	//   },
25276	//   "scopes": [
25277	//     "https://www.googleapis.com/auth/cloud-platform",
25278	//     "https://www.googleapis.com/auth/dialogflow"
25279	//   ]
25280	// }
25281
25282}
25283
25284// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list":
25285
25286type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall struct {
25287	s            *Service
25288	parent       string
25289	urlParams_   gensupport.URLParams
25290	ifNoneMatch_ string
25291	ctx_         context.Context
25292	header_      http.Header
25293}
25294
25295// List: Returns the list of all session entity types in the specified
25296// session.
25297//
25298// This method doesn't work with Google Assistant integration.
25299// Contact Dialogflow support if you need to use session entities
25300// with Google Assistant integration.
25301func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) List(parent string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
25302	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25303	c.parent = parent
25304	return c
25305}
25306
25307// PageSize sets the optional parameter "pageSize": The maximum number
25308// of items to return in a single page. By
25309// default 100 and at most 1000.
25310func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
25311	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
25312	return c
25313}
25314
25315// PageToken sets the optional parameter "pageToken": The
25316// next_page_token value returned from a previous list request.
25317func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
25318	c.urlParams_.Set("pageToken", pageToken)
25319	return c
25320}
25321
25322// Fields allows partial responses to be retrieved. See
25323// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25324// for more information.
25325func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
25326	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25327	return c
25328}
25329
25330// IfNoneMatch sets the optional parameter which makes the operation
25331// fail if the object's ETag matches the given value. This is useful for
25332// getting updates only after the object has changed since the last
25333// request. Use googleapi.IsNotModified to check whether the response
25334// error from Do is the result of In-None-Match.
25335func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
25336	c.ifNoneMatch_ = entityTag
25337	return c
25338}
25339
25340// Context sets the context to be used in this call's Do method. Any
25341// pending HTTP request will be aborted if the provided context is
25342// canceled.
25343func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall {
25344	c.ctx_ = ctx
25345	return c
25346}
25347
25348// Header returns an http.Header that can be modified by the caller to
25349// add HTTP headers to the request.
25350func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Header() http.Header {
25351	if c.header_ == nil {
25352		c.header_ = make(http.Header)
25353	}
25354	return c.header_
25355}
25356
25357func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
25358	reqHeaders := make(http.Header)
25359	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25360	for k, v := range c.header_ {
25361		reqHeaders[k] = v
25362	}
25363	reqHeaders.Set("User-Agent", c.s.userAgent())
25364	if c.ifNoneMatch_ != "" {
25365		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25366	}
25367	var body io.Reader = nil
25368	c.urlParams_.Set("alt", alt)
25369	c.urlParams_.Set("prettyPrint", "false")
25370	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
25371	urls += "?" + c.urlParams_.Encode()
25372	req, err := http.NewRequest("GET", urls, body)
25373	if err != nil {
25374		return nil, err
25375	}
25376	req.Header = reqHeaders
25377	googleapi.Expand(req.URL, map[string]string{
25378		"parent": c.parent,
25379	})
25380	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25381}
25382
25383// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list" call.
25384// Exactly one of
25385// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse or error
25386// will be non-nil. Any non-2xx status code is an error. Response
25387// headers are in either
25388// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse.ServerResp
25389// onse.Header or (if a response was returned at all) in
25390// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25391// whether the returned error was because http.StatusNotModified was
25392// returned.
25393func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse, error) {
25394	gensupport.SetOptions(c.urlParams_, opts...)
25395	res, err := c.doRequest("json")
25396	if res != nil && res.StatusCode == http.StatusNotModified {
25397		if res.Body != nil {
25398			res.Body.Close()
25399		}
25400		return nil, &googleapi.Error{
25401			Code:   res.StatusCode,
25402			Header: res.Header,
25403		}
25404	}
25405	if err != nil {
25406		return nil, err
25407	}
25408	defer googleapi.CloseBody(res)
25409	if err := googleapi.CheckResponse(res); err != nil {
25410		return nil, err
25411	}
25412	ret := &GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse{
25413		ServerResponse: googleapi.ServerResponse{
25414			Header:         res.Header,
25415			HTTPStatusCode: res.StatusCode,
25416		},
25417	}
25418	target := &ret
25419	if err := gensupport.DecodeResponse(target, res); err != nil {
25420		return nil, err
25421	}
25422	return ret, nil
25423	// {
25424	//   "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.",
25425	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
25426	//   "httpMethod": "GET",
25427	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list",
25428	//   "parameterOrder": [
25429	//     "parent"
25430	//   ],
25431	//   "parameters": {
25432	//     "pageSize": {
25433	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
25434	//       "format": "int32",
25435	//       "location": "query",
25436	//       "type": "integer"
25437	//     },
25438	//     "pageToken": {
25439	//       "description": "Optional. The next_page_token value returned from a previous list request.",
25440	//       "location": "query",
25441	//       "type": "string"
25442	//     },
25443	//     "parent": {
25444	//       "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.",
25445	//       "location": "path",
25446	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
25447	//       "required": true,
25448	//       "type": "string"
25449	//     }
25450	//   },
25451	//   "path": "v2beta1/{+parent}/entityTypes",
25452	//   "response": {
25453	//     "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse"
25454	//   },
25455	//   "scopes": [
25456	//     "https://www.googleapis.com/auth/cloud-platform",
25457	//     "https://www.googleapis.com/auth/dialogflow"
25458	//   ]
25459	// }
25460
25461}
25462
25463// Pages invokes f for each page of results.
25464// A non-nil error returned from f will halt the iteration.
25465// The provided context supersedes any context provided to the Context method.
25466func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) error) error {
25467	c.ctx_ = ctx
25468	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25469	for {
25470		x, err := c.Do()
25471		if err != nil {
25472			return err
25473		}
25474		if err := f(x); err != nil {
25475			return err
25476		}
25477		if x.NextPageToken == "" {
25478			return nil
25479		}
25480		c.PageToken(x.NextPageToken)
25481	}
25482}
25483
25484// method id "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch":
25485
25486type ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall struct {
25487	s                                             *Service
25488	nameid                                        string
25489	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
25490	urlParams_                                    gensupport.URLParams
25491	ctx_                                          context.Context
25492	header_                                       http.Header
25493}
25494
25495// Patch: Updates the specified session entity type.
25496//
25497// This method doesn't work with Google Assistant integration.
25498// Contact Dialogflow support if you need to use session entities
25499// with Google Assistant integration.
25500func (r *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
25501	c := &ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25502	c.nameid = nameid
25503	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
25504	return c
25505}
25506
25507// UpdateMask sets the optional parameter "updateMask": The mask to
25508// control which fields get updated.
25509func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
25510	c.urlParams_.Set("updateMask", updateMask)
25511	return c
25512}
25513
25514// Fields allows partial responses to be retrieved. See
25515// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25516// for more information.
25517func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
25518	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25519	return c
25520}
25521
25522// Context sets the context to be used in this call's Do method. Any
25523// pending HTTP request will be aborted if the provided context is
25524// canceled.
25525func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
25526	c.ctx_ = ctx
25527	return c
25528}
25529
25530// Header returns an http.Header that can be modified by the caller to
25531// add HTTP headers to the request.
25532func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Header() http.Header {
25533	if c.header_ == nil {
25534		c.header_ = make(http.Header)
25535	}
25536	return c.header_
25537}
25538
25539func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
25540	reqHeaders := make(http.Header)
25541	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25542	for k, v := range c.header_ {
25543		reqHeaders[k] = v
25544	}
25545	reqHeaders.Set("User-Agent", c.s.userAgent())
25546	var body io.Reader = nil
25547	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
25548	if err != nil {
25549		return nil, err
25550	}
25551	reqHeaders.Set("Content-Type", "application/json")
25552	c.urlParams_.Set("alt", alt)
25553	c.urlParams_.Set("prettyPrint", "false")
25554	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
25555	urls += "?" + c.urlParams_.Encode()
25556	req, err := http.NewRequest("PATCH", urls, body)
25557	if err != nil {
25558		return nil, err
25559	}
25560	req.Header = reqHeaders
25561	googleapi.Expand(req.URL, map[string]string{
25562		"name": c.nameid,
25563	})
25564	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25565}
25566
25567// Do executes the "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch" call.
25568// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
25569// error will be non-nil. Any non-2xx status code is an error. Response
25570// headers are in either
25571// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
25572// or (if a response was returned at all) in
25573// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25574// whether the returned error was because http.StatusNotModified was
25575// returned.
25576func (c *ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
25577	gensupport.SetOptions(c.urlParams_, opts...)
25578	res, err := c.doRequest("json")
25579	if res != nil && res.StatusCode == http.StatusNotModified {
25580		if res.Body != nil {
25581			res.Body.Close()
25582		}
25583		return nil, &googleapi.Error{
25584			Code:   res.StatusCode,
25585			Header: res.Header,
25586		}
25587	}
25588	if err != nil {
25589		return nil, err
25590	}
25591	defer googleapi.CloseBody(res)
25592	if err := googleapi.CheckResponse(res); err != nil {
25593		return nil, err
25594	}
25595	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
25596		ServerResponse: googleapi.ServerResponse{
25597			Header:         res.Header,
25598			HTTPStatusCode: res.StatusCode,
25599		},
25600	}
25601	target := &ret
25602	if err := gensupport.DecodeResponse(target, res); err != nil {
25603		return nil, err
25604	}
25605	return ret, nil
25606	// {
25607	//   "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.",
25608	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
25609	//   "httpMethod": "PATCH",
25610	//   "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch",
25611	//   "parameterOrder": [
25612	//     "name"
25613	//   ],
25614	//   "parameters": {
25615	//     "name": {
25616	//       "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.",
25617	//       "location": "path",
25618	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
25619	//       "required": true,
25620	//       "type": "string"
25621	//     },
25622	//     "updateMask": {
25623	//       "description": "Optional. The mask to control which fields get updated.",
25624	//       "format": "google-fieldmask",
25625	//       "location": "query",
25626	//       "type": "string"
25627	//     }
25628	//   },
25629	//   "path": "v2beta1/{+name}",
25630	//   "request": {
25631	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
25632	//   },
25633	//   "response": {
25634	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
25635	//   },
25636	//   "scopes": [
25637	//     "https://www.googleapis.com/auth/cloud-platform",
25638	//     "https://www.googleapis.com/auth/dialogflow"
25639	//   ]
25640	// }
25641
25642}
25643
25644// method id "dialogflow.projects.locations.agent.intents.batchDelete":
25645
25646type ProjectsLocationsAgentIntentsBatchDeleteCall struct {
25647	s                                                     *Service
25648	parent                                                string
25649	googleclouddialogflowv2beta1batchdeleteintentsrequest *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest
25650	urlParams_                                            gensupport.URLParams
25651	ctx_                                                  context.Context
25652	header_                                               http.Header
25653}
25654
25655// BatchDelete: Deletes intents in the specified agent.
25656//
25657// Operation <response: google.protobuf.Empty>
25658func (r *ProjectsLocationsAgentIntentsService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteintentsrequest *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest) *ProjectsLocationsAgentIntentsBatchDeleteCall {
25659	c := &ProjectsLocationsAgentIntentsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25660	c.parent = parent
25661	c.googleclouddialogflowv2beta1batchdeleteintentsrequest = googleclouddialogflowv2beta1batchdeleteintentsrequest
25662	return c
25663}
25664
25665// Fields allows partial responses to be retrieved. See
25666// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25667// for more information.
25668func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsBatchDeleteCall {
25669	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25670	return c
25671}
25672
25673// Context sets the context to be used in this call's Do method. Any
25674// pending HTTP request will be aborted if the provided context is
25675// canceled.
25676func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsBatchDeleteCall {
25677	c.ctx_ = ctx
25678	return c
25679}
25680
25681// Header returns an http.Header that can be modified by the caller to
25682// add HTTP headers to the request.
25683func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Header() http.Header {
25684	if c.header_ == nil {
25685		c.header_ = make(http.Header)
25686	}
25687	return c.header_
25688}
25689
25690func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
25691	reqHeaders := make(http.Header)
25692	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25693	for k, v := range c.header_ {
25694		reqHeaders[k] = v
25695	}
25696	reqHeaders.Set("User-Agent", c.s.userAgent())
25697	var body io.Reader = nil
25698	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteintentsrequest)
25699	if err != nil {
25700		return nil, err
25701	}
25702	reqHeaders.Set("Content-Type", "application/json")
25703	c.urlParams_.Set("alt", alt)
25704	c.urlParams_.Set("prettyPrint", "false")
25705	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents:batchDelete")
25706	urls += "?" + c.urlParams_.Encode()
25707	req, err := http.NewRequest("POST", urls, body)
25708	if err != nil {
25709		return nil, err
25710	}
25711	req.Header = reqHeaders
25712	googleapi.Expand(req.URL, map[string]string{
25713		"parent": c.parent,
25714	})
25715	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25716}
25717
25718// Do executes the "dialogflow.projects.locations.agent.intents.batchDelete" call.
25719// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
25720// Any non-2xx status code is an error. Response headers are in either
25721// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
25722// was returned at all) in error.(*googleapi.Error).Header. Use
25723// googleapi.IsNotModified to check whether the returned error was
25724// because http.StatusNotModified was returned.
25725func (c *ProjectsLocationsAgentIntentsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
25726	gensupport.SetOptions(c.urlParams_, opts...)
25727	res, err := c.doRequest("json")
25728	if res != nil && res.StatusCode == http.StatusNotModified {
25729		if res.Body != nil {
25730			res.Body.Close()
25731		}
25732		return nil, &googleapi.Error{
25733			Code:   res.StatusCode,
25734			Header: res.Header,
25735		}
25736	}
25737	if err != nil {
25738		return nil, err
25739	}
25740	defer googleapi.CloseBody(res)
25741	if err := googleapi.CheckResponse(res); err != nil {
25742		return nil, err
25743	}
25744	ret := &GoogleLongrunningOperation{
25745		ServerResponse: googleapi.ServerResponse{
25746			Header:         res.Header,
25747			HTTPStatusCode: res.StatusCode,
25748		},
25749	}
25750	target := &ret
25751	if err := gensupport.DecodeResponse(target, res); err != nil {
25752		return nil, err
25753	}
25754	return ret, nil
25755	// {
25756	//   "description": "Deletes intents in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
25757	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents:batchDelete",
25758	//   "httpMethod": "POST",
25759	//   "id": "dialogflow.projects.locations.agent.intents.batchDelete",
25760	//   "parameterOrder": [
25761	//     "parent"
25762	//   ],
25763	//   "parameters": {
25764	//     "parent": {
25765	//       "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.",
25766	//       "location": "path",
25767	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
25768	//       "required": true,
25769	//       "type": "string"
25770	//     }
25771	//   },
25772	//   "path": "v2beta1/{+parent}/intents:batchDelete",
25773	//   "request": {
25774	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest"
25775	//   },
25776	//   "response": {
25777	//     "$ref": "GoogleLongrunningOperation"
25778	//   },
25779	//   "scopes": [
25780	//     "https://www.googleapis.com/auth/cloud-platform",
25781	//     "https://www.googleapis.com/auth/dialogflow"
25782	//   ]
25783	// }
25784
25785}
25786
25787// method id "dialogflow.projects.locations.agent.intents.batchUpdate":
25788
25789type ProjectsLocationsAgentIntentsBatchUpdateCall struct {
25790	s                                                     *Service
25791	parent                                                string
25792	googleclouddialogflowv2beta1batchupdateintentsrequest *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest
25793	urlParams_                                            gensupport.URLParams
25794	ctx_                                                  context.Context
25795	header_                                               http.Header
25796}
25797
25798// BatchUpdate: Updates/Creates multiple intents in the specified
25799// agent.
25800//
25801// Operation <response: BatchUpdateIntentsResponse>
25802func (r *ProjectsLocationsAgentIntentsService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateintentsrequest *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest) *ProjectsLocationsAgentIntentsBatchUpdateCall {
25803	c := &ProjectsLocationsAgentIntentsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25804	c.parent = parent
25805	c.googleclouddialogflowv2beta1batchupdateintentsrequest = googleclouddialogflowv2beta1batchupdateintentsrequest
25806	return c
25807}
25808
25809// Fields allows partial responses to be retrieved. See
25810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25811// for more information.
25812func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsBatchUpdateCall {
25813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25814	return c
25815}
25816
25817// Context sets the context to be used in this call's Do method. Any
25818// pending HTTP request will be aborted if the provided context is
25819// canceled.
25820func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsBatchUpdateCall {
25821	c.ctx_ = ctx
25822	return c
25823}
25824
25825// Header returns an http.Header that can be modified by the caller to
25826// add HTTP headers to the request.
25827func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Header() http.Header {
25828	if c.header_ == nil {
25829		c.header_ = make(http.Header)
25830	}
25831	return c.header_
25832}
25833
25834func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
25835	reqHeaders := make(http.Header)
25836	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
25837	for k, v := range c.header_ {
25838		reqHeaders[k] = v
25839	}
25840	reqHeaders.Set("User-Agent", c.s.userAgent())
25841	var body io.Reader = nil
25842	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateintentsrequest)
25843	if err != nil {
25844		return nil, err
25845	}
25846	reqHeaders.Set("Content-Type", "application/json")
25847	c.urlParams_.Set("alt", alt)
25848	c.urlParams_.Set("prettyPrint", "false")
25849	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents:batchUpdate")
25850	urls += "?" + c.urlParams_.Encode()
25851	req, err := http.NewRequest("POST", urls, body)
25852	if err != nil {
25853		return nil, err
25854	}
25855	req.Header = reqHeaders
25856	googleapi.Expand(req.URL, map[string]string{
25857		"parent": c.parent,
25858	})
25859	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25860}
25861
25862// Do executes the "dialogflow.projects.locations.agent.intents.batchUpdate" call.
25863// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
25864// Any non-2xx status code is an error. Response headers are in either
25865// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
25866// was returned at all) in error.(*googleapi.Error).Header. Use
25867// googleapi.IsNotModified to check whether the returned error was
25868// because http.StatusNotModified was returned.
25869func (c *ProjectsLocationsAgentIntentsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
25870	gensupport.SetOptions(c.urlParams_, opts...)
25871	res, err := c.doRequest("json")
25872	if res != nil && res.StatusCode == http.StatusNotModified {
25873		if res.Body != nil {
25874			res.Body.Close()
25875		}
25876		return nil, &googleapi.Error{
25877			Code:   res.StatusCode,
25878			Header: res.Header,
25879		}
25880	}
25881	if err != nil {
25882		return nil, err
25883	}
25884	defer googleapi.CloseBody(res)
25885	if err := googleapi.CheckResponse(res); err != nil {
25886		return nil, err
25887	}
25888	ret := &GoogleLongrunningOperation{
25889		ServerResponse: googleapi.ServerResponse{
25890			Header:         res.Header,
25891			HTTPStatusCode: res.StatusCode,
25892		},
25893	}
25894	target := &ret
25895	if err := gensupport.DecodeResponse(target, res); err != nil {
25896		return nil, err
25897	}
25898	return ret, nil
25899	// {
25900	//   "description": "Updates/Creates multiple intents in the specified agent.\n\nOperation \u003cresponse: BatchUpdateIntentsResponse\u003e",
25901	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents:batchUpdate",
25902	//   "httpMethod": "POST",
25903	//   "id": "dialogflow.projects.locations.agent.intents.batchUpdate",
25904	//   "parameterOrder": [
25905	//     "parent"
25906	//   ],
25907	//   "parameters": {
25908	//     "parent": {
25909	//       "description": "Required. The name of the agent to update or create intents in.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
25910	//       "location": "path",
25911	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
25912	//       "required": true,
25913	//       "type": "string"
25914	//     }
25915	//   },
25916	//   "path": "v2beta1/{+parent}/intents:batchUpdate",
25917	//   "request": {
25918	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest"
25919	//   },
25920	//   "response": {
25921	//     "$ref": "GoogleLongrunningOperation"
25922	//   },
25923	//   "scopes": [
25924	//     "https://www.googleapis.com/auth/cloud-platform",
25925	//     "https://www.googleapis.com/auth/dialogflow"
25926	//   ]
25927	// }
25928
25929}
25930
25931// method id "dialogflow.projects.locations.agent.intents.create":
25932
25933type ProjectsLocationsAgentIntentsCreateCall struct {
25934	s                                  *Service
25935	parent                             string
25936	googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent
25937	urlParams_                         gensupport.URLParams
25938	ctx_                               context.Context
25939	header_                            http.Header
25940}
25941
25942// Create: Creates an intent in the specified agent.
25943func (r *ProjectsLocationsAgentIntentsService) Create(parent string, googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent) *ProjectsLocationsAgentIntentsCreateCall {
25944	c := &ProjectsLocationsAgentIntentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25945	c.parent = parent
25946	c.googleclouddialogflowv2beta1intent = googleclouddialogflowv2beta1intent
25947	return c
25948}
25949
25950// IntentView sets the optional parameter "intentView": The resource
25951// view to apply to the returned intent.
25952//
25953// Possible values:
25954//   "INTENT_VIEW_UNSPECIFIED"
25955//   "INTENT_VIEW_FULL"
25956func (c *ProjectsLocationsAgentIntentsCreateCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsCreateCall {
25957	c.urlParams_.Set("intentView", intentView)
25958	return c
25959}
25960
25961// LanguageCode sets the optional parameter "languageCode": The language
25962// of training phrases, parameters and rich messages
25963// defined in `intent`. If not specified, the agent's default language
25964// is
25965// used.
25966// [Many
25967// languages](https://cloud.google.com/dialogflow/docs/reference/la
25968// nguage)
25969// are supported. Note: languages must be enabled in the agent before
25970// they can
25971// be used.
25972func (c *ProjectsLocationsAgentIntentsCreateCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsCreateCall {
25973	c.urlParams_.Set("languageCode", languageCode)
25974	return c
25975}
25976
25977// Fields allows partial responses to be retrieved. See
25978// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25979// for more information.
25980func (c *ProjectsLocationsAgentIntentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsCreateCall {
25981	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25982	return c
25983}
25984
25985// Context sets the context to be used in this call's Do method. Any
25986// pending HTTP request will be aborted if the provided context is
25987// canceled.
25988func (c *ProjectsLocationsAgentIntentsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsCreateCall {
25989	c.ctx_ = ctx
25990	return c
25991}
25992
25993// Header returns an http.Header that can be modified by the caller to
25994// add HTTP headers to the request.
25995func (c *ProjectsLocationsAgentIntentsCreateCall) Header() http.Header {
25996	if c.header_ == nil {
25997		c.header_ = make(http.Header)
25998	}
25999	return c.header_
26000}
26001
26002func (c *ProjectsLocationsAgentIntentsCreateCall) doRequest(alt string) (*http.Response, error) {
26003	reqHeaders := make(http.Header)
26004	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26005	for k, v := range c.header_ {
26006		reqHeaders[k] = v
26007	}
26008	reqHeaders.Set("User-Agent", c.s.userAgent())
26009	var body io.Reader = nil
26010	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1intent)
26011	if err != nil {
26012		return nil, err
26013	}
26014	reqHeaders.Set("Content-Type", "application/json")
26015	c.urlParams_.Set("alt", alt)
26016	c.urlParams_.Set("prettyPrint", "false")
26017	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents")
26018	urls += "?" + c.urlParams_.Encode()
26019	req, err := http.NewRequest("POST", urls, body)
26020	if err != nil {
26021		return nil, err
26022	}
26023	req.Header = reqHeaders
26024	googleapi.Expand(req.URL, map[string]string{
26025		"parent": c.parent,
26026	})
26027	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26028}
26029
26030// Do executes the "dialogflow.projects.locations.agent.intents.create" call.
26031// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
26032// non-nil. Any non-2xx status code is an error. Response headers are in
26033// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
26034// (if a response was returned at all) in
26035// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26036// whether the returned error was because http.StatusNotModified was
26037// returned.
26038func (c *ProjectsLocationsAgentIntentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
26039	gensupport.SetOptions(c.urlParams_, opts...)
26040	res, err := c.doRequest("json")
26041	if res != nil && res.StatusCode == http.StatusNotModified {
26042		if res.Body != nil {
26043			res.Body.Close()
26044		}
26045		return nil, &googleapi.Error{
26046			Code:   res.StatusCode,
26047			Header: res.Header,
26048		}
26049	}
26050	if err != nil {
26051		return nil, err
26052	}
26053	defer googleapi.CloseBody(res)
26054	if err := googleapi.CheckResponse(res); err != nil {
26055		return nil, err
26056	}
26057	ret := &GoogleCloudDialogflowV2beta1Intent{
26058		ServerResponse: googleapi.ServerResponse{
26059			Header:         res.Header,
26060			HTTPStatusCode: res.StatusCode,
26061		},
26062	}
26063	target := &ret
26064	if err := gensupport.DecodeResponse(target, res); err != nil {
26065		return nil, err
26066	}
26067	return ret, nil
26068	// {
26069	//   "description": "Creates an intent in the specified agent.",
26070	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents",
26071	//   "httpMethod": "POST",
26072	//   "id": "dialogflow.projects.locations.agent.intents.create",
26073	//   "parameterOrder": [
26074	//     "parent"
26075	//   ],
26076	//   "parameters": {
26077	//     "intentView": {
26078	//       "description": "Optional. The resource view to apply to the returned intent.",
26079	//       "enum": [
26080	//         "INTENT_VIEW_UNSPECIFIED",
26081	//         "INTENT_VIEW_FULL"
26082	//       ],
26083	//       "location": "query",
26084	//       "type": "string"
26085	//     },
26086	//     "languageCode": {
26087	//       "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.",
26088	//       "location": "query",
26089	//       "type": "string"
26090	//     },
26091	//     "parent": {
26092	//       "description": "Required. The agent to create a intent for.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
26093	//       "location": "path",
26094	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
26095	//       "required": true,
26096	//       "type": "string"
26097	//     }
26098	//   },
26099	//   "path": "v2beta1/{+parent}/intents",
26100	//   "request": {
26101	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
26102	//   },
26103	//   "response": {
26104	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
26105	//   },
26106	//   "scopes": [
26107	//     "https://www.googleapis.com/auth/cloud-platform",
26108	//     "https://www.googleapis.com/auth/dialogflow"
26109	//   ]
26110	// }
26111
26112}
26113
26114// method id "dialogflow.projects.locations.agent.intents.delete":
26115
26116type ProjectsLocationsAgentIntentsDeleteCall struct {
26117	s          *Service
26118	name       string
26119	urlParams_ gensupport.URLParams
26120	ctx_       context.Context
26121	header_    http.Header
26122}
26123
26124// Delete: Deletes the specified intent and its direct or indirect
26125// followup intents.
26126func (r *ProjectsLocationsAgentIntentsService) Delete(name string) *ProjectsLocationsAgentIntentsDeleteCall {
26127	c := &ProjectsLocationsAgentIntentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26128	c.name = name
26129	return c
26130}
26131
26132// Fields allows partial responses to be retrieved. See
26133// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26134// for more information.
26135func (c *ProjectsLocationsAgentIntentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsDeleteCall {
26136	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26137	return c
26138}
26139
26140// Context sets the context to be used in this call's Do method. Any
26141// pending HTTP request will be aborted if the provided context is
26142// canceled.
26143func (c *ProjectsLocationsAgentIntentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsDeleteCall {
26144	c.ctx_ = ctx
26145	return c
26146}
26147
26148// Header returns an http.Header that can be modified by the caller to
26149// add HTTP headers to the request.
26150func (c *ProjectsLocationsAgentIntentsDeleteCall) Header() http.Header {
26151	if c.header_ == nil {
26152		c.header_ = make(http.Header)
26153	}
26154	return c.header_
26155}
26156
26157func (c *ProjectsLocationsAgentIntentsDeleteCall) doRequest(alt string) (*http.Response, error) {
26158	reqHeaders := make(http.Header)
26159	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26160	for k, v := range c.header_ {
26161		reqHeaders[k] = v
26162	}
26163	reqHeaders.Set("User-Agent", c.s.userAgent())
26164	var body io.Reader = nil
26165	c.urlParams_.Set("alt", alt)
26166	c.urlParams_.Set("prettyPrint", "false")
26167	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
26168	urls += "?" + c.urlParams_.Encode()
26169	req, err := http.NewRequest("DELETE", urls, body)
26170	if err != nil {
26171		return nil, err
26172	}
26173	req.Header = reqHeaders
26174	googleapi.Expand(req.URL, map[string]string{
26175		"name": c.name,
26176	})
26177	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26178}
26179
26180// Do executes the "dialogflow.projects.locations.agent.intents.delete" call.
26181// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
26182// non-2xx status code is an error. Response headers are in either
26183// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
26184// returned at all) in error.(*googleapi.Error).Header. Use
26185// googleapi.IsNotModified to check whether the returned error was
26186// because http.StatusNotModified was returned.
26187func (c *ProjectsLocationsAgentIntentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
26188	gensupport.SetOptions(c.urlParams_, opts...)
26189	res, err := c.doRequest("json")
26190	if res != nil && res.StatusCode == http.StatusNotModified {
26191		if res.Body != nil {
26192			res.Body.Close()
26193		}
26194		return nil, &googleapi.Error{
26195			Code:   res.StatusCode,
26196			Header: res.Header,
26197		}
26198	}
26199	if err != nil {
26200		return nil, err
26201	}
26202	defer googleapi.CloseBody(res)
26203	if err := googleapi.CheckResponse(res); err != nil {
26204		return nil, err
26205	}
26206	ret := &GoogleProtobufEmpty{
26207		ServerResponse: googleapi.ServerResponse{
26208			Header:         res.Header,
26209			HTTPStatusCode: res.StatusCode,
26210		},
26211	}
26212	target := &ret
26213	if err := gensupport.DecodeResponse(target, res); err != nil {
26214		return nil, err
26215	}
26216	return ret, nil
26217	// {
26218	//   "description": "Deletes the specified intent and its direct or indirect followup intents.",
26219	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}",
26220	//   "httpMethod": "DELETE",
26221	//   "id": "dialogflow.projects.locations.agent.intents.delete",
26222	//   "parameterOrder": [
26223	//     "name"
26224	//   ],
26225	//   "parameters": {
26226	//     "name": {
26227	//       "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`.",
26228	//       "location": "path",
26229	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$",
26230	//       "required": true,
26231	//       "type": "string"
26232	//     }
26233	//   },
26234	//   "path": "v2beta1/{+name}",
26235	//   "response": {
26236	//     "$ref": "GoogleProtobufEmpty"
26237	//   },
26238	//   "scopes": [
26239	//     "https://www.googleapis.com/auth/cloud-platform",
26240	//     "https://www.googleapis.com/auth/dialogflow"
26241	//   ]
26242	// }
26243
26244}
26245
26246// method id "dialogflow.projects.locations.agent.intents.get":
26247
26248type ProjectsLocationsAgentIntentsGetCall struct {
26249	s            *Service
26250	name         string
26251	urlParams_   gensupport.URLParams
26252	ifNoneMatch_ string
26253	ctx_         context.Context
26254	header_      http.Header
26255}
26256
26257// Get: Retrieves the specified intent.
26258func (r *ProjectsLocationsAgentIntentsService) Get(name string) *ProjectsLocationsAgentIntentsGetCall {
26259	c := &ProjectsLocationsAgentIntentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26260	c.name = name
26261	return c
26262}
26263
26264// IntentView sets the optional parameter "intentView": The resource
26265// view to apply to the returned intent.
26266//
26267// Possible values:
26268//   "INTENT_VIEW_UNSPECIFIED"
26269//   "INTENT_VIEW_FULL"
26270func (c *ProjectsLocationsAgentIntentsGetCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsGetCall {
26271	c.urlParams_.Set("intentView", intentView)
26272	return c
26273}
26274
26275// LanguageCode sets the optional parameter "languageCode": The language
26276// to retrieve training phrases, parameters and rich
26277// messages for. If not specified, the agent's default language is
26278// used.
26279// [Many
26280// languages](https://cloud.google.com/dialogflow/docs/refere
26281// nce/language)
26282// are supported. Note: languages must be enabled in the agent before
26283// they can
26284// be used.
26285func (c *ProjectsLocationsAgentIntentsGetCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsGetCall {
26286	c.urlParams_.Set("languageCode", languageCode)
26287	return c
26288}
26289
26290// Fields allows partial responses to be retrieved. See
26291// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26292// for more information.
26293func (c *ProjectsLocationsAgentIntentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsGetCall {
26294	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26295	return c
26296}
26297
26298// IfNoneMatch sets the optional parameter which makes the operation
26299// fail if the object's ETag matches the given value. This is useful for
26300// getting updates only after the object has changed since the last
26301// request. Use googleapi.IsNotModified to check whether the response
26302// error from Do is the result of In-None-Match.
26303func (c *ProjectsLocationsAgentIntentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentIntentsGetCall {
26304	c.ifNoneMatch_ = entityTag
26305	return c
26306}
26307
26308// Context sets the context to be used in this call's Do method. Any
26309// pending HTTP request will be aborted if the provided context is
26310// canceled.
26311func (c *ProjectsLocationsAgentIntentsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsGetCall {
26312	c.ctx_ = ctx
26313	return c
26314}
26315
26316// Header returns an http.Header that can be modified by the caller to
26317// add HTTP headers to the request.
26318func (c *ProjectsLocationsAgentIntentsGetCall) Header() http.Header {
26319	if c.header_ == nil {
26320		c.header_ = make(http.Header)
26321	}
26322	return c.header_
26323}
26324
26325func (c *ProjectsLocationsAgentIntentsGetCall) doRequest(alt string) (*http.Response, error) {
26326	reqHeaders := make(http.Header)
26327	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26328	for k, v := range c.header_ {
26329		reqHeaders[k] = v
26330	}
26331	reqHeaders.Set("User-Agent", c.s.userAgent())
26332	if c.ifNoneMatch_ != "" {
26333		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26334	}
26335	var body io.Reader = nil
26336	c.urlParams_.Set("alt", alt)
26337	c.urlParams_.Set("prettyPrint", "false")
26338	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
26339	urls += "?" + c.urlParams_.Encode()
26340	req, err := http.NewRequest("GET", urls, body)
26341	if err != nil {
26342		return nil, err
26343	}
26344	req.Header = reqHeaders
26345	googleapi.Expand(req.URL, map[string]string{
26346		"name": c.name,
26347	})
26348	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26349}
26350
26351// Do executes the "dialogflow.projects.locations.agent.intents.get" call.
26352// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
26353// non-nil. Any non-2xx status code is an error. Response headers are in
26354// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
26355// (if a response was returned at all) in
26356// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26357// whether the returned error was because http.StatusNotModified was
26358// returned.
26359func (c *ProjectsLocationsAgentIntentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
26360	gensupport.SetOptions(c.urlParams_, opts...)
26361	res, err := c.doRequest("json")
26362	if res != nil && res.StatusCode == http.StatusNotModified {
26363		if res.Body != nil {
26364			res.Body.Close()
26365		}
26366		return nil, &googleapi.Error{
26367			Code:   res.StatusCode,
26368			Header: res.Header,
26369		}
26370	}
26371	if err != nil {
26372		return nil, err
26373	}
26374	defer googleapi.CloseBody(res)
26375	if err := googleapi.CheckResponse(res); err != nil {
26376		return nil, err
26377	}
26378	ret := &GoogleCloudDialogflowV2beta1Intent{
26379		ServerResponse: googleapi.ServerResponse{
26380			Header:         res.Header,
26381			HTTPStatusCode: res.StatusCode,
26382		},
26383	}
26384	target := &ret
26385	if err := gensupport.DecodeResponse(target, res); err != nil {
26386		return nil, err
26387	}
26388	return ret, nil
26389	// {
26390	//   "description": "Retrieves the specified intent.",
26391	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}",
26392	//   "httpMethod": "GET",
26393	//   "id": "dialogflow.projects.locations.agent.intents.get",
26394	//   "parameterOrder": [
26395	//     "name"
26396	//   ],
26397	//   "parameters": {
26398	//     "intentView": {
26399	//       "description": "Optional. The resource view to apply to the returned intent.",
26400	//       "enum": [
26401	//         "INTENT_VIEW_UNSPECIFIED",
26402	//         "INTENT_VIEW_FULL"
26403	//       ],
26404	//       "location": "query",
26405	//       "type": "string"
26406	//     },
26407	//     "languageCode": {
26408	//       "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.",
26409	//       "location": "query",
26410	//       "type": "string"
26411	//     },
26412	//     "name": {
26413	//       "description": "Required. The name of the intent.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.",
26414	//       "location": "path",
26415	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$",
26416	//       "required": true,
26417	//       "type": "string"
26418	//     }
26419	//   },
26420	//   "path": "v2beta1/{+name}",
26421	//   "response": {
26422	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
26423	//   },
26424	//   "scopes": [
26425	//     "https://www.googleapis.com/auth/cloud-platform",
26426	//     "https://www.googleapis.com/auth/dialogflow"
26427	//   ]
26428	// }
26429
26430}
26431
26432// method id "dialogflow.projects.locations.agent.intents.list":
26433
26434type ProjectsLocationsAgentIntentsListCall struct {
26435	s            *Service
26436	parent       string
26437	urlParams_   gensupport.URLParams
26438	ifNoneMatch_ string
26439	ctx_         context.Context
26440	header_      http.Header
26441}
26442
26443// List: Returns the list of all intents in the specified agent.
26444func (r *ProjectsLocationsAgentIntentsService) List(parent string) *ProjectsLocationsAgentIntentsListCall {
26445	c := &ProjectsLocationsAgentIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26446	c.parent = parent
26447	return c
26448}
26449
26450// IntentView sets the optional parameter "intentView": The resource
26451// view to apply to the returned intent.
26452//
26453// Possible values:
26454//   "INTENT_VIEW_UNSPECIFIED"
26455//   "INTENT_VIEW_FULL"
26456func (c *ProjectsLocationsAgentIntentsListCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsListCall {
26457	c.urlParams_.Set("intentView", intentView)
26458	return c
26459}
26460
26461// LanguageCode sets the optional parameter "languageCode": The language
26462// to list training phrases, parameters and rich
26463// messages for. If not specified, the agent's default language is
26464// used.
26465// [Many
26466// languages](https://cloud.google.com/dialogflow/docs/refere
26467// nce/language)
26468// are supported. Note: languages must be enabled in the agent before
26469// they can
26470// be used.
26471func (c *ProjectsLocationsAgentIntentsListCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsListCall {
26472	c.urlParams_.Set("languageCode", languageCode)
26473	return c
26474}
26475
26476// PageSize sets the optional parameter "pageSize": The maximum number
26477// of items to return in a single page. By
26478// default 100 and at most 1000.
26479func (c *ProjectsLocationsAgentIntentsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentIntentsListCall {
26480	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26481	return c
26482}
26483
26484// PageToken sets the optional parameter "pageToken": The
26485// next_page_token value returned from a previous list request.
26486func (c *ProjectsLocationsAgentIntentsListCall) PageToken(pageToken string) *ProjectsLocationsAgentIntentsListCall {
26487	c.urlParams_.Set("pageToken", pageToken)
26488	return c
26489}
26490
26491// Fields allows partial responses to be retrieved. See
26492// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26493// for more information.
26494func (c *ProjectsLocationsAgentIntentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsListCall {
26495	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26496	return c
26497}
26498
26499// IfNoneMatch sets the optional parameter which makes the operation
26500// fail if the object's ETag matches the given value. This is useful for
26501// getting updates only after the object has changed since the last
26502// request. Use googleapi.IsNotModified to check whether the response
26503// error from Do is the result of In-None-Match.
26504func (c *ProjectsLocationsAgentIntentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentIntentsListCall {
26505	c.ifNoneMatch_ = entityTag
26506	return c
26507}
26508
26509// Context sets the context to be used in this call's Do method. Any
26510// pending HTTP request will be aborted if the provided context is
26511// canceled.
26512func (c *ProjectsLocationsAgentIntentsListCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsListCall {
26513	c.ctx_ = ctx
26514	return c
26515}
26516
26517// Header returns an http.Header that can be modified by the caller to
26518// add HTTP headers to the request.
26519func (c *ProjectsLocationsAgentIntentsListCall) Header() http.Header {
26520	if c.header_ == nil {
26521		c.header_ = make(http.Header)
26522	}
26523	return c.header_
26524}
26525
26526func (c *ProjectsLocationsAgentIntentsListCall) doRequest(alt string) (*http.Response, error) {
26527	reqHeaders := make(http.Header)
26528	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26529	for k, v := range c.header_ {
26530		reqHeaders[k] = v
26531	}
26532	reqHeaders.Set("User-Agent", c.s.userAgent())
26533	if c.ifNoneMatch_ != "" {
26534		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26535	}
26536	var body io.Reader = nil
26537	c.urlParams_.Set("alt", alt)
26538	c.urlParams_.Set("prettyPrint", "false")
26539	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents")
26540	urls += "?" + c.urlParams_.Encode()
26541	req, err := http.NewRequest("GET", urls, body)
26542	if err != nil {
26543		return nil, err
26544	}
26545	req.Header = reqHeaders
26546	googleapi.Expand(req.URL, map[string]string{
26547		"parent": c.parent,
26548	})
26549	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26550}
26551
26552// Do executes the "dialogflow.projects.locations.agent.intents.list" call.
26553// Exactly one of *GoogleCloudDialogflowV2beta1ListIntentsResponse or
26554// error will be non-nil. Any non-2xx status code is an error. Response
26555// headers are in either
26556// *GoogleCloudDialogflowV2beta1ListIntentsResponse.ServerResponse.Header
26557//  or (if a response was returned at all) in
26558// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26559// whether the returned error was because http.StatusNotModified was
26560// returned.
26561func (c *ProjectsLocationsAgentIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListIntentsResponse, error) {
26562	gensupport.SetOptions(c.urlParams_, opts...)
26563	res, err := c.doRequest("json")
26564	if res != nil && res.StatusCode == http.StatusNotModified {
26565		if res.Body != nil {
26566			res.Body.Close()
26567		}
26568		return nil, &googleapi.Error{
26569			Code:   res.StatusCode,
26570			Header: res.Header,
26571		}
26572	}
26573	if err != nil {
26574		return nil, err
26575	}
26576	defer googleapi.CloseBody(res)
26577	if err := googleapi.CheckResponse(res); err != nil {
26578		return nil, err
26579	}
26580	ret := &GoogleCloudDialogflowV2beta1ListIntentsResponse{
26581		ServerResponse: googleapi.ServerResponse{
26582			Header:         res.Header,
26583			HTTPStatusCode: res.StatusCode,
26584		},
26585	}
26586	target := &ret
26587	if err := gensupport.DecodeResponse(target, res); err != nil {
26588		return nil, err
26589	}
26590	return ret, nil
26591	// {
26592	//   "description": "Returns the list of all intents in the specified agent.",
26593	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents",
26594	//   "httpMethod": "GET",
26595	//   "id": "dialogflow.projects.locations.agent.intents.list",
26596	//   "parameterOrder": [
26597	//     "parent"
26598	//   ],
26599	//   "parameters": {
26600	//     "intentView": {
26601	//       "description": "Optional. The resource view to apply to the returned intent.",
26602	//       "enum": [
26603	//         "INTENT_VIEW_UNSPECIFIED",
26604	//         "INTENT_VIEW_FULL"
26605	//       ],
26606	//       "location": "query",
26607	//       "type": "string"
26608	//     },
26609	//     "languageCode": {
26610	//       "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.",
26611	//       "location": "query",
26612	//       "type": "string"
26613	//     },
26614	//     "pageSize": {
26615	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
26616	//       "format": "int32",
26617	//       "location": "query",
26618	//       "type": "integer"
26619	//     },
26620	//     "pageToken": {
26621	//       "description": "Optional. The next_page_token value returned from a previous list request.",
26622	//       "location": "query",
26623	//       "type": "string"
26624	//     },
26625	//     "parent": {
26626	//       "description": "Required. The agent to list all intents from.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
26627	//       "location": "path",
26628	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent$",
26629	//       "required": true,
26630	//       "type": "string"
26631	//     }
26632	//   },
26633	//   "path": "v2beta1/{+parent}/intents",
26634	//   "response": {
26635	//     "$ref": "GoogleCloudDialogflowV2beta1ListIntentsResponse"
26636	//   },
26637	//   "scopes": [
26638	//     "https://www.googleapis.com/auth/cloud-platform",
26639	//     "https://www.googleapis.com/auth/dialogflow"
26640	//   ]
26641	// }
26642
26643}
26644
26645// Pages invokes f for each page of results.
26646// A non-nil error returned from f will halt the iteration.
26647// The provided context supersedes any context provided to the Context method.
26648func (c *ProjectsLocationsAgentIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListIntentsResponse) error) error {
26649	c.ctx_ = ctx
26650	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26651	for {
26652		x, err := c.Do()
26653		if err != nil {
26654			return err
26655		}
26656		if err := f(x); err != nil {
26657			return err
26658		}
26659		if x.NextPageToken == "" {
26660			return nil
26661		}
26662		c.PageToken(x.NextPageToken)
26663	}
26664}
26665
26666// method id "dialogflow.projects.locations.agent.intents.patch":
26667
26668type ProjectsLocationsAgentIntentsPatchCall struct {
26669	s                                  *Service
26670	nameid                             string
26671	googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent
26672	urlParams_                         gensupport.URLParams
26673	ctx_                               context.Context
26674	header_                            http.Header
26675}
26676
26677// Patch: Updates the specified intent.
26678func (r *ProjectsLocationsAgentIntentsService) Patch(nameid string, googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent) *ProjectsLocationsAgentIntentsPatchCall {
26679	c := &ProjectsLocationsAgentIntentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26680	c.nameid = nameid
26681	c.googleclouddialogflowv2beta1intent = googleclouddialogflowv2beta1intent
26682	return c
26683}
26684
26685// IntentView sets the optional parameter "intentView": The resource
26686// view to apply to the returned intent.
26687//
26688// Possible values:
26689//   "INTENT_VIEW_UNSPECIFIED"
26690//   "INTENT_VIEW_FULL"
26691func (c *ProjectsLocationsAgentIntentsPatchCall) IntentView(intentView string) *ProjectsLocationsAgentIntentsPatchCall {
26692	c.urlParams_.Set("intentView", intentView)
26693	return c
26694}
26695
26696// LanguageCode sets the optional parameter "languageCode": The language
26697// of training phrases, parameters and rich messages
26698// defined in `intent`. If not specified, the agent's default language
26699// is
26700// used.
26701// [Many
26702// languages](https://cloud.google.com/dialogflow/docs/reference/la
26703// nguage)
26704// are supported. Note: languages must be enabled in the agent before
26705// they can
26706// be used.
26707func (c *ProjectsLocationsAgentIntentsPatchCall) LanguageCode(languageCode string) *ProjectsLocationsAgentIntentsPatchCall {
26708	c.urlParams_.Set("languageCode", languageCode)
26709	return c
26710}
26711
26712// UpdateMask sets the optional parameter "updateMask": The mask to
26713// control which fields get updated.
26714func (c *ProjectsLocationsAgentIntentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentIntentsPatchCall {
26715	c.urlParams_.Set("updateMask", updateMask)
26716	return c
26717}
26718
26719// Fields allows partial responses to be retrieved. See
26720// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26721// for more information.
26722func (c *ProjectsLocationsAgentIntentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentIntentsPatchCall {
26723	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26724	return c
26725}
26726
26727// Context sets the context to be used in this call's Do method. Any
26728// pending HTTP request will be aborted if the provided context is
26729// canceled.
26730func (c *ProjectsLocationsAgentIntentsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentIntentsPatchCall {
26731	c.ctx_ = ctx
26732	return c
26733}
26734
26735// Header returns an http.Header that can be modified by the caller to
26736// add HTTP headers to the request.
26737func (c *ProjectsLocationsAgentIntentsPatchCall) Header() http.Header {
26738	if c.header_ == nil {
26739		c.header_ = make(http.Header)
26740	}
26741	return c.header_
26742}
26743
26744func (c *ProjectsLocationsAgentIntentsPatchCall) doRequest(alt string) (*http.Response, error) {
26745	reqHeaders := make(http.Header)
26746	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26747	for k, v := range c.header_ {
26748		reqHeaders[k] = v
26749	}
26750	reqHeaders.Set("User-Agent", c.s.userAgent())
26751	var body io.Reader = nil
26752	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1intent)
26753	if err != nil {
26754		return nil, err
26755	}
26756	reqHeaders.Set("Content-Type", "application/json")
26757	c.urlParams_.Set("alt", alt)
26758	c.urlParams_.Set("prettyPrint", "false")
26759	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
26760	urls += "?" + c.urlParams_.Encode()
26761	req, err := http.NewRequest("PATCH", urls, body)
26762	if err != nil {
26763		return nil, err
26764	}
26765	req.Header = reqHeaders
26766	googleapi.Expand(req.URL, map[string]string{
26767		"name": c.nameid,
26768	})
26769	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26770}
26771
26772// Do executes the "dialogflow.projects.locations.agent.intents.patch" call.
26773// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
26774// non-nil. Any non-2xx status code is an error. Response headers are in
26775// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
26776// (if a response was returned at all) in
26777// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26778// whether the returned error was because http.StatusNotModified was
26779// returned.
26780func (c *ProjectsLocationsAgentIntentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
26781	gensupport.SetOptions(c.urlParams_, opts...)
26782	res, err := c.doRequest("json")
26783	if res != nil && res.StatusCode == http.StatusNotModified {
26784		if res.Body != nil {
26785			res.Body.Close()
26786		}
26787		return nil, &googleapi.Error{
26788			Code:   res.StatusCode,
26789			Header: res.Header,
26790		}
26791	}
26792	if err != nil {
26793		return nil, err
26794	}
26795	defer googleapi.CloseBody(res)
26796	if err := googleapi.CheckResponse(res); err != nil {
26797		return nil, err
26798	}
26799	ret := &GoogleCloudDialogflowV2beta1Intent{
26800		ServerResponse: googleapi.ServerResponse{
26801			Header:         res.Header,
26802			HTTPStatusCode: res.StatusCode,
26803		},
26804	}
26805	target := &ret
26806	if err := gensupport.DecodeResponse(target, res); err != nil {
26807		return nil, err
26808	}
26809	return ret, nil
26810	// {
26811	//   "description": "Updates the specified intent.",
26812	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}",
26813	//   "httpMethod": "PATCH",
26814	//   "id": "dialogflow.projects.locations.agent.intents.patch",
26815	//   "parameterOrder": [
26816	//     "name"
26817	//   ],
26818	//   "parameters": {
26819	//     "intentView": {
26820	//       "description": "Optional. The resource view to apply to the returned intent.",
26821	//       "enum": [
26822	//         "INTENT_VIEW_UNSPECIFIED",
26823	//         "INTENT_VIEW_FULL"
26824	//       ],
26825	//       "location": "query",
26826	//       "type": "string"
26827	//     },
26828	//     "languageCode": {
26829	//       "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.",
26830	//       "location": "query",
26831	//       "type": "string"
26832	//     },
26833	//     "name": {
26834	//       "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`.",
26835	//       "location": "path",
26836	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$",
26837	//       "required": true,
26838	//       "type": "string"
26839	//     },
26840	//     "updateMask": {
26841	//       "description": "Optional. The mask to control which fields get updated.",
26842	//       "format": "google-fieldmask",
26843	//       "location": "query",
26844	//       "type": "string"
26845	//     }
26846	//   },
26847	//   "path": "v2beta1/{+name}",
26848	//   "request": {
26849	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
26850	//   },
26851	//   "response": {
26852	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
26853	//   },
26854	//   "scopes": [
26855	//     "https://www.googleapis.com/auth/cloud-platform",
26856	//     "https://www.googleapis.com/auth/dialogflow"
26857	//   ]
26858	// }
26859
26860}
26861
26862// method id "dialogflow.projects.locations.agent.sessions.deleteContexts":
26863
26864type ProjectsLocationsAgentSessionsDeleteContextsCall struct {
26865	s          *Service
26866	parent     string
26867	urlParams_ gensupport.URLParams
26868	ctx_       context.Context
26869	header_    http.Header
26870}
26871
26872// DeleteContexts: Deletes all active contexts in the specified session.
26873func (r *ProjectsLocationsAgentSessionsService) DeleteContexts(parent string) *ProjectsLocationsAgentSessionsDeleteContextsCall {
26874	c := &ProjectsLocationsAgentSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26875	c.parent = parent
26876	return c
26877}
26878
26879// Fields allows partial responses to be retrieved. See
26880// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26881// for more information.
26882func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsDeleteContextsCall {
26883	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26884	return c
26885}
26886
26887// Context sets the context to be used in this call's Do method. Any
26888// pending HTTP request will be aborted if the provided context is
26889// canceled.
26890func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsDeleteContextsCall {
26891	c.ctx_ = ctx
26892	return c
26893}
26894
26895// Header returns an http.Header that can be modified by the caller to
26896// add HTTP headers to the request.
26897func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Header() http.Header {
26898	if c.header_ == nil {
26899		c.header_ = make(http.Header)
26900	}
26901	return c.header_
26902}
26903
26904func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
26905	reqHeaders := make(http.Header)
26906	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
26907	for k, v := range c.header_ {
26908		reqHeaders[k] = v
26909	}
26910	reqHeaders.Set("User-Agent", c.s.userAgent())
26911	var body io.Reader = nil
26912	c.urlParams_.Set("alt", alt)
26913	c.urlParams_.Set("prettyPrint", "false")
26914	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
26915	urls += "?" + c.urlParams_.Encode()
26916	req, err := http.NewRequest("DELETE", urls, body)
26917	if err != nil {
26918		return nil, err
26919	}
26920	req.Header = reqHeaders
26921	googleapi.Expand(req.URL, map[string]string{
26922		"parent": c.parent,
26923	})
26924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26925}
26926
26927// Do executes the "dialogflow.projects.locations.agent.sessions.deleteContexts" call.
26928// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
26929// non-2xx status code is an error. Response headers are in either
26930// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
26931// returned at all) in error.(*googleapi.Error).Header. Use
26932// googleapi.IsNotModified to check whether the returned error was
26933// because http.StatusNotModified was returned.
26934func (c *ProjectsLocationsAgentSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
26935	gensupport.SetOptions(c.urlParams_, opts...)
26936	res, err := c.doRequest("json")
26937	if res != nil && res.StatusCode == http.StatusNotModified {
26938		if res.Body != nil {
26939			res.Body.Close()
26940		}
26941		return nil, &googleapi.Error{
26942			Code:   res.StatusCode,
26943			Header: res.Header,
26944		}
26945	}
26946	if err != nil {
26947		return nil, err
26948	}
26949	defer googleapi.CloseBody(res)
26950	if err := googleapi.CheckResponse(res); err != nil {
26951		return nil, err
26952	}
26953	ret := &GoogleProtobufEmpty{
26954		ServerResponse: googleapi.ServerResponse{
26955			Header:         res.Header,
26956			HTTPStatusCode: res.StatusCode,
26957		},
26958	}
26959	target := &ret
26960	if err := gensupport.DecodeResponse(target, res); err != nil {
26961		return nil, err
26962	}
26963	return ret, nil
26964	// {
26965	//   "description": "Deletes all active contexts in the specified session.",
26966	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts",
26967	//   "httpMethod": "DELETE",
26968	//   "id": "dialogflow.projects.locations.agent.sessions.deleteContexts",
26969	//   "parameterOrder": [
26970	//     "parent"
26971	//   ],
26972	//   "parameters": {
26973	//     "parent": {
26974	//       "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.",
26975	//       "location": "path",
26976	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
26977	//       "required": true,
26978	//       "type": "string"
26979	//     }
26980	//   },
26981	//   "path": "v2beta1/{+parent}/contexts",
26982	//   "response": {
26983	//     "$ref": "GoogleProtobufEmpty"
26984	//   },
26985	//   "scopes": [
26986	//     "https://www.googleapis.com/auth/cloud-platform",
26987	//     "https://www.googleapis.com/auth/dialogflow"
26988	//   ]
26989	// }
26990
26991}
26992
26993// method id "dialogflow.projects.locations.agent.sessions.detectIntent":
26994
26995type ProjectsLocationsAgentSessionsDetectIntentCall struct {
26996	s                                               *Service
26997	sessionid                                       string
26998	googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest
26999	urlParams_                                      gensupport.URLParams
27000	ctx_                                            context.Context
27001	header_                                         http.Header
27002}
27003
27004// DetectIntent: Processes a natural language query and returns
27005// structured, actionable data
27006// as a result. This method is not idempotent, because it may cause
27007// contexts
27008// and session entity types to be updated, which in turn might
27009// affect
27010// results of future queries.
27011func (r *ProjectsLocationsAgentSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest) *ProjectsLocationsAgentSessionsDetectIntentCall {
27012	c := &ProjectsLocationsAgentSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27013	c.sessionid = sessionid
27014	c.googleclouddialogflowv2beta1detectintentrequest = googleclouddialogflowv2beta1detectintentrequest
27015	return c
27016}
27017
27018// Fields allows partial responses to be retrieved. See
27019// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27020// for more information.
27021func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsDetectIntentCall {
27022	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27023	return c
27024}
27025
27026// Context sets the context to be used in this call's Do method. Any
27027// pending HTTP request will be aborted if the provided context is
27028// canceled.
27029func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsDetectIntentCall {
27030	c.ctx_ = ctx
27031	return c
27032}
27033
27034// Header returns an http.Header that can be modified by the caller to
27035// add HTTP headers to the request.
27036func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Header() http.Header {
27037	if c.header_ == nil {
27038		c.header_ = make(http.Header)
27039	}
27040	return c.header_
27041}
27042
27043func (c *ProjectsLocationsAgentSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
27044	reqHeaders := make(http.Header)
27045	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27046	for k, v := range c.header_ {
27047		reqHeaders[k] = v
27048	}
27049	reqHeaders.Set("User-Agent", c.s.userAgent())
27050	var body io.Reader = nil
27051	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1detectintentrequest)
27052	if err != nil {
27053		return nil, err
27054	}
27055	reqHeaders.Set("Content-Type", "application/json")
27056	c.urlParams_.Set("alt", alt)
27057	c.urlParams_.Set("prettyPrint", "false")
27058	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+session}:detectIntent")
27059	urls += "?" + c.urlParams_.Encode()
27060	req, err := http.NewRequest("POST", urls, body)
27061	if err != nil {
27062		return nil, err
27063	}
27064	req.Header = reqHeaders
27065	googleapi.Expand(req.URL, map[string]string{
27066		"session": c.sessionid,
27067	})
27068	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27069}
27070
27071// Do executes the "dialogflow.projects.locations.agent.sessions.detectIntent" call.
27072// Exactly one of *GoogleCloudDialogflowV2beta1DetectIntentResponse or
27073// error will be non-nil. Any non-2xx status code is an error. Response
27074// headers are in either
27075// *GoogleCloudDialogflowV2beta1DetectIntentResponse.ServerResponse.Heade
27076// r or (if a response was returned at all) in
27077// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27078// whether the returned error was because http.StatusNotModified was
27079// returned.
27080func (c *ProjectsLocationsAgentSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1DetectIntentResponse, error) {
27081	gensupport.SetOptions(c.urlParams_, opts...)
27082	res, err := c.doRequest("json")
27083	if res != nil && res.StatusCode == http.StatusNotModified {
27084		if res.Body != nil {
27085			res.Body.Close()
27086		}
27087		return nil, &googleapi.Error{
27088			Code:   res.StatusCode,
27089			Header: res.Header,
27090		}
27091	}
27092	if err != nil {
27093		return nil, err
27094	}
27095	defer googleapi.CloseBody(res)
27096	if err := googleapi.CheckResponse(res); err != nil {
27097		return nil, err
27098	}
27099	ret := &GoogleCloudDialogflowV2beta1DetectIntentResponse{
27100		ServerResponse: googleapi.ServerResponse{
27101			Header:         res.Header,
27102			HTTPStatusCode: res.StatusCode,
27103		},
27104	}
27105	target := &ret
27106	if err := gensupport.DecodeResponse(target, res); err != nil {
27107		return nil, err
27108	}
27109	return ret, nil
27110	// {
27111	//   "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.",
27112	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}:detectIntent",
27113	//   "httpMethod": "POST",
27114	//   "id": "dialogflow.projects.locations.agent.sessions.detectIntent",
27115	//   "parameterOrder": [
27116	//     "session"
27117	//   ],
27118	//   "parameters": {
27119	//     "session": {
27120	//       "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.",
27121	//       "location": "path",
27122	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
27123	//       "required": true,
27124	//       "type": "string"
27125	//     }
27126	//   },
27127	//   "path": "v2beta1/{+session}:detectIntent",
27128	//   "request": {
27129	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest"
27130	//   },
27131	//   "response": {
27132	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse"
27133	//   },
27134	//   "scopes": [
27135	//     "https://www.googleapis.com/auth/cloud-platform",
27136	//     "https://www.googleapis.com/auth/dialogflow"
27137	//   ]
27138	// }
27139
27140}
27141
27142// method id "dialogflow.projects.locations.agent.sessions.contexts.create":
27143
27144type ProjectsLocationsAgentSessionsContextsCreateCall struct {
27145	s                                   *Service
27146	parent                              string
27147	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
27148	urlParams_                          gensupport.URLParams
27149	ctx_                                context.Context
27150	header_                             http.Header
27151}
27152
27153// Create: Creates a context.
27154//
27155// If the specified context already exists, overrides the context.
27156func (r *ProjectsLocationsAgentSessionsContextsService) Create(parent string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsLocationsAgentSessionsContextsCreateCall {
27157	c := &ProjectsLocationsAgentSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27158	c.parent = parent
27159	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
27160	return c
27161}
27162
27163// Fields allows partial responses to be retrieved. See
27164// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27165// for more information.
27166func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsCreateCall {
27167	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27168	return c
27169}
27170
27171// Context sets the context to be used in this call's Do method. Any
27172// pending HTTP request will be aborted if the provided context is
27173// canceled.
27174func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsCreateCall {
27175	c.ctx_ = ctx
27176	return c
27177}
27178
27179// Header returns an http.Header that can be modified by the caller to
27180// add HTTP headers to the request.
27181func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Header() http.Header {
27182	if c.header_ == nil {
27183		c.header_ = make(http.Header)
27184	}
27185	return c.header_
27186}
27187
27188func (c *ProjectsLocationsAgentSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
27189	reqHeaders := make(http.Header)
27190	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27191	for k, v := range c.header_ {
27192		reqHeaders[k] = v
27193	}
27194	reqHeaders.Set("User-Agent", c.s.userAgent())
27195	var body io.Reader = nil
27196	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
27197	if err != nil {
27198		return nil, err
27199	}
27200	reqHeaders.Set("Content-Type", "application/json")
27201	c.urlParams_.Set("alt", alt)
27202	c.urlParams_.Set("prettyPrint", "false")
27203	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
27204	urls += "?" + c.urlParams_.Encode()
27205	req, err := http.NewRequest("POST", urls, body)
27206	if err != nil {
27207		return nil, err
27208	}
27209	req.Header = reqHeaders
27210	googleapi.Expand(req.URL, map[string]string{
27211		"parent": c.parent,
27212	})
27213	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27214}
27215
27216// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.create" call.
27217// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
27218// non-nil. Any non-2xx status code is an error. Response headers are in
27219// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
27220// (if a response was returned at all) in
27221// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27222// whether the returned error was because http.StatusNotModified was
27223// returned.
27224func (c *ProjectsLocationsAgentSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
27225	gensupport.SetOptions(c.urlParams_, opts...)
27226	res, err := c.doRequest("json")
27227	if res != nil && res.StatusCode == http.StatusNotModified {
27228		if res.Body != nil {
27229			res.Body.Close()
27230		}
27231		return nil, &googleapi.Error{
27232			Code:   res.StatusCode,
27233			Header: res.Header,
27234		}
27235	}
27236	if err != nil {
27237		return nil, err
27238	}
27239	defer googleapi.CloseBody(res)
27240	if err := googleapi.CheckResponse(res); err != nil {
27241		return nil, err
27242	}
27243	ret := &GoogleCloudDialogflowV2beta1Context{
27244		ServerResponse: googleapi.ServerResponse{
27245			Header:         res.Header,
27246			HTTPStatusCode: res.StatusCode,
27247		},
27248	}
27249	target := &ret
27250	if err := gensupport.DecodeResponse(target, res); err != nil {
27251		return nil, err
27252	}
27253	return ret, nil
27254	// {
27255	//   "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.",
27256	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts",
27257	//   "httpMethod": "POST",
27258	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.create",
27259	//   "parameterOrder": [
27260	//     "parent"
27261	//   ],
27262	//   "parameters": {
27263	//     "parent": {
27264	//       "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.",
27265	//       "location": "path",
27266	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
27267	//       "required": true,
27268	//       "type": "string"
27269	//     }
27270	//   },
27271	//   "path": "v2beta1/{+parent}/contexts",
27272	//   "request": {
27273	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
27274	//   },
27275	//   "response": {
27276	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
27277	//   },
27278	//   "scopes": [
27279	//     "https://www.googleapis.com/auth/cloud-platform",
27280	//     "https://www.googleapis.com/auth/dialogflow"
27281	//   ]
27282	// }
27283
27284}
27285
27286// method id "dialogflow.projects.locations.agent.sessions.contexts.delete":
27287
27288type ProjectsLocationsAgentSessionsContextsDeleteCall struct {
27289	s          *Service
27290	name       string
27291	urlParams_ gensupport.URLParams
27292	ctx_       context.Context
27293	header_    http.Header
27294}
27295
27296// Delete: Deletes the specified context.
27297func (r *ProjectsLocationsAgentSessionsContextsService) Delete(name string) *ProjectsLocationsAgentSessionsContextsDeleteCall {
27298	c := &ProjectsLocationsAgentSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27299	c.name = name
27300	return c
27301}
27302
27303// Fields allows partial responses to be retrieved. See
27304// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27305// for more information.
27306func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsDeleteCall {
27307	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27308	return c
27309}
27310
27311// Context sets the context to be used in this call's Do method. Any
27312// pending HTTP request will be aborted if the provided context is
27313// canceled.
27314func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsDeleteCall {
27315	c.ctx_ = ctx
27316	return c
27317}
27318
27319// Header returns an http.Header that can be modified by the caller to
27320// add HTTP headers to the request.
27321func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Header() http.Header {
27322	if c.header_ == nil {
27323		c.header_ = make(http.Header)
27324	}
27325	return c.header_
27326}
27327
27328func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
27329	reqHeaders := make(http.Header)
27330	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27331	for k, v := range c.header_ {
27332		reqHeaders[k] = v
27333	}
27334	reqHeaders.Set("User-Agent", c.s.userAgent())
27335	var body io.Reader = nil
27336	c.urlParams_.Set("alt", alt)
27337	c.urlParams_.Set("prettyPrint", "false")
27338	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
27339	urls += "?" + c.urlParams_.Encode()
27340	req, err := http.NewRequest("DELETE", urls, body)
27341	if err != nil {
27342		return nil, err
27343	}
27344	req.Header = reqHeaders
27345	googleapi.Expand(req.URL, map[string]string{
27346		"name": c.name,
27347	})
27348	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27349}
27350
27351// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.delete" call.
27352// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
27353// non-2xx status code is an error. Response headers are in either
27354// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
27355// returned at all) in error.(*googleapi.Error).Header. Use
27356// googleapi.IsNotModified to check whether the returned error was
27357// because http.StatusNotModified was returned.
27358func (c *ProjectsLocationsAgentSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
27359	gensupport.SetOptions(c.urlParams_, opts...)
27360	res, err := c.doRequest("json")
27361	if res != nil && res.StatusCode == http.StatusNotModified {
27362		if res.Body != nil {
27363			res.Body.Close()
27364		}
27365		return nil, &googleapi.Error{
27366			Code:   res.StatusCode,
27367			Header: res.Header,
27368		}
27369	}
27370	if err != nil {
27371		return nil, err
27372	}
27373	defer googleapi.CloseBody(res)
27374	if err := googleapi.CheckResponse(res); err != nil {
27375		return nil, err
27376	}
27377	ret := &GoogleProtobufEmpty{
27378		ServerResponse: googleapi.ServerResponse{
27379			Header:         res.Header,
27380			HTTPStatusCode: res.StatusCode,
27381		},
27382	}
27383	target := &ret
27384	if err := gensupport.DecodeResponse(target, res); err != nil {
27385		return nil, err
27386	}
27387	return ret, nil
27388	// {
27389	//   "description": "Deletes the specified context.",
27390	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
27391	//   "httpMethod": "DELETE",
27392	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.delete",
27393	//   "parameterOrder": [
27394	//     "name"
27395	//   ],
27396	//   "parameters": {
27397	//     "name": {
27398	//       "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.",
27399	//       "location": "path",
27400	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
27401	//       "required": true,
27402	//       "type": "string"
27403	//     }
27404	//   },
27405	//   "path": "v2beta1/{+name}",
27406	//   "response": {
27407	//     "$ref": "GoogleProtobufEmpty"
27408	//   },
27409	//   "scopes": [
27410	//     "https://www.googleapis.com/auth/cloud-platform",
27411	//     "https://www.googleapis.com/auth/dialogflow"
27412	//   ]
27413	// }
27414
27415}
27416
27417// method id "dialogflow.projects.locations.agent.sessions.contexts.get":
27418
27419type ProjectsLocationsAgentSessionsContextsGetCall struct {
27420	s            *Service
27421	name         string
27422	urlParams_   gensupport.URLParams
27423	ifNoneMatch_ string
27424	ctx_         context.Context
27425	header_      http.Header
27426}
27427
27428// Get: Retrieves the specified context.
27429func (r *ProjectsLocationsAgentSessionsContextsService) Get(name string) *ProjectsLocationsAgentSessionsContextsGetCall {
27430	c := &ProjectsLocationsAgentSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27431	c.name = name
27432	return c
27433}
27434
27435// Fields allows partial responses to be retrieved. See
27436// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27437// for more information.
27438func (c *ProjectsLocationsAgentSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsGetCall {
27439	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27440	return c
27441}
27442
27443// IfNoneMatch sets the optional parameter which makes the operation
27444// fail if the object's ETag matches the given value. This is useful for
27445// getting updates only after the object has changed since the last
27446// request. Use googleapi.IsNotModified to check whether the response
27447// error from Do is the result of In-None-Match.
27448func (c *ProjectsLocationsAgentSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsContextsGetCall {
27449	c.ifNoneMatch_ = entityTag
27450	return c
27451}
27452
27453// Context sets the context to be used in this call's Do method. Any
27454// pending HTTP request will be aborted if the provided context is
27455// canceled.
27456func (c *ProjectsLocationsAgentSessionsContextsGetCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsGetCall {
27457	c.ctx_ = ctx
27458	return c
27459}
27460
27461// Header returns an http.Header that can be modified by the caller to
27462// add HTTP headers to the request.
27463func (c *ProjectsLocationsAgentSessionsContextsGetCall) Header() http.Header {
27464	if c.header_ == nil {
27465		c.header_ = make(http.Header)
27466	}
27467	return c.header_
27468}
27469
27470func (c *ProjectsLocationsAgentSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
27471	reqHeaders := make(http.Header)
27472	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27473	for k, v := range c.header_ {
27474		reqHeaders[k] = v
27475	}
27476	reqHeaders.Set("User-Agent", c.s.userAgent())
27477	if c.ifNoneMatch_ != "" {
27478		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27479	}
27480	var body io.Reader = nil
27481	c.urlParams_.Set("alt", alt)
27482	c.urlParams_.Set("prettyPrint", "false")
27483	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
27484	urls += "?" + c.urlParams_.Encode()
27485	req, err := http.NewRequest("GET", urls, body)
27486	if err != nil {
27487		return nil, err
27488	}
27489	req.Header = reqHeaders
27490	googleapi.Expand(req.URL, map[string]string{
27491		"name": c.name,
27492	})
27493	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27494}
27495
27496// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.get" call.
27497// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
27498// non-nil. Any non-2xx status code is an error. Response headers are in
27499// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
27500// (if a response was returned at all) in
27501// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27502// whether the returned error was because http.StatusNotModified was
27503// returned.
27504func (c *ProjectsLocationsAgentSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
27505	gensupport.SetOptions(c.urlParams_, opts...)
27506	res, err := c.doRequest("json")
27507	if res != nil && res.StatusCode == http.StatusNotModified {
27508		if res.Body != nil {
27509			res.Body.Close()
27510		}
27511		return nil, &googleapi.Error{
27512			Code:   res.StatusCode,
27513			Header: res.Header,
27514		}
27515	}
27516	if err != nil {
27517		return nil, err
27518	}
27519	defer googleapi.CloseBody(res)
27520	if err := googleapi.CheckResponse(res); err != nil {
27521		return nil, err
27522	}
27523	ret := &GoogleCloudDialogflowV2beta1Context{
27524		ServerResponse: googleapi.ServerResponse{
27525			Header:         res.Header,
27526			HTTPStatusCode: res.StatusCode,
27527		},
27528	}
27529	target := &ret
27530	if err := gensupport.DecodeResponse(target, res); err != nil {
27531		return nil, err
27532	}
27533	return ret, nil
27534	// {
27535	//   "description": "Retrieves the specified context.",
27536	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
27537	//   "httpMethod": "GET",
27538	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.get",
27539	//   "parameterOrder": [
27540	//     "name"
27541	//   ],
27542	//   "parameters": {
27543	//     "name": {
27544	//       "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.",
27545	//       "location": "path",
27546	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
27547	//       "required": true,
27548	//       "type": "string"
27549	//     }
27550	//   },
27551	//   "path": "v2beta1/{+name}",
27552	//   "response": {
27553	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
27554	//   },
27555	//   "scopes": [
27556	//     "https://www.googleapis.com/auth/cloud-platform",
27557	//     "https://www.googleapis.com/auth/dialogflow"
27558	//   ]
27559	// }
27560
27561}
27562
27563// method id "dialogflow.projects.locations.agent.sessions.contexts.list":
27564
27565type ProjectsLocationsAgentSessionsContextsListCall struct {
27566	s            *Service
27567	parent       string
27568	urlParams_   gensupport.URLParams
27569	ifNoneMatch_ string
27570	ctx_         context.Context
27571	header_      http.Header
27572}
27573
27574// List: Returns the list of all contexts in the specified session.
27575func (r *ProjectsLocationsAgentSessionsContextsService) List(parent string) *ProjectsLocationsAgentSessionsContextsListCall {
27576	c := &ProjectsLocationsAgentSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27577	c.parent = parent
27578	return c
27579}
27580
27581// PageSize sets the optional parameter "pageSize": The maximum number
27582// of items to return in a single page. By
27583// default 100 and at most 1000.
27584func (c *ProjectsLocationsAgentSessionsContextsListCall) PageSize(pageSize int64) *ProjectsLocationsAgentSessionsContextsListCall {
27585	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27586	return c
27587}
27588
27589// PageToken sets the optional parameter "pageToken": The
27590// next_page_token value returned from a previous list request.
27591func (c *ProjectsLocationsAgentSessionsContextsListCall) PageToken(pageToken string) *ProjectsLocationsAgentSessionsContextsListCall {
27592	c.urlParams_.Set("pageToken", pageToken)
27593	return c
27594}
27595
27596// Fields allows partial responses to be retrieved. See
27597// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27598// for more information.
27599func (c *ProjectsLocationsAgentSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsListCall {
27600	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27601	return c
27602}
27603
27604// IfNoneMatch sets the optional parameter which makes the operation
27605// fail if the object's ETag matches the given value. This is useful for
27606// getting updates only after the object has changed since the last
27607// request. Use googleapi.IsNotModified to check whether the response
27608// error from Do is the result of In-None-Match.
27609func (c *ProjectsLocationsAgentSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsContextsListCall {
27610	c.ifNoneMatch_ = entityTag
27611	return c
27612}
27613
27614// Context sets the context to be used in this call's Do method. Any
27615// pending HTTP request will be aborted if the provided context is
27616// canceled.
27617func (c *ProjectsLocationsAgentSessionsContextsListCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsListCall {
27618	c.ctx_ = ctx
27619	return c
27620}
27621
27622// Header returns an http.Header that can be modified by the caller to
27623// add HTTP headers to the request.
27624func (c *ProjectsLocationsAgentSessionsContextsListCall) Header() http.Header {
27625	if c.header_ == nil {
27626		c.header_ = make(http.Header)
27627	}
27628	return c.header_
27629}
27630
27631func (c *ProjectsLocationsAgentSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
27632	reqHeaders := make(http.Header)
27633	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27634	for k, v := range c.header_ {
27635		reqHeaders[k] = v
27636	}
27637	reqHeaders.Set("User-Agent", c.s.userAgent())
27638	if c.ifNoneMatch_ != "" {
27639		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27640	}
27641	var body io.Reader = nil
27642	c.urlParams_.Set("alt", alt)
27643	c.urlParams_.Set("prettyPrint", "false")
27644	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
27645	urls += "?" + c.urlParams_.Encode()
27646	req, err := http.NewRequest("GET", urls, body)
27647	if err != nil {
27648		return nil, err
27649	}
27650	req.Header = reqHeaders
27651	googleapi.Expand(req.URL, map[string]string{
27652		"parent": c.parent,
27653	})
27654	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27655}
27656
27657// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.list" call.
27658// Exactly one of *GoogleCloudDialogflowV2beta1ListContextsResponse or
27659// error will be non-nil. Any non-2xx status code is an error. Response
27660// headers are in either
27661// *GoogleCloudDialogflowV2beta1ListContextsResponse.ServerResponse.Heade
27662// r or (if a response was returned at all) in
27663// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27664// whether the returned error was because http.StatusNotModified was
27665// returned.
27666func (c *ProjectsLocationsAgentSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListContextsResponse, error) {
27667	gensupport.SetOptions(c.urlParams_, opts...)
27668	res, err := c.doRequest("json")
27669	if res != nil && res.StatusCode == http.StatusNotModified {
27670		if res.Body != nil {
27671			res.Body.Close()
27672		}
27673		return nil, &googleapi.Error{
27674			Code:   res.StatusCode,
27675			Header: res.Header,
27676		}
27677	}
27678	if err != nil {
27679		return nil, err
27680	}
27681	defer googleapi.CloseBody(res)
27682	if err := googleapi.CheckResponse(res); err != nil {
27683		return nil, err
27684	}
27685	ret := &GoogleCloudDialogflowV2beta1ListContextsResponse{
27686		ServerResponse: googleapi.ServerResponse{
27687			Header:         res.Header,
27688			HTTPStatusCode: res.StatusCode,
27689		},
27690	}
27691	target := &ret
27692	if err := gensupport.DecodeResponse(target, res); err != nil {
27693		return nil, err
27694	}
27695	return ret, nil
27696	// {
27697	//   "description": "Returns the list of all contexts in the specified session.",
27698	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts",
27699	//   "httpMethod": "GET",
27700	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.list",
27701	//   "parameterOrder": [
27702	//     "parent"
27703	//   ],
27704	//   "parameters": {
27705	//     "pageSize": {
27706	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
27707	//       "format": "int32",
27708	//       "location": "query",
27709	//       "type": "integer"
27710	//     },
27711	//     "pageToken": {
27712	//       "description": "Optional. The next_page_token value returned from a previous list request.",
27713	//       "location": "query",
27714	//       "type": "string"
27715	//     },
27716	//     "parent": {
27717	//       "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.",
27718	//       "location": "path",
27719	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
27720	//       "required": true,
27721	//       "type": "string"
27722	//     }
27723	//   },
27724	//   "path": "v2beta1/{+parent}/contexts",
27725	//   "response": {
27726	//     "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse"
27727	//   },
27728	//   "scopes": [
27729	//     "https://www.googleapis.com/auth/cloud-platform",
27730	//     "https://www.googleapis.com/auth/dialogflow"
27731	//   ]
27732	// }
27733
27734}
27735
27736// Pages invokes f for each page of results.
27737// A non-nil error returned from f will halt the iteration.
27738// The provided context supersedes any context provided to the Context method.
27739func (c *ProjectsLocationsAgentSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListContextsResponse) error) error {
27740	c.ctx_ = ctx
27741	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27742	for {
27743		x, err := c.Do()
27744		if err != nil {
27745			return err
27746		}
27747		if err := f(x); err != nil {
27748			return err
27749		}
27750		if x.NextPageToken == "" {
27751			return nil
27752		}
27753		c.PageToken(x.NextPageToken)
27754	}
27755}
27756
27757// method id "dialogflow.projects.locations.agent.sessions.contexts.patch":
27758
27759type ProjectsLocationsAgentSessionsContextsPatchCall struct {
27760	s                                   *Service
27761	nameid                              string
27762	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
27763	urlParams_                          gensupport.URLParams
27764	ctx_                                context.Context
27765	header_                             http.Header
27766}
27767
27768// Patch: Updates the specified context.
27769func (r *ProjectsLocationsAgentSessionsContextsService) Patch(nameid string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsLocationsAgentSessionsContextsPatchCall {
27770	c := &ProjectsLocationsAgentSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27771	c.nameid = nameid
27772	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
27773	return c
27774}
27775
27776// UpdateMask sets the optional parameter "updateMask": The mask to
27777// control which fields get updated.
27778func (c *ProjectsLocationsAgentSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentSessionsContextsPatchCall {
27779	c.urlParams_.Set("updateMask", updateMask)
27780	return c
27781}
27782
27783// Fields allows partial responses to be retrieved. See
27784// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27785// for more information.
27786func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsContextsPatchCall {
27787	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27788	return c
27789}
27790
27791// Context sets the context to be used in this call's Do method. Any
27792// pending HTTP request will be aborted if the provided context is
27793// canceled.
27794func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsContextsPatchCall {
27795	c.ctx_ = ctx
27796	return c
27797}
27798
27799// Header returns an http.Header that can be modified by the caller to
27800// add HTTP headers to the request.
27801func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Header() http.Header {
27802	if c.header_ == nil {
27803		c.header_ = make(http.Header)
27804	}
27805	return c.header_
27806}
27807
27808func (c *ProjectsLocationsAgentSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
27809	reqHeaders := make(http.Header)
27810	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27811	for k, v := range c.header_ {
27812		reqHeaders[k] = v
27813	}
27814	reqHeaders.Set("User-Agent", c.s.userAgent())
27815	var body io.Reader = nil
27816	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
27817	if err != nil {
27818		return nil, err
27819	}
27820	reqHeaders.Set("Content-Type", "application/json")
27821	c.urlParams_.Set("alt", alt)
27822	c.urlParams_.Set("prettyPrint", "false")
27823	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
27824	urls += "?" + c.urlParams_.Encode()
27825	req, err := http.NewRequest("PATCH", urls, body)
27826	if err != nil {
27827		return nil, err
27828	}
27829	req.Header = reqHeaders
27830	googleapi.Expand(req.URL, map[string]string{
27831		"name": c.nameid,
27832	})
27833	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27834}
27835
27836// Do executes the "dialogflow.projects.locations.agent.sessions.contexts.patch" call.
27837// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
27838// non-nil. Any non-2xx status code is an error. Response headers are in
27839// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
27840// (if a response was returned at all) in
27841// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27842// whether the returned error was because http.StatusNotModified was
27843// returned.
27844func (c *ProjectsLocationsAgentSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
27845	gensupport.SetOptions(c.urlParams_, opts...)
27846	res, err := c.doRequest("json")
27847	if res != nil && res.StatusCode == http.StatusNotModified {
27848		if res.Body != nil {
27849			res.Body.Close()
27850		}
27851		return nil, &googleapi.Error{
27852			Code:   res.StatusCode,
27853			Header: res.Header,
27854		}
27855	}
27856	if err != nil {
27857		return nil, err
27858	}
27859	defer googleapi.CloseBody(res)
27860	if err := googleapi.CheckResponse(res); err != nil {
27861		return nil, err
27862	}
27863	ret := &GoogleCloudDialogflowV2beta1Context{
27864		ServerResponse: googleapi.ServerResponse{
27865			Header:         res.Header,
27866			HTTPStatusCode: res.StatusCode,
27867		},
27868	}
27869	target := &ret
27870	if err := gensupport.DecodeResponse(target, res); err != nil {
27871		return nil, err
27872	}
27873	return ret, nil
27874	// {
27875	//   "description": "Updates the specified context.",
27876	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
27877	//   "httpMethod": "PATCH",
27878	//   "id": "dialogflow.projects.locations.agent.sessions.contexts.patch",
27879	//   "parameterOrder": [
27880	//     "name"
27881	//   ],
27882	//   "parameters": {
27883	//     "name": {
27884	//       "description": "Required. The unique identifier of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`,\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\n\nThe `Context ID` is always converted to lowercase, may only contain\ncharacters in a-zA-Z0-9_-% and may be at most 250 bytes long.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n\nThe following context names are reserved for internal use by Dialogflow.\nYou should not use these contexts or create contexts with these names:\n\n* `__system_counters__`\n* `*_id_dialog_context`\n* `*_dialog_params_size`",
27885	//       "location": "path",
27886	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
27887	//       "required": true,
27888	//       "type": "string"
27889	//     },
27890	//     "updateMask": {
27891	//       "description": "Optional. The mask to control which fields get updated.",
27892	//       "format": "google-fieldmask",
27893	//       "location": "query",
27894	//       "type": "string"
27895	//     }
27896	//   },
27897	//   "path": "v2beta1/{+name}",
27898	//   "request": {
27899	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
27900	//   },
27901	//   "response": {
27902	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
27903	//   },
27904	//   "scopes": [
27905	//     "https://www.googleapis.com/auth/cloud-platform",
27906	//     "https://www.googleapis.com/auth/dialogflow"
27907	//   ]
27908	// }
27909
27910}
27911
27912// method id "dialogflow.projects.locations.agent.sessions.entityTypes.create":
27913
27914type ProjectsLocationsAgentSessionsEntityTypesCreateCall struct {
27915	s                                             *Service
27916	parent                                        string
27917	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
27918	urlParams_                                    gensupport.URLParams
27919	ctx_                                          context.Context
27920	header_                                       http.Header
27921}
27922
27923// Create: Creates a session entity type.
27924//
27925// If the specified session entity type already exists, overrides
27926// the
27927// session entity type.
27928//
27929// This method doesn't work with Google Assistant integration.
27930// Contact Dialogflow support if you need to use session entities
27931// with Google Assistant integration.
27932func (r *ProjectsLocationsAgentSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsLocationsAgentSessionsEntityTypesCreateCall {
27933	c := &ProjectsLocationsAgentSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27934	c.parent = parent
27935	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
27936	return c
27937}
27938
27939// Fields allows partial responses to be retrieved. See
27940// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27941// for more information.
27942func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesCreateCall {
27943	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27944	return c
27945}
27946
27947// Context sets the context to be used in this call's Do method. Any
27948// pending HTTP request will be aborted if the provided context is
27949// canceled.
27950func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesCreateCall {
27951	c.ctx_ = ctx
27952	return c
27953}
27954
27955// Header returns an http.Header that can be modified by the caller to
27956// add HTTP headers to the request.
27957func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Header() http.Header {
27958	if c.header_ == nil {
27959		c.header_ = make(http.Header)
27960	}
27961	return c.header_
27962}
27963
27964func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
27965	reqHeaders := make(http.Header)
27966	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
27967	for k, v := range c.header_ {
27968		reqHeaders[k] = v
27969	}
27970	reqHeaders.Set("User-Agent", c.s.userAgent())
27971	var body io.Reader = nil
27972	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
27973	if err != nil {
27974		return nil, err
27975	}
27976	reqHeaders.Set("Content-Type", "application/json")
27977	c.urlParams_.Set("alt", alt)
27978	c.urlParams_.Set("prettyPrint", "false")
27979	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
27980	urls += "?" + c.urlParams_.Encode()
27981	req, err := http.NewRequest("POST", urls, body)
27982	if err != nil {
27983		return nil, err
27984	}
27985	req.Header = reqHeaders
27986	googleapi.Expand(req.URL, map[string]string{
27987		"parent": c.parent,
27988	})
27989	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27990}
27991
27992// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.create" call.
27993// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
27994// error will be non-nil. Any non-2xx status code is an error. Response
27995// headers are in either
27996// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
27997// or (if a response was returned at all) in
27998// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
27999// whether the returned error was because http.StatusNotModified was
28000// returned.
28001func (c *ProjectsLocationsAgentSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
28002	gensupport.SetOptions(c.urlParams_, opts...)
28003	res, err := c.doRequest("json")
28004	if res != nil && res.StatusCode == http.StatusNotModified {
28005		if res.Body != nil {
28006			res.Body.Close()
28007		}
28008		return nil, &googleapi.Error{
28009			Code:   res.StatusCode,
28010			Header: res.Header,
28011		}
28012	}
28013	if err != nil {
28014		return nil, err
28015	}
28016	defer googleapi.CloseBody(res)
28017	if err := googleapi.CheckResponse(res); err != nil {
28018		return nil, err
28019	}
28020	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
28021		ServerResponse: googleapi.ServerResponse{
28022			Header:         res.Header,
28023			HTTPStatusCode: res.StatusCode,
28024		},
28025	}
28026	target := &ret
28027	if err := gensupport.DecodeResponse(target, res); err != nil {
28028		return nil, err
28029	}
28030	return ret, nil
28031	// {
28032	//   "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.",
28033	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes",
28034	//   "httpMethod": "POST",
28035	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.create",
28036	//   "parameterOrder": [
28037	//     "parent"
28038	//   ],
28039	//   "parameters": {
28040	//     "parent": {
28041	//       "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.",
28042	//       "location": "path",
28043	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
28044	//       "required": true,
28045	//       "type": "string"
28046	//     }
28047	//   },
28048	//   "path": "v2beta1/{+parent}/entityTypes",
28049	//   "request": {
28050	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
28051	//   },
28052	//   "response": {
28053	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
28054	//   },
28055	//   "scopes": [
28056	//     "https://www.googleapis.com/auth/cloud-platform",
28057	//     "https://www.googleapis.com/auth/dialogflow"
28058	//   ]
28059	// }
28060
28061}
28062
28063// method id "dialogflow.projects.locations.agent.sessions.entityTypes.delete":
28064
28065type ProjectsLocationsAgentSessionsEntityTypesDeleteCall struct {
28066	s          *Service
28067	name       string
28068	urlParams_ gensupport.URLParams
28069	ctx_       context.Context
28070	header_    http.Header
28071}
28072
28073// Delete: Deletes the specified session entity type.
28074//
28075// This method doesn't work with Google Assistant integration.
28076// Contact Dialogflow support if you need to use session entities
28077// with Google Assistant integration.
28078func (r *ProjectsLocationsAgentSessionsEntityTypesService) Delete(name string) *ProjectsLocationsAgentSessionsEntityTypesDeleteCall {
28079	c := &ProjectsLocationsAgentSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28080	c.name = name
28081	return c
28082}
28083
28084// Fields allows partial responses to be retrieved. See
28085// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28086// for more information.
28087func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesDeleteCall {
28088	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28089	return c
28090}
28091
28092// Context sets the context to be used in this call's Do method. Any
28093// pending HTTP request will be aborted if the provided context is
28094// canceled.
28095func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesDeleteCall {
28096	c.ctx_ = ctx
28097	return c
28098}
28099
28100// Header returns an http.Header that can be modified by the caller to
28101// add HTTP headers to the request.
28102func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Header() http.Header {
28103	if c.header_ == nil {
28104		c.header_ = make(http.Header)
28105	}
28106	return c.header_
28107}
28108
28109func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
28110	reqHeaders := make(http.Header)
28111	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28112	for k, v := range c.header_ {
28113		reqHeaders[k] = v
28114	}
28115	reqHeaders.Set("User-Agent", c.s.userAgent())
28116	var body io.Reader = nil
28117	c.urlParams_.Set("alt", alt)
28118	c.urlParams_.Set("prettyPrint", "false")
28119	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
28120	urls += "?" + c.urlParams_.Encode()
28121	req, err := http.NewRequest("DELETE", urls, body)
28122	if err != nil {
28123		return nil, err
28124	}
28125	req.Header = reqHeaders
28126	googleapi.Expand(req.URL, map[string]string{
28127		"name": c.name,
28128	})
28129	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28130}
28131
28132// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.delete" call.
28133// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
28134// non-2xx status code is an error. Response headers are in either
28135// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
28136// returned at all) in error.(*googleapi.Error).Header. Use
28137// googleapi.IsNotModified to check whether the returned error was
28138// because http.StatusNotModified was returned.
28139func (c *ProjectsLocationsAgentSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
28140	gensupport.SetOptions(c.urlParams_, opts...)
28141	res, err := c.doRequest("json")
28142	if res != nil && res.StatusCode == http.StatusNotModified {
28143		if res.Body != nil {
28144			res.Body.Close()
28145		}
28146		return nil, &googleapi.Error{
28147			Code:   res.StatusCode,
28148			Header: res.Header,
28149		}
28150	}
28151	if err != nil {
28152		return nil, err
28153	}
28154	defer googleapi.CloseBody(res)
28155	if err := googleapi.CheckResponse(res); err != nil {
28156		return nil, err
28157	}
28158	ret := &GoogleProtobufEmpty{
28159		ServerResponse: googleapi.ServerResponse{
28160			Header:         res.Header,
28161			HTTPStatusCode: res.StatusCode,
28162		},
28163	}
28164	target := &ret
28165	if err := gensupport.DecodeResponse(target, res); err != nil {
28166		return nil, err
28167	}
28168	return ret, nil
28169	// {
28170	//   "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.",
28171	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
28172	//   "httpMethod": "DELETE",
28173	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.delete",
28174	//   "parameterOrder": [
28175	//     "name"
28176	//   ],
28177	//   "parameters": {
28178	//     "name": {
28179	//       "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.",
28180	//       "location": "path",
28181	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
28182	//       "required": true,
28183	//       "type": "string"
28184	//     }
28185	//   },
28186	//   "path": "v2beta1/{+name}",
28187	//   "response": {
28188	//     "$ref": "GoogleProtobufEmpty"
28189	//   },
28190	//   "scopes": [
28191	//     "https://www.googleapis.com/auth/cloud-platform",
28192	//     "https://www.googleapis.com/auth/dialogflow"
28193	//   ]
28194	// }
28195
28196}
28197
28198// method id "dialogflow.projects.locations.agent.sessions.entityTypes.get":
28199
28200type ProjectsLocationsAgentSessionsEntityTypesGetCall struct {
28201	s            *Service
28202	name         string
28203	urlParams_   gensupport.URLParams
28204	ifNoneMatch_ string
28205	ctx_         context.Context
28206	header_      http.Header
28207}
28208
28209// Get: Retrieves the specified session entity type.
28210//
28211// This method doesn't work with Google Assistant integration.
28212// Contact Dialogflow support if you need to use session entities
28213// with Google Assistant integration.
28214func (r *ProjectsLocationsAgentSessionsEntityTypesService) Get(name string) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
28215	c := &ProjectsLocationsAgentSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28216	c.name = name
28217	return c
28218}
28219
28220// Fields allows partial responses to be retrieved. See
28221// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28222// for more information.
28223func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
28224	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28225	return c
28226}
28227
28228// IfNoneMatch sets the optional parameter which makes the operation
28229// fail if the object's ETag matches the given value. This is useful for
28230// getting updates only after the object has changed since the last
28231// request. Use googleapi.IsNotModified to check whether the response
28232// error from Do is the result of In-None-Match.
28233func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
28234	c.ifNoneMatch_ = entityTag
28235	return c
28236}
28237
28238// Context sets the context to be used in this call's Do method. Any
28239// pending HTTP request will be aborted if the provided context is
28240// canceled.
28241func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesGetCall {
28242	c.ctx_ = ctx
28243	return c
28244}
28245
28246// Header returns an http.Header that can be modified by the caller to
28247// add HTTP headers to the request.
28248func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Header() http.Header {
28249	if c.header_ == nil {
28250		c.header_ = make(http.Header)
28251	}
28252	return c.header_
28253}
28254
28255func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
28256	reqHeaders := make(http.Header)
28257	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28258	for k, v := range c.header_ {
28259		reqHeaders[k] = v
28260	}
28261	reqHeaders.Set("User-Agent", c.s.userAgent())
28262	if c.ifNoneMatch_ != "" {
28263		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28264	}
28265	var body io.Reader = nil
28266	c.urlParams_.Set("alt", alt)
28267	c.urlParams_.Set("prettyPrint", "false")
28268	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
28269	urls += "?" + c.urlParams_.Encode()
28270	req, err := http.NewRequest("GET", urls, body)
28271	if err != nil {
28272		return nil, err
28273	}
28274	req.Header = reqHeaders
28275	googleapi.Expand(req.URL, map[string]string{
28276		"name": c.name,
28277	})
28278	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28279}
28280
28281// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.get" call.
28282// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
28283// error will be non-nil. Any non-2xx status code is an error. Response
28284// headers are in either
28285// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
28286// or (if a response was returned at all) in
28287// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
28288// whether the returned error was because http.StatusNotModified was
28289// returned.
28290func (c *ProjectsLocationsAgentSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
28291	gensupport.SetOptions(c.urlParams_, opts...)
28292	res, err := c.doRequest("json")
28293	if res != nil && res.StatusCode == http.StatusNotModified {
28294		if res.Body != nil {
28295			res.Body.Close()
28296		}
28297		return nil, &googleapi.Error{
28298			Code:   res.StatusCode,
28299			Header: res.Header,
28300		}
28301	}
28302	if err != nil {
28303		return nil, err
28304	}
28305	defer googleapi.CloseBody(res)
28306	if err := googleapi.CheckResponse(res); err != nil {
28307		return nil, err
28308	}
28309	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
28310		ServerResponse: googleapi.ServerResponse{
28311			Header:         res.Header,
28312			HTTPStatusCode: res.StatusCode,
28313		},
28314	}
28315	target := &ret
28316	if err := gensupport.DecodeResponse(target, res); err != nil {
28317		return nil, err
28318	}
28319	return ret, nil
28320	// {
28321	//   "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.",
28322	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
28323	//   "httpMethod": "GET",
28324	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.get",
28325	//   "parameterOrder": [
28326	//     "name"
28327	//   ],
28328	//   "parameters": {
28329	//     "name": {
28330	//       "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.",
28331	//       "location": "path",
28332	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
28333	//       "required": true,
28334	//       "type": "string"
28335	//     }
28336	//   },
28337	//   "path": "v2beta1/{+name}",
28338	//   "response": {
28339	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
28340	//   },
28341	//   "scopes": [
28342	//     "https://www.googleapis.com/auth/cloud-platform",
28343	//     "https://www.googleapis.com/auth/dialogflow"
28344	//   ]
28345	// }
28346
28347}
28348
28349// method id "dialogflow.projects.locations.agent.sessions.entityTypes.list":
28350
28351type ProjectsLocationsAgentSessionsEntityTypesListCall struct {
28352	s            *Service
28353	parent       string
28354	urlParams_   gensupport.URLParams
28355	ifNoneMatch_ string
28356	ctx_         context.Context
28357	header_      http.Header
28358}
28359
28360// List: Returns the list of all session entity types in the specified
28361// session.
28362//
28363// This method doesn't work with Google Assistant integration.
28364// Contact Dialogflow support if you need to use session entities
28365// with Google Assistant integration.
28366func (r *ProjectsLocationsAgentSessionsEntityTypesService) List(parent string) *ProjectsLocationsAgentSessionsEntityTypesListCall {
28367	c := &ProjectsLocationsAgentSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28368	c.parent = parent
28369	return c
28370}
28371
28372// PageSize sets the optional parameter "pageSize": The maximum number
28373// of items to return in a single page. By
28374// default 100 and at most 1000.
28375func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAgentSessionsEntityTypesListCall {
28376	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28377	return c
28378}
28379
28380// PageToken sets the optional parameter "pageToken": The
28381// next_page_token value returned from a previous list request.
28382func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsAgentSessionsEntityTypesListCall {
28383	c.urlParams_.Set("pageToken", pageToken)
28384	return c
28385}
28386
28387// Fields allows partial responses to be retrieved. See
28388// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28389// for more information.
28390func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesListCall {
28391	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28392	return c
28393}
28394
28395// IfNoneMatch sets the optional parameter which makes the operation
28396// fail if the object's ETag matches the given value. This is useful for
28397// getting updates only after the object has changed since the last
28398// request. Use googleapi.IsNotModified to check whether the response
28399// error from Do is the result of In-None-Match.
28400func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentSessionsEntityTypesListCall {
28401	c.ifNoneMatch_ = entityTag
28402	return c
28403}
28404
28405// Context sets the context to be used in this call's Do method. Any
28406// pending HTTP request will be aborted if the provided context is
28407// canceled.
28408func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesListCall {
28409	c.ctx_ = ctx
28410	return c
28411}
28412
28413// Header returns an http.Header that can be modified by the caller to
28414// add HTTP headers to the request.
28415func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Header() http.Header {
28416	if c.header_ == nil {
28417		c.header_ = make(http.Header)
28418	}
28419	return c.header_
28420}
28421
28422func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
28423	reqHeaders := make(http.Header)
28424	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28425	for k, v := range c.header_ {
28426		reqHeaders[k] = v
28427	}
28428	reqHeaders.Set("User-Agent", c.s.userAgent())
28429	if c.ifNoneMatch_ != "" {
28430		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28431	}
28432	var body io.Reader = nil
28433	c.urlParams_.Set("alt", alt)
28434	c.urlParams_.Set("prettyPrint", "false")
28435	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
28436	urls += "?" + c.urlParams_.Encode()
28437	req, err := http.NewRequest("GET", urls, body)
28438	if err != nil {
28439		return nil, err
28440	}
28441	req.Header = reqHeaders
28442	googleapi.Expand(req.URL, map[string]string{
28443		"parent": c.parent,
28444	})
28445	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28446}
28447
28448// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.list" call.
28449// Exactly one of
28450// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse or error
28451// will be non-nil. Any non-2xx status code is an error. Response
28452// headers are in either
28453// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse.ServerResp
28454// onse.Header or (if a response was returned at all) in
28455// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
28456// whether the returned error was because http.StatusNotModified was
28457// returned.
28458func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse, error) {
28459	gensupport.SetOptions(c.urlParams_, opts...)
28460	res, err := c.doRequest("json")
28461	if res != nil && res.StatusCode == http.StatusNotModified {
28462		if res.Body != nil {
28463			res.Body.Close()
28464		}
28465		return nil, &googleapi.Error{
28466			Code:   res.StatusCode,
28467			Header: res.Header,
28468		}
28469	}
28470	if err != nil {
28471		return nil, err
28472	}
28473	defer googleapi.CloseBody(res)
28474	if err := googleapi.CheckResponse(res); err != nil {
28475		return nil, err
28476	}
28477	ret := &GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse{
28478		ServerResponse: googleapi.ServerResponse{
28479			Header:         res.Header,
28480			HTTPStatusCode: res.StatusCode,
28481		},
28482	}
28483	target := &ret
28484	if err := gensupport.DecodeResponse(target, res); err != nil {
28485		return nil, err
28486	}
28487	return ret, nil
28488	// {
28489	//   "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.",
28490	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes",
28491	//   "httpMethod": "GET",
28492	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.list",
28493	//   "parameterOrder": [
28494	//     "parent"
28495	//   ],
28496	//   "parameters": {
28497	//     "pageSize": {
28498	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
28499	//       "format": "int32",
28500	//       "location": "query",
28501	//       "type": "integer"
28502	//     },
28503	//     "pageToken": {
28504	//       "description": "Optional. The next_page_token value returned from a previous list request.",
28505	//       "location": "query",
28506	//       "type": "string"
28507	//     },
28508	//     "parent": {
28509	//       "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.",
28510	//       "location": "path",
28511	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$",
28512	//       "required": true,
28513	//       "type": "string"
28514	//     }
28515	//   },
28516	//   "path": "v2beta1/{+parent}/entityTypes",
28517	//   "response": {
28518	//     "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse"
28519	//   },
28520	//   "scopes": [
28521	//     "https://www.googleapis.com/auth/cloud-platform",
28522	//     "https://www.googleapis.com/auth/dialogflow"
28523	//   ]
28524	// }
28525
28526}
28527
28528// Pages invokes f for each page of results.
28529// A non-nil error returned from f will halt the iteration.
28530// The provided context supersedes any context provided to the Context method.
28531func (c *ProjectsLocationsAgentSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) error) error {
28532	c.ctx_ = ctx
28533	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28534	for {
28535		x, err := c.Do()
28536		if err != nil {
28537			return err
28538		}
28539		if err := f(x); err != nil {
28540			return err
28541		}
28542		if x.NextPageToken == "" {
28543			return nil
28544		}
28545		c.PageToken(x.NextPageToken)
28546	}
28547}
28548
28549// method id "dialogflow.projects.locations.agent.sessions.entityTypes.patch":
28550
28551type ProjectsLocationsAgentSessionsEntityTypesPatchCall struct {
28552	s                                             *Service
28553	nameid                                        string
28554	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
28555	urlParams_                                    gensupport.URLParams
28556	ctx_                                          context.Context
28557	header_                                       http.Header
28558}
28559
28560// Patch: Updates the specified session entity type.
28561//
28562// This method doesn't work with Google Assistant integration.
28563// Contact Dialogflow support if you need to use session entities
28564// with Google Assistant integration.
28565func (r *ProjectsLocationsAgentSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
28566	c := &ProjectsLocationsAgentSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28567	c.nameid = nameid
28568	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
28569	return c
28570}
28571
28572// UpdateMask sets the optional parameter "updateMask": The mask to
28573// control which fields get updated.
28574func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
28575	c.urlParams_.Set("updateMask", updateMask)
28576	return c
28577}
28578
28579// Fields allows partial responses to be retrieved. See
28580// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28581// for more information.
28582func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
28583	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28584	return c
28585}
28586
28587// Context sets the context to be used in this call's Do method. Any
28588// pending HTTP request will be aborted if the provided context is
28589// canceled.
28590func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAgentSessionsEntityTypesPatchCall {
28591	c.ctx_ = ctx
28592	return c
28593}
28594
28595// Header returns an http.Header that can be modified by the caller to
28596// add HTTP headers to the request.
28597func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Header() http.Header {
28598	if c.header_ == nil {
28599		c.header_ = make(http.Header)
28600	}
28601	return c.header_
28602}
28603
28604func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
28605	reqHeaders := make(http.Header)
28606	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28607	for k, v := range c.header_ {
28608		reqHeaders[k] = v
28609	}
28610	reqHeaders.Set("User-Agent", c.s.userAgent())
28611	var body io.Reader = nil
28612	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
28613	if err != nil {
28614		return nil, err
28615	}
28616	reqHeaders.Set("Content-Type", "application/json")
28617	c.urlParams_.Set("alt", alt)
28618	c.urlParams_.Set("prettyPrint", "false")
28619	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
28620	urls += "?" + c.urlParams_.Encode()
28621	req, err := http.NewRequest("PATCH", urls, body)
28622	if err != nil {
28623		return nil, err
28624	}
28625	req.Header = reqHeaders
28626	googleapi.Expand(req.URL, map[string]string{
28627		"name": c.nameid,
28628	})
28629	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28630}
28631
28632// Do executes the "dialogflow.projects.locations.agent.sessions.entityTypes.patch" call.
28633// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
28634// error will be non-nil. Any non-2xx status code is an error. Response
28635// headers are in either
28636// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
28637// or (if a response was returned at all) in
28638// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
28639// whether the returned error was because http.StatusNotModified was
28640// returned.
28641func (c *ProjectsLocationsAgentSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
28642	gensupport.SetOptions(c.urlParams_, opts...)
28643	res, err := c.doRequest("json")
28644	if res != nil && res.StatusCode == http.StatusNotModified {
28645		if res.Body != nil {
28646			res.Body.Close()
28647		}
28648		return nil, &googleapi.Error{
28649			Code:   res.StatusCode,
28650			Header: res.Header,
28651		}
28652	}
28653	if err != nil {
28654		return nil, err
28655	}
28656	defer googleapi.CloseBody(res)
28657	if err := googleapi.CheckResponse(res); err != nil {
28658		return nil, err
28659	}
28660	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
28661		ServerResponse: googleapi.ServerResponse{
28662			Header:         res.Header,
28663			HTTPStatusCode: res.StatusCode,
28664		},
28665	}
28666	target := &ret
28667	if err := gensupport.DecodeResponse(target, res); err != nil {
28668		return nil, err
28669	}
28670	return ret, nil
28671	// {
28672	//   "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.",
28673	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
28674	//   "httpMethod": "PATCH",
28675	//   "id": "dialogflow.projects.locations.agent.sessions.entityTypes.patch",
28676	//   "parameterOrder": [
28677	//     "name"
28678	//   ],
28679	//   "parameters": {
28680	//     "name": {
28681	//       "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.",
28682	//       "location": "path",
28683	//       "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
28684	//       "required": true,
28685	//       "type": "string"
28686	//     },
28687	//     "updateMask": {
28688	//       "description": "Optional. The mask to control which fields get updated.",
28689	//       "format": "google-fieldmask",
28690	//       "location": "query",
28691	//       "type": "string"
28692	//     }
28693	//   },
28694	//   "path": "v2beta1/{+name}",
28695	//   "request": {
28696	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
28697	//   },
28698	//   "response": {
28699	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
28700	//   },
28701	//   "scopes": [
28702	//     "https://www.googleapis.com/auth/cloud-platform",
28703	//     "https://www.googleapis.com/auth/dialogflow"
28704	//   ]
28705	// }
28706
28707}
28708
28709// method id "dialogflow.projects.locations.operations.cancel":
28710
28711type ProjectsLocationsOperationsCancelCall struct {
28712	s          *Service
28713	name       string
28714	urlParams_ gensupport.URLParams
28715	ctx_       context.Context
28716	header_    http.Header
28717}
28718
28719// Cancel: Starts asynchronous cancellation on a long-running operation.
28720//  The server
28721// makes a best effort to cancel the operation, but success is
28722// not
28723// guaranteed.  If the server doesn't support this method, it
28724// returns
28725// `google.rpc.Code.UNIMPLEMENTED`.  Clients can
28726// use
28727// Operations.GetOperation or
28728// other methods to check whether the cancellation succeeded or whether
28729// the
28730// operation completed despite cancellation. On successful
28731// cancellation,
28732// the operation is not deleted; instead, it becomes an operation
28733// with
28734// an Operation.error value with a google.rpc.Status.code of
28735// 1,
28736// corresponding to `Code.CANCELLED`.
28737func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall {
28738	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28739	c.name = name
28740	return c
28741}
28742
28743// Fields allows partial responses to be retrieved. See
28744// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28745// for more information.
28746func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
28747	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28748	return c
28749}
28750
28751// Context sets the context to be used in this call's Do method. Any
28752// pending HTTP request will be aborted if the provided context is
28753// canceled.
28754func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
28755	c.ctx_ = ctx
28756	return c
28757}
28758
28759// Header returns an http.Header that can be modified by the caller to
28760// add HTTP headers to the request.
28761func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
28762	if c.header_ == nil {
28763		c.header_ = make(http.Header)
28764	}
28765	return c.header_
28766}
28767
28768func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
28769	reqHeaders := make(http.Header)
28770	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28771	for k, v := range c.header_ {
28772		reqHeaders[k] = v
28773	}
28774	reqHeaders.Set("User-Agent", c.s.userAgent())
28775	var body io.Reader = nil
28776	c.urlParams_.Set("alt", alt)
28777	c.urlParams_.Set("prettyPrint", "false")
28778	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:cancel")
28779	urls += "?" + c.urlParams_.Encode()
28780	req, err := http.NewRequest("POST", urls, body)
28781	if err != nil {
28782		return nil, err
28783	}
28784	req.Header = reqHeaders
28785	googleapi.Expand(req.URL, map[string]string{
28786		"name": c.name,
28787	})
28788	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28789}
28790
28791// Do executes the "dialogflow.projects.locations.operations.cancel" call.
28792// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
28793// non-2xx status code is an error. Response headers are in either
28794// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
28795// returned at all) in error.(*googleapi.Error).Header. Use
28796// googleapi.IsNotModified to check whether the returned error was
28797// because http.StatusNotModified was returned.
28798func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
28799	gensupport.SetOptions(c.urlParams_, opts...)
28800	res, err := c.doRequest("json")
28801	if res != nil && res.StatusCode == http.StatusNotModified {
28802		if res.Body != nil {
28803			res.Body.Close()
28804		}
28805		return nil, &googleapi.Error{
28806			Code:   res.StatusCode,
28807			Header: res.Header,
28808		}
28809	}
28810	if err != nil {
28811		return nil, err
28812	}
28813	defer googleapi.CloseBody(res)
28814	if err := googleapi.CheckResponse(res); err != nil {
28815		return nil, err
28816	}
28817	ret := &GoogleProtobufEmpty{
28818		ServerResponse: googleapi.ServerResponse{
28819			Header:         res.Header,
28820			HTTPStatusCode: res.StatusCode,
28821		},
28822	}
28823	target := &ret
28824	if err := gensupport.DecodeResponse(target, res); err != nil {
28825		return nil, err
28826	}
28827	return ret, nil
28828	// {
28829	//   "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`.",
28830	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
28831	//   "httpMethod": "POST",
28832	//   "id": "dialogflow.projects.locations.operations.cancel",
28833	//   "parameterOrder": [
28834	//     "name"
28835	//   ],
28836	//   "parameters": {
28837	//     "name": {
28838	//       "description": "The name of the operation resource to be cancelled.",
28839	//       "location": "path",
28840	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
28841	//       "required": true,
28842	//       "type": "string"
28843	//     }
28844	//   },
28845	//   "path": "v2beta1/{+name}:cancel",
28846	//   "response": {
28847	//     "$ref": "GoogleProtobufEmpty"
28848	//   },
28849	//   "scopes": [
28850	//     "https://www.googleapis.com/auth/cloud-platform",
28851	//     "https://www.googleapis.com/auth/dialogflow"
28852	//   ]
28853	// }
28854
28855}
28856
28857// method id "dialogflow.projects.locations.operations.get":
28858
28859type ProjectsLocationsOperationsGetCall struct {
28860	s            *Service
28861	name         string
28862	urlParams_   gensupport.URLParams
28863	ifNoneMatch_ string
28864	ctx_         context.Context
28865	header_      http.Header
28866}
28867
28868// Get: Gets the latest state of a long-running operation.  Clients can
28869// use this
28870// method to poll the operation result at intervals as recommended by
28871// the API
28872// service.
28873func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
28874	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28875	c.name = name
28876	return c
28877}
28878
28879// Fields allows partial responses to be retrieved. See
28880// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28881// for more information.
28882func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
28883	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28884	return c
28885}
28886
28887// IfNoneMatch sets the optional parameter which makes the operation
28888// fail if the object's ETag matches the given value. This is useful for
28889// getting updates only after the object has changed since the last
28890// request. Use googleapi.IsNotModified to check whether the response
28891// error from Do is the result of In-None-Match.
28892func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
28893	c.ifNoneMatch_ = entityTag
28894	return c
28895}
28896
28897// Context sets the context to be used in this call's Do method. Any
28898// pending HTTP request will be aborted if the provided context is
28899// canceled.
28900func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
28901	c.ctx_ = ctx
28902	return c
28903}
28904
28905// Header returns an http.Header that can be modified by the caller to
28906// add HTTP headers to the request.
28907func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
28908	if c.header_ == nil {
28909		c.header_ = make(http.Header)
28910	}
28911	return c.header_
28912}
28913
28914func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
28915	reqHeaders := make(http.Header)
28916	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
28917	for k, v := range c.header_ {
28918		reqHeaders[k] = v
28919	}
28920	reqHeaders.Set("User-Agent", c.s.userAgent())
28921	if c.ifNoneMatch_ != "" {
28922		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28923	}
28924	var body io.Reader = nil
28925	c.urlParams_.Set("alt", alt)
28926	c.urlParams_.Set("prettyPrint", "false")
28927	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
28928	urls += "?" + c.urlParams_.Encode()
28929	req, err := http.NewRequest("GET", urls, body)
28930	if err != nil {
28931		return nil, err
28932	}
28933	req.Header = reqHeaders
28934	googleapi.Expand(req.URL, map[string]string{
28935		"name": c.name,
28936	})
28937	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28938}
28939
28940// Do executes the "dialogflow.projects.locations.operations.get" call.
28941// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
28942// Any non-2xx status code is an error. Response headers are in either
28943// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
28944// was returned at all) in error.(*googleapi.Error).Header. Use
28945// googleapi.IsNotModified to check whether the returned error was
28946// because http.StatusNotModified was returned.
28947func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
28948	gensupport.SetOptions(c.urlParams_, opts...)
28949	res, err := c.doRequest("json")
28950	if res != nil && res.StatusCode == http.StatusNotModified {
28951		if res.Body != nil {
28952			res.Body.Close()
28953		}
28954		return nil, &googleapi.Error{
28955			Code:   res.StatusCode,
28956			Header: res.Header,
28957		}
28958	}
28959	if err != nil {
28960		return nil, err
28961	}
28962	defer googleapi.CloseBody(res)
28963	if err := googleapi.CheckResponse(res); err != nil {
28964		return nil, err
28965	}
28966	ret := &GoogleLongrunningOperation{
28967		ServerResponse: googleapi.ServerResponse{
28968			Header:         res.Header,
28969			HTTPStatusCode: res.StatusCode,
28970		},
28971	}
28972	target := &ret
28973	if err := gensupport.DecodeResponse(target, res); err != nil {
28974		return nil, err
28975	}
28976	return ret, nil
28977	// {
28978	//   "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.",
28979	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
28980	//   "httpMethod": "GET",
28981	//   "id": "dialogflow.projects.locations.operations.get",
28982	//   "parameterOrder": [
28983	//     "name"
28984	//   ],
28985	//   "parameters": {
28986	//     "name": {
28987	//       "description": "The name of the operation resource.",
28988	//       "location": "path",
28989	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
28990	//       "required": true,
28991	//       "type": "string"
28992	//     }
28993	//   },
28994	//   "path": "v2beta1/{+name}",
28995	//   "response": {
28996	//     "$ref": "GoogleLongrunningOperation"
28997	//   },
28998	//   "scopes": [
28999	//     "https://www.googleapis.com/auth/cloud-platform",
29000	//     "https://www.googleapis.com/auth/dialogflow"
29001	//   ]
29002	// }
29003
29004}
29005
29006// method id "dialogflow.projects.locations.operations.list":
29007
29008type ProjectsLocationsOperationsListCall struct {
29009	s            *Service
29010	name         string
29011	urlParams_   gensupport.URLParams
29012	ifNoneMatch_ string
29013	ctx_         context.Context
29014	header_      http.Header
29015}
29016
29017// List: Lists operations that match the specified filter in the
29018// request. If the
29019// server doesn't support this method, it returns
29020// `UNIMPLEMENTED`.
29021//
29022// NOTE: the `name` binding allows API services to override the
29023// binding
29024// to use different resource name schemes, such as `users/*/operations`.
29025// To
29026// override the binding, API services can add a binding such
29027// as
29028// "/v1/{name=users/*}/operations" to their service configuration.
29029// For backwards compatibility, the default name includes the
29030// operations
29031// collection id, however overriding users must ensure the name
29032// binding
29033// is the parent resource, without the operations collection id.
29034func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
29035	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29036	c.name = name
29037	return c
29038}
29039
29040// Filter sets the optional parameter "filter": The standard list
29041// filter.
29042func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
29043	c.urlParams_.Set("filter", filter)
29044	return c
29045}
29046
29047// PageSize sets the optional parameter "pageSize": The standard list
29048// page size.
29049func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
29050	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29051	return c
29052}
29053
29054// PageToken sets the optional parameter "pageToken": The standard list
29055// page token.
29056func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
29057	c.urlParams_.Set("pageToken", pageToken)
29058	return c
29059}
29060
29061// Fields allows partial responses to be retrieved. See
29062// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29063// for more information.
29064func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
29065	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29066	return c
29067}
29068
29069// IfNoneMatch sets the optional parameter which makes the operation
29070// fail if the object's ETag matches the given value. This is useful for
29071// getting updates only after the object has changed since the last
29072// request. Use googleapi.IsNotModified to check whether the response
29073// error from Do is the result of In-None-Match.
29074func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
29075	c.ifNoneMatch_ = entityTag
29076	return c
29077}
29078
29079// Context sets the context to be used in this call's Do method. Any
29080// pending HTTP request will be aborted if the provided context is
29081// canceled.
29082func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
29083	c.ctx_ = ctx
29084	return c
29085}
29086
29087// Header returns an http.Header that can be modified by the caller to
29088// add HTTP headers to the request.
29089func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
29090	if c.header_ == nil {
29091		c.header_ = make(http.Header)
29092	}
29093	return c.header_
29094}
29095
29096func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
29097	reqHeaders := make(http.Header)
29098	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
29099	for k, v := range c.header_ {
29100		reqHeaders[k] = v
29101	}
29102	reqHeaders.Set("User-Agent", c.s.userAgent())
29103	if c.ifNoneMatch_ != "" {
29104		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29105	}
29106	var body io.Reader = nil
29107	c.urlParams_.Set("alt", alt)
29108	c.urlParams_.Set("prettyPrint", "false")
29109	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}/operations")
29110	urls += "?" + c.urlParams_.Encode()
29111	req, err := http.NewRequest("GET", urls, body)
29112	if err != nil {
29113		return nil, err
29114	}
29115	req.Header = reqHeaders
29116	googleapi.Expand(req.URL, map[string]string{
29117		"name": c.name,
29118	})
29119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29120}
29121
29122// Do executes the "dialogflow.projects.locations.operations.list" call.
29123// Exactly one of *GoogleLongrunningListOperationsResponse or error will
29124// be non-nil. Any non-2xx status code is an error. Response headers are
29125// in either
29126// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
29127// a response was returned at all) in error.(*googleapi.Error).Header.
29128// Use googleapi.IsNotModified to check whether the returned error was
29129// because http.StatusNotModified was returned.
29130func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
29131	gensupport.SetOptions(c.urlParams_, opts...)
29132	res, err := c.doRequest("json")
29133	if res != nil && res.StatusCode == http.StatusNotModified {
29134		if res.Body != nil {
29135			res.Body.Close()
29136		}
29137		return nil, &googleapi.Error{
29138			Code:   res.StatusCode,
29139			Header: res.Header,
29140		}
29141	}
29142	if err != nil {
29143		return nil, err
29144	}
29145	defer googleapi.CloseBody(res)
29146	if err := googleapi.CheckResponse(res); err != nil {
29147		return nil, err
29148	}
29149	ret := &GoogleLongrunningListOperationsResponse{
29150		ServerResponse: googleapi.ServerResponse{
29151			Header:         res.Header,
29152			HTTPStatusCode: res.StatusCode,
29153		},
29154	}
29155	target := &ret
29156	if err := gensupport.DecodeResponse(target, res); err != nil {
29157		return nil, err
29158	}
29159	return ret, nil
29160	// {
29161	//   "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.",
29162	//   "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/operations",
29163	//   "httpMethod": "GET",
29164	//   "id": "dialogflow.projects.locations.operations.list",
29165	//   "parameterOrder": [
29166	//     "name"
29167	//   ],
29168	//   "parameters": {
29169	//     "filter": {
29170	//       "description": "The standard list filter.",
29171	//       "location": "query",
29172	//       "type": "string"
29173	//     },
29174	//     "name": {
29175	//       "description": "The name of the operation's parent resource.",
29176	//       "location": "path",
29177	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
29178	//       "required": true,
29179	//       "type": "string"
29180	//     },
29181	//     "pageSize": {
29182	//       "description": "The standard list page size.",
29183	//       "format": "int32",
29184	//       "location": "query",
29185	//       "type": "integer"
29186	//     },
29187	//     "pageToken": {
29188	//       "description": "The standard list page token.",
29189	//       "location": "query",
29190	//       "type": "string"
29191	//     }
29192	//   },
29193	//   "path": "v2beta1/{+name}/operations",
29194	//   "response": {
29195	//     "$ref": "GoogleLongrunningListOperationsResponse"
29196	//   },
29197	//   "scopes": [
29198	//     "https://www.googleapis.com/auth/cloud-platform",
29199	//     "https://www.googleapis.com/auth/dialogflow"
29200	//   ]
29201	// }
29202
29203}
29204
29205// Pages invokes f for each page of results.
29206// A non-nil error returned from f will halt the iteration.
29207// The provided context supersedes any context provided to the Context method.
29208func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
29209	c.ctx_ = ctx
29210	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29211	for {
29212		x, err := c.Do()
29213		if err != nil {
29214			return err
29215		}
29216		if err := f(x); err != nil {
29217			return err
29218		}
29219		if x.NextPageToken == "" {
29220			return nil
29221		}
29222		c.PageToken(x.NextPageToken)
29223	}
29224}
29225
29226// method id "dialogflow.projects.operations.cancel":
29227
29228type ProjectsOperationsCancelCall struct {
29229	s          *Service
29230	name       string
29231	urlParams_ gensupport.URLParams
29232	ctx_       context.Context
29233	header_    http.Header
29234}
29235
29236// Cancel: Starts asynchronous cancellation on a long-running operation.
29237//  The server
29238// makes a best effort to cancel the operation, but success is
29239// not
29240// guaranteed.  If the server doesn't support this method, it
29241// returns
29242// `google.rpc.Code.UNIMPLEMENTED`.  Clients can
29243// use
29244// Operations.GetOperation or
29245// other methods to check whether the cancellation succeeded or whether
29246// the
29247// operation completed despite cancellation. On successful
29248// cancellation,
29249// the operation is not deleted; instead, it becomes an operation
29250// with
29251// an Operation.error value with a google.rpc.Status.code of
29252// 1,
29253// corresponding to `Code.CANCELLED`.
29254func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall {
29255	c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29256	c.name = name
29257	return c
29258}
29259
29260// Fields allows partial responses to be retrieved. See
29261// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29262// for more information.
29263func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall {
29264	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29265	return c
29266}
29267
29268// Context sets the context to be used in this call's Do method. Any
29269// pending HTTP request will be aborted if the provided context is
29270// canceled.
29271func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall {
29272	c.ctx_ = ctx
29273	return c
29274}
29275
29276// Header returns an http.Header that can be modified by the caller to
29277// add HTTP headers to the request.
29278func (c *ProjectsOperationsCancelCall) Header() http.Header {
29279	if c.header_ == nil {
29280		c.header_ = make(http.Header)
29281	}
29282	return c.header_
29283}
29284
29285func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
29286	reqHeaders := make(http.Header)
29287	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
29288	for k, v := range c.header_ {
29289		reqHeaders[k] = v
29290	}
29291	reqHeaders.Set("User-Agent", c.s.userAgent())
29292	var body io.Reader = nil
29293	c.urlParams_.Set("alt", alt)
29294	c.urlParams_.Set("prettyPrint", "false")
29295	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:cancel")
29296	urls += "?" + c.urlParams_.Encode()
29297	req, err := http.NewRequest("POST", urls, body)
29298	if err != nil {
29299		return nil, err
29300	}
29301	req.Header = reqHeaders
29302	googleapi.Expand(req.URL, map[string]string{
29303		"name": c.name,
29304	})
29305	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29306}
29307
29308// Do executes the "dialogflow.projects.operations.cancel" call.
29309// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
29310// non-2xx status code is an error. Response headers are in either
29311// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
29312// returned at all) in error.(*googleapi.Error).Header. Use
29313// googleapi.IsNotModified to check whether the returned error was
29314// because http.StatusNotModified was returned.
29315func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
29316	gensupport.SetOptions(c.urlParams_, opts...)
29317	res, err := c.doRequest("json")
29318	if res != nil && res.StatusCode == http.StatusNotModified {
29319		if res.Body != nil {
29320			res.Body.Close()
29321		}
29322		return nil, &googleapi.Error{
29323			Code:   res.StatusCode,
29324			Header: res.Header,
29325		}
29326	}
29327	if err != nil {
29328		return nil, err
29329	}
29330	defer googleapi.CloseBody(res)
29331	if err := googleapi.CheckResponse(res); err != nil {
29332		return nil, err
29333	}
29334	ret := &GoogleProtobufEmpty{
29335		ServerResponse: googleapi.ServerResponse{
29336			Header:         res.Header,
29337			HTTPStatusCode: res.StatusCode,
29338		},
29339	}
29340	target := &ret
29341	if err := gensupport.DecodeResponse(target, res); err != nil {
29342		return nil, err
29343	}
29344	return ret, nil
29345	// {
29346	//   "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`.",
29347	//   "flatPath": "v2beta1/projects/{projectsId}/operations/{operationsId}:cancel",
29348	//   "httpMethod": "POST",
29349	//   "id": "dialogflow.projects.operations.cancel",
29350	//   "parameterOrder": [
29351	//     "name"
29352	//   ],
29353	//   "parameters": {
29354	//     "name": {
29355	//       "description": "The name of the operation resource to be cancelled.",
29356	//       "location": "path",
29357	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
29358	//       "required": true,
29359	//       "type": "string"
29360	//     }
29361	//   },
29362	//   "path": "v2beta1/{+name}:cancel",
29363	//   "response": {
29364	//     "$ref": "GoogleProtobufEmpty"
29365	//   },
29366	//   "scopes": [
29367	//     "https://www.googleapis.com/auth/cloud-platform",
29368	//     "https://www.googleapis.com/auth/dialogflow"
29369	//   ]
29370	// }
29371
29372}
29373
29374// method id "dialogflow.projects.operations.get":
29375
29376type ProjectsOperationsGetCall struct {
29377	s            *Service
29378	name         string
29379	urlParams_   gensupport.URLParams
29380	ifNoneMatch_ string
29381	ctx_         context.Context
29382	header_      http.Header
29383}
29384
29385// Get: Gets the latest state of a long-running operation.  Clients can
29386// use this
29387// method to poll the operation result at intervals as recommended by
29388// the API
29389// service.
29390func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
29391	c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29392	c.name = name
29393	return c
29394}
29395
29396// Fields allows partial responses to be retrieved. See
29397// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29398// for more information.
29399func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
29400	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29401	return c
29402}
29403
29404// IfNoneMatch sets the optional parameter which makes the operation
29405// fail if the object's ETag matches the given value. This is useful for
29406// getting updates only after the object has changed since the last
29407// request. Use googleapi.IsNotModified to check whether the response
29408// error from Do is the result of In-None-Match.
29409func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
29410	c.ifNoneMatch_ = entityTag
29411	return c
29412}
29413
29414// Context sets the context to be used in this call's Do method. Any
29415// pending HTTP request will be aborted if the provided context is
29416// canceled.
29417func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
29418	c.ctx_ = ctx
29419	return c
29420}
29421
29422// Header returns an http.Header that can be modified by the caller to
29423// add HTTP headers to the request.
29424func (c *ProjectsOperationsGetCall) Header() http.Header {
29425	if c.header_ == nil {
29426		c.header_ = make(http.Header)
29427	}
29428	return c.header_
29429}
29430
29431func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
29432	reqHeaders := make(http.Header)
29433	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
29434	for k, v := range c.header_ {
29435		reqHeaders[k] = v
29436	}
29437	reqHeaders.Set("User-Agent", c.s.userAgent())
29438	if c.ifNoneMatch_ != "" {
29439		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29440	}
29441	var body io.Reader = nil
29442	c.urlParams_.Set("alt", alt)
29443	c.urlParams_.Set("prettyPrint", "false")
29444	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
29445	urls += "?" + c.urlParams_.Encode()
29446	req, err := http.NewRequest("GET", urls, body)
29447	if err != nil {
29448		return nil, err
29449	}
29450	req.Header = reqHeaders
29451	googleapi.Expand(req.URL, map[string]string{
29452		"name": c.name,
29453	})
29454	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29455}
29456
29457// Do executes the "dialogflow.projects.operations.get" call.
29458// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
29459// Any non-2xx status code is an error. Response headers are in either
29460// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
29461// was returned at all) in error.(*googleapi.Error).Header. Use
29462// googleapi.IsNotModified to check whether the returned error was
29463// because http.StatusNotModified was returned.
29464func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
29465	gensupport.SetOptions(c.urlParams_, opts...)
29466	res, err := c.doRequest("json")
29467	if res != nil && res.StatusCode == http.StatusNotModified {
29468		if res.Body != nil {
29469			res.Body.Close()
29470		}
29471		return nil, &googleapi.Error{
29472			Code:   res.StatusCode,
29473			Header: res.Header,
29474		}
29475	}
29476	if err != nil {
29477		return nil, err
29478	}
29479	defer googleapi.CloseBody(res)
29480	if err := googleapi.CheckResponse(res); err != nil {
29481		return nil, err
29482	}
29483	ret := &GoogleLongrunningOperation{
29484		ServerResponse: googleapi.ServerResponse{
29485			Header:         res.Header,
29486			HTTPStatusCode: res.StatusCode,
29487		},
29488	}
29489	target := &ret
29490	if err := gensupport.DecodeResponse(target, res); err != nil {
29491		return nil, err
29492	}
29493	return ret, nil
29494	// {
29495	//   "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.",
29496	//   "flatPath": "v2beta1/projects/{projectsId}/operations/{operationsId}",
29497	//   "httpMethod": "GET",
29498	//   "id": "dialogflow.projects.operations.get",
29499	//   "parameterOrder": [
29500	//     "name"
29501	//   ],
29502	//   "parameters": {
29503	//     "name": {
29504	//       "description": "The name of the operation resource.",
29505	//       "location": "path",
29506	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
29507	//       "required": true,
29508	//       "type": "string"
29509	//     }
29510	//   },
29511	//   "path": "v2beta1/{+name}",
29512	//   "response": {
29513	//     "$ref": "GoogleLongrunningOperation"
29514	//   },
29515	//   "scopes": [
29516	//     "https://www.googleapis.com/auth/cloud-platform",
29517	//     "https://www.googleapis.com/auth/dialogflow"
29518	//   ]
29519	// }
29520
29521}
29522
29523// method id "dialogflow.projects.operations.list":
29524
29525type ProjectsOperationsListCall struct {
29526	s            *Service
29527	name         string
29528	urlParams_   gensupport.URLParams
29529	ifNoneMatch_ string
29530	ctx_         context.Context
29531	header_      http.Header
29532}
29533
29534// List: Lists operations that match the specified filter in the
29535// request. If the
29536// server doesn't support this method, it returns
29537// `UNIMPLEMENTED`.
29538//
29539// NOTE: the `name` binding allows API services to override the
29540// binding
29541// to use different resource name schemes, such as `users/*/operations`.
29542// To
29543// override the binding, API services can add a binding such
29544// as
29545// "/v1/{name=users/*}/operations" to their service configuration.
29546// For backwards compatibility, the default name includes the
29547// operations
29548// collection id, however overriding users must ensure the name
29549// binding
29550// is the parent resource, without the operations collection id.
29551func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall {
29552	c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29553	c.name = name
29554	return c
29555}
29556
29557// Filter sets the optional parameter "filter": The standard list
29558// filter.
29559func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall {
29560	c.urlParams_.Set("filter", filter)
29561	return c
29562}
29563
29564// PageSize sets the optional parameter "pageSize": The standard list
29565// page size.
29566func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall {
29567	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29568	return c
29569}
29570
29571// PageToken sets the optional parameter "pageToken": The standard list
29572// page token.
29573func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall {
29574	c.urlParams_.Set("pageToken", pageToken)
29575	return c
29576}
29577
29578// Fields allows partial responses to be retrieved. See
29579// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29580// for more information.
29581func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall {
29582	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29583	return c
29584}
29585
29586// IfNoneMatch sets the optional parameter which makes the operation
29587// fail if the object's ETag matches the given value. This is useful for
29588// getting updates only after the object has changed since the last
29589// request. Use googleapi.IsNotModified to check whether the response
29590// error from Do is the result of In-None-Match.
29591func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall {
29592	c.ifNoneMatch_ = entityTag
29593	return c
29594}
29595
29596// Context sets the context to be used in this call's Do method. Any
29597// pending HTTP request will be aborted if the provided context is
29598// canceled.
29599func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall {
29600	c.ctx_ = ctx
29601	return c
29602}
29603
29604// Header returns an http.Header that can be modified by the caller to
29605// add HTTP headers to the request.
29606func (c *ProjectsOperationsListCall) Header() http.Header {
29607	if c.header_ == nil {
29608		c.header_ = make(http.Header)
29609	}
29610	return c.header_
29611}
29612
29613func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
29614	reqHeaders := make(http.Header)
29615	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
29616	for k, v := range c.header_ {
29617		reqHeaders[k] = v
29618	}
29619	reqHeaders.Set("User-Agent", c.s.userAgent())
29620	if c.ifNoneMatch_ != "" {
29621		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29622	}
29623	var body io.Reader = nil
29624	c.urlParams_.Set("alt", alt)
29625	c.urlParams_.Set("prettyPrint", "false")
29626	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}/operations")
29627	urls += "?" + c.urlParams_.Encode()
29628	req, err := http.NewRequest("GET", urls, body)
29629	if err != nil {
29630		return nil, err
29631	}
29632	req.Header = reqHeaders
29633	googleapi.Expand(req.URL, map[string]string{
29634		"name": c.name,
29635	})
29636	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29637}
29638
29639// Do executes the "dialogflow.projects.operations.list" call.
29640// Exactly one of *GoogleLongrunningListOperationsResponse or error will
29641// be non-nil. Any non-2xx status code is an error. Response headers are
29642// in either
29643// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
29644// a response was returned at all) in error.(*googleapi.Error).Header.
29645// Use googleapi.IsNotModified to check whether the returned error was
29646// because http.StatusNotModified was returned.
29647func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
29648	gensupport.SetOptions(c.urlParams_, opts...)
29649	res, err := c.doRequest("json")
29650	if res != nil && res.StatusCode == http.StatusNotModified {
29651		if res.Body != nil {
29652			res.Body.Close()
29653		}
29654		return nil, &googleapi.Error{
29655			Code:   res.StatusCode,
29656			Header: res.Header,
29657		}
29658	}
29659	if err != nil {
29660		return nil, err
29661	}
29662	defer googleapi.CloseBody(res)
29663	if err := googleapi.CheckResponse(res); err != nil {
29664		return nil, err
29665	}
29666	ret := &GoogleLongrunningListOperationsResponse{
29667		ServerResponse: googleapi.ServerResponse{
29668			Header:         res.Header,
29669			HTTPStatusCode: res.StatusCode,
29670		},
29671	}
29672	target := &ret
29673	if err := gensupport.DecodeResponse(target, res); err != nil {
29674		return nil, err
29675	}
29676	return ret, nil
29677	// {
29678	//   "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.",
29679	//   "flatPath": "v2beta1/projects/{projectsId}/operations",
29680	//   "httpMethod": "GET",
29681	//   "id": "dialogflow.projects.operations.list",
29682	//   "parameterOrder": [
29683	//     "name"
29684	//   ],
29685	//   "parameters": {
29686	//     "filter": {
29687	//       "description": "The standard list filter.",
29688	//       "location": "query",
29689	//       "type": "string"
29690	//     },
29691	//     "name": {
29692	//       "description": "The name of the operation's parent resource.",
29693	//       "location": "path",
29694	//       "pattern": "^projects/[^/]+$",
29695	//       "required": true,
29696	//       "type": "string"
29697	//     },
29698	//     "pageSize": {
29699	//       "description": "The standard list page size.",
29700	//       "format": "int32",
29701	//       "location": "query",
29702	//       "type": "integer"
29703	//     },
29704	//     "pageToken": {
29705	//       "description": "The standard list page token.",
29706	//       "location": "query",
29707	//       "type": "string"
29708	//     }
29709	//   },
29710	//   "path": "v2beta1/{+name}/operations",
29711	//   "response": {
29712	//     "$ref": "GoogleLongrunningListOperationsResponse"
29713	//   },
29714	//   "scopes": [
29715	//     "https://www.googleapis.com/auth/cloud-platform",
29716	//     "https://www.googleapis.com/auth/dialogflow"
29717	//   ]
29718	// }
29719
29720}
29721
29722// Pages invokes f for each page of results.
29723// A non-nil error returned from f will halt the iteration.
29724// The provided context supersedes any context provided to the Context method.
29725func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
29726	c.ctx_ = ctx
29727	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29728	for {
29729		x, err := c.Do()
29730		if err != nil {
29731			return err
29732		}
29733		if err := f(x); err != nil {
29734			return err
29735		}
29736		if x.NextPageToken == "" {
29737			return nil
29738		}
29739		c.PageToken(x.NextPageToken)
29740	}
29741}
29742