aws-sdk-agentdiscovery 1.1.0

AWS SDK for Agent Discovery
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::search_public_records::_search_public_records_input::SearchPublicRecordsInputBuilder;

pub use crate::operation::search_public_records::_search_public_records_output::SearchPublicRecordsOutputBuilder;

impl crate::operation::search_public_records::builders::SearchPublicRecordsInputBuilder {
    /// 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_public_records::SearchPublicRecordsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::search_public_records::SearchPublicRecordsError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.search_public_records();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `SearchPublicRecords`.
///
/// Search public agent records across the authoritative + crawler indexes. Hybrid keyword + neural ranking, merged and fused (weighted RRF), with filters, org governance policy, and descriptor-visibility enforcement applied server-side. Public, authenticated (D-1).
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct SearchPublicRecordsFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::search_public_records::builders::SearchPublicRecordsInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::search_public_records::SearchPublicRecordsOutput,
        crate::operation::search_public_records::SearchPublicRecordsError,
    > for SearchPublicRecordsFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::search_public_records::SearchPublicRecordsOutput,
            crate::operation::search_public_records::SearchPublicRecordsError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl SearchPublicRecordsFluentBuilder {
    /// Creates a new `SearchPublicRecordsFluentBuilder`.
    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 SearchPublicRecords as a reference.
    pub fn as_input(&self) -> &crate::operation::search_public_records::builders::SearchPublicRecordsInputBuilder {
        &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_public_records::SearchPublicRecordsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::search_public_records::SearchPublicRecordsError,
            ::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_public_records::SearchPublicRecords::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::search_public_records::SearchPublicRecords::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_public_records::SearchPublicRecordsOutput,
        crate::operation::search_public_records::SearchPublicRecordsError,
        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
    }
    /// Create a paginator for this request
    ///
    /// Paginators are used by calling [`send().await`](crate::operation::search_public_records::paginator::SearchPublicRecordsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
    pub fn into_paginator(self) -> crate::operation::search_public_records::paginator::SearchPublicRecordsPaginator {
        crate::operation::search_public_records::paginator::SearchPublicRecordsPaginator::new(self.handle, self.inner)
    }
    /// Free-text natural-language query (ARD `text`). Drives semantic + lexical ranking.
    pub fn search_query(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.search_query(input.into());
        self
    }
    /// Free-text natural-language query (ARD `text`). Drives semantic + lexical ranking.
    pub fn set_search_query(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_search_query(input);
        self
    }
    /// Free-text natural-language query (ARD `text`). Drives semantic + lexical ranking.
    pub fn get_search_query(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_search_query()
    }
    /// Structured filter narrowing the results, in the grammar of Agent Registry's SearchDiscoverableRegistryRecords `filters`: `$eq`, `$ne` and `$in` on a field, with `$and` or `$or` over single-condition objects, never nested. Fields are `identifier`, `domain`, `recordType`, `descriptorType`, `provenance` and `recordVersion`, and `identifier` also takes `$prefix`. For example `{"recordType": {"$eq": "AGENT"}}` or `{"$or": \[{"recordType": {"$eq": "MCP"}}, {"domain": {"$eq": "acme.com"}}\]}`. Limits, the same ones Agent Registry applies: at most 10 conditions, `$in` takes 1-25 values, values are strings of 1-512 characters, and `{}` is invalid. A `document` can't carry `@length`, so the service enforces these and answers a filter past them with a ValidationException, as Agent Registry does.
    pub fn filters(mut self, input: ::aws_smithy_types::Document) -> Self {
        self.inner = self.inner.filters(input);
        self
    }
    /// Structured filter narrowing the results, in the grammar of Agent Registry's SearchDiscoverableRegistryRecords `filters`: `$eq`, `$ne` and `$in` on a field, with `$and` or `$or` over single-condition objects, never nested. Fields are `identifier`, `domain`, `recordType`, `descriptorType`, `provenance` and `recordVersion`, and `identifier` also takes `$prefix`. For example `{"recordType": {"$eq": "AGENT"}}` or `{"$or": \[{"recordType": {"$eq": "MCP"}}, {"domain": {"$eq": "acme.com"}}\]}`. Limits, the same ones Agent Registry applies: at most 10 conditions, `$in` takes 1-25 values, values are strings of 1-512 characters, and `{}` is invalid. A `document` can't carry `@length`, so the service enforces these and answers a filter past them with a ValidationException, as Agent Registry does.
    pub fn set_filters(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
        self.inner = self.inner.set_filters(input);
        self
    }
    /// Structured filter narrowing the results, in the grammar of Agent Registry's SearchDiscoverableRegistryRecords `filters`: `$eq`, `$ne` and `$in` on a field, with `$and` or `$or` over single-condition objects, never nested. Fields are `identifier`, `domain`, `recordType`, `descriptorType`, `provenance` and `recordVersion`, and `identifier` also takes `$prefix`. For example `{"recordType": {"$eq": "AGENT"}}` or `{"$or": \[{"recordType": {"$eq": "MCP"}}, {"domain": {"$eq": "acme.com"}}\]}`. Limits, the same ones Agent Registry applies: at most 10 conditions, `$in` takes 1-25 values, values are strings of 1-512 characters, and `{}` is invalid. A `document` can't carry `@length`, so the service enforces these and answers a filter past them with a ValidationException, as Agent Registry does.
    pub fn get_filters(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
        self.inner.get_filters()
    }
    /// Max records per page. Default 20, max 100.
    pub fn max_results(mut self, input: i32) -> Self {
        self.inner = self.inner.max_results(input);
        self
    }
    /// Max records per page. Default 20, max 100.
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_max_results(input);
        self
    }
    /// Max records per page. Default 20, max 100.
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        self.inner.get_max_results()
    }
    /// Opaque composite-cursor pagination token (O-DM12).
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.next_token(input.into());
        self
    }
    /// Opaque composite-cursor pagination token (O-DM12).
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_next_token(input);
        self
    }
    /// Opaque composite-cursor pagination token (O-DM12).
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_next_token()
    }
}