Dialogflow API v3beta1 - Package cloud.google.com/go/dialogflow/cx/apiv3beta1 (v0.75.0)

Package cx is an auto-generated package for the Dialogflow API.

Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices).

Use of Context

The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

For information about setting deadlines, reusing contexts, and more please visit pkg.go.dev/cloud.google.com/go.

Functions

func DefaultAuthScopes

  func 
  
 DefaultAuthScopes 
 () 
  
 [] 
  string 
 
 

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

AgentIterator

  type 
  
 AgentIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  Agent 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

AgentIterator manages a stream of *cxpb.Agent.

func (*AgentIterator) Next

  func 
  
 ( 
 it 
  
 * 
  AgentIterator 
 
 ) 
  
 Next 
 () 
  
 ( 
 * 
  cxpb 
 
 . 
  Agent 
 
 , 
  
  error 
 
 ) 
 

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AgentIterator) PageInfo

  func 
  
 ( 
 it 
  
 * 
  AgentIterator 
 
 ) 
  
 PageInfo 
 () 
  
 * 
  iterator 
 
 . 
  PageInfo 
 
 

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

AgentsCallOptions

  type 
  
 AgentsCallOptions 
  
 struct 
  
 { 
  
 ListAgents 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetAgent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 CreateAgent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateAgent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteAgent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 ExportAgent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 RestoreAgent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

AgentsCallOptions contains the retry settings for each method of AgentsClient.

AgentsClient

  type 
  
 AgentsClient 
  
 struct 
  
 { 
  
 // LROClient is used internally to handle longrunning operations. 
  
 // It is exposed so that its CallOptions can be modified if required. 
  
 // Users should not Close this client. 
  
 LROClient 
  
 * 
  lroauto 
 
 . 
  OperationsClient 
 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  AgentsCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

AgentsClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewAgentsClient

  func 
  
 NewAgentsClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  AgentsClient 
 
 , 
  
  error 
 
 ) 
 

NewAgentsClient creates a new agents client.

Service for managing Agents.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewAgentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*AgentsClient) Close

  func 
  
 ( 
 c 
  
 * 
  AgentsClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*AgentsClient) Connection

  func 
  
 ( 
 c 
  
 * 
  AgentsClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*AgentsClient) CreateAgent

CreateAgent creates an agent in the specified location.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewAgentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateAgentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateAgent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*AgentsClient) DeleteAgent

DeleteAgent deletes the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewAgentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteAgentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteAgent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*AgentsClient) ExportAgent

ExportAgent exports the specified agent to a binary file.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewAgentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ExportAgentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 op 
 , 
  
 err 
  
 := 
  
 c 
 . 
 ExportAgent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 op 
 . 
 Wait 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*AgentsClient) ExportAgentOperation

  func 
  
 ( 
 c 
  
 * 
  AgentsClient 
 
 ) 
  
 ExportAgentOperation 
 ( 
 name 
  
  string 
 
 ) 
  
 * 
  ExportAgentOperation 
 
 

ExportAgentOperation returns a new ExportAgentOperation from a given name. The name must be that of a previously created ExportAgentOperation, possibly from a different process.

func (*AgentsClient) GetAgent

GetAgent retrieves the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewAgentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetAgentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetAgent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*AgentsClient) ListAgents

ListAgents returns the list of all agents in the specified location.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewAgentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListAgentsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListAgents 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*AgentsClient) RestoreAgent

RestoreAgent restores the specified agent from a binary file.

Replaces the current agent with a new one. Note that all existing resources in agent (e.g. intents, entity types, flows) will be removed.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewAgentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  RestoreAgentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 op 
 , 
  
 err 
  
 := 
  
 c 
 . 
 RestoreAgent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 err 
  
 = 
  
 op 
 . 
 Wait 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*AgentsClient) RestoreAgentOperation

  func 
  
 ( 
 c 
  
 * 
  AgentsClient 
 
 ) 
  
 RestoreAgentOperation 
 ( 
 name 
  
  string 
 
 ) 
  
 * 
  RestoreAgentOperation 
 
 

RestoreAgentOperation returns a new RestoreAgentOperation from a given name. The name must be that of a previously created RestoreAgentOperation, possibly from a different process.

func (*AgentsClient) UpdateAgent

UpdateAgent updates the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewAgentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateAgentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateAgent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

CreateEnvironmentOperation

  type 
  
 CreateEnvironmentOperation 
  
 struct 
  
 { 
  
 // contains filtered or unexported fields 
 } 
 

CreateEnvironmentOperation manages a long-running operation from CreateEnvironment.

func (*CreateEnvironmentOperation) Done

Done reports whether the long-running operation has completed.

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*CreateEnvironmentOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateEnvironmentOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateEnvironmentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateVersionOperation

  type 
  
 CreateVersionOperation 
  
 struct 
  
 { 
  
 // contains filtered or unexported fields 
 } 
 

CreateVersionOperation manages a long-running operation from CreateVersion.

func (*CreateVersionOperation) Done

  func 
  
 ( 
 op 
  
 * 
  CreateVersionOperation 
 
 ) 
  
 Done 
 () 
  
  bool 
 
 

Done reports whether the long-running operation has completed.

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*CreateVersionOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateVersionOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

EntityTypeIterator

  type 
  
 EntityTypeIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  EntityType 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

EntityTypeIterator manages a stream of *cxpb.EntityType.

