Dialogflow API C++ Client  2.6.0
A C++ Client Library for the Dialogflow API
Public Member Functions | List of all members
google::cloud::dialogflow_cx::IntentsClient Class Reference

Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent]. More...

#include <google/cloud/dialogflow_cx/intents_client.h>

Public Member Functions

 IntentsClient (std::shared_ptr< IntentsConnection > connection, Options opts={})
 
 ~IntentsClient ()
 
StreamRange< google::cloud::dialogflow::cx::v3::Intent > ListIntents (std::string const &parent, Options opts={})
 Returns the list of all intents in the specified agent. More...
 
StreamRange< google::cloud::dialogflow::cx::v3::Intent > ListIntents (google::cloud::dialogflow::cx::v3::ListIntentsRequest request, Options opts={})
 Returns the list of all intents in the specified agent. More...
 
StatusOr< google::cloud::dialogflow::cx::v3::Intent > GetIntent (std::string const &name, Options opts={})
 Retrieves the specified intent. More...
 
StatusOr< google::cloud::dialogflow::cx::v3::Intent > GetIntent (google::cloud::dialogflow::cx::v3::GetIntentRequest const &request, Options opts={})
 Retrieves the specified intent. More...
 
StatusOr< google::cloud::dialogflow::cx::v3::Intent > CreateIntent (std::string const &parent, google::cloud::dialogflow::cx::v3::Intent const &intent, Options opts={})
 Creates an intent in the specified agent. More...
 
StatusOr< google::cloud::dialogflow::cx::v3::Intent > CreateIntent (google::cloud::dialogflow::cx::v3::CreateIntentRequest const &request, Options opts={})
 Creates an intent in the specified agent. More...
 
StatusOr< google::cloud::dialogflow::cx::v3::Intent > UpdateIntent (google::cloud::dialogflow::cx::v3::Intent const &intent, google::protobuf::FieldMask const &update_mask, Options opts={})
 Updates the specified intent. More...
 
StatusOr< google::cloud::dialogflow::cx::v3::Intent > UpdateIntent (google::cloud::dialogflow::cx::v3::UpdateIntentRequest const &request, Options opts={})
 Updates the specified intent. More...
 
Status DeleteIntent (std::string const &name, Options opts={})
 Deletes the specified intent. More...
 
Status DeleteIntent (google::cloud::dialogflow::cx::v3::DeleteIntentRequest const &request, Options opts={})
 Deletes the specified intent. More...
 
 IntentsClient (IntentsClient const &)=default
 
IntentsClientoperator= (IntentsClient const &)=default
 
 IntentsClient (IntentsClient &&)=default
 
IntentsClientoperator= (IntentsClient &&)=default
 

Friends

bool operator== (IntentsClient const &a, IntentsClient const &b)
 
bool operator!= (IntentsClient const &a, IntentsClient const &b)
 

Detailed Description

Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent].

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Definition at line 62 of file intents_client.h.

Constructor & Destructor Documentation

◆ IntentsClient() [1/3]

google::cloud::dialogflow_cx::IntentsClient::IntentsClient ( std::shared_ptr< IntentsConnection connection,
Options  opts = {} 
)
explicit

◆ ~IntentsClient()

google::cloud::dialogflow_cx::IntentsClient::~IntentsClient ( )

◆ IntentsClient() [2/3]

google::cloud::dialogflow_cx::IntentsClient::IntentsClient ( IntentsClient const &  )
default

◆ IntentsClient() [3/3]

google::cloud::dialogflow_cx::IntentsClient::IntentsClient ( IntentsClient &&  )
default

Member Function Documentation

◆ CreateIntent() [1/2]

StatusOr<google::cloud::dialogflow::cx::v3::Intent> google::cloud::dialogflow_cx::IntentsClient::CreateIntent ( google::cloud::dialogflow::cx::v3::CreateIntentRequest const &  request,
Options  opts = {} 
)

Creates an intent in the specified agent.

Note: You should always train a flow prior to sending it queries. See the training documentation.

Parameters
requestgoogle::cloud::dialogflow::cx::v3::CreateIntentRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::dialogflow::cx::v3::Intent

◆ CreateIntent() [2/2]

StatusOr<google::cloud::dialogflow::cx::v3::Intent> google::cloud::dialogflow_cx::IntentsClient::CreateIntent ( std::string const &  parent,
google::cloud::dialogflow::cx::v3::Intent const &  intent,
Options  opts = {} 
)

Creates an intent in the specified agent.

