Struct googapis::google::cloud::dialogflow::v2::documents_client::DocumentsClient [−][src]
pub struct DocumentsClient<T> { /* fields omitted */ }
Expand description
Service for managing knowledge [Documents][google.cloud.dialogflow.v2.Document].
Implementations
impl<T> DocumentsClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> DocumentsClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> DocumentsClient<InterceptedService<T, F>> where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Compress requests with gzip
.
This requires the server to support it otherwise it might respond with an error.
Enable decompressing responses with gzip
.
pub async fn list_documents(
&mut self,
request: impl IntoRequest<ListDocumentsRequest>
) -> Result<Response<ListDocumentsResponse>, Status>
pub async fn list_documents(
&mut self,
request: impl IntoRequest<ListDocumentsRequest>
) -> Result<Response<ListDocumentsResponse>, Status>
Returns the list of all documents of the knowledge base.
pub async fn get_document(
&mut self,
request: impl IntoRequest<GetDocumentRequest>
) -> Result<Response<Document>, Status>
pub async fn get_document(
&mut self,
request: impl IntoRequest<GetDocumentRequest>
) -> Result<Response<Document>, Status>
Retrieves the specified document.
pub async fn create_document(
&mut self,
request: impl IntoRequest<CreateDocumentRequest>
) -> Result<Response<Operation>, Status>
pub async fn create_document(
&mut self,
request: impl IntoRequest<CreateDocumentRequest>
) -> Result<Response<Operation>, Status>
Creates a new document.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]response
: [Document][google.cloud.dialogflow.v2.Document]
pub async fn delete_document(
&mut self,
request: impl IntoRequest<DeleteDocumentRequest>
) -> Result<Response<Operation>, Status>
pub async fn delete_document(
&mut self,
request: impl IntoRequest<DeleteDocumentRequest>
) -> Result<Response<Operation>, Status>
Deletes the specified document.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]response
: An Empty message
pub async fn update_document(
&mut self,
request: impl IntoRequest<UpdateDocumentRequest>
) -> Result<Response<Operation>, Status>
pub async fn update_document(
&mut self,
request: impl IntoRequest<UpdateDocumentRequest>
) -> Result<Response<Operation>, Status>
Updates the specified document.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]response
: [Document][google.cloud.dialogflow.v2.Document]
pub async fn reload_document(
&mut self,
request: impl IntoRequest<ReloadDocumentRequest>
) -> Result<Response<Operation>, Status>
pub async fn reload_document(
&mut self,
request: impl IntoRequest<ReloadDocumentRequest>
) -> Result<Response<Operation>, Status>
Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]response
: [Document][google.cloud.dialogflow.v2.Document]
Note: The projects.agent.knowledgeBases.documents
resource is deprecated;
only use projects.knowledgeBases.documents
.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for DocumentsClient<T> where
T: RefUnwindSafe,
impl<T> Send for DocumentsClient<T> where
T: Send,
impl<T> Sync for DocumentsClient<T> where
T: Sync,
impl<T> Unpin for DocumentsClient<T> where
T: Unpin,
impl<T> UnwindSafe for DocumentsClient<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more