aws-sdk-appsync 1.111.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_graphql_api::_update_graphql_api_input::UpdateGraphqlApiInputBuilder;

pub use crate::operation::update_graphql_api::_update_graphql_api_output::UpdateGraphqlApiOutputBuilder;

impl crate::operation::update_graphql_api::builders::UpdateGraphqlApiInputBuilder {
    /// 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_graphql_api::UpdateGraphqlApiOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_graphql_api::UpdateGraphqlApiError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_graphql_api();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateGraphqlApi`.
///
/// <p>Updates a <code>GraphqlApi</code> object.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateGraphqlApiFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_graphql_api::builders::UpdateGraphqlApiInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_graphql_api::UpdateGraphqlApiOutput,
        crate::operation::update_graphql_api::UpdateGraphqlApiError,
    > for UpdateGraphqlApiFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_graphql_api::UpdateGraphqlApiOutput,
            crate::operation::update_graphql_api::UpdateGraphqlApiError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateGraphqlApiFluentBuilder {
    /// Creates a new `UpdateGraphqlApiFluentBuilder`.
    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 UpdateGraphqlApi as a reference.
    pub fn as_input(&self) -> &crate::operation::update_graphql_api::builders::UpdateGraphqlApiInputBuilder {
        &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_graphql_api::UpdateGraphqlApiOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_graphql_api::UpdateGraphqlApiError,
            ::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_graphql_api::UpdateGraphqlApi::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_graphql_api::UpdateGraphqlApi::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_graphql_api::UpdateGraphqlApiOutput,
        crate::operation::update_graphql_api::UpdateGraphqlApiError,
        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 name for the <code>GraphqlApi</code> object.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>The new name for the <code>GraphqlApi</code> object.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>The new name for the <code>GraphqlApi</code> object.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>The Amazon CloudWatch Logs configuration for the <code>GraphqlApi</code> object.</p>
    pub fn log_config(mut self, input: crate::types::LogConfig) -> Self {
        self.inner = self.inner.log_config(input);
        self
    }
    /// <p>The Amazon CloudWatch Logs configuration for the <code>GraphqlApi</code> object.</p>
    pub fn set_log_config(mut self, input: ::std::option::Option<crate::types::LogConfig>) -> Self {
        self.inner = self.inner.set_log_config(input);
        self
    }
    /// <p>The Amazon CloudWatch Logs configuration for the <code>GraphqlApi</code> object.</p>
    pub fn get_log_config(&self) -> &::std::option::Option<crate::types::LogConfig> {
        self.inner.get_log_config()
    }
    /// <p>The new authentication type for the <code>GraphqlApi</code> object.</p>
    pub fn authentication_type(mut self, input: crate::types::AuthenticationType) -> Self {
        self.inner = self.inner.authentication_type(input);
        self
    }
    /// <p>The new authentication type for the <code>GraphqlApi</code> object.</p>
    pub fn set_authentication_type(mut self, input: ::std::option::Option<crate::types::AuthenticationType>) -> Self {
        self.inner = self.inner.set_authentication_type(input);
        self
    }
    /// <p>The new authentication type for the <code>GraphqlApi</code> object.</p>
    pub fn get_authentication_type(&self) -> &::std::option::Option<crate::types::AuthenticationType> {
        self.inner.get_authentication_type()
    }
    /// <p>The new Amazon Cognito user pool configuration for the <code>~GraphqlApi</code> object.</p>
    pub fn user_pool_config(mut self, input: crate::types::UserPoolConfig) -> Self {
        self.inner = self.inner.user_pool_config(input);
        self
    }
    /// <p>The new Amazon Cognito user pool configuration for the <code>~GraphqlApi</code> object.</p>
    pub fn set_user_pool_config(mut self, input: ::std::option::Option<crate::types::UserPoolConfig>) -> Self {
        self.inner = self.inner.set_user_pool_config(input);
        self
    }
    /// <p>The new Amazon Cognito user pool configuration for the <code>~GraphqlApi</code> object.</p>
    pub fn get_user_pool_config(&self) -> &::std::option::Option<crate::types::UserPoolConfig> {
        self.inner.get_user_pool_config()
    }
    /// <p>The OpenID Connect configuration for the <code>GraphqlApi</code> object.</p>
    pub fn open_id_connect_config(mut self, input: crate::types::OpenIdConnectConfig) -> Self {
        self.inner = self.inner.open_id_connect_config(input);
        self
    }
    /// <p>The OpenID Connect configuration for the <code>GraphqlApi</code> object.</p>
    pub fn set_open_id_connect_config(mut self, input: ::std::option::Option<crate::types::OpenIdConnectConfig>) -> Self {
        self.inner = self.inner.set_open_id_connect_config(input);
        self
    }
    /// <p>The OpenID Connect configuration for the <code>GraphqlApi</code> object.</p>
    pub fn get_open_id_connect_config(&self) -> &::std::option::Option<crate::types::OpenIdConnectConfig> {
        self.inner.get_open_id_connect_config()
    }
    ///
    /// Appends an item to `additionalAuthenticationProviders`.
    ///
    /// To override the contents of this collection use [`set_additional_authentication_providers`](Self::set_additional_authentication_providers).
    ///
    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
    pub fn additional_authentication_providers(mut self, input: crate::types::AdditionalAuthenticationProvider) -> Self {
        self.inner = self.inner.additional_authentication_providers(input);
        self
    }
    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
    pub fn set_additional_authentication_providers(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::AdditionalAuthenticationProvider>>,
    ) -> Self {
        self.inner = self.inner.set_additional_authentication_providers(input);
        self
    }
    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
    pub fn get_additional_authentication_providers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AdditionalAuthenticationProvider>> {
        self.inner.get_additional_authentication_providers()
    }
    /// <p>A flag indicating whether to use X-Ray tracing for the <code>GraphqlApi</code>.</p>
    pub fn xray_enabled(mut self, input: bool) -> Self {
        self.inner = self.inner.xray_enabled(input);
        self
    }
    /// <p>A flag indicating whether to use X-Ray tracing for the <code>GraphqlApi</code>.</p>
    pub fn set_xray_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_xray_enabled(input);
        self
    }
    /// <p>A flag indicating whether to use X-Ray tracing for the <code>GraphqlApi</code>.</p>
    pub fn get_xray_enabled(&self) -> &::std::option::Option<bool> {
        self.inner.get_xray_enabled()
    }
    /// <p>Configuration for Lambda function authorization.</p>
    pub fn lambda_authorizer_config(mut self, input: crate::types::LambdaAuthorizerConfig) -> Self {
        self.inner = self.inner.lambda_authorizer_config(input);
        self
    }
    /// <p>Configuration for Lambda function authorization.</p>
    pub fn set_lambda_authorizer_config(mut self, input: ::std::option::Option<crate::types::LambdaAuthorizerConfig>) -> Self {
        self.inner = self.inner.set_lambda_authorizer_config(input);
        self
    }
    /// <p>Configuration for Lambda function authorization.</p>
    pub fn get_lambda_authorizer_config(&self) -> &::std::option::Option<crate::types::LambdaAuthorizerConfig> {
        self.inner.get_lambda_authorizer_config()
    }
    /// <p>The Identity and Access Management service role ARN for a merged API. The AppSync service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to prompt the <code>AUTO_MERGE</code> to update the merged API endpoint with the source API changes automatically.</p>
    pub fn merged_api_execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.merged_api_execution_role_arn(input.into());
        self
    }
    /// <p>The Identity and Access Management service role ARN for a merged API. The AppSync service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to prompt the <code>AUTO_MERGE</code> to update the merged API endpoint with the source API changes automatically.</p>
    pub fn set_merged_api_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_merged_api_execution_role_arn(input);
        self
    }
    /// <p>The Identity and Access Management service role ARN for a merged API. The AppSync service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to prompt the <code>AUTO_MERGE</code> to update the merged API endpoint with the source API changes automatically.</p>
    pub fn get_merged_api_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_merged_api_execution_role_arn()
    }
    /// <p>The owner contact information for an API resource.</p>
    /// <p>This field accepts any string input with a length of 0 - 256 characters.</p>
    pub fn owner_contact(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.owner_contact(input.into());
        self
    }
    /// <p>The owner contact information for an API resource.</p>
    /// <p>This field accepts any string input with a length of 0 - 256 characters.</p>
    pub fn set_owner_contact(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_owner_contact(input);
        self
    }
    /// <p>The owner contact information for an API resource.</p>
    /// <p>This field accepts any string input with a length of 0 - 256 characters.</p>
    pub fn get_owner_contact(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_owner_contact()
    }
    /// <p>Sets the value of the GraphQL API to enable (<code>ENABLED</code>) or disable (<code>DISABLED</code>) introspection. If no value is provided, the introspection configuration will be set to <code>ENABLED</code> by default. This field will produce an error if the operation attempts to use the introspection feature while this field is disabled.</p>
    /// <p>For more information about introspection, see <a href="https://graphql.org/learn/introspection/">GraphQL introspection</a>.</p>
    pub fn introspection_config(mut self, input: crate::types::GraphQlApiIntrospectionConfig) -> Self {
        self.inner = self.inner.introspection_config(input);
        self
    }
    /// <p>Sets the value of the GraphQL API to enable (<code>ENABLED</code>) or disable (<code>DISABLED</code>) introspection. If no value is provided, the introspection configuration will be set to <code>ENABLED</code> by default. This field will produce an error if the operation attempts to use the introspection feature while this field is disabled.</p>
    /// <p>For more information about introspection, see <a href="https://graphql.org/learn/introspection/">GraphQL introspection</a>.</p>
    pub fn set_introspection_config(mut self, input: ::std::option::Option<crate::types::GraphQlApiIntrospectionConfig>) -> Self {
        self.inner = self.inner.set_introspection_config(input);
        self
    }
    /// <p>Sets the value of the GraphQL API to enable (<code>ENABLED</code>) or disable (<code>DISABLED</code>) introspection. If no value is provided, the introspection configuration will be set to <code>ENABLED</code> by default. This field will produce an error if the operation attempts to use the introspection feature while this field is disabled.</p>
    /// <p>For more information about introspection, see <a href="https://graphql.org/learn/introspection/">GraphQL introspection</a>.</p>
    pub fn get_introspection_config(&self) -> &::std::option::Option<crate::types::GraphQlApiIntrospectionConfig> {
        self.inner.get_introspection_config()
    }
    /// <p>The maximum depth a query can have in a single request. Depth refers to the amount of nested levels allowed in the body of query. The default value is <code>0</code> (or unspecified), which indicates there's no depth limit. If you set a limit, it can be between <code>1</code> and <code>75</code> nested levels. This field will produce a limit error if the operation falls out of bounds.</p>
    /// <p>Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error, the error will be thrown upwards to the first nullable field available.</p>
    pub fn query_depth_limit(mut self, input: i32) -> Self {
        self.inner = self.inner.query_depth_limit(input);
        self
    }
    /// <p>The maximum depth a query can have in a single request. Depth refers to the amount of nested levels allowed in the body of query. The default value is <code>0</code> (or unspecified), which indicates there's no depth limit. If you set a limit, it can be between <code>1</code> and <code>75</code> nested levels. This field will produce a limit error if the operation falls out of bounds.</p>
    /// <p>Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error, the error will be thrown upwards to the first nullable field available.</p>
    pub fn set_query_depth_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_query_depth_limit(input);
        self
    }
    /// <p>The maximum depth a query can have in a single request. Depth refers to the amount of nested levels allowed in the body of query. The default value is <code>0</code> (or unspecified), which indicates there's no depth limit. If you set a limit, it can be between <code>1</code> and <code>75</code> nested levels. This field will produce a limit error if the operation falls out of bounds.</p>
    /// <p>Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error, the error will be thrown upwards to the first nullable field available.</p>
    pub fn get_query_depth_limit(&self) -> &::std::option::Option<i32> {
        self.inner.get_query_depth_limit()
    }
    /// <p>The maximum number of resolvers that can be invoked in a single request. The default value is <code>0</code> (or unspecified), which will set the limit to <code>10000</code>. When specified, the limit value can be between <code>1</code> and <code>10000</code>. This field will produce a limit error if the operation falls out of bounds.</p>
    pub fn resolver_count_limit(mut self, input: i32) -> Self {
        self.inner = self.inner.resolver_count_limit(input);
        self
    }
    /// <p>The maximum number of resolvers that can be invoked in a single request. The default value is <code>0</code> (or unspecified), which will set the limit to <code>10000</code>. When specified, the limit value can be between <code>1</code> and <code>10000</code>. This field will produce a limit error if the operation falls out of bounds.</p>
    pub fn set_resolver_count_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_resolver_count_limit(input);
        self
    }
    /// <p>The maximum number of resolvers that can be invoked in a single request. The default value is <code>0</code> (or unspecified), which will set the limit to <code>10000</code>. When specified, the limit value can be between <code>1</code> and <code>10000</code>. This field will produce a limit error if the operation falls out of bounds.</p>
    pub fn get_resolver_count_limit(&self) -> &::std::option::Option<i32> {
        self.inner.get_resolver_count_limit()
    }
    /// <p>The <code>enhancedMetricsConfig</code> object.</p>
    pub fn enhanced_metrics_config(mut self, input: crate::types::EnhancedMetricsConfig) -> Self {
        self.inner = self.inner.enhanced_metrics_config(input);
        self
    }
    /// <p>The <code>enhancedMetricsConfig</code> object.</p>
    pub fn set_enhanced_metrics_config(mut self, input: ::std::option::Option<crate::types::EnhancedMetricsConfig>) -> Self {
        self.inner = self.inner.set_enhanced_metrics_config(input);
        self
    }
    /// <p>The <code>enhancedMetricsConfig</code> object.</p>
    pub fn get_enhanced_metrics_config(&self) -> &::std::option::Option<crate::types::EnhancedMetricsConfig> {
        self.inner.get_enhanced_metrics_config()
    }
}