#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum JobState {
Unspecified = 0,
Pending = 9,
Running = 1,
Succeeded = 2,
Failed = 3,
Cancelled = 4,
KnowledgeExtraction = 5,
ReconPreprocessing = 6,
Clustering = 7,
ExportingClusters = 8,
}
impl JobState {
pub fn as_str_name(&self) -> &'static str {
match self {
JobState::Unspecified => "JOB_STATE_UNSPECIFIED",
JobState::Pending => "JOB_STATE_PENDING",
JobState::Running => "JOB_STATE_RUNNING",
JobState::Succeeded => "JOB_STATE_SUCCEEDED",
JobState::Failed => "JOB_STATE_FAILED",
JobState::Cancelled => "JOB_STATE_CANCELLED",
JobState::KnowledgeExtraction => "JOB_STATE_KNOWLEDGE_EXTRACTION",
JobState::ReconPreprocessing => "JOB_STATE_RECON_PREPROCESSING",
JobState::Clustering => "JOB_STATE_CLUSTERING",
JobState::ExportingClusters => "JOB_STATE_EXPORTING_CLUSTERS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"JOB_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"JOB_STATE_PENDING" => Some(Self::Pending),
"JOB_STATE_RUNNING" => Some(Self::Running),
"JOB_STATE_SUCCEEDED" => Some(Self::Succeeded),
"JOB_STATE_FAILED" => Some(Self::Failed),
"JOB_STATE_CANCELLED" => Some(Self::Cancelled),
"JOB_STATE_KNOWLEDGE_EXTRACTION" => Some(Self::KnowledgeExtraction),
"JOB_STATE_RECON_PREPROCESSING" => Some(Self::ReconPreprocessing),
"JOB_STATE_CLUSTERING" => Some(Self::Clustering),
"JOB_STATE_EXPORTING_CLUSTERS" => Some(Self::ExportingClusters),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommonOperationMetadata {
#[prost(enumeration = "common_operation_metadata::State", tag = "1")]
pub state: i32,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
}
pub mod common_operation_metadata {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Running = 1,
Cancelling = 2,
Succeeded = 3,
Failed = 4,
Cancelled = 5,
Pending = 6,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Running => "RUNNING",
State::Cancelling => "CANCELLING",
State::Succeeded => "SUCCEEDED",
State::Failed => "FAILED",
State::Cancelled => "CANCELLED",
State::Pending => "PENDING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"RUNNING" => Some(Self::Running),
"CANCELLING" => Some(Self::Cancelling),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
"CANCELLED" => Some(Self::Cancelled),
"PENDING" => Some(Self::Pending),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InputConfig {
#[prost(message, repeated, tag = "1")]
pub bigquery_input_configs: ::prost::alloc::vec::Vec<BigQueryInputConfig>,
#[prost(enumeration = "input_config::EntityType", tag = "2")]
pub entity_type: i32,
#[prost(string, tag = "3")]
pub previous_result_bigquery_table: ::prost::alloc::string::String,
}
pub mod input_config {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum EntityType {
Unspecified = 0,
People = 1,
Establishment = 2,
Property = 3,
Product = 4,
Organization = 5,
LocalBusiness = 6,
Person = 7,
}
impl EntityType {
pub fn as_str_name(&self) -> &'static str {
match self {
EntityType::Unspecified => "ENTITY_TYPE_UNSPECIFIED",
EntityType::People => "PEOPLE",
EntityType::Establishment => "ESTABLISHMENT",
EntityType::Property => "PROPERTY",
EntityType::Product => "PRODUCT",
EntityType::Organization => "ORGANIZATION",
EntityType::LocalBusiness => "LOCAL_BUSINESS",
EntityType::Person => "PERSON",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENTITY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PEOPLE" => Some(Self::People),
"ESTABLISHMENT" => Some(Self::Establishment),
"PROPERTY" => Some(Self::Property),
"PRODUCT" => Some(Self::Product),
"ORGANIZATION" => Some(Self::Organization),
"LOCAL_BUSINESS" => Some(Self::LocalBusiness),
"PERSON" => Some(Self::Person),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigQueryInputConfig {
#[prost(string, tag = "1")]
pub bigquery_table: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub gcs_uri: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputConfig {
#[prost(string, tag = "1")]
pub bigquery_dataset: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReconConfig {
#[prost(message, optional, tag = "3")]
pub options: ::core::option::Option<recon_config::Options>,
#[prost(message, optional, tag = "4")]
pub model_config: ::core::option::Option<recon_config::ModelConfig>,
#[prost(oneof = "recon_config::ClusteringConfig", tags = "1, 2")]
pub clustering_config: ::core::option::Option<recon_config::ClusteringConfig>,
}
pub mod recon_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Options {
#[prost(bool, tag = "100")]
pub enable_geocoding_separation: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelConfig {
#[prost(string, tag = "1")]
pub model_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version_tag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ClusteringConfig {
#[prost(message, tag = "1")]
ConnectedComponentsConfig(super::ConnectedComponentsConfig),
#[prost(message, tag = "2")]
AffinityClusteringConfig(super::AffinityClusteringConfig),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectedComponentsConfig {
#[prost(float, tag = "1")]
pub weight_threshold: f32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AffinityClusteringConfig {
#[prost(int64, tag = "1")]
pub compression_round_count: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteOperationMetadata {
#[prost(message, optional, tag = "1")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEntityReconciliationJobRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub entity_reconciliation_job: ::core::option::Option<EntityReconciliationJob>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEntityReconciliationJobRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEntityReconciliationJobsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEntityReconciliationJobsResponse {
#[prost(message, repeated, tag = "1")]
pub entity_reconciliation_jobs: ::prost::alloc::vec::Vec<EntityReconciliationJob>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelEntityReconciliationJobRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteEntityReconciliationJobRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityReconciliationJob {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub input_config: ::core::option::Option<InputConfig>,
#[prost(message, optional, tag = "3")]
pub output_config: ::core::option::Option<OutputConfig>,
#[prost(enumeration = "JobState", tag = "4")]
pub state: i32,
#[prost(message, optional, tag = "5")]
pub error: ::core::option::Option<super::super::super::rpc::Status>,
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "9")]
pub recon_config: ::core::option::Option<ReconConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupResponse {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<::prost_types::Value>,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<::prost_types::Value>,
#[prost(message, optional, tag = "3")]
pub item_list_element: ::core::option::Option<::prost_types::ListValue>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub query: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "6")]
pub limit: ::core::option::Option<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchResponse {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<::prost_types::Value>,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<::prost_types::Value>,
#[prost(message, optional, tag = "3")]
pub item_list_element: ::core::option::Option<::prost_types::ListValue>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupPublicKgRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupPublicKgResponse {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<::prost_types::Value>,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<::prost_types::Value>,
#[prost(message, optional, tag = "3")]
pub item_list_element: ::core::option::Option<::prost_types::ListValue>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPublicKgRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub query: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "6")]
pub limit: ::core::option::Option<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPublicKgResponse {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<::prost_types::Value>,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<::prost_types::Value>,
#[prost(message, optional, tag = "3")]
pub item_list_element: ::core::option::Option<::prost_types::ListValue>,
}
pub mod enterprise_knowledge_graph_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct EnterpriseKnowledgeGraphServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> EnterpriseKnowledgeGraphServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> EnterpriseKnowledgeGraphServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
EnterpriseKnowledgeGraphServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_entity_reconciliation_job(
&mut self,
request: impl tonic::IntoRequest<super::CreateEntityReconciliationJobRequest>,
) -> std::result::Result<
tonic::Response<super::EntityReconciliationJob>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/CreateEntityReconciliationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
"CreateEntityReconciliationJob",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_entity_reconciliation_job(
&mut self,
request: impl tonic::IntoRequest<super::GetEntityReconciliationJobRequest>,
) -> std::result::Result<
tonic::Response<super::EntityReconciliationJob>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/GetEntityReconciliationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
"GetEntityReconciliationJob",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_entity_reconciliation_jobs(
&mut self,
request: impl tonic::IntoRequest<super::ListEntityReconciliationJobsRequest>,
) -> std::result::Result<
tonic::Response<super::ListEntityReconciliationJobsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/ListEntityReconciliationJobs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
"ListEntityReconciliationJobs",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn cancel_entity_reconciliation_job(
&mut self,
request: impl tonic::IntoRequest<super::CancelEntityReconciliationJobRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/CancelEntityReconciliationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
"CancelEntityReconciliationJob",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_entity_reconciliation_job(
&mut self,
request: impl tonic::IntoRequest<super::DeleteEntityReconciliationJobRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/DeleteEntityReconciliationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
"DeleteEntityReconciliationJob",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn lookup(
&mut self,
request: impl tonic::IntoRequest<super::LookupRequest>,
) -> std::result::Result<tonic::Response<super::LookupResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/Lookup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
"Lookup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn search(
&mut self,
request: impl tonic::IntoRequest<super::SearchRequest>,
) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/Search",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
"Search",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn lookup_public_kg(
&mut self,
request: impl tonic::IntoRequest<super::LookupPublicKgRequest>,
) -> std::result::Result<
tonic::Response<super::LookupPublicKgResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/LookupPublicKg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
"LookupPublicKg",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn search_public_kg(
&mut self,
request: impl tonic::IntoRequest<super::SearchPublicKgRequest>,
) -> std::result::Result<
tonic::Response<super::SearchPublicKgResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/SearchPublicKg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
"SearchPublicKg",
),
);
self.inner.unary(req, path, codec).await
}
}
}