All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.appsync.model.UpdateGraphqlApiRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon AppSync module holds the client classes that are used for communicating with Amazon AppSync.

There is a newer version: 2.29.15
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.appsync.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class UpdateGraphqlApiRequest extends AppSyncRequest implements
        ToCopyableBuilder {
    private static final SdkField API_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("apiId")
            .getter(getter(UpdateGraphqlApiRequest::apiId)).setter(setter(Builder::apiId))
            .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("apiId").build()).build();

    private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
            .getter(getter(UpdateGraphqlApiRequest::name)).setter(setter(Builder::name))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();

    private static final SdkField LOG_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
            .memberName("logConfig").getter(getter(UpdateGraphqlApiRequest::logConfig)).setter(setter(Builder::logConfig))
            .constructor(LogConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("logConfig").build()).build();

    private static final SdkField AUTHENTICATION_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("authenticationType").getter(getter(UpdateGraphqlApiRequest::authenticationTypeAsString))
            .setter(setter(Builder::authenticationType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("authenticationType").build())
            .build();

    private static final SdkField USER_POOL_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("userPoolConfig")
            .getter(getter(UpdateGraphqlApiRequest::userPoolConfig)).setter(setter(Builder::userPoolConfig))
            .constructor(UserPoolConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("userPoolConfig").build()).build();

    private static final SdkField OPEN_ID_CONNECT_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("openIDConnectConfig")
            .getter(getter(UpdateGraphqlApiRequest::openIDConnectConfig)).setter(setter(Builder::openIDConnectConfig))
            .constructor(OpenIDConnectConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("openIDConnectConfig").build())
            .build();

    private static final SdkField> ADDITIONAL_AUTHENTICATION_PROVIDERS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("additionalAuthenticationProviders")
            .getter(getter(UpdateGraphqlApiRequest::additionalAuthenticationProviders))
            .setter(setter(Builder::additionalAuthenticationProviders))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("additionalAuthenticationProviders")
                    .build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(AdditionalAuthenticationProvider::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField XRAY_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .memberName("xrayEnabled").getter(getter(UpdateGraphqlApiRequest::xrayEnabled)).setter(setter(Builder::xrayEnabled))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("xrayEnabled").build()).build();

    private static final SdkField LAMBDA_AUTHORIZER_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("lambdaAuthorizerConfig")
            .getter(getter(UpdateGraphqlApiRequest::lambdaAuthorizerConfig)).setter(setter(Builder::lambdaAuthorizerConfig))
            .constructor(LambdaAuthorizerConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lambdaAuthorizerConfig").build())
            .build();

    private static final SdkField MERGED_API_EXECUTION_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("mergedApiExecutionRoleArn").getter(getter(UpdateGraphqlApiRequest::mergedApiExecutionRoleArn))
            .setter(setter(Builder::mergedApiExecutionRoleArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("mergedApiExecutionRoleArn").build())
            .build();

    private static final SdkField OWNER_CONTACT_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ownerContact").getter(getter(UpdateGraphqlApiRequest::ownerContact))
            .setter(setter(Builder::ownerContact))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ownerContact").build()).build();

    private static final SdkField INTROSPECTION_CONFIG_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("introspectionConfig").getter(getter(UpdateGraphqlApiRequest::introspectionConfigAsString))
            .setter(setter(Builder::introspectionConfig))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("introspectionConfig").build())
            .build();

    private static final SdkField QUERY_DEPTH_LIMIT_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("queryDepthLimit").getter(getter(UpdateGraphqlApiRequest::queryDepthLimit))
            .setter(setter(Builder::queryDepthLimit))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("queryDepthLimit").build()).build();

    private static final SdkField RESOLVER_COUNT_LIMIT_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("resolverCountLimit").getter(getter(UpdateGraphqlApiRequest::resolverCountLimit))
            .setter(setter(Builder::resolverCountLimit))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("resolverCountLimit").build())
            .build();

    private static final SdkField ENHANCED_METRICS_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("enhancedMetricsConfig")
            .getter(getter(UpdateGraphqlApiRequest::enhancedMetricsConfig)).setter(setter(Builder::enhancedMetricsConfig))
            .constructor(EnhancedMetricsConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("enhancedMetricsConfig").build())
            .build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(API_ID_FIELD, NAME_FIELD,
            LOG_CONFIG_FIELD, AUTHENTICATION_TYPE_FIELD, USER_POOL_CONFIG_FIELD, OPEN_ID_CONNECT_CONFIG_FIELD,
            ADDITIONAL_AUTHENTICATION_PROVIDERS_FIELD, XRAY_ENABLED_FIELD, LAMBDA_AUTHORIZER_CONFIG_FIELD,
            MERGED_API_EXECUTION_ROLE_ARN_FIELD, OWNER_CONTACT_FIELD, INTROSPECTION_CONFIG_FIELD, QUERY_DEPTH_LIMIT_FIELD,
            RESOLVER_COUNT_LIMIT_FIELD, ENHANCED_METRICS_CONFIG_FIELD));

    private final String apiId;

    private final String name;

    private final LogConfig logConfig;

    private final String authenticationType;

    private final UserPoolConfig userPoolConfig;

    private final OpenIDConnectConfig openIDConnectConfig;

    private final List additionalAuthenticationProviders;

    private final Boolean xrayEnabled;

    private final LambdaAuthorizerConfig lambdaAuthorizerConfig;

    private final String mergedApiExecutionRoleArn;

    private final String ownerContact;

    private final String introspectionConfig;

    private final Integer queryDepthLimit;

    private final Integer resolverCountLimit;

    private final EnhancedMetricsConfig enhancedMetricsConfig;

    private UpdateGraphqlApiRequest(BuilderImpl builder) {
        super(builder);
        this.apiId = builder.apiId;
        this.name = builder.name;
        this.logConfig = builder.logConfig;
        this.authenticationType = builder.authenticationType;
        this.userPoolConfig = builder.userPoolConfig;
        this.openIDConnectConfig = builder.openIDConnectConfig;
        this.additionalAuthenticationProviders = builder.additionalAuthenticationProviders;
        this.xrayEnabled = builder.xrayEnabled;
        this.lambdaAuthorizerConfig = builder.lambdaAuthorizerConfig;
        this.mergedApiExecutionRoleArn = builder.mergedApiExecutionRoleArn;
        this.ownerContact = builder.ownerContact;
        this.introspectionConfig = builder.introspectionConfig;
        this.queryDepthLimit = builder.queryDepthLimit;
        this.resolverCountLimit = builder.resolverCountLimit;
        this.enhancedMetricsConfig = builder.enhancedMetricsConfig;
    }

    /**
     * 

* The API ID. *

* * @return The API ID. */ public final String apiId() { return apiId; } /** *

* The new name for the GraphqlApi object. *

* * @return The new name for the GraphqlApi object. */ public final String name() { return name; } /** *

* The Amazon CloudWatch Logs configuration for the GraphqlApi object. *

* * @return The Amazon CloudWatch Logs configuration for the GraphqlApi object. */ public final LogConfig logConfig() { return logConfig; } /** *

* The new authentication type for the GraphqlApi object. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #authenticationType} will return {@link AuthenticationType#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #authenticationTypeAsString}. *

* * @return The new authentication type for the GraphqlApi object. * @see AuthenticationType */ public final AuthenticationType authenticationType() { return AuthenticationType.fromValue(authenticationType); } /** *

* The new authentication type for the GraphqlApi object. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #authenticationType} will return {@link AuthenticationType#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #authenticationTypeAsString}. *

* * @return The new authentication type for the GraphqlApi object. * @see AuthenticationType */ public final String authenticationTypeAsString() { return authenticationType; } /** *

* The new Amazon Cognito user pool configuration for the ~GraphqlApi object. *

* * @return The new Amazon Cognito user pool configuration for the ~GraphqlApi object. */ public final UserPoolConfig userPoolConfig() { return userPoolConfig; } /** *

* The OpenID Connect configuration for the GraphqlApi object. *

* * @return The OpenID Connect configuration for the GraphqlApi object. */ public final OpenIDConnectConfig openIDConnectConfig() { return openIDConnectConfig; } /** * For responses, this returns true if the service returned a value for the AdditionalAuthenticationProviders * property. This DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} * method on the property). This is useful because the SDK will never return a null collection or map, but you may * need to differentiate between the service returning nothing (or null) and the service returning an empty * collection or map. For requests, this returns true if a value for the property was specified in the request * builder, and false if a value was not specified. */ public final boolean hasAdditionalAuthenticationProviders() { return additionalAuthenticationProviders != null && !(additionalAuthenticationProviders instanceof SdkAutoConstructList); } /** *

* A list of additional authentication providers for the GraphqlApi API. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasAdditionalAuthenticationProviders} * method. *

* * @return A list of additional authentication providers for the GraphqlApi API. */ public final List additionalAuthenticationProviders() { return additionalAuthenticationProviders; } /** *

* A flag indicating whether to use X-Ray tracing for the GraphqlApi. *

* * @return A flag indicating whether to use X-Ray tracing for the GraphqlApi. */ public final Boolean xrayEnabled() { return xrayEnabled; } /** *

* Configuration for Lambda function authorization. *

* * @return Configuration for Lambda function authorization. */ public final LambdaAuthorizerConfig lambdaAuthorizerConfig() { return lambdaAuthorizerConfig; } /** *

* 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 AUTO_MERGE * to update the merged API endpoint with the source API changes automatically. *

* * @return 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 * AUTO_MERGE to update the merged API endpoint with the source API changes automatically. */ public final String mergedApiExecutionRoleArn() { return mergedApiExecutionRoleArn; } /** *

* The owner contact information for an API resource. *

*

* This field accepts any string input with a length of 0 - 256 characters. *

* * @return The owner contact information for an API resource.

*

* This field accepts any string input with a length of 0 - 256 characters. */ public final String ownerContact() { return ownerContact; } /** *

* Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED) * introspection. If no value is provided, the introspection configuration will be set to ENABLED by * default. This field will produce an error if the operation attempts to use the introspection feature while this * field is disabled. *

*

* For more information about introspection, see GraphQL * introspection. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #introspectionConfig} will return {@link GraphQLApiIntrospectionConfig#UNKNOWN_TO_SDK_VERSION}. The raw * value returned by the service is available from {@link #introspectionConfigAsString}. *

* * @return Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED) * introspection. If no value is provided, the introspection configuration will be set to * ENABLED by default. This field will produce an error if the operation attempts to use the * introspection feature while this field is disabled.

*

* For more information about introspection, see GraphQL * introspection. * @see GraphQLApiIntrospectionConfig */ public final GraphQLApiIntrospectionConfig introspectionConfig() { return GraphQLApiIntrospectionConfig.fromValue(introspectionConfig); } /** *

* Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED) * introspection. If no value is provided, the introspection configuration will be set to ENABLED by * default. This field will produce an error if the operation attempts to use the introspection feature while this * field is disabled. *

*

* For more information about introspection, see GraphQL * introspection. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #introspectionConfig} will return {@link GraphQLApiIntrospectionConfig#UNKNOWN_TO_SDK_VERSION}. The raw * value returned by the service is available from {@link #introspectionConfigAsString}. *

* * @return Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED) * introspection. If no value is provided, the introspection configuration will be set to * ENABLED by default. This field will produce an error if the operation attempts to use the * introspection feature while this field is disabled.

*

* For more information about introspection, see GraphQL * introspection. * @see GraphQLApiIntrospectionConfig */ public final String introspectionConfigAsString() { return introspectionConfig; } /** *

* 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 0 (or unspecified), which indicates there's no depth limit. * If you set a limit, it can be between 1 and 75 nested levels. This field will produce a * limit error if the operation falls out of bounds. *

*

* 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. *

* * @return 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 0 (or unspecified), which indicates * there's no depth limit. If you set a limit, it can be between 1 and 75 nested * levels. This field will produce a limit error if the operation falls out of bounds.

*

* 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. */ public final Integer queryDepthLimit() { return queryDepthLimit; } /** *

* The maximum number of resolvers that can be invoked in a single request. The default value is 0 (or * unspecified), which will set the limit to 10000. When specified, the limit value can be between * 1 and 10000. This field will produce a limit error if the operation falls out of * bounds. *

* * @return The maximum number of resolvers that can be invoked in a single request. The default value is * 0 (or unspecified), which will set the limit to 10000. When specified, the * limit value can be between 1 and 10000. This field will produce a limit error * if the operation falls out of bounds. */ public final Integer resolverCountLimit() { return resolverCountLimit; } /** *

* The enhancedMetricsConfig object. *

* * @return The enhancedMetricsConfig object. */ public final EnhancedMetricsConfig enhancedMetricsConfig() { return enhancedMetricsConfig; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(apiId()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(logConfig()); hashCode = 31 * hashCode + Objects.hashCode(authenticationTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(userPoolConfig()); hashCode = 31 * hashCode + Objects.hashCode(openIDConnectConfig()); hashCode = 31 * hashCode + Objects.hashCode(hasAdditionalAuthenticationProviders() ? additionalAuthenticationProviders() : null); hashCode = 31 * hashCode + Objects.hashCode(xrayEnabled()); hashCode = 31 * hashCode + Objects.hashCode(lambdaAuthorizerConfig()); hashCode = 31 * hashCode + Objects.hashCode(mergedApiExecutionRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(ownerContact()); hashCode = 31 * hashCode + Objects.hashCode(introspectionConfigAsString()); hashCode = 31 * hashCode + Objects.hashCode(queryDepthLimit()); hashCode = 31 * hashCode + Objects.hashCode(resolverCountLimit()); hashCode = 31 * hashCode + Objects.hashCode(enhancedMetricsConfig()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof UpdateGraphqlApiRequest)) { return false; } UpdateGraphqlApiRequest other = (UpdateGraphqlApiRequest) obj; return Objects.equals(apiId(), other.apiId()) && Objects.equals(name(), other.name()) && Objects.equals(logConfig(), other.logConfig()) && Objects.equals(authenticationTypeAsString(), other.authenticationTypeAsString()) && Objects.equals(userPoolConfig(), other.userPoolConfig()) && Objects.equals(openIDConnectConfig(), other.openIDConnectConfig()) && hasAdditionalAuthenticationProviders() == other.hasAdditionalAuthenticationProviders() && Objects.equals(additionalAuthenticationProviders(), other.additionalAuthenticationProviders()) && Objects.equals(xrayEnabled(), other.xrayEnabled()) && Objects.equals(lambdaAuthorizerConfig(), other.lambdaAuthorizerConfig()) && Objects.equals(mergedApiExecutionRoleArn(), other.mergedApiExecutionRoleArn()) && Objects.equals(ownerContact(), other.ownerContact()) && Objects.equals(introspectionConfigAsString(), other.introspectionConfigAsString()) && Objects.equals(queryDepthLimit(), other.queryDepthLimit()) && Objects.equals(resolverCountLimit(), other.resolverCountLimit()) && Objects.equals(enhancedMetricsConfig(), other.enhancedMetricsConfig()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString .builder("UpdateGraphqlApiRequest") .add("ApiId", apiId()) .add("Name", name()) .add("LogConfig", logConfig()) .add("AuthenticationType", authenticationTypeAsString()) .add("UserPoolConfig", userPoolConfig()) .add("OpenIDConnectConfig", openIDConnectConfig()) .add("AdditionalAuthenticationProviders", hasAdditionalAuthenticationProviders() ? additionalAuthenticationProviders() : null) .add("XrayEnabled", xrayEnabled()).add("LambdaAuthorizerConfig", lambdaAuthorizerConfig()) .add("MergedApiExecutionRoleArn", mergedApiExecutionRoleArn()).add("OwnerContact", ownerContact()) .add("IntrospectionConfig", introspectionConfigAsString()).add("QueryDepthLimit", queryDepthLimit()) .add("ResolverCountLimit", resolverCountLimit()).add("EnhancedMetricsConfig", enhancedMetricsConfig()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "apiId": return Optional.ofNullable(clazz.cast(apiId())); case "name": return Optional.ofNullable(clazz.cast(name())); case "logConfig": return Optional.ofNullable(clazz.cast(logConfig())); case "authenticationType": return Optional.ofNullable(clazz.cast(authenticationTypeAsString())); case "userPoolConfig": return Optional.ofNullable(clazz.cast(userPoolConfig())); case "openIDConnectConfig": return Optional.ofNullable(clazz.cast(openIDConnectConfig())); case "additionalAuthenticationProviders": return Optional.ofNullable(clazz.cast(additionalAuthenticationProviders())); case "xrayEnabled": return Optional.ofNullable(clazz.cast(xrayEnabled())); case "lambdaAuthorizerConfig": return Optional.ofNullable(clazz.cast(lambdaAuthorizerConfig())); case "mergedApiExecutionRoleArn": return Optional.ofNullable(clazz.cast(mergedApiExecutionRoleArn())); case "ownerContact": return Optional.ofNullable(clazz.cast(ownerContact())); case "introspectionConfig": return Optional.ofNullable(clazz.cast(introspectionConfigAsString())); case "queryDepthLimit": return Optional.ofNullable(clazz.cast(queryDepthLimit())); case "resolverCountLimit": return Optional.ofNullable(clazz.cast(resolverCountLimit())); case "enhancedMetricsConfig": return Optional.ofNullable(clazz.cast(enhancedMetricsConfig())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((UpdateGraphqlApiRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends AppSyncRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The API ID. *

* * @param apiId * The API ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder apiId(String apiId); /** *

* The new name for the GraphqlApi object. *

* * @param name * The new name for the GraphqlApi object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

* The Amazon CloudWatch Logs configuration for the GraphqlApi object. *

* * @param logConfig * The Amazon CloudWatch Logs configuration for the GraphqlApi object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder logConfig(LogConfig logConfig); /** *

* The Amazon CloudWatch Logs configuration for the GraphqlApi object. *

* This is a convenience method that creates an instance of the {@link LogConfig.Builder} avoiding the need to * create one manually via {@link LogConfig#builder()}. * *

* When the {@link Consumer} completes, {@link LogConfig.Builder#build()} is called immediately and its result * is passed to {@link #logConfig(LogConfig)}. * * @param logConfig * a consumer that will call methods on {@link LogConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #logConfig(LogConfig) */ default Builder logConfig(Consumer logConfig) { return logConfig(LogConfig.builder().applyMutation(logConfig).build()); } /** *

* The new authentication type for the GraphqlApi object. *

* * @param authenticationType * The new authentication type for the GraphqlApi object. * @see AuthenticationType * @return Returns a reference to this object so that method calls can be chained together. * @see AuthenticationType */ Builder authenticationType(String authenticationType); /** *

* The new authentication type for the GraphqlApi object. *

* * @param authenticationType * The new authentication type for the GraphqlApi object. * @see AuthenticationType * @return Returns a reference to this object so that method calls can be chained together. * @see AuthenticationType */ Builder authenticationType(AuthenticationType authenticationType); /** *

* The new Amazon Cognito user pool configuration for the ~GraphqlApi object. *

* * @param userPoolConfig * The new Amazon Cognito user pool configuration for the ~GraphqlApi object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder userPoolConfig(UserPoolConfig userPoolConfig); /** *

* The new Amazon Cognito user pool configuration for the ~GraphqlApi object. *

* This is a convenience method that creates an instance of the {@link UserPoolConfig.Builder} avoiding the need * to create one manually via {@link UserPoolConfig#builder()}. * *

* When the {@link Consumer} completes, {@link UserPoolConfig.Builder#build()} is called immediately and its * result is passed to {@link #userPoolConfig(UserPoolConfig)}. * * @param userPoolConfig * a consumer that will call methods on {@link UserPoolConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #userPoolConfig(UserPoolConfig) */ default Builder userPoolConfig(Consumer userPoolConfig) { return userPoolConfig(UserPoolConfig.builder().applyMutation(userPoolConfig).build()); } /** *

* The OpenID Connect configuration for the GraphqlApi object. *

* * @param openIDConnectConfig * The OpenID Connect configuration for the GraphqlApi object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder openIDConnectConfig(OpenIDConnectConfig openIDConnectConfig); /** *

* The OpenID Connect configuration for the GraphqlApi object. *

* This is a convenience method that creates an instance of the {@link OpenIDConnectConfig.Builder} avoiding the * need to create one manually via {@link OpenIDConnectConfig#builder()}. * *

* When the {@link Consumer} completes, {@link OpenIDConnectConfig.Builder#build()} is called immediately and * its result is passed to {@link #openIDConnectConfig(OpenIDConnectConfig)}. * * @param openIDConnectConfig * a consumer that will call methods on {@link OpenIDConnectConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #openIDConnectConfig(OpenIDConnectConfig) */ default Builder openIDConnectConfig(Consumer openIDConnectConfig) { return openIDConnectConfig(OpenIDConnectConfig.builder().applyMutation(openIDConnectConfig).build()); } /** *

* A list of additional authentication providers for the GraphqlApi API. *

* * @param additionalAuthenticationProviders * A list of additional authentication providers for the GraphqlApi API. * @return Returns a reference to this object so that method calls can be chained together. */ Builder additionalAuthenticationProviders(Collection additionalAuthenticationProviders); /** *

* A list of additional authentication providers for the GraphqlApi API. *

* * @param additionalAuthenticationProviders * A list of additional authentication providers for the GraphqlApi API. * @return Returns a reference to this object so that method calls can be chained together. */ Builder additionalAuthenticationProviders(AdditionalAuthenticationProvider... additionalAuthenticationProviders); /** *

* A list of additional authentication providers for the GraphqlApi API. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.appsync.model.AdditionalAuthenticationProvider.Builder} avoiding the * need to create one manually via * {@link software.amazon.awssdk.services.appsync.model.AdditionalAuthenticationProvider#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.appsync.model.AdditionalAuthenticationProvider.Builder#build()} is * called immediately and its result is passed to {@link * #additionalAuthenticationProviders(List)}. * * @param additionalAuthenticationProviders * a consumer that will call methods on * {@link software.amazon.awssdk.services.appsync.model.AdditionalAuthenticationProvider.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #additionalAuthenticationProviders(java.util.Collection) */ Builder additionalAuthenticationProviders( Consumer... additionalAuthenticationProviders); /** *

* A flag indicating whether to use X-Ray tracing for the GraphqlApi. *

* * @param xrayEnabled * A flag indicating whether to use X-Ray tracing for the GraphqlApi. * @return Returns a reference to this object so that method calls can be chained together. */ Builder xrayEnabled(Boolean xrayEnabled); /** *

* Configuration for Lambda function authorization. *

* * @param lambdaAuthorizerConfig * Configuration for Lambda function authorization. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lambdaAuthorizerConfig(LambdaAuthorizerConfig lambdaAuthorizerConfig); /** *

* Configuration for Lambda function authorization. *

* This is a convenience method that creates an instance of the {@link LambdaAuthorizerConfig.Builder} avoiding * the need to create one manually via {@link LambdaAuthorizerConfig#builder()}. * *

* When the {@link Consumer} completes, {@link LambdaAuthorizerConfig.Builder#build()} is called immediately and * its result is passed to {@link #lambdaAuthorizerConfig(LambdaAuthorizerConfig)}. * * @param lambdaAuthorizerConfig * a consumer that will call methods on {@link LambdaAuthorizerConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #lambdaAuthorizerConfig(LambdaAuthorizerConfig) */ default Builder lambdaAuthorizerConfig(Consumer lambdaAuthorizerConfig) { return lambdaAuthorizerConfig(LambdaAuthorizerConfig.builder().applyMutation(lambdaAuthorizerConfig).build()); } /** *

* 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 * AUTO_MERGE to update the merged API endpoint with the source API changes automatically. *

* * @param mergedApiExecutionRoleArn * 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 * AUTO_MERGE to update the merged API endpoint with the source API changes automatically. * @return Returns a reference to this object so that method calls can be chained together. */ Builder mergedApiExecutionRoleArn(String mergedApiExecutionRoleArn); /** *

* The owner contact information for an API resource. *

*

* This field accepts any string input with a length of 0 - 256 characters. *

* * @param ownerContact * The owner contact information for an API resource.

*

* This field accepts any string input with a length of 0 - 256 characters. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ownerContact(String ownerContact); /** *

* Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED) * introspection. If no value is provided, the introspection configuration will be set to ENABLED * by default. This field will produce an error if the operation attempts to use the introspection feature while * this field is disabled. *

*

* For more information about introspection, see GraphQL * introspection. *

* * @param introspectionConfig * Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED) * introspection. If no value is provided, the introspection configuration will be set to * ENABLED by default. This field will produce an error if the operation attempts to use the * introspection feature while this field is disabled.

*

* For more information about introspection, see GraphQL introspection. * @see GraphQLApiIntrospectionConfig * @return Returns a reference to this object so that method calls can be chained together. * @see GraphQLApiIntrospectionConfig */ Builder introspectionConfig(String introspectionConfig); /** *

* Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED) * introspection. If no value is provided, the introspection configuration will be set to ENABLED * by default. This field will produce an error if the operation attempts to use the introspection feature while * this field is disabled. *

*

* For more information about introspection, see GraphQL * introspection. *

* * @param introspectionConfig * Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED) * introspection. If no value is provided, the introspection configuration will be set to * ENABLED by default. This field will produce an error if the operation attempts to use the * introspection feature while this field is disabled.

*

* For more information about introspection, see GraphQL introspection. * @see GraphQLApiIntrospectionConfig * @return Returns a reference to this object so that method calls can be chained together. * @see GraphQLApiIntrospectionConfig */ Builder introspectionConfig(GraphQLApiIntrospectionConfig introspectionConfig); /** *

* 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 0 (or unspecified), which indicates there's no depth * limit. If you set a limit, it can be between 1 and 75 nested levels. This field * will produce a limit error if the operation falls out of bounds. *

*

* 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. *

* * @param queryDepthLimit * 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 0 (or unspecified), which indicates * there's no depth limit. If you set a limit, it can be between 1 and 75 * nested levels. This field will produce a limit error if the operation falls out of bounds.

*

* 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. * @return Returns a reference to this object so that method calls can be chained together. */ Builder queryDepthLimit(Integer queryDepthLimit); /** *

* The maximum number of resolvers that can be invoked in a single request. The default value is 0 * (or unspecified), which will set the limit to 10000. When specified, the limit value can be * between 1 and 10000. This field will produce a limit error if the operation falls * out of bounds. *

* * @param resolverCountLimit * The maximum number of resolvers that can be invoked in a single request. The default value is * 0 (or unspecified), which will set the limit to 10000. When specified, the * limit value can be between 1 and 10000. This field will produce a limit * error if the operation falls out of bounds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resolverCountLimit(Integer resolverCountLimit); /** *

* The enhancedMetricsConfig object. *

* * @param enhancedMetricsConfig * The enhancedMetricsConfig object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder enhancedMetricsConfig(EnhancedMetricsConfig enhancedMetricsConfig); /** *

* The enhancedMetricsConfig object. *

* This is a convenience method that creates an instance of the {@link EnhancedMetricsConfig.Builder} avoiding * the need to create one manually via {@link EnhancedMetricsConfig#builder()}. * *

* When the {@link Consumer} completes, {@link EnhancedMetricsConfig.Builder#build()} is called immediately and * its result is passed to {@link #enhancedMetricsConfig(EnhancedMetricsConfig)}. * * @param enhancedMetricsConfig * a consumer that will call methods on {@link EnhancedMetricsConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #enhancedMetricsConfig(EnhancedMetricsConfig) */ default Builder enhancedMetricsConfig(Consumer enhancedMetricsConfig) { return enhancedMetricsConfig(EnhancedMetricsConfig.builder().applyMutation(enhancedMetricsConfig).build()); } @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends AppSyncRequest.BuilderImpl implements Builder { private String apiId; private String name; private LogConfig logConfig; private String authenticationType; private UserPoolConfig userPoolConfig; private OpenIDConnectConfig openIDConnectConfig; private List additionalAuthenticationProviders = DefaultSdkAutoConstructList .getInstance(); private Boolean xrayEnabled; private LambdaAuthorizerConfig lambdaAuthorizerConfig; private String mergedApiExecutionRoleArn; private String ownerContact; private String introspectionConfig; private Integer queryDepthLimit; private Integer resolverCountLimit; private EnhancedMetricsConfig enhancedMetricsConfig; private BuilderImpl() { } private BuilderImpl(UpdateGraphqlApiRequest model) { super(model); apiId(model.apiId); name(model.name); logConfig(model.logConfig); authenticationType(model.authenticationType); userPoolConfig(model.userPoolConfig); openIDConnectConfig(model.openIDConnectConfig); additionalAuthenticationProviders(model.additionalAuthenticationProviders); xrayEnabled(model.xrayEnabled); lambdaAuthorizerConfig(model.lambdaAuthorizerConfig); mergedApiExecutionRoleArn(model.mergedApiExecutionRoleArn); ownerContact(model.ownerContact); introspectionConfig(model.introspectionConfig); queryDepthLimit(model.queryDepthLimit); resolverCountLimit(model.resolverCountLimit); enhancedMetricsConfig(model.enhancedMetricsConfig); } public final String getApiId() { return apiId; } public final void setApiId(String apiId) { this.apiId = apiId; } @Override public final Builder apiId(String apiId) { this.apiId = apiId; return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final LogConfig.Builder getLogConfig() { return logConfig != null ? logConfig.toBuilder() : null; } public final void setLogConfig(LogConfig.BuilderImpl logConfig) { this.logConfig = logConfig != null ? logConfig.build() : null; } @Override public final Builder logConfig(LogConfig logConfig) { this.logConfig = logConfig; return this; } public final String getAuthenticationType() { return authenticationType; } public final void setAuthenticationType(String authenticationType) { this.authenticationType = authenticationType; } @Override public final Builder authenticationType(String authenticationType) { this.authenticationType = authenticationType; return this; } @Override public final Builder authenticationType(AuthenticationType authenticationType) { this.authenticationType(authenticationType == null ? null : authenticationType.toString()); return this; } public final UserPoolConfig.Builder getUserPoolConfig() { return userPoolConfig != null ? userPoolConfig.toBuilder() : null; } public final void setUserPoolConfig(UserPoolConfig.BuilderImpl userPoolConfig) { this.userPoolConfig = userPoolConfig != null ? userPoolConfig.build() : null; } @Override public final Builder userPoolConfig(UserPoolConfig userPoolConfig) { this.userPoolConfig = userPoolConfig; return this; } public final OpenIDConnectConfig.Builder getOpenIDConnectConfig() { return openIDConnectConfig != null ? openIDConnectConfig.toBuilder() : null; } public final void setOpenIDConnectConfig(OpenIDConnectConfig.BuilderImpl openIDConnectConfig) { this.openIDConnectConfig = openIDConnectConfig != null ? openIDConnectConfig.build() : null; } @Override public final Builder openIDConnectConfig(OpenIDConnectConfig openIDConnectConfig) { this.openIDConnectConfig = openIDConnectConfig; return this; } public final List getAdditionalAuthenticationProviders() { List result = AdditionalAuthenticationProvidersCopier .copyToBuilder(this.additionalAuthenticationProviders); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setAdditionalAuthenticationProviders( Collection additionalAuthenticationProviders) { this.additionalAuthenticationProviders = AdditionalAuthenticationProvidersCopier .copyFromBuilder(additionalAuthenticationProviders); } @Override public final Builder additionalAuthenticationProviders( Collection additionalAuthenticationProviders) { this.additionalAuthenticationProviders = AdditionalAuthenticationProvidersCopier .copy(additionalAuthenticationProviders); return this; } @Override @SafeVarargs public final Builder additionalAuthenticationProviders( AdditionalAuthenticationProvider... additionalAuthenticationProviders) { additionalAuthenticationProviders(Arrays.asList(additionalAuthenticationProviders)); return this; } @Override @SafeVarargs public final Builder additionalAuthenticationProviders( Consumer... additionalAuthenticationProviders) { additionalAuthenticationProviders(Stream.of(additionalAuthenticationProviders) .map(c -> AdditionalAuthenticationProvider.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final Boolean getXrayEnabled() { return xrayEnabled; } public final void setXrayEnabled(Boolean xrayEnabled) { this.xrayEnabled = xrayEnabled; } @Override public final Builder xrayEnabled(Boolean xrayEnabled) { this.xrayEnabled = xrayEnabled; return this; } public final LambdaAuthorizerConfig.Builder getLambdaAuthorizerConfig() { return lambdaAuthorizerConfig != null ? lambdaAuthorizerConfig.toBuilder() : null; } public final void setLambdaAuthorizerConfig(LambdaAuthorizerConfig.BuilderImpl lambdaAuthorizerConfig) { this.lambdaAuthorizerConfig = lambdaAuthorizerConfig != null ? lambdaAuthorizerConfig.build() : null; } @Override public final Builder lambdaAuthorizerConfig(LambdaAuthorizerConfig lambdaAuthorizerConfig) { this.lambdaAuthorizerConfig = lambdaAuthorizerConfig; return this; } public final String getMergedApiExecutionRoleArn() { return mergedApiExecutionRoleArn; } public final void setMergedApiExecutionRoleArn(String mergedApiExecutionRoleArn) { this.mergedApiExecutionRoleArn = mergedApiExecutionRoleArn; } @Override public final Builder mergedApiExecutionRoleArn(String mergedApiExecutionRoleArn) { this.mergedApiExecutionRoleArn = mergedApiExecutionRoleArn; return this; } public final String getOwnerContact() { return ownerContact; } public final void setOwnerContact(String ownerContact) { this.ownerContact = ownerContact; } @Override public final Builder ownerContact(String ownerContact) { this.ownerContact = ownerContact; return this; } public final String getIntrospectionConfig() { return introspectionConfig; } public final void setIntrospectionConfig(String introspectionConfig) { this.introspectionConfig = introspectionConfig; } @Override public final Builder introspectionConfig(String introspectionConfig) { this.introspectionConfig = introspectionConfig; return this; } @Override public final Builder introspectionConfig(GraphQLApiIntrospectionConfig introspectionConfig) { this.introspectionConfig(introspectionConfig == null ? null : introspectionConfig.toString()); return this; } public final Integer getQueryDepthLimit() { return queryDepthLimit; } public final void setQueryDepthLimit(Integer queryDepthLimit) { this.queryDepthLimit = queryDepthLimit; } @Override public final Builder queryDepthLimit(Integer queryDepthLimit) { this.queryDepthLimit = queryDepthLimit; return this; } public final Integer getResolverCountLimit() { return resolverCountLimit; } public final void setResolverCountLimit(Integer resolverCountLimit) { this.resolverCountLimit = resolverCountLimit; } @Override public final Builder resolverCountLimit(Integer resolverCountLimit) { this.resolverCountLimit = resolverCountLimit; return this; } public final EnhancedMetricsConfig.Builder getEnhancedMetricsConfig() { return enhancedMetricsConfig != null ? enhancedMetricsConfig.toBuilder() : null; } public final void setEnhancedMetricsConfig(EnhancedMetricsConfig.BuilderImpl enhancedMetricsConfig) { this.enhancedMetricsConfig = enhancedMetricsConfig != null ? enhancedMetricsConfig.build() : null; } @Override public final Builder enhancedMetricsConfig(EnhancedMetricsConfig enhancedMetricsConfig) { this.enhancedMetricsConfig = enhancedMetricsConfig; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public UpdateGraphqlApiRequest build() { return new UpdateGraphqlApiRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy