[SchemaService::update_schema][crate::client::SchemaService::update_schema] 调用的请求构建器。
示例
# use google_cloud_discoveryengine_v1::builder;
use builder::schema_service::UpdateSchema;
# tokio_test::block_on(async {
use lro::Poller;
let builder = prepare_request_builder();
let response = builder.poller().until_done().await?;
# gax::Result::<()>::Ok(()) });
fn prepare_request_builder() -> UpdateSchema {
# panic!();
// ... details omitted ...
}
实现
with_request
fn with_request<V: Into<crate::model::UpdateSchemaRequest>>(self, v: V) -> Self
设置完整请求,替换所有先前的值。
with_options
fn with_options<V: Into<gax::options::RequestOptions>>(self, v: V) -> Self
设置所有选项,替换所有先前的值。
send
async fn send(self) -> Result<longrunning::model::Operation>
发送请求。
长时间运行的操作
这会启动一个长时间运行的操作,但不会轮询该操作。如需详细了解 [update_schema][crate::client::SchemaService::update_schema],请参阅相关文档。
poller
fn poller(self) -> impl lro::Poller<crate::model::Schema, crate::model::UpdateSchemaMetadata>
创建 [Poller][lro::Poller] 以与 update_schema 搭配使用。
set_schema
fn set_schema<T>(self, v: T) -> Self
where
T: std::convert::Into<crate::model::Schema>,
设置 [schema][crate::model::UpdateSchemaRequest::schema] 的值。
这是请求的必填字段。
set_or_clear_schema
fn set_or_clear_schema<T>(self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Schema>,
设置或清除 [schema][crate::model::UpdateSchemaRequest::schema] 的值。
这是请求的必填字段。
set_allow_missing
fn set_allow_missing<T: Into<bool>>(self, v: T) -> Self
设置 [allow_missing][crate::model::UpdateSchemaRequest::allow_missing] 的值。