func (*EntityTypeIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*EntityTypeIterator) PageInfo

  func 
  
 ( 
 it 
  
 * 
  EntityTypeIterator 
 
 ) 
  
 PageInfo 
 () 
  
 * 
  iterator 
 
 . 
  PageInfo 
 
 

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

EntityTypesCallOptions

  type 
  
 EntityTypesCallOptions 
  
 struct 
  
 { 
  
 ListEntityTypes 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetEntityType 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 CreateEntityType 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateEntityType 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteEntityType 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

EntityTypesCallOptions contains the retry settings for each method of EntityTypesClient.

EntityTypesClient

  type 
  
 EntityTypesClient 
  
 struct 
  
 { 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  EntityTypesCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

EntityTypesClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewEntityTypesClient

  func 
  
 NewEntityTypesClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  EntityTypesClient 
 
 , 
  
  error 
 
 ) 
 

NewEntityTypesClient creates a new entity types client.

Service for managing EntityTypes.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*EntityTypesClient) Close

  func 
  
 ( 
 c 
  
 * 
  EntityTypesClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*EntityTypesClient) Connection

  func 
  
 ( 
 c 
  
 * 
  EntityTypesClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*EntityTypesClient) CreateEntityType

CreateEntityType creates an entity type in the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateEntityTypeRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateEntityType 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*EntityTypesClient) DeleteEntityType

DeleteEntityType deletes the specified entity type.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteEntityTypeRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteEntityType 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*EntityTypesClient) GetEntityType

GetEntityType retrieves the specified entity type.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetEntityTypeRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetEntityType 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*EntityTypesClient) ListEntityTypes

ListEntityTypes returns the list of all entity types in the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListEntityTypesRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListEntityTypes 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*EntityTypesClient) UpdateEntityType

UpdateEntityType updates the specified entity type.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateEntityTypeRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateEntityType 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

EnvironmentIterator

  type 
  
 EnvironmentIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  Environment 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

EnvironmentIterator manages a stream of *cxpb.Environment.

func (*EnvironmentIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*EnvironmentIterator) PageInfo

  func 
  
 ( 
 it 
  
 * 
  EnvironmentIterator 
 
 ) 
  
 PageInfo 
 () 
  
 * 
  iterator 
 
 . 
  PageInfo 
 
 

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

EnvironmentsCallOptions

  type 
  
 EnvironmentsCallOptions 
  
 struct 
  
 { 
  
 ListEnvironments 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetEnvironment 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 CreateEnvironment 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateEnvironment 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteEnvironment 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 LookupEnvironmentHistory 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

EnvironmentsCallOptions contains the retry settings for each method of EnvironmentsClient.

EnvironmentsClient

  type 
  
 EnvironmentsClient 
  
 struct 
  
 { 
  
 // LROClient is used internally to handle longrunning operations. 
  
 // It is exposed so that its CallOptions can be modified if required. 
  
 // Users should not Close this client. 
  
 LROClient 
  
 * 
  lroauto 
 
 . 
  OperationsClient 
 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  EnvironmentsCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

EnvironmentsClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewEnvironmentsClient

  func 
  
 NewEnvironmentsClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  EnvironmentsClient 
 
 , 
  
  error 
 
 ) 
 

NewEnvironmentsClient creates a new environments client.

Service for managing Environments.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEnvironmentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*EnvironmentsClient) Close

  func 
  
 ( 
 c 
  
 * 
  EnvironmentsClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*EnvironmentsClient) Connection

  func 
  
 ( 
 c 
  
 * 
  EnvironmentsClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*EnvironmentsClient) CreateEnvironment

CreateEnvironment creates an Environment in the specified Agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEnvironmentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateEnvironmentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 op 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateEnvironment 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 op 
 . 
 Wait 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*EnvironmentsClient) CreateEnvironmentOperation

  func 
  
 ( 
 c 
  
 * 
  EnvironmentsClient 
 
 ) 
  
 CreateEnvironmentOperation 
 ( 
 name 
  
  string 
 
 ) 
  
 * 
  CreateEnvironmentOperation 
 
 

CreateEnvironmentOperation returns a new CreateEnvironmentOperation from a given name. The name must be that of a previously created CreateEnvironmentOperation, possibly from a different process.

func (*EnvironmentsClient) DeleteEnvironment

DeleteEnvironment deletes the specified Environment.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEnvironmentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteEnvironmentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteEnvironment 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*EnvironmentsClient) GetEnvironment

GetEnvironment retrieves the specified Environment.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEnvironmentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetEnvironmentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetEnvironment 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*EnvironmentsClient) ListEnvironments

ListEnvironments returns the list of all environments in the specified Agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEnvironmentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListEnvironmentsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListEnvironments 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*EnvironmentsClient) LookupEnvironmentHistory

LookupEnvironmentHistory looks up the history of the specified Environment.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEnvironmentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  LookupEnvironmentHistoryRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 LookupEnvironmentHistory 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*EnvironmentsClient) UpdateEnvironment

UpdateEnvironment updates the specified Environment.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewEnvironmentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateEnvironmentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 op 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateEnvironment 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 op 
 . 
 Wait 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*EnvironmentsClient) UpdateEnvironmentOperation

  func 
  
 ( 
 c 
  
 * 
  EnvironmentsClient 
 
 ) 
  
 UpdateEnvironmentOperation 
 ( 
 name 
  
  string 
 
 ) 
  
 * 
  UpdateEnvironmentOperation 
 
 

