// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::search_registry_records::_search_registry_records_input::SearchRegistryRecordsInputBuilder;
pub use crate::operation::search_registry_records::_search_registry_records_output::SearchRegistryRecordsOutputBuilder;
impl crate::operation::search_registry_records::builders::SearchRegistryRecordsInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::search_registry_records::SearchRegistryRecordsOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::search_registry_records::SearchRegistryRecordsError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.search_registry_records();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `SearchRegistryRecords`.
///
/// <p>Searches for registry records using semantic, lexical, or hybrid queries. Returns metadata for matching records ordered by relevance within the specified registry.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct SearchRegistryRecordsFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::search_registry_records::builders::SearchRegistryRecordsInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::search_registry_records::SearchRegistryRecordsOutput,
crate::operation::search_registry_records::SearchRegistryRecordsError,
> for SearchRegistryRecordsFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::search_registry_records::SearchRegistryRecordsOutput,
crate::operation::search_registry_records::SearchRegistryRecordsError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl SearchRegistryRecordsFluentBuilder {
/// Creates a new `SearchRegistryRecordsFluentBuilder`.
pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: ::std::default::Default::default(),
config_override: ::std::option::Option::None,
}
}
/// Access the SearchRegistryRecords as a reference.
pub fn as_input(&self) -> &crate::operation::search_registry_records::builders::SearchRegistryRecordsInputBuilder {
&self.inner
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::search_registry_records::SearchRegistryRecordsOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::search_registry_records::SearchRegistryRecordsError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let input = self
.inner
.build()
.map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
let runtime_plugins = crate::operation::search_registry_records::SearchRegistryRecords::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::search_registry_records::SearchRegistryRecords::orchestrate(&runtime_plugins, input).await
}
/// Consumes this builder, creating a customizable operation that can be modified before being sent.
pub fn customize(
self,
) -> crate::client::customize::CustomizableOperation<
crate::operation::search_registry_records::SearchRegistryRecordsOutput,
crate::operation::search_registry_records::SearchRegistryRecordsError,
Self,
> {
crate::client::customize::CustomizableOperation::new(self)
}
pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
self.set_config_override(::std::option::Option::Some(config_override.into()));
self
}
pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
self.config_override = config_override;
self
}
/// <p>The search query to find matching registry records.</p>
pub fn search_query(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.search_query(input.into());
self
}
/// <p>The search query to find matching registry records.</p>
pub fn set_search_query(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_search_query(input);
self
}
/// <p>The search query to find matching registry records.</p>
pub fn get_search_query(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_search_query()
}
///
/// Appends an item to `registryIds`.
///
/// To override the contents of this collection use [`set_registry_ids`](Self::set_registry_ids).
///
/// <p>The list of registry identifiers to search within. Currently, you can specify exactly one registry identifier. You can provide either the full Amazon Web Services Resource Name (ARN) or the 12-character alphanumeric registry ID.</p>
pub fn registry_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.registry_ids(input.into());
self
}
/// <p>The list of registry identifiers to search within. Currently, you can specify exactly one registry identifier. You can provide either the full Amazon Web Services Resource Name (ARN) or the 12-character alphanumeric registry ID.</p>
pub fn set_registry_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.inner = self.inner.set_registry_ids(input);
self
}
/// <p>The list of registry identifiers to search within. Currently, you can specify exactly one registry identifier. You can provide either the full Amazon Web Services Resource Name (ARN) or the 12-character alphanumeric registry ID.</p>
pub fn get_registry_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
self.inner.get_registry_ids()
}
/// <p>The maximum number of records to return in a single call. Valid values are 1 through 20. The default value is 10.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of records to return in a single call. Valid values are 1 through 20. The default value is 10.</p>
pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The maximum number of records to return in a single call. Valid values are 1 through 20. The default value is 10.</p>
pub fn get_max_results(&self) -> &::std::option::Option<i32> {
self.inner.get_max_results()
}
/// <p>A metadata filter expression to narrow search results. Uses structured JSON operators including field-level operators (<code>$eq</code>, <code>$ne</code>, <code>$in</code>) and logical operators (<code>$and</code>, <code>$or</code>) on filterable fields (<code>name</code>, <code>descriptorType</code>, <code>version</code>). For example, to filter by descriptor type: <code>{"descriptorType": {"$eq": "MCP"}}</code>. To combine filters: <code>{"$and": \[{"descriptorType": {"$eq": "MCP"}}, {"name": {"$eq": "my-tool"}}\]}</code>.</p>
pub fn filters(mut self, input: ::aws_smithy_types::Document) -> Self {
self.inner = self.inner.filters(input);
self
}
/// <p>A metadata filter expression to narrow search results. Uses structured JSON operators including field-level operators (<code>$eq</code>, <code>$ne</code>, <code>$in</code>) and logical operators (<code>$and</code>, <code>$or</code>) on filterable fields (<code>name</code>, <code>descriptorType</code>, <code>version</code>). For example, to filter by descriptor type: <code>{"descriptorType": {"$eq": "MCP"}}</code>. To combine filters: <code>{"$and": \[{"descriptorType": {"$eq": "MCP"}}, {"name": {"$eq": "my-tool"}}\]}</code>.</p>
pub fn set_filters(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>A metadata filter expression to narrow search results. Uses structured JSON operators including field-level operators (<code>$eq</code>, <code>$ne</code>, <code>$in</code>) and logical operators (<code>$and</code>, <code>$or</code>) on filterable fields (<code>name</code>, <code>descriptorType</code>, <code>version</code>). For example, to filter by descriptor type: <code>{"descriptorType": {"$eq": "MCP"}}</code>. To combine filters: <code>{"$and": \[{"descriptorType": {"$eq": "MCP"}}, {"name": {"$eq": "my-tool"}}\]}</code>.</p>
pub fn get_filters(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
self.inner.get_filters()
}
}