1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package dialogflow provides access to the Dialogflow API.
8//
9// This package is DEPRECATED. Use package cloud.google.com/go/dialogflow/apiv2 instead.
10//
11// For product documentation, see: https://cloud.google.com/dialogflow/
12//
13// Creating a client
14//
15// Usage example:
16//
17//   import "google.golang.org/api/dialogflow/v2beta1"
18//   ...
19//   ctx := context.Background()
20//   dialogflowService, err := dialogflow.NewService(ctx)
21//
22// In this example, Google Application Default Credentials are used for authentication.
23//
24// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
25//
26// Other authentication options
27//
28// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
29//
30//   dialogflowService, err := dialogflow.NewService(ctx, option.WithScopes(dialogflow.DialogflowScope))
31//
32// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
33//
34//   dialogflowService, err := dialogflow.NewService(ctx, option.WithAPIKey("AIza..."))
35//
36// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
37//
38//   config := &oauth2.Config{...}
39//   // ...
40//   token, err := config.Exchange(ctx, ...)
41//   dialogflowService, err := dialogflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
42//
43// See https://godoc.org/google.golang.org/api/option/ for details on options.
44package dialogflow // import "google.golang.org/api/dialogflow/v2beta1"
45
46import (
47	"bytes"
48	"context"
49	"encoding/json"
50	"errors"
51	"fmt"
52	"io"
53	"net/http"
54	"net/url"
55	"strconv"
56	"strings"
57
58	gensupport "google.golang.org/api/gensupport"
59	googleapi "google.golang.org/api/googleapi"
60	option "google.golang.org/api/option"
61	htransport "google.golang.org/api/transport/http"
62)
63
64// Always reference these packages, just in case the auto-generated code
65// below doesn't.
66var _ = bytes.NewBuffer
67var _ = strconv.Itoa
68var _ = fmt.Sprintf
69var _ = json.NewDecoder
70var _ = io.Copy
71var _ = url.Parse
72var _ = gensupport.MarshalJSON
73var _ = googleapi.Version
74var _ = errors.New
75var _ = strings.Replace
76var _ = context.Canceled
77
78const apiId = "dialogflow:v2beta1"
79const apiName = "dialogflow"
80const apiVersion = "v2beta1"
81const basePath = "https://dialogflow.googleapis.com/"
82
83// OAuth2 scopes used by this API.
84const (
85	// View and manage your data across Google Cloud Platform services
86	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
87
88	// View, manage and query your Dialogflow agents
89	DialogflowScope = "https://www.googleapis.com/auth/dialogflow"
90)
91
92// NewService creates a new Service.
93func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
94	scopesOption := option.WithScopes(
95		"https://www.googleapis.com/auth/cloud-platform",
96		"https://www.googleapis.com/auth/dialogflow",
97	)
98	// NOTE: prepend, so we don't override user-specified scopes.
99	opts = append([]option.ClientOption{scopesOption}, opts...)
100	client, endpoint, err := htransport.NewClient(ctx, opts...)
101	if err != nil {
102		return nil, err
103	}
104	s, err := New(client)
105	if err != nil {
106		return nil, err
107	}
108	if endpoint != "" {
109		s.BasePath = endpoint
110	}
111	return s, nil
112}
113
114// New creates a new Service. It uses the provided http.Client for requests.
115//
116// Deprecated: please use NewService instead.
117// To provide a custom HTTP client, use option.WithHTTPClient.
118// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
119func New(client *http.Client) (*Service, error) {
120	if client == nil {
121		return nil, errors.New("client is nil")
122	}
123	s := &Service{client: client, BasePath: basePath}
124	s.Projects = NewProjectsService(s)
125	return s, nil
126}
127
128type Service struct {
129	client    *http.Client
130	BasePath  string // API endpoint base URL
131	UserAgent string // optional additional User-Agent fragment
132
133	Projects *ProjectsService
134}
135
136func (s *Service) userAgent() string {
137	if s.UserAgent == "" {
138		return googleapi.UserAgent
139	}
140	return googleapi.UserAgent + " " + s.UserAgent
141}
142
143func NewProjectsService(s *Service) *ProjectsService {
144	rs := &ProjectsService{s: s}
145	rs.Agent_ = NewProjectsAgentService(s)
146	rs.KnowledgeBases = NewProjectsKnowledgeBasesService(s)
147	rs.Operations = NewProjectsOperationsService(s)
148	return rs
149}
150
151type ProjectsService struct {
152	s *Service
153
154	Agent_ *ProjectsAgentService
155
156	KnowledgeBases *ProjectsKnowledgeBasesService
157
158	Operations *ProjectsOperationsService
159}
160
161func NewProjectsAgentService(s *Service) *ProjectsAgentService {
162	rs := &ProjectsAgentService{s: s}
163	rs.EntityTypes = NewProjectsAgentEntityTypesService(s)
164	rs.Environments = NewProjectsAgentEnvironmentsService(s)
165	rs.Intents = NewProjectsAgentIntentsService(s)
166	rs.KnowledgeBases = NewProjectsAgentKnowledgeBasesService(s)
167	rs.Sessions = NewProjectsAgentSessionsService(s)
168	return rs
169}
170
171type ProjectsAgentService struct {
172	s *Service
173
174	EntityTypes *ProjectsAgentEntityTypesService
175
176	Environments *ProjectsAgentEnvironmentsService
177
178	Intents *ProjectsAgentIntentsService
179
180	KnowledgeBases *ProjectsAgentKnowledgeBasesService
181
182	Sessions *ProjectsAgentSessionsService
183}
184
185func NewProjectsAgentEntityTypesService(s *Service) *ProjectsAgentEntityTypesService {
186	rs := &ProjectsAgentEntityTypesService{s: s}
187	rs.Entities = NewProjectsAgentEntityTypesEntitiesService(s)
188	return rs
189}
190
191type ProjectsAgentEntityTypesService struct {
192	s *Service
193
194	Entities *ProjectsAgentEntityTypesEntitiesService
195}
196
197func NewProjectsAgentEntityTypesEntitiesService(s *Service) *ProjectsAgentEntityTypesEntitiesService {
198	rs := &ProjectsAgentEntityTypesEntitiesService{s: s}
199	return rs
200}
201
202type ProjectsAgentEntityTypesEntitiesService struct {
203	s *Service
204}
205
206func NewProjectsAgentEnvironmentsService(s *Service) *ProjectsAgentEnvironmentsService {
207	rs := &ProjectsAgentEnvironmentsService{s: s}
208	rs.Users = NewProjectsAgentEnvironmentsUsersService(s)
209	return rs
210}
211
212type ProjectsAgentEnvironmentsService struct {
213	s *Service
214
215	Users *ProjectsAgentEnvironmentsUsersService
216}
217
218func NewProjectsAgentEnvironmentsUsersService(s *Service) *ProjectsAgentEnvironmentsUsersService {
219	rs := &ProjectsAgentEnvironmentsUsersService{s: s}
220	rs.Sessions = NewProjectsAgentEnvironmentsUsersSessionsService(s)
221	return rs
222}
223
224type ProjectsAgentEnvironmentsUsersService struct {
225	s *Service
226
227	Sessions *ProjectsAgentEnvironmentsUsersSessionsService
228}
229
230func NewProjectsAgentEnvironmentsUsersSessionsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsService {
231	rs := &ProjectsAgentEnvironmentsUsersSessionsService{s: s}
232	rs.Contexts = NewProjectsAgentEnvironmentsUsersSessionsContextsService(s)
233	rs.EntityTypes = NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s)
234	return rs
235}
236
237type ProjectsAgentEnvironmentsUsersSessionsService struct {
238	s *Service
239
240	Contexts *ProjectsAgentEnvironmentsUsersSessionsContextsService
241
242	EntityTypes *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService
243}
244
245func NewProjectsAgentEnvironmentsUsersSessionsContextsService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsContextsService {
246	rs := &ProjectsAgentEnvironmentsUsersSessionsContextsService{s: s}
247	return rs
248}
249
250type ProjectsAgentEnvironmentsUsersSessionsContextsService struct {
251	s *Service
252}
253
254func NewProjectsAgentEnvironmentsUsersSessionsEntityTypesService(s *Service) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService {
255	rs := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesService{s: s}
256	return rs
257}
258
259type ProjectsAgentEnvironmentsUsersSessionsEntityTypesService struct {
260	s *Service
261}
262
263func NewProjectsAgentIntentsService(s *Service) *ProjectsAgentIntentsService {
264	rs := &ProjectsAgentIntentsService{s: s}
265	return rs
266}
267
268type ProjectsAgentIntentsService struct {
269	s *Service
270}
271
272func NewProjectsAgentKnowledgeBasesService(s *Service) *ProjectsAgentKnowledgeBasesService {
273	rs := &ProjectsAgentKnowledgeBasesService{s: s}
274	rs.Documents = NewProjectsAgentKnowledgeBasesDocumentsService(s)
275	return rs
276}
277
278type ProjectsAgentKnowledgeBasesService struct {
279	s *Service
280
281	Documents *ProjectsAgentKnowledgeBasesDocumentsService
282}
283
284func NewProjectsAgentKnowledgeBasesDocumentsService(s *Service) *ProjectsAgentKnowledgeBasesDocumentsService {
285	rs := &ProjectsAgentKnowledgeBasesDocumentsService{s: s}
286	return rs
287}
288
289type ProjectsAgentKnowledgeBasesDocumentsService struct {
290	s *Service
291}
292
293func NewProjectsAgentSessionsService(s *Service) *ProjectsAgentSessionsService {
294	rs := &ProjectsAgentSessionsService{s: s}
295	rs.Contexts = NewProjectsAgentSessionsContextsService(s)
296	rs.EntityTypes = NewProjectsAgentSessionsEntityTypesService(s)
297	return rs
298}
299
300type ProjectsAgentSessionsService struct {
301	s *Service
302
303	Contexts *ProjectsAgentSessionsContextsService
304
305	EntityTypes *ProjectsAgentSessionsEntityTypesService
306}
307
308func NewProjectsAgentSessionsContextsService(s *Service) *ProjectsAgentSessionsContextsService {
309	rs := &ProjectsAgentSessionsContextsService{s: s}
310	return rs
311}
312
313type ProjectsAgentSessionsContextsService struct {
314	s *Service
315}
316
317func NewProjectsAgentSessionsEntityTypesService(s *Service) *ProjectsAgentSessionsEntityTypesService {
318	rs := &ProjectsAgentSessionsEntityTypesService{s: s}
319	return rs
320}
321
322type ProjectsAgentSessionsEntityTypesService struct {
323	s *Service
324}
325
326func NewProjectsKnowledgeBasesService(s *Service) *ProjectsKnowledgeBasesService {
327	rs := &ProjectsKnowledgeBasesService{s: s}
328	rs.Documents = NewProjectsKnowledgeBasesDocumentsService(s)
329	return rs
330}
331
332type ProjectsKnowledgeBasesService struct {
333	s *Service
334
335	Documents *ProjectsKnowledgeBasesDocumentsService
336}
337
338func NewProjectsKnowledgeBasesDocumentsService(s *Service) *ProjectsKnowledgeBasesDocumentsService {
339	rs := &ProjectsKnowledgeBasesDocumentsService{s: s}
340	return rs
341}
342
343type ProjectsKnowledgeBasesDocumentsService struct {
344	s *Service
345}
346
347func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
348	rs := &ProjectsOperationsService{s: s}
349	return rs
350}
351
352type ProjectsOperationsService struct {
353	s *Service
354}
355
356// GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse: The response
357// message for EntityTypes.BatchUpdateEntityTypes.
358type GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse struct {
359	// EntityTypes: The collection of updated or created entity types.
360	EntityTypes []*GoogleCloudDialogflowV2EntityType `json:"entityTypes,omitempty"`
361
362	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
363	// unconditionally include in API requests. By default, fields with
364	// empty values are omitted from API requests. However, any non-pointer,
365	// non-interface field appearing in ForceSendFields will be sent to the
366	// server regardless of whether the field is empty or not. This may be
367	// used to include empty fields in Patch requests.
368	ForceSendFields []string `json:"-"`
369
370	// NullFields is a list of field names (e.g. "EntityTypes") to include
371	// in API requests with the JSON null value. By default, fields with
372	// empty values are omitted from API requests. However, any field with
373	// an empty value appearing in NullFields will be sent to the server as
374	// null. It is an error if a field in this list has a non-empty value.
375	// This may be used to include null fields in Patch requests.
376	NullFields []string `json:"-"`
377}
378
379func (s *GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) {
380	type NoMethod GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
381	raw := NoMethod(*s)
382	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
383}
384
385// GoogleCloudDialogflowV2BatchUpdateIntentsResponse: The response
386// message for Intents.BatchUpdateIntents.
387type GoogleCloudDialogflowV2BatchUpdateIntentsResponse struct {
388	// Intents: The collection of updated or created intents.
389	Intents []*GoogleCloudDialogflowV2Intent `json:"intents,omitempty"`
390
391	// ForceSendFields is a list of field names (e.g. "Intents") to
392	// unconditionally include in API requests. By default, fields with
393	// empty values are omitted from API requests. However, any non-pointer,
394	// non-interface field appearing in ForceSendFields will be sent to the
395	// server regardless of whether the field is empty or not. This may be
396	// used to include empty fields in Patch requests.
397	ForceSendFields []string `json:"-"`
398
399	// NullFields is a list of field names (e.g. "Intents") to include in
400	// API requests with the JSON null value. By default, fields with empty
401	// values are omitted from API requests. However, any field with an
402	// empty value appearing in NullFields will be sent to the server as
403	// null. It is an error if a field in this list has a non-empty value.
404	// This may be used to include null fields in Patch requests.
405	NullFields []string `json:"-"`
406}
407
408func (s *GoogleCloudDialogflowV2BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) {
409	type NoMethod GoogleCloudDialogflowV2BatchUpdateIntentsResponse
410	raw := NoMethod(*s)
411	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
412}
413
414// GoogleCloudDialogflowV2Context: Represents a context.
415type GoogleCloudDialogflowV2Context struct {
416	// LifespanCount: Optional. The number of conversational query requests
417	// after which the
418	// context expires. If set to `0` (the default) the context
419	// expires
420	// immediately. Contexts expire automatically after 20 minutes if
421	// there
422	// are no matching queries.
423	LifespanCount int64 `json:"lifespanCount,omitempty"`
424
425	// Name: Required. The unique identifier of the context.
426	// Format:
427	// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context
428	// ID>`.
429	//
430	// The `Context ID` is always converted to lowercase, may only
431	// contain
432	// characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
433	Name string `json:"name,omitempty"`
434
435	// Parameters: Optional. The collection of parameters associated with
436	// this context.
437	// Refer to
438	// [this
439	// doc](https://cloud.google.com/dialogflow/docs/intents-actions-pa
440	// rameters)
441	// for syntax.
442	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
443
444	// ForceSendFields is a list of field names (e.g. "LifespanCount") to
445	// unconditionally include in API requests. By default, fields with
446	// empty values are omitted from API requests. However, any non-pointer,
447	// non-interface field appearing in ForceSendFields will be sent to the
448	// server regardless of whether the field is empty or not. This may be
449	// used to include empty fields in Patch requests.
450	ForceSendFields []string `json:"-"`
451
452	// NullFields is a list of field names (e.g. "LifespanCount") to include
453	// in API requests with the JSON null value. By default, fields with
454	// empty values are omitted from API requests. However, any field with
455	// an empty value appearing in NullFields will be sent to the server as
456	// null. It is an error if a field in this list has a non-empty value.
457	// This may be used to include null fields in Patch requests.
458	NullFields []string `json:"-"`
459}
460
461func (s *GoogleCloudDialogflowV2Context) MarshalJSON() ([]byte, error) {
462	type NoMethod GoogleCloudDialogflowV2Context
463	raw := NoMethod(*s)
464	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
465}
466
467// GoogleCloudDialogflowV2EntityType: Represents an entity type.
468// Entity types serve as a tool for extracting parameter values from
469// natural
470// language queries.
471type GoogleCloudDialogflowV2EntityType struct {
472	// AutoExpansionMode: Optional. Indicates whether the entity type can be
473	// automatically
474	// expanded.
475	//
476	// Possible values:
477	//   "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the
478	// entity.
479	//   "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values
480	// that have not been explicitly
481	// listed in the entity.
482	AutoExpansionMode string `json:"autoExpansionMode,omitempty"`
483
484	// DisplayName: Required. The name of the entity type.
485	DisplayName string `json:"displayName,omitempty"`
486
487	// Entities: Optional. The collection of entity entries associated with
488	// the entity type.
489	Entities []*GoogleCloudDialogflowV2EntityTypeEntity `json:"entities,omitempty"`
490
491	// Kind: Required. Indicates the kind of entity type.
492	//
493	// Possible values:
494	//   "KIND_UNSPECIFIED" - Not specified. This value should be never
495	// used.
496	//   "KIND_MAP" - Map entity types allow mapping of a group of synonyms
497	// to a canonical
498	// value.
499	//   "KIND_LIST" - List entity types contain a set of entries that do
500	// not map to canonical
501	// values. However, list entity types can contain references to other
502	// entity
503	// types (with or without aliases).
504	Kind string `json:"kind,omitempty"`
505
506	// Name: The unique identifier of the entity type.
507	// Required for EntityTypes.UpdateEntityType
508	// and
509	// EntityTypes.BatchUpdateEntityTypes methods.
510	// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
511	Name string `json:"name,omitempty"`
512
513	// ForceSendFields is a list of field names (e.g. "AutoExpansionMode")
514	// to unconditionally include in API requests. By default, fields with
515	// empty values are omitted from API requests. However, any non-pointer,
516	// non-interface field appearing in ForceSendFields will be sent to the
517	// server regardless of whether the field is empty or not. This may be
518	// used to include empty fields in Patch requests.
519	ForceSendFields []string `json:"-"`
520
521	// NullFields is a list of field names (e.g. "AutoExpansionMode") to
522	// include in API requests with the JSON null value. By default, fields
523	// with empty values are omitted from API requests. However, any field
524	// with an empty value appearing in NullFields will be sent to the
525	// server as null. It is an error if a field in this list has a
526	// non-empty value. This may be used to include null fields in Patch
527	// requests.
528	NullFields []string `json:"-"`
529}
530
531func (s *GoogleCloudDialogflowV2EntityType) MarshalJSON() ([]byte, error) {
532	type NoMethod GoogleCloudDialogflowV2EntityType
533	raw := NoMethod(*s)
534	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
535}
536
537// GoogleCloudDialogflowV2EntityTypeEntity: An **entity entry** for an
538// associated entity type.
539type GoogleCloudDialogflowV2EntityTypeEntity struct {
540	// Synonyms: Required. A collection of value synonyms. For example, if
541	// the entity type
542	// is *vegetable*, and `value` is *scallions*, a synonym could be
543	// *green
544	// onions*.
545	//
546	// For `KIND_LIST` entity types:
547	//
548	// *   This collection must contain exactly one synonym equal to
549	// `value`.
550	Synonyms []string `json:"synonyms,omitempty"`
551
552	// Value: Required. The primary value associated with this entity
553	// entry.
554	// For example, if the entity type is *vegetable*, the value could
555	// be
556	// *scallions*.
557	//
558	// For `KIND_MAP` entity types:
559	//
560	// *   A canonical value to be used in place of synonyms.
561	//
562	// For `KIND_LIST` entity types:
563	//
564	// *   A string that can contain references to other entity types (with
565	// or
566	//     without aliases).
567	Value string `json:"value,omitempty"`
568
569	// ForceSendFields is a list of field names (e.g. "Synonyms") to
570	// unconditionally include in API requests. By default, fields with
571	// empty values are omitted from API requests. However, any non-pointer,
572	// non-interface field appearing in ForceSendFields will be sent to the
573	// server regardless of whether the field is empty or not. This may be
574	// used to include empty fields in Patch requests.
575	ForceSendFields []string `json:"-"`
576
577	// NullFields is a list of field names (e.g. "Synonyms") to include in
578	// API requests with the JSON null value. By default, fields with empty
579	// values are omitted from API requests. However, any field with an
580	// empty value appearing in NullFields will be sent to the server as
581	// null. It is an error if a field in this list has a non-empty value.
582	// This may be used to include null fields in Patch requests.
583	NullFields []string `json:"-"`
584}
585
586func (s *GoogleCloudDialogflowV2EntityTypeEntity) MarshalJSON() ([]byte, error) {
587	type NoMethod GoogleCloudDialogflowV2EntityTypeEntity
588	raw := NoMethod(*s)
589	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
590}
591
592// GoogleCloudDialogflowV2EventInput: Events allow for matching intents
593// by event name instead of the natural
594// language input. For instance, input `<event: { name:
595// "welcome_event",
596// parameters: { name: "Sam" } }>` can trigger a personalized welcome
597// response.
598// The parameter `name` may be used by the agent in the
599// response:
600// "Hello #welcome_event.name! What can I do for you today?".
601type GoogleCloudDialogflowV2EventInput struct {
602	// LanguageCode: Required. The language of this query. See
603	// [Language
604	// Support](https://cloud.google.com/dialogflow/docs/reference/
605	// language)
606	// for a list of the currently supported language codes. Note that
607	// queries in
608	// the same session do not necessarily need to specify the same
609	// language.
610	LanguageCode string `json:"languageCode,omitempty"`
611
612	// Name: Required. The unique identifier of the event.
613	Name string `json:"name,omitempty"`
614
615	// Parameters: Optional. The collection of parameters associated with
616	// the event.
617	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
618
619	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
620	// unconditionally include in API requests. By default, fields with
621	// empty values are omitted from API requests. However, any non-pointer,
622	// non-interface field appearing in ForceSendFields will be sent to the
623	// server regardless of whether the field is empty or not. This may be
624	// used to include empty fields in Patch requests.
625	ForceSendFields []string `json:"-"`
626
627	// NullFields is a list of field names (e.g. "LanguageCode") to include
628	// in API requests with the JSON null value. By default, fields with
629	// empty values are omitted from API requests. However, any field with
630	// an empty value appearing in NullFields will be sent to the server as
631	// null. It is an error if a field in this list has a non-empty value.
632	// This may be used to include null fields in Patch requests.
633	NullFields []string `json:"-"`
634}
635
636func (s *GoogleCloudDialogflowV2EventInput) MarshalJSON() ([]byte, error) {
637	type NoMethod GoogleCloudDialogflowV2EventInput
638	raw := NoMethod(*s)
639	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
640}
641
642// GoogleCloudDialogflowV2ExportAgentResponse: The response message for
643// Agents.ExportAgent.
644type GoogleCloudDialogflowV2ExportAgentResponse struct {
645	// AgentContent: The exported agent.
646	//
647	// Example for how to export an agent to a zip file via a command
648	// line:
649	// <pre>curl \
650	//
651	// 'https://dialogflow.googleapis.com/v2/projects/&lt;project_name&gt;/ag
652	// ent:export'\
653	//   -X POST \
654	//   -H 'Authorization: Bearer '$(gcloud auth application-default
655	//   print-access-token) \
656	//   -H 'Accept: application/json' \
657	//   -H 'Content-Type: application/json' \
658	//   --compressed \
659	//   --data-binary '{}' \
660	// | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/'
661	// \
662	// | base64 --decode > &lt;agent zip file&gt;</pre>
663	AgentContent string `json:"agentContent,omitempty"`
664
665	// AgentUri: The URI to a file containing the exported agent. This field
666	// is populated
667	// only if `agent_uri` is specified in `ExportAgentRequest`.
668	AgentUri string `json:"agentUri,omitempty"`
669
670	// ForceSendFields is a list of field names (e.g. "AgentContent") to
671	// unconditionally include in API requests. By default, fields with
672	// empty values are omitted from API requests. However, any non-pointer,
673	// non-interface field appearing in ForceSendFields will be sent to the
674	// server regardless of whether the field is empty or not. This may be
675	// used to include empty fields in Patch requests.
676	ForceSendFields []string `json:"-"`
677
678	// NullFields is a list of field names (e.g. "AgentContent") to include
679	// in API requests with the JSON null value. By default, fields with
680	// empty values are omitted from API requests. However, any field with
681	// an empty value appearing in NullFields will be sent to the server as
682	// null. It is an error if a field in this list has a non-empty value.
683	// This may be used to include null fields in Patch requests.
684	NullFields []string `json:"-"`
685}
686
687func (s *GoogleCloudDialogflowV2ExportAgentResponse) MarshalJSON() ([]byte, error) {
688	type NoMethod GoogleCloudDialogflowV2ExportAgentResponse
689	raw := NoMethod(*s)
690	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
691}
692
693// GoogleCloudDialogflowV2Intent: Represents an intent.
694// Intents convert a number of user expressions or patterns into an
695// action. An
696// action is an extraction of a user command or sentence semantics.
697type GoogleCloudDialogflowV2Intent struct {
698	// Action: Optional. The name of the action associated with the
699	// intent.
700	// Note: The action name must not contain whitespaces.
701	Action string `json:"action,omitempty"`
702
703	// DefaultResponsePlatforms: Optional. The list of platforms for which
704	// the first responses will be
705	// copied from the messages in PLATFORM_UNSPECIFIED (i.e. default
706	// platform).
707	//
708	// Possible values:
709	//   "PLATFORM_UNSPECIFIED" - Not specified.
710	//   "FACEBOOK" - Facebook.
711	//   "SLACK" - Slack.
712	//   "TELEGRAM" - Telegram.
713	//   "KIK" - Kik.
714	//   "SKYPE" - Skype.
715	//   "LINE" - Line.
716	//   "VIBER" - Viber.
717	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
718	// When using Actions on Google, you can choose one of the
719	// specific
720	// Intent.Message types that mention support for Actions on Google,
721	// or you can use the advanced Intent.Message.payload field.
722	// The payload field provides access to AoG features not available in
723	// the
724	// specific message types.
725	// If using the Intent.Message.payload field, it should have a
726	// structure
727	// similar to the JSON message shown here. For more information,
728	// see
729	// [Actions on Google
730	// Webhook
731	// Format](https://developers.google.com/actions/dialogflow/webho
732	// ok)
733	// <pre>{
734	//   "expectUserResponse": true,
735	//   "isSsml": false,
736	//   "noInputPrompts": [],
737	//   "richResponse": {
738	//     "items": [
739	//       {
740	//         "simpleResponse": {
741	//           "displayText": "hi",
742	//           "textToSpeech": "hello"
743	//         }
744	//       }
745	//     ],
746	//     "suggestions": [
747	//       {
748	//         "title": "Say this"
749	//       },
750	//       {
751	//         "title": "or this"
752	//       }
753	//     ]
754	//   },
755	//   "systemIntent": {
756	//     "data": {
757	//       "@type":
758	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
759	//       "listSelect": {
760	//         "items": [
761	//           {
762	//             "optionInfo": {
763	//               "key": "key1",
764	//               "synonyms": [
765	//                 "key one"
766	//               ]
767	//             },
768	//             "title": "must not be empty, but unique"
769	//           },
770	//           {
771	//             "optionInfo": {
772	//               "key": "key2",
773	//               "synonyms": [
774	//                 "key two"
775	//               ]
776	//             },
777	//             "title": "must not be empty, but unique"
778	//           }
779	//         ]
780	//       }
781	//     },
782	//     "intent": "actions.intent.OPTION"
783	//   }
784	// }</pre>
785	//   "GOOGLE_HANGOUTS" - Google Hangouts.
786	DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"`
787
788	// DisplayName: Required. The name of this intent.
789	DisplayName string `json:"displayName,omitempty"`
790
791	// Events: Optional. The collection of event names that trigger the
792	// intent.
793	// If the collection of input contexts is not empty, all of the contexts
794	// must
795	// be present in the active user session for an event to trigger this
796	// intent.
797	Events []string `json:"events,omitempty"`
798
799	// FollowupIntentInfo: Read-only. Information about all followup intents
800	// that have this intent as
801	// a direct or indirect parent. We populate this field only in the
802	// output.
803	FollowupIntentInfo []*GoogleCloudDialogflowV2IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"`
804
805	// InputContextNames: Optional. The list of context names required for
806	// this intent to be
807	// triggered.
808	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
809	// ID>`.
810	InputContextNames []string `json:"inputContextNames,omitempty"`
811
812	// IsFallback: Optional. Indicates whether this is a fallback intent.
813	IsFallback bool `json:"isFallback,omitempty"`
814
815	// Messages: Optional. The collection of rich messages corresponding to
816	// the
817	// `Response` field in the Dialogflow console.
818	Messages []*GoogleCloudDialogflowV2IntentMessage `json:"messages,omitempty"`
819
820	// MlDisabled: Optional. Indicates whether Machine Learning is disabled
821	// for the intent.
822	// Note: If `ml_diabled` setting is set to true, then this intent is
823	// not
824	// taken into account during inference in `ML ONLY` match mode.
825	// Also,
826	// auto-markup in the UI is turned off.
827	MlDisabled bool `json:"mlDisabled,omitempty"`
828
829	// Name: The unique identifier of this intent.
830	// Required for Intents.UpdateIntent and
831	// Intents.BatchUpdateIntents
832	// methods.
833	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
834	Name string `json:"name,omitempty"`
835
836	// OutputContexts: Optional. The collection of contexts that are
837	// activated when the intent
838	// is matched. Context messages in this collection should not set
839	// the
840	// parameters field. Setting the `lifespan_count` to 0 will reset the
841	// context
842	// when the intent is matched.
843	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
844	// ID>`.
845	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
846
847	// Parameters: Optional. The collection of parameters associated with
848	// the intent.
849	Parameters []*GoogleCloudDialogflowV2IntentParameter `json:"parameters,omitempty"`
850
851	// ParentFollowupIntentName: Read-only after creation. The unique
852	// identifier of the parent intent in the
853	// chain of followup intents. You can set this field when creating an
854	// intent,
855	// for example with CreateIntent or BatchUpdateIntents, in order to
856	// make this intent a followup intent.
857	//
858	// It identifies the parent followup intent.
859	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
860	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
861
862	// Priority: Optional. The priority of this intent. Higher numbers
863	// represent higher
864	// priorities. If this is zero or unspecified, we use the
865	// default
866	// priority 500000.
867	//
868	// Negative numbers mean that the intent is disabled.
869	Priority int64 `json:"priority,omitempty"`
870
871	// ResetContexts: Optional. Indicates whether to delete all contexts in
872	// the current
873	// session when this intent is matched.
874	ResetContexts bool `json:"resetContexts,omitempty"`
875
876	// RootFollowupIntentName: Read-only. The unique identifier of the root
877	// intent in the chain of
878	// followup intents. It identifies the correct followup intents chain
879	// for
880	// this intent. We populate this field only in the output.
881	//
882	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
883	RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"`
884
885	// TrainingPhrases: Optional. The collection of examples that the agent
886	// is
887	// trained on.
888	TrainingPhrases []*GoogleCloudDialogflowV2IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
889
890	// WebhookState: Optional. Indicates whether webhooks are enabled for
891	// the intent.
892	//
893	// Possible values:
894	//   "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and
895	// in the intent.
896	//   "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in
897	// the intent.
898	//   "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in
899	// the agent and in the intent. Also, each slot
900	// filling prompt is forwarded to the webhook.
901	WebhookState string `json:"webhookState,omitempty"`
902
903	// ForceSendFields is a list of field names (e.g. "Action") to
904	// unconditionally include in API requests. By default, fields with
905	// empty values are omitted from API requests. However, any non-pointer,
906	// non-interface field appearing in ForceSendFields will be sent to the
907	// server regardless of whether the field is empty or not. This may be
908	// used to include empty fields in Patch requests.
909	ForceSendFields []string `json:"-"`
910
911	// NullFields is a list of field names (e.g. "Action") to include in API
912	// requests with the JSON null value. By default, fields with empty
913	// values are omitted from API requests. However, any field with an
914	// empty value appearing in NullFields will be sent to the server as
915	// null. It is an error if a field in this list has a non-empty value.
916	// This may be used to include null fields in Patch requests.
917	NullFields []string `json:"-"`
918}
919
920func (s *GoogleCloudDialogflowV2Intent) MarshalJSON() ([]byte, error) {
921	type NoMethod GoogleCloudDialogflowV2Intent
922	raw := NoMethod(*s)
923	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
924}
925
926// GoogleCloudDialogflowV2IntentFollowupIntentInfo: Represents a single
927// followup intent in the chain.
928type GoogleCloudDialogflowV2IntentFollowupIntentInfo struct {
929	// FollowupIntentName: The unique identifier of the followup
930	// intent.
931	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
932	FollowupIntentName string `json:"followupIntentName,omitempty"`
933
934	// ParentFollowupIntentName: The unique identifier of the followup
935	// intent's parent.
936	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
937	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
938
939	// ForceSendFields is a list of field names (e.g. "FollowupIntentName")
940	// to unconditionally include in API requests. By default, fields with
941	// empty values are omitted from API requests. However, any non-pointer,
942	// non-interface field appearing in ForceSendFields will be sent to the
943	// server regardless of whether the field is empty or not. This may be
944	// used to include empty fields in Patch requests.
945	ForceSendFields []string `json:"-"`
946
947	// NullFields is a list of field names (e.g. "FollowupIntentName") to
948	// include in API requests with the JSON null value. By default, fields
949	// with empty values are omitted from API requests. However, any field
950	// with an empty value appearing in NullFields will be sent to the
951	// server as null. It is an error if a field in this list has a
952	// non-empty value. This may be used to include null fields in Patch
953	// requests.
954	NullFields []string `json:"-"`
955}
956
957func (s *GoogleCloudDialogflowV2IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) {
958	type NoMethod GoogleCloudDialogflowV2IntentFollowupIntentInfo
959	raw := NoMethod(*s)
960	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
961}
962
963// GoogleCloudDialogflowV2IntentMessage: Corresponds to the `Response`
964// field in the Dialogflow console.
965type GoogleCloudDialogflowV2IntentMessage struct {
966	// BasicCard: The basic card response for Actions on Google.
967	BasicCard *GoogleCloudDialogflowV2IntentMessageBasicCard `json:"basicCard,omitempty"`
968
969	// Card: The card response.
970	Card *GoogleCloudDialogflowV2IntentMessageCard `json:"card,omitempty"`
971
972	// CarouselSelect: The carousel card response for Actions on Google.
973	CarouselSelect *GoogleCloudDialogflowV2IntentMessageCarouselSelect `json:"carouselSelect,omitempty"`
974
975	// Image: The image response.
976	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
977
978	// LinkOutSuggestion: The link out suggestion chip for Actions on
979	// Google.
980	LinkOutSuggestion *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"`
981
982	// ListSelect: The list card response for Actions on Google.
983	ListSelect *GoogleCloudDialogflowV2IntentMessageListSelect `json:"listSelect,omitempty"`
984
985	// Payload: Returns a response containing a custom, platform-specific
986	// payload.
987	// See the Intent.Message.Platform type for a description of
988	// the
989	// structure that may be required for your platform.
990	Payload googleapi.RawMessage `json:"payload,omitempty"`
991
992	// Platform: Optional. The platform that this message is intended for.
993	//
994	// Possible values:
995	//   "PLATFORM_UNSPECIFIED" - Not specified.
996	//   "FACEBOOK" - Facebook.
997	//   "SLACK" - Slack.
998	//   "TELEGRAM" - Telegram.
999	//   "KIK" - Kik.
1000	//   "SKYPE" - Skype.
1001	//   "LINE" - Line.
1002	//   "VIBER" - Viber.
1003	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
1004	// When using Actions on Google, you can choose one of the
1005	// specific
1006	// Intent.Message types that mention support for Actions on Google,
1007	// or you can use the advanced Intent.Message.payload field.
1008	// The payload field provides access to AoG features not available in
1009	// the
1010	// specific message types.
1011	// If using the Intent.Message.payload field, it should have a
1012	// structure
1013	// similar to the JSON message shown here. For more information,
1014	// see
1015	// [Actions on Google
1016	// Webhook
1017	// Format](https://developers.google.com/actions/dialogflow/webho
1018	// ok)
1019	// <pre>{
1020	//   "expectUserResponse": true,
1021	//   "isSsml": false,
1022	//   "noInputPrompts": [],
1023	//   "richResponse": {
1024	//     "items": [
1025	//       {
1026	//         "simpleResponse": {
1027	//           "displayText": "hi",
1028	//           "textToSpeech": "hello"
1029	//         }
1030	//       }
1031	//     ],
1032	//     "suggestions": [
1033	//       {
1034	//         "title": "Say this"
1035	//       },
1036	//       {
1037	//         "title": "or this"
1038	//       }
1039	//     ]
1040	//   },
1041	//   "systemIntent": {
1042	//     "data": {
1043	//       "@type":
1044	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
1045	//       "listSelect": {
1046	//         "items": [
1047	//           {
1048	//             "optionInfo": {
1049	//               "key": "key1",
1050	//               "synonyms": [
1051	//                 "key one"
1052	//               ]
1053	//             },
1054	//             "title": "must not be empty, but unique"
1055	//           },
1056	//           {
1057	//             "optionInfo": {
1058	//               "key": "key2",
1059	//               "synonyms": [
1060	//                 "key two"
1061	//               ]
1062	//             },
1063	//             "title": "must not be empty, but unique"
1064	//           }
1065	//         ]
1066	//       }
1067	//     },
1068	//     "intent": "actions.intent.OPTION"
1069	//   }
1070	// }</pre>
1071	//   "GOOGLE_HANGOUTS" - Google Hangouts.
1072	Platform string `json:"platform,omitempty"`
1073
1074	// QuickReplies: The quick replies response.
1075	QuickReplies *GoogleCloudDialogflowV2IntentMessageQuickReplies `json:"quickReplies,omitempty"`
1076
1077	// SimpleResponses: The voice and text-only responses for Actions on
1078	// Google.
1079	SimpleResponses *GoogleCloudDialogflowV2IntentMessageSimpleResponses `json:"simpleResponses,omitempty"`
1080
1081	// Suggestions: The suggestion chips for Actions on Google.
1082	Suggestions *GoogleCloudDialogflowV2IntentMessageSuggestions `json:"suggestions,omitempty"`
1083
1084	// Text: The text response.
1085	Text *GoogleCloudDialogflowV2IntentMessageText `json:"text,omitempty"`
1086
1087	// ForceSendFields is a list of field names (e.g. "BasicCard") to
1088	// unconditionally include in API requests. By default, fields with
1089	// empty values are omitted from API requests. However, any non-pointer,
1090	// non-interface field appearing in ForceSendFields will be sent to the
1091	// server regardless of whether the field is empty or not. This may be
1092	// used to include empty fields in Patch requests.
1093	ForceSendFields []string `json:"-"`
1094
1095	// NullFields is a list of field names (e.g. "BasicCard") to include in
1096	// API requests with the JSON null value. By default, fields with empty
1097	// values are omitted from API requests. However, any field with an
1098	// empty value appearing in NullFields will be sent to the server as
1099	// null. It is an error if a field in this list has a non-empty value.
1100	// This may be used to include null fields in Patch requests.
1101	NullFields []string `json:"-"`
1102}
1103
1104func (s *GoogleCloudDialogflowV2IntentMessage) MarshalJSON() ([]byte, error) {
1105	type NoMethod GoogleCloudDialogflowV2IntentMessage
1106	raw := NoMethod(*s)
1107	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1108}
1109
1110// GoogleCloudDialogflowV2IntentMessageBasicCard: The basic card
1111// message. Useful for displaying information.
1112type GoogleCloudDialogflowV2IntentMessageBasicCard struct {
1113	// Buttons: Optional. The collection of card buttons.
1114	Buttons []*GoogleCloudDialogflowV2IntentMessageBasicCardButton `json:"buttons,omitempty"`
1115
1116	// FormattedText: Required, unless image is present. The body text of
1117	// the card.
1118	FormattedText string `json:"formattedText,omitempty"`
1119
1120	// Image: Optional. The image for the card.
1121	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1122
1123	// Subtitle: Optional. The subtitle of the card.
1124	Subtitle string `json:"subtitle,omitempty"`
1125
1126	// Title: Optional. The title of the card.
1127	Title string `json:"title,omitempty"`
1128
1129	// ForceSendFields is a list of field names (e.g. "Buttons") to
1130	// unconditionally include in API requests. By default, fields with
1131	// empty values are omitted from API requests. However, any non-pointer,
1132	// non-interface field appearing in ForceSendFields will be sent to the
1133	// server regardless of whether the field is empty or not. This may be
1134	// used to include empty fields in Patch requests.
1135	ForceSendFields []string `json:"-"`
1136
1137	// NullFields is a list of field names (e.g. "Buttons") to include in
1138	// API requests with the JSON null value. By default, fields with empty
1139	// values are omitted from API requests. However, any field with an
1140	// empty value appearing in NullFields will be sent to the server as
1141	// null. It is an error if a field in this list has a non-empty value.
1142	// This may be used to include null fields in Patch requests.
1143	NullFields []string `json:"-"`
1144}
1145
1146func (s *GoogleCloudDialogflowV2IntentMessageBasicCard) MarshalJSON() ([]byte, error) {
1147	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCard
1148	raw := NoMethod(*s)
1149	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1150}
1151
1152// GoogleCloudDialogflowV2IntentMessageBasicCardButton: The button
1153// object that appears at the bottom of a card.
1154type GoogleCloudDialogflowV2IntentMessageBasicCardButton struct {
1155	// OpenUriAction: Required. Action to take when a user taps on the
1156	// button.
1157	OpenUriAction *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"`
1158
1159	// Title: Required. The title of the button.
1160	Title string `json:"title,omitempty"`
1161
1162	// ForceSendFields is a list of field names (e.g. "OpenUriAction") to
1163	// unconditionally include in API requests. By default, fields with
1164	// empty values are omitted from API requests. However, any non-pointer,
1165	// non-interface field appearing in ForceSendFields will be sent to the
1166	// server regardless of whether the field is empty or not. This may be
1167	// used to include empty fields in Patch requests.
1168	ForceSendFields []string `json:"-"`
1169
1170	// NullFields is a list of field names (e.g. "OpenUriAction") to include
1171	// in API requests with the JSON null value. By default, fields with
1172	// empty values are omitted from API requests. However, any field with
1173	// an empty value appearing in NullFields will be sent to the server as
1174	// null. It is an error if a field in this list has a non-empty value.
1175	// This may be used to include null fields in Patch requests.
1176	NullFields []string `json:"-"`
1177}
1178
1179func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) {
1180	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButton
1181	raw := NoMethod(*s)
1182	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1183}
1184
1185// GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction:
1186// Opens the given URI.
1187type GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction struct {
1188	// Uri: Required. The HTTP or HTTPS scheme URI.
1189	Uri string `json:"uri,omitempty"`
1190
1191	// ForceSendFields is a list of field names (e.g. "Uri") to
1192	// unconditionally include in API requests. By default, fields with
1193	// empty values are omitted from API requests. However, any non-pointer,
1194	// non-interface field appearing in ForceSendFields will be sent to the
1195	// server regardless of whether the field is empty or not. This may be
1196	// used to include empty fields in Patch requests.
1197	ForceSendFields []string `json:"-"`
1198
1199	// NullFields is a list of field names (e.g. "Uri") to include in API
1200	// requests with the JSON null value. By default, fields with empty
1201	// values are omitted from API requests. However, any field with an
1202	// empty value appearing in NullFields will be sent to the server as
1203	// null. It is an error if a field in this list has a non-empty value.
1204	// This may be used to include null fields in Patch requests.
1205	NullFields []string `json:"-"`
1206}
1207
1208func (s *GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) {
1209	type NoMethod GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
1210	raw := NoMethod(*s)
1211	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1212}
1213
1214// GoogleCloudDialogflowV2IntentMessageCard: The card response message.
1215type GoogleCloudDialogflowV2IntentMessageCard struct {
1216	// Buttons: Optional. The collection of card buttons.
1217	Buttons []*GoogleCloudDialogflowV2IntentMessageCardButton `json:"buttons,omitempty"`
1218
1219	// ImageUri: Optional. The public URI to an image file for the card.
1220	ImageUri string `json:"imageUri,omitempty"`
1221
1222	// Subtitle: Optional. The subtitle of the card.
1223	Subtitle string `json:"subtitle,omitempty"`
1224
1225	// Title: Optional. The title of the card.
1226	Title string `json:"title,omitempty"`
1227
1228	// ForceSendFields is a list of field names (e.g. "Buttons") to
1229	// unconditionally include in API requests. By default, fields with
1230	// empty values are omitted from API requests. However, any non-pointer,
1231	// non-interface field appearing in ForceSendFields will be sent to the
1232	// server regardless of whether the field is empty or not. This may be
1233	// used to include empty fields in Patch requests.
1234	ForceSendFields []string `json:"-"`
1235
1236	// NullFields is a list of field names (e.g. "Buttons") to include in
1237	// API requests with the JSON null value. By default, fields with empty
1238	// values are omitted from API requests. However, any field with an
1239	// empty value appearing in NullFields will be sent to the server as
1240	// null. It is an error if a field in this list has a non-empty value.
1241	// This may be used to include null fields in Patch requests.
1242	NullFields []string `json:"-"`
1243}
1244
1245func (s *GoogleCloudDialogflowV2IntentMessageCard) MarshalJSON() ([]byte, error) {
1246	type NoMethod GoogleCloudDialogflowV2IntentMessageCard
1247	raw := NoMethod(*s)
1248	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1249}
1250
1251// GoogleCloudDialogflowV2IntentMessageCardButton: Optional. Contains
1252// information about a button.
1253type GoogleCloudDialogflowV2IntentMessageCardButton struct {
1254	// Postback: Optional. The text to send back to the Dialogflow API or a
1255	// URI to
1256	// open.
1257	Postback string `json:"postback,omitempty"`
1258
1259	// Text: Optional. The text to show on the button.
1260	Text string `json:"text,omitempty"`
1261
1262	// ForceSendFields is a list of field names (e.g. "Postback") to
1263	// unconditionally include in API requests. By default, fields with
1264	// empty values are omitted from API requests. However, any non-pointer,
1265	// non-interface field appearing in ForceSendFields will be sent to the
1266	// server regardless of whether the field is empty or not. This may be
1267	// used to include empty fields in Patch requests.
1268	ForceSendFields []string `json:"-"`
1269
1270	// NullFields is a list of field names (e.g. "Postback") to include in
1271	// API requests with the JSON null value. By default, fields with empty
1272	// values are omitted from API requests. However, any field with an
1273	// empty value appearing in NullFields will be sent to the server as
1274	// null. It is an error if a field in this list has a non-empty value.
1275	// This may be used to include null fields in Patch requests.
1276	NullFields []string `json:"-"`
1277}
1278
1279func (s *GoogleCloudDialogflowV2IntentMessageCardButton) MarshalJSON() ([]byte, error) {
1280	type NoMethod GoogleCloudDialogflowV2IntentMessageCardButton
1281	raw := NoMethod(*s)
1282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1283}
1284
1285// GoogleCloudDialogflowV2IntentMessageCarouselSelect: The card for
1286// presenting a carousel of options to select from.
1287type GoogleCloudDialogflowV2IntentMessageCarouselSelect struct {
1288	// Items: Required. Carousel items.
1289	Items []*GoogleCloudDialogflowV2IntentMessageCarouselSelectItem `json:"items,omitempty"`
1290
1291	// ForceSendFields is a list of field names (e.g. "Items") to
1292	// unconditionally include in API requests. By default, fields with
1293	// empty values are omitted from API requests. However, any non-pointer,
1294	// non-interface field appearing in ForceSendFields will be sent to the
1295	// server regardless of whether the field is empty or not. This may be
1296	// used to include empty fields in Patch requests.
1297	ForceSendFields []string `json:"-"`
1298
1299	// NullFields is a list of field names (e.g. "Items") to include in API
1300	// requests with the JSON null value. By default, fields with empty
1301	// values are omitted from API requests. However, any field with an
1302	// empty value appearing in NullFields will be sent to the server as
1303	// null. It is an error if a field in this list has a non-empty value.
1304	// This may be used to include null fields in Patch requests.
1305	NullFields []string `json:"-"`
1306}
1307
1308func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) {
1309	type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelect
1310	raw := NoMethod(*s)
1311	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1312}
1313
1314// GoogleCloudDialogflowV2IntentMessageCarouselSelectItem: An item in
1315// the carousel.
1316type GoogleCloudDialogflowV2IntentMessageCarouselSelectItem struct {
1317	// Description: Optional. The body text of the card.
1318	Description string `json:"description,omitempty"`
1319
1320	// Image: Optional. The image to display.
1321	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1322
1323	// Info: Required. Additional info about the option item.
1324	Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"`
1325
1326	// Title: Required. Title of the carousel item.
1327	Title string `json:"title,omitempty"`
1328
1329	// ForceSendFields is a list of field names (e.g. "Description") to
1330	// unconditionally include in API requests. By default, fields with
1331	// empty values are omitted from API requests. However, any non-pointer,
1332	// non-interface field appearing in ForceSendFields will be sent to the
1333	// server regardless of whether the field is empty or not. This may be
1334	// used to include empty fields in Patch requests.
1335	ForceSendFields []string `json:"-"`
1336
1337	// NullFields is a list of field names (e.g. "Description") to include
1338	// in API requests with the JSON null value. By default, fields with
1339	// empty values are omitted from API requests. However, any field with
1340	// an empty value appearing in NullFields will be sent to the server as
1341	// null. It is an error if a field in this list has a non-empty value.
1342	// This may be used to include null fields in Patch requests.
1343	NullFields []string `json:"-"`
1344}
1345
1346func (s *GoogleCloudDialogflowV2IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) {
1347	type NoMethod GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
1348	raw := NoMethod(*s)
1349	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1350}
1351
1352// GoogleCloudDialogflowV2IntentMessageImage: The image response
1353// message.
1354type GoogleCloudDialogflowV2IntentMessageImage struct {
1355	// AccessibilityText: Optional. A text description of the image to be
1356	// used for accessibility,
1357	// e.g., screen readers.
1358	AccessibilityText string `json:"accessibilityText,omitempty"`
1359
1360	// ImageUri: Optional. The public URI to an image file.
1361	ImageUri string `json:"imageUri,omitempty"`
1362
1363	// ForceSendFields is a list of field names (e.g. "AccessibilityText")
1364	// to unconditionally include in API requests. By default, fields with
1365	// empty values are omitted from API requests. However, any non-pointer,
1366	// non-interface field appearing in ForceSendFields will be sent to the
1367	// server regardless of whether the field is empty or not. This may be
1368	// used to include empty fields in Patch requests.
1369	ForceSendFields []string `json:"-"`
1370
1371	// NullFields is a list of field names (e.g. "AccessibilityText") to
1372	// include in API requests with the JSON null value. By default, fields
1373	// with empty values are omitted from API requests. However, any field
1374	// with an empty value appearing in NullFields will be sent to the
1375	// server as null. It is an error if a field in this list has a
1376	// non-empty value. This may be used to include null fields in Patch
1377	// requests.
1378	NullFields []string `json:"-"`
1379}
1380
1381func (s *GoogleCloudDialogflowV2IntentMessageImage) MarshalJSON() ([]byte, error) {
1382	type NoMethod GoogleCloudDialogflowV2IntentMessageImage
1383	raw := NoMethod(*s)
1384	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1385}
1386
1387// GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion: The suggestion
1388// chip message that allows the user to jump out to the app
1389// or website associated with this agent.
1390type GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion struct {
1391	// DestinationName: Required. The name of the app or site this chip is
1392	// linking to.
1393	DestinationName string `json:"destinationName,omitempty"`
1394
1395	// Uri: Required. The URI of the app or site to open when the user taps
1396	// the
1397	// suggestion chip.
1398	Uri string `json:"uri,omitempty"`
1399
1400	// ForceSendFields is a list of field names (e.g. "DestinationName") to
1401	// unconditionally include in API requests. By default, fields with
1402	// empty values are omitted from API requests. However, any non-pointer,
1403	// non-interface field appearing in ForceSendFields will be sent to the
1404	// server regardless of whether the field is empty or not. This may be
1405	// used to include empty fields in Patch requests.
1406	ForceSendFields []string `json:"-"`
1407
1408	// NullFields is a list of field names (e.g. "DestinationName") to
1409	// include in API requests with the JSON null value. By default, fields
1410	// with empty values are omitted from API requests. However, any field
1411	// with an empty value appearing in NullFields will be sent to the
1412	// server as null. It is an error if a field in this list has a
1413	// non-empty value. This may be used to include null fields in Patch
1414	// requests.
1415	NullFields []string `json:"-"`
1416}
1417
1418func (s *GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) {
1419	type NoMethod GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
1420	raw := NoMethod(*s)
1421	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1422}
1423
1424// GoogleCloudDialogflowV2IntentMessageListSelect: The card for
1425// presenting a list of options to select from.
1426type GoogleCloudDialogflowV2IntentMessageListSelect struct {
1427	// Items: Required. List items.
1428	Items []*GoogleCloudDialogflowV2IntentMessageListSelectItem `json:"items,omitempty"`
1429
1430	// Title: Optional. The overall title of the list.
1431	Title string `json:"title,omitempty"`
1432
1433	// ForceSendFields is a list of field names (e.g. "Items") to
1434	// unconditionally include in API requests. By default, fields with
1435	// empty values are omitted from API requests. However, any non-pointer,
1436	// non-interface field appearing in ForceSendFields will be sent to the
1437	// server regardless of whether the field is empty or not. This may be
1438	// used to include empty fields in Patch requests.
1439	ForceSendFields []string `json:"-"`
1440
1441	// NullFields is a list of field names (e.g. "Items") to include in API
1442	// requests with the JSON null value. By default, fields with empty
1443	// values are omitted from API requests. However, any field with an
1444	// empty value appearing in NullFields will be sent to the server as
1445	// null. It is an error if a field in this list has a non-empty value.
1446	// This may be used to include null fields in Patch requests.
1447	NullFields []string `json:"-"`
1448}
1449
1450func (s *GoogleCloudDialogflowV2IntentMessageListSelect) MarshalJSON() ([]byte, error) {
1451	type NoMethod GoogleCloudDialogflowV2IntentMessageListSelect
1452	raw := NoMethod(*s)
1453	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1454}
1455
1456// GoogleCloudDialogflowV2IntentMessageListSelectItem: An item in the
1457// list.
1458type GoogleCloudDialogflowV2IntentMessageListSelectItem struct {
1459	// Description: Optional. The main text describing the item.
1460	Description string `json:"description,omitempty"`
1461
1462	// Image: Optional. The image to display.
1463	Image *GoogleCloudDialogflowV2IntentMessageImage `json:"image,omitempty"`
1464
1465	// Info: Required. Additional information about this option.
1466	Info *GoogleCloudDialogflowV2IntentMessageSelectItemInfo `json:"info,omitempty"`
1467
1468	// Title: Required. The title of the list item.
1469	Title string `json:"title,omitempty"`
1470
1471	// ForceSendFields is a list of field names (e.g. "Description") to
1472	// unconditionally include in API requests. By default, fields with
1473	// empty values are omitted from API requests. However, any non-pointer,
1474	// non-interface field appearing in ForceSendFields will be sent to the
1475	// server regardless of whether the field is empty or not. This may be
1476	// used to include empty fields in Patch requests.
1477	ForceSendFields []string `json:"-"`
1478
1479	// NullFields is a list of field names (e.g. "Description") to include
1480	// in API requests with the JSON null value. By default, fields with
1481	// empty values are omitted from API requests. However, any field with
1482	// an empty value appearing in NullFields will be sent to the server as
1483	// null. It is an error if a field in this list has a non-empty value.
1484	// This may be used to include null fields in Patch requests.
1485	NullFields []string `json:"-"`
1486}
1487
1488func (s *GoogleCloudDialogflowV2IntentMessageListSelectItem) MarshalJSON() ([]byte, error) {
1489	type NoMethod GoogleCloudDialogflowV2IntentMessageListSelectItem
1490	raw := NoMethod(*s)
1491	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1492}
1493
1494// GoogleCloudDialogflowV2IntentMessageQuickReplies: The quick replies
1495// response message.
1496type GoogleCloudDialogflowV2IntentMessageQuickReplies struct {
1497	// QuickReplies: Optional. The collection of quick replies.
1498	QuickReplies []string `json:"quickReplies,omitempty"`
1499
1500	// Title: Optional. The title of the collection of quick replies.
1501	Title string `json:"title,omitempty"`
1502
1503	// ForceSendFields is a list of field names (e.g. "QuickReplies") to
1504	// unconditionally include in API requests. By default, fields with
1505	// empty values are omitted from API requests. However, any non-pointer,
1506	// non-interface field appearing in ForceSendFields will be sent to the
1507	// server regardless of whether the field is empty or not. This may be
1508	// used to include empty fields in Patch requests.
1509	ForceSendFields []string `json:"-"`
1510
1511	// NullFields is a list of field names (e.g. "QuickReplies") to include
1512	// in API requests with the JSON null value. By default, fields with
1513	// empty values are omitted from API requests. However, any field with
1514	// an empty value appearing in NullFields will be sent to the server as
1515	// null. It is an error if a field in this list has a non-empty value.
1516	// This may be used to include null fields in Patch requests.
1517	NullFields []string `json:"-"`
1518}
1519
1520func (s *GoogleCloudDialogflowV2IntentMessageQuickReplies) MarshalJSON() ([]byte, error) {
1521	type NoMethod GoogleCloudDialogflowV2IntentMessageQuickReplies
1522	raw := NoMethod(*s)
1523	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1524}
1525
1526// GoogleCloudDialogflowV2IntentMessageSelectItemInfo: Additional info
1527// about the select item for when it is triggered in a
1528// dialog.
1529type GoogleCloudDialogflowV2IntentMessageSelectItemInfo struct {
1530	// Key: Required. A unique key that will be sent back to the agent if
1531	// this
1532	// response is given.
1533	Key string `json:"key,omitempty"`
1534
1535	// Synonyms: Optional. A list of synonyms that can also be used to
1536	// trigger this
1537	// item in dialog.
1538	Synonyms []string `json:"synonyms,omitempty"`
1539
1540	// ForceSendFields is a list of field names (e.g. "Key") to
1541	// unconditionally include in API requests. By default, fields with
1542	// empty values are omitted from API requests. However, any non-pointer,
1543	// non-interface field appearing in ForceSendFields will be sent to the
1544	// server regardless of whether the field is empty or not. This may be
1545	// used to include empty fields in Patch requests.
1546	ForceSendFields []string `json:"-"`
1547
1548	// NullFields is a list of field names (e.g. "Key") to include in API
1549	// requests with the JSON null value. By default, fields with empty
1550	// values are omitted from API requests. However, any field with an
1551	// empty value appearing in NullFields will be sent to the server as
1552	// null. It is an error if a field in this list has a non-empty value.
1553	// This may be used to include null fields in Patch requests.
1554	NullFields []string `json:"-"`
1555}
1556
1557func (s *GoogleCloudDialogflowV2IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) {
1558	type NoMethod GoogleCloudDialogflowV2IntentMessageSelectItemInfo
1559	raw := NoMethod(*s)
1560	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1561}
1562
1563// GoogleCloudDialogflowV2IntentMessageSimpleResponse: The simple
1564// response message containing speech or text.
1565type GoogleCloudDialogflowV2IntentMessageSimpleResponse struct {
1566	// DisplayText: Optional. The text to display.
1567	DisplayText string `json:"displayText,omitempty"`
1568
1569	// Ssml: One of text_to_speech or ssml must be provided. Structured
1570	// spoken
1571	// response to the user in the SSML format. Mutually exclusive
1572	// with
1573	// text_to_speech.
1574	Ssml string `json:"ssml,omitempty"`
1575
1576	// TextToSpeech: One of text_to_speech or ssml must be provided. The
1577	// plain text of the
1578	// speech output. Mutually exclusive with ssml.
1579	TextToSpeech string `json:"textToSpeech,omitempty"`
1580
1581	// ForceSendFields is a list of field names (e.g. "DisplayText") to
1582	// unconditionally include in API requests. By default, fields with
1583	// empty values are omitted from API requests. However, any non-pointer,
1584	// non-interface field appearing in ForceSendFields will be sent to the
1585	// server regardless of whether the field is empty or not. This may be
1586	// used to include empty fields in Patch requests.
1587	ForceSendFields []string `json:"-"`
1588
1589	// NullFields is a list of field names (e.g. "DisplayText") to include
1590	// in API requests with the JSON null value. By default, fields with
1591	// empty values are omitted from API requests. However, any field with
1592	// an empty value appearing in NullFields will be sent to the server as
1593	// null. It is an error if a field in this list has a non-empty value.
1594	// This may be used to include null fields in Patch requests.
1595	NullFields []string `json:"-"`
1596}
1597
1598func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) {
1599	type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponse
1600	raw := NoMethod(*s)
1601	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1602}
1603
1604// GoogleCloudDialogflowV2IntentMessageSimpleResponses: The collection
1605// of simple response candidates.
1606// This message in `QueryResult.fulfillment_messages`
1607// and
1608// `WebhookResponse.fulfillment_messages` should contain only
1609// one
1610// `SimpleResponse`.
1611type GoogleCloudDialogflowV2IntentMessageSimpleResponses struct {
1612	// SimpleResponses: Required. The list of simple responses.
1613	SimpleResponses []*GoogleCloudDialogflowV2IntentMessageSimpleResponse `json:"simpleResponses,omitempty"`
1614
1615	// ForceSendFields is a list of field names (e.g. "SimpleResponses") to
1616	// unconditionally include in API requests. By default, fields with
1617	// empty values are omitted from API requests. However, any non-pointer,
1618	// non-interface field appearing in ForceSendFields will be sent to the
1619	// server regardless of whether the field is empty or not. This may be
1620	// used to include empty fields in Patch requests.
1621	ForceSendFields []string `json:"-"`
1622
1623	// NullFields is a list of field names (e.g. "SimpleResponses") to
1624	// include in API requests with the JSON null value. By default, fields
1625	// with empty values are omitted from API requests. However, any field
1626	// with an empty value appearing in NullFields will be sent to the
1627	// server as null. It is an error if a field in this list has a
1628	// non-empty value. This may be used to include null fields in Patch
1629	// requests.
1630	NullFields []string `json:"-"`
1631}
1632
1633func (s *GoogleCloudDialogflowV2IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) {
1634	type NoMethod GoogleCloudDialogflowV2IntentMessageSimpleResponses
1635	raw := NoMethod(*s)
1636	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1637}
1638
1639// GoogleCloudDialogflowV2IntentMessageSuggestion: The suggestion chip
1640// message that the user can tap to quickly post a reply
1641// to the conversation.
1642type GoogleCloudDialogflowV2IntentMessageSuggestion struct {
1643	// Title: Required. The text shown the in the suggestion chip.
1644	Title string `json:"title,omitempty"`
1645
1646	// ForceSendFields is a list of field names (e.g. "Title") to
1647	// unconditionally include in API requests. By default, fields with
1648	// empty values are omitted from API requests. However, any non-pointer,
1649	// non-interface field appearing in ForceSendFields will be sent to the
1650	// server regardless of whether the field is empty or not. This may be
1651	// used to include empty fields in Patch requests.
1652	ForceSendFields []string `json:"-"`
1653
1654	// NullFields is a list of field names (e.g. "Title") to include in API
1655	// requests with the JSON null value. By default, fields with empty
1656	// values are omitted from API requests. However, any field with an
1657	// empty value appearing in NullFields will be sent to the server as
1658	// null. It is an error if a field in this list has a non-empty value.
1659	// This may be used to include null fields in Patch requests.
1660	NullFields []string `json:"-"`
1661}
1662
1663func (s *GoogleCloudDialogflowV2IntentMessageSuggestion) MarshalJSON() ([]byte, error) {
1664	type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestion
1665	raw := NoMethod(*s)
1666	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1667}
1668
1669// GoogleCloudDialogflowV2IntentMessageSuggestions: The collection of
1670// suggestions.
1671type GoogleCloudDialogflowV2IntentMessageSuggestions struct {
1672	// Suggestions: Required. The list of suggested replies.
1673	Suggestions []*GoogleCloudDialogflowV2IntentMessageSuggestion `json:"suggestions,omitempty"`
1674
1675	// ForceSendFields is a list of field names (e.g. "Suggestions") to
1676	// unconditionally include in API requests. By default, fields with
1677	// empty values are omitted from API requests. However, any non-pointer,
1678	// non-interface field appearing in ForceSendFields will be sent to the
1679	// server regardless of whether the field is empty or not. This may be
1680	// used to include empty fields in Patch requests.
1681	ForceSendFields []string `json:"-"`
1682
1683	// NullFields is a list of field names (e.g. "Suggestions") to include
1684	// in API requests with the JSON null value. By default, fields with
1685	// empty values are omitted from API requests. However, any field with
1686	// an empty value appearing in NullFields will be sent to the server as
1687	// null. It is an error if a field in this list has a non-empty value.
1688	// This may be used to include null fields in Patch requests.
1689	NullFields []string `json:"-"`
1690}
1691
1692func (s *GoogleCloudDialogflowV2IntentMessageSuggestions) MarshalJSON() ([]byte, error) {
1693	type NoMethod GoogleCloudDialogflowV2IntentMessageSuggestions
1694	raw := NoMethod(*s)
1695	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1696}
1697
1698// GoogleCloudDialogflowV2IntentMessageText: The text response message.
1699type GoogleCloudDialogflowV2IntentMessageText struct {
1700	// Text: Optional. The collection of the agent's responses.
1701	Text []string `json:"text,omitempty"`
1702
1703	// ForceSendFields is a list of field names (e.g. "Text") to
1704	// unconditionally include in API requests. By default, fields with
1705	// empty values are omitted from API requests. However, any non-pointer,
1706	// non-interface field appearing in ForceSendFields will be sent to the
1707	// server regardless of whether the field is empty or not. This may be
1708	// used to include empty fields in Patch requests.
1709	ForceSendFields []string `json:"-"`
1710
1711	// NullFields is a list of field names (e.g. "Text") to include in API
1712	// requests with the JSON null value. By default, fields with empty
1713	// values are omitted from API requests. However, any field with an
1714	// empty value appearing in NullFields will be sent to the server as
1715	// null. It is an error if a field in this list has a non-empty value.
1716	// This may be used to include null fields in Patch requests.
1717	NullFields []string `json:"-"`
1718}
1719
1720func (s *GoogleCloudDialogflowV2IntentMessageText) MarshalJSON() ([]byte, error) {
1721	type NoMethod GoogleCloudDialogflowV2IntentMessageText
1722	raw := NoMethod(*s)
1723	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1724}
1725
1726// GoogleCloudDialogflowV2IntentParameter: Represents intent parameters.
1727type GoogleCloudDialogflowV2IntentParameter struct {
1728	// DefaultValue: Optional. The default value to use when the `value`
1729	// yields an empty
1730	// result.
1731	// Default values can be extracted from contexts by using the
1732	// following
1733	// syntax: `#context_name.parameter_name`.
1734	DefaultValue string `json:"defaultValue,omitempty"`
1735
1736	// DisplayName: Required. The name of the parameter.
1737	DisplayName string `json:"displayName,omitempty"`
1738
1739	// EntityTypeDisplayName: Optional. The name of the entity type,
1740	// prefixed with `@`, that
1741	// describes values of the parameter. If the parameter is
1742	// required, this must be provided.
1743	EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"`
1744
1745	// IsList: Optional. Indicates whether the parameter represents a list
1746	// of values.
1747	IsList bool `json:"isList,omitempty"`
1748
1749	// Mandatory: Optional. Indicates whether the parameter is required.
1750	// That is,
1751	// whether the intent cannot be completed without collecting the
1752	// parameter
1753	// value.
1754	Mandatory bool `json:"mandatory,omitempty"`
1755
1756	// Name: The unique identifier of this parameter.
1757	Name string `json:"name,omitempty"`
1758
1759	// Prompts: Optional. The collection of prompts that the agent can
1760	// present to the
1761	// user in order to collect a value for the parameter.
1762	Prompts []string `json:"prompts,omitempty"`
1763
1764	// Value: Optional. The definition of the parameter value. It can be:
1765	// - a constant string,
1766	// - a parameter value defined as `$parameter_name`,
1767	// - an original parameter value defined as
1768	// `$parameter_name.original`,
1769	// - a parameter value from some context defined as
1770	//   `#context_name.parameter_name`.
1771	Value string `json:"value,omitempty"`
1772
1773	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
1774	// unconditionally include in API requests. By default, fields with
1775	// empty values are omitted from API requests. However, any non-pointer,
1776	// non-interface field appearing in ForceSendFields will be sent to the
1777	// server regardless of whether the field is empty or not. This may be
1778	// used to include empty fields in Patch requests.
1779	ForceSendFields []string `json:"-"`
1780
1781	// NullFields is a list of field names (e.g. "DefaultValue") to include
1782	// in API requests with the JSON null value. By default, fields with
1783	// empty values are omitted from API requests. However, any field with
1784	// an empty value appearing in NullFields will be sent to the server as
1785	// null. It is an error if a field in this list has a non-empty value.
1786	// This may be used to include null fields in Patch requests.
1787	NullFields []string `json:"-"`
1788}
1789
1790func (s *GoogleCloudDialogflowV2IntentParameter) MarshalJSON() ([]byte, error) {
1791	type NoMethod GoogleCloudDialogflowV2IntentParameter
1792	raw := NoMethod(*s)
1793	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1794}
1795
1796// GoogleCloudDialogflowV2IntentTrainingPhrase: Represents an example
1797// that the agent is trained on.
1798type GoogleCloudDialogflowV2IntentTrainingPhrase struct {
1799	// Name: Output only. The unique identifier of this training phrase.
1800	Name string `json:"name,omitempty"`
1801
1802	// Parts: Required. The ordered list of training phrase parts.
1803	// The parts are concatenated in order to form the training
1804	// phrase.
1805	//
1806	// Note: The API does not automatically annotate training phrases like
1807	// the
1808	// Dialogflow Console does.
1809	//
1810	// Note: Do not forget to include whitespace at part boundaries,
1811	// so the training phrase is well formatted when the parts are
1812	// concatenated.
1813	//
1814	// If the training phrase does not need to be annotated with
1815	// parameters,
1816	// you just need a single part with only the Part.text field set.
1817	//
1818	// If you want to annotate the training phrase, you must create
1819	// multiple
1820	// parts, where the fields of each part are populated in one of two
1821	// ways:
1822	//
1823	// -   `Part.text` is set to a part of the phrase that has no
1824	// parameters.
1825	// -   `Part.text` is set to a part of the phrase that you want to
1826	// annotate,
1827	//     and the `entity_type`, `alias`, and `user_defined` fields are
1828	// all
1829	//     set.
1830	Parts []*GoogleCloudDialogflowV2IntentTrainingPhrasePart `json:"parts,omitempty"`
1831
1832	// TimesAddedCount: Optional. Indicates how many times this example was
1833	// added to
1834	// the intent. Each time a developer adds an existing sample by editing
1835	// an
1836	// intent or training, this counter is increased.
1837	TimesAddedCount int64 `json:"timesAddedCount,omitempty"`
1838
1839	// Type: Required. The type of the training phrase.
1840	//
1841	// Possible values:
1842	//   "TYPE_UNSPECIFIED" - Not specified. This value should never be
1843	// used.
1844	//   "EXAMPLE" - Examples do not contain @-prefixed entity type names,
1845	// but example parts
1846	// can be annotated with entity types.
1847	//   "TEMPLATE" - Templates are not annotated with entity types, but
1848	// they can contain
1849	// @-prefixed entity type names as substrings.
1850	// Template mode has been deprecated. Example mode is the only
1851	// supported
1852	// way to create new training phrases. If you have existing
1853	// training
1854	// phrases that you've created in template mode, those will continue
1855	// to
1856	// work.
1857	Type string `json:"type,omitempty"`
1858
1859	// ForceSendFields is a list of field names (e.g. "Name") to
1860	// unconditionally include in API requests. By default, fields with
1861	// empty values are omitted from API requests. However, any non-pointer,
1862	// non-interface field appearing in ForceSendFields will be sent to the
1863	// server regardless of whether the field is empty or not. This may be
1864	// used to include empty fields in Patch requests.
1865	ForceSendFields []string `json:"-"`
1866
1867	// NullFields is a list of field names (e.g. "Name") to include in API
1868	// requests with the JSON null value. By default, fields with empty
1869	// values are omitted from API requests. However, any field with an
1870	// empty value appearing in NullFields will be sent to the server as
1871	// null. It is an error if a field in this list has a non-empty value.
1872	// This may be used to include null fields in Patch requests.
1873	NullFields []string `json:"-"`
1874}
1875
1876func (s *GoogleCloudDialogflowV2IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
1877	type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrase
1878	raw := NoMethod(*s)
1879	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1880}
1881
1882// GoogleCloudDialogflowV2IntentTrainingPhrasePart: Represents a part of
1883// a training phrase.
1884type GoogleCloudDialogflowV2IntentTrainingPhrasePart struct {
1885	// Alias: Optional. The parameter name for the value extracted from
1886	// the
1887	// annotated part of the example.
1888	// This field is required for annotated parts of the training phrase.
1889	Alias string `json:"alias,omitempty"`
1890
1891	// EntityType: Optional. The entity type name prefixed with `@`.
1892	// This field is required for annotated parts of the training phrase.
1893	EntityType string `json:"entityType,omitempty"`
1894
1895	// Text: Required. The text for this part.
1896	Text string `json:"text,omitempty"`
1897
1898	// UserDefined: Optional. Indicates whether the text was manually
1899	// annotated.
1900	// This field is set to true when the Dialogflow Console is used
1901	// to
1902	// manually annotate the part. When creating an annotated part with
1903	// the
1904	// API, you must set this to true.
1905	UserDefined bool `json:"userDefined,omitempty"`
1906
1907	// ForceSendFields is a list of field names (e.g. "Alias") to
1908	// unconditionally include in API requests. By default, fields with
1909	// empty values are omitted from API requests. However, any non-pointer,
1910	// non-interface field appearing in ForceSendFields will be sent to the
1911	// server regardless of whether the field is empty or not. This may be
1912	// used to include empty fields in Patch requests.
1913	ForceSendFields []string `json:"-"`
1914
1915	// NullFields is a list of field names (e.g. "Alias") to include in API
1916	// requests with the JSON null value. By default, fields with empty
1917	// values are omitted from API requests. However, any field with an
1918	// empty value appearing in NullFields will be sent to the server as
1919	// null. It is an error if a field in this list has a non-empty value.
1920	// This may be used to include null fields in Patch requests.
1921	NullFields []string `json:"-"`
1922}
1923
1924func (s *GoogleCloudDialogflowV2IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
1925	type NoMethod GoogleCloudDialogflowV2IntentTrainingPhrasePart
1926	raw := NoMethod(*s)
1927	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1928}
1929
1930// GoogleCloudDialogflowV2OriginalDetectIntentRequest: Represents the
1931// contents of the original request that was passed to
1932// the `[Streaming]DetectIntent` call.
1933type GoogleCloudDialogflowV2OriginalDetectIntentRequest struct {
1934	// Payload: Optional. This field is set to the value of the
1935	// `QueryParameters.payload`
1936	// field passed in the request. Some integrations that query a
1937	// Dialogflow
1938	// agent may provide additional information in the payload.
1939	//
1940	// In particular for the Telephony Gateway this field has the
1941	// form:
1942	// <pre>{
1943	//  "telephony": {
1944	//    "caller_id": "+18558363987"
1945	//  }
1946	// }</pre>
1947	// Note: The caller ID field (`caller_id`) will be redacted for
1948	// Standard
1949	// Edition agents and populated with the caller ID in
1950	// [E.164
1951	// format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition
1952	// agents.
1953	Payload googleapi.RawMessage `json:"payload,omitempty"`
1954
1955	// Source: The source of this request, e.g., `google`, `facebook`,
1956	// `slack`. It is set
1957	// by Dialogflow-owned servers.
1958	Source string `json:"source,omitempty"`
1959
1960	// Version: Optional. The version of the protocol used for this
1961	// request.
1962	// This field is AoG-specific.
1963	Version string `json:"version,omitempty"`
1964
1965	// ForceSendFields is a list of field names (e.g. "Payload") to
1966	// unconditionally include in API requests. By default, fields with
1967	// empty values are omitted from API requests. However, any non-pointer,
1968	// non-interface field appearing in ForceSendFields will be sent to the
1969	// server regardless of whether the field is empty or not. This may be
1970	// used to include empty fields in Patch requests.
1971	ForceSendFields []string `json:"-"`
1972
1973	// NullFields is a list of field names (e.g. "Payload") to include in
1974	// API requests with the JSON null value. By default, fields with empty
1975	// values are omitted from API requests. However, any field with an
1976	// empty value appearing in NullFields will be sent to the server as
1977	// null. It is an error if a field in this list has a non-empty value.
1978	// This may be used to include null fields in Patch requests.
1979	NullFields []string `json:"-"`
1980}
1981
1982func (s *GoogleCloudDialogflowV2OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) {
1983	type NoMethod GoogleCloudDialogflowV2OriginalDetectIntentRequest
1984	raw := NoMethod(*s)
1985	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1986}
1987
1988// GoogleCloudDialogflowV2QueryResult: Represents the result of
1989// conversational query or event processing.
1990type GoogleCloudDialogflowV2QueryResult struct {
1991	// Action: The action name from the matched intent.
1992	Action string `json:"action,omitempty"`
1993
1994	// AllRequiredParamsPresent: This field is set to:
1995	//
1996	// - `false` if the matched intent has required parameters and not all
1997	// of
1998	//    the required parameter values have been collected.
1999	// - `true` if all required parameter values have been collected, or if
2000	// the
2001	//    matched intent doesn't contain any required parameters.
2002	AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"`
2003
2004	// DiagnosticInfo: The free-form diagnostic info. For example, this
2005	// field could contain
2006	// webhook call latency. The string keys of the Struct's fields map can
2007	// change
2008	// without notice.
2009	DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
2010
2011	// FulfillmentMessages: The collection of rich messages to present to
2012	// the user.
2013	FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"`
2014
2015	// FulfillmentText: The text to be pronounced to the user or shown on
2016	// the screen.
2017	// Note: This is a legacy field, `fulfillment_messages` should be
2018	// preferred.
2019	FulfillmentText string `json:"fulfillmentText,omitempty"`
2020
2021	// Intent: The intent that matched the conversational query. Some,
2022	// not
2023	// all fields are filled in this message, including but not limited
2024	// to:
2025	// `name`, `display_name` and `webhook_state`.
2026	Intent *GoogleCloudDialogflowV2Intent `json:"intent,omitempty"`
2027
2028	// IntentDetectionConfidence: The intent detection confidence. Values
2029	// range from 0.0
2030	// (completely uncertain) to 1.0 (completely certain).
2031	// If there are `multiple knowledge_answers` messages, this value is set
2032	// to
2033	// the greatest `knowledgeAnswers.match_confidence` value in the list.
2034	IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"`
2035
2036	// LanguageCode: The language that was triggered during intent
2037	// detection.
2038	// See
2039	// [Language
2040	// Support](https://cloud.google.com/dialogflow/docs/reference/
2041	// language)
2042	// for a list of the currently supported language codes.
2043	LanguageCode string `json:"languageCode,omitempty"`
2044
2045	// OutputContexts: The collection of output contexts. If
2046	// applicable,
2047	// `output_contexts.parameters` contains entries with name
2048	// `<parameter name>.original` containing the original parameter
2049	// values
2050	// before the query.
2051	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
2052
2053	// Parameters: The collection of extracted parameters.
2054	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
2055
2056	// QueryText: The original conversational query text:
2057	//
2058	// - If natural language text was provided as input, `query_text`
2059	// contains
2060	//   a copy of the input.
2061	// - If natural language speech audio was provided as input,
2062	// `query_text`
2063	//   contains the speech recognition result. If speech recognizer
2064	// produced
2065	//   multiple alternatives, a particular one is picked.
2066	// - If automatic spell correction is enabled, `query_text` will contain
2067	// the
2068	//   corrected user input.
2069	QueryText string `json:"queryText,omitempty"`
2070
2071	// SentimentAnalysisResult: The sentiment analysis result, which depends
2072	// on the
2073	// `sentiment_analysis_request_config` specified in the request.
2074	SentimentAnalysisResult *GoogleCloudDialogflowV2SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"`
2075
2076	// SpeechRecognitionConfidence: The Speech recognition confidence
2077	// between 0.0 and 1.0. A higher number
2078	// indicates an estimated greater likelihood that the recognized words
2079	// are
2080	// correct. The default of 0.0 is a sentinel value indicating that
2081	// confidence
2082	// was not set.
2083	//
2084	// This field is not guaranteed to be accurate or set. In particular
2085	// this
2086	// field isn't set for StreamingDetectIntent since the streaming
2087	// endpoint has
2088	// separate confidence estimates per portion of the audio
2089	// in
2090	// StreamingRecognitionResult.
2091	SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"`
2092
2093	// WebhookPayload: If the query was fulfilled by a webhook call, this
2094	// field is set to the
2095	// value of the `payload` field returned in the webhook response.
2096	WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"`
2097
2098	// WebhookSource: If the query was fulfilled by a webhook call, this
2099	// field is set to the
2100	// value of the `source` field returned in the webhook response.
2101	WebhookSource string `json:"webhookSource,omitempty"`
2102
2103	// ForceSendFields is a list of field names (e.g. "Action") to
2104	// unconditionally include in API requests. By default, fields with
2105	// empty values are omitted from API requests. However, any non-pointer,
2106	// non-interface field appearing in ForceSendFields will be sent to the
2107	// server regardless of whether the field is empty or not. This may be
2108	// used to include empty fields in Patch requests.
2109	ForceSendFields []string `json:"-"`
2110
2111	// NullFields is a list of field names (e.g. "Action") to include in API
2112	// requests with the JSON null value. By default, fields with empty
2113	// values are omitted from API requests. However, any field with an
2114	// empty value appearing in NullFields will be sent to the server as
2115	// null. It is an error if a field in this list has a non-empty value.
2116	// This may be used to include null fields in Patch requests.
2117	NullFields []string `json:"-"`
2118}
2119
2120func (s *GoogleCloudDialogflowV2QueryResult) MarshalJSON() ([]byte, error) {
2121	type NoMethod GoogleCloudDialogflowV2QueryResult
2122	raw := NoMethod(*s)
2123	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2124}
2125
2126func (s *GoogleCloudDialogflowV2QueryResult) UnmarshalJSON(data []byte) error {
2127	type NoMethod GoogleCloudDialogflowV2QueryResult
2128	var s1 struct {
2129		IntentDetectionConfidence   gensupport.JSONFloat64 `json:"intentDetectionConfidence"`
2130		SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"`
2131		*NoMethod
2132	}
2133	s1.NoMethod = (*NoMethod)(s)
2134	if err := json.Unmarshal(data, &s1); err != nil {
2135		return err
2136	}
2137	s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence)
2138	s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence)
2139	return nil
2140}
2141
2142// GoogleCloudDialogflowV2Sentiment: The sentiment, such as
2143// positive/negative feeling or association, for a unit
2144// of analysis, such as the query text.
2145type GoogleCloudDialogflowV2Sentiment struct {
2146	// Magnitude: A non-negative number in the [0, +inf) range, which
2147	// represents the absolute
2148	// magnitude of sentiment, regardless of score (positive or negative).
2149	Magnitude float64 `json:"magnitude,omitempty"`
2150
2151	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0
2152	// (positive
2153	// sentiment).
2154	Score float64 `json:"score,omitempty"`
2155
2156	// ForceSendFields is a list of field names (e.g. "Magnitude") to
2157	// unconditionally include in API requests. By default, fields with
2158	// empty values are omitted from API requests. However, any non-pointer,
2159	// non-interface field appearing in ForceSendFields will be sent to the
2160	// server regardless of whether the field is empty or not. This may be
2161	// used to include empty fields in Patch requests.
2162	ForceSendFields []string `json:"-"`
2163
2164	// NullFields is a list of field names (e.g. "Magnitude") to include in
2165	// API requests with the JSON null value. By default, fields with empty
2166	// values are omitted from API requests. However, any field with an
2167	// empty value appearing in NullFields will be sent to the server as
2168	// null. It is an error if a field in this list has a non-empty value.
2169	// This may be used to include null fields in Patch requests.
2170	NullFields []string `json:"-"`
2171}
2172
2173func (s *GoogleCloudDialogflowV2Sentiment) MarshalJSON() ([]byte, error) {
2174	type NoMethod GoogleCloudDialogflowV2Sentiment
2175	raw := NoMethod(*s)
2176	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2177}
2178
2179func (s *GoogleCloudDialogflowV2Sentiment) UnmarshalJSON(data []byte) error {
2180	type NoMethod GoogleCloudDialogflowV2Sentiment
2181	var s1 struct {
2182		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
2183		Score     gensupport.JSONFloat64 `json:"score"`
2184		*NoMethod
2185	}
2186	s1.NoMethod = (*NoMethod)(s)
2187	if err := json.Unmarshal(data, &s1); err != nil {
2188		return err
2189	}
2190	s.Magnitude = float64(s1.Magnitude)
2191	s.Score = float64(s1.Score)
2192	return nil
2193}
2194
2195// GoogleCloudDialogflowV2SentimentAnalysisResult: The result of
2196// sentiment analysis as configured
2197// by
2198// `sentiment_analysis_request_config`.
2199type GoogleCloudDialogflowV2SentimentAnalysisResult struct {
2200	// QueryTextSentiment: The sentiment analysis result for `query_text`.
2201	QueryTextSentiment *GoogleCloudDialogflowV2Sentiment `json:"queryTextSentiment,omitempty"`
2202
2203	// ForceSendFields is a list of field names (e.g. "QueryTextSentiment")
2204	// to unconditionally include in API requests. By default, fields with
2205	// empty values are omitted from API requests. However, any non-pointer,
2206	// non-interface field appearing in ForceSendFields will be sent to the
2207	// server regardless of whether the field is empty or not. This may be
2208	// used to include empty fields in Patch requests.
2209	ForceSendFields []string `json:"-"`
2210
2211	// NullFields is a list of field names (e.g. "QueryTextSentiment") to
2212	// include in API requests with the JSON null value. By default, fields
2213	// with empty values are omitted from API requests. However, any field
2214	// with an empty value appearing in NullFields will be sent to the
2215	// server as null. It is an error if a field in this list has a
2216	// non-empty value. This may be used to include null fields in Patch
2217	// requests.
2218	NullFields []string `json:"-"`
2219}
2220
2221func (s *GoogleCloudDialogflowV2SentimentAnalysisResult) MarshalJSON() ([]byte, error) {
2222	type NoMethod GoogleCloudDialogflowV2SentimentAnalysisResult
2223	raw := NoMethod(*s)
2224	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2225}
2226
2227// GoogleCloudDialogflowV2WebhookRequest: The request message for a
2228// webhook call.
2229type GoogleCloudDialogflowV2WebhookRequest struct {
2230	// OriginalDetectIntentRequest: Optional. The contents of the original
2231	// request that was passed to
2232	// `[Streaming]DetectIntent` call.
2233	OriginalDetectIntentRequest *GoogleCloudDialogflowV2OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"`
2234
2235	// QueryResult: The result of the conversational query or event
2236	// processing. Contains the
2237	// same value as `[Streaming]DetectIntentResponse.query_result`.
2238	QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"`
2239
2240	// ResponseId: The unique identifier of the response. Contains the same
2241	// value as
2242	// `[Streaming]DetectIntentResponse.response_id`.
2243	ResponseId string `json:"responseId,omitempty"`
2244
2245	// Session: The unique identifier of detectIntent request session.
2246	// Can be used to identify end-user inside webhook
2247	// implementation.
2248	// Format: `projects/<Project ID>/agent/sessions/<Session ID>`,
2249	// or
2250	// `projects/<Project ID>/agent/environments/<Environment
2251	// ID>/users/<User
2252	// ID>/sessions/<Session ID>`.
2253	Session string `json:"session,omitempty"`
2254
2255	// ForceSendFields is a list of field names (e.g.
2256	// "OriginalDetectIntentRequest") to unconditionally include in API
2257	// requests. By default, fields with empty values are omitted from API
2258	// requests. However, any non-pointer, non-interface field appearing in
2259	// ForceSendFields will be sent to the server regardless of whether the
2260	// field is empty or not. This may be used to include empty fields in
2261	// Patch requests.
2262	ForceSendFields []string `json:"-"`
2263
2264	// NullFields is a list of field names (e.g.
2265	// "OriginalDetectIntentRequest") to include in API requests with the
2266	// JSON null value. By default, fields with empty values are omitted
2267	// from API requests. However, any field with an empty value appearing
2268	// in NullFields will be sent to the server as null. It is an error if a
2269	// field in this list has a non-empty value. This may be used to include
2270	// null fields in Patch requests.
2271	NullFields []string `json:"-"`
2272}
2273
2274func (s *GoogleCloudDialogflowV2WebhookRequest) MarshalJSON() ([]byte, error) {
2275	type NoMethod GoogleCloudDialogflowV2WebhookRequest
2276	raw := NoMethod(*s)
2277	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2278}
2279
2280// GoogleCloudDialogflowV2WebhookResponse: The response message for a
2281// webhook call.
2282type GoogleCloudDialogflowV2WebhookResponse struct {
2283	// FollowupEventInput: Optional. Makes the platform immediately invoke
2284	// another `DetectIntent` call
2285	// internally with the specified event as input.
2286	// When this field is set, Dialogflow ignores the
2287	// `fulfillment_text`,
2288	// `fulfillment_messages`, and `payload` fields.
2289	FollowupEventInput *GoogleCloudDialogflowV2EventInput `json:"followupEventInput,omitempty"`
2290
2291	// FulfillmentMessages: Optional. The collection of rich messages to
2292	// present to the user. This
2293	// value is passed directly to `QueryResult.fulfillment_messages`.
2294	FulfillmentMessages []*GoogleCloudDialogflowV2IntentMessage `json:"fulfillmentMessages,omitempty"`
2295
2296	// FulfillmentText: Optional. The text to be shown on the screen. This
2297	// value is passed directly
2298	// to `QueryResult.fulfillment_text`.
2299	FulfillmentText string `json:"fulfillmentText,omitempty"`
2300
2301	// OutputContexts: Optional. The collection of output contexts. This
2302	// value is passed directly
2303	// to `QueryResult.output_contexts`.
2304	OutputContexts []*GoogleCloudDialogflowV2Context `json:"outputContexts,omitempty"`
2305
2306	// Payload: Optional. This value is passed directly to
2307	// `QueryResult.webhook_payload`.
2308	// See the related `fulfillment_messages[i].payload field`, which may be
2309	// used
2310	// as an alternative to this field.
2311	//
2312	// This field can be used for Actions on Google responses.
2313	// It should have a structure similar to the JSON message shown here.
2314	// For more
2315	// information, see
2316	// [Actions on Google
2317	// Webhook
2318	// Format](https://developers.google.com/actions/dialogflow/webho
2319	// ok)
2320	// <pre>{
2321	//   "google": {
2322	//     "expectUserResponse": true,
2323	//     "richResponse": {
2324	//       "items": [
2325	//         {
2326	//           "simpleResponse": {
2327	//             "textToSpeech": "this is a simple response"
2328	//           }
2329	//         }
2330	//       ]
2331	//     }
2332	//   }
2333	// }</pre>
2334	Payload googleapi.RawMessage `json:"payload,omitempty"`
2335
2336	// Source: Optional. This value is passed directly to
2337	// `QueryResult.webhook_source`.
2338	Source string `json:"source,omitempty"`
2339
2340	// ForceSendFields is a list of field names (e.g. "FollowupEventInput")
2341	// to unconditionally include in API requests. By default, fields with
2342	// empty values are omitted from API requests. However, any non-pointer,
2343	// non-interface field appearing in ForceSendFields will be sent to the
2344	// server regardless of whether the field is empty or not. This may be
2345	// used to include empty fields in Patch requests.
2346	ForceSendFields []string `json:"-"`
2347
2348	// NullFields is a list of field names (e.g. "FollowupEventInput") to
2349	// include in API requests with the JSON null value. By default, fields
2350	// with empty values are omitted from API requests. However, any field
2351	// with an empty value appearing in NullFields will be sent to the
2352	// server as null. It is an error if a field in this list has a
2353	// non-empty value. This may be used to include null fields in Patch
2354	// requests.
2355	NullFields []string `json:"-"`
2356}
2357
2358func (s *GoogleCloudDialogflowV2WebhookResponse) MarshalJSON() ([]byte, error) {
2359	type NoMethod GoogleCloudDialogflowV2WebhookResponse
2360	raw := NoMethod(*s)
2361	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2362}
2363
2364// GoogleCloudDialogflowV2beta1Agent: Represents a conversational agent.
2365type GoogleCloudDialogflowV2beta1Agent struct {
2366	// ApiVersion: Optional. API version displayed in Dialogflow console. If
2367	// not specified,
2368	// V2 API is assumed. Clients are free to query different service
2369	// endpoints
2370	// for different API versions. However, bots connectors and webhook
2371	// calls will
2372	// follow the specified API version.
2373	//
2374	// Possible values:
2375	//   "API_VERSION_UNSPECIFIED" - Not specified.
2376	//   "API_VERSION_V1" - Legacy V1 API.
2377	//   "API_VERSION_V2" - V2 API.
2378	//   "API_VERSION_V2_BETA_1" - V2beta1 API.
2379	ApiVersion string `json:"apiVersion,omitempty"`
2380
2381	// AvatarUri: Optional. The URI of the agent's avatar.
2382	// Avatars are used throughout the Dialogflow console and in the
2383	// self-hosted
2384	// [Web
2385	// Demo](https://cloud.google.com/dialogflow/docs/integr
2386	// ations/web-demo)
2387	// integration.
2388	AvatarUri string `json:"avatarUri,omitempty"`
2389
2390	// ClassificationThreshold: Optional. To filter out false positive
2391	// results and still get variety in
2392	// matched natural language inputs for your agent, you can tune the
2393	// machine
2394	// learning classification threshold. If the returned score value is
2395	// less than
2396	// the threshold value, then a fallback intent will be triggered or, if
2397	// there
2398	// are no fallback intents defined, no intent will be triggered. The
2399	// score
2400	// values range from 0.0 (completely uncertain) to 1.0 (completely
2401	// certain).
2402	// If set to 0.0, the default of 0.3 is used.
2403	ClassificationThreshold float64 `json:"classificationThreshold,omitempty"`
2404
2405	// DefaultLanguageCode: Required. The default language of the agent as a
2406	// language tag.
2407	// See
2408	// [Language
2409	// Support](https://cloud.google.com/dialogflow/docs/refere
2410	// nce/language)
2411	// for a list of the currently supported language codes. This field
2412	// cannot be
2413	// set by the `Update` method.
2414	DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"`
2415
2416	// Description: Optional. The description of this agent.
2417	// The maximum length is 500 characters. If exceeded, the request is
2418	// rejected.
2419	Description string `json:"description,omitempty"`
2420
2421	// DisplayName: Required. The name of this agent.
2422	DisplayName string `json:"displayName,omitempty"`
2423
2424	// EnableLogging: Optional. Determines whether this agent should log
2425	// conversation queries.
2426	EnableLogging bool `json:"enableLogging,omitempty"`
2427
2428	// MatchMode: Optional. Determines how intents are detected from user
2429	// queries.
2430	//
2431	// Possible values:
2432	//   "MATCH_MODE_UNSPECIFIED" - Not specified.
2433	//   "MATCH_MODE_HYBRID" - Best for agents with a small number of
2434	// examples in intents and/or wide
2435	// use of templates syntax and composite entities.
2436	//   "MATCH_MODE_ML_ONLY" - Can be used for agents with a large number
2437	// of examples in intents,
2438	// especially the ones using @sys.any or very large developer entities.
2439	MatchMode string `json:"matchMode,omitempty"`
2440
2441	// Parent: Required. The project of this agent.
2442	// Format: `projects/<Project ID>`.
2443	Parent string `json:"parent,omitempty"`
2444
2445	// SupportedLanguageCodes: Optional. The list of all languages supported
2446	// by this agent (except for the
2447	// `default_language_code`).
2448	SupportedLanguageCodes []string `json:"supportedLanguageCodes,omitempty"`
2449
2450	// Tier: Optional. The agent tier. If not specified, TIER_STANDARD is
2451	// assumed.
2452	//
2453	// Possible values:
2454	//   "TIER_UNSPECIFIED" - Not specified. This value should never be
2455	// used.
2456	//   "TIER_STANDARD" - Standard tier.
2457	//   "TIER_ENTERPRISE" - Enterprise tier (Essentials).
2458	//   "TIER_ENTERPRISE_PLUS" - Enterprise tier (Plus).
2459	Tier string `json:"tier,omitempty"`
2460
2461	// TimeZone: Required. The time zone of this agent from the
2462	// [time zone database](https://www.iana.org/time-zones),
2463	// e.g.,
2464	// America/New_York, Europe/Paris.
2465	TimeZone string `json:"timeZone,omitempty"`
2466
2467	// ServerResponse contains the HTTP response code and headers from the
2468	// server.
2469	googleapi.ServerResponse `json:"-"`
2470
2471	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
2472	// unconditionally include in API requests. By default, fields with
2473	// empty values are omitted from API requests. However, any non-pointer,
2474	// non-interface field appearing in ForceSendFields will be sent to the
2475	// server regardless of whether the field is empty or not. This may be
2476	// used to include empty fields in Patch requests.
2477	ForceSendFields []string `json:"-"`
2478
2479	// NullFields is a list of field names (e.g. "ApiVersion") to include in
2480	// API requests with the JSON null value. By default, fields with empty
2481	// values are omitted from API requests. However, any field with an
2482	// empty value appearing in NullFields will be sent to the server as
2483	// null. It is an error if a field in this list has a non-empty value.
2484	// This may be used to include null fields in Patch requests.
2485	NullFields []string `json:"-"`
2486}
2487
2488func (s *GoogleCloudDialogflowV2beta1Agent) MarshalJSON() ([]byte, error) {
2489	type NoMethod GoogleCloudDialogflowV2beta1Agent
2490	raw := NoMethod(*s)
2491	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2492}
2493
2494func (s *GoogleCloudDialogflowV2beta1Agent) UnmarshalJSON(data []byte) error {
2495	type NoMethod GoogleCloudDialogflowV2beta1Agent
2496	var s1 struct {
2497		ClassificationThreshold gensupport.JSONFloat64 `json:"classificationThreshold"`
2498		*NoMethod
2499	}
2500	s1.NoMethod = (*NoMethod)(s)
2501	if err := json.Unmarshal(data, &s1); err != nil {
2502		return err
2503	}
2504	s.ClassificationThreshold = float64(s1.ClassificationThreshold)
2505	return nil
2506}
2507
2508// GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest: The request
2509// message for EntityTypes.BatchCreateEntities.
2510type GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest struct {
2511	// Entities: Required. The entities to create.
2512	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
2513
2514	// LanguageCode: Optional. The language of entity synonyms defined in
2515	// `entities`. If not
2516	// specified, the agent's default language is
2517	// used.
2518	// [Many
2519	// languages](https://cloud.google.com/dialogflow/docs/refere
2520	// nce/language)
2521	// are supported. Note: languages must be enabled in the agent before
2522	// they can
2523	// be used.
2524	LanguageCode string `json:"languageCode,omitempty"`
2525
2526	// ForceSendFields is a list of field names (e.g. "Entities") to
2527	// unconditionally include in API requests. By default, fields with
2528	// empty values are omitted from API requests. However, any non-pointer,
2529	// non-interface field appearing in ForceSendFields will be sent to the
2530	// server regardless of whether the field is empty or not. This may be
2531	// used to include empty fields in Patch requests.
2532	ForceSendFields []string `json:"-"`
2533
2534	// NullFields is a list of field names (e.g. "Entities") to include in
2535	// API requests with the JSON null value. By default, fields with empty
2536	// values are omitted from API requests. However, any field with an
2537	// empty value appearing in NullFields will be sent to the server as
2538	// null. It is an error if a field in this list has a non-empty value.
2539	// This may be used to include null fields in Patch requests.
2540	NullFields []string `json:"-"`
2541}
2542
2543func (s *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest) MarshalJSON() ([]byte, error) {
2544	type NoMethod GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest
2545	raw := NoMethod(*s)
2546	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2547}
2548
2549// GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest: The request
2550// message for EntityTypes.BatchDeleteEntities.
2551type GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest struct {
2552	// EntityValues: Required. The canonical `values` of the entities to
2553	// delete. Note that
2554	// these are not fully-qualified names, i.e. they don't start
2555	// with
2556	// `projects/<Project ID>`.
2557	EntityValues []string `json:"entityValues,omitempty"`
2558
2559	// LanguageCode: Optional. The language of entity synonyms defined in
2560	// `entities`. If not
2561	// specified, the agent's default language is
2562	// used.
2563	// [Many
2564	// languages](https://cloud.google.com/dialogflow/docs/refere
2565	// nce/language)
2566	// are supported. Note: languages must be enabled in the agent before
2567	// they can
2568	// be used.
2569	LanguageCode string `json:"languageCode,omitempty"`
2570
2571	// ForceSendFields is a list of field names (e.g. "EntityValues") to
2572	// unconditionally include in API requests. By default, fields with
2573	// empty values are omitted from API requests. However, any non-pointer,
2574	// non-interface field appearing in ForceSendFields will be sent to the
2575	// server regardless of whether the field is empty or not. This may be
2576	// used to include empty fields in Patch requests.
2577	ForceSendFields []string `json:"-"`
2578
2579	// NullFields is a list of field names (e.g. "EntityValues") to include
2580	// in API requests with the JSON null value. By default, fields with
2581	// empty values are omitted from API requests. However, any field with
2582	// an empty value appearing in NullFields will be sent to the server as
2583	// null. It is an error if a field in this list has a non-empty value.
2584	// This may be used to include null fields in Patch requests.
2585	NullFields []string `json:"-"`
2586}
2587
2588func (s *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest) MarshalJSON() ([]byte, error) {
2589	type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest
2590	raw := NoMethod(*s)
2591	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2592}
2593
2594// GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest: The
2595// request message for EntityTypes.BatchDeleteEntityTypes.
2596type GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest struct {
2597	// EntityTypeNames: Required. The names entity types to delete. All
2598	// names must point to the
2599	// same agent as `parent`.
2600	EntityTypeNames []string `json:"entityTypeNames,omitempty"`
2601
2602	// ForceSendFields is a list of field names (e.g. "EntityTypeNames") to
2603	// unconditionally include in API requests. By default, fields with
2604	// empty values are omitted from API requests. However, any non-pointer,
2605	// non-interface field appearing in ForceSendFields will be sent to the
2606	// server regardless of whether the field is empty or not. This may be
2607	// used to include empty fields in Patch requests.
2608	ForceSendFields []string `json:"-"`
2609
2610	// NullFields is a list of field names (e.g. "EntityTypeNames") to
2611	// include in API requests with the JSON null value. By default, fields
2612	// with empty values are omitted from API requests. However, any field
2613	// with an empty value appearing in NullFields will be sent to the
2614	// server as null. It is an error if a field in this list has a
2615	// non-empty value. This may be used to include null fields in Patch
2616	// requests.
2617	NullFields []string `json:"-"`
2618}
2619
2620func (s *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest) MarshalJSON() ([]byte, error) {
2621	type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest
2622	raw := NoMethod(*s)
2623	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2624}
2625
2626// GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest: The request
2627// message for Intents.BatchDeleteIntents.
2628type GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest struct {
2629	// Intents: Required. The collection of intents to delete. Only intent
2630	// `name` must be
2631	// filled in.
2632	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
2633
2634	// ForceSendFields is a list of field names (e.g. "Intents") to
2635	// unconditionally include in API requests. By default, fields with
2636	// empty values are omitted from API requests. However, any non-pointer,
2637	// non-interface field appearing in ForceSendFields will be sent to the
2638	// server regardless of whether the field is empty or not. This may be
2639	// used to include empty fields in Patch requests.
2640	ForceSendFields []string `json:"-"`
2641
2642	// NullFields is a list of field names (e.g. "Intents") to include in
2643	// API requests with the JSON null value. By default, fields with empty
2644	// values are omitted from API requests. However, any field with an
2645	// empty value appearing in NullFields will be sent to the server as
2646	// null. It is an error if a field in this list has a non-empty value.
2647	// This may be used to include null fields in Patch requests.
2648	NullFields []string `json:"-"`
2649}
2650
2651func (s *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest) MarshalJSON() ([]byte, error) {
2652	type NoMethod GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest
2653	raw := NoMethod(*s)
2654	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2655}
2656
2657// GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest: The request
2658// message for EntityTypes.BatchUpdateEntities.
2659type GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest struct {
2660	// Entities: Required. The entities to update or create.
2661	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
2662
2663	// LanguageCode: Optional. The language of entity synonyms defined in
2664	// `entities`. If not
2665	// specified, the agent's default language is
2666	// used.
2667	// [Many
2668	// languages](https://cloud.google.com/dialogflow/docs/refere
2669	// nce/language)
2670	// are supported. Note: languages must be enabled in the agent before
2671	// they can
2672	// be used.
2673	LanguageCode string `json:"languageCode,omitempty"`
2674
2675	// UpdateMask: Optional. The mask to control which fields get updated.
2676	UpdateMask string `json:"updateMask,omitempty"`
2677
2678	// ForceSendFields is a list of field names (e.g. "Entities") to
2679	// unconditionally include in API requests. By default, fields with
2680	// empty values are omitted from API requests. However, any non-pointer,
2681	// non-interface field appearing in ForceSendFields will be sent to the
2682	// server regardless of whether the field is empty or not. This may be
2683	// used to include empty fields in Patch requests.
2684	ForceSendFields []string `json:"-"`
2685
2686	// NullFields is a list of field names (e.g. "Entities") to include in
2687	// API requests with the JSON null value. By default, fields with empty
2688	// values are omitted from API requests. However, any field with an
2689	// empty value appearing in NullFields will be sent to the server as
2690	// null. It is an error if a field in this list has a non-empty value.
2691	// This may be used to include null fields in Patch requests.
2692	NullFields []string `json:"-"`
2693}
2694
2695func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest) MarshalJSON() ([]byte, error) {
2696	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest
2697	raw := NoMethod(*s)
2698	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2699}
2700
2701// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest: The
2702// request message for EntityTypes.BatchUpdateEntityTypes.
2703type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest struct {
2704	// EntityTypeBatchInline: The collection of entity types to update or
2705	// create.
2706	EntityTypeBatchInline *GoogleCloudDialogflowV2beta1EntityTypeBatch `json:"entityTypeBatchInline,omitempty"`
2707
2708	// EntityTypeBatchUri: The URI to a Google Cloud Storage file containing
2709	// entity types to update
2710	// or create. The file format can either be a serialized proto
2711	// (of
2712	// EntityBatch type) or a JSON object. Note: The URI must start
2713	// with
2714	// "gs://".
2715	EntityTypeBatchUri string `json:"entityTypeBatchUri,omitempty"`
2716
2717	// LanguageCode: Optional. The language of entity synonyms defined in
2718	// `entity_types`. If not
2719	// specified, the agent's default language is
2720	// used.
2721	// [Many
2722	// languages](https://cloud.google.com/dialogflow/docs/refere
2723	// nce/language)
2724	// are supported. Note: languages must be enabled in the agent before
2725	// they can
2726	// be used.
2727	LanguageCode string `json:"languageCode,omitempty"`
2728
2729	// UpdateMask: Optional. The mask to control which fields get updated.
2730	UpdateMask string `json:"updateMask,omitempty"`
2731
2732	// ForceSendFields is a list of field names (e.g.
2733	// "EntityTypeBatchInline") to unconditionally include in API requests.
2734	// By default, fields with empty values are omitted from API requests.
2735	// However, any non-pointer, non-interface field appearing in
2736	// ForceSendFields will be sent to the server regardless of whether the
2737	// field is empty or not. This may be used to include empty fields in
2738	// Patch requests.
2739	ForceSendFields []string `json:"-"`
2740
2741	// NullFields is a list of field names (e.g. "EntityTypeBatchInline") to
2742	// include in API requests with the JSON null value. By default, fields
2743	// with empty values are omitted from API requests. However, any field
2744	// with an empty value appearing in NullFields will be sent to the
2745	// server as null. It is an error if a field in this list has a
2746	// non-empty value. This may be used to include null fields in Patch
2747	// requests.
2748	NullFields []string `json:"-"`
2749}
2750
2751func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest) MarshalJSON() ([]byte, error) {
2752	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest
2753	raw := NoMethod(*s)
2754	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2755}
2756
2757// GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse: The
2758// response message for EntityTypes.BatchUpdateEntityTypes.
2759type GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse struct {
2760	// EntityTypes: The collection of updated or created entity types.
2761	EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
2762
2763	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
2764	// unconditionally include in API requests. By default, fields with
2765	// empty values are omitted from API requests. However, any non-pointer,
2766	// non-interface field appearing in ForceSendFields will be sent to the
2767	// server regardless of whether the field is empty or not. This may be
2768	// used to include empty fields in Patch requests.
2769	ForceSendFields []string `json:"-"`
2770
2771	// NullFields is a list of field names (e.g. "EntityTypes") to include
2772	// in API requests with the JSON null value. By default, fields with
2773	// empty values are omitted from API requests. However, any field with
2774	// an empty value appearing in NullFields will be sent to the server as
2775	// null. It is an error if a field in this list has a non-empty value.
2776	// This may be used to include null fields in Patch requests.
2777	NullFields []string `json:"-"`
2778}
2779
2780func (s *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse) MarshalJSON() ([]byte, error) {
2781	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
2782	raw := NoMethod(*s)
2783	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2784}
2785
2786// GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest: The request
2787// message for Intents.BatchUpdateIntents.
2788type GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest struct {
2789	// IntentBatchInline: The collection of intents to update or create.
2790	IntentBatchInline *GoogleCloudDialogflowV2beta1IntentBatch `json:"intentBatchInline,omitempty"`
2791
2792	// IntentBatchUri: The URI to a Google Cloud Storage file containing
2793	// intents to update or
2794	// create. The file format can either be a serialized proto (of
2795	// IntentBatch
2796	// type) or JSON object. Note: The URI must start with "gs://".
2797	IntentBatchUri string `json:"intentBatchUri,omitempty"`
2798
2799	// IntentView: Optional. The resource view to apply to the returned
2800	// intent.
2801	//
2802	// Possible values:
2803	//   "INTENT_VIEW_UNSPECIFIED" - Training phrases field is not populated
2804	// in the response.
2805	//   "INTENT_VIEW_FULL" - All fields are populated.
2806	IntentView string `json:"intentView,omitempty"`
2807
2808	// LanguageCode: Optional. The language of training phrases, parameters
2809	// and rich messages
2810	// defined in `intents`. If not specified, the agent's default language
2811	// is
2812	// used.
2813	// [Many
2814	// languages](https://cloud.google.com/dialogflow/docs/reference/la
2815	// nguage)
2816	// are supported. Note: languages must be enabled in the agent before
2817	// they can
2818	// be used.
2819	LanguageCode string `json:"languageCode,omitempty"`
2820
2821	// UpdateMask: Optional. The mask to control which fields get updated.
2822	UpdateMask string `json:"updateMask,omitempty"`
2823
2824	// ForceSendFields is a list of field names (e.g. "IntentBatchInline")
2825	// to unconditionally include in API requests. By default, fields with
2826	// empty values are omitted from API requests. However, any non-pointer,
2827	// non-interface field appearing in ForceSendFields will be sent to the
2828	// server regardless of whether the field is empty or not. This may be
2829	// used to include empty fields in Patch requests.
2830	ForceSendFields []string `json:"-"`
2831
2832	// NullFields is a list of field names (e.g. "IntentBatchInline") to
2833	// include in API requests with the JSON null value. By default, fields
2834	// with empty values are omitted from API requests. However, any field
2835	// with an empty value appearing in NullFields will be sent to the
2836	// server as null. It is an error if a field in this list has a
2837	// non-empty value. This may be used to include null fields in Patch
2838	// requests.
2839	NullFields []string `json:"-"`
2840}
2841
2842func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest) MarshalJSON() ([]byte, error) {
2843	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest
2844	raw := NoMethod(*s)
2845	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2846}
2847
2848// GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse: The response
2849// message for Intents.BatchUpdateIntents.
2850type GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse struct {
2851	// Intents: The collection of updated or created intents.
2852	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
2853
2854	// ForceSendFields is a list of field names (e.g. "Intents") to
2855	// unconditionally include in API requests. By default, fields with
2856	// empty values are omitted from API requests. However, any non-pointer,
2857	// non-interface field appearing in ForceSendFields will be sent to the
2858	// server regardless of whether the field is empty or not. This may be
2859	// used to include empty fields in Patch requests.
2860	ForceSendFields []string `json:"-"`
2861
2862	// NullFields is a list of field names (e.g. "Intents") to include in
2863	// API requests with the JSON null value. By default, fields with empty
2864	// values are omitted from API requests. However, any field with an
2865	// empty value appearing in NullFields will be sent to the server as
2866	// null. It is an error if a field in this list has a non-empty value.
2867	// This may be used to include null fields in Patch requests.
2868	NullFields []string `json:"-"`
2869}
2870
2871func (s *GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse) MarshalJSON() ([]byte, error) {
2872	type NoMethod GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
2873	raw := NoMethod(*s)
2874	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2875}
2876
2877// GoogleCloudDialogflowV2beta1Context: Represents a context.
2878type GoogleCloudDialogflowV2beta1Context struct {
2879	// LifespanCount: Optional. The number of conversational query requests
2880	// after which the
2881	// context expires. If set to `0` (the default) the context
2882	// expires
2883	// immediately. Contexts expire automatically after 20 minutes if
2884	// there
2885	// are no matching queries.
2886	LifespanCount int64 `json:"lifespanCount,omitempty"`
2887
2888	// Name: Required. The unique identifier of the context.
2889	// Format:
2890	// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context
2891	// ID>`,
2892	// or `projects/<Project ID>/agent/environments/<Environment
2893	// ID>/users/<User
2894	// ID>/sessions/<Session ID>/contexts/<Context ID>`.
2895	//
2896	// The `Context ID` is always converted to lowercase, may only
2897	// contain
2898	// characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
2899	//
2900	// If `Environment ID` is not specified, we assume default
2901	// 'draft'
2902	// environment. If `User ID` is not specified, we assume default '-'
2903	// user.
2904	Name string `json:"name,omitempty"`
2905
2906	// Parameters: Optional. The collection of parameters associated with
2907	// this context.
2908	// Refer to
2909	// [this
2910	// doc](https://cloud.google.com/dialogflow/docs/intents-actions-pa
2911	// rameters)
2912	// for syntax.
2913	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
2914
2915	// ServerResponse contains the HTTP response code and headers from the
2916	// server.
2917	googleapi.ServerResponse `json:"-"`
2918
2919	// ForceSendFields is a list of field names (e.g. "LifespanCount") to
2920	// unconditionally include in API requests. By default, fields with
2921	// empty values are omitted from API requests. However, any non-pointer,
2922	// non-interface field appearing in ForceSendFields will be sent to the
2923	// server regardless of whether the field is empty or not. This may be
2924	// used to include empty fields in Patch requests.
2925	ForceSendFields []string `json:"-"`
2926
2927	// NullFields is a list of field names (e.g. "LifespanCount") to include
2928	// in API requests with the JSON null value. By default, fields with
2929	// empty values are omitted from API requests. However, any field with
2930	// an empty value appearing in NullFields will be sent to the server as
2931	// null. It is an error if a field in this list has a non-empty value.
2932	// This may be used to include null fields in Patch requests.
2933	NullFields []string `json:"-"`
2934}
2935
2936func (s *GoogleCloudDialogflowV2beta1Context) MarshalJSON() ([]byte, error) {
2937	type NoMethod GoogleCloudDialogflowV2beta1Context
2938	raw := NoMethod(*s)
2939	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2940}
2941
2942// GoogleCloudDialogflowV2beta1DetectIntentRequest: The request to
2943// detect user's intent.
2944type GoogleCloudDialogflowV2beta1DetectIntentRequest struct {
2945	// InputAudio: Optional. The natural language speech audio to be
2946	// processed. This field
2947	// should be populated iff `query_input` is set to an input audio
2948	// config.
2949	// A single request can contain up to 1 minute of speech audio data.
2950	InputAudio string `json:"inputAudio,omitempty"`
2951
2952	// OutputAudioConfig: Optional. Instructs the speech synthesizer how to
2953	// generate the output
2954	// audio. If this field is not set and agent-level speech synthesizer is
2955	// not
2956	// configured, no output audio is generated.
2957	OutputAudioConfig *GoogleCloudDialogflowV2beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"`
2958
2959	// QueryInput: Required. The input specification. It can be set to:
2960	//
2961	// 1.  an audio config
2962	//     which instructs the speech recognizer how to process the speech
2963	// audio,
2964	//
2965	// 2.  a conversational query in the form of text, or
2966	//
2967	// 3.  an event that specifies which intent to trigger.
2968	QueryInput *GoogleCloudDialogflowV2beta1QueryInput `json:"queryInput,omitempty"`
2969
2970	// QueryParams: Optional. The parameters of this query.
2971	QueryParams *GoogleCloudDialogflowV2beta1QueryParameters `json:"queryParams,omitempty"`
2972
2973	// ForceSendFields is a list of field names (e.g. "InputAudio") to
2974	// unconditionally include in API requests. By default, fields with
2975	// empty values are omitted from API requests. However, any non-pointer,
2976	// non-interface field appearing in ForceSendFields will be sent to the
2977	// server regardless of whether the field is empty or not. This may be
2978	// used to include empty fields in Patch requests.
2979	ForceSendFields []string `json:"-"`
2980
2981	// NullFields is a list of field names (e.g. "InputAudio") to include in
2982	// API requests with the JSON null value. By default, fields with empty
2983	// values are omitted from API requests. However, any field with an
2984	// empty value appearing in NullFields will be sent to the server as
2985	// null. It is an error if a field in this list has a non-empty value.
2986	// This may be used to include null fields in Patch requests.
2987	NullFields []string `json:"-"`
2988}
2989
2990func (s *GoogleCloudDialogflowV2beta1DetectIntentRequest) MarshalJSON() ([]byte, error) {
2991	type NoMethod GoogleCloudDialogflowV2beta1DetectIntentRequest
2992	raw := NoMethod(*s)
2993	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2994}
2995
2996// GoogleCloudDialogflowV2beta1DetectIntentResponse: The message
2997// returned from the DetectIntent method.
2998type GoogleCloudDialogflowV2beta1DetectIntentResponse struct {
2999	// AlternativeQueryResults: If Knowledge Connectors are enabled, there
3000	// could be more than one result
3001	// returned for a given query or event, and this field will contain
3002	// all
3003	// results except for the top one, which is captured in query_result.
3004	// The
3005	// alternative results are ordered by
3006	// decreasing
3007	// `QueryResult.intent_detection_confidence`. If Knowledge Connectors
3008	// are
3009	// disabled, this field will be empty until multiple responses for
3010	// regular
3011	// intents are supported, at which point those additional results will
3012	// be
3013	// surfaced here.
3014	AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"`
3015
3016	// OutputAudio: The audio data bytes encoded as specified in the
3017	// request.
3018	// Note: The output audio is generated based on the values of default
3019	// platform
3020	// text responses found in the `query_result.fulfillment_messages`
3021	// field. If
3022	// multiple default text responses exist, they will be concatenated
3023	// when
3024	// generating audio. If no default platform text responses exist,
3025	// the
3026	// generated audio content will be empty.
3027	OutputAudio string `json:"outputAudio,omitempty"`
3028
3029	// OutputAudioConfig: The config used by the speech synthesizer to
3030	// generate the output audio.
3031	OutputAudioConfig *GoogleCloudDialogflowV2beta1OutputAudioConfig `json:"outputAudioConfig,omitempty"`
3032
3033	// QueryResult: The selected results of the conversational query or
3034	// event processing.
3035	// See `alternative_query_results` for additional potential results.
3036	QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"`
3037
3038	// ResponseId: The unique identifier of the response. It can be used
3039	// to
3040	// locate a response in the training example set or for reporting
3041	// issues.
3042	ResponseId string `json:"responseId,omitempty"`
3043
3044	// WebhookStatus: Specifies the status of the webhook request.
3045	WebhookStatus *GoogleRpcStatus `json:"webhookStatus,omitempty"`
3046
3047	// ServerResponse contains the HTTP response code and headers from the
3048	// server.
3049	googleapi.ServerResponse `json:"-"`
3050
3051	// ForceSendFields is a list of field names (e.g.
3052	// "AlternativeQueryResults") to unconditionally include in API
3053	// requests. By default, fields with empty values are omitted from API
3054	// requests. However, any non-pointer, non-interface field appearing in
3055	// ForceSendFields will be sent to the server regardless of whether the
3056	// field is empty or not. This may be used to include empty fields in
3057	// Patch requests.
3058	ForceSendFields []string `json:"-"`
3059
3060	// NullFields is a list of field names (e.g. "AlternativeQueryResults")
3061	// to include in API requests with the JSON null value. By default,
3062	// fields with empty values are omitted from API requests. However, any
3063	// field with an empty value appearing in NullFields will be sent to the
3064	// server as null. It is an error if a field in this list has a
3065	// non-empty value. This may be used to include null fields in Patch
3066	// requests.
3067	NullFields []string `json:"-"`
3068}
3069
3070func (s *GoogleCloudDialogflowV2beta1DetectIntentResponse) MarshalJSON() ([]byte, error) {
3071	type NoMethod GoogleCloudDialogflowV2beta1DetectIntentResponse
3072	raw := NoMethod(*s)
3073	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3074}
3075
3076// GoogleCloudDialogflowV2beta1Document: A document resource.
3077//
3078// Note: The `projects.agent.knowledgeBases.documents` resource is
3079// deprecated;
3080// only use `projects.knowledgeBases.documents`.
3081type GoogleCloudDialogflowV2beta1Document struct {
3082	// Content: The raw content of the document. This field is only
3083	// permitted for
3084	// EXTRACTIVE_QA and FAQ knowledge types.
3085	// Note: This field is in the process of being deprecated, please
3086	// use
3087	// raw_content instead.
3088	Content string `json:"content,omitempty"`
3089
3090	// ContentUri: The URI where the file content is located.
3091	//
3092	// For documents stored in Google Cloud Storage, these URIs must
3093	// have
3094	// the form `gs://<bucket-name>/<object-name>`.
3095	//
3096	// NOTE: External URLs must correspond to public webpages, i.e., they
3097	// must
3098	// be indexed by Google Search. In particular, URLs for showing
3099	// documents in
3100	// Google Cloud Storage (i.e. the URL in your browser) are not
3101	// supported.
3102	// Instead use the `gs://` format URI described above.
3103	ContentUri string `json:"contentUri,omitempty"`
3104
3105	// DisplayName: Required. The display name of the document. The name
3106	// must be 1024 bytes or
3107	// less; otherwise, the creation request fails.
3108	DisplayName string `json:"displayName,omitempty"`
3109
3110	// KnowledgeTypes: Required. The knowledge type of document content.
3111	//
3112	// Possible values:
3113	//   "KNOWLEDGE_TYPE_UNSPECIFIED" - The type is unspecified or
3114	// arbitrary.
3115	//   "FAQ" - The document content contains question and answer pairs as
3116	// either HTML or
3117	// CSV. Typical FAQ HTML formats are parsed accurately, but unusual
3118	// formats
3119	// may fail to be parsed.
3120	//
3121	// CSV must have questions in the first column and answers in the
3122	// second,
3123	// with no header. Because of this explicit format, they are always
3124	// parsed
3125	// accurately.
3126	//   "EXTRACTIVE_QA" - Documents for which unstructured text is
3127	// extracted and used for
3128	// question answering.
3129	KnowledgeTypes []string `json:"knowledgeTypes,omitempty"`
3130
3131	// MimeType: Required. The MIME type of this document.
3132	MimeType string `json:"mimeType,omitempty"`
3133
3134	// Name: The document resource name.
3135	// The name must be empty when creating a document.
3136	// Format: `projects/<Project ID>/knowledgeBases/<Knowledge
3137	// Base
3138	// ID>/documents/<Document ID>`.
3139	Name string `json:"name,omitempty"`
3140
3141	// RawContent: The raw content of the document. This field is only
3142	// permitted for
3143	// EXTRACTIVE_QA and FAQ knowledge types.
3144	RawContent string `json:"rawContent,omitempty"`
3145
3146	// ServerResponse contains the HTTP response code and headers from the
3147	// server.
3148	googleapi.ServerResponse `json:"-"`
3149
3150	// ForceSendFields is a list of field names (e.g. "Content") to
3151	// unconditionally include in API requests. By default, fields with
3152	// empty values are omitted from API requests. However, any non-pointer,
3153	// non-interface field appearing in ForceSendFields will be sent to the
3154	// server regardless of whether the field is empty or not. This may be
3155	// used to include empty fields in Patch requests.
3156	ForceSendFields []string `json:"-"`
3157
3158	// NullFields is a list of field names (e.g. "Content") to include in
3159	// API requests with the JSON null value. By default, fields with empty
3160	// values are omitted from API requests. However, any field with an
3161	// empty value appearing in NullFields will be sent to the server as
3162	// null. It is an error if a field in this list has a non-empty value.
3163	// This may be used to include null fields in Patch requests.
3164	NullFields []string `json:"-"`
3165}
3166
3167func (s *GoogleCloudDialogflowV2beta1Document) MarshalJSON() ([]byte, error) {
3168	type NoMethod GoogleCloudDialogflowV2beta1Document
3169	raw := NoMethod(*s)
3170	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3171}
3172
3173// GoogleCloudDialogflowV2beta1EntityType: Represents an entity
3174// type.
3175// Entity types serve as a tool for extracting parameter values from
3176// natural
3177// language queries.
3178type GoogleCloudDialogflowV2beta1EntityType struct {
3179	// AutoExpansionMode: Optional. Indicates whether the entity type can be
3180	// automatically
3181	// expanded.
3182	//
3183	// Possible values:
3184	//   "AUTO_EXPANSION_MODE_UNSPECIFIED" - Auto expansion disabled for the
3185	// entity.
3186	//   "AUTO_EXPANSION_MODE_DEFAULT" - Allows an agent to recognize values
3187	// that have not been explicitly
3188	// listed in the entity.
3189	AutoExpansionMode string `json:"autoExpansionMode,omitempty"`
3190
3191	// DisplayName: Required. The name of the entity type.
3192	DisplayName string `json:"displayName,omitempty"`
3193
3194	// Entities: Optional. The collection of entity entries associated with
3195	// the entity type.
3196	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
3197
3198	// Kind: Required. Indicates the kind of entity type.
3199	//
3200	// Possible values:
3201	//   "KIND_UNSPECIFIED" - Not specified. This value should be never
3202	// used.
3203	//   "KIND_MAP" - Map entity types allow mapping of a group of synonyms
3204	// to a canonical
3205	// value.
3206	//   "KIND_LIST" - List entity types contain a set of entries that do
3207	// not map to canonical
3208	// values. However, list entity types can contain references to other
3209	// entity
3210	// types (with or without aliases).
3211	Kind string `json:"kind,omitempty"`
3212
3213	// Name: The unique identifier of the entity type.
3214	// Required for EntityTypes.UpdateEntityType
3215	// and
3216	// EntityTypes.BatchUpdateEntityTypes methods.
3217	// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
3218	Name string `json:"name,omitempty"`
3219
3220	// ServerResponse contains the HTTP response code and headers from the
3221	// server.
3222	googleapi.ServerResponse `json:"-"`
3223
3224	// ForceSendFields is a list of field names (e.g. "AutoExpansionMode")
3225	// to unconditionally include in API requests. By default, fields with
3226	// empty values are omitted from API requests. However, any non-pointer,
3227	// non-interface field appearing in ForceSendFields will be sent to the
3228	// server regardless of whether the field is empty or not. This may be
3229	// used to include empty fields in Patch requests.
3230	ForceSendFields []string `json:"-"`
3231
3232	// NullFields is a list of field names (e.g. "AutoExpansionMode") to
3233	// include in API requests with the JSON null value. By default, fields
3234	// with empty values are omitted from API requests. However, any field
3235	// with an empty value appearing in NullFields will be sent to the
3236	// server as null. It is an error if a field in this list has a
3237	// non-empty value. This may be used to include null fields in Patch
3238	// requests.
3239	NullFields []string `json:"-"`
3240}
3241
3242func (s *GoogleCloudDialogflowV2beta1EntityType) MarshalJSON() ([]byte, error) {
3243	type NoMethod GoogleCloudDialogflowV2beta1EntityType
3244	raw := NoMethod(*s)
3245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3246}
3247
3248// GoogleCloudDialogflowV2beta1EntityTypeBatch: This message is a
3249// wrapper around a collection of entity types.
3250type GoogleCloudDialogflowV2beta1EntityTypeBatch struct {
3251	// EntityTypes: A collection of entity types.
3252	EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
3253
3254	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
3255	// unconditionally include in API requests. By default, fields with
3256	// empty values are omitted from API requests. However, any non-pointer,
3257	// non-interface field appearing in ForceSendFields will be sent to the
3258	// server regardless of whether the field is empty or not. This may be
3259	// used to include empty fields in Patch requests.
3260	ForceSendFields []string `json:"-"`
3261
3262	// NullFields is a list of field names (e.g. "EntityTypes") to include
3263	// in API requests with the JSON null value. By default, fields with
3264	// empty values are omitted from API requests. However, any field with
3265	// an empty value appearing in NullFields will be sent to the server as
3266	// null. It is an error if a field in this list has a non-empty value.
3267	// This may be used to include null fields in Patch requests.
3268	NullFields []string `json:"-"`
3269}
3270
3271func (s *GoogleCloudDialogflowV2beta1EntityTypeBatch) MarshalJSON() ([]byte, error) {
3272	type NoMethod GoogleCloudDialogflowV2beta1EntityTypeBatch
3273	raw := NoMethod(*s)
3274	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3275}
3276
3277// GoogleCloudDialogflowV2beta1EntityTypeEntity: An **entity entry** for
3278// an associated entity type.
3279type GoogleCloudDialogflowV2beta1EntityTypeEntity struct {
3280	// Synonyms: Required. A collection of value synonyms. For example, if
3281	// the entity type
3282	// is *vegetable*, and `value` is *scallions*, a synonym could be
3283	// *green
3284	// onions*.
3285	//
3286	// For `KIND_LIST` entity types:
3287	//
3288	// *   This collection must contain exactly one synonym equal to
3289	// `value`.
3290	Synonyms []string `json:"synonyms,omitempty"`
3291
3292	// Value: Required. The primary value associated with this entity
3293	// entry.
3294	// For example, if the entity type is *vegetable*, the value could
3295	// be
3296	// *scallions*.
3297	//
3298	// For `KIND_MAP` entity types:
3299	//
3300	// *   A canonical value to be used in place of synonyms.
3301	//
3302	// For `KIND_LIST` entity types:
3303	//
3304	// *   A string that can contain references to other entity types (with
3305	// or
3306	//     without aliases).
3307	Value string `json:"value,omitempty"`
3308
3309	// ForceSendFields is a list of field names (e.g. "Synonyms") to
3310	// unconditionally include in API requests. By default, fields with
3311	// empty values are omitted from API requests. However, any non-pointer,
3312	// non-interface field appearing in ForceSendFields will be sent to the
3313	// server regardless of whether the field is empty or not. This may be
3314	// used to include empty fields in Patch requests.
3315	ForceSendFields []string `json:"-"`
3316
3317	// NullFields is a list of field names (e.g. "Synonyms") to include in
3318	// API requests with the JSON null value. By default, fields with empty
3319	// values are omitted from API requests. However, any field with an
3320	// empty value appearing in NullFields will be sent to the server as
3321	// null. It is an error if a field in this list has a non-empty value.
3322	// This may be used to include null fields in Patch requests.
3323	NullFields []string `json:"-"`
3324}
3325
3326func (s *GoogleCloudDialogflowV2beta1EntityTypeEntity) MarshalJSON() ([]byte, error) {
3327	type NoMethod GoogleCloudDialogflowV2beta1EntityTypeEntity
3328	raw := NoMethod(*s)
3329	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3330}
3331
3332// GoogleCloudDialogflowV2beta1EventInput: Events allow for matching
3333// intents by event name instead of the natural
3334// language input. For instance, input `<event: { name:
3335// "welcome_event",
3336// parameters: { name: "Sam" } }>` can trigger a personalized welcome
3337// response.
3338// The parameter `name` may be used by the agent in the
3339// response:
3340// "Hello #welcome_event.name! What can I do for you today?".
3341type GoogleCloudDialogflowV2beta1EventInput struct {
3342	// LanguageCode: Required. The language of this query. See
3343	// [Language
3344	// Support](https://cloud.google.com/dialogflow/docs/reference/
3345	// language)
3346	// for a list of the currently supported language codes. Note that
3347	// queries in
3348	// the same session do not necessarily need to specify the same
3349	// language.
3350	LanguageCode string `json:"languageCode,omitempty"`
3351
3352	// Name: Required. The unique identifier of the event.
3353	Name string `json:"name,omitempty"`
3354
3355	// Parameters: Optional. The collection of parameters associated with
3356	// the event.
3357	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
3358
3359	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
3360	// unconditionally include in API requests. By default, fields with
3361	// empty values are omitted from API requests. However, any non-pointer,
3362	// non-interface field appearing in ForceSendFields will be sent to the
3363	// server regardless of whether the field is empty or not. This may be
3364	// used to include empty fields in Patch requests.
3365	ForceSendFields []string `json:"-"`
3366
3367	// NullFields is a list of field names (e.g. "LanguageCode") to include
3368	// in API requests with the JSON null value. By default, fields with
3369	// empty values are omitted from API requests. However, any field with
3370	// an empty value appearing in NullFields will be sent to the server as
3371	// null. It is an error if a field in this list has a non-empty value.
3372	// This may be used to include null fields in Patch requests.
3373	NullFields []string `json:"-"`
3374}
3375
3376func (s *GoogleCloudDialogflowV2beta1EventInput) MarshalJSON() ([]byte, error) {
3377	type NoMethod GoogleCloudDialogflowV2beta1EventInput
3378	raw := NoMethod(*s)
3379	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3380}
3381
3382// GoogleCloudDialogflowV2beta1ExportAgentRequest: The request message
3383// for Agents.ExportAgent.
3384type GoogleCloudDialogflowV2beta1ExportAgentRequest struct {
3385	// AgentUri: Optional. The
3386	// [Google Cloud Storage](https://cloud.google.com/storage/docs/)
3387	// URI to export the agent to.
3388	// The format of this URI must be `gs://<bucket-name>/<object-name>`.
3389	// If left unspecified, the serialized agent is returned inline.
3390	AgentUri string `json:"agentUri,omitempty"`
3391
3392	// ForceSendFields is a list of field names (e.g. "AgentUri") to
3393	// unconditionally include in API requests. By default, fields with
3394	// empty values are omitted from API requests. However, any non-pointer,
3395	// non-interface field appearing in ForceSendFields will be sent to the
3396	// server regardless of whether the field is empty or not. This may be
3397	// used to include empty fields in Patch requests.
3398	ForceSendFields []string `json:"-"`
3399
3400	// NullFields is a list of field names (e.g. "AgentUri") to include in
3401	// API requests with the JSON null value. By default, fields with empty
3402	// values are omitted from API requests. However, any field with an
3403	// empty value appearing in NullFields will be sent to the server as
3404	// null. It is an error if a field in this list has a non-empty value.
3405	// This may be used to include null fields in Patch requests.
3406	NullFields []string `json:"-"`
3407}
3408
3409func (s *GoogleCloudDialogflowV2beta1ExportAgentRequest) MarshalJSON() ([]byte, error) {
3410	type NoMethod GoogleCloudDialogflowV2beta1ExportAgentRequest
3411	raw := NoMethod(*s)
3412	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3413}
3414
3415// GoogleCloudDialogflowV2beta1ExportAgentResponse: The response message
3416// for Agents.ExportAgent.
3417type GoogleCloudDialogflowV2beta1ExportAgentResponse struct {
3418	// AgentContent: The exported agent.
3419	//
3420	// Example for how to export an agent to a zip file via a command
3421	// line:
3422	// <pre>curl \
3423	//
3424	// 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&g
3425	// t;/agent:export'\
3426	//   -X POST \
3427	//   -H 'Authorization: Bearer '$(gcloud auth application-default
3428	//   print-access-token) \
3429	//   -H 'Accept: application/json' \
3430	//   -H 'Content-Type: application/json' \
3431	//   --compressed \
3432	//   --data-binary '{}' \
3433	// | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/'
3434	// \
3435	// | base64 --decode > &lt;agent zip file&gt;</pre>
3436	AgentContent string `json:"agentContent,omitempty"`
3437
3438	// AgentUri: The URI to a file containing the exported agent. This field
3439	// is populated
3440	// only if `agent_uri` is specified in `ExportAgentRequest`.
3441	AgentUri string `json:"agentUri,omitempty"`
3442
3443	// ForceSendFields is a list of field names (e.g. "AgentContent") to
3444	// unconditionally include in API requests. By default, fields with
3445	// empty values are omitted from API requests. However, any non-pointer,
3446	// non-interface field appearing in ForceSendFields will be sent to the
3447	// server regardless of whether the field is empty or not. This may be
3448	// used to include empty fields in Patch requests.
3449	ForceSendFields []string `json:"-"`
3450
3451	// NullFields is a list of field names (e.g. "AgentContent") to include
3452	// in API requests with the JSON null value. By default, fields with
3453	// empty values are omitted from API requests. However, any field with
3454	// an empty value appearing in NullFields will be sent to the server as
3455	// null. It is an error if a field in this list has a non-empty value.
3456	// This may be used to include null fields in Patch requests.
3457	NullFields []string `json:"-"`
3458}
3459
3460func (s *GoogleCloudDialogflowV2beta1ExportAgentResponse) MarshalJSON() ([]byte, error) {
3461	type NoMethod GoogleCloudDialogflowV2beta1ExportAgentResponse
3462	raw := NoMethod(*s)
3463	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3464}
3465
3466// GoogleCloudDialogflowV2beta1ImportAgentRequest: The request message
3467// for Agents.ImportAgent.
3468type GoogleCloudDialogflowV2beta1ImportAgentRequest struct {
3469	// AgentContent: The agent to import.
3470	//
3471	// Example for how to import an agent via the command line:
3472	// <pre>curl \
3473	//
3474	// 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&g
3475	// t;/agent:import\
3476	//    -X POST \
3477	//    -H 'Authorization: Bearer '$(gcloud auth application-default
3478	//    print-access-token) \
3479	//    -H 'Accept: application/json' \
3480	//    -H 'Content-Type: application/json' \
3481	//    --compressed \
3482	//    --data-binary "{
3483	//       'agentContent': '$(cat &lt;agent zip file&gt; | base64 -w 0)'
3484	//    }"</pre>
3485	AgentContent string `json:"agentContent,omitempty"`
3486
3487	// AgentUri: The URI to a Google Cloud Storage file containing the agent
3488	// to import.
3489	// Note: The URI must start with "gs://".
3490	AgentUri string `json:"agentUri,omitempty"`
3491
3492	// ForceSendFields is a list of field names (e.g. "AgentContent") to
3493	// unconditionally include in API requests. By default, fields with
3494	// empty values are omitted from API requests. However, any non-pointer,
3495	// non-interface field appearing in ForceSendFields will be sent to the
3496	// server regardless of whether the field is empty or not. This may be
3497	// used to include empty fields in Patch requests.
3498	ForceSendFields []string `json:"-"`
3499
3500	// NullFields is a list of field names (e.g. "AgentContent") to include
3501	// in API requests with the JSON null value. By default, fields with
3502	// empty values are omitted from API requests. However, any field with
3503	// an empty value appearing in NullFields will be sent to the server as
3504	// null. It is an error if a field in this list has a non-empty value.
3505	// This may be used to include null fields in Patch requests.
3506	NullFields []string `json:"-"`
3507}
3508
3509func (s *GoogleCloudDialogflowV2beta1ImportAgentRequest) MarshalJSON() ([]byte, error) {
3510	type NoMethod GoogleCloudDialogflowV2beta1ImportAgentRequest
3511	raw := NoMethod(*s)
3512	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3513}
3514
3515// GoogleCloudDialogflowV2beta1InputAudioConfig: Instructs the speech
3516// recognizer on how to process the audio content.
3517type GoogleCloudDialogflowV2beta1InputAudioConfig struct {
3518	// AudioEncoding: Required. Audio encoding of the audio content to
3519	// process.
3520	//
3521	// Possible values:
3522	//   "AUDIO_ENCODING_UNSPECIFIED" - Not specified.
3523	//   "AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
3524	// little-endian samples (Linear PCM).
3525	//   "AUDIO_ENCODING_FLAC" -
3526	// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless
3527	// Audio
3528	// Codec) is the recommended encoding because it is lossless
3529	// (therefore
3530	// recognition is not compromised) and requires only about half
3531	// the
3532	// bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit
3533	// and
3534	// 24-bit samples, however, not all fields in `STREAMINFO` are
3535	// supported.
3536	//   "AUDIO_ENCODING_MULAW" - 8-bit samples that compand 14-bit audio
3537	// samples using G.711 PCMU/mu-law.
3538	//   "AUDIO_ENCODING_AMR" - Adaptive Multi-Rate Narrowband codec.
3539	// `sample_rate_hertz` must be 8000.
3540	//   "AUDIO_ENCODING_AMR_WB" - Adaptive Multi-Rate Wideband codec.
3541	// `sample_rate_hertz` must be 16000.
3542	//   "AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio frames in Ogg
3543	// container
3544	// ([OggOpus](https://wiki.xiph.org/OggOpus)).
3545	// `sample_rate_her
3546	// tz` must be 16000.
3547	//   "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE" - Although the use of lossy
3548	// encodings is not recommended, if a very low
3549	// bitrate encoding is required, `OGG_OPUS` is highly preferred
3550	// over
3551	// Speex encoding. The [Speex](https://speex.org/) encoding supported
3552	// by
3553	// Dialogflow API has a header byte in each block, as in MIME
3554	// type
3555	// `audio/x-speex-with-header-byte`.
3556	// It is a variant of the RTP Speex encoding defined in
3557	// [RFC 5574](https://tools.ietf.org/html/rfc5574).
3558	// The stream is a sequence of blocks, one block per RTP packet. Each
3559	// block
3560	// starts with a byte containing the length of the block, in bytes,
3561	// followed
3562	// by one or more frames of Speex data, padded to an integral number
3563	// of
3564	// bytes (octets) as specified in RFC 5574. In other words, each RTP
3565	// header
3566	// is replaced with a single byte containing the block length. Only
3567	// Speex
3568	// wideband is supported. `sample_rate_hertz` must be 16000.
3569	AudioEncoding string `json:"audioEncoding,omitempty"`
3570
3571	// EnableWordInfo: Optional. If `true`, Dialogflow returns
3572	// SpeechWordInfo in
3573	// StreamingRecognitionResult with information about the recognized
3574	// speech
3575	// words, e.g. start and end time offsets. If false or unspecified,
3576	// Speech
3577	// doesn't return any word-level information.
3578	EnableWordInfo bool `json:"enableWordInfo,omitempty"`
3579
3580	// LanguageCode: Required. The language of the supplied audio.
3581	// Dialogflow does not do
3582	// translations. See
3583	// [Language
3584	// Support](https://cloud.google.com/dialogflow/docs/reference/
3585	// language)
3586	// for a list of the currently supported language codes. Note that
3587	// queries in
3588	// the same session do not necessarily need to specify the same
3589	// language.
3590	LanguageCode string `json:"languageCode,omitempty"`
3591
3592	// Model: Optional. Which Speech model to select for the given request.
3593	// Select the
3594	// model best suited to your domain to get best results. If a model is
3595	// not
3596	// explicitly specified, then we auto-select a model based on the
3597	// parameters
3598	// in the InputAudioConfig.
3599	// If enhanced speech model is enabled for the agent and an
3600	// enhanced
3601	// version of the specified model for the language does not exist, then
3602	// the
3603	// speech is recognized using the standard version of the specified
3604	// model.
3605	// Refer to
3606	// [Cloud Speech
3607	// API
3608	// documentation](https://cloud.google.com/speech-to-text/docs/basics
3609	// #select-model)
3610	// for more details.
3611	Model string `json:"model,omitempty"`
3612
3613	// ModelVariant: Optional. Which variant of the Speech model to use.
3614	//
3615	// Possible values:
3616	//   "SPEECH_MODEL_VARIANT_UNSPECIFIED" - No model variant specified. In
3617	// this case Dialogflow defaults to
3618	// USE_BEST_AVAILABLE.
3619	//   "USE_BEST_AVAILABLE" - Use the best available variant of the
3620	// Speech
3621	// model that the caller is eligible for.
3622	//
3623	// Please see the
3624	// [Dialogflow
3625	// docs](https://cloud.google.com/dialogflow/docs/data-loggin
3626	// g) for
3627	// how to make your project eligible for enhanced models.
3628	//   "USE_STANDARD" - Use standard model variant even if an enhanced
3629	// model is available.  See the
3630	// [Cloud
3631	// Speech
3632	// documentation](https://cloud.google.com/speech-to-text/docs/enh
3633	// anced-models)
3634	// for details about enhanced models.
3635	//   "USE_ENHANCED" - Use an enhanced model variant:
3636	//
3637	// * If an enhanced variant does not exist for the given
3638	//   model and request language, Dialogflow falls
3639	//   back to the standard variant.
3640	//
3641	//   The [Cloud Speech
3642	//
3643	// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-m
3644	// odels)
3645	//   describes which models have enhanced variants.
3646	//
3647	// * If the API caller isn't eligible for enhanced models, Dialogflow
3648	// returns
3649	//   an error.  Please see the [Dialogflow
3650	//   docs](https://cloud.google.com/dialogflow/docs/data-logging)
3651	//   for how to make your project eligible.
3652	ModelVariant string `json:"modelVariant,omitempty"`
3653
3654	// PhraseHints: Optional. A list of strings containing words and phrases
3655	// that the speech
3656	// recognizer should recognize with higher likelihood.
3657	//
3658	// See [the Cloud
3659	// Speech
3660	// documentation](https://cloud.google.com/speech-to-text/docs/bas
3661	// ics#phrase-hints)
3662	// for more details.
3663	PhraseHints []string `json:"phraseHints,omitempty"`
3664
3665	// SampleRateHertz: Required. Sample rate (in Hertz) of the audio
3666	// content sent in the query.
3667	// Refer to
3668	// [Cloud Speech
3669	// API
3670	// documentation](https://cloud.google.com/speech-to-text/docs/basics
3671	// ) for
3672	// more details.
3673	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
3674
3675	// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
3676	// unconditionally include in API requests. By default, fields with
3677	// empty values are omitted from API requests. However, any non-pointer,
3678	// non-interface field appearing in ForceSendFields will be sent to the
3679	// server regardless of whether the field is empty or not. This may be
3680	// used to include empty fields in Patch requests.
3681	ForceSendFields []string `json:"-"`
3682
3683	// NullFields is a list of field names (e.g. "AudioEncoding") to include
3684	// in API requests with the JSON null value. By default, fields with
3685	// empty values are omitted from API requests. However, any field with
3686	// an empty value appearing in NullFields will be sent to the server as
3687	// null. It is an error if a field in this list has a non-empty value.
3688	// This may be used to include null fields in Patch requests.
3689	NullFields []string `json:"-"`
3690}
3691
3692func (s *GoogleCloudDialogflowV2beta1InputAudioConfig) MarshalJSON() ([]byte, error) {
3693	type NoMethod GoogleCloudDialogflowV2beta1InputAudioConfig
3694	raw := NoMethod(*s)
3695	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3696}
3697
3698// GoogleCloudDialogflowV2beta1Intent: Represents an intent.
3699// Intents convert a number of user expressions or patterns into an
3700// action. An
3701// action is an extraction of a user command or sentence semantics.
3702type GoogleCloudDialogflowV2beta1Intent struct {
3703	// Action: Optional. The name of the action associated with the
3704	// intent.
3705	// Note: The action name must not contain whitespaces.
3706	Action string `json:"action,omitempty"`
3707
3708	// DefaultResponsePlatforms: Optional. The list of platforms for which
3709	// the first responses will be
3710	// copied from the messages in PLATFORM_UNSPECIFIED (i.e. default
3711	// platform).
3712	//
3713	// Possible values:
3714	//   "PLATFORM_UNSPECIFIED" - Not specified.
3715	//   "FACEBOOK" - Facebook.
3716	//   "SLACK" - Slack.
3717	//   "TELEGRAM" - Telegram.
3718	//   "KIK" - Kik.
3719	//   "SKYPE" - Skype.
3720	//   "LINE" - Line.
3721	//   "VIBER" - Viber.
3722	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
3723	// When using Actions on Google, you can choose one of the
3724	// specific
3725	// Intent.Message types that mention support for Actions on Google,
3726	// or you can use the advanced Intent.Message.payload field.
3727	// The payload field provides access to AoG features not available in
3728	// the
3729	// specific message types.
3730	// If using the Intent.Message.payload field, it should have a
3731	// structure
3732	// similar to the JSON message shown here. For more information,
3733	// see
3734	// [Actions on Google
3735	// Webhook
3736	// Format](https://developers.google.com/actions/dialogflow/webho
3737	// ok)
3738	// <pre>{
3739	//   "expectUserResponse": true,
3740	//   "isSsml": false,
3741	//   "noInputPrompts": [],
3742	//   "richResponse": {
3743	//     "items": [
3744	//       {
3745	//         "simpleResponse": {
3746	//           "displayText": "hi",
3747	//           "textToSpeech": "hello"
3748	//         }
3749	//       }
3750	//     ],
3751	//     "suggestions": [
3752	//       {
3753	//         "title": "Say this"
3754	//       },
3755	//       {
3756	//         "title": "or this"
3757	//       }
3758	//     ]
3759	//   },
3760	//   "systemIntent": {
3761	//     "data": {
3762	//       "@type":
3763	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
3764	//       "listSelect": {
3765	//         "items": [
3766	//           {
3767	//             "optionInfo": {
3768	//               "key": "key1",
3769	//               "synonyms": [
3770	//                 "key one"
3771	//               ]
3772	//             },
3773	//             "title": "must not be empty, but unique"
3774	//           },
3775	//           {
3776	//             "optionInfo": {
3777	//               "key": "key2",
3778	//               "synonyms": [
3779	//                 "key two"
3780	//               ]
3781	//             },
3782	//             "title": "must not be empty, but unique"
3783	//           }
3784	//         ]
3785	//       }
3786	//     },
3787	//     "intent": "actions.intent.OPTION"
3788	//   }
3789	// }</pre>
3790	//   "TELEPHONY" - Telephony Gateway.
3791	//   "GOOGLE_HANGOUTS" - Google Hangouts.
3792	DefaultResponsePlatforms []string `json:"defaultResponsePlatforms,omitempty"`
3793
3794	// DisplayName: Required. The name of this intent.
3795	DisplayName string `json:"displayName,omitempty"`
3796
3797	// EndInteraction: Optional. Indicates that this intent ends an
3798	// interaction. Some integrations
3799	// (e.g., Actions on Google or Dialogflow phone gateway) use this
3800	// information
3801	// to close interaction with an end user. Default is false.
3802	EndInteraction bool `json:"endInteraction,omitempty"`
3803
3804	// Events: Optional. The collection of event names that trigger the
3805	// intent.
3806	// If the collection of input contexts is not empty, all of the contexts
3807	// must
3808	// be present in the active user session for an event to trigger this
3809	// intent.
3810	Events []string `json:"events,omitempty"`
3811
3812	// FollowupIntentInfo: Read-only. Information about all followup intents
3813	// that have this intent as
3814	// a direct or indirect parent. We populate this field only in the
3815	// output.
3816	FollowupIntentInfo []*GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo `json:"followupIntentInfo,omitempty"`
3817
3818	// InputContextNames: Optional. The list of context names required for
3819	// this intent to be
3820	// triggered.
3821	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
3822	// ID>`.
3823	InputContextNames []string `json:"inputContextNames,omitempty"`
3824
3825	// IsFallback: Optional. Indicates whether this is a fallback intent.
3826	IsFallback bool `json:"isFallback,omitempty"`
3827
3828	// Messages: Optional. The collection of rich messages corresponding to
3829	// the
3830	// `Response` field in the Dialogflow console.
3831	Messages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"messages,omitempty"`
3832
3833	// MlDisabled: Optional. Indicates whether Machine Learning is disabled
3834	// for the intent.
3835	// Note: If `ml_disabled` setting is set to true, then this intent is
3836	// not
3837	// taken into account during inference in `ML ONLY` match mode.
3838	// Also,
3839	// auto-markup in the UI is turned off.
3840	MlDisabled bool `json:"mlDisabled,omitempty"`
3841
3842	// MlEnabled: Optional. Indicates whether Machine Learning is enabled
3843	// for the intent.
3844	// Note: If `ml_enabled` setting is set to false, then this intent is
3845	// not
3846	// taken into account during inference in `ML ONLY` match mode.
3847	// Also,
3848	// auto-markup in the UI is turned off.
3849	// DEPRECATED! Please use `ml_disabled` field instead.
3850	// NOTE: If both `ml_enabled` and `ml_disabled` are either not set or
3851	// false,
3852	// then the default value is determined as follows:
3853	// - Before April 15th, 2018 the default is:
3854	//   ml_enabled = false / ml_disabled = true.
3855	// - After April 15th, 2018 the default is:
3856	//   ml_enabled = true / ml_disabled = false.
3857	MlEnabled bool `json:"mlEnabled,omitempty"`
3858
3859	// Name: The unique identifier of this intent.
3860	// Required for Intents.UpdateIntent and
3861	// Intents.BatchUpdateIntents
3862	// methods.
3863	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
3864	Name string `json:"name,omitempty"`
3865
3866	// OutputContexts: Optional. The collection of contexts that are
3867	// activated when the intent
3868	// is matched. Context messages in this collection should not set
3869	// the
3870	// parameters field. Setting the `lifespan_count` to 0 will reset the
3871	// context
3872	// when the intent is matched.
3873	// Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context
3874	// ID>`.
3875	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
3876
3877	// Parameters: Optional. The collection of parameters associated with
3878	// the intent.
3879	Parameters []*GoogleCloudDialogflowV2beta1IntentParameter `json:"parameters,omitempty"`
3880
3881	// ParentFollowupIntentName: Read-only after creation. The unique
3882	// identifier of the parent intent in the
3883	// chain of followup intents. You can set this field when creating an
3884	// intent,
3885	// for example with CreateIntent or BatchUpdateIntents, in order to
3886	// make this intent a followup intent.
3887	//
3888	// It identifies the parent followup intent.
3889	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
3890	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
3891
3892	// Priority: Optional. The priority of this intent. Higher numbers
3893	// represent higher
3894	// priorities. If this is zero or unspecified, we use the
3895	// default
3896	// priority 500000.
3897	//
3898	// Negative numbers mean that the intent is disabled.
3899	Priority int64 `json:"priority,omitempty"`
3900
3901	// ResetContexts: Optional. Indicates whether to delete all contexts in
3902	// the current
3903	// session when this intent is matched.
3904	ResetContexts bool `json:"resetContexts,omitempty"`
3905
3906	// RootFollowupIntentName: Read-only. The unique identifier of the root
3907	// intent in the chain of
3908	// followup intents. It identifies the correct followup intents chain
3909	// for
3910	// this intent. We populate this field only in the output.
3911	//
3912	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
3913	RootFollowupIntentName string `json:"rootFollowupIntentName,omitempty"`
3914
3915	// TrainingPhrases: Optional. The collection of examples that the agent
3916	// is
3917	// trained on.
3918	TrainingPhrases []*GoogleCloudDialogflowV2beta1IntentTrainingPhrase `json:"trainingPhrases,omitempty"`
3919
3920	// WebhookState: Optional. Indicates whether webhooks are enabled for
3921	// the intent.
3922	//
3923	// Possible values:
3924	//   "WEBHOOK_STATE_UNSPECIFIED" - Webhook is disabled in the agent and
3925	// in the intent.
3926	//   "WEBHOOK_STATE_ENABLED" - Webhook is enabled in the agent and in
3927	// the intent.
3928	//   "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING" - Webhook is enabled in
3929	// the agent and in the intent. Also, each slot
3930	// filling prompt is forwarded to the webhook.
3931	WebhookState string `json:"webhookState,omitempty"`
3932
3933	// ServerResponse contains the HTTP response code and headers from the
3934	// server.
3935	googleapi.ServerResponse `json:"-"`
3936
3937	// ForceSendFields is a list of field names (e.g. "Action") to
3938	// unconditionally include in API requests. By default, fields with
3939	// empty values are omitted from API requests. However, any non-pointer,
3940	// non-interface field appearing in ForceSendFields will be sent to the
3941	// server regardless of whether the field is empty or not. This may be
3942	// used to include empty fields in Patch requests.
3943	ForceSendFields []string `json:"-"`
3944
3945	// NullFields is a list of field names (e.g. "Action") to include in API
3946	// requests with the JSON null value. By default, fields with empty
3947	// values are omitted from API requests. However, any field with an
3948	// empty value appearing in NullFields will be sent to the server as
3949	// null. It is an error if a field in this list has a non-empty value.
3950	// This may be used to include null fields in Patch requests.
3951	NullFields []string `json:"-"`
3952}
3953
3954func (s *GoogleCloudDialogflowV2beta1Intent) MarshalJSON() ([]byte, error) {
3955	type NoMethod GoogleCloudDialogflowV2beta1Intent
3956	raw := NoMethod(*s)
3957	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3958}
3959
3960// GoogleCloudDialogflowV2beta1IntentBatch: This message is a wrapper
3961// around a collection of intents.
3962type GoogleCloudDialogflowV2beta1IntentBatch struct {
3963	// Intents: A collection of intents.
3964	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
3965
3966	// ForceSendFields is a list of field names (e.g. "Intents") to
3967	// unconditionally include in API requests. By default, fields with
3968	// empty values are omitted from API requests. However, any non-pointer,
3969	// non-interface field appearing in ForceSendFields will be sent to the
3970	// server regardless of whether the field is empty or not. This may be
3971	// used to include empty fields in Patch requests.
3972	ForceSendFields []string `json:"-"`
3973
3974	// NullFields is a list of field names (e.g. "Intents") to include in
3975	// API requests with the JSON null value. By default, fields with empty
3976	// values are omitted from API requests. However, any field with an
3977	// empty value appearing in NullFields will be sent to the server as
3978	// null. It is an error if a field in this list has a non-empty value.
3979	// This may be used to include null fields in Patch requests.
3980	NullFields []string `json:"-"`
3981}
3982
3983func (s *GoogleCloudDialogflowV2beta1IntentBatch) MarshalJSON() ([]byte, error) {
3984	type NoMethod GoogleCloudDialogflowV2beta1IntentBatch
3985	raw := NoMethod(*s)
3986	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3987}
3988
3989// GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo: Represents a
3990// single followup intent in the chain.
3991type GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo struct {
3992	// FollowupIntentName: The unique identifier of the followup
3993	// intent.
3994	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
3995	FollowupIntentName string `json:"followupIntentName,omitempty"`
3996
3997	// ParentFollowupIntentName: The unique identifier of the followup
3998	// intent's parent.
3999	// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
4000	ParentFollowupIntentName string `json:"parentFollowupIntentName,omitempty"`
4001
4002	// ForceSendFields is a list of field names (e.g. "FollowupIntentName")
4003	// to unconditionally include in API requests. By default, fields with
4004	// empty values are omitted from API requests. However, any non-pointer,
4005	// non-interface field appearing in ForceSendFields will be sent to the
4006	// server regardless of whether the field is empty or not. This may be
4007	// used to include empty fields in Patch requests.
4008	ForceSendFields []string `json:"-"`
4009
4010	// NullFields is a list of field names (e.g. "FollowupIntentName") to
4011	// include in API requests with the JSON null value. By default, fields
4012	// with empty values are omitted from API requests. However, any field
4013	// with an empty value appearing in NullFields will be sent to the
4014	// server as null. It is an error if a field in this list has a
4015	// non-empty value. This may be used to include null fields in Patch
4016	// requests.
4017	NullFields []string `json:"-"`
4018}
4019
4020func (s *GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo) MarshalJSON() ([]byte, error) {
4021	type NoMethod GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
4022	raw := NoMethod(*s)
4023	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4024}
4025
4026// GoogleCloudDialogflowV2beta1IntentMessage: Corresponds to the
4027// `Response` field in the Dialogflow console.
4028type GoogleCloudDialogflowV2beta1IntentMessage struct {
4029	// BasicCard: Displays a basic card for Actions on Google.
4030	BasicCard *GoogleCloudDialogflowV2beta1IntentMessageBasicCard `json:"basicCard,omitempty"`
4031
4032	// Card: Displays a card.
4033	Card *GoogleCloudDialogflowV2beta1IntentMessageCard `json:"card,omitempty"`
4034
4035	// CarouselSelect: Displays a carousel card for Actions on Google.
4036	CarouselSelect *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect `json:"carouselSelect,omitempty"`
4037
4038	// Image: Displays an image.
4039	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
4040
4041	// LinkOutSuggestion: Displays a link out suggestion chip for Actions on
4042	// Google.
4043	LinkOutSuggestion *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion `json:"linkOutSuggestion,omitempty"`
4044
4045	// ListSelect: Displays a list card for Actions on Google.
4046	ListSelect *GoogleCloudDialogflowV2beta1IntentMessageListSelect `json:"listSelect,omitempty"`
4047
4048	// Payload: Returns a response containing a custom, platform-specific
4049	// payload.
4050	// See the Intent.Message.Platform type for a description of
4051	// the
4052	// structure that may be required for your platform.
4053	Payload googleapi.RawMessage `json:"payload,omitempty"`
4054
4055	// Platform: Optional. The platform that this message is intended for.
4056	//
4057	// Possible values:
4058	//   "PLATFORM_UNSPECIFIED" - Not specified.
4059	//   "FACEBOOK" - Facebook.
4060	//   "SLACK" - Slack.
4061	//   "TELEGRAM" - Telegram.
4062	//   "KIK" - Kik.
4063	//   "SKYPE" - Skype.
4064	//   "LINE" - Line.
4065	//   "VIBER" - Viber.
4066	//   "ACTIONS_ON_GOOGLE" - Actions on Google.
4067	// When using Actions on Google, you can choose one of the
4068	// specific
4069	// Intent.Message types that mention support for Actions on Google,
4070	// or you can use the advanced Intent.Message.payload field.
4071	// The payload field provides access to AoG features not available in
4072	// the
4073	// specific message types.
4074	// If using the Intent.Message.payload field, it should have a
4075	// structure
4076	// similar to the JSON message shown here. For more information,
4077	// see
4078	// [Actions on Google
4079	// Webhook
4080	// Format](https://developers.google.com/actions/dialogflow/webho
4081	// ok)
4082	// <pre>{
4083	//   "expectUserResponse": true,
4084	//   "isSsml": false,
4085	//   "noInputPrompts": [],
4086	//   "richResponse": {
4087	//     "items": [
4088	//       {
4089	//         "simpleResponse": {
4090	//           "displayText": "hi",
4091	//           "textToSpeech": "hello"
4092	//         }
4093	//       }
4094	//     ],
4095	//     "suggestions": [
4096	//       {
4097	//         "title": "Say this"
4098	//       },
4099	//       {
4100	//         "title": "or this"
4101	//       }
4102	//     ]
4103	//   },
4104	//   "systemIntent": {
4105	//     "data": {
4106	//       "@type":
4107	// "type.googleapis.com/google.actions.v2.OptionValueSpec",
4108	//       "listSelect": {
4109	//         "items": [
4110	//           {
4111	//             "optionInfo": {
4112	//               "key": "key1",
4113	//               "synonyms": [
4114	//                 "key one"
4115	//               ]
4116	//             },
4117	//             "title": "must not be empty, but unique"
4118	//           },
4119	//           {
4120	//             "optionInfo": {
4121	//               "key": "key2",
4122	//               "synonyms": [
4123	//                 "key two"
4124	//               ]
4125	//             },
4126	//             "title": "must not be empty, but unique"
4127	//           }
4128	//         ]
4129	//       }
4130	//     },
4131	//     "intent": "actions.intent.OPTION"
4132	//   }
4133	// }</pre>
4134	//   "TELEPHONY" - Telephony Gateway.
4135	//   "GOOGLE_HANGOUTS" - Google Hangouts.
4136	Platform string `json:"platform,omitempty"`
4137
4138	// QuickReplies: Displays quick replies.
4139	QuickReplies *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies `json:"quickReplies,omitempty"`
4140
4141	// SimpleResponses: Returns a voice or text-only response for Actions on
4142	// Google.
4143	SimpleResponses *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses `json:"simpleResponses,omitempty"`
4144
4145	// Suggestions: Displays suggestion chips for Actions on Google.
4146	Suggestions *GoogleCloudDialogflowV2beta1IntentMessageSuggestions `json:"suggestions,omitempty"`
4147
4148	// TelephonyPlayAudio: Plays audio from a file in Telephony Gateway.
4149	TelephonyPlayAudio *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio `json:"telephonyPlayAudio,omitempty"`
4150
4151	// TelephonySynthesizeSpeech: Synthesizes speech in Telephony Gateway.
4152	TelephonySynthesizeSpeech *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech `json:"telephonySynthesizeSpeech,omitempty"`
4153
4154	// TelephonyTransferCall: Transfers the call in Telephony Gateway.
4155	TelephonyTransferCall *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall `json:"telephonyTransferCall,omitempty"`
4156
4157	// Text: Returns a text response.
4158	Text *GoogleCloudDialogflowV2beta1IntentMessageText `json:"text,omitempty"`
4159
4160	// ForceSendFields is a list of field names (e.g. "BasicCard") to
4161	// unconditionally include in API requests. By default, fields with
4162	// empty values are omitted from API requests. However, any non-pointer,
4163	// non-interface field appearing in ForceSendFields will be sent to the
4164	// server regardless of whether the field is empty or not. This may be
4165	// used to include empty fields in Patch requests.
4166	ForceSendFields []string `json:"-"`
4167
4168	// NullFields is a list of field names (e.g. "BasicCard") to include in
4169	// API requests with the JSON null value. By default, fields with empty
4170	// values are omitted from API requests. However, any field with an
4171	// empty value appearing in NullFields will be sent to the server as
4172	// null. It is an error if a field in this list has a non-empty value.
4173	// This may be used to include null fields in Patch requests.
4174	NullFields []string `json:"-"`
4175}
4176
4177func (s *GoogleCloudDialogflowV2beta1IntentMessage) MarshalJSON() ([]byte, error) {
4178	type NoMethod GoogleCloudDialogflowV2beta1IntentMessage
4179	raw := NoMethod(*s)
4180	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4181}
4182
4183// GoogleCloudDialogflowV2beta1IntentMessageBasicCard: The basic card
4184// message. Useful for displaying information.
4185type GoogleCloudDialogflowV2beta1IntentMessageBasicCard struct {
4186	// Buttons: Optional. The collection of card buttons.
4187	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton `json:"buttons,omitempty"`
4188
4189	// FormattedText: Required, unless image is present. The body text of
4190	// the card.
4191	FormattedText string `json:"formattedText,omitempty"`
4192
4193	// Image: Optional. The image for the card.
4194	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
4195
4196	// Subtitle: Optional. The subtitle of the card.
4197	Subtitle string `json:"subtitle,omitempty"`
4198
4199	// Title: Optional. The title of the card.
4200	Title string `json:"title,omitempty"`
4201
4202	// ForceSendFields is a list of field names (e.g. "Buttons") to
4203	// unconditionally include in API requests. By default, fields with
4204	// empty values are omitted from API requests. However, any non-pointer,
4205	// non-interface field appearing in ForceSendFields will be sent to the
4206	// server regardless of whether the field is empty or not. This may be
4207	// used to include empty fields in Patch requests.
4208	ForceSendFields []string `json:"-"`
4209
4210	// NullFields is a list of field names (e.g. "Buttons") to include in
4211	// API requests with the JSON null value. By default, fields with empty
4212	// values are omitted from API requests. However, any field with an
4213	// empty value appearing in NullFields will be sent to the server as
4214	// null. It is an error if a field in this list has a non-empty value.
4215	// This may be used to include null fields in Patch requests.
4216	NullFields []string `json:"-"`
4217}
4218
4219func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCard) MarshalJSON() ([]byte, error) {
4220	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCard
4221	raw := NoMethod(*s)
4222	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4223}
4224
4225// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton: The button
4226// object that appears at the bottom of a card.
4227type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton struct {
4228	// OpenUriAction: Required. Action to take when a user taps on the
4229	// button.
4230	OpenUriAction *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction `json:"openUriAction,omitempty"`
4231
4232	// Title: Required. The title of the button.
4233	Title string `json:"title,omitempty"`
4234
4235	// ForceSendFields is a list of field names (e.g. "OpenUriAction") to
4236	// unconditionally include in API requests. By default, fields with
4237	// empty values are omitted from API requests. However, any non-pointer,
4238	// non-interface field appearing in ForceSendFields will be sent to the
4239	// server regardless of whether the field is empty or not. This may be
4240	// used to include empty fields in Patch requests.
4241	ForceSendFields []string `json:"-"`
4242
4243	// NullFields is a list of field names (e.g. "OpenUriAction") to include
4244	// in API requests with the JSON null value. By default, fields with
4245	// empty values are omitted from API requests. However, any field with
4246	// an empty value appearing in NullFields will be sent to the server as
4247	// null. It is an error if a field in this list has a non-empty value.
4248	// This may be used to include null fields in Patch requests.
4249	NullFields []string `json:"-"`
4250}
4251
4252func (s *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton) MarshalJSON() ([]byte, error) {
4253	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
4254	raw := NoMethod(*s)
4255	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4256}
4257
4258// GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction:
4259//  Opens the given URI.
4260type GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction struct {
4261	// Uri: Required. The HTTP or HTTPS scheme URI.
4262	Uri string `json:"uri,omitempty"`
4263
4264	// ForceSendFields is a list of field names (e.g. "Uri") 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. "Uri") to include in API
4273	// requests with the JSON null value. By default, fields with empty
4274	// values are omitted from API requests. However, any field with an
4275	// 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 *GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction) MarshalJSON() ([]byte, error) {
4282	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
4283	raw := NoMethod(*s)
4284	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4285}
4286
4287// GoogleCloudDialogflowV2beta1IntentMessageCard: The card response
4288// message.
4289type GoogleCloudDialogflowV2beta1IntentMessageCard struct {
4290	// Buttons: Optional. The collection of card buttons.
4291	Buttons []*GoogleCloudDialogflowV2beta1IntentMessageCardButton `json:"buttons,omitempty"`
4292
4293	// ImageUri: Optional. The public URI to an image file for the card.
4294	ImageUri string `json:"imageUri,omitempty"`
4295
4296	// Subtitle: Optional. The subtitle of the card.
4297	Subtitle string `json:"subtitle,omitempty"`
4298
4299	// Title: Optional. The title of the card.
4300	Title string `json:"title,omitempty"`
4301
4302	// ForceSendFields is a list of field names (e.g. "Buttons") to
4303	// unconditionally include in API requests. By default, fields with
4304	// empty values are omitted from API requests. However, any non-pointer,
4305	// non-interface field appearing in ForceSendFields will be sent to the
4306	// server regardless of whether the field is empty or not. This may be
4307	// used to include empty fields in Patch requests.
4308	ForceSendFields []string `json:"-"`
4309
4310	// NullFields is a list of field names (e.g. "Buttons") to include in
4311	// API requests with the JSON null value. By default, fields with empty
4312	// values are omitted from API requests. However, any field with an
4313	// empty value appearing in NullFields will be sent to the server as
4314	// null. It is an error if a field in this list has a non-empty value.
4315	// This may be used to include null fields in Patch requests.
4316	NullFields []string `json:"-"`
4317}
4318
4319func (s *GoogleCloudDialogflowV2beta1IntentMessageCard) MarshalJSON() ([]byte, error) {
4320	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCard
4321	raw := NoMethod(*s)
4322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4323}
4324
4325// GoogleCloudDialogflowV2beta1IntentMessageCardButton: Optional.
4326// Contains information about a button.
4327type GoogleCloudDialogflowV2beta1IntentMessageCardButton struct {
4328	// Postback: Optional. The text to send back to the Dialogflow API or a
4329	// URI to
4330	// open.
4331	Postback string `json:"postback,omitempty"`
4332
4333	// Text: Optional. The text to show on the button.
4334	Text string `json:"text,omitempty"`
4335
4336	// ForceSendFields is a list of field names (e.g. "Postback") to
4337	// unconditionally include in API requests. By default, fields with
4338	// empty values are omitted from API requests. However, any non-pointer,
4339	// non-interface field appearing in ForceSendFields will be sent to the
4340	// server regardless of whether the field is empty or not. This may be
4341	// used to include empty fields in Patch requests.
4342	ForceSendFields []string `json:"-"`
4343
4344	// NullFields is a list of field names (e.g. "Postback") to include in
4345	// API requests with the JSON null value. By default, fields with empty
4346	// values are omitted from API requests. However, any field with an
4347	// empty value appearing in NullFields will be sent to the server as
4348	// null. It is an error if a field in this list has a non-empty value.
4349	// This may be used to include null fields in Patch requests.
4350	NullFields []string `json:"-"`
4351}
4352
4353func (s *GoogleCloudDialogflowV2beta1IntentMessageCardButton) MarshalJSON() ([]byte, error) {
4354	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCardButton
4355	raw := NoMethod(*s)
4356	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4357}
4358
4359// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect: The card for
4360// presenting a carousel of options to select from.
4361type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect struct {
4362	// Items: Required. Carousel items.
4363	Items []*GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem `json:"items,omitempty"`
4364
4365	// ForceSendFields is a list of field names (e.g. "Items") to
4366	// unconditionally include in API requests. By default, fields with
4367	// empty values are omitted from API requests. However, any non-pointer,
4368	// non-interface field appearing in ForceSendFields will be sent to the
4369	// server regardless of whether the field is empty or not. This may be
4370	// used to include empty fields in Patch requests.
4371	ForceSendFields []string `json:"-"`
4372
4373	// NullFields is a list of field names (e.g. "Items") to include in API
4374	// requests with the JSON null value. By default, fields with empty
4375	// values are omitted from API requests. However, any field with an
4376	// empty value appearing in NullFields will be sent to the server as
4377	// null. It is an error if a field in this list has a non-empty value.
4378	// This may be used to include null fields in Patch requests.
4379	NullFields []string `json:"-"`
4380}
4381
4382func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect) MarshalJSON() ([]byte, error) {
4383	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
4384	raw := NoMethod(*s)
4385	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4386}
4387
4388// GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem: An item
4389// in the carousel.
4390type GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem struct {
4391	// Description: Optional. The body text of the card.
4392	Description string `json:"description,omitempty"`
4393
4394	// Image: Optional. The image to display.
4395	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
4396
4397	// Info: Required. Additional info about the option item.
4398	Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"`
4399
4400	// Title: Required. Title of the carousel item.
4401	Title string `json:"title,omitempty"`
4402
4403	// ForceSendFields is a list of field names (e.g. "Description") to
4404	// unconditionally include in API requests. By default, fields with
4405	// empty values are omitted from API requests. However, any non-pointer,
4406	// non-interface field appearing in ForceSendFields will be sent to the
4407	// server regardless of whether the field is empty or not. This may be
4408	// used to include empty fields in Patch requests.
4409	ForceSendFields []string `json:"-"`
4410
4411	// NullFields is a list of field names (e.g. "Description") to include
4412	// in API requests with the JSON null value. By default, fields with
4413	// empty values are omitted from API requests. However, any field with
4414	// an empty value appearing in NullFields will be sent to the server as
4415	// null. It is an error if a field in this list has a non-empty value.
4416	// This may be used to include null fields in Patch requests.
4417	NullFields []string `json:"-"`
4418}
4419
4420func (s *GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem) MarshalJSON() ([]byte, error) {
4421	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
4422	raw := NoMethod(*s)
4423	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4424}
4425
4426// GoogleCloudDialogflowV2beta1IntentMessageImage: The image response
4427// message.
4428type GoogleCloudDialogflowV2beta1IntentMessageImage struct {
4429	// AccessibilityText: A text description of the image to be used for
4430	// accessibility,
4431	// e.g., screen readers. Required if image_uri is set for
4432	// CarouselSelect.
4433	AccessibilityText string `json:"accessibilityText,omitempty"`
4434
4435	// ImageUri: Optional. The public URI to an image file.
4436	ImageUri string `json:"imageUri,omitempty"`
4437
4438	// ForceSendFields is a list of field names (e.g. "AccessibilityText")
4439	// to unconditionally include in API requests. By default, fields with
4440	// empty values are omitted from API requests. However, any non-pointer,
4441	// non-interface field appearing in ForceSendFields will be sent to the
4442	// server regardless of whether the field is empty or not. This may be
4443	// used to include empty fields in Patch requests.
4444	ForceSendFields []string `json:"-"`
4445
4446	// NullFields is a list of field names (e.g. "AccessibilityText") to
4447	// include in API requests with the JSON null value. By default, fields
4448	// with empty values are omitted from API requests. However, any field
4449	// with an empty value appearing in NullFields will be sent to the
4450	// server as null. It is an error if a field in this list has a
4451	// non-empty value. This may be used to include null fields in Patch
4452	// requests.
4453	NullFields []string `json:"-"`
4454}
4455
4456func (s *GoogleCloudDialogflowV2beta1IntentMessageImage) MarshalJSON() ([]byte, error) {
4457	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageImage
4458	raw := NoMethod(*s)
4459	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4460}
4461
4462// GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion: The
4463// suggestion chip message that allows the user to jump out to the
4464// app
4465// or website associated with this agent.
4466type GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion struct {
4467	// DestinationName: Required. The name of the app or site this chip is
4468	// linking to.
4469	DestinationName string `json:"destinationName,omitempty"`
4470
4471	// Uri: Required. The URI of the app or site to open when the user taps
4472	// the
4473	// suggestion chip.
4474	Uri string `json:"uri,omitempty"`
4475
4476	// ForceSendFields is a list of field names (e.g. "DestinationName") to
4477	// unconditionally include in API requests. By default, fields with
4478	// empty values are omitted from API requests. However, any non-pointer,
4479	// non-interface field appearing in ForceSendFields will be sent to the
4480	// server regardless of whether the field is empty or not. This may be
4481	// used to include empty fields in Patch requests.
4482	ForceSendFields []string `json:"-"`
4483
4484	// NullFields is a list of field names (e.g. "DestinationName") to
4485	// include in API requests with the JSON null value. By default, fields
4486	// with empty values are omitted from API requests. However, any field
4487	// with an empty value appearing in NullFields will be sent to the
4488	// server as null. It is an error if a field in this list has a
4489	// non-empty value. This may be used to include null fields in Patch
4490	// requests.
4491	NullFields []string `json:"-"`
4492}
4493
4494func (s *GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion) MarshalJSON() ([]byte, error) {
4495	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
4496	raw := NoMethod(*s)
4497	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4498}
4499
4500// GoogleCloudDialogflowV2beta1IntentMessageListSelect: The card for
4501// presenting a list of options to select from.
4502type GoogleCloudDialogflowV2beta1IntentMessageListSelect struct {
4503	// Items: Required. List items.
4504	Items []*GoogleCloudDialogflowV2beta1IntentMessageListSelectItem `json:"items,omitempty"`
4505
4506	// Title: Optional. The overall title of the list.
4507	Title string `json:"title,omitempty"`
4508
4509	// ForceSendFields is a list of field names (e.g. "Items") to
4510	// unconditionally include in API requests. By default, fields with
4511	// empty values are omitted from API requests. However, any non-pointer,
4512	// non-interface field appearing in ForceSendFields will be sent to the
4513	// server regardless of whether the field is empty or not. This may be
4514	// used to include empty fields in Patch requests.
4515	ForceSendFields []string `json:"-"`
4516
4517	// NullFields is a list of field names (e.g. "Items") to include in API
4518	// requests with the JSON null value. By default, fields with empty
4519	// values are omitted from API requests. However, any field with an
4520	// empty value appearing in NullFields will be sent to the server as
4521	// null. It is an error if a field in this list has a non-empty value.
4522	// This may be used to include null fields in Patch requests.
4523	NullFields []string `json:"-"`
4524}
4525
4526func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelect) MarshalJSON() ([]byte, error) {
4527	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelect
4528	raw := NoMethod(*s)
4529	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4530}
4531
4532// GoogleCloudDialogflowV2beta1IntentMessageListSelectItem: An item in
4533// the list.
4534type GoogleCloudDialogflowV2beta1IntentMessageListSelectItem struct {
4535	// Description: Optional. The main text describing the item.
4536	Description string `json:"description,omitempty"`
4537
4538	// Image: Optional. The image to display.
4539	Image *GoogleCloudDialogflowV2beta1IntentMessageImage `json:"image,omitempty"`
4540
4541	// Info: Required. Additional information about this option.
4542	Info *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo `json:"info,omitempty"`
4543
4544	// Title: Required. The title of the list item.
4545	Title string `json:"title,omitempty"`
4546
4547	// ForceSendFields is a list of field names (e.g. "Description") to
4548	// unconditionally include in API requests. By default, fields with
4549	// empty values are omitted from API requests. However, any non-pointer,
4550	// non-interface field appearing in ForceSendFields will be sent to the
4551	// server regardless of whether the field is empty or not. This may be
4552	// used to include empty fields in Patch requests.
4553	ForceSendFields []string `json:"-"`
4554
4555	// NullFields is a list of field names (e.g. "Description") to include
4556	// in API requests with the JSON null value. By default, fields with
4557	// empty values are omitted from API requests. However, any field with
4558	// an empty value appearing in NullFields will be sent to the server as
4559	// null. It is an error if a field in this list has a non-empty value.
4560	// This may be used to include null fields in Patch requests.
4561	NullFields []string `json:"-"`
4562}
4563
4564func (s *GoogleCloudDialogflowV2beta1IntentMessageListSelectItem) MarshalJSON() ([]byte, error) {
4565	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
4566	raw := NoMethod(*s)
4567	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4568}
4569
4570// GoogleCloudDialogflowV2beta1IntentMessageQuickReplies: The quick
4571// replies response message.
4572type GoogleCloudDialogflowV2beta1IntentMessageQuickReplies struct {
4573	// QuickReplies: Optional. The collection of quick replies.
4574	QuickReplies []string `json:"quickReplies,omitempty"`
4575
4576	// Title: Optional. The title of the collection of quick replies.
4577	Title string `json:"title,omitempty"`
4578
4579	// ForceSendFields is a list of field names (e.g. "QuickReplies") to
4580	// unconditionally include in API requests. By default, fields with
4581	// empty values are omitted from API requests. However, any non-pointer,
4582	// non-interface field appearing in ForceSendFields will be sent to the
4583	// server regardless of whether the field is empty or not. This may be
4584	// used to include empty fields in Patch requests.
4585	ForceSendFields []string `json:"-"`
4586
4587	// NullFields is a list of field names (e.g. "QuickReplies") to include
4588	// in API requests with the JSON null value. By default, fields with
4589	// empty values are omitted from API requests. However, any field with
4590	// an empty value appearing in NullFields will be sent to the server as
4591	// null. It is an error if a field in this list has a non-empty value.
4592	// This may be used to include null fields in Patch requests.
4593	NullFields []string `json:"-"`
4594}
4595
4596func (s *GoogleCloudDialogflowV2beta1IntentMessageQuickReplies) MarshalJSON() ([]byte, error) {
4597	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
4598	raw := NoMethod(*s)
4599	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4600}
4601
4602// GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo: Additional
4603// info about the select item for when it is triggered in a
4604// dialog.
4605type GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo struct {
4606	// Key: Required. A unique key that will be sent back to the agent if
4607	// this
4608	// response is given.
4609	Key string `json:"key,omitempty"`
4610
4611	// Synonyms: Optional. A list of synonyms that can also be used to
4612	// trigger this
4613	// item in dialog.
4614	Synonyms []string `json:"synonyms,omitempty"`
4615
4616	// ForceSendFields is a list of field names (e.g. "Key") to
4617	// unconditionally include in API requests. By default, fields with
4618	// empty values are omitted from API requests. However, any non-pointer,
4619	// non-interface field appearing in ForceSendFields will be sent to the
4620	// server regardless of whether the field is empty or not. This may be
4621	// used to include empty fields in Patch requests.
4622	ForceSendFields []string `json:"-"`
4623
4624	// NullFields is a list of field names (e.g. "Key") to include in API
4625	// requests with the JSON null value. By default, fields with empty
4626	// values are omitted from API requests. However, any field with an
4627	// empty value appearing in NullFields will be sent to the server as
4628	// null. It is an error if a field in this list has a non-empty value.
4629	// This may be used to include null fields in Patch requests.
4630	NullFields []string `json:"-"`
4631}
4632
4633func (s *GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo) MarshalJSON() ([]byte, error) {
4634	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
4635	raw := NoMethod(*s)
4636	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4637}
4638
4639// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse: The simple
4640// response message containing speech or text.
4641type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse struct {
4642	// DisplayText: Optional. The text to display.
4643	DisplayText string `json:"displayText,omitempty"`
4644
4645	// Ssml: One of text_to_speech or ssml must be provided. Structured
4646	// spoken
4647	// response to the user in the SSML format. Mutually exclusive
4648	// with
4649	// text_to_speech.
4650	Ssml string `json:"ssml,omitempty"`
4651
4652	// TextToSpeech: One of text_to_speech or ssml must be provided. The
4653	// plain text of the
4654	// speech output. Mutually exclusive with ssml.
4655	TextToSpeech string `json:"textToSpeech,omitempty"`
4656
4657	// ForceSendFields is a list of field names (e.g. "DisplayText") to
4658	// unconditionally include in API requests. By default, fields with
4659	// empty values are omitted from API requests. However, any non-pointer,
4660	// non-interface field appearing in ForceSendFields will be sent to the
4661	// server regardless of whether the field is empty or not. This may be
4662	// used to include empty fields in Patch requests.
4663	ForceSendFields []string `json:"-"`
4664
4665	// NullFields is a list of field names (e.g. "DisplayText") to include
4666	// in API requests with the JSON null value. By default, fields with
4667	// empty values are omitted from API requests. However, any field with
4668	// an empty value appearing in NullFields will be sent to the server as
4669	// null. It is an error if a field in this list has a non-empty value.
4670	// This may be used to include null fields in Patch requests.
4671	NullFields []string `json:"-"`
4672}
4673
4674func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse) MarshalJSON() ([]byte, error) {
4675	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
4676	raw := NoMethod(*s)
4677	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4678}
4679
4680// GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses: The
4681// collection of simple response candidates.
4682// This message in `QueryResult.fulfillment_messages`
4683// and
4684// `WebhookResponse.fulfillment_messages` should contain only
4685// one
4686// `SimpleResponse`.
4687type GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses struct {
4688	// SimpleResponses: Required. The list of simple responses.
4689	SimpleResponses []*GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse `json:"simpleResponses,omitempty"`
4690
4691	// ForceSendFields is a list of field names (e.g. "SimpleResponses") to
4692	// unconditionally include in API requests. By default, fields with
4693	// empty values are omitted from API requests. However, any non-pointer,
4694	// non-interface field appearing in ForceSendFields will be sent to the
4695	// server regardless of whether the field is empty or not. This may be
4696	// used to include empty fields in Patch requests.
4697	ForceSendFields []string `json:"-"`
4698
4699	// NullFields is a list of field names (e.g. "SimpleResponses") to
4700	// include in API requests with the JSON null value. By default, fields
4701	// with empty values are omitted from API requests. However, any field
4702	// with an empty value appearing in NullFields will be sent to the
4703	// server as null. It is an error if a field in this list has a
4704	// non-empty value. This may be used to include null fields in Patch
4705	// requests.
4706	NullFields []string `json:"-"`
4707}
4708
4709func (s *GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses) MarshalJSON() ([]byte, error) {
4710	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
4711	raw := NoMethod(*s)
4712	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4713}
4714
4715// GoogleCloudDialogflowV2beta1IntentMessageSuggestion: The suggestion
4716// chip message that the user can tap to quickly post a reply
4717// to the conversation.
4718type GoogleCloudDialogflowV2beta1IntentMessageSuggestion struct {
4719	// Title: Required. The text shown the in the suggestion chip.
4720	Title string `json:"title,omitempty"`
4721
4722	// ForceSendFields is a list of field names (e.g. "Title") to
4723	// unconditionally include in API requests. By default, fields with
4724	// empty values are omitted from API requests. However, any non-pointer,
4725	// non-interface field appearing in ForceSendFields will be sent to the
4726	// server regardless of whether the field is empty or not. This may be
4727	// used to include empty fields in Patch requests.
4728	ForceSendFields []string `json:"-"`
4729
4730	// NullFields is a list of field names (e.g. "Title") to include in API
4731	// requests with the JSON null value. By default, fields with empty
4732	// values are omitted from API requests. However, any field with an
4733	// empty value appearing in NullFields will be sent to the server as
4734	// null. It is an error if a field in this list has a non-empty value.
4735	// This may be used to include null fields in Patch requests.
4736	NullFields []string `json:"-"`
4737}
4738
4739func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestion) MarshalJSON() ([]byte, error) {
4740	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestion
4741	raw := NoMethod(*s)
4742	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4743}
4744
4745// GoogleCloudDialogflowV2beta1IntentMessageSuggestions: The collection
4746// of suggestions.
4747type GoogleCloudDialogflowV2beta1IntentMessageSuggestions struct {
4748	// Suggestions: Required. The list of suggested replies.
4749	Suggestions []*GoogleCloudDialogflowV2beta1IntentMessageSuggestion `json:"suggestions,omitempty"`
4750
4751	// ForceSendFields is a list of field names (e.g. "Suggestions") to
4752	// unconditionally include in API requests. By default, fields with
4753	// empty values are omitted from API requests. However, any non-pointer,
4754	// non-interface field appearing in ForceSendFields will be sent to the
4755	// server regardless of whether the field is empty or not. This may be
4756	// used to include empty fields in Patch requests.
4757	ForceSendFields []string `json:"-"`
4758
4759	// NullFields is a list of field names (e.g. "Suggestions") to include
4760	// in API requests with the JSON null value. By default, fields with
4761	// empty values are omitted from API requests. However, any field with
4762	// an empty value appearing in NullFields will be sent to the server as
4763	// null. It is an error if a field in this list has a non-empty value.
4764	// This may be used to include null fields in Patch requests.
4765	NullFields []string `json:"-"`
4766}
4767
4768func (s *GoogleCloudDialogflowV2beta1IntentMessageSuggestions) MarshalJSON() ([]byte, error) {
4769	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageSuggestions
4770	raw := NoMethod(*s)
4771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4772}
4773
4774// GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio: Plays
4775// audio from a file in Telephony Gateway.
4776type GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio struct {
4777	// AudioUri: Required. URI to a Google Cloud Storage object containing
4778	// the audio to
4779	// play, e.g., "gs://bucket/object". The object must contain a
4780	// single
4781	// channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz.
4782	//
4783	// This object must be readable by the
4784	// `service-<Project
4785	// Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service
4786	// account
4787	// where <Project Number> is the number of the Telephony Gateway
4788	// project
4789	// (usually the same as the Dialogflow agent project). If the Google
4790	// Cloud
4791	// Storage bucket is in the Telephony Gateway project, this permission
4792	// is
4793	// added by default when enabling the Dialogflow V2 API.
4794	//
4795	// For audio from other sources, consider using
4796	// the
4797	// `TelephonySynthesizeSpeech` message with SSML.
4798	AudioUri string `json:"audioUri,omitempty"`
4799
4800	// ForceSendFields is a list of field names (e.g. "AudioUri") to
4801	// unconditionally include in API requests. By default, fields with
4802	// empty values are omitted from API requests. However, any non-pointer,
4803	// non-interface field appearing in ForceSendFields will be sent to the
4804	// server regardless of whether the field is empty or not. This may be
4805	// used to include empty fields in Patch requests.
4806	ForceSendFields []string `json:"-"`
4807
4808	// NullFields is a list of field names (e.g. "AudioUri") to include in
4809	// API requests with the JSON null value. By default, fields with empty
4810	// values are omitted from API requests. However, any field with an
4811	// empty value appearing in NullFields will be sent to the server as
4812	// null. It is an error if a field in this list has a non-empty value.
4813	// This may be used to include null fields in Patch requests.
4814	NullFields []string `json:"-"`
4815}
4816
4817func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio) MarshalJSON() ([]byte, error) {
4818	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
4819	raw := NoMethod(*s)
4820	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4821}
4822
4823// GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech:
4824// Synthesizes speech and plays back the synthesized audio to the caller
4825// in
4826// Telephony Gateway.
4827//
4828// Telephony Gateway takes the synthesizer settings
4829// from
4830// `DetectIntentResponse.output_audio_config` which can either be set
4831// at request-level or can come from the agent-level synthesizer config.
4832type GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech struct {
4833	// Ssml: The SSML to be synthesized. For more information,
4834	// see
4835	// [SSML](https://developers.google.com/actions/reference/ssml).
4836	Ssml string `json:"ssml,omitempty"`
4837
4838	// Text: The raw text to be synthesized.
4839	Text string `json:"text,omitempty"`
4840
4841	// ForceSendFields is a list of field names (e.g. "Ssml") to
4842	// unconditionally include in API requests. By default, fields with
4843	// empty values are omitted from API requests. However, any non-pointer,
4844	// non-interface field appearing in ForceSendFields will be sent to the
4845	// server regardless of whether the field is empty or not. This may be
4846	// used to include empty fields in Patch requests.
4847	ForceSendFields []string `json:"-"`
4848
4849	// NullFields is a list of field names (e.g. "Ssml") to include in API
4850	// requests with the JSON null value. By default, fields with empty
4851	// values are omitted from API requests. However, any field with an
4852	// empty value appearing in NullFields will be sent to the server as
4853	// null. It is an error if a field in this list has a non-empty value.
4854	// This may be used to include null fields in Patch requests.
4855	NullFields []string `json:"-"`
4856}
4857
4858func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech) MarshalJSON() ([]byte, error) {
4859	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
4860	raw := NoMethod(*s)
4861	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4862}
4863
4864// GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall:
4865// Transfers the call in Telephony Gateway.
4866type GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall struct {
4867	// PhoneNumber: Required. The phone number to transfer the call to
4868	// in [E.164 format](https://en.wikipedia.org/wiki/E.164).
4869	//
4870	// We currently only allow transferring to US numbers (+1xxxyyyzzzz).
4871	PhoneNumber string `json:"phoneNumber,omitempty"`
4872
4873	// ForceSendFields is a list of field names (e.g. "PhoneNumber") to
4874	// unconditionally include in API requests. By default, fields with
4875	// empty values are omitted from API requests. However, any non-pointer,
4876	// non-interface field appearing in ForceSendFields will be sent to the
4877	// server regardless of whether the field is empty or not. This may be
4878	// used to include empty fields in Patch requests.
4879	ForceSendFields []string `json:"-"`
4880
4881	// NullFields is a list of field names (e.g. "PhoneNumber") to include
4882	// in API requests with the JSON null value. By default, fields with
4883	// empty values are omitted from API requests. However, any field with
4884	// an empty value appearing in NullFields will be sent to the server as
4885	// null. It is an error if a field in this list has a non-empty value.
4886	// This may be used to include null fields in Patch requests.
4887	NullFields []string `json:"-"`
4888}
4889
4890func (s *GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall) MarshalJSON() ([]byte, error) {
4891	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
4892	raw := NoMethod(*s)
4893	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4894}
4895
4896// GoogleCloudDialogflowV2beta1IntentMessageText: The text response
4897// message.
4898type GoogleCloudDialogflowV2beta1IntentMessageText struct {
4899	// Text: Optional. The collection of the agent's responses.
4900	Text []string `json:"text,omitempty"`
4901
4902	// ForceSendFields is a list of field names (e.g. "Text") to
4903	// unconditionally include in API requests. By default, fields with
4904	// empty values are omitted from API requests. However, any non-pointer,
4905	// non-interface field appearing in ForceSendFields will be sent to the
4906	// server regardless of whether the field is empty or not. This may be
4907	// used to include empty fields in Patch requests.
4908	ForceSendFields []string `json:"-"`
4909
4910	// NullFields is a list of field names (e.g. "Text") to include in API
4911	// requests with the JSON null value. By default, fields with empty
4912	// values are omitted from API requests. However, any field with an
4913	// empty value appearing in NullFields will be sent to the server as
4914	// null. It is an error if a field in this list has a non-empty value.
4915	// This may be used to include null fields in Patch requests.
4916	NullFields []string `json:"-"`
4917}
4918
4919func (s *GoogleCloudDialogflowV2beta1IntentMessageText) MarshalJSON() ([]byte, error) {
4920	type NoMethod GoogleCloudDialogflowV2beta1IntentMessageText
4921	raw := NoMethod(*s)
4922	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4923}
4924
4925// GoogleCloudDialogflowV2beta1IntentParameter: Represents intent
4926// parameters.
4927type GoogleCloudDialogflowV2beta1IntentParameter struct {
4928	// DefaultValue: Optional. The default value to use when the `value`
4929	// yields an empty
4930	// result.
4931	// Default values can be extracted from contexts by using the
4932	// following
4933	// syntax: `#context_name.parameter_name`.
4934	DefaultValue string `json:"defaultValue,omitempty"`
4935
4936	// DisplayName: Required. The name of the parameter.
4937	DisplayName string `json:"displayName,omitempty"`
4938
4939	// EntityTypeDisplayName: Optional. The name of the entity type,
4940	// prefixed with `@`, that
4941	// describes values of the parameter. If the parameter is
4942	// required, this must be provided.
4943	EntityTypeDisplayName string `json:"entityTypeDisplayName,omitempty"`
4944
4945	// IsList: Optional. Indicates whether the parameter represents a list
4946	// of values.
4947	IsList bool `json:"isList,omitempty"`
4948
4949	// Mandatory: Optional. Indicates whether the parameter is required.
4950	// That is,
4951	// whether the intent cannot be completed without collecting the
4952	// parameter
4953	// value.
4954	Mandatory bool `json:"mandatory,omitempty"`
4955
4956	// Name: The unique identifier of this parameter.
4957	Name string `json:"name,omitempty"`
4958
4959	// Prompts: Optional. The collection of prompts that the agent can
4960	// present to the
4961	// user in order to collect a value for the parameter.
4962	Prompts []string `json:"prompts,omitempty"`
4963
4964	// Value: Optional. The definition of the parameter value. It can be:
4965	// - a constant string,
4966	// - a parameter value defined as `$parameter_name`,
4967	// - an original parameter value defined as
4968	// `$parameter_name.original`,
4969	// - a parameter value from some context defined as
4970	//   `#context_name.parameter_name`.
4971	Value string `json:"value,omitempty"`
4972
4973	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
4974	// unconditionally include in API requests. By default, fields with
4975	// empty values are omitted from API requests. However, any non-pointer,
4976	// non-interface field appearing in ForceSendFields will be sent to the
4977	// server regardless of whether the field is empty or not. This may be
4978	// used to include empty fields in Patch requests.
4979	ForceSendFields []string `json:"-"`
4980
4981	// NullFields is a list of field names (e.g. "DefaultValue") to include
4982	// in API requests with the JSON null value. By default, fields with
4983	// empty values are omitted from API requests. However, any field with
4984	// an empty value appearing in NullFields will be sent to the server as
4985	// null. It is an error if a field in this list has a non-empty value.
4986	// This may be used to include null fields in Patch requests.
4987	NullFields []string `json:"-"`
4988}
4989
4990func (s *GoogleCloudDialogflowV2beta1IntentParameter) MarshalJSON() ([]byte, error) {
4991	type NoMethod GoogleCloudDialogflowV2beta1IntentParameter
4992	raw := NoMethod(*s)
4993	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4994}
4995
4996// GoogleCloudDialogflowV2beta1IntentTrainingPhrase: Represents an
4997// example that the agent is trained on.
4998type GoogleCloudDialogflowV2beta1IntentTrainingPhrase struct {
4999	// Name: Output only. The unique identifier of this training phrase.
5000	Name string `json:"name,omitempty"`
5001
5002	// Parts: Required. The ordered list of training phrase parts.
5003	// The parts are concatenated in order to form the training
5004	// phrase.
5005	//
5006	// Note: The API does not automatically annotate training phrases like
5007	// the
5008	// Dialogflow Console does.
5009	//
5010	// Note: Do not forget to include whitespace at part boundaries,
5011	// so the training phrase is well formatted when the parts are
5012	// concatenated.
5013	//
5014	// If the training phrase does not need to be annotated with
5015	// parameters,
5016	// you just need a single part with only the Part.text field set.
5017	//
5018	// If you want to annotate the training phrase, you must create
5019	// multiple
5020	// parts, where the fields of each part are populated in one of two
5021	// ways:
5022	//
5023	// -   `Part.text` is set to a part of the phrase that has no
5024	// parameters.
5025	// -   `Part.text` is set to a part of the phrase that you want to
5026	// annotate,
5027	//     and the `entity_type`, `alias`, and `user_defined` fields are
5028	// all
5029	//     set.
5030	Parts []*GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart `json:"parts,omitempty"`
5031
5032	// TimesAddedCount: Optional. Indicates how many times this example was
5033	// added to
5034	// the intent. Each time a developer adds an existing sample by editing
5035	// an
5036	// intent or training, this counter is increased.
5037	TimesAddedCount int64 `json:"timesAddedCount,omitempty"`
5038
5039	// Type: Required. The type of the training phrase.
5040	//
5041	// Possible values:
5042	//   "TYPE_UNSPECIFIED" - Not specified. This value should never be
5043	// used.
5044	//   "EXAMPLE" - Examples do not contain @-prefixed entity type names,
5045	// but example parts
5046	// can be annotated with entity types.
5047	//   "TEMPLATE" - Templates are not annotated with entity types, but
5048	// they can contain
5049	// @-prefixed entity type names as substrings.
5050	// Template mode has been deprecated. Example mode is the only
5051	// supported
5052	// way to create new training phrases. If you have existing
5053	// training
5054	// phrases that you've created in template mode, those will continue
5055	// to
5056	// work.
5057	Type string `json:"type,omitempty"`
5058
5059	// ForceSendFields is a list of field names (e.g. "Name") to
5060	// unconditionally include in API requests. By default, fields with
5061	// empty values are omitted from API requests. However, any non-pointer,
5062	// non-interface field appearing in ForceSendFields will be sent to the
5063	// server regardless of whether the field is empty or not. This may be
5064	// used to include empty fields in Patch requests.
5065	ForceSendFields []string `json:"-"`
5066
5067	// NullFields is a list of field names (e.g. "Name") to include in API
5068	// requests with the JSON null value. By default, fields with empty
5069	// values are omitted from API requests. However, any field with an
5070	// empty value appearing in NullFields will be sent to the server as
5071	// null. It is an error if a field in this list has a non-empty value.
5072	// This may be used to include null fields in Patch requests.
5073	NullFields []string `json:"-"`
5074}
5075
5076func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrase) MarshalJSON() ([]byte, error) {
5077	type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrase
5078	raw := NoMethod(*s)
5079	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5080}
5081
5082// GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart: Represents a
5083// part of a training phrase.
5084type GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart struct {
5085	// Alias: Optional. The parameter name for the value extracted from
5086	// the
5087	// annotated part of the example.
5088	// This field is required for annotated parts of the training phrase.
5089	Alias string `json:"alias,omitempty"`
5090
5091	// EntityType: Optional. The entity type name prefixed with `@`.
5092	// This field is required for annotated parts of the training phrase.
5093	EntityType string `json:"entityType,omitempty"`
5094
5095	// Text: Required. The text for this part.
5096	Text string `json:"text,omitempty"`
5097
5098	// UserDefined: Optional. Indicates whether the text was manually
5099	// annotated.
5100	// This field is set to true when the Dialogflow Console is used
5101	// to
5102	// manually annotate the part. When creating an annotated part with
5103	// the
5104	// API, you must set this to true.
5105	UserDefined bool `json:"userDefined,omitempty"`
5106
5107	// ForceSendFields is a list of field names (e.g. "Alias") to
5108	// unconditionally include in API requests. By default, fields with
5109	// empty values are omitted from API requests. However, any non-pointer,
5110	// non-interface field appearing in ForceSendFields will be sent to the
5111	// server regardless of whether the field is empty or not. This may be
5112	// used to include empty fields in Patch requests.
5113	ForceSendFields []string `json:"-"`
5114
5115	// NullFields is a list of field names (e.g. "Alias") to include in API
5116	// requests with the JSON null value. By default, fields with empty
5117	// values are omitted from API requests. However, any field with an
5118	// empty value appearing in NullFields will be sent to the server as
5119	// null. It is an error if a field in this list has a non-empty value.
5120	// This may be used to include null fields in Patch requests.
5121	NullFields []string `json:"-"`
5122}
5123
5124func (s *GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart) MarshalJSON() ([]byte, error) {
5125	type NoMethod GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
5126	raw := NoMethod(*s)
5127	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5128}
5129
5130// GoogleCloudDialogflowV2beta1KnowledgeAnswers: Represents the result
5131// of querying a Knowledge base.
5132type GoogleCloudDialogflowV2beta1KnowledgeAnswers struct {
5133	// Answers: A list of answers from Knowledge Connector.
5134	Answers []*GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer `json:"answers,omitempty"`
5135
5136	// ForceSendFields is a list of field names (e.g. "Answers") to
5137	// unconditionally include in API requests. By default, fields with
5138	// empty values are omitted from API requests. However, any non-pointer,
5139	// non-interface field appearing in ForceSendFields will be sent to the
5140	// server regardless of whether the field is empty or not. This may be
5141	// used to include empty fields in Patch requests.
5142	ForceSendFields []string `json:"-"`
5143
5144	// NullFields is a list of field names (e.g. "Answers") to include in
5145	// API requests with the JSON null value. By default, fields with empty
5146	// values are omitted from API requests. However, any field with an
5147	// empty value appearing in NullFields will be sent to the server as
5148	// null. It is an error if a field in this list has a non-empty value.
5149	// This may be used to include null fields in Patch requests.
5150	NullFields []string `json:"-"`
5151}
5152
5153func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswers) MarshalJSON() ([]byte, error) {
5154	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswers
5155	raw := NoMethod(*s)
5156	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5157}
5158
5159// GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer: An answer from
5160// Knowledge Connector.
5161type GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer struct {
5162	// Answer: The piece of text from the `source` knowledge base document
5163	// that answers
5164	// this conversational query.
5165	Answer string `json:"answer,omitempty"`
5166
5167	// FaqQuestion: The corresponding FAQ question if the answer was
5168	// extracted from a FAQ
5169	// Document, empty otherwise.
5170	FaqQuestion string `json:"faqQuestion,omitempty"`
5171
5172	// MatchConfidence: The system's confidence score that this Knowledge
5173	// answer is a good match
5174	// for this conversational query.
5175	// The range is from 0.0 (completely uncertain) to 1.0 (completely
5176	// certain).
5177	// Note: The confidence score is likely to vary somewhat (possibly even
5178	// for
5179	// identical requests), as the underlying model is under
5180	// constant
5181	// improvement. It may be deprecated in the future. We recommend
5182	// using
5183	// `match_confidence_level` which should be generally more stable.
5184	MatchConfidence float64 `json:"matchConfidence,omitempty"`
5185
5186	// MatchConfidenceLevel: The system's confidence level that this
5187	// knowledge answer is a good match
5188	// for this conversational query.
5189	// NOTE: The confidence level for a given `<query, answer>` pair may
5190	// change
5191	// without notice, as it depends on models that are constantly
5192	// being
5193	// improved. However, it will change less frequently than the
5194	// confidence
5195	// score below, and should be preferred for referencing the quality of
5196	// an
5197	// answer.
5198	//
5199	// Possible values:
5200	//   "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED" - Not specified.
5201	//   "LOW" - Indicates that the confidence is low.
5202	//   "MEDIUM" - Indicates our confidence is medium.
5203	//   "HIGH" - Indicates our confidence is high.
5204	MatchConfidenceLevel string `json:"matchConfidenceLevel,omitempty"`
5205
5206	// Source: Indicates which Knowledge Document this answer was extracted
5207	// from.
5208	// Format: `projects/<Project ID>/knowledgeBases/<Knowledge
5209	// Base
5210	// ID>/documents/<Document ID>`.
5211	Source string `json:"source,omitempty"`
5212
5213	// ForceSendFields is a list of field names (e.g. "Answer") to
5214	// unconditionally include in API requests. By default, fields with
5215	// empty values are omitted from API requests. However, any non-pointer,
5216	// non-interface field appearing in ForceSendFields will be sent to the
5217	// server regardless of whether the field is empty or not. This may be
5218	// used to include empty fields in Patch requests.
5219	ForceSendFields []string `json:"-"`
5220
5221	// NullFields is a list of field names (e.g. "Answer") to include in API
5222	// requests with the JSON null value. By default, fields with empty
5223	// values are omitted from API requests. However, any field with an
5224	// empty value appearing in NullFields will be sent to the server as
5225	// null. It is an error if a field in this list has a non-empty value.
5226	// This may be used to include null fields in Patch requests.
5227	NullFields []string `json:"-"`
5228}
5229
5230func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) MarshalJSON() ([]byte, error) {
5231	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
5232	raw := NoMethod(*s)
5233	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5234}
5235
5236func (s *GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer) UnmarshalJSON(data []byte) error {
5237	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
5238	var s1 struct {
5239		MatchConfidence gensupport.JSONFloat64 `json:"matchConfidence"`
5240		*NoMethod
5241	}
5242	s1.NoMethod = (*NoMethod)(s)
5243	if err := json.Unmarshal(data, &s1); err != nil {
5244		return err
5245	}
5246	s.MatchConfidence = float64(s1.MatchConfidence)
5247	return nil
5248}
5249
5250// GoogleCloudDialogflowV2beta1KnowledgeBase: Represents knowledge base
5251// resource.
5252//
5253// Note: The `projects.agent.knowledgeBases` resource is
5254// deprecated;
5255// only use `projects.knowledgeBases`.
5256type GoogleCloudDialogflowV2beta1KnowledgeBase struct {
5257	// DisplayName: Required. The display name of the knowledge base. The
5258	// name must be 1024
5259	// bytes or less; otherwise, the creation request fails.
5260	DisplayName string `json:"displayName,omitempty"`
5261
5262	// Name: The knowledge base resource name.
5263	// The name must be empty when creating a knowledge base.
5264	// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
5265	Name string `json:"name,omitempty"`
5266
5267	// ServerResponse contains the HTTP response code and headers from the
5268	// server.
5269	googleapi.ServerResponse `json:"-"`
5270
5271	// ForceSendFields is a list of field names (e.g. "DisplayName") to
5272	// unconditionally include in API requests. By default, fields with
5273	// empty values are omitted from API requests. However, any non-pointer,
5274	// non-interface field appearing in ForceSendFields will be sent to the
5275	// server regardless of whether the field is empty or not. This may be
5276	// used to include empty fields in Patch requests.
5277	ForceSendFields []string `json:"-"`
5278
5279	// NullFields is a list of field names (e.g. "DisplayName") to include
5280	// in API requests with the JSON null value. By default, fields with
5281	// empty values are omitted from API requests. However, any field with
5282	// an empty value appearing in NullFields will be sent to the server as
5283	// null. It is an error if a field in this list has a non-empty value.
5284	// This may be used to include null fields in Patch requests.
5285	NullFields []string `json:"-"`
5286}
5287
5288func (s *GoogleCloudDialogflowV2beta1KnowledgeBase) MarshalJSON() ([]byte, error) {
5289	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeBase
5290	raw := NoMethod(*s)
5291	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5292}
5293
5294// GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata: Metadata in
5295// google::longrunning::Operation for Knowledge operations.
5296type GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata struct {
5297	// State: Required. The current state of this operation.
5298	//
5299	// Possible values:
5300	//   "STATE_UNSPECIFIED" - State unspecified.
5301	//   "PENDING" - The operation has been created.
5302	//   "RUNNING" - The operation is currently running.
5303	//   "DONE" - The operation is done, either cancelled or completed.
5304	State string `json:"state,omitempty"`
5305
5306	// ForceSendFields is a list of field names (e.g. "State") to
5307	// unconditionally include in API requests. By default, fields with
5308	// empty values are omitted from API requests. However, any non-pointer,
5309	// non-interface field appearing in ForceSendFields will be sent to the
5310	// server regardless of whether the field is empty or not. This may be
5311	// used to include empty fields in Patch requests.
5312	ForceSendFields []string `json:"-"`
5313
5314	// NullFields is a list of field names (e.g. "State") to include in API
5315	// requests with the JSON null value. By default, fields with empty
5316	// values are omitted from API requests. However, any field with an
5317	// empty value appearing in NullFields will be sent to the server as
5318	// null. It is an error if a field in this list has a non-empty value.
5319	// This may be used to include null fields in Patch requests.
5320	NullFields []string `json:"-"`
5321}
5322
5323func (s *GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata) MarshalJSON() ([]byte, error) {
5324	type NoMethod GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
5325	raw := NoMethod(*s)
5326	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5327}
5328
5329// GoogleCloudDialogflowV2beta1ListContextsResponse: The response
5330// message for Contexts.ListContexts.
5331type GoogleCloudDialogflowV2beta1ListContextsResponse struct {
5332	// Contexts: The list of contexts. There will be a maximum number of
5333	// items
5334	// returned based on the page_size field in the request.
5335	Contexts []*GoogleCloudDialogflowV2beta1Context `json:"contexts,omitempty"`
5336
5337	// NextPageToken: Token to retrieve the next page of results, or empty
5338	// if there are no
5339	// more results in the list.
5340	NextPageToken string `json:"nextPageToken,omitempty"`
5341
5342	// ServerResponse contains the HTTP response code and headers from the
5343	// server.
5344	googleapi.ServerResponse `json:"-"`
5345
5346	// ForceSendFields is a list of field names (e.g. "Contexts") to
5347	// unconditionally include in API requests. By default, fields with
5348	// empty values are omitted from API requests. However, any non-pointer,
5349	// non-interface field appearing in ForceSendFields will be sent to the
5350	// server regardless of whether the field is empty or not. This may be
5351	// used to include empty fields in Patch requests.
5352	ForceSendFields []string `json:"-"`
5353
5354	// NullFields is a list of field names (e.g. "Contexts") to include in
5355	// API requests with the JSON null value. By default, fields with empty
5356	// values are omitted from API requests. However, any field with an
5357	// empty value appearing in NullFields will be sent to the server as
5358	// null. It is an error if a field in this list has a non-empty value.
5359	// This may be used to include null fields in Patch requests.
5360	NullFields []string `json:"-"`
5361}
5362
5363func (s *GoogleCloudDialogflowV2beta1ListContextsResponse) MarshalJSON() ([]byte, error) {
5364	type NoMethod GoogleCloudDialogflowV2beta1ListContextsResponse
5365	raw := NoMethod(*s)
5366	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5367}
5368
5369// GoogleCloudDialogflowV2beta1ListDocumentsResponse: Response message
5370// for Documents.ListDocuments.
5371type GoogleCloudDialogflowV2beta1ListDocumentsResponse struct {
5372	// Documents: The list of documents.
5373	Documents []*GoogleCloudDialogflowV2beta1Document `json:"documents,omitempty"`
5374
5375	// NextPageToken: Token to retrieve the next page of results, or empty
5376	// if there are no
5377	// more results in the list.
5378	NextPageToken string `json:"nextPageToken,omitempty"`
5379
5380	// ServerResponse contains the HTTP response code and headers from the
5381	// server.
5382	googleapi.ServerResponse `json:"-"`
5383
5384	// ForceSendFields is a list of field names (e.g. "Documents") to
5385	// unconditionally include in API requests. By default, fields with
5386	// empty values are omitted from API requests. However, any non-pointer,
5387	// non-interface field appearing in ForceSendFields will be sent to the
5388	// server regardless of whether the field is empty or not. This may be
5389	// used to include empty fields in Patch requests.
5390	ForceSendFields []string `json:"-"`
5391
5392	// NullFields is a list of field names (e.g. "Documents") to include in
5393	// API requests with the JSON null value. By default, fields with empty
5394	// values are omitted from API requests. However, any field with an
5395	// empty value appearing in NullFields will be sent to the server as
5396	// null. It is an error if a field in this list has a non-empty value.
5397	// This may be used to include null fields in Patch requests.
5398	NullFields []string `json:"-"`
5399}
5400
5401func (s *GoogleCloudDialogflowV2beta1ListDocumentsResponse) MarshalJSON() ([]byte, error) {
5402	type NoMethod GoogleCloudDialogflowV2beta1ListDocumentsResponse
5403	raw := NoMethod(*s)
5404	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5405}
5406
5407// GoogleCloudDialogflowV2beta1ListEntityTypesResponse: The response
5408// message for EntityTypes.ListEntityTypes.
5409type GoogleCloudDialogflowV2beta1ListEntityTypesResponse struct {
5410	// EntityTypes: The list of agent entity types. There will be a maximum
5411	// number of items
5412	// returned based on the page_size field in the request.
5413	EntityTypes []*GoogleCloudDialogflowV2beta1EntityType `json:"entityTypes,omitempty"`
5414
5415	// NextPageToken: Token to retrieve the next page of results, or empty
5416	// if there are no
5417	// more results in the list.
5418	NextPageToken string `json:"nextPageToken,omitempty"`
5419
5420	// ServerResponse contains the HTTP response code and headers from the
5421	// server.
5422	googleapi.ServerResponse `json:"-"`
5423
5424	// ForceSendFields is a list of field names (e.g. "EntityTypes") to
5425	// unconditionally include in API requests. By default, fields with
5426	// empty values are omitted from API requests. However, any non-pointer,
5427	// non-interface field appearing in ForceSendFields will be sent to the
5428	// server regardless of whether the field is empty or not. This may be
5429	// used to include empty fields in Patch requests.
5430	ForceSendFields []string `json:"-"`
5431
5432	// NullFields is a list of field names (e.g. "EntityTypes") to include
5433	// in API requests with the JSON null value. By default, fields with
5434	// empty values are omitted from API requests. However, any field with
5435	// an empty value appearing in NullFields will be sent to the server as
5436	// null. It is an error if a field in this list has a non-empty value.
5437	// This may be used to include null fields in Patch requests.
5438	NullFields []string `json:"-"`
5439}
5440
5441func (s *GoogleCloudDialogflowV2beta1ListEntityTypesResponse) MarshalJSON() ([]byte, error) {
5442	type NoMethod GoogleCloudDialogflowV2beta1ListEntityTypesResponse
5443	raw := NoMethod(*s)
5444	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5445}
5446
5447// GoogleCloudDialogflowV2beta1ListIntentsResponse: The response message
5448// for Intents.ListIntents.
5449type GoogleCloudDialogflowV2beta1ListIntentsResponse struct {
5450	// Intents: The list of agent intents. There will be a maximum number of
5451	// items
5452	// returned based on the page_size field in the request.
5453	Intents []*GoogleCloudDialogflowV2beta1Intent `json:"intents,omitempty"`
5454
5455	// NextPageToken: Token to retrieve the next page of results, or empty
5456	// if there are no
5457	// more results in the list.
5458	NextPageToken string `json:"nextPageToken,omitempty"`
5459
5460	// ServerResponse contains the HTTP response code and headers from the
5461	// server.
5462	googleapi.ServerResponse `json:"-"`
5463
5464	// ForceSendFields is a list of field names (e.g. "Intents") to
5465	// unconditionally include in API requests. By default, fields with
5466	// empty values are omitted from API requests. However, any non-pointer,
5467	// non-interface field appearing in ForceSendFields will be sent to the
5468	// server regardless of whether the field is empty or not. This may be
5469	// used to include empty fields in Patch requests.
5470	ForceSendFields []string `json:"-"`
5471
5472	// NullFields is a list of field names (e.g. "Intents") to include in
5473	// API requests with the JSON null value. By default, fields with empty
5474	// values are omitted from API requests. However, any field with an
5475	// empty value appearing in NullFields will be sent to the server as
5476	// null. It is an error if a field in this list has a non-empty value.
5477	// This may be used to include null fields in Patch requests.
5478	NullFields []string `json:"-"`
5479}
5480
5481func (s *GoogleCloudDialogflowV2beta1ListIntentsResponse) MarshalJSON() ([]byte, error) {
5482	type NoMethod GoogleCloudDialogflowV2beta1ListIntentsResponse
5483	raw := NoMethod(*s)
5484	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5485}
5486
5487// GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse: Response
5488// message for KnowledgeBases.ListKnowledgeBases.
5489type GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse struct {
5490	// KnowledgeBases: The list of knowledge bases.
5491	KnowledgeBases []*GoogleCloudDialogflowV2beta1KnowledgeBase `json:"knowledgeBases,omitempty"`
5492
5493	// NextPageToken: Token to retrieve the next page of results, or empty
5494	// if there are no
5495	// more results in the list.
5496	NextPageToken string `json:"nextPageToken,omitempty"`
5497
5498	// ServerResponse contains the HTTP response code and headers from the
5499	// server.
5500	googleapi.ServerResponse `json:"-"`
5501
5502	// ForceSendFields is a list of field names (e.g. "KnowledgeBases") to
5503	// unconditionally include in API requests. By default, fields with
5504	// empty values are omitted from API requests. However, any non-pointer,
5505	// non-interface field appearing in ForceSendFields will be sent to the
5506	// server regardless of whether the field is empty or not. This may be
5507	// used to include empty fields in Patch requests.
5508	ForceSendFields []string `json:"-"`
5509
5510	// NullFields is a list of field names (e.g. "KnowledgeBases") to
5511	// include in API requests with the JSON null value. By default, fields
5512	// with empty values are omitted from API requests. However, any field
5513	// with an empty value appearing in NullFields will be sent to the
5514	// server as null. It is an error if a field in this list has a
5515	// non-empty value. This may be used to include null fields in Patch
5516	// requests.
5517	NullFields []string `json:"-"`
5518}
5519
5520func (s *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse) MarshalJSON() ([]byte, error) {
5521	type NoMethod GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse
5522	raw := NoMethod(*s)
5523	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5524}
5525
5526// GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse: The
5527// response message for SessionEntityTypes.ListSessionEntityTypes.
5528type GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse struct {
5529	// NextPageToken: Token to retrieve the next page of results, or empty
5530	// if there are no
5531	// more results in the list.
5532	NextPageToken string `json:"nextPageToken,omitempty"`
5533
5534	// SessionEntityTypes: The list of session entity types. There will be a
5535	// maximum number of items
5536	// returned based on the page_size field in the request.
5537	SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"`
5538
5539	// ServerResponse contains the HTTP response code and headers from the
5540	// server.
5541	googleapi.ServerResponse `json:"-"`
5542
5543	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
5544	// unconditionally include in API requests. By default, fields with
5545	// empty values are omitted from API requests. However, any non-pointer,
5546	// non-interface field appearing in ForceSendFields will be sent to the
5547	// server regardless of whether the field is empty or not. This may be
5548	// used to include empty fields in Patch requests.
5549	ForceSendFields []string `json:"-"`
5550
5551	// NullFields is a list of field names (e.g. "NextPageToken") to include
5552	// in API requests with the JSON null value. By default, fields with
5553	// empty values are omitted from API requests. However, any field with
5554	// an empty value appearing in NullFields will be sent to the server as
5555	// null. It is an error if a field in this list has a non-empty value.
5556	// This may be used to include null fields in Patch requests.
5557	NullFields []string `json:"-"`
5558}
5559
5560func (s *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) MarshalJSON() ([]byte, error) {
5561	type NoMethod GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse
5562	raw := NoMethod(*s)
5563	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5564}
5565
5566// GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest: Represents
5567// the contents of the original request that was passed to
5568// the `[Streaming]DetectIntent` call.
5569type GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest struct {
5570	// Payload: Optional. This field is set to the value of the
5571	// `QueryParameters.payload`
5572	// field passed in the request. Some integrations that query a
5573	// Dialogflow
5574	// agent may provide additional information in the payload.
5575	//
5576	// In particular for the Telephony Gateway this field has the
5577	// form:
5578	// <pre>{
5579	//  "telephony": {
5580	//    "caller_id": "+18558363987"
5581	//  }
5582	// }</pre>
5583	// Note: The caller ID field (`caller_id`) will be redacted for
5584	// Standard
5585	// Edition agents and populated with the caller ID in
5586	// [E.164
5587	// format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition
5588	// agents.
5589	Payload googleapi.RawMessage `json:"payload,omitempty"`
5590
5591	// Source: The source of this request, e.g., `google`, `facebook`,
5592	// `slack`. It is set
5593	// by Dialogflow-owned servers.
5594	Source string `json:"source,omitempty"`
5595
5596	// Version: Optional. The version of the protocol used for this
5597	// request.
5598	// This field is AoG-specific.
5599	Version string `json:"version,omitempty"`
5600
5601	// ForceSendFields is a list of field names (e.g. "Payload") to
5602	// unconditionally include in API requests. By default, fields with
5603	// empty values are omitted from API requests. However, any non-pointer,
5604	// non-interface field appearing in ForceSendFields will be sent to the
5605	// server regardless of whether the field is empty or not. This may be
5606	// used to include empty fields in Patch requests.
5607	ForceSendFields []string `json:"-"`
5608
5609	// NullFields is a list of field names (e.g. "Payload") to include in
5610	// API requests with the JSON null value. By default, fields with empty
5611	// values are omitted from API requests. However, any field with an
5612	// empty value appearing in NullFields will be sent to the server as
5613	// null. It is an error if a field in this list has a non-empty value.
5614	// This may be used to include null fields in Patch requests.
5615	NullFields []string `json:"-"`
5616}
5617
5618func (s *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest) MarshalJSON() ([]byte, error) {
5619	type NoMethod GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
5620	raw := NoMethod(*s)
5621	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5622}
5623
5624// GoogleCloudDialogflowV2beta1OutputAudioConfig: Instructs the speech
5625// synthesizer how to generate the output audio content.
5626type GoogleCloudDialogflowV2beta1OutputAudioConfig struct {
5627	// AudioEncoding: Required. Audio encoding of the synthesized audio
5628	// content.
5629	//
5630	// Possible values:
5631	//   "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" - Not specified.
5632	//   "OUTPUT_AUDIO_ENCODING_LINEAR_16" - Uncompressed 16-bit signed
5633	// little-endian samples (Linear PCM).
5634	// Audio content returned as LINEAR16 also contains a WAV header.
5635	//   "OUTPUT_AUDIO_ENCODING_MP3" - MP3 audio.
5636	//   "OUTPUT_AUDIO_ENCODING_OGG_OPUS" - Opus encoded audio wrapped in an
5637	// ogg container. The result will be a
5638	// file which can be played natively on Android, and in browsers (at
5639	// least
5640	// Chrome and Firefox). The quality of the encoding is considerably
5641	// higher
5642	// than MP3 while using approximately the same bitrate.
5643	AudioEncoding string `json:"audioEncoding,omitempty"`
5644
5645	// SampleRateHertz: Optional. The synthesis sample rate (in hertz) for
5646	// this audio. If not
5647	// provided, then the synthesizer will use the default sample rate based
5648	// on
5649	// the audio encoding. If this is different from the voice's natural
5650	// sample
5651	// rate, then the synthesizer will honor this request by converting to
5652	// the
5653	// desired sample rate (which might result in worse audio quality).
5654	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
5655
5656	// SynthesizeSpeechConfig: Optional. Configuration of how speech should
5657	// be synthesized.
5658	SynthesizeSpeechConfig *GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig `json:"synthesizeSpeechConfig,omitempty"`
5659
5660	// ForceSendFields is a list of field names (e.g. "AudioEncoding") to
5661	// unconditionally include in API requests. By default, fields with
5662	// empty values are omitted from API requests. However, any non-pointer,
5663	// non-interface field appearing in ForceSendFields will be sent to the
5664	// server regardless of whether the field is empty or not. This may be
5665	// used to include empty fields in Patch requests.
5666	ForceSendFields []string `json:"-"`
5667
5668	// NullFields is a list of field names (e.g. "AudioEncoding") to include
5669	// in API requests with the JSON null value. By default, fields with
5670	// empty values are omitted from API requests. However, any field with
5671	// an empty value appearing in NullFields will be sent to the server as
5672	// null. It is an error if a field in this list has a non-empty value.
5673	// This may be used to include null fields in Patch requests.
5674	NullFields []string `json:"-"`
5675}
5676
5677func (s *GoogleCloudDialogflowV2beta1OutputAudioConfig) MarshalJSON() ([]byte, error) {
5678	type NoMethod GoogleCloudDialogflowV2beta1OutputAudioConfig
5679	raw := NoMethod(*s)
5680	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5681}
5682
5683// GoogleCloudDialogflowV2beta1QueryInput: Represents the query input.
5684// It can contain either:
5685//
5686// 1.  An audio config which
5687//     instructs the speech recognizer how to process the speech
5688// audio.
5689//
5690// 2.  A conversational query in the form of text.
5691//
5692// 3.  An event that specifies which intent to trigger.
5693type GoogleCloudDialogflowV2beta1QueryInput struct {
5694	// AudioConfig: Instructs the speech recognizer how to process the
5695	// speech audio.
5696	AudioConfig *GoogleCloudDialogflowV2beta1InputAudioConfig `json:"audioConfig,omitempty"`
5697
5698	// Event: The event to be processed.
5699	Event *GoogleCloudDialogflowV2beta1EventInput `json:"event,omitempty"`
5700
5701	// Text: The natural language text to be processed.
5702	Text *GoogleCloudDialogflowV2beta1TextInput `json:"text,omitempty"`
5703
5704	// ForceSendFields is a list of field names (e.g. "AudioConfig") to
5705	// unconditionally include in API requests. By default, fields with
5706	// empty values are omitted from API requests. However, any non-pointer,
5707	// non-interface field appearing in ForceSendFields will be sent to the
5708	// server regardless of whether the field is empty or not. This may be
5709	// used to include empty fields in Patch requests.
5710	ForceSendFields []string `json:"-"`
5711
5712	// NullFields is a list of field names (e.g. "AudioConfig") to include
5713	// in API requests with the JSON null value. By default, fields with
5714	// empty values are omitted from API requests. However, any field with
5715	// an empty value appearing in NullFields will be sent to the server as
5716	// null. It is an error if a field in this list has a non-empty value.
5717	// This may be used to include null fields in Patch requests.
5718	NullFields []string `json:"-"`
5719}
5720
5721func (s *GoogleCloudDialogflowV2beta1QueryInput) MarshalJSON() ([]byte, error) {
5722	type NoMethod GoogleCloudDialogflowV2beta1QueryInput
5723	raw := NoMethod(*s)
5724	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5725}
5726
5727// GoogleCloudDialogflowV2beta1QueryParameters: Represents the
5728// parameters of the conversational query.
5729type GoogleCloudDialogflowV2beta1QueryParameters struct {
5730	// Contexts: Optional. The collection of contexts to be activated before
5731	// this query is
5732	// executed.
5733	Contexts []*GoogleCloudDialogflowV2beta1Context `json:"contexts,omitempty"`
5734
5735	// GeoLocation: Optional. The geo location of this conversational query.
5736	GeoLocation *GoogleTypeLatLng `json:"geoLocation,omitempty"`
5737
5738	// KnowledgeBaseNames: Optional. KnowledgeBases to get alternative
5739	// results from. If not set, the
5740	// KnowledgeBases enabled in the agent (through UI) will be
5741	// used.
5742	// Format:  `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
5743	KnowledgeBaseNames []string `json:"knowledgeBaseNames,omitempty"`
5744
5745	// Payload: Optional. This field can be used to pass custom data into
5746	// the webhook
5747	// associated with the agent. Arbitrary JSON objects are supported.
5748	Payload googleapi.RawMessage `json:"payload,omitempty"`
5749
5750	// ResetContexts: Optional. Specifies whether to delete all contexts in
5751	// the current session
5752	// before the new ones are activated.
5753	ResetContexts bool `json:"resetContexts,omitempty"`
5754
5755	// SentimentAnalysisRequestConfig: Optional. Configures the type of
5756	// sentiment analysis to perform. If not
5757	// provided, sentiment analysis is not performed.
5758	// Note: Sentiment Analysis is only currently available for Enterprise
5759	// Edition
5760	// agents.
5761	SentimentAnalysisRequestConfig *GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig `json:"sentimentAnalysisRequestConfig,omitempty"`
5762
5763	// SessionEntityTypes: Optional. Additional session entity types to
5764	// replace or extend developer
5765	// entity types with. The entity synonyms apply to all languages and
5766	// persist
5767	// for the session of this query.
5768	SessionEntityTypes []*GoogleCloudDialogflowV2beta1SessionEntityType `json:"sessionEntityTypes,omitempty"`
5769
5770	// TimeZone: Optional. The time zone of this conversational query from
5771	// the
5772	// [time zone database](https://www.iana.org/time-zones),
5773	// e.g.,
5774	// America/New_York, Europe/Paris. If not provided, the time zone
5775	// specified in
5776	// agent settings is used.
5777	TimeZone string `json:"timeZone,omitempty"`
5778
5779	// ForceSendFields is a list of field names (e.g. "Contexts") to
5780	// unconditionally include in API requests. By default, fields with
5781	// empty values are omitted from API requests. However, any non-pointer,
5782	// non-interface field appearing in ForceSendFields will be sent to the
5783	// server regardless of whether the field is empty or not. This may be
5784	// used to include empty fields in Patch requests.
5785	ForceSendFields []string `json:"-"`
5786
5787	// NullFields is a list of field names (e.g. "Contexts") to include in
5788	// API requests with the JSON null value. By default, fields with empty
5789	// values are omitted from API requests. However, any field with an
5790	// empty value appearing in NullFields will be sent to the server as
5791	// null. It is an error if a field in this list has a non-empty value.
5792	// This may be used to include null fields in Patch requests.
5793	NullFields []string `json:"-"`
5794}
5795
5796func (s *GoogleCloudDialogflowV2beta1QueryParameters) MarshalJSON() ([]byte, error) {
5797	type NoMethod GoogleCloudDialogflowV2beta1QueryParameters
5798	raw := NoMethod(*s)
5799	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5800}
5801
5802// GoogleCloudDialogflowV2beta1QueryResult: Represents the result of
5803// conversational query or event processing.
5804type GoogleCloudDialogflowV2beta1QueryResult struct {
5805	// Action: The action name from the matched intent.
5806	Action string `json:"action,omitempty"`
5807
5808	// AllRequiredParamsPresent: This field is set to:
5809	//
5810	// - `false` if the matched intent has required parameters and not all
5811	// of
5812	//    the required parameter values have been collected.
5813	// - `true` if all required parameter values have been collected, or if
5814	// the
5815	//    matched intent doesn't contain any required parameters.
5816	AllRequiredParamsPresent bool `json:"allRequiredParamsPresent,omitempty"`
5817
5818	// DiagnosticInfo: The free-form diagnostic info. For example, this
5819	// field could contain
5820	// webhook call latency. The string keys of the Struct's fields map can
5821	// change
5822	// without notice.
5823	DiagnosticInfo googleapi.RawMessage `json:"diagnosticInfo,omitempty"`
5824
5825	// FulfillmentMessages: The collection of rich messages to present to
5826	// the user.
5827	FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"`
5828
5829	// FulfillmentText: The text to be pronounced to the user or shown on
5830	// the screen.
5831	// Note: This is a legacy field, `fulfillment_messages` should be
5832	// preferred.
5833	FulfillmentText string `json:"fulfillmentText,omitempty"`
5834
5835	// Intent: The intent that matched the conversational query. Some,
5836	// not
5837	// all fields are filled in this message, including but not limited
5838	// to:
5839	// `name`, `display_name` and `webhook_state`.
5840	Intent *GoogleCloudDialogflowV2beta1Intent `json:"intent,omitempty"`
5841
5842	// IntentDetectionConfidence: The intent detection confidence. Values
5843	// range from 0.0
5844	// (completely uncertain) to 1.0 (completely certain).
5845	// If there are `multiple knowledge_answers` messages, this value is set
5846	// to
5847	// the greatest `knowledgeAnswers.match_confidence` value in the list.
5848	IntentDetectionConfidence float64 `json:"intentDetectionConfidence,omitempty"`
5849
5850	// KnowledgeAnswers: The result from Knowledge Connector (if any),
5851	// ordered by decreasing
5852	// `KnowledgeAnswers.match_confidence`.
5853	KnowledgeAnswers *GoogleCloudDialogflowV2beta1KnowledgeAnswers `json:"knowledgeAnswers,omitempty"`
5854
5855	// LanguageCode: The language that was triggered during intent
5856	// detection.
5857	// See
5858	// [Language
5859	// Support](https://cloud.google.com/dialogflow/docs/reference/
5860	// language)
5861	// for a list of the currently supported language codes.
5862	LanguageCode string `json:"languageCode,omitempty"`
5863
5864	// OutputContexts: The collection of output contexts. If
5865	// applicable,
5866	// `output_contexts.parameters` contains entries with name
5867	// `<parameter name>.original` containing the original parameter
5868	// values
5869	// before the query.
5870	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
5871
5872	// Parameters: The collection of extracted parameters.
5873	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
5874
5875	// QueryText: The original conversational query text:
5876	//
5877	// - If natural language text was provided as input, `query_text`
5878	// contains
5879	//   a copy of the input.
5880	// - If natural language speech audio was provided as input,
5881	// `query_text`
5882	//   contains the speech recognition result. If speech recognizer
5883	// produced
5884	//   multiple alternatives, a particular one is picked.
5885	// - If automatic spell correction is enabled, `query_text` will contain
5886	// the
5887	//   corrected user input.
5888	QueryText string `json:"queryText,omitempty"`
5889
5890	// SentimentAnalysisResult: The sentiment analysis result, which depends
5891	// on the
5892	// `sentiment_analysis_request_config` specified in the request.
5893	SentimentAnalysisResult *GoogleCloudDialogflowV2beta1SentimentAnalysisResult `json:"sentimentAnalysisResult,omitempty"`
5894
5895	// SpeechRecognitionConfidence: The Speech recognition confidence
5896	// between 0.0 and 1.0. A higher number
5897	// indicates an estimated greater likelihood that the recognized words
5898	// are
5899	// correct. The default of 0.0 is a sentinel value indicating that
5900	// confidence
5901	// was not set.
5902	//
5903	// This field is not guaranteed to be accurate or set. In particular
5904	// this
5905	// field isn't set for StreamingDetectIntent since the streaming
5906	// endpoint has
5907	// separate confidence estimates per portion of the audio
5908	// in
5909	// StreamingRecognitionResult.
5910	SpeechRecognitionConfidence float64 `json:"speechRecognitionConfidence,omitempty"`
5911
5912	// WebhookPayload: If the query was fulfilled by a webhook call, this
5913	// field is set to the
5914	// value of the `payload` field returned in the webhook response.
5915	WebhookPayload googleapi.RawMessage `json:"webhookPayload,omitempty"`
5916
5917	// WebhookSource: If the query was fulfilled by a webhook call, this
5918	// field is set to the
5919	// value of the `source` field returned in the webhook response.
5920	WebhookSource string `json:"webhookSource,omitempty"`
5921
5922	// ForceSendFields is a list of field names (e.g. "Action") to
5923	// unconditionally include in API requests. By default, fields with
5924	// empty values are omitted from API requests. However, any non-pointer,
5925	// non-interface field appearing in ForceSendFields will be sent to the
5926	// server regardless of whether the field is empty or not. This may be
5927	// used to include empty fields in Patch requests.
5928	ForceSendFields []string `json:"-"`
5929
5930	// NullFields is a list of field names (e.g. "Action") to include in API
5931	// requests with the JSON null value. By default, fields with empty
5932	// values are omitted from API requests. However, any field with an
5933	// empty value appearing in NullFields will be sent to the server as
5934	// null. It is an error if a field in this list has a non-empty value.
5935	// This may be used to include null fields in Patch requests.
5936	NullFields []string `json:"-"`
5937}
5938
5939func (s *GoogleCloudDialogflowV2beta1QueryResult) MarshalJSON() ([]byte, error) {
5940	type NoMethod GoogleCloudDialogflowV2beta1QueryResult
5941	raw := NoMethod(*s)
5942	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5943}
5944
5945func (s *GoogleCloudDialogflowV2beta1QueryResult) UnmarshalJSON(data []byte) error {
5946	type NoMethod GoogleCloudDialogflowV2beta1QueryResult
5947	var s1 struct {
5948		IntentDetectionConfidence   gensupport.JSONFloat64 `json:"intentDetectionConfidence"`
5949		SpeechRecognitionConfidence gensupport.JSONFloat64 `json:"speechRecognitionConfidence"`
5950		*NoMethod
5951	}
5952	s1.NoMethod = (*NoMethod)(s)
5953	if err := json.Unmarshal(data, &s1); err != nil {
5954		return err
5955	}
5956	s.IntentDetectionConfidence = float64(s1.IntentDetectionConfidence)
5957	s.SpeechRecognitionConfidence = float64(s1.SpeechRecognitionConfidence)
5958	return nil
5959}
5960
5961// GoogleCloudDialogflowV2beta1ReloadDocumentRequest: Request message
5962// for Documents.ReloadDocument.
5963type GoogleCloudDialogflowV2beta1ReloadDocumentRequest struct {
5964}
5965
5966// GoogleCloudDialogflowV2beta1RestoreAgentRequest: The request message
5967// for Agents.RestoreAgent.
5968type GoogleCloudDialogflowV2beta1RestoreAgentRequest struct {
5969	// AgentContent: The agent to restore.
5970	//
5971	// Example for how to restore an agent via the command line:
5972	// <pre>curl \
5973	//
5974	// 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&g
5975	// t;/agent:restore\
5976	//    -X POST \
5977	//    -H 'Authorization: Bearer '$(gcloud auth application-default
5978	//    print-access-token) \
5979	//    -H 'Accept: application/json' \
5980	//    -H 'Content-Type: application/json' \
5981	//    --compressed \
5982	//    --data-binary "{
5983	//        'agentContent': '$(cat &lt;agent zip file&gt; | base64 -w 0)'
5984	//    }"</pre>
5985	AgentContent string `json:"agentContent,omitempty"`
5986
5987	// AgentUri: The URI to a Google Cloud Storage file containing the agent
5988	// to restore.
5989	// Note: The URI must start with "gs://".
5990	AgentUri string `json:"agentUri,omitempty"`
5991
5992	// ForceSendFields is a list of field names (e.g. "AgentContent") to
5993	// unconditionally include in API requests. By default, fields with
5994	// empty values are omitted from API requests. However, any non-pointer,
5995	// non-interface field appearing in ForceSendFields will be sent to the
5996	// server regardless of whether the field is empty or not. This may be
5997	// used to include empty fields in Patch requests.
5998	ForceSendFields []string `json:"-"`
5999
6000	// NullFields is a list of field names (e.g. "AgentContent") to include
6001	// in API requests with the JSON null value. By default, fields with
6002	// empty values are omitted from API requests. However, any field with
6003	// an empty value appearing in NullFields will be sent to the server as
6004	// null. It is an error if a field in this list has a non-empty value.
6005	// This may be used to include null fields in Patch requests.
6006	NullFields []string `json:"-"`
6007}
6008
6009func (s *GoogleCloudDialogflowV2beta1RestoreAgentRequest) MarshalJSON() ([]byte, error) {
6010	type NoMethod GoogleCloudDialogflowV2beta1RestoreAgentRequest
6011	raw := NoMethod(*s)
6012	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6013}
6014
6015// GoogleCloudDialogflowV2beta1SearchAgentsResponse: The response
6016// message for Agents.SearchAgents.
6017type GoogleCloudDialogflowV2beta1SearchAgentsResponse struct {
6018	// Agents: The list of agents. There will be a maximum number of items
6019	// returned based
6020	// on the page_size field in the request.
6021	Agents []*GoogleCloudDialogflowV2beta1Agent `json:"agents,omitempty"`
6022
6023	// NextPageToken: Token to retrieve the next page of results, or empty
6024	// if there are no
6025	// more results in the list.
6026	NextPageToken string `json:"nextPageToken,omitempty"`
6027
6028	// ServerResponse contains the HTTP response code and headers from the
6029	// server.
6030	googleapi.ServerResponse `json:"-"`
6031
6032	// ForceSendFields is a list of field names (e.g. "Agents") to
6033	// unconditionally include in API requests. By default, fields with
6034	// empty values are omitted from API requests. However, any non-pointer,
6035	// non-interface field appearing in ForceSendFields will be sent to the
6036	// server regardless of whether the field is empty or not. This may be
6037	// used to include empty fields in Patch requests.
6038	ForceSendFields []string `json:"-"`
6039
6040	// NullFields is a list of field names (e.g. "Agents") to include in API
6041	// requests with the JSON null value. By default, fields with empty
6042	// values are omitted from API requests. However, any field with an
6043	// empty value appearing in NullFields will be sent to the server as
6044	// null. It is an error if a field in this list has a non-empty value.
6045	// This may be used to include null fields in Patch requests.
6046	NullFields []string `json:"-"`
6047}
6048
6049func (s *GoogleCloudDialogflowV2beta1SearchAgentsResponse) MarshalJSON() ([]byte, error) {
6050	type NoMethod GoogleCloudDialogflowV2beta1SearchAgentsResponse
6051	raw := NoMethod(*s)
6052	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6053}
6054
6055// GoogleCloudDialogflowV2beta1Sentiment: The sentiment, such as
6056// positive/negative feeling or association, for a unit
6057// of analysis, such as the query text.
6058type GoogleCloudDialogflowV2beta1Sentiment struct {
6059	// Magnitude: A non-negative number in the [0, +inf) range, which
6060	// represents the absolute
6061	// magnitude of sentiment, regardless of score (positive or negative).
6062	Magnitude float64 `json:"magnitude,omitempty"`
6063
6064	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0
6065	// (positive
6066	// sentiment).
6067	Score float64 `json:"score,omitempty"`
6068
6069	// ForceSendFields is a list of field names (e.g. "Magnitude") to
6070	// unconditionally include in API requests. By default, fields with
6071	// empty values are omitted from API requests. However, any non-pointer,
6072	// non-interface field appearing in ForceSendFields will be sent to the
6073	// server regardless of whether the field is empty or not. This may be
6074	// used to include empty fields in Patch requests.
6075	ForceSendFields []string `json:"-"`
6076
6077	// NullFields is a list of field names (e.g. "Magnitude") to include in
6078	// API requests with the JSON null value. By default, fields with empty
6079	// values are omitted from API requests. However, any field with an
6080	// empty value appearing in NullFields will be sent to the server as
6081	// null. It is an error if a field in this list has a non-empty value.
6082	// This may be used to include null fields in Patch requests.
6083	NullFields []string `json:"-"`
6084}
6085
6086func (s *GoogleCloudDialogflowV2beta1Sentiment) MarshalJSON() ([]byte, error) {
6087	type NoMethod GoogleCloudDialogflowV2beta1Sentiment
6088	raw := NoMethod(*s)
6089	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6090}
6091
6092func (s *GoogleCloudDialogflowV2beta1Sentiment) UnmarshalJSON(data []byte) error {
6093	type NoMethod GoogleCloudDialogflowV2beta1Sentiment
6094	var s1 struct {
6095		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
6096		Score     gensupport.JSONFloat64 `json:"score"`
6097		*NoMethod
6098	}
6099	s1.NoMethod = (*NoMethod)(s)
6100	if err := json.Unmarshal(data, &s1); err != nil {
6101		return err
6102	}
6103	s.Magnitude = float64(s1.Magnitude)
6104	s.Score = float64(s1.Score)
6105	return nil
6106}
6107
6108// GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig:
6109// Configures the types of sentiment analysis to perform.
6110type GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig struct {
6111	// AnalyzeQueryTextSentiment: Optional. Instructs the service to perform
6112	// sentiment analysis on
6113	// `query_text`. If not provided, sentiment analysis is not performed
6114	// on
6115	// `query_text`.
6116	AnalyzeQueryTextSentiment bool `json:"analyzeQueryTextSentiment,omitempty"`
6117
6118	// ForceSendFields is a list of field names (e.g.
6119	// "AnalyzeQueryTextSentiment") to unconditionally include in API
6120	// requests. By default, fields with empty values are omitted from API
6121	// requests. However, any non-pointer, non-interface field appearing in
6122	// ForceSendFields will be sent to the server regardless of whether the
6123	// field is empty or not. This may be used to include empty fields in
6124	// Patch requests.
6125	ForceSendFields []string `json:"-"`
6126
6127	// NullFields is a list of field names (e.g.
6128	// "AnalyzeQueryTextSentiment") to include in API requests with the JSON
6129	// null value. By default, fields with empty values are omitted from API
6130	// requests. However, any field with an empty value appearing in
6131	// NullFields will be sent to the server as null. It is an error if a
6132	// field in this list has a non-empty value. This may be used to include
6133	// null fields in Patch requests.
6134	NullFields []string `json:"-"`
6135}
6136
6137func (s *GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig) MarshalJSON() ([]byte, error) {
6138	type NoMethod GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig
6139	raw := NoMethod(*s)
6140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6141}
6142
6143// GoogleCloudDialogflowV2beta1SentimentAnalysisResult: The result of
6144// sentiment analysis as configured
6145// by
6146// `sentiment_analysis_request_config`.
6147type GoogleCloudDialogflowV2beta1SentimentAnalysisResult struct {
6148	// QueryTextSentiment: The sentiment analysis result for `query_text`.
6149	QueryTextSentiment *GoogleCloudDialogflowV2beta1Sentiment `json:"queryTextSentiment,omitempty"`
6150
6151	// ForceSendFields is a list of field names (e.g. "QueryTextSentiment")
6152	// to unconditionally include in API requests. By default, fields with
6153	// empty values are omitted from API requests. However, any non-pointer,
6154	// non-interface field appearing in ForceSendFields will be sent to the
6155	// server regardless of whether the field is empty or not. This may be
6156	// used to include empty fields in Patch requests.
6157	ForceSendFields []string `json:"-"`
6158
6159	// NullFields is a list of field names (e.g. "QueryTextSentiment") to
6160	// include in API requests with the JSON null value. By default, fields
6161	// with empty values are omitted from API requests. However, any field
6162	// with an empty value appearing in NullFields will be sent to the
6163	// server as null. It is an error if a field in this list has a
6164	// non-empty value. This may be used to include null fields in Patch
6165	// requests.
6166	NullFields []string `json:"-"`
6167}
6168
6169func (s *GoogleCloudDialogflowV2beta1SentimentAnalysisResult) MarshalJSON() ([]byte, error) {
6170	type NoMethod GoogleCloudDialogflowV2beta1SentimentAnalysisResult
6171	raw := NoMethod(*s)
6172	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6173}
6174
6175// GoogleCloudDialogflowV2beta1SessionEntityType: Represents a session
6176// entity type.
6177//
6178// Extends or replaces a developer entity type at the user session level
6179// (we
6180// refer to the entity types defined at the agent level as "developer
6181// entity
6182// types").
6183//
6184// Note: session entity types apply to all queries, regardless of the
6185// language.
6186type GoogleCloudDialogflowV2beta1SessionEntityType struct {
6187	// Entities: Required. The collection of entities associated with this
6188	// session entity
6189	// type.
6190	Entities []*GoogleCloudDialogflowV2beta1EntityTypeEntity `json:"entities,omitempty"`
6191
6192	// EntityOverrideMode: Required. Indicates whether the additional data
6193	// should override or
6194	// supplement the developer entity type definition.
6195	//
6196	// Possible values:
6197	//   "ENTITY_OVERRIDE_MODE_UNSPECIFIED" - Not specified. This value
6198	// should be never used.
6199	//   "ENTITY_OVERRIDE_MODE_OVERRIDE" - The collection of session
6200	// entities overrides the collection of entities
6201	// in the corresponding developer entity type.
6202	//   "ENTITY_OVERRIDE_MODE_SUPPLEMENT" - The collection of session
6203	// entities extends the collection of entities in
6204	// the corresponding developer entity type.
6205	//
6206	// Note: Even in this override mode calls to
6207	// `ListSessionEntityTypes`,
6208	// `GetSessionEntityType`, `CreateSessionEntityType`
6209	// and
6210	// `UpdateSessionEntityType` only return the additional entities added
6211	// in
6212	// this session entity type. If you want to get the supplemented
6213	// list,
6214	// please call EntityTypes.GetEntityType on the developer entity
6215	// type
6216	// and merge.
6217	EntityOverrideMode string `json:"entityOverrideMode,omitempty"`
6218
6219	// Name: Required. The unique identifier of this session entity type.
6220	// Format:
6221	// `projects/<Project ID>/agent/sessions/<Session
6222	// ID>/entityTypes/<Entity Type
6223	// Display Name>`, or
6224	// `projects/<Project ID>/agent/environments/<Environment
6225	// ID>/users/<User
6226	// ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`.
6227	// If `Environment ID` is not specified, we assume default
6228	// 'draft'
6229	// environment. If `User ID` is not specified, we assume default '-'
6230	// user.
6231	//
6232	// `<Entity Type Display Name>` must be the display name of an existing
6233	// entity
6234	// type in the same agent that will be overridden or supplemented.
6235	Name string `json:"name,omitempty"`
6236
6237	// ServerResponse contains the HTTP response code and headers from the
6238	// server.
6239	googleapi.ServerResponse `json:"-"`
6240
6241	// ForceSendFields is a list of field names (e.g. "Entities") to
6242	// unconditionally include in API requests. By default, fields with
6243	// empty values are omitted from API requests. However, any non-pointer,
6244	// non-interface field appearing in ForceSendFields will be sent to the
6245	// server regardless of whether the field is empty or not. This may be
6246	// used to include empty fields in Patch requests.
6247	ForceSendFields []string `json:"-"`
6248
6249	// NullFields is a list of field names (e.g. "Entities") to include in
6250	// API requests with the JSON null value. By default, fields with empty
6251	// values are omitted from API requests. However, any field with an
6252	// empty value appearing in NullFields will be sent to the server as
6253	// null. It is an error if a field in this list has a non-empty value.
6254	// This may be used to include null fields in Patch requests.
6255	NullFields []string `json:"-"`
6256}
6257
6258func (s *GoogleCloudDialogflowV2beta1SessionEntityType) MarshalJSON() ([]byte, error) {
6259	type NoMethod GoogleCloudDialogflowV2beta1SessionEntityType
6260	raw := NoMethod(*s)
6261	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6262}
6263
6264// GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig: Configuration of
6265// how speech should be synthesized.
6266type GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig struct {
6267	// EffectsProfileId: Optional. An identifier which selects 'audio
6268	// effects' profiles that are
6269	// applied on (post synthesized) text to speech. Effects are applied on
6270	// top of
6271	// each other in the order they are given.
6272	EffectsProfileId []string `json:"effectsProfileId,omitempty"`
6273
6274	// Pitch: Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means
6275	// increase 20
6276	// semitones from the original pitch. -20 means decrease 20 semitones
6277	// from the
6278	// original pitch.
6279	Pitch float64 `json:"pitch,omitempty"`
6280
6281	// SpeakingRate: Optional. Speaking rate/speed, in the range [0.25,
6282	// 4.0]. 1.0 is the normal
6283	// native speed supported by the specific voice. 2.0 is twice as fast,
6284	// and
6285	// 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed.
6286	// Any
6287	// other values < 0.25 or > 4.0 will return an error.
6288	SpeakingRate float64 `json:"speakingRate,omitempty"`
6289
6290	// Voice: Optional. The desired voice of the synthesized audio.
6291	Voice *GoogleCloudDialogflowV2beta1VoiceSelectionParams `json:"voice,omitempty"`
6292
6293	// VolumeGainDb: Optional. Volume gain (in dB) of the normal native
6294	// volume supported by the
6295	// specific voice, in the range [-96.0, 16.0]. If unset, or set to a
6296	// value of
6297	// 0.0 (dB), will play at normal native signal amplitude. A value of
6298	// -6.0 (dB)
6299	// will play at approximately half the amplitude of the normal native
6300	// signal
6301	// amplitude. A value of +6.0 (dB) will play at approximately twice
6302	// the
6303	// amplitude of the normal native signal amplitude. We strongly
6304	// recommend not
6305	// to exceed +10 (dB) as there's usually no effective increase in
6306	// loudness for
6307	// any value greater than that.
6308	VolumeGainDb float64 `json:"volumeGainDb,omitempty"`
6309
6310	// ForceSendFields is a list of field names (e.g. "EffectsProfileId") to
6311	// unconditionally include in API requests. By default, fields with
6312	// empty values are omitted from API requests. However, any non-pointer,
6313	// non-interface field appearing in ForceSendFields will be sent to the
6314	// server regardless of whether the field is empty or not. This may be
6315	// used to include empty fields in Patch requests.
6316	ForceSendFields []string `json:"-"`
6317
6318	// NullFields is a list of field names (e.g. "EffectsProfileId") to
6319	// include in API requests with the JSON null value. By default, fields
6320	// with empty values are omitted from API requests. However, any field
6321	// with an empty value appearing in NullFields will be sent to the
6322	// server as null. It is an error if a field in this list has a
6323	// non-empty value. This may be used to include null fields in Patch
6324	// requests.
6325	NullFields []string `json:"-"`
6326}
6327
6328func (s *GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig) MarshalJSON() ([]byte, error) {
6329	type NoMethod GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig
6330	raw := NoMethod(*s)
6331	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6332}
6333
6334func (s *GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig) UnmarshalJSON(data []byte) error {
6335	type NoMethod GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig
6336	var s1 struct {
6337		Pitch        gensupport.JSONFloat64 `json:"pitch"`
6338		SpeakingRate gensupport.JSONFloat64 `json:"speakingRate"`
6339		VolumeGainDb gensupport.JSONFloat64 `json:"volumeGainDb"`
6340		*NoMethod
6341	}
6342	s1.NoMethod = (*NoMethod)(s)
6343	if err := json.Unmarshal(data, &s1); err != nil {
6344		return err
6345	}
6346	s.Pitch = float64(s1.Pitch)
6347	s.SpeakingRate = float64(s1.SpeakingRate)
6348	s.VolumeGainDb = float64(s1.VolumeGainDb)
6349	return nil
6350}
6351
6352// GoogleCloudDialogflowV2beta1TextInput: Represents the natural
6353// language text to be processed.
6354type GoogleCloudDialogflowV2beta1TextInput struct {
6355	// LanguageCode: Required. The language of this conversational query.
6356	// See
6357	// [Language
6358	// Support](https://cloud.google.com/dialogflow/docs/reference/
6359	// language)
6360	// for a list of the currently supported language codes. Note that
6361	// queries in
6362	// the same session do not necessarily need to specify the same
6363	// language.
6364	LanguageCode string `json:"languageCode,omitempty"`
6365
6366	// Text: Required. The UTF-8 encoded natural language text to be
6367	// processed.
6368	// Text length must not exceed 256 characters.
6369	Text string `json:"text,omitempty"`
6370
6371	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
6372	// unconditionally include in API requests. By default, fields with
6373	// empty values are omitted from API requests. However, any non-pointer,
6374	// non-interface field appearing in ForceSendFields will be sent to the
6375	// server regardless of whether the field is empty or not. This may be
6376	// used to include empty fields in Patch requests.
6377	ForceSendFields []string `json:"-"`
6378
6379	// NullFields is a list of field names (e.g. "LanguageCode") to include
6380	// in API requests with the JSON null value. By default, fields with
6381	// empty values are omitted from API requests. However, any field with
6382	// an empty value appearing in NullFields will be sent to the server as
6383	// null. It is an error if a field in this list has a non-empty value.
6384	// This may be used to include null fields in Patch requests.
6385	NullFields []string `json:"-"`
6386}
6387
6388func (s *GoogleCloudDialogflowV2beta1TextInput) MarshalJSON() ([]byte, error) {
6389	type NoMethod GoogleCloudDialogflowV2beta1TextInput
6390	raw := NoMethod(*s)
6391	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6392}
6393
6394// GoogleCloudDialogflowV2beta1TrainAgentRequest: The request message
6395// for Agents.TrainAgent.
6396type GoogleCloudDialogflowV2beta1TrainAgentRequest struct {
6397}
6398
6399// GoogleCloudDialogflowV2beta1VoiceSelectionParams: Description of
6400// which voice to use for speech synthesis.
6401type GoogleCloudDialogflowV2beta1VoiceSelectionParams struct {
6402	// Name: Optional. The name of the voice. If not set, the service will
6403	// choose a
6404	// voice based on the other parameters such as language_code and gender.
6405	Name string `json:"name,omitempty"`
6406
6407	// SsmlGender: Optional. The preferred gender of the voice. If not set,
6408	// the service will
6409	// choose a voice based on the other parameters such as language_code
6410	// and
6411	// name. Note that this is only a preference, not requirement. If
6412	// a
6413	// voice of the appropriate gender is not available, the synthesizer
6414	// should
6415	// substitute a voice with a different gender rather than failing the
6416	// request.
6417	//
6418	// Possible values:
6419	//   "SSML_VOICE_GENDER_UNSPECIFIED" - An unspecified gender, which
6420	// means that the client doesn't care which
6421	// gender the selected voice will have.
6422	//   "SSML_VOICE_GENDER_MALE" - A male voice.
6423	//   "SSML_VOICE_GENDER_FEMALE" - A female voice.
6424	//   "SSML_VOICE_GENDER_NEUTRAL" - A gender-neutral voice.
6425	SsmlGender string `json:"ssmlGender,omitempty"`
6426
6427	// ForceSendFields is a list of field names (e.g. "Name") to
6428	// unconditionally include in API requests. By default, fields with
6429	// empty values are omitted from API requests. However, any non-pointer,
6430	// non-interface field appearing in ForceSendFields will be sent to the
6431	// server regardless of whether the field is empty or not. This may be
6432	// used to include empty fields in Patch requests.
6433	ForceSendFields []string `json:"-"`
6434
6435	// NullFields is a list of field names (e.g. "Name") to include in API
6436	// requests with the JSON null value. By default, fields with empty
6437	// values are omitted from API requests. However, any field with an
6438	// empty value appearing in NullFields will be sent to the server as
6439	// null. It is an error if a field in this list has a non-empty value.
6440	// This may be used to include null fields in Patch requests.
6441	NullFields []string `json:"-"`
6442}
6443
6444func (s *GoogleCloudDialogflowV2beta1VoiceSelectionParams) MarshalJSON() ([]byte, error) {
6445	type NoMethod GoogleCloudDialogflowV2beta1VoiceSelectionParams
6446	raw := NoMethod(*s)
6447	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6448}
6449
6450// GoogleCloudDialogflowV2beta1WebhookRequest: The request message for a
6451// webhook call.
6452type GoogleCloudDialogflowV2beta1WebhookRequest struct {
6453	// AlternativeQueryResults: Alternative query results from
6454	// KnowledgeService.
6455	AlternativeQueryResults []*GoogleCloudDialogflowV2beta1QueryResult `json:"alternativeQueryResults,omitempty"`
6456
6457	// OriginalDetectIntentRequest: Optional. The contents of the original
6458	// request that was passed to
6459	// `[Streaming]DetectIntent` call.
6460	OriginalDetectIntentRequest *GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest `json:"originalDetectIntentRequest,omitempty"`
6461
6462	// QueryResult: The result of the conversational query or event
6463	// processing. Contains the
6464	// same value as `[Streaming]DetectIntentResponse.query_result`.
6465	QueryResult *GoogleCloudDialogflowV2beta1QueryResult `json:"queryResult,omitempty"`
6466
6467	// ResponseId: The unique identifier of the response. Contains the same
6468	// value as
6469	// `[Streaming]DetectIntentResponse.response_id`.
6470	ResponseId string `json:"responseId,omitempty"`
6471
6472	// Session: The unique identifier of detectIntent request session.
6473	// Can be used to identify end-user inside webhook
6474	// implementation.
6475	// Format: `projects/<Project ID>/agent/sessions/<Session ID>`,
6476	// or
6477	// `projects/<Project ID>/agent/environments/<Environment
6478	// ID>/users/<User
6479	// ID>/sessions/<Session ID>`.
6480	Session string `json:"session,omitempty"`
6481
6482	// ForceSendFields is a list of field names (e.g.
6483	// "AlternativeQueryResults") to unconditionally include in API
6484	// requests. By default, fields with empty values are omitted from API
6485	// requests. However, any non-pointer, non-interface field appearing in
6486	// ForceSendFields will be sent to the server regardless of whether the
6487	// field is empty or not. This may be used to include empty fields in
6488	// Patch requests.
6489	ForceSendFields []string `json:"-"`
6490
6491	// NullFields is a list of field names (e.g. "AlternativeQueryResults")
6492	// to include in API requests with the JSON null value. By default,
6493	// fields with empty values are omitted from API requests. However, any
6494	// field with an empty value appearing in NullFields will be sent to the
6495	// server as null. It is an error if a field in this list has a
6496	// non-empty value. This may be used to include null fields in Patch
6497	// requests.
6498	NullFields []string `json:"-"`
6499}
6500
6501func (s *GoogleCloudDialogflowV2beta1WebhookRequest) MarshalJSON() ([]byte, error) {
6502	type NoMethod GoogleCloudDialogflowV2beta1WebhookRequest
6503	raw := NoMethod(*s)
6504	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6505}
6506
6507// GoogleCloudDialogflowV2beta1WebhookResponse: The response message for
6508// a webhook call.
6509type GoogleCloudDialogflowV2beta1WebhookResponse struct {
6510	// EndInteraction: Optional. Indicates that this intent ends an
6511	// interaction. Some integrations
6512	// (e.g., Actions on Google or Dialogflow phone gateway) use this
6513	// information
6514	// to close interaction with an end user. Default is false.
6515	EndInteraction bool `json:"endInteraction,omitempty"`
6516
6517	// FollowupEventInput: Optional. Makes the platform immediately invoke
6518	// another `DetectIntent` call
6519	// internally with the specified event as input.
6520	// When this field is set, Dialogflow ignores the
6521	// `fulfillment_text`,
6522	// `fulfillment_messages`, and `payload` fields.
6523	FollowupEventInput *GoogleCloudDialogflowV2beta1EventInput `json:"followupEventInput,omitempty"`
6524
6525	// FulfillmentMessages: Optional. The collection of rich messages to
6526	// present to the user. This
6527	// value is passed directly to `QueryResult.fulfillment_messages`.
6528	FulfillmentMessages []*GoogleCloudDialogflowV2beta1IntentMessage `json:"fulfillmentMessages,omitempty"`
6529
6530	// FulfillmentText: Optional. The text to be shown on the screen. This
6531	// value is passed directly
6532	// to `QueryResult.fulfillment_text`.
6533	FulfillmentText string `json:"fulfillmentText,omitempty"`
6534
6535	// OutputContexts: Optional. The collection of output contexts. This
6536	// value is passed directly
6537	// to `QueryResult.output_contexts`.
6538	OutputContexts []*GoogleCloudDialogflowV2beta1Context `json:"outputContexts,omitempty"`
6539
6540	// Payload: Optional. This value is passed directly to
6541	// `QueryResult.webhook_payload`.
6542	// See the related `fulfillment_messages[i].payload field`, which may be
6543	// used
6544	// as an alternative to this field.
6545	//
6546	// This field can be used for Actions on Google responses.
6547	// It should have a structure similar to the JSON message shown here.
6548	// For more
6549	// information, see
6550	// [Actions on Google
6551	// Webhook
6552	// Format](https://developers.google.com/actions/dialogflow/webho
6553	// ok)
6554	// <pre>{
6555	//   "google": {
6556	//     "expectUserResponse": true,
6557	//     "richResponse": {
6558	//       "items": [
6559	//         {
6560	//           "simpleResponse": {
6561	//             "textToSpeech": "this is a simple response"
6562	//           }
6563	//         }
6564	//       ]
6565	//     }
6566	//   }
6567	// }</pre>
6568	Payload googleapi.RawMessage `json:"payload,omitempty"`
6569
6570	// Source: Optional. This value is passed directly to
6571	// `QueryResult.webhook_source`.
6572	Source string `json:"source,omitempty"`
6573
6574	// ForceSendFields is a list of field names (e.g. "EndInteraction") to
6575	// unconditionally include in API requests. By default, fields with
6576	// empty values are omitted from API requests. However, any non-pointer,
6577	// non-interface field appearing in ForceSendFields will be sent to the
6578	// server regardless of whether the field is empty or not. This may be
6579	// used to include empty fields in Patch requests.
6580	ForceSendFields []string `json:"-"`
6581
6582	// NullFields is a list of field names (e.g. "EndInteraction") to
6583	// include in API requests with the JSON null value. By default, fields
6584	// with empty values are omitted from API requests. However, any field
6585	// with an empty value appearing in NullFields will be sent to the
6586	// server as null. It is an error if a field in this list has a
6587	// non-empty value. This may be used to include null fields in Patch
6588	// requests.
6589	NullFields []string `json:"-"`
6590}
6591
6592func (s *GoogleCloudDialogflowV2beta1WebhookResponse) MarshalJSON() ([]byte, error) {
6593	type NoMethod GoogleCloudDialogflowV2beta1WebhookResponse
6594	raw := NoMethod(*s)
6595	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6596}
6597
6598// GoogleLongrunningOperation: This resource represents a long-running
6599// operation that is the result of a
6600// network API call.
6601type GoogleLongrunningOperation struct {
6602	// Done: If the value is `false`, it means the operation is still in
6603	// progress.
6604	// If `true`, the operation is completed, and either `error` or
6605	// `response` is
6606	// available.
6607	Done bool `json:"done,omitempty"`
6608
6609	// Error: The error result of the operation in case of failure or
6610	// cancellation.
6611	Error *GoogleRpcStatus `json:"error,omitempty"`
6612
6613	// Metadata: Service-specific metadata associated with the operation.
6614	// It typically
6615	// contains progress information and common metadata such as create
6616	// time.
6617	// Some services might not provide such metadata.  Any method that
6618	// returns a
6619	// long-running operation should document the metadata type, if any.
6620	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
6621
6622	// Name: The server-assigned name, which is only unique within the same
6623	// service that
6624	// originally returns it. If you use the default HTTP mapping,
6625	// the
6626	// `name` should be a resource name ending with
6627	// `operations/{unique_id}`.
6628	Name string `json:"name,omitempty"`
6629
6630	// Response: The normal response of the operation in case of success.
6631	// If the original
6632	// method returns no data on success, such as `Delete`, the response
6633	// is
6634	// `google.protobuf.Empty`.  If the original method is
6635	// standard
6636	// `Get`/`Create`/`Update`, the response should be the resource.  For
6637	// other
6638	// methods, the response should have the type `XxxResponse`, where
6639	// `Xxx`
6640	// is the original method name.  For example, if the original method
6641	// name
6642	// is `TakeSnapshot()`, the inferred response type
6643	// is
6644	// `TakeSnapshotResponse`.
6645	Response googleapi.RawMessage `json:"response,omitempty"`
6646
6647	// ServerResponse contains the HTTP response code and headers from the
6648	// server.
6649	googleapi.ServerResponse `json:"-"`
6650
6651	// ForceSendFields is a list of field names (e.g. "Done") to
6652	// unconditionally include in API requests. By default, fields with
6653	// empty values are omitted from API requests. However, any non-pointer,
6654	// non-interface field appearing in ForceSendFields will be sent to the
6655	// server regardless of whether the field is empty or not. This may be
6656	// used to include empty fields in Patch requests.
6657	ForceSendFields []string `json:"-"`
6658
6659	// NullFields is a list of field names (e.g. "Done") to include in API
6660	// requests with the JSON null value. By default, fields with empty
6661	// values are omitted from API requests. However, any field with an
6662	// empty value appearing in NullFields will be sent to the server as
6663	// null. It is an error if a field in this list has a non-empty value.
6664	// This may be used to include null fields in Patch requests.
6665	NullFields []string `json:"-"`
6666}
6667
6668func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
6669	type NoMethod GoogleLongrunningOperation
6670	raw := NoMethod(*s)
6671	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6672}
6673
6674// GoogleProtobufEmpty: A generic empty message that you can re-use to
6675// avoid defining duplicated
6676// empty messages in your APIs. A typical example is to use it as the
6677// request
6678// or the response type of an API method. For instance:
6679//
6680//     service Foo {
6681//       rpc Bar(google.protobuf.Empty) returns
6682// (google.protobuf.Empty);
6683//     }
6684//
6685// The JSON representation for `Empty` is empty JSON object `{}`.
6686type GoogleProtobufEmpty struct {
6687	// ServerResponse contains the HTTP response code and headers from the
6688	// server.
6689	googleapi.ServerResponse `json:"-"`
6690}
6691
6692// GoogleRpcStatus: The `Status` type defines a logical error model that
6693// is suitable for
6694// different programming environments, including REST APIs and RPC APIs.
6695// It is
6696// used by [gRPC](https://github.com/grpc). Each `Status` message
6697// contains
6698// three pieces of data: error code, error message, and error
6699// details.
6700//
6701// You can find out more about this error model and how to work with it
6702// in the
6703// [API Design Guide](https://cloud.google.com/apis/design/errors).
6704type GoogleRpcStatus struct {
6705	// Code: The status code, which should be an enum value of
6706	// google.rpc.Code.
6707	Code int64 `json:"code,omitempty"`
6708
6709	// Details: A list of messages that carry the error details.  There is a
6710	// common set of
6711	// message types for APIs to use.
6712	Details []googleapi.RawMessage `json:"details,omitempty"`
6713
6714	// Message: A developer-facing error message, which should be in
6715	// English. Any
6716	// user-facing error message should be localized and sent in
6717	// the
6718	// google.rpc.Status.details field, or localized by the client.
6719	Message string `json:"message,omitempty"`
6720
6721	// ForceSendFields is a list of field names (e.g. "Code") to
6722	// unconditionally include in API requests. By default, fields with
6723	// empty values are omitted from API requests. However, any non-pointer,
6724	// non-interface field appearing in ForceSendFields will be sent to the
6725	// server regardless of whether the field is empty or not. This may be
6726	// used to include empty fields in Patch requests.
6727	ForceSendFields []string `json:"-"`
6728
6729	// NullFields is a list of field names (e.g. "Code") to include in API
6730	// requests with the JSON null value. By default, fields with empty
6731	// values are omitted from API requests. However, any field with an
6732	// empty value appearing in NullFields will be sent to the server as
6733	// null. It is an error if a field in this list has a non-empty value.
6734	// This may be used to include null fields in Patch requests.
6735	NullFields []string `json:"-"`
6736}
6737
6738func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
6739	type NoMethod GoogleRpcStatus
6740	raw := NoMethod(*s)
6741	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6742}
6743
6744// GoogleTypeLatLng: An object representing a latitude/longitude pair.
6745// This is expressed as a pair
6746// of doubles representing degrees latitude and degrees longitude.
6747// Unless
6748// specified otherwise, this must conform to the
6749// <a
6750// href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
6751// st
6752// andard</a>. Values must be within normalized ranges.
6753type GoogleTypeLatLng struct {
6754	// Latitude: The latitude in degrees. It must be in the range [-90.0,
6755	// +90.0].
6756	Latitude float64 `json:"latitude,omitempty"`
6757
6758	// Longitude: The longitude in degrees. It must be in the range [-180.0,
6759	// +180.0].
6760	Longitude float64 `json:"longitude,omitempty"`
6761
6762	// ForceSendFields is a list of field names (e.g. "Latitude") to
6763	// unconditionally include in API requests. By default, fields with
6764	// empty values are omitted from API requests. However, any non-pointer,
6765	// non-interface field appearing in ForceSendFields will be sent to the
6766	// server regardless of whether the field is empty or not. This may be
6767	// used to include empty fields in Patch requests.
6768	ForceSendFields []string `json:"-"`
6769
6770	// NullFields is a list of field names (e.g. "Latitude") to include in
6771	// API requests with the JSON null value. By default, fields with empty
6772	// values are omitted from API requests. However, any field with an
6773	// empty value appearing in NullFields will be sent to the server as
6774	// null. It is an error if a field in this list has a non-empty value.
6775	// This may be used to include null fields in Patch requests.
6776	NullFields []string `json:"-"`
6777}
6778
6779func (s *GoogleTypeLatLng) MarshalJSON() ([]byte, error) {
6780	type NoMethod GoogleTypeLatLng
6781	raw := NoMethod(*s)
6782	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6783}
6784
6785func (s *GoogleTypeLatLng) UnmarshalJSON(data []byte) error {
6786	type NoMethod GoogleTypeLatLng
6787	var s1 struct {
6788		Latitude  gensupport.JSONFloat64 `json:"latitude"`
6789		Longitude gensupport.JSONFloat64 `json:"longitude"`
6790		*NoMethod
6791	}
6792	s1.NoMethod = (*NoMethod)(s)
6793	if err := json.Unmarshal(data, &s1); err != nil {
6794		return err
6795	}
6796	s.Latitude = float64(s1.Latitude)
6797	s.Longitude = float64(s1.Longitude)
6798	return nil
6799}
6800
6801// method id "dialogflow.projects.agent":
6802
6803type ProjectsAgentCall struct {
6804	s                                 *Service
6805	parent                            string
6806	googleclouddialogflowv2beta1agent *GoogleCloudDialogflowV2beta1Agent
6807	urlParams_                        gensupport.URLParams
6808	ctx_                              context.Context
6809	header_                           http.Header
6810}
6811
6812// Agent: Creates/updates the specified agent.
6813func (r *ProjectsService) Agent(parent string, googleclouddialogflowv2beta1agent *GoogleCloudDialogflowV2beta1Agent) *ProjectsAgentCall {
6814	c := &ProjectsAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6815	c.parent = parent
6816	c.googleclouddialogflowv2beta1agent = googleclouddialogflowv2beta1agent
6817	return c
6818}
6819
6820// UpdateMask sets the optional parameter "updateMask": The mask to
6821// control which fields get updated.
6822func (c *ProjectsAgentCall) UpdateMask(updateMask string) *ProjectsAgentCall {
6823	c.urlParams_.Set("updateMask", updateMask)
6824	return c
6825}
6826
6827// Fields allows partial responses to be retrieved. See
6828// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6829// for more information.
6830func (c *ProjectsAgentCall) Fields(s ...googleapi.Field) *ProjectsAgentCall {
6831	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6832	return c
6833}
6834
6835// Context sets the context to be used in this call's Do method. Any
6836// pending HTTP request will be aborted if the provided context is
6837// canceled.
6838func (c *ProjectsAgentCall) Context(ctx context.Context) *ProjectsAgentCall {
6839	c.ctx_ = ctx
6840	return c
6841}
6842
6843// Header returns an http.Header that can be modified by the caller to
6844// add HTTP headers to the request.
6845func (c *ProjectsAgentCall) Header() http.Header {
6846	if c.header_ == nil {
6847		c.header_ = make(http.Header)
6848	}
6849	return c.header_
6850}
6851
6852func (c *ProjectsAgentCall) doRequest(alt string) (*http.Response, error) {
6853	reqHeaders := make(http.Header)
6854	for k, v := range c.header_ {
6855		reqHeaders[k] = v
6856	}
6857	reqHeaders.Set("User-Agent", c.s.userAgent())
6858	var body io.Reader = nil
6859	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1agent)
6860	if err != nil {
6861		return nil, err
6862	}
6863	reqHeaders.Set("Content-Type", "application/json")
6864	c.urlParams_.Set("alt", alt)
6865	c.urlParams_.Set("prettyPrint", "false")
6866	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
6867	urls += "?" + c.urlParams_.Encode()
6868	req, err := http.NewRequest("POST", urls, body)
6869	if err != nil {
6870		return nil, err
6871	}
6872	req.Header = reqHeaders
6873	googleapi.Expand(req.URL, map[string]string{
6874		"parent": c.parent,
6875	})
6876	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6877}
6878
6879// Do executes the "dialogflow.projects.agent" call.
6880// Exactly one of *GoogleCloudDialogflowV2beta1Agent or error will be
6881// non-nil. Any non-2xx status code is an error. Response headers are in
6882// either *GoogleCloudDialogflowV2beta1Agent.ServerResponse.Header or
6883// (if a response was returned at all) in
6884// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6885// whether the returned error was because http.StatusNotModified was
6886// returned.
6887func (c *ProjectsAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Agent, error) {
6888	gensupport.SetOptions(c.urlParams_, opts...)
6889	res, err := c.doRequest("json")
6890	if res != nil && res.StatusCode == http.StatusNotModified {
6891		if res.Body != nil {
6892			res.Body.Close()
6893		}
6894		return nil, &googleapi.Error{
6895			Code:   res.StatusCode,
6896			Header: res.Header,
6897		}
6898	}
6899	if err != nil {
6900		return nil, err
6901	}
6902	defer googleapi.CloseBody(res)
6903	if err := googleapi.CheckResponse(res); err != nil {
6904		return nil, err
6905	}
6906	ret := &GoogleCloudDialogflowV2beta1Agent{
6907		ServerResponse: googleapi.ServerResponse{
6908			Header:         res.Header,
6909			HTTPStatusCode: res.StatusCode,
6910		},
6911	}
6912	target := &ret
6913	if err := gensupport.DecodeResponse(target, res); err != nil {
6914		return nil, err
6915	}
6916	return ret, nil
6917	// {
6918	//   "description": "Creates/updates the specified agent.",
6919	//   "flatPath": "v2beta1/projects/{projectsId}/agent",
6920	//   "httpMethod": "POST",
6921	//   "id": "dialogflow.projects.agent",
6922	//   "parameterOrder": [
6923	//     "parent"
6924	//   ],
6925	//   "parameters": {
6926	//     "parent": {
6927	//       "description": "Required. The project of this agent.\nFormat: `projects/\u003cProject ID\u003e`.",
6928	//       "location": "path",
6929	//       "pattern": "^projects/[^/]+$",
6930	//       "required": true,
6931	//       "type": "string"
6932	//     },
6933	//     "updateMask": {
6934	//       "description": "Optional. The mask to control which fields get updated.",
6935	//       "format": "google-fieldmask",
6936	//       "location": "query",
6937	//       "type": "string"
6938	//     }
6939	//   },
6940	//   "path": "v2beta1/{+parent}/agent",
6941	//   "request": {
6942	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
6943	//   },
6944	//   "response": {
6945	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
6946	//   },
6947	//   "scopes": [
6948	//     "https://www.googleapis.com/auth/cloud-platform",
6949	//     "https://www.googleapis.com/auth/dialogflow"
6950	//   ]
6951	// }
6952
6953}
6954
6955// method id "dialogflow.projects.deleteAgent":
6956
6957type ProjectsDeleteAgentCall struct {
6958	s          *Service
6959	parent     string
6960	urlParams_ gensupport.URLParams
6961	ctx_       context.Context
6962	header_    http.Header
6963}
6964
6965// DeleteAgent: Deletes the specified agent.
6966func (r *ProjectsService) DeleteAgent(parent string) *ProjectsDeleteAgentCall {
6967	c := &ProjectsDeleteAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6968	c.parent = parent
6969	return c
6970}
6971
6972// Fields allows partial responses to be retrieved. See
6973// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6974// for more information.
6975func (c *ProjectsDeleteAgentCall) Fields(s ...googleapi.Field) *ProjectsDeleteAgentCall {
6976	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6977	return c
6978}
6979
6980// Context sets the context to be used in this call's Do method. Any
6981// pending HTTP request will be aborted if the provided context is
6982// canceled.
6983func (c *ProjectsDeleteAgentCall) Context(ctx context.Context) *ProjectsDeleteAgentCall {
6984	c.ctx_ = ctx
6985	return c
6986}
6987
6988// Header returns an http.Header that can be modified by the caller to
6989// add HTTP headers to the request.
6990func (c *ProjectsDeleteAgentCall) Header() http.Header {
6991	if c.header_ == nil {
6992		c.header_ = make(http.Header)
6993	}
6994	return c.header_
6995}
6996
6997func (c *ProjectsDeleteAgentCall) doRequest(alt string) (*http.Response, error) {
6998	reqHeaders := make(http.Header)
6999	for k, v := range c.header_ {
7000		reqHeaders[k] = v
7001	}
7002	reqHeaders.Set("User-Agent", c.s.userAgent())
7003	var body io.Reader = nil
7004	c.urlParams_.Set("alt", alt)
7005	c.urlParams_.Set("prettyPrint", "false")
7006	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
7007	urls += "?" + c.urlParams_.Encode()
7008	req, err := http.NewRequest("DELETE", urls, body)
7009	if err != nil {
7010		return nil, err
7011	}
7012	req.Header = reqHeaders
7013	googleapi.Expand(req.URL, map[string]string{
7014		"parent": c.parent,
7015	})
7016	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7017}
7018
7019// Do executes the "dialogflow.projects.deleteAgent" call.
7020// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
7021// non-2xx status code is an error. Response headers are in either
7022// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
7023// returned at all) in error.(*googleapi.Error).Header. Use
7024// googleapi.IsNotModified to check whether the returned error was
7025// because http.StatusNotModified was returned.
7026func (c *ProjectsDeleteAgentCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
7027	gensupport.SetOptions(c.urlParams_, opts...)
7028	res, err := c.doRequest("json")
7029	if res != nil && res.StatusCode == http.StatusNotModified {
7030		if res.Body != nil {
7031			res.Body.Close()
7032		}
7033		return nil, &googleapi.Error{
7034			Code:   res.StatusCode,
7035			Header: res.Header,
7036		}
7037	}
7038	if err != nil {
7039		return nil, err
7040	}
7041	defer googleapi.CloseBody(res)
7042	if err := googleapi.CheckResponse(res); err != nil {
7043		return nil, err
7044	}
7045	ret := &GoogleProtobufEmpty{
7046		ServerResponse: googleapi.ServerResponse{
7047			Header:         res.Header,
7048			HTTPStatusCode: res.StatusCode,
7049		},
7050	}
7051	target := &ret
7052	if err := gensupport.DecodeResponse(target, res); err != nil {
7053		return nil, err
7054	}
7055	return ret, nil
7056	// {
7057	//   "description": "Deletes the specified agent.",
7058	//   "flatPath": "v2beta1/projects/{projectsId}/agent",
7059	//   "httpMethod": "DELETE",
7060	//   "id": "dialogflow.projects.deleteAgent",
7061	//   "parameterOrder": [
7062	//     "parent"
7063	//   ],
7064	//   "parameters": {
7065	//     "parent": {
7066	//       "description": "Required. The project that the agent to delete is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
7067	//       "location": "path",
7068	//       "pattern": "^projects/[^/]+$",
7069	//       "required": true,
7070	//       "type": "string"
7071	//     }
7072	//   },
7073	//   "path": "v2beta1/{+parent}/agent",
7074	//   "response": {
7075	//     "$ref": "GoogleProtobufEmpty"
7076	//   },
7077	//   "scopes": [
7078	//     "https://www.googleapis.com/auth/cloud-platform",
7079	//     "https://www.googleapis.com/auth/dialogflow"
7080	//   ]
7081	// }
7082
7083}
7084
7085// method id "dialogflow.projects.getAgent":
7086
7087type ProjectsGetAgentCall struct {
7088	s            *Service
7089	parent       string
7090	urlParams_   gensupport.URLParams
7091	ifNoneMatch_ string
7092	ctx_         context.Context
7093	header_      http.Header
7094}
7095
7096// GetAgent: Retrieves the specified agent.
7097func (r *ProjectsService) GetAgent(parent string) *ProjectsGetAgentCall {
7098	c := &ProjectsGetAgentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7099	c.parent = parent
7100	return c
7101}
7102
7103// Fields allows partial responses to be retrieved. See
7104// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7105// for more information.
7106func (c *ProjectsGetAgentCall) Fields(s ...googleapi.Field) *ProjectsGetAgentCall {
7107	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7108	return c
7109}
7110
7111// IfNoneMatch sets the optional parameter which makes the operation
7112// fail if the object's ETag matches the given value. This is useful for
7113// getting updates only after the object has changed since the last
7114// request. Use googleapi.IsNotModified to check whether the response
7115// error from Do is the result of In-None-Match.
7116func (c *ProjectsGetAgentCall) IfNoneMatch(entityTag string) *ProjectsGetAgentCall {
7117	c.ifNoneMatch_ = entityTag
7118	return c
7119}
7120
7121// Context sets the context to be used in this call's Do method. Any
7122// pending HTTP request will be aborted if the provided context is
7123// canceled.
7124func (c *ProjectsGetAgentCall) Context(ctx context.Context) *ProjectsGetAgentCall {
7125	c.ctx_ = ctx
7126	return c
7127}
7128
7129// Header returns an http.Header that can be modified by the caller to
7130// add HTTP headers to the request.
7131func (c *ProjectsGetAgentCall) Header() http.Header {
7132	if c.header_ == nil {
7133		c.header_ = make(http.Header)
7134	}
7135	return c.header_
7136}
7137
7138func (c *ProjectsGetAgentCall) doRequest(alt string) (*http.Response, error) {
7139	reqHeaders := make(http.Header)
7140	for k, v := range c.header_ {
7141		reqHeaders[k] = v
7142	}
7143	reqHeaders.Set("User-Agent", c.s.userAgent())
7144	if c.ifNoneMatch_ != "" {
7145		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7146	}
7147	var body io.Reader = nil
7148	c.urlParams_.Set("alt", alt)
7149	c.urlParams_.Set("prettyPrint", "false")
7150	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent")
7151	urls += "?" + c.urlParams_.Encode()
7152	req, err := http.NewRequest("GET", urls, body)
7153	if err != nil {
7154		return nil, err
7155	}
7156	req.Header = reqHeaders
7157	googleapi.Expand(req.URL, map[string]string{
7158		"parent": c.parent,
7159	})
7160	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7161}
7162
7163// Do executes the "dialogflow.projects.getAgent" call.
7164// Exactly one of *GoogleCloudDialogflowV2beta1Agent or error will be
7165// non-nil. Any non-2xx status code is an error. Response headers are in
7166// either *GoogleCloudDialogflowV2beta1Agent.ServerResponse.Header or
7167// (if a response was returned at all) in
7168// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7169// whether the returned error was because http.StatusNotModified was
7170// returned.
7171func (c *ProjectsGetAgentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Agent, error) {
7172	gensupport.SetOptions(c.urlParams_, opts...)
7173	res, err := c.doRequest("json")
7174	if res != nil && res.StatusCode == http.StatusNotModified {
7175		if res.Body != nil {
7176			res.Body.Close()
7177		}
7178		return nil, &googleapi.Error{
7179			Code:   res.StatusCode,
7180			Header: res.Header,
7181		}
7182	}
7183	if err != nil {
7184		return nil, err
7185	}
7186	defer googleapi.CloseBody(res)
7187	if err := googleapi.CheckResponse(res); err != nil {
7188		return nil, err
7189	}
7190	ret := &GoogleCloudDialogflowV2beta1Agent{
7191		ServerResponse: googleapi.ServerResponse{
7192			Header:         res.Header,
7193			HTTPStatusCode: res.StatusCode,
7194		},
7195	}
7196	target := &ret
7197	if err := gensupport.DecodeResponse(target, res); err != nil {
7198		return nil, err
7199	}
7200	return ret, nil
7201	// {
7202	//   "description": "Retrieves the specified agent.",
7203	//   "flatPath": "v2beta1/projects/{projectsId}/agent",
7204	//   "httpMethod": "GET",
7205	//   "id": "dialogflow.projects.getAgent",
7206	//   "parameterOrder": [
7207	//     "parent"
7208	//   ],
7209	//   "parameters": {
7210	//     "parent": {
7211	//       "description": "Required. The project that the agent to fetch is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
7212	//       "location": "path",
7213	//       "pattern": "^projects/[^/]+$",
7214	//       "required": true,
7215	//       "type": "string"
7216	//     }
7217	//   },
7218	//   "path": "v2beta1/{+parent}/agent",
7219	//   "response": {
7220	//     "$ref": "GoogleCloudDialogflowV2beta1Agent"
7221	//   },
7222	//   "scopes": [
7223	//     "https://www.googleapis.com/auth/cloud-platform",
7224	//     "https://www.googleapis.com/auth/dialogflow"
7225	//   ]
7226	// }
7227
7228}
7229
7230// method id "dialogflow.projects.agent.export":
7231
7232type ProjectsAgentExportCall struct {
7233	s                                              *Service
7234	parent                                         string
7235	googleclouddialogflowv2beta1exportagentrequest *GoogleCloudDialogflowV2beta1ExportAgentRequest
7236	urlParams_                                     gensupport.URLParams
7237	ctx_                                           context.Context
7238	header_                                        http.Header
7239}
7240
7241// Export: Exports the specified agent to a ZIP file.
7242//
7243//
7244// Operation <response: ExportAgentResponse>
7245func (r *ProjectsAgentService) Export(parent string, googleclouddialogflowv2beta1exportagentrequest *GoogleCloudDialogflowV2beta1ExportAgentRequest) *ProjectsAgentExportCall {
7246	c := &ProjectsAgentExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7247	c.parent = parent
7248	c.googleclouddialogflowv2beta1exportagentrequest = googleclouddialogflowv2beta1exportagentrequest
7249	return c
7250}
7251
7252// Fields allows partial responses to be retrieved. See
7253// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7254// for more information.
7255func (c *ProjectsAgentExportCall) Fields(s ...googleapi.Field) *ProjectsAgentExportCall {
7256	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7257	return c
7258}
7259
7260// Context sets the context to be used in this call's Do method. Any
7261// pending HTTP request will be aborted if the provided context is
7262// canceled.
7263func (c *ProjectsAgentExportCall) Context(ctx context.Context) *ProjectsAgentExportCall {
7264	c.ctx_ = ctx
7265	return c
7266}
7267
7268// Header returns an http.Header that can be modified by the caller to
7269// add HTTP headers to the request.
7270func (c *ProjectsAgentExportCall) Header() http.Header {
7271	if c.header_ == nil {
7272		c.header_ = make(http.Header)
7273	}
7274	return c.header_
7275}
7276
7277func (c *ProjectsAgentExportCall) doRequest(alt string) (*http.Response, error) {
7278	reqHeaders := make(http.Header)
7279	for k, v := range c.header_ {
7280		reqHeaders[k] = v
7281	}
7282	reqHeaders.Set("User-Agent", c.s.userAgent())
7283	var body io.Reader = nil
7284	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1exportagentrequest)
7285	if err != nil {
7286		return nil, err
7287	}
7288	reqHeaders.Set("Content-Type", "application/json")
7289	c.urlParams_.Set("alt", alt)
7290	c.urlParams_.Set("prettyPrint", "false")
7291	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:export")
7292	urls += "?" + c.urlParams_.Encode()
7293	req, err := http.NewRequest("POST", urls, body)
7294	if err != nil {
7295		return nil, err
7296	}
7297	req.Header = reqHeaders
7298	googleapi.Expand(req.URL, map[string]string{
7299		"parent": c.parent,
7300	})
7301	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7302}
7303
7304// Do executes the "dialogflow.projects.agent.export" call.
7305// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
7306// Any non-2xx status code is an error. Response headers are in either
7307// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
7308// was returned at all) in error.(*googleapi.Error).Header. Use
7309// googleapi.IsNotModified to check whether the returned error was
7310// because http.StatusNotModified was returned.
7311func (c *ProjectsAgentExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
7312	gensupport.SetOptions(c.urlParams_, opts...)
7313	res, err := c.doRequest("json")
7314	if res != nil && res.StatusCode == http.StatusNotModified {
7315		if res.Body != nil {
7316			res.Body.Close()
7317		}
7318		return nil, &googleapi.Error{
7319			Code:   res.StatusCode,
7320			Header: res.Header,
7321		}
7322	}
7323	if err != nil {
7324		return nil, err
7325	}
7326	defer googleapi.CloseBody(res)
7327	if err := googleapi.CheckResponse(res); err != nil {
7328		return nil, err
7329	}
7330	ret := &GoogleLongrunningOperation{
7331		ServerResponse: googleapi.ServerResponse{
7332			Header:         res.Header,
7333			HTTPStatusCode: res.StatusCode,
7334		},
7335	}
7336	target := &ret
7337	if err := gensupport.DecodeResponse(target, res); err != nil {
7338		return nil, err
7339	}
7340	return ret, nil
7341	// {
7342	//   "description": "Exports the specified agent to a ZIP file.\n\n\nOperation \u003cresponse: ExportAgentResponse\u003e",
7343	//   "flatPath": "v2beta1/projects/{projectsId}/agent:export",
7344	//   "httpMethod": "POST",
7345	//   "id": "dialogflow.projects.agent.export",
7346	//   "parameterOrder": [
7347	//     "parent"
7348	//   ],
7349	//   "parameters": {
7350	//     "parent": {
7351	//       "description": "Required. The project that the agent to export is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
7352	//       "location": "path",
7353	//       "pattern": "^projects/[^/]+$",
7354	//       "required": true,
7355	//       "type": "string"
7356	//     }
7357	//   },
7358	//   "path": "v2beta1/{+parent}/agent:export",
7359	//   "request": {
7360	//     "$ref": "GoogleCloudDialogflowV2beta1ExportAgentRequest"
7361	//   },
7362	//   "response": {
7363	//     "$ref": "GoogleLongrunningOperation"
7364	//   },
7365	//   "scopes": [
7366	//     "https://www.googleapis.com/auth/cloud-platform",
7367	//     "https://www.googleapis.com/auth/dialogflow"
7368	//   ]
7369	// }
7370
7371}
7372
7373// method id "dialogflow.projects.agent.import":
7374
7375type ProjectsAgentImportCall struct {
7376	s                                              *Service
7377	parent                                         string
7378	googleclouddialogflowv2beta1importagentrequest *GoogleCloudDialogflowV2beta1ImportAgentRequest
7379	urlParams_                                     gensupport.URLParams
7380	ctx_                                           context.Context
7381	header_                                        http.Header
7382}
7383
7384// Import: Imports the specified agent from a ZIP file.
7385//
7386// Uploads new intents and entity types without deleting the existing
7387// ones.
7388// Intents and entity types with the same name are replaced with the
7389// new
7390// versions from ImportAgentRequest.
7391//
7392//
7393// Operation <response: google.protobuf.Empty>
7394func (r *ProjectsAgentService) Import(parent string, googleclouddialogflowv2beta1importagentrequest *GoogleCloudDialogflowV2beta1ImportAgentRequest) *ProjectsAgentImportCall {
7395	c := &ProjectsAgentImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7396	c.parent = parent
7397	c.googleclouddialogflowv2beta1importagentrequest = googleclouddialogflowv2beta1importagentrequest
7398	return c
7399}
7400
7401// Fields allows partial responses to be retrieved. See
7402// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7403// for more information.
7404func (c *ProjectsAgentImportCall) Fields(s ...googleapi.Field) *ProjectsAgentImportCall {
7405	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7406	return c
7407}
7408
7409// Context sets the context to be used in this call's Do method. Any
7410// pending HTTP request will be aborted if the provided context is
7411// canceled.
7412func (c *ProjectsAgentImportCall) Context(ctx context.Context) *ProjectsAgentImportCall {
7413	c.ctx_ = ctx
7414	return c
7415}
7416
7417// Header returns an http.Header that can be modified by the caller to
7418// add HTTP headers to the request.
7419func (c *ProjectsAgentImportCall) Header() http.Header {
7420	if c.header_ == nil {
7421		c.header_ = make(http.Header)
7422	}
7423	return c.header_
7424}
7425
7426func (c *ProjectsAgentImportCall) doRequest(alt string) (*http.Response, error) {
7427	reqHeaders := make(http.Header)
7428	for k, v := range c.header_ {
7429		reqHeaders[k] = v
7430	}
7431	reqHeaders.Set("User-Agent", c.s.userAgent())
7432	var body io.Reader = nil
7433	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1importagentrequest)
7434	if err != nil {
7435		return nil, err
7436	}
7437	reqHeaders.Set("Content-Type", "application/json")
7438	c.urlParams_.Set("alt", alt)
7439	c.urlParams_.Set("prettyPrint", "false")
7440	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:import")
7441	urls += "?" + c.urlParams_.Encode()
7442	req, err := http.NewRequest("POST", urls, body)
7443	if err != nil {
7444		return nil, err
7445	}
7446	req.Header = reqHeaders
7447	googleapi.Expand(req.URL, map[string]string{
7448		"parent": c.parent,
7449	})
7450	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7451}
7452
7453// Do executes the "dialogflow.projects.agent.import" call.
7454// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
7455// Any non-2xx status code is an error. Response headers are in either
7456// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
7457// was returned at all) in error.(*googleapi.Error).Header. Use
7458// googleapi.IsNotModified to check whether the returned error was
7459// because http.StatusNotModified was returned.
7460func (c *ProjectsAgentImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
7461	gensupport.SetOptions(c.urlParams_, opts...)
7462	res, err := c.doRequest("json")
7463	if res != nil && res.StatusCode == http.StatusNotModified {
7464		if res.Body != nil {
7465			res.Body.Close()
7466		}
7467		return nil, &googleapi.Error{
7468			Code:   res.StatusCode,
7469			Header: res.Header,
7470		}
7471	}
7472	if err != nil {
7473		return nil, err
7474	}
7475	defer googleapi.CloseBody(res)
7476	if err := googleapi.CheckResponse(res); err != nil {
7477		return nil, err
7478	}
7479	ret := &GoogleLongrunningOperation{
7480		ServerResponse: googleapi.ServerResponse{
7481			Header:         res.Header,
7482			HTTPStatusCode: res.StatusCode,
7483		},
7484	}
7485	target := &ret
7486	if err := gensupport.DecodeResponse(target, res); err != nil {
7487		return nil, err
7488	}
7489	return ret, nil
7490	// {
7491	//   "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",
7492	//   "flatPath": "v2beta1/projects/{projectsId}/agent:import",
7493	//   "httpMethod": "POST",
7494	//   "id": "dialogflow.projects.agent.import",
7495	//   "parameterOrder": [
7496	//     "parent"
7497	//   ],
7498	//   "parameters": {
7499	//     "parent": {
7500	//       "description": "Required. The project that the agent to import is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
7501	//       "location": "path",
7502	//       "pattern": "^projects/[^/]+$",
7503	//       "required": true,
7504	//       "type": "string"
7505	//     }
7506	//   },
7507	//   "path": "v2beta1/{+parent}/agent:import",
7508	//   "request": {
7509	//     "$ref": "GoogleCloudDialogflowV2beta1ImportAgentRequest"
7510	//   },
7511	//   "response": {
7512	//     "$ref": "GoogleLongrunningOperation"
7513	//   },
7514	//   "scopes": [
7515	//     "https://www.googleapis.com/auth/cloud-platform",
7516	//     "https://www.googleapis.com/auth/dialogflow"
7517	//   ]
7518	// }
7519
7520}
7521
7522// method id "dialogflow.projects.agent.restore":
7523
7524type ProjectsAgentRestoreCall struct {
7525	s                                               *Service
7526	parent                                          string
7527	googleclouddialogflowv2beta1restoreagentrequest *GoogleCloudDialogflowV2beta1RestoreAgentRequest
7528	urlParams_                                      gensupport.URLParams
7529	ctx_                                            context.Context
7530	header_                                         http.Header
7531}
7532
7533// Restore: Restores the specified agent from a ZIP file.
7534//
7535// Replaces the current agent version with a new one. All the intents
7536// and
7537// entity types in the older version are deleted.
7538//
7539//
7540// Operation <response: google.protobuf.Empty>
7541func (r *ProjectsAgentService) Restore(parent string, googleclouddialogflowv2beta1restoreagentrequest *GoogleCloudDialogflowV2beta1RestoreAgentRequest) *ProjectsAgentRestoreCall {
7542	c := &ProjectsAgentRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7543	c.parent = parent
7544	c.googleclouddialogflowv2beta1restoreagentrequest = googleclouddialogflowv2beta1restoreagentrequest
7545	return c
7546}
7547
7548// Fields allows partial responses to be retrieved. See
7549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7550// for more information.
7551func (c *ProjectsAgentRestoreCall) Fields(s ...googleapi.Field) *ProjectsAgentRestoreCall {
7552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7553	return c
7554}
7555
7556// Context sets the context to be used in this call's Do method. Any
7557// pending HTTP request will be aborted if the provided context is
7558// canceled.
7559func (c *ProjectsAgentRestoreCall) Context(ctx context.Context) *ProjectsAgentRestoreCall {
7560	c.ctx_ = ctx
7561	return c
7562}
7563
7564// Header returns an http.Header that can be modified by the caller to
7565// add HTTP headers to the request.
7566func (c *ProjectsAgentRestoreCall) Header() http.Header {
7567	if c.header_ == nil {
7568		c.header_ = make(http.Header)
7569	}
7570	return c.header_
7571}
7572
7573func (c *ProjectsAgentRestoreCall) doRequest(alt string) (*http.Response, error) {
7574	reqHeaders := make(http.Header)
7575	for k, v := range c.header_ {
7576		reqHeaders[k] = v
7577	}
7578	reqHeaders.Set("User-Agent", c.s.userAgent())
7579	var body io.Reader = nil
7580	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1restoreagentrequest)
7581	if err != nil {
7582		return nil, err
7583	}
7584	reqHeaders.Set("Content-Type", "application/json")
7585	c.urlParams_.Set("alt", alt)
7586	c.urlParams_.Set("prettyPrint", "false")
7587	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:restore")
7588	urls += "?" + c.urlParams_.Encode()
7589	req, err := http.NewRequest("POST", urls, body)
7590	if err != nil {
7591		return nil, err
7592	}
7593	req.Header = reqHeaders
7594	googleapi.Expand(req.URL, map[string]string{
7595		"parent": c.parent,
7596	})
7597	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7598}
7599
7600// Do executes the "dialogflow.projects.agent.restore" call.
7601// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
7602// Any non-2xx status code is an error. Response headers are in either
7603// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
7604// was returned at all) in error.(*googleapi.Error).Header. Use
7605// googleapi.IsNotModified to check whether the returned error was
7606// because http.StatusNotModified was returned.
7607func (c *ProjectsAgentRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
7608	gensupport.SetOptions(c.urlParams_, opts...)
7609	res, err := c.doRequest("json")
7610	if res != nil && res.StatusCode == http.StatusNotModified {
7611		if res.Body != nil {
7612			res.Body.Close()
7613		}
7614		return nil, &googleapi.Error{
7615			Code:   res.StatusCode,
7616			Header: res.Header,
7617		}
7618	}
7619	if err != nil {
7620		return nil, err
7621	}
7622	defer googleapi.CloseBody(res)
7623	if err := googleapi.CheckResponse(res); err != nil {
7624		return nil, err
7625	}
7626	ret := &GoogleLongrunningOperation{
7627		ServerResponse: googleapi.ServerResponse{
7628			Header:         res.Header,
7629			HTTPStatusCode: res.StatusCode,
7630		},
7631	}
7632	target := &ret
7633	if err := gensupport.DecodeResponse(target, res); err != nil {
7634		return nil, err
7635	}
7636	return ret, nil
7637	// {
7638	//   "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",
7639	//   "flatPath": "v2beta1/projects/{projectsId}/agent:restore",
7640	//   "httpMethod": "POST",
7641	//   "id": "dialogflow.projects.agent.restore",
7642	//   "parameterOrder": [
7643	//     "parent"
7644	//   ],
7645	//   "parameters": {
7646	//     "parent": {
7647	//       "description": "Required. The project that the agent to restore is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
7648	//       "location": "path",
7649	//       "pattern": "^projects/[^/]+$",
7650	//       "required": true,
7651	//       "type": "string"
7652	//     }
7653	//   },
7654	//   "path": "v2beta1/{+parent}/agent:restore",
7655	//   "request": {
7656	//     "$ref": "GoogleCloudDialogflowV2beta1RestoreAgentRequest"
7657	//   },
7658	//   "response": {
7659	//     "$ref": "GoogleLongrunningOperation"
7660	//   },
7661	//   "scopes": [
7662	//     "https://www.googleapis.com/auth/cloud-platform",
7663	//     "https://www.googleapis.com/auth/dialogflow"
7664	//   ]
7665	// }
7666
7667}
7668
7669// method id "dialogflow.projects.agent.search":
7670
7671type ProjectsAgentSearchCall struct {
7672	s            *Service
7673	parent       string
7674	urlParams_   gensupport.URLParams
7675	ifNoneMatch_ string
7676	ctx_         context.Context
7677	header_      http.Header
7678}
7679
7680// Search: Returns the list of agents.
7681//
7682// Since there is at most one conversational agent per project, this
7683// method is
7684// useful primarily for listing all agents across projects the caller
7685// has
7686// access to. One can achieve that with a wildcard project collection id
7687// "-".
7688// Refer to
7689// [List
7690// Sub-Collections](https://cloud.google.com/apis/design/design_pat
7691// terns#list_sub-collections).
7692func (r *ProjectsAgentService) Search(parent string) *ProjectsAgentSearchCall {
7693	c := &ProjectsAgentSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7694	c.parent = parent
7695	return c
7696}
7697
7698// PageSize sets the optional parameter "pageSize": The maximum number
7699// of items to return in a single page. By
7700// default 100 and at most 1000.
7701func (c *ProjectsAgentSearchCall) PageSize(pageSize int64) *ProjectsAgentSearchCall {
7702	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7703	return c
7704}
7705
7706// PageToken sets the optional parameter "pageToken": The
7707// next_page_token value returned from a previous list request.
7708func (c *ProjectsAgentSearchCall) PageToken(pageToken string) *ProjectsAgentSearchCall {
7709	c.urlParams_.Set("pageToken", pageToken)
7710	return c
7711}
7712
7713// Fields allows partial responses to be retrieved. See
7714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7715// for more information.
7716func (c *ProjectsAgentSearchCall) Fields(s ...googleapi.Field) *ProjectsAgentSearchCall {
7717	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7718	return c
7719}
7720
7721// IfNoneMatch sets the optional parameter which makes the operation
7722// fail if the object's ETag matches the given value. This is useful for
7723// getting updates only after the object has changed since the last
7724// request. Use googleapi.IsNotModified to check whether the response
7725// error from Do is the result of In-None-Match.
7726func (c *ProjectsAgentSearchCall) IfNoneMatch(entityTag string) *ProjectsAgentSearchCall {
7727	c.ifNoneMatch_ = entityTag
7728	return c
7729}
7730
7731// Context sets the context to be used in this call's Do method. Any
7732// pending HTTP request will be aborted if the provided context is
7733// canceled.
7734func (c *ProjectsAgentSearchCall) Context(ctx context.Context) *ProjectsAgentSearchCall {
7735	c.ctx_ = ctx
7736	return c
7737}
7738
7739// Header returns an http.Header that can be modified by the caller to
7740// add HTTP headers to the request.
7741func (c *ProjectsAgentSearchCall) Header() http.Header {
7742	if c.header_ == nil {
7743		c.header_ = make(http.Header)
7744	}
7745	return c.header_
7746}
7747
7748func (c *ProjectsAgentSearchCall) doRequest(alt string) (*http.Response, error) {
7749	reqHeaders := make(http.Header)
7750	for k, v := range c.header_ {
7751		reqHeaders[k] = v
7752	}
7753	reqHeaders.Set("User-Agent", c.s.userAgent())
7754	if c.ifNoneMatch_ != "" {
7755		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7756	}
7757	var body io.Reader = nil
7758	c.urlParams_.Set("alt", alt)
7759	c.urlParams_.Set("prettyPrint", "false")
7760	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:search")
7761	urls += "?" + c.urlParams_.Encode()
7762	req, err := http.NewRequest("GET", urls, body)
7763	if err != nil {
7764		return nil, err
7765	}
7766	req.Header = reqHeaders
7767	googleapi.Expand(req.URL, map[string]string{
7768		"parent": c.parent,
7769	})
7770	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7771}
7772
7773// Do executes the "dialogflow.projects.agent.search" call.
7774// Exactly one of *GoogleCloudDialogflowV2beta1SearchAgentsResponse or
7775// error will be non-nil. Any non-2xx status code is an error. Response
7776// headers are in either
7777// *GoogleCloudDialogflowV2beta1SearchAgentsResponse.ServerResponse.Heade
7778// r or (if a response was returned at all) in
7779// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7780// whether the returned error was because http.StatusNotModified was
7781// returned.
7782func (c *ProjectsAgentSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SearchAgentsResponse, error) {
7783	gensupport.SetOptions(c.urlParams_, opts...)
7784	res, err := c.doRequest("json")
7785	if res != nil && res.StatusCode == http.StatusNotModified {
7786		if res.Body != nil {
7787			res.Body.Close()
7788		}
7789		return nil, &googleapi.Error{
7790			Code:   res.StatusCode,
7791			Header: res.Header,
7792		}
7793	}
7794	if err != nil {
7795		return nil, err
7796	}
7797	defer googleapi.CloseBody(res)
7798	if err := googleapi.CheckResponse(res); err != nil {
7799		return nil, err
7800	}
7801	ret := &GoogleCloudDialogflowV2beta1SearchAgentsResponse{
7802		ServerResponse: googleapi.ServerResponse{
7803			Header:         res.Header,
7804			HTTPStatusCode: res.StatusCode,
7805		},
7806	}
7807	target := &ret
7808	if err := gensupport.DecodeResponse(target, res); err != nil {
7809		return nil, err
7810	}
7811	return ret, nil
7812	// {
7813	//   "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).",
7814	//   "flatPath": "v2beta1/projects/{projectsId}/agent:search",
7815	//   "httpMethod": "GET",
7816	//   "id": "dialogflow.projects.agent.search",
7817	//   "parameterOrder": [
7818	//     "parent"
7819	//   ],
7820	//   "parameters": {
7821	//     "pageSize": {
7822	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
7823	//       "format": "int32",
7824	//       "location": "query",
7825	//       "type": "integer"
7826	//     },
7827	//     "pageToken": {
7828	//       "description": "Optional. The next_page_token value returned from a previous list request.",
7829	//       "location": "query",
7830	//       "type": "string"
7831	//     },
7832	//     "parent": {
7833	//       "description": "Required. The project to list agents from.\nFormat: `projects/\u003cProject ID or '-'\u003e`.",
7834	//       "location": "path",
7835	//       "pattern": "^projects/[^/]+$",
7836	//       "required": true,
7837	//       "type": "string"
7838	//     }
7839	//   },
7840	//   "path": "v2beta1/{+parent}/agent:search",
7841	//   "response": {
7842	//     "$ref": "GoogleCloudDialogflowV2beta1SearchAgentsResponse"
7843	//   },
7844	//   "scopes": [
7845	//     "https://www.googleapis.com/auth/cloud-platform",
7846	//     "https://www.googleapis.com/auth/dialogflow"
7847	//   ]
7848	// }
7849
7850}
7851
7852// Pages invokes f for each page of results.
7853// A non-nil error returned from f will halt the iteration.
7854// The provided context supersedes any context provided to the Context method.
7855func (c *ProjectsAgentSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1SearchAgentsResponse) error) error {
7856	c.ctx_ = ctx
7857	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7858	for {
7859		x, err := c.Do()
7860		if err != nil {
7861			return err
7862		}
7863		if err := f(x); err != nil {
7864			return err
7865		}
7866		if x.NextPageToken == "" {
7867			return nil
7868		}
7869		c.PageToken(x.NextPageToken)
7870	}
7871}
7872
7873// method id "dialogflow.projects.agent.train":
7874
7875type ProjectsAgentTrainCall struct {
7876	s                                             *Service
7877	parent                                        string
7878	googleclouddialogflowv2beta1trainagentrequest *GoogleCloudDialogflowV2beta1TrainAgentRequest
7879	urlParams_                                    gensupport.URLParams
7880	ctx_                                          context.Context
7881	header_                                       http.Header
7882}
7883
7884// Train: Trains the specified agent.
7885//
7886//
7887// Operation <response: google.protobuf.Empty>
7888func (r *ProjectsAgentService) Train(parent string, googleclouddialogflowv2beta1trainagentrequest *GoogleCloudDialogflowV2beta1TrainAgentRequest) *ProjectsAgentTrainCall {
7889	c := &ProjectsAgentTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7890	c.parent = parent
7891	c.googleclouddialogflowv2beta1trainagentrequest = googleclouddialogflowv2beta1trainagentrequest
7892	return c
7893}
7894
7895// Fields allows partial responses to be retrieved. See
7896// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7897// for more information.
7898func (c *ProjectsAgentTrainCall) Fields(s ...googleapi.Field) *ProjectsAgentTrainCall {
7899	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7900	return c
7901}
7902
7903// Context sets the context to be used in this call's Do method. Any
7904// pending HTTP request will be aborted if the provided context is
7905// canceled.
7906func (c *ProjectsAgentTrainCall) Context(ctx context.Context) *ProjectsAgentTrainCall {
7907	c.ctx_ = ctx
7908	return c
7909}
7910
7911// Header returns an http.Header that can be modified by the caller to
7912// add HTTP headers to the request.
7913func (c *ProjectsAgentTrainCall) Header() http.Header {
7914	if c.header_ == nil {
7915		c.header_ = make(http.Header)
7916	}
7917	return c.header_
7918}
7919
7920func (c *ProjectsAgentTrainCall) doRequest(alt string) (*http.Response, error) {
7921	reqHeaders := make(http.Header)
7922	for k, v := range c.header_ {
7923		reqHeaders[k] = v
7924	}
7925	reqHeaders.Set("User-Agent", c.s.userAgent())
7926	var body io.Reader = nil
7927	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1trainagentrequest)
7928	if err != nil {
7929		return nil, err
7930	}
7931	reqHeaders.Set("Content-Type", "application/json")
7932	c.urlParams_.Set("alt", alt)
7933	c.urlParams_.Set("prettyPrint", "false")
7934	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/agent:train")
7935	urls += "?" + c.urlParams_.Encode()
7936	req, err := http.NewRequest("POST", urls, body)
7937	if err != nil {
7938		return nil, err
7939	}
7940	req.Header = reqHeaders
7941	googleapi.Expand(req.URL, map[string]string{
7942		"parent": c.parent,
7943	})
7944	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7945}
7946
7947// Do executes the "dialogflow.projects.agent.train" call.
7948// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
7949// Any non-2xx status code is an error. Response headers are in either
7950// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
7951// was returned at all) in error.(*googleapi.Error).Header. Use
7952// googleapi.IsNotModified to check whether the returned error was
7953// because http.StatusNotModified was returned.
7954func (c *ProjectsAgentTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
7955	gensupport.SetOptions(c.urlParams_, opts...)
7956	res, err := c.doRequest("json")
7957	if res != nil && res.StatusCode == http.StatusNotModified {
7958		if res.Body != nil {
7959			res.Body.Close()
7960		}
7961		return nil, &googleapi.Error{
7962			Code:   res.StatusCode,
7963			Header: res.Header,
7964		}
7965	}
7966	if err != nil {
7967		return nil, err
7968	}
7969	defer googleapi.CloseBody(res)
7970	if err := googleapi.CheckResponse(res); err != nil {
7971		return nil, err
7972	}
7973	ret := &GoogleLongrunningOperation{
7974		ServerResponse: googleapi.ServerResponse{
7975			Header:         res.Header,
7976			HTTPStatusCode: res.StatusCode,
7977		},
7978	}
7979	target := &ret
7980	if err := gensupport.DecodeResponse(target, res); err != nil {
7981		return nil, err
7982	}
7983	return ret, nil
7984	// {
7985	//   "description": "Trains the specified agent.\n\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
7986	//   "flatPath": "v2beta1/projects/{projectsId}/agent:train",
7987	//   "httpMethod": "POST",
7988	//   "id": "dialogflow.projects.agent.train",
7989	//   "parameterOrder": [
7990	//     "parent"
7991	//   ],
7992	//   "parameters": {
7993	//     "parent": {
7994	//       "description": "Required. The project that the agent to train is associated with.\nFormat: `projects/\u003cProject ID\u003e`.",
7995	//       "location": "path",
7996	//       "pattern": "^projects/[^/]+$",
7997	//       "required": true,
7998	//       "type": "string"
7999	//     }
8000	//   },
8001	//   "path": "v2beta1/{+parent}/agent:train",
8002	//   "request": {
8003	//     "$ref": "GoogleCloudDialogflowV2beta1TrainAgentRequest"
8004	//   },
8005	//   "response": {
8006	//     "$ref": "GoogleLongrunningOperation"
8007	//   },
8008	//   "scopes": [
8009	//     "https://www.googleapis.com/auth/cloud-platform",
8010	//     "https://www.googleapis.com/auth/dialogflow"
8011	//   ]
8012	// }
8013
8014}
8015
8016// method id "dialogflow.projects.agent.entityTypes.batchDelete":
8017
8018type ProjectsAgentEntityTypesBatchDeleteCall struct {
8019	s                                                         *Service
8020	parent                                                    string
8021	googleclouddialogflowv2beta1batchdeleteentitytypesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest
8022	urlParams_                                                gensupport.URLParams
8023	ctx_                                                      context.Context
8024	header_                                                   http.Header
8025}
8026
8027// BatchDelete: Deletes entity types in the specified agent.
8028//
8029// Operation <response: google.protobuf.Empty>
8030func (r *ProjectsAgentEntityTypesService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteentitytypesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest) *ProjectsAgentEntityTypesBatchDeleteCall {
8031	c := &ProjectsAgentEntityTypesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8032	c.parent = parent
8033	c.googleclouddialogflowv2beta1batchdeleteentitytypesrequest = googleclouddialogflowv2beta1batchdeleteentitytypesrequest
8034	return c
8035}
8036
8037// Fields allows partial responses to be retrieved. See
8038// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8039// for more information.
8040func (c *ProjectsAgentEntityTypesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchDeleteCall {
8041	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8042	return c
8043}
8044
8045// Context sets the context to be used in this call's Do method. Any
8046// pending HTTP request will be aborted if the provided context is
8047// canceled.
8048func (c *ProjectsAgentEntityTypesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchDeleteCall {
8049	c.ctx_ = ctx
8050	return c
8051}
8052
8053// Header returns an http.Header that can be modified by the caller to
8054// add HTTP headers to the request.
8055func (c *ProjectsAgentEntityTypesBatchDeleteCall) Header() http.Header {
8056	if c.header_ == nil {
8057		c.header_ = make(http.Header)
8058	}
8059	return c.header_
8060}
8061
8062func (c *ProjectsAgentEntityTypesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
8063	reqHeaders := make(http.Header)
8064	for k, v := range c.header_ {
8065		reqHeaders[k] = v
8066	}
8067	reqHeaders.Set("User-Agent", c.s.userAgent())
8068	var body io.Reader = nil
8069	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteentitytypesrequest)
8070	if err != nil {
8071		return nil, err
8072	}
8073	reqHeaders.Set("Content-Type", "application/json")
8074	c.urlParams_.Set("alt", alt)
8075	c.urlParams_.Set("prettyPrint", "false")
8076	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes:batchDelete")
8077	urls += "?" + c.urlParams_.Encode()
8078	req, err := http.NewRequest("POST", urls, body)
8079	if err != nil {
8080		return nil, err
8081	}
8082	req.Header = reqHeaders
8083	googleapi.Expand(req.URL, map[string]string{
8084		"parent": c.parent,
8085	})
8086	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8087}
8088
8089// Do executes the "dialogflow.projects.agent.entityTypes.batchDelete" call.
8090// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
8091// Any non-2xx status code is an error. Response headers are in either
8092// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
8093// was returned at all) in error.(*googleapi.Error).Header. Use
8094// googleapi.IsNotModified to check whether the returned error was
8095// because http.StatusNotModified was returned.
8096func (c *ProjectsAgentEntityTypesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
8097	gensupport.SetOptions(c.urlParams_, opts...)
8098	res, err := c.doRequest("json")
8099	if res != nil && res.StatusCode == http.StatusNotModified {
8100		if res.Body != nil {
8101			res.Body.Close()
8102		}
8103		return nil, &googleapi.Error{
8104			Code:   res.StatusCode,
8105			Header: res.Header,
8106		}
8107	}
8108	if err != nil {
8109		return nil, err
8110	}
8111	defer googleapi.CloseBody(res)
8112	if err := googleapi.CheckResponse(res); err != nil {
8113		return nil, err
8114	}
8115	ret := &GoogleLongrunningOperation{
8116		ServerResponse: googleapi.ServerResponse{
8117			Header:         res.Header,
8118			HTTPStatusCode: res.StatusCode,
8119		},
8120	}
8121	target := &ret
8122	if err := gensupport.DecodeResponse(target, res); err != nil {
8123		return nil, err
8124	}
8125	return ret, nil
8126	// {
8127	//   "description": "Deletes entity types in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
8128	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes:batchDelete",
8129	//   "httpMethod": "POST",
8130	//   "id": "dialogflow.projects.agent.entityTypes.batchDelete",
8131	//   "parameterOrder": [
8132	//     "parent"
8133	//   ],
8134	//   "parameters": {
8135	//     "parent": {
8136	//       "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.",
8137	//       "location": "path",
8138	//       "pattern": "^projects/[^/]+/agent$",
8139	//       "required": true,
8140	//       "type": "string"
8141	//     }
8142	//   },
8143	//   "path": "v2beta1/{+parent}/entityTypes:batchDelete",
8144	//   "request": {
8145	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest"
8146	//   },
8147	//   "response": {
8148	//     "$ref": "GoogleLongrunningOperation"
8149	//   },
8150	//   "scopes": [
8151	//     "https://www.googleapis.com/auth/cloud-platform",
8152	//     "https://www.googleapis.com/auth/dialogflow"
8153	//   ]
8154	// }
8155
8156}
8157
8158// method id "dialogflow.projects.agent.entityTypes.batchUpdate":
8159
8160type ProjectsAgentEntityTypesBatchUpdateCall struct {
8161	s                                                         *Service
8162	parent                                                    string
8163	googleclouddialogflowv2beta1batchupdateentitytypesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest
8164	urlParams_                                                gensupport.URLParams
8165	ctx_                                                      context.Context
8166	header_                                                   http.Header
8167}
8168
8169// BatchUpdate: Updates/Creates multiple entity types in the specified
8170// agent.
8171//
8172// Operation <response: BatchUpdateEntityTypesResponse>
8173func (r *ProjectsAgentEntityTypesService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateentitytypesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest) *ProjectsAgentEntityTypesBatchUpdateCall {
8174	c := &ProjectsAgentEntityTypesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8175	c.parent = parent
8176	c.googleclouddialogflowv2beta1batchupdateentitytypesrequest = googleclouddialogflowv2beta1batchupdateentitytypesrequest
8177	return c
8178}
8179
8180// Fields allows partial responses to be retrieved. See
8181// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8182// for more information.
8183func (c *ProjectsAgentEntityTypesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesBatchUpdateCall {
8184	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8185	return c
8186}
8187
8188// Context sets the context to be used in this call's Do method. Any
8189// pending HTTP request will be aborted if the provided context is
8190// canceled.
8191func (c *ProjectsAgentEntityTypesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesBatchUpdateCall {
8192	c.ctx_ = ctx
8193	return c
8194}
8195
8196// Header returns an http.Header that can be modified by the caller to
8197// add HTTP headers to the request.
8198func (c *ProjectsAgentEntityTypesBatchUpdateCall) Header() http.Header {
8199	if c.header_ == nil {
8200		c.header_ = make(http.Header)
8201	}
8202	return c.header_
8203}
8204
8205func (c *ProjectsAgentEntityTypesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
8206	reqHeaders := make(http.Header)
8207	for k, v := range c.header_ {
8208		reqHeaders[k] = v
8209	}
8210	reqHeaders.Set("User-Agent", c.s.userAgent())
8211	var body io.Reader = nil
8212	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateentitytypesrequest)
8213	if err != nil {
8214		return nil, err
8215	}
8216	reqHeaders.Set("Content-Type", "application/json")
8217	c.urlParams_.Set("alt", alt)
8218	c.urlParams_.Set("prettyPrint", "false")
8219	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes:batchUpdate")
8220	urls += "?" + c.urlParams_.Encode()
8221	req, err := http.NewRequest("POST", urls, body)
8222	if err != nil {
8223		return nil, err
8224	}
8225	req.Header = reqHeaders
8226	googleapi.Expand(req.URL, map[string]string{
8227		"parent": c.parent,
8228	})
8229	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8230}
8231
8232// Do executes the "dialogflow.projects.agent.entityTypes.batchUpdate" call.
8233// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
8234// Any non-2xx status code is an error. Response headers are in either
8235// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
8236// was returned at all) in error.(*googleapi.Error).Header. Use
8237// googleapi.IsNotModified to check whether the returned error was
8238// because http.StatusNotModified was returned.
8239func (c *ProjectsAgentEntityTypesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
8240	gensupport.SetOptions(c.urlParams_, opts...)
8241	res, err := c.doRequest("json")
8242	if res != nil && res.StatusCode == http.StatusNotModified {
8243		if res.Body != nil {
8244			res.Body.Close()
8245		}
8246		return nil, &googleapi.Error{
8247			Code:   res.StatusCode,
8248			Header: res.Header,
8249		}
8250	}
8251	if err != nil {
8252		return nil, err
8253	}
8254	defer googleapi.CloseBody(res)
8255	if err := googleapi.CheckResponse(res); err != nil {
8256		return nil, err
8257	}
8258	ret := &GoogleLongrunningOperation{
8259		ServerResponse: googleapi.ServerResponse{
8260			Header:         res.Header,
8261			HTTPStatusCode: res.StatusCode,
8262		},
8263	}
8264	target := &ret
8265	if err := gensupport.DecodeResponse(target, res); err != nil {
8266		return nil, err
8267	}
8268	return ret, nil
8269	// {
8270	//   "description": "Updates/Creates multiple entity types in the specified agent.\n\nOperation \u003cresponse: BatchUpdateEntityTypesResponse\u003e",
8271	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes:batchUpdate",
8272	//   "httpMethod": "POST",
8273	//   "id": "dialogflow.projects.agent.entityTypes.batchUpdate",
8274	//   "parameterOrder": [
8275	//     "parent"
8276	//   ],
8277	//   "parameters": {
8278	//     "parent": {
8279	//       "description": "Required. The name of the agent to update or create entity types in.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
8280	//       "location": "path",
8281	//       "pattern": "^projects/[^/]+/agent$",
8282	//       "required": true,
8283	//       "type": "string"
8284	//     }
8285	//   },
8286	//   "path": "v2beta1/{+parent}/entityTypes:batchUpdate",
8287	//   "request": {
8288	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest"
8289	//   },
8290	//   "response": {
8291	//     "$ref": "GoogleLongrunningOperation"
8292	//   },
8293	//   "scopes": [
8294	//     "https://www.googleapis.com/auth/cloud-platform",
8295	//     "https://www.googleapis.com/auth/dialogflow"
8296	//   ]
8297	// }
8298
8299}
8300
8301// method id "dialogflow.projects.agent.entityTypes.create":
8302
8303type ProjectsAgentEntityTypesCreateCall struct {
8304	s                                      *Service
8305	parent                                 string
8306	googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType
8307	urlParams_                             gensupport.URLParams
8308	ctx_                                   context.Context
8309	header_                                http.Header
8310}
8311
8312// Create: Creates an entity type in the specified agent.
8313func (r *ProjectsAgentEntityTypesService) Create(parent string, googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType) *ProjectsAgentEntityTypesCreateCall {
8314	c := &ProjectsAgentEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8315	c.parent = parent
8316	c.googleclouddialogflowv2beta1entitytype = googleclouddialogflowv2beta1entitytype
8317	return c
8318}
8319
8320// LanguageCode sets the optional parameter "languageCode": The language
8321// of entity synonyms defined in `entity_type`. If not
8322// specified, the agent's default language is
8323// used.
8324// [Many
8325// languages](https://cloud.google.com/dialogflow/docs/refere
8326// nce/language)
8327// are supported. Note: languages must be enabled in the agent before
8328// they can
8329// be used.
8330func (c *ProjectsAgentEntityTypesCreateCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesCreateCall {
8331	c.urlParams_.Set("languageCode", languageCode)
8332	return c
8333}
8334
8335// Fields allows partial responses to be retrieved. See
8336// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8337// for more information.
8338func (c *ProjectsAgentEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesCreateCall {
8339	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8340	return c
8341}
8342
8343// Context sets the context to be used in this call's Do method. Any
8344// pending HTTP request will be aborted if the provided context is
8345// canceled.
8346func (c *ProjectsAgentEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesCreateCall {
8347	c.ctx_ = ctx
8348	return c
8349}
8350
8351// Header returns an http.Header that can be modified by the caller to
8352// add HTTP headers to the request.
8353func (c *ProjectsAgentEntityTypesCreateCall) Header() http.Header {
8354	if c.header_ == nil {
8355		c.header_ = make(http.Header)
8356	}
8357	return c.header_
8358}
8359
8360func (c *ProjectsAgentEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
8361	reqHeaders := make(http.Header)
8362	for k, v := range c.header_ {
8363		reqHeaders[k] = v
8364	}
8365	reqHeaders.Set("User-Agent", c.s.userAgent())
8366	var body io.Reader = nil
8367	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1entitytype)
8368	if err != nil {
8369		return nil, err
8370	}
8371	reqHeaders.Set("Content-Type", "application/json")
8372	c.urlParams_.Set("alt", alt)
8373	c.urlParams_.Set("prettyPrint", "false")
8374	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
8375	urls += "?" + c.urlParams_.Encode()
8376	req, err := http.NewRequest("POST", urls, body)
8377	if err != nil {
8378		return nil, err
8379	}
8380	req.Header = reqHeaders
8381	googleapi.Expand(req.URL, map[string]string{
8382		"parent": c.parent,
8383	})
8384	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8385}
8386
8387// Do executes the "dialogflow.projects.agent.entityTypes.create" call.
8388// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
8389// be non-nil. Any non-2xx status code is an error. Response headers are
8390// in either
8391// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
8392// a response was returned at all) in error.(*googleapi.Error).Header.
8393// Use googleapi.IsNotModified to check whether the returned error was
8394// because http.StatusNotModified was returned.
8395func (c *ProjectsAgentEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
8396	gensupport.SetOptions(c.urlParams_, opts...)
8397	res, err := c.doRequest("json")
8398	if res != nil && res.StatusCode == http.StatusNotModified {
8399		if res.Body != nil {
8400			res.Body.Close()
8401		}
8402		return nil, &googleapi.Error{
8403			Code:   res.StatusCode,
8404			Header: res.Header,
8405		}
8406	}
8407	if err != nil {
8408		return nil, err
8409	}
8410	defer googleapi.CloseBody(res)
8411	if err := googleapi.CheckResponse(res); err != nil {
8412		return nil, err
8413	}
8414	ret := &GoogleCloudDialogflowV2beta1EntityType{
8415		ServerResponse: googleapi.ServerResponse{
8416			Header:         res.Header,
8417			HTTPStatusCode: res.StatusCode,
8418		},
8419	}
8420	target := &ret
8421	if err := gensupport.DecodeResponse(target, res); err != nil {
8422		return nil, err
8423	}
8424	return ret, nil
8425	// {
8426	//   "description": "Creates an entity type in the specified agent.",
8427	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes",
8428	//   "httpMethod": "POST",
8429	//   "id": "dialogflow.projects.agent.entityTypes.create",
8430	//   "parameterOrder": [
8431	//     "parent"
8432	//   ],
8433	//   "parameters": {
8434	//     "languageCode": {
8435	//       "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.",
8436	//       "location": "query",
8437	//       "type": "string"
8438	//     },
8439	//     "parent": {
8440	//       "description": "Required. The agent to create a entity type for.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
8441	//       "location": "path",
8442	//       "pattern": "^projects/[^/]+/agent$",
8443	//       "required": true,
8444	//       "type": "string"
8445	//     }
8446	//   },
8447	//   "path": "v2beta1/{+parent}/entityTypes",
8448	//   "request": {
8449	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
8450	//   },
8451	//   "response": {
8452	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
8453	//   },
8454	//   "scopes": [
8455	//     "https://www.googleapis.com/auth/cloud-platform",
8456	//     "https://www.googleapis.com/auth/dialogflow"
8457	//   ]
8458	// }
8459
8460}
8461
8462// method id "dialogflow.projects.agent.entityTypes.delete":
8463
8464type ProjectsAgentEntityTypesDeleteCall struct {
8465	s          *Service
8466	name       string
8467	urlParams_ gensupport.URLParams
8468	ctx_       context.Context
8469	header_    http.Header
8470}
8471
8472// Delete: Deletes the specified entity type.
8473func (r *ProjectsAgentEntityTypesService) Delete(name string) *ProjectsAgentEntityTypesDeleteCall {
8474	c := &ProjectsAgentEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8475	c.name = name
8476	return c
8477}
8478
8479// Fields allows partial responses to be retrieved. See
8480// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8481// for more information.
8482func (c *ProjectsAgentEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesDeleteCall {
8483	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8484	return c
8485}
8486
8487// Context sets the context to be used in this call's Do method. Any
8488// pending HTTP request will be aborted if the provided context is
8489// canceled.
8490func (c *ProjectsAgentEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesDeleteCall {
8491	c.ctx_ = ctx
8492	return c
8493}
8494
8495// Header returns an http.Header that can be modified by the caller to
8496// add HTTP headers to the request.
8497func (c *ProjectsAgentEntityTypesDeleteCall) Header() http.Header {
8498	if c.header_ == nil {
8499		c.header_ = make(http.Header)
8500	}
8501	return c.header_
8502}
8503
8504func (c *ProjectsAgentEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
8505	reqHeaders := make(http.Header)
8506	for k, v := range c.header_ {
8507		reqHeaders[k] = v
8508	}
8509	reqHeaders.Set("User-Agent", c.s.userAgent())
8510	var body io.Reader = nil
8511	c.urlParams_.Set("alt", alt)
8512	c.urlParams_.Set("prettyPrint", "false")
8513	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
8514	urls += "?" + c.urlParams_.Encode()
8515	req, err := http.NewRequest("DELETE", urls, body)
8516	if err != nil {
8517		return nil, err
8518	}
8519	req.Header = reqHeaders
8520	googleapi.Expand(req.URL, map[string]string{
8521		"name": c.name,
8522	})
8523	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8524}
8525
8526// Do executes the "dialogflow.projects.agent.entityTypes.delete" call.
8527// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
8528// non-2xx status code is an error. Response headers are in either
8529// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
8530// returned at all) in error.(*googleapi.Error).Header. Use
8531// googleapi.IsNotModified to check whether the returned error was
8532// because http.StatusNotModified was returned.
8533func (c *ProjectsAgentEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
8534	gensupport.SetOptions(c.urlParams_, opts...)
8535	res, err := c.doRequest("json")
8536	if res != nil && res.StatusCode == http.StatusNotModified {
8537		if res.Body != nil {
8538			res.Body.Close()
8539		}
8540		return nil, &googleapi.Error{
8541			Code:   res.StatusCode,
8542			Header: res.Header,
8543		}
8544	}
8545	if err != nil {
8546		return nil, err
8547	}
8548	defer googleapi.CloseBody(res)
8549	if err := googleapi.CheckResponse(res); err != nil {
8550		return nil, err
8551	}
8552	ret := &GoogleProtobufEmpty{
8553		ServerResponse: googleapi.ServerResponse{
8554			Header:         res.Header,
8555			HTTPStatusCode: res.StatusCode,
8556		},
8557	}
8558	target := &ret
8559	if err := gensupport.DecodeResponse(target, res); err != nil {
8560		return nil, err
8561	}
8562	return ret, nil
8563	// {
8564	//   "description": "Deletes the specified entity type.",
8565	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
8566	//   "httpMethod": "DELETE",
8567	//   "id": "dialogflow.projects.agent.entityTypes.delete",
8568	//   "parameterOrder": [
8569	//     "name"
8570	//   ],
8571	//   "parameters": {
8572	//     "name": {
8573	//       "description": "Required. The name of the entity type to delete.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.",
8574	//       "location": "path",
8575	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
8576	//       "required": true,
8577	//       "type": "string"
8578	//     }
8579	//   },
8580	//   "path": "v2beta1/{+name}",
8581	//   "response": {
8582	//     "$ref": "GoogleProtobufEmpty"
8583	//   },
8584	//   "scopes": [
8585	//     "https://www.googleapis.com/auth/cloud-platform",
8586	//     "https://www.googleapis.com/auth/dialogflow"
8587	//   ]
8588	// }
8589
8590}
8591
8592// method id "dialogflow.projects.agent.entityTypes.get":
8593
8594type ProjectsAgentEntityTypesGetCall struct {
8595	s            *Service
8596	name         string
8597	urlParams_   gensupport.URLParams
8598	ifNoneMatch_ string
8599	ctx_         context.Context
8600	header_      http.Header
8601}
8602
8603// Get: Retrieves the specified entity type.
8604func (r *ProjectsAgentEntityTypesService) Get(name string) *ProjectsAgentEntityTypesGetCall {
8605	c := &ProjectsAgentEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8606	c.name = name
8607	return c
8608}
8609
8610// LanguageCode sets the optional parameter "languageCode": The language
8611// to retrieve entity synonyms for. If not specified,
8612// the agent's default language is
8613// used.
8614// [Many
8615// languages](https://cloud.google.com/dialogflow/docs/refere
8616// nce/language)
8617// are supported. Note: languages must be enabled in the agent before
8618// they can
8619// be used.
8620func (c *ProjectsAgentEntityTypesGetCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesGetCall {
8621	c.urlParams_.Set("languageCode", languageCode)
8622	return c
8623}
8624
8625// Fields allows partial responses to be retrieved. See
8626// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8627// for more information.
8628func (c *ProjectsAgentEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesGetCall {
8629	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8630	return c
8631}
8632
8633// IfNoneMatch sets the optional parameter which makes the operation
8634// fail if the object's ETag matches the given value. This is useful for
8635// getting updates only after the object has changed since the last
8636// request. Use googleapi.IsNotModified to check whether the response
8637// error from Do is the result of In-None-Match.
8638func (c *ProjectsAgentEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesGetCall {
8639	c.ifNoneMatch_ = entityTag
8640	return c
8641}
8642
8643// Context sets the context to be used in this call's Do method. Any
8644// pending HTTP request will be aborted if the provided context is
8645// canceled.
8646func (c *ProjectsAgentEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEntityTypesGetCall {
8647	c.ctx_ = ctx
8648	return c
8649}
8650
8651// Header returns an http.Header that can be modified by the caller to
8652// add HTTP headers to the request.
8653func (c *ProjectsAgentEntityTypesGetCall) Header() http.Header {
8654	if c.header_ == nil {
8655		c.header_ = make(http.Header)
8656	}
8657	return c.header_
8658}
8659
8660func (c *ProjectsAgentEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
8661	reqHeaders := make(http.Header)
8662	for k, v := range c.header_ {
8663		reqHeaders[k] = v
8664	}
8665	reqHeaders.Set("User-Agent", c.s.userAgent())
8666	if c.ifNoneMatch_ != "" {
8667		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8668	}
8669	var body io.Reader = nil
8670	c.urlParams_.Set("alt", alt)
8671	c.urlParams_.Set("prettyPrint", "false")
8672	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
8673	urls += "?" + c.urlParams_.Encode()
8674	req, err := http.NewRequest("GET", urls, body)
8675	if err != nil {
8676		return nil, err
8677	}
8678	req.Header = reqHeaders
8679	googleapi.Expand(req.URL, map[string]string{
8680		"name": c.name,
8681	})
8682	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8683}
8684
8685// Do executes the "dialogflow.projects.agent.entityTypes.get" call.
8686// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
8687// be non-nil. Any non-2xx status code is an error. Response headers are
8688// in either
8689// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
8690// a response was returned at all) in error.(*googleapi.Error).Header.
8691// Use googleapi.IsNotModified to check whether the returned error was
8692// because http.StatusNotModified was returned.
8693func (c *ProjectsAgentEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
8694	gensupport.SetOptions(c.urlParams_, opts...)
8695	res, err := c.doRequest("json")
8696	if res != nil && res.StatusCode == http.StatusNotModified {
8697		if res.Body != nil {
8698			res.Body.Close()
8699		}
8700		return nil, &googleapi.Error{
8701			Code:   res.StatusCode,
8702			Header: res.Header,
8703		}
8704	}
8705	if err != nil {
8706		return nil, err
8707	}
8708	defer googleapi.CloseBody(res)
8709	if err := googleapi.CheckResponse(res); err != nil {
8710		return nil, err
8711	}
8712	ret := &GoogleCloudDialogflowV2beta1EntityType{
8713		ServerResponse: googleapi.ServerResponse{
8714			Header:         res.Header,
8715			HTTPStatusCode: res.StatusCode,
8716		},
8717	}
8718	target := &ret
8719	if err := gensupport.DecodeResponse(target, res); err != nil {
8720		return nil, err
8721	}
8722	return ret, nil
8723	// {
8724	//   "description": "Retrieves the specified entity type.",
8725	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
8726	//   "httpMethod": "GET",
8727	//   "id": "dialogflow.projects.agent.entityTypes.get",
8728	//   "parameterOrder": [
8729	//     "name"
8730	//   ],
8731	//   "parameters": {
8732	//     "languageCode": {
8733	//       "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.",
8734	//       "location": "query",
8735	//       "type": "string"
8736	//     },
8737	//     "name": {
8738	//       "description": "Required. The name of the entity type.\nFormat: `projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntityType ID\u003e`.",
8739	//       "location": "path",
8740	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
8741	//       "required": true,
8742	//       "type": "string"
8743	//     }
8744	//   },
8745	//   "path": "v2beta1/{+name}",
8746	//   "response": {
8747	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
8748	//   },
8749	//   "scopes": [
8750	//     "https://www.googleapis.com/auth/cloud-platform",
8751	//     "https://www.googleapis.com/auth/dialogflow"
8752	//   ]
8753	// }
8754
8755}
8756
8757// method id "dialogflow.projects.agent.entityTypes.list":
8758
8759type ProjectsAgentEntityTypesListCall struct {
8760	s            *Service
8761	parent       string
8762	urlParams_   gensupport.URLParams
8763	ifNoneMatch_ string
8764	ctx_         context.Context
8765	header_      http.Header
8766}
8767
8768// List: Returns the list of all entity types in the specified agent.
8769func (r *ProjectsAgentEntityTypesService) List(parent string) *ProjectsAgentEntityTypesListCall {
8770	c := &ProjectsAgentEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8771	c.parent = parent
8772	return c
8773}
8774
8775// LanguageCode sets the optional parameter "languageCode": The language
8776// to list entity synonyms for. If not specified,
8777// the agent's default language is
8778// used.
8779// [Many
8780// languages](https://cloud.google.com/dialogflow/docs/refere
8781// nce/language)
8782// are supported. Note: languages must be enabled in the agent before
8783// they can
8784// be used.
8785func (c *ProjectsAgentEntityTypesListCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesListCall {
8786	c.urlParams_.Set("languageCode", languageCode)
8787	return c
8788}
8789
8790// PageSize sets the optional parameter "pageSize": The maximum number
8791// of items to return in a single page. By
8792// default 100 and at most 1000.
8793func (c *ProjectsAgentEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEntityTypesListCall {
8794	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8795	return c
8796}
8797
8798// PageToken sets the optional parameter "pageToken": The
8799// next_page_token value returned from a previous list request.
8800func (c *ProjectsAgentEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEntityTypesListCall {
8801	c.urlParams_.Set("pageToken", pageToken)
8802	return c
8803}
8804
8805// Fields allows partial responses to be retrieved. See
8806// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8807// for more information.
8808func (c *ProjectsAgentEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesListCall {
8809	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8810	return c
8811}
8812
8813// IfNoneMatch sets the optional parameter which makes the operation
8814// fail if the object's ETag matches the given value. This is useful for
8815// getting updates only after the object has changed since the last
8816// request. Use googleapi.IsNotModified to check whether the response
8817// error from Do is the result of In-None-Match.
8818func (c *ProjectsAgentEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEntityTypesListCall {
8819	c.ifNoneMatch_ = entityTag
8820	return c
8821}
8822
8823// Context sets the context to be used in this call's Do method. Any
8824// pending HTTP request will be aborted if the provided context is
8825// canceled.
8826func (c *ProjectsAgentEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEntityTypesListCall {
8827	c.ctx_ = ctx
8828	return c
8829}
8830
8831// Header returns an http.Header that can be modified by the caller to
8832// add HTTP headers to the request.
8833func (c *ProjectsAgentEntityTypesListCall) Header() http.Header {
8834	if c.header_ == nil {
8835		c.header_ = make(http.Header)
8836	}
8837	return c.header_
8838}
8839
8840func (c *ProjectsAgentEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
8841	reqHeaders := make(http.Header)
8842	for k, v := range c.header_ {
8843		reqHeaders[k] = v
8844	}
8845	reqHeaders.Set("User-Agent", c.s.userAgent())
8846	if c.ifNoneMatch_ != "" {
8847		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8848	}
8849	var body io.Reader = nil
8850	c.urlParams_.Set("alt", alt)
8851	c.urlParams_.Set("prettyPrint", "false")
8852	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
8853	urls += "?" + c.urlParams_.Encode()
8854	req, err := http.NewRequest("GET", urls, body)
8855	if err != nil {
8856		return nil, err
8857	}
8858	req.Header = reqHeaders
8859	googleapi.Expand(req.URL, map[string]string{
8860		"parent": c.parent,
8861	})
8862	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8863}
8864
8865// Do executes the "dialogflow.projects.agent.entityTypes.list" call.
8866// Exactly one of *GoogleCloudDialogflowV2beta1ListEntityTypesResponse
8867// or error will be non-nil. Any non-2xx status code is an error.
8868// Response headers are in either
8869// *GoogleCloudDialogflowV2beta1ListEntityTypesResponse.ServerResponse.He
8870// ader or (if a response was returned at all) in
8871// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8872// whether the returned error was because http.StatusNotModified was
8873// returned.
8874func (c *ProjectsAgentEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListEntityTypesResponse, error) {
8875	gensupport.SetOptions(c.urlParams_, opts...)
8876	res, err := c.doRequest("json")
8877	if res != nil && res.StatusCode == http.StatusNotModified {
8878		if res.Body != nil {
8879			res.Body.Close()
8880		}
8881		return nil, &googleapi.Error{
8882			Code:   res.StatusCode,
8883			Header: res.Header,
8884		}
8885	}
8886	if err != nil {
8887		return nil, err
8888	}
8889	defer googleapi.CloseBody(res)
8890	if err := googleapi.CheckResponse(res); err != nil {
8891		return nil, err
8892	}
8893	ret := &GoogleCloudDialogflowV2beta1ListEntityTypesResponse{
8894		ServerResponse: googleapi.ServerResponse{
8895			Header:         res.Header,
8896			HTTPStatusCode: res.StatusCode,
8897		},
8898	}
8899	target := &ret
8900	if err := gensupport.DecodeResponse(target, res); err != nil {
8901		return nil, err
8902	}
8903	return ret, nil
8904	// {
8905	//   "description": "Returns the list of all entity types in the specified agent.",
8906	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes",
8907	//   "httpMethod": "GET",
8908	//   "id": "dialogflow.projects.agent.entityTypes.list",
8909	//   "parameterOrder": [
8910	//     "parent"
8911	//   ],
8912	//   "parameters": {
8913	//     "languageCode": {
8914	//       "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.",
8915	//       "location": "query",
8916	//       "type": "string"
8917	//     },
8918	//     "pageSize": {
8919	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
8920	//       "format": "int32",
8921	//       "location": "query",
8922	//       "type": "integer"
8923	//     },
8924	//     "pageToken": {
8925	//       "description": "Optional. The next_page_token value returned from a previous list request.",
8926	//       "location": "query",
8927	//       "type": "string"
8928	//     },
8929	//     "parent": {
8930	//       "description": "Required. The agent to list all entity types from.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
8931	//       "location": "path",
8932	//       "pattern": "^projects/[^/]+/agent$",
8933	//       "required": true,
8934	//       "type": "string"
8935	//     }
8936	//   },
8937	//   "path": "v2beta1/{+parent}/entityTypes",
8938	//   "response": {
8939	//     "$ref": "GoogleCloudDialogflowV2beta1ListEntityTypesResponse"
8940	//   },
8941	//   "scopes": [
8942	//     "https://www.googleapis.com/auth/cloud-platform",
8943	//     "https://www.googleapis.com/auth/dialogflow"
8944	//   ]
8945	// }
8946
8947}
8948
8949// Pages invokes f for each page of results.
8950// A non-nil error returned from f will halt the iteration.
8951// The provided context supersedes any context provided to the Context method.
8952func (c *ProjectsAgentEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListEntityTypesResponse) error) error {
8953	c.ctx_ = ctx
8954	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8955	for {
8956		x, err := c.Do()
8957		if err != nil {
8958			return err
8959		}
8960		if err := f(x); err != nil {
8961			return err
8962		}
8963		if x.NextPageToken == "" {
8964			return nil
8965		}
8966		c.PageToken(x.NextPageToken)
8967	}
8968}
8969
8970// method id "dialogflow.projects.agent.entityTypes.patch":
8971
8972type ProjectsAgentEntityTypesPatchCall struct {
8973	s                                      *Service
8974	nameid                                 string
8975	googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType
8976	urlParams_                             gensupport.URLParams
8977	ctx_                                   context.Context
8978	header_                                http.Header
8979}
8980
8981// Patch: Updates the specified entity type.
8982func (r *ProjectsAgentEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1entitytype *GoogleCloudDialogflowV2beta1EntityType) *ProjectsAgentEntityTypesPatchCall {
8983	c := &ProjectsAgentEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8984	c.nameid = nameid
8985	c.googleclouddialogflowv2beta1entitytype = googleclouddialogflowv2beta1entitytype
8986	return c
8987}
8988
8989// LanguageCode sets the optional parameter "languageCode": The language
8990// of entity synonyms defined in `entity_type`. If not
8991// specified, the agent's default language is
8992// used.
8993// [Many
8994// languages](https://cloud.google.com/dialogflow/docs/refere
8995// nce/language)
8996// are supported. Note: languages must be enabled in the agent before
8997// they can
8998// be used.
8999func (c *ProjectsAgentEntityTypesPatchCall) LanguageCode(languageCode string) *ProjectsAgentEntityTypesPatchCall {
9000	c.urlParams_.Set("languageCode", languageCode)
9001	return c
9002}
9003
9004// UpdateMask sets the optional parameter "updateMask": The mask to
9005// control which fields get updated.
9006func (c *ProjectsAgentEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEntityTypesPatchCall {
9007	c.urlParams_.Set("updateMask", updateMask)
9008	return c
9009}
9010
9011// Fields allows partial responses to be retrieved. See
9012// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9013// for more information.
9014func (c *ProjectsAgentEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesPatchCall {
9015	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9016	return c
9017}
9018
9019// Context sets the context to be used in this call's Do method. Any
9020// pending HTTP request will be aborted if the provided context is
9021// canceled.
9022func (c *ProjectsAgentEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEntityTypesPatchCall {
9023	c.ctx_ = ctx
9024	return c
9025}
9026
9027// Header returns an http.Header that can be modified by the caller to
9028// add HTTP headers to the request.
9029func (c *ProjectsAgentEntityTypesPatchCall) Header() http.Header {
9030	if c.header_ == nil {
9031		c.header_ = make(http.Header)
9032	}
9033	return c.header_
9034}
9035
9036func (c *ProjectsAgentEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
9037	reqHeaders := make(http.Header)
9038	for k, v := range c.header_ {
9039		reqHeaders[k] = v
9040	}
9041	reqHeaders.Set("User-Agent", c.s.userAgent())
9042	var body io.Reader = nil
9043	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1entitytype)
9044	if err != nil {
9045		return nil, err
9046	}
9047	reqHeaders.Set("Content-Type", "application/json")
9048	c.urlParams_.Set("alt", alt)
9049	c.urlParams_.Set("prettyPrint", "false")
9050	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
9051	urls += "?" + c.urlParams_.Encode()
9052	req, err := http.NewRequest("PATCH", urls, body)
9053	if err != nil {
9054		return nil, err
9055	}
9056	req.Header = reqHeaders
9057	googleapi.Expand(req.URL, map[string]string{
9058		"name": c.nameid,
9059	})
9060	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9061}
9062
9063// Do executes the "dialogflow.projects.agent.entityTypes.patch" call.
9064// Exactly one of *GoogleCloudDialogflowV2beta1EntityType or error will
9065// be non-nil. Any non-2xx status code is an error. Response headers are
9066// in either
9067// *GoogleCloudDialogflowV2beta1EntityType.ServerResponse.Header or (if
9068// a response was returned at all) in error.(*googleapi.Error).Header.
9069// Use googleapi.IsNotModified to check whether the returned error was
9070// because http.StatusNotModified was returned.
9071func (c *ProjectsAgentEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1EntityType, error) {
9072	gensupport.SetOptions(c.urlParams_, opts...)
9073	res, err := c.doRequest("json")
9074	if res != nil && res.StatusCode == http.StatusNotModified {
9075		if res.Body != nil {
9076			res.Body.Close()
9077		}
9078		return nil, &googleapi.Error{
9079			Code:   res.StatusCode,
9080			Header: res.Header,
9081		}
9082	}
9083	if err != nil {
9084		return nil, err
9085	}
9086	defer googleapi.CloseBody(res)
9087	if err := googleapi.CheckResponse(res); err != nil {
9088		return nil, err
9089	}
9090	ret := &GoogleCloudDialogflowV2beta1EntityType{
9091		ServerResponse: googleapi.ServerResponse{
9092			Header:         res.Header,
9093			HTTPStatusCode: res.StatusCode,
9094		},
9095	}
9096	target := &ret
9097	if err := gensupport.DecodeResponse(target, res); err != nil {
9098		return nil, err
9099	}
9100	return ret, nil
9101	// {
9102	//   "description": "Updates the specified entity type.",
9103	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}",
9104	//   "httpMethod": "PATCH",
9105	//   "id": "dialogflow.projects.agent.entityTypes.patch",
9106	//   "parameterOrder": [
9107	//     "name"
9108	//   ],
9109	//   "parameters": {
9110	//     "languageCode": {
9111	//       "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.",
9112	//       "location": "query",
9113	//       "type": "string"
9114	//     },
9115	//     "name": {
9116	//       "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`.",
9117	//       "location": "path",
9118	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
9119	//       "required": true,
9120	//       "type": "string"
9121	//     },
9122	//     "updateMask": {
9123	//       "description": "Optional. The mask to control which fields get updated.",
9124	//       "format": "google-fieldmask",
9125	//       "location": "query",
9126	//       "type": "string"
9127	//     }
9128	//   },
9129	//   "path": "v2beta1/{+name}",
9130	//   "request": {
9131	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
9132	//   },
9133	//   "response": {
9134	//     "$ref": "GoogleCloudDialogflowV2beta1EntityType"
9135	//   },
9136	//   "scopes": [
9137	//     "https://www.googleapis.com/auth/cloud-platform",
9138	//     "https://www.googleapis.com/auth/dialogflow"
9139	//   ]
9140	// }
9141
9142}
9143
9144// method id "dialogflow.projects.agent.entityTypes.entities.batchCreate":
9145
9146type ProjectsAgentEntityTypesEntitiesBatchCreateCall struct {
9147	s                                                      *Service
9148	parent                                                 string
9149	googleclouddialogflowv2beta1batchcreateentitiesrequest *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest
9150	urlParams_                                             gensupport.URLParams
9151	ctx_                                                   context.Context
9152	header_                                                http.Header
9153}
9154
9155// BatchCreate: Creates multiple new entities in the specified entity
9156// type.
9157//
9158// Operation <response: google.protobuf.Empty>
9159func (r *ProjectsAgentEntityTypesEntitiesService) BatchCreate(parent string, googleclouddialogflowv2beta1batchcreateentitiesrequest *GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
9160	c := &ProjectsAgentEntityTypesEntitiesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9161	c.parent = parent
9162	c.googleclouddialogflowv2beta1batchcreateentitiesrequest = googleclouddialogflowv2beta1batchcreateentitiesrequest
9163	return c
9164}
9165
9166// Fields allows partial responses to be retrieved. See
9167// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9168// for more information.
9169func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
9170	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9171	return c
9172}
9173
9174// Context sets the context to be used in this call's Do method. Any
9175// pending HTTP request will be aborted if the provided context is
9176// canceled.
9177func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchCreateCall {
9178	c.ctx_ = ctx
9179	return c
9180}
9181
9182// Header returns an http.Header that can be modified by the caller to
9183// add HTTP headers to the request.
9184func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Header() http.Header {
9185	if c.header_ == nil {
9186		c.header_ = make(http.Header)
9187	}
9188	return c.header_
9189}
9190
9191func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) doRequest(alt string) (*http.Response, error) {
9192	reqHeaders := make(http.Header)
9193	for k, v := range c.header_ {
9194		reqHeaders[k] = v
9195	}
9196	reqHeaders.Set("User-Agent", c.s.userAgent())
9197	var body io.Reader = nil
9198	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchcreateentitiesrequest)
9199	if err != nil {
9200		return nil, err
9201	}
9202	reqHeaders.Set("Content-Type", "application/json")
9203	c.urlParams_.Set("alt", alt)
9204	c.urlParams_.Set("prettyPrint", "false")
9205	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchCreate")
9206	urls += "?" + c.urlParams_.Encode()
9207	req, err := http.NewRequest("POST", urls, body)
9208	if err != nil {
9209		return nil, err
9210	}
9211	req.Header = reqHeaders
9212	googleapi.Expand(req.URL, map[string]string{
9213		"parent": c.parent,
9214	})
9215	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9216}
9217
9218// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchCreate" call.
9219// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
9220// Any non-2xx status code is an error. Response headers are in either
9221// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
9222// was returned at all) in error.(*googleapi.Error).Header. Use
9223// googleapi.IsNotModified to check whether the returned error was
9224// because http.StatusNotModified was returned.
9225func (c *ProjectsAgentEntityTypesEntitiesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
9226	gensupport.SetOptions(c.urlParams_, opts...)
9227	res, err := c.doRequest("json")
9228	if res != nil && res.StatusCode == http.StatusNotModified {
9229		if res.Body != nil {
9230			res.Body.Close()
9231		}
9232		return nil, &googleapi.Error{
9233			Code:   res.StatusCode,
9234			Header: res.Header,
9235		}
9236	}
9237	if err != nil {
9238		return nil, err
9239	}
9240	defer googleapi.CloseBody(res)
9241	if err := googleapi.CheckResponse(res); err != nil {
9242		return nil, err
9243	}
9244	ret := &GoogleLongrunningOperation{
9245		ServerResponse: googleapi.ServerResponse{
9246			Header:         res.Header,
9247			HTTPStatusCode: res.StatusCode,
9248		},
9249	}
9250	target := &ret
9251	if err := gensupport.DecodeResponse(target, res); err != nil {
9252		return nil, err
9253	}
9254	return ret, nil
9255	// {
9256	//   "description": "Creates multiple new entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
9257	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate",
9258	//   "httpMethod": "POST",
9259	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchCreate",
9260	//   "parameterOrder": [
9261	//     "parent"
9262	//   ],
9263	//   "parameters": {
9264	//     "parent": {
9265	//       "description": "Required. The name of the entity type to create entities in. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
9266	//       "location": "path",
9267	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
9268	//       "required": true,
9269	//       "type": "string"
9270	//     }
9271	//   },
9272	//   "path": "v2beta1/{+parent}/entities:batchCreate",
9273	//   "request": {
9274	//     "$ref": "GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest"
9275	//   },
9276	//   "response": {
9277	//     "$ref": "GoogleLongrunningOperation"
9278	//   },
9279	//   "scopes": [
9280	//     "https://www.googleapis.com/auth/cloud-platform",
9281	//     "https://www.googleapis.com/auth/dialogflow"
9282	//   ]
9283	// }
9284
9285}
9286
9287// method id "dialogflow.projects.agent.entityTypes.entities.batchDelete":
9288
9289type ProjectsAgentEntityTypesEntitiesBatchDeleteCall struct {
9290	s                                                      *Service
9291	parent                                                 string
9292	googleclouddialogflowv2beta1batchdeleteentitiesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest
9293	urlParams_                                             gensupport.URLParams
9294	ctx_                                                   context.Context
9295	header_                                                http.Header
9296}
9297
9298// BatchDelete: Deletes entities in the specified entity
9299// type.
9300//
9301// Operation <response: google.protobuf.Empty>
9302func (r *ProjectsAgentEntityTypesEntitiesService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteentitiesrequest *GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
9303	c := &ProjectsAgentEntityTypesEntitiesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9304	c.parent = parent
9305	c.googleclouddialogflowv2beta1batchdeleteentitiesrequest = googleclouddialogflowv2beta1batchdeleteentitiesrequest
9306	return c
9307}
9308
9309// Fields allows partial responses to be retrieved. See
9310// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9311// for more information.
9312func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
9313	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9314	return c
9315}
9316
9317// Context sets the context to be used in this call's Do method. Any
9318// pending HTTP request will be aborted if the provided context is
9319// canceled.
9320func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchDeleteCall {
9321	c.ctx_ = ctx
9322	return c
9323}
9324
9325// Header returns an http.Header that can be modified by the caller to
9326// add HTTP headers to the request.
9327func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Header() http.Header {
9328	if c.header_ == nil {
9329		c.header_ = make(http.Header)
9330	}
9331	return c.header_
9332}
9333
9334func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
9335	reqHeaders := make(http.Header)
9336	for k, v := range c.header_ {
9337		reqHeaders[k] = v
9338	}
9339	reqHeaders.Set("User-Agent", c.s.userAgent())
9340	var body io.Reader = nil
9341	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteentitiesrequest)
9342	if err != nil {
9343		return nil, err
9344	}
9345	reqHeaders.Set("Content-Type", "application/json")
9346	c.urlParams_.Set("alt", alt)
9347	c.urlParams_.Set("prettyPrint", "false")
9348	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchDelete")
9349	urls += "?" + c.urlParams_.Encode()
9350	req, err := http.NewRequest("POST", urls, body)
9351	if err != nil {
9352		return nil, err
9353	}
9354	req.Header = reqHeaders
9355	googleapi.Expand(req.URL, map[string]string{
9356		"parent": c.parent,
9357	})
9358	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9359}
9360
9361// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchDelete" call.
9362// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
9363// Any non-2xx status code is an error. Response headers are in either
9364// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
9365// was returned at all) in error.(*googleapi.Error).Header. Use
9366// googleapi.IsNotModified to check whether the returned error was
9367// because http.StatusNotModified was returned.
9368func (c *ProjectsAgentEntityTypesEntitiesBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
9369	gensupport.SetOptions(c.urlParams_, opts...)
9370	res, err := c.doRequest("json")
9371	if res != nil && res.StatusCode == http.StatusNotModified {
9372		if res.Body != nil {
9373			res.Body.Close()
9374		}
9375		return nil, &googleapi.Error{
9376			Code:   res.StatusCode,
9377			Header: res.Header,
9378		}
9379	}
9380	if err != nil {
9381		return nil, err
9382	}
9383	defer googleapi.CloseBody(res)
9384	if err := googleapi.CheckResponse(res); err != nil {
9385		return nil, err
9386	}
9387	ret := &GoogleLongrunningOperation{
9388		ServerResponse: googleapi.ServerResponse{
9389			Header:         res.Header,
9390			HTTPStatusCode: res.StatusCode,
9391		},
9392	}
9393	target := &ret
9394	if err := gensupport.DecodeResponse(target, res); err != nil {
9395		return nil, err
9396	}
9397	return ret, nil
9398	// {
9399	//   "description": "Deletes entities in the specified entity type.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
9400	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete",
9401	//   "httpMethod": "POST",
9402	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchDelete",
9403	//   "parameterOrder": [
9404	//     "parent"
9405	//   ],
9406	//   "parameters": {
9407	//     "parent": {
9408	//       "description": "Required. The name of the entity type to delete entries for. Format:\n`projects/\u003cProject ID\u003e/agent/entityTypes/\u003cEntity Type ID\u003e`.",
9409	//       "location": "path",
9410	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
9411	//       "required": true,
9412	//       "type": "string"
9413	//     }
9414	//   },
9415	//   "path": "v2beta1/{+parent}/entities:batchDelete",
9416	//   "request": {
9417	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest"
9418	//   },
9419	//   "response": {
9420	//     "$ref": "GoogleLongrunningOperation"
9421	//   },
9422	//   "scopes": [
9423	//     "https://www.googleapis.com/auth/cloud-platform",
9424	//     "https://www.googleapis.com/auth/dialogflow"
9425	//   ]
9426	// }
9427
9428}
9429
9430// method id "dialogflow.projects.agent.entityTypes.entities.batchUpdate":
9431
9432type ProjectsAgentEntityTypesEntitiesBatchUpdateCall struct {
9433	s                                                      *Service
9434	parent                                                 string
9435	googleclouddialogflowv2beta1batchupdateentitiesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest
9436	urlParams_                                             gensupport.URLParams
9437	ctx_                                                   context.Context
9438	header_                                                http.Header
9439}
9440
9441// BatchUpdate: Updates or creates multiple entities in the specified
9442// entity type. This
9443// method does not affect entities in the entity type that aren't
9444// explicitly
9445// specified in the request.
9446//
9447// Operation <response: google.protobuf.Empty>
9448func (r *ProjectsAgentEntityTypesEntitiesService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateentitiesrequest *GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
9449	c := &ProjectsAgentEntityTypesEntitiesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9450	c.parent = parent
9451	c.googleclouddialogflowv2beta1batchupdateentitiesrequest = googleclouddialogflowv2beta1batchupdateentitiesrequest
9452	return c
9453}
9454
9455// Fields allows partial responses to be retrieved. See
9456// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9457// for more information.
9458func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
9459	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9460	return c
9461}
9462
9463// Context sets the context to be used in this call's Do method. Any
9464// pending HTTP request will be aborted if the provided context is
9465// canceled.
9466func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentEntityTypesEntitiesBatchUpdateCall {
9467	c.ctx_ = ctx
9468	return c
9469}
9470
9471// Header returns an http.Header that can be modified by the caller to
9472// add HTTP headers to the request.
9473func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Header() http.Header {
9474	if c.header_ == nil {
9475		c.header_ = make(http.Header)
9476	}
9477	return c.header_
9478}
9479
9480func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
9481	reqHeaders := make(http.Header)
9482	for k, v := range c.header_ {
9483		reqHeaders[k] = v
9484	}
9485	reqHeaders.Set("User-Agent", c.s.userAgent())
9486	var body io.Reader = nil
9487	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateentitiesrequest)
9488	if err != nil {
9489		return nil, err
9490	}
9491	reqHeaders.Set("Content-Type", "application/json")
9492	c.urlParams_.Set("alt", alt)
9493	c.urlParams_.Set("prettyPrint", "false")
9494	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entities:batchUpdate")
9495	urls += "?" + c.urlParams_.Encode()
9496	req, err := http.NewRequest("POST", urls, body)
9497	if err != nil {
9498		return nil, err
9499	}
9500	req.Header = reqHeaders
9501	googleapi.Expand(req.URL, map[string]string{
9502		"parent": c.parent,
9503	})
9504	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9505}
9506
9507// Do executes the "dialogflow.projects.agent.entityTypes.entities.batchUpdate" call.
9508// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
9509// Any non-2xx status code is an error. Response headers are in either
9510// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
9511// was returned at all) in error.(*googleapi.Error).Header. Use
9512// googleapi.IsNotModified to check whether the returned error was
9513// because http.StatusNotModified was returned.
9514func (c *ProjectsAgentEntityTypesEntitiesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
9515	gensupport.SetOptions(c.urlParams_, opts...)
9516	res, err := c.doRequest("json")
9517	if res != nil && res.StatusCode == http.StatusNotModified {
9518		if res.Body != nil {
9519			res.Body.Close()
9520		}
9521		return nil, &googleapi.Error{
9522			Code:   res.StatusCode,
9523			Header: res.Header,
9524		}
9525	}
9526	if err != nil {
9527		return nil, err
9528	}
9529	defer googleapi.CloseBody(res)
9530	if err := googleapi.CheckResponse(res); err != nil {
9531		return nil, err
9532	}
9533	ret := &GoogleLongrunningOperation{
9534		ServerResponse: googleapi.ServerResponse{
9535			Header:         res.Header,
9536			HTTPStatusCode: res.StatusCode,
9537		},
9538	}
9539	target := &ret
9540	if err := gensupport.DecodeResponse(target, res); err != nil {
9541		return nil, err
9542	}
9543	return ret, nil
9544	// {
9545	//   "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",
9546	//   "flatPath": "v2beta1/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate",
9547	//   "httpMethod": "POST",
9548	//   "id": "dialogflow.projects.agent.entityTypes.entities.batchUpdate",
9549	//   "parameterOrder": [
9550	//     "parent"
9551	//   ],
9552	//   "parameters": {
9553	//     "parent": {
9554	//       "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`.",
9555	//       "location": "path",
9556	//       "pattern": "^projects/[^/]+/agent/entityTypes/[^/]+$",
9557	//       "required": true,
9558	//       "type": "string"
9559	//     }
9560	//   },
9561	//   "path": "v2beta1/{+parent}/entities:batchUpdate",
9562	//   "request": {
9563	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest"
9564	//   },
9565	//   "response": {
9566	//     "$ref": "GoogleLongrunningOperation"
9567	//   },
9568	//   "scopes": [
9569	//     "https://www.googleapis.com/auth/cloud-platform",
9570	//     "https://www.googleapis.com/auth/dialogflow"
9571	//   ]
9572	// }
9573
9574}
9575
9576// method id "dialogflow.projects.agent.environments.users.sessions.deleteContexts":
9577
9578type ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall struct {
9579	s          *Service
9580	parent     string
9581	urlParams_ gensupport.URLParams
9582	ctx_       context.Context
9583	header_    http.Header
9584}
9585
9586// DeleteContexts: Deletes all active contexts in the specified session.
9587func (r *ProjectsAgentEnvironmentsUsersSessionsService) DeleteContexts(parent string) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
9588	c := &ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9589	c.parent = parent
9590	return c
9591}
9592
9593// Fields allows partial responses to be retrieved. See
9594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9595// for more information.
9596func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
9597	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9598	return c
9599}
9600
9601// Context sets the context to be used in this call's Do method. Any
9602// pending HTTP request will be aborted if the provided context is
9603// canceled.
9604func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall {
9605	c.ctx_ = ctx
9606	return c
9607}
9608
9609// Header returns an http.Header that can be modified by the caller to
9610// add HTTP headers to the request.
9611func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Header() http.Header {
9612	if c.header_ == nil {
9613		c.header_ = make(http.Header)
9614	}
9615	return c.header_
9616}
9617
9618func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
9619	reqHeaders := make(http.Header)
9620	for k, v := range c.header_ {
9621		reqHeaders[k] = v
9622	}
9623	reqHeaders.Set("User-Agent", c.s.userAgent())
9624	var body io.Reader = nil
9625	c.urlParams_.Set("alt", alt)
9626	c.urlParams_.Set("prettyPrint", "false")
9627	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
9628	urls += "?" + c.urlParams_.Encode()
9629	req, err := http.NewRequest("DELETE", urls, body)
9630	if err != nil {
9631		return nil, err
9632	}
9633	req.Header = reqHeaders
9634	googleapi.Expand(req.URL, map[string]string{
9635		"parent": c.parent,
9636	})
9637	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9638}
9639
9640// Do executes the "dialogflow.projects.agent.environments.users.sessions.deleteContexts" call.
9641// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
9642// non-2xx status code is an error. Response headers are in either
9643// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
9644// returned at all) in error.(*googleapi.Error).Header. Use
9645// googleapi.IsNotModified to check whether the returned error was
9646// because http.StatusNotModified was returned.
9647func (c *ProjectsAgentEnvironmentsUsersSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
9648	gensupport.SetOptions(c.urlParams_, opts...)
9649	res, err := c.doRequest("json")
9650	if res != nil && res.StatusCode == http.StatusNotModified {
9651		if res.Body != nil {
9652			res.Body.Close()
9653		}
9654		return nil, &googleapi.Error{
9655			Code:   res.StatusCode,
9656			Header: res.Header,
9657		}
9658	}
9659	if err != nil {
9660		return nil, err
9661	}
9662	defer googleapi.CloseBody(res)
9663	if err := googleapi.CheckResponse(res); err != nil {
9664		return nil, err
9665	}
9666	ret := &GoogleProtobufEmpty{
9667		ServerResponse: googleapi.ServerResponse{
9668			Header:         res.Header,
9669			HTTPStatusCode: res.StatusCode,
9670		},
9671	}
9672	target := &ret
9673	if err := gensupport.DecodeResponse(target, res); err != nil {
9674		return nil, err
9675	}
9676	return ret, nil
9677	// {
9678	//   "description": "Deletes all active contexts in the specified session.",
9679	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
9680	//   "httpMethod": "DELETE",
9681	//   "id": "dialogflow.projects.agent.environments.users.sessions.deleteContexts",
9682	//   "parameterOrder": [
9683	//     "parent"
9684	//   ],
9685	//   "parameters": {
9686	//     "parent": {
9687	//       "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.",
9688	//       "location": "path",
9689	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
9690	//       "required": true,
9691	//       "type": "string"
9692	//     }
9693	//   },
9694	//   "path": "v2beta1/{+parent}/contexts",
9695	//   "response": {
9696	//     "$ref": "GoogleProtobufEmpty"
9697	//   },
9698	//   "scopes": [
9699	//     "https://www.googleapis.com/auth/cloud-platform",
9700	//     "https://www.googleapis.com/auth/dialogflow"
9701	//   ]
9702	// }
9703
9704}
9705
9706// method id "dialogflow.projects.agent.environments.users.sessions.detectIntent":
9707
9708type ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall struct {
9709	s                                               *Service
9710	sessionid                                       string
9711	googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest
9712	urlParams_                                      gensupport.URLParams
9713	ctx_                                            context.Context
9714	header_                                         http.Header
9715}
9716
9717// DetectIntent: Processes a natural language query and returns
9718// structured, actionable data
9719// as a result. This method is not idempotent, because it may cause
9720// contexts
9721// and session entity types to be updated, which in turn might
9722// affect
9723// results of future queries.
9724func (r *ProjectsAgentEnvironmentsUsersSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
9725	c := &ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9726	c.sessionid = sessionid
9727	c.googleclouddialogflowv2beta1detectintentrequest = googleclouddialogflowv2beta1detectintentrequest
9728	return c
9729}
9730
9731// Fields allows partial responses to be retrieved. See
9732// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9733// for more information.
9734func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
9735	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9736	return c
9737}
9738
9739// Context sets the context to be used in this call's Do method. Any
9740// pending HTTP request will be aborted if the provided context is
9741// canceled.
9742func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall {
9743	c.ctx_ = ctx
9744	return c
9745}
9746
9747// Header returns an http.Header that can be modified by the caller to
9748// add HTTP headers to the request.
9749func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Header() http.Header {
9750	if c.header_ == nil {
9751		c.header_ = make(http.Header)
9752	}
9753	return c.header_
9754}
9755
9756func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
9757	reqHeaders := make(http.Header)
9758	for k, v := range c.header_ {
9759		reqHeaders[k] = v
9760	}
9761	reqHeaders.Set("User-Agent", c.s.userAgent())
9762	var body io.Reader = nil
9763	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1detectintentrequest)
9764	if err != nil {
9765		return nil, err
9766	}
9767	reqHeaders.Set("Content-Type", "application/json")
9768	c.urlParams_.Set("alt", alt)
9769	c.urlParams_.Set("prettyPrint", "false")
9770	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+session}:detectIntent")
9771	urls += "?" + c.urlParams_.Encode()
9772	req, err := http.NewRequest("POST", urls, body)
9773	if err != nil {
9774		return nil, err
9775	}
9776	req.Header = reqHeaders
9777	googleapi.Expand(req.URL, map[string]string{
9778		"session": c.sessionid,
9779	})
9780	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9781}
9782
9783// Do executes the "dialogflow.projects.agent.environments.users.sessions.detectIntent" call.
9784// Exactly one of *GoogleCloudDialogflowV2beta1DetectIntentResponse or
9785// error will be non-nil. Any non-2xx status code is an error. Response
9786// headers are in either
9787// *GoogleCloudDialogflowV2beta1DetectIntentResponse.ServerResponse.Heade
9788// r or (if a response was returned at all) in
9789// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9790// whether the returned error was because http.StatusNotModified was
9791// returned.
9792func (c *ProjectsAgentEnvironmentsUsersSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1DetectIntentResponse, error) {
9793	gensupport.SetOptions(c.urlParams_, opts...)
9794	res, err := c.doRequest("json")
9795	if res != nil && res.StatusCode == http.StatusNotModified {
9796		if res.Body != nil {
9797			res.Body.Close()
9798		}
9799		return nil, &googleapi.Error{
9800			Code:   res.StatusCode,
9801			Header: res.Header,
9802		}
9803	}
9804	if err != nil {
9805		return nil, err
9806	}
9807	defer googleapi.CloseBody(res)
9808	if err := googleapi.CheckResponse(res); err != nil {
9809		return nil, err
9810	}
9811	ret := &GoogleCloudDialogflowV2beta1DetectIntentResponse{
9812		ServerResponse: googleapi.ServerResponse{
9813			Header:         res.Header,
9814			HTTPStatusCode: res.StatusCode,
9815		},
9816	}
9817	target := &ret
9818	if err := gensupport.DecodeResponse(target, res); err != nil {
9819		return nil, err
9820	}
9821	return ret, nil
9822	// {
9823	//   "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.",
9824	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent",
9825	//   "httpMethod": "POST",
9826	//   "id": "dialogflow.projects.agent.environments.users.sessions.detectIntent",
9827	//   "parameterOrder": [
9828	//     "session"
9829	//   ],
9830	//   "parameters": {
9831	//     "session": {
9832	//       "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 numbers 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.",
9833	//       "location": "path",
9834	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
9835	//       "required": true,
9836	//       "type": "string"
9837	//     }
9838	//   },
9839	//   "path": "v2beta1/{+session}:detectIntent",
9840	//   "request": {
9841	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest"
9842	//   },
9843	//   "response": {
9844	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse"
9845	//   },
9846	//   "scopes": [
9847	//     "https://www.googleapis.com/auth/cloud-platform",
9848	//     "https://www.googleapis.com/auth/dialogflow"
9849	//   ]
9850	// }
9851
9852}
9853
9854// method id "dialogflow.projects.agent.environments.users.sessions.contexts.create":
9855
9856type ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall struct {
9857	s                                   *Service
9858	parent                              string
9859	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
9860	urlParams_                          gensupport.URLParams
9861	ctx_                                context.Context
9862	header_                             http.Header
9863}
9864
9865// Create: Creates a context.
9866//
9867// If the specified context already exists, overrides the context.
9868func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Create(parent string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
9869	c := &ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9870	c.parent = parent
9871	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
9872	return c
9873}
9874
9875// Fields allows partial responses to be retrieved. See
9876// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9877// for more information.
9878func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
9879	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9880	return c
9881}
9882
9883// Context sets the context to be used in this call's Do method. Any
9884// pending HTTP request will be aborted if the provided context is
9885// canceled.
9886func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall {
9887	c.ctx_ = ctx
9888	return c
9889}
9890
9891// Header returns an http.Header that can be modified by the caller to
9892// add HTTP headers to the request.
9893func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Header() http.Header {
9894	if c.header_ == nil {
9895		c.header_ = make(http.Header)
9896	}
9897	return c.header_
9898}
9899
9900func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
9901	reqHeaders := make(http.Header)
9902	for k, v := range c.header_ {
9903		reqHeaders[k] = v
9904	}
9905	reqHeaders.Set("User-Agent", c.s.userAgent())
9906	var body io.Reader = nil
9907	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
9908	if err != nil {
9909		return nil, err
9910	}
9911	reqHeaders.Set("Content-Type", "application/json")
9912	c.urlParams_.Set("alt", alt)
9913	c.urlParams_.Set("prettyPrint", "false")
9914	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
9915	urls += "?" + c.urlParams_.Encode()
9916	req, err := http.NewRequest("POST", urls, body)
9917	if err != nil {
9918		return nil, err
9919	}
9920	req.Header = reqHeaders
9921	googleapi.Expand(req.URL, map[string]string{
9922		"parent": c.parent,
9923	})
9924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9925}
9926
9927// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.create" call.
9928// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
9929// non-nil. Any non-2xx status code is an error. Response headers are in
9930// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
9931// (if a response was returned at all) in
9932// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9933// whether the returned error was because http.StatusNotModified was
9934// returned.
9935func (c *ProjectsAgentEnvironmentsUsersSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
9936	gensupport.SetOptions(c.urlParams_, opts...)
9937	res, err := c.doRequest("json")
9938	if res != nil && res.StatusCode == http.StatusNotModified {
9939		if res.Body != nil {
9940			res.Body.Close()
9941		}
9942		return nil, &googleapi.Error{
9943			Code:   res.StatusCode,
9944			Header: res.Header,
9945		}
9946	}
9947	if err != nil {
9948		return nil, err
9949	}
9950	defer googleapi.CloseBody(res)
9951	if err := googleapi.CheckResponse(res); err != nil {
9952		return nil, err
9953	}
9954	ret := &GoogleCloudDialogflowV2beta1Context{
9955		ServerResponse: googleapi.ServerResponse{
9956			Header:         res.Header,
9957			HTTPStatusCode: res.StatusCode,
9958		},
9959	}
9960	target := &ret
9961	if err := gensupport.DecodeResponse(target, res); err != nil {
9962		return nil, err
9963	}
9964	return ret, nil
9965	// {
9966	//   "description": "Creates a context.\n\nIf the specified context already exists, overrides the context.",
9967	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
9968	//   "httpMethod": "POST",
9969	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.create",
9970	//   "parameterOrder": [
9971	//     "parent"
9972	//   ],
9973	//   "parameters": {
9974	//     "parent": {
9975	//       "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.",
9976	//       "location": "path",
9977	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
9978	//       "required": true,
9979	//       "type": "string"
9980	//     }
9981	//   },
9982	//   "path": "v2beta1/{+parent}/contexts",
9983	//   "request": {
9984	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
9985	//   },
9986	//   "response": {
9987	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
9988	//   },
9989	//   "scopes": [
9990	//     "https://www.googleapis.com/auth/cloud-platform",
9991	//     "https://www.googleapis.com/auth/dialogflow"
9992	//   ]
9993	// }
9994
9995}
9996
9997// method id "dialogflow.projects.agent.environments.users.sessions.contexts.delete":
9998
9999type ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall struct {
10000	s          *Service
10001	name       string
10002	urlParams_ gensupport.URLParams
10003	ctx_       context.Context
10004	header_    http.Header
10005}
10006
10007// Delete: Deletes the specified context.
10008func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Delete(name string) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
10009	c := &ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10010	c.name = name
10011	return c
10012}
10013
10014// Fields allows partial responses to be retrieved. See
10015// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10016// for more information.
10017func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
10018	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10019	return c
10020}
10021
10022// Context sets the context to be used in this call's Do method. Any
10023// pending HTTP request will be aborted if the provided context is
10024// canceled.
10025func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall {
10026	c.ctx_ = ctx
10027	return c
10028}
10029
10030// Header returns an http.Header that can be modified by the caller to
10031// add HTTP headers to the request.
10032func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Header() http.Header {
10033	if c.header_ == nil {
10034		c.header_ = make(http.Header)
10035	}
10036	return c.header_
10037}
10038
10039func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
10040	reqHeaders := make(http.Header)
10041	for k, v := range c.header_ {
10042		reqHeaders[k] = v
10043	}
10044	reqHeaders.Set("User-Agent", c.s.userAgent())
10045	var body io.Reader = nil
10046	c.urlParams_.Set("alt", alt)
10047	c.urlParams_.Set("prettyPrint", "false")
10048	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
10049	urls += "?" + c.urlParams_.Encode()
10050	req, err := http.NewRequest("DELETE", urls, body)
10051	if err != nil {
10052		return nil, err
10053	}
10054	req.Header = reqHeaders
10055	googleapi.Expand(req.URL, map[string]string{
10056		"name": c.name,
10057	})
10058	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10059}
10060
10061// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.delete" call.
10062// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
10063// non-2xx status code is an error. Response headers are in either
10064// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
10065// returned at all) in error.(*googleapi.Error).Header. Use
10066// googleapi.IsNotModified to check whether the returned error was
10067// because http.StatusNotModified was returned.
10068func (c *ProjectsAgentEnvironmentsUsersSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
10069	gensupport.SetOptions(c.urlParams_, opts...)
10070	res, err := c.doRequest("json")
10071	if res != nil && res.StatusCode == http.StatusNotModified {
10072		if res.Body != nil {
10073			res.Body.Close()
10074		}
10075		return nil, &googleapi.Error{
10076			Code:   res.StatusCode,
10077			Header: res.Header,
10078		}
10079	}
10080	if err != nil {
10081		return nil, err
10082	}
10083	defer googleapi.CloseBody(res)
10084	if err := googleapi.CheckResponse(res); err != nil {
10085		return nil, err
10086	}
10087	ret := &GoogleProtobufEmpty{
10088		ServerResponse: googleapi.ServerResponse{
10089			Header:         res.Header,
10090			HTTPStatusCode: res.StatusCode,
10091		},
10092	}
10093	target := &ret
10094	if err := gensupport.DecodeResponse(target, res); err != nil {
10095		return nil, err
10096	}
10097	return ret, nil
10098	// {
10099	//   "description": "Deletes the specified context.",
10100	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
10101	//   "httpMethod": "DELETE",
10102	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.delete",
10103	//   "parameterOrder": [
10104	//     "name"
10105	//   ],
10106	//   "parameters": {
10107	//     "name": {
10108	//       "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.",
10109	//       "location": "path",
10110	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
10111	//       "required": true,
10112	//       "type": "string"
10113	//     }
10114	//   },
10115	//   "path": "v2beta1/{+name}",
10116	//   "response": {
10117	//     "$ref": "GoogleProtobufEmpty"
10118	//   },
10119	//   "scopes": [
10120	//     "https://www.googleapis.com/auth/cloud-platform",
10121	//     "https://www.googleapis.com/auth/dialogflow"
10122	//   ]
10123	// }
10124
10125}
10126
10127// method id "dialogflow.projects.agent.environments.users.sessions.contexts.get":
10128
10129type ProjectsAgentEnvironmentsUsersSessionsContextsGetCall struct {
10130	s            *Service
10131	name         string
10132	urlParams_   gensupport.URLParams
10133	ifNoneMatch_ string
10134	ctx_         context.Context
10135	header_      http.Header
10136}
10137
10138// Get: Retrieves the specified context.
10139func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Get(name string) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
10140	c := &ProjectsAgentEnvironmentsUsersSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10141	c.name = name
10142	return c
10143}
10144
10145// Fields allows partial responses to be retrieved. See
10146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10147// for more information.
10148func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
10149	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10150	return c
10151}
10152
10153// IfNoneMatch sets the optional parameter which makes the operation
10154// fail if the object's ETag matches the given value. This is useful for
10155// getting updates only after the object has changed since the last
10156// request. Use googleapi.IsNotModified to check whether the response
10157// error from Do is the result of In-None-Match.
10158func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
10159	c.ifNoneMatch_ = entityTag
10160	return c
10161}
10162
10163// Context sets the context to be used in this call's Do method. Any
10164// pending HTTP request will be aborted if the provided context is
10165// canceled.
10166func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall {
10167	c.ctx_ = ctx
10168	return c
10169}
10170
10171// Header returns an http.Header that can be modified by the caller to
10172// add HTTP headers to the request.
10173func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Header() http.Header {
10174	if c.header_ == nil {
10175		c.header_ = make(http.Header)
10176	}
10177	return c.header_
10178}
10179
10180func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
10181	reqHeaders := make(http.Header)
10182	for k, v := range c.header_ {
10183		reqHeaders[k] = v
10184	}
10185	reqHeaders.Set("User-Agent", c.s.userAgent())
10186	if c.ifNoneMatch_ != "" {
10187		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10188	}
10189	var body io.Reader = nil
10190	c.urlParams_.Set("alt", alt)
10191	c.urlParams_.Set("prettyPrint", "false")
10192	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
10193	urls += "?" + c.urlParams_.Encode()
10194	req, err := http.NewRequest("GET", urls, body)
10195	if err != nil {
10196		return nil, err
10197	}
10198	req.Header = reqHeaders
10199	googleapi.Expand(req.URL, map[string]string{
10200		"name": c.name,
10201	})
10202	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10203}
10204
10205// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.get" call.
10206// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
10207// non-nil. Any non-2xx status code is an error. Response headers are in
10208// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
10209// (if a response was returned at all) in
10210// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10211// whether the returned error was because http.StatusNotModified was
10212// returned.
10213func (c *ProjectsAgentEnvironmentsUsersSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
10214	gensupport.SetOptions(c.urlParams_, opts...)
10215	res, err := c.doRequest("json")
10216	if res != nil && res.StatusCode == http.StatusNotModified {
10217		if res.Body != nil {
10218			res.Body.Close()
10219		}
10220		return nil, &googleapi.Error{
10221			Code:   res.StatusCode,
10222			Header: res.Header,
10223		}
10224	}
10225	if err != nil {
10226		return nil, err
10227	}
10228	defer googleapi.CloseBody(res)
10229	if err := googleapi.CheckResponse(res); err != nil {
10230		return nil, err
10231	}
10232	ret := &GoogleCloudDialogflowV2beta1Context{
10233		ServerResponse: googleapi.ServerResponse{
10234			Header:         res.Header,
10235			HTTPStatusCode: res.StatusCode,
10236		},
10237	}
10238	target := &ret
10239	if err := gensupport.DecodeResponse(target, res); err != nil {
10240		return nil, err
10241	}
10242	return ret, nil
10243	// {
10244	//   "description": "Retrieves the specified context.",
10245	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
10246	//   "httpMethod": "GET",
10247	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.get",
10248	//   "parameterOrder": [
10249	//     "name"
10250	//   ],
10251	//   "parameters": {
10252	//     "name": {
10253	//       "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.",
10254	//       "location": "path",
10255	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
10256	//       "required": true,
10257	//       "type": "string"
10258	//     }
10259	//   },
10260	//   "path": "v2beta1/{+name}",
10261	//   "response": {
10262	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
10263	//   },
10264	//   "scopes": [
10265	//     "https://www.googleapis.com/auth/cloud-platform",
10266	//     "https://www.googleapis.com/auth/dialogflow"
10267	//   ]
10268	// }
10269
10270}
10271
10272// method id "dialogflow.projects.agent.environments.users.sessions.contexts.list":
10273
10274type ProjectsAgentEnvironmentsUsersSessionsContextsListCall struct {
10275	s            *Service
10276	parent       string
10277	urlParams_   gensupport.URLParams
10278	ifNoneMatch_ string
10279	ctx_         context.Context
10280	header_      http.Header
10281}
10282
10283// List: Returns the list of all contexts in the specified session.
10284func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) List(parent string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
10285	c := &ProjectsAgentEnvironmentsUsersSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10286	c.parent = parent
10287	return c
10288}
10289
10290// PageSize sets the optional parameter "pageSize": The maximum number
10291// of items to return in a single page. By
10292// default 100 and at most 1000.
10293func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
10294	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10295	return c
10296}
10297
10298// PageToken sets the optional parameter "pageToken": The
10299// next_page_token value returned from a previous list request.
10300func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
10301	c.urlParams_.Set("pageToken", pageToken)
10302	return c
10303}
10304
10305// Fields allows partial responses to be retrieved. See
10306// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10307// for more information.
10308func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
10309	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10310	return c
10311}
10312
10313// IfNoneMatch sets the optional parameter which makes the operation
10314// fail if the object's ETag matches the given value. This is useful for
10315// getting updates only after the object has changed since the last
10316// request. Use googleapi.IsNotModified to check whether the response
10317// error from Do is the result of In-None-Match.
10318func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
10319	c.ifNoneMatch_ = entityTag
10320	return c
10321}
10322
10323// Context sets the context to be used in this call's Do method. Any
10324// pending HTTP request will be aborted if the provided context is
10325// canceled.
10326func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsListCall {
10327	c.ctx_ = ctx
10328	return c
10329}
10330
10331// Header returns an http.Header that can be modified by the caller to
10332// add HTTP headers to the request.
10333func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Header() http.Header {
10334	if c.header_ == nil {
10335		c.header_ = make(http.Header)
10336	}
10337	return c.header_
10338}
10339
10340func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
10341	reqHeaders := make(http.Header)
10342	for k, v := range c.header_ {
10343		reqHeaders[k] = v
10344	}
10345	reqHeaders.Set("User-Agent", c.s.userAgent())
10346	if c.ifNoneMatch_ != "" {
10347		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10348	}
10349	var body io.Reader = nil
10350	c.urlParams_.Set("alt", alt)
10351	c.urlParams_.Set("prettyPrint", "false")
10352	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
10353	urls += "?" + c.urlParams_.Encode()
10354	req, err := http.NewRequest("GET", urls, body)
10355	if err != nil {
10356		return nil, err
10357	}
10358	req.Header = reqHeaders
10359	googleapi.Expand(req.URL, map[string]string{
10360		"parent": c.parent,
10361	})
10362	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10363}
10364
10365// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.list" call.
10366// Exactly one of *GoogleCloudDialogflowV2beta1ListContextsResponse or
10367// error will be non-nil. Any non-2xx status code is an error. Response
10368// headers are in either
10369// *GoogleCloudDialogflowV2beta1ListContextsResponse.ServerResponse.Heade
10370// r or (if a response was returned at all) in
10371// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10372// whether the returned error was because http.StatusNotModified was
10373// returned.
10374func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListContextsResponse, error) {
10375	gensupport.SetOptions(c.urlParams_, opts...)
10376	res, err := c.doRequest("json")
10377	if res != nil && res.StatusCode == http.StatusNotModified {
10378		if res.Body != nil {
10379			res.Body.Close()
10380		}
10381		return nil, &googleapi.Error{
10382			Code:   res.StatusCode,
10383			Header: res.Header,
10384		}
10385	}
10386	if err != nil {
10387		return nil, err
10388	}
10389	defer googleapi.CloseBody(res)
10390	if err := googleapi.CheckResponse(res); err != nil {
10391		return nil, err
10392	}
10393	ret := &GoogleCloudDialogflowV2beta1ListContextsResponse{
10394		ServerResponse: googleapi.ServerResponse{
10395			Header:         res.Header,
10396			HTTPStatusCode: res.StatusCode,
10397		},
10398	}
10399	target := &ret
10400	if err := gensupport.DecodeResponse(target, res); err != nil {
10401		return nil, err
10402	}
10403	return ret, nil
10404	// {
10405	//   "description": "Returns the list of all contexts in the specified session.",
10406	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts",
10407	//   "httpMethod": "GET",
10408	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.list",
10409	//   "parameterOrder": [
10410	//     "parent"
10411	//   ],
10412	//   "parameters": {
10413	//     "pageSize": {
10414	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
10415	//       "format": "int32",
10416	//       "location": "query",
10417	//       "type": "integer"
10418	//     },
10419	//     "pageToken": {
10420	//       "description": "Optional. The next_page_token value returned from a previous list request.",
10421	//       "location": "query",
10422	//       "type": "string"
10423	//     },
10424	//     "parent": {
10425	//       "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.",
10426	//       "location": "path",
10427	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
10428	//       "required": true,
10429	//       "type": "string"
10430	//     }
10431	//   },
10432	//   "path": "v2beta1/{+parent}/contexts",
10433	//   "response": {
10434	//     "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse"
10435	//   },
10436	//   "scopes": [
10437	//     "https://www.googleapis.com/auth/cloud-platform",
10438	//     "https://www.googleapis.com/auth/dialogflow"
10439	//   ]
10440	// }
10441
10442}
10443
10444// Pages invokes f for each page of results.
10445// A non-nil error returned from f will halt the iteration.
10446// The provided context supersedes any context provided to the Context method.
10447func (c *ProjectsAgentEnvironmentsUsersSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListContextsResponse) error) error {
10448	c.ctx_ = ctx
10449	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10450	for {
10451		x, err := c.Do()
10452		if err != nil {
10453			return err
10454		}
10455		if err := f(x); err != nil {
10456			return err
10457		}
10458		if x.NextPageToken == "" {
10459			return nil
10460		}
10461		c.PageToken(x.NextPageToken)
10462	}
10463}
10464
10465// method id "dialogflow.projects.agent.environments.users.sessions.contexts.patch":
10466
10467type ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall struct {
10468	s                                   *Service
10469	nameid                              string
10470	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
10471	urlParams_                          gensupport.URLParams
10472	ctx_                                context.Context
10473	header_                             http.Header
10474}
10475
10476// Patch: Updates the specified context.
10477func (r *ProjectsAgentEnvironmentsUsersSessionsContextsService) Patch(nameid string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
10478	c := &ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10479	c.nameid = nameid
10480	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
10481	return c
10482}
10483
10484// UpdateMask sets the optional parameter "updateMask": The mask to
10485// control which fields get updated.
10486func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
10487	c.urlParams_.Set("updateMask", updateMask)
10488	return c
10489}
10490
10491// Fields allows partial responses to be retrieved. See
10492// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10493// for more information.
10494func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
10495	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10496	return c
10497}
10498
10499// Context sets the context to be used in this call's Do method. Any
10500// pending HTTP request will be aborted if the provided context is
10501// canceled.
10502func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall {
10503	c.ctx_ = ctx
10504	return c
10505}
10506
10507// Header returns an http.Header that can be modified by the caller to
10508// add HTTP headers to the request.
10509func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Header() http.Header {
10510	if c.header_ == nil {
10511		c.header_ = make(http.Header)
10512	}
10513	return c.header_
10514}
10515
10516func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
10517	reqHeaders := make(http.Header)
10518	for k, v := range c.header_ {
10519		reqHeaders[k] = v
10520	}
10521	reqHeaders.Set("User-Agent", c.s.userAgent())
10522	var body io.Reader = nil
10523	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
10524	if err != nil {
10525		return nil, err
10526	}
10527	reqHeaders.Set("Content-Type", "application/json")
10528	c.urlParams_.Set("alt", alt)
10529	c.urlParams_.Set("prettyPrint", "false")
10530	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
10531	urls += "?" + c.urlParams_.Encode()
10532	req, err := http.NewRequest("PATCH", urls, body)
10533	if err != nil {
10534		return nil, err
10535	}
10536	req.Header = reqHeaders
10537	googleapi.Expand(req.URL, map[string]string{
10538		"name": c.nameid,
10539	})
10540	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10541}
10542
10543// Do executes the "dialogflow.projects.agent.environments.users.sessions.contexts.patch" call.
10544// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
10545// non-nil. Any non-2xx status code is an error. Response headers are in
10546// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
10547// (if a response was returned at all) in
10548// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10549// whether the returned error was because http.StatusNotModified was
10550// returned.
10551func (c *ProjectsAgentEnvironmentsUsersSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
10552	gensupport.SetOptions(c.urlParams_, opts...)
10553	res, err := c.doRequest("json")
10554	if res != nil && res.StatusCode == http.StatusNotModified {
10555		if res.Body != nil {
10556			res.Body.Close()
10557		}
10558		return nil, &googleapi.Error{
10559			Code:   res.StatusCode,
10560			Header: res.Header,
10561		}
10562	}
10563	if err != nil {
10564		return nil, err
10565	}
10566	defer googleapi.CloseBody(res)
10567	if err := googleapi.CheckResponse(res); err != nil {
10568		return nil, err
10569	}
10570	ret := &GoogleCloudDialogflowV2beta1Context{
10571		ServerResponse: googleapi.ServerResponse{
10572			Header:         res.Header,
10573			HTTPStatusCode: res.StatusCode,
10574		},
10575	}
10576	target := &ret
10577	if err := gensupport.DecodeResponse(target, res); err != nil {
10578		return nil, err
10579	}
10580	return ret, nil
10581	// {
10582	//   "description": "Updates the specified context.",
10583	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}",
10584	//   "httpMethod": "PATCH",
10585	//   "id": "dialogflow.projects.agent.environments.users.sessions.contexts.patch",
10586	//   "parameterOrder": [
10587	//     "name"
10588	//   ],
10589	//   "parameters": {
10590	//     "name": {
10591	//       "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.",
10592	//       "location": "path",
10593	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$",
10594	//       "required": true,
10595	//       "type": "string"
10596	//     },
10597	//     "updateMask": {
10598	//       "description": "Optional. The mask to control which fields get updated.",
10599	//       "format": "google-fieldmask",
10600	//       "location": "query",
10601	//       "type": "string"
10602	//     }
10603	//   },
10604	//   "path": "v2beta1/{+name}",
10605	//   "request": {
10606	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
10607	//   },
10608	//   "response": {
10609	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
10610	//   },
10611	//   "scopes": [
10612	//     "https://www.googleapis.com/auth/cloud-platform",
10613	//     "https://www.googleapis.com/auth/dialogflow"
10614	//   ]
10615	// }
10616
10617}
10618
10619// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.create":
10620
10621type ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall struct {
10622	s                                             *Service
10623	parent                                        string
10624	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
10625	urlParams_                                    gensupport.URLParams
10626	ctx_                                          context.Context
10627	header_                                       http.Header
10628}
10629
10630// Create: Creates a session entity type.
10631//
10632// If the specified session entity type already exists, overrides
10633// the
10634// session entity type.
10635func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
10636	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10637	c.parent = parent
10638	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
10639	return c
10640}
10641
10642// Fields allows partial responses to be retrieved. See
10643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10644// for more information.
10645func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
10646	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10647	return c
10648}
10649
10650// Context sets the context to be used in this call's Do method. Any
10651// pending HTTP request will be aborted if the provided context is
10652// canceled.
10653func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall {
10654	c.ctx_ = ctx
10655	return c
10656}
10657
10658// Header returns an http.Header that can be modified by the caller to
10659// add HTTP headers to the request.
10660func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Header() http.Header {
10661	if c.header_ == nil {
10662		c.header_ = make(http.Header)
10663	}
10664	return c.header_
10665}
10666
10667func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
10668	reqHeaders := make(http.Header)
10669	for k, v := range c.header_ {
10670		reqHeaders[k] = v
10671	}
10672	reqHeaders.Set("User-Agent", c.s.userAgent())
10673	var body io.Reader = nil
10674	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
10675	if err != nil {
10676		return nil, err
10677	}
10678	reqHeaders.Set("Content-Type", "application/json")
10679	c.urlParams_.Set("alt", alt)
10680	c.urlParams_.Set("prettyPrint", "false")
10681	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
10682	urls += "?" + c.urlParams_.Encode()
10683	req, err := http.NewRequest("POST", urls, body)
10684	if err != nil {
10685		return nil, err
10686	}
10687	req.Header = reqHeaders
10688	googleapi.Expand(req.URL, map[string]string{
10689		"parent": c.parent,
10690	})
10691	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10692}
10693
10694// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.create" call.
10695// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
10696// error will be non-nil. Any non-2xx status code is an error. Response
10697// headers are in either
10698// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
10699// or (if a response was returned at all) in
10700// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10701// whether the returned error was because http.StatusNotModified was
10702// returned.
10703func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
10704	gensupport.SetOptions(c.urlParams_, opts...)
10705	res, err := c.doRequest("json")
10706	if res != nil && res.StatusCode == http.StatusNotModified {
10707		if res.Body != nil {
10708			res.Body.Close()
10709		}
10710		return nil, &googleapi.Error{
10711			Code:   res.StatusCode,
10712			Header: res.Header,
10713		}
10714	}
10715	if err != nil {
10716		return nil, err
10717	}
10718	defer googleapi.CloseBody(res)
10719	if err := googleapi.CheckResponse(res); err != nil {
10720		return nil, err
10721	}
10722	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
10723		ServerResponse: googleapi.ServerResponse{
10724			Header:         res.Header,
10725			HTTPStatusCode: res.StatusCode,
10726		},
10727	}
10728	target := &ret
10729	if err := gensupport.DecodeResponse(target, res); err != nil {
10730		return nil, err
10731	}
10732	return ret, nil
10733	// {
10734	//   "description": "Creates a session entity type.\n\nIf the specified session entity type already exists, overrides the\nsession entity type.",
10735	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
10736	//   "httpMethod": "POST",
10737	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.create",
10738	//   "parameterOrder": [
10739	//     "parent"
10740	//   ],
10741	//   "parameters": {
10742	//     "parent": {
10743	//       "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.",
10744	//       "location": "path",
10745	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
10746	//       "required": true,
10747	//       "type": "string"
10748	//     }
10749	//   },
10750	//   "path": "v2beta1/{+parent}/entityTypes",
10751	//   "request": {
10752	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
10753	//   },
10754	//   "response": {
10755	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
10756	//   },
10757	//   "scopes": [
10758	//     "https://www.googleapis.com/auth/cloud-platform",
10759	//     "https://www.googleapis.com/auth/dialogflow"
10760	//   ]
10761	// }
10762
10763}
10764
10765// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete":
10766
10767type ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall struct {
10768	s          *Service
10769	name       string
10770	urlParams_ gensupport.URLParams
10771	ctx_       context.Context
10772	header_    http.Header
10773}
10774
10775// Delete: Deletes the specified session entity type.
10776func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Delete(name string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
10777	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10778	c.name = name
10779	return c
10780}
10781
10782// Fields allows partial responses to be retrieved. See
10783// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10784// for more information.
10785func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
10786	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10787	return c
10788}
10789
10790// Context sets the context to be used in this call's Do method. Any
10791// pending HTTP request will be aborted if the provided context is
10792// canceled.
10793func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall {
10794	c.ctx_ = ctx
10795	return c
10796}
10797
10798// Header returns an http.Header that can be modified by the caller to
10799// add HTTP headers to the request.
10800func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Header() http.Header {
10801	if c.header_ == nil {
10802		c.header_ = make(http.Header)
10803	}
10804	return c.header_
10805}
10806
10807func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
10808	reqHeaders := make(http.Header)
10809	for k, v := range c.header_ {
10810		reqHeaders[k] = v
10811	}
10812	reqHeaders.Set("User-Agent", c.s.userAgent())
10813	var body io.Reader = nil
10814	c.urlParams_.Set("alt", alt)
10815	c.urlParams_.Set("prettyPrint", "false")
10816	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
10817	urls += "?" + c.urlParams_.Encode()
10818	req, err := http.NewRequest("DELETE", urls, body)
10819	if err != nil {
10820		return nil, err
10821	}
10822	req.Header = reqHeaders
10823	googleapi.Expand(req.URL, map[string]string{
10824		"name": c.name,
10825	})
10826	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10827}
10828
10829// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete" call.
10830// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
10831// non-2xx status code is an error. Response headers are in either
10832// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
10833// returned at all) in error.(*googleapi.Error).Header. Use
10834// googleapi.IsNotModified to check whether the returned error was
10835// because http.StatusNotModified was returned.
10836func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
10837	gensupport.SetOptions(c.urlParams_, opts...)
10838	res, err := c.doRequest("json")
10839	if res != nil && res.StatusCode == http.StatusNotModified {
10840		if res.Body != nil {
10841			res.Body.Close()
10842		}
10843		return nil, &googleapi.Error{
10844			Code:   res.StatusCode,
10845			Header: res.Header,
10846		}
10847	}
10848	if err != nil {
10849		return nil, err
10850	}
10851	defer googleapi.CloseBody(res)
10852	if err := googleapi.CheckResponse(res); err != nil {
10853		return nil, err
10854	}
10855	ret := &GoogleProtobufEmpty{
10856		ServerResponse: googleapi.ServerResponse{
10857			Header:         res.Header,
10858			HTTPStatusCode: res.StatusCode,
10859		},
10860	}
10861	target := &ret
10862	if err := gensupport.DecodeResponse(target, res); err != nil {
10863		return nil, err
10864	}
10865	return ret, nil
10866	// {
10867	//   "description": "Deletes the specified session entity type.",
10868	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
10869	//   "httpMethod": "DELETE",
10870	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.delete",
10871	//   "parameterOrder": [
10872	//     "name"
10873	//   ],
10874	//   "parameters": {
10875	//     "name": {
10876	//       "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.",
10877	//       "location": "path",
10878	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
10879	//       "required": true,
10880	//       "type": "string"
10881	//     }
10882	//   },
10883	//   "path": "v2beta1/{+name}",
10884	//   "response": {
10885	//     "$ref": "GoogleProtobufEmpty"
10886	//   },
10887	//   "scopes": [
10888	//     "https://www.googleapis.com/auth/cloud-platform",
10889	//     "https://www.googleapis.com/auth/dialogflow"
10890	//   ]
10891	// }
10892
10893}
10894
10895// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.get":
10896
10897type ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall struct {
10898	s            *Service
10899	name         string
10900	urlParams_   gensupport.URLParams
10901	ifNoneMatch_ string
10902	ctx_         context.Context
10903	header_      http.Header
10904}
10905
10906// Get: Retrieves the specified session entity type.
10907func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Get(name string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
10908	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10909	c.name = name
10910	return c
10911}
10912
10913// Fields allows partial responses to be retrieved. See
10914// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10915// for more information.
10916func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
10917	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10918	return c
10919}
10920
10921// IfNoneMatch sets the optional parameter which makes the operation
10922// fail if the object's ETag matches the given value. This is useful for
10923// getting updates only after the object has changed since the last
10924// request. Use googleapi.IsNotModified to check whether the response
10925// error from Do is the result of In-None-Match.
10926func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
10927	c.ifNoneMatch_ = entityTag
10928	return c
10929}
10930
10931// Context sets the context to be used in this call's Do method. Any
10932// pending HTTP request will be aborted if the provided context is
10933// canceled.
10934func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall {
10935	c.ctx_ = ctx
10936	return c
10937}
10938
10939// Header returns an http.Header that can be modified by the caller to
10940// add HTTP headers to the request.
10941func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Header() http.Header {
10942	if c.header_ == nil {
10943		c.header_ = make(http.Header)
10944	}
10945	return c.header_
10946}
10947
10948func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
10949	reqHeaders := make(http.Header)
10950	for k, v := range c.header_ {
10951		reqHeaders[k] = v
10952	}
10953	reqHeaders.Set("User-Agent", c.s.userAgent())
10954	if c.ifNoneMatch_ != "" {
10955		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10956	}
10957	var body io.Reader = nil
10958	c.urlParams_.Set("alt", alt)
10959	c.urlParams_.Set("prettyPrint", "false")
10960	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
10961	urls += "?" + c.urlParams_.Encode()
10962	req, err := http.NewRequest("GET", urls, body)
10963	if err != nil {
10964		return nil, err
10965	}
10966	req.Header = reqHeaders
10967	googleapi.Expand(req.URL, map[string]string{
10968		"name": c.name,
10969	})
10970	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10971}
10972
10973// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.get" call.
10974// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
10975// error will be non-nil. Any non-2xx status code is an error. Response
10976// headers are in either
10977// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
10978// or (if a response was returned at all) in
10979// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10980// whether the returned error was because http.StatusNotModified was
10981// returned.
10982func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, 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 := &GoogleCloudDialogflowV2beta1SessionEntityType{
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": "Retrieves the specified session entity type.",
11014	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
11015	//   "httpMethod": "GET",
11016	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.get",
11017	//   "parameterOrder": [
11018	//     "name"
11019	//   ],
11020	//   "parameters": {
11021	//     "name": {
11022	//       "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.",
11023	//       "location": "path",
11024	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
11025	//       "required": true,
11026	//       "type": "string"
11027	//     }
11028	//   },
11029	//   "path": "v2beta1/{+name}",
11030	//   "response": {
11031	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
11032	//   },
11033	//   "scopes": [
11034	//     "https://www.googleapis.com/auth/cloud-platform",
11035	//     "https://www.googleapis.com/auth/dialogflow"
11036	//   ]
11037	// }
11038
11039}
11040
11041// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.list":
11042
11043type ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall struct {
11044	s            *Service
11045	parent       string
11046	urlParams_   gensupport.URLParams
11047	ifNoneMatch_ string
11048	ctx_         context.Context
11049	header_      http.Header
11050}
11051
11052// List: Returns the list of all session entity types in the specified
11053// session.
11054func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) List(parent string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
11055	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11056	c.parent = parent
11057	return c
11058}
11059
11060// PageSize sets the optional parameter "pageSize": The maximum number
11061// of items to return in a single page. By
11062// default 100 and at most 1000.
11063func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
11064	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11065	return c
11066}
11067
11068// PageToken sets the optional parameter "pageToken": The
11069// next_page_token value returned from a previous list request.
11070func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
11071	c.urlParams_.Set("pageToken", pageToken)
11072	return c
11073}
11074
11075// Fields allows partial responses to be retrieved. See
11076// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11077// for more information.
11078func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
11079	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11080	return c
11081}
11082
11083// IfNoneMatch sets the optional parameter which makes the operation
11084// fail if the object's ETag matches the given value. This is useful for
11085// getting updates only after the object has changed since the last
11086// request. Use googleapi.IsNotModified to check whether the response
11087// error from Do is the result of In-None-Match.
11088func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
11089	c.ifNoneMatch_ = entityTag
11090	return c
11091}
11092
11093// Context sets the context to be used in this call's Do method. Any
11094// pending HTTP request will be aborted if the provided context is
11095// canceled.
11096func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall {
11097	c.ctx_ = ctx
11098	return c
11099}
11100
11101// Header returns an http.Header that can be modified by the caller to
11102// add HTTP headers to the request.
11103func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Header() http.Header {
11104	if c.header_ == nil {
11105		c.header_ = make(http.Header)
11106	}
11107	return c.header_
11108}
11109
11110func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
11111	reqHeaders := make(http.Header)
11112	for k, v := range c.header_ {
11113		reqHeaders[k] = v
11114	}
11115	reqHeaders.Set("User-Agent", c.s.userAgent())
11116	if c.ifNoneMatch_ != "" {
11117		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11118	}
11119	var body io.Reader = nil
11120	c.urlParams_.Set("alt", alt)
11121	c.urlParams_.Set("prettyPrint", "false")
11122	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
11123	urls += "?" + c.urlParams_.Encode()
11124	req, err := http.NewRequest("GET", urls, body)
11125	if err != nil {
11126		return nil, err
11127	}
11128	req.Header = reqHeaders
11129	googleapi.Expand(req.URL, map[string]string{
11130		"parent": c.parent,
11131	})
11132	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11133}
11134
11135// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.list" call.
11136// Exactly one of
11137// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse or error
11138// will be non-nil. Any non-2xx status code is an error. Response
11139// headers are in either
11140// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse.ServerResp
11141// onse.Header or (if a response was returned at all) in
11142// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11143// whether the returned error was because http.StatusNotModified was
11144// returned.
11145func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse, error) {
11146	gensupport.SetOptions(c.urlParams_, opts...)
11147	res, err := c.doRequest("json")
11148	if res != nil && res.StatusCode == http.StatusNotModified {
11149		if res.Body != nil {
11150			res.Body.Close()
11151		}
11152		return nil, &googleapi.Error{
11153			Code:   res.StatusCode,
11154			Header: res.Header,
11155		}
11156	}
11157	if err != nil {
11158		return nil, err
11159	}
11160	defer googleapi.CloseBody(res)
11161	if err := googleapi.CheckResponse(res); err != nil {
11162		return nil, err
11163	}
11164	ret := &GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse{
11165		ServerResponse: googleapi.ServerResponse{
11166			Header:         res.Header,
11167			HTTPStatusCode: res.StatusCode,
11168		},
11169	}
11170	target := &ret
11171	if err := gensupport.DecodeResponse(target, res); err != nil {
11172		return nil, err
11173	}
11174	return ret, nil
11175	// {
11176	//   "description": "Returns the list of all session entity types in the specified session.",
11177	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes",
11178	//   "httpMethod": "GET",
11179	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.list",
11180	//   "parameterOrder": [
11181	//     "parent"
11182	//   ],
11183	//   "parameters": {
11184	//     "pageSize": {
11185	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
11186	//       "format": "int32",
11187	//       "location": "query",
11188	//       "type": "integer"
11189	//     },
11190	//     "pageToken": {
11191	//       "description": "Optional. The next_page_token value returned from a previous list request.",
11192	//       "location": "query",
11193	//       "type": "string"
11194	//     },
11195	//     "parent": {
11196	//       "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.",
11197	//       "location": "path",
11198	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$",
11199	//       "required": true,
11200	//       "type": "string"
11201	//     }
11202	//   },
11203	//   "path": "v2beta1/{+parent}/entityTypes",
11204	//   "response": {
11205	//     "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse"
11206	//   },
11207	//   "scopes": [
11208	//     "https://www.googleapis.com/auth/cloud-platform",
11209	//     "https://www.googleapis.com/auth/dialogflow"
11210	//   ]
11211	// }
11212
11213}
11214
11215// Pages invokes f for each page of results.
11216// A non-nil error returned from f will halt the iteration.
11217// The provided context supersedes any context provided to the Context method.
11218func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) error) error {
11219	c.ctx_ = ctx
11220	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11221	for {
11222		x, err := c.Do()
11223		if err != nil {
11224			return err
11225		}
11226		if err := f(x); err != nil {
11227			return err
11228		}
11229		if x.NextPageToken == "" {
11230			return nil
11231		}
11232		c.PageToken(x.NextPageToken)
11233	}
11234}
11235
11236// method id "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch":
11237
11238type ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall struct {
11239	s                                             *Service
11240	nameid                                        string
11241	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
11242	urlParams_                                    gensupport.URLParams
11243	ctx_                                          context.Context
11244	header_                                       http.Header
11245}
11246
11247// Patch: Updates the specified session entity type.
11248func (r *ProjectsAgentEnvironmentsUsersSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
11249	c := &ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11250	c.nameid = nameid
11251	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
11252	return c
11253}
11254
11255// UpdateMask sets the optional parameter "updateMask": The mask to
11256// control which fields get updated.
11257func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
11258	c.urlParams_.Set("updateMask", updateMask)
11259	return c
11260}
11261
11262// Fields allows partial responses to be retrieved. See
11263// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11264// for more information.
11265func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
11266	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11267	return c
11268}
11269
11270// Context sets the context to be used in this call's Do method. Any
11271// pending HTTP request will be aborted if the provided context is
11272// canceled.
11273func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall {
11274	c.ctx_ = ctx
11275	return c
11276}
11277
11278// Header returns an http.Header that can be modified by the caller to
11279// add HTTP headers to the request.
11280func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Header() http.Header {
11281	if c.header_ == nil {
11282		c.header_ = make(http.Header)
11283	}
11284	return c.header_
11285}
11286
11287func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
11288	reqHeaders := make(http.Header)
11289	for k, v := range c.header_ {
11290		reqHeaders[k] = v
11291	}
11292	reqHeaders.Set("User-Agent", c.s.userAgent())
11293	var body io.Reader = nil
11294	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
11295	if err != nil {
11296		return nil, err
11297	}
11298	reqHeaders.Set("Content-Type", "application/json")
11299	c.urlParams_.Set("alt", alt)
11300	c.urlParams_.Set("prettyPrint", "false")
11301	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
11302	urls += "?" + c.urlParams_.Encode()
11303	req, err := http.NewRequest("PATCH", urls, body)
11304	if err != nil {
11305		return nil, err
11306	}
11307	req.Header = reqHeaders
11308	googleapi.Expand(req.URL, map[string]string{
11309		"name": c.nameid,
11310	})
11311	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11312}
11313
11314// Do executes the "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch" call.
11315// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
11316// error will be non-nil. Any non-2xx status code is an error. Response
11317// headers are in either
11318// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
11319// or (if a response was returned at all) in
11320// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11321// whether the returned error was because http.StatusNotModified was
11322// returned.
11323func (c *ProjectsAgentEnvironmentsUsersSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
11324	gensupport.SetOptions(c.urlParams_, opts...)
11325	res, err := c.doRequest("json")
11326	if res != nil && res.StatusCode == http.StatusNotModified {
11327		if res.Body != nil {
11328			res.Body.Close()
11329		}
11330		return nil, &googleapi.Error{
11331			Code:   res.StatusCode,
11332			Header: res.Header,
11333		}
11334	}
11335	if err != nil {
11336		return nil, err
11337	}
11338	defer googleapi.CloseBody(res)
11339	if err := googleapi.CheckResponse(res); err != nil {
11340		return nil, err
11341	}
11342	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
11343		ServerResponse: googleapi.ServerResponse{
11344			Header:         res.Header,
11345			HTTPStatusCode: res.StatusCode,
11346		},
11347	}
11348	target := &ret
11349	if err := gensupport.DecodeResponse(target, res); err != nil {
11350		return nil, err
11351	}
11352	return ret, nil
11353	// {
11354	//   "description": "Updates the specified session entity type.",
11355	//   "flatPath": "v2beta1/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}",
11356	//   "httpMethod": "PATCH",
11357	//   "id": "dialogflow.projects.agent.environments.users.sessions.entityTypes.patch",
11358	//   "parameterOrder": [
11359	//     "name"
11360	//   ],
11361	//   "parameters": {
11362	//     "name": {
11363	//       "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.",
11364	//       "location": "path",
11365	//       "pattern": "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$",
11366	//       "required": true,
11367	//       "type": "string"
11368	//     },
11369	//     "updateMask": {
11370	//       "description": "Optional. The mask to control which fields get updated.",
11371	//       "format": "google-fieldmask",
11372	//       "location": "query",
11373	//       "type": "string"
11374	//     }
11375	//   },
11376	//   "path": "v2beta1/{+name}",
11377	//   "request": {
11378	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
11379	//   },
11380	//   "response": {
11381	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
11382	//   },
11383	//   "scopes": [
11384	//     "https://www.googleapis.com/auth/cloud-platform",
11385	//     "https://www.googleapis.com/auth/dialogflow"
11386	//   ]
11387	// }
11388
11389}
11390
11391// method id "dialogflow.projects.agent.intents.batchDelete":
11392
11393type ProjectsAgentIntentsBatchDeleteCall struct {
11394	s                                                     *Service
11395	parent                                                string
11396	googleclouddialogflowv2beta1batchdeleteintentsrequest *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest
11397	urlParams_                                            gensupport.URLParams
11398	ctx_                                                  context.Context
11399	header_                                               http.Header
11400}
11401
11402// BatchDelete: Deletes intents in the specified agent.
11403//
11404// Operation <response: google.protobuf.Empty>
11405func (r *ProjectsAgentIntentsService) BatchDelete(parent string, googleclouddialogflowv2beta1batchdeleteintentsrequest *GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest) *ProjectsAgentIntentsBatchDeleteCall {
11406	c := &ProjectsAgentIntentsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11407	c.parent = parent
11408	c.googleclouddialogflowv2beta1batchdeleteintentsrequest = googleclouddialogflowv2beta1batchdeleteintentsrequest
11409	return c
11410}
11411
11412// Fields allows partial responses to be retrieved. See
11413// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11414// for more information.
11415func (c *ProjectsAgentIntentsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchDeleteCall {
11416	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11417	return c
11418}
11419
11420// Context sets the context to be used in this call's Do method. Any
11421// pending HTTP request will be aborted if the provided context is
11422// canceled.
11423func (c *ProjectsAgentIntentsBatchDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchDeleteCall {
11424	c.ctx_ = ctx
11425	return c
11426}
11427
11428// Header returns an http.Header that can be modified by the caller to
11429// add HTTP headers to the request.
11430func (c *ProjectsAgentIntentsBatchDeleteCall) Header() http.Header {
11431	if c.header_ == nil {
11432		c.header_ = make(http.Header)
11433	}
11434	return c.header_
11435}
11436
11437func (c *ProjectsAgentIntentsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
11438	reqHeaders := make(http.Header)
11439	for k, v := range c.header_ {
11440		reqHeaders[k] = v
11441	}
11442	reqHeaders.Set("User-Agent", c.s.userAgent())
11443	var body io.Reader = nil
11444	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchdeleteintentsrequest)
11445	if err != nil {
11446		return nil, err
11447	}
11448	reqHeaders.Set("Content-Type", "application/json")
11449	c.urlParams_.Set("alt", alt)
11450	c.urlParams_.Set("prettyPrint", "false")
11451	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents:batchDelete")
11452	urls += "?" + c.urlParams_.Encode()
11453	req, err := http.NewRequest("POST", urls, body)
11454	if err != nil {
11455		return nil, err
11456	}
11457	req.Header = reqHeaders
11458	googleapi.Expand(req.URL, map[string]string{
11459		"parent": c.parent,
11460	})
11461	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11462}
11463
11464// Do executes the "dialogflow.projects.agent.intents.batchDelete" call.
11465// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
11466// Any non-2xx status code is an error. Response headers are in either
11467// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
11468// was returned at all) in error.(*googleapi.Error).Header. Use
11469// googleapi.IsNotModified to check whether the returned error was
11470// because http.StatusNotModified was returned.
11471func (c *ProjectsAgentIntentsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
11472	gensupport.SetOptions(c.urlParams_, opts...)
11473	res, err := c.doRequest("json")
11474	if res != nil && res.StatusCode == http.StatusNotModified {
11475		if res.Body != nil {
11476			res.Body.Close()
11477		}
11478		return nil, &googleapi.Error{
11479			Code:   res.StatusCode,
11480			Header: res.Header,
11481		}
11482	}
11483	if err != nil {
11484		return nil, err
11485	}
11486	defer googleapi.CloseBody(res)
11487	if err := googleapi.CheckResponse(res); err != nil {
11488		return nil, err
11489	}
11490	ret := &GoogleLongrunningOperation{
11491		ServerResponse: googleapi.ServerResponse{
11492			Header:         res.Header,
11493			HTTPStatusCode: res.StatusCode,
11494		},
11495	}
11496	target := &ret
11497	if err := gensupport.DecodeResponse(target, res); err != nil {
11498		return nil, err
11499	}
11500	return ret, nil
11501	// {
11502	//   "description": "Deletes intents in the specified agent.\n\nOperation \u003cresponse: google.protobuf.Empty\u003e",
11503	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents:batchDelete",
11504	//   "httpMethod": "POST",
11505	//   "id": "dialogflow.projects.agent.intents.batchDelete",
11506	//   "parameterOrder": [
11507	//     "parent"
11508	//   ],
11509	//   "parameters": {
11510	//     "parent": {
11511	//       "description": "Required. The name of the agent to delete all entities types for. Format:\n`projects/\u003cProject ID\u003e/agent`.",
11512	//       "location": "path",
11513	//       "pattern": "^projects/[^/]+/agent$",
11514	//       "required": true,
11515	//       "type": "string"
11516	//     }
11517	//   },
11518	//   "path": "v2beta1/{+parent}/intents:batchDelete",
11519	//   "request": {
11520	//     "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest"
11521	//   },
11522	//   "response": {
11523	//     "$ref": "GoogleLongrunningOperation"
11524	//   },
11525	//   "scopes": [
11526	//     "https://www.googleapis.com/auth/cloud-platform",
11527	//     "https://www.googleapis.com/auth/dialogflow"
11528	//   ]
11529	// }
11530
11531}
11532
11533// method id "dialogflow.projects.agent.intents.batchUpdate":
11534
11535type ProjectsAgentIntentsBatchUpdateCall struct {
11536	s                                                     *Service
11537	parent                                                string
11538	googleclouddialogflowv2beta1batchupdateintentsrequest *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest
11539	urlParams_                                            gensupport.URLParams
11540	ctx_                                                  context.Context
11541	header_                                               http.Header
11542}
11543
11544// BatchUpdate: Updates/Creates multiple intents in the specified
11545// agent.
11546//
11547// Operation <response: BatchUpdateIntentsResponse>
11548func (r *ProjectsAgentIntentsService) BatchUpdate(parent string, googleclouddialogflowv2beta1batchupdateintentsrequest *GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest) *ProjectsAgentIntentsBatchUpdateCall {
11549	c := &ProjectsAgentIntentsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11550	c.parent = parent
11551	c.googleclouddialogflowv2beta1batchupdateintentsrequest = googleclouddialogflowv2beta1batchupdateintentsrequest
11552	return c
11553}
11554
11555// Fields allows partial responses to be retrieved. See
11556// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11557// for more information.
11558func (c *ProjectsAgentIntentsBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsBatchUpdateCall {
11559	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11560	return c
11561}
11562
11563// Context sets the context to be used in this call's Do method. Any
11564// pending HTTP request will be aborted if the provided context is
11565// canceled.
11566func (c *ProjectsAgentIntentsBatchUpdateCall) Context(ctx context.Context) *ProjectsAgentIntentsBatchUpdateCall {
11567	c.ctx_ = ctx
11568	return c
11569}
11570
11571// Header returns an http.Header that can be modified by the caller to
11572// add HTTP headers to the request.
11573func (c *ProjectsAgentIntentsBatchUpdateCall) Header() http.Header {
11574	if c.header_ == nil {
11575		c.header_ = make(http.Header)
11576	}
11577	return c.header_
11578}
11579
11580func (c *ProjectsAgentIntentsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
11581	reqHeaders := make(http.Header)
11582	for k, v := range c.header_ {
11583		reqHeaders[k] = v
11584	}
11585	reqHeaders.Set("User-Agent", c.s.userAgent())
11586	var body io.Reader = nil
11587	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1batchupdateintentsrequest)
11588	if err != nil {
11589		return nil, err
11590	}
11591	reqHeaders.Set("Content-Type", "application/json")
11592	c.urlParams_.Set("alt", alt)
11593	c.urlParams_.Set("prettyPrint", "false")
11594	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents:batchUpdate")
11595	urls += "?" + c.urlParams_.Encode()
11596	req, err := http.NewRequest("POST", urls, body)
11597	if err != nil {
11598		return nil, err
11599	}
11600	req.Header = reqHeaders
11601	googleapi.Expand(req.URL, map[string]string{
11602		"parent": c.parent,
11603	})
11604	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11605}
11606
11607// Do executes the "dialogflow.projects.agent.intents.batchUpdate" call.
11608// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
11609// Any non-2xx status code is an error. Response headers are in either
11610// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
11611// was returned at all) in error.(*googleapi.Error).Header. Use
11612// googleapi.IsNotModified to check whether the returned error was
11613// because http.StatusNotModified was returned.
11614func (c *ProjectsAgentIntentsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
11615	gensupport.SetOptions(c.urlParams_, opts...)
11616	res, err := c.doRequest("json")
11617	if res != nil && res.StatusCode == http.StatusNotModified {
11618		if res.Body != nil {
11619			res.Body.Close()
11620		}
11621		return nil, &googleapi.Error{
11622			Code:   res.StatusCode,
11623			Header: res.Header,
11624		}
11625	}
11626	if err != nil {
11627		return nil, err
11628	}
11629	defer googleapi.CloseBody(res)
11630	if err := googleapi.CheckResponse(res); err != nil {
11631		return nil, err
11632	}
11633	ret := &GoogleLongrunningOperation{
11634		ServerResponse: googleapi.ServerResponse{
11635			Header:         res.Header,
11636			HTTPStatusCode: res.StatusCode,
11637		},
11638	}
11639	target := &ret
11640	if err := gensupport.DecodeResponse(target, res); err != nil {
11641		return nil, err
11642	}
11643	return ret, nil
11644	// {
11645	//   "description": "Updates/Creates multiple intents in the specified agent.\n\nOperation \u003cresponse: BatchUpdateIntentsResponse\u003e",
11646	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents:batchUpdate",
11647	//   "httpMethod": "POST",
11648	//   "id": "dialogflow.projects.agent.intents.batchUpdate",
11649	//   "parameterOrder": [
11650	//     "parent"
11651	//   ],
11652	//   "parameters": {
11653	//     "parent": {
11654	//       "description": "Required. The name of the agent to update or create intents in.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
11655	//       "location": "path",
11656	//       "pattern": "^projects/[^/]+/agent$",
11657	//       "required": true,
11658	//       "type": "string"
11659	//     }
11660	//   },
11661	//   "path": "v2beta1/{+parent}/intents:batchUpdate",
11662	//   "request": {
11663	//     "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest"
11664	//   },
11665	//   "response": {
11666	//     "$ref": "GoogleLongrunningOperation"
11667	//   },
11668	//   "scopes": [
11669	//     "https://www.googleapis.com/auth/cloud-platform",
11670	//     "https://www.googleapis.com/auth/dialogflow"
11671	//   ]
11672	// }
11673
11674}
11675
11676// method id "dialogflow.projects.agent.intents.create":
11677
11678type ProjectsAgentIntentsCreateCall struct {
11679	s                                  *Service
11680	parent                             string
11681	googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent
11682	urlParams_                         gensupport.URLParams
11683	ctx_                               context.Context
11684	header_                            http.Header
11685}
11686
11687// Create: Creates an intent in the specified agent.
11688func (r *ProjectsAgentIntentsService) Create(parent string, googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent) *ProjectsAgentIntentsCreateCall {
11689	c := &ProjectsAgentIntentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11690	c.parent = parent
11691	c.googleclouddialogflowv2beta1intent = googleclouddialogflowv2beta1intent
11692	return c
11693}
11694
11695// IntentView sets the optional parameter "intentView": The resource
11696// view to apply to the returned intent.
11697//
11698// Possible values:
11699//   "INTENT_VIEW_UNSPECIFIED"
11700//   "INTENT_VIEW_FULL"
11701func (c *ProjectsAgentIntentsCreateCall) IntentView(intentView string) *ProjectsAgentIntentsCreateCall {
11702	c.urlParams_.Set("intentView", intentView)
11703	return c
11704}
11705
11706// LanguageCode sets the optional parameter "languageCode": The language
11707// of training phrases, parameters and rich messages
11708// defined in `intent`. If not specified, the agent's default language
11709// is
11710// used.
11711// [Many
11712// languages](https://cloud.google.com/dialogflow/docs/reference/la
11713// nguage)
11714// are supported. Note: languages must be enabled in the agent before
11715// they can
11716// be used.
11717func (c *ProjectsAgentIntentsCreateCall) LanguageCode(languageCode string) *ProjectsAgentIntentsCreateCall {
11718	c.urlParams_.Set("languageCode", languageCode)
11719	return c
11720}
11721
11722// Fields allows partial responses to be retrieved. See
11723// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11724// for more information.
11725func (c *ProjectsAgentIntentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsCreateCall {
11726	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11727	return c
11728}
11729
11730// Context sets the context to be used in this call's Do method. Any
11731// pending HTTP request will be aborted if the provided context is
11732// canceled.
11733func (c *ProjectsAgentIntentsCreateCall) Context(ctx context.Context) *ProjectsAgentIntentsCreateCall {
11734	c.ctx_ = ctx
11735	return c
11736}
11737
11738// Header returns an http.Header that can be modified by the caller to
11739// add HTTP headers to the request.
11740func (c *ProjectsAgentIntentsCreateCall) Header() http.Header {
11741	if c.header_ == nil {
11742		c.header_ = make(http.Header)
11743	}
11744	return c.header_
11745}
11746
11747func (c *ProjectsAgentIntentsCreateCall) doRequest(alt string) (*http.Response, error) {
11748	reqHeaders := make(http.Header)
11749	for k, v := range c.header_ {
11750		reqHeaders[k] = v
11751	}
11752	reqHeaders.Set("User-Agent", c.s.userAgent())
11753	var body io.Reader = nil
11754	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1intent)
11755	if err != nil {
11756		return nil, err
11757	}
11758	reqHeaders.Set("Content-Type", "application/json")
11759	c.urlParams_.Set("alt", alt)
11760	c.urlParams_.Set("prettyPrint", "false")
11761	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents")
11762	urls += "?" + c.urlParams_.Encode()
11763	req, err := http.NewRequest("POST", urls, body)
11764	if err != nil {
11765		return nil, err
11766	}
11767	req.Header = reqHeaders
11768	googleapi.Expand(req.URL, map[string]string{
11769		"parent": c.parent,
11770	})
11771	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11772}
11773
11774// Do executes the "dialogflow.projects.agent.intents.create" call.
11775// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
11776// non-nil. Any non-2xx status code is an error. Response headers are in
11777// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
11778// (if a response was returned at all) in
11779// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11780// whether the returned error was because http.StatusNotModified was
11781// returned.
11782func (c *ProjectsAgentIntentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
11783	gensupport.SetOptions(c.urlParams_, opts...)
11784	res, err := c.doRequest("json")
11785	if res != nil && res.StatusCode == http.StatusNotModified {
11786		if res.Body != nil {
11787			res.Body.Close()
11788		}
11789		return nil, &googleapi.Error{
11790			Code:   res.StatusCode,
11791			Header: res.Header,
11792		}
11793	}
11794	if err != nil {
11795		return nil, err
11796	}
11797	defer googleapi.CloseBody(res)
11798	if err := googleapi.CheckResponse(res); err != nil {
11799		return nil, err
11800	}
11801	ret := &GoogleCloudDialogflowV2beta1Intent{
11802		ServerResponse: googleapi.ServerResponse{
11803			Header:         res.Header,
11804			HTTPStatusCode: res.StatusCode,
11805		},
11806	}
11807	target := &ret
11808	if err := gensupport.DecodeResponse(target, res); err != nil {
11809		return nil, err
11810	}
11811	return ret, nil
11812	// {
11813	//   "description": "Creates an intent in the specified agent.",
11814	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents",
11815	//   "httpMethod": "POST",
11816	//   "id": "dialogflow.projects.agent.intents.create",
11817	//   "parameterOrder": [
11818	//     "parent"
11819	//   ],
11820	//   "parameters": {
11821	//     "intentView": {
11822	//       "description": "Optional. The resource view to apply to the returned intent.",
11823	//       "enum": [
11824	//         "INTENT_VIEW_UNSPECIFIED",
11825	//         "INTENT_VIEW_FULL"
11826	//       ],
11827	//       "location": "query",
11828	//       "type": "string"
11829	//     },
11830	//     "languageCode": {
11831	//       "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.",
11832	//       "location": "query",
11833	//       "type": "string"
11834	//     },
11835	//     "parent": {
11836	//       "description": "Required. The agent to create a intent for.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
11837	//       "location": "path",
11838	//       "pattern": "^projects/[^/]+/agent$",
11839	//       "required": true,
11840	//       "type": "string"
11841	//     }
11842	//   },
11843	//   "path": "v2beta1/{+parent}/intents",
11844	//   "request": {
11845	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
11846	//   },
11847	//   "response": {
11848	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
11849	//   },
11850	//   "scopes": [
11851	//     "https://www.googleapis.com/auth/cloud-platform",
11852	//     "https://www.googleapis.com/auth/dialogflow"
11853	//   ]
11854	// }
11855
11856}
11857
11858// method id "dialogflow.projects.agent.intents.delete":
11859
11860type ProjectsAgentIntentsDeleteCall struct {
11861	s          *Service
11862	name       string
11863	urlParams_ gensupport.URLParams
11864	ctx_       context.Context
11865	header_    http.Header
11866}
11867
11868// Delete: Deletes the specified intent and its direct or indirect
11869// followup intents.
11870func (r *ProjectsAgentIntentsService) Delete(name string) *ProjectsAgentIntentsDeleteCall {
11871	c := &ProjectsAgentIntentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11872	c.name = name
11873	return c
11874}
11875
11876// Fields allows partial responses to be retrieved. See
11877// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11878// for more information.
11879func (c *ProjectsAgentIntentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsDeleteCall {
11880	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11881	return c
11882}
11883
11884// Context sets the context to be used in this call's Do method. Any
11885// pending HTTP request will be aborted if the provided context is
11886// canceled.
11887func (c *ProjectsAgentIntentsDeleteCall) Context(ctx context.Context) *ProjectsAgentIntentsDeleteCall {
11888	c.ctx_ = ctx
11889	return c
11890}
11891
11892// Header returns an http.Header that can be modified by the caller to
11893// add HTTP headers to the request.
11894func (c *ProjectsAgentIntentsDeleteCall) Header() http.Header {
11895	if c.header_ == nil {
11896		c.header_ = make(http.Header)
11897	}
11898	return c.header_
11899}
11900
11901func (c *ProjectsAgentIntentsDeleteCall) doRequest(alt string) (*http.Response, error) {
11902	reqHeaders := make(http.Header)
11903	for k, v := range c.header_ {
11904		reqHeaders[k] = v
11905	}
11906	reqHeaders.Set("User-Agent", c.s.userAgent())
11907	var body io.Reader = nil
11908	c.urlParams_.Set("alt", alt)
11909	c.urlParams_.Set("prettyPrint", "false")
11910	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
11911	urls += "?" + c.urlParams_.Encode()
11912	req, err := http.NewRequest("DELETE", urls, body)
11913	if err != nil {
11914		return nil, err
11915	}
11916	req.Header = reqHeaders
11917	googleapi.Expand(req.URL, map[string]string{
11918		"name": c.name,
11919	})
11920	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11921}
11922
11923// Do executes the "dialogflow.projects.agent.intents.delete" call.
11924// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
11925// non-2xx status code is an error. Response headers are in either
11926// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
11927// returned at all) in error.(*googleapi.Error).Header. Use
11928// googleapi.IsNotModified to check whether the returned error was
11929// because http.StatusNotModified was returned.
11930func (c *ProjectsAgentIntentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
11931	gensupport.SetOptions(c.urlParams_, opts...)
11932	res, err := c.doRequest("json")
11933	if res != nil && res.StatusCode == http.StatusNotModified {
11934		if res.Body != nil {
11935			res.Body.Close()
11936		}
11937		return nil, &googleapi.Error{
11938			Code:   res.StatusCode,
11939			Header: res.Header,
11940		}
11941	}
11942	if err != nil {
11943		return nil, err
11944	}
11945	defer googleapi.CloseBody(res)
11946	if err := googleapi.CheckResponse(res); err != nil {
11947		return nil, err
11948	}
11949	ret := &GoogleProtobufEmpty{
11950		ServerResponse: googleapi.ServerResponse{
11951			Header:         res.Header,
11952			HTTPStatusCode: res.StatusCode,
11953		},
11954	}
11955	target := &ret
11956	if err := gensupport.DecodeResponse(target, res); err != nil {
11957		return nil, err
11958	}
11959	return ret, nil
11960	// {
11961	//   "description": "Deletes the specified intent and its direct or indirect followup intents.",
11962	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents/{intentsId}",
11963	//   "httpMethod": "DELETE",
11964	//   "id": "dialogflow.projects.agent.intents.delete",
11965	//   "parameterOrder": [
11966	//     "name"
11967	//   ],
11968	//   "parameters": {
11969	//     "name": {
11970	//       "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`.",
11971	//       "location": "path",
11972	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
11973	//       "required": true,
11974	//       "type": "string"
11975	//     }
11976	//   },
11977	//   "path": "v2beta1/{+name}",
11978	//   "response": {
11979	//     "$ref": "GoogleProtobufEmpty"
11980	//   },
11981	//   "scopes": [
11982	//     "https://www.googleapis.com/auth/cloud-platform",
11983	//     "https://www.googleapis.com/auth/dialogflow"
11984	//   ]
11985	// }
11986
11987}
11988
11989// method id "dialogflow.projects.agent.intents.get":
11990
11991type ProjectsAgentIntentsGetCall struct {
11992	s            *Service
11993	name         string
11994	urlParams_   gensupport.URLParams
11995	ifNoneMatch_ string
11996	ctx_         context.Context
11997	header_      http.Header
11998}
11999
12000// Get: Retrieves the specified intent.
12001func (r *ProjectsAgentIntentsService) Get(name string) *ProjectsAgentIntentsGetCall {
12002	c := &ProjectsAgentIntentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12003	c.name = name
12004	return c
12005}
12006
12007// IntentView sets the optional parameter "intentView": The resource
12008// view to apply to the returned intent.
12009//
12010// Possible values:
12011//   "INTENT_VIEW_UNSPECIFIED"
12012//   "INTENT_VIEW_FULL"
12013func (c *ProjectsAgentIntentsGetCall) IntentView(intentView string) *ProjectsAgentIntentsGetCall {
12014	c.urlParams_.Set("intentView", intentView)
12015	return c
12016}
12017
12018// LanguageCode sets the optional parameter "languageCode": The language
12019// to retrieve training phrases, parameters and rich
12020// messages for. If not specified, the agent's default language is
12021// used.
12022// [Many
12023// languages](https://cloud.google.com/dialogflow/docs/refere
12024// nce/language)
12025// are supported. Note: languages must be enabled in the agent before
12026// they can
12027// be used.
12028func (c *ProjectsAgentIntentsGetCall) LanguageCode(languageCode string) *ProjectsAgentIntentsGetCall {
12029	c.urlParams_.Set("languageCode", languageCode)
12030	return c
12031}
12032
12033// Fields allows partial responses to be retrieved. See
12034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12035// for more information.
12036func (c *ProjectsAgentIntentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsGetCall {
12037	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12038	return c
12039}
12040
12041// IfNoneMatch sets the optional parameter which makes the operation
12042// fail if the object's ETag matches the given value. This is useful for
12043// getting updates only after the object has changed since the last
12044// request. Use googleapi.IsNotModified to check whether the response
12045// error from Do is the result of In-None-Match.
12046func (c *ProjectsAgentIntentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsGetCall {
12047	c.ifNoneMatch_ = entityTag
12048	return c
12049}
12050
12051// Context sets the context to be used in this call's Do method. Any
12052// pending HTTP request will be aborted if the provided context is
12053// canceled.
12054func (c *ProjectsAgentIntentsGetCall) Context(ctx context.Context) *ProjectsAgentIntentsGetCall {
12055	c.ctx_ = ctx
12056	return c
12057}
12058
12059// Header returns an http.Header that can be modified by the caller to
12060// add HTTP headers to the request.
12061func (c *ProjectsAgentIntentsGetCall) Header() http.Header {
12062	if c.header_ == nil {
12063		c.header_ = make(http.Header)
12064	}
12065	return c.header_
12066}
12067
12068func (c *ProjectsAgentIntentsGetCall) doRequest(alt string) (*http.Response, error) {
12069	reqHeaders := make(http.Header)
12070	for k, v := range c.header_ {
12071		reqHeaders[k] = v
12072	}
12073	reqHeaders.Set("User-Agent", c.s.userAgent())
12074	if c.ifNoneMatch_ != "" {
12075		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12076	}
12077	var body io.Reader = nil
12078	c.urlParams_.Set("alt", alt)
12079	c.urlParams_.Set("prettyPrint", "false")
12080	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12081	urls += "?" + c.urlParams_.Encode()
12082	req, err := http.NewRequest("GET", urls, body)
12083	if err != nil {
12084		return nil, err
12085	}
12086	req.Header = reqHeaders
12087	googleapi.Expand(req.URL, map[string]string{
12088		"name": c.name,
12089	})
12090	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12091}
12092
12093// Do executes the "dialogflow.projects.agent.intents.get" call.
12094// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
12095// non-nil. Any non-2xx status code is an error. Response headers are in
12096// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
12097// (if a response was returned at all) in
12098// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12099// whether the returned error was because http.StatusNotModified was
12100// returned.
12101func (c *ProjectsAgentIntentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
12102	gensupport.SetOptions(c.urlParams_, opts...)
12103	res, err := c.doRequest("json")
12104	if res != nil && res.StatusCode == http.StatusNotModified {
12105		if res.Body != nil {
12106			res.Body.Close()
12107		}
12108		return nil, &googleapi.Error{
12109			Code:   res.StatusCode,
12110			Header: res.Header,
12111		}
12112	}
12113	if err != nil {
12114		return nil, err
12115	}
12116	defer googleapi.CloseBody(res)
12117	if err := googleapi.CheckResponse(res); err != nil {
12118		return nil, err
12119	}
12120	ret := &GoogleCloudDialogflowV2beta1Intent{
12121		ServerResponse: googleapi.ServerResponse{
12122			Header:         res.Header,
12123			HTTPStatusCode: res.StatusCode,
12124		},
12125	}
12126	target := &ret
12127	if err := gensupport.DecodeResponse(target, res); err != nil {
12128		return nil, err
12129	}
12130	return ret, nil
12131	// {
12132	//   "description": "Retrieves the specified intent.",
12133	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents/{intentsId}",
12134	//   "httpMethod": "GET",
12135	//   "id": "dialogflow.projects.agent.intents.get",
12136	//   "parameterOrder": [
12137	//     "name"
12138	//   ],
12139	//   "parameters": {
12140	//     "intentView": {
12141	//       "description": "Optional. The resource view to apply to the returned intent.",
12142	//       "enum": [
12143	//         "INTENT_VIEW_UNSPECIFIED",
12144	//         "INTENT_VIEW_FULL"
12145	//       ],
12146	//       "location": "query",
12147	//       "type": "string"
12148	//     },
12149	//     "languageCode": {
12150	//       "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.",
12151	//       "location": "query",
12152	//       "type": "string"
12153	//     },
12154	//     "name": {
12155	//       "description": "Required. The name of the intent.\nFormat: `projects/\u003cProject ID\u003e/agent/intents/\u003cIntent ID\u003e`.",
12156	//       "location": "path",
12157	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
12158	//       "required": true,
12159	//       "type": "string"
12160	//     }
12161	//   },
12162	//   "path": "v2beta1/{+name}",
12163	//   "response": {
12164	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
12165	//   },
12166	//   "scopes": [
12167	//     "https://www.googleapis.com/auth/cloud-platform",
12168	//     "https://www.googleapis.com/auth/dialogflow"
12169	//   ]
12170	// }
12171
12172}
12173
12174// method id "dialogflow.projects.agent.intents.list":
12175
12176type ProjectsAgentIntentsListCall struct {
12177	s            *Service
12178	parent       string
12179	urlParams_   gensupport.URLParams
12180	ifNoneMatch_ string
12181	ctx_         context.Context
12182	header_      http.Header
12183}
12184
12185// List: Returns the list of all intents in the specified agent.
12186func (r *ProjectsAgentIntentsService) List(parent string) *ProjectsAgentIntentsListCall {
12187	c := &ProjectsAgentIntentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12188	c.parent = parent
12189	return c
12190}
12191
12192// IntentView sets the optional parameter "intentView": The resource
12193// view to apply to the returned intent.
12194//
12195// Possible values:
12196//   "INTENT_VIEW_UNSPECIFIED"
12197//   "INTENT_VIEW_FULL"
12198func (c *ProjectsAgentIntentsListCall) IntentView(intentView string) *ProjectsAgentIntentsListCall {
12199	c.urlParams_.Set("intentView", intentView)
12200	return c
12201}
12202
12203// LanguageCode sets the optional parameter "languageCode": The language
12204// to list training phrases, parameters and rich
12205// messages for. If not specified, the agent's default language is
12206// used.
12207// [Many
12208// languages](https://cloud.google.com/dialogflow/docs/refere
12209// nce/language)
12210// are supported. Note: languages must be enabled in the agent before
12211// they can
12212// be used.
12213func (c *ProjectsAgentIntentsListCall) LanguageCode(languageCode string) *ProjectsAgentIntentsListCall {
12214	c.urlParams_.Set("languageCode", languageCode)
12215	return c
12216}
12217
12218// PageSize sets the optional parameter "pageSize": The maximum number
12219// of items to return in a single page. By
12220// default 100 and at most 1000.
12221func (c *ProjectsAgentIntentsListCall) PageSize(pageSize int64) *ProjectsAgentIntentsListCall {
12222	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12223	return c
12224}
12225
12226// PageToken sets the optional parameter "pageToken": The
12227// next_page_token value returned from a previous list request.
12228func (c *ProjectsAgentIntentsListCall) PageToken(pageToken string) *ProjectsAgentIntentsListCall {
12229	c.urlParams_.Set("pageToken", pageToken)
12230	return c
12231}
12232
12233// Fields allows partial responses to be retrieved. See
12234// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12235// for more information.
12236func (c *ProjectsAgentIntentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsListCall {
12237	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12238	return c
12239}
12240
12241// IfNoneMatch sets the optional parameter which makes the operation
12242// fail if the object's ETag matches the given value. This is useful for
12243// getting updates only after the object has changed since the last
12244// request. Use googleapi.IsNotModified to check whether the response
12245// error from Do is the result of In-None-Match.
12246func (c *ProjectsAgentIntentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentIntentsListCall {
12247	c.ifNoneMatch_ = entityTag
12248	return c
12249}
12250
12251// Context sets the context to be used in this call's Do method. Any
12252// pending HTTP request will be aborted if the provided context is
12253// canceled.
12254func (c *ProjectsAgentIntentsListCall) Context(ctx context.Context) *ProjectsAgentIntentsListCall {
12255	c.ctx_ = ctx
12256	return c
12257}
12258
12259// Header returns an http.Header that can be modified by the caller to
12260// add HTTP headers to the request.
12261func (c *ProjectsAgentIntentsListCall) Header() http.Header {
12262	if c.header_ == nil {
12263		c.header_ = make(http.Header)
12264	}
12265	return c.header_
12266}
12267
12268func (c *ProjectsAgentIntentsListCall) doRequest(alt string) (*http.Response, error) {
12269	reqHeaders := make(http.Header)
12270	for k, v := range c.header_ {
12271		reqHeaders[k] = v
12272	}
12273	reqHeaders.Set("User-Agent", c.s.userAgent())
12274	if c.ifNoneMatch_ != "" {
12275		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12276	}
12277	var body io.Reader = nil
12278	c.urlParams_.Set("alt", alt)
12279	c.urlParams_.Set("prettyPrint", "false")
12280	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/intents")
12281	urls += "?" + c.urlParams_.Encode()
12282	req, err := http.NewRequest("GET", urls, body)
12283	if err != nil {
12284		return nil, err
12285	}
12286	req.Header = reqHeaders
12287	googleapi.Expand(req.URL, map[string]string{
12288		"parent": c.parent,
12289	})
12290	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12291}
12292
12293// Do executes the "dialogflow.projects.agent.intents.list" call.
12294// Exactly one of *GoogleCloudDialogflowV2beta1ListIntentsResponse or
12295// error will be non-nil. Any non-2xx status code is an error. Response
12296// headers are in either
12297// *GoogleCloudDialogflowV2beta1ListIntentsResponse.ServerResponse.Header
12298//  or (if a response was returned at all) in
12299// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12300// whether the returned error was because http.StatusNotModified was
12301// returned.
12302func (c *ProjectsAgentIntentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListIntentsResponse, error) {
12303	gensupport.SetOptions(c.urlParams_, opts...)
12304	res, err := c.doRequest("json")
12305	if res != nil && res.StatusCode == http.StatusNotModified {
12306		if res.Body != nil {
12307			res.Body.Close()
12308		}
12309		return nil, &googleapi.Error{
12310			Code:   res.StatusCode,
12311			Header: res.Header,
12312		}
12313	}
12314	if err != nil {
12315		return nil, err
12316	}
12317	defer googleapi.CloseBody(res)
12318	if err := googleapi.CheckResponse(res); err != nil {
12319		return nil, err
12320	}
12321	ret := &GoogleCloudDialogflowV2beta1ListIntentsResponse{
12322		ServerResponse: googleapi.ServerResponse{
12323			Header:         res.Header,
12324			HTTPStatusCode: res.StatusCode,
12325		},
12326	}
12327	target := &ret
12328	if err := gensupport.DecodeResponse(target, res); err != nil {
12329		return nil, err
12330	}
12331	return ret, nil
12332	// {
12333	//   "description": "Returns the list of all intents in the specified agent.",
12334	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents",
12335	//   "httpMethod": "GET",
12336	//   "id": "dialogflow.projects.agent.intents.list",
12337	//   "parameterOrder": [
12338	//     "parent"
12339	//   ],
12340	//   "parameters": {
12341	//     "intentView": {
12342	//       "description": "Optional. The resource view to apply to the returned intent.",
12343	//       "enum": [
12344	//         "INTENT_VIEW_UNSPECIFIED",
12345	//         "INTENT_VIEW_FULL"
12346	//       ],
12347	//       "location": "query",
12348	//       "type": "string"
12349	//     },
12350	//     "languageCode": {
12351	//       "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.",
12352	//       "location": "query",
12353	//       "type": "string"
12354	//     },
12355	//     "pageSize": {
12356	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
12357	//       "format": "int32",
12358	//       "location": "query",
12359	//       "type": "integer"
12360	//     },
12361	//     "pageToken": {
12362	//       "description": "Optional. The next_page_token value returned from a previous list request.",
12363	//       "location": "query",
12364	//       "type": "string"
12365	//     },
12366	//     "parent": {
12367	//       "description": "Required. The agent to list all intents from.\nFormat: `projects/\u003cProject ID\u003e/agent`.",
12368	//       "location": "path",
12369	//       "pattern": "^projects/[^/]+/agent$",
12370	//       "required": true,
12371	//       "type": "string"
12372	//     }
12373	//   },
12374	//   "path": "v2beta1/{+parent}/intents",
12375	//   "response": {
12376	//     "$ref": "GoogleCloudDialogflowV2beta1ListIntentsResponse"
12377	//   },
12378	//   "scopes": [
12379	//     "https://www.googleapis.com/auth/cloud-platform",
12380	//     "https://www.googleapis.com/auth/dialogflow"
12381	//   ]
12382	// }
12383
12384}
12385
12386// Pages invokes f for each page of results.
12387// A non-nil error returned from f will halt the iteration.
12388// The provided context supersedes any context provided to the Context method.
12389func (c *ProjectsAgentIntentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListIntentsResponse) error) error {
12390	c.ctx_ = ctx
12391	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12392	for {
12393		x, err := c.Do()
12394		if err != nil {
12395			return err
12396		}
12397		if err := f(x); err != nil {
12398			return err
12399		}
12400		if x.NextPageToken == "" {
12401			return nil
12402		}
12403		c.PageToken(x.NextPageToken)
12404	}
12405}
12406
12407// method id "dialogflow.projects.agent.intents.patch":
12408
12409type ProjectsAgentIntentsPatchCall struct {
12410	s                                  *Service
12411	nameid                             string
12412	googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent
12413	urlParams_                         gensupport.URLParams
12414	ctx_                               context.Context
12415	header_                            http.Header
12416}
12417
12418// Patch: Updates the specified intent.
12419func (r *ProjectsAgentIntentsService) Patch(nameid string, googleclouddialogflowv2beta1intent *GoogleCloudDialogflowV2beta1Intent) *ProjectsAgentIntentsPatchCall {
12420	c := &ProjectsAgentIntentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12421	c.nameid = nameid
12422	c.googleclouddialogflowv2beta1intent = googleclouddialogflowv2beta1intent
12423	return c
12424}
12425
12426// IntentView sets the optional parameter "intentView": The resource
12427// view to apply to the returned intent.
12428//
12429// Possible values:
12430//   "INTENT_VIEW_UNSPECIFIED"
12431//   "INTENT_VIEW_FULL"
12432func (c *ProjectsAgentIntentsPatchCall) IntentView(intentView string) *ProjectsAgentIntentsPatchCall {
12433	c.urlParams_.Set("intentView", intentView)
12434	return c
12435}
12436
12437// LanguageCode sets the optional parameter "languageCode": The language
12438// of training phrases, parameters and rich messages
12439// defined in `intent`. If not specified, the agent's default language
12440// is
12441// used.
12442// [Many
12443// languages](https://cloud.google.com/dialogflow/docs/reference/la
12444// nguage)
12445// are supported. Note: languages must be enabled in the agent before
12446// they can
12447// be used.
12448func (c *ProjectsAgentIntentsPatchCall) LanguageCode(languageCode string) *ProjectsAgentIntentsPatchCall {
12449	c.urlParams_.Set("languageCode", languageCode)
12450	return c
12451}
12452
12453// UpdateMask sets the optional parameter "updateMask": The mask to
12454// control which fields get updated.
12455func (c *ProjectsAgentIntentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentIntentsPatchCall {
12456	c.urlParams_.Set("updateMask", updateMask)
12457	return c
12458}
12459
12460// Fields allows partial responses to be retrieved. See
12461// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12462// for more information.
12463func (c *ProjectsAgentIntentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentIntentsPatchCall {
12464	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12465	return c
12466}
12467
12468// Context sets the context to be used in this call's Do method. Any
12469// pending HTTP request will be aborted if the provided context is
12470// canceled.
12471func (c *ProjectsAgentIntentsPatchCall) Context(ctx context.Context) *ProjectsAgentIntentsPatchCall {
12472	c.ctx_ = ctx
12473	return c
12474}
12475
12476// Header returns an http.Header that can be modified by the caller to
12477// add HTTP headers to the request.
12478func (c *ProjectsAgentIntentsPatchCall) Header() http.Header {
12479	if c.header_ == nil {
12480		c.header_ = make(http.Header)
12481	}
12482	return c.header_
12483}
12484
12485func (c *ProjectsAgentIntentsPatchCall) doRequest(alt string) (*http.Response, error) {
12486	reqHeaders := make(http.Header)
12487	for k, v := range c.header_ {
12488		reqHeaders[k] = v
12489	}
12490	reqHeaders.Set("User-Agent", c.s.userAgent())
12491	var body io.Reader = nil
12492	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1intent)
12493	if err != nil {
12494		return nil, err
12495	}
12496	reqHeaders.Set("Content-Type", "application/json")
12497	c.urlParams_.Set("alt", alt)
12498	c.urlParams_.Set("prettyPrint", "false")
12499	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12500	urls += "?" + c.urlParams_.Encode()
12501	req, err := http.NewRequest("PATCH", urls, body)
12502	if err != nil {
12503		return nil, err
12504	}
12505	req.Header = reqHeaders
12506	googleapi.Expand(req.URL, map[string]string{
12507		"name": c.nameid,
12508	})
12509	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12510}
12511
12512// Do executes the "dialogflow.projects.agent.intents.patch" call.
12513// Exactly one of *GoogleCloudDialogflowV2beta1Intent or error will be
12514// non-nil. Any non-2xx status code is an error. Response headers are in
12515// either *GoogleCloudDialogflowV2beta1Intent.ServerResponse.Header or
12516// (if a response was returned at all) in
12517// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12518// whether the returned error was because http.StatusNotModified was
12519// returned.
12520func (c *ProjectsAgentIntentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Intent, error) {
12521	gensupport.SetOptions(c.urlParams_, opts...)
12522	res, err := c.doRequest("json")
12523	if res != nil && res.StatusCode == http.StatusNotModified {
12524		if res.Body != nil {
12525			res.Body.Close()
12526		}
12527		return nil, &googleapi.Error{
12528			Code:   res.StatusCode,
12529			Header: res.Header,
12530		}
12531	}
12532	if err != nil {
12533		return nil, err
12534	}
12535	defer googleapi.CloseBody(res)
12536	if err := googleapi.CheckResponse(res); err != nil {
12537		return nil, err
12538	}
12539	ret := &GoogleCloudDialogflowV2beta1Intent{
12540		ServerResponse: googleapi.ServerResponse{
12541			Header:         res.Header,
12542			HTTPStatusCode: res.StatusCode,
12543		},
12544	}
12545	target := &ret
12546	if err := gensupport.DecodeResponse(target, res); err != nil {
12547		return nil, err
12548	}
12549	return ret, nil
12550	// {
12551	//   "description": "Updates the specified intent.",
12552	//   "flatPath": "v2beta1/projects/{projectsId}/agent/intents/{intentsId}",
12553	//   "httpMethod": "PATCH",
12554	//   "id": "dialogflow.projects.agent.intents.patch",
12555	//   "parameterOrder": [
12556	//     "name"
12557	//   ],
12558	//   "parameters": {
12559	//     "intentView": {
12560	//       "description": "Optional. The resource view to apply to the returned intent.",
12561	//       "enum": [
12562	//         "INTENT_VIEW_UNSPECIFIED",
12563	//         "INTENT_VIEW_FULL"
12564	//       ],
12565	//       "location": "query",
12566	//       "type": "string"
12567	//     },
12568	//     "languageCode": {
12569	//       "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.",
12570	//       "location": "query",
12571	//       "type": "string"
12572	//     },
12573	//     "name": {
12574	//       "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`.",
12575	//       "location": "path",
12576	//       "pattern": "^projects/[^/]+/agent/intents/[^/]+$",
12577	//       "required": true,
12578	//       "type": "string"
12579	//     },
12580	//     "updateMask": {
12581	//       "description": "Optional. The mask to control which fields get updated.",
12582	//       "format": "google-fieldmask",
12583	//       "location": "query",
12584	//       "type": "string"
12585	//     }
12586	//   },
12587	//   "path": "v2beta1/{+name}",
12588	//   "request": {
12589	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
12590	//   },
12591	//   "response": {
12592	//     "$ref": "GoogleCloudDialogflowV2beta1Intent"
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.knowledgeBases.create":
12603
12604type ProjectsAgentKnowledgeBasesCreateCall struct {
12605	s                                         *Service
12606	parent                                    string
12607	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
12608	urlParams_                                gensupport.URLParams
12609	ctx_                                      context.Context
12610	header_                                   http.Header
12611}
12612
12613// Create: Creates a knowledge base.
12614//
12615// Note: The `projects.agent.knowledgeBases` resource is
12616// deprecated;
12617// only use `projects.knowledgeBases`.
12618func (r *ProjectsAgentKnowledgeBasesService) Create(parent string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsAgentKnowledgeBasesCreateCall {
12619	c := &ProjectsAgentKnowledgeBasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12620	c.parent = parent
12621	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
12622	return c
12623}
12624
12625// Fields allows partial responses to be retrieved. See
12626// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12627// for more information.
12628func (c *ProjectsAgentKnowledgeBasesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesCreateCall {
12629	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12630	return c
12631}
12632
12633// Context sets the context to be used in this call's Do method. Any
12634// pending HTTP request will be aborted if the provided context is
12635// canceled.
12636func (c *ProjectsAgentKnowledgeBasesCreateCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesCreateCall {
12637	c.ctx_ = ctx
12638	return c
12639}
12640
12641// Header returns an http.Header that can be modified by the caller to
12642// add HTTP headers to the request.
12643func (c *ProjectsAgentKnowledgeBasesCreateCall) Header() http.Header {
12644	if c.header_ == nil {
12645		c.header_ = make(http.Header)
12646	}
12647	return c.header_
12648}
12649
12650func (c *ProjectsAgentKnowledgeBasesCreateCall) doRequest(alt string) (*http.Response, error) {
12651	reqHeaders := make(http.Header)
12652	for k, v := range c.header_ {
12653		reqHeaders[k] = v
12654	}
12655	reqHeaders.Set("User-Agent", c.s.userAgent())
12656	var body io.Reader = nil
12657	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
12658	if err != nil {
12659		return nil, err
12660	}
12661	reqHeaders.Set("Content-Type", "application/json")
12662	c.urlParams_.Set("alt", alt)
12663	c.urlParams_.Set("prettyPrint", "false")
12664	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
12665	urls += "?" + c.urlParams_.Encode()
12666	req, err := http.NewRequest("POST", urls, body)
12667	if err != nil {
12668		return nil, err
12669	}
12670	req.Header = reqHeaders
12671	googleapi.Expand(req.URL, map[string]string{
12672		"parent": c.parent,
12673	})
12674	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12675}
12676
12677// Do executes the "dialogflow.projects.agent.knowledgeBases.create" call.
12678// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
12679// will be non-nil. Any non-2xx status code is an error. Response
12680// headers are in either
12681// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
12682// (if a response was returned at all) in
12683// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12684// whether the returned error was because http.StatusNotModified was
12685// returned.
12686func (c *ProjectsAgentKnowledgeBasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
12687	gensupport.SetOptions(c.urlParams_, opts...)
12688	res, err := c.doRequest("json")
12689	if res != nil && res.StatusCode == http.StatusNotModified {
12690		if res.Body != nil {
12691			res.Body.Close()
12692		}
12693		return nil, &googleapi.Error{
12694			Code:   res.StatusCode,
12695			Header: res.Header,
12696		}
12697	}
12698	if err != nil {
12699		return nil, err
12700	}
12701	defer googleapi.CloseBody(res)
12702	if err := googleapi.CheckResponse(res); err != nil {
12703		return nil, err
12704	}
12705	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
12706		ServerResponse: googleapi.ServerResponse{
12707			Header:         res.Header,
12708			HTTPStatusCode: res.StatusCode,
12709		},
12710	}
12711	target := &ret
12712	if err := gensupport.DecodeResponse(target, res); err != nil {
12713		return nil, err
12714	}
12715	return ret, nil
12716	// {
12717	//   "description": "Creates a knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
12718	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases",
12719	//   "httpMethod": "POST",
12720	//   "id": "dialogflow.projects.agent.knowledgeBases.create",
12721	//   "parameterOrder": [
12722	//     "parent"
12723	//   ],
12724	//   "parameters": {
12725	//     "parent": {
12726	//       "description": "Required. The project to create a knowledge base for.\nFormat: `projects/\u003cProject ID\u003e`.",
12727	//       "location": "path",
12728	//       "pattern": "^projects/[^/]+/agent$",
12729	//       "required": true,
12730	//       "type": "string"
12731	//     }
12732	//   },
12733	//   "path": "v2beta1/{+parent}/knowledgeBases",
12734	//   "request": {
12735	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
12736	//   },
12737	//   "response": {
12738	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
12739	//   },
12740	//   "scopes": [
12741	//     "https://www.googleapis.com/auth/cloud-platform",
12742	//     "https://www.googleapis.com/auth/dialogflow"
12743	//   ]
12744	// }
12745
12746}
12747
12748// method id "dialogflow.projects.agent.knowledgeBases.delete":
12749
12750type ProjectsAgentKnowledgeBasesDeleteCall struct {
12751	s          *Service
12752	name       string
12753	urlParams_ gensupport.URLParams
12754	ctx_       context.Context
12755	header_    http.Header
12756}
12757
12758// Delete: Deletes the specified knowledge base.
12759//
12760// Note: The `projects.agent.knowledgeBases` resource is
12761// deprecated;
12762// only use `projects.knowledgeBases`.
12763func (r *ProjectsAgentKnowledgeBasesService) Delete(name string) *ProjectsAgentKnowledgeBasesDeleteCall {
12764	c := &ProjectsAgentKnowledgeBasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12765	c.name = name
12766	return c
12767}
12768
12769// Force sets the optional parameter "force": Force deletes the
12770// knowledge base. When set to true, any documents
12771// in the knowledge base are also deleted.
12772func (c *ProjectsAgentKnowledgeBasesDeleteCall) Force(force bool) *ProjectsAgentKnowledgeBasesDeleteCall {
12773	c.urlParams_.Set("force", fmt.Sprint(force))
12774	return c
12775}
12776
12777// Fields allows partial responses to be retrieved. See
12778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12779// for more information.
12780func (c *ProjectsAgentKnowledgeBasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDeleteCall {
12781	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12782	return c
12783}
12784
12785// Context sets the context to be used in this call's Do method. Any
12786// pending HTTP request will be aborted if the provided context is
12787// canceled.
12788func (c *ProjectsAgentKnowledgeBasesDeleteCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDeleteCall {
12789	c.ctx_ = ctx
12790	return c
12791}
12792
12793// Header returns an http.Header that can be modified by the caller to
12794// add HTTP headers to the request.
12795func (c *ProjectsAgentKnowledgeBasesDeleteCall) Header() http.Header {
12796	if c.header_ == nil {
12797		c.header_ = make(http.Header)
12798	}
12799	return c.header_
12800}
12801
12802func (c *ProjectsAgentKnowledgeBasesDeleteCall) doRequest(alt string) (*http.Response, error) {
12803	reqHeaders := make(http.Header)
12804	for k, v := range c.header_ {
12805		reqHeaders[k] = v
12806	}
12807	reqHeaders.Set("User-Agent", c.s.userAgent())
12808	var body io.Reader = nil
12809	c.urlParams_.Set("alt", alt)
12810	c.urlParams_.Set("prettyPrint", "false")
12811	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12812	urls += "?" + c.urlParams_.Encode()
12813	req, err := http.NewRequest("DELETE", urls, body)
12814	if err != nil {
12815		return nil, err
12816	}
12817	req.Header = reqHeaders
12818	googleapi.Expand(req.URL, map[string]string{
12819		"name": c.name,
12820	})
12821	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12822}
12823
12824// Do executes the "dialogflow.projects.agent.knowledgeBases.delete" call.
12825// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
12826// non-2xx status code is an error. Response headers are in either
12827// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
12828// returned at all) in error.(*googleapi.Error).Header. Use
12829// googleapi.IsNotModified to check whether the returned error was
12830// because http.StatusNotModified was returned.
12831func (c *ProjectsAgentKnowledgeBasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
12832	gensupport.SetOptions(c.urlParams_, opts...)
12833	res, err := c.doRequest("json")
12834	if res != nil && res.StatusCode == http.StatusNotModified {
12835		if res.Body != nil {
12836			res.Body.Close()
12837		}
12838		return nil, &googleapi.Error{
12839			Code:   res.StatusCode,
12840			Header: res.Header,
12841		}
12842	}
12843	if err != nil {
12844		return nil, err
12845	}
12846	defer googleapi.CloseBody(res)
12847	if err := googleapi.CheckResponse(res); err != nil {
12848		return nil, err
12849	}
12850	ret := &GoogleProtobufEmpty{
12851		ServerResponse: googleapi.ServerResponse{
12852			Header:         res.Header,
12853			HTTPStatusCode: res.StatusCode,
12854		},
12855	}
12856	target := &ret
12857	if err := gensupport.DecodeResponse(target, res); err != nil {
12858		return nil, err
12859	}
12860	return ret, nil
12861	// {
12862	//   "description": "Deletes the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
12863	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
12864	//   "httpMethod": "DELETE",
12865	//   "id": "dialogflow.projects.agent.knowledgeBases.delete",
12866	//   "parameterOrder": [
12867	//     "name"
12868	//   ],
12869	//   "parameters": {
12870	//     "force": {
12871	//       "description": "Optional. Force deletes the knowledge base. When set to true, any documents\nin the knowledge base are also deleted.",
12872	//       "location": "query",
12873	//       "type": "boolean"
12874	//     },
12875	//     "name": {
12876	//       "description": "Required. The name of the knowledge base to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
12877	//       "location": "path",
12878	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
12879	//       "required": true,
12880	//       "type": "string"
12881	//     }
12882	//   },
12883	//   "path": "v2beta1/{+name}",
12884	//   "response": {
12885	//     "$ref": "GoogleProtobufEmpty"
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.knowledgeBases.get":
12896
12897type ProjectsAgentKnowledgeBasesGetCall struct {
12898	s            *Service
12899	name         string
12900	urlParams_   gensupport.URLParams
12901	ifNoneMatch_ string
12902	ctx_         context.Context
12903	header_      http.Header
12904}
12905
12906// Get: Retrieves the specified knowledge base.
12907//
12908// Note: The `projects.agent.knowledgeBases` resource is
12909// deprecated;
12910// only use `projects.knowledgeBases`.
12911func (r *ProjectsAgentKnowledgeBasesService) Get(name string) *ProjectsAgentKnowledgeBasesGetCall {
12912	c := &ProjectsAgentKnowledgeBasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12913	c.name = name
12914	return c
12915}
12916
12917// Fields allows partial responses to be retrieved. See
12918// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12919// for more information.
12920func (c *ProjectsAgentKnowledgeBasesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesGetCall {
12921	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12922	return c
12923}
12924
12925// IfNoneMatch sets the optional parameter which makes the operation
12926// fail if the object's ETag matches the given value. This is useful for
12927// getting updates only after the object has changed since the last
12928// request. Use googleapi.IsNotModified to check whether the response
12929// error from Do is the result of In-None-Match.
12930func (c *ProjectsAgentKnowledgeBasesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesGetCall {
12931	c.ifNoneMatch_ = entityTag
12932	return c
12933}
12934
12935// Context sets the context to be used in this call's Do method. Any
12936// pending HTTP request will be aborted if the provided context is
12937// canceled.
12938func (c *ProjectsAgentKnowledgeBasesGetCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesGetCall {
12939	c.ctx_ = ctx
12940	return c
12941}
12942
12943// Header returns an http.Header that can be modified by the caller to
12944// add HTTP headers to the request.
12945func (c *ProjectsAgentKnowledgeBasesGetCall) Header() http.Header {
12946	if c.header_ == nil {
12947		c.header_ = make(http.Header)
12948	}
12949	return c.header_
12950}
12951
12952func (c *ProjectsAgentKnowledgeBasesGetCall) doRequest(alt string) (*http.Response, error) {
12953	reqHeaders := make(http.Header)
12954	for k, v := range c.header_ {
12955		reqHeaders[k] = v
12956	}
12957	reqHeaders.Set("User-Agent", c.s.userAgent())
12958	if c.ifNoneMatch_ != "" {
12959		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12960	}
12961	var body io.Reader = nil
12962	c.urlParams_.Set("alt", alt)
12963	c.urlParams_.Set("prettyPrint", "false")
12964	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12965	urls += "?" + c.urlParams_.Encode()
12966	req, err := http.NewRequest("GET", urls, body)
12967	if err != nil {
12968		return nil, err
12969	}
12970	req.Header = reqHeaders
12971	googleapi.Expand(req.URL, map[string]string{
12972		"name": c.name,
12973	})
12974	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12975}
12976
12977// Do executes the "dialogflow.projects.agent.knowledgeBases.get" call.
12978// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
12979// will be non-nil. Any non-2xx status code is an error. Response
12980// headers are in either
12981// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
12982// (if a response was returned at all) in
12983// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12984// whether the returned error was because http.StatusNotModified was
12985// returned.
12986func (c *ProjectsAgentKnowledgeBasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
12987	gensupport.SetOptions(c.urlParams_, opts...)
12988	res, err := c.doRequest("json")
12989	if res != nil && res.StatusCode == http.StatusNotModified {
12990		if res.Body != nil {
12991			res.Body.Close()
12992		}
12993		return nil, &googleapi.Error{
12994			Code:   res.StatusCode,
12995			Header: res.Header,
12996		}
12997	}
12998	if err != nil {
12999		return nil, err
13000	}
13001	defer googleapi.CloseBody(res)
13002	if err := googleapi.CheckResponse(res); err != nil {
13003		return nil, err
13004	}
13005	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
13006		ServerResponse: googleapi.ServerResponse{
13007			Header:         res.Header,
13008			HTTPStatusCode: res.StatusCode,
13009		},
13010	}
13011	target := &ret
13012	if err := gensupport.DecodeResponse(target, res); err != nil {
13013		return nil, err
13014	}
13015	return ret, nil
13016	// {
13017	//   "description": "Retrieves the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
13018	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
13019	//   "httpMethod": "GET",
13020	//   "id": "dialogflow.projects.agent.knowledgeBases.get",
13021	//   "parameterOrder": [
13022	//     "name"
13023	//   ],
13024	//   "parameters": {
13025	//     "name": {
13026	//       "description": "Required. The name of the knowledge base to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
13027	//       "location": "path",
13028	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
13029	//       "required": true,
13030	//       "type": "string"
13031	//     }
13032	//   },
13033	//   "path": "v2beta1/{+name}",
13034	//   "response": {
13035	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
13036	//   },
13037	//   "scopes": [
13038	//     "https://www.googleapis.com/auth/cloud-platform",
13039	//     "https://www.googleapis.com/auth/dialogflow"
13040	//   ]
13041	// }
13042
13043}
13044
13045// method id "dialogflow.projects.agent.knowledgeBases.list":
13046
13047type ProjectsAgentKnowledgeBasesListCall struct {
13048	s            *Service
13049	parent       string
13050	urlParams_   gensupport.URLParams
13051	ifNoneMatch_ string
13052	ctx_         context.Context
13053	header_      http.Header
13054}
13055
13056// List: Returns the list of all knowledge bases of the specified
13057// agent.
13058//
13059// Note: The `projects.agent.knowledgeBases` resource is
13060// deprecated;
13061// only use `projects.knowledgeBases`.
13062func (r *ProjectsAgentKnowledgeBasesService) List(parent string) *ProjectsAgentKnowledgeBasesListCall {
13063	c := &ProjectsAgentKnowledgeBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13064	c.parent = parent
13065	return c
13066}
13067
13068// PageSize sets the optional parameter "pageSize": The maximum number
13069// of items to return in a single page. By
13070// default 10 and at most 100.
13071func (c *ProjectsAgentKnowledgeBasesListCall) PageSize(pageSize int64) *ProjectsAgentKnowledgeBasesListCall {
13072	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13073	return c
13074}
13075
13076// PageToken sets the optional parameter "pageToken": The
13077// next_page_token value returned from a previous list request.
13078func (c *ProjectsAgentKnowledgeBasesListCall) PageToken(pageToken string) *ProjectsAgentKnowledgeBasesListCall {
13079	c.urlParams_.Set("pageToken", pageToken)
13080	return c
13081}
13082
13083// Fields allows partial responses to be retrieved. See
13084// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13085// for more information.
13086func (c *ProjectsAgentKnowledgeBasesListCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesListCall {
13087	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13088	return c
13089}
13090
13091// IfNoneMatch sets the optional parameter which makes the operation
13092// fail if the object's ETag matches the given value. This is useful for
13093// getting updates only after the object has changed since the last
13094// request. Use googleapi.IsNotModified to check whether the response
13095// error from Do is the result of In-None-Match.
13096func (c *ProjectsAgentKnowledgeBasesListCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesListCall {
13097	c.ifNoneMatch_ = entityTag
13098	return c
13099}
13100
13101// Context sets the context to be used in this call's Do method. Any
13102// pending HTTP request will be aborted if the provided context is
13103// canceled.
13104func (c *ProjectsAgentKnowledgeBasesListCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesListCall {
13105	c.ctx_ = ctx
13106	return c
13107}
13108
13109// Header returns an http.Header that can be modified by the caller to
13110// add HTTP headers to the request.
13111func (c *ProjectsAgentKnowledgeBasesListCall) Header() http.Header {
13112	if c.header_ == nil {
13113		c.header_ = make(http.Header)
13114	}
13115	return c.header_
13116}
13117
13118func (c *ProjectsAgentKnowledgeBasesListCall) doRequest(alt string) (*http.Response, error) {
13119	reqHeaders := make(http.Header)
13120	for k, v := range c.header_ {
13121		reqHeaders[k] = v
13122	}
13123	reqHeaders.Set("User-Agent", c.s.userAgent())
13124	if c.ifNoneMatch_ != "" {
13125		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13126	}
13127	var body io.Reader = nil
13128	c.urlParams_.Set("alt", alt)
13129	c.urlParams_.Set("prettyPrint", "false")
13130	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
13131	urls += "?" + c.urlParams_.Encode()
13132	req, err := http.NewRequest("GET", urls, body)
13133	if err != nil {
13134		return nil, err
13135	}
13136	req.Header = reqHeaders
13137	googleapi.Expand(req.URL, map[string]string{
13138		"parent": c.parent,
13139	})
13140	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13141}
13142
13143// Do executes the "dialogflow.projects.agent.knowledgeBases.list" call.
13144// Exactly one of
13145// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse or error will
13146// be non-nil. Any non-2xx status code is an error. Response headers are
13147// in either
13148// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse.ServerResponse
13149// .Header or (if a response was returned at all) in
13150// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13151// whether the returned error was because http.StatusNotModified was
13152// returned.
13153func (c *ProjectsAgentKnowledgeBasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse, error) {
13154	gensupport.SetOptions(c.urlParams_, opts...)
13155	res, err := c.doRequest("json")
13156	if res != nil && res.StatusCode == http.StatusNotModified {
13157		if res.Body != nil {
13158			res.Body.Close()
13159		}
13160		return nil, &googleapi.Error{
13161			Code:   res.StatusCode,
13162			Header: res.Header,
13163		}
13164	}
13165	if err != nil {
13166		return nil, err
13167	}
13168	defer googleapi.CloseBody(res)
13169	if err := googleapi.CheckResponse(res); err != nil {
13170		return nil, err
13171	}
13172	ret := &GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse{
13173		ServerResponse: googleapi.ServerResponse{
13174			Header:         res.Header,
13175			HTTPStatusCode: res.StatusCode,
13176		},
13177	}
13178	target := &ret
13179	if err := gensupport.DecodeResponse(target, res); err != nil {
13180		return nil, err
13181	}
13182	return ret, nil
13183	// {
13184	//   "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`.",
13185	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases",
13186	//   "httpMethod": "GET",
13187	//   "id": "dialogflow.projects.agent.knowledgeBases.list",
13188	//   "parameterOrder": [
13189	//     "parent"
13190	//   ],
13191	//   "parameters": {
13192	//     "pageSize": {
13193	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
13194	//       "format": "int32",
13195	//       "location": "query",
13196	//       "type": "integer"
13197	//     },
13198	//     "pageToken": {
13199	//       "description": "Optional. The next_page_token value returned from a previous list request.",
13200	//       "location": "query",
13201	//       "type": "string"
13202	//     },
13203	//     "parent": {
13204	//       "description": "Required. The project to list of knowledge bases for.\nFormat: `projects/\u003cProject ID\u003e`.",
13205	//       "location": "path",
13206	//       "pattern": "^projects/[^/]+/agent$",
13207	//       "required": true,
13208	//       "type": "string"
13209	//     }
13210	//   },
13211	//   "path": "v2beta1/{+parent}/knowledgeBases",
13212	//   "response": {
13213	//     "$ref": "GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse"
13214	//   },
13215	//   "scopes": [
13216	//     "https://www.googleapis.com/auth/cloud-platform",
13217	//     "https://www.googleapis.com/auth/dialogflow"
13218	//   ]
13219	// }
13220
13221}
13222
13223// Pages invokes f for each page of results.
13224// A non-nil error returned from f will halt the iteration.
13225// The provided context supersedes any context provided to the Context method.
13226func (c *ProjectsAgentKnowledgeBasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse) error) error {
13227	c.ctx_ = ctx
13228	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13229	for {
13230		x, err := c.Do()
13231		if err != nil {
13232			return err
13233		}
13234		if err := f(x); err != nil {
13235			return err
13236		}
13237		if x.NextPageToken == "" {
13238			return nil
13239		}
13240		c.PageToken(x.NextPageToken)
13241	}
13242}
13243
13244// method id "dialogflow.projects.agent.knowledgeBases.patch":
13245
13246type ProjectsAgentKnowledgeBasesPatchCall struct {
13247	s                                         *Service
13248	name                                      string
13249	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
13250	urlParams_                                gensupport.URLParams
13251	ctx_                                      context.Context
13252	header_                                   http.Header
13253}
13254
13255// Patch: Updates the specified knowledge base.
13256//
13257// Note: The `projects.agent.knowledgeBases` resource is
13258// deprecated;
13259// only use `projects.knowledgeBases`.
13260func (r *ProjectsAgentKnowledgeBasesService) Patch(name string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsAgentKnowledgeBasesPatchCall {
13261	c := &ProjectsAgentKnowledgeBasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13262	c.name = name
13263	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
13264	return c
13265}
13266
13267// UpdateMask sets the optional parameter "updateMask": Not specified
13268// means `update all`.
13269// Currently, only `display_name` can be updated, an InvalidArgument
13270// will be
13271// returned for attempting to update other fields.
13272func (c *ProjectsAgentKnowledgeBasesPatchCall) UpdateMask(updateMask string) *ProjectsAgentKnowledgeBasesPatchCall {
13273	c.urlParams_.Set("updateMask", updateMask)
13274	return c
13275}
13276
13277// Fields allows partial responses to be retrieved. See
13278// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13279// for more information.
13280func (c *ProjectsAgentKnowledgeBasesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesPatchCall {
13281	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13282	return c
13283}
13284
13285// Context sets the context to be used in this call's Do method. Any
13286// pending HTTP request will be aborted if the provided context is
13287// canceled.
13288func (c *ProjectsAgentKnowledgeBasesPatchCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesPatchCall {
13289	c.ctx_ = ctx
13290	return c
13291}
13292
13293// Header returns an http.Header that can be modified by the caller to
13294// add HTTP headers to the request.
13295func (c *ProjectsAgentKnowledgeBasesPatchCall) Header() http.Header {
13296	if c.header_ == nil {
13297		c.header_ = make(http.Header)
13298	}
13299	return c.header_
13300}
13301
13302func (c *ProjectsAgentKnowledgeBasesPatchCall) doRequest(alt string) (*http.Response, error) {
13303	reqHeaders := make(http.Header)
13304	for k, v := range c.header_ {
13305		reqHeaders[k] = v
13306	}
13307	reqHeaders.Set("User-Agent", c.s.userAgent())
13308	var body io.Reader = nil
13309	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
13310	if err != nil {
13311		return nil, err
13312	}
13313	reqHeaders.Set("Content-Type", "application/json")
13314	c.urlParams_.Set("alt", alt)
13315	c.urlParams_.Set("prettyPrint", "false")
13316	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
13317	urls += "?" + c.urlParams_.Encode()
13318	req, err := http.NewRequest("PATCH", urls, body)
13319	if err != nil {
13320		return nil, err
13321	}
13322	req.Header = reqHeaders
13323	googleapi.Expand(req.URL, map[string]string{
13324		"name": c.name,
13325	})
13326	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13327}
13328
13329// Do executes the "dialogflow.projects.agent.knowledgeBases.patch" call.
13330// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
13331// will be non-nil. Any non-2xx status code is an error. Response
13332// headers are in either
13333// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
13334// (if a response was returned at all) in
13335// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13336// whether the returned error was because http.StatusNotModified was
13337// returned.
13338func (c *ProjectsAgentKnowledgeBasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
13339	gensupport.SetOptions(c.urlParams_, opts...)
13340	res, err := c.doRequest("json")
13341	if res != nil && res.StatusCode == http.StatusNotModified {
13342		if res.Body != nil {
13343			res.Body.Close()
13344		}
13345		return nil, &googleapi.Error{
13346			Code:   res.StatusCode,
13347			Header: res.Header,
13348		}
13349	}
13350	if err != nil {
13351		return nil, err
13352	}
13353	defer googleapi.CloseBody(res)
13354	if err := googleapi.CheckResponse(res); err != nil {
13355		return nil, err
13356	}
13357	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
13358		ServerResponse: googleapi.ServerResponse{
13359			Header:         res.Header,
13360			HTTPStatusCode: res.StatusCode,
13361		},
13362	}
13363	target := &ret
13364	if err := gensupport.DecodeResponse(target, res); err != nil {
13365		return nil, err
13366	}
13367	return ret, nil
13368	// {
13369	//   "description": "Updates the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
13370	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}",
13371	//   "httpMethod": "PATCH",
13372	//   "id": "dialogflow.projects.agent.knowledgeBases.patch",
13373	//   "parameterOrder": [
13374	//     "name"
13375	//   ],
13376	//   "parameters": {
13377	//     "name": {
13378	//       "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`.",
13379	//       "location": "path",
13380	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
13381	//       "required": true,
13382	//       "type": "string"
13383	//     },
13384	//     "updateMask": {
13385	//       "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.",
13386	//       "format": "google-fieldmask",
13387	//       "location": "query",
13388	//       "type": "string"
13389	//     }
13390	//   },
13391	//   "path": "v2beta1/{+name}",
13392	//   "request": {
13393	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
13394	//   },
13395	//   "response": {
13396	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
13397	//   },
13398	//   "scopes": [
13399	//     "https://www.googleapis.com/auth/cloud-platform",
13400	//     "https://www.googleapis.com/auth/dialogflow"
13401	//   ]
13402	// }
13403
13404}
13405
13406// method id "dialogflow.projects.agent.knowledgeBases.documents.create":
13407
13408type ProjectsAgentKnowledgeBasesDocumentsCreateCall struct {
13409	s                                    *Service
13410	parent                               string
13411	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
13412	urlParams_                           gensupport.URLParams
13413	ctx_                                 context.Context
13414	header_                              http.Header
13415}
13416
13417// Create: Creates a new document.
13418//
13419// Note: The `projects.agent.knowledgeBases.documents` resource is
13420// deprecated;
13421// only use `projects.knowledgeBases.documents`.
13422//
13423// Operation <response: Document,
13424//            metadata: KnowledgeOperationMetadata>
13425func (r *ProjectsAgentKnowledgeBasesDocumentsService) Create(parent string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
13426	c := &ProjectsAgentKnowledgeBasesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13427	c.parent = parent
13428	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
13429	return c
13430}
13431
13432// Fields allows partial responses to be retrieved. See
13433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13434// for more information.
13435func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
13436	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13437	return c
13438}
13439
13440// Context sets the context to be used in this call's Do method. Any
13441// pending HTTP request will be aborted if the provided context is
13442// canceled.
13443func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsCreateCall {
13444	c.ctx_ = ctx
13445	return c
13446}
13447
13448// Header returns an http.Header that can be modified by the caller to
13449// add HTTP headers to the request.
13450func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Header() http.Header {
13451	if c.header_ == nil {
13452		c.header_ = make(http.Header)
13453	}
13454	return c.header_
13455}
13456
13457func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) {
13458	reqHeaders := make(http.Header)
13459	for k, v := range c.header_ {
13460		reqHeaders[k] = v
13461	}
13462	reqHeaders.Set("User-Agent", c.s.userAgent())
13463	var body io.Reader = nil
13464	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
13465	if err != nil {
13466		return nil, err
13467	}
13468	reqHeaders.Set("Content-Type", "application/json")
13469	c.urlParams_.Set("alt", alt)
13470	c.urlParams_.Set("prettyPrint", "false")
13471	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
13472	urls += "?" + c.urlParams_.Encode()
13473	req, err := http.NewRequest("POST", urls, body)
13474	if err != nil {
13475		return nil, err
13476	}
13477	req.Header = reqHeaders
13478	googleapi.Expand(req.URL, map[string]string{
13479		"parent": c.parent,
13480	})
13481	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13482}
13483
13484// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.create" call.
13485// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
13486// Any non-2xx status code is an error. Response headers are in either
13487// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
13488// was returned at all) in error.(*googleapi.Error).Header. Use
13489// googleapi.IsNotModified to check whether the returned error was
13490// because http.StatusNotModified was returned.
13491func (c *ProjectsAgentKnowledgeBasesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
13492	gensupport.SetOptions(c.urlParams_, opts...)
13493	res, err := c.doRequest("json")
13494	if res != nil && res.StatusCode == http.StatusNotModified {
13495		if res.Body != nil {
13496			res.Body.Close()
13497		}
13498		return nil, &googleapi.Error{
13499			Code:   res.StatusCode,
13500			Header: res.Header,
13501		}
13502	}
13503	if err != nil {
13504		return nil, err
13505	}
13506	defer googleapi.CloseBody(res)
13507	if err := googleapi.CheckResponse(res); err != nil {
13508		return nil, err
13509	}
13510	ret := &GoogleLongrunningOperation{
13511		ServerResponse: googleapi.ServerResponse{
13512			Header:         res.Header,
13513			HTTPStatusCode: res.StatusCode,
13514		},
13515	}
13516	target := &ret
13517	if err := gensupport.DecodeResponse(target, res); err != nil {
13518		return nil, err
13519	}
13520	return ret, nil
13521	// {
13522	//   "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",
13523	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents",
13524	//   "httpMethod": "POST",
13525	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.create",
13526	//   "parameterOrder": [
13527	//     "parent"
13528	//   ],
13529	//   "parameters": {
13530	//     "parent": {
13531	//       "description": "Required. The knoweldge base to create a document for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
13532	//       "location": "path",
13533	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
13534	//       "required": true,
13535	//       "type": "string"
13536	//     }
13537	//   },
13538	//   "path": "v2beta1/{+parent}/documents",
13539	//   "request": {
13540	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
13541	//   },
13542	//   "response": {
13543	//     "$ref": "GoogleLongrunningOperation"
13544	//   },
13545	//   "scopes": [
13546	//     "https://www.googleapis.com/auth/cloud-platform",
13547	//     "https://www.googleapis.com/auth/dialogflow"
13548	//   ]
13549	// }
13550
13551}
13552
13553// method id "dialogflow.projects.agent.knowledgeBases.documents.delete":
13554
13555type ProjectsAgentKnowledgeBasesDocumentsDeleteCall struct {
13556	s          *Service
13557	name       string
13558	urlParams_ gensupport.URLParams
13559	ctx_       context.Context
13560	header_    http.Header
13561}
13562
13563// Delete: Deletes the specified document.
13564//
13565// Note: The `projects.agent.knowledgeBases.documents` resource is
13566// deprecated;
13567// only use `projects.knowledgeBases.documents`.
13568//
13569// Operation <response: google.protobuf.Empty,
13570//            metadata: KnowledgeOperationMetadata>
13571func (r *ProjectsAgentKnowledgeBasesDocumentsService) Delete(name string) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
13572	c := &ProjectsAgentKnowledgeBasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13573	c.name = name
13574	return c
13575}
13576
13577// Fields allows partial responses to be retrieved. See
13578// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13579// for more information.
13580func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
13581	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13582	return c
13583}
13584
13585// Context sets the context to be used in this call's Do method. Any
13586// pending HTTP request will be aborted if the provided context is
13587// canceled.
13588func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsDeleteCall {
13589	c.ctx_ = ctx
13590	return c
13591}
13592
13593// Header returns an http.Header that can be modified by the caller to
13594// add HTTP headers to the request.
13595func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Header() http.Header {
13596	if c.header_ == nil {
13597		c.header_ = make(http.Header)
13598	}
13599	return c.header_
13600}
13601
13602func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
13603	reqHeaders := make(http.Header)
13604	for k, v := range c.header_ {
13605		reqHeaders[k] = v
13606	}
13607	reqHeaders.Set("User-Agent", c.s.userAgent())
13608	var body io.Reader = nil
13609	c.urlParams_.Set("alt", alt)
13610	c.urlParams_.Set("prettyPrint", "false")
13611	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
13612	urls += "?" + c.urlParams_.Encode()
13613	req, err := http.NewRequest("DELETE", urls, body)
13614	if err != nil {
13615		return nil, err
13616	}
13617	req.Header = reqHeaders
13618	googleapi.Expand(req.URL, map[string]string{
13619		"name": c.name,
13620	})
13621	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13622}
13623
13624// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.delete" call.
13625// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
13626// Any non-2xx status code is an error. Response headers are in either
13627// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
13628// was returned at all) in error.(*googleapi.Error).Header. Use
13629// googleapi.IsNotModified to check whether the returned error was
13630// because http.StatusNotModified was returned.
13631func (c *ProjectsAgentKnowledgeBasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
13632	gensupport.SetOptions(c.urlParams_, opts...)
13633	res, err := c.doRequest("json")
13634	if res != nil && res.StatusCode == http.StatusNotModified {
13635		if res.Body != nil {
13636			res.Body.Close()
13637		}
13638		return nil, &googleapi.Error{
13639			Code:   res.StatusCode,
13640			Header: res.Header,
13641		}
13642	}
13643	if err != nil {
13644		return nil, err
13645	}
13646	defer googleapi.CloseBody(res)
13647	if err := googleapi.CheckResponse(res); err != nil {
13648		return nil, err
13649	}
13650	ret := &GoogleLongrunningOperation{
13651		ServerResponse: googleapi.ServerResponse{
13652			Header:         res.Header,
13653			HTTPStatusCode: res.StatusCode,
13654		},
13655	}
13656	target := &ret
13657	if err := gensupport.DecodeResponse(target, res); err != nil {
13658		return nil, err
13659	}
13660	return ret, nil
13661	// {
13662	//   "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",
13663	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
13664	//   "httpMethod": "DELETE",
13665	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.delete",
13666	//   "parameterOrder": [
13667	//     "name"
13668	//   ],
13669	//   "parameters": {
13670	//     "name": {
13671	//       "description": "The name of the document to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
13672	//       "location": "path",
13673	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
13674	//       "required": true,
13675	//       "type": "string"
13676	//     }
13677	//   },
13678	//   "path": "v2beta1/{+name}",
13679	//   "response": {
13680	//     "$ref": "GoogleLongrunningOperation"
13681	//   },
13682	//   "scopes": [
13683	//     "https://www.googleapis.com/auth/cloud-platform",
13684	//     "https://www.googleapis.com/auth/dialogflow"
13685	//   ]
13686	// }
13687
13688}
13689
13690// method id "dialogflow.projects.agent.knowledgeBases.documents.get":
13691
13692type ProjectsAgentKnowledgeBasesDocumentsGetCall struct {
13693	s            *Service
13694	name         string
13695	urlParams_   gensupport.URLParams
13696	ifNoneMatch_ string
13697	ctx_         context.Context
13698	header_      http.Header
13699}
13700
13701// Get: Retrieves the specified document.
13702//
13703// Note: The `projects.agent.knowledgeBases.documents` resource is
13704// deprecated;
13705// only use `projects.knowledgeBases.documents`.
13706func (r *ProjectsAgentKnowledgeBasesDocumentsService) Get(name string) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
13707	c := &ProjectsAgentKnowledgeBasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13708	c.name = name
13709	return c
13710}
13711
13712// Fields allows partial responses to be retrieved. See
13713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13714// for more information.
13715func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
13716	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13717	return c
13718}
13719
13720// IfNoneMatch sets the optional parameter which makes the operation
13721// fail if the object's ETag matches the given value. This is useful for
13722// getting updates only after the object has changed since the last
13723// request. Use googleapi.IsNotModified to check whether the response
13724// error from Do is the result of In-None-Match.
13725func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
13726	c.ifNoneMatch_ = entityTag
13727	return c
13728}
13729
13730// Context sets the context to be used in this call's Do method. Any
13731// pending HTTP request will be aborted if the provided context is
13732// canceled.
13733func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsGetCall {
13734	c.ctx_ = ctx
13735	return c
13736}
13737
13738// Header returns an http.Header that can be modified by the caller to
13739// add HTTP headers to the request.
13740func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Header() http.Header {
13741	if c.header_ == nil {
13742		c.header_ = make(http.Header)
13743	}
13744	return c.header_
13745}
13746
13747func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
13748	reqHeaders := make(http.Header)
13749	for k, v := range c.header_ {
13750		reqHeaders[k] = v
13751	}
13752	reqHeaders.Set("User-Agent", c.s.userAgent())
13753	if c.ifNoneMatch_ != "" {
13754		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13755	}
13756	var body io.Reader = nil
13757	c.urlParams_.Set("alt", alt)
13758	c.urlParams_.Set("prettyPrint", "false")
13759	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
13760	urls += "?" + c.urlParams_.Encode()
13761	req, err := http.NewRequest("GET", urls, body)
13762	if err != nil {
13763		return nil, err
13764	}
13765	req.Header = reqHeaders
13766	googleapi.Expand(req.URL, map[string]string{
13767		"name": c.name,
13768	})
13769	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13770}
13771
13772// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.get" call.
13773// Exactly one of *GoogleCloudDialogflowV2beta1Document or error will be
13774// non-nil. Any non-2xx status code is an error. Response headers are in
13775// either *GoogleCloudDialogflowV2beta1Document.ServerResponse.Header or
13776// (if a response was returned at all) in
13777// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13778// whether the returned error was because http.StatusNotModified was
13779// returned.
13780func (c *ProjectsAgentKnowledgeBasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Document, error) {
13781	gensupport.SetOptions(c.urlParams_, opts...)
13782	res, err := c.doRequest("json")
13783	if res != nil && res.StatusCode == http.StatusNotModified {
13784		if res.Body != nil {
13785			res.Body.Close()
13786		}
13787		return nil, &googleapi.Error{
13788			Code:   res.StatusCode,
13789			Header: res.Header,
13790		}
13791	}
13792	if err != nil {
13793		return nil, err
13794	}
13795	defer googleapi.CloseBody(res)
13796	if err := googleapi.CheckResponse(res); err != nil {
13797		return nil, err
13798	}
13799	ret := &GoogleCloudDialogflowV2beta1Document{
13800		ServerResponse: googleapi.ServerResponse{
13801			Header:         res.Header,
13802			HTTPStatusCode: res.StatusCode,
13803		},
13804	}
13805	target := &ret
13806	if err := gensupport.DecodeResponse(target, res); err != nil {
13807		return nil, err
13808	}
13809	return ret, nil
13810	// {
13811	//   "description": "Retrieves the specified document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.",
13812	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
13813	//   "httpMethod": "GET",
13814	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.get",
13815	//   "parameterOrder": [
13816	//     "name"
13817	//   ],
13818	//   "parameters": {
13819	//     "name": {
13820	//       "description": "Required. The name of the document to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
13821	//       "location": "path",
13822	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
13823	//       "required": true,
13824	//       "type": "string"
13825	//     }
13826	//   },
13827	//   "path": "v2beta1/{+name}",
13828	//   "response": {
13829	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
13830	//   },
13831	//   "scopes": [
13832	//     "https://www.googleapis.com/auth/cloud-platform",
13833	//     "https://www.googleapis.com/auth/dialogflow"
13834	//   ]
13835	// }
13836
13837}
13838
13839// method id "dialogflow.projects.agent.knowledgeBases.documents.list":
13840
13841type ProjectsAgentKnowledgeBasesDocumentsListCall struct {
13842	s            *Service
13843	parent       string
13844	urlParams_   gensupport.URLParams
13845	ifNoneMatch_ string
13846	ctx_         context.Context
13847	header_      http.Header
13848}
13849
13850// List: Returns the list of all documents of the knowledge base.
13851//
13852// Note: The `projects.agent.knowledgeBases.documents` resource is
13853// deprecated;
13854// only use `projects.knowledgeBases.documents`.
13855func (r *ProjectsAgentKnowledgeBasesDocumentsService) List(parent string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
13856	c := &ProjectsAgentKnowledgeBasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13857	c.parent = parent
13858	return c
13859}
13860
13861// PageSize sets the optional parameter "pageSize": The maximum number
13862// of items to return in a single page. By
13863// default 10 and at most 100.
13864func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) PageSize(pageSize int64) *ProjectsAgentKnowledgeBasesDocumentsListCall {
13865	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13866	return c
13867}
13868
13869// PageToken sets the optional parameter "pageToken": The
13870// next_page_token value returned from a previous list request.
13871func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) PageToken(pageToken string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
13872	c.urlParams_.Set("pageToken", pageToken)
13873	return c
13874}
13875
13876// Fields allows partial responses to be retrieved. See
13877// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13878// for more information.
13879func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsListCall {
13880	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13881	return c
13882}
13883
13884// IfNoneMatch sets the optional parameter which makes the operation
13885// fail if the object's ETag matches the given value. This is useful for
13886// getting updates only after the object has changed since the last
13887// request. Use googleapi.IsNotModified to check whether the response
13888// error from Do is the result of In-None-Match.
13889func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsAgentKnowledgeBasesDocumentsListCall {
13890	c.ifNoneMatch_ = entityTag
13891	return c
13892}
13893
13894// Context sets the context to be used in this call's Do method. Any
13895// pending HTTP request will be aborted if the provided context is
13896// canceled.
13897func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsListCall {
13898	c.ctx_ = ctx
13899	return c
13900}
13901
13902// Header returns an http.Header that can be modified by the caller to
13903// add HTTP headers to the request.
13904func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Header() http.Header {
13905	if c.header_ == nil {
13906		c.header_ = make(http.Header)
13907	}
13908	return c.header_
13909}
13910
13911func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
13912	reqHeaders := make(http.Header)
13913	for k, v := range c.header_ {
13914		reqHeaders[k] = v
13915	}
13916	reqHeaders.Set("User-Agent", c.s.userAgent())
13917	if c.ifNoneMatch_ != "" {
13918		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13919	}
13920	var body io.Reader = nil
13921	c.urlParams_.Set("alt", alt)
13922	c.urlParams_.Set("prettyPrint", "false")
13923	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
13924	urls += "?" + c.urlParams_.Encode()
13925	req, err := http.NewRequest("GET", urls, body)
13926	if err != nil {
13927		return nil, err
13928	}
13929	req.Header = reqHeaders
13930	googleapi.Expand(req.URL, map[string]string{
13931		"parent": c.parent,
13932	})
13933	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13934}
13935
13936// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.list" call.
13937// Exactly one of *GoogleCloudDialogflowV2beta1ListDocumentsResponse or
13938// error will be non-nil. Any non-2xx status code is an error. Response
13939// headers are in either
13940// *GoogleCloudDialogflowV2beta1ListDocumentsResponse.ServerResponse.Head
13941// er or (if a response was returned at all) in
13942// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13943// whether the returned error was because http.StatusNotModified was
13944// returned.
13945func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListDocumentsResponse, error) {
13946	gensupport.SetOptions(c.urlParams_, opts...)
13947	res, err := c.doRequest("json")
13948	if res != nil && res.StatusCode == http.StatusNotModified {
13949		if res.Body != nil {
13950			res.Body.Close()
13951		}
13952		return nil, &googleapi.Error{
13953			Code:   res.StatusCode,
13954			Header: res.Header,
13955		}
13956	}
13957	if err != nil {
13958		return nil, err
13959	}
13960	defer googleapi.CloseBody(res)
13961	if err := googleapi.CheckResponse(res); err != nil {
13962		return nil, err
13963	}
13964	ret := &GoogleCloudDialogflowV2beta1ListDocumentsResponse{
13965		ServerResponse: googleapi.ServerResponse{
13966			Header:         res.Header,
13967			HTTPStatusCode: res.StatusCode,
13968		},
13969	}
13970	target := &ret
13971	if err := gensupport.DecodeResponse(target, res); err != nil {
13972		return nil, err
13973	}
13974	return ret, nil
13975	// {
13976	//   "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`.",
13977	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents",
13978	//   "httpMethod": "GET",
13979	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.list",
13980	//   "parameterOrder": [
13981	//     "parent"
13982	//   ],
13983	//   "parameters": {
13984	//     "pageSize": {
13985	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
13986	//       "format": "int32",
13987	//       "location": "query",
13988	//       "type": "integer"
13989	//     },
13990	//     "pageToken": {
13991	//       "description": "Optional. The next_page_token value returned from a previous list request.",
13992	//       "location": "query",
13993	//       "type": "string"
13994	//     },
13995	//     "parent": {
13996	//       "description": "Required. The knowledge base to list all documents for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
13997	//       "location": "path",
13998	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$",
13999	//       "required": true,
14000	//       "type": "string"
14001	//     }
14002	//   },
14003	//   "path": "v2beta1/{+parent}/documents",
14004	//   "response": {
14005	//     "$ref": "GoogleCloudDialogflowV2beta1ListDocumentsResponse"
14006	//   },
14007	//   "scopes": [
14008	//     "https://www.googleapis.com/auth/cloud-platform",
14009	//     "https://www.googleapis.com/auth/dialogflow"
14010	//   ]
14011	// }
14012
14013}
14014
14015// Pages invokes f for each page of results.
14016// A non-nil error returned from f will halt the iteration.
14017// The provided context supersedes any context provided to the Context method.
14018func (c *ProjectsAgentKnowledgeBasesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListDocumentsResponse) error) error {
14019	c.ctx_ = ctx
14020	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14021	for {
14022		x, err := c.Do()
14023		if err != nil {
14024			return err
14025		}
14026		if err := f(x); err != nil {
14027			return err
14028		}
14029		if x.NextPageToken == "" {
14030			return nil
14031		}
14032		c.PageToken(x.NextPageToken)
14033	}
14034}
14035
14036// method id "dialogflow.projects.agent.knowledgeBases.documents.patch":
14037
14038type ProjectsAgentKnowledgeBasesDocumentsPatchCall struct {
14039	s                                    *Service
14040	name                                 string
14041	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
14042	urlParams_                           gensupport.URLParams
14043	ctx_                                 context.Context
14044	header_                              http.Header
14045}
14046
14047// Patch: Updates the specified document.
14048//
14049// Note: The `projects.agent.knowledgeBases.documents` resource is
14050// deprecated;
14051// only use `projects.knowledgeBases.documents`.
14052//
14053// Operation <response: Document,
14054//            metadata: KnowledgeOperationMetadata>
14055func (r *ProjectsAgentKnowledgeBasesDocumentsService) Patch(name string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
14056	c := &ProjectsAgentKnowledgeBasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14057	c.name = name
14058	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
14059	return c
14060}
14061
14062// UpdateMask sets the optional parameter "updateMask": Not specified
14063// means `update all`.
14064// Currently, only `display_name` can be updated, an InvalidArgument
14065// will be
14066// returned for attempting to update other fields.
14067func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
14068	c.urlParams_.Set("updateMask", updateMask)
14069	return c
14070}
14071
14072// Fields allows partial responses to be retrieved. See
14073// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14074// for more information.
14075func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
14076	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14077	return c
14078}
14079
14080// Context sets the context to be used in this call's Do method. Any
14081// pending HTTP request will be aborted if the provided context is
14082// canceled.
14083func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsPatchCall {
14084	c.ctx_ = ctx
14085	return c
14086}
14087
14088// Header returns an http.Header that can be modified by the caller to
14089// add HTTP headers to the request.
14090func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Header() http.Header {
14091	if c.header_ == nil {
14092		c.header_ = make(http.Header)
14093	}
14094	return c.header_
14095}
14096
14097func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
14098	reqHeaders := make(http.Header)
14099	for k, v := range c.header_ {
14100		reqHeaders[k] = v
14101	}
14102	reqHeaders.Set("User-Agent", c.s.userAgent())
14103	var body io.Reader = nil
14104	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
14105	if err != nil {
14106		return nil, err
14107	}
14108	reqHeaders.Set("Content-Type", "application/json")
14109	c.urlParams_.Set("alt", alt)
14110	c.urlParams_.Set("prettyPrint", "false")
14111	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14112	urls += "?" + c.urlParams_.Encode()
14113	req, err := http.NewRequest("PATCH", urls, body)
14114	if err != nil {
14115		return nil, err
14116	}
14117	req.Header = reqHeaders
14118	googleapi.Expand(req.URL, map[string]string{
14119		"name": c.name,
14120	})
14121	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14122}
14123
14124// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.patch" call.
14125// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
14126// Any non-2xx status code is an error. Response headers are in either
14127// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
14128// was returned at all) in error.(*googleapi.Error).Header. Use
14129// googleapi.IsNotModified to check whether the returned error was
14130// because http.StatusNotModified was returned.
14131func (c *ProjectsAgentKnowledgeBasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
14132	gensupport.SetOptions(c.urlParams_, opts...)
14133	res, err := c.doRequest("json")
14134	if res != nil && res.StatusCode == http.StatusNotModified {
14135		if res.Body != nil {
14136			res.Body.Close()
14137		}
14138		return nil, &googleapi.Error{
14139			Code:   res.StatusCode,
14140			Header: res.Header,
14141		}
14142	}
14143	if err != nil {
14144		return nil, err
14145	}
14146	defer googleapi.CloseBody(res)
14147	if err := googleapi.CheckResponse(res); err != nil {
14148		return nil, err
14149	}
14150	ret := &GoogleLongrunningOperation{
14151		ServerResponse: googleapi.ServerResponse{
14152			Header:         res.Header,
14153			HTTPStatusCode: res.StatusCode,
14154		},
14155	}
14156	target := &ret
14157	if err := gensupport.DecodeResponse(target, res); err != nil {
14158		return nil, err
14159	}
14160	return ret, nil
14161	// {
14162	//   "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",
14163	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
14164	//   "httpMethod": "PATCH",
14165	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.patch",
14166	//   "parameterOrder": [
14167	//     "name"
14168	//   ],
14169	//   "parameters": {
14170	//     "name": {
14171	//       "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`.",
14172	//       "location": "path",
14173	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
14174	//       "required": true,
14175	//       "type": "string"
14176	//     },
14177	//     "updateMask": {
14178	//       "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.",
14179	//       "format": "google-fieldmask",
14180	//       "location": "query",
14181	//       "type": "string"
14182	//     }
14183	//   },
14184	//   "path": "v2beta1/{+name}",
14185	//   "request": {
14186	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
14187	//   },
14188	//   "response": {
14189	//     "$ref": "GoogleLongrunningOperation"
14190	//   },
14191	//   "scopes": [
14192	//     "https://www.googleapis.com/auth/cloud-platform",
14193	//     "https://www.googleapis.com/auth/dialogflow"
14194	//   ]
14195	// }
14196
14197}
14198
14199// method id "dialogflow.projects.agent.knowledgeBases.documents.reload":
14200
14201type ProjectsAgentKnowledgeBasesDocumentsReloadCall struct {
14202	s                                                 *Service
14203	name                                              string
14204	googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest
14205	urlParams_                                        gensupport.URLParams
14206	ctx_                                              context.Context
14207	header_                                           http.Header
14208}
14209
14210// Reload: Reloads the specified document from its specified source,
14211// content_uri or
14212// content. The previously loaded content of the document will be
14213// deleted.
14214// Note: Even when the content of the document has not changed, there
14215// still
14216// may be side effects because of internal implementation
14217// changes.
14218//
14219// Note: The `projects.agent.knowledgeBases.documents` resource is
14220// deprecated;
14221// only use `projects.knowledgeBases.documents`.
14222//
14223// Operation <response: Document,
14224//            metadata: KnowledgeOperationMetadata>
14225func (r *ProjectsAgentKnowledgeBasesDocumentsService) Reload(name string, googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
14226	c := &ProjectsAgentKnowledgeBasesDocumentsReloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14227	c.name = name
14228	c.googleclouddialogflowv2beta1reloaddocumentrequest = googleclouddialogflowv2beta1reloaddocumentrequest
14229	return c
14230}
14231
14232// Fields allows partial responses to be retrieved. See
14233// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14234// for more information.
14235func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Fields(s ...googleapi.Field) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
14236	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14237	return c
14238}
14239
14240// Context sets the context to be used in this call's Do method. Any
14241// pending HTTP request will be aborted if the provided context is
14242// canceled.
14243func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Context(ctx context.Context) *ProjectsAgentKnowledgeBasesDocumentsReloadCall {
14244	c.ctx_ = ctx
14245	return c
14246}
14247
14248// Header returns an http.Header that can be modified by the caller to
14249// add HTTP headers to the request.
14250func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Header() http.Header {
14251	if c.header_ == nil {
14252		c.header_ = make(http.Header)
14253	}
14254	return c.header_
14255}
14256
14257func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) doRequest(alt string) (*http.Response, error) {
14258	reqHeaders := make(http.Header)
14259	for k, v := range c.header_ {
14260		reqHeaders[k] = v
14261	}
14262	reqHeaders.Set("User-Agent", c.s.userAgent())
14263	var body io.Reader = nil
14264	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1reloaddocumentrequest)
14265	if err != nil {
14266		return nil, err
14267	}
14268	reqHeaders.Set("Content-Type", "application/json")
14269	c.urlParams_.Set("alt", alt)
14270	c.urlParams_.Set("prettyPrint", "false")
14271	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:reload")
14272	urls += "?" + c.urlParams_.Encode()
14273	req, err := http.NewRequest("POST", urls, body)
14274	if err != nil {
14275		return nil, err
14276	}
14277	req.Header = reqHeaders
14278	googleapi.Expand(req.URL, map[string]string{
14279		"name": c.name,
14280	})
14281	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14282}
14283
14284// Do executes the "dialogflow.projects.agent.knowledgeBases.documents.reload" call.
14285// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
14286// Any non-2xx status code is an error. Response headers are in either
14287// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
14288// was returned at all) in error.(*googleapi.Error).Header. Use
14289// googleapi.IsNotModified to check whether the returned error was
14290// because http.StatusNotModified was returned.
14291func (c *ProjectsAgentKnowledgeBasesDocumentsReloadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
14292	gensupport.SetOptions(c.urlParams_, opts...)
14293	res, err := c.doRequest("json")
14294	if res != nil && res.StatusCode == http.StatusNotModified {
14295		if res.Body != nil {
14296			res.Body.Close()
14297		}
14298		return nil, &googleapi.Error{
14299			Code:   res.StatusCode,
14300			Header: res.Header,
14301		}
14302	}
14303	if err != nil {
14304		return nil, err
14305	}
14306	defer googleapi.CloseBody(res)
14307	if err := googleapi.CheckResponse(res); err != nil {
14308		return nil, err
14309	}
14310	ret := &GoogleLongrunningOperation{
14311		ServerResponse: googleapi.ServerResponse{
14312			Header:         res.Header,
14313			HTTPStatusCode: res.StatusCode,
14314		},
14315	}
14316	target := &ret
14317	if err := gensupport.DecodeResponse(target, res); err != nil {
14318		return nil, err
14319	}
14320	return ret, nil
14321	// {
14322	//   "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",
14323	//   "flatPath": "v2beta1/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload",
14324	//   "httpMethod": "POST",
14325	//   "id": "dialogflow.projects.agent.knowledgeBases.documents.reload",
14326	//   "parameterOrder": [
14327	//     "name"
14328	//   ],
14329	//   "parameters": {
14330	//     "name": {
14331	//       "description": "The name of the document to reload.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`",
14332	//       "location": "path",
14333	//       "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$",
14334	//       "required": true,
14335	//       "type": "string"
14336	//     }
14337	//   },
14338	//   "path": "v2beta1/{+name}:reload",
14339	//   "request": {
14340	//     "$ref": "GoogleCloudDialogflowV2beta1ReloadDocumentRequest"
14341	//   },
14342	//   "response": {
14343	//     "$ref": "GoogleLongrunningOperation"
14344	//   },
14345	//   "scopes": [
14346	//     "https://www.googleapis.com/auth/cloud-platform",
14347	//     "https://www.googleapis.com/auth/dialogflow"
14348	//   ]
14349	// }
14350
14351}
14352
14353// method id "dialogflow.projects.agent.sessions.deleteContexts":
14354
14355type ProjectsAgentSessionsDeleteContextsCall struct {
14356	s          *Service
14357	parent     string
14358	urlParams_ gensupport.URLParams
14359	ctx_       context.Context
14360	header_    http.Header
14361}
14362
14363// DeleteContexts: Deletes all active contexts in the specified session.
14364func (r *ProjectsAgentSessionsService) DeleteContexts(parent string) *ProjectsAgentSessionsDeleteContextsCall {
14365	c := &ProjectsAgentSessionsDeleteContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14366	c.parent = parent
14367	return c
14368}
14369
14370// Fields allows partial responses to be retrieved. See
14371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14372// for more information.
14373func (c *ProjectsAgentSessionsDeleteContextsCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDeleteContextsCall {
14374	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14375	return c
14376}
14377
14378// Context sets the context to be used in this call's Do method. Any
14379// pending HTTP request will be aborted if the provided context is
14380// canceled.
14381func (c *ProjectsAgentSessionsDeleteContextsCall) Context(ctx context.Context) *ProjectsAgentSessionsDeleteContextsCall {
14382	c.ctx_ = ctx
14383	return c
14384}
14385
14386// Header returns an http.Header that can be modified by the caller to
14387// add HTTP headers to the request.
14388func (c *ProjectsAgentSessionsDeleteContextsCall) Header() http.Header {
14389	if c.header_ == nil {
14390		c.header_ = make(http.Header)
14391	}
14392	return c.header_
14393}
14394
14395func (c *ProjectsAgentSessionsDeleteContextsCall) doRequest(alt string) (*http.Response, error) {
14396	reqHeaders := make(http.Header)
14397	for k, v := range c.header_ {
14398		reqHeaders[k] = v
14399	}
14400	reqHeaders.Set("User-Agent", c.s.userAgent())
14401	var body io.Reader = nil
14402	c.urlParams_.Set("alt", alt)
14403	c.urlParams_.Set("prettyPrint", "false")
14404	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
14405	urls += "?" + c.urlParams_.Encode()
14406	req, err := http.NewRequest("DELETE", urls, body)
14407	if err != nil {
14408		return nil, err
14409	}
14410	req.Header = reqHeaders
14411	googleapi.Expand(req.URL, map[string]string{
14412		"parent": c.parent,
14413	})
14414	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14415}
14416
14417// Do executes the "dialogflow.projects.agent.sessions.deleteContexts" call.
14418// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
14419// non-2xx status code is an error. Response headers are in either
14420// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
14421// returned at all) in error.(*googleapi.Error).Header. Use
14422// googleapi.IsNotModified to check whether the returned error was
14423// because http.StatusNotModified was returned.
14424func (c *ProjectsAgentSessionsDeleteContextsCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
14425	gensupport.SetOptions(c.urlParams_, opts...)
14426	res, err := c.doRequest("json")
14427	if res != nil && res.StatusCode == http.StatusNotModified {
14428		if res.Body != nil {
14429			res.Body.Close()
14430		}
14431		return nil, &googleapi.Error{
14432			Code:   res.StatusCode,
14433			Header: res.Header,
14434		}
14435	}
14436	if err != nil {
14437		return nil, err
14438	}
14439	defer googleapi.CloseBody(res)
14440	if err := googleapi.CheckResponse(res); err != nil {
14441		return nil, err
14442	}
14443	ret := &GoogleProtobufEmpty{
14444		ServerResponse: googleapi.ServerResponse{
14445			Header:         res.Header,
14446			HTTPStatusCode: res.StatusCode,
14447		},
14448	}
14449	target := &ret
14450	if err := gensupport.DecodeResponse(target, res); err != nil {
14451		return nil, err
14452	}
14453	return ret, nil
14454	// {
14455	//   "description": "Deletes all active contexts in the specified session.",
14456	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
14457	//   "httpMethod": "DELETE",
14458	//   "id": "dialogflow.projects.agent.sessions.deleteContexts",
14459	//   "parameterOrder": [
14460	//     "parent"
14461	//   ],
14462	//   "parameters": {
14463	//     "parent": {
14464	//       "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.",
14465	//       "location": "path",
14466	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
14467	//       "required": true,
14468	//       "type": "string"
14469	//     }
14470	//   },
14471	//   "path": "v2beta1/{+parent}/contexts",
14472	//   "response": {
14473	//     "$ref": "GoogleProtobufEmpty"
14474	//   },
14475	//   "scopes": [
14476	//     "https://www.googleapis.com/auth/cloud-platform",
14477	//     "https://www.googleapis.com/auth/dialogflow"
14478	//   ]
14479	// }
14480
14481}
14482
14483// method id "dialogflow.projects.agent.sessions.detectIntent":
14484
14485type ProjectsAgentSessionsDetectIntentCall struct {
14486	s                                               *Service
14487	sessionid                                       string
14488	googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest
14489	urlParams_                                      gensupport.URLParams
14490	ctx_                                            context.Context
14491	header_                                         http.Header
14492}
14493
14494// DetectIntent: Processes a natural language query and returns
14495// structured, actionable data
14496// as a result. This method is not idempotent, because it may cause
14497// contexts
14498// and session entity types to be updated, which in turn might
14499// affect
14500// results of future queries.
14501func (r *ProjectsAgentSessionsService) DetectIntent(sessionid string, googleclouddialogflowv2beta1detectintentrequest *GoogleCloudDialogflowV2beta1DetectIntentRequest) *ProjectsAgentSessionsDetectIntentCall {
14502	c := &ProjectsAgentSessionsDetectIntentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14503	c.sessionid = sessionid
14504	c.googleclouddialogflowv2beta1detectintentrequest = googleclouddialogflowv2beta1detectintentrequest
14505	return c
14506}
14507
14508// Fields allows partial responses to be retrieved. See
14509// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14510// for more information.
14511func (c *ProjectsAgentSessionsDetectIntentCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsDetectIntentCall {
14512	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14513	return c
14514}
14515
14516// Context sets the context to be used in this call's Do method. Any
14517// pending HTTP request will be aborted if the provided context is
14518// canceled.
14519func (c *ProjectsAgentSessionsDetectIntentCall) Context(ctx context.Context) *ProjectsAgentSessionsDetectIntentCall {
14520	c.ctx_ = ctx
14521	return c
14522}
14523
14524// Header returns an http.Header that can be modified by the caller to
14525// add HTTP headers to the request.
14526func (c *ProjectsAgentSessionsDetectIntentCall) Header() http.Header {
14527	if c.header_ == nil {
14528		c.header_ = make(http.Header)
14529	}
14530	return c.header_
14531}
14532
14533func (c *ProjectsAgentSessionsDetectIntentCall) doRequest(alt string) (*http.Response, error) {
14534	reqHeaders := make(http.Header)
14535	for k, v := range c.header_ {
14536		reqHeaders[k] = v
14537	}
14538	reqHeaders.Set("User-Agent", c.s.userAgent())
14539	var body io.Reader = nil
14540	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1detectintentrequest)
14541	if err != nil {
14542		return nil, err
14543	}
14544	reqHeaders.Set("Content-Type", "application/json")
14545	c.urlParams_.Set("alt", alt)
14546	c.urlParams_.Set("prettyPrint", "false")
14547	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+session}:detectIntent")
14548	urls += "?" + c.urlParams_.Encode()
14549	req, err := http.NewRequest("POST", urls, body)
14550	if err != nil {
14551		return nil, err
14552	}
14553	req.Header = reqHeaders
14554	googleapi.Expand(req.URL, map[string]string{
14555		"session": c.sessionid,
14556	})
14557	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14558}
14559
14560// Do executes the "dialogflow.projects.agent.sessions.detectIntent" call.
14561// Exactly one of *GoogleCloudDialogflowV2beta1DetectIntentResponse or
14562// error will be non-nil. Any non-2xx status code is an error. Response
14563// headers are in either
14564// *GoogleCloudDialogflowV2beta1DetectIntentResponse.ServerResponse.Heade
14565// r or (if a response was returned at all) in
14566// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14567// whether the returned error was because http.StatusNotModified was
14568// returned.
14569func (c *ProjectsAgentSessionsDetectIntentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1DetectIntentResponse, error) {
14570	gensupport.SetOptions(c.urlParams_, opts...)
14571	res, err := c.doRequest("json")
14572	if res != nil && res.StatusCode == http.StatusNotModified {
14573		if res.Body != nil {
14574			res.Body.Close()
14575		}
14576		return nil, &googleapi.Error{
14577			Code:   res.StatusCode,
14578			Header: res.Header,
14579		}
14580	}
14581	if err != nil {
14582		return nil, err
14583	}
14584	defer googleapi.CloseBody(res)
14585	if err := googleapi.CheckResponse(res); err != nil {
14586		return nil, err
14587	}
14588	ret := &GoogleCloudDialogflowV2beta1DetectIntentResponse{
14589		ServerResponse: googleapi.ServerResponse{
14590			Header:         res.Header,
14591			HTTPStatusCode: res.StatusCode,
14592		},
14593	}
14594	target := &ret
14595	if err := gensupport.DecodeResponse(target, res); err != nil {
14596		return nil, err
14597	}
14598	return ret, nil
14599	// {
14600	//   "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.",
14601	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}:detectIntent",
14602	//   "httpMethod": "POST",
14603	//   "id": "dialogflow.projects.agent.sessions.detectIntent",
14604	//   "parameterOrder": [
14605	//     "session"
14606	//   ],
14607	//   "parameters": {
14608	//     "session": {
14609	//       "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 numbers 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.",
14610	//       "location": "path",
14611	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
14612	//       "required": true,
14613	//       "type": "string"
14614	//     }
14615	//   },
14616	//   "path": "v2beta1/{+session}:detectIntent",
14617	//   "request": {
14618	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest"
14619	//   },
14620	//   "response": {
14621	//     "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse"
14622	//   },
14623	//   "scopes": [
14624	//     "https://www.googleapis.com/auth/cloud-platform",
14625	//     "https://www.googleapis.com/auth/dialogflow"
14626	//   ]
14627	// }
14628
14629}
14630
14631// method id "dialogflow.projects.agent.sessions.contexts.create":
14632
14633type ProjectsAgentSessionsContextsCreateCall struct {
14634	s                                   *Service
14635	parent                              string
14636	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
14637	urlParams_                          gensupport.URLParams
14638	ctx_                                context.Context
14639	header_                             http.Header
14640}
14641
14642// Create: Creates a context.
14643//
14644// If the specified context already exists, overrides the context.
14645func (r *ProjectsAgentSessionsContextsService) Create(parent string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentSessionsContextsCreateCall {
14646	c := &ProjectsAgentSessionsContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14647	c.parent = parent
14648	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
14649	return c
14650}
14651
14652// Fields allows partial responses to be retrieved. See
14653// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14654// for more information.
14655func (c *ProjectsAgentSessionsContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsCreateCall {
14656	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14657	return c
14658}
14659
14660// Context sets the context to be used in this call's Do method. Any
14661// pending HTTP request will be aborted if the provided context is
14662// canceled.
14663func (c *ProjectsAgentSessionsContextsCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsCreateCall {
14664	c.ctx_ = ctx
14665	return c
14666}
14667
14668// Header returns an http.Header that can be modified by the caller to
14669// add HTTP headers to the request.
14670func (c *ProjectsAgentSessionsContextsCreateCall) Header() http.Header {
14671	if c.header_ == nil {
14672		c.header_ = make(http.Header)
14673	}
14674	return c.header_
14675}
14676
14677func (c *ProjectsAgentSessionsContextsCreateCall) doRequest(alt string) (*http.Response, error) {
14678	reqHeaders := make(http.Header)
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.googleclouddialogflowv2beta1context)
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}/contexts")
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.sessions.contexts.create" call.
14705// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
14706// non-nil. Any non-2xx status code is an error. Response headers are in
14707// either *GoogleCloudDialogflowV2beta1Context.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 *ProjectsAgentSessionsContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, 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 := &GoogleCloudDialogflowV2beta1Context{
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 a context.\n\nIf the specified context already exists, overrides the context.",
14744	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
14745	//   "httpMethod": "POST",
14746	//   "id": "dialogflow.projects.agent.sessions.contexts.create",
14747	//   "parameterOrder": [
14748	//     "parent"
14749	//   ],
14750	//   "parameters": {
14751	//     "parent": {
14752	//       "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.",
14753	//       "location": "path",
14754	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
14755	//       "required": true,
14756	//       "type": "string"
14757	//     }
14758	//   },
14759	//   "path": "v2beta1/{+parent}/contexts",
14760	//   "request": {
14761	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
14762	//   },
14763	//   "response": {
14764	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
14765	//   },
14766	//   "scopes": [
14767	//     "https://www.googleapis.com/auth/cloud-platform",
14768	//     "https://www.googleapis.com/auth/dialogflow"
14769	//   ]
14770	// }
14771
14772}
14773
14774// method id "dialogflow.projects.agent.sessions.contexts.delete":
14775
14776type ProjectsAgentSessionsContextsDeleteCall struct {
14777	s          *Service
14778	name       string
14779	urlParams_ gensupport.URLParams
14780	ctx_       context.Context
14781	header_    http.Header
14782}
14783
14784// Delete: Deletes the specified context.
14785func (r *ProjectsAgentSessionsContextsService) Delete(name string) *ProjectsAgentSessionsContextsDeleteCall {
14786	c := &ProjectsAgentSessionsContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14787	c.name = name
14788	return c
14789}
14790
14791// Fields allows partial responses to be retrieved. See
14792// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14793// for more information.
14794func (c *ProjectsAgentSessionsContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsDeleteCall {
14795	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14796	return c
14797}
14798
14799// Context sets the context to be used in this call's Do method. Any
14800// pending HTTP request will be aborted if the provided context is
14801// canceled.
14802func (c *ProjectsAgentSessionsContextsDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsDeleteCall {
14803	c.ctx_ = ctx
14804	return c
14805}
14806
14807// Header returns an http.Header that can be modified by the caller to
14808// add HTTP headers to the request.
14809func (c *ProjectsAgentSessionsContextsDeleteCall) Header() http.Header {
14810	if c.header_ == nil {
14811		c.header_ = make(http.Header)
14812	}
14813	return c.header_
14814}
14815
14816func (c *ProjectsAgentSessionsContextsDeleteCall) doRequest(alt string) (*http.Response, error) {
14817	reqHeaders := make(http.Header)
14818	for k, v := range c.header_ {
14819		reqHeaders[k] = v
14820	}
14821	reqHeaders.Set("User-Agent", c.s.userAgent())
14822	var body io.Reader = nil
14823	c.urlParams_.Set("alt", alt)
14824	c.urlParams_.Set("prettyPrint", "false")
14825	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14826	urls += "?" + c.urlParams_.Encode()
14827	req, err := http.NewRequest("DELETE", urls, body)
14828	if err != nil {
14829		return nil, err
14830	}
14831	req.Header = reqHeaders
14832	googleapi.Expand(req.URL, map[string]string{
14833		"name": c.name,
14834	})
14835	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14836}
14837
14838// Do executes the "dialogflow.projects.agent.sessions.contexts.delete" call.
14839// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
14840// non-2xx status code is an error. Response headers are in either
14841// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
14842// returned at all) in error.(*googleapi.Error).Header. Use
14843// googleapi.IsNotModified to check whether the returned error was
14844// because http.StatusNotModified was returned.
14845func (c *ProjectsAgentSessionsContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
14846	gensupport.SetOptions(c.urlParams_, opts...)
14847	res, err := c.doRequest("json")
14848	if res != nil && res.StatusCode == http.StatusNotModified {
14849		if res.Body != nil {
14850			res.Body.Close()
14851		}
14852		return nil, &googleapi.Error{
14853			Code:   res.StatusCode,
14854			Header: res.Header,
14855		}
14856	}
14857	if err != nil {
14858		return nil, err
14859	}
14860	defer googleapi.CloseBody(res)
14861	if err := googleapi.CheckResponse(res); err != nil {
14862		return nil, err
14863	}
14864	ret := &GoogleProtobufEmpty{
14865		ServerResponse: googleapi.ServerResponse{
14866			Header:         res.Header,
14867			HTTPStatusCode: res.StatusCode,
14868		},
14869	}
14870	target := &ret
14871	if err := gensupport.DecodeResponse(target, res); err != nil {
14872		return nil, err
14873	}
14874	return ret, nil
14875	// {
14876	//   "description": "Deletes the specified context.",
14877	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
14878	//   "httpMethod": "DELETE",
14879	//   "id": "dialogflow.projects.agent.sessions.contexts.delete",
14880	//   "parameterOrder": [
14881	//     "name"
14882	//   ],
14883	//   "parameters": {
14884	//     "name": {
14885	//       "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.",
14886	//       "location": "path",
14887	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
14888	//       "required": true,
14889	//       "type": "string"
14890	//     }
14891	//   },
14892	//   "path": "v2beta1/{+name}",
14893	//   "response": {
14894	//     "$ref": "GoogleProtobufEmpty"
14895	//   },
14896	//   "scopes": [
14897	//     "https://www.googleapis.com/auth/cloud-platform",
14898	//     "https://www.googleapis.com/auth/dialogflow"
14899	//   ]
14900	// }
14901
14902}
14903
14904// method id "dialogflow.projects.agent.sessions.contexts.get":
14905
14906type ProjectsAgentSessionsContextsGetCall struct {
14907	s            *Service
14908	name         string
14909	urlParams_   gensupport.URLParams
14910	ifNoneMatch_ string
14911	ctx_         context.Context
14912	header_      http.Header
14913}
14914
14915// Get: Retrieves the specified context.
14916func (r *ProjectsAgentSessionsContextsService) Get(name string) *ProjectsAgentSessionsContextsGetCall {
14917	c := &ProjectsAgentSessionsContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14918	c.name = name
14919	return c
14920}
14921
14922// Fields allows partial responses to be retrieved. See
14923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14924// for more information.
14925func (c *ProjectsAgentSessionsContextsGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsGetCall {
14926	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14927	return c
14928}
14929
14930// IfNoneMatch sets the optional parameter which makes the operation
14931// fail if the object's ETag matches the given value. This is useful for
14932// getting updates only after the object has changed since the last
14933// request. Use googleapi.IsNotModified to check whether the response
14934// error from Do is the result of In-None-Match.
14935func (c *ProjectsAgentSessionsContextsGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsGetCall {
14936	c.ifNoneMatch_ = entityTag
14937	return c
14938}
14939
14940// Context sets the context to be used in this call's Do method. Any
14941// pending HTTP request will be aborted if the provided context is
14942// canceled.
14943func (c *ProjectsAgentSessionsContextsGetCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsGetCall {
14944	c.ctx_ = ctx
14945	return c
14946}
14947
14948// Header returns an http.Header that can be modified by the caller to
14949// add HTTP headers to the request.
14950func (c *ProjectsAgentSessionsContextsGetCall) Header() http.Header {
14951	if c.header_ == nil {
14952		c.header_ = make(http.Header)
14953	}
14954	return c.header_
14955}
14956
14957func (c *ProjectsAgentSessionsContextsGetCall) doRequest(alt string) (*http.Response, error) {
14958	reqHeaders := make(http.Header)
14959	for k, v := range c.header_ {
14960		reqHeaders[k] = v
14961	}
14962	reqHeaders.Set("User-Agent", c.s.userAgent())
14963	if c.ifNoneMatch_ != "" {
14964		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14965	}
14966	var body io.Reader = nil
14967	c.urlParams_.Set("alt", alt)
14968	c.urlParams_.Set("prettyPrint", "false")
14969	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14970	urls += "?" + c.urlParams_.Encode()
14971	req, err := http.NewRequest("GET", urls, body)
14972	if err != nil {
14973		return nil, err
14974	}
14975	req.Header = reqHeaders
14976	googleapi.Expand(req.URL, map[string]string{
14977		"name": c.name,
14978	})
14979	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14980}
14981
14982// Do executes the "dialogflow.projects.agent.sessions.contexts.get" call.
14983// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
14984// non-nil. Any non-2xx status code is an error. Response headers are in
14985// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
14986// (if a response was returned at all) in
14987// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14988// whether the returned error was because http.StatusNotModified was
14989// returned.
14990func (c *ProjectsAgentSessionsContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
14991	gensupport.SetOptions(c.urlParams_, opts...)
14992	res, err := c.doRequest("json")
14993	if res != nil && res.StatusCode == http.StatusNotModified {
14994		if res.Body != nil {
14995			res.Body.Close()
14996		}
14997		return nil, &googleapi.Error{
14998			Code:   res.StatusCode,
14999			Header: res.Header,
15000		}
15001	}
15002	if err != nil {
15003		return nil, err
15004	}
15005	defer googleapi.CloseBody(res)
15006	if err := googleapi.CheckResponse(res); err != nil {
15007		return nil, err
15008	}
15009	ret := &GoogleCloudDialogflowV2beta1Context{
15010		ServerResponse: googleapi.ServerResponse{
15011			Header:         res.Header,
15012			HTTPStatusCode: res.StatusCode,
15013		},
15014	}
15015	target := &ret
15016	if err := gensupport.DecodeResponse(target, res); err != nil {
15017		return nil, err
15018	}
15019	return ret, nil
15020	// {
15021	//   "description": "Retrieves the specified context.",
15022	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
15023	//   "httpMethod": "GET",
15024	//   "id": "dialogflow.projects.agent.sessions.contexts.get",
15025	//   "parameterOrder": [
15026	//     "name"
15027	//   ],
15028	//   "parameters": {
15029	//     "name": {
15030	//       "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.",
15031	//       "location": "path",
15032	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
15033	//       "required": true,
15034	//       "type": "string"
15035	//     }
15036	//   },
15037	//   "path": "v2beta1/{+name}",
15038	//   "response": {
15039	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
15040	//   },
15041	//   "scopes": [
15042	//     "https://www.googleapis.com/auth/cloud-platform",
15043	//     "https://www.googleapis.com/auth/dialogflow"
15044	//   ]
15045	// }
15046
15047}
15048
15049// method id "dialogflow.projects.agent.sessions.contexts.list":
15050
15051type ProjectsAgentSessionsContextsListCall struct {
15052	s            *Service
15053	parent       string
15054	urlParams_   gensupport.URLParams
15055	ifNoneMatch_ string
15056	ctx_         context.Context
15057	header_      http.Header
15058}
15059
15060// List: Returns the list of all contexts in the specified session.
15061func (r *ProjectsAgentSessionsContextsService) List(parent string) *ProjectsAgentSessionsContextsListCall {
15062	c := &ProjectsAgentSessionsContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15063	c.parent = parent
15064	return c
15065}
15066
15067// PageSize sets the optional parameter "pageSize": The maximum number
15068// of items to return in a single page. By
15069// default 100 and at most 1000.
15070func (c *ProjectsAgentSessionsContextsListCall) PageSize(pageSize int64) *ProjectsAgentSessionsContextsListCall {
15071	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15072	return c
15073}
15074
15075// PageToken sets the optional parameter "pageToken": The
15076// next_page_token value returned from a previous list request.
15077func (c *ProjectsAgentSessionsContextsListCall) PageToken(pageToken string) *ProjectsAgentSessionsContextsListCall {
15078	c.urlParams_.Set("pageToken", pageToken)
15079	return c
15080}
15081
15082// Fields allows partial responses to be retrieved. See
15083// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15084// for more information.
15085func (c *ProjectsAgentSessionsContextsListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsListCall {
15086	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15087	return c
15088}
15089
15090// IfNoneMatch sets the optional parameter which makes the operation
15091// fail if the object's ETag matches the given value. This is useful for
15092// getting updates only after the object has changed since the last
15093// request. Use googleapi.IsNotModified to check whether the response
15094// error from Do is the result of In-None-Match.
15095func (c *ProjectsAgentSessionsContextsListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsContextsListCall {
15096	c.ifNoneMatch_ = entityTag
15097	return c
15098}
15099
15100// Context sets the context to be used in this call's Do method. Any
15101// pending HTTP request will be aborted if the provided context is
15102// canceled.
15103func (c *ProjectsAgentSessionsContextsListCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsListCall {
15104	c.ctx_ = ctx
15105	return c
15106}
15107
15108// Header returns an http.Header that can be modified by the caller to
15109// add HTTP headers to the request.
15110func (c *ProjectsAgentSessionsContextsListCall) Header() http.Header {
15111	if c.header_ == nil {
15112		c.header_ = make(http.Header)
15113	}
15114	return c.header_
15115}
15116
15117func (c *ProjectsAgentSessionsContextsListCall) doRequest(alt string) (*http.Response, error) {
15118	reqHeaders := make(http.Header)
15119	for k, v := range c.header_ {
15120		reqHeaders[k] = v
15121	}
15122	reqHeaders.Set("User-Agent", c.s.userAgent())
15123	if c.ifNoneMatch_ != "" {
15124		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15125	}
15126	var body io.Reader = nil
15127	c.urlParams_.Set("alt", alt)
15128	c.urlParams_.Set("prettyPrint", "false")
15129	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/contexts")
15130	urls += "?" + c.urlParams_.Encode()
15131	req, err := http.NewRequest("GET", urls, body)
15132	if err != nil {
15133		return nil, err
15134	}
15135	req.Header = reqHeaders
15136	googleapi.Expand(req.URL, map[string]string{
15137		"parent": c.parent,
15138	})
15139	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15140}
15141
15142// Do executes the "dialogflow.projects.agent.sessions.contexts.list" call.
15143// Exactly one of *GoogleCloudDialogflowV2beta1ListContextsResponse or
15144// error will be non-nil. Any non-2xx status code is an error. Response
15145// headers are in either
15146// *GoogleCloudDialogflowV2beta1ListContextsResponse.ServerResponse.Heade
15147// r or (if a response was returned at all) in
15148// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15149// whether the returned error was because http.StatusNotModified was
15150// returned.
15151func (c *ProjectsAgentSessionsContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListContextsResponse, error) {
15152	gensupport.SetOptions(c.urlParams_, opts...)
15153	res, err := c.doRequest("json")
15154	if res != nil && res.StatusCode == http.StatusNotModified {
15155		if res.Body != nil {
15156			res.Body.Close()
15157		}
15158		return nil, &googleapi.Error{
15159			Code:   res.StatusCode,
15160			Header: res.Header,
15161		}
15162	}
15163	if err != nil {
15164		return nil, err
15165	}
15166	defer googleapi.CloseBody(res)
15167	if err := googleapi.CheckResponse(res); err != nil {
15168		return nil, err
15169	}
15170	ret := &GoogleCloudDialogflowV2beta1ListContextsResponse{
15171		ServerResponse: googleapi.ServerResponse{
15172			Header:         res.Header,
15173			HTTPStatusCode: res.StatusCode,
15174		},
15175	}
15176	target := &ret
15177	if err := gensupport.DecodeResponse(target, res); err != nil {
15178		return nil, err
15179	}
15180	return ret, nil
15181	// {
15182	//   "description": "Returns the list of all contexts in the specified session.",
15183	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts",
15184	//   "httpMethod": "GET",
15185	//   "id": "dialogflow.projects.agent.sessions.contexts.list",
15186	//   "parameterOrder": [
15187	//     "parent"
15188	//   ],
15189	//   "parameters": {
15190	//     "pageSize": {
15191	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
15192	//       "format": "int32",
15193	//       "location": "query",
15194	//       "type": "integer"
15195	//     },
15196	//     "pageToken": {
15197	//       "description": "Optional. The next_page_token value returned from a previous list request.",
15198	//       "location": "query",
15199	//       "type": "string"
15200	//     },
15201	//     "parent": {
15202	//       "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.",
15203	//       "location": "path",
15204	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
15205	//       "required": true,
15206	//       "type": "string"
15207	//     }
15208	//   },
15209	//   "path": "v2beta1/{+parent}/contexts",
15210	//   "response": {
15211	//     "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse"
15212	//   },
15213	//   "scopes": [
15214	//     "https://www.googleapis.com/auth/cloud-platform",
15215	//     "https://www.googleapis.com/auth/dialogflow"
15216	//   ]
15217	// }
15218
15219}
15220
15221// Pages invokes f for each page of results.
15222// A non-nil error returned from f will halt the iteration.
15223// The provided context supersedes any context provided to the Context method.
15224func (c *ProjectsAgentSessionsContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListContextsResponse) error) error {
15225	c.ctx_ = ctx
15226	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15227	for {
15228		x, err := c.Do()
15229		if err != nil {
15230			return err
15231		}
15232		if err := f(x); err != nil {
15233			return err
15234		}
15235		if x.NextPageToken == "" {
15236			return nil
15237		}
15238		c.PageToken(x.NextPageToken)
15239	}
15240}
15241
15242// method id "dialogflow.projects.agent.sessions.contexts.patch":
15243
15244type ProjectsAgentSessionsContextsPatchCall struct {
15245	s                                   *Service
15246	nameid                              string
15247	googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context
15248	urlParams_                          gensupport.URLParams
15249	ctx_                                context.Context
15250	header_                             http.Header
15251}
15252
15253// Patch: Updates the specified context.
15254func (r *ProjectsAgentSessionsContextsService) Patch(nameid string, googleclouddialogflowv2beta1context *GoogleCloudDialogflowV2beta1Context) *ProjectsAgentSessionsContextsPatchCall {
15255	c := &ProjectsAgentSessionsContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15256	c.nameid = nameid
15257	c.googleclouddialogflowv2beta1context = googleclouddialogflowv2beta1context
15258	return c
15259}
15260
15261// UpdateMask sets the optional parameter "updateMask": The mask to
15262// control which fields get updated.
15263func (c *ProjectsAgentSessionsContextsPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsContextsPatchCall {
15264	c.urlParams_.Set("updateMask", updateMask)
15265	return c
15266}
15267
15268// Fields allows partial responses to be retrieved. See
15269// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15270// for more information.
15271func (c *ProjectsAgentSessionsContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsContextsPatchCall {
15272	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15273	return c
15274}
15275
15276// Context sets the context to be used in this call's Do method. Any
15277// pending HTTP request will be aborted if the provided context is
15278// canceled.
15279func (c *ProjectsAgentSessionsContextsPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsContextsPatchCall {
15280	c.ctx_ = ctx
15281	return c
15282}
15283
15284// Header returns an http.Header that can be modified by the caller to
15285// add HTTP headers to the request.
15286func (c *ProjectsAgentSessionsContextsPatchCall) Header() http.Header {
15287	if c.header_ == nil {
15288		c.header_ = make(http.Header)
15289	}
15290	return c.header_
15291}
15292
15293func (c *ProjectsAgentSessionsContextsPatchCall) doRequest(alt string) (*http.Response, error) {
15294	reqHeaders := make(http.Header)
15295	for k, v := range c.header_ {
15296		reqHeaders[k] = v
15297	}
15298	reqHeaders.Set("User-Agent", c.s.userAgent())
15299	var body io.Reader = nil
15300	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1context)
15301	if err != nil {
15302		return nil, err
15303	}
15304	reqHeaders.Set("Content-Type", "application/json")
15305	c.urlParams_.Set("alt", alt)
15306	c.urlParams_.Set("prettyPrint", "false")
15307	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15308	urls += "?" + c.urlParams_.Encode()
15309	req, err := http.NewRequest("PATCH", urls, body)
15310	if err != nil {
15311		return nil, err
15312	}
15313	req.Header = reqHeaders
15314	googleapi.Expand(req.URL, map[string]string{
15315		"name": c.nameid,
15316	})
15317	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15318}
15319
15320// Do executes the "dialogflow.projects.agent.sessions.contexts.patch" call.
15321// Exactly one of *GoogleCloudDialogflowV2beta1Context or error will be
15322// non-nil. Any non-2xx status code is an error. Response headers are in
15323// either *GoogleCloudDialogflowV2beta1Context.ServerResponse.Header or
15324// (if a response was returned at all) in
15325// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15326// whether the returned error was because http.StatusNotModified was
15327// returned.
15328func (c *ProjectsAgentSessionsContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Context, error) {
15329	gensupport.SetOptions(c.urlParams_, opts...)
15330	res, err := c.doRequest("json")
15331	if res != nil && res.StatusCode == http.StatusNotModified {
15332		if res.Body != nil {
15333			res.Body.Close()
15334		}
15335		return nil, &googleapi.Error{
15336			Code:   res.StatusCode,
15337			Header: res.Header,
15338		}
15339	}
15340	if err != nil {
15341		return nil, err
15342	}
15343	defer googleapi.CloseBody(res)
15344	if err := googleapi.CheckResponse(res); err != nil {
15345		return nil, err
15346	}
15347	ret := &GoogleCloudDialogflowV2beta1Context{
15348		ServerResponse: googleapi.ServerResponse{
15349			Header:         res.Header,
15350			HTTPStatusCode: res.StatusCode,
15351		},
15352	}
15353	target := &ret
15354	if err := gensupport.DecodeResponse(target, res); err != nil {
15355		return nil, err
15356	}
15357	return ret, nil
15358	// {
15359	//   "description": "Updates the specified context.",
15360	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}",
15361	//   "httpMethod": "PATCH",
15362	//   "id": "dialogflow.projects.agent.sessions.contexts.patch",
15363	//   "parameterOrder": [
15364	//     "name"
15365	//   ],
15366	//   "parameters": {
15367	//     "name": {
15368	//       "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.",
15369	//       "location": "path",
15370	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$",
15371	//       "required": true,
15372	//       "type": "string"
15373	//     },
15374	//     "updateMask": {
15375	//       "description": "Optional. The mask to control which fields get updated.",
15376	//       "format": "google-fieldmask",
15377	//       "location": "query",
15378	//       "type": "string"
15379	//     }
15380	//   },
15381	//   "path": "v2beta1/{+name}",
15382	//   "request": {
15383	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
15384	//   },
15385	//   "response": {
15386	//     "$ref": "GoogleCloudDialogflowV2beta1Context"
15387	//   },
15388	//   "scopes": [
15389	//     "https://www.googleapis.com/auth/cloud-platform",
15390	//     "https://www.googleapis.com/auth/dialogflow"
15391	//   ]
15392	// }
15393
15394}
15395
15396// method id "dialogflow.projects.agent.sessions.entityTypes.create":
15397
15398type ProjectsAgentSessionsEntityTypesCreateCall struct {
15399	s                                             *Service
15400	parent                                        string
15401	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
15402	urlParams_                                    gensupport.URLParams
15403	ctx_                                          context.Context
15404	header_                                       http.Header
15405}
15406
15407// Create: Creates a session entity type.
15408//
15409// If the specified session entity type already exists, overrides
15410// the
15411// session entity type.
15412func (r *ProjectsAgentSessionsEntityTypesService) Create(parent string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentSessionsEntityTypesCreateCall {
15413	c := &ProjectsAgentSessionsEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15414	c.parent = parent
15415	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
15416	return c
15417}
15418
15419// Fields allows partial responses to be retrieved. See
15420// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15421// for more information.
15422func (c *ProjectsAgentSessionsEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesCreateCall {
15423	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15424	return c
15425}
15426
15427// Context sets the context to be used in this call's Do method. Any
15428// pending HTTP request will be aborted if the provided context is
15429// canceled.
15430func (c *ProjectsAgentSessionsEntityTypesCreateCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesCreateCall {
15431	c.ctx_ = ctx
15432	return c
15433}
15434
15435// Header returns an http.Header that can be modified by the caller to
15436// add HTTP headers to the request.
15437func (c *ProjectsAgentSessionsEntityTypesCreateCall) Header() http.Header {
15438	if c.header_ == nil {
15439		c.header_ = make(http.Header)
15440	}
15441	return c.header_
15442}
15443
15444func (c *ProjectsAgentSessionsEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) {
15445	reqHeaders := make(http.Header)
15446	for k, v := range c.header_ {
15447		reqHeaders[k] = v
15448	}
15449	reqHeaders.Set("User-Agent", c.s.userAgent())
15450	var body io.Reader = nil
15451	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
15452	if err != nil {
15453		return nil, err
15454	}
15455	reqHeaders.Set("Content-Type", "application/json")
15456	c.urlParams_.Set("alt", alt)
15457	c.urlParams_.Set("prettyPrint", "false")
15458	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
15459	urls += "?" + c.urlParams_.Encode()
15460	req, err := http.NewRequest("POST", urls, body)
15461	if err != nil {
15462		return nil, err
15463	}
15464	req.Header = reqHeaders
15465	googleapi.Expand(req.URL, map[string]string{
15466		"parent": c.parent,
15467	})
15468	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15469}
15470
15471// Do executes the "dialogflow.projects.agent.sessions.entityTypes.create" call.
15472// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
15473// error will be non-nil. Any non-2xx status code is an error. Response
15474// headers are in either
15475// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
15476// or (if a response was returned at all) in
15477// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15478// whether the returned error was because http.StatusNotModified was
15479// returned.
15480func (c *ProjectsAgentSessionsEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
15481	gensupport.SetOptions(c.urlParams_, opts...)
15482	res, err := c.doRequest("json")
15483	if res != nil && res.StatusCode == http.StatusNotModified {
15484		if res.Body != nil {
15485			res.Body.Close()
15486		}
15487		return nil, &googleapi.Error{
15488			Code:   res.StatusCode,
15489			Header: res.Header,
15490		}
15491	}
15492	if err != nil {
15493		return nil, err
15494	}
15495	defer googleapi.CloseBody(res)
15496	if err := googleapi.CheckResponse(res); err != nil {
15497		return nil, err
15498	}
15499	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
15500		ServerResponse: googleapi.ServerResponse{
15501			Header:         res.Header,
15502			HTTPStatusCode: res.StatusCode,
15503		},
15504	}
15505	target := &ret
15506	if err := gensupport.DecodeResponse(target, res); err != nil {
15507		return nil, err
15508	}
15509	return ret, nil
15510	// {
15511	//   "description": "Creates a session entity type.\n\nIf the specified session entity type already exists, overrides the\nsession entity type.",
15512	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes",
15513	//   "httpMethod": "POST",
15514	//   "id": "dialogflow.projects.agent.sessions.entityTypes.create",
15515	//   "parameterOrder": [
15516	//     "parent"
15517	//   ],
15518	//   "parameters": {
15519	//     "parent": {
15520	//       "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.",
15521	//       "location": "path",
15522	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
15523	//       "required": true,
15524	//       "type": "string"
15525	//     }
15526	//   },
15527	//   "path": "v2beta1/{+parent}/entityTypes",
15528	//   "request": {
15529	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
15530	//   },
15531	//   "response": {
15532	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
15533	//   },
15534	//   "scopes": [
15535	//     "https://www.googleapis.com/auth/cloud-platform",
15536	//     "https://www.googleapis.com/auth/dialogflow"
15537	//   ]
15538	// }
15539
15540}
15541
15542// method id "dialogflow.projects.agent.sessions.entityTypes.delete":
15543
15544type ProjectsAgentSessionsEntityTypesDeleteCall struct {
15545	s          *Service
15546	name       string
15547	urlParams_ gensupport.URLParams
15548	ctx_       context.Context
15549	header_    http.Header
15550}
15551
15552// Delete: Deletes the specified session entity type.
15553func (r *ProjectsAgentSessionsEntityTypesService) Delete(name string) *ProjectsAgentSessionsEntityTypesDeleteCall {
15554	c := &ProjectsAgentSessionsEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15555	c.name = name
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 *ProjectsAgentSessionsEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesDeleteCall {
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 *ProjectsAgentSessionsEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesDeleteCall {
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 *ProjectsAgentSessionsEntityTypesDeleteCall) Header() http.Header {
15578	if c.header_ == nil {
15579		c.header_ = make(http.Header)
15580	}
15581	return c.header_
15582}
15583
15584func (c *ProjectsAgentSessionsEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
15585	reqHeaders := make(http.Header)
15586	for k, v := range c.header_ {
15587		reqHeaders[k] = v
15588	}
15589	reqHeaders.Set("User-Agent", c.s.userAgent())
15590	var body io.Reader = nil
15591	c.urlParams_.Set("alt", alt)
15592	c.urlParams_.Set("prettyPrint", "false")
15593	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15594	urls += "?" + c.urlParams_.Encode()
15595	req, err := http.NewRequest("DELETE", urls, body)
15596	if err != nil {
15597		return nil, err
15598	}
15599	req.Header = reqHeaders
15600	googleapi.Expand(req.URL, map[string]string{
15601		"name": c.name,
15602	})
15603	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15604}
15605
15606// Do executes the "dialogflow.projects.agent.sessions.entityTypes.delete" call.
15607// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
15608// non-2xx status code is an error. Response headers are in either
15609// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
15610// returned at all) in error.(*googleapi.Error).Header. Use
15611// googleapi.IsNotModified to check whether the returned error was
15612// because http.StatusNotModified was returned.
15613func (c *ProjectsAgentSessionsEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
15614	gensupport.SetOptions(c.urlParams_, opts...)
15615	res, err := c.doRequest("json")
15616	if res != nil && res.StatusCode == http.StatusNotModified {
15617		if res.Body != nil {
15618			res.Body.Close()
15619		}
15620		return nil, &googleapi.Error{
15621			Code:   res.StatusCode,
15622			Header: res.Header,
15623		}
15624	}
15625	if err != nil {
15626		return nil, err
15627	}
15628	defer googleapi.CloseBody(res)
15629	if err := googleapi.CheckResponse(res); err != nil {
15630		return nil, err
15631	}
15632	ret := &GoogleProtobufEmpty{
15633		ServerResponse: googleapi.ServerResponse{
15634			Header:         res.Header,
15635			HTTPStatusCode: res.StatusCode,
15636		},
15637	}
15638	target := &ret
15639	if err := gensupport.DecodeResponse(target, res); err != nil {
15640		return nil, err
15641	}
15642	return ret, nil
15643	// {
15644	//   "description": "Deletes the specified session entity type.",
15645	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
15646	//   "httpMethod": "DELETE",
15647	//   "id": "dialogflow.projects.agent.sessions.entityTypes.delete",
15648	//   "parameterOrder": [
15649	//     "name"
15650	//   ],
15651	//   "parameters": {
15652	//     "name": {
15653	//       "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.",
15654	//       "location": "path",
15655	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
15656	//       "required": true,
15657	//       "type": "string"
15658	//     }
15659	//   },
15660	//   "path": "v2beta1/{+name}",
15661	//   "response": {
15662	//     "$ref": "GoogleProtobufEmpty"
15663	//   },
15664	//   "scopes": [
15665	//     "https://www.googleapis.com/auth/cloud-platform",
15666	//     "https://www.googleapis.com/auth/dialogflow"
15667	//   ]
15668	// }
15669
15670}
15671
15672// method id "dialogflow.projects.agent.sessions.entityTypes.get":
15673
15674type ProjectsAgentSessionsEntityTypesGetCall struct {
15675	s            *Service
15676	name         string
15677	urlParams_   gensupport.URLParams
15678	ifNoneMatch_ string
15679	ctx_         context.Context
15680	header_      http.Header
15681}
15682
15683// Get: Retrieves the specified session entity type.
15684func (r *ProjectsAgentSessionsEntityTypesService) Get(name string) *ProjectsAgentSessionsEntityTypesGetCall {
15685	c := &ProjectsAgentSessionsEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15686	c.name = name
15687	return c
15688}
15689
15690// Fields allows partial responses to be retrieved. See
15691// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15692// for more information.
15693func (c *ProjectsAgentSessionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesGetCall {
15694	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15695	return c
15696}
15697
15698// IfNoneMatch sets the optional parameter which makes the operation
15699// fail if the object's ETag matches the given value. This is useful for
15700// getting updates only after the object has changed since the last
15701// request. Use googleapi.IsNotModified to check whether the response
15702// error from Do is the result of In-None-Match.
15703func (c *ProjectsAgentSessionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesGetCall {
15704	c.ifNoneMatch_ = entityTag
15705	return c
15706}
15707
15708// Context sets the context to be used in this call's Do method. Any
15709// pending HTTP request will be aborted if the provided context is
15710// canceled.
15711func (c *ProjectsAgentSessionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesGetCall {
15712	c.ctx_ = ctx
15713	return c
15714}
15715
15716// Header returns an http.Header that can be modified by the caller to
15717// add HTTP headers to the request.
15718func (c *ProjectsAgentSessionsEntityTypesGetCall) Header() http.Header {
15719	if c.header_ == nil {
15720		c.header_ = make(http.Header)
15721	}
15722	return c.header_
15723}
15724
15725func (c *ProjectsAgentSessionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) {
15726	reqHeaders := make(http.Header)
15727	for k, v := range c.header_ {
15728		reqHeaders[k] = v
15729	}
15730	reqHeaders.Set("User-Agent", c.s.userAgent())
15731	if c.ifNoneMatch_ != "" {
15732		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15733	}
15734	var body io.Reader = nil
15735	c.urlParams_.Set("alt", alt)
15736	c.urlParams_.Set("prettyPrint", "false")
15737	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15738	urls += "?" + c.urlParams_.Encode()
15739	req, err := http.NewRequest("GET", urls, body)
15740	if err != nil {
15741		return nil, err
15742	}
15743	req.Header = reqHeaders
15744	googleapi.Expand(req.URL, map[string]string{
15745		"name": c.name,
15746	})
15747	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15748}
15749
15750// Do executes the "dialogflow.projects.agent.sessions.entityTypes.get" call.
15751// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
15752// error will be non-nil. Any non-2xx status code is an error. Response
15753// headers are in either
15754// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
15755// or (if a response was returned at all) in
15756// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15757// whether the returned error was because http.StatusNotModified was
15758// returned.
15759func (c *ProjectsAgentSessionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
15760	gensupport.SetOptions(c.urlParams_, opts...)
15761	res, err := c.doRequest("json")
15762	if res != nil && res.StatusCode == http.StatusNotModified {
15763		if res.Body != nil {
15764			res.Body.Close()
15765		}
15766		return nil, &googleapi.Error{
15767			Code:   res.StatusCode,
15768			Header: res.Header,
15769		}
15770	}
15771	if err != nil {
15772		return nil, err
15773	}
15774	defer googleapi.CloseBody(res)
15775	if err := googleapi.CheckResponse(res); err != nil {
15776		return nil, err
15777	}
15778	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
15779		ServerResponse: googleapi.ServerResponse{
15780			Header:         res.Header,
15781			HTTPStatusCode: res.StatusCode,
15782		},
15783	}
15784	target := &ret
15785	if err := gensupport.DecodeResponse(target, res); err != nil {
15786		return nil, err
15787	}
15788	return ret, nil
15789	// {
15790	//   "description": "Retrieves the specified session entity type.",
15791	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
15792	//   "httpMethod": "GET",
15793	//   "id": "dialogflow.projects.agent.sessions.entityTypes.get",
15794	//   "parameterOrder": [
15795	//     "name"
15796	//   ],
15797	//   "parameters": {
15798	//     "name": {
15799	//       "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.",
15800	//       "location": "path",
15801	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
15802	//       "required": true,
15803	//       "type": "string"
15804	//     }
15805	//   },
15806	//   "path": "v2beta1/{+name}",
15807	//   "response": {
15808	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
15809	//   },
15810	//   "scopes": [
15811	//     "https://www.googleapis.com/auth/cloud-platform",
15812	//     "https://www.googleapis.com/auth/dialogflow"
15813	//   ]
15814	// }
15815
15816}
15817
15818// method id "dialogflow.projects.agent.sessions.entityTypes.list":
15819
15820type ProjectsAgentSessionsEntityTypesListCall struct {
15821	s            *Service
15822	parent       string
15823	urlParams_   gensupport.URLParams
15824	ifNoneMatch_ string
15825	ctx_         context.Context
15826	header_      http.Header
15827}
15828
15829// List: Returns the list of all session entity types in the specified
15830// session.
15831func (r *ProjectsAgentSessionsEntityTypesService) List(parent string) *ProjectsAgentSessionsEntityTypesListCall {
15832	c := &ProjectsAgentSessionsEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15833	c.parent = parent
15834	return c
15835}
15836
15837// PageSize sets the optional parameter "pageSize": The maximum number
15838// of items to return in a single page. By
15839// default 100 and at most 1000.
15840func (c *ProjectsAgentSessionsEntityTypesListCall) PageSize(pageSize int64) *ProjectsAgentSessionsEntityTypesListCall {
15841	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15842	return c
15843}
15844
15845// PageToken sets the optional parameter "pageToken": The
15846// next_page_token value returned from a previous list request.
15847func (c *ProjectsAgentSessionsEntityTypesListCall) PageToken(pageToken string) *ProjectsAgentSessionsEntityTypesListCall {
15848	c.urlParams_.Set("pageToken", pageToken)
15849	return c
15850}
15851
15852// Fields allows partial responses to be retrieved. See
15853// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15854// for more information.
15855func (c *ProjectsAgentSessionsEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesListCall {
15856	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15857	return c
15858}
15859
15860// IfNoneMatch sets the optional parameter which makes the operation
15861// fail if the object's ETag matches the given value. This is useful for
15862// getting updates only after the object has changed since the last
15863// request. Use googleapi.IsNotModified to check whether the response
15864// error from Do is the result of In-None-Match.
15865func (c *ProjectsAgentSessionsEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsAgentSessionsEntityTypesListCall {
15866	c.ifNoneMatch_ = entityTag
15867	return c
15868}
15869
15870// Context sets the context to be used in this call's Do method. Any
15871// pending HTTP request will be aborted if the provided context is
15872// canceled.
15873func (c *ProjectsAgentSessionsEntityTypesListCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesListCall {
15874	c.ctx_ = ctx
15875	return c
15876}
15877
15878// Header returns an http.Header that can be modified by the caller to
15879// add HTTP headers to the request.
15880func (c *ProjectsAgentSessionsEntityTypesListCall) Header() http.Header {
15881	if c.header_ == nil {
15882		c.header_ = make(http.Header)
15883	}
15884	return c.header_
15885}
15886
15887func (c *ProjectsAgentSessionsEntityTypesListCall) doRequest(alt string) (*http.Response, error) {
15888	reqHeaders := make(http.Header)
15889	for k, v := range c.header_ {
15890		reqHeaders[k] = v
15891	}
15892	reqHeaders.Set("User-Agent", c.s.userAgent())
15893	if c.ifNoneMatch_ != "" {
15894		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15895	}
15896	var body io.Reader = nil
15897	c.urlParams_.Set("alt", alt)
15898	c.urlParams_.Set("prettyPrint", "false")
15899	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/entityTypes")
15900	urls += "?" + c.urlParams_.Encode()
15901	req, err := http.NewRequest("GET", urls, body)
15902	if err != nil {
15903		return nil, err
15904	}
15905	req.Header = reqHeaders
15906	googleapi.Expand(req.URL, map[string]string{
15907		"parent": c.parent,
15908	})
15909	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15910}
15911
15912// Do executes the "dialogflow.projects.agent.sessions.entityTypes.list" call.
15913// Exactly one of
15914// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse or error
15915// will be non-nil. Any non-2xx status code is an error. Response
15916// headers are in either
15917// *GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse.ServerResp
15918// onse.Header or (if a response was returned at all) in
15919// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15920// whether the returned error was because http.StatusNotModified was
15921// returned.
15922func (c *ProjectsAgentSessionsEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse, error) {
15923	gensupport.SetOptions(c.urlParams_, opts...)
15924	res, err := c.doRequest("json")
15925	if res != nil && res.StatusCode == http.StatusNotModified {
15926		if res.Body != nil {
15927			res.Body.Close()
15928		}
15929		return nil, &googleapi.Error{
15930			Code:   res.StatusCode,
15931			Header: res.Header,
15932		}
15933	}
15934	if err != nil {
15935		return nil, err
15936	}
15937	defer googleapi.CloseBody(res)
15938	if err := googleapi.CheckResponse(res); err != nil {
15939		return nil, err
15940	}
15941	ret := &GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse{
15942		ServerResponse: googleapi.ServerResponse{
15943			Header:         res.Header,
15944			HTTPStatusCode: res.StatusCode,
15945		},
15946	}
15947	target := &ret
15948	if err := gensupport.DecodeResponse(target, res); err != nil {
15949		return nil, err
15950	}
15951	return ret, nil
15952	// {
15953	//   "description": "Returns the list of all session entity types in the specified session.",
15954	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes",
15955	//   "httpMethod": "GET",
15956	//   "id": "dialogflow.projects.agent.sessions.entityTypes.list",
15957	//   "parameterOrder": [
15958	//     "parent"
15959	//   ],
15960	//   "parameters": {
15961	//     "pageSize": {
15962	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 100 and at most 1000.",
15963	//       "format": "int32",
15964	//       "location": "query",
15965	//       "type": "integer"
15966	//     },
15967	//     "pageToken": {
15968	//       "description": "Optional. The next_page_token value returned from a previous list request.",
15969	//       "location": "query",
15970	//       "type": "string"
15971	//     },
15972	//     "parent": {
15973	//       "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.",
15974	//       "location": "path",
15975	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+$",
15976	//       "required": true,
15977	//       "type": "string"
15978	//     }
15979	//   },
15980	//   "path": "v2beta1/{+parent}/entityTypes",
15981	//   "response": {
15982	//     "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse"
15983	//   },
15984	//   "scopes": [
15985	//     "https://www.googleapis.com/auth/cloud-platform",
15986	//     "https://www.googleapis.com/auth/dialogflow"
15987	//   ]
15988	// }
15989
15990}
15991
15992// Pages invokes f for each page of results.
15993// A non-nil error returned from f will halt the iteration.
15994// The provided context supersedes any context provided to the Context method.
15995func (c *ProjectsAgentSessionsEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse) error) error {
15996	c.ctx_ = ctx
15997	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15998	for {
15999		x, err := c.Do()
16000		if err != nil {
16001			return err
16002		}
16003		if err := f(x); err != nil {
16004			return err
16005		}
16006		if x.NextPageToken == "" {
16007			return nil
16008		}
16009		c.PageToken(x.NextPageToken)
16010	}
16011}
16012
16013// method id "dialogflow.projects.agent.sessions.entityTypes.patch":
16014
16015type ProjectsAgentSessionsEntityTypesPatchCall struct {
16016	s                                             *Service
16017	nameid                                        string
16018	googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType
16019	urlParams_                                    gensupport.URLParams
16020	ctx_                                          context.Context
16021	header_                                       http.Header
16022}
16023
16024// Patch: Updates the specified session entity type.
16025func (r *ProjectsAgentSessionsEntityTypesService) Patch(nameid string, googleclouddialogflowv2beta1sessionentitytype *GoogleCloudDialogflowV2beta1SessionEntityType) *ProjectsAgentSessionsEntityTypesPatchCall {
16026	c := &ProjectsAgentSessionsEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16027	c.nameid = nameid
16028	c.googleclouddialogflowv2beta1sessionentitytype = googleclouddialogflowv2beta1sessionentitytype
16029	return c
16030}
16031
16032// UpdateMask sets the optional parameter "updateMask": The mask to
16033// control which fields get updated.
16034func (c *ProjectsAgentSessionsEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsAgentSessionsEntityTypesPatchCall {
16035	c.urlParams_.Set("updateMask", updateMask)
16036	return c
16037}
16038
16039// Fields allows partial responses to be retrieved. See
16040// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16041// for more information.
16042func (c *ProjectsAgentSessionsEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsAgentSessionsEntityTypesPatchCall {
16043	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16044	return c
16045}
16046
16047// Context sets the context to be used in this call's Do method. Any
16048// pending HTTP request will be aborted if the provided context is
16049// canceled.
16050func (c *ProjectsAgentSessionsEntityTypesPatchCall) Context(ctx context.Context) *ProjectsAgentSessionsEntityTypesPatchCall {
16051	c.ctx_ = ctx
16052	return c
16053}
16054
16055// Header returns an http.Header that can be modified by the caller to
16056// add HTTP headers to the request.
16057func (c *ProjectsAgentSessionsEntityTypesPatchCall) Header() http.Header {
16058	if c.header_ == nil {
16059		c.header_ = make(http.Header)
16060	}
16061	return c.header_
16062}
16063
16064func (c *ProjectsAgentSessionsEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) {
16065	reqHeaders := make(http.Header)
16066	for k, v := range c.header_ {
16067		reqHeaders[k] = v
16068	}
16069	reqHeaders.Set("User-Agent", c.s.userAgent())
16070	var body io.Reader = nil
16071	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1sessionentitytype)
16072	if err != nil {
16073		return nil, err
16074	}
16075	reqHeaders.Set("Content-Type", "application/json")
16076	c.urlParams_.Set("alt", alt)
16077	c.urlParams_.Set("prettyPrint", "false")
16078	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
16079	urls += "?" + c.urlParams_.Encode()
16080	req, err := http.NewRequest("PATCH", urls, body)
16081	if err != nil {
16082		return nil, err
16083	}
16084	req.Header = reqHeaders
16085	googleapi.Expand(req.URL, map[string]string{
16086		"name": c.nameid,
16087	})
16088	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16089}
16090
16091// Do executes the "dialogflow.projects.agent.sessions.entityTypes.patch" call.
16092// Exactly one of *GoogleCloudDialogflowV2beta1SessionEntityType or
16093// error will be non-nil. Any non-2xx status code is an error. Response
16094// headers are in either
16095// *GoogleCloudDialogflowV2beta1SessionEntityType.ServerResponse.Header
16096// or (if a response was returned at all) in
16097// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16098// whether the returned error was because http.StatusNotModified was
16099// returned.
16100func (c *ProjectsAgentSessionsEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SessionEntityType, error) {
16101	gensupport.SetOptions(c.urlParams_, opts...)
16102	res, err := c.doRequest("json")
16103	if res != nil && res.StatusCode == http.StatusNotModified {
16104		if res.Body != nil {
16105			res.Body.Close()
16106		}
16107		return nil, &googleapi.Error{
16108			Code:   res.StatusCode,
16109			Header: res.Header,
16110		}
16111	}
16112	if err != nil {
16113		return nil, err
16114	}
16115	defer googleapi.CloseBody(res)
16116	if err := googleapi.CheckResponse(res); err != nil {
16117		return nil, err
16118	}
16119	ret := &GoogleCloudDialogflowV2beta1SessionEntityType{
16120		ServerResponse: googleapi.ServerResponse{
16121			Header:         res.Header,
16122			HTTPStatusCode: res.StatusCode,
16123		},
16124	}
16125	target := &ret
16126	if err := gensupport.DecodeResponse(target, res); err != nil {
16127		return nil, err
16128	}
16129	return ret, nil
16130	// {
16131	//   "description": "Updates the specified session entity type.",
16132	//   "flatPath": "v2beta1/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}",
16133	//   "httpMethod": "PATCH",
16134	//   "id": "dialogflow.projects.agent.sessions.entityTypes.patch",
16135	//   "parameterOrder": [
16136	//     "name"
16137	//   ],
16138	//   "parameters": {
16139	//     "name": {
16140	//       "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.",
16141	//       "location": "path",
16142	//       "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$",
16143	//       "required": true,
16144	//       "type": "string"
16145	//     },
16146	//     "updateMask": {
16147	//       "description": "Optional. The mask to control which fields get updated.",
16148	//       "format": "google-fieldmask",
16149	//       "location": "query",
16150	//       "type": "string"
16151	//     }
16152	//   },
16153	//   "path": "v2beta1/{+name}",
16154	//   "request": {
16155	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
16156	//   },
16157	//   "response": {
16158	//     "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType"
16159	//   },
16160	//   "scopes": [
16161	//     "https://www.googleapis.com/auth/cloud-platform",
16162	//     "https://www.googleapis.com/auth/dialogflow"
16163	//   ]
16164	// }
16165
16166}
16167
16168// method id "dialogflow.projects.knowledgeBases.create":
16169
16170type ProjectsKnowledgeBasesCreateCall struct {
16171	s                                         *Service
16172	parent                                    string
16173	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
16174	urlParams_                                gensupport.URLParams
16175	ctx_                                      context.Context
16176	header_                                   http.Header
16177}
16178
16179// Create: Creates a knowledge base.
16180//
16181// Note: The `projects.agent.knowledgeBases` resource is
16182// deprecated;
16183// only use `projects.knowledgeBases`.
16184func (r *ProjectsKnowledgeBasesService) Create(parent string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsKnowledgeBasesCreateCall {
16185	c := &ProjectsKnowledgeBasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16186	c.parent = parent
16187	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
16188	return c
16189}
16190
16191// Fields allows partial responses to be retrieved. See
16192// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16193// for more information.
16194func (c *ProjectsKnowledgeBasesCreateCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesCreateCall {
16195	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16196	return c
16197}
16198
16199// Context sets the context to be used in this call's Do method. Any
16200// pending HTTP request will be aborted if the provided context is
16201// canceled.
16202func (c *ProjectsKnowledgeBasesCreateCall) Context(ctx context.Context) *ProjectsKnowledgeBasesCreateCall {
16203	c.ctx_ = ctx
16204	return c
16205}
16206
16207// Header returns an http.Header that can be modified by the caller to
16208// add HTTP headers to the request.
16209func (c *ProjectsKnowledgeBasesCreateCall) Header() http.Header {
16210	if c.header_ == nil {
16211		c.header_ = make(http.Header)
16212	}
16213	return c.header_
16214}
16215
16216func (c *ProjectsKnowledgeBasesCreateCall) doRequest(alt string) (*http.Response, error) {
16217	reqHeaders := make(http.Header)
16218	for k, v := range c.header_ {
16219		reqHeaders[k] = v
16220	}
16221	reqHeaders.Set("User-Agent", c.s.userAgent())
16222	var body io.Reader = nil
16223	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
16224	if err != nil {
16225		return nil, err
16226	}
16227	reqHeaders.Set("Content-Type", "application/json")
16228	c.urlParams_.Set("alt", alt)
16229	c.urlParams_.Set("prettyPrint", "false")
16230	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
16231	urls += "?" + c.urlParams_.Encode()
16232	req, err := http.NewRequest("POST", urls, body)
16233	if err != nil {
16234		return nil, err
16235	}
16236	req.Header = reqHeaders
16237	googleapi.Expand(req.URL, map[string]string{
16238		"parent": c.parent,
16239	})
16240	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16241}
16242
16243// Do executes the "dialogflow.projects.knowledgeBases.create" call.
16244// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
16245// will be non-nil. Any non-2xx status code is an error. Response
16246// headers are in either
16247// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
16248// (if a response was returned at all) in
16249// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16250// whether the returned error was because http.StatusNotModified was
16251// returned.
16252func (c *ProjectsKnowledgeBasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
16253	gensupport.SetOptions(c.urlParams_, opts...)
16254	res, err := c.doRequest("json")
16255	if res != nil && res.StatusCode == http.StatusNotModified {
16256		if res.Body != nil {
16257			res.Body.Close()
16258		}
16259		return nil, &googleapi.Error{
16260			Code:   res.StatusCode,
16261			Header: res.Header,
16262		}
16263	}
16264	if err != nil {
16265		return nil, err
16266	}
16267	defer googleapi.CloseBody(res)
16268	if err := googleapi.CheckResponse(res); err != nil {
16269		return nil, err
16270	}
16271	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
16272		ServerResponse: googleapi.ServerResponse{
16273			Header:         res.Header,
16274			HTTPStatusCode: res.StatusCode,
16275		},
16276	}
16277	target := &ret
16278	if err := gensupport.DecodeResponse(target, res); err != nil {
16279		return nil, err
16280	}
16281	return ret, nil
16282	// {
16283	//   "description": "Creates a knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
16284	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases",
16285	//   "httpMethod": "POST",
16286	//   "id": "dialogflow.projects.knowledgeBases.create",
16287	//   "parameterOrder": [
16288	//     "parent"
16289	//   ],
16290	//   "parameters": {
16291	//     "parent": {
16292	//       "description": "Required. The project to create a knowledge base for.\nFormat: `projects/\u003cProject ID\u003e`.",
16293	//       "location": "path",
16294	//       "pattern": "^projects/[^/]+$",
16295	//       "required": true,
16296	//       "type": "string"
16297	//     }
16298	//   },
16299	//   "path": "v2beta1/{+parent}/knowledgeBases",
16300	//   "request": {
16301	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
16302	//   },
16303	//   "response": {
16304	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
16305	//   },
16306	//   "scopes": [
16307	//     "https://www.googleapis.com/auth/cloud-platform",
16308	//     "https://www.googleapis.com/auth/dialogflow"
16309	//   ]
16310	// }
16311
16312}
16313
16314// method id "dialogflow.projects.knowledgeBases.delete":
16315
16316type ProjectsKnowledgeBasesDeleteCall struct {
16317	s          *Service
16318	name       string
16319	urlParams_ gensupport.URLParams
16320	ctx_       context.Context
16321	header_    http.Header
16322}
16323
16324// Delete: Deletes the specified knowledge base.
16325//
16326// Note: The `projects.agent.knowledgeBases` resource is
16327// deprecated;
16328// only use `projects.knowledgeBases`.
16329func (r *ProjectsKnowledgeBasesService) Delete(name string) *ProjectsKnowledgeBasesDeleteCall {
16330	c := &ProjectsKnowledgeBasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16331	c.name = name
16332	return c
16333}
16334
16335// Force sets the optional parameter "force": Force deletes the
16336// knowledge base. When set to true, any documents
16337// in the knowledge base are also deleted.
16338func (c *ProjectsKnowledgeBasesDeleteCall) Force(force bool) *ProjectsKnowledgeBasesDeleteCall {
16339	c.urlParams_.Set("force", fmt.Sprint(force))
16340	return c
16341}
16342
16343// Fields allows partial responses to be retrieved. See
16344// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16345// for more information.
16346func (c *ProjectsKnowledgeBasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDeleteCall {
16347	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16348	return c
16349}
16350
16351// Context sets the context to be used in this call's Do method. Any
16352// pending HTTP request will be aborted if the provided context is
16353// canceled.
16354func (c *ProjectsKnowledgeBasesDeleteCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDeleteCall {
16355	c.ctx_ = ctx
16356	return c
16357}
16358
16359// Header returns an http.Header that can be modified by the caller to
16360// add HTTP headers to the request.
16361func (c *ProjectsKnowledgeBasesDeleteCall) Header() http.Header {
16362	if c.header_ == nil {
16363		c.header_ = make(http.Header)
16364	}
16365	return c.header_
16366}
16367
16368func (c *ProjectsKnowledgeBasesDeleteCall) doRequest(alt string) (*http.Response, error) {
16369	reqHeaders := make(http.Header)
16370	for k, v := range c.header_ {
16371		reqHeaders[k] = v
16372	}
16373	reqHeaders.Set("User-Agent", c.s.userAgent())
16374	var body io.Reader = nil
16375	c.urlParams_.Set("alt", alt)
16376	c.urlParams_.Set("prettyPrint", "false")
16377	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
16378	urls += "?" + c.urlParams_.Encode()
16379	req, err := http.NewRequest("DELETE", urls, body)
16380	if err != nil {
16381		return nil, err
16382	}
16383	req.Header = reqHeaders
16384	googleapi.Expand(req.URL, map[string]string{
16385		"name": c.name,
16386	})
16387	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16388}
16389
16390// Do executes the "dialogflow.projects.knowledgeBases.delete" call.
16391// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
16392// non-2xx status code is an error. Response headers are in either
16393// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
16394// returned at all) in error.(*googleapi.Error).Header. Use
16395// googleapi.IsNotModified to check whether the returned error was
16396// because http.StatusNotModified was returned.
16397func (c *ProjectsKnowledgeBasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
16398	gensupport.SetOptions(c.urlParams_, opts...)
16399	res, err := c.doRequest("json")
16400	if res != nil && res.StatusCode == http.StatusNotModified {
16401		if res.Body != nil {
16402			res.Body.Close()
16403		}
16404		return nil, &googleapi.Error{
16405			Code:   res.StatusCode,
16406			Header: res.Header,
16407		}
16408	}
16409	if err != nil {
16410		return nil, err
16411	}
16412	defer googleapi.CloseBody(res)
16413	if err := googleapi.CheckResponse(res); err != nil {
16414		return nil, err
16415	}
16416	ret := &GoogleProtobufEmpty{
16417		ServerResponse: googleapi.ServerResponse{
16418			Header:         res.Header,
16419			HTTPStatusCode: res.StatusCode,
16420		},
16421	}
16422	target := &ret
16423	if err := gensupport.DecodeResponse(target, res); err != nil {
16424		return nil, err
16425	}
16426	return ret, nil
16427	// {
16428	//   "description": "Deletes the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
16429	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
16430	//   "httpMethod": "DELETE",
16431	//   "id": "dialogflow.projects.knowledgeBases.delete",
16432	//   "parameterOrder": [
16433	//     "name"
16434	//   ],
16435	//   "parameters": {
16436	//     "force": {
16437	//       "description": "Optional. Force deletes the knowledge base. When set to true, any documents\nin the knowledge base are also deleted.",
16438	//       "location": "query",
16439	//       "type": "boolean"
16440	//     },
16441	//     "name": {
16442	//       "description": "Required. The name of the knowledge base to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
16443	//       "location": "path",
16444	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
16445	//       "required": true,
16446	//       "type": "string"
16447	//     }
16448	//   },
16449	//   "path": "v2beta1/{+name}",
16450	//   "response": {
16451	//     "$ref": "GoogleProtobufEmpty"
16452	//   },
16453	//   "scopes": [
16454	//     "https://www.googleapis.com/auth/cloud-platform",
16455	//     "https://www.googleapis.com/auth/dialogflow"
16456	//   ]
16457	// }
16458
16459}
16460
16461// method id "dialogflow.projects.knowledgeBases.get":
16462
16463type ProjectsKnowledgeBasesGetCall struct {
16464	s            *Service
16465	name         string
16466	urlParams_   gensupport.URLParams
16467	ifNoneMatch_ string
16468	ctx_         context.Context
16469	header_      http.Header
16470}
16471
16472// Get: Retrieves the specified knowledge base.
16473//
16474// Note: The `projects.agent.knowledgeBases` resource is
16475// deprecated;
16476// only use `projects.knowledgeBases`.
16477func (r *ProjectsKnowledgeBasesService) Get(name string) *ProjectsKnowledgeBasesGetCall {
16478	c := &ProjectsKnowledgeBasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16479	c.name = name
16480	return c
16481}
16482
16483// Fields allows partial responses to be retrieved. See
16484// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16485// for more information.
16486func (c *ProjectsKnowledgeBasesGetCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesGetCall {
16487	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16488	return c
16489}
16490
16491// IfNoneMatch sets the optional parameter which makes the operation
16492// fail if the object's ETag matches the given value. This is useful for
16493// getting updates only after the object has changed since the last
16494// request. Use googleapi.IsNotModified to check whether the response
16495// error from Do is the result of In-None-Match.
16496func (c *ProjectsKnowledgeBasesGetCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesGetCall {
16497	c.ifNoneMatch_ = entityTag
16498	return c
16499}
16500
16501// Context sets the context to be used in this call's Do method. Any
16502// pending HTTP request will be aborted if the provided context is
16503// canceled.
16504func (c *ProjectsKnowledgeBasesGetCall) Context(ctx context.Context) *ProjectsKnowledgeBasesGetCall {
16505	c.ctx_ = ctx
16506	return c
16507}
16508
16509// Header returns an http.Header that can be modified by the caller to
16510// add HTTP headers to the request.
16511func (c *ProjectsKnowledgeBasesGetCall) Header() http.Header {
16512	if c.header_ == nil {
16513		c.header_ = make(http.Header)
16514	}
16515	return c.header_
16516}
16517
16518func (c *ProjectsKnowledgeBasesGetCall) doRequest(alt string) (*http.Response, error) {
16519	reqHeaders := make(http.Header)
16520	for k, v := range c.header_ {
16521		reqHeaders[k] = v
16522	}
16523	reqHeaders.Set("User-Agent", c.s.userAgent())
16524	if c.ifNoneMatch_ != "" {
16525		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16526	}
16527	var body io.Reader = nil
16528	c.urlParams_.Set("alt", alt)
16529	c.urlParams_.Set("prettyPrint", "false")
16530	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
16531	urls += "?" + c.urlParams_.Encode()
16532	req, err := http.NewRequest("GET", urls, body)
16533	if err != nil {
16534		return nil, err
16535	}
16536	req.Header = reqHeaders
16537	googleapi.Expand(req.URL, map[string]string{
16538		"name": c.name,
16539	})
16540	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16541}
16542
16543// Do executes the "dialogflow.projects.knowledgeBases.get" call.
16544// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
16545// will be non-nil. Any non-2xx status code is an error. Response
16546// headers are in either
16547// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
16548// (if a response was returned at all) in
16549// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16550// whether the returned error was because http.StatusNotModified was
16551// returned.
16552func (c *ProjectsKnowledgeBasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
16553	gensupport.SetOptions(c.urlParams_, opts...)
16554	res, err := c.doRequest("json")
16555	if res != nil && res.StatusCode == http.StatusNotModified {
16556		if res.Body != nil {
16557			res.Body.Close()
16558		}
16559		return nil, &googleapi.Error{
16560			Code:   res.StatusCode,
16561			Header: res.Header,
16562		}
16563	}
16564	if err != nil {
16565		return nil, err
16566	}
16567	defer googleapi.CloseBody(res)
16568	if err := googleapi.CheckResponse(res); err != nil {
16569		return nil, err
16570	}
16571	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
16572		ServerResponse: googleapi.ServerResponse{
16573			Header:         res.Header,
16574			HTTPStatusCode: res.StatusCode,
16575		},
16576	}
16577	target := &ret
16578	if err := gensupport.DecodeResponse(target, res); err != nil {
16579		return nil, err
16580	}
16581	return ret, nil
16582	// {
16583	//   "description": "Retrieves the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
16584	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
16585	//   "httpMethod": "GET",
16586	//   "id": "dialogflow.projects.knowledgeBases.get",
16587	//   "parameterOrder": [
16588	//     "name"
16589	//   ],
16590	//   "parameters": {
16591	//     "name": {
16592	//       "description": "Required. The name of the knowledge base to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
16593	//       "location": "path",
16594	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
16595	//       "required": true,
16596	//       "type": "string"
16597	//     }
16598	//   },
16599	//   "path": "v2beta1/{+name}",
16600	//   "response": {
16601	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
16602	//   },
16603	//   "scopes": [
16604	//     "https://www.googleapis.com/auth/cloud-platform",
16605	//     "https://www.googleapis.com/auth/dialogflow"
16606	//   ]
16607	// }
16608
16609}
16610
16611// method id "dialogflow.projects.knowledgeBases.list":
16612
16613type ProjectsKnowledgeBasesListCall struct {
16614	s            *Service
16615	parent       string
16616	urlParams_   gensupport.URLParams
16617	ifNoneMatch_ string
16618	ctx_         context.Context
16619	header_      http.Header
16620}
16621
16622// List: Returns the list of all knowledge bases of the specified
16623// agent.
16624//
16625// Note: The `projects.agent.knowledgeBases` resource is
16626// deprecated;
16627// only use `projects.knowledgeBases`.
16628func (r *ProjectsKnowledgeBasesService) List(parent string) *ProjectsKnowledgeBasesListCall {
16629	c := &ProjectsKnowledgeBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16630	c.parent = parent
16631	return c
16632}
16633
16634// PageSize sets the optional parameter "pageSize": The maximum number
16635// of items to return in a single page. By
16636// default 10 and at most 100.
16637func (c *ProjectsKnowledgeBasesListCall) PageSize(pageSize int64) *ProjectsKnowledgeBasesListCall {
16638	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16639	return c
16640}
16641
16642// PageToken sets the optional parameter "pageToken": The
16643// next_page_token value returned from a previous list request.
16644func (c *ProjectsKnowledgeBasesListCall) PageToken(pageToken string) *ProjectsKnowledgeBasesListCall {
16645	c.urlParams_.Set("pageToken", pageToken)
16646	return c
16647}
16648
16649// Fields allows partial responses to be retrieved. See
16650// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16651// for more information.
16652func (c *ProjectsKnowledgeBasesListCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesListCall {
16653	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16654	return c
16655}
16656
16657// IfNoneMatch sets the optional parameter which makes the operation
16658// fail if the object's ETag matches the given value. This is useful for
16659// getting updates only after the object has changed since the last
16660// request. Use googleapi.IsNotModified to check whether the response
16661// error from Do is the result of In-None-Match.
16662func (c *ProjectsKnowledgeBasesListCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesListCall {
16663	c.ifNoneMatch_ = entityTag
16664	return c
16665}
16666
16667// Context sets the context to be used in this call's Do method. Any
16668// pending HTTP request will be aborted if the provided context is
16669// canceled.
16670func (c *ProjectsKnowledgeBasesListCall) Context(ctx context.Context) *ProjectsKnowledgeBasesListCall {
16671	c.ctx_ = ctx
16672	return c
16673}
16674
16675// Header returns an http.Header that can be modified by the caller to
16676// add HTTP headers to the request.
16677func (c *ProjectsKnowledgeBasesListCall) Header() http.Header {
16678	if c.header_ == nil {
16679		c.header_ = make(http.Header)
16680	}
16681	return c.header_
16682}
16683
16684func (c *ProjectsKnowledgeBasesListCall) doRequest(alt string) (*http.Response, error) {
16685	reqHeaders := make(http.Header)
16686	for k, v := range c.header_ {
16687		reqHeaders[k] = v
16688	}
16689	reqHeaders.Set("User-Agent", c.s.userAgent())
16690	if c.ifNoneMatch_ != "" {
16691		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16692	}
16693	var body io.Reader = nil
16694	c.urlParams_.Set("alt", alt)
16695	c.urlParams_.Set("prettyPrint", "false")
16696	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/knowledgeBases")
16697	urls += "?" + c.urlParams_.Encode()
16698	req, err := http.NewRequest("GET", urls, body)
16699	if err != nil {
16700		return nil, err
16701	}
16702	req.Header = reqHeaders
16703	googleapi.Expand(req.URL, map[string]string{
16704		"parent": c.parent,
16705	})
16706	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16707}
16708
16709// Do executes the "dialogflow.projects.knowledgeBases.list" call.
16710// Exactly one of
16711// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse or error will
16712// be non-nil. Any non-2xx status code is an error. Response headers are
16713// in either
16714// *GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse.ServerResponse
16715// .Header or (if a response was returned at all) in
16716// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16717// whether the returned error was because http.StatusNotModified was
16718// returned.
16719func (c *ProjectsKnowledgeBasesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse, error) {
16720	gensupport.SetOptions(c.urlParams_, opts...)
16721	res, err := c.doRequest("json")
16722	if res != nil && res.StatusCode == http.StatusNotModified {
16723		if res.Body != nil {
16724			res.Body.Close()
16725		}
16726		return nil, &googleapi.Error{
16727			Code:   res.StatusCode,
16728			Header: res.Header,
16729		}
16730	}
16731	if err != nil {
16732		return nil, err
16733	}
16734	defer googleapi.CloseBody(res)
16735	if err := googleapi.CheckResponse(res); err != nil {
16736		return nil, err
16737	}
16738	ret := &GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse{
16739		ServerResponse: googleapi.ServerResponse{
16740			Header:         res.Header,
16741			HTTPStatusCode: res.StatusCode,
16742		},
16743	}
16744	target := &ret
16745	if err := gensupport.DecodeResponse(target, res); err != nil {
16746		return nil, err
16747	}
16748	return ret, nil
16749	// {
16750	//   "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`.",
16751	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases",
16752	//   "httpMethod": "GET",
16753	//   "id": "dialogflow.projects.knowledgeBases.list",
16754	//   "parameterOrder": [
16755	//     "parent"
16756	//   ],
16757	//   "parameters": {
16758	//     "pageSize": {
16759	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
16760	//       "format": "int32",
16761	//       "location": "query",
16762	//       "type": "integer"
16763	//     },
16764	//     "pageToken": {
16765	//       "description": "Optional. The next_page_token value returned from a previous list request.",
16766	//       "location": "query",
16767	//       "type": "string"
16768	//     },
16769	//     "parent": {
16770	//       "description": "Required. The project to list of knowledge bases for.\nFormat: `projects/\u003cProject ID\u003e`.",
16771	//       "location": "path",
16772	//       "pattern": "^projects/[^/]+$",
16773	//       "required": true,
16774	//       "type": "string"
16775	//     }
16776	//   },
16777	//   "path": "v2beta1/{+parent}/knowledgeBases",
16778	//   "response": {
16779	//     "$ref": "GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse"
16780	//   },
16781	//   "scopes": [
16782	//     "https://www.googleapis.com/auth/cloud-platform",
16783	//     "https://www.googleapis.com/auth/dialogflow"
16784	//   ]
16785	// }
16786
16787}
16788
16789// Pages invokes f for each page of results.
16790// A non-nil error returned from f will halt the iteration.
16791// The provided context supersedes any context provided to the Context method.
16792func (c *ProjectsKnowledgeBasesListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse) error) error {
16793	c.ctx_ = ctx
16794	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16795	for {
16796		x, err := c.Do()
16797		if err != nil {
16798			return err
16799		}
16800		if err := f(x); err != nil {
16801			return err
16802		}
16803		if x.NextPageToken == "" {
16804			return nil
16805		}
16806		c.PageToken(x.NextPageToken)
16807	}
16808}
16809
16810// method id "dialogflow.projects.knowledgeBases.patch":
16811
16812type ProjectsKnowledgeBasesPatchCall struct {
16813	s                                         *Service
16814	name                                      string
16815	googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase
16816	urlParams_                                gensupport.URLParams
16817	ctx_                                      context.Context
16818	header_                                   http.Header
16819}
16820
16821// Patch: Updates the specified knowledge base.
16822//
16823// Note: The `projects.agent.knowledgeBases` resource is
16824// deprecated;
16825// only use `projects.knowledgeBases`.
16826func (r *ProjectsKnowledgeBasesService) Patch(name string, googleclouddialogflowv2beta1knowledgebase *GoogleCloudDialogflowV2beta1KnowledgeBase) *ProjectsKnowledgeBasesPatchCall {
16827	c := &ProjectsKnowledgeBasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16828	c.name = name
16829	c.googleclouddialogflowv2beta1knowledgebase = googleclouddialogflowv2beta1knowledgebase
16830	return c
16831}
16832
16833// UpdateMask sets the optional parameter "updateMask": Not specified
16834// means `update all`.
16835// Currently, only `display_name` can be updated, an InvalidArgument
16836// will be
16837// returned for attempting to update other fields.
16838func (c *ProjectsKnowledgeBasesPatchCall) UpdateMask(updateMask string) *ProjectsKnowledgeBasesPatchCall {
16839	c.urlParams_.Set("updateMask", updateMask)
16840	return c
16841}
16842
16843// Fields allows partial responses to be retrieved. See
16844// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16845// for more information.
16846func (c *ProjectsKnowledgeBasesPatchCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesPatchCall {
16847	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16848	return c
16849}
16850
16851// Context sets the context to be used in this call's Do method. Any
16852// pending HTTP request will be aborted if the provided context is
16853// canceled.
16854func (c *ProjectsKnowledgeBasesPatchCall) Context(ctx context.Context) *ProjectsKnowledgeBasesPatchCall {
16855	c.ctx_ = ctx
16856	return c
16857}
16858
16859// Header returns an http.Header that can be modified by the caller to
16860// add HTTP headers to the request.
16861func (c *ProjectsKnowledgeBasesPatchCall) Header() http.Header {
16862	if c.header_ == nil {
16863		c.header_ = make(http.Header)
16864	}
16865	return c.header_
16866}
16867
16868func (c *ProjectsKnowledgeBasesPatchCall) doRequest(alt string) (*http.Response, error) {
16869	reqHeaders := make(http.Header)
16870	for k, v := range c.header_ {
16871		reqHeaders[k] = v
16872	}
16873	reqHeaders.Set("User-Agent", c.s.userAgent())
16874	var body io.Reader = nil
16875	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1knowledgebase)
16876	if err != nil {
16877		return nil, err
16878	}
16879	reqHeaders.Set("Content-Type", "application/json")
16880	c.urlParams_.Set("alt", alt)
16881	c.urlParams_.Set("prettyPrint", "false")
16882	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
16883	urls += "?" + c.urlParams_.Encode()
16884	req, err := http.NewRequest("PATCH", urls, body)
16885	if err != nil {
16886		return nil, err
16887	}
16888	req.Header = reqHeaders
16889	googleapi.Expand(req.URL, map[string]string{
16890		"name": c.name,
16891	})
16892	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16893}
16894
16895// Do executes the "dialogflow.projects.knowledgeBases.patch" call.
16896// Exactly one of *GoogleCloudDialogflowV2beta1KnowledgeBase or error
16897// will be non-nil. Any non-2xx status code is an error. Response
16898// headers are in either
16899// *GoogleCloudDialogflowV2beta1KnowledgeBase.ServerResponse.Header or
16900// (if a response was returned at all) in
16901// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16902// whether the returned error was because http.StatusNotModified was
16903// returned.
16904func (c *ProjectsKnowledgeBasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1KnowledgeBase, error) {
16905	gensupport.SetOptions(c.urlParams_, opts...)
16906	res, err := c.doRequest("json")
16907	if res != nil && res.StatusCode == http.StatusNotModified {
16908		if res.Body != nil {
16909			res.Body.Close()
16910		}
16911		return nil, &googleapi.Error{
16912			Code:   res.StatusCode,
16913			Header: res.Header,
16914		}
16915	}
16916	if err != nil {
16917		return nil, err
16918	}
16919	defer googleapi.CloseBody(res)
16920	if err := googleapi.CheckResponse(res); err != nil {
16921		return nil, err
16922	}
16923	ret := &GoogleCloudDialogflowV2beta1KnowledgeBase{
16924		ServerResponse: googleapi.ServerResponse{
16925			Header:         res.Header,
16926			HTTPStatusCode: res.StatusCode,
16927		},
16928	}
16929	target := &ret
16930	if err := gensupport.DecodeResponse(target, res); err != nil {
16931		return nil, err
16932	}
16933	return ret, nil
16934	// {
16935	//   "description": "Updates the specified knowledge base.\n\nNote: The `projects.agent.knowledgeBases` resource is deprecated;\nonly use `projects.knowledgeBases`.",
16936	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}",
16937	//   "httpMethod": "PATCH",
16938	//   "id": "dialogflow.projects.knowledgeBases.patch",
16939	//   "parameterOrder": [
16940	//     "name"
16941	//   ],
16942	//   "parameters": {
16943	//     "name": {
16944	//       "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`.",
16945	//       "location": "path",
16946	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
16947	//       "required": true,
16948	//       "type": "string"
16949	//     },
16950	//     "updateMask": {
16951	//       "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.",
16952	//       "format": "google-fieldmask",
16953	//       "location": "query",
16954	//       "type": "string"
16955	//     }
16956	//   },
16957	//   "path": "v2beta1/{+name}",
16958	//   "request": {
16959	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
16960	//   },
16961	//   "response": {
16962	//     "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase"
16963	//   },
16964	//   "scopes": [
16965	//     "https://www.googleapis.com/auth/cloud-platform",
16966	//     "https://www.googleapis.com/auth/dialogflow"
16967	//   ]
16968	// }
16969
16970}
16971
16972// method id "dialogflow.projects.knowledgeBases.documents.create":
16973
16974type ProjectsKnowledgeBasesDocumentsCreateCall struct {
16975	s                                    *Service
16976	parent                               string
16977	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
16978	urlParams_                           gensupport.URLParams
16979	ctx_                                 context.Context
16980	header_                              http.Header
16981}
16982
16983// Create: Creates a new document.
16984//
16985// Note: The `projects.agent.knowledgeBases.documents` resource is
16986// deprecated;
16987// only use `projects.knowledgeBases.documents`.
16988//
16989// Operation <response: Document,
16990//            metadata: KnowledgeOperationMetadata>
16991func (r *ProjectsKnowledgeBasesDocumentsService) Create(parent string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsKnowledgeBasesDocumentsCreateCall {
16992	c := &ProjectsKnowledgeBasesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16993	c.parent = parent
16994	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
16995	return c
16996}
16997
16998// Fields allows partial responses to be retrieved. See
16999// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17000// for more information.
17001func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsCreateCall {
17002	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17003	return c
17004}
17005
17006// Context sets the context to be used in this call's Do method. Any
17007// pending HTTP request will be aborted if the provided context is
17008// canceled.
17009func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsCreateCall {
17010	c.ctx_ = ctx
17011	return c
17012}
17013
17014// Header returns an http.Header that can be modified by the caller to
17015// add HTTP headers to the request.
17016func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Header() http.Header {
17017	if c.header_ == nil {
17018		c.header_ = make(http.Header)
17019	}
17020	return c.header_
17021}
17022
17023func (c *ProjectsKnowledgeBasesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) {
17024	reqHeaders := make(http.Header)
17025	for k, v := range c.header_ {
17026		reqHeaders[k] = v
17027	}
17028	reqHeaders.Set("User-Agent", c.s.userAgent())
17029	var body io.Reader = nil
17030	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
17031	if err != nil {
17032		return nil, err
17033	}
17034	reqHeaders.Set("Content-Type", "application/json")
17035	c.urlParams_.Set("alt", alt)
17036	c.urlParams_.Set("prettyPrint", "false")
17037	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
17038	urls += "?" + c.urlParams_.Encode()
17039	req, err := http.NewRequest("POST", urls, body)
17040	if err != nil {
17041		return nil, err
17042	}
17043	req.Header = reqHeaders
17044	googleapi.Expand(req.URL, map[string]string{
17045		"parent": c.parent,
17046	})
17047	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17048}
17049
17050// Do executes the "dialogflow.projects.knowledgeBases.documents.create" call.
17051// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
17052// Any non-2xx status code is an error. Response headers are in either
17053// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
17054// was returned at all) in error.(*googleapi.Error).Header. Use
17055// googleapi.IsNotModified to check whether the returned error was
17056// because http.StatusNotModified was returned.
17057func (c *ProjectsKnowledgeBasesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
17058	gensupport.SetOptions(c.urlParams_, opts...)
17059	res, err := c.doRequest("json")
17060	if res != nil && res.StatusCode == http.StatusNotModified {
17061		if res.Body != nil {
17062			res.Body.Close()
17063		}
17064		return nil, &googleapi.Error{
17065			Code:   res.StatusCode,
17066			Header: res.Header,
17067		}
17068	}
17069	if err != nil {
17070		return nil, err
17071	}
17072	defer googleapi.CloseBody(res)
17073	if err := googleapi.CheckResponse(res); err != nil {
17074		return nil, err
17075	}
17076	ret := &GoogleLongrunningOperation{
17077		ServerResponse: googleapi.ServerResponse{
17078			Header:         res.Header,
17079			HTTPStatusCode: res.StatusCode,
17080		},
17081	}
17082	target := &ret
17083	if err := gensupport.DecodeResponse(target, res); err != nil {
17084		return nil, err
17085	}
17086	return ret, nil
17087	// {
17088	//   "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",
17089	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents",
17090	//   "httpMethod": "POST",
17091	//   "id": "dialogflow.projects.knowledgeBases.documents.create",
17092	//   "parameterOrder": [
17093	//     "parent"
17094	//   ],
17095	//   "parameters": {
17096	//     "parent": {
17097	//       "description": "Required. The knoweldge base to create a document for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
17098	//       "location": "path",
17099	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
17100	//       "required": true,
17101	//       "type": "string"
17102	//     }
17103	//   },
17104	//   "path": "v2beta1/{+parent}/documents",
17105	//   "request": {
17106	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
17107	//   },
17108	//   "response": {
17109	//     "$ref": "GoogleLongrunningOperation"
17110	//   },
17111	//   "scopes": [
17112	//     "https://www.googleapis.com/auth/cloud-platform",
17113	//     "https://www.googleapis.com/auth/dialogflow"
17114	//   ]
17115	// }
17116
17117}
17118
17119// method id "dialogflow.projects.knowledgeBases.documents.delete":
17120
17121type ProjectsKnowledgeBasesDocumentsDeleteCall struct {
17122	s          *Service
17123	name       string
17124	urlParams_ gensupport.URLParams
17125	ctx_       context.Context
17126	header_    http.Header
17127}
17128
17129// Delete: Deletes the specified document.
17130//
17131// Note: The `projects.agent.knowledgeBases.documents` resource is
17132// deprecated;
17133// only use `projects.knowledgeBases.documents`.
17134//
17135// Operation <response: google.protobuf.Empty,
17136//            metadata: KnowledgeOperationMetadata>
17137func (r *ProjectsKnowledgeBasesDocumentsService) Delete(name string) *ProjectsKnowledgeBasesDocumentsDeleteCall {
17138	c := &ProjectsKnowledgeBasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17139	c.name = name
17140	return c
17141}
17142
17143// Fields allows partial responses to be retrieved. See
17144// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17145// for more information.
17146func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsDeleteCall {
17147	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17148	return c
17149}
17150
17151// Context sets the context to be used in this call's Do method. Any
17152// pending HTTP request will be aborted if the provided context is
17153// canceled.
17154func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsDeleteCall {
17155	c.ctx_ = ctx
17156	return c
17157}
17158
17159// Header returns an http.Header that can be modified by the caller to
17160// add HTTP headers to the request.
17161func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Header() http.Header {
17162	if c.header_ == nil {
17163		c.header_ = make(http.Header)
17164	}
17165	return c.header_
17166}
17167
17168func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
17169	reqHeaders := make(http.Header)
17170	for k, v := range c.header_ {
17171		reqHeaders[k] = v
17172	}
17173	reqHeaders.Set("User-Agent", c.s.userAgent())
17174	var body io.Reader = nil
17175	c.urlParams_.Set("alt", alt)
17176	c.urlParams_.Set("prettyPrint", "false")
17177	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17178	urls += "?" + c.urlParams_.Encode()
17179	req, err := http.NewRequest("DELETE", urls, body)
17180	if err != nil {
17181		return nil, err
17182	}
17183	req.Header = reqHeaders
17184	googleapi.Expand(req.URL, map[string]string{
17185		"name": c.name,
17186	})
17187	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17188}
17189
17190// Do executes the "dialogflow.projects.knowledgeBases.documents.delete" call.
17191// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
17192// Any non-2xx status code is an error. Response headers are in either
17193// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
17194// was returned at all) in error.(*googleapi.Error).Header. Use
17195// googleapi.IsNotModified to check whether the returned error was
17196// because http.StatusNotModified was returned.
17197func (c *ProjectsKnowledgeBasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
17198	gensupport.SetOptions(c.urlParams_, opts...)
17199	res, err := c.doRequest("json")
17200	if res != nil && res.StatusCode == http.StatusNotModified {
17201		if res.Body != nil {
17202			res.Body.Close()
17203		}
17204		return nil, &googleapi.Error{
17205			Code:   res.StatusCode,
17206			Header: res.Header,
17207		}
17208	}
17209	if err != nil {
17210		return nil, err
17211	}
17212	defer googleapi.CloseBody(res)
17213	if err := googleapi.CheckResponse(res); err != nil {
17214		return nil, err
17215	}
17216	ret := &GoogleLongrunningOperation{
17217		ServerResponse: googleapi.ServerResponse{
17218			Header:         res.Header,
17219			HTTPStatusCode: res.StatusCode,
17220		},
17221	}
17222	target := &ret
17223	if err := gensupport.DecodeResponse(target, res); err != nil {
17224		return nil, err
17225	}
17226	return ret, nil
17227	// {
17228	//   "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",
17229	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
17230	//   "httpMethod": "DELETE",
17231	//   "id": "dialogflow.projects.knowledgeBases.documents.delete",
17232	//   "parameterOrder": [
17233	//     "name"
17234	//   ],
17235	//   "parameters": {
17236	//     "name": {
17237	//       "description": "The name of the document to delete.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
17238	//       "location": "path",
17239	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
17240	//       "required": true,
17241	//       "type": "string"
17242	//     }
17243	//   },
17244	//   "path": "v2beta1/{+name}",
17245	//   "response": {
17246	//     "$ref": "GoogleLongrunningOperation"
17247	//   },
17248	//   "scopes": [
17249	//     "https://www.googleapis.com/auth/cloud-platform",
17250	//     "https://www.googleapis.com/auth/dialogflow"
17251	//   ]
17252	// }
17253
17254}
17255
17256// method id "dialogflow.projects.knowledgeBases.documents.get":
17257
17258type ProjectsKnowledgeBasesDocumentsGetCall struct {
17259	s            *Service
17260	name         string
17261	urlParams_   gensupport.URLParams
17262	ifNoneMatch_ string
17263	ctx_         context.Context
17264	header_      http.Header
17265}
17266
17267// Get: Retrieves the specified document.
17268//
17269// Note: The `projects.agent.knowledgeBases.documents` resource is
17270// deprecated;
17271// only use `projects.knowledgeBases.documents`.
17272func (r *ProjectsKnowledgeBasesDocumentsService) Get(name string) *ProjectsKnowledgeBasesDocumentsGetCall {
17273	c := &ProjectsKnowledgeBasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17274	c.name = name
17275	return c
17276}
17277
17278// Fields allows partial responses to be retrieved. See
17279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17280// for more information.
17281func (c *ProjectsKnowledgeBasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsGetCall {
17282	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17283	return c
17284}
17285
17286// IfNoneMatch sets the optional parameter which makes the operation
17287// fail if the object's ETag matches the given value. This is useful for
17288// getting updates only after the object has changed since the last
17289// request. Use googleapi.IsNotModified to check whether the response
17290// error from Do is the result of In-None-Match.
17291func (c *ProjectsKnowledgeBasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesDocumentsGetCall {
17292	c.ifNoneMatch_ = entityTag
17293	return c
17294}
17295
17296// Context sets the context to be used in this call's Do method. Any
17297// pending HTTP request will be aborted if the provided context is
17298// canceled.
17299func (c *ProjectsKnowledgeBasesDocumentsGetCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsGetCall {
17300	c.ctx_ = ctx
17301	return c
17302}
17303
17304// Header returns an http.Header that can be modified by the caller to
17305// add HTTP headers to the request.
17306func (c *ProjectsKnowledgeBasesDocumentsGetCall) Header() http.Header {
17307	if c.header_ == nil {
17308		c.header_ = make(http.Header)
17309	}
17310	return c.header_
17311}
17312
17313func (c *ProjectsKnowledgeBasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
17314	reqHeaders := make(http.Header)
17315	for k, v := range c.header_ {
17316		reqHeaders[k] = v
17317	}
17318	reqHeaders.Set("User-Agent", c.s.userAgent())
17319	if c.ifNoneMatch_ != "" {
17320		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17321	}
17322	var body io.Reader = nil
17323	c.urlParams_.Set("alt", alt)
17324	c.urlParams_.Set("prettyPrint", "false")
17325	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17326	urls += "?" + c.urlParams_.Encode()
17327	req, err := http.NewRequest("GET", urls, body)
17328	if err != nil {
17329		return nil, err
17330	}
17331	req.Header = reqHeaders
17332	googleapi.Expand(req.URL, map[string]string{
17333		"name": c.name,
17334	})
17335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17336}
17337
17338// Do executes the "dialogflow.projects.knowledgeBases.documents.get" call.
17339// Exactly one of *GoogleCloudDialogflowV2beta1Document or error will be
17340// non-nil. Any non-2xx status code is an error. Response headers are in
17341// either *GoogleCloudDialogflowV2beta1Document.ServerResponse.Header or
17342// (if a response was returned at all) in
17343// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17344// whether the returned error was because http.StatusNotModified was
17345// returned.
17346func (c *ProjectsKnowledgeBasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1Document, error) {
17347	gensupport.SetOptions(c.urlParams_, opts...)
17348	res, err := c.doRequest("json")
17349	if res != nil && res.StatusCode == http.StatusNotModified {
17350		if res.Body != nil {
17351			res.Body.Close()
17352		}
17353		return nil, &googleapi.Error{
17354			Code:   res.StatusCode,
17355			Header: res.Header,
17356		}
17357	}
17358	if err != nil {
17359		return nil, err
17360	}
17361	defer googleapi.CloseBody(res)
17362	if err := googleapi.CheckResponse(res); err != nil {
17363		return nil, err
17364	}
17365	ret := &GoogleCloudDialogflowV2beta1Document{
17366		ServerResponse: googleapi.ServerResponse{
17367			Header:         res.Header,
17368			HTTPStatusCode: res.StatusCode,
17369		},
17370	}
17371	target := &ret
17372	if err := gensupport.DecodeResponse(target, res); err != nil {
17373		return nil, err
17374	}
17375	return ret, nil
17376	// {
17377	//   "description": "Retrieves the specified document.\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`.",
17378	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
17379	//   "httpMethod": "GET",
17380	//   "id": "dialogflow.projects.knowledgeBases.documents.get",
17381	//   "parameterOrder": [
17382	//     "name"
17383	//   ],
17384	//   "parameters": {
17385	//     "name": {
17386	//       "description": "Required. The name of the document to retrieve.\nFormat `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`.",
17387	//       "location": "path",
17388	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
17389	//       "required": true,
17390	//       "type": "string"
17391	//     }
17392	//   },
17393	//   "path": "v2beta1/{+name}",
17394	//   "response": {
17395	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
17396	//   },
17397	//   "scopes": [
17398	//     "https://www.googleapis.com/auth/cloud-platform",
17399	//     "https://www.googleapis.com/auth/dialogflow"
17400	//   ]
17401	// }
17402
17403}
17404
17405// method id "dialogflow.projects.knowledgeBases.documents.list":
17406
17407type ProjectsKnowledgeBasesDocumentsListCall struct {
17408	s            *Service
17409	parent       string
17410	urlParams_   gensupport.URLParams
17411	ifNoneMatch_ string
17412	ctx_         context.Context
17413	header_      http.Header
17414}
17415
17416// List: Returns the list of all documents of the knowledge base.
17417//
17418// Note: The `projects.agent.knowledgeBases.documents` resource is
17419// deprecated;
17420// only use `projects.knowledgeBases.documents`.
17421func (r *ProjectsKnowledgeBasesDocumentsService) List(parent string) *ProjectsKnowledgeBasesDocumentsListCall {
17422	c := &ProjectsKnowledgeBasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17423	c.parent = parent
17424	return c
17425}
17426
17427// PageSize sets the optional parameter "pageSize": The maximum number
17428// of items to return in a single page. By
17429// default 10 and at most 100.
17430func (c *ProjectsKnowledgeBasesDocumentsListCall) PageSize(pageSize int64) *ProjectsKnowledgeBasesDocumentsListCall {
17431	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17432	return c
17433}
17434
17435// PageToken sets the optional parameter "pageToken": The
17436// next_page_token value returned from a previous list request.
17437func (c *ProjectsKnowledgeBasesDocumentsListCall) PageToken(pageToken string) *ProjectsKnowledgeBasesDocumentsListCall {
17438	c.urlParams_.Set("pageToken", pageToken)
17439	return c
17440}
17441
17442// Fields allows partial responses to be retrieved. See
17443// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17444// for more information.
17445func (c *ProjectsKnowledgeBasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsListCall {
17446	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17447	return c
17448}
17449
17450// IfNoneMatch sets the optional parameter which makes the operation
17451// fail if the object's ETag matches the given value. This is useful for
17452// getting updates only after the object has changed since the last
17453// request. Use googleapi.IsNotModified to check whether the response
17454// error from Do is the result of In-None-Match.
17455func (c *ProjectsKnowledgeBasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsKnowledgeBasesDocumentsListCall {
17456	c.ifNoneMatch_ = entityTag
17457	return c
17458}
17459
17460// Context sets the context to be used in this call's Do method. Any
17461// pending HTTP request will be aborted if the provided context is
17462// canceled.
17463func (c *ProjectsKnowledgeBasesDocumentsListCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsListCall {
17464	c.ctx_ = ctx
17465	return c
17466}
17467
17468// Header returns an http.Header that can be modified by the caller to
17469// add HTTP headers to the request.
17470func (c *ProjectsKnowledgeBasesDocumentsListCall) Header() http.Header {
17471	if c.header_ == nil {
17472		c.header_ = make(http.Header)
17473	}
17474	return c.header_
17475}
17476
17477func (c *ProjectsKnowledgeBasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
17478	reqHeaders := make(http.Header)
17479	for k, v := range c.header_ {
17480		reqHeaders[k] = v
17481	}
17482	reqHeaders.Set("User-Agent", c.s.userAgent())
17483	if c.ifNoneMatch_ != "" {
17484		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17485	}
17486	var body io.Reader = nil
17487	c.urlParams_.Set("alt", alt)
17488	c.urlParams_.Set("prettyPrint", "false")
17489	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/documents")
17490	urls += "?" + c.urlParams_.Encode()
17491	req, err := http.NewRequest("GET", urls, body)
17492	if err != nil {
17493		return nil, err
17494	}
17495	req.Header = reqHeaders
17496	googleapi.Expand(req.URL, map[string]string{
17497		"parent": c.parent,
17498	})
17499	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17500}
17501
17502// Do executes the "dialogflow.projects.knowledgeBases.documents.list" call.
17503// Exactly one of *GoogleCloudDialogflowV2beta1ListDocumentsResponse or
17504// error will be non-nil. Any non-2xx status code is an error. Response
17505// headers are in either
17506// *GoogleCloudDialogflowV2beta1ListDocumentsResponse.ServerResponse.Head
17507// er or (if a response was returned at all) in
17508// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17509// whether the returned error was because http.StatusNotModified was
17510// returned.
17511func (c *ProjectsKnowledgeBasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1ListDocumentsResponse, error) {
17512	gensupport.SetOptions(c.urlParams_, opts...)
17513	res, err := c.doRequest("json")
17514	if res != nil && res.StatusCode == http.StatusNotModified {
17515		if res.Body != nil {
17516			res.Body.Close()
17517		}
17518		return nil, &googleapi.Error{
17519			Code:   res.StatusCode,
17520			Header: res.Header,
17521		}
17522	}
17523	if err != nil {
17524		return nil, err
17525	}
17526	defer googleapi.CloseBody(res)
17527	if err := googleapi.CheckResponse(res); err != nil {
17528		return nil, err
17529	}
17530	ret := &GoogleCloudDialogflowV2beta1ListDocumentsResponse{
17531		ServerResponse: googleapi.ServerResponse{
17532			Header:         res.Header,
17533			HTTPStatusCode: res.StatusCode,
17534		},
17535	}
17536	target := &ret
17537	if err := gensupport.DecodeResponse(target, res); err != nil {
17538		return nil, err
17539	}
17540	return ret, nil
17541	// {
17542	//   "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`.",
17543	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents",
17544	//   "httpMethod": "GET",
17545	//   "id": "dialogflow.projects.knowledgeBases.documents.list",
17546	//   "parameterOrder": [
17547	//     "parent"
17548	//   ],
17549	//   "parameters": {
17550	//     "pageSize": {
17551	//       "description": "Optional. The maximum number of items to return in a single page. By\ndefault 10 and at most 100.",
17552	//       "format": "int32",
17553	//       "location": "query",
17554	//       "type": "integer"
17555	//     },
17556	//     "pageToken": {
17557	//       "description": "Optional. The next_page_token value returned from a previous list request.",
17558	//       "location": "query",
17559	//       "type": "string"
17560	//     },
17561	//     "parent": {
17562	//       "description": "Required. The knowledge base to list all documents for.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e`.",
17563	//       "location": "path",
17564	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$",
17565	//       "required": true,
17566	//       "type": "string"
17567	//     }
17568	//   },
17569	//   "path": "v2beta1/{+parent}/documents",
17570	//   "response": {
17571	//     "$ref": "GoogleCloudDialogflowV2beta1ListDocumentsResponse"
17572	//   },
17573	//   "scopes": [
17574	//     "https://www.googleapis.com/auth/cloud-platform",
17575	//     "https://www.googleapis.com/auth/dialogflow"
17576	//   ]
17577	// }
17578
17579}
17580
17581// Pages invokes f for each page of results.
17582// A non-nil error returned from f will halt the iteration.
17583// The provided context supersedes any context provided to the Context method.
17584func (c *ProjectsKnowledgeBasesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDialogflowV2beta1ListDocumentsResponse) error) error {
17585	c.ctx_ = ctx
17586	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17587	for {
17588		x, err := c.Do()
17589		if err != nil {
17590			return err
17591		}
17592		if err := f(x); err != nil {
17593			return err
17594		}
17595		if x.NextPageToken == "" {
17596			return nil
17597		}
17598		c.PageToken(x.NextPageToken)
17599	}
17600}
17601
17602// method id "dialogflow.projects.knowledgeBases.documents.patch":
17603
17604type ProjectsKnowledgeBasesDocumentsPatchCall struct {
17605	s                                    *Service
17606	name                                 string
17607	googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document
17608	urlParams_                           gensupport.URLParams
17609	ctx_                                 context.Context
17610	header_                              http.Header
17611}
17612
17613// Patch: Updates the specified document.
17614//
17615// Note: The `projects.agent.knowledgeBases.documents` resource is
17616// deprecated;
17617// only use `projects.knowledgeBases.documents`.
17618//
17619// Operation <response: Document,
17620//            metadata: KnowledgeOperationMetadata>
17621func (r *ProjectsKnowledgeBasesDocumentsService) Patch(name string, googleclouddialogflowv2beta1document *GoogleCloudDialogflowV2beta1Document) *ProjectsKnowledgeBasesDocumentsPatchCall {
17622	c := &ProjectsKnowledgeBasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17623	c.name = name
17624	c.googleclouddialogflowv2beta1document = googleclouddialogflowv2beta1document
17625	return c
17626}
17627
17628// UpdateMask sets the optional parameter "updateMask": Not specified
17629// means `update all`.
17630// Currently, only `display_name` can be updated, an InvalidArgument
17631// will be
17632// returned for attempting to update other fields.
17633func (c *ProjectsKnowledgeBasesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsKnowledgeBasesDocumentsPatchCall {
17634	c.urlParams_.Set("updateMask", updateMask)
17635	return c
17636}
17637
17638// Fields allows partial responses to be retrieved. See
17639// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17640// for more information.
17641func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsPatchCall {
17642	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17643	return c
17644}
17645
17646// Context sets the context to be used in this call's Do method. Any
17647// pending HTTP request will be aborted if the provided context is
17648// canceled.
17649func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsPatchCall {
17650	c.ctx_ = ctx
17651	return c
17652}
17653
17654// Header returns an http.Header that can be modified by the caller to
17655// add HTTP headers to the request.
17656func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Header() http.Header {
17657	if c.header_ == nil {
17658		c.header_ = make(http.Header)
17659	}
17660	return c.header_
17661}
17662
17663func (c *ProjectsKnowledgeBasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
17664	reqHeaders := make(http.Header)
17665	for k, v := range c.header_ {
17666		reqHeaders[k] = v
17667	}
17668	reqHeaders.Set("User-Agent", c.s.userAgent())
17669	var body io.Reader = nil
17670	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1document)
17671	if err != nil {
17672		return nil, err
17673	}
17674	reqHeaders.Set("Content-Type", "application/json")
17675	c.urlParams_.Set("alt", alt)
17676	c.urlParams_.Set("prettyPrint", "false")
17677	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17678	urls += "?" + c.urlParams_.Encode()
17679	req, err := http.NewRequest("PATCH", urls, body)
17680	if err != nil {
17681		return nil, err
17682	}
17683	req.Header = reqHeaders
17684	googleapi.Expand(req.URL, map[string]string{
17685		"name": c.name,
17686	})
17687	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17688}
17689
17690// Do executes the "dialogflow.projects.knowledgeBases.documents.patch" call.
17691// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
17692// Any non-2xx status code is an error. Response headers are in either
17693// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
17694// was returned at all) in error.(*googleapi.Error).Header. Use
17695// googleapi.IsNotModified to check whether the returned error was
17696// because http.StatusNotModified was returned.
17697func (c *ProjectsKnowledgeBasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
17698	gensupport.SetOptions(c.urlParams_, opts...)
17699	res, err := c.doRequest("json")
17700	if res != nil && res.StatusCode == http.StatusNotModified {
17701		if res.Body != nil {
17702			res.Body.Close()
17703		}
17704		return nil, &googleapi.Error{
17705			Code:   res.StatusCode,
17706			Header: res.Header,
17707		}
17708	}
17709	if err != nil {
17710		return nil, err
17711	}
17712	defer googleapi.CloseBody(res)
17713	if err := googleapi.CheckResponse(res); err != nil {
17714		return nil, err
17715	}
17716	ret := &GoogleLongrunningOperation{
17717		ServerResponse: googleapi.ServerResponse{
17718			Header:         res.Header,
17719			HTTPStatusCode: res.StatusCode,
17720		},
17721	}
17722	target := &ret
17723	if err := gensupport.DecodeResponse(target, res); err != nil {
17724		return nil, err
17725	}
17726	return ret, nil
17727	// {
17728	//   "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",
17729	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}",
17730	//   "httpMethod": "PATCH",
17731	//   "id": "dialogflow.projects.knowledgeBases.documents.patch",
17732	//   "parameterOrder": [
17733	//     "name"
17734	//   ],
17735	//   "parameters": {
17736	//     "name": {
17737	//       "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`.",
17738	//       "location": "path",
17739	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
17740	//       "required": true,
17741	//       "type": "string"
17742	//     },
17743	//     "updateMask": {
17744	//       "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.",
17745	//       "format": "google-fieldmask",
17746	//       "location": "query",
17747	//       "type": "string"
17748	//     }
17749	//   },
17750	//   "path": "v2beta1/{+name}",
17751	//   "request": {
17752	//     "$ref": "GoogleCloudDialogflowV2beta1Document"
17753	//   },
17754	//   "response": {
17755	//     "$ref": "GoogleLongrunningOperation"
17756	//   },
17757	//   "scopes": [
17758	//     "https://www.googleapis.com/auth/cloud-platform",
17759	//     "https://www.googleapis.com/auth/dialogflow"
17760	//   ]
17761	// }
17762
17763}
17764
17765// method id "dialogflow.projects.knowledgeBases.documents.reload":
17766
17767type ProjectsKnowledgeBasesDocumentsReloadCall struct {
17768	s                                                 *Service
17769	name                                              string
17770	googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest
17771	urlParams_                                        gensupport.URLParams
17772	ctx_                                              context.Context
17773	header_                                           http.Header
17774}
17775
17776// Reload: Reloads the specified document from its specified source,
17777// content_uri or
17778// content. The previously loaded content of the document will be
17779// deleted.
17780// Note: Even when the content of the document has not changed, there
17781// still
17782// may be side effects because of internal implementation
17783// changes.
17784//
17785// Note: The `projects.agent.knowledgeBases.documents` resource is
17786// deprecated;
17787// only use `projects.knowledgeBases.documents`.
17788//
17789// Operation <response: Document,
17790//            metadata: KnowledgeOperationMetadata>
17791func (r *ProjectsKnowledgeBasesDocumentsService) Reload(name string, googleclouddialogflowv2beta1reloaddocumentrequest *GoogleCloudDialogflowV2beta1ReloadDocumentRequest) *ProjectsKnowledgeBasesDocumentsReloadCall {
17792	c := &ProjectsKnowledgeBasesDocumentsReloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17793	c.name = name
17794	c.googleclouddialogflowv2beta1reloaddocumentrequest = googleclouddialogflowv2beta1reloaddocumentrequest
17795	return c
17796}
17797
17798// Fields allows partial responses to be retrieved. See
17799// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17800// for more information.
17801func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Fields(s ...googleapi.Field) *ProjectsKnowledgeBasesDocumentsReloadCall {
17802	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17803	return c
17804}
17805
17806// Context sets the context to be used in this call's Do method. Any
17807// pending HTTP request will be aborted if the provided context is
17808// canceled.
17809func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Context(ctx context.Context) *ProjectsKnowledgeBasesDocumentsReloadCall {
17810	c.ctx_ = ctx
17811	return c
17812}
17813
17814// Header returns an http.Header that can be modified by the caller to
17815// add HTTP headers to the request.
17816func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Header() http.Header {
17817	if c.header_ == nil {
17818		c.header_ = make(http.Header)
17819	}
17820	return c.header_
17821}
17822
17823func (c *ProjectsKnowledgeBasesDocumentsReloadCall) doRequest(alt string) (*http.Response, error) {
17824	reqHeaders := make(http.Header)
17825	for k, v := range c.header_ {
17826		reqHeaders[k] = v
17827	}
17828	reqHeaders.Set("User-Agent", c.s.userAgent())
17829	var body io.Reader = nil
17830	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1reloaddocumentrequest)
17831	if err != nil {
17832		return nil, err
17833	}
17834	reqHeaders.Set("Content-Type", "application/json")
17835	c.urlParams_.Set("alt", alt)
17836	c.urlParams_.Set("prettyPrint", "false")
17837	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:reload")
17838	urls += "?" + c.urlParams_.Encode()
17839	req, err := http.NewRequest("POST", urls, body)
17840	if err != nil {
17841		return nil, err
17842	}
17843	req.Header = reqHeaders
17844	googleapi.Expand(req.URL, map[string]string{
17845		"name": c.name,
17846	})
17847	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17848}
17849
17850// Do executes the "dialogflow.projects.knowledgeBases.documents.reload" call.
17851// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
17852// Any non-2xx status code is an error. Response headers are in either
17853// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
17854// was returned at all) in error.(*googleapi.Error).Header. Use
17855// googleapi.IsNotModified to check whether the returned error was
17856// because http.StatusNotModified was returned.
17857func (c *ProjectsKnowledgeBasesDocumentsReloadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
17858	gensupport.SetOptions(c.urlParams_, opts...)
17859	res, err := c.doRequest("json")
17860	if res != nil && res.StatusCode == http.StatusNotModified {
17861		if res.Body != nil {
17862			res.Body.Close()
17863		}
17864		return nil, &googleapi.Error{
17865			Code:   res.StatusCode,
17866			Header: res.Header,
17867		}
17868	}
17869	if err != nil {
17870		return nil, err
17871	}
17872	defer googleapi.CloseBody(res)
17873	if err := googleapi.CheckResponse(res); err != nil {
17874		return nil, err
17875	}
17876	ret := &GoogleLongrunningOperation{
17877		ServerResponse: googleapi.ServerResponse{
17878			Header:         res.Header,
17879			HTTPStatusCode: res.StatusCode,
17880		},
17881	}
17882	target := &ret
17883	if err := gensupport.DecodeResponse(target, res); err != nil {
17884		return nil, err
17885	}
17886	return ret, nil
17887	// {
17888	//   "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",
17889	//   "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload",
17890	//   "httpMethod": "POST",
17891	//   "id": "dialogflow.projects.knowledgeBases.documents.reload",
17892	//   "parameterOrder": [
17893	//     "name"
17894	//   ],
17895	//   "parameters": {
17896	//     "name": {
17897	//       "description": "The name of the document to reload.\nFormat: `projects/\u003cProject ID\u003e/knowledgeBases/\u003cKnowledge Base\nID\u003e/documents/\u003cDocument ID\u003e`",
17898	//       "location": "path",
17899	//       "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$",
17900	//       "required": true,
17901	//       "type": "string"
17902	//     }
17903	//   },
17904	//   "path": "v2beta1/{+name}:reload",
17905	//   "request": {
17906	//     "$ref": "GoogleCloudDialogflowV2beta1ReloadDocumentRequest"
17907	//   },
17908	//   "response": {
17909	//     "$ref": "GoogleLongrunningOperation"
17910	//   },
17911	//   "scopes": [
17912	//     "https://www.googleapis.com/auth/cloud-platform",
17913	//     "https://www.googleapis.com/auth/dialogflow"
17914	//   ]
17915	// }
17916
17917}
17918
17919// method id "dialogflow.projects.operations.get":
17920
17921type ProjectsOperationsGetCall struct {
17922	s            *Service
17923	name         string
17924	urlParams_   gensupport.URLParams
17925	ifNoneMatch_ string
17926	ctx_         context.Context
17927	header_      http.Header
17928}
17929
17930// Get: Gets the latest state of a long-running operation.  Clients can
17931// use this
17932// method to poll the operation result at intervals as recommended by
17933// the API
17934// service.
17935func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
17936	c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17937	c.name = name
17938	return c
17939}
17940
17941// Fields allows partial responses to be retrieved. See
17942// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17943// for more information.
17944func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
17945	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17946	return c
17947}
17948
17949// IfNoneMatch sets the optional parameter which makes the operation
17950// fail if the object's ETag matches the given value. This is useful for
17951// getting updates only after the object has changed since the last
17952// request. Use googleapi.IsNotModified to check whether the response
17953// error from Do is the result of In-None-Match.
17954func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
17955	c.ifNoneMatch_ = entityTag
17956	return c
17957}
17958
17959// Context sets the context to be used in this call's Do method. Any
17960// pending HTTP request will be aborted if the provided context is
17961// canceled.
17962func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
17963	c.ctx_ = ctx
17964	return c
17965}
17966
17967// Header returns an http.Header that can be modified by the caller to
17968// add HTTP headers to the request.
17969func (c *ProjectsOperationsGetCall) Header() http.Header {
17970	if c.header_ == nil {
17971		c.header_ = make(http.Header)
17972	}
17973	return c.header_
17974}
17975
17976func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
17977	reqHeaders := make(http.Header)
17978	for k, v := range c.header_ {
17979		reqHeaders[k] = v
17980	}
17981	reqHeaders.Set("User-Agent", c.s.userAgent())
17982	if c.ifNoneMatch_ != "" {
17983		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17984	}
17985	var body io.Reader = nil
17986	c.urlParams_.Set("alt", alt)
17987	c.urlParams_.Set("prettyPrint", "false")
17988	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
17989	urls += "?" + c.urlParams_.Encode()
17990	req, err := http.NewRequest("GET", urls, body)
17991	if err != nil {
17992		return nil, err
17993	}
17994	req.Header = reqHeaders
17995	googleapi.Expand(req.URL, map[string]string{
17996		"name": c.name,
17997	})
17998	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17999}
18000
18001// Do executes the "dialogflow.projects.operations.get" call.
18002// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
18003// Any non-2xx status code is an error. Response headers are in either
18004// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
18005// was returned at all) in error.(*googleapi.Error).Header. Use
18006// googleapi.IsNotModified to check whether the returned error was
18007// because http.StatusNotModified was returned.
18008func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
18009	gensupport.SetOptions(c.urlParams_, opts...)
18010	res, err := c.doRequest("json")
18011	if res != nil && res.StatusCode == http.StatusNotModified {
18012		if res.Body != nil {
18013			res.Body.Close()
18014		}
18015		return nil, &googleapi.Error{
18016			Code:   res.StatusCode,
18017			Header: res.Header,
18018		}
18019	}
18020	if err != nil {
18021		return nil, err
18022	}
18023	defer googleapi.CloseBody(res)
18024	if err := googleapi.CheckResponse(res); err != nil {
18025		return nil, err
18026	}
18027	ret := &GoogleLongrunningOperation{
18028		ServerResponse: googleapi.ServerResponse{
18029			Header:         res.Header,
18030			HTTPStatusCode: res.StatusCode,
18031		},
18032	}
18033	target := &ret
18034	if err := gensupport.DecodeResponse(target, res); err != nil {
18035		return nil, err
18036	}
18037	return ret, nil
18038	// {
18039	//   "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.",
18040	//   "flatPath": "v2beta1/projects/{projectsId}/operations/{operationsId}",
18041	//   "httpMethod": "GET",
18042	//   "id": "dialogflow.projects.operations.get",
18043	//   "parameterOrder": [
18044	//     "name"
18045	//   ],
18046	//   "parameters": {
18047	//     "name": {
18048	//       "description": "The name of the operation resource.",
18049	//       "location": "path",
18050	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
18051	//       "required": true,
18052	//       "type": "string"
18053	//     }
18054	//   },
18055	//   "path": "v2beta1/{+name}",
18056	//   "response": {
18057	//     "$ref": "GoogleLongrunningOperation"
18058	//   },
18059	//   "scopes": [
18060	//     "https://www.googleapis.com/auth/cloud-platform",
18061	//     "https://www.googleapis.com/auth/dialogflow"
18062	//   ]
18063	// }
18064
18065}
18066