UpdateEnvironmentOperation returns a new UpdateEnvironmentOperation from a given name. The name must be that of a previously created UpdateEnvironmentOperation, possibly from a different process.

ExperimentIterator

  type 
  
 ExperimentIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  Experiment 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

ExperimentIterator manages a stream of *cxpb.Experiment.

func (*ExperimentIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ExperimentIterator) PageInfo

  func 
  
 ( 
 it 
  
 * 
  ExperimentIterator 
 
 ) 
  
 PageInfo 
 () 
  
 * 
  iterator 
 
 . 
  PageInfo 
 
 

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ExperimentsCallOptions

  type 
  
 ExperimentsCallOptions 
  
 struct 
  
 { 
  
 ListExperiments 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetExperiment 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 CreateExperiment 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateExperiment 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteExperiment 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 StartExperiment 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 StopExperiment 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

ExperimentsCallOptions contains the retry settings for each method of ExperimentsClient.

ExperimentsClient

  type 
  
 ExperimentsClient 
  
 struct 
  
 { 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  ExperimentsCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

ExperimentsClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewExperimentsClient

  func 
  
 NewExperimentsClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  ExperimentsClient 
 
 , 
  
  error 
 
 ) 
 

NewExperimentsClient creates a new experiments client.

Service for managing Experiments.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewExperimentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*ExperimentsClient) Close

  func 
  
 ( 
 c 
  
 * 
  ExperimentsClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ExperimentsClient) Connection

  func 
  
 ( 
 c 
  
 * 
  ExperimentsClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*ExperimentsClient) CreateExperiment

CreateExperiment creates an Experiment in the specified Environment.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewExperimentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateExperimentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateExperiment 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*ExperimentsClient) DeleteExperiment

DeleteExperiment deletes the specified Experiment.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewExperimentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteExperimentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteExperiment 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*ExperimentsClient) GetExperiment

GetExperiment retrieves the specified Experiment.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewExperimentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetExperimentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetExperiment 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*ExperimentsClient) ListExperiments

ListExperiments returns the list of all experiments in the specified Environment.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewExperimentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListExperimentsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListExperiments 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*ExperimentsClient) StartExperiment

StartExperiment starts the specified Experiment. This rpc only changes the state of experiment from PENDING to RUNNING.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewExperimentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  StartExperimentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 StartExperiment 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*ExperimentsClient) StopExperiment

StopExperiment stops the specified Experiment. This rpc only changes the state of experiment from RUNNING to DONE.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewExperimentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  StopExperimentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 StopExperiment 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*ExperimentsClient) UpdateExperiment

UpdateExperiment updates the specified Experiment.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewExperimentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateExperimentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateExperiment 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

ExportAgentOperation

  type 
  
 ExportAgentOperation 
  
 struct 
  
 { 
  
 // contains filtered or unexported fields 
 } 
 

ExportAgentOperation manages a long-running operation from ExportAgent.

func (*ExportAgentOperation) Done

  func 
  
 ( 
 op 
  
 * 
  ExportAgentOperation 
 
 ) 
  
 Done 
 () 
  
  bool 
 
 

Done reports whether the long-running operation has completed.

  func 
  
 ( 
 op 
  
 * 
  ExportAgentOperation 
 
 ) 
  
 Metadata 
 () 
  
 ( 
 * 
  structpbpb 
 
 . 
  Struct 
 
 , 
  
  error 
 
 ) 
 

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ExportAgentOperation) Name

  func 
  
 ( 
 op 
  
 * 
  ExportAgentOperation 
 
 ) 
  
 Name 
 () 
  
  string 
 
 

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ExportAgentOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ExportAgentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

FlowIterator

  type 
  
 FlowIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  Flow 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

FlowIterator manages a stream of *cxpb.Flow.

func (*FlowIterator) Next

  func 
  
 ( 
 it 
  
 * 
  FlowIterator 
 
 ) 
  
 Next 
 () 
  
 ( 
 * 
  cxpb 
 
 . 
  Flow 
 
 , 
  
  error 
 
 ) 
 

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*FlowIterator) PageInfo

  func 
  
 ( 
 it 
  
 * 
  FlowIterator 
 
 ) 
  
 PageInfo 
 () 
  
 * 
  iterator 
 
 . 
  PageInfo 
 
 

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

FlowsCallOptions

  type 
  
 FlowsCallOptions 
  
 struct 
  
 { 
  
 CreateFlow 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteFlow 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 ListFlows 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetFlow 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateFlow 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 TrainFlow 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

FlowsCallOptions contains the retry settings for each method of FlowsClient.

FlowsClient

  type 
  
 FlowsClient 
  
 struct 
  
 { 
  
 // LROClient is used internally to handle longrunning operations. 
  
 // It is exposed so that its CallOptions can be modified if required. 
  
 // Users should not Close this client. 
  
 LROClient 
  
 * 
  lroauto 
 
 . 
  OperationsClient 
 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  FlowsCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

FlowsClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewFlowsClient

  func 
  
 NewFlowsClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  FlowsClient 
 
 , 
  
  error 
 
 ) 
 

NewFlowsClient creates a new flows client.

Service for managing Flows.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewFlowsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*FlowsClient) Close

  func 
  
 ( 
 c 
  
 * 
  FlowsClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*FlowsClient) Connection

  func 
  
 ( 
 c 
  
 * 
  FlowsClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*FlowsClient) CreateFlow