Note: You should always train a flow prior to sending it queries. See the training documentation.

Parameters
parentRequired. The agent to create an intent for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
intentRequired. The intent to create.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::dialogflow::cx::v3::Intent

◆ DeleteIntent() [1/2]

Status google::cloud::dialogflow_cx::IntentsClient::DeleteIntent ( google::cloud::dialogflow::cx::v3::DeleteIntentRequest const &  request,
Options  opts = {} 
)

Deletes the specified intent.

Note: You should always train a flow prior to sending it queries. See the training documentation.

Parameters
requestgoogle::cloud::dialogflow::cx::v3::DeleteIntentRequest
optsOptional. Override the class-level options, such as retry and backoff policies.

◆ DeleteIntent() [2/2]

Status google::cloud::dialogflow_cx::IntentsClient::DeleteIntent ( std::string const &  name,
Options  opts = {} 
)

Deletes the specified intent.

Note: You should always train a flow prior to sending it queries. See the training documentation.

Parameters
nameRequired. The name of the intent to delete. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>.
optsOptional. Override the class-level options, such as retry and backoff policies.

◆ GetIntent() [1/2]

StatusOr<google::cloud::dialogflow::cx::v3::Intent> google::cloud::dialogflow_cx::IntentsClient::GetIntent ( google::cloud::dialogflow::cx::v3::GetIntentRequest const &  request,
Options  opts = {} 
)

Retrieves the specified intent.

Parameters
requestgoogle::cloud::dialogflow::cx::v3::GetIntentRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::dialogflow::cx::v3::Intent

◆ GetIntent() [2/2]

StatusOr<google::cloud::dialogflow::cx::v3::Intent> google::cloud::dialogflow_cx::IntentsClient::GetIntent ( std::string const &  name,
Options  opts = {} 
)

Retrieves the specified intent.

Parameters
nameRequired. The name of the intent. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::dialogflow::cx::v3::Intent

◆ ListIntents() [1/2]

StreamRange<google::cloud::dialogflow::cx::v3::Intent> google::cloud::dialogflow_cx::IntentsClient::ListIntents ( google::cloud::dialogflow::cx::v3::ListIntentsRequest  request,
Options  opts = {} 
)

Returns the list of all intents in the specified agent.

Parameters
requestgoogle::cloud::dialogflow::cx::v3::ListIntentsRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::dialogflow::cx::v3::Intent

◆ ListIntents() [2/2]

StreamRange<google::cloud::dialogflow::cx::v3::Intent> google::cloud::dialogflow_cx::IntentsClient::ListIntents ( std::string const &  parent,
Options  opts = {} 
)

Returns the list of all intents in the specified agent.

Parameters
parentRequired. The agent to list all intents for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::dialogflow::cx::v3::Intent

◆ operator=() [1/2]

IntentsClient& google::cloud::dialogflow_cx::IntentsClient::operator= ( IntentsClient &&  )
default

◆ operator=() [2/2]

IntentsClient& google::cloud::dialogflow_cx::IntentsClient::operator= ( IntentsClient const &  )
default

◆ UpdateIntent() [1/2]

StatusOr<google::cloud::dialogflow::cx::v3::Intent> google::cloud::dialogflow_cx::IntentsClient::UpdateIntent ( google::cloud::dialogflow::cx::v3::Intent const &  intent,
google::protobuf::FieldMask const &  update_mask,
Options  opts = {} 
)

Updates the specified intent.

Note: You should always train a flow prior to sending it queries. See the training documentation.

Parameters
intentRequired. The intent to update.
update_maskThe mask to control which fields get updated. If the mask is not present, all fields will be updated.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::dialogflow::cx::v3::Intent

◆ UpdateIntent() [2/2]

StatusOr<google::cloud::dialogflow::cx::v3::Intent> google::cloud::dialogflow_cx::IntentsClient::UpdateIntent ( google::cloud::dialogflow::cx::v3::UpdateIntentRequest const &  request,
Options  opts = {} 
)

Updates the specified intent.

Note: You should always train a flow prior to sending it queries. See the training documentation.

Parameters
requestgoogle::cloud::dialogflow::cx::v3::UpdateIntentRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::dialogflow::cx::v3::Intent

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( IntentsClient const &  a,
IntentsClient const &  b 
)
friend

Definition at line 81 of file intents_client.h.

◆ operator==

bool operator== ( IntentsClient const &  a,
IntentsClient const &  b 
)
friend

Definition at line 78 of file intents_client.h.