You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1275 rivejä
48 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/cloud/dialogflow/v2/agent.proto
  3. package dialogflow // import "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import _ "github.com/golang/protobuf/ptypes/empty"
  8. import _ "github.com/golang/protobuf/ptypes/struct"
  9. import _ "google.golang.org/genproto/googleapis/api/annotations"
  10. import longrunning "google.golang.org/genproto/googleapis/longrunning"
  11. import _ "google.golang.org/genproto/protobuf/field_mask"
  12. import (
  13. context "golang.org/x/net/context"
  14. grpc "google.golang.org/grpc"
  15. )
  16. // Reference imports to suppress errors if they are not otherwise used.
  17. var _ = proto.Marshal
  18. var _ = fmt.Errorf
  19. var _ = math.Inf
  20. // This is a compile-time assertion to ensure that this generated file
  21. // is compatible with the proto package it is being compiled against.
  22. // A compilation error at this line likely means your copy of the
  23. // proto package needs to be updated.
  24. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  25. // Match mode determines how intents are detected from user queries.
  26. type Agent_MatchMode int32
  27. const (
  28. // Not specified.
  29. Agent_MATCH_MODE_UNSPECIFIED Agent_MatchMode = 0
  30. // Best for agents with a small number of examples in intents and/or wide
  31. // use of templates syntax and composite entities.
  32. Agent_MATCH_MODE_HYBRID Agent_MatchMode = 1
  33. // Can be used for agents with a large number of examples in intents,
  34. // especially the ones using @sys.any or very large developer entities.
  35. Agent_MATCH_MODE_ML_ONLY Agent_MatchMode = 2
  36. )
  37. var Agent_MatchMode_name = map[int32]string{
  38. 0: "MATCH_MODE_UNSPECIFIED",
  39. 1: "MATCH_MODE_HYBRID",
  40. 2: "MATCH_MODE_ML_ONLY",
  41. }
  42. var Agent_MatchMode_value = map[string]int32{
  43. "MATCH_MODE_UNSPECIFIED": 0,
  44. "MATCH_MODE_HYBRID": 1,
  45. "MATCH_MODE_ML_ONLY": 2,
  46. }
  47. func (x Agent_MatchMode) String() string {
  48. return proto.EnumName(Agent_MatchMode_name, int32(x))
  49. }
  50. func (Agent_MatchMode) EnumDescriptor() ([]byte, []int) {
  51. return fileDescriptor_agent_b37bcb085950ef88, []int{0, 0}
  52. }
  53. // Represents a conversational agent.
  54. type Agent struct {
  55. // Required. The project of this agent.
  56. // Format: `projects/<Project ID>`.
  57. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  58. // Required. The name of this agent.
  59. DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
  60. // Required. The default language of the agent as a language tag. See
  61. // [Language Support](https://dialogflow.com/docs/reference/language) for a
  62. // list of the currently supported language codes.
  63. // This field cannot be set by the `Update` method.
  64. DefaultLanguageCode string `protobuf:"bytes,3,opt,name=default_language_code,json=defaultLanguageCode,proto3" json:"default_language_code,omitempty"`
  65. // Optional. The list of all languages supported by this agent (except for the
  66. // `default_language_code`).
  67. SupportedLanguageCodes []string `protobuf:"bytes,4,rep,name=supported_language_codes,json=supportedLanguageCodes,proto3" json:"supported_language_codes,omitempty"`
  68. // Required. The time zone of this agent from the
  69. // [time zone database](https://www.iana.org/time-zones), e.g.,
  70. // America/New_York, Europe/Paris.
  71. TimeZone string `protobuf:"bytes,5,opt,name=time_zone,json=timeZone,proto3" json:"time_zone,omitempty"`
  72. // Optional. The description of this agent.
  73. // The maximum length is 500 characters. If exceeded, the request is rejected.
  74. Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
  75. // Optional. The URI of the agent's avatar.
  76. // Avatars are used throughout the Dialogflow console and in the self-hosted
  77. // [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
  78. AvatarUri string `protobuf:"bytes,7,opt,name=avatar_uri,json=avatarUri,proto3" json:"avatar_uri,omitempty"`
  79. // Optional. Determines whether this agent should log conversation queries.
  80. EnableLogging bool `protobuf:"varint,8,opt,name=enable_logging,json=enableLogging,proto3" json:"enable_logging,omitempty"`
  81. // Optional. Determines how intents are detected from user queries.
  82. MatchMode Agent_MatchMode `protobuf:"varint,9,opt,name=match_mode,json=matchMode,proto3,enum=google.cloud.dialogflow.v2.Agent_MatchMode" json:"match_mode,omitempty"`
  83. // Optional. To filter out false positive results and still get variety in
  84. // matched natural language inputs for your agent, you can tune the machine
  85. // learning classification threshold. If the returned score value is less than
  86. // the threshold value, then a fallback intent is be triggered or, if there
  87. // are no fallback intents defined, no intent will be triggered. The score
  88. // values range from 0.0 (completely uncertain) to 1.0 (completely certain).
  89. // If set to 0.0, the default of 0.3 is used.
  90. ClassificationThreshold float32 `protobuf:"fixed32,10,opt,name=classification_threshold,json=classificationThreshold,proto3" json:"classification_threshold,omitempty"`
  91. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  92. XXX_unrecognized []byte `json:"-"`
  93. XXX_sizecache int32 `json:"-"`
  94. }
  95. func (m *Agent) Reset() { *m = Agent{} }
  96. func (m *Agent) String() string { return proto.CompactTextString(m) }
  97. func (*Agent) ProtoMessage() {}
  98. func (*Agent) Descriptor() ([]byte, []int) {
  99. return fileDescriptor_agent_b37bcb085950ef88, []int{0}
  100. }
  101. func (m *Agent) XXX_Unmarshal(b []byte) error {
  102. return xxx_messageInfo_Agent.Unmarshal(m, b)
  103. }
  104. func (m *Agent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  105. return xxx_messageInfo_Agent.Marshal(b, m, deterministic)
  106. }
  107. func (dst *Agent) XXX_Merge(src proto.Message) {
  108. xxx_messageInfo_Agent.Merge(dst, src)
  109. }
  110. func (m *Agent) XXX_Size() int {
  111. return xxx_messageInfo_Agent.Size(m)
  112. }
  113. func (m *Agent) XXX_DiscardUnknown() {
  114. xxx_messageInfo_Agent.DiscardUnknown(m)
  115. }
  116. var xxx_messageInfo_Agent proto.InternalMessageInfo
  117. func (m *Agent) GetParent() string {
  118. if m != nil {
  119. return m.Parent
  120. }
  121. return ""
  122. }
  123. func (m *Agent) GetDisplayName() string {
  124. if m != nil {
  125. return m.DisplayName
  126. }
  127. return ""
  128. }
  129. func (m *Agent) GetDefaultLanguageCode() string {
  130. if m != nil {
  131. return m.DefaultLanguageCode
  132. }
  133. return ""
  134. }
  135. func (m *Agent) GetSupportedLanguageCodes() []string {
  136. if m != nil {
  137. return m.SupportedLanguageCodes
  138. }
  139. return nil
  140. }
  141. func (m *Agent) GetTimeZone() string {
  142. if m != nil {
  143. return m.TimeZone
  144. }
  145. return ""
  146. }
  147. func (m *Agent) GetDescription() string {
  148. if m != nil {
  149. return m.Description
  150. }
  151. return ""
  152. }
  153. func (m *Agent) GetAvatarUri() string {
  154. if m != nil {
  155. return m.AvatarUri
  156. }
  157. return ""
  158. }
  159. func (m *Agent) GetEnableLogging() bool {
  160. if m != nil {
  161. return m.EnableLogging
  162. }
  163. return false
  164. }
  165. func (m *Agent) GetMatchMode() Agent_MatchMode {
  166. if m != nil {
  167. return m.MatchMode
  168. }
  169. return Agent_MATCH_MODE_UNSPECIFIED
  170. }
  171. func (m *Agent) GetClassificationThreshold() float32 {
  172. if m != nil {
  173. return m.ClassificationThreshold
  174. }
  175. return 0
  176. }
  177. // The request message for
  178. // [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent].
  179. type GetAgentRequest struct {
  180. // Required. The project that the agent to fetch is associated with.
  181. // Format: `projects/<Project ID>`.
  182. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  183. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  184. XXX_unrecognized []byte `json:"-"`
  185. XXX_sizecache int32 `json:"-"`
  186. }
  187. func (m *GetAgentRequest) Reset() { *m = GetAgentRequest{} }
  188. func (m *GetAgentRequest) String() string { return proto.CompactTextString(m) }
  189. func (*GetAgentRequest) ProtoMessage() {}
  190. func (*GetAgentRequest) Descriptor() ([]byte, []int) {
  191. return fileDescriptor_agent_b37bcb085950ef88, []int{1}
  192. }
  193. func (m *GetAgentRequest) XXX_Unmarshal(b []byte) error {
  194. return xxx_messageInfo_GetAgentRequest.Unmarshal(m, b)
  195. }
  196. func (m *GetAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  197. return xxx_messageInfo_GetAgentRequest.Marshal(b, m, deterministic)
  198. }
  199. func (dst *GetAgentRequest) XXX_Merge(src proto.Message) {
  200. xxx_messageInfo_GetAgentRequest.Merge(dst, src)
  201. }
  202. func (m *GetAgentRequest) XXX_Size() int {
  203. return xxx_messageInfo_GetAgentRequest.Size(m)
  204. }
  205. func (m *GetAgentRequest) XXX_DiscardUnknown() {
  206. xxx_messageInfo_GetAgentRequest.DiscardUnknown(m)
  207. }
  208. var xxx_messageInfo_GetAgentRequest proto.InternalMessageInfo
  209. func (m *GetAgentRequest) GetParent() string {
  210. if m != nil {
  211. return m.Parent
  212. }
  213. return ""
  214. }
  215. // The request message for
  216. // [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
  217. type SearchAgentsRequest struct {
  218. // Required. The project to list agents from.
  219. // Format: `projects/<Project ID or '-'>`.
  220. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  221. // Optional. The maximum number of items to return in a single page. By
  222. // default 100 and at most 1000.
  223. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
  224. // Optional. The next_page_token value returned from a previous list request.
  225. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
  226. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  227. XXX_unrecognized []byte `json:"-"`
  228. XXX_sizecache int32 `json:"-"`
  229. }
  230. func (m *SearchAgentsRequest) Reset() { *m = SearchAgentsRequest{} }
  231. func (m *SearchAgentsRequest) String() string { return proto.CompactTextString(m) }
  232. func (*SearchAgentsRequest) ProtoMessage() {}
  233. func (*SearchAgentsRequest) Descriptor() ([]byte, []int) {
  234. return fileDescriptor_agent_b37bcb085950ef88, []int{2}
  235. }
  236. func (m *SearchAgentsRequest) XXX_Unmarshal(b []byte) error {
  237. return xxx_messageInfo_SearchAgentsRequest.Unmarshal(m, b)
  238. }
  239. func (m *SearchAgentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  240. return xxx_messageInfo_SearchAgentsRequest.Marshal(b, m, deterministic)
  241. }
  242. func (dst *SearchAgentsRequest) XXX_Merge(src proto.Message) {
  243. xxx_messageInfo_SearchAgentsRequest.Merge(dst, src)
  244. }
  245. func (m *SearchAgentsRequest) XXX_Size() int {
  246. return xxx_messageInfo_SearchAgentsRequest.Size(m)
  247. }
  248. func (m *SearchAgentsRequest) XXX_DiscardUnknown() {
  249. xxx_messageInfo_SearchAgentsRequest.DiscardUnknown(m)
  250. }
  251. var xxx_messageInfo_SearchAgentsRequest proto.InternalMessageInfo
  252. func (m *SearchAgentsRequest) GetParent() string {
  253. if m != nil {
  254. return m.Parent
  255. }
  256. return ""
  257. }
  258. func (m *SearchAgentsRequest) GetPageSize() int32 {
  259. if m != nil {
  260. return m.PageSize
  261. }
  262. return 0
  263. }
  264. func (m *SearchAgentsRequest) GetPageToken() string {
  265. if m != nil {
  266. return m.PageToken
  267. }
  268. return ""
  269. }
  270. // The response message for
  271. // [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
  272. type SearchAgentsResponse struct {
  273. // The list of agents. There will be a maximum number of items returned based
  274. // on the page_size field in the request.
  275. Agents []*Agent `protobuf:"bytes,1,rep,name=agents,proto3" json:"agents,omitempty"`
  276. // Token to retrieve the next page of results, or empty if there are no
  277. // more results in the list.
  278. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
  279. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  280. XXX_unrecognized []byte `json:"-"`
  281. XXX_sizecache int32 `json:"-"`
  282. }
  283. func (m *SearchAgentsResponse) Reset() { *m = SearchAgentsResponse{} }
  284. func (m *SearchAgentsResponse) String() string { return proto.CompactTextString(m) }
  285. func (*SearchAgentsResponse) ProtoMessage() {}
  286. func (*SearchAgentsResponse) Descriptor() ([]byte, []int) {
  287. return fileDescriptor_agent_b37bcb085950ef88, []int{3}
  288. }
  289. func (m *SearchAgentsResponse) XXX_Unmarshal(b []byte) error {
  290. return xxx_messageInfo_SearchAgentsResponse.Unmarshal(m, b)
  291. }
  292. func (m *SearchAgentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  293. return xxx_messageInfo_SearchAgentsResponse.Marshal(b, m, deterministic)
  294. }
  295. func (dst *SearchAgentsResponse) XXX_Merge(src proto.Message) {
  296. xxx_messageInfo_SearchAgentsResponse.Merge(dst, src)
  297. }
  298. func (m *SearchAgentsResponse) XXX_Size() int {
  299. return xxx_messageInfo_SearchAgentsResponse.Size(m)
  300. }
  301. func (m *SearchAgentsResponse) XXX_DiscardUnknown() {
  302. xxx_messageInfo_SearchAgentsResponse.DiscardUnknown(m)
  303. }
  304. var xxx_messageInfo_SearchAgentsResponse proto.InternalMessageInfo
  305. func (m *SearchAgentsResponse) GetAgents() []*Agent {
  306. if m != nil {
  307. return m.Agents
  308. }
  309. return nil
  310. }
  311. func (m *SearchAgentsResponse) GetNextPageToken() string {
  312. if m != nil {
  313. return m.NextPageToken
  314. }
  315. return ""
  316. }
  317. // The request message for
  318. // [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent].
  319. type TrainAgentRequest struct {
  320. // Required. The project that the agent to train is associated with.
  321. // Format: `projects/<Project ID>`.
  322. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  323. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  324. XXX_unrecognized []byte `json:"-"`
  325. XXX_sizecache int32 `json:"-"`
  326. }
  327. func (m *TrainAgentRequest) Reset() { *m = TrainAgentRequest{} }
  328. func (m *TrainAgentRequest) String() string { return proto.CompactTextString(m) }
  329. func (*TrainAgentRequest) ProtoMessage() {}
  330. func (*TrainAgentRequest) Descriptor() ([]byte, []int) {
  331. return fileDescriptor_agent_b37bcb085950ef88, []int{4}
  332. }
  333. func (m *TrainAgentRequest) XXX_Unmarshal(b []byte) error {
  334. return xxx_messageInfo_TrainAgentRequest.Unmarshal(m, b)
  335. }
  336. func (m *TrainAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  337. return xxx_messageInfo_TrainAgentRequest.Marshal(b, m, deterministic)
  338. }
  339. func (dst *TrainAgentRequest) XXX_Merge(src proto.Message) {
  340. xxx_messageInfo_TrainAgentRequest.Merge(dst, src)
  341. }
  342. func (m *TrainAgentRequest) XXX_Size() int {
  343. return xxx_messageInfo_TrainAgentRequest.Size(m)
  344. }
  345. func (m *TrainAgentRequest) XXX_DiscardUnknown() {
  346. xxx_messageInfo_TrainAgentRequest.DiscardUnknown(m)
  347. }
  348. var xxx_messageInfo_TrainAgentRequest proto.InternalMessageInfo
  349. func (m *TrainAgentRequest) GetParent() string {
  350. if m != nil {
  351. return m.Parent
  352. }
  353. return ""
  354. }
  355. // The request message for
  356. // [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
  357. type ExportAgentRequest struct {
  358. // Required. The project that the agent to export is associated with.
  359. // Format: `projects/<Project ID>`.
  360. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  361. // Optional. The Google Cloud Storage URI to export the agent to.
  362. // Note: The URI must start with
  363. // "gs://". If left unspecified, the serialized agent is returned inline.
  364. AgentUri string `protobuf:"bytes,2,opt,name=agent_uri,json=agentUri,proto3" json:"agent_uri,omitempty"`
  365. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  366. XXX_unrecognized []byte `json:"-"`
  367. XXX_sizecache int32 `json:"-"`
  368. }
  369. func (m *ExportAgentRequest) Reset() { *m = ExportAgentRequest{} }
  370. func (m *ExportAgentRequest) String() string { return proto.CompactTextString(m) }
  371. func (*ExportAgentRequest) ProtoMessage() {}
  372. func (*ExportAgentRequest) Descriptor() ([]byte, []int) {
  373. return fileDescriptor_agent_b37bcb085950ef88, []int{5}
  374. }
  375. func (m *ExportAgentRequest) XXX_Unmarshal(b []byte) error {
  376. return xxx_messageInfo_ExportAgentRequest.Unmarshal(m, b)
  377. }
  378. func (m *ExportAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  379. return xxx_messageInfo_ExportAgentRequest.Marshal(b, m, deterministic)
  380. }
  381. func (dst *ExportAgentRequest) XXX_Merge(src proto.Message) {
  382. xxx_messageInfo_ExportAgentRequest.Merge(dst, src)
  383. }
  384. func (m *ExportAgentRequest) XXX_Size() int {
  385. return xxx_messageInfo_ExportAgentRequest.Size(m)
  386. }
  387. func (m *ExportAgentRequest) XXX_DiscardUnknown() {
  388. xxx_messageInfo_ExportAgentRequest.DiscardUnknown(m)
  389. }
  390. var xxx_messageInfo_ExportAgentRequest proto.InternalMessageInfo
  391. func (m *ExportAgentRequest) GetParent() string {
  392. if m != nil {
  393. return m.Parent
  394. }
  395. return ""
  396. }
  397. func (m *ExportAgentRequest) GetAgentUri() string {
  398. if m != nil {
  399. return m.AgentUri
  400. }
  401. return ""
  402. }
  403. // The response message for
  404. // [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
  405. type ExportAgentResponse struct {
  406. // Required. The exported agent.
  407. //
  408. // Types that are valid to be assigned to Agent:
  409. // *ExportAgentResponse_AgentUri
  410. // *ExportAgentResponse_AgentContent
  411. Agent isExportAgentResponse_Agent `protobuf_oneof:"agent"`
  412. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  413. XXX_unrecognized []byte `json:"-"`
  414. XXX_sizecache int32 `json:"-"`
  415. }
  416. func (m *ExportAgentResponse) Reset() { *m = ExportAgentResponse{} }
  417. func (m *ExportAgentResponse) String() string { return proto.CompactTextString(m) }
  418. func (*ExportAgentResponse) ProtoMessage() {}
  419. func (*ExportAgentResponse) Descriptor() ([]byte, []int) {
  420. return fileDescriptor_agent_b37bcb085950ef88, []int{6}
  421. }
  422. func (m *ExportAgentResponse) XXX_Unmarshal(b []byte) error {
  423. return xxx_messageInfo_ExportAgentResponse.Unmarshal(m, b)
  424. }
  425. func (m *ExportAgentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  426. return xxx_messageInfo_ExportAgentResponse.Marshal(b, m, deterministic)
  427. }
  428. func (dst *ExportAgentResponse) XXX_Merge(src proto.Message) {
  429. xxx_messageInfo_ExportAgentResponse.Merge(dst, src)
  430. }
  431. func (m *ExportAgentResponse) XXX_Size() int {
  432. return xxx_messageInfo_ExportAgentResponse.Size(m)
  433. }
  434. func (m *ExportAgentResponse) XXX_DiscardUnknown() {
  435. xxx_messageInfo_ExportAgentResponse.DiscardUnknown(m)
  436. }
  437. var xxx_messageInfo_ExportAgentResponse proto.InternalMessageInfo
  438. type isExportAgentResponse_Agent interface {
  439. isExportAgentResponse_Agent()
  440. }
  441. type ExportAgentResponse_AgentUri struct {
  442. AgentUri string `protobuf:"bytes,1,opt,name=agent_uri,json=agentUri,proto3,oneof"`
  443. }
  444. type ExportAgentResponse_AgentContent struct {
  445. AgentContent []byte `protobuf:"bytes,2,opt,name=agent_content,json=agentContent,proto3,oneof"`
  446. }
  447. func (*ExportAgentResponse_AgentUri) isExportAgentResponse_Agent() {}
  448. func (*ExportAgentResponse_AgentContent) isExportAgentResponse_Agent() {}
  449. func (m *ExportAgentResponse) GetAgent() isExportAgentResponse_Agent {
  450. if m != nil {
  451. return m.Agent
  452. }
  453. return nil
  454. }
  455. func (m *ExportAgentResponse) GetAgentUri() string {
  456. if x, ok := m.GetAgent().(*ExportAgentResponse_AgentUri); ok {
  457. return x.AgentUri
  458. }
  459. return ""
  460. }
  461. func (m *ExportAgentResponse) GetAgentContent() []byte {
  462. if x, ok := m.GetAgent().(*ExportAgentResponse_AgentContent); ok {
  463. return x.AgentContent
  464. }
  465. return nil
  466. }
  467. // XXX_OneofFuncs is for the internal use of the proto package.
  468. func (*ExportAgentResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  469. return _ExportAgentResponse_OneofMarshaler, _ExportAgentResponse_OneofUnmarshaler, _ExportAgentResponse_OneofSizer, []interface{}{
  470. (*ExportAgentResponse_AgentUri)(nil),
  471. (*ExportAgentResponse_AgentContent)(nil),
  472. }
  473. }
  474. func _ExportAgentResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  475. m := msg.(*ExportAgentResponse)
  476. // agent
  477. switch x := m.Agent.(type) {
  478. case *ExportAgentResponse_AgentUri:
  479. b.EncodeVarint(1<<3 | proto.WireBytes)
  480. b.EncodeStringBytes(x.AgentUri)
  481. case *ExportAgentResponse_AgentContent:
  482. b.EncodeVarint(2<<3 | proto.WireBytes)
  483. b.EncodeRawBytes(x.AgentContent)
  484. case nil:
  485. default:
  486. return fmt.Errorf("ExportAgentResponse.Agent has unexpected type %T", x)
  487. }
  488. return nil
  489. }
  490. func _ExportAgentResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  491. m := msg.(*ExportAgentResponse)
  492. switch tag {
  493. case 1: // agent.agent_uri
  494. if wire != proto.WireBytes {
  495. return true, proto.ErrInternalBadWireType
  496. }
  497. x, err := b.DecodeStringBytes()
  498. m.Agent = &ExportAgentResponse_AgentUri{x}
  499. return true, err
  500. case 2: // agent.agent_content
  501. if wire != proto.WireBytes {
  502. return true, proto.ErrInternalBadWireType
  503. }
  504. x, err := b.DecodeRawBytes(true)
  505. m.Agent = &ExportAgentResponse_AgentContent{x}
  506. return true, err
  507. default:
  508. return false, nil
  509. }
  510. }
  511. func _ExportAgentResponse_OneofSizer(msg proto.Message) (n int) {
  512. m := msg.(*ExportAgentResponse)
  513. // agent
  514. switch x := m.Agent.(type) {
  515. case *ExportAgentResponse_AgentUri:
  516. n += 1 // tag and wire
  517. n += proto.SizeVarint(uint64(len(x.AgentUri)))
  518. n += len(x.AgentUri)
  519. case *ExportAgentResponse_AgentContent:
  520. n += 1 // tag and wire
  521. n += proto.SizeVarint(uint64(len(x.AgentContent)))
  522. n += len(x.AgentContent)
  523. case nil:
  524. default:
  525. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  526. }
  527. return n
  528. }
  529. // The request message for
  530. // [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent].
  531. type ImportAgentRequest struct {
  532. // Required. The project that the agent to import is associated with.
  533. // Format: `projects/<Project ID>`.
  534. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  535. // Required. The agent to import.
  536. //
  537. // Types that are valid to be assigned to Agent:
  538. // *ImportAgentRequest_AgentUri
  539. // *ImportAgentRequest_AgentContent
  540. Agent isImportAgentRequest_Agent `protobuf_oneof:"agent"`
  541. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  542. XXX_unrecognized []byte `json:"-"`
  543. XXX_sizecache int32 `json:"-"`
  544. }
  545. func (m *ImportAgentRequest) Reset() { *m = ImportAgentRequest{} }
  546. func (m *ImportAgentRequest) String() string { return proto.CompactTextString(m) }
  547. func (*ImportAgentRequest) ProtoMessage() {}
  548. func (*ImportAgentRequest) Descriptor() ([]byte, []int) {
  549. return fileDescriptor_agent_b37bcb085950ef88, []int{7}
  550. }
  551. func (m *ImportAgentRequest) XXX_Unmarshal(b []byte) error {
  552. return xxx_messageInfo_ImportAgentRequest.Unmarshal(m, b)
  553. }
  554. func (m *ImportAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  555. return xxx_messageInfo_ImportAgentRequest.Marshal(b, m, deterministic)
  556. }
  557. func (dst *ImportAgentRequest) XXX_Merge(src proto.Message) {
  558. xxx_messageInfo_ImportAgentRequest.Merge(dst, src)
  559. }
  560. func (m *ImportAgentRequest) XXX_Size() int {
  561. return xxx_messageInfo_ImportAgentRequest.Size(m)
  562. }
  563. func (m *ImportAgentRequest) XXX_DiscardUnknown() {
  564. xxx_messageInfo_ImportAgentRequest.DiscardUnknown(m)
  565. }
  566. var xxx_messageInfo_ImportAgentRequest proto.InternalMessageInfo
  567. func (m *ImportAgentRequest) GetParent() string {
  568. if m != nil {
  569. return m.Parent
  570. }
  571. return ""
  572. }
  573. type isImportAgentRequest_Agent interface {
  574. isImportAgentRequest_Agent()
  575. }
  576. type ImportAgentRequest_AgentUri struct {
  577. AgentUri string `protobuf:"bytes,2,opt,name=agent_uri,json=agentUri,proto3,oneof"`
  578. }
  579. type ImportAgentRequest_AgentContent struct {
  580. AgentContent []byte `protobuf:"bytes,3,opt,name=agent_content,json=agentContent,proto3,oneof"`
  581. }
  582. func (*ImportAgentRequest_AgentUri) isImportAgentRequest_Agent() {}
  583. func (*ImportAgentRequest_AgentContent) isImportAgentRequest_Agent() {}
  584. func (m *ImportAgentRequest) GetAgent() isImportAgentRequest_Agent {
  585. if m != nil {
  586. return m.Agent
  587. }
  588. return nil
  589. }
  590. func (m *ImportAgentRequest) GetAgentUri() string {
  591. if x, ok := m.GetAgent().(*ImportAgentRequest_AgentUri); ok {
  592. return x.AgentUri
  593. }
  594. return ""
  595. }
  596. func (m *ImportAgentRequest) GetAgentContent() []byte {
  597. if x, ok := m.GetAgent().(*ImportAgentRequest_AgentContent); ok {
  598. return x.AgentContent
  599. }
  600. return nil
  601. }
  602. // XXX_OneofFuncs is for the internal use of the proto package.
  603. func (*ImportAgentRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  604. return _ImportAgentRequest_OneofMarshaler, _ImportAgentRequest_OneofUnmarshaler, _ImportAgentRequest_OneofSizer, []interface{}{
  605. (*ImportAgentRequest_AgentUri)(nil),
  606. (*ImportAgentRequest_AgentContent)(nil),
  607. }
  608. }
  609. func _ImportAgentRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  610. m := msg.(*ImportAgentRequest)
  611. // agent
  612. switch x := m.Agent.(type) {
  613. case *ImportAgentRequest_AgentUri:
  614. b.EncodeVarint(2<<3 | proto.WireBytes)
  615. b.EncodeStringBytes(x.AgentUri)
  616. case *ImportAgentRequest_AgentContent:
  617. b.EncodeVarint(3<<3 | proto.WireBytes)
  618. b.EncodeRawBytes(x.AgentContent)
  619. case nil:
  620. default:
  621. return fmt.Errorf("ImportAgentRequest.Agent has unexpected type %T", x)
  622. }
  623. return nil
  624. }
  625. func _ImportAgentRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  626. m := msg.(*ImportAgentRequest)
  627. switch tag {
  628. case 2: // agent.agent_uri
  629. if wire != proto.WireBytes {
  630. return true, proto.ErrInternalBadWireType
  631. }
  632. x, err := b.DecodeStringBytes()
  633. m.Agent = &ImportAgentRequest_AgentUri{x}
  634. return true, err
  635. case 3: // agent.agent_content
  636. if wire != proto.WireBytes {
  637. return true, proto.ErrInternalBadWireType
  638. }
  639. x, err := b.DecodeRawBytes(true)
  640. m.Agent = &ImportAgentRequest_AgentContent{x}
  641. return true, err
  642. default:
  643. return false, nil
  644. }
  645. }
  646. func _ImportAgentRequest_OneofSizer(msg proto.Message) (n int) {
  647. m := msg.(*ImportAgentRequest)
  648. // agent
  649. switch x := m.Agent.(type) {
  650. case *ImportAgentRequest_AgentUri:
  651. n += 1 // tag and wire
  652. n += proto.SizeVarint(uint64(len(x.AgentUri)))
  653. n += len(x.AgentUri)
  654. case *ImportAgentRequest_AgentContent:
  655. n += 1 // tag and wire
  656. n += proto.SizeVarint(uint64(len(x.AgentContent)))
  657. n += len(x.AgentContent)
  658. case nil:
  659. default:
  660. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  661. }
  662. return n
  663. }
  664. // The request message for
  665. // [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent].
  666. type RestoreAgentRequest struct {
  667. // Required. The project that the agent to restore is associated with.
  668. // Format: `projects/<Project ID>`.
  669. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  670. // Required. The agent to restore.
  671. //
  672. // Types that are valid to be assigned to Agent:
  673. // *RestoreAgentRequest_AgentUri
  674. // *RestoreAgentRequest_AgentContent
  675. Agent isRestoreAgentRequest_Agent `protobuf_oneof:"agent"`
  676. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  677. XXX_unrecognized []byte `json:"-"`
  678. XXX_sizecache int32 `json:"-"`
  679. }
  680. func (m *RestoreAgentRequest) Reset() { *m = RestoreAgentRequest{} }
  681. func (m *RestoreAgentRequest) String() string { return proto.CompactTextString(m) }
  682. func (*RestoreAgentRequest) ProtoMessage() {}
  683. func (*RestoreAgentRequest) Descriptor() ([]byte, []int) {
  684. return fileDescriptor_agent_b37bcb085950ef88, []int{8}
  685. }
  686. func (m *RestoreAgentRequest) XXX_Unmarshal(b []byte) error {
  687. return xxx_messageInfo_RestoreAgentRequest.Unmarshal(m, b)
  688. }
  689. func (m *RestoreAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  690. return xxx_messageInfo_RestoreAgentRequest.Marshal(b, m, deterministic)
  691. }
  692. func (dst *RestoreAgentRequest) XXX_Merge(src proto.Message) {
  693. xxx_messageInfo_RestoreAgentRequest.Merge(dst, src)
  694. }
  695. func (m *RestoreAgentRequest) XXX_Size() int {
  696. return xxx_messageInfo_RestoreAgentRequest.Size(m)
  697. }
  698. func (m *RestoreAgentRequest) XXX_DiscardUnknown() {
  699. xxx_messageInfo_RestoreAgentRequest.DiscardUnknown(m)
  700. }
  701. var xxx_messageInfo_RestoreAgentRequest proto.InternalMessageInfo
  702. func (m *RestoreAgentRequest) GetParent() string {
  703. if m != nil {
  704. return m.Parent
  705. }
  706. return ""
  707. }
  708. type isRestoreAgentRequest_Agent interface {
  709. isRestoreAgentRequest_Agent()
  710. }
  711. type RestoreAgentRequest_AgentUri struct {
  712. AgentUri string `protobuf:"bytes,2,opt,name=agent_uri,json=agentUri,proto3,oneof"`
  713. }
  714. type RestoreAgentRequest_AgentContent struct {
  715. AgentContent []byte `protobuf:"bytes,3,opt,name=agent_content,json=agentContent,proto3,oneof"`
  716. }
  717. func (*RestoreAgentRequest_AgentUri) isRestoreAgentRequest_Agent() {}
  718. func (*RestoreAgentRequest_AgentContent) isRestoreAgentRequest_Agent() {}
  719. func (m *RestoreAgentRequest) GetAgent() isRestoreAgentRequest_Agent {
  720. if m != nil {
  721. return m.Agent
  722. }
  723. return nil
  724. }
  725. func (m *RestoreAgentRequest) GetAgentUri() string {
  726. if x, ok := m.GetAgent().(*RestoreAgentRequest_AgentUri); ok {
  727. return x.AgentUri
  728. }
  729. return ""
  730. }
  731. func (m *RestoreAgentRequest) GetAgentContent() []byte {
  732. if x, ok := m.GetAgent().(*RestoreAgentRequest_AgentContent); ok {
  733. return x.AgentContent
  734. }
  735. return nil
  736. }
  737. // XXX_OneofFuncs is for the internal use of the proto package.
  738. func (*RestoreAgentRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  739. return _RestoreAgentRequest_OneofMarshaler, _RestoreAgentRequest_OneofUnmarshaler, _RestoreAgentRequest_OneofSizer, []interface{}{
  740. (*RestoreAgentRequest_AgentUri)(nil),
  741. (*RestoreAgentRequest_AgentContent)(nil),
  742. }
  743. }
  744. func _RestoreAgentRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  745. m := msg.(*RestoreAgentRequest)
  746. // agent
  747. switch x := m.Agent.(type) {
  748. case *RestoreAgentRequest_AgentUri:
  749. b.EncodeVarint(2<<3 | proto.WireBytes)
  750. b.EncodeStringBytes(x.AgentUri)
  751. case *RestoreAgentRequest_AgentContent:
  752. b.EncodeVarint(3<<3 | proto.WireBytes)
  753. b.EncodeRawBytes(x.AgentContent)
  754. case nil:
  755. default:
  756. return fmt.Errorf("RestoreAgentRequest.Agent has unexpected type %T", x)
  757. }
  758. return nil
  759. }
  760. func _RestoreAgentRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  761. m := msg.(*RestoreAgentRequest)
  762. switch tag {
  763. case 2: // agent.agent_uri
  764. if wire != proto.WireBytes {
  765. return true, proto.ErrInternalBadWireType
  766. }
  767. x, err := b.DecodeStringBytes()
  768. m.Agent = &RestoreAgentRequest_AgentUri{x}
  769. return true, err
  770. case 3: // agent.agent_content
  771. if wire != proto.WireBytes {
  772. return true, proto.ErrInternalBadWireType
  773. }
  774. x, err := b.DecodeRawBytes(true)
  775. m.Agent = &RestoreAgentRequest_AgentContent{x}
  776. return true, err
  777. default:
  778. return false, nil
  779. }
  780. }
  781. func _RestoreAgentRequest_OneofSizer(msg proto.Message) (n int) {
  782. m := msg.(*RestoreAgentRequest)
  783. // agent
  784. switch x := m.Agent.(type) {
  785. case *RestoreAgentRequest_AgentUri:
  786. n += 1 // tag and wire
  787. n += proto.SizeVarint(uint64(len(x.AgentUri)))
  788. n += len(x.AgentUri)
  789. case *RestoreAgentRequest_AgentContent:
  790. n += 1 // tag and wire
  791. n += proto.SizeVarint(uint64(len(x.AgentContent)))
  792. n += len(x.AgentContent)
  793. case nil:
  794. default:
  795. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  796. }
  797. return n
  798. }
  799. func init() {
  800. proto.RegisterType((*Agent)(nil), "google.cloud.dialogflow.v2.Agent")
  801. proto.RegisterType((*GetAgentRequest)(nil), "google.cloud.dialogflow.v2.GetAgentRequest")
  802. proto.RegisterType((*SearchAgentsRequest)(nil), "google.cloud.dialogflow.v2.SearchAgentsRequest")
  803. proto.RegisterType((*SearchAgentsResponse)(nil), "google.cloud.dialogflow.v2.SearchAgentsResponse")
  804. proto.RegisterType((*TrainAgentRequest)(nil), "google.cloud.dialogflow.v2.TrainAgentRequest")
  805. proto.RegisterType((*ExportAgentRequest)(nil), "google.cloud.dialogflow.v2.ExportAgentRequest")
  806. proto.RegisterType((*ExportAgentResponse)(nil), "google.cloud.dialogflow.v2.ExportAgentResponse")
  807. proto.RegisterType((*ImportAgentRequest)(nil), "google.cloud.dialogflow.v2.ImportAgentRequest")
  808. proto.RegisterType((*RestoreAgentRequest)(nil), "google.cloud.dialogflow.v2.RestoreAgentRequest")
  809. proto.RegisterEnum("google.cloud.dialogflow.v2.Agent_MatchMode", Agent_MatchMode_name, Agent_MatchMode_value)
  810. }
  811. // Reference imports to suppress errors if they are not otherwise used.
  812. var _ context.Context
  813. var _ grpc.ClientConn
  814. // This is a compile-time assertion to ensure that this generated file
  815. // is compatible with the grpc package it is being compiled against.
  816. const _ = grpc.SupportPackageIsVersion4
  817. // AgentsClient is the client API for Agents service.
  818. //
  819. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  820. type AgentsClient interface {
  821. // Retrieves the specified agent.
  822. GetAgent(ctx context.Context, in *GetAgentRequest, opts ...grpc.CallOption) (*Agent, error)
  823. // Returns the list of agents.
  824. //
  825. // Since there is at most one conversational agent per project, this method is
  826. // useful primarily for listing all agents across projects the caller has
  827. // access to. One can achieve that with a wildcard project collection id "-".
  828. // Refer to [List
  829. // Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
  830. SearchAgents(ctx context.Context, in *SearchAgentsRequest, opts ...grpc.CallOption) (*SearchAgentsResponse, error)
  831. // Trains the specified agent.
  832. //
  833. // Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
  834. // metadata: [google.protobuf.Struct][google.protobuf.Struct]>
  835. TrainAgent(ctx context.Context, in *TrainAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
  836. // Exports the specified agent to a ZIP file.
  837. //
  838. // Operation <response:
  839. // [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse],
  840. // metadata: [google.protobuf.Struct][google.protobuf.Struct]>
  841. ExportAgent(ctx context.Context, in *ExportAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
  842. // Imports the specified agent from a ZIP file.
  843. //
  844. // Uploads new intents and entity types without deleting the existing ones.
  845. // Intents and entity types with the same name are replaced with the new
  846. // versions from ImportAgentRequest.
  847. //
  848. // Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
  849. // metadata: [google.protobuf.Struct][google.protobuf.Struct]>
  850. ImportAgent(ctx context.Context, in *ImportAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
  851. // Restores the specified agent from a ZIP file.
  852. //
  853. // Replaces the current agent version with a new one. All the intents and
  854. // entity types in the older version are deleted.
  855. //
  856. // Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
  857. // metadata: [google.protobuf.Struct][google.protobuf.Struct]>
  858. RestoreAgent(ctx context.Context, in *RestoreAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
  859. }
  860. type agentsClient struct {
  861. cc *grpc.ClientConn
  862. }
  863. func NewAgentsClient(cc *grpc.ClientConn) AgentsClient {
  864. return &agentsClient{cc}
  865. }
  866. func (c *agentsClient) GetAgent(ctx context.Context, in *GetAgentRequest, opts ...grpc.CallOption) (*Agent, error) {
  867. out := new(Agent)
  868. err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Agents/GetAgent", in, out, opts...)
  869. if err != nil {
  870. return nil, err
  871. }
  872. return out, nil
  873. }
  874. func (c *agentsClient) SearchAgents(ctx context.Context, in *SearchAgentsRequest, opts ...grpc.CallOption) (*SearchAgentsResponse, error) {
  875. out := new(SearchAgentsResponse)
  876. err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Agents/SearchAgents", in, out, opts...)
  877. if err != nil {
  878. return nil, err
  879. }
  880. return out, nil
  881. }
  882. func (c *agentsClient) TrainAgent(ctx context.Context, in *TrainAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
  883. out := new(longrunning.Operation)
  884. err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Agents/TrainAgent", in, out, opts...)
  885. if err != nil {
  886. return nil, err
  887. }
  888. return out, nil
  889. }
  890. func (c *agentsClient) ExportAgent(ctx context.Context, in *ExportAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
  891. out := new(longrunning.Operation)
  892. err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Agents/ExportAgent", in, out, opts...)
  893. if err != nil {
  894. return nil, err
  895. }
  896. return out, nil
  897. }
  898. func (c *agentsClient) ImportAgent(ctx context.Context, in *ImportAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
  899. out := new(longrunning.Operation)
  900. err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Agents/ImportAgent", in, out, opts...)
  901. if err != nil {
  902. return nil, err
  903. }
  904. return out, nil
  905. }
  906. func (c *agentsClient) RestoreAgent(ctx context.Context, in *RestoreAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
  907. out := new(longrunning.Operation)
  908. err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Agents/RestoreAgent", in, out, opts...)
  909. if err != nil {
  910. return nil, err
  911. }
  912. return out, nil
  913. }
  914. // AgentsServer is the server API for Agents service.
  915. type AgentsServer interface {
  916. // Retrieves the specified agent.
  917. GetAgent(context.Context, *GetAgentRequest) (*Agent, error)
  918. // Returns the list of agents.
  919. //
  920. // Since there is at most one conversational agent per project, this method is
  921. // useful primarily for listing all agents across projects the caller has
  922. // access to. One can achieve that with a wildcard project collection id "-".
  923. // Refer to [List
  924. // Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
  925. SearchAgents(context.Context, *SearchAgentsRequest) (*SearchAgentsResponse, error)
  926. // Trains the specified agent.
  927. //
  928. // Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
  929. // metadata: [google.protobuf.Struct][google.protobuf.Struct]>
  930. TrainAgent(context.Context, *TrainAgentRequest) (*longrunning.Operation, error)
  931. // Exports the specified agent to a ZIP file.
  932. //
  933. // Operation <response:
  934. // [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse],
  935. // metadata: [google.protobuf.Struct][google.protobuf.Struct]>
  936. ExportAgent(context.Context, *ExportAgentRequest) (*longrunning.Operation, error)
  937. // Imports the specified agent from a ZIP file.
  938. //
  939. // Uploads new intents and entity types without deleting the existing ones.
  940. // Intents and entity types with the same name are replaced with the new
  941. // versions from ImportAgentRequest.
  942. //
  943. // Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
  944. // metadata: [google.protobuf.Struct][google.protobuf.Struct]>
  945. ImportAgent(context.Context, *ImportAgentRequest) (*longrunning.Operation, error)
  946. // Restores the specified agent from a ZIP file.
  947. //
  948. // Replaces the current agent version with a new one. All the intents and
  949. // entity types in the older version are deleted.
  950. //
  951. // Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
  952. // metadata: [google.protobuf.Struct][google.protobuf.Struct]>
  953. RestoreAgent(context.Context, *RestoreAgentRequest) (*longrunning.Operation, error)
  954. }
  955. func RegisterAgentsServer(s *grpc.Server, srv AgentsServer) {
  956. s.RegisterService(&_Agents_serviceDesc, srv)
  957. }
  958. func _Agents_GetAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  959. in := new(GetAgentRequest)
  960. if err := dec(in); err != nil {
  961. return nil, err
  962. }
  963. if interceptor == nil {
  964. return srv.(AgentsServer).GetAgent(ctx, in)
  965. }
  966. info := &grpc.UnaryServerInfo{
  967. Server: srv,
  968. FullMethod: "/google.cloud.dialogflow.v2.Agents/GetAgent",
  969. }
  970. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  971. return srv.(AgentsServer).GetAgent(ctx, req.(*GetAgentRequest))
  972. }
  973. return interceptor(ctx, in, info, handler)
  974. }
  975. func _Agents_SearchAgents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  976. in := new(SearchAgentsRequest)
  977. if err := dec(in); err != nil {
  978. return nil, err
  979. }
  980. if interceptor == nil {
  981. return srv.(AgentsServer).SearchAgents(ctx, in)
  982. }
  983. info := &grpc.UnaryServerInfo{
  984. Server: srv,
  985. FullMethod: "/google.cloud.dialogflow.v2.Agents/SearchAgents",
  986. }
  987. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  988. return srv.(AgentsServer).SearchAgents(ctx, req.(*SearchAgentsRequest))
  989. }
  990. return interceptor(ctx, in, info, handler)
  991. }
  992. func _Agents_TrainAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  993. in := new(TrainAgentRequest)
  994. if err := dec(in); err != nil {
  995. return nil, err
  996. }
  997. if interceptor == nil {
  998. return srv.(AgentsServer).TrainAgent(ctx, in)
  999. }
  1000. info := &grpc.UnaryServerInfo{
  1001. Server: srv,
  1002. FullMethod: "/google.cloud.dialogflow.v2.Agents/TrainAgent",
  1003. }
  1004. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1005. return srv.(AgentsServer).TrainAgent(ctx, req.(*TrainAgentRequest))
  1006. }
  1007. return interceptor(ctx, in, info, handler)
  1008. }
  1009. func _Agents_ExportAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1010. in := new(ExportAgentRequest)
  1011. if err := dec(in); err != nil {
  1012. return nil, err
  1013. }
  1014. if interceptor == nil {
  1015. return srv.(AgentsServer).ExportAgent(ctx, in)
  1016. }
  1017. info := &grpc.UnaryServerInfo{
  1018. Server: srv,
  1019. FullMethod: "/google.cloud.dialogflow.v2.Agents/ExportAgent",
  1020. }
  1021. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1022. return srv.(AgentsServer).ExportAgent(ctx, req.(*ExportAgentRequest))
  1023. }
  1024. return interceptor(ctx, in, info, handler)
  1025. }
  1026. func _Agents_ImportAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1027. in := new(ImportAgentRequest)
  1028. if err := dec(in); err != nil {
  1029. return nil, err
  1030. }
  1031. if interceptor == nil {
  1032. return srv.(AgentsServer).ImportAgent(ctx, in)
  1033. }
  1034. info := &grpc.UnaryServerInfo{
  1035. Server: srv,
  1036. FullMethod: "/google.cloud.dialogflow.v2.Agents/ImportAgent",
  1037. }
  1038. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1039. return srv.(AgentsServer).ImportAgent(ctx, req.(*ImportAgentRequest))
  1040. }
  1041. return interceptor(ctx, in, info, handler)
  1042. }
  1043. func _Agents_RestoreAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1044. in := new(RestoreAgentRequest)
  1045. if err := dec(in); err != nil {
  1046. return nil, err
  1047. }
  1048. if interceptor == nil {
  1049. return srv.(AgentsServer).RestoreAgent(ctx, in)
  1050. }
  1051. info := &grpc.UnaryServerInfo{
  1052. Server: srv,
  1053. FullMethod: "/google.cloud.dialogflow.v2.Agents/RestoreAgent",
  1054. }
  1055. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1056. return srv.(AgentsServer).RestoreAgent(ctx, req.(*RestoreAgentRequest))
  1057. }
  1058. return interceptor(ctx, in, info, handler)
  1059. }
  1060. var _Agents_serviceDesc = grpc.ServiceDesc{
  1061. ServiceName: "google.cloud.dialogflow.v2.Agents",
  1062. HandlerType: (*AgentsServer)(nil),
  1063. Methods: []grpc.MethodDesc{
  1064. {
  1065. MethodName: "GetAgent",
  1066. Handler: _Agents_GetAgent_Handler,
  1067. },
  1068. {
  1069. MethodName: "SearchAgents",
  1070. Handler: _Agents_SearchAgents_Handler,
  1071. },
  1072. {
  1073. MethodName: "TrainAgent",
  1074. Handler: _Agents_TrainAgent_Handler,
  1075. },
  1076. {
  1077. MethodName: "ExportAgent",
  1078. Handler: _Agents_ExportAgent_Handler,
  1079. },
  1080. {
  1081. MethodName: "ImportAgent",
  1082. Handler: _Agents_ImportAgent_Handler,
  1083. },
  1084. {
  1085. MethodName: "RestoreAgent",
  1086. Handler: _Agents_RestoreAgent_Handler,
  1087. },
  1088. },
  1089. Streams: []grpc.StreamDesc{},
  1090. Metadata: "google/cloud/dialogflow/v2/agent.proto",
  1091. }
  1092. func init() {
  1093. proto.RegisterFile("google/cloud/dialogflow/v2/agent.proto", fileDescriptor_agent_b37bcb085950ef88)
  1094. }
  1095. var fileDescriptor_agent_b37bcb085950ef88 = []byte{
  1096. // 965 bytes of a gzipped FileDescriptorProto
  1097. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x41, 0x6f, 0xdc, 0x44,
  1098. 0x14, 0xae, 0x37, 0xcd, 0x76, 0xf7, 0x25, 0x69, 0xd3, 0x09, 0x0d, 0xd6, 0xb6, 0x81, 0xad, 0x4b,
  1099. 0xa2, 0x6d, 0x0a, 0x76, 0xb5, 0x5c, 0x20, 0x88, 0x43, 0x93, 0x4d, 0x9b, 0xa0, 0x6c, 0x12, 0x39,
  1100. 0x49, 0xa5, 0xf6, 0x62, 0x4d, 0xec, 0x59, 0x67, 0xa8, 0x3d, 0x63, 0x3c, 0xb3, 0xa1, 0x49, 0xe1,
  1101. 0x00, 0x47, 0x24, 0x24, 0x24, 0xb8, 0x70, 0x42, 0xe2, 0xc8, 0xdf, 0xe1, 0x2f, 0x70, 0xe6, 0xcc,
  1102. 0x11, 0xcd, 0xd8, 0x9b, 0xf5, 0x26, 0xa9, 0x37, 0x07, 0x24, 0x6e, 0xf6, 0xfb, 0xbe, 0xf7, 0xde,
  1103. 0x37, 0x33, 0xdf, 0xd3, 0x0c, 0x2c, 0x85, 0x9c, 0x87, 0x11, 0x71, 0xfc, 0x88, 0xf7, 0x03, 0x27,
  1104. 0xa0, 0x38, 0xe2, 0x61, 0x2f, 0xe2, 0x5f, 0x3b, 0xc7, 0x6d, 0x07, 0x87, 0x84, 0x49, 0x3b, 0x49,
  1105. 0xb9, 0xe4, 0xa8, 0x91, 0xf1, 0x6c, 0xcd, 0xb3, 0x87, 0x3c, 0xfb, 0xb8, 0xdd, 0xb8, 0x97, 0xd7,
  1106. 0xc0, 0x09, 0x75, 0x30, 0x63, 0x5c, 0x62, 0x49, 0x39, 0x13, 0x59, 0x66, 0xe3, 0x41, 0x8e, 0x46,
  1107. 0x9c, 0x85, 0x69, 0x9f, 0x31, 0xca, 0x42, 0x87, 0x27, 0x24, 0x1d, 0x21, 0xdd, 0xcd, 0x49, 0xfa,
  1108. 0xef, 0xb0, 0xdf, 0x73, 0x48, 0x9c, 0xc8, 0x93, 0x1c, 0x6c, 0x9e, 0x07, 0x7b, 0x94, 0x44, 0x81,
  1109. 0x17, 0x63, 0xf1, 0x2a, 0x67, 0xdc, 0x3b, 0xcf, 0x10, 0x32, 0xed, 0xfb, 0xb9, 0x76, 0xeb, 0x97,
  1110. 0xeb, 0x30, 0xf9, 0x44, 0xad, 0x05, 0xcd, 0x43, 0x35, 0xc1, 0x29, 0x61, 0xd2, 0x34, 0x9a, 0x46,
  1111. 0xab, 0xee, 0xe6, 0x7f, 0xe8, 0x3e, 0x4c, 0x07, 0x54, 0x24, 0x11, 0x3e, 0xf1, 0x18, 0x8e, 0x89,
  1112. 0x59, 0xd1, 0xe8, 0x54, 0x1e, 0xdb, 0xc6, 0x31, 0x41, 0x6d, 0xb8, 0x13, 0x90, 0x1e, 0xee, 0x47,
  1113. 0xd2, 0x8b, 0x30, 0x0b, 0xfb, 0x38, 0x24, 0x9e, 0xcf, 0x03, 0x62, 0x4e, 0x68, 0xee, 0x5c, 0x0e,
  1114. 0x6e, 0xe5, 0xd8, 0x1a, 0x0f, 0x08, 0xfa, 0x04, 0x4c, 0xd1, 0x4f, 0x12, 0x9e, 0x4a, 0x12, 0x8c,
  1115. 0x66, 0x09, 0xf3, 0x7a, 0x73, 0xa2, 0x55, 0x77, 0xe7, 0xcf, 0xf0, 0x62, 0xa2, 0x40, 0x77, 0xa1,
  1116. 0x2e, 0x69, 0x4c, 0xbc, 0x53, 0xce, 0x88, 0x39, 0xa9, 0x3b, 0xd4, 0x54, 0xe0, 0x25, 0x67, 0x04,
  1117. 0x35, 0x61, 0x2a, 0x20, 0xc2, 0x4f, 0x69, 0xa2, 0xb6, 0xd0, 0xac, 0xe6, 0x62, 0x87, 0x21, 0xb4,
  1118. 0x00, 0x80, 0x8f, 0xb1, 0xc4, 0xa9, 0xd7, 0x4f, 0xa9, 0x79, 0x43, 0x13, 0xea, 0x59, 0xe4, 0x20,
  1119. 0xa5, 0x68, 0x11, 0x6e, 0x12, 0x86, 0x0f, 0x23, 0xe2, 0x45, 0x3c, 0x0c, 0x29, 0x0b, 0xcd, 0x5a,
  1120. 0xd3, 0x68, 0xd5, 0xdc, 0x99, 0x2c, 0xba, 0x95, 0x05, 0xd1, 0x17, 0x00, 0x31, 0x96, 0xfe, 0x91,
  1121. 0x17, 0xab, 0x75, 0xd6, 0x9b, 0x46, 0xeb, 0x66, 0xfb, 0x91, 0xfd, 0x76, 0x23, 0xd8, 0x7a, 0x93,
  1122. 0xed, 0xae, 0xca, 0xe9, 0xf2, 0x80, 0xb8, 0xf5, 0x78, 0xf0, 0x89, 0x3e, 0x05, 0xd3, 0x8f, 0xb0,
  1123. 0x10, 0xb4, 0x47, 0x7d, 0x7d, 0xf2, 0x9e, 0x3c, 0x4a, 0x89, 0x38, 0xe2, 0x51, 0x60, 0x42, 0xd3,
  1124. 0x68, 0x55, 0xdc, 0x77, 0x47, 0xf1, 0xfd, 0x01, 0x6c, 0x3d, 0x87, 0xfa, 0x59, 0x49, 0xd4, 0x80,
  1125. 0xf9, 0xee, 0x93, 0xfd, 0xb5, 0x0d, 0xaf, 0xbb, 0xd3, 0x59, 0xf7, 0x0e, 0xb6, 0xf7, 0x76, 0xd7,
  1126. 0xd7, 0x36, 0x9f, 0x6e, 0xae, 0x77, 0x66, 0xaf, 0xa1, 0x3b, 0x70, 0xbb, 0x80, 0x6d, 0xbc, 0x58,
  1127. 0x75, 0x37, 0x3b, 0xb3, 0x06, 0x9a, 0x07, 0x54, 0x08, 0x77, 0xb7, 0xbc, 0x9d, 0xed, 0xad, 0x17,
  1128. 0xb3, 0x15, 0xeb, 0x21, 0xdc, 0x7a, 0x46, 0xa4, 0xd6, 0xec, 0x92, 0xaf, 0xfa, 0x44, 0xbc, 0xd5,
  1129. 0x1f, 0x16, 0x85, 0xb9, 0x3d, 0x82, 0x53, 0xff, 0x48, 0xb3, 0xc5, 0x18, 0xba, 0x3a, 0xbd, 0x44,
  1130. 0x9d, 0xb4, 0xa0, 0xa7, 0x99, 0x97, 0x26, 0xdd, 0x9a, 0x0a, 0xec, 0xd1, 0x53, 0xa2, 0xce, 0x46,
  1131. 0x83, 0x92, 0xbf, 0x22, 0x2c, 0x77, 0x8f, 0xa6, 0xef, 0xab, 0x80, 0x75, 0x02, 0xef, 0x8c, 0xb6,
  1132. 0x12, 0x09, 0x67, 0x42, 0x6d, 0x60, 0x55, 0xcf, 0xa3, 0x30, 0x8d, 0xe6, 0x44, 0x6b, 0xaa, 0x7d,
  1133. 0x7f, 0xec, 0x41, 0xb8, 0x79, 0x02, 0x5a, 0x82, 0x5b, 0x8c, 0xbc, 0x96, 0x5e, 0xa1, 0x6d, 0x66,
  1134. 0xf0, 0x19, 0x15, 0xde, 0x3d, 0x6b, 0xfd, 0x08, 0x6e, 0xef, 0xa7, 0x98, 0xb2, 0x2b, 0x6d, 0xc9,
  1135. 0x26, 0xa0, 0xf5, 0xd7, 0xca, 0xba, 0x57, 0x61, 0xab, 0x1d, 0xd1, 0x62, 0xb4, 0x1f, 0xb3, 0xe6,
  1136. 0x35, 0x1d, 0x38, 0x48, 0xa9, 0x15, 0xc0, 0xdc, 0x48, 0xa9, 0x7c, 0xc5, 0x0b, 0xc5, 0x1c, 0x5d,
  1137. 0x6e, 0xe3, 0xda, 0x30, 0x0b, 0x2d, 0xc2, 0x4c, 0x06, 0xfb, 0x9c, 0x49, 0xd5, 0x51, 0x95, 0x9d,
  1138. 0xde, 0xb8, 0xe6, 0x4e, 0xeb, 0xf0, 0x5a, 0x16, 0x5d, 0xbd, 0x01, 0x93, 0xfa, 0xdf, 0x7a, 0x03,
  1139. 0x68, 0x33, 0xbe, 0xb2, 0xe0, 0x85, 0x0b, 0x82, 0xcb, 0x9b, 0x4f, 0x94, 0x37, 0xff, 0x06, 0xe6,
  1140. 0x5c, 0x22, 0x24, 0x4f, 0xc9, 0xff, 0xd0, 0xbd, 0xfd, 0x77, 0x15, 0xaa, 0x99, 0x9d, 0xd0, 0x77,
  1141. 0x06, 0xd4, 0x06, 0xae, 0x47, 0xa5, 0xc3, 0x7c, 0x6e, 0x36, 0x1a, 0xe3, 0x0d, 0x67, 0x2d, 0x7e,
  1142. 0xff, 0xe7, 0x5f, 0x3f, 0x57, 0xde, 0x47, 0x0b, 0xea, 0xf6, 0x78, 0x93, 0xad, 0xe5, 0xf3, 0x24,
  1143. 0xe5, 0x5f, 0x12, 0x5f, 0x0a, 0x67, 0xf9, 0xdb, 0xec, 0x46, 0x41, 0xbf, 0x19, 0x30, 0x5d, 0xf4,
  1144. 0x38, 0x72, 0xca, 0x4a, 0x5f, 0x32, 0x78, 0x8d, 0xc7, 0x57, 0x4f, 0xc8, 0xcc, 0x64, 0x7d, 0xa8,
  1145. 0xa5, 0x2d, 0xa1, 0x0f, 0x4a, 0xa5, 0xad, 0x08, 0x9d, 0x8b, 0x7e, 0x30, 0x00, 0x86, 0xa3, 0x80,
  1146. 0x3e, 0x2a, 0x6b, 0x77, 0x61, 0x64, 0x1a, 0x0b, 0x03, 0x7a, 0xe1, 0xca, 0xb3, 0x77, 0x06, 0x57,
  1147. 0x9e, 0x65, 0x6b, 0x29, 0x2d, 0xeb, 0x41, 0xb9, 0x14, 0xa9, 0xea, 0xae, 0x18, 0xcb, 0xe8, 0x47,
  1148. 0x03, 0xa6, 0x0a, 0xf3, 0x81, 0xec, 0x32, 0x35, 0x17, 0x67, 0x72, 0x9c, 0x1c, 0x47, 0xcb, 0x79,
  1149. 0x68, 0x8d, 0xd9, 0x19, 0xa2, 0x0b, 0x0f, 0xf4, 0x14, 0x26, 0xa9, 0x5c, 0xcf, 0xc5, 0x91, 0xfb,
  1150. 0x8f, 0xf4, 0xd0, 0x78, 0xa0, 0xe7, 0x27, 0x03, 0xa6, 0x8b, 0xc3, 0x55, 0x6e, 0xa7, 0x4b, 0xc6,
  1151. 0x70, 0x9c, 0xa2, 0xc7, 0x5a, 0xd1, 0xb2, 0xb5, 0x58, 0xae, 0x28, 0xcd, 0x2a, 0xaf, 0x18, 0xcb,
  1152. 0xab, 0xbf, 0x1a, 0xf0, 0x9e, 0xcf, 0xe3, 0x12, 0x1d, 0xab, 0xa0, 0x15, 0xec, 0xaa, 0x07, 0xca,
  1153. 0xae, 0xf1, 0xb2, 0x93, 0x33, 0x43, 0xae, 0x9e, 0x09, 0x36, 0x4f, 0x43, 0x27, 0x24, 0x4c, 0x3f,
  1154. 0x5f, 0x9c, 0x0c, 0xc2, 0x09, 0x15, 0x97, 0xbd, 0xd2, 0x3e, 0x1b, 0xfe, 0xfd, 0x63, 0x18, 0xbf,
  1155. 0x57, 0x2a, 0x9d, 0xa7, 0x7f, 0x54, 0x1a, 0xcf, 0xb2, 0x72, 0x6b, 0xba, 0x71, 0x67, 0xd8, 0xf8,
  1156. 0x79, 0xfb, 0xb0, 0xaa, 0xab, 0x7e, 0xfc, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0x9d, 0x2a,
  1157. 0xd4, 0xfa, 0x09, 0x00, 0x00,
  1158. }