CreateFlow creates a flow in the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewFlowsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateFlowRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateFlow 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*FlowsClient) DeleteFlow

DeleteFlow deletes a specified flow.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewFlowsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteFlowRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteFlow 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*FlowsClient) GetFlow

GetFlow retrieves the specified flow.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewFlowsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetFlowRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetFlow 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*FlowsClient) ListFlows

ListFlows returns the list of all flows in the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewFlowsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListFlowsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListFlows 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*FlowsClient) TrainFlow

TrainFlow trains the specified flow. Note that only the flow in ‘draft’ environment is trained.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewFlowsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  TrainFlowRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 op 
 , 
  
 err 
  
 := 
  
 c 
 . 
 TrainFlow 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 err 
  
 = 
  
 op 
 . 
 Wait 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*FlowsClient) TrainFlowOperation

  func 
  
 ( 
 c 
  
 * 
  FlowsClient 
 
 ) 
  
 TrainFlowOperation 
 ( 
 name 
  
  string 
 
 ) 
  
 * 
  TrainFlowOperation 
 
 

TrainFlowOperation returns a new TrainFlowOperation from a given name. The name must be that of a previously created TrainFlowOperation, possibly from a different process.

func (*FlowsClient) UpdateFlow

UpdateFlow updates the specified flow.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewFlowsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateFlowRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateFlow 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

IntentIterator

  type 
  
 IntentIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  Intent 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

IntentIterator manages a stream of *cxpb.Intent.

func (*IntentIterator) Next

  func 
  
 ( 
 it 
  
 * 
  IntentIterator 
 
 ) 
  
 Next 
 () 
  
 ( 
 * 
  cxpb 
 
 . 
  Intent 
 
 , 
  
  error 
 
 ) 
 

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*IntentIterator) PageInfo

  func 
  
 ( 
 it 
  
 * 
  IntentIterator 
 
 ) 
  
 PageInfo 
 () 
  
 * 
  iterator 
 
 . 
  PageInfo 
 
 

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

IntentsCallOptions

  type 
  
 IntentsCallOptions 
  
 struct 
  
 { 
  
 ListIntents 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetIntent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 CreateIntent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateIntent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteIntent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

IntentsCallOptions contains the retry settings for each method of IntentsClient.

IntentsClient

  type 
  
 IntentsClient 
  
 struct 
  
 { 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  IntentsCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

IntentsClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewIntentsClient

  func 
  
 NewIntentsClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  IntentsClient 
 
 , 
  
  error 
 
 ) 
 

NewIntentsClient creates a new intents client.

Service for managing Intents.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewIntentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*IntentsClient) Close

  func 
  
 ( 
 c 
  
 * 
  IntentsClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*IntentsClient) Connection

  func 
  
 ( 
 c 
  
 * 
  IntentsClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*IntentsClient) CreateIntent

CreateIntent creates an intent in the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewIntentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateIntentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateIntent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*IntentsClient) DeleteIntent

DeleteIntent deletes the specified intent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewIntentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteIntentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteIntent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*IntentsClient) GetIntent

GetIntent retrieves the specified intent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewIntentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetIntentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetIntent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*IntentsClient) ListIntents

ListIntents returns the list of all intents in the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewIntentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListIntentsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListIntents 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*IntentsClient) UpdateIntent

UpdateIntent updates the specified intent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewIntentsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateIntentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateIntent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

LoadVersionOperation

  type 
  
 LoadVersionOperation 
  
 struct 
  
 { 
  
 // contains filtered or unexported fields 
 } 
 

LoadVersionOperation manages a long-running operation from LoadVersion.

func (*LoadVersionOperation) Done

  func 
  
 ( 
 op 
  
 * 
  LoadVersionOperation 
 
 ) 
  
 Done 
 () 
  
  bool 
 
 

Done reports whether the long-running operation has completed.

  func 
  
 ( 
 op 
  
 * 
  LoadVersionOperation 
 
 ) 
  
 Metadata 
 () 
  
 ( 
 * 
  structpbpb 
 
 . 
  Struct 
 
 , 
  
  error 
 
 ) 
 

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*LoadVersionOperation) Name

  func 
  
 ( 
 op 
  
 * 
  LoadVersionOperation 
 
 ) 
  
 Name 
 () 
  
  string 
 
 

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*LoadVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*LoadVersionOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

PageIterator

  type 
  
 PageIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  Page 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

PageIterator manages a stream of *cxpb.Page.

func (*PageIterator) Next

  func 
  
 ( 
 it 
  
 * 
  PageIterator 
 
 ) 
  
 Next 
 () 
  
 ( 
 * 
  cxpb 
 
 . 
  Page 
 
 , 
  
  error 
 
 ) 
 

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*PageIterator) PageInfo

  func 
  
 ( 
 it 
  
 * 
  PageIterator 
 
 ) 
  
 PageInfo 
 () 
  
 * 
  iterator 
 
 . 
  PageInfo 
 
 

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

