aws-sdk-appsync 1.109.0

AWS SDK for AWS AppSync
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_resolver::_update_resolver_input::UpdateResolverInputBuilder;

pub use crate::operation::update_resolver::_update_resolver_output::UpdateResolverOutputBuilder;

impl crate::operation::update_resolver::builders::UpdateResolverInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_resolver::UpdateResolverOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_resolver::UpdateResolverError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_resolver();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateResolver`.
///
/// <p>Updates a <code>Resolver</code> object.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateResolverFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_resolver::builders::UpdateResolverInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_resolver::UpdateResolverOutput,
        crate::operation::update_resolver::UpdateResolverError,
    > for UpdateResolverFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_resolver::UpdateResolverOutput,
            crate::operation::update_resolver::UpdateResolverError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateResolverFluentBuilder {
    /// Creates a new `UpdateResolverFluentBuilder`.
    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 UpdateResolver as a reference.
    pub fn as_input(&self) -> &crate::operation::update_resolver::builders::UpdateResolverInputBuilder {
        &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::update_resolver::UpdateResolverOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_resolver::UpdateResolverError,
            ::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::update_resolver::UpdateResolver::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_resolver::UpdateResolver::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::update_resolver::UpdateResolverOutput,
        crate::operation::update_resolver::UpdateResolverError,
        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 API ID.</p>
    pub fn api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.api_id(input.into());
        self
    }
    /// <p>The API ID.</p>
    pub fn set_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_api_id(input);
        self
    }
    /// <p>The API ID.</p>
    pub fn get_api_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_api_id()
    }
    /// <p>The new type name.</p>
    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.type_name(input.into());
        self
    }
    /// <p>The new type name.</p>
    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_type_name(input);
        self
    }
    /// <p>The new type name.</p>
    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_type_name()
    }
    /// <p>The new field name.</p>
    pub fn field_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.field_name(input.into());
        self
    }
    /// <p>The new field name.</p>
    pub fn set_field_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_field_name(input);
        self
    }
    /// <p>The new field name.</p>
    pub fn get_field_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_field_name()
    }
    /// <p>The new data source name.</p>
    pub fn data_source_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.data_source_name(input.into());
        self
    }
    /// <p>The new data source name.</p>
    pub fn set_data_source_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_data_source_name(input);
        self
    }
    /// <p>The new data source name.</p>
    pub fn get_data_source_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_data_source_name()
    }
    /// <p>The new request mapping template.</p>
    /// <p>A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).</p>
    /// <p>VTL request mapping templates are optional when using an Lambda data source. For all other data sources, VTL request and response mapping templates are required.</p>
    pub fn request_mapping_template(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.request_mapping_template(input.into());
        self
    }
    /// <p>The new request mapping template.</p>
    /// <p>A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).</p>
    /// <p>VTL request mapping templates are optional when using an Lambda data source. For all other data sources, VTL request and response mapping templates are required.</p>
    pub fn set_request_mapping_template(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_request_mapping_template(input);
        self
    }
    /// <p>The new request mapping template.</p>
    /// <p>A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).</p>
    /// <p>VTL request mapping templates are optional when using an Lambda data source. For all other data sources, VTL request and response mapping templates are required.</p>
    pub fn get_request_mapping_template(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_request_mapping_template()
    }
    /// <p>The new response mapping template.</p>
    pub fn response_mapping_template(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.response_mapping_template(input.into());
        self
    }
    /// <p>The new response mapping template.</p>
    pub fn set_response_mapping_template(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_response_mapping_template(input);
        self
    }
    /// <p>The new response mapping template.</p>
    pub fn get_response_mapping_template(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_response_mapping_template()
    }
    /// <p>The resolver type.</p>
    /// <ul>
    /// <li>
    /// <p><b>UNIT</b>: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.</p></li>
    /// <li>
    /// <p><b>PIPELINE</b>: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of <code>Function</code> objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.</p></li>
    /// </ul>
    pub fn kind(mut self, input: crate::types::ResolverKind) -> Self {
        self.inner = self.inner.kind(input);
        self
    }
    /// <p>The resolver type.</p>
    /// <ul>
    /// <li>
    /// <p><b>UNIT</b>: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.</p></li>
    /// <li>
    /// <p><b>PIPELINE</b>: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of <code>Function</code> objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.</p></li>
    /// </ul>
    pub fn set_kind(mut self, input: ::std::option::Option<crate::types::ResolverKind>) -> Self {
        self.inner = self.inner.set_kind(input);
        self
    }
    /// <p>The resolver type.</p>
    /// <ul>
    /// <li>
    /// <p><b>UNIT</b>: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.</p></li>
    /// <li>
    /// <p><b>PIPELINE</b>: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of <code>Function</code> objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.</p></li>
    /// </ul>
    pub fn get_kind(&self) -> &::std::option::Option<crate::types::ResolverKind> {
        self.inner.get_kind()
    }
    /// <p>The <code>PipelineConfig</code>.</p>
    pub fn pipeline_config(mut self, input: crate::types::PipelineConfig) -> Self {
        self.inner = self.inner.pipeline_config(input);
        self
    }
    /// <p>The <code>PipelineConfig</code>.</p>
    pub fn set_pipeline_config(mut self, input: ::std::option::Option<crate::types::PipelineConfig>) -> Self {
        self.inner = self.inner.set_pipeline_config(input);
        self
    }
    /// <p>The <code>PipelineConfig</code>.</p>
    pub fn get_pipeline_config(&self) -> &::std::option::Option<crate::types::PipelineConfig> {
        self.inner.get_pipeline_config()
    }
    /// <p>The <code>SyncConfig</code> for a resolver attached to a versioned data source.</p>
    pub fn sync_config(mut self, input: crate::types::SyncConfig) -> Self {
        self.inner = self.inner.sync_config(input);
        self
    }
    /// <p>The <code>SyncConfig</code> for a resolver attached to a versioned data source.</p>
    pub fn set_sync_config(mut self, input: ::std::option::Option<crate::types::SyncConfig>) -> Self {
        self.inner = self.inner.set_sync_config(input);
        self
    }
    /// <p>The <code>SyncConfig</code> for a resolver attached to a versioned data source.</p>
    pub fn get_sync_config(&self) -> &::std::option::Option<crate::types::SyncConfig> {
        self.inner.get_sync_config()
    }
    /// <p>The caching configuration for the resolver.</p>
    pub fn caching_config(mut self, input: crate::types::CachingConfig) -> Self {
        self.inner = self.inner.caching_config(input);
        self
    }
    /// <p>The caching configuration for the resolver.</p>
    pub fn set_caching_config(mut self, input: ::std::option::Option<crate::types::CachingConfig>) -> Self {
        self.inner = self.inner.set_caching_config(input);
        self
    }
    /// <p>The caching configuration for the resolver.</p>
    pub fn get_caching_config(&self) -> &::std::option::Option<crate::types::CachingConfig> {
        self.inner.get_caching_config()
    }
    /// <p>The maximum batching size for a resolver.</p>
    pub fn max_batch_size(mut self, input: i32) -> Self {
        self.inner = self.inner.max_batch_size(input);
        self
    }
    /// <p>The maximum batching size for a resolver.</p>
    pub fn set_max_batch_size(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_max_batch_size(input);
        self
    }
    /// <p>The maximum batching size for a resolver.</p>
    pub fn get_max_batch_size(&self) -> &::std::option::Option<i32> {
        self.inner.get_max_batch_size()
    }
    /// <p>Describes a runtime used by an Amazon Web Services AppSync pipeline resolver or Amazon Web Services AppSync function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.</p>
    pub fn runtime(mut self, input: crate::types::AppSyncRuntime) -> Self {
        self.inner = self.inner.runtime(input);
        self
    }
    /// <p>Describes a runtime used by an Amazon Web Services AppSync pipeline resolver or Amazon Web Services AppSync function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.</p>
    pub fn set_runtime(mut self, input: ::std::option::Option<crate::types::AppSyncRuntime>) -> Self {
        self.inner = self.inner.set_runtime(input);
        self
    }
    /// <p>Describes a runtime used by an Amazon Web Services AppSync pipeline resolver or Amazon Web Services AppSync function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.</p>
    pub fn get_runtime(&self) -> &::std::option::Option<crate::types::AppSyncRuntime> {
        self.inner.get_runtime()
    }
    /// <p>The <code>resolver</code> code that contains the request and response functions. When code is used, the <code>runtime</code> is required. The <code>runtime</code> value must be <code>APPSYNC_JS</code>.</p>
    pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.code(input.into());
        self
    }
    /// <p>The <code>resolver</code> code that contains the request and response functions. When code is used, the <code>runtime</code> is required. The <code>runtime</code> value must be <code>APPSYNC_JS</code>.</p>
    pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_code(input);
        self
    }
    /// <p>The <code>resolver</code> code that contains the request and response functions. When code is used, the <code>runtime</code> is required. The <code>runtime</code> value must be <code>APPSYNC_JS</code>.</p>
    pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_code()
    }
    /// <p>Enables or disables enhanced resolver metrics for specified resolvers. Note that <code>metricsConfig</code> won't be used unless the <code>resolverLevelMetricsBehavior</code> value is set to <code>PER_RESOLVER_METRICS</code>. If the <code>resolverLevelMetricsBehavior</code> is set to <code>FULL_REQUEST_RESOLVER_METRICS</code> instead, <code>metricsConfig</code> will be ignored. However, you can still set its value.</p>
    /// <p><code>metricsConfig</code> can be <code>ENABLED</code> or <code>DISABLED</code>.</p>
    pub fn metrics_config(mut self, input: crate::types::ResolverLevelMetricsConfig) -> Self {
        self.inner = self.inner.metrics_config(input);
        self
    }
    /// <p>Enables or disables enhanced resolver metrics for specified resolvers. Note that <code>metricsConfig</code> won't be used unless the <code>resolverLevelMetricsBehavior</code> value is set to <code>PER_RESOLVER_METRICS</code>. If the <code>resolverLevelMetricsBehavior</code> is set to <code>FULL_REQUEST_RESOLVER_METRICS</code> instead, <code>metricsConfig</code> will be ignored. However, you can still set its value.</p>
    /// <p><code>metricsConfig</code> can be <code>ENABLED</code> or <code>DISABLED</code>.</p>
    pub fn set_metrics_config(mut self, input: ::std::option::Option<crate::types::ResolverLevelMetricsConfig>) -> Self {
        self.inner = self.inner.set_metrics_config(input);
        self
    }
    /// <p>Enables or disables enhanced resolver metrics for specified resolvers. Note that <code>metricsConfig</code> won't be used unless the <code>resolverLevelMetricsBehavior</code> value is set to <code>PER_RESOLVER_METRICS</code>. If the <code>resolverLevelMetricsBehavior</code> is set to <code>FULL_REQUEST_RESOLVER_METRICS</code> instead, <code>metricsConfig</code> will be ignored. However, you can still set its value.</p>
    /// <p><code>metricsConfig</code> can be <code>ENABLED</code> or <code>DISABLED</code>.</p>
    pub fn get_metrics_config(&self) -> &::std::option::Option<crate::types::ResolverLevelMetricsConfig> {
        self.inner.get_metrics_config()
    }
}