PagesCallOptions

  type 
  
 PagesCallOptions 
  
 struct 
  
 { 
  
 ListPages 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetPage 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 CreatePage 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdatePage 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeletePage 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

PagesCallOptions contains the retry settings for each method of PagesClient.

PagesClient

  type 
  
 PagesClient 
  
 struct 
  
 { 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  PagesCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

PagesClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewPagesClient

  func 
  
 NewPagesClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  PagesClient 
 
 , 
  
  error 
 
 ) 
 

NewPagesClient creates a new pages client.

Service for managing [Pages][google.cloud.dialogflow.cx.v3beta1.Page (at http://google.cloud.dialogflow.cx.v3beta1.Page )].

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewPagesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*PagesClient) Close

  func 
  
 ( 
 c 
  
 * 
  PagesClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*PagesClient) Connection

  func 
  
 ( 
 c 
  
 * 
  PagesClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*PagesClient) CreatePage

CreatePage creates a page in the specified flow.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewPagesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreatePageRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreatePage 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*PagesClient) DeletePage

DeletePage deletes the specified page.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewPagesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeletePageRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeletePage 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*PagesClient) GetPage

GetPage retrieves the specified page.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewPagesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetPageRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetPage 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*PagesClient) ListPages

ListPages returns the list of all pages in the specified flow.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewPagesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListPagesRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListPages 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*PagesClient) UpdatePage

UpdatePage updates the specified page.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewPagesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdatePageRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdatePage 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

RestoreAgentOperation

  type 
  
 RestoreAgentOperation 
  
 struct 
  
 { 
  
 // contains filtered or unexported fields 
 } 
 

RestoreAgentOperation manages a long-running operation from RestoreAgent.

func (*RestoreAgentOperation) Done

  func 
  
 ( 
 op 
  
 * 
  RestoreAgentOperation 
 
 ) 
  
 Done 
 () 
  
  bool 
 
 

Done reports whether the long-running operation has completed.

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*RestoreAgentOperation) Name

  func 
  
 ( 
 op 
  
 * 
  RestoreAgentOperation 
 
 ) 
  
 Name 
 () 
  
  string 
 
 

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*RestoreAgentOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*RestoreAgentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

SecuritySettingsCallOptions

  type 
  
 SecuritySettingsCallOptions 
  
 struct 
  
 { 
  
 CreateSecuritySettings 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetSecuritySettings 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateSecuritySettings 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 ListSecuritySettings 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteSecuritySettings 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

SecuritySettingsCallOptions contains the retry settings for each method of SecuritySettingsClient.

SecuritySettingsClient

  type 
  
 SecuritySettingsClient 
  
 struct 
  
 { 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  SecuritySettingsCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

SecuritySettingsClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewSecuritySettingsClient

  func 
  
 NewSecuritySettingsClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  SecuritySettingsClient 
 
 , 
  
  error 
 
 ) 
 

NewSecuritySettingsClient creates a new security settings service client.

Service for managing security settings for Dialogflow.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
  NewSecuritySettingsClient 
 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*SecuritySettingsClient) Close

  func 
  
 ( 
 c 
  
 * 
  SecuritySettingsClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*SecuritySettingsClient) Connection

  func 
  
 ( 
 c 
  
 * 
  SecuritySettingsClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*SecuritySettingsClient) CreateSecuritySettings

CreateSecuritySettings create security settings in the specified location.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
  NewSecuritySettingsClient 
 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateSecuritySettingsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateSecuritySettings 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*SecuritySettingsClient) DeleteSecuritySettings

DeleteSecuritySettings deletes the specified SecuritySettings.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
  NewSecuritySettingsClient 
 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteSecuritySettingsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteSecuritySettings 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*SecuritySettingsClient) GetSecuritySettings

GetSecuritySettings retrieves the specified SecuritySettings. The returned settings may be stale by up to 1 minute.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
  NewSecuritySettingsClient 
 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetSecuritySettingsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetSecuritySettings 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*SecuritySettingsClient) ListSecuritySettings

ListSecuritySettings returns the list of all security settings in the specified location.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
  NewSecuritySettingsClient 
 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListSecuritySettingsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListSecuritySettings 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*SecuritySettingsClient) UpdateSecuritySettings

UpdateSecuritySettings updates the specified SecuritySettings.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
  NewSecuritySettingsClient 
 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateSecuritySettingsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateSecuritySettings 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

SecuritySettingsIterator

  type 
  
 SecuritySettingsIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  SecuritySettings 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

SecuritySettingsIterator manages a stream of *cxpb.SecuritySettings.

func (*SecuritySettingsIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SecuritySettingsIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

SessionEntityTypeIterator

  type 
  
 SessionEntityTypeIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  SessionEntityType 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

SessionEntityTypeIterator manages a stream of *cxpb.SessionEntityType.

func (*SessionEntityTypeIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SessionEntityTypeIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

SessionEntityTypesCallOptions

  type 
  
 SessionEntityTypesCallOptions 
  
 struct 
  
 { 
  
 ListSessionEntityTypes 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetSessionEntityType 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 CreateSessionEntityType 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateSessionEntityType 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteSessionEntityType 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

SessionEntityTypesCallOptions contains the retry settings for each method of SessionEntityTypesClient.

SessionEntityTypesClient

  type 
  
 SessionEntityTypesClient 
  
 struct 
  
 { 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  SessionEntityTypesCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

SessionEntityTypesClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewSessionEntityTypesClient

  func 
  
 NewSessionEntityTypesClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  SessionEntityTypesClient 
 
 , 
  
  error 
 
 ) 
 

NewSessionEntityTypesClient creates a new session entity types client.

Service for managing SessionEntityTypes.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*SessionEntityTypesClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*SessionEntityTypesClient) Connection

Connection returns a connection to the API service.

Deprecated.

func (*SessionEntityTypesClient) CreateSessionEntityType

CreateSessionEntityType creates a session entity type.

If the specified session entity type already exists, overrides the session entity type.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateSessionEntityTypeRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateSessionEntityType 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*SessionEntityTypesClient) DeleteSessionEntityType

DeleteSessionEntityType deletes the specified session entity type.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteSessionEntityTypeRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteSessionEntityType 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*SessionEntityTypesClient) GetSessionEntityType

GetSessionEntityType retrieves the specified session entity type.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetSessionEntityTypeRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetSessionEntityType 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*SessionEntityTypesClient) ListSessionEntityTypes

ListSessionEntityTypes returns the list of all session entity types in the specified session.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListSessionEntityTypesRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListSessionEntityTypes 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*SessionEntityTypesClient) UpdateSessionEntityType

UpdateSessionEntityType updates the specified session entity type.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionEntityTypesClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateSessionEntityTypeRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateSessionEntityType 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

SessionsCallOptions

  type 
  
 SessionsCallOptions 
  
 struct 
  
 { 
  
 DetectIntent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 StreamingDetectIntent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 MatchIntent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 FulfillIntent 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

SessionsCallOptions contains the retry settings for each method of SessionsClient.

SessionsClient

  type 
  
 SessionsClient 
  
 struct 
  
 { 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  SessionsCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

SessionsClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewSessionsClient

  func 
  
 NewSessionsClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  SessionsClient 
 
 , 
  
  error 
 
 ) 
 

NewSessionsClient creates a new sessions client.

A session represents an interaction with a user. You retrieve user input and pass it to the DetectIntent method to determine user intent and respond.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*SessionsClient) Close

  func 
  
 ( 
 c 
  
 * 
  SessionsClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*SessionsClient) Connection

  func 
  
 ( 
 c 
  
 * 
  SessionsClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*SessionsClient) DetectIntent

DetectIntent processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries.

Note: Always use agent versions for production traffic. See Versions and environments (at https://cloud.google.com/dialogflow/cx/docs/concept/version ).

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DetectIntentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 DetectIntent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*SessionsClient) FulfillIntent

FulfillIntent fulfills a matched intent returned by MatchIntent. Must be called after MatchIntent, with input from MatchIntentResponse. Otherwise, the behavior is undefined.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  FulfillIntentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 FulfillIntent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*SessionsClient) MatchIntent

MatchIntent returns preliminary intent match results, doesn’t change the session status.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  MatchIntentRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 MatchIntent 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*SessionsClient) StreamingDetectIntent

StreamingDetectIntent processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST).

Note: Always use agent versions for production traffic. See Versions and environments (at https://cloud.google.com/dialogflow/cx/docs/concept/version ).

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 "io" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewSessionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 stream 
 , 
  
 err 
  
 := 
  
 c 
 . 
 StreamingDetectIntent 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 go 
  
 func 
 () 
  
 { 
  
 reqs 
  
 := 
  
 [] 
 * 
 cxpb 
 . 
  StreamingDetectIntentRequest 
 
 { 
  
 // TODO: Create requests. 
  
 } 
  
 for 
  
 _ 
 , 
  
 req 
  
 := 
  
 range 
  
 reqs 
  
 { 
  
 if 
  
 err 
  
 := 
  
 stream 
 . 
 Send 
 ( 
 req 
 ); 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 } 
  
 stream 
 . 
 CloseSend 
 () 
  
 }() 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 stream 
 . 
 Recv 
 () 
  
 if 
  
 err 
  
 == 
  
 io 
 . 
 EOF 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

TrainFlowOperation

  type 
  
 TrainFlowOperation 
  
 struct 
  
 { 
  
 // contains filtered or unexported fields 
 } 
 

TrainFlowOperation manages a long-running operation from TrainFlow.

func (*TrainFlowOperation) Done

  func 
  
 ( 
 op 
  
 * 
  TrainFlowOperation 
 
 ) 
  
 Done 
 () 
  
  bool 
 
 

Done reports whether the long-running operation has completed.

  func 
  
 ( 
 op 
  
 * 
  TrainFlowOperation 
 
 ) 
  
 Metadata 
 () 
  
 ( 
 * 
  structpbpb 
 
 . 
  Struct 
 
 , 
  
  error 
 
 ) 
 

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*TrainFlowOperation) Name

  func 
  
 ( 
 op 
  
 * 
  TrainFlowOperation 
 
 ) 
  
 Name 
 () 
  
  string 
 
 

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*TrainFlowOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*TrainFlowOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

TransitionRouteGroupIterator

  type 
  
 TransitionRouteGroupIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  TransitionRouteGroup 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

TransitionRouteGroupIterator manages a stream of *cxpb.TransitionRouteGroup.

func (*TransitionRouteGroupIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TransitionRouteGroupIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TransitionRouteGroupsCallOptions

  type 
  
 TransitionRouteGroupsCallOptions 
  
 struct 
  
 { 
  
 ListTransitionRouteGroups 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetTransitionRouteGroup 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 CreateTransitionRouteGroup 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateTransitionRouteGroup 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteTransitionRouteGroup 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

TransitionRouteGroupsCallOptions contains the retry settings for each method of TransitionRouteGroupsClient.

TransitionRouteGroupsClient

  type 
  
 TransitionRouteGroupsClient 
  
 struct 
  
 { 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  TransitionRouteGroupsCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

TransitionRouteGroupsClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewTransitionRouteGroupsClient

  func 
  
 NewTransitionRouteGroupsClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  TransitionRouteGroupsClient 
 
 , 
  
  error 
 
 ) 
 

NewTransitionRouteGroupsClient creates a new transition route groups client.

Service for managing TransitionRouteGroups.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewTransitionRouteGroupsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*TransitionRouteGroupsClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*TransitionRouteGroupsClient) Connection

Connection returns a connection to the API service.

Deprecated.

func (*TransitionRouteGroupsClient) CreateTransitionRouteGroup

CreateTransitionRouteGroup creates an TransitionRouteGroup in the specified flow.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewTransitionRouteGroupsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateTransitionRouteGroupRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateTransitionRouteGroup 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*TransitionRouteGroupsClient) DeleteTransitionRouteGroup

DeleteTransitionRouteGroup deletes the specified TransitionRouteGroup.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewTransitionRouteGroupsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteTransitionRouteGroupRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteTransitionRouteGroup 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*TransitionRouteGroupsClient) GetTransitionRouteGroup

GetTransitionRouteGroup retrieves the specified TransitionRouteGroup.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewTransitionRouteGroupsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetTransitionRouteGroupRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetTransitionRouteGroup 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*TransitionRouteGroupsClient) ListTransitionRouteGroups

ListTransitionRouteGroups returns the list of all transition route groups in the specified flow.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewTransitionRouteGroupsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListTransitionRouteGroupsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListTransitionRouteGroups 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*TransitionRouteGroupsClient) UpdateTransitionRouteGroup

UpdateTransitionRouteGroup updates the specified TransitionRouteGroup.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewTransitionRouteGroupsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateTransitionRouteGroupRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateTransitionRouteGroup 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

UpdateEnvironmentOperation

  type 
  
 UpdateEnvironmentOperation 
  
 struct 
  
 { 
  
 // contains filtered or unexported fields 
 } 
 

UpdateEnvironmentOperation manages a long-running operation from UpdateEnvironment.

func (*UpdateEnvironmentOperation) Done

Done reports whether the long-running operation has completed.

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateEnvironmentOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateEnvironmentOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateEnvironmentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

VersionIterator

  type 
  
 VersionIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  Version 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

VersionIterator manages a stream of *cxpb.Version.

func (*VersionIterator) Next

  func 
  
 ( 
 it 
  
 * 
  VersionIterator 
 
 ) 
  
 Next 
 () 
  
 ( 
 * 
  cxpb 
 
 . 
  Version 
 
 , 
  
  error 
 
 ) 
 

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*VersionIterator) PageInfo

  func 
  
 ( 
 it 
  
 * 
  VersionIterator 
 
 ) 
  
 PageInfo 
 () 
  
 * 
  iterator 
 
 . 
  PageInfo 
 
 

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

VersionsCallOptions

  type 
  
 VersionsCallOptions 
  
 struct 
  
 { 
  
 ListVersions 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetVersion 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 CreateVersion 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateVersion 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteVersion 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 LoadVersion 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

VersionsCallOptions contains the retry settings for each method of VersionsClient.

VersionsClient

  type 
  
 VersionsClient 
  
 struct 
  
 { 
  
 // LROClient is used internally to handle longrunning operations. 
  
 // It is exposed so that its CallOptions can be modified if required. 
  
 // Users should not Close this client. 
  
 LROClient 
  
 * 
  lroauto 
 
 . 
  OperationsClient 
 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  VersionsCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

VersionsClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewVersionsClient

  func 
  
 NewVersionsClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  VersionsClient 
 
 , 
  
  error 
 
 ) 
 

NewVersionsClient creates a new versions client.

Service for managing Versions.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewVersionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*VersionsClient) Close

  func 
  
 ( 
 c 
  
 * 
  VersionsClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*VersionsClient) Connection

  func 
  
 ( 
 c 
  
 * 
  VersionsClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*VersionsClient) CreateVersion

CreateVersion creates a Version in the specified Flow.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewVersionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateVersionRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 op 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateVersion 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 op 
 . 
 Wait 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*VersionsClient) CreateVersionOperation

  func 
  
 ( 
 c 
  
 * 
  VersionsClient 
 
 ) 
  
 CreateVersionOperation 
 ( 
 name 
  
  string 
 
 ) 
  
 * 
  CreateVersionOperation 
 
 

CreateVersionOperation returns a new CreateVersionOperation from a given name. The name must be that of a previously created CreateVersionOperation, possibly from a different process.

func (*VersionsClient) DeleteVersion

DeleteVersion deletes the specified Version.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewVersionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteVersionRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteVersion 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*VersionsClient) GetVersion

GetVersion retrieves the specified Version.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewVersionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetVersionRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetVersion 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*VersionsClient) ListVersions

ListVersions returns the list of all versions in the specified Flow.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewVersionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListVersionsRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListVersions 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*VersionsClient) LoadVersion

LoadVersion loads a specified version to draft version.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewVersionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  LoadVersionRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 op 
 , 
  
 err 
  
 := 
  
 c 
 . 
 LoadVersion 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 err 
  
 = 
  
 op 
 . 
 Wait 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*VersionsClient) LoadVersionOperation

  func 
  
 ( 
 c 
  
 * 
  VersionsClient 
 
 ) 
  
 LoadVersionOperation 
 ( 
 name 
  
  string 
 
 ) 
  
 * 
  LoadVersionOperation 
 
 

LoadVersionOperation returns a new LoadVersionOperation from a given name. The name must be that of a previously created LoadVersionOperation, possibly from a different process.

func (*VersionsClient) UpdateVersion

UpdateVersion updates the specified Version.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewVersionsClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateVersionRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateVersion 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

WebhookIterator

  type 
  
 WebhookIterator 
  
 struct 
  
 { 
  
 // Response is the raw response for the current page. 
  
 // It must be cast to the RPC response type. 
  
 // Calling Next() or InternalFetch() updates this value. 
  
 Response 
  
 interface 
 {} 
  
 // InternalFetch is for use by the Google Cloud Libraries only. 
  
 // It is not part of the stable interface of this package. 
  
 // 
  
 // InternalFetch returns results from a single call to the underlying RPC. 
  
 // The number of results is no greater than pageSize. 
  
 // If there are no more results, nextPageToken is empty and err is nil. 
  
 InternalFetch 
  
 func 
 ( 
 pageSize 
  
  int 
 
 , 
  
 pageToken 
  
  string 
 
 ) 
  
 ( 
 results 
  
 [] 
 * 
  cxpb 
 
 . 
  Webhook 
 
 , 
  
 nextPageToken 
  
  string 
 
 , 
  
 err 
  
  error 
 
 ) 
  
 // contains filtered or unexported fields 
 } 
 

WebhookIterator manages a stream of *cxpb.Webhook.

func (*WebhookIterator) Next

  func 
  
 ( 
 it 
  
 * 
  WebhookIterator 
 
 ) 
  
 Next 
 () 
  
 ( 
 * 
  cxpb 
 
 . 
  Webhook 
 
 , 
  
  error 
 
 ) 
 

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*WebhookIterator) PageInfo

  func 
  
 ( 
 it 
  
 * 
  WebhookIterator 
 
 ) 
  
 PageInfo 
 () 
  
 * 
  iterator 
 
 . 
  PageInfo 
 
 

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

WebhooksCallOptions

  type 
  
 WebhooksCallOptions 
  
 struct 
  
 { 
  
 ListWebhooks 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 GetWebhook 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 CreateWebhook 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 UpdateWebhook 
  
 [] 
  gax 
 
 . 
  CallOption 
 
  
 DeleteWebhook 
  
 [] 
  gax 
 
 . 
  CallOption 
 
 } 
 

WebhooksCallOptions contains the retry settings for each method of WebhooksClient.

WebhooksClient

  type 
  
 WebhooksClient 
  
 struct 
  
 { 
  
 // The call options for this service. 
  
 CallOptions 
  
 * 
  WebhooksCallOptions 
 
  
 // contains filtered or unexported fields 
 } 
 

WebhooksClient is a client for interacting with Dialogflow API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewWebhooksClient

  func 
  
 NewWebhooksClient 
 ( 
 ctx 
  
  context 
 
 . 
  Context 
 
 , 
  
 opts 
  
 ... 
  option 
 
 . 
  ClientOption 
 
 ) 
  
 ( 
 * 
  WebhooksClient 
 
 , 
  
  error 
 
 ) 
 

NewWebhooksClient creates a new webhooks client.

Service for managing Webhooks.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewWebhooksClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use client. 
  
 _ 
  
 = 
  
 c 
 } 
 

func (*WebhooksClient) Close

  func 
  
 ( 
 c 
  
 * 
  WebhooksClient 
 
 ) 
  
 Close 
 () 
  
  error 
 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*WebhooksClient) Connection

  func 
  
 ( 
 c 
  
 * 
  WebhooksClient 
 
 ) 
  
 Connection 
 () 
  
 * 
  grpc 
 
 . 
  ClientConn 
 
 

Connection returns a connection to the API service.

Deprecated.

func (*WebhooksClient) CreateWebhook

CreateWebhook creates a webhook in the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewWebhooksClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  CreateWebhookRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateWebhook 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*WebhooksClient) DeleteWebhook

DeleteWebhook deletes the specified webhook.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewWebhooksClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  DeleteWebhookRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 err 
  
 = 
  
 c 
 . 
 DeleteWebhook 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
 } 
 

func (*WebhooksClient) GetWebhook

GetWebhook retrieves the specified webhook.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewWebhooksClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  GetWebhookRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 GetWebhook 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

func (*WebhooksClient) ListWebhooks

ListWebhooks returns the list of all webhooks in the specified agent.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 "google.golang.org/api/iterator" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 // import "google.golang.org/api/iterator" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewWebhooksClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  ListWebhooksRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 it 
  
 := 
  
 c 
 . 
 ListWebhooks 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 for 
  
 { 
  
 resp 
 , 
  
 err 
  
 := 
  
 it 
 . 
 Next 
 () 
  
 if 
  
 err 
  
 == 
  
 iterator 
 . 
 Done 
  
 { 
  
 break 
  
 } 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
  
 } 
 } 
 

func (*WebhooksClient) UpdateWebhook

UpdateWebhook updates the specified webhook.

Example

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 cx 
  
 "cloud.google.com/go/dialogflow/cx/apiv3beta1" 
  
 cxpb 
  
 "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 c 
 , 
  
 err 
  
 := 
  
 cx 
 . 
 NewWebhooksClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 req 
  
 := 
  
& cxpb 
 . 
  UpdateWebhookRequest 
 
 { 
  
 // TODO: Fill request struct fields. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 c 
 . 
 UpdateWebhook 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 
Create a Mobile Website
View Site in Mobile | Classic
